Orbit Fox by ThemeIsle - Version 2.10.20

Version Description

Download this release

Release Info

Developer themeisle
Plugin Icon 128x128 Orbit Fox by ThemeIsle
Version 2.10.20
Comparing to
See all releases

Code changes from version 2.10.19 to 2.10.20

Files changed (374) hide show
  1. CHANGELOG.md +4 -0
  2. core/includes/class-orbit-fox.php +1 -1
  3. languages/themeisle-companion.pot +65 -65
  4. readme.md +7 -0
  5. readme.txt +7 -0
  6. themeisle-companion.php +1 -1
  7. vendor/autoload.php +1 -1
  8. vendor/clue/stream-filter/README.md +0 -326
  9. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php +8 -5
  10. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php +8 -6
  11. vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php +8 -4
  12. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Batch.php +0 -0
  13. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Campaigns.php +0 -0
  14. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Fields.php +0 -0
  15. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Groups.php +0 -0
  16. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Segments.php +0 -0
  17. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Settings.php +0 -0
  18. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Stats.php +0 -0
  19. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Subscribers.php +0 -0
  20. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/WooCommerce.php +0 -0
  21. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/ApiAbstract.php +0 -0
  22. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/ApiConstants.php +0 -0
  23. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/BatchRequest.php +0 -0
  24. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/Collection.php +0 -0
  25. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/RestClient.php +0 -0
  26. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Exceptions/MailerLiteSdkException.php +0 -0
  27. vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/MailerLite.php +0 -0
  28. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/autoload.php +7 -0
  29. vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/CHANGELOG.md +0 -0
  30. vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/LICENSE +0 -0
  31. vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/src/CallbackFilter.php +0 -0
  32. vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/src/functions.php +0 -0
  33. vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/src/functions_include.php +0 -0
  34. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/ClassLoader.php +481 -0
  35. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/InstalledVersions.php +337 -0
  36. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/LICENSE +21 -0
  37. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_classmap.php +17 -0
  38. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_files.php +21 -0
  39. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_namespaces.php +9 -0
  40. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_psr4.php +29 -0
  41. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_real.php +75 -0
  42. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_static.php +173 -0
  43. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/installed.json +1732 -0
  44. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/installed.php +266 -0
  45. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/platform_check.php +26 -0
  46. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/.php_cs +23 -0
  47. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/CHANGELOG.md +1352 -0
  48. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/Dockerfile +18 -0
  49. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/LICENSE +27 -0
  50. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/UPGRADING.md +1203 -0
  51. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Client.php +501 -0
  52. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/ClientInterface.php +87 -0
  53. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +321 -0
  54. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +84 -0
  55. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +91 -0
  56. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +72 -0
  57. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +410 -0
  58. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +27 -0
  59. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php +9 -0
  60. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php +37 -0
  61. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +23 -0
  62. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php +7 -0
  63. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +192 -0
  64. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +27 -0
  65. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +9 -0
  66. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php +6 -0
  67. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php +6 -0
  68. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +585 -0
  69. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +27 -0
  70. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php +45 -0
  71. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +219 -0
  72. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +92 -0
  73. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +195 -0
  74. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +55 -0
  75. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +545 -0
  76. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/HandlerStack.php +277 -0
  77. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +185 -0
  78. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Middleware.php +254 -0
  79. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Pool.php +134 -0
  80. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +111 -0
  81. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +264 -0
  82. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/RequestOptions.php +263 -0
  83. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +128 -0
  84. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/TransferStats.php +126 -0
  85. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/UriTemplate.php +237 -0
  86. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Utils.php +92 -0
  87. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/functions.php +334 -0
  88. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/functions_include.php +6 -0
  89. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/CHANGELOG.md +110 -0
  90. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/LICENSE +24 -0
  91. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/AggregateException.php +17 -0
  92. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/CancellationException.php +10 -0
  93. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Coroutine.php +169 -0
  94. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Create.php +84 -0
  95. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Each.php +90 -0
  96. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/EachPromise.php +247 -0
  97. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/FulfilledPromise.php +84 -0
  98. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Is.php +46 -0
  99. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Promise.php +278 -0
  100. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/PromiseInterface.php +97 -0
  101. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/PromisorInterface.php +16 -0
  102. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/RejectedPromise.php +91 -0
  103. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/RejectionException.php +48 -0
  104. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/TaskQueue.php +67 -0
  105. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +24 -0
  106. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Utils.php +276 -0
  107. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/functions.php +363 -0
  108. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/functions_include.php +6 -0
  109. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/.php_cs.dist +56 -0
  110. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/CHANGELOG.md +318 -0
  111. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/LICENSE +26 -0
  112. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/AppendStream.php +246 -0
  113. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/BufferStream.php +142 -0
  114. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/CachingStream.php +147 -0
  115. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/DroppingStream.php +45 -0
  116. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/FnStream.php +163 -0
  117. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Header.php +71 -0
  118. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/InflateStream.php +56 -0
  119. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +42 -0
  120. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/LimitStream.php +157 -0
  121. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Message.php +252 -0
  122. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/MessageTrait.php +270 -0
  123. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/MimeType.php +140 -0
  124. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/MultipartStream.php +158 -0
  125. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/NoSeekStream.php +25 -0
  126. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/PumpStream.php +170 -0
  127. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Query.php +113 -0
  128. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Request.php +152 -0
  129. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Response.php +155 -0
  130. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Rfc7230.php +19 -0
  131. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/ServerRequest.php +379 -0
  132. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Stream.php +270 -0
  133. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +152 -0
  134. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/StreamWrapper.php +165 -0
  135. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UploadedFile.php +328 -0
  136. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Uri.php +810 -0
  137. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UriComparator.php +55 -0
  138. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UriNormalizer.php +219 -0
  139. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UriResolver.php +222 -0
  140. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Utils.php +428 -0
  141. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/functions.php +422 -0
  142. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/functions_include.php +6 -0
  143. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/CHANGELOG.md +0 -0
  144. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/LICENSE +0 -0
  145. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Factory/HttplugFactory.php +0 -0
  146. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Factory/Psr17Factory.php +0 -0
  147. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/MessageTrait.php +0 -0
  148. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Request.php +0 -0
  149. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/RequestTrait.php +0 -0
  150. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Response.php +0 -0
  151. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/ServerRequest.php +0 -0
  152. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Stream.php +0 -0
  153. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/UploadedFile.php +0 -0
  154. vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Uri.php +0 -0
  155. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/client-common/.php-cs-fixer.dist.php +18 -0
  156. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/.php_cs.dist +0 -0
  157. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/CHANGELOG.md +14 -0
  158. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/LICENSE +0 -0
  159. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/BatchClient.php +0 -0
  160. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/BatchClientInterface.php +0 -0
  161. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/BatchResult.php +0 -0
  162. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Deferred.php +4 -1
  163. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/EmulatedHttpAsyncClient.php +0 -0
  164. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/EmulatedHttpClient.php +0 -0
  165. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/BatchException.php +0 -0
  166. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/CircularRedirectionException.php +0 -0
  167. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/ClientErrorException.php +0 -0
  168. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/HttpClientNoMatchException.php +0 -0
  169. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/HttpClientNotFoundException.php +0 -0
  170. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/LoopException.php +0 -0
  171. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/MultipleRedirectionException.php +0 -0
  172. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/ServerErrorException.php +0 -0
  173. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/FlexibleHttpClient.php +0 -0
  174. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpAsyncClientDecorator.php +0 -0
  175. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpAsyncClientEmulator.php +0 -0
  176. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientDecorator.php +0 -0
  177. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientEmulator.php +0 -0
  178. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool.php +0 -0
  179. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/HttpClientPool.php +2 -2
  180. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/HttpClientPoolItem.php +0 -0
  181. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/LeastUsedClientPool.php +0 -0
  182. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/RandomClientPool.php +0 -0
  183. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/RoundRobinClientPool.php +0 -0
  184. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientRouter.php +0 -0
  185. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientRouterInterface.php +0 -0
  186. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpMethodsClient.php +0 -0
  187. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpMethodsClientInterface.php +0 -0
  188. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin.php +0 -0
  189. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/AddHostPlugin.php +1 -1
  190. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/AddPathPlugin.php +1 -1
  191. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/AuthenticationPlugin.php +0 -0
  192. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/BaseUriPlugin.php +0 -0
  193. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ContentLengthPlugin.php +0 -0
  194. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ContentTypePlugin.php +1 -1
  195. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/CookiePlugin.php +0 -0
  196. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/DecoderPlugin.php +1 -1
  197. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ErrorPlugin.php +3 -3
  198. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderAppendPlugin.php +0 -0
  199. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderDefaultsPlugin.php +0 -0
  200. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderRemovePlugin.php +0 -0
  201. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderSetPlugin.php +0 -0
  202. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HistoryPlugin.php +0 -0
  203. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/Journal.php +0 -0
  204. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/QueryDefaultsPlugin.php +0 -0
  205. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RedirectPlugin.php +101 -22
  206. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RequestMatcherPlugin.php +0 -0
  207. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RequestSeekableBodyPlugin.php +0 -0
  208. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ResponseSeekableBodyPlugin.php +0 -0
  209. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RetryPlugin.php +0 -0
  210. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/SeekableBodyPlugin.php +0 -0
  211. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/VersionBridgePlugin.php +0 -0
  212. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginChain.php +1 -0
  213. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginClient.php +0 -1
  214. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginClientBuilder.php +0 -0
  215. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginClientFactory.php +2 -2
  216. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/VersionBridgeClient.php +0 -0
  217. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/.php-cs-fixer.php +0 -0
  218. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/CHANGELOG.md +0 -0
  219. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/LICENSE +0 -0
  220. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/ClassDiscovery.php +0 -0
  221. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception.php +0 -0
  222. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/ClassInstantiationFailedException.php +0 -0
  223. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/DiscoveryFailedException.php +0 -0
  224. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/NoCandidateFoundException.php +0 -0
  225. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/NotFoundException.php +0 -0
  226. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/PuliUnavailableException.php +0 -0
  227. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/StrategyUnavailableException.php +0 -0
  228. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/HttpAsyncClientDiscovery.php +0 -0
  229. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/HttpClientDiscovery.php +0 -0
  230. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/MessageFactoryDiscovery.php +0 -0
  231. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/NotFoundException.php +0 -0
  232. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Psr17FactoryDiscovery.php +0 -0
  233. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Psr18ClientDiscovery.php +0 -0
  234. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/CommonClassesStrategy.php +0 -0
  235. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/CommonPsr17ClassesStrategy.php +0 -0
  236. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/DiscoveryStrategy.php +0 -0
  237. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/MockClientStrategy.php +0 -0
  238. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/PuliBetaStrategy.php +0 -0
  239. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/StreamFactoryDiscovery.php +0 -0
  240. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/UriFactoryDiscovery.php +0 -0
  241. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/CHANGELOG.md +112 -0
  242. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/LICENSE +20 -0
  243. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/puli.json +16 -0
  244. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/src/Client.php +81 -0
  245. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/src/Exception/UnexpectedValueException.php +9 -0
  246. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/src/Promise.php +134 -0
  247. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/.php-cs-fixer.dist.php +0 -0
  248. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/CHANGELOG.md +0 -0
  249. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/LICENSE +0 -0
  250. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/puli.json +0 -0
  251. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception.php +0 -0
  252. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/HttpException.php +0 -0
  253. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/NetworkException.php +0 -0
  254. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/RequestAwareTrait.php +0 -0
  255. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/RequestException.php +0 -0
  256. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/TransferException.php +0 -0
  257. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/HttpAsyncClient.php +0 -0
  258. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/HttpClient.php +0 -0
  259. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Promise/HttpFulfilledPromise.php +0 -0
  260. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Promise/HttpRejectedPromise.php +0 -0
  261. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/CHANGELOG.md +0 -0
  262. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/LICENSE +0 -0
  263. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/puli.json +0 -0
  264. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/MessageFactory.php +0 -0
  265. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/RequestFactory.php +0 -0
  266. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/ResponseFactory.php +0 -0
  267. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/StreamFactory.php +0 -0
  268. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/UriFactory.php +0 -0
  269. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/CHANGELOG.md +0 -0
  270. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/LICENSE +0 -0
  271. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/apigen.neon +0 -0
  272. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/puli.json +0 -0
  273. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication.php +0 -0
  274. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/AutoBasicAuth.php +0 -0
  275. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/BasicAuth.php +0 -0
  276. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Bearer.php +0 -0
  277. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Chain.php +0 -0
  278. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Header.php +0 -0
  279. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Matching.php +0 -0
  280. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/QueryParam.php +0 -0
  281. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/RequestConditional.php +0 -0
  282. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Wsse.php +0 -0
  283. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Builder/ResponseBuilder.php +0 -0
  284. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Cookie.php +0 -0
  285. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/CookieJar.php +0 -0
  286. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/CookieUtil.php +0 -0
  287. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/MessageDecorator.php +0 -0
  288. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/RequestDecorator.php +0 -0
  289. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/ResponseDecorator.php +0 -0
  290. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/StreamDecorator.php +0 -0
  291. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/ChunkStream.php +0 -0
  292. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/CompressStream.php +0 -0
  293. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/DechunkStream.php +0 -0
  294. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/DecompressStream.php +0 -0
  295. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/DeflateStream.php +0 -0
  296. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/Filter/Chunk.php +0 -0
  297. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/FilteredStream.php +0 -0
  298. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/GzipDecodeStream.php +0 -0
  299. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/GzipEncodeStream.php +0 -0
  300. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/InflateStream.php +0 -0
  301. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Exception.php +0 -0
  302. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Exception/UnexpectedValueException.php +0 -0
  303. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter.php +0 -0
  304. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter/CurlCommandFormatter.php +0 -0
  305. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter/FullHttpMessageFormatter.php +0 -0
  306. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter/SimpleFormatter.php +0 -0
  307. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/MessageFactory/DiactorosMessageFactory.php +0 -0
  308. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/MessageFactory/GuzzleMessageFactory.php +0 -0
  309. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/MessageFactory/SlimMessageFactory.php +0 -0
  310. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher.php +0 -0
  311. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher/CallbackRequestMatcher.php +0 -0
  312. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher/RegexRequestMatcher.php +0 -0
  313. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher/RequestMatcher.php +0 -0
  314. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Stream/BufferedStream.php +0 -0
  315. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/StreamFactory/DiactorosStreamFactory.php +0 -0
  316. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/StreamFactory/GuzzleStreamFactory.php +0 -0
  317. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/StreamFactory/SlimStreamFactory.php +0 -0
  318. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/UriFactory/DiactorosUriFactory.php +0 -0
  319. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/UriFactory/GuzzleUriFactory.php +0 -0
  320. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/UriFactory/SlimUriFactory.php +0 -0
  321. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/filters.php +0 -0
  322. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/CHANGELOG.md +0 -0
  323. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/LICENSE +0 -0
  324. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/src/FulfilledPromise.php +0 -0
  325. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/src/Promise.php +0 -0
  326. vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/src/RejectedPromise.php +0 -0
  327. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/CHANGELOG.md +0 -0
  328. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/LICENSE +0 -0
  329. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/ClientExceptionInterface.php +0 -0
  330. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/ClientInterface.php +0 -0
  331. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/NetworkExceptionInterface.php +0 -0
  332. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/RequestExceptionInterface.php +0 -0
  333. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/.pullapprove.yml +0 -0
  334. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/LICENSE +0 -0
  335. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/RequestFactoryInterface.php +0 -0
  336. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/ResponseFactoryInterface.php +0 -0
  337. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/ServerRequestFactoryInterface.php +0 -0
  338. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/StreamFactoryInterface.php +0 -0
  339. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/UploadedFileFactoryInterface.php +0 -0
  340. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/UriFactoryInterface.php +0 -0
  341. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/CHANGELOG.md +0 -0
  342. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/LICENSE +0 -0
  343. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/MessageInterface.php +0 -0
  344. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/RequestInterface.php +0 -0
  345. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/ResponseInterface.php +0 -0
  346. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/ServerRequestInterface.php +0 -0
  347. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/StreamInterface.php +0 -0
  348. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/UploadedFileInterface.php +0 -0
  349. vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/UriInterface.php +0 -0
  350. vendor/{mailerlite/mailerlite-api-v2-php-sdk/LICENSE.md → codeinwp/themeisle-content-forms/library/mailerlite/vendor/ralouphie/getallheaders/LICENSE} +2 -2
  351. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/ralouphie/getallheaders/src/getallheaders.php +46 -0
  352. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/deprecation-contracts/CHANGELOG.md +0 -0
  353. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/deprecation-contracts/LICENSE +0 -0
  354. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/deprecation-contracts/function.php +1 -1
  355. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/CHANGELOG.md +0 -5
  356. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Debug/OptionsResolverIntrospector.php +17 -1
  357. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/AccessException.php +0 -0
  358. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/ExceptionInterface.php +0 -0
  359. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/InvalidArgumentException.php +0 -0
  360. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/InvalidOptionsException.php +0 -0
  361. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/MissingOptionsException.php +0 -0
  362. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/NoConfigurationException.php +0 -0
  363. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/NoSuchOptionException.php +0 -0
  364. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/OptionDefinitionException.php +0 -0
  365. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/UndefinedOptionsException.php +0 -0
  366. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/LICENSE +0 -0
  367. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/OptionConfigurator.php +9 -7
  368. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Options.php +0 -0
  369. vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/OptionsResolver.php +79 -32
  370. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Idn.php +925 -0
  371. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Info.php +23 -0
  372. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/LICENSE +19 -0
  373. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +375 -0
  374. vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +23 -0
CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  ##### [Version 2.10.19](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.18...v2.10.19) (2022-09-15)
2
 
3
  * Fix for Bedrock installs.
1
+ ##### [Version 2.10.20](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.19...v2.10.20) (2022-10-17)
2
+
3
+ * Fix fatal errors on PHP 5.6 on newsletter widget.
4
+
5
  ##### [Version 2.10.19](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.18...v2.10.19) (2022-09-15)
6
 
7
  * Fix for Bedrock installs.
core/includes/class-orbit-fox.php CHANGED
@@ -69,7 +69,7 @@ class Orbit_Fox {
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
- $this->version = '2.10.19';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
+ $this->version = '2.10.20';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
languages/themeisle-companion.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Orbit Fox Companion 2.10.19\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/Codeinwp/themeisle-companion/issues\n"
8
- "POT-Creation-Date: 2022-09-15 20:08:37+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -245,7 +245,7 @@ msgstr ""
245
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:147
246
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:361
247
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:836
248
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:184
249
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:121
250
  msgid "Left"
251
  msgstr ""
@@ -276,7 +276,7 @@ msgstr ""
276
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:155
277
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:369
278
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:844
279
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:192
280
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:129
281
  msgid "Right"
282
  msgstr ""
@@ -644,7 +644,7 @@ msgstr ""
644
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:151
645
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:365
646
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:840
647
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:188
648
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:125
649
  msgid "Center"
650
  msgstr ""
@@ -1262,7 +1262,7 @@ msgstr ""
1262
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:362
1263
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php:106
1264
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php:139
1265
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:130
1266
  msgid "Icon"
1267
  msgstr ""
1268
 
@@ -1322,7 +1322,7 @@ msgstr ""
1322
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:617
1323
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:141
1324
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:830
1325
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:178
1326
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:115
1327
  msgid "Alignment"
1328
  msgstr ""
@@ -2660,7 +2660,7 @@ msgstr ""
2660
 
2661
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:387
2662
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:780
2663
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:159
2664
  msgid "Icon Spacing"
2665
  msgstr ""
2666
 
@@ -2730,7 +2730,7 @@ msgstr ""
2730
 
2731
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:760
2732
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:857
2733
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:139
2734
  msgid "Icon Size"
2735
  msgstr ""
2736
 
@@ -3148,7 +3148,7 @@ msgstr ""
3148
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:133
3149
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:134
3150
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:956
3151
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:122
3152
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:107
3153
  msgid "Submit"
3154
  msgstr ""
@@ -3189,9 +3189,9 @@ msgid "The %s setting is required!"
3189
  msgstr ""
3190
 
3191
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:724
3192
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:108
3193
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:993
3194
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:221
3195
  msgid "Access Key"
3196
  msgstr ""
3197
 
@@ -3213,32 +3213,32 @@ msgid "Send to Email Address"
3213
  msgstr ""
3214
 
3215
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:849
3216
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:255
3217
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:259
3218
  msgid "Address Line 2"
3219
  msgstr ""
3220
 
3221
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:850
3222
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:269
3223
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:273
3224
  msgid "City"
3225
  msgstr ""
3226
 
3227
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:851
3228
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:283
3229
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:287
3230
  msgid "State/Province/Region"
3231
  msgstr ""
3232
 
3233
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:852
3234
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:297
3235
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:301
3236
  msgid "Postal / Zip Code"
3237
  msgstr ""
3238
 
3239
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:853
3240
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:311
3241
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:315
3242
  msgid "Country"
3243
  msgstr ""
3244
 
@@ -3293,16 +3293,16 @@ msgid ""
3293
  msgstr ""
3294
 
3295
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-contact.php:122
3296
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:116
3297
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:105
3298
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:103
3299
  msgid "Success message"
3300
  msgstr ""
3301
 
3302
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-contact.php:127
3303
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:121
3304
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:114
3305
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:112
3306
  msgid "Error message"
3307
  msgstr ""
3308
 
@@ -3332,19 +3332,19 @@ msgid "Newsletter Form"
3332
  msgstr ""
3333
 
3334
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:54
3335
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:123
3336
  msgid "Join Newsletter"
3337
  msgstr ""
3338
 
3339
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:55
3340
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:104
3341
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:80
3342
  msgid "Welcome to our newsletter!"
3343
  msgstr ""
3344
 
3345
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:56
3346
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:113
3347
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:79
3348
  msgid "Action failed!"
3349
  msgstr ""
3350
 
@@ -3358,33 +3358,33 @@ msgstr ""
3358
 
3359
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:83
3360
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-registration.php:102
3361
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:244
3362
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:164
3363
  msgid "Map field to"
3364
  msgstr ""
3365
 
3366
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:99
3367
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:88
3368
- msgid "Subscribe to"
3369
- msgstr ""
3370
-
3371
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:101
3372
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:90
3373
  msgid "MailChimp"
3374
  msgstr ""
3375
 
3376
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:102
3377
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:91
3378
  msgid "Sendinblue "
3379
  msgstr ""
3380
 
3381
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:103
3382
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:92
3383
  msgid "MailerLite"
3384
  msgstr ""
3385
 
3386
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:112
3387
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:229
 
 
 
 
 
3388
  msgid "List ID"
3389
  msgstr ""
3390
 
@@ -3473,73 +3473,73 @@ msgstr ""
3473
  msgid "Error"
3474
  msgstr ""
3475
 
3476
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:213
3477
  msgid "Provider Settings"
3478
  msgstr ""
3479
 
3480
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:247
3481
  msgid ""
3482
  "If you're using SendInBlue or MailerLite and you map the field to address, "
3483
  "please ignore the additional settings."
3484
  msgstr ""
3485
 
3486
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:254
3487
  msgid "Line 2 Label"
3488
  msgstr ""
3489
 
3490
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:258
3491
  msgid "Line 2 Placeholder"
3492
  msgstr ""
3493
 
3494
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:262
3495
  msgid "Line 2 Width"
3496
  msgstr ""
3497
 
3498
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:268
3499
  msgid "City Label"
3500
  msgstr ""
3501
 
3502
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:272
3503
  msgid "City Placeholder"
3504
  msgstr ""
3505
 
3506
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:276
3507
  msgid "City Width"
3508
  msgstr ""
3509
 
3510
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:282
3511
  msgid "State Label"
3512
  msgstr ""
3513
 
3514
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:286
3515
  msgid "State Placeholder"
3516
  msgstr ""
3517
 
3518
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:290
3519
  msgid "State Width"
3520
  msgstr ""
3521
 
3522
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:296
3523
  msgid "Zip Code Label"
3524
  msgstr ""
3525
 
3526
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:300
3527
  msgid "Zip Code Placeholder"
3528
  msgstr ""
3529
 
3530
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:304
3531
  msgid "Zip Code Width"
3532
  msgstr ""
3533
 
3534
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:310
3535
  msgid "Country Label"
3536
  msgstr ""
3537
 
3538
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:314
3539
  msgid " Country Placeholder"
3540
  msgstr ""
3541
 
3542
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:318
3543
  msgid "Country Width"
3544
  msgstr ""
3545
 
@@ -3548,7 +3548,7 @@ msgid "We failed to send your message!"
3548
  msgstr ""
3549
 
3550
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/contact_public.php:54
3551
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:61
3552
  msgid "Wrong email configuration! Please contact administration!"
3553
  msgstr ""
3554
 
@@ -3557,7 +3557,7 @@ msgid "Missing %s"
3557
  msgstr ""
3558
 
3559
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/contact_public.php:74
3560
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:52
3561
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/registration_public.php:36
3562
  msgid "Invalid email."
3563
  msgstr ""
@@ -3576,7 +3576,7 @@ msgid ""
3576
  "form settings on "
3577
  msgstr ""
3578
 
3579
- #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:47
3580
  msgid "The email field cannot be empty."
3581
  msgstr ""
3582
 
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Orbit Fox Companion 2.10.20\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/Codeinwp/themeisle-companion/issues\n"
8
+ "POT-Creation-Date: 2022-10-17 13:04:10+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
245
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:147
246
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:361
247
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:836
248
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:186
249
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:121
250
  msgid "Left"
251
  msgstr ""
276
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:155
277
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:369
278
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:844
279
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:194
280
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:129
281
  msgid "Right"
282
  msgstr ""
644
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:151
645
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:365
646
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:840
647
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:190
648
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:125
649
  msgid "Center"
650
  msgstr ""
1262
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:362
1263
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php:106
1264
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php:139
1265
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:132
1266
  msgid "Icon"
1267
  msgstr ""
1268
 
1322
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:617
1323
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:141
1324
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:830
1325
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:180
1326
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:115
1327
  msgid "Alignment"
1328
  msgstr ""
2660
 
2661
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:387
2662
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:780
2663
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:161
2664
  msgid "Icon Spacing"
2665
  msgstr ""
2666
 
2730
 
2731
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:760
2732
  #: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php:857
2733
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:141
2734
  msgid "Icon Size"
2735
  msgstr ""
2736
 
3148
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:133
3149
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:134
3150
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:956
3151
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:124
3152
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:107
3153
  msgid "Submit"
3154
  msgstr ""
3189
  msgstr ""
3190
 
3191
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:724
3192
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:111
3193
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php:993
3194
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:223
3195
  msgid "Access Key"
3196
  msgstr ""
3197
 
3213
  msgstr ""
3214
 
3215
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:849
3216
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:257
3217
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:261
3218
  msgid "Address Line 2"
3219
  msgstr ""
3220
 
3221
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:850
3222
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:271
3223
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:275
3224
  msgid "City"
3225
  msgstr ""
3226
 
3227
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:851
3228
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:285
3229
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:289
3230
  msgid "State/Province/Region"
3231
  msgstr ""
3232
 
3233
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:852
3234
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:299
3235
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:303
3236
  msgid "Postal / Zip Code"
3237
  msgstr ""
3238
 
3239
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_base.php:853
3240
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:313
3241
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:317
3242
  msgid "Country"
3243
  msgstr ""
3244
 
3293
  msgstr ""
3294
 
3295
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-contact.php:122
3296
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:119
3297
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:105
3298
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:105
3299
  msgid "Success message"
3300
  msgstr ""
3301
 
3302
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-contact.php:127
3303
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:124
3304
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php:114
3305
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:114
3306
  msgid "Error message"
3307
  msgstr ""
3308
 
3332
  msgstr ""
3333
 
3334
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:54
3335
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:125
3336
  msgid "Join Newsletter"
3337
  msgstr ""
3338
 
3339
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:55
3340
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:106
3341
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:78
3342
  msgid "Welcome to our newsletter!"
3343
  msgstr ""
3344
 
3345
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:56
3346
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:115
3347
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:77
3348
  msgid "Action failed!"
3349
  msgstr ""
3350
 
3358
 
3359
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:83
3360
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-registration.php:102
3361
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:246
3362
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php:164
3363
  msgid "Map field to"
3364
  msgstr ""
3365
 
3366
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:97
3367
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:84
 
 
 
 
 
3368
  msgid "MailChimp"
3369
  msgstr ""
3370
 
3371
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:98
3372
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:85
3373
  msgid "Sendinblue "
3374
  msgstr ""
3375
 
3376
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:101
3377
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:88
3378
  msgid "MailerLite"
3379
  msgstr ""
3380
 
3381
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:106
3382
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:94
3383
+ msgid "Subscribe to"
3384
+ msgstr ""
3385
+
3386
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php:115
3387
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:231
3388
  msgid "List ID"
3389
  msgstr ""
3390
 
3473
  msgid "Error"
3474
  msgstr ""
3475
 
3476
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:215
3477
  msgid "Provider Settings"
3478
  msgstr ""
3479
 
3480
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:249
3481
  msgid ""
3482
  "If you're using SendInBlue or MailerLite and you map the field to address, "
3483
  "please ignore the additional settings."
3484
  msgstr ""
3485
 
3486
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:256
3487
  msgid "Line 2 Label"
3488
  msgstr ""
3489
 
3490
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:260
3491
  msgid "Line 2 Placeholder"
3492
  msgstr ""
3493
 
3494
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:264
3495
  msgid "Line 2 Width"
3496
  msgstr ""
3497
 
3498
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:270
3499
  msgid "City Label"
3500
  msgstr ""
3501
 
3502
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:274
3503
  msgid "City Placeholder"
3504
  msgstr ""
3505
 
3506
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:278
3507
  msgid "City Width"
3508
  msgstr ""
3509
 
3510
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:284
3511
  msgid "State Label"
3512
  msgstr ""
3513
 
3514
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:288
3515
  msgid "State Placeholder"
3516
  msgstr ""
3517
 
3518
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:292
3519
  msgid "State Width"
3520
  msgstr ""
3521
 
3522
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:298
3523
  msgid "Zip Code Label"
3524
  msgstr ""
3525
 
3526
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:302
3527
  msgid "Zip Code Placeholder"
3528
  msgstr ""
3529
 
3530
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:306
3531
  msgid "Zip Code Width"
3532
  msgstr ""
3533
 
3534
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:312
3535
  msgid "Country Label"
3536
  msgstr ""
3537
 
3538
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:316
3539
  msgid " Country Placeholder"
3540
  msgstr ""
3541
 
3542
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php:320
3543
  msgid "Country Width"
3544
  msgstr ""
3545
 
3548
  msgstr ""
3549
 
3550
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/contact_public.php:54
3551
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:59
3552
  msgid "Wrong email configuration! Please contact administration!"
3553
  msgstr ""
3554
 
3557
  msgstr ""
3558
 
3559
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/contact_public.php:74
3560
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:50
3561
  #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/registration_public.php:36
3562
  msgid "Invalid email."
3563
  msgstr ""
3576
  "form settings on "
3577
  msgstr ""
3578
 
3579
+ #: vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php:45
3580
  msgid "The email field cannot be empty."
3581
  msgstr ""
3582
 
readme.md CHANGED
@@ -107,6 +107,13 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
107
 
108
  ## Changelog ##
109
 
 
 
 
 
 
 
 
110
  ##### [Version 2.10.19](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.18...v2.10.19) (2022-09-15)
111
 
112
  * Fix for Bedrock installs.
107
 
108
  ## Changelog ##
109
 
110
+ ##### [Version 2.10.20](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.19...v2.10.20) (2022-10-17)
111
+
112
+ * Fix fatal errors on PHP 5.6 on newsletter widget.
113
+
114
+
115
+
116
+
117
  ##### [Version 2.10.19](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.18...v2.10.19) (2022-09-15)
118
 
119
  * Fix for Bedrock installs.
readme.txt CHANGED
@@ -107,6 +107,13 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
 
110
  ##### [Version 2.10.19](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.18...v2.10.19) (2022-09-15)
111
 
112
  * Fix for Bedrock installs.
107
 
108
  == Changelog ==
109
 
110
+ ##### [Version 2.10.20](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.19...v2.10.20) (2022-10-17)
111
+
112
+ * Fix fatal errors on PHP 5.6 on newsletter widget.
113
+
114
+
115
+
116
+
117
  ##### [Version 2.10.19](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.18...v2.10.19) (2022-09-15)
118
 
119
  * Fix for Bedrock installs.
themeisle-companion.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://orbitfox.com/
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
- * Version: 2.10.19
19
  * Author: Themeisle
20
  * Author URI: https://orbitfox.com/
21
  * License: GPL-2.0+
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://orbitfox.com/
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
+ * Version: 2.10.20
19
  * Author: Themeisle
20
  * Author URI: https://orbitfox.com/
21
  * License: GPL-2.0+
vendor/autoload.php CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
- return ComposerAutoloaderInitf590f79dcba7e464a659ab7cf3981868::getLoader();
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInit86134ed5779aef6e1e994bd54edd5467::getLoader();
vendor/clue/stream-filter/README.md DELETED
@@ -1,326 +0,0 @@
1
- # clue/stream-filter
2
-
3
- [![CI status](https://github.com/clue/stream-filter/workflows/CI/badge.svg)](https://github.com/clue/stream-filter/actions)
4
- [![installs on Packagist](https://img.shields.io/packagist/dt/clue/stream-filter?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/stream-filter)
5
-
6
- A simple and modern approach to stream filtering in PHP
7
-
8
- **Table of contents**
9
-
10
- * [Why?](#why)
11
- * [Support us](#support-us)
12
- * [Usage](#usage)
13
- * [append()](#append)
14
- * [prepend()](#prepend)
15
- * [fun()](#fun)
16
- * [remove()](#remove)
17
- * [Install](#install)
18
- * [Tests](#tests)
19
- * [License](#license)
20
-
21
- ## Why?
22
-
23
- PHP's stream filtering system is great!
24
-
25
- It offers very powerful stream filtering options and comes with a useful set of built-in filters.
26
- These filters can be used to easily and efficiently perform various transformations on-the-fly, such as:
27
-
28
- * read from a gzip'ed input file,
29
- * transcode from ISO-8859-1 (Latin1) to UTF-8,
30
- * write to a bzip output file
31
- * and much more.
32
-
33
- But let's face it:
34
- Its API is [*difficult to work with*](https://www.php.net/manual/en/php-user-filter.filter.php)
35
- and its documentation is [*subpar*](https://stackoverflow.com/questions/27103269/what-is-a-bucket-brigade).
36
- This combined means its powerful features are often neglected.
37
-
38
- This project aims to make these features more accessible to a broader audience.
39
- * **Lightweight, SOLID design** -
40
- Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)
41
- and does not get in your way.
42
- Custom filters require trivial effort.
43
- * **Good test coverage** -
44
- Comes with an automated tests suite and is regularly tested in the *real world*
45
-
46
- ## Support us
47
-
48
- We invest a lot of time developing, maintaining and updating our awesome
49
- open-source projects. You can help us sustain this high-quality of our work by
50
- [becoming a sponsor on GitHub](https://github.com/sponsors/clue). Sponsors get
51
- numerous benefits in return, see our [sponsoring page](https://github.com/sponsors/clue)
52
- for details.
53
-
54
- Let's take these projects to the next level together! 🚀
55
-
56
- ## Usage
57
-
58
- This lightweight library consists only of a few simple functions.
59
- All functions reside under the `Clue\StreamFilter` namespace.
60
-
61
- The below examples refer to all functions with their fully-qualified names like this:
62
-
63
- ```php
64
- Clue\StreamFilter\append(…);
65
- ```
66
-
67
- As of PHP 5.6+ you can also import each required function into your code like this:
68
-
69
- ```php
70
- use function Clue\StreamFilter\append;
71
-
72
- append(…);
73
- ```
74
-
75
- Alternatively, you can also use an import statement similar to this:
76
-
77
- ```php
78
- use Clue\StreamFilter as Filter;
79
-
80
- Filter\append(…);
81
- ```
82
-
83
- ### append()
84
-
85
- The `append(resource<stream> $stream, callable $callback, int $read_write = STREAM_FILTER_ALL): resource<stream filter>` function can be used to
86
- append a filter callback to the given stream.
87
-
88
- Each stream can have a list of filters attached.
89
- This function appends a filter to the end of this list.
90
-
91
- If the given filter can not be added, it throws an `Exception`.
92
-
93
- The `$stream` can be any valid stream resource, such as:
94
-
95
- ```php
96
- $stream = fopen('demo.txt', 'w+');
97
- ```
98
-
99
- The `$callback` should be a valid callable function which accepts
100
- an individual chunk of data and should return the updated chunk:
101
-
102
- ```php
103
- $filter = Clue\StreamFilter\append($stream, function ($chunk) {
104
- // will be called each time you read or write a $chunk to/from the stream
105
- return $chunk;
106
- });
107
- ```
108
-
109
- As such, you can also use native PHP functions or any other `callable`:
110
-
111
- ```php
112
- Clue\StreamFilter\append($stream, 'strtoupper');
113
-
114
- // will write "HELLO" to the underlying stream
115
- fwrite($stream, 'hello');
116
- ```
117
-
118
- If the `$callback` accepts invocation without parameters,
119
- then this signature will be invoked once ending (flushing) the filter:
120
-
121
- ```php
122
- Clue\StreamFilter\append($stream, function ($chunk = null) {
123
- if ($chunk === null) {
124
- // will be called once ending the filter
125
- return 'end';
126
- }
127
- // will be called each time you read or write a $chunk to/from the stream
128
- return $chunk;
129
- });
130
-
131
- fclose($stream);
132
- ```
133
-
134
- > Note: Legacy PHP versions (PHP < 5.4) do not support passing additional data
135
- from the end signal handler if the stream is being closed.
136
-
137
- If your callback throws an `Exception`, then the filter process will be aborted.
138
- In order to play nice with PHP's stream handling,
139
- the `Exception` will be transformed to a PHP warning instead:
140
-
141
- ```php
142
- Clue\StreamFilter\append($stream, function ($chunk) {
143
- throw new \RuntimeException('Unexpected chunk');
144
- });
145
-
146
- // raises an E_USER_WARNING with "Error invoking filter: Unexpected chunk"
147
- fwrite($stream, 'hello');
148
- ```
149
-
150
- The optional `$read_write` parameter can be used to only invoke the `$callback`
151
- when either writing to the stream or only when reading from the stream:
152
-
153
- ```php
154
- Clue\StreamFilter\append($stream, function ($chunk) {
155
- // will be called each time you write to the stream
156
- return $chunk;
157
- }, STREAM_FILTER_WRITE);
158
-
159
- Clue\StreamFilter\append($stream, function ($chunk) {
160
- // will be called each time you read from the stream
161
- return $chunk;
162
- }, STREAM_FILTER_READ);
163
- ```
164
-
165
- This function returns a filter resource which can be passed to [`remove()`](#remove).
166
-
167
- > Note that once a filter has been added to stream, the stream can no longer be passed to
168
- > [`stream_select()`](https://www.php.net/manual/en/function.stream-select.php)
169
- > (and family).
170
- >
171
- > > Warning: stream_select(): cannot cast a filtered stream on this system in {file} on line {line}
172
- >
173
- > This is due to limitations of PHP's stream filter support, as it can no longer reliably
174
- > tell when the underlying stream resource is actually ready.
175
- > As an alternative, consider calling `stream_select()` on the unfiltered stream and
176
- > then pass the unfiltered data through the [`fun()`](#fun) function.
177
-
178
- ### prepend()
179
-
180
- The `prepend(resource<stream> $stream, callable $callback, int $read_write = STREAM_FILTER_ALL): resource<stream filter>` function can be used to
181
- prepend a filter callback to the given stream.
182
-
183
- Each stream can have a list of filters attached.
184
- This function prepends a filter to the start of this list.
185
-
186
- If the given filter can not be added, it throws an `Exception`.
187
-
188
- ```php
189
- $filter = Clue\StreamFilter\prepend($stream, function ($chunk) {
190
- // will be called each time you read or write a $chunk to/from the stream
191
- return $chunk;
192
- });
193
- ```
194
-
195
- This function returns a filter resource which can be passed to [`remove()`](#remove).
196
-
197
- Except for the position in the list of filters, this function behaves exactly
198
- like the [`append()`](#append) function.
199
- For more details about its behavior, see also the [`append()`](#append) function.
200
-
201
- ### fun()
202
-
203
- The `fun(string $filter, mixed $parameters = null): callable` function can be used to
204
- create a filter function which uses the given built-in `$filter`.
205
-
206
- PHP comes with a useful set of [built-in filters](https://www.php.net/manual/en/filters.php).
207
- Using `fun()` makes accessing these as easy as passing an input string to filter
208
- and getting the filtered output string.
209
-
210
- ```php
211
- $fun = Clue\StreamFilter\fun('string.rot13');
212
-
213
- assert('grfg' === $fun('test'));
214
- assert('test' === $fun($fun('test'));
215
- ```
216
-
217
- Please note that not all filter functions may be available depending
218
- on installed PHP extensions and the PHP version in use.
219
- In particular, [HHVM](https://hhvm.com/) may not offer the same filter functions
220
- or parameters as Zend PHP.
221
- Accessing an unknown filter function will result in a `RuntimeException`:
222
-
223
- ```php
224
- Clue\StreamFilter\fun('unknown'); // throws RuntimeException
225
- ```
226
-
227
- Some filters may accept or require additional filter parameters – most
228
- filters do not require filter parameters.
229
- If given, the optional `$parameters` argument will be passed to the
230
- underlying filter handler as-is.
231
- In particular, note how *not passing* this parameter at all differs from
232
- explicitly passing a `null` value (which many filters do not accept).
233
- Please refer to the individual filter definition for more details.
234
- For example, the `string.strip_tags` filter can be invoked like this:
235
-
236
- ```php
237
- $fun = Clue\StreamFilter\fun('string.strip_tags', '<a><b>');
238
-
239
- $ret = $fun('<b>h<br>i</b>');
240
- assert('<b>hi</b>' === $ret);
241
- ```
242
-
243
- Under the hood, this function allocates a temporary memory stream, so it's
244
- recommended to clean up the filter function after use.
245
- Also, some filter functions (in particular the
246
- [zlib compression filters](https://www.php.net/manual/en/filters.compression.php))
247
- may use internal buffers and may emit a final data chunk on close.
248
- The filter function can be closed by invoking without any arguments:
249
-
250
- ```php
251
- $fun = Clue\StreamFilter\fun('zlib.deflate');
252
-
253
- $ret = $fun('hello') . $fun('world') . $fun();
254
- assert('helloworld' === gzinflate($ret));
255
- ```
256
-
257
- The filter function must not be used anymore after it has been closed.
258
- Doing so will result in a `RuntimeException`:
259
-
260
- ```php
261
- $fun = Clue\StreamFilter\fun('string.rot13');
262
- $fun();
263
-
264
- $fun('test'); // throws RuntimeException
265
- ```
266
-
267
- > Note: If you're using the zlib compression filters, then you should be wary
268
- about engine inconsistencies between different PHP versions and HHVM.
269
- These inconsistencies exist in the underlying PHP engines and there's little we
270
- can do about this in this library.
271
- [Our test suite](tests/) contains several test cases that exhibit these issues.
272
- If you feel some test case is missing or outdated, we're happy to accept PRs! :)
273
-
274
- ### remove()
275
-
276
- The `remove(resource<stream filter> $filter): bool` function can be used to
277
- remove a filter previously added via [`append()`](#append) or [`prepend()`](#prepend).
278
-
279
- ```php
280
- $filter = Clue\StreamFilter\append($stream, function () {
281
- // …
282
- });
283
- Clue\StreamFilter\remove($filter);
284
- ```
285
-
286
- ## Install
287
-
288
- The recommended way to install this library is [through Composer](https://getcomposer.org/).
289
- [New to Composer?](https://getcomposer.org/doc/00-intro.md)
290
-
291
- This project follows [SemVer](https://semver.org/).
292
- This will install the latest supported version:
293
-
294
- ```bash
295
- $ composer require clue/stream-filter:^1.6
296
- ```
297
-
298
- See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
299
-
300
- This project aims to run on any platform and thus does not require any PHP
301
- extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
302
- HHVM.
303
- It's *highly recommended to use the latest supported PHP version* for this project.
304
- Older PHP versions may suffer from a number of inconsistencies documented above.
305
-
306
- ## Tests
307
-
308
- To run the test suite, you first need to clone this repo and then install all
309
- dependencies [through Composer](https://getcomposer.org/):
310
-
311
- ```bash
312
- $ composer install
313
- ```
314
-
315
- To run the test suite, go to the project root and run:
316
-
317
- ```bash
318
- $ vendor/bin/phpunit
319
- ```
320
-
321
- ## License
322
-
323
- This project is released under the permissive [MIT license](LICENSE).
324
-
325
- > Did you know that I offer custom development services and issuing invoices for
326
- sponsorships of releases and for contributions? Contact me (@clue) for details.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/class-themeisle-content-forms-beaver-newsletter.php CHANGED
@@ -93,15 +93,18 @@ class Newsletter_Admin extends Beaver_Widget_Base {
93
  * @return array
94
  */
95
  public function add_widget_specific_controls( $fields ) {
 
 
 
 
 
 
 
96
  $fields['fields'] = array(
97
  'provider' => array(
98
  'type' => 'select',
99
  'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
100
- 'options' => array(
101
- 'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
102
- 'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' ),
103
- 'mailerlite' => esc_html__( 'MailerLite', 'themeisle-companion' ),
104
- ),
105
  ),
106
  'access_key' => array(
107
  'type' => 'text',
93
  * @return array
94
  */
95
  public function add_widget_specific_controls( $fields ) {
96
+ $providers = array(
97
+ 'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
98
+ 'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' )
99
+ );
100
+ if ( version_compare( '7.1', phpversion() ) !== 1 ) {
101
+ $providers['mailerlite'] = esc_html__( 'MailerLite', 'themeisle-companion' );
102
+ }
103
  $fields['fields'] = array(
104
  'provider' => array(
105
  'type' => 'select',
106
  'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
107
+ 'options' => $providers,
 
 
 
 
108
  ),
109
  'access_key' => array(
110
  'type' => 'text',
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php CHANGED
@@ -80,17 +80,19 @@ class Newsletter_Admin extends Elementor_Widget_Base {
80
  * Add specific settings for Newsletter widget.
81
  */
82
  function add_specific_settings_controls() {
83
-
 
 
 
 
 
 
84
  $this->add_control(
85
  'provider',
86
  array(
87
  'type' => 'select',
88
  'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
89
- 'options' => array(
90
- 'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
91
- 'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' ),
92
- 'mailerlite' => esc_html__( 'MailerLite', 'themeisle-companion' ),
93
- ),
94
  'default' => 'mailchimp',
95
  'separator' => 'after',
96
  )
80
  * Add specific settings for Newsletter widget.
81
  */
82
  function add_specific_settings_controls() {
83
+ $providers = array(
84
+ 'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
85
+ 'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' )
86
+ );
87
+ if ( version_compare( '7.1', phpversion() ) !== 1 ) {
88
+ $providers['mailerlite'] = esc_html__( 'MailerLite', 'themeisle-companion' );
89
+ }
90
  $this->add_control(
91
  'provider',
92
  array(
93
  'type' => 'select',
94
  'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
95
+ 'options' => $providers,
 
 
 
 
96
  'default' => 'mailchimp',
97
  'separator' => 'after',
98
  )
vendor/codeinwp/themeisle-content-forms/includes/widgets-public/newsletter_public.php CHANGED
@@ -8,8 +8,6 @@
8
 
9
  namespace ThemeIsle\ContentForms\Includes\Widgets_Public;
10
 
11
- use MailerLiteApi\Exceptions\MailerLiteSdkException;
12
- use MailerLiteApi\MailerLite;
13
  use ThemeIsle\ContentForms\Includes\Admin\Widget_Actions_Base;
14
 
15
  require_once TI_CONTENT_FORMS_PATH . '/includes/widgets-public/widget_actions_base.php';
@@ -259,6 +257,12 @@ class Newsletter_Public extends Widget_Actions_Base {
259
  * @return array
260
  */
261
  private function mailerlite_subscribe( $form_settings, $result ) {
 
 
 
 
 
 
262
  $api_key = $form_settings['provider_settings']['access_key'];
263
  $list_id = $form_settings['provider_settings']['list_id'];
264
  $data = $form_settings['data'];
@@ -277,7 +281,7 @@ class Newsletter_Public extends Widget_Actions_Base {
277
  }
278
 
279
  try {
280
- $ml_subscribers = new MailerLite( $api_key );
281
  $groups_api = $ml_subscribers->groups();
282
  $ml_response = $groups_api->addSubscriber( $list_id, $form_data );
283
  if ( ! property_exists( $ml_response, 'error' ) ) {
@@ -286,7 +290,7 @@ class Newsletter_Public extends Widget_Actions_Base {
286
  return $result;
287
  }
288
  return $result;
289
- } catch ( MailerLiteSdkException $e ) {
290
  return $result;
291
  }
292
  }
8
 
9
  namespace ThemeIsle\ContentForms\Includes\Widgets_Public;
10
 
 
 
11
  use ThemeIsle\ContentForms\Includes\Admin\Widget_Actions_Base;
12
 
13
  require_once TI_CONTENT_FORMS_PATH . '/includes/widgets-public/widget_actions_base.php';
257
  * @return array
258
  */
259
  private function mailerlite_subscribe( $form_settings, $result ) {
260
+ if ( version_compare( '7.1', phpversion() ) === 1 ) {
261
+ return false;
262
+ }
263
+
264
+ require_once TI_CONTENT_FORMS_PATH . '/library/mailerlite/vendor/autoload.php';
265
+
266
  $api_key = $form_settings['provider_settings']['access_key'];
267
  $list_id = $form_settings['provider_settings']['list_id'];
268
  $data = $form_settings['data'];
281
  }
282
 
283
  try {
284
+ $ml_subscribers = new \MailerLiteApi\MailerLite( $api_key );
285
  $groups_api = $ml_subscribers->groups();
286
  $ml_response = $groups_api->addSubscriber( $list_id, $form_data );
287
  if ( ! property_exists( $ml_response, 'error' ) ) {
290
  return $result;
291
  }
292
  return $result;
293
+ } catch ( \MailerLiteApi\Exceptions\MailerLiteSdkException $e ) {
294
  return $result;
295
  }
296
  }
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Batch.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Campaigns.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Fields.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Groups.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Segments.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Settings.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Stats.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/Subscribers.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Api/WooCommerce.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/ApiAbstract.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/ApiConstants.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/BatchRequest.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/Collection.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Common/RestClient.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/Exceptions/MailerLiteSdkException.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk → codeinwp/themeisle-content-forms/library/mailerlite}/src/MailerLite.php RENAMED
File without changes
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/autoload.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
+
7
+ return ComposerAutoloaderInit22ed664abeb911f6c3af47c4be71c97d::getLoader();
vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/CHANGELOG.md RENAMED
File without changes
vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/LICENSE RENAMED
File without changes
vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/src/CallbackFilter.php RENAMED
File without changes
vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/src/functions.php RENAMED
File without changes
vendor/{clue → codeinwp/themeisle-content-forms/library/mailerlite/vendor/clue}/stream-filter/src/functions_include.php RENAMED
File without changes
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
+ *
18
+ * $loader = new \Composer\Autoload\ClassLoader();
19
+ *
20
+ * // register classes with namespaces
21
+ * $loader->add('Symfony\Component', __DIR__.'/component');
22
+ * $loader->add('Symfony', __DIR__.'/framework');
23
+ *
24
+ * // activate the autoloader
25
+ * $loader->register();
26
+ *
27
+ * // to enable searching the include path (eg. for PEAR packages)
28
+ * $loader->setUseIncludePath(true);
29
+ *
30
+ * In this example, if you try to use a class in the Symfony\Component
31
+ * namespace or one of its children (Symfony\Component\Console for instance),
32
+ * the autoloader will first look for the class under the component/
33
+ * directory, and it will then fallback to the framework/ directory if not
34
+ * found before giving up.
35
+ *
36
+ * This class is loosely based on the Symfony UniversalClassLoader.
37
+ *
38
+ * @author Fabien Potencier <fabien@symfony.com>
39
+ * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ private $vendorDir;
46
+
47
+ // PSR-4
48
+ private $prefixLengthsPsr4 = array();
49
+ private $prefixDirsPsr4 = array();
50
+ private $fallbackDirsPsr4 = array();
51
+
52
+ // PSR-0
53
+ private $prefixesPsr0 = array();
54
+ private $fallbackDirsPsr0 = array();
55
+
56
+ private $useIncludePath = false;
57
+ private $classMap = array();
58
+ private $classMapAuthoritative = false;
59
+ private $missingClasses = array();
60
+ private $apcuPrefix;
61
+
62
+ private static $registeredLoaders = array();
63
+
64
+ public function __construct($vendorDir = null)
65
+ {
66
+ $this->vendorDir = $vendorDir;
67
+ }
68
+
69
+ public function getPrefixes()
70
+ {
71
+ if (!empty($this->prefixesPsr0)) {
72
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
73
+ }
74
+
75
+ return array();
76
+ }
77
+
78
+ public function getPrefixesPsr4()
79
+ {
80
+ return $this->prefixDirsPsr4;
81
+ }
82
+
83
+ public function getFallbackDirs()
84
+ {
85
+ return $this->fallbackDirsPsr0;
86
+ }
87
+
88
+ public function getFallbackDirsPsr4()
89
+ {
90
+ return $this->fallbackDirsPsr4;
91
+ }
92
+
93
+ public function getClassMap()
94
+ {
95
+ return $this->classMap;
96
+ }
97
+
98
+ /**
99
+ * @param array $classMap Class to filename map
100
+ */
101
+ public function addClassMap(array $classMap)
102
+ {
103
+ if ($this->classMap) {
104
+ $this->classMap = array_merge($this->classMap, $classMap);
105
+ } else {
106
+ $this->classMap = $classMap;
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Registers a set of PSR-0 directories for a given prefix, either
112
+ * appending or prepending to the ones previously set for this prefix.
113
+ *
114
+ * @param string $prefix The prefix
115
+ * @param array|string $paths The PSR-0 root directories
116
+ * @param bool $prepend Whether to prepend the directories
117
+ */
118
+ public function add($prefix, $paths, $prepend = false)
119
+ {
120
+ if (!$prefix) {
121
+ if ($prepend) {
122
+ $this->fallbackDirsPsr0 = array_merge(
123
+ (array) $paths,
124
+ $this->fallbackDirsPsr0
125
+ );
126
+ } else {
127
+ $this->fallbackDirsPsr0 = array_merge(
128
+ $this->fallbackDirsPsr0,
129
+ (array) $paths
130
+ );
131
+ }
132
+
133
+ return;
134
+ }
135
+
136
+ $first = $prefix[0];
137
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
138
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
139
+
140
+ return;
141
+ }
142
+ if ($prepend) {
143
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
144
+ (array) $paths,
145
+ $this->prefixesPsr0[$first][$prefix]
146
+ );
147
+ } else {
148
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
149
+ $this->prefixesPsr0[$first][$prefix],
150
+ (array) $paths
151
+ );
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Registers a set of PSR-4 directories for a given namespace, either
157
+ * appending or prepending to the ones previously set for this namespace.
158
+ *
159
+ * @param string $prefix The prefix/namespace, with trailing '\\'
160
+ * @param array|string $paths The PSR-4 base directories
161
+ * @param bool $prepend Whether to prepend the directories
162
+ *
163
+ * @throws \InvalidArgumentException
164
+ */
165
+ public function addPsr4($prefix, $paths, $prepend = false)
166
+ {
167
+ if (!$prefix) {
168
+ // Register directories for the root namespace.
169
+ if ($prepend) {
170
+ $this->fallbackDirsPsr4 = array_merge(
171
+ (array) $paths,
172
+ $this->fallbackDirsPsr4
173
+ );
174
+ } else {
175
+ $this->fallbackDirsPsr4 = array_merge(
176
+ $this->fallbackDirsPsr4,
177
+ (array) $paths
178
+ );
179
+ }
180
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
181
+ // Register directories for a new namespace.
182
+ $length = strlen($prefix);
183
+ if ('\\' !== $prefix[$length - 1]) {
184
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
185
+ }
186
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
187
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
188
+ } elseif ($prepend) {
189
+ // Prepend directories for an already registered namespace.
190
+ $this->prefixDirsPsr4[$prefix] = array_merge(
191
+ (array) $paths,
192
+ $this->prefixDirsPsr4[$prefix]
193
+ );
194
+ } else {
195
+ // Append directories for an already registered namespace.
196
+ $this->prefixDirsPsr4[$prefix] = array_merge(
197
+ $this->prefixDirsPsr4[$prefix],
198
+ (array) $paths
199
+ );
200
+ }
201
+ }
202
+
203
+ /**
204
+ * Registers a set of PSR-0 directories for a given prefix,
205
+ * replacing any others previously set for this prefix.
206
+ *
207
+ * @param string $prefix The prefix
208
+ * @param array|string $paths The PSR-0 base directories
209
+ */
210
+ public function set($prefix, $paths)
211
+ {
212
+ if (!$prefix) {
213
+ $this->fallbackDirsPsr0 = (array) $paths;
214
+ } else {
215
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
216
+ }
217
+ }
218
+
219
+ /**
220
+ * Registers a set of PSR-4 directories for a given namespace,
221
+ * replacing any others previously set for this namespace.
222
+ *
223
+ * @param string $prefix The prefix/namespace, with trailing '\\'
224
+ * @param array|string $paths The PSR-4 base directories
225
+ *
226
+ * @throws \InvalidArgumentException
227
+ */
228
+ public function setPsr4($prefix, $paths)
229
+ {
230
+ if (!$prefix) {
231
+ $this->fallbackDirsPsr4 = (array) $paths;
232
+ } else {
233
+ $length = strlen($prefix);
234
+ if ('\\' !== $prefix[$length - 1]) {
235
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
236
+ }
237
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
238
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
239
+ }
240
+ }
241
+
242
+ /**
243
+ * Turns on searching the include path for class files.
244
+ *
245
+ * @param bool $useIncludePath
246
+ */
247
+ public function setUseIncludePath($useIncludePath)
248
+ {
249
+ $this->useIncludePath = $useIncludePath;
250
+ }
251
+
252
+ /**
253
+ * Can be used to check if the autoloader uses the include path to check
254
+ * for classes.
255
+ *
256
+ * @return bool
257
+ */
258
+ public function getUseIncludePath()
259
+ {
260
+ return $this->useIncludePath;
261
+ }
262
+
263
+ /**
264
+ * Turns off searching the prefix and fallback directories for classes
265
+ * that have not been registered with the class map.
266
+ *
267
+ * @param bool $classMapAuthoritative
268
+ */
269
+ public function setClassMapAuthoritative($classMapAuthoritative)
270
+ {
271
+ $this->classMapAuthoritative = $classMapAuthoritative;
272
+ }
273
+
274
+ /**
275
+ * Should class lookup fail if not found in the current class map?
276
+ *
277
+ * @return bool
278
+ */
279
+ public function isClassMapAuthoritative()
280
+ {
281
+ return $this->classMapAuthoritative;
282
+ }
283
+
284
+ /**
285
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
286
+ *
287
+ * @param string|null $apcuPrefix
288
+ */
289
+ public function setApcuPrefix($apcuPrefix)
290
+ {
291
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
292
+ }
293
+
294
+ /**
295
+ * The APCu prefix in use, or null if APCu caching is not enabled.
296
+ *
297
+ * @return string|null
298
+ */
299
+ public function getApcuPrefix()
300
+ {
301
+ return $this->apcuPrefix;
302
+ }
303
+
304
+ /**
305
+ * Registers this instance as an autoloader.
306
+ *
307
+ * @param bool $prepend Whether to prepend the autoloader or not
308
+ */
309
+ public function register($prepend = false)
310
+ {
311
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
312
+
313
+ if (null === $this->vendorDir) {
314
+ return;
315
+ }
316
+
317
+ if ($prepend) {
318
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
319
+ } else {
320
+ unset(self::$registeredLoaders[$this->vendorDir]);
321
+ self::$registeredLoaders[$this->vendorDir] = $this;
322
+ }
323
+ }
324
+
325
+ /**
326
+ * Unregisters this instance as an autoloader.
327
+ */
328
+ public function unregister()
329
+ {
330
+ spl_autoload_unregister(array($this, 'loadClass'));
331
+
332
+ if (null !== $this->vendorDir) {
333
+ unset(self::$registeredLoaders[$this->vendorDir]);
334
+ }
335
+ }
336
+
337
+ /**
338
+ * Loads the given class or interface.
339
+ *
340
+ * @param string $class The name of the class
341
+ * @return true|null True if loaded, null otherwise
342
+ */
343
+ public function loadClass($class)
344
+ {
345
+ if ($file = $this->findFile($class)) {
346
+ includeFile($file);
347
+
348
+ return true;
349
+ }
350
+
351
+ return null;
352
+ }
353
+
354
+ /**
355
+ * Finds the path to the file where the class is defined.
356
+ *
357
+ * @param string $class The name of the class
358
+ *
359
+ * @return string|false The path if found, false otherwise
360
+ */
361
+ public function findFile($class)
362
+ {
363
+ // class map lookup
364
+ if (isset($this->classMap[$class])) {
365
+ return $this->classMap[$class];
366
+ }
367
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
368
+ return false;
369
+ }
370
+ if (null !== $this->apcuPrefix) {
371
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
372
+ if ($hit) {
373
+ return $file;
374
+ }
375
+ }
376
+
377
+ $file = $this->findFileWithExtension($class, '.php');
378
+
379
+ // Search for Hack files if we are running on HHVM
380
+ if (false === $file && defined('HHVM_VERSION')) {
381
+ $file = $this->findFileWithExtension($class, '.hh');
382
+ }
383
+
384
+ if (null !== $this->apcuPrefix) {
385
+ apcu_add($this->apcuPrefix.$class, $file);
386
+ }
387
+
388
+ if (false === $file) {
389
+ // Remember that this class does not exist.
390
+ $this->missingClasses[$class] = true;
391
+ }
392
+
393
+ return $file;
394
+ }
395
+
396
+ /**
397
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
398
+ *
399
+ * @return self[]
400
+ */
401
+ public static function getRegisteredLoaders()
402
+ {
403
+ return self::$registeredLoaders;
404
+ }
405
+
406
+ private function findFileWithExtension($class, $ext)
407
+ {
408
+ // PSR-4 lookup
409
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
410
+
411
+ $first = $class[0];
412
+ if (isset($this->prefixLengthsPsr4[$first])) {
413
+ $subPath = $class;
414
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
415
+ $subPath = substr($subPath, 0, $lastPos);
416
+ $search = $subPath . '\\';
417
+ if (isset($this->prefixDirsPsr4[$search])) {
418
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
419
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
420
+ if (file_exists($file = $dir . $pathEnd)) {
421
+ return $file;
422
+ }
423
+ }
424
+ }
425
+ }
426
+ }
427
+
428
+ // PSR-4 fallback dirs
429
+ foreach ($this->fallbackDirsPsr4 as $dir) {
430
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
431
+ return $file;
432
+ }
433
+ }
434
+
435
+ // PSR-0 lookup
436
+ if (false !== $pos = strrpos($class, '\\')) {
437
+ // namespaced class name
438
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
439
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
440
+ } else {
441
+ // PEAR-like class name
442
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
443
+ }
444
+
445
+ if (isset($this->prefixesPsr0[$first])) {
446
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
447
+ if (0 === strpos($class, $prefix)) {
448
+ foreach ($dirs as $dir) {
449
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
450
+ return $file;
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+
457
+ // PSR-0 fallback dirs
458
+ foreach ($this->fallbackDirsPsr0 as $dir) {
459
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
460
+ return $file;
461
+ }
462
+ }
463
+
464
+ // PSR-0 include paths.
465
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
466
+ return $file;
467
+ }
468
+
469
+ return false;
470
+ }
471
+ }
472
+
473
+ /**
474
+ * Scope isolated include.
475
+ *
476
+ * Prevents access to $this/self from included files.
477
+ */
478
+ function includeFile($file)
479
+ {
480
+ include $file;
481
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Autoload\ClassLoader;
16
+ use Composer\Semver\VersionParser;
17
+
18
+ /**
19
+ * This class is copied in every Composer installed project and available to all
20
+ *
21
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
+ *
23
+ * To require it's presence, you can require `composer-runtime-api ^2.0`
24
+ */
25
+ class InstalledVersions
26
+ {
27
+ private static $installed;
28
+ private static $canGetVendors;
29
+ private static $installedByVendor = array();
30
+
31
+ /**
32
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
33
+ *
34
+ * @return string[]
35
+ * @psalm-return list<string>
36
+ */
37
+ public static function getInstalledPackages()
38
+ {
39
+ $packages = array();
40
+ foreach (self::getInstalled() as $installed) {
41
+ $packages[] = array_keys($installed['versions']);
42
+ }
43
+
44
+ if (1 === \count($packages)) {
45
+ return $packages[0];
46
+ }
47
+
48
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
49
+ }
50
+
51
+ /**
52
+ * Returns a list of all package names with a specific type e.g. 'library'
53
+ *
54
+ * @param string $type
55
+ * @return string[]
56
+ * @psalm-return list<string>
57
+ */
58
+ public static function getInstalledPackagesByType($type)
59
+ {
60
+ $packagesByType = array();
61
+
62
+ foreach (self::getInstalled() as $installed) {
63
+ foreach ($installed['versions'] as $name => $package) {
64
+ if (isset($package['type']) && $package['type'] === $type) {
65
+ $packagesByType[] = $name;
66
+ }
67
+ }
68
+ }
69
+
70
+ return $packagesByType;
71
+ }
72
+
73
+ /**
74
+ * Checks whether the given package is installed
75
+ *
76
+ * This also returns true if the package name is provided or replaced by another package
77
+ *
78
+ * @param string $packageName
79
+ * @param bool $includeDevRequirements
80
+ * @return bool
81
+ */
82
+ public static function isInstalled($packageName, $includeDevRequirements = true)
83
+ {
84
+ foreach (self::getInstalled() as $installed) {
85
+ if (isset($installed['versions'][$packageName])) {
86
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
87
+ }
88
+ }
89
+
90
+ return false;
91
+ }
92
+
93
+ /**
94
+ * Checks whether the given package satisfies a version constraint
95
+ *
96
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
97
+ *
98
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
99
+ *
100
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
101
+ * @param string $packageName
102
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
103
+ * @return bool
104
+ */
105
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
106
+ {
107
+ $constraint = $parser->parseConstraints($constraint);
108
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
109
+
110
+ return $provided->matches($constraint);
111
+ }
112
+
113
+ /**
114
+ * Returns a version constraint representing all the range(s) which are installed for a given package
115
+ *
116
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
117
+ * whether a given version of a package is installed, and not just whether it exists
118
+ *
119
+ * @param string $packageName
120
+ * @return string Version constraint usable with composer/semver
121
+ */
122
+ public static function getVersionRanges($packageName)
123
+ {
124
+ foreach (self::getInstalled() as $installed) {
125
+ if (!isset($installed['versions'][$packageName])) {
126
+ continue;
127
+ }
128
+
129
+ $ranges = array();
130
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
131
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
132
+ }
133
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
134
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
135
+ }
136
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
137
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
138
+ }
139
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
140
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
141
+ }
142
+
143
+ return implode(' || ', $ranges);
144
+ }
145
+
146
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
147
+ }
148
+
149
+ /**
150
+ * @param string $packageName
151
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
152
+ */
153
+ public static function getVersion($packageName)
154
+ {
155
+ foreach (self::getInstalled() as $installed) {
156
+ if (!isset($installed['versions'][$packageName])) {
157
+ continue;
158
+ }
159
+
160
+ if (!isset($installed['versions'][$packageName]['version'])) {
161
+ return null;
162
+ }
163
+
164
+ return $installed['versions'][$packageName]['version'];
165
+ }
166
+
167
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
168
+ }
169
+
170
+ /**
171
+ * @param string $packageName
172
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
173
+ */
174
+ public static function getPrettyVersion($packageName)
175
+ {
176
+ foreach (self::getInstalled() as $installed) {
177
+ if (!isset($installed['versions'][$packageName])) {
178
+ continue;
179
+ }
180
+
181
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
182
+ return null;
183
+ }
184
+
185
+ return $installed['versions'][$packageName]['pretty_version'];
186
+ }
187
+
188
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
189
+ }
190
+
191
+ /**
192
+ * @param string $packageName
193
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
194
+ */
195
+ public static function getReference($packageName)
196
+ {
197
+ foreach (self::getInstalled() as $installed) {
198
+ if (!isset($installed['versions'][$packageName])) {
199
+ continue;
200
+ }
201
+
202
+ if (!isset($installed['versions'][$packageName]['reference'])) {
203
+ return null;
204
+ }
205
+
206
+ return $installed['versions'][$packageName]['reference'];
207
+ }
208
+
209
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
210
+ }
211
+
212
+ /**
213
+ * @param string $packageName
214
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
215
+ */
216
+ public static function getInstallPath($packageName)
217
+ {
218
+ foreach (self::getInstalled() as $installed) {
219
+ if (!isset($installed['versions'][$packageName])) {
220
+ continue;
221
+ }
222
+
223
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
224
+ }
225
+
226
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
227
+ }
228
+
229
+ /**
230
+ * @return array
231
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
232
+ */
233
+ public static function getRootPackage()
234
+ {
235
+ $installed = self::getInstalled();
236
+
237
+ return $installed[0]['root'];
238
+ }
239
+
240
+ /**
241
+ * Returns the raw installed.php data for custom implementations
242
+ *
243
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
244
+ * @return array[]
245
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}
246
+ */
247
+ public static function getRawData()
248
+ {
249
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
250
+
251
+ if (null === self::$installed) {
252
+ // only require the installed.php file if this file is loaded from its dumped location,
253
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
254
+ if (substr(__DIR__, -8, 1) !== 'C') {
255
+ self::$installed = include __DIR__ . '/installed.php';
256
+ } else {
257
+ self::$installed = array();
258
+ }
259
+ }
260
+
261
+ return self::$installed;
262
+ }
263
+
264
+ /**
265
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
266
+ *
267
+ * @return array[]
268
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
269
+ */
270
+ public static function getAllRawData()
271
+ {
272
+ return self::getInstalled();
273
+ }
274
+
275
+ /**
276
+ * Lets you reload the static array from another file
277
+ *
278
+ * This is only useful for complex integrations in which a project needs to use
279
+ * this class but then also needs to execute another project's autoloader in process,
280
+ * and wants to ensure both projects have access to their version of installed.php.
281
+ *
282
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
283
+ * the data it needs from this class, then call reload() with
284
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
285
+ * the project in which it runs can then also use this class safely, without
286
+ * interference between PHPUnit's dependencies and the project's dependencies.
287
+ *
288
+ * @param array[] $data A vendor/composer/installed.php data set
289
+ * @return void
290
+ *
291
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data
292
+ */
293
+ public static function reload($data)
294
+ {
295
+ self::$installed = $data;
296
+ self::$installedByVendor = array();
297
+ }
298
+
299
+ /**
300
+ * @return array[]
301
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
302
+ */
303
+ private static function getInstalled()
304
+ {
305
+ if (null === self::$canGetVendors) {
306
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
307
+ }
308
+
309
+ $installed = array();
310
+
311
+ if (self::$canGetVendors) {
312
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
313
+ if (isset(self::$installedByVendor[$vendorDir])) {
314
+ $installed[] = self::$installedByVendor[$vendorDir];
315
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
316
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
317
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
318
+ self::$installed = $installed[count($installed) - 1];
319
+ }
320
+ }
321
+ }
322
+ }
323
+
324
+ if (null === self::$installed) {
325
+ // only require the installed.php file if this file is loaded from its dumped location,
326
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
327
+ if (substr(__DIR__, -8, 1) !== 'C') {
328
+ self::$installed = require __DIR__ . '/installed.php';
329
+ } else {
330
+ self::$installed = array();
331
+ }
332
+ }
333
+ $installed[] = self::$installed;
334
+
335
+ return $installed;
336
+ }
337
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
10
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
11
+ 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
12
+ 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
13
+ 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
14
+ 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
15
+ 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
16
+ 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
17
+ );
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_files.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_files.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
10
+ 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
11
+ 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
12
+ '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
13
+ 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
14
+ '9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php',
15
+ 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
16
+ '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
17
+ 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
18
+ '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
19
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
20
+ '8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php',
21
+ );
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
10
+ 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
11
+ 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
12
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
13
+ 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
14
+ 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
15
+ 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
16
+ 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
17
+ 'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
18
+ 'MailerLiteApi\\' => array($baseDir . '/src'),
19
+ 'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'),
20
+ 'Http\\Message\\' => array($vendorDir . '/php-http/message/src', $vendorDir . '/php-http/message-factory/src'),
21
+ 'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'),
22
+ 'Http\\Client\\Common\\' => array($vendorDir . '/php-http/client-common/src'),
23
+ 'Http\\Client\\' => array($vendorDir . '/php-http/httplug/src'),
24
+ 'Http\\Adapter\\Guzzle6\\' => array($vendorDir . '/php-http/guzzle6-adapter/src'),
25
+ 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
26
+ 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
27
+ 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
28
+ 'Clue\\StreamFilter\\' => array($vendorDir . '/clue/stream-filter/src'),
29
+ );
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit22ed664abeb911f6c3af47c4be71c97d
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
+ public static function getLoader()
20
+ {
21
+ if (null !== self::$loader) {
22
+ return self::$loader;
23
+ }
24
+
25
+ require __DIR__ . '/platform_check.php';
26
+
27
+ spl_autoload_register(array('ComposerAutoloaderInit22ed664abeb911f6c3af47c4be71c97d', 'loadClassLoader'), true, true);
28
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit22ed664abeb911f6c3af47c4be71c97d', 'loadClassLoader'));
30
+
31
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
+ if ($useStaticLoader) {
33
+ require __DIR__ . '/autoload_static.php';
34
+
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit22ed664abeb911f6c3af47c4be71c97d::getInitializer($loader));
36
+ } else {
37
+ $map = require __DIR__ . '/autoload_namespaces.php';
38
+ foreach ($map as $namespace => $path) {
39
+ $loader->set($namespace, $path);
40
+ }
41
+
42
+ $map = require __DIR__ . '/autoload_psr4.php';
43
+ foreach ($map as $namespace => $path) {
44
+ $loader->setPsr4($namespace, $path);
45
+ }
46
+
47
+ $classMap = require __DIR__ . '/autoload_classmap.php';
48
+ if ($classMap) {
49
+ $loader->addClassMap($classMap);
50
+ }
51
+ }
52
+
53
+ $loader->register(true);
54
+
55
+ if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit22ed664abeb911f6c3af47c4be71c97d::$files;
57
+ } else {
58
+ $includeFiles = require __DIR__ . '/autoload_files.php';
59
+ }
60
+ foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire22ed664abeb911f6c3af47c4be71c97d($fileIdentifier, $file);
62
+ }
63
+
64
+ return $loader;
65
+ }
66
+ }
67
+
68
+ function composerRequire22ed664abeb911f6c3af47c4be71c97d($fileIdentifier, $file)
69
+ {
70
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
+ require $file;
72
+
73
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
74
+ }
75
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit22ed664abeb911f6c3af47c4be71c97d
8
+ {
9
+ public static $files = array (
10
+ '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
11
+ 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
12
+ 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
13
+ '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
14
+ 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
15
+ '9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php',
16
+ 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
17
+ '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
18
+ 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
19
+ '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
20
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
21
+ '8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php',
22
+ );
23
+
24
+ public static $prefixLengthsPsr4 = array (
25
+ 'S' =>
26
+ array (
27
+ 'Symfony\\Polyfill\\Php80\\' => 23,
28
+ 'Symfony\\Polyfill\\Php73\\' => 23,
29
+ 'Symfony\\Polyfill\\Php72\\' => 23,
30
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
31
+ 'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
32
+ 'Symfony\\Component\\OptionsResolver\\' => 34,
33
+ ),
34
+ 'P' =>
35
+ array (
36
+ 'Psr\\Http\\Message\\' => 17,
37
+ 'Psr\\Http\\Client\\' => 16,
38
+ ),
39
+ 'N' =>
40
+ array (
41
+ 'Nyholm\\Psr7\\' => 12,
42
+ ),
43
+ 'M' =>
44
+ array (
45
+ 'MailerLiteApi\\' => 14,
46
+ ),
47
+ 'H' =>
48
+ array (
49
+ 'Http\\Promise\\' => 13,
50
+ 'Http\\Message\\' => 13,
51
+ 'Http\\Discovery\\' => 15,
52
+ 'Http\\Client\\Common\\' => 19,
53
+ 'Http\\Client\\' => 12,
54
+ 'Http\\Adapter\\Guzzle6\\' => 21,
55
+ ),
56
+ 'G' =>
57
+ array (
58
+ 'GuzzleHttp\\Psr7\\' => 16,
59
+ 'GuzzleHttp\\Promise\\' => 19,
60
+ 'GuzzleHttp\\' => 11,
61
+ ),
62
+ 'C' =>
63
+ array (
64
+ 'Clue\\StreamFilter\\' => 18,
65
+ ),
66
+ );
67
+
68
+ public static $prefixDirsPsr4 = array (
69
+ 'Symfony\\Polyfill\\Php80\\' =>
70
+ array (
71
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
72
+ ),
73
+ 'Symfony\\Polyfill\\Php73\\' =>
74
+ array (
75
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
76
+ ),
77
+ 'Symfony\\Polyfill\\Php72\\' =>
78
+ array (
79
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
80
+ ),
81
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
82
+ array (
83
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
84
+ ),
85
+ 'Symfony\\Polyfill\\Intl\\Idn\\' =>
86
+ array (
87
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
88
+ ),
89
+ 'Symfony\\Component\\OptionsResolver\\' =>
90
+ array (
91
+ 0 => __DIR__ . '/..' . '/symfony/options-resolver',
92
+ ),
93
+ 'Psr\\Http\\Message\\' =>
94
+ array (
95
+ 0 => __DIR__ . '/..' . '/psr/http-factory/src',
96
+ 1 => __DIR__ . '/..' . '/psr/http-message/src',
97
+ ),
98
+ 'Psr\\Http\\Client\\' =>
99
+ array (
100
+ 0 => __DIR__ . '/..' . '/psr/http-client/src',
101
+ ),
102
+ 'Nyholm\\Psr7\\' =>
103
+ array (
104
+ 0 => __DIR__ . '/..' . '/nyholm/psr7/src',
105
+ ),
106
+ 'MailerLiteApi\\' =>
107
+ array (
108
+ 0 => __DIR__ . '/../..' . '/src',
109
+ ),
110
+ 'Http\\Promise\\' =>
111
+ array (
112
+ 0 => __DIR__ . '/..' . '/php-http/promise/src',
113
+ ),
114
+ 'Http\\Message\\' =>
115
+ array (
116
+ 0 => __DIR__ . '/..' . '/php-http/message/src',
117
+ 1 => __DIR__ . '/..' . '/php-http/message-factory/src',
118
+ ),
119
+ 'Http\\Discovery\\' =>
120
+ array (
121
+ 0 => __DIR__ . '/..' . '/php-http/discovery/src',
122
+ ),
123
+ 'Http\\Client\\Common\\' =>
124
+ array (
125
+ 0 => __DIR__ . '/..' . '/php-http/client-common/src',
126
+ ),
127
+ 'Http\\Client\\' =>
128
+ array (
129
+ 0 => __DIR__ . '/..' . '/php-http/httplug/src',
130
+ ),
131
+ 'Http\\Adapter\\Guzzle6\\' =>
132
+ array (
133
+ 0 => __DIR__ . '/..' . '/php-http/guzzle6-adapter/src',
134
+ ),
135
+ 'GuzzleHttp\\Psr7\\' =>
136
+ array (
137
+ 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
138
+ ),
139
+ 'GuzzleHttp\\Promise\\' =>
140
+ array (
141
+ 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
142
+ ),
143
+ 'GuzzleHttp\\' =>
144
+ array (
145
+ 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
146
+ ),
147
+ 'Clue\\StreamFilter\\' =>
148
+ array (
149
+ 0 => __DIR__ . '/..' . '/clue/stream-filter/src',
150
+ ),
151
+ );
152
+
153
+ public static $classMap = array (
154
+ 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
155
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
156
+ 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
157
+ 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
158
+ 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
159
+ 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
160
+ 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
161
+ 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
162
+ );
163
+
164
+ public static function getInitializer(ClassLoader $loader)
165
+ {
166
+ return \Closure::bind(function () use ($loader) {
167
+ $loader->prefixLengthsPsr4 = ComposerStaticInit22ed664abeb911f6c3af47c4be71c97d::$prefixLengthsPsr4;
168
+ $loader->prefixDirsPsr4 = ComposerStaticInit22ed664abeb911f6c3af47c4be71c97d::$prefixDirsPsr4;
169
+ $loader->classMap = ComposerStaticInit22ed664abeb911f6c3af47c4be71c97d::$classMap;
170
+
171
+ }, null, ClassLoader::class);
172
+ }
173
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/installed.json ADDED
@@ -0,0 +1,1732 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "packages": [
3
+ {
4
+ "name": "clue/stream-filter",
5
+ "version": "v1.6.0",
6
+ "version_normalized": "1.6.0.0",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/clue/stream-filter.git",
10
+ "reference": "d6169430c7731d8509da7aecd0af756a5747b78e"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/clue/stream-filter/zipball/d6169430c7731d8509da7aecd0af756a5747b78e",
15
+ "reference": "d6169430c7731d8509da7aecd0af756a5747b78e",
16
+ "shasum": ""
17
+ },
18
+ "require": {
19
+ "php": ">=5.3"
20
+ },
21
+ "require-dev": {
22
+ "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36"
23
+ },
24
+ "time": "2022-02-21T13:15:14+00:00",
25
+ "type": "library",
26
+ "installation-source": "dist",
27
+ "autoload": {
28
+ "files": [
29
+ "src/functions_include.php"
30
+ ],
31
+ "psr-4": {
32
+ "Clue\\StreamFilter\\": "src/"
33
+ }
34
+ },
35
+ "notification-url": "https://packagist.org/downloads/",
36
+ "license": [
37
+ "MIT"
38
+ ],
39
+ "authors": [
40
+ {
41
+ "name": "Christian Lück",
42
+ "email": "christian@clue.engineering"
43
+ }
44
+ ],
45
+ "description": "A simple and modern approach to stream filtering in PHP",
46
+ "homepage": "https://github.com/clue/php-stream-filter",
47
+ "keywords": [
48
+ "bucket brigade",
49
+ "callback",
50
+ "filter",
51
+ "php_user_filter",
52
+ "stream",
53
+ "stream_filter_append",
54
+ "stream_filter_register"
55
+ ],
56
+ "support": {
57
+ "issues": "https://github.com/clue/stream-filter/issues",
58
+ "source": "https://github.com/clue/stream-filter/tree/v1.6.0"
59
+ },
60
+ "funding": [
61
+ {
62
+ "url": "https://clue.engineering/support",
63
+ "type": "custom"
64
+ },
65
+ {
66
+ "url": "https://github.com/clue",
67
+ "type": "github"
68
+ }
69
+ ],
70
+ "install-path": "../clue/stream-filter"
71
+ },
72
+ {
73
+ "name": "guzzlehttp/guzzle",
74
+ "version": "6.5.8",
75
+ "version_normalized": "6.5.8.0",
76
+ "source": {
77
+ "type": "git",
78
+ "url": "https://github.com/guzzle/guzzle.git",
79
+ "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
80
+ },
81
+ "dist": {
82
+ "type": "zip",
83
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
84
+ "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
85
+ "shasum": ""
86
+ },
87
+ "require": {
88
+ "ext-json": "*",
89
+ "guzzlehttp/promises": "^1.0",
90
+ "guzzlehttp/psr7": "^1.9",
91
+ "php": ">=5.5",
92
+ "symfony/polyfill-intl-idn": "^1.17"
93
+ },
94
+ "require-dev": {
95
+ "ext-curl": "*",
96
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
97
+ "psr/log": "^1.1"
98
+ },
99
+ "suggest": {
100
+ "psr/log": "Required for using the Log middleware"
101
+ },
102
+ "time": "2022-06-20T22:16:07+00:00",
103
+ "type": "library",
104
+ "extra": {
105
+ "branch-alias": {
106
+ "dev-master": "6.5-dev"
107
+ }
108
+ },
109
+ "installation-source": "dist",
110
+ "autoload": {
111
+ "files": [
112
+ "src/functions_include.php"
113
+ ],
114
+ "psr-4": {
115
+ "GuzzleHttp\\": "src/"
116
+ }
117
+ },
118
+ "notification-url": "https://packagist.org/downloads/",
119
+ "license": [
120
+ "MIT"
121
+ ],
122
+ "authors": [
123
+ {
124
+ "name": "Graham Campbell",
125
+ "email": "hello@gjcampbell.co.uk",
126
+ "homepage": "https://github.com/GrahamCampbell"
127
+ },
128
+ {
129
+ "name": "Michael Dowling",
130
+ "email": "mtdowling@gmail.com",
131
+ "homepage": "https://github.com/mtdowling"
132
+ },
133
+ {
134
+ "name": "Jeremy Lindblom",
135
+ "email": "jeremeamia@gmail.com",
136
+ "homepage": "https://github.com/jeremeamia"
137
+ },
138
+ {
139
+ "name": "George Mponos",
140
+ "email": "gmponos@gmail.com",
141
+ "homepage": "https://github.com/gmponos"
142
+ },
143
+ {
144
+ "name": "Tobias Nyholm",
145
+ "email": "tobias.nyholm@gmail.com",
146
+ "homepage": "https://github.com/Nyholm"
147
+ },
148
+ {
149
+ "name": "Márk Sági-Kazár",
150
+ "email": "mark.sagikazar@gmail.com",
151
+ "homepage": "https://github.com/sagikazarmark"
152
+ },
153
+ {
154
+ "name": "Tobias Schultze",
155
+ "email": "webmaster@tubo-world.de",
156
+ "homepage": "https://github.com/Tobion"
157
+ }
158
+ ],
159
+ "description": "Guzzle is a PHP HTTP client library",
160
+ "homepage": "http://guzzlephp.org/",
161
+ "keywords": [
162
+ "client",
163
+ "curl",
164
+ "framework",
165
+ "http",
166
+ "http client",
167
+ "rest",
168
+ "web service"
169
+ ],
170
+ "support": {
171
+ "issues": "https://github.com/guzzle/guzzle/issues",
172
+ "source": "https://github.com/guzzle/guzzle/tree/6.5.8"
173
+ },
174
+ "funding": [
175
+ {
176
+ "url": "https://github.com/GrahamCampbell",
177
+ "type": "github"
178
+ },
179
+ {
180
+ "url": "https://github.com/Nyholm",
181
+ "type": "github"
182
+ },
183
+ {
184
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
185
+ "type": "tidelift"
186
+ }
187
+ ],
188
+ "install-path": "../guzzlehttp/guzzle"
189
+ },
190
+ {
191
+ "name": "guzzlehttp/promises",
192
+ "version": "1.5.2",
193
+ "version_normalized": "1.5.2.0",
194
+ "source": {
195
+ "type": "git",
196
+ "url": "https://github.com/guzzle/promises.git",
197
+ "reference": "b94b2807d85443f9719887892882d0329d1e2598"
198
+ },
199
+ "dist": {
200
+ "type": "zip",
201
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
202
+ "reference": "b94b2807d85443f9719887892882d0329d1e2598",
203
+ "shasum": ""
204
+ },
205
+ "require": {
206
+ "php": ">=5.5"
207
+ },
208
+ "require-dev": {
209
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
210
+ },
211
+ "time": "2022-08-28T14:55:35+00:00",
212
+ "type": "library",
213
+ "extra": {
214
+ "branch-alias": {
215
+ "dev-master": "1.5-dev"
216
+ }
217
+ },
218
+ "installation-source": "dist",
219
+ "autoload": {
220
+ "files": [
221
+ "src/functions_include.php"
222
+ ],
223
+ "psr-4": {
224
+ "GuzzleHttp\\Promise\\": "src/"
225
+ }
226
+ },
227
+ "notification-url": "https://packagist.org/downloads/",
228
+ "license": [
229
+ "MIT"
230
+ ],
231
+ "authors": [
232
+ {
233
+ "name": "Graham Campbell",
234
+ "email": "hello@gjcampbell.co.uk",
235
+ "homepage": "https://github.com/GrahamCampbell"
236
+ },
237
+ {
238
+ "name": "Michael Dowling",
239
+ "email": "mtdowling@gmail.com",
240
+ "homepage": "https://github.com/mtdowling"
241
+ },
242
+ {
243
+ "name": "Tobias Nyholm",
244
+ "email": "tobias.nyholm@gmail.com",
245
+ "homepage": "https://github.com/Nyholm"
246
+ },
247
+ {
248
+ "name": "Tobias Schultze",
249
+ "email": "webmaster@tubo-world.de",
250
+ "homepage": "https://github.com/Tobion"
251
+ }
252
+ ],
253
+ "description": "Guzzle promises library",
254
+ "keywords": [
255
+ "promise"
256
+ ],
257
+ "support": {
258
+ "issues": "https://github.com/guzzle/promises/issues",
259
+ "source": "https://github.com/guzzle/promises/tree/1.5.2"
260
+ },
261
+ "funding": [
262
+ {
263
+ "url": "https://github.com/GrahamCampbell",
264
+ "type": "github"
265
+ },
266
+ {
267
+ "url": "https://github.com/Nyholm",
268
+ "type": "github"
269
+ },
270
+ {
271
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
272
+ "type": "tidelift"
273
+ }
274
+ ],
275
+ "install-path": "../guzzlehttp/promises"
276
+ },
277
+ {
278
+ "name": "guzzlehttp/psr7",
279
+ "version": "1.9.0",
280
+ "version_normalized": "1.9.0.0",
281
+ "source": {
282
+ "type": "git",
283
+ "url": "https://github.com/guzzle/psr7.git",
284
+ "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318"
285
+ },
286
+ "dist": {
287
+ "type": "zip",
288
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
289
+ "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
290
+ "shasum": ""
291
+ },
292
+ "require": {
293
+ "php": ">=5.4.0",
294
+ "psr/http-message": "~1.0",
295
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
296
+ },
297
+ "provide": {
298
+ "psr/http-message-implementation": "1.0"
299
+ },
300
+ "require-dev": {
301
+ "ext-zlib": "*",
302
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
303
+ },
304
+ "suggest": {
305
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
306
+ },
307
+ "time": "2022-06-20T21:43:03+00:00",
308
+ "type": "library",
309
+ "extra": {
310
+ "branch-alias": {
311
+ "dev-master": "1.9-dev"
312
+ }
313
+ },
314
+ "installation-source": "dist",
315
+ "autoload": {
316
+ "files": [
317
+ "src/functions_include.php"
318
+ ],
319
+ "psr-4": {
320
+ "GuzzleHttp\\Psr7\\": "src/"
321
+ }
322
+ },
323
+ "notification-url": "https://packagist.org/downloads/",
324
+ "license": [
325
+ "MIT"
326
+ ],
327
+ "authors": [
328
+ {
329
+ "name": "Graham Campbell",
330
+ "email": "hello@gjcampbell.co.uk",
331
+ "homepage": "https://github.com/GrahamCampbell"
332
+ },
333
+ {
334
+ "name": "Michael Dowling",
335
+ "email": "mtdowling@gmail.com",
336
+ "homepage": "https://github.com/mtdowling"
337
+ },
338
+ {
339
+ "name": "George Mponos",
340
+ "email": "gmponos@gmail.com",
341
+ "homepage": "https://github.com/gmponos"
342
+ },
343
+ {
344
+ "name": "Tobias Nyholm",
345
+ "email": "tobias.nyholm@gmail.com",
346
+ "homepage": "https://github.com/Nyholm"
347
+ },
348
+ {
349
+ "name": "Márk Sági-Kazár",
350
+ "email": "mark.sagikazar@gmail.com",
351
+ "homepage": "https://github.com/sagikazarmark"
352
+ },
353
+ {
354
+ "name": "Tobias Schultze",
355
+ "email": "webmaster@tubo-world.de",
356
+ "homepage": "https://github.com/Tobion"
357
+ }
358
+ ],
359
+ "description": "PSR-7 message implementation that also provides common utility methods",
360
+ "keywords": [
361
+ "http",
362
+ "message",
363
+ "psr-7",
364
+ "request",
365
+ "response",
366
+ "stream",
367
+ "uri",
368
+ "url"
369
+ ],
370
+ "support": {
371
+ "issues": "https://github.com/guzzle/psr7/issues",
372
+ "source": "https://github.com/guzzle/psr7/tree/1.9.0"
373
+ },
374
+ "funding": [
375
+ {
376
+ "url": "https://github.com/GrahamCampbell",
377
+ "type": "github"
378
+ },
379
+ {
380
+ "url": "https://github.com/Nyholm",
381
+ "type": "github"
382
+ },
383
+ {
384
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
385
+ "type": "tidelift"
386
+ }
387
+ ],
388
+ "install-path": "../guzzlehttp/psr7"
389
+ },
390
+ {
391
+ "name": "nyholm/psr7",
392
+ "version": "1.5.1",
393
+ "version_normalized": "1.5.1.0",
394
+ "source": {
395
+ "type": "git",
396
+ "url": "https://github.com/Nyholm/psr7.git",
397
+ "reference": "f734364e38a876a23be4d906a2a089e1315be18a"
398
+ },
399
+ "dist": {
400
+ "type": "zip",
401
+ "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a",
402
+ "reference": "f734364e38a876a23be4d906a2a089e1315be18a",
403
+ "shasum": ""
404
+ },
405
+ "require": {
406
+ "php": ">=7.1",
407
+ "php-http/message-factory": "^1.0",
408
+ "psr/http-factory": "^1.0",
409
+ "psr/http-message": "^1.0"
410
+ },
411
+ "provide": {
412
+ "psr/http-factory-implementation": "1.0",
413
+ "psr/http-message-implementation": "1.0"
414
+ },
415
+ "require-dev": {
416
+ "http-interop/http-factory-tests": "^0.9",
417
+ "php-http/psr7-integration-tests": "^1.0",
418
+ "phpunit/phpunit": "^7.5 || 8.5 || 9.4",
419
+ "symfony/error-handler": "^4.4"
420
+ },
421
+ "time": "2022-06-22T07:13:36+00:00",
422
+ "type": "library",
423
+ "extra": {
424
+ "branch-alias": {
425
+ "dev-master": "1.4-dev"
426
+ }
427
+ },
428
+ "installation-source": "dist",
429
+ "autoload": {
430
+ "psr-4": {
431
+ "Nyholm\\Psr7\\": "src/"
432
+ }
433
+ },
434
+ "notification-url": "https://packagist.org/downloads/",
435
+ "license": [
436
+ "MIT"
437
+ ],
438
+ "authors": [
439
+ {
440
+ "name": "Tobias Nyholm",
441
+ "email": "tobias.nyholm@gmail.com"
442
+ },
443
+ {
444
+ "name": "Martijn van der Ven",
445
+ "email": "martijn@vanderven.se"
446
+ }
447
+ ],
448
+ "description": "A fast PHP7 implementation of PSR-7",
449
+ "homepage": "https://tnyholm.se",
450
+ "keywords": [
451
+ "psr-17",
452
+ "psr-7"
453
+ ],
454
+ "support": {
455
+ "issues": "https://github.com/Nyholm/psr7/issues",
456
+ "source": "https://github.com/Nyholm/psr7/tree/1.5.1"
457
+ },
458
+ "funding": [
459
+ {
460
+ "url": "https://github.com/Zegnat",
461
+ "type": "github"
462
+ },
463
+ {
464
+ "url": "https://github.com/nyholm",
465
+ "type": "github"
466
+ }
467
+ ],
468
+ "install-path": "../nyholm/psr7"
469
+ },
470
+ {
471
+ "name": "php-http/client-common",
472
+ "version": "2.6.0",
473
+ "version_normalized": "2.6.0.0",
474
+ "source": {
475
+ "type": "git",
476
+ "url": "https://github.com/php-http/client-common.git",
477
+ "reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0"
478
+ },
479
+ "dist": {
480
+ "type": "zip",
481
+ "url": "https://api.github.com/repos/php-http/client-common/zipball/45db684cd4e186dcdc2b9c06b22970fe123796c0",
482
+ "reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0",
483
+ "shasum": ""
484
+ },
485
+ "require": {
486
+ "php": "^7.1 || ^8.0",
487
+ "php-http/httplug": "^2.0",
488
+ "php-http/message": "^1.6",
489
+ "php-http/message-factory": "^1.0",
490
+ "psr/http-client": "^1.0",
491
+ "psr/http-factory": "^1.0",
492
+ "psr/http-message": "^1.0",
493
+ "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0",
494
+ "symfony/polyfill-php80": "^1.17"
495
+ },
496
+ "require-dev": {
497
+ "doctrine/instantiator": "^1.1",
498
+ "guzzlehttp/psr7": "^1.4",
499
+ "nyholm/psr7": "^1.2",
500
+ "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1",
501
+ "phpspec/prophecy": "^1.10.2",
502
+ "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3"
503
+ },
504
+ "suggest": {
505
+ "ext-json": "To detect JSON responses with the ContentTypePlugin",
506
+ "ext-libxml": "To detect XML responses with the ContentTypePlugin",
507
+ "php-http/cache-plugin": "PSR-6 Cache plugin",
508
+ "php-http/logger-plugin": "PSR-3 Logger plugin",
509
+ "php-http/stopwatch-plugin": "Symfony Stopwatch plugin"
510
+ },
511
+ "time": "2022-09-29T09:59:43+00:00",
512
+ "type": "library",
513
+ "extra": {
514
+ "branch-alias": {
515
+ "dev-master": "2.3.x-dev"
516
+ }
517
+ },
518
+ "installation-source": "dist",
519
+ "autoload": {
520
+ "psr-4": {
521
+ "Http\\Client\\Common\\": "src/"
522
+ }
523
+ },
524
+ "notification-url": "https://packagist.org/downloads/",
525
+ "license": [
526
+ "MIT"
527
+ ],
528
+ "authors": [
529
+ {
530
+ "name": "Márk Sági-Kazár",
531
+ "email": "mark.sagikazar@gmail.com"
532
+ }
533
+ ],
534
+ "description": "Common HTTP Client implementations and tools for HTTPlug",
535
+ "homepage": "http://httplug.io",
536
+ "keywords": [
537
+ "client",
538
+ "common",
539
+ "http",
540
+ "httplug"
541
+ ],
542
+ "support": {
543
+ "issues": "https://github.com/php-http/client-common/issues",
544
+ "source": "https://github.com/php-http/client-common/tree/2.6.0"
545
+ },
546
+ "install-path": "../php-http/client-common"
547
+ },
548
+ {
549
+ "name": "php-http/discovery",
550
+ "version": "1.14.3",
551
+ "version_normalized": "1.14.3.0",
552
+ "source": {
553
+ "type": "git",
554
+ "url": "https://github.com/php-http/discovery.git",
555
+ "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735"
556
+ },
557
+ "dist": {
558
+ "type": "zip",
559
+ "url": "https://api.github.com/repos/php-http/discovery/zipball/31d8ee46d0215108df16a8527c7438e96a4d7735",
560
+ "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735",
561
+ "shasum": ""
562
+ },
563
+ "require": {
564
+ "php": "^7.1 || ^8.0"
565
+ },
566
+ "conflict": {
567
+ "nyholm/psr7": "<1.0"
568
+ },
569
+ "require-dev": {
570
+ "graham-campbell/phpspec-skip-example-extension": "^5.0",
571
+ "php-http/httplug": "^1.0 || ^2.0",
572
+ "php-http/message-factory": "^1.0",
573
+ "phpspec/phpspec": "^5.1 || ^6.1"
574
+ },
575
+ "suggest": {
576
+ "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories"
577
+ },
578
+ "time": "2022-07-11T14:04:40+00:00",
579
+ "type": "library",
580
+ "extra": {
581
+ "branch-alias": {
582
+ "dev-master": "1.9-dev"
583
+ }
584
+ },
585
+ "installation-source": "dist",
586
+ "autoload": {
587
+ "psr-4": {
588
+ "Http\\Discovery\\": "src/"
589
+ }
590
+ },
591
+ "notification-url": "https://packagist.org/downloads/",
592
+ "license": [
593
+ "MIT"
594
+ ],
595
+ "authors": [
596
+ {
597
+ "name": "Márk Sági-Kazár",
598
+ "email": "mark.sagikazar@gmail.com"
599
+ }
600
+ ],
601
+ "description": "Finds installed HTTPlug implementations and PSR-7 message factories",
602
+ "homepage": "http://php-http.org",
603
+ "keywords": [
604
+ "adapter",
605
+ "client",
606
+ "discovery",
607
+ "factory",
608
+ "http",
609
+ "message",
610
+ "psr7"
611
+ ],
612
+ "support": {
613
+ "issues": "https://github.com/php-http/discovery/issues",
614
+ "source": "https://github.com/php-http/discovery/tree/1.14.3"
615
+ },
616
+ "install-path": "../php-http/discovery"
617
+ },
618
+ {
619
+ "name": "php-http/guzzle6-adapter",
620
+ "version": "v2.0.2",
621
+ "version_normalized": "2.0.2.0",
622
+ "source": {
623
+ "type": "git",
624
+ "url": "https://github.com/php-http/guzzle6-adapter.git",
625
+ "reference": "9d1a45eb1c59f12574552e81fb295e9e53430a56"
626
+ },
627
+ "dist": {
628
+ "type": "zip",
629
+ "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/9d1a45eb1c59f12574552e81fb295e9e53430a56",
630
+ "reference": "9d1a45eb1c59f12574552e81fb295e9e53430a56",
631
+ "shasum": ""
632
+ },
633
+ "require": {
634
+ "guzzlehttp/guzzle": "^6.0",
635
+ "php": "^7.1 || ^8.0",
636
+ "php-http/httplug": "^2.0",
637
+ "psr/http-client": "^1.0"
638
+ },
639
+ "provide": {
640
+ "php-http/async-client-implementation": "1.0",
641
+ "php-http/client-implementation": "1.0",
642
+ "psr/http-client-implementation": "1.0"
643
+ },
644
+ "require-dev": {
645
+ "ext-curl": "*",
646
+ "php-http/client-integration-tests": "^2.0 || ^3.0",
647
+ "phpunit/phpunit": "^7.4 || ^8.4"
648
+ },
649
+ "time": "2021-03-02T10:52:33+00:00",
650
+ "type": "library",
651
+ "extra": {
652
+ "branch-alias": {
653
+ "dev-master": "2.x-dev"
654
+ }
655
+ },
656
+ "installation-source": "dist",
657
+ "autoload": {
658
+ "psr-4": {
659
+ "Http\\Adapter\\Guzzle6\\": "src/"
660
+ }
661
+ },
662
+ "notification-url": "https://packagist.org/downloads/",
663
+ "license": [
664
+ "MIT"
665
+ ],
666
+ "authors": [
667
+ {
668
+ "name": "David de Boer",
669
+ "email": "david@ddeboer.nl"
670
+ },
671
+ {
672
+ "name": "Márk Sági-Kazár",
673
+ "email": "mark.sagikazar@gmail.com"
674
+ }
675
+ ],
676
+ "description": "Guzzle 6 HTTP Adapter",
677
+ "homepage": "http://httplug.io",
678
+ "keywords": [
679
+ "Guzzle",
680
+ "http"
681
+ ],
682
+ "support": {
683
+ "issues": "https://github.com/php-http/guzzle6-adapter/issues",
684
+ "source": "https://github.com/php-http/guzzle6-adapter/tree/v2.0.2"
685
+ },
686
+ "install-path": "../php-http/guzzle6-adapter"
687
+ },
688
+ {
689
+ "name": "php-http/httplug",
690
+ "version": "2.3.0",
691
+ "version_normalized": "2.3.0.0",
692
+ "source": {
693
+ "type": "git",
694
+ "url": "https://github.com/php-http/httplug.git",
695
+ "reference": "f640739f80dfa1152533976e3c112477f69274eb"
696
+ },
697
+ "dist": {
698
+ "type": "zip",
699
+ "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb",
700
+ "reference": "f640739f80dfa1152533976e3c112477f69274eb",
701
+ "shasum": ""
702
+ },
703
+ "require": {
704
+ "php": "^7.1 || ^8.0",
705
+ "php-http/promise": "^1.1",
706
+ "psr/http-client": "^1.0",
707
+ "psr/http-message": "^1.0"
708
+ },
709
+ "require-dev": {
710
+ "friends-of-phpspec/phpspec-code-coverage": "^4.1",
711
+ "phpspec/phpspec": "^5.1 || ^6.0"
712
+ },
713
+ "time": "2022-02-21T09:52:22+00:00",
714
+ "type": "library",
715
+ "extra": {
716
+ "branch-alias": {
717
+ "dev-master": "2.x-dev"
718
+ }
719
+ },
720
+ "installation-source": "dist",
721
+ "autoload": {
722
+ "psr-4": {
723
+ "Http\\Client\\": "src/"
724
+ }
725
+ },
726
+ "notification-url": "https://packagist.org/downloads/",
727
+ "license": [
728
+ "MIT"
729
+ ],
730
+ "authors": [
731
+ {
732
+ "name": "Eric GELOEN",
733
+ "email": "geloen.eric@gmail.com"
734
+ },
735
+ {
736
+ "name": "Márk Sági-Kazár",
737
+ "email": "mark.sagikazar@gmail.com",
738
+ "homepage": "https://sagikazarmark.hu"
739
+ }
740
+ ],
741
+ "description": "HTTPlug, the HTTP client abstraction for PHP",
742
+ "homepage": "http://httplug.io",
743
+ "keywords": [
744
+ "client",
745
+ "http"
746
+ ],
747
+ "support": {
748
+ "issues": "https://github.com/php-http/httplug/issues",
749
+ "source": "https://github.com/php-http/httplug/tree/2.3.0"
750
+ },
751
+ "install-path": "../php-http/httplug"
752
+ },
753
+ {
754
+ "name": "php-http/message",
755
+ "version": "1.13.0",
756
+ "version_normalized": "1.13.0.0",
757
+ "source": {
758
+ "type": "git",
759
+ "url": "https://github.com/php-http/message.git",
760
+ "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361"
761
+ },
762
+ "dist": {
763
+ "type": "zip",
764
+ "url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361",
765
+ "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361",
766
+ "shasum": ""
767
+ },
768
+ "require": {
769
+ "clue/stream-filter": "^1.5",
770
+ "php": "^7.1 || ^8.0",
771
+ "php-http/message-factory": "^1.0.2",
772
+ "psr/http-message": "^1.0"
773
+ },
774
+ "provide": {
775
+ "php-http/message-factory-implementation": "1.0"
776
+ },
777
+ "require-dev": {
778
+ "ergebnis/composer-normalize": "^2.6",
779
+ "ext-zlib": "*",
780
+ "guzzlehttp/psr7": "^1.0",
781
+ "laminas/laminas-diactoros": "^2.0",
782
+ "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1",
783
+ "slim/slim": "^3.0"
784
+ },
785
+ "suggest": {
786
+ "ext-zlib": "Used with compressor/decompressor streams",
787
+ "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories",
788
+ "laminas/laminas-diactoros": "Used with Diactoros Factories",
789
+ "slim/slim": "Used with Slim Framework PSR-7 implementation"
790
+ },
791
+ "time": "2022-02-11T13:41:14+00:00",
792
+ "type": "library",
793
+ "extra": {
794
+ "branch-alias": {
795
+ "dev-master": "1.10-dev"
796
+ }
797
+ },
798
+ "installation-source": "dist",
799
+ "autoload": {
800
+ "files": [
801
+ "src/filters.php"
802
+ ],
803
+ "psr-4": {
804
+ "Http\\Message\\": "src/"
805
+ }
806
+ },
807
+ "notification-url": "https://packagist.org/downloads/",
808
+ "license": [
809
+ "MIT"
810
+ ],
811
+ "authors": [
812
+ {
813
+ "name": "Márk Sági-Kazár",
814
+ "email": "mark.sagikazar@gmail.com"
815
+ }
816
+ ],
817
+ "description": "HTTP Message related tools",
818
+ "homepage": "http://php-http.org",
819
+ "keywords": [
820
+ "http",
821
+ "message",
822
+ "psr-7"
823
+ ],
824
+ "support": {
825
+ "issues": "https://github.com/php-http/message/issues",
826
+ "source": "https://github.com/php-http/message/tree/1.13.0"
827
+ },
828
+ "install-path": "../php-http/message"
829
+ },
830
+ {
831
+ "name": "php-http/message-factory",
832
+ "version": "v1.0.2",
833
+ "version_normalized": "1.0.2.0",
834
+ "source": {
835
+ "type": "git",
836
+ "url": "https://github.com/php-http/message-factory.git",
837
+ "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
838
+ },
839
+ "dist": {
840
+ "type": "zip",
841
+ "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
842
+ "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
843
+ "shasum": ""
844
+ },
845
+ "require": {
846
+ "php": ">=5.4",
847
+ "psr/http-message": "^1.0"
848
+ },
849
+ "time": "2015-12-19T14:08:53+00:00",
850
+ "type": "library",
851
+ "extra": {
852
+ "branch-alias": {
853
+ "dev-master": "1.0-dev"
854
+ }
855
+ },
856
+ "installation-source": "dist",
857
+ "autoload": {
858
+ "psr-4": {
859
+ "Http\\Message\\": "src/"
860
+ }
861
+ },
862
+ "notification-url": "https://packagist.org/downloads/",
863
+ "license": [
864
+ "MIT"
865
+ ],
866
+ "authors": [
867
+ {
868
+ "name": "Márk Sági-Kazár",
869
+ "email": "mark.sagikazar@gmail.com"
870
+ }
871
+ ],
872
+ "description": "Factory interfaces for PSR-7 HTTP Message",
873
+ "homepage": "http://php-http.org",
874
+ "keywords": [
875
+ "factory",
876
+ "http",
877
+ "message",
878
+ "stream",
879
+ "uri"
880
+ ],
881
+ "support": {
882
+ "issues": "https://github.com/php-http/message-factory/issues",
883
+ "source": "https://github.com/php-http/message-factory/tree/master"
884
+ },
885
+ "install-path": "../php-http/message-factory"
886
+ },
887
+ {
888
+ "name": "php-http/promise",
889
+ "version": "1.1.0",
890
+ "version_normalized": "1.1.0.0",
891
+ "source": {
892
+ "type": "git",
893
+ "url": "https://github.com/php-http/promise.git",
894
+ "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88"
895
+ },
896
+ "dist": {
897
+ "type": "zip",
898
+ "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88",
899
+ "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88",
900
+ "shasum": ""
901
+ },
902
+ "require": {
903
+ "php": "^7.1 || ^8.0"
904
+ },
905
+ "require-dev": {
906
+ "friends-of-phpspec/phpspec-code-coverage": "^4.3.2",
907
+ "phpspec/phpspec": "^5.1.2 || ^6.2"
908
+ },
909
+ "time": "2020-07-07T09:29:14+00:00",
910
+ "type": "library",
911
+ "extra": {
912
+ "branch-alias": {
913
+ "dev-master": "1.1-dev"
914
+ }
915
+ },
916
+ "installation-source": "dist",
917
+ "autoload": {
918
+ "psr-4": {
919
+ "Http\\Promise\\": "src/"
920
+ }
921
+ },
922
+ "notification-url": "https://packagist.org/downloads/",
923
+ "license": [
924
+ "MIT"
925
+ ],
926
+ "authors": [
927
+ {
928
+ "name": "Joel Wurtz",
929
+ "email": "joel.wurtz@gmail.com"
930
+ },
931
+ {
932
+ "name": "Márk Sági-Kazár",
933
+ "email": "mark.sagikazar@gmail.com"
934
+ }
935
+ ],
936
+ "description": "Promise used for asynchronous HTTP requests",
937
+ "homepage": "http://httplug.io",
938
+ "keywords": [
939
+ "promise"
940
+ ],
941
+ "support": {
942
+ "issues": "https://github.com/php-http/promise/issues",
943
+ "source": "https://github.com/php-http/promise/tree/1.1.0"
944
+ },
945
+ "install-path": "../php-http/promise"
946
+ },
947
+ {
948
+ "name": "psr/http-client",
949
+ "version": "1.0.1",
950
+ "version_normalized": "1.0.1.0",
951
+ "source": {
952
+ "type": "git",
953
+ "url": "https://github.com/php-fig/http-client.git",
954
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
955
+ },
956
+ "dist": {
957
+ "type": "zip",
958
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
959
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
960
+ "shasum": ""
961
+ },
962
+ "require": {
963
+ "php": "^7.0 || ^8.0",
964
+ "psr/http-message": "^1.0"
965
+ },
966
+ "time": "2020-06-29T06:28:15+00:00",
967
+ "type": "library",
968
+ "extra": {
969
+ "branch-alias": {
970
+ "dev-master": "1.0.x-dev"
971
+ }
972
+ },
973
+ "installation-source": "dist",
974
+ "autoload": {
975
+ "psr-4": {
976
+ "Psr\\Http\\Client\\": "src/"
977
+ }
978
+ },
979
+ "notification-url": "https://packagist.org/downloads/",
980
+ "license": [
981
+ "MIT"
982
+ ],
983
+ "authors": [
984
+ {
985
+ "name": "PHP-FIG",
986
+ "homepage": "http://www.php-fig.org/"
987
+ }
988
+ ],
989
+ "description": "Common interface for HTTP clients",
990
+ "homepage": "https://github.com/php-fig/http-client",
991
+ "keywords": [
992
+ "http",
993
+ "http-client",
994
+ "psr",
995
+ "psr-18"
996
+ ],
997
+ "support": {
998
+ "source": "https://github.com/php-fig/http-client/tree/master"
999
+ },
1000
+ "install-path": "../psr/http-client"
1001
+ },
1002
+ {
1003
+ "name": "psr/http-factory",
1004
+ "version": "1.0.1",
1005
+ "version_normalized": "1.0.1.0",
1006
+ "source": {
1007
+ "type": "git",
1008
+ "url": "https://github.com/php-fig/http-factory.git",
1009
+ "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
1010
+ },
1011
+ "dist": {
1012
+ "type": "zip",
1013
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
1014
+ "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
1015
+ "shasum": ""
1016
+ },
1017
+ "require": {
1018
+ "php": ">=7.0.0",
1019
+ "psr/http-message": "^1.0"
1020
+ },
1021
+ "time": "2019-04-30T12:38:16+00:00",
1022
+ "type": "library",
1023
+ "extra": {
1024
+ "branch-alias": {
1025
+ "dev-master": "1.0.x-dev"
1026
+ }
1027
+ },
1028
+ "installation-source": "dist",
1029
+ "autoload": {
1030
+ "psr-4": {
1031
+ "Psr\\Http\\Message\\": "src/"
1032
+ }
1033
+ },
1034
+ "notification-url": "https://packagist.org/downloads/",
1035
+ "license": [
1036
+ "MIT"
1037
+ ],
1038
+ "authors": [
1039
+ {
1040
+ "name": "PHP-FIG",
1041
+ "homepage": "http://www.php-fig.org/"
1042
+ }
1043
+ ],
1044
+ "description": "Common interfaces for PSR-7 HTTP message factories",
1045
+ "keywords": [
1046
+ "factory",
1047
+ "http",
1048
+ "message",
1049
+ "psr",
1050
+ "psr-17",
1051
+ "psr-7",
1052
+ "request",
1053
+ "response"
1054
+ ],
1055
+ "support": {
1056
+ "source": "https://github.com/php-fig/http-factory/tree/master"
1057
+ },
1058
+ "install-path": "../psr/http-factory"
1059
+ },
1060
+ {
1061
+ "name": "psr/http-message",
1062
+ "version": "1.0.1",
1063
+ "version_normalized": "1.0.1.0",
1064
+ "source": {
1065
+ "type": "git",
1066
+ "url": "https://github.com/php-fig/http-message.git",
1067
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
1068
+ },
1069
+ "dist": {
1070
+ "type": "zip",
1071
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
1072
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
1073
+ "shasum": ""
1074
+ },
1075
+ "require": {
1076
+ "php": ">=5.3.0"
1077
+ },
1078
+ "time": "2016-08-06T14:39:51+00:00",
1079
+ "type": "library",
1080
+ "extra": {
1081
+ "branch-alias": {
1082
+ "dev-master": "1.0.x-dev"
1083
+ }
1084
+ },
1085
+ "installation-source": "dist",
1086
+ "autoload": {
1087
+ "psr-4": {
1088
+ "Psr\\Http\\Message\\": "src/"
1089
+ }
1090
+ },
1091
+ "notification-url": "https://packagist.org/downloads/",
1092
+ "license": [
1093
+ "MIT"
1094
+ ],
1095
+ "authors": [
1096
+ {
1097
+ "name": "PHP-FIG",
1098
+ "homepage": "http://www.php-fig.org/"
1099
+ }
1100
+ ],
1101
+ "description": "Common interface for HTTP messages",
1102
+ "homepage": "https://github.com/php-fig/http-message",
1103
+ "keywords": [
1104
+ "http",
1105
+ "http-message",
1106
+ "psr",
1107
+ "psr-7",
1108
+ "request",
1109
+ "response"
1110
+ ],
1111
+ "support": {
1112
+ "source": "https://github.com/php-fig/http-message/tree/master"
1113
+ },
1114
+ "install-path": "../psr/http-message"
1115
+ },
1116
+ {
1117
+ "name": "ralouphie/getallheaders",
1118
+ "version": "3.0.3",
1119
+ "version_normalized": "3.0.3.0",
1120
+ "source": {
1121
+ "type": "git",
1122
+ "url": "https://github.com/ralouphie/getallheaders.git",
1123
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
1124
+ },
1125
+ "dist": {
1126
+ "type": "zip",
1127
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
1128
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
1129
+ "shasum": ""
1130
+ },
1131
+ "require": {
1132
+ "php": ">=5.6"
1133
+ },
1134
+ "require-dev": {
1135
+ "php-coveralls/php-coveralls": "^2.1",
1136
+ "phpunit/phpunit": "^5 || ^6.5"
1137
+ },
1138
+ "time": "2019-03-08T08:55:37+00:00",
1139
+ "type": "library",
1140
+ "installation-source": "dist",
1141
+ "autoload": {
1142
+ "files": [
1143
+ "src/getallheaders.php"
1144
+ ]
1145
+ },
1146
+ "notification-url": "https://packagist.org/downloads/",
1147
+ "license": [
1148
+ "MIT"
1149
+ ],
1150
+ "authors": [
1151
+ {
1152
+ "name": "Ralph Khattar",
1153
+ "email": "ralph.khattar@gmail.com"
1154
+ }
1155
+ ],
1156
+ "description": "A polyfill for getallheaders.",
1157
+ "support": {
1158
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
1159
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
1160
+ },
1161
+ "install-path": "../ralouphie/getallheaders"
1162
+ },
1163
+ {
1164
+ "name": "symfony/deprecation-contracts",
1165
+ "version": "v2.5.2",
1166
+ "version_normalized": "2.5.2.0",
1167
+ "source": {
1168
+ "type": "git",
1169
+ "url": "https://github.com/symfony/deprecation-contracts.git",
1170
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
1171
+ },
1172
+ "dist": {
1173
+ "type": "zip",
1174
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
1175
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
1176
+ "shasum": ""
1177
+ },
1178
+ "require": {
1179
+ "php": ">=7.1"
1180
+ },
1181
+ "time": "2022-01-02T09:53:40+00:00",
1182
+ "type": "library",
1183
+ "extra": {
1184
+ "branch-alias": {
1185
+ "dev-main": "2.5-dev"
1186
+ },
1187
+ "thanks": {
1188
+ "name": "symfony/contracts",
1189
+ "url": "https://github.com/symfony/contracts"
1190
+ }
1191
+ },
1192
+ "installation-source": "dist",
1193
+ "autoload": {
1194
+ "files": [
1195
+ "function.php"
1196
+ ]
1197
+ },
1198
+ "notification-url": "https://packagist.org/downloads/",
1199
+ "license": [
1200
+ "MIT"
1201
+ ],
1202
+ "authors": [
1203
+ {
1204
+ "name": "Nicolas Grekas",
1205
+ "email": "p@tchwork.com"
1206
+ },
1207
+ {
1208
+ "name": "Symfony Community",
1209
+ "homepage": "https://symfony.com/contributors"
1210
+ }
1211
+ ],
1212
+ "description": "A generic function and convention to trigger deprecation notices",
1213
+ "homepage": "https://symfony.com",
1214
+ "support": {
1215
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
1216
+ },
1217
+ "funding": [
1218
+ {
1219
+ "url": "https://symfony.com/sponsor",
1220
+ "type": "custom"
1221
+ },
1222
+ {
1223
+ "url": "https://github.com/fabpot",
1224
+ "type": "github"
1225
+ },
1226
+ {
1227
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1228
+ "type": "tidelift"
1229
+ }
1230
+ ],
1231
+ "install-path": "../symfony/deprecation-contracts"
1232
+ },
1233
+ {
1234
+ "name": "symfony/options-resolver",
1235
+ "version": "v5.4.11",
1236
+ "version_normalized": "5.4.11.0",
1237
+ "source": {
1238
+ "type": "git",
1239
+ "url": "https://github.com/symfony/options-resolver.git",
1240
+ "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690"
1241
+ },
1242
+ "dist": {
1243
+ "type": "zip",
1244
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690",
1245
+ "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690",
1246
+ "shasum": ""
1247
+ },
1248
+ "require": {
1249
+ "php": ">=7.2.5",
1250
+ "symfony/deprecation-contracts": "^2.1|^3",
1251
+ "symfony/polyfill-php73": "~1.0",
1252
+ "symfony/polyfill-php80": "^1.16"
1253
+ },
1254
+ "time": "2022-07-20T13:00:38+00:00",
1255
+ "type": "library",
1256
+ "installation-source": "dist",
1257
+ "autoload": {
1258
+ "psr-4": {
1259
+ "Symfony\\Component\\OptionsResolver\\": ""
1260
+ },
1261
+ "exclude-from-classmap": [
1262
+ "/Tests/"
1263
+ ]
1264
+ },
1265
+ "notification-url": "https://packagist.org/downloads/",
1266
+ "license": [
1267
+ "MIT"
1268
+ ],
1269
+ "authors": [
1270
+ {
1271
+ "name": "Fabien Potencier",
1272
+ "email": "fabien@symfony.com"
1273
+ },
1274
+ {
1275
+ "name": "Symfony Community",
1276
+ "homepage": "https://symfony.com/contributors"
1277
+ }
1278
+ ],
1279
+ "description": "Provides an improved replacement for the array_replace PHP function",
1280
+ "homepage": "https://symfony.com",
1281
+ "keywords": [
1282
+ "config",
1283
+ "configuration",
1284
+ "options"
1285
+ ],
1286
+ "support": {
1287
+ "source": "https://github.com/symfony/options-resolver/tree/v5.4.11"
1288
+ },
1289
+ "funding": [
1290
+ {
1291
+ "url": "https://symfony.com/sponsor",
1292
+ "type": "custom"
1293
+ },
1294
+ {
1295
+ "url": "https://github.com/fabpot",
1296
+ "type": "github"
1297
+ },
1298
+ {
1299
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1300
+ "type": "tidelift"
1301
+ }
1302
+ ],
1303
+ "install-path": "../symfony/options-resolver"
1304
+ },
1305
+ {
1306
+ "name": "symfony/polyfill-intl-idn",
1307
+ "version": "v1.26.0",
1308
+ "version_normalized": "1.26.0.0",
1309
+ "source": {
1310
+ "type": "git",
1311
+ "url": "https://github.com/symfony/polyfill-intl-idn.git",
1312
+ "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8"
1313
+ },
1314
+ "dist": {
1315
+ "type": "zip",
1316
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8",
1317
+ "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8",
1318
+ "shasum": ""
1319
+ },
1320
+ "require": {
1321
+ "php": ">=7.1",
1322
+ "symfony/polyfill-intl-normalizer": "^1.10",
1323
+ "symfony/polyfill-php72": "^1.10"
1324
+ },
1325
+ "suggest": {
1326
+ "ext-intl": "For best performance"
1327
+ },
1328
+ "time": "2022-05-24T11:49:31+00:00",
1329
+ "type": "library",
1330
+ "extra": {
1331
+ "branch-alias": {
1332
+ "dev-main": "1.26-dev"
1333
+ },
1334
+ "thanks": {
1335
+ "name": "symfony/polyfill",
1336
+ "url": "https://github.com/symfony/polyfill"
1337
+ }
1338
+ },
1339
+ "installation-source": "dist",
1340
+ "autoload": {
1341
+ "files": [
1342
+ "bootstrap.php"
1343
+ ],
1344
+ "psr-4": {
1345
+ "Symfony\\Polyfill\\Intl\\Idn\\": ""
1346
+ }
1347
+ },
1348
+ "notification-url": "https://packagist.org/downloads/",
1349
+ "license": [
1350
+ "MIT"
1351
+ ],
1352
+ "authors": [
1353
+ {
1354
+ "name": "Laurent Bassin",
1355
+ "email": "laurent@bassin.info"
1356
+ },
1357
+ {
1358
+ "name": "Trevor Rowbotham",
1359
+ "email": "trevor.rowbotham@pm.me"
1360
+ },
1361
+ {
1362
+ "name": "Symfony Community",
1363
+ "homepage": "https://symfony.com/contributors"
1364
+ }
1365
+ ],
1366
+ "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
1367
+ "homepage": "https://symfony.com",
1368
+ "keywords": [
1369
+ "compatibility",
1370
+ "idn",
1371
+ "intl",
1372
+ "polyfill",
1373
+ "portable",
1374
+ "shim"
1375
+ ],
1376
+ "support": {
1377
+ "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0"
1378
+ },
1379
+ "funding": [
1380
+ {
1381
+ "url": "https://symfony.com/sponsor",
1382
+ "type": "custom"
1383
+ },
1384
+ {
1385
+ "url": "https://github.com/fabpot",
1386
+ "type": "github"
1387
+ },
1388
+ {
1389
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1390
+ "type": "tidelift"
1391
+ }
1392
+ ],
1393
+ "install-path": "../symfony/polyfill-intl-idn"
1394
+ },
1395
+ {
1396
+ "name": "symfony/polyfill-intl-normalizer",
1397
+ "version": "v1.26.0",
1398
+ "version_normalized": "1.26.0.0",
1399
+ "source": {
1400
+ "type": "git",
1401
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
1402
+ "reference": "219aa369ceff116e673852dce47c3a41794c14bd"
1403
+ },
1404
+ "dist": {
1405
+ "type": "zip",
1406
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd",
1407
+ "reference": "219aa369ceff116e673852dce47c3a41794c14bd",
1408
+ "shasum": ""
1409
+ },
1410
+ "require": {
1411
+ "php": ">=7.1"
1412
+ },
1413
+ "suggest": {
1414
+ "ext-intl": "For best performance"
1415
+ },
1416
+ "time": "2022-05-24T11:49:31+00:00",
1417
+ "type": "library",
1418
+ "extra": {
1419
+ "branch-alias": {
1420
+ "dev-main": "1.26-dev"
1421
+ },
1422
+ "thanks": {
1423
+ "name": "symfony/polyfill",
1424
+ "url": "https://github.com/symfony/polyfill"
1425
+ }
1426
+ },
1427
+ "installation-source": "dist",
1428
+ "autoload": {
1429
+ "files": [
1430
+ "bootstrap.php"
1431
+ ],
1432
+ "psr-4": {
1433
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
1434
+ },
1435
+ "classmap": [
1436
+ "Resources/stubs"
1437
+ ]
1438
+ },
1439
+ "notification-url": "https://packagist.org/downloads/",
1440
+ "license": [
1441
+ "MIT"
1442
+ ],
1443
+ "authors": [
1444
+ {
1445
+ "name": "Nicolas Grekas",
1446
+ "email": "p@tchwork.com"
1447
+ },
1448
+ {
1449
+ "name": "Symfony Community",
1450
+ "homepage": "https://symfony.com/contributors"
1451
+ }
1452
+ ],
1453
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
1454
+ "homepage": "https://symfony.com",
1455
+ "keywords": [
1456
+ "compatibility",
1457
+ "intl",
1458
+ "normalizer",
1459
+ "polyfill",
1460
+ "portable",
1461
+ "shim"
1462
+ ],
1463
+ "support": {
1464
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0"
1465
+ },
1466
+ "funding": [
1467
+ {
1468
+ "url": "https://symfony.com/sponsor",
1469
+ "type": "custom"
1470
+ },
1471
+ {
1472
+ "url": "https://github.com/fabpot",
1473
+ "type": "github"
1474
+ },
1475
+ {
1476
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1477
+ "type": "tidelift"
1478
+ }
1479
+ ],
1480
+ "install-path": "../symfony/polyfill-intl-normalizer"
1481
+ },
1482
+ {
1483
+ "name": "symfony/polyfill-php72",
1484
+ "version": "v1.26.0",
1485
+ "version_normalized": "1.26.0.0",
1486
+ "source": {
1487
+ "type": "git",
1488
+ "url": "https://github.com/symfony/polyfill-php72.git",
1489
+ "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
1490
+ },
1491
+ "dist": {
1492
+ "type": "zip",
1493
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
1494
+ "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
1495
+ "shasum": ""
1496
+ },
1497
+ "require": {
1498
+ "php": ">=7.1"
1499
+ },
1500
+ "time": "2022-05-24T11:49:31+00:00",
1501
+ "type": "library",
1502
+ "extra": {
1503
+ "branch-alias": {
1504
+ "dev-main": "1.26-dev"
1505
+ },
1506
+ "thanks": {
1507
+ "name": "symfony/polyfill",
1508
+ "url": "https://github.com/symfony/polyfill"
1509
+ }
1510
+ },
1511
+ "installation-source": "dist",
1512
+ "autoload": {
1513
+ "files": [
1514
+ "bootstrap.php"
1515
+ ],
1516
+ "psr-4": {
1517
+ "Symfony\\Polyfill\\Php72\\": ""
1518
+ }
1519
+ },
1520
+ "notification-url": "https://packagist.org/downloads/",
1521
+ "license": [
1522
+ "MIT"
1523
+ ],
1524
+ "authors": [
1525
+ {
1526
+ "name": "Nicolas Grekas",
1527
+ "email": "p@tchwork.com"
1528
+ },
1529
+ {
1530
+ "name": "Symfony Community",
1531
+ "homepage": "https://symfony.com/contributors"
1532
+ }
1533
+ ],
1534
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
1535
+ "homepage": "https://symfony.com",
1536
+ "keywords": [
1537
+ "compatibility",
1538
+ "polyfill",
1539
+ "portable",
1540
+ "shim"
1541
+ ],
1542
+ "support": {
1543
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
1544
+ },
1545
+ "funding": [
1546
+ {
1547
+ "url": "https://symfony.com/sponsor",
1548
+ "type": "custom"
1549
+ },
1550
+ {
1551
+ "url": "https://github.com/fabpot",
1552
+ "type": "github"
1553
+ },
1554
+ {
1555
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1556
+ "type": "tidelift"
1557
+ }
1558
+ ],
1559
+ "install-path": "../symfony/polyfill-php72"
1560
+ },
1561
+ {
1562
+ "name": "symfony/polyfill-php73",
1563
+ "version": "v1.26.0",
1564
+ "version_normalized": "1.26.0.0",
1565
+ "source": {
1566
+ "type": "git",
1567
+ "url": "https://github.com/symfony/polyfill-php73.git",
1568
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
1569
+ },
1570
+ "dist": {
1571
+ "type": "zip",
1572
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
1573
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
1574
+ "shasum": ""
1575
+ },
1576
+ "require": {
1577
+ "php": ">=7.1"
1578
+ },
1579
+ "time": "2022-05-24T11:49:31+00:00",
1580
+ "type": "library",
1581
+ "extra": {
1582
+ "branch-alias": {
1583
+ "dev-main": "1.26-dev"
1584
+ },
1585
+ "thanks": {
1586
+ "name": "symfony/polyfill",
1587
+ "url": "https://github.com/symfony/polyfill"
1588
+ }
1589
+ },
1590
+ "installation-source": "dist",
1591
+ "autoload": {
1592
+ "files": [
1593
+ "bootstrap.php"
1594
+ ],
1595
+ "psr-4": {
1596
+ "Symfony\\Polyfill\\Php73\\": ""
1597
+ },
1598
+ "classmap": [
1599
+ "Resources/stubs"
1600
+ ]
1601
+ },
1602
+ "notification-url": "https://packagist.org/downloads/",
1603
+ "license": [
1604
+ "MIT"
1605
+ ],
1606
+ "authors": [
1607
+ {
1608
+ "name": "Nicolas Grekas",
1609
+ "email": "p@tchwork.com"
1610
+ },
1611
+ {
1612
+ "name": "Symfony Community",
1613
+ "homepage": "https://symfony.com/contributors"
1614
+ }
1615
+ ],
1616
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
1617
+ "homepage": "https://symfony.com",
1618
+ "keywords": [
1619
+ "compatibility",
1620
+ "polyfill",
1621
+ "portable",
1622
+ "shim"
1623
+ ],
1624
+ "support": {
1625
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
1626
+ },
1627
+ "funding": [
1628
+ {
1629
+ "url": "https://symfony.com/sponsor",
1630
+ "type": "custom"
1631
+ },
1632
+ {
1633
+ "url": "https://github.com/fabpot",
1634
+ "type": "github"
1635
+ },
1636
+ {
1637
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1638
+ "type": "tidelift"
1639
+ }
1640
+ ],
1641
+ "install-path": "../symfony/polyfill-php73"
1642
+ },
1643
+ {
1644
+ "name": "symfony/polyfill-php80",
1645
+ "version": "v1.26.0",
1646
+ "version_normalized": "1.26.0.0",
1647
+ "source": {
1648
+ "type": "git",
1649
+ "url": "https://github.com/symfony/polyfill-php80.git",
1650
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
1651
+ },
1652
+ "dist": {
1653
+ "type": "zip",
1654
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
1655
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
1656
+ "shasum": ""
1657
+ },
1658
+ "require": {
1659
+ "php": ">=7.1"
1660
+ },
1661
+ "time": "2022-05-10T07:21:04+00:00",
1662
+ "type": "library",
1663
+ "extra": {
1664
+ "branch-alias": {
1665
+ "dev-main": "1.26-dev"
1666
+ },
1667
+ "thanks": {
1668
+ "name": "symfony/polyfill",
1669
+ "url": "https://github.com/symfony/polyfill"
1670
+ }
1671
+ },
1672
+ "installation-source": "dist",
1673
+ "autoload": {
1674
+ "files": [
1675
+ "bootstrap.php"
1676
+ ],
1677
+ "psr-4": {
1678
+ "Symfony\\Polyfill\\Php80\\": ""
1679
+ },
1680
+ "classmap": [
1681
+ "Resources/stubs"
1682
+ ]
1683
+ },
1684
+ "notification-url": "https://packagist.org/downloads/",
1685
+ "license": [
1686
+ "MIT"
1687
+ ],
1688
+ "authors": [
1689
+ {
1690
+ "name": "Ion Bazan",
1691
+ "email": "ion.bazan@gmail.com"
1692
+ },
1693
+ {
1694
+ "name": "Nicolas Grekas",
1695
+ "email": "p@tchwork.com"
1696
+ },
1697
+ {
1698
+ "name": "Symfony Community",
1699
+ "homepage": "https://symfony.com/contributors"
1700
+ }
1701
+ ],
1702
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
1703
+ "homepage": "https://symfony.com",
1704
+ "keywords": [
1705
+ "compatibility",
1706
+ "polyfill",
1707
+ "portable",
1708
+ "shim"
1709
+ ],
1710
+ "support": {
1711
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
1712
+ },
1713
+ "funding": [
1714
+ {
1715
+ "url": "https://symfony.com/sponsor",
1716
+ "type": "custom"
1717
+ },
1718
+ {
1719
+ "url": "https://github.com/fabpot",
1720
+ "type": "github"
1721
+ },
1722
+ {
1723
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1724
+ "type": "tidelift"
1725
+ }
1726
+ ],
1727
+ "install-path": "../symfony/polyfill-php80"
1728
+ }
1729
+ ],
1730
+ "dev": false,
1731
+ "dev-package-names": []
1732
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/installed.php ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array(
2
+ 'root' => array(
3
+ 'pretty_version' => 'dev-master',
4
+ 'version' => 'dev-master',
5
+ 'type' => 'library',
6
+ 'install_path' => __DIR__ . '/../../',
7
+ 'aliases' => array(),
8
+ 'reference' => '854940d3caab64f0889888d4af877caaccb1208b',
9
+ 'name' => 'mailerlite/mailerlite-api-v2-php-sdk',
10
+ 'dev' => false,
11
+ ),
12
+ 'versions' => array(
13
+ 'clue/stream-filter' => array(
14
+ 'pretty_version' => 'v1.6.0',
15
+ 'version' => '1.6.0.0',
16
+ 'type' => 'library',
17
+ 'install_path' => __DIR__ . '/../clue/stream-filter',
18
+ 'aliases' => array(),
19
+ 'reference' => 'd6169430c7731d8509da7aecd0af756a5747b78e',
20
+ 'dev_requirement' => false,
21
+ ),
22
+ 'guzzlehttp/guzzle' => array(
23
+ 'pretty_version' => '6.5.8',
24
+ 'version' => '6.5.8.0',
25
+ 'type' => 'library',
26
+ 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
27
+ 'aliases' => array(),
28
+ 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981',
29
+ 'dev_requirement' => false,
30
+ ),
31
+ 'guzzlehttp/promises' => array(
32
+ 'pretty_version' => '1.5.2',
33
+ 'version' => '1.5.2.0',
34
+ 'type' => 'library',
35
+ 'install_path' => __DIR__ . '/../guzzlehttp/promises',
36
+ 'aliases' => array(),
37
+ 'reference' => 'b94b2807d85443f9719887892882d0329d1e2598',
38
+ 'dev_requirement' => false,
39
+ ),
40
+ 'guzzlehttp/psr7' => array(
41
+ 'pretty_version' => '1.9.0',
42
+ 'version' => '1.9.0.0',
43
+ 'type' => 'library',
44
+ 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
45
+ 'aliases' => array(),
46
+ 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318',
47
+ 'dev_requirement' => false,
48
+ ),
49
+ 'mailerlite/mailerlite-api-v2-php-sdk' => array(
50
+ 'pretty_version' => 'dev-master',
51
+ 'version' => 'dev-master',
52
+ 'type' => 'library',
53
+ 'install_path' => __DIR__ . '/../../',
54
+ 'aliases' => array(),
55
+ 'reference' => '854940d3caab64f0889888d4af877caaccb1208b',
56
+ 'dev_requirement' => false,
57
+ ),
58
+ 'nyholm/psr7' => array(
59
+ 'pretty_version' => '1.5.1',
60
+ 'version' => '1.5.1.0',
61
+ 'type' => 'library',
62
+ 'install_path' => __DIR__ . '/../nyholm/psr7',
63
+ 'aliases' => array(),
64
+ 'reference' => 'f734364e38a876a23be4d906a2a089e1315be18a',
65
+ 'dev_requirement' => false,
66
+ ),
67
+ 'php-http/async-client-implementation' => array(
68
+ 'dev_requirement' => false,
69
+ 'provided' => array(
70
+ 0 => '1.0',
71
+ ),
72
+ ),
73
+ 'php-http/client-common' => array(
74
+ 'pretty_version' => '2.6.0',
75
+ 'version' => '2.6.0.0',
76
+ 'type' => 'library',
77
+ 'install_path' => __DIR__ . '/../php-http/client-common',
78
+ 'aliases' => array(),
79
+ 'reference' => '45db684cd4e186dcdc2b9c06b22970fe123796c0',
80
+ 'dev_requirement' => false,
81
+ ),
82
+ 'php-http/client-implementation' => array(
83
+ 'dev_requirement' => false,
84
+ 'provided' => array(
85
+ 0 => '1.0',
86
+ ),
87
+ ),
88
+ 'php-http/discovery' => array(
89
+ 'pretty_version' => '1.14.3',
90
+ 'version' => '1.14.3.0',
91
+ 'type' => 'library',
92
+ 'install_path' => __DIR__ . '/../php-http/discovery',
93
+ 'aliases' => array(),
94
+ 'reference' => '31d8ee46d0215108df16a8527c7438e96a4d7735',
95
+ 'dev_requirement' => false,
96
+ ),
97
+ 'php-http/guzzle6-adapter' => array(
98
+ 'pretty_version' => 'v2.0.2',
99
+ 'version' => '2.0.2.0',
100
+ 'type' => 'library',
101
+ 'install_path' => __DIR__ . '/../php-http/guzzle6-adapter',
102
+ 'aliases' => array(),
103
+ 'reference' => '9d1a45eb1c59f12574552e81fb295e9e53430a56',
104
+ 'dev_requirement' => false,
105
+ ),
106
+ 'php-http/httplug' => array(
107
+ 'pretty_version' => '2.3.0',
108
+ 'version' => '2.3.0.0',
109
+ 'type' => 'library',
110
+ 'install_path' => __DIR__ . '/../php-http/httplug',
111
+ 'aliases' => array(),
112
+ 'reference' => 'f640739f80dfa1152533976e3c112477f69274eb',
113
+ 'dev_requirement' => false,
114
+ ),
115
+ 'php-http/message' => array(
116
+ 'pretty_version' => '1.13.0',
117
+ 'version' => '1.13.0.0',
118
+ 'type' => 'library',
119
+ 'install_path' => __DIR__ . '/../php-http/message',
120
+ 'aliases' => array(),
121
+ 'reference' => '7886e647a30a966a1a8d1dad1845b71ca8678361',
122
+ 'dev_requirement' => false,
123
+ ),
124
+ 'php-http/message-factory' => array(
125
+ 'pretty_version' => 'v1.0.2',
126
+ 'version' => '1.0.2.0',
127
+ 'type' => 'library',
128
+ 'install_path' => __DIR__ . '/../php-http/message-factory',
129
+ 'aliases' => array(),
130
+ 'reference' => 'a478cb11f66a6ac48d8954216cfed9aa06a501a1',
131
+ 'dev_requirement' => false,
132
+ ),
133
+ 'php-http/message-factory-implementation' => array(
134
+ 'dev_requirement' => false,
135
+ 'provided' => array(
136
+ 0 => '1.0',
137
+ ),
138
+ ),
139
+ 'php-http/promise' => array(
140
+ 'pretty_version' => '1.1.0',
141
+ 'version' => '1.1.0.0',
142
+ 'type' => 'library',
143
+ 'install_path' => __DIR__ . '/../php-http/promise',
144
+ 'aliases' => array(),
145
+ 'reference' => '4c4c1f9b7289a2ec57cde7f1e9762a5789506f88',
146
+ 'dev_requirement' => false,
147
+ ),
148
+ 'psr/http-client' => array(
149
+ 'pretty_version' => '1.0.1',
150
+ 'version' => '1.0.1.0',
151
+ 'type' => 'library',
152
+ 'install_path' => __DIR__ . '/../psr/http-client',
153
+ 'aliases' => array(),
154
+ 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
155
+ 'dev_requirement' => false,
156
+ ),
157
+ 'psr/http-client-implementation' => array(
158
+ 'dev_requirement' => false,
159
+ 'provided' => array(
160
+ 0 => '1.0',
161
+ ),
162
+ ),
163
+ 'psr/http-factory' => array(
164
+ 'pretty_version' => '1.0.1',
165
+ 'version' => '1.0.1.0',
166
+ 'type' => 'library',
167
+ 'install_path' => __DIR__ . '/../psr/http-factory',
168
+ 'aliases' => array(),
169
+ 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
170
+ 'dev_requirement' => false,
171
+ ),
172
+ 'psr/http-factory-implementation' => array(
173
+ 'dev_requirement' => false,
174
+ 'provided' => array(
175
+ 0 => '1.0',
176
+ ),
177
+ ),
178
+ 'psr/http-message' => array(
179
+ 'pretty_version' => '1.0.1',
180
+ 'version' => '1.0.1.0',
181
+ 'type' => 'library',
182
+ 'install_path' => __DIR__ . '/../psr/http-message',
183
+ 'aliases' => array(),
184
+ 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
185
+ 'dev_requirement' => false,
186
+ ),
187
+ 'psr/http-message-implementation' => array(
188
+ 'dev_requirement' => false,
189
+ 'provided' => array(
190
+ 0 => '1.0',
191
+ ),
192
+ ),
193
+ 'ralouphie/getallheaders' => array(
194
+ 'pretty_version' => '3.0.3',
195
+ 'version' => '3.0.3.0',
196
+ 'type' => 'library',
197
+ 'install_path' => __DIR__ . '/../ralouphie/getallheaders',
198
+ 'aliases' => array(),
199
+ 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
200
+ 'dev_requirement' => false,
201
+ ),
202
+ 'symfony/deprecation-contracts' => array(
203
+ 'pretty_version' => 'v2.5.2',
204
+ 'version' => '2.5.2.0',
205
+ 'type' => 'library',
206
+ 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
207
+ 'aliases' => array(),
208
+ 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
209
+ 'dev_requirement' => false,
210
+ ),
211
+ 'symfony/options-resolver' => array(
212
+ 'pretty_version' => 'v5.4.11',
213
+ 'version' => '5.4.11.0',
214
+ 'type' => 'library',
215
+ 'install_path' => __DIR__ . '/../symfony/options-resolver',
216
+ 'aliases' => array(),
217
+ 'reference' => '54f14e36aa73cb8f7261d7686691fd4d75ea2690',
218
+ 'dev_requirement' => false,
219
+ ),
220
+ 'symfony/polyfill-intl-idn' => array(
221
+ 'pretty_version' => 'v1.26.0',
222
+ 'version' => '1.26.0.0',
223
+ 'type' => 'library',
224
+ 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
225
+ 'aliases' => array(),
226
+ 'reference' => '59a8d271f00dd0e4c2e518104cc7963f655a1aa8',
227
+ 'dev_requirement' => false,
228
+ ),
229
+ 'symfony/polyfill-intl-normalizer' => array(
230
+ 'pretty_version' => 'v1.26.0',
231
+ 'version' => '1.26.0.0',
232
+ 'type' => 'library',
233
+ 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
234
+ 'aliases' => array(),
235
+ 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd',
236
+ 'dev_requirement' => false,
237
+ ),
238
+ 'symfony/polyfill-php72' => array(
239
+ 'pretty_version' => 'v1.26.0',
240
+ 'version' => '1.26.0.0',
241
+ 'type' => 'library',
242
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php72',
243
+ 'aliases' => array(),
244
+ 'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2',
245
+ 'dev_requirement' => false,
246
+ ),
247
+ 'symfony/polyfill-php73' => array(
248
+ 'pretty_version' => 'v1.26.0',
249
+ 'version' => '1.26.0.0',
250
+ 'type' => 'library',
251
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php73',
252
+ 'aliases' => array(),
253
+ 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85',
254
+ 'dev_requirement' => false,
255
+ ),
256
+ 'symfony/polyfill-php80' => array(
257
+ 'pretty_version' => 'v1.26.0',
258
+ 'version' => '1.26.0.0',
259
+ 'type' => 'library',
260
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
261
+ 'aliases' => array(),
262
+ 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace',
263
+ 'dev_requirement' => false,
264
+ ),
265
+ ),
266
+ );
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/composer/platform_check.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // platform_check.php @generated by Composer
4
+
5
+ $issues = array();
6
+
7
+ if (!(PHP_VERSION_ID >= 70205)) {
8
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
9
+ }
10
+
11
+ if ($issues) {
12
+ if (!headers_sent()) {
13
+ header('HTTP/1.1 500 Internal Server Error');
14
+ }
15
+ if (!ini_get('display_errors')) {
16
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
+ } elseif (!headers_sent()) {
19
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
+ }
21
+ }
22
+ trigger_error(
23
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
+ E_USER_ERROR
25
+ );
26
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/.php_cs ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $config = PhpCsFixer\Config::create()
4
+ ->setRiskyAllowed(true)
5
+ ->setRules([
6
+ '@PSR2' => true,
7
+ 'array_syntax' => ['syntax' => 'short'],
8
+ 'declare_strict_types' => false,
9
+ 'concat_space' => ['spacing'=>'one'],
10
+ 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
11
+ 'ordered_imports' => true,
12
+ // 'phpdoc_align' => ['align'=>'vertical'],
13
+ // 'native_function_invocation' => true,
14
+ ])
15
+ ->setFinder(
16
+ PhpCsFixer\Finder::create()
17
+ ->in(__DIR__.'/src')
18
+ ->in(__DIR__.'/tests')
19
+ ->name('*.php')
20
+ )
21
+ ;
22
+
23
+ return $config;
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/CHANGELOG.md ADDED
@@ -0,0 +1,1352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+
3
+ ## 6.5.8 - 2022-06-20
4
+
5
+ * Fix change in port should be considered a change in origin
6
+ * Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin
7
+
8
+ ## 6.5.7 - 2022-06-09
9
+
10
+ * Fix failure to strip Authorization header on HTTP downgrade
11
+ * Fix failure to strip the Cookie header on change in host or HTTP downgrade
12
+
13
+ ## 6.5.6 - 2022-05-25
14
+
15
+ * Fix cross-domain cookie leakage
16
+
17
+ ## 6.5.5 - 2020-06-16
18
+
19
+ * Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678)
20
+
21
+ ## 6.5.4 - 2020-05-25
22
+
23
+ * Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
24
+
25
+ ## 6.5.3 - 2020-04-18
26
+
27
+ * Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
28
+ * Remove use of internal functions [#2548](https://github.com/guzzle/guzzle/pull/2548)
29
+
30
+ ## 6.5.2 - 2019-12-23
31
+
32
+ * idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
33
+
34
+ ## 6.5.1 - 2019-12-21
35
+
36
+ * Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454)
37
+ * IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
38
+
39
+ ## 6.5.0 - 2019-12-07
40
+
41
+ * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
42
+ * Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
43
+ * Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
44
+ * Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
45
+ Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds.
46
+ **After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.**
47
+ `Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed.
48
+ * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
49
+ * Deprecated `ClientInterface::VERSION`
50
+
51
+ ## 6.4.1 - 2019-10-23
52
+
53
+ * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
54
+ * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
55
+
56
+ ## 6.4.0 - 2019-10-23
57
+
58
+ * Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
59
+ * Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081)
60
+ * Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161)
61
+ * Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163)
62
+ * Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242)
63
+ * Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284)
64
+ * Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273)
65
+ * Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
66
+ * Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
67
+
68
+ ## 6.3.3 - 2018-04-22
69
+
70
+ * Fix: Default headers when decode_content is specified
71
+
72
+
73
+ ## 6.3.2 - 2018-03-26
74
+
75
+ * Fix: Release process
76
+
77
+
78
+ ## 6.3.1 - 2018-03-26
79
+
80
+ * Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014)
81
+ * Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012)
82
+ * Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999)
83
+ * Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998)
84
+ * Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953)
85
+ * Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915)
86
+ * Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916)
87
+
88
+ + Minor code cleanups, documentation fixes and clarifications.
89
+
90
+
91
+ ## 6.3.0 - 2017-06-22
92
+
93
+ * Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659)
94
+ * Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621)
95
+ * Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580)
96
+ * Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609)
97
+ * Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641)
98
+ * Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611)
99
+ * Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811)
100
+ * Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642)
101
+ * Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569)
102
+ * Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711)
103
+ * Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745)
104
+ * Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721)
105
+ * Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318)
106
+ * Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684)
107
+ * Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827)
108
+
109
+
110
+ + Minor code cleanups, documentation fixes and clarifications.
111
+
112
+ ## 6.2.3 - 2017-02-28
113
+
114
+ * Fix deprecations with guzzle/psr7 version 1.4
115
+
116
+ ## 6.2.2 - 2016-10-08
117
+
118
+ * Allow to pass nullable Response to delay callable
119
+ * Only add scheme when host is present
120
+ * Fix drain case where content-length is the literal string zero
121
+ * Obfuscate in-URL credentials in exceptions
122
+
123
+ ## 6.2.1 - 2016-07-18
124
+
125
+ * Address HTTP_PROXY security vulnerability, CVE-2016-5385:
126
+ https://httpoxy.org/
127
+ * Fixing timeout bug with StreamHandler:
128
+ https://github.com/guzzle/guzzle/pull/1488
129
+ * Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when
130
+ a server does not honor `Connection: close`.
131
+ * Ignore URI fragment when sending requests.
132
+
133
+ ## 6.2.0 - 2016-03-21
134
+
135
+ * Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`.
136
+ https://github.com/guzzle/guzzle/pull/1389
137
+ * Bug fix: Fix sleep calculation when waiting for delayed requests.
138
+ https://github.com/guzzle/guzzle/pull/1324
139
+ * Feature: More flexible history containers.
140
+ https://github.com/guzzle/guzzle/pull/1373
141
+ * Bug fix: defer sink stream opening in StreamHandler.
142
+ https://github.com/guzzle/guzzle/pull/1377
143
+ * Bug fix: do not attempt to escape cookie values.
144
+ https://github.com/guzzle/guzzle/pull/1406
145
+ * Feature: report original content encoding and length on decoded responses.
146
+ https://github.com/guzzle/guzzle/pull/1409
147
+ * Bug fix: rewind seekable request bodies before dispatching to cURL.
148
+ https://github.com/guzzle/guzzle/pull/1422
149
+ * Bug fix: provide an empty string to `http_build_query` for HHVM workaround.
150
+ https://github.com/guzzle/guzzle/pull/1367
151
+
152
+ ## 6.1.1 - 2015-11-22
153
+
154
+ * Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler
155
+ https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4
156
+ * Feature: HandlerStack is now more generic.
157
+ https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e
158
+ * Bug fix: setting verify to false in the StreamHandler now disables peer
159
+ verification. https://github.com/guzzle/guzzle/issues/1256
160
+ * Feature: Middleware now uses an exception factory, including more error
161
+ context. https://github.com/guzzle/guzzle/pull/1282
162
+ * Feature: better support for disabled functions.
163
+ https://github.com/guzzle/guzzle/pull/1287
164
+ * Bug fix: fixed regression where MockHandler was not using `sink`.
165
+ https://github.com/guzzle/guzzle/pull/1292
166
+
167
+ ## 6.1.0 - 2015-09-08
168
+
169
+ * Feature: Added the `on_stats` request option to provide access to transfer
170
+ statistics for requests. https://github.com/guzzle/guzzle/pull/1202
171
+ * Feature: Added the ability to persist session cookies in CookieJars.
172
+ https://github.com/guzzle/guzzle/pull/1195
173
+ * Feature: Some compatibility updates for Google APP Engine
174
+ https://github.com/guzzle/guzzle/pull/1216
175
+ * Feature: Added support for NO_PROXY to prevent the use of a proxy based on
176
+ a simple set of rules. https://github.com/guzzle/guzzle/pull/1197
177
+ * Feature: Cookies can now contain square brackets.
178
+ https://github.com/guzzle/guzzle/pull/1237
179
+ * Bug fix: Now correctly parsing `=` inside of quotes in Cookies.
180
+ https://github.com/guzzle/guzzle/pull/1232
181
+ * Bug fix: Cusotm cURL options now correctly override curl options of the
182
+ same name. https://github.com/guzzle/guzzle/pull/1221
183
+ * Bug fix: Content-Type header is now added when using an explicitly provided
184
+ multipart body. https://github.com/guzzle/guzzle/pull/1218
185
+ * Bug fix: Now ignoring Set-Cookie headers that have no name.
186
+ * Bug fix: Reason phrase is no longer cast to an int in some cases in the
187
+ cURL handler. https://github.com/guzzle/guzzle/pull/1187
188
+ * Bug fix: Remove the Authorization header when redirecting if the Host
189
+ header changes. https://github.com/guzzle/guzzle/pull/1207
190
+ * Bug fix: Cookie path matching fixes
191
+ https://github.com/guzzle/guzzle/issues/1129
192
+ * Bug fix: Fixing the cURL `body_as_string` setting
193
+ https://github.com/guzzle/guzzle/pull/1201
194
+ * Bug fix: quotes are no longer stripped when parsing cookies.
195
+ https://github.com/guzzle/guzzle/issues/1172
196
+ * Bug fix: `form_params` and `query` now always uses the `&` separator.
197
+ https://github.com/guzzle/guzzle/pull/1163
198
+ * Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
199
+ https://github.com/guzzle/guzzle/pull/1189
200
+
201
+ ## 6.0.2 - 2015-07-04
202
+
203
+ * Fixed a memory leak in the curl handlers in which references to callbacks
204
+ were not being removed by `curl_reset`.
205
+ * Cookies are now extracted properly before redirects.
206
+ * Cookies now allow more character ranges.
207
+ * Decoded Content-Encoding responses are now modified to correctly reflect
208
+ their state if the encoding was automatically removed by a handler. This
209
+ means that the `Content-Encoding` header may be removed an the
210
+ `Content-Length` modified to reflect the message size after removing the
211
+ encoding.
212
+ * Added a more explicit error message when trying to use `form_params` and
213
+ `multipart` in the same request.
214
+ * Several fixes for HHVM support.
215
+ * Functions are now conditionally required using an additional level of
216
+ indirection to help with global Composer installations.
217
+
218
+ ## 6.0.1 - 2015-05-27
219
+
220
+ * Fixed a bug with serializing the `query` request option where the `&`
221
+ separator was missing.
222
+ * Added a better error message for when `body` is provided as an array. Please
223
+ use `form_params` or `multipart` instead.
224
+ * Various doc fixes.
225
+
226
+ ## 6.0.0 - 2015-05-26
227
+
228
+ * See the UPGRADING.md document for more information.
229
+ * Added `multipart` and `form_params` request options.
230
+ * Added `synchronous` request option.
231
+ * Added the `on_headers` request option.
232
+ * Fixed `expect` handling.
233
+ * No longer adding default middlewares in the client ctor. These need to be
234
+ present on the provided handler in order to work.
235
+ * Requests are no longer initiated when sending async requests with the
236
+ CurlMultiHandler. This prevents unexpected recursion from requests completing
237
+ while ticking the cURL loop.
238
+ * Removed the semantics of setting `default` to `true`. This is no longer
239
+ required now that the cURL loop is not ticked for async requests.
240
+ * Added request and response logging middleware.
241
+ * No longer allowing self signed certificates when using the StreamHandler.
242
+ * Ensuring that `sink` is valid if saving to a file.
243
+ * Request exceptions now include a "handler context" which provides handler
244
+ specific contextual information.
245
+ * Added `GuzzleHttp\RequestOptions` to allow request options to be applied
246
+ using constants.
247
+ * `$maxHandles` has been removed from CurlMultiHandler.
248
+ * `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
249
+
250
+ ## 5.3.0 - 2015-05-19
251
+
252
+ * Mock now supports `save_to`
253
+ * Marked `AbstractRequestEvent::getTransaction()` as public.
254
+ * Fixed a bug in which multiple headers using different casing would overwrite
255
+ previous headers in the associative array.
256
+ * Added `Utils::getDefaultHandler()`
257
+ * Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
258
+ * URL scheme is now always lowercased.
259
+
260
+ ## 6.0.0-beta.1
261
+
262
+ * Requires PHP >= 5.5
263
+ * Updated to use PSR-7
264
+ * Requires immutable messages, which basically means an event based system
265
+ owned by a request instance is no longer possible.
266
+ * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7).
267
+ * Removed the dependency on `guzzlehttp/streams`. These stream abstractions
268
+ are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7`
269
+ namespace.
270
+ * Added middleware and handler system
271
+ * Replaced the Guzzle event and subscriber system with a middleware system.
272
+ * No longer depends on RingPHP, but rather places the HTTP handlers directly
273
+ in Guzzle, operating on PSR-7 messages.
274
+ * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which
275
+ means the `guzzlehttp/retry-subscriber` is now obsolete.
276
+ * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`.
277
+ * Asynchronous responses
278
+ * No longer supports the `future` request option to send an async request.
279
+ Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`,
280
+ `getAsync`, etc.).
281
+ * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid
282
+ recursion required by chaining and forwarding react promises. See
283
+ https://github.com/guzzle/promises
284
+ * Added `requestAsync` and `sendAsync` to send request asynchronously.
285
+ * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests
286
+ asynchronously.
287
+ * Request options
288
+ * POST and form updates
289
+ * Added the `form_fields` and `form_files` request options.
290
+ * Removed the `GuzzleHttp\Post` namespace.
291
+ * The `body` request option no longer accepts an array for POST requests.
292
+ * The `exceptions` request option has been deprecated in favor of the
293
+ `http_errors` request options.
294
+ * The `save_to` request option has been deprecated in favor of `sink` request
295
+ option.
296
+ * Clients no longer accept an array of URI template string and variables for
297
+ URI variables. You will need to expand URI templates before passing them
298
+ into a client constructor or request method.
299
+ * Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are
300
+ now magic methods that will send synchronous requests.
301
+ * Replaced `Utils.php` with plain functions in `functions.php`.
302
+ * Removed `GuzzleHttp\Collection`.
303
+ * Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as
304
+ an array.
305
+ * Removed `GuzzleHttp\Query`. Query string handling is now handled using an
306
+ associative array passed into the `query` request option. The query string
307
+ is serialized using PHP's `http_build_query`. If you need more control, you
308
+ can pass the query string in as a string.
309
+ * `GuzzleHttp\QueryParser` has been replaced with the
310
+ `GuzzleHttp\Psr7\parse_query`.
311
+
312
+ ## 5.2.0 - 2015-01-27
313
+
314
+ * Added `AppliesHeadersInterface` to make applying headers to a request based
315
+ on the body more generic and not specific to `PostBodyInterface`.
316
+ * Reduced the number of stack frames needed to send requests.
317
+ * Nested futures are now resolved in the client rather than the RequestFsm
318
+ * Finishing state transitions is now handled in the RequestFsm rather than the
319
+ RingBridge.
320
+ * Added a guard in the Pool class to not use recursion for request retries.
321
+
322
+ ## 5.1.0 - 2014-12-19
323
+
324
+ * Pool class no longer uses recursion when a request is intercepted.
325
+ * The size of a Pool can now be dynamically adjusted using a callback.
326
+ See https://github.com/guzzle/guzzle/pull/943.
327
+ * Setting a request option to `null` when creating a request with a client will
328
+ ensure that the option is not set. This allows you to overwrite default
329
+ request options on a per-request basis.
330
+ See https://github.com/guzzle/guzzle/pull/937.
331
+ * Added the ability to limit which protocols are allowed for redirects by
332
+ specifying a `protocols` array in the `allow_redirects` request option.
333
+ * Nested futures due to retries are now resolved when waiting for synchronous
334
+ responses. See https://github.com/guzzle/guzzle/pull/947.
335
+ * `"0"` is now an allowed URI path. See
336
+ https://github.com/guzzle/guzzle/pull/935.
337
+ * `Query` no longer typehints on the `$query` argument in the constructor,
338
+ allowing for strings and arrays.
339
+ * Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
340
+ specific exceptions if necessary.
341
+
342
+ ## 5.0.3 - 2014-11-03
343
+
344
+ This change updates query strings so that they are treated as un-encoded values
345
+ by default where the value represents an un-encoded value to send over the
346
+ wire. A Query object then encodes the value before sending over the wire. This
347
+ means that even value query string values (e.g., ":") are url encoded. This
348
+ makes the Query class match PHP's http_build_query function. However, if you
349
+ want to send requests over the wire using valid query string characters that do
350
+ not need to be encoded, then you can provide a string to Url::setQuery() and
351
+ pass true as the second argument to specify that the query string is a raw
352
+ string that should not be parsed or encoded (unless a call to getQuery() is
353
+ subsequently made, forcing the query-string to be converted into a Query
354
+ object).
355
+
356
+ ## 5.0.2 - 2014-10-30
357
+
358
+ * Added a trailing `\r\n` to multipart/form-data payloads. See
359
+ https://github.com/guzzle/guzzle/pull/871
360
+ * Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
361
+ * Status codes are now returned as integers. See
362
+ https://github.com/guzzle/guzzle/issues/881
363
+ * No longer overwriting an existing `application/x-www-form-urlencoded` header
364
+ when sending POST requests, allowing for customized headers. See
365
+ https://github.com/guzzle/guzzle/issues/877
366
+ * Improved path URL serialization.
367
+
368
+ * No longer double percent-encoding characters in the path or query string if
369
+ they are already encoded.
370
+ * Now properly encoding the supplied path to a URL object, instead of only
371
+ encoding ' ' and '?'.
372
+ * Note: This has been changed in 5.0.3 to now encode query string values by
373
+ default unless the `rawString` argument is provided when setting the query
374
+ string on a URL: Now allowing many more characters to be present in the
375
+ query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
376
+
377
+ ## 5.0.1 - 2014-10-16
378
+
379
+ Bugfix release.
380
+
381
+ * Fixed an issue where connection errors still returned response object in
382
+ error and end events event though the response is unusable. This has been
383
+ corrected so that a response is not returned in the `getResponse` method of
384
+ these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
385
+ * Fixed an issue where transfer statistics were not being populated in the
386
+ RingBridge. https://github.com/guzzle/guzzle/issues/866
387
+
388
+ ## 5.0.0 - 2014-10-12
389
+
390
+ Adding support for non-blocking responses and some minor API cleanup.
391
+
392
+ ### New Features
393
+
394
+ * Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`.
395
+ * Added a public API for creating a default HTTP adapter.
396
+ * Updated the redirect plugin to be non-blocking so that redirects are sent
397
+ concurrently. Other plugins like this can now be updated to be non-blocking.
398
+ * Added a "progress" event so that you can get upload and download progress
399
+ events.
400
+ * Added `GuzzleHttp\Pool` which implements FutureInterface and transfers
401
+ requests concurrently using a capped pool size as efficiently as possible.
402
+ * Added `hasListeners()` to EmitterInterface.
403
+ * Removed `GuzzleHttp\ClientInterface::sendAll` and marked
404
+ `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the
405
+ recommended way).
406
+
407
+ ### Breaking changes
408
+
409
+ The breaking changes in this release are relatively minor. The biggest thing to
410
+ look out for is that request and response objects no longer implement fluent
411
+ interfaces.
412
+
413
+ * Removed the fluent interfaces (i.e., `return $this`) from requests,
414
+ responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
415
+ `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
416
+ `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
417
+ why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
418
+ This also makes the Guzzle message interfaces compatible with the current
419
+ PSR-7 message proposal.
420
+ * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
421
+ for the HTTP request functions from function.php, these functions are now
422
+ implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode`
423
+ moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
424
+ `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
425
+ `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
426
+ `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
427
+ caused problems for many users: they aren't PSR-4 compliant, require an
428
+ explicit include, and needed an if-guard to ensure that the functions are not
429
+ declared multiple times.
430
+ * Rewrote adapter layer.
431
+ * Removing all classes from `GuzzleHttp\Adapter`, these are now
432
+ implemented as callables that are stored in `GuzzleHttp\Ring\Client`.
433
+ * Removed the concept of "parallel adapters". Sending requests serially or
434
+ concurrently is now handled using a single adapter.
435
+ * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The
436
+ Transaction object now exposes the request, response, and client as public
437
+ properties. The getters and setters have been removed.
438
+ * Removed the "headers" event. This event was only useful for changing the
439
+ body a response once the headers of the response were known. You can implement
440
+ a similar behavior in a number of ways. One example might be to use a
441
+ FnStream that has access to the transaction being sent. For example, when the
442
+ first byte is written, you could check if the response headers match your
443
+ expectations, and if so, change the actual stream body that is being
444
+ written to.
445
+ * Removed the `asArray` parameter from
446
+ `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
447
+ value as an array, then use the newly added `getHeaderAsArray()` method of
448
+ `MessageInterface`. This change makes the Guzzle interfaces compatible with
449
+ the PSR-7 interfaces.
450
+ * `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
451
+ custom request options using double-dispatch (this was an implementation
452
+ detail). Instead, you should now provide an associative array to the
453
+ constructor which is a mapping of the request option name mapping to a
454
+ function that applies the option value to a request.
455
+ * Removed the concept of "throwImmediately" from exceptions and error events.
456
+ This control mechanism was used to stop a transfer of concurrent requests
457
+ from completing. This can now be handled by throwing the exception or by
458
+ cancelling a pool of requests or each outstanding future request individually.
459
+ * Updated to "GuzzleHttp\Streams" 3.0.
460
+ * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
461
+ `maxLen` parameter. This update makes the Guzzle streams project
462
+ compatible with the current PSR-7 proposal.
463
+ * `GuzzleHttp\Stream\Stream::__construct`,
464
+ `GuzzleHttp\Stream\Stream::factory`, and
465
+ `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
466
+ argument. They now accept an associative array of options, including the
467
+ "size" key and "metadata" key which can be used to provide custom metadata.
468
+
469
+ ## 4.2.2 - 2014-09-08
470
+
471
+ * Fixed a memory leak in the CurlAdapter when reusing cURL handles.
472
+ * No longer using `request_fulluri` in stream adapter proxies.
473
+ * Relative redirects are now based on the last response, not the first response.
474
+
475
+ ## 4.2.1 - 2014-08-19
476
+
477
+ * Ensuring that the StreamAdapter does not always add a Content-Type header
478
+ * Adding automated github releases with a phar and zip
479
+
480
+ ## 4.2.0 - 2014-08-17
481
+
482
+ * Now merging in default options using a case-insensitive comparison.
483
+ Closes https://github.com/guzzle/guzzle/issues/767
484
+ * Added the ability to automatically decode `Content-Encoding` response bodies
485
+ using the `decode_content` request option. This is set to `true` by default
486
+ to decode the response body if it comes over the wire with a
487
+ `Content-Encoding`. Set this value to `false` to disable decoding the
488
+ response content, and pass a string to provide a request `Accept-Encoding`
489
+ header and turn on automatic response decoding. This feature now allows you
490
+ to pass an `Accept-Encoding` header in the headers of a request but still
491
+ disable automatic response decoding.
492
+ Closes https://github.com/guzzle/guzzle/issues/764
493
+ * Added the ability to throw an exception immediately when transferring
494
+ requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760
495
+ * Updating guzzlehttp/streams dependency to ~2.1
496
+ * No longer utilizing the now deprecated namespaced methods from the stream
497
+ package.
498
+
499
+ ## 4.1.8 - 2014-08-14
500
+
501
+ * Fixed an issue in the CurlFactory that caused setting the `stream=false`
502
+ request option to throw an exception.
503
+ See: https://github.com/guzzle/guzzle/issues/769
504
+ * TransactionIterator now calls rewind on the inner iterator.
505
+ See: https://github.com/guzzle/guzzle/pull/765
506
+ * You can now set the `Content-Type` header to `multipart/form-data`
507
+ when creating POST requests to force multipart bodies.
508
+ See https://github.com/guzzle/guzzle/issues/768
509
+
510
+ ## 4.1.7 - 2014-08-07
511
+
512
+ * Fixed an error in the HistoryPlugin that caused the same request and response
513
+ to be logged multiple times when an HTTP protocol error occurs.
514
+ * Ensuring that cURL does not add a default Content-Type when no Content-Type
515
+ has been supplied by the user. This prevents the adapter layer from modifying
516
+ the request that is sent over the wire after any listeners may have already
517
+ put the request in a desired state (e.g., signed the request).
518
+ * Throwing an exception when you attempt to send requests that have the
519
+ "stream" set to true in parallel using the MultiAdapter.
520
+ * Only calling curl_multi_select when there are active cURL handles. This was
521
+ previously changed and caused performance problems on some systems due to PHP
522
+ always selecting until the maximum select timeout.
523
+ * Fixed a bug where multipart/form-data POST fields were not correctly
524
+ aggregated (e.g., values with "&").
525
+
526
+ ## 4.1.6 - 2014-08-03
527
+
528
+ * Added helper methods to make it easier to represent messages as strings,
529
+ including getting the start line and getting headers as a string.
530
+
531
+ ## 4.1.5 - 2014-08-02
532
+
533
+ * Automatically retrying cURL "Connection died, retrying a fresh connect"
534
+ errors when possible.
535
+ * cURL implementation cleanup
536
+ * Allowing multiple event subscriber listeners to be registered per event by
537
+ passing an array of arrays of listener configuration.
538
+
539
+ ## 4.1.4 - 2014-07-22
540
+
541
+ * Fixed a bug that caused multi-part POST requests with more than one field to
542
+ serialize incorrectly.
543
+ * Paths can now be set to "0"
544
+ * `ResponseInterface::xml` now accepts a `libxml_options` option and added a
545
+ missing default argument that was required when parsing XML response bodies.
546
+ * A `save_to` stream is now created lazily, which means that files are not
547
+ created on disk unless a request succeeds.
548
+
549
+ ## 4.1.3 - 2014-07-15
550
+
551
+ * Various fixes to multipart/form-data POST uploads
552
+ * Wrapping function.php in an if-statement to ensure Guzzle can be used
553
+ globally and in a Composer install
554
+ * Fixed an issue with generating and merging in events to an event array
555
+ * POST headers are only applied before sending a request to allow you to change
556
+ the query aggregator used before uploading
557
+ * Added much more robust query string parsing
558
+ * Fixed various parsing and normalization issues with URLs
559
+ * Fixing an issue where multi-valued headers were not being utilized correctly
560
+ in the StreamAdapter
561
+
562
+ ## 4.1.2 - 2014-06-18
563
+
564
+ * Added support for sending payloads with GET requests
565
+
566
+ ## 4.1.1 - 2014-06-08
567
+
568
+ * Fixed an issue related to using custom message factory options in subclasses
569
+ * Fixed an issue with nested form fields in a multi-part POST
570
+ * Fixed an issue with using the `json` request option for POST requests
571
+ * Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar`
572
+
573
+ ## 4.1.0 - 2014-05-27
574
+
575
+ * Added a `json` request option to easily serialize JSON payloads.
576
+ * Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON.
577
+ * Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`.
578
+ * Added the ability to provide an emitter to a client in the client constructor.
579
+ * Added the ability to persist a cookie session using $_SESSION.
580
+ * Added a trait that can be used to add event listeners to an iterator.
581
+ * Removed request method constants from RequestInterface.
582
+ * Fixed warning when invalid request start-lines are received.
583
+ * Updated MessageFactory to work with custom request option methods.
584
+ * Updated cacert bundle to latest build.
585
+
586
+ 4.0.2 (2014-04-16)
587
+ ------------------
588
+
589
+ * Proxy requests using the StreamAdapter now properly use request_fulluri (#632)
590
+ * Added the ability to set scalars as POST fields (#628)
591
+
592
+ ## 4.0.1 - 2014-04-04
593
+
594
+ * The HTTP status code of a response is now set as the exception code of
595
+ RequestException objects.
596
+ * 303 redirects will now correctly switch from POST to GET requests.
597
+ * The default parallel adapter of a client now correctly uses the MultiAdapter.
598
+ * HasDataTrait now initializes the internal data array as an empty array so
599
+ that the toArray() method always returns an array.
600
+
601
+ ## 4.0.0 - 2014-03-29
602
+
603
+ * For more information on the 4.0 transition, see:
604
+ http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
605
+ * For information on changes and upgrading, see:
606
+ https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
607
+ * Added `GuzzleHttp\batch()` as a convenience function for sending requests in
608
+ parallel without needing to write asynchronous code.
609
+ * Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`.
610
+ You can now pass a callable or an array of associative arrays where each
611
+ associative array contains the "fn", "priority", and "once" keys.
612
+
613
+ ## 4.0.0.rc-2 - 2014-03-25
614
+
615
+ * Removed `getConfig()` and `setConfig()` from clients to avoid confusion
616
+ around whether things like base_url, message_factory, etc. should be able to
617
+ be retrieved or modified.
618
+ * Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface
619
+ * functions.php functions were renamed using snake_case to match PHP idioms
620
+ * Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and
621
+ `GUZZLE_CURL_SELECT_TIMEOUT` environment variables
622
+ * Added the ability to specify custom `sendAll()` event priorities
623
+ * Added the ability to specify custom stream context options to the stream
624
+ adapter.
625
+ * Added a functions.php function for `get_path()` and `set_path()`
626
+ * CurlAdapter and MultiAdapter now use a callable to generate curl resources
627
+ * MockAdapter now properly reads a body and emits a `headers` event
628
+ * Updated Url class to check if a scheme and host are set before adding ":"
629
+ and "//". This allows empty Url (e.g., "") to be serialized as "".
630
+ * Parsing invalid XML no longer emits warnings
631
+ * Curl classes now properly throw AdapterExceptions
632
+ * Various performance optimizations
633
+ * Streams are created with the faster `Stream\create()` function
634
+ * Marked deprecation_proxy() as internal
635
+ * Test server is now a collection of static methods on a class
636
+
637
+ ## 4.0.0-rc.1 - 2014-03-15
638
+
639
+ * See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
640
+
641
+ ## 3.8.1 - 2014-01-28
642
+
643
+ * Bug: Always using GET requests when redirecting from a 303 response
644
+ * Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
645
+ `Guzzle\Http\ClientInterface::setSslVerification()`
646
+ * Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL
647
+ * Bug: The body of a request can now be set to `"0"`
648
+ * Sending PHP stream requests no longer forces `HTTP/1.0`
649
+ * Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of
650
+ each sub-exception
651
+ * Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than
652
+ clobbering everything).
653
+ * Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators)
654
+ * Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`.
655
+ For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`.
656
+ * Now properly escaping the regular expression delimiter when matching Cookie domains.
657
+ * Network access is now disabled when loading XML documents
658
+
659
+ ## 3.8.0 - 2013-12-05
660
+
661
+ * Added the ability to define a POST name for a file
662
+ * JSON response parsing now properly walks additionalProperties
663
+ * cURL error code 18 is now retried automatically in the BackoffPlugin
664
+ * Fixed a cURL error when URLs contain fragments
665
+ * Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were
666
+ CurlExceptions
667
+ * CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e)
668
+ * Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS`
669
+ * Fixed a bug that was encountered when parsing empty header parameters
670
+ * UriTemplate now has a `setRegex()` method to match the docs
671
+ * The `debug` request parameter now checks if it is truthy rather than if it exists
672
+ * Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin
673
+ * Added the ability to combine URLs using strict RFC 3986 compliance
674
+ * Command objects can now return the validation errors encountered by the command
675
+ * Various fixes to cache revalidation (#437 and 29797e5)
676
+ * Various fixes to the AsyncPlugin
677
+ * Cleaned up build scripts
678
+
679
+ ## 3.7.4 - 2013-10-02
680
+
681
+ * Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
682
+ * Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
683
+ (see https://github.com/aws/aws-sdk-php/issues/147)
684
+ * Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots
685
+ * Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420)
686
+ * Updated the bundled cacert.pem (#419)
687
+ * OauthPlugin now supports adding authentication to headers or query string (#425)
688
+
689
+ ## 3.7.3 - 2013-09-08
690
+
691
+ * Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
692
+ `CommandTransferException`.
693
+ * Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description
694
+ * Schemas are only injected into response models when explicitly configured.
695
+ * No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of
696
+ an EntityBody.
697
+ * Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator.
698
+ * Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`.
699
+ * Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody()
700
+ * Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin
701
+ * Bug fix: Visiting XML attributes first before visiting XML children when serializing requests
702
+ * Bug fix: Properly parsing headers that contain commas contained in quotes
703
+ * Bug fix: mimetype guessing based on a filename is now case-insensitive
704
+
705
+ ## 3.7.2 - 2013-08-02
706
+
707
+ * Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
708
+ See https://github.com/guzzle/guzzle/issues/371
709
+ * Bug fix: Cookie domains are now matched correctly according to RFC 6265
710
+ See https://github.com/guzzle/guzzle/issues/377
711
+ * Bug fix: GET parameters are now used when calculating an OAuth signature
712
+ * Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted
713
+ * `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched
714
+ * `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input.
715
+ See https://github.com/guzzle/guzzle/issues/379
716
+ * Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See
717
+ https://github.com/guzzle/guzzle/pull/380
718
+ * cURL multi cleanup and optimizations
719
+
720
+ ## 3.7.1 - 2013-07-05
721
+
722
+ * Bug fix: Setting default options on a client now works
723
+ * Bug fix: Setting options on HEAD requests now works. See #352
724
+ * Bug fix: Moving stream factory before send event to before building the stream. See #353
725
+ * Bug fix: Cookies no longer match on IP addresses per RFC 6265
726
+ * Bug fix: Correctly parsing header parameters that are in `<>` and quotes
727
+ * Added `cert` and `ssl_key` as request options
728
+ * `Host` header can now diverge from the host part of a URL if the header is set manually
729
+ * `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter
730
+ * OAuth parameters are only added via the plugin if they aren't already set
731
+ * Exceptions are now thrown when a URL cannot be parsed
732
+ * Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
733
+ * Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
734
+
735
+ ## 3.7.0 - 2013-06-10
736
+
737
+ * See UPGRADING.md for more information on how to upgrade.
738
+ * Requests now support the ability to specify an array of $options when creating a request to more easily modify a
739
+ request. You can pass a 'request.options' configuration setting to a client to apply default request options to
740
+ every request created by a client (e.g. default query string variables, headers, curl options, etc.).
741
+ * Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`.
742
+ See `Guzzle\Http\StaticClient::mount`.
743
+ * Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests
744
+ created by a command (e.g. custom headers, query string variables, timeout settings, etc.).
745
+ * Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the
746
+ headers of a response
747
+ * Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key
748
+ (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`)
749
+ * ServiceBuilders now support storing and retrieving arbitrary data
750
+ * CachePlugin can now purge all resources for a given URI
751
+ * CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource
752
+ * CachePlugin now uses the Vary header to determine if a resource is a cache hit
753
+ * `Guzzle\Http\Message\Response` now implements `\Serializable`
754
+ * Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters
755
+ * `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable
756
+ * Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()`
757
+ * Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size
758
+ * `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message
759
+ * Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older
760
+ Symfony users can still use the old version of Monolog.
761
+ * Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`.
762
+ Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`.
763
+ * Several performance improvements to `Guzzle\Common\Collection`
764
+ * Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
765
+ createRequest, head, delete, put, patch, post, options, prepareRequest
766
+ * Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
767
+ * Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
768
+ * Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
769
+ `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
770
+ resource, string, or EntityBody into the $options parameter to specify the download location of the response.
771
+ * Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
772
+ default `array()`
773
+ * Added `Guzzle\Stream\StreamInterface::isRepeatable`
774
+ * Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
775
+ $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
776
+ $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`.
777
+ * Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`.
778
+ * Removed `Guzzle\Http\ClientInterface::expandTemplate()`
779
+ * Removed `Guzzle\Http\ClientInterface::setRequestFactory()`
780
+ * Removed `Guzzle\Http\ClientInterface::getCurlMulti()`
781
+ * Removed `Guzzle\Http\Message\RequestInterface::canCache`
782
+ * Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`
783
+ * Removed `Guzzle\Http\Message\RequestInterface::isRedirect`
784
+ * Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
785
+ * You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting
786
+ `Guzzle\Common\Version::$emitWarnings` to true.
787
+ * Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use
788
+ `$request->getResponseBody()->isRepeatable()` instead.
789
+ * Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
790
+ `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
791
+ * Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
792
+ `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
793
+ * Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
794
+ * Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
795
+ * Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
796
+ * Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand.
797
+ These will work through Guzzle 4.0
798
+ * Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params].
799
+ * Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
800
+ * Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`.
801
+ * Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`.
802
+ * Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
803
+ * Marked `Guzzle\Common\Collection::inject()` as deprecated.
804
+ * Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');`
805
+ * CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
806
+ CacheStorageInterface. These two objects and interface will be removed in a future version.
807
+ * Always setting X-cache headers on cached responses
808
+ * Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
809
+ * `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
810
+ $request, Response $response);`
811
+ * `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
812
+ * `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
813
+ * Added `CacheStorageInterface::purge($url)`
814
+ * `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
815
+ $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
816
+ CanCacheStrategyInterface $canCache = null)`
817
+ * Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
818
+
819
+ ## 3.6.0 - 2013-05-29
820
+
821
+ * ServiceDescription now implements ToArrayInterface
822
+ * Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
823
+ * Guzzle can now correctly parse incomplete URLs
824
+ * Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
825
+ * Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
826
+ * Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
827
+ * Specific header implementations can be created for complex headers. When a message creates a header, it uses a
828
+ HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
829
+ CacheControl header implementation.
830
+ * Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
831
+ * Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
832
+ * Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
833
+ Guzzle\Http\Curl\RequestMediator
834
+ * Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
835
+ * Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
836
+ * Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
837
+ * Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
838
+ * Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
839
+ * All response header helper functions return a string rather than mixing Header objects and strings inconsistently
840
+ * Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
841
+ directly via interfaces
842
+ * Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
843
+ but are a no-op until removed.
844
+ * Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
845
+ `Guzzle\Service\Command\ArrayCommandInterface`.
846
+ * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
847
+ on a request while the request is still being transferred
848
+ * The ability to case-insensitively search for header values
849
+ * Guzzle\Http\Message\Header::hasExactHeader
850
+ * Guzzle\Http\Message\Header::raw. Use getAll()
851
+ * Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
852
+ instead.
853
+ * `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
854
+ * Added the ability to cast Model objects to a string to view debug information.
855
+
856
+ ## 3.5.0 - 2013-05-13
857
+
858
+ * Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
859
+ * Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove
860
+ itself from the EventDispatcher)
861
+ * Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values
862
+ * Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too
863
+ * Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a
864
+ non-existent key
865
+ * Bug: All __call() method arguments are now required (helps with mocking frameworks)
866
+ * Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference
867
+ to help with refcount based garbage collection of resources created by sending a request
868
+ * Deprecating ZF1 cache and log adapters. These will be removed in the next major version.
869
+ * Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the
870
+ HistoryPlugin for a history.
871
+ * Added a `responseBody` alias for the `response_body` location
872
+ * Refactored internals to no longer rely on Response::getRequest()
873
+ * HistoryPlugin can now be cast to a string
874
+ * HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests
875
+ and responses that are sent over the wire
876
+ * Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
877
+
878
+ ## 3.4.3 - 2013-04-30
879
+
880
+ * Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
881
+ * Added a check to re-extract the temp cacert bundle from the phar before sending each request
882
+
883
+ ## 3.4.2 - 2013-04-29
884
+
885
+ * Bug fix: Stream objects now work correctly with "a" and "a+" modes
886
+ * Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
887
+ * Bug fix: AsyncPlugin no longer forces HEAD requests
888
+ * Bug fix: DateTime timezones are now properly handled when using the service description schema formatter
889
+ * Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails
890
+ * Setting a response on a request will write to the custom request body from the response body if one is specified
891
+ * LogPlugin now writes to php://output when STDERR is undefined
892
+ * Added the ability to set multiple POST files for the same key in a single call
893
+ * application/x-www-form-urlencoded POSTs now use the utf-8 charset by default
894
+ * Added the ability to queue CurlExceptions to the MockPlugin
895
+ * Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
896
+ * Configuration loading now allows remote files
897
+
898
+ ## 3.4.1 - 2013-04-16
899
+
900
+ * Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
901
+ handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
902
+ * Exceptions are now properly grouped when sending requests in parallel
903
+ * Redirects are now properly aggregated when a multi transaction fails
904
+ * Redirects now set the response on the original object even in the event of a failure
905
+ * Bug fix: Model names are now properly set even when using $refs
906
+ * Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax
907
+ * Added support for oauth_callback in OAuth signatures
908
+ * Added support for oauth_verifier in OAuth signatures
909
+ * Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
910
+
911
+ ## 3.4.0 - 2013-04-11
912
+
913
+ * Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
914
+ * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
915
+ * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
916
+ * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
917
+ * Bug fix: Added `number` type to service descriptions.
918
+ * Bug fix: empty parameters are removed from an OAuth signature
919
+ * Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header
920
+ * Bug fix: Fixed "array to string" error when validating a union of types in a service description
921
+ * Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream
922
+ * Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin.
923
+ * Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs.
924
+ * The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections.
925
+ * Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if
926
+ the Content-Type can be determined based on the entity body or the path of the request.
927
+ * Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder.
928
+ * Added support for a PSR-3 LogAdapter.
929
+ * Added a `command.after_prepare` event
930
+ * Added `oauth_callback` parameter to the OauthPlugin
931
+ * Added the ability to create a custom stream class when using a stream factory
932
+ * Added a CachingEntityBody decorator
933
+ * Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized.
934
+ * The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar.
935
+ * You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies
936
+ * POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This
937
+ means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use
938
+ POST fields or files (the latter is only used when emulating a form POST in the browser).
939
+ * Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
940
+
941
+ ## 3.3.1 - 2013-03-10
942
+
943
+ * Added the ability to create PHP streaming responses from HTTP requests
944
+ * Bug fix: Running any filters when parsing response headers with service descriptions
945
+ * Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing
946
+ * Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across
947
+ response location visitors.
948
+ * Bug fix: Removed the possibility of creating configuration files with circular dependencies
949
+ * RequestFactory::create() now uses the key of a POST file when setting the POST file name
950
+ * Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
951
+
952
+ ## 3.3.0 - 2013-03-03
953
+
954
+ * A large number of performance optimizations have been made
955
+ * Bug fix: Added 'wb' as a valid write mode for streams
956
+ * Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned
957
+ * Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()`
958
+ * BC: Removed `Guzzle\Http\Utils` class
959
+ * BC: Setting a service description on a client will no longer modify the client's command factories.
960
+ * BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using
961
+ the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
962
+ * BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to
963
+ lowercase
964
+ * Operation parameter objects are now lazy loaded internally
965
+ * Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses
966
+ * Added support for instantiating responseType=class responseClass classes. Classes must implement
967
+ `Guzzle\Service\Command\ResponseClassInterface`
968
+ * Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These
969
+ additional properties also support locations and can be used to parse JSON responses where the outermost part of the
970
+ JSON is an array
971
+ * Added support for nested renaming of JSON models (rename sentAs to name)
972
+ * CachePlugin
973
+ * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
974
+ * Debug headers can now added to cached response in the CachePlugin
975
+
976
+ ## 3.2.0 - 2013-02-14
977
+
978
+ * CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
979
+ * URLs with no path no longer contain a "/" by default
980
+ * Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url.
981
+ * BadResponseException no longer includes the full request and response message
982
+ * Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface
983
+ * Adding getResponseBody() to Guzzle\Http\Message\RequestInterface
984
+ * Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription
985
+ * Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list
986
+ * xmlEncoding can now be customized for the XML declaration of a XML service description operation
987
+ * Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value
988
+ aggregation and no longer uses callbacks
989
+ * The URL encoding implementation of Guzzle\Http\QueryString can now be customized
990
+ * Bug fix: Filters were not always invoked for array service description parameters
991
+ * Bug fix: Redirects now use a target response body rather than a temporary response body
992
+ * Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
993
+ * Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
994
+
995
+ ## 3.1.2 - 2013-01-27
996
+
997
+ * Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
998
+ response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
999
+ * Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent
1000
+ * CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444)
1001
+ * Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
1002
+ * Setting default headers on a client after setting the user-agent will not erase the user-agent setting
1003
+
1004
+ ## 3.1.1 - 2013-01-20
1005
+
1006
+ * Adding wildcard support to Guzzle\Common\Collection::getPath()
1007
+ * Adding alias support to ServiceBuilder configs
1008
+ * Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
1009
+
1010
+ ## 3.1.0 - 2013-01-12
1011
+
1012
+ * BC: CurlException now extends from RequestException rather than BadResponseException
1013
+ * BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
1014
+ * Added getData to ServiceDescriptionInterface
1015
+ * Added context array to RequestInterface::setState()
1016
+ * Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http
1017
+ * Bug: Adding required content-type when JSON request visitor adds JSON to a command
1018
+ * Bug: Fixing the serialization of a service description with custom data
1019
+ * Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing
1020
+ an array of successful and failed responses
1021
+ * Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection
1022
+ * Added Guzzle\Http\IoEmittingEntityBody
1023
+ * Moved command filtration from validators to location visitors
1024
+ * Added `extends` attributes to service description parameters
1025
+ * Added getModels to ServiceDescriptionInterface
1026
+
1027
+ ## 3.0.7 - 2012-12-19
1028
+
1029
+ * Fixing phar detection when forcing a cacert to system if null or true
1030
+ * Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
1031
+ * Cleaning up `Guzzle\Common\Collection::inject` method
1032
+ * Adding a response_body location to service descriptions
1033
+
1034
+ ## 3.0.6 - 2012-12-09
1035
+
1036
+ * CurlMulti performance improvements
1037
+ * Adding setErrorResponses() to Operation
1038
+ * composer.json tweaks
1039
+
1040
+ ## 3.0.5 - 2012-11-18
1041
+
1042
+ * Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
1043
+ * Bug: Response body can now be a string containing "0"
1044
+ * Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert
1045
+ * Bug: QueryString::fromString now properly parses query string parameters that contain equal signs
1046
+ * Added support for XML attributes in service description responses
1047
+ * DefaultRequestSerializer now supports array URI parameter values for URI template expansion
1048
+ * Added better mimetype guessing to requests and post files
1049
+
1050
+ ## 3.0.4 - 2012-11-11
1051
+
1052
+ * Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
1053
+ * Bug: Cookies can now be added that have a name, domain, or value set to "0"
1054
+ * Bug: Using the system cacert bundle when using the Phar
1055
+ * Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures
1056
+ * Enhanced cookie jar de-duplication
1057
+ * Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added
1058
+ * Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
1059
+ * Added the ability to create any sort of hash for a stream rather than just an MD5 hash
1060
+
1061
+ ## 3.0.3 - 2012-11-04
1062
+
1063
+ * Implementing redirects in PHP rather than cURL
1064
+ * Added PECL URI template extension and using as default parser if available
1065
+ * Bug: Fixed Content-Length parsing of Response factory
1066
+ * Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams.
1067
+ * Adding ToArrayInterface throughout library
1068
+ * Fixing OauthPlugin to create unique nonce values per request
1069
+
1070
+ ## 3.0.2 - 2012-10-25
1071
+
1072
+ * Magic methods are enabled by default on clients
1073
+ * Magic methods return the result of a command
1074
+ * Service clients no longer require a base_url option in the factory
1075
+ * Bug: Fixed an issue with URI templates where null template variables were being expanded
1076
+
1077
+ ## 3.0.1 - 2012-10-22
1078
+
1079
+ * Models can now be used like regular collection objects by calling filter, map, etc.
1080
+ * Models no longer require a Parameter structure or initial data in the constructor
1081
+ * Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
1082
+
1083
+ ## 3.0.0 - 2012-10-15
1084
+
1085
+ * Rewrote service description format to be based on Swagger
1086
+ * Now based on JSON schema
1087
+ * Added nested input structures and nested response models
1088
+ * Support for JSON and XML input and output models
1089
+ * Renamed `commands` to `operations`
1090
+ * Removed dot class notation
1091
+ * Removed custom types
1092
+ * Broke the project into smaller top-level namespaces to be more component friendly
1093
+ * Removed support for XML configs and descriptions. Use arrays or JSON files.
1094
+ * Removed the Validation component and Inspector
1095
+ * Moved all cookie code to Guzzle\Plugin\Cookie
1096
+ * Magic methods on a Guzzle\Service\Client now return the command un-executed.
1097
+ * Calling getResult() or getResponse() on a command will lazily execute the command if needed.
1098
+ * Now shipping with cURL's CA certs and using it by default
1099
+ * Added previousResponse() method to response objects
1100
+ * No longer sending Accept and Accept-Encoding headers on every request
1101
+ * Only sending an Expect header by default when a payload is greater than 1MB
1102
+ * Added/moved client options:
1103
+ * curl.blacklist to curl.option.blacklist
1104
+ * Added ssl.certificate_authority
1105
+ * Added a Guzzle\Iterator component
1106
+ * Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin
1107
+ * Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin)
1108
+ * Added a more robust caching plugin
1109
+ * Added setBody to response objects
1110
+ * Updating LogPlugin to use a more flexible MessageFormatter
1111
+ * Added a completely revamped build process
1112
+ * Cleaning up Collection class and removing default values from the get method
1113
+ * Fixed ZF2 cache adapters
1114
+
1115
+ ## 2.8.8 - 2012-10-15
1116
+
1117
+ * Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
1118
+
1119
+ ## 2.8.7 - 2012-09-30
1120
+
1121
+ * Bug: Fixed config file aliases for JSON includes
1122
+ * Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
1123
+ * Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload
1124
+ * Bug: Hardening request and response parsing to account for missing parts
1125
+ * Bug: Fixed PEAR packaging
1126
+ * Bug: Fixed Request::getInfo
1127
+ * Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail
1128
+ * Adding the ability for the namespace Iterator factory to look in multiple directories
1129
+ * Added more getters/setters/removers from service descriptions
1130
+ * Added the ability to remove POST fields from OAuth signatures
1131
+ * OAuth plugin now supports 2-legged OAuth
1132
+
1133
+ ## 2.8.6 - 2012-09-05
1134
+
1135
+ * Added the ability to modify and build service descriptions
1136
+ * Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
1137
+ * Added a `json` parameter location
1138
+ * Now allowing dot notation for classes in the CacheAdapterFactory
1139
+ * Using the union of two arrays rather than an array_merge when extending service builder services and service params
1140
+ * Ensuring that a service is a string before doing strpos() checks on it when substituting services for references
1141
+ in service builder config files.
1142
+ * Services defined in two different config files that include one another will by default replace the previously
1143
+ defined service, but you can now create services that extend themselves and merge their settings over the previous
1144
+ * The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
1145
+ '_default' with a default JSON configuration file.
1146
+
1147
+ ## 2.8.5 - 2012-08-29
1148
+
1149
+ * Bug: Suppressed empty arrays from URI templates
1150
+ * Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
1151
+ * Added support for HTTP responses that do not contain a reason phrase in the start-line
1152
+ * AbstractCommand commands are now invokable
1153
+ * Added a way to get the data used when signing an Oauth request before a request is sent
1154
+
1155
+ ## 2.8.4 - 2012-08-15
1156
+
1157
+ * Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
1158
+ * Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable.
1159
+ * Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream
1160
+ * Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream
1161
+ * Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5())
1162
+ * Added additional response status codes
1163
+ * Removed SSL information from the default User-Agent header
1164
+ * DELETE requests can now send an entity body
1165
+ * Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries
1166
+ * Added the ability of the MockPlugin to consume mocked request bodies
1167
+ * LogPlugin now exposes request and response objects in the extras array
1168
+
1169
+ ## 2.8.3 - 2012-07-30
1170
+
1171
+ * Bug: Fixed a case where empty POST requests were sent as GET requests
1172
+ * Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
1173
+ * Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
1174
+ * Added multiple inheritance to service description commands
1175
+ * Added an ApiCommandInterface and added `getParamNames()` and `hasParam()`
1176
+ * Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
1177
+ * Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
1178
+
1179
+ ## 2.8.2 - 2012-07-24
1180
+
1181
+ * Bug: Query string values set to 0 are no longer dropped from the query string
1182
+ * Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()`
1183
+ * Bug: `+` is now treated as an encoded space when parsing query strings
1184
+ * QueryString and Collection performance improvements
1185
+ * Allowing dot notation for class paths in filters attribute of a service descriptions
1186
+
1187
+ ## 2.8.1 - 2012-07-16
1188
+
1189
+ * Loosening Event Dispatcher dependency
1190
+ * POST redirects can now be customized using CURLOPT_POSTREDIR
1191
+
1192
+ ## 2.8.0 - 2012-07-15
1193
+
1194
+ * BC: Guzzle\Http\Query
1195
+ * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
1196
+ * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding()
1197
+ * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
1198
+ * Changed the aggregation functions of QueryString to be static methods
1199
+ * Can now use fromString() with querystrings that have a leading ?
1200
+ * cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters
1201
+ * Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
1202
+ * Cookies are no longer URL decoded by default
1203
+ * Bug: URI template variables set to null are no longer expanded
1204
+
1205
+ ## 2.7.2 - 2012-07-02
1206
+
1207
+ * BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
1208
+ * BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
1209
+ * CachePlugin now allows for a custom request parameter function to check if a request can be cached
1210
+ * Bug fix: CachePlugin now only caches GET and HEAD requests by default
1211
+ * Bug fix: Using header glue when transferring headers over the wire
1212
+ * Allowing deeply nested arrays for composite variables in URI templates
1213
+ * Batch divisors can now return iterators or arrays
1214
+
1215
+ ## 2.7.1 - 2012-06-26
1216
+
1217
+ * Minor patch to update version number in UA string
1218
+ * Updating build process
1219
+
1220
+ ## 2.7.0 - 2012-06-25
1221
+
1222
+ * BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
1223
+ * BC: Removed magic setX methods from commands
1224
+ * BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method
1225
+ * Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable.
1226
+ * Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity)
1227
+ * Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace
1228
+ * Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin
1229
+ * Added the ability to set POST fields and files in a service description
1230
+ * Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method
1231
+ * Adding a command.before_prepare event to clients
1232
+ * Added BatchClosureTransfer and BatchClosureDivisor
1233
+ * BatchTransferException now includes references to the batch divisor and transfer strategies
1234
+ * Fixed some tests so that they pass more reliably
1235
+ * Added Guzzle\Common\Log\ArrayLogAdapter
1236
+
1237
+ ## 2.6.6 - 2012-06-10
1238
+
1239
+ * BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
1240
+ * BC: Removing Guzzle\Service\Command\CommandSet
1241
+ * Adding generic batching system (replaces the batch queue plugin and command set)
1242
+ * Updating ZF cache and log adapters and now using ZF's composer repository
1243
+ * Bug: Setting the name of each ApiParam when creating through an ApiCommand
1244
+ * Adding result_type, result_doc, deprecated, and doc_url to service descriptions
1245
+ * Bug: Changed the default cookie header casing back to 'Cookie'
1246
+
1247
+ ## 2.6.5 - 2012-06-03
1248
+
1249
+ * BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
1250
+ * BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
1251
+ * BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data
1252
+ * BC: Renaming methods in the CookieJarInterface
1253
+ * Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations
1254
+ * Making the default glue for HTTP headers ';' instead of ','
1255
+ * Adding a removeValue to Guzzle\Http\Message\Header
1256
+ * Adding getCookies() to request interface.
1257
+ * Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
1258
+
1259
+ ## 2.6.4 - 2012-05-30
1260
+
1261
+ * BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
1262
+ * BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
1263
+ * Bug: Fixing magic method command calls on clients
1264
+ * Bug: Email constraint only validates strings
1265
+ * Bug: Aggregate POST fields when POST files are present in curl handle
1266
+ * Bug: Fixing default User-Agent header
1267
+ * Bug: Only appending or prepending parameters in commands if they are specified
1268
+ * Bug: Not requiring response reason phrases or status codes to match a predefined list of codes
1269
+ * Allowing the use of dot notation for class namespaces when using instance_of constraint
1270
+ * Added any_match validation constraint
1271
+ * Added an AsyncPlugin
1272
+ * Passing request object to the calculateWait method of the ExponentialBackoffPlugin
1273
+ * Allowing the result of a command object to be changed
1274
+ * Parsing location and type sub values when instantiating a service description rather than over and over at runtime
1275
+
1276
+ ## 2.6.3 - 2012-05-23
1277
+
1278
+ * [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
1279
+ * [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
1280
+ * You can now use an array of data when creating PUT request bodies in the request factory.
1281
+ * Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable.
1282
+ * [Http] Adding support for Content-Type in multipart POST uploads per upload
1283
+ * [Http] Added support for uploading multiple files using the same name (foo[0], foo[1])
1284
+ * Adding more POST data operations for easier manipulation of POST data.
1285
+ * You can now set empty POST fields.
1286
+ * The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files.
1287
+ * Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
1288
+ * CS updates
1289
+
1290
+ ## 2.6.2 - 2012-05-19
1291
+
1292
+ * [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method.
1293
+
1294
+ ## 2.6.1 - 2012-05-19
1295
+
1296
+ * [BC] Removing 'path' support in service descriptions. Use 'uri'.
1297
+ * [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
1298
+ * [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it.
1299
+ * [BC] Removing Guzzle\Common\XmlElement.
1300
+ * All commands, both dynamic and concrete, have ApiCommand objects.
1301
+ * Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits.
1302
+ * Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
1303
+ * Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
1304
+
1305
+ ## 2.6.0 - 2012-05-15
1306
+
1307
+ * [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
1308
+ * [BC] Executing a Command returns the result of the command rather than the command
1309
+ * [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed.
1310
+ * [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args.
1311
+ * [BC] Moving ResourceIterator* to Guzzle\Service\Resource
1312
+ * [BC] Completely refactored ResourceIterators to iterate over a cloned command object
1313
+ * [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate
1314
+ * [BC] Guzzle\Guzzle is now deprecated
1315
+ * Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject
1316
+ * Adding Guzzle\Version class to give version information about Guzzle
1317
+ * Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate()
1318
+ * Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data
1319
+ * ServiceDescription and ServiceBuilder are now cacheable using similar configs
1320
+ * Changing the format of XML and JSON service builder configs. Backwards compatible.
1321
+ * Cleaned up Cookie parsing
1322
+ * Trimming the default Guzzle User-Agent header
1323
+ * Adding a setOnComplete() method to Commands that is called when a command completes
1324
+ * Keeping track of requests that were mocked in the MockPlugin
1325
+ * Fixed a caching bug in the CacheAdapterFactory
1326
+ * Inspector objects can be injected into a Command object
1327
+ * Refactoring a lot of code and tests to be case insensitive when dealing with headers
1328
+ * Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL
1329
+ * Adding the ability to set global option overrides to service builder configs
1330
+ * Adding the ability to include other service builder config files from within XML and JSON files
1331
+ * Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
1332
+
1333
+ ## 2.5.0 - 2012-05-08
1334
+
1335
+ * Major performance improvements
1336
+ * [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated.
1337
+ * [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component.
1338
+ * [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}"
1339
+ * Added the ability to passed parameters to all requests created by a client
1340
+ * Added callback functionality to the ExponentialBackoffPlugin
1341
+ * Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies.
1342
+ * Rewinding request stream bodies when retrying requests
1343
+ * Exception is thrown when JSON response body cannot be decoded
1344
+ * Added configurable magic method calls to clients and commands. This is off by default.
1345
+ * Fixed a defect that added a hash to every parsed URL part
1346
+ * Fixed duplicate none generation for OauthPlugin.
1347
+ * Emitting an event each time a client is generated by a ServiceBuilder
1348
+ * Using an ApiParams object instead of a Collection for parameters of an ApiCommand
1349
+ * cache.* request parameters should be renamed to params.cache.*
1350
+ * Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle.
1351
+ * Added the ability to disable type validation of service descriptions
1352
+ * ServiceDescriptions and ServiceBuilders are now Serializable
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM composer:latest as setup
2
+
3
+ RUN mkdir /guzzle
4
+
5
+ WORKDIR /guzzle
6
+
7
+ RUN set -xe \
8
+ && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár <mark.sagikazar@gmail.com>" --no-interaction \
9
+ && composer require guzzlehttp/guzzle
10
+
11
+
12
+ FROM php:7.3
13
+
14
+ RUN mkdir /guzzle
15
+
16
+ WORKDIR /guzzle
17
+
18
+ COPY --from=setup /guzzle /guzzle
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/LICENSE ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2011 Michael Dowling <mtdowling@gmail.com>
4
+ Copyright (c) 2012 Jeremy Lindblom <jeremeamia@gmail.com>
5
+ Copyright (c) 2014 Graham Campbell <hello@gjcampbell.co.uk>
6
+ Copyright (c) 2015 Márk Sági-Kazár <mark.sagikazar@gmail.com>
7
+ Copyright (c) 2015 Tobias Schultze <webmaster@tubo-world.de>
8
+ Copyright (c) 2016 Tobias Nyholm <tobias.nyholm@gmail.com>
9
+ Copyright (c) 2016 George Mponos <gmponos@gmail.com>
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in
19
+ all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+ THE SOFTWARE.
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/UPGRADING.md ADDED
@@ -0,0 +1,1203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Guzzle Upgrade Guide
2
+ ====================
3
+
4
+ 5.0 to 6.0
5
+ ----------
6
+
7
+ Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages.
8
+ Due to the fact that these messages are immutable, this prompted a refactoring
9
+ of Guzzle to use a middleware based system rather than an event system. Any
10
+ HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
11
+ updated to work with the new immutable PSR-7 request and response objects. Any
12
+ event listeners or subscribers need to be updated to become middleware
13
+ functions that wrap handlers (or are injected into a
14
+ `GuzzleHttp\HandlerStack`).
15
+
16
+ - Removed `GuzzleHttp\BatchResults`
17
+ - Removed `GuzzleHttp\Collection`
18
+ - Removed `GuzzleHttp\HasDataTrait`
19
+ - Removed `GuzzleHttp\ToArrayInterface`
20
+ - The `guzzlehttp/streams` dependency has been removed. Stream functionality
21
+ is now present in the `GuzzleHttp\Psr7` namespace provided by the
22
+ `guzzlehttp/psr7` package.
23
+ - Guzzle no longer uses ReactPHP promises and now uses the
24
+ `guzzlehttp/promises` library. We use a custom promise library for three
25
+ significant reasons:
26
+ 1. React promises (at the time of writing this) are recursive. Promise
27
+ chaining and promise resolution will eventually blow the stack. Guzzle
28
+ promises are not recursive as they use a sort of trampolining technique.
29
+ Note: there has been movement in the React project to modify promises to
30
+ no longer utilize recursion.
31
+ 2. Guzzle needs to have the ability to synchronously block on a promise to
32
+ wait for a result. Guzzle promises allows this functionality (and does
33
+ not require the use of recursion).
34
+ 3. Because we need to be able to wait on a result, doing so using React
35
+ promises requires wrapping react promises with RingPHP futures. This
36
+ overhead is no longer needed, reducing stack sizes, reducing complexity,
37
+ and improving performance.
38
+ - `GuzzleHttp\Mimetypes` has been moved to a function in
39
+ `GuzzleHttp\Psr7\mimetype_from_extension` and
40
+ `GuzzleHttp\Psr7\mimetype_from_filename`.
41
+ - `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query
42
+ strings must now be passed into request objects as strings, or provided to
43
+ the `query` request option when creating requests with clients. The `query`
44
+ option uses PHP's `http_build_query` to convert an array to a string. If you
45
+ need a different serialization technique, you will need to pass the query
46
+ string in as a string. There are a couple helper functions that will make
47
+ working with query strings easier: `GuzzleHttp\Psr7\parse_query` and
48
+ `GuzzleHttp\Psr7\build_query`.
49
+ - Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware
50
+ system based on PSR-7, using RingPHP and it's middleware system as well adds
51
+ more complexity than the benefits it provides. All HTTP handlers that were
52
+ present in RingPHP have been modified to work directly with PSR-7 messages
53
+ and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces
54
+ complexity in Guzzle, removes a dependency, and improves performance. RingPHP
55
+ will be maintained for Guzzle 5 support, but will no longer be a part of
56
+ Guzzle 6.
57
+ - As Guzzle now uses a middleware based systems the event system and RingPHP
58
+ integration has been removed. Note: while the event system has been removed,
59
+ it is possible to add your own type of event system that is powered by the
60
+ middleware system.
61
+ - Removed the `Event` namespace.
62
+ - Removed the `Subscriber` namespace.
63
+ - Removed `Transaction` class
64
+ - Removed `RequestFsm`
65
+ - Removed `RingBridge`
66
+ - `GuzzleHttp\Subscriber\Cookie` is now provided by
67
+ `GuzzleHttp\Middleware::cookies`
68
+ - `GuzzleHttp\Subscriber\HttpError` is now provided by
69
+ `GuzzleHttp\Middleware::httpError`
70
+ - `GuzzleHttp\Subscriber\History` is now provided by
71
+ `GuzzleHttp\Middleware::history`
72
+ - `GuzzleHttp\Subscriber\Mock` is now provided by
73
+ `GuzzleHttp\Handler\MockHandler`
74
+ - `GuzzleHttp\Subscriber\Prepare` is now provided by
75
+ `GuzzleHttp\PrepareBodyMiddleware`
76
+ - `GuzzleHttp\Subscriber\Redirect` is now provided by
77
+ `GuzzleHttp\RedirectMiddleware`
78
+ - Guzzle now uses `Psr\Http\Message\UriInterface` (implements in
79
+ `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone.
80
+ - Static functions in `GuzzleHttp\Utils` have been moved to namespaced
81
+ functions under the `GuzzleHttp` namespace. This requires either a Composer
82
+ based autoloader or you to include functions.php.
83
+ - `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to
84
+ `GuzzleHttp\ClientInterface::getConfig`.
85
+ - `GuzzleHttp\ClientInterface::setDefaultOption` has been removed.
86
+ - The `json` and `xml` methods of response objects has been removed. With the
87
+ migration to strictly adhering to PSR-7 as the interface for Guzzle messages,
88
+ adding methods to message interfaces would actually require Guzzle messages
89
+ to extend from PSR-7 messages rather then work with them directly.
90
+
91
+ ## Migrating to middleware
92
+
93
+ The change to PSR-7 unfortunately required significant refactoring to Guzzle
94
+ due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event
95
+ system from plugins. The event system relied on mutability of HTTP messages and
96
+ side effects in order to work. With immutable messages, you have to change your
97
+ workflow to become more about either returning a value (e.g., functional
98
+ middlewares) or setting a value on an object. Guzzle v6 has chosen the
99
+ functional middleware approach.
100
+
101
+ Instead of using the event system to listen for things like the `before` event,
102
+ you now create a stack based middleware function that intercepts a request on
103
+ the way in and the promise of the response on the way out. This is a much
104
+ simpler and more predictable approach than the event system and works nicely
105
+ with PSR-7 middleware. Due to the use of promises, the middleware system is
106
+ also asynchronous.
107
+
108
+ v5:
109
+
110
+ ```php
111
+ use GuzzleHttp\Event\BeforeEvent;
112
+ $client = new GuzzleHttp\Client();
113
+ // Get the emitter and listen to the before event.
114
+ $client->getEmitter()->on('before', function (BeforeEvent $e) {
115
+ // Guzzle v5 events relied on mutation
116
+ $e->getRequest()->setHeader('X-Foo', 'Bar');
117
+ });
118
+ ```
119
+
120
+ v6:
121
+
122
+ In v6, you can modify the request before it is sent using the `mapRequest`
123
+ middleware. The idiomatic way in v6 to modify the request/response lifecycle is
124
+ to setup a handler middleware stack up front and inject the handler into a
125
+ client.
126
+
127
+ ```php
128
+ use GuzzleHttp\Middleware;
129
+ // Create a handler stack that has all of the default middlewares attached
130
+ $handler = GuzzleHttp\HandlerStack::create();
131
+ // Push the handler onto the handler stack
132
+ $handler->push(Middleware::mapRequest(function (RequestInterface $request) {
133
+ // Notice that we have to return a request object
134
+ return $request->withHeader('X-Foo', 'Bar');
135
+ }));
136
+ // Inject the handler into the client
137
+ $client = new GuzzleHttp\Client(['handler' => $handler]);
138
+ ```
139
+
140
+ ## POST Requests
141
+
142
+ This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params)
143
+ and `multipart` request options. `form_params` is an associative array of
144
+ strings or array of strings and is used to serialize an
145
+ `application/x-www-form-urlencoded` POST request. The
146
+ [`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart)
147
+ option is now used to send a multipart/form-data POST request.
148
+
149
+ `GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add
150
+ POST files to a multipart/form-data request.
151
+
152
+ The `body` option no longer accepts an array to send POST requests. Please use
153
+ `multipart` or `form_params` instead.
154
+
155
+ The `base_url` option has been renamed to `base_uri`.
156
+
157
+ 4.x to 5.0
158
+ ----------
159
+
160
+ ## Rewritten Adapter Layer
161
+
162
+ Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send
163
+ HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor
164
+ is still supported, but it has now been renamed to `handler`. Instead of
165
+ passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP
166
+ `callable` that follows the RingPHP specification.
167
+
168
+ ## Removed Fluent Interfaces
169
+
170
+ [Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil)
171
+ from the following classes:
172
+
173
+ - `GuzzleHttp\Collection`
174
+ - `GuzzleHttp\Url`
175
+ - `GuzzleHttp\Query`
176
+ - `GuzzleHttp\Post\PostBody`
177
+ - `GuzzleHttp\Cookie\SetCookie`
178
+
179
+ ## Removed functions.php
180
+
181
+ Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following
182
+ functions can be used as replacements.
183
+
184
+ - `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode`
185
+ - `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath`
186
+ - `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path`
187
+ - `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however,
188
+ deprecated in favor of using `GuzzleHttp\Pool::batch()`.
189
+
190
+ The "procedural" global client has been removed with no replacement (e.g.,
191
+ `GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client`
192
+ object as a replacement.
193
+
194
+ ## `throwImmediately` has been removed
195
+
196
+ The concept of "throwImmediately" has been removed from exceptions and error
197
+ events. This control mechanism was used to stop a transfer of concurrent
198
+ requests from completing. This can now be handled by throwing the exception or
199
+ by cancelling a pool of requests or each outstanding future request
200
+ individually.
201
+
202
+ ## headers event has been removed
203
+
204
+ Removed the "headers" event. This event was only useful for changing the
205
+ body a response once the headers of the response were known. You can implement
206
+ a similar behavior in a number of ways. One example might be to use a
207
+ FnStream that has access to the transaction being sent. For example, when the
208
+ first byte is written, you could check if the response headers match your
209
+ expectations, and if so, change the actual stream body that is being
210
+ written to.
211
+
212
+ ## Updates to HTTP Messages
213
+
214
+ Removed the `asArray` parameter from
215
+ `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
216
+ value as an array, then use the newly added `getHeaderAsArray()` method of
217
+ `MessageInterface`. This change makes the Guzzle interfaces compatible with
218
+ the PSR-7 interfaces.
219
+
220
+ 3.x to 4.0
221
+ ----------
222
+
223
+ ## Overarching changes:
224
+
225
+ - Now requires PHP 5.4 or greater.
226
+ - No longer requires cURL to send requests.
227
+ - Guzzle no longer wraps every exception it throws. Only exceptions that are
228
+ recoverable are now wrapped by Guzzle.
229
+ - Various namespaces have been removed or renamed.
230
+ - No longer requiring the Symfony EventDispatcher. A custom event dispatcher
231
+ based on the Symfony EventDispatcher is
232
+ now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant
233
+ speed and functionality improvements).
234
+
235
+ Changes per Guzzle 3.x namespace are described below.
236
+
237
+ ## Batch
238
+
239
+ The `Guzzle\Batch` namespace has been removed. This is best left to
240
+ third-parties to implement on top of Guzzle's core HTTP library.
241
+
242
+ ## Cache
243
+
244
+ The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement
245
+ has been implemented yet, but hoping to utilize a PSR cache interface).
246
+
247
+ ## Common
248
+
249
+ - Removed all of the wrapped exceptions. It's better to use the standard PHP
250
+ library for unrecoverable exceptions.
251
+ - `FromConfigInterface` has been removed.
252
+ - `Guzzle\Common\Version` has been removed. The VERSION constant can be found
253
+ at `GuzzleHttp\ClientInterface::VERSION`.
254
+
255
+ ### Collection
256
+
257
+ - `getAll` has been removed. Use `toArray` to convert a collection to an array.
258
+ - `inject` has been removed.
259
+ - `keySearch` has been removed.
260
+ - `getPath` no longer supports wildcard expressions. Use something better like
261
+ JMESPath for this.
262
+ - `setPath` now supports appending to an existing array via the `[]` notation.
263
+
264
+ ### Events
265
+
266
+ Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses
267
+ `GuzzleHttp\Event\Emitter`.
268
+
269
+ - `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by
270
+ `GuzzleHttp\Event\EmitterInterface`.
271
+ - `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by
272
+ `GuzzleHttp\Event\Emitter`.
273
+ - `Symfony\Component\EventDispatcher\Event` is replaced by
274
+ `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in
275
+ `GuzzleHttp\Event\EventInterface`.
276
+ - `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and
277
+ `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the
278
+ event emitter of a request, client, etc. now uses the `getEmitter` method
279
+ rather than the `getDispatcher` method.
280
+
281
+ #### Emitter
282
+
283
+ - Use the `once()` method to add a listener that automatically removes itself
284
+ the first time it is invoked.
285
+ - Use the `listeners()` method to retrieve a list of event listeners rather than
286
+ the `getListeners()` method.
287
+ - Use `emit()` instead of `dispatch()` to emit an event from an emitter.
288
+ - Use `attach()` instead of `addSubscriber()` and `detach()` instead of
289
+ `removeSubscriber()`.
290
+
291
+ ```php
292
+ $mock = new Mock();
293
+ // 3.x
294
+ $request->getEventDispatcher()->addSubscriber($mock);
295
+ $request->getEventDispatcher()->removeSubscriber($mock);
296
+ // 4.x
297
+ $request->getEmitter()->attach($mock);
298
+ $request->getEmitter()->detach($mock);
299
+ ```
300
+
301
+ Use the `on()` method to add a listener rather than the `addListener()` method.
302
+
303
+ ```php
304
+ // 3.x
305
+ $request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } );
306
+ // 4.x
307
+ $request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } );
308
+ ```
309
+
310
+ ## Http
311
+
312
+ ### General changes
313
+
314
+ - The cacert.pem certificate has been moved to `src/cacert.pem`.
315
+ - Added the concept of adapters that are used to transfer requests over the
316
+ wire.
317
+ - Simplified the event system.
318
+ - Sending requests in parallel is still possible, but batching is no longer a
319
+ concept of the HTTP layer. Instead, you must use the `complete` and `error`
320
+ events to asynchronously manage parallel request transfers.
321
+ - `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`.
322
+ - `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`.
323
+ - QueryAggregators have been rewritten so that they are simply callable
324
+ functions.
325
+ - `GuzzleHttp\StaticClient` has been removed. Use the functions provided in
326
+ `functions.php` for an easy to use static client instance.
327
+ - Exceptions in `GuzzleHttp\Exception` have been updated to all extend from
328
+ `GuzzleHttp\Exception\TransferException`.
329
+
330
+ ### Client
331
+
332
+ Calling methods like `get()`, `post()`, `head()`, etc. no longer create and
333
+ return a request, but rather creates a request, sends the request, and returns
334
+ the response.
335
+
336
+ ```php
337
+ // 3.0
338
+ $request = $client->get('/');
339
+ $response = $request->send();
340
+
341
+ // 4.0
342
+ $response = $client->get('/');
343
+
344
+ // or, to mirror the previous behavior
345
+ $request = $client->createRequest('GET', '/');
346
+ $response = $client->send($request);
347
+ ```
348
+
349
+ `GuzzleHttp\ClientInterface` has changed.
350
+
351
+ - The `send` method no longer accepts more than one request. Use `sendAll` to
352
+ send multiple requests in parallel.
353
+ - `setUserAgent()` has been removed. Use a default request option instead. You
354
+ could, for example, do something like:
355
+ `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`.
356
+ - `setSslVerification()` has been removed. Use default request options instead,
357
+ like `$client->setConfig('defaults/verify', true)`.
358
+
359
+ `GuzzleHttp\Client` has changed.
360
+
361
+ - The constructor now accepts only an associative array. You can include a
362
+ `base_url` string or array to use a URI template as the base URL of a client.
363
+ You can also specify a `defaults` key that is an associative array of default
364
+ request options. You can pass an `adapter` to use a custom adapter,
365
+ `batch_adapter` to use a custom adapter for sending requests in parallel, or
366
+ a `message_factory` to change the factory used to create HTTP requests and
367
+ responses.
368
+ - The client no longer emits a `client.create_request` event.
369
+ - Creating requests with a client no longer automatically utilize a URI
370
+ template. You must pass an array into a creational method (e.g.,
371
+ `createRequest`, `get`, `put`, etc.) in order to expand a URI template.
372
+
373
+ ### Messages
374
+
375
+ Messages no longer have references to their counterparts (i.e., a request no
376
+ longer has a reference to it's response, and a response no loger has a
377
+ reference to its request). This association is now managed through a
378
+ `GuzzleHttp\Adapter\TransactionInterface` object. You can get references to
379
+ these transaction objects using request events that are emitted over the
380
+ lifecycle of a request.
381
+
382
+ #### Requests with a body
383
+
384
+ - `GuzzleHttp\Message\EntityEnclosingRequest` and
385
+ `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The
386
+ separation between requests that contain a body and requests that do not
387
+ contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface`
388
+ handles both use cases.
389
+ - Any method that previously accepts a `GuzzleHttp\Response` object now accept a
390
+ `GuzzleHttp\Message\ResponseInterface`.
391
+ - `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to
392
+ `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create
393
+ both requests and responses and is implemented in
394
+ `GuzzleHttp\Message\MessageFactory`.
395
+ - POST field and file methods have been removed from the request object. You
396
+ must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface`
397
+ to control the format of a POST body. Requests that are created using a
398
+ standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use
399
+ a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if
400
+ the method is POST and no body is provided.
401
+
402
+ ```php
403
+ $request = $client->createRequest('POST', '/');
404
+ $request->getBody()->setField('foo', 'bar');
405
+ $request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r')));
406
+ ```
407
+
408
+ #### Headers
409
+
410
+ - `GuzzleHttp\Message\Header` has been removed. Header values are now simply
411
+ represented by an array of values or as a string. Header values are returned
412
+ as a string by default when retrieving a header value from a message. You can
413
+ pass an optional argument of `true` to retrieve a header value as an array
414
+ of strings instead of a single concatenated string.
415
+ - `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to
416
+ `GuzzleHttp\Post`. This interface has been simplified and now allows the
417
+ addition of arbitrary headers.
418
+ - Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most
419
+ of the custom headers are now handled separately in specific
420
+ subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has
421
+ been updated to properly handle headers that contain parameters (like the
422
+ `Link` header).
423
+
424
+ #### Responses
425
+
426
+ - `GuzzleHttp\Message\Response::getInfo()` and
427
+ `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event
428
+ system to retrieve this type of information.
429
+ - `GuzzleHttp\Message\Response::getRawHeaders()` has been removed.
430
+ - `GuzzleHttp\Message\Response::getMessage()` has been removed.
431
+ - `GuzzleHttp\Message\Response::calculateAge()` and other cache specific
432
+ methods have moved to the CacheSubscriber.
433
+ - Header specific helper functions like `getContentMd5()` have been removed.
434
+ Just use `getHeader('Content-MD5')` instead.
435
+ - `GuzzleHttp\Message\Response::setRequest()` and
436
+ `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event
437
+ system to work with request and response objects as a transaction.
438
+ - `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the
439
+ Redirect subscriber instead.
440
+ - `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have
441
+ been removed. Use `getStatusCode()` instead.
442
+
443
+ #### Streaming responses
444
+
445
+ Streaming requests can now be created by a client directly, returning a
446
+ `GuzzleHttp\Message\ResponseInterface` object that contains a body stream
447
+ referencing an open PHP HTTP stream.
448
+
449
+ ```php
450
+ // 3.0
451
+ use Guzzle\Stream\PhpStreamRequestFactory;
452
+ $request = $client->get('/');
453
+ $factory = new PhpStreamRequestFactory();
454
+ $stream = $factory->fromRequest($request);
455
+ $data = $stream->read(1024);
456
+
457
+ // 4.0
458
+ $response = $client->get('/', ['stream' => true]);
459
+ // Read some data off of the stream in the response body
460
+ $data = $response->getBody()->read(1024);
461
+ ```
462
+
463
+ #### Redirects
464
+
465
+ The `configureRedirects()` method has been removed in favor of a
466
+ `allow_redirects` request option.
467
+
468
+ ```php
469
+ // Standard redirects with a default of a max of 5 redirects
470
+ $request = $client->createRequest('GET', '/', ['allow_redirects' => true]);
471
+
472
+ // Strict redirects with a custom number of redirects
473
+ $request = $client->createRequest('GET', '/', [
474
+ 'allow_redirects' => ['max' => 5, 'strict' => true]
475
+ ]);
476
+ ```
477
+
478
+ #### EntityBody
479
+
480
+ EntityBody interfaces and classes have been removed or moved to
481
+ `GuzzleHttp\Stream`. All classes and interfaces that once required
482
+ `GuzzleHttp\EntityBodyInterface` now require
483
+ `GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no
484
+ longer uses `GuzzleHttp\EntityBody::factory` but now uses
485
+ `GuzzleHttp\Stream\Stream::factory` or even better:
486
+ `GuzzleHttp\Stream\create()`.
487
+
488
+ - `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface`
489
+ - `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream`
490
+ - `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream`
491
+ - `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream`
492
+ - `Guzzle\Http\IoEmittyinEntityBody` has been removed.
493
+
494
+ #### Request lifecycle events
495
+
496
+ Requests previously submitted a large number of requests. The number of events
497
+ emitted over the lifecycle of a request has been significantly reduced to make
498
+ it easier to understand how to extend the behavior of a request. All events
499
+ emitted during the lifecycle of a request now emit a custom
500
+ `GuzzleHttp\Event\EventInterface` object that contains context providing
501
+ methods and a way in which to modify the transaction at that specific point in
502
+ time (e.g., intercept the request and set a response on the transaction).
503
+
504
+ - `request.before_send` has been renamed to `before` and now emits a
505
+ `GuzzleHttp\Event\BeforeEvent`
506
+ - `request.complete` has been renamed to `complete` and now emits a
507
+ `GuzzleHttp\Event\CompleteEvent`.
508
+ - `request.sent` has been removed. Use `complete`.
509
+ - `request.success` has been removed. Use `complete`.
510
+ - `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`.
511
+ - `request.exception` has been removed. Use `error`.
512
+ - `request.receive.status_line` has been removed.
513
+ - `curl.callback.progress` has been removed. Use a custom `StreamInterface` to
514
+ maintain a status update.
515
+ - `curl.callback.write` has been removed. Use a custom `StreamInterface` to
516
+ intercept writes.
517
+ - `curl.callback.read` has been removed. Use a custom `StreamInterface` to
518
+ intercept reads.
519
+
520
+ `headers` is a new event that is emitted after the response headers of a
521
+ request have been received before the body of the response is downloaded. This
522
+ event emits a `GuzzleHttp\Event\HeadersEvent`.
523
+
524
+ You can intercept a request and inject a response using the `intercept()` event
525
+ of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and
526
+ `GuzzleHttp\Event\ErrorEvent` event.
527
+
528
+ See: http://docs.guzzlephp.org/en/latest/events.html
529
+
530
+ ## Inflection
531
+
532
+ The `Guzzle\Inflection` namespace has been removed. This is not a core concern
533
+ of Guzzle.
534
+
535
+ ## Iterator
536
+
537
+ The `Guzzle\Iterator` namespace has been removed.
538
+
539
+ - `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and
540
+ `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of
541
+ Guzzle itself.
542
+ - `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent
543
+ class is shipped with PHP 5.4.
544
+ - `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because
545
+ it's easier to just wrap an iterator in a generator that maps values.
546
+
547
+ For a replacement of these iterators, see https://github.com/nikic/iter
548
+
549
+ ## Log
550
+
551
+ The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The
552
+ `Guzzle\Log` namespace has been removed. Guzzle now relies on
553
+ `Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been
554
+ moved to `GuzzleHttp\Subscriber\Log\Formatter`.
555
+
556
+ ## Parser
557
+
558
+ The `Guzzle\Parser` namespace has been removed. This was previously used to
559
+ make it possible to plug in custom parsers for cookies, messages, URI
560
+ templates, and URLs; however, this level of complexity is not needed in Guzzle
561
+ so it has been removed.
562
+
563
+ - Cookie: Cookie parsing logic has been moved to
564
+ `GuzzleHttp\Cookie\SetCookie::fromString`.
565
+ - Message: Message parsing logic for both requests and responses has been moved
566
+ to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only
567
+ used in debugging or deserializing messages, so it doesn't make sense for
568
+ Guzzle as a library to add this level of complexity to parsing messages.
569
+ - UriTemplate: URI template parsing has been moved to
570
+ `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL
571
+ URI template library if it is installed.
572
+ - Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously
573
+ it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary,
574
+ then developers are free to subclass `GuzzleHttp\Url`.
575
+
576
+ ## Plugin
577
+
578
+ The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`.
579
+ Several plugins are shipping with the core Guzzle library under this namespace.
580
+
581
+ - `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar
582
+ code has moved to `GuzzleHttp\Cookie`.
583
+ - `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin.
584
+ - `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is
585
+ received.
586
+ - `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin.
587
+ - `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before
588
+ sending. This subscriber is attached to all requests by default.
589
+ - `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin.
590
+
591
+ The following plugins have been removed (third-parties are free to re-implement
592
+ these if needed):
593
+
594
+ - `GuzzleHttp\Plugin\Async` has been removed.
595
+ - `GuzzleHttp\Plugin\CurlAuth` has been removed.
596
+ - `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This
597
+ functionality should instead be implemented with event listeners that occur
598
+ after normal response parsing occurs in the guzzle/command package.
599
+
600
+ The following plugins are not part of the core Guzzle package, but are provided
601
+ in separate repositories:
602
+
603
+ - `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler
604
+ to build custom retry policies using simple functions rather than various
605
+ chained classes. See: https://github.com/guzzle/retry-subscriber
606
+ - `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to
607
+ https://github.com/guzzle/cache-subscriber
608
+ - `Guzzle\Http\Plugin\Log\LogPlugin` has moved to
609
+ https://github.com/guzzle/log-subscriber
610
+ - `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to
611
+ https://github.com/guzzle/message-integrity-subscriber
612
+ - `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to
613
+ `GuzzleHttp\Subscriber\MockSubscriber`.
614
+ - `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to
615
+ https://github.com/guzzle/oauth-subscriber
616
+
617
+ ## Service
618
+
619
+ The service description layer of Guzzle has moved into two separate packages:
620
+
621
+ - http://github.com/guzzle/command Provides a high level abstraction over web
622
+ services by representing web service operations using commands.
623
+ - http://github.com/guzzle/guzzle-services Provides an implementation of
624
+ guzzle/command that provides request serialization and response parsing using
625
+ Guzzle service descriptions.
626
+
627
+ ## Stream
628
+
629
+ Stream have moved to a separate package available at
630
+ https://github.com/guzzle/streams.
631
+
632
+ `Guzzle\Stream\StreamInterface` has been given a large update to cleanly take
633
+ on the responsibilities of `Guzzle\Http\EntityBody` and
634
+ `Guzzle\Http\EntityBodyInterface` now that they have been removed. The number
635
+ of methods implemented by the `StreamInterface` has been drastically reduced to
636
+ allow developers to more easily extend and decorate stream behavior.
637
+
638
+ ## Removed methods from StreamInterface
639
+
640
+ - `getStream` and `setStream` have been removed to better encapsulate streams.
641
+ - `getMetadata` and `setMetadata` have been removed in favor of
642
+ `GuzzleHttp\Stream\MetadataStreamInterface`.
643
+ - `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been
644
+ removed. This data is accessible when
645
+ using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`.
646
+ - `rewind` has been removed. Use `seek(0)` for a similar behavior.
647
+
648
+ ## Renamed methods
649
+
650
+ - `detachStream` has been renamed to `detach`.
651
+ - `feof` has been renamed to `eof`.
652
+ - `ftell` has been renamed to `tell`.
653
+ - `readLine` has moved from an instance method to a static class method of
654
+ `GuzzleHttp\Stream\Stream`.
655
+
656
+ ## Metadata streams
657
+
658
+ `GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams
659
+ that contain additional metadata accessible via `getMetadata()`.
660
+ `GuzzleHttp\Stream\StreamInterface::getMetadata` and
661
+ `GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed.
662
+
663
+ ## StreamRequestFactory
664
+
665
+ The entire concept of the StreamRequestFactory has been removed. The way this
666
+ was used in Guzzle 3 broke the actual interface of sending streaming requests
667
+ (instead of getting back a Response, you got a StreamInterface). Streaming
668
+ PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`.
669
+
670
+ 3.6 to 3.7
671
+ ----------
672
+
673
+ ### Deprecations
674
+
675
+ - You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.:
676
+
677
+ ```php
678
+ \Guzzle\Common\Version::$emitWarnings = true;
679
+ ```
680
+
681
+ The following APIs and options have been marked as deprecated:
682
+
683
+ - Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead.
684
+ - Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
685
+ - Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
686
+ - Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
687
+ - Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
688
+ - Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
689
+ - Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
690
+ - Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
691
+ - Marked `Guzzle\Common\Collection::inject()` as deprecated.
692
+ - Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use
693
+ `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or
694
+ `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));`
695
+
696
+ 3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational
697
+ request methods. When paired with a client's configuration settings, these options allow you to specify default settings
698
+ for various aspects of a request. Because these options make other previous configuration options redundant, several
699
+ configuration options and methods of a client and AbstractCommand have been deprecated.
700
+
701
+ - Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`.
702
+ - Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`.
703
+ - Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')`
704
+ - Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0
705
+
706
+ $command = $client->getCommand('foo', array(
707
+ 'command.headers' => array('Test' => '123'),
708
+ 'command.response_body' => '/path/to/file'
709
+ ));
710
+
711
+ // Should be changed to:
712
+
713
+ $command = $client->getCommand('foo', array(
714
+ 'command.request_options' => array(
715
+ 'headers' => array('Test' => '123'),
716
+ 'save_as' => '/path/to/file'
717
+ )
718
+ ));
719
+
720
+ ### Interface changes
721
+
722
+ Additions and changes (you will need to update any implementations or subclasses you may have created):
723
+
724
+ - Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
725
+ createRequest, head, delete, put, patch, post, options, prepareRequest
726
+ - Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
727
+ - Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
728
+ - Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
729
+ `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
730
+ resource, string, or EntityBody into the $options parameter to specify the download location of the response.
731
+ - Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
732
+ default `array()`
733
+ - Added `Guzzle\Stream\StreamInterface::isRepeatable`
734
+ - Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
735
+
736
+ The following methods were removed from interfaces. All of these methods are still available in the concrete classes
737
+ that implement them, but you should update your code to use alternative methods:
738
+
739
+ - Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
740
+ `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
741
+ `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or
742
+ `$client->setDefaultOption('headers/{header_name}', 'value')`. or
743
+ `$client->setDefaultOption('headers', array('header_name' => 'value'))`.
744
+ - Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`.
745
+ - Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail.
746
+ - Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail.
747
+ - Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail.
748
+ - Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin.
749
+ - Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin.
750
+ - Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin.
751
+
752
+ ### Cache plugin breaking changes
753
+
754
+ - CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
755
+ CacheStorageInterface. These two objects and interface will be removed in a future version.
756
+ - Always setting X-cache headers on cached responses
757
+ - Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
758
+ - `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
759
+ $request, Response $response);`
760
+ - `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
761
+ - `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
762
+ - Added `CacheStorageInterface::purge($url)`
763
+ - `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
764
+ $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
765
+ CanCacheStrategyInterface $canCache = null)`
766
+ - Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
767
+
768
+ 3.5 to 3.6
769
+ ----------
770
+
771
+ * Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
772
+ * Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
773
+ * Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
774
+ For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader().
775
+ Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request.
776
+ * Specific header implementations can be created for complex headers. When a message creates a header, it uses a
777
+ HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
778
+ CacheControl header implementation.
779
+ * Moved getLinks() from Response to just be used on a Link header object.
780
+
781
+ If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the
782
+ HeaderInterface (e.g. toArray(), getAll(), etc.).
783
+
784
+ ### Interface changes
785
+
786
+ * Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
787
+ * Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
788
+ * Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
789
+ Guzzle\Http\Curl\RequestMediator
790
+ * Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
791
+ * Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
792
+ * Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
793
+
794
+ ### Removed deprecated functions
795
+
796
+ * Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
797
+ * Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
798
+
799
+ ### Deprecations
800
+
801
+ * The ability to case-insensitively search for header values
802
+ * Guzzle\Http\Message\Header::hasExactHeader
803
+ * Guzzle\Http\Message\Header::raw. Use getAll()
804
+ * Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
805
+ instead.
806
+
807
+ ### Other changes
808
+
809
+ * All response header helper functions return a string rather than mixing Header objects and strings inconsistently
810
+ * Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
811
+ directly via interfaces
812
+ * Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
813
+ but are a no-op until removed.
814
+ * Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
815
+ `Guzzle\Service\Command\ArrayCommandInterface`.
816
+ * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
817
+ on a request while the request is still being transferred
818
+ * `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
819
+
820
+ 3.3 to 3.4
821
+ ----------
822
+
823
+ Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
824
+
825
+ 3.2 to 3.3
826
+ ----------
827
+
828
+ ### Response::getEtag() quote stripping removed
829
+
830
+ `Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header
831
+
832
+ ### Removed `Guzzle\Http\Utils`
833
+
834
+ The `Guzzle\Http\Utils` class was removed. This class was only used for testing.
835
+
836
+ ### Stream wrapper and type
837
+
838
+ `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase.
839
+
840
+ ### curl.emit_io became emit_io
841
+
842
+ Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the
843
+ 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
844
+
845
+ 3.1 to 3.2
846
+ ----------
847
+
848
+ ### CurlMulti is no longer reused globally
849
+
850
+ Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added
851
+ to a single client can pollute requests dispatched from other clients.
852
+
853
+ If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the
854
+ ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is
855
+ created.
856
+
857
+ ```php
858
+ $multi = new Guzzle\Http\Curl\CurlMulti();
859
+ $builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json');
860
+ $builder->addListener('service_builder.create_client', function ($event) use ($multi) {
861
+ $event['client']->setCurlMulti($multi);
862
+ }
863
+ });
864
+ ```
865
+
866
+ ### No default path
867
+
868
+ URLs no longer have a default path value of '/' if no path was specified.
869
+
870
+ Before:
871
+
872
+ ```php
873
+ $request = $client->get('http://www.foo.com');
874
+ echo $request->getUrl();
875
+ // >> http://www.foo.com/
876
+ ```
877
+
878
+ After:
879
+
880
+ ```php
881
+ $request = $client->get('http://www.foo.com');
882
+ echo $request->getUrl();
883
+ // >> http://www.foo.com
884
+ ```
885
+
886
+ ### Less verbose BadResponseException
887
+
888
+ The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and
889
+ response information. You can, however, get access to the request and response object by calling `getRequest()` or
890
+ `getResponse()` on the exception object.
891
+
892
+ ### Query parameter aggregation
893
+
894
+ Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a
895
+ setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is
896
+ responsible for handling the aggregation of multi-valued query string variables into a flattened hash.
897
+
898
+ 2.8 to 3.x
899
+ ----------
900
+
901
+ ### Guzzle\Service\Inspector
902
+
903
+ Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig`
904
+
905
+ **Before**
906
+
907
+ ```php
908
+ use Guzzle\Service\Inspector;
909
+
910
+ class YourClient extends \Guzzle\Service\Client
911
+ {
912
+ public static function factory($config = array())
913
+ {
914
+ $default = array();
915
+ $required = array('base_url', 'username', 'api_key');
916
+ $config = Inspector::fromConfig($config, $default, $required);
917
+
918
+ $client = new self(
919
+ $config->get('base_url'),
920
+ $config->get('username'),
921
+ $config->get('api_key')
922
+ );
923
+ $client->setConfig($config);
924
+
925
+ $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
926
+
927
+ return $client;
928
+ }
929
+ ```
930
+
931
+ **After**
932
+
933
+ ```php
934
+ use Guzzle\Common\Collection;
935
+
936
+ class YourClient extends \Guzzle\Service\Client
937
+ {
938
+ public static function factory($config = array())
939
+ {
940
+ $default = array();
941
+ $required = array('base_url', 'username', 'api_key');
942
+ $config = Collection::fromConfig($config, $default, $required);
943
+
944
+ $client = new self(
945
+ $config->get('base_url'),
946
+ $config->get('username'),
947
+ $config->get('api_key')
948
+ );
949
+ $client->setConfig($config);
950
+
951
+ $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
952
+
953
+ return $client;
954
+ }
955
+ ```
956
+
957
+ ### Convert XML Service Descriptions to JSON
958
+
959
+ **Before**
960
+
961
+ ```xml
962
+ <?xml version="1.0" encoding="UTF-8"?>
963
+ <client>
964
+ <commands>
965
+ <!-- Groups -->
966
+ <command name="list_groups" method="GET" uri="groups.json">
967
+ <doc>Get a list of groups</doc>
968
+ </command>
969
+ <command name="search_groups" method="GET" uri='search.json?query="{{query}} type:group"'>
970
+ <doc>Uses a search query to get a list of groups</doc>
971
+ <param name="query" type="string" required="true" />
972
+ </command>
973
+ <command name="create_group" method="POST" uri="groups.json">
974
+ <doc>Create a group</doc>
975
+ <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
976
+ <param name="Content-Type" location="header" static="application/json"/>
977
+ </command>
978
+ <command name="delete_group" method="DELETE" uri="groups/{{id}}.json">
979
+ <doc>Delete a group by ID</doc>
980
+ <param name="id" type="integer" required="true"/>
981
+ </command>
982
+ <command name="get_group" method="GET" uri="groups/{{id}}.json">
983
+ <param name="id" type="integer" required="true"/>
984
+ </command>
985
+ <command name="update_group" method="PUT" uri="groups/{{id}}.json">
986
+ <doc>Update a group</doc>
987
+ <param name="id" type="integer" required="true"/>
988
+ <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
989
+ <param name="Content-Type" location="header" static="application/json"/>
990
+ </command>
991
+ </commands>
992
+ </client>
993
+ ```
994
+
995
+ **After**
996
+
997
+ ```json
998
+ {
999
+ "name": "Zendesk REST API v2",
1000
+ "apiVersion": "2012-12-31",
1001
+ "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users",
1002
+ "operations": {
1003
+ "list_groups": {
1004
+ "httpMethod":"GET",
1005
+ "uri": "groups.json",
1006
+ "summary": "Get a list of groups"
1007
+ },
1008
+ "search_groups":{
1009
+ "httpMethod":"GET",
1010
+ "uri": "search.json?query=\"{query} type:group\"",
1011
+ "summary": "Uses a search query to get a list of groups",
1012
+ "parameters":{
1013
+ "query":{
1014
+ "location": "uri",
1015
+ "description":"Zendesk Search Query",
1016
+ "type": "string",
1017
+ "required": true
1018
+ }
1019
+ }
1020
+ },
1021
+ "create_group": {
1022
+ "httpMethod":"POST",
1023
+ "uri": "groups.json",
1024
+ "summary": "Create a group",
1025
+ "parameters":{
1026
+ "data": {
1027
+ "type": "array",
1028
+ "location": "body",
1029
+ "description":"Group JSON",
1030
+ "filters": "json_encode",
1031
+ "required": true
1032
+ },
1033
+ "Content-Type":{
1034
+ "type": "string",
1035
+ "location":"header",
1036
+ "static": "application/json"
1037
+ }
1038
+ }
1039
+ },
1040
+ "delete_group": {
1041
+ "httpMethod":"DELETE",
1042
+ "uri": "groups/{id}.json",
1043
+ "summary": "Delete a group",
1044
+ "parameters":{
1045
+ "id":{
1046
+ "location": "uri",
1047
+ "description":"Group to delete by ID",
1048
+ "type": "integer",
1049
+ "required": true
1050
+ }
1051
+ }
1052
+ },
1053
+ "get_group": {
1054
+ "httpMethod":"GET",
1055
+ "uri": "groups/{id}.json",
1056
+ "summary": "Get a ticket",
1057
+ "parameters":{
1058
+ "id":{
1059
+ "location": "uri",
1060
+ "description":"Group to get by ID",
1061
+ "type": "integer",
1062
+ "required": true
1063
+ }
1064
+ }
1065
+ },
1066
+ "update_group": {
1067
+ "httpMethod":"PUT",
1068
+ "uri": "groups/{id}.json",
1069
+ "summary": "Update a group",
1070
+ "parameters":{
1071
+ "id": {
1072
+ "location": "uri",
1073
+ "description":"Group to update by ID",
1074
+ "type": "integer",
1075
+ "required": true
1076
+ },
1077
+ "data": {
1078
+ "type": "array",
1079
+ "location": "body",
1080
+ "description":"Group JSON",
1081
+ "filters": "json_encode",
1082
+ "required": true
1083
+ },
1084
+ "Content-Type":{
1085
+ "type": "string",
1086
+ "location":"header",
1087
+ "static": "application/json"
1088
+ }
1089
+ }
1090
+ }
1091
+ }
1092
+ ```
1093
+
1094
+ ### Guzzle\Service\Description\ServiceDescription
1095
+
1096
+ Commands are now called Operations
1097
+
1098
+ **Before**
1099
+
1100
+ ```php
1101
+ use Guzzle\Service\Description\ServiceDescription;
1102
+
1103
+ $sd = new ServiceDescription();
1104
+ $sd->getCommands(); // @returns ApiCommandInterface[]
1105
+ $sd->hasCommand($name);
1106
+ $sd->getCommand($name); // @returns ApiCommandInterface|null
1107
+ $sd->addCommand($command); // @param ApiCommandInterface $command
1108
+ ```
1109
+
1110
+ **After**
1111
+
1112
+ ```php
1113
+ use Guzzle\Service\Description\ServiceDescription;
1114
+
1115
+ $sd = new ServiceDescription();
1116
+ $sd->getOperations(); // @returns OperationInterface[]
1117
+ $sd->hasOperation($name);
1118
+ $sd->getOperation($name); // @returns OperationInterface|null
1119
+ $sd->addOperation($operation); // @param OperationInterface $operation
1120
+ ```
1121
+
1122
+ ### Guzzle\Common\Inflection\Inflector
1123
+
1124
+ Namespace is now `Guzzle\Inflection\Inflector`
1125
+
1126
+ ### Guzzle\Http\Plugin
1127
+
1128
+ Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below.
1129
+
1130
+ ### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log
1131
+
1132
+ Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively.
1133
+
1134
+ **Before**
1135
+
1136
+ ```php
1137
+ use Guzzle\Common\Log\ClosureLogAdapter;
1138
+ use Guzzle\Http\Plugin\LogPlugin;
1139
+
1140
+ /** @var \Guzzle\Http\Client */
1141
+ $client;
1142
+
1143
+ // $verbosity is an integer indicating desired message verbosity level
1144
+ $client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE);
1145
+ ```
1146
+
1147
+ **After**
1148
+
1149
+ ```php
1150
+ use Guzzle\Log\ClosureLogAdapter;
1151
+ use Guzzle\Log\MessageFormatter;
1152
+ use Guzzle\Plugin\Log\LogPlugin;
1153
+
1154
+ /** @var \Guzzle\Http\Client */
1155
+ $client;
1156
+
1157
+ // $format is a string indicating desired message format -- @see MessageFormatter
1158
+ $client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT);
1159
+ ```
1160
+
1161
+ ### Guzzle\Http\Plugin\CurlAuthPlugin
1162
+
1163
+ Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`.
1164
+
1165
+ ### Guzzle\Http\Plugin\ExponentialBackoffPlugin
1166
+
1167
+ Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes.
1168
+
1169
+ **Before**
1170
+
1171
+ ```php
1172
+ use Guzzle\Http\Plugin\ExponentialBackoffPlugin;
1173
+
1174
+ $backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge(
1175
+ ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429)
1176
+ ));
1177
+
1178
+ $client->addSubscriber($backoffPlugin);
1179
+ ```
1180
+
1181
+ **After**
1182
+
1183
+ ```php
1184
+ use Guzzle\Plugin\Backoff\BackoffPlugin;
1185
+ use Guzzle\Plugin\Backoff\HttpBackoffStrategy;
1186
+
1187
+ // Use convenient factory method instead -- see implementation for ideas of what
1188
+ // you can do with chaining backoff strategies
1189
+ $backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge(
1190
+ HttpBackoffStrategy::getDefaultFailureCodes(), array(429)
1191
+ ));
1192
+ $client->addSubscriber($backoffPlugin);
1193
+ ```
1194
+
1195
+ ### Known Issues
1196
+
1197
+ #### [BUG] Accept-Encoding header behavior changed unintentionally.
1198
+
1199
+ (See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e)
1200
+
1201
+ In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to
1202
+ properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen.
1203
+ See issue #217 for a workaround, or use a version containing the fix.
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Client.php ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Cookie\CookieJar;
5
+ use GuzzleHttp\Exception\GuzzleException;
6
+ use GuzzleHttp\Promise;
7
+ use GuzzleHttp\Psr7;
8
+ use Psr\Http\Message\RequestInterface;
9
+ use Psr\Http\Message\ResponseInterface;
10
+ use Psr\Http\Message\UriInterface;
11
+
12
+ /**
13
+ * @method ResponseInterface get(string|UriInterface $uri, array $options = [])
14
+ * @method ResponseInterface head(string|UriInterface $uri, array $options = [])
15
+ * @method ResponseInterface put(string|UriInterface $uri, array $options = [])
16
+ * @method ResponseInterface post(string|UriInterface $uri, array $options = [])
17
+ * @method ResponseInterface patch(string|UriInterface $uri, array $options = [])
18
+ * @method ResponseInterface delete(string|UriInterface $uri, array $options = [])
19
+ * @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = [])
20
+ * @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = [])
21
+ * @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = [])
22
+ * @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = [])
23
+ * @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = [])
24
+ * @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = [])
25
+ */
26
+ class Client implements ClientInterface
27
+ {
28
+ /** @var array Default request options */
29
+ private $config;
30
+
31
+ /**
32
+ * Clients accept an array of constructor parameters.
33
+ *
34
+ * Here's an example of creating a client using a base_uri and an array of
35
+ * default request options to apply to each request:
36
+ *
37
+ * $client = new Client([
38
+ * 'base_uri' => 'http://www.foo.com/1.0/',
39
+ * 'timeout' => 0,
40
+ * 'allow_redirects' => false,
41
+ * 'proxy' => '192.168.16.1:10'
42
+ * ]);
43
+ *
44
+ * Client configuration settings include the following options:
45
+ *
46
+ * - handler: (callable) Function that transfers HTTP requests over the
47
+ * wire. The function is called with a Psr7\Http\Message\RequestInterface
48
+ * and array of transfer options, and must return a
49
+ * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
50
+ * Psr7\Http\Message\ResponseInterface on success.
51
+ * If no handler is provided, a default handler will be created
52
+ * that enables all of the request options below by attaching all of the
53
+ * default middleware to the handler.
54
+ * - base_uri: (string|UriInterface) Base URI of the client that is merged
55
+ * into relative URIs. Can be a string or instance of UriInterface.
56
+ * - **: any request option
57
+ *
58
+ * @param array $config Client configuration settings.
59
+ *
60
+ * @see \GuzzleHttp\RequestOptions for a list of available request options.
61
+ */
62
+ public function __construct(array $config = [])
63
+ {
64
+ if (!isset($config['handler'])) {
65
+ $config['handler'] = HandlerStack::create();
66
+ } elseif (!is_callable($config['handler'])) {
67
+ throw new \InvalidArgumentException('handler must be a callable');
68
+ }
69
+
70
+ // Convert the base_uri to a UriInterface
71
+ if (isset($config['base_uri'])) {
72
+ $config['base_uri'] = Psr7\uri_for($config['base_uri']);
73
+ }
74
+
75
+ $this->configureDefaults($config);
76
+ }
77
+
78
+ /**
79
+ * @param string $method
80
+ * @param array $args
81
+ *
82
+ * @return Promise\PromiseInterface
83
+ */
84
+ public function __call($method, $args)
85
+ {
86
+ if (count($args) < 1) {
87
+ throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
88
+ }
89
+
90
+ $uri = $args[0];
91
+ $opts = isset($args[1]) ? $args[1] : [];
92
+
93
+ return substr($method, -5) === 'Async'
94
+ ? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
95
+ : $this->request($method, $uri, $opts);
96
+ }
97
+
98
+ /**
99
+ * Asynchronously send an HTTP request.
100
+ *
101
+ * @param array $options Request options to apply to the given
102
+ * request and to the transfer. See \GuzzleHttp\RequestOptions.
103
+ *
104
+ * @return Promise\PromiseInterface
105
+ */
106
+ public function sendAsync(RequestInterface $request, array $options = [])
107
+ {
108
+ // Merge the base URI into the request URI if needed.
109
+ $options = $this->prepareDefaults($options);
110
+
111
+ return $this->transfer(
112
+ $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')),
113
+ $options
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Send an HTTP request.
119
+ *
120
+ * @param array $options Request options to apply to the given
121
+ * request and to the transfer. See \GuzzleHttp\RequestOptions.
122
+ *
123
+ * @return ResponseInterface
124
+ * @throws GuzzleException
125
+ */
126
+ public function send(RequestInterface $request, array $options = [])
127
+ {
128
+ $options[RequestOptions::SYNCHRONOUS] = true;
129
+ return $this->sendAsync($request, $options)->wait();
130
+ }
131
+
132
+ /**
133
+ * Create and send an asynchronous HTTP request.
134
+ *
135
+ * Use an absolute path to override the base path of the client, or a
136
+ * relative path to append to the base path of the client. The URL can
137
+ * contain the query string as well. Use an array to provide a URL
138
+ * template and additional variables to use in the URL template expansion.
139
+ *
140
+ * @param string $method HTTP method
141
+ * @param string|UriInterface $uri URI object or string.
142
+ * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
143
+ *
144
+ * @return Promise\PromiseInterface
145
+ */
146
+ public function requestAsync($method, $uri = '', array $options = [])
147
+ {
148
+ $options = $this->prepareDefaults($options);
149
+ // Remove request modifying parameter because it can be done up-front.
150
+ $headers = isset($options['headers']) ? $options['headers'] : [];
151
+ $body = isset($options['body']) ? $options['body'] : null;
152
+ $version = isset($options['version']) ? $options['version'] : '1.1';
153
+ // Merge the URI into the base URI.
154
+ $uri = $this->buildUri($uri, $options);
155
+ if (is_array($body)) {
156
+ $this->invalidBody();
157
+ }
158
+ $request = new Psr7\Request($method, $uri, $headers, $body, $version);
159
+ // Remove the option so that they are not doubly-applied.
160
+ unset($options['headers'], $options['body'], $options['version']);
161
+
162
+ return $this->transfer($request, $options);
163
+ }
164
+
165
+ /**
166
+ * Create and send an HTTP request.
167
+ *
168
+ * Use an absolute path to override the base path of the client, or a
169
+ * relative path to append to the base path of the client. The URL can
170
+ * contain the query string as well.
171
+ *
172
+ * @param string $method HTTP method.
173
+ * @param string|UriInterface $uri URI object or string.
174
+ * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
175
+ *
176
+ * @return ResponseInterface
177
+ * @throws GuzzleException
178
+ */
179
+ public function request($method, $uri = '', array $options = [])
180
+ {
181
+ $options[RequestOptions::SYNCHRONOUS] = true;
182
+ return $this->requestAsync($method, $uri, $options)->wait();
183
+ }
184
+
185
+ /**
186
+ * Get a client configuration option.
187
+ *
188
+ * These options include default request options of the client, a "handler"
189
+ * (if utilized by the concrete client), and a "base_uri" if utilized by
190
+ * the concrete client.
191
+ *
192
+ * @param string|null $option The config option to retrieve.
193
+ *
194
+ * @return mixed
195
+ */
196
+ public function getConfig($option = null)
197
+ {
198
+ return $option === null
199
+ ? $this->config
200
+ : (isset($this->config[$option]) ? $this->config[$option] : null);
201
+ }
202
+
203
+ /**
204
+ * @param string|null $uri
205
+ *
206
+ * @return UriInterface
207
+ */
208
+ private function buildUri($uri, array $config)
209
+ {
210
+ // for BC we accept null which would otherwise fail in uri_for
211
+ $uri = Psr7\uri_for($uri === null ? '' : $uri);
212
+
213
+ if (isset($config['base_uri'])) {
214
+ $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
215
+ }
216
+
217
+ if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
218
+ $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion'];
219
+ $uri = Utils::idnUriConvert($uri, $idnOptions);
220
+ }
221
+
222
+ return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
223
+ }
224
+
225
+ /**
226
+ * Configures the default options for a client.
227
+ *
228
+ * @param array $config
229
+ * @return void
230
+ */
231
+ private function configureDefaults(array $config)
232
+ {
233
+ $defaults = [
234
+ 'allow_redirects' => RedirectMiddleware::$defaultSettings,
235
+ 'http_errors' => true,
236
+ 'decode_content' => true,
237
+ 'verify' => true,
238
+ 'cookies' => false,
239
+ 'idn_conversion' => true,
240
+ ];
241
+
242
+ // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
243
+
244
+ // We can only trust the HTTP_PROXY environment variable in a CLI
245
+ // process due to the fact that PHP has no reliable mechanism to
246
+ // get environment variables that start with "HTTP_".
247
+ if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) {
248
+ $defaults['proxy']['http'] = getenv('HTTP_PROXY');
249
+ }
250
+
251
+ if ($proxy = getenv('HTTPS_PROXY')) {
252
+ $defaults['proxy']['https'] = $proxy;
253
+ }
254
+
255
+ if ($noProxy = getenv('NO_PROXY')) {
256
+ $cleanedNoProxy = str_replace(' ', '', $noProxy);
257
+ $defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
258
+ }
259
+
260
+ $this->config = $config + $defaults;
261
+
262
+ if (!empty($config['cookies']) && $config['cookies'] === true) {
263
+ $this->config['cookies'] = new CookieJar();
264
+ }
265
+
266
+ // Add the default user-agent header.
267
+ if (!isset($this->config['headers'])) {
268
+ $this->config['headers'] = ['User-Agent' => default_user_agent()];
269
+ } else {
270
+ // Add the User-Agent header if one was not already set.
271
+ foreach (array_keys($this->config['headers']) as $name) {
272
+ if (strtolower($name) === 'user-agent') {
273
+ return;
274
+ }
275
+ }
276
+ $this->config['headers']['User-Agent'] = default_user_agent();
277
+ }
278
+ }
279
+
280
+ /**
281
+ * Merges default options into the array.
282
+ *
283
+ * @param array $options Options to modify by reference
284
+ *
285
+ * @return array
286
+ */
287
+ private function prepareDefaults(array $options)
288
+ {
289
+ $defaults = $this->config;
290
+
291
+ if (!empty($defaults['headers'])) {
292
+ // Default headers are only added if they are not present.
293
+ $defaults['_conditional'] = $defaults['headers'];
294
+ unset($defaults['headers']);
295
+ }
296
+
297
+ // Special handling for headers is required as they are added as
298
+ // conditional headers and as headers passed to a request ctor.
299
+ if (array_key_exists('headers', $options)) {
300
+ // Allows default headers to be unset.
301
+ if ($options['headers'] === null) {
302
+ $defaults['_conditional'] = [];
303
+ unset($options['headers']);
304
+ } elseif (!is_array($options['headers'])) {
305
+ throw new \InvalidArgumentException('headers must be an array');
306
+ }
307
+ }
308
+
309
+ // Shallow merge defaults underneath options.
310
+ $result = $options + $defaults;
311
+
312
+ // Remove null values.
313
+ foreach ($result as $k => $v) {
314
+ if ($v === null) {
315
+ unset($result[$k]);
316
+ }
317
+ }
318
+
319
+ return $result;
320
+ }
321
+
322
+ /**
323
+ * Transfers the given request and applies request options.
324
+ *
325
+ * The URI of the request is not modified and the request options are used
326
+ * as-is without merging in default options.
327
+ *
328
+ * @param array $options See \GuzzleHttp\RequestOptions.
329
+ *
330
+ * @return Promise\PromiseInterface
331
+ */
332
+ private function transfer(RequestInterface $request, array $options)
333
+ {
334
+ // save_to -> sink
335
+ if (isset($options['save_to'])) {
336
+ $options['sink'] = $options['save_to'];
337
+ unset($options['save_to']);
338
+ }
339
+
340
+ // exceptions -> http_errors
341
+ if (isset($options['exceptions'])) {
342
+ $options['http_errors'] = $options['exceptions'];
343
+ unset($options['exceptions']);
344
+ }
345
+
346
+ $request = $this->applyOptions($request, $options);
347
+ /** @var HandlerStack $handler */
348
+ $handler = $options['handler'];
349
+
350
+ try {
351
+ return Promise\promise_for($handler($request, $options));
352
+ } catch (\Exception $e) {
353
+ return Promise\rejection_for($e);
354
+ }
355
+ }
356
+
357
+ /**
358
+ * Applies the array of request options to a request.
359
+ *
360
+ * @param RequestInterface $request
361
+ * @param array $options
362
+ *
363
+ * @return RequestInterface
364
+ */
365
+ private function applyOptions(RequestInterface $request, array &$options)
366
+ {
367
+ $modify = [
368
+ 'set_headers' => [],
369
+ ];
370
+
371
+ if (isset($options['headers'])) {
372
+ $modify['set_headers'] = $options['headers'];
373
+ unset($options['headers']);
374
+ }
375
+
376
+ if (isset($options['form_params'])) {
377
+ if (isset($options['multipart'])) {
378
+ throw new \InvalidArgumentException('You cannot use '
379
+ . 'form_params and multipart at the same time. Use the '
380
+ . 'form_params option if you want to send application/'
381
+ . 'x-www-form-urlencoded requests, and the multipart '
382
+ . 'option to send multipart/form-data requests.');
383
+ }
384
+ $options['body'] = http_build_query($options['form_params'], '', '&');
385
+ unset($options['form_params']);
386
+ // Ensure that we don't have the header in different case and set the new value.
387
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
388
+ $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
389
+ }
390
+
391
+ if (isset($options['multipart'])) {
392
+ $options['body'] = new Psr7\MultipartStream($options['multipart']);
393
+ unset($options['multipart']);
394
+ }
395
+
396
+ if (isset($options['json'])) {
397
+ $options['body'] = \GuzzleHttp\json_encode($options['json']);
398
+ unset($options['json']);
399
+ // Ensure that we don't have the header in different case and set the new value.
400
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
401
+ $options['_conditional']['Content-Type'] = 'application/json';
402
+ }
403
+
404
+ if (!empty($options['decode_content'])
405
+ && $options['decode_content'] !== true
406
+ ) {
407
+ // Ensure that we don't have the header in different case and set the new value.
408
+ $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']);
409
+ $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
410
+ }
411
+
412
+ if (isset($options['body'])) {
413
+ if (is_array($options['body'])) {
414
+ $this->invalidBody();
415
+ }
416
+ $modify['body'] = Psr7\stream_for($options['body']);
417
+ unset($options['body']);
418
+ }
419
+
420
+ if (!empty($options['auth']) && is_array($options['auth'])) {
421
+ $value = $options['auth'];
422
+ $type = isset($value[2]) ? strtolower($value[2]) : 'basic';
423
+ switch ($type) {
424
+ case 'basic':
425
+ // Ensure that we don't have the header in different case and set the new value.
426
+ $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
427
+ $modify['set_headers']['Authorization'] = 'Basic '
428
+ . base64_encode("$value[0]:$value[1]");
429
+ break;
430
+ case 'digest':
431
+ // @todo: Do not rely on curl
432
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
433
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
434
+ break;
435
+ case 'ntlm':
436
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
437
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
438
+ break;
439
+ }
440
+ }
441
+
442
+ if (isset($options['query'])) {
443
+ $value = $options['query'];
444
+ if (is_array($value)) {
445
+ $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
446
+ }
447
+ if (!is_string($value)) {
448
+ throw new \InvalidArgumentException('query must be a string or array');
449
+ }
450
+ $modify['query'] = $value;
451
+ unset($options['query']);
452
+ }
453
+
454
+ // Ensure that sink is not an invalid value.
455
+ if (isset($options['sink'])) {
456
+ // TODO: Add more sink validation?
457
+ if (is_bool($options['sink'])) {
458
+ throw new \InvalidArgumentException('sink must not be a boolean');
459
+ }
460
+ }
461
+
462
+ $request = Psr7\modify_request($request, $modify);
463
+ if ($request->getBody() instanceof Psr7\MultipartStream) {
464
+ // Use a multipart/form-data POST if a Content-Type is not set.
465
+ // Ensure that we don't have the header in different case and set the new value.
466
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
467
+ $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
468
+ . $request->getBody()->getBoundary();
469
+ }
470
+
471
+ // Merge in conditional headers if they are not present.
472
+ if (isset($options['_conditional'])) {
473
+ // Build up the changes so it's in a single clone of the message.
474
+ $modify = [];
475
+ foreach ($options['_conditional'] as $k => $v) {
476
+ if (!$request->hasHeader($k)) {
477
+ $modify['set_headers'][$k] = $v;
478
+ }
479
+ }
480
+ $request = Psr7\modify_request($request, $modify);
481
+ // Don't pass this internal value along to middleware/handlers.
482
+ unset($options['_conditional']);
483
+ }
484
+
485
+ return $request;
486
+ }
487
+
488
+ /**
489
+ * Throw Exception with pre-set message.
490
+ * @return void
491
+ * @throws \InvalidArgumentException Invalid body.
492
+ */
493
+ private function invalidBody()
494
+ {
495
+ throw new \InvalidArgumentException('Passing in the "body" request '
496
+ . 'option as an array to send a POST request has been deprecated. '
497
+ . 'Please use the "form_params" request option to send a '
498
+ . 'application/x-www-form-urlencoded request, or the "multipart" '
499
+ . 'request option to send a multipart/form-data request.');
500
+ }
501
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/ClientInterface.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Exception\GuzzleException;
5
+ use GuzzleHttp\Promise\PromiseInterface;
6
+ use Psr\Http\Message\RequestInterface;
7
+ use Psr\Http\Message\ResponseInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ /**
11
+ * Client interface for sending HTTP requests.
12
+ */
13
+ interface ClientInterface
14
+ {
15
+ /**
16
+ * @deprecated Will be removed in Guzzle 7.0.0
17
+ */
18
+ const VERSION = '6.5.5';
19
+
20
+ /**
21
+ * Send an HTTP request.
22
+ *
23
+ * @param RequestInterface $request Request to send
24
+ * @param array $options Request options to apply to the given
25
+ * request and to the transfer.
26
+ *
27
+ * @return ResponseInterface
28
+ * @throws GuzzleException
29
+ */
30
+ public function send(RequestInterface $request, array $options = []);
31
+
32
+ /**
33
+ * Asynchronously send an HTTP request.
34
+ *
35
+ * @param RequestInterface $request Request to send
36
+ * @param array $options Request options to apply to the given
37
+ * request and to the transfer.
38
+ *
39
+ * @return PromiseInterface
40
+ */
41
+ public function sendAsync(RequestInterface $request, array $options = []);
42
+
43
+ /**
44
+ * Create and send an HTTP request.
45
+ *
46
+ * Use an absolute path to override the base path of the client, or a
47
+ * relative path to append to the base path of the client. The URL can
48
+ * contain the query string as well.
49
+ *
50
+ * @param string $method HTTP method.
51
+ * @param string|UriInterface $uri URI object or string.
52
+ * @param array $options Request options to apply.
53
+ *
54
+ * @return ResponseInterface
55
+ * @throws GuzzleException
56
+ */
57
+ public function request($method, $uri, array $options = []);
58
+
59
+ /**
60
+ * Create and send an asynchronous HTTP request.
61
+ *
62
+ * Use an absolute path to override the base path of the client, or a
63
+ * relative path to append to the base path of the client. The URL can
64
+ * contain the query string as well. Use an array to provide a URL
65
+ * template and additional variables to use in the URL template expansion.
66
+ *
67
+ * @param string $method HTTP method
68
+ * @param string|UriInterface $uri URI object or string.
69
+ * @param array $options Request options to apply.
70
+ *
71
+ * @return PromiseInterface
72
+ */
73
+ public function requestAsync($method, $uri, array $options = []);
74
+
75
+ /**
76
+ * Get a client configuration option.
77
+ *
78
+ * These options include default request options of the client, a "handler"
79
+ * (if utilized by the concrete client), and a "base_uri" if utilized by
80
+ * the concrete client.
81
+ *
82
+ * @param string|null $option The config option to retrieve.
83
+ *
84
+ * @return mixed
85
+ */
86
+ public function getConfig($option = null);
87
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Cookie;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+ use Psr\Http\Message\ResponseInterface;
6
+
7
+ /**
8
+ * Cookie jar that stores cookies as an array
9
+ */
10
+ class CookieJar implements CookieJarInterface
11
+ {
12
+ /** @var SetCookie[] Loaded cookie data */
13
+ private $cookies = [];
14
+
15
+ /** @var bool */
16
+ private $strictMode;
17
+
18
+ /**
19
+ * @param bool $strictMode Set to true to throw exceptions when invalid
20
+ * cookies are added to the cookie jar.
21
+ * @param array $cookieArray Array of SetCookie objects or a hash of
22
+ * arrays that can be used with the SetCookie
23
+ * constructor
24
+ */
25
+ public function __construct($strictMode = false, $cookieArray = [])
26
+ {
27
+ $this->strictMode = $strictMode;
28
+
29
+ foreach ($cookieArray as $cookie) {
30
+ if (!($cookie instanceof SetCookie)) {
31
+ $cookie = new SetCookie($cookie);
32
+ }
33
+ $this->setCookie($cookie);
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Create a new Cookie jar from an associative array and domain.
39
+ *
40
+ * @param array $cookies Cookies to create the jar from
41
+ * @param string $domain Domain to set the cookies to
42
+ *
43
+ * @return self
44
+ */
45
+ public static function fromArray(array $cookies, $domain)
46
+ {
47
+ $cookieJar = new self();
48
+ foreach ($cookies as $name => $value) {
49
+ $cookieJar->setCookie(new SetCookie([
50
+ 'Domain' => $domain,
51
+ 'Name' => $name,
52
+ 'Value' => $value,
53
+ 'Discard' => true
54
+ ]));
55
+ }
56
+
57
+ return $cookieJar;
58
+ }
59
+
60
+ /**
61
+ * @deprecated
62
+ */
63
+ public static function getCookieValue($value)
64
+ {
65
+ return $value;
66
+ }
67
+
68
+ /**
69
+ * Evaluate if this cookie should be persisted to storage
70
+ * that survives between requests.
71
+ *
72
+ * @param SetCookie $cookie Being evaluated.
73
+ * @param bool $allowSessionCookies If we should persist session cookies
74
+ * @return bool
75
+ */
76
+ public static function shouldPersist(
77
+ SetCookie $cookie,
78
+ $allowSessionCookies = false
79
+ ) {
80
+ if ($cookie->getExpires() || $allowSessionCookies) {
81
+ if (!$cookie->getDiscard()) {
82
+ return true;
83
+ }
84
+ }
85
+
86
+ return false;
87
+ }
88
+
89
+ /**
90
+ * Finds and returns the cookie based on the name
91
+ *
92
+ * @param string $name cookie name to search for
93
+ * @return SetCookie|null cookie that was found or null if not found
94
+ */
95
+ public function getCookieByName($name)
96
+ {
97
+ // don't allow a non string name
98
+ if ($name === null || !is_scalar($name)) {
99
+ return null;
100
+ }
101
+ foreach ($this->cookies as $cookie) {
102
+ if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
103
+ return $cookie;
104
+ }
105
+ }
106
+
107
+ return null;
108
+ }
109
+
110
+ public function toArray()
111
+ {
112
+ return array_map(function (SetCookie $cookie) {
113
+ return $cookie->toArray();
114
+ }, $this->getIterator()->getArrayCopy());
115
+ }
116
+
117
+ public function clear($domain = null, $path = null, $name = null)
118
+ {
119
+ if (!$domain) {
120
+ $this->cookies = [];
121
+ return;
122
+ } elseif (!$path) {
123
+ $this->cookies = array_filter(
124
+ $this->cookies,
125
+ function (SetCookie $cookie) use ($domain) {
126
+ return !$cookie->matchesDomain($domain);
127
+ }
128
+ );
129
+ } elseif (!$name) {
130
+ $this->cookies = array_filter(
131
+ $this->cookies,
132
+ function (SetCookie $cookie) use ($path, $domain) {
133
+ return !($cookie->matchesPath($path) &&
134
+ $cookie->matchesDomain($domain));
135
+ }
136
+ );
137
+ } else {
138
+ $this->cookies = array_filter(
139
+ $this->cookies,
140
+ function (SetCookie $cookie) use ($path, $domain, $name) {
141
+ return !($cookie->getName() == $name &&
142
+ $cookie->matchesPath($path) &&
143
+ $cookie->matchesDomain($domain));
144
+ }
145
+ );
146
+ }
147
+ }
148
+
149
+ public function clearSessionCookies()
150
+ {
151
+ $this->cookies = array_filter(
152
+ $this->cookies,
153
+ function (SetCookie $cookie) {
154
+ return !$cookie->getDiscard() && $cookie->getExpires();
155
+ }
156
+ );
157
+ }
158
+
159
+ public function setCookie(SetCookie $cookie)
160
+ {
161
+ // If the name string is empty (but not 0), ignore the set-cookie
162
+ // string entirely.
163
+ $name = $cookie->getName();
164
+ if (!$name && $name !== '0') {
165
+ return false;
166
+ }
167
+
168
+ // Only allow cookies with set and valid domain, name, value
169
+ $result = $cookie->validate();
170
+ if ($result !== true) {
171
+ if ($this->strictMode) {
172
+ throw new \RuntimeException('Invalid cookie: ' . $result);
173
+ } else {
174
+ $this->removeCookieIfEmpty($cookie);
175
+ return false;
176
+ }
177
+ }
178
+
179
+ // Resolve conflicts with previously set cookies
180
+ foreach ($this->cookies as $i => $c) {
181
+
182
+ // Two cookies are identical, when their path, and domain are
183
+ // identical.
184
+ if ($c->getPath() != $cookie->getPath() ||
185
+ $c->getDomain() != $cookie->getDomain() ||
186
+ $c->getName() != $cookie->getName()
187
+ ) {
188
+ continue;
189
+ }
190
+
191
+ // The previously set cookie is a discard cookie and this one is
192
+ // not so allow the new cookie to be set
193
+ if (!$cookie->getDiscard() && $c->getDiscard()) {
194
+ unset($this->cookies[$i]);
195
+ continue;
196
+ }
197
+
198
+ // If the new cookie's expiration is further into the future, then
199
+ // replace the old cookie
200
+ if ($cookie->getExpires() > $c->getExpires()) {
201
+ unset($this->cookies[$i]);
202
+ continue;
203
+ }
204
+
205
+ // If the value has changed, we better change it
206
+ if ($cookie->getValue() !== $c->getValue()) {
207
+ unset($this->cookies[$i]);
208
+ continue;
209
+ }
210
+
211
+ // The cookie exists, so no need to continue
212
+ return false;
213
+ }
214
+
215
+ $this->cookies[] = $cookie;
216
+
217
+ return true;
218
+ }
219
+
220
+ public function count()
221
+ {
222
+ return count($this->cookies);
223
+ }
224
+
225
+ public function getIterator()
226
+ {
227
+ return new \ArrayIterator(array_values($this->cookies));
228
+ }
229
+
230
+ public function extractCookies(
231
+ RequestInterface $request,
232
+ ResponseInterface $response
233
+ ) {
234
+ if ($cookieHeader = $response->getHeader('Set-Cookie')) {
235
+ foreach ($cookieHeader as $cookie) {
236
+ $sc = SetCookie::fromString($cookie);
237
+ if (!$sc->getDomain()) {
238
+ $sc->setDomain($request->getUri()->getHost());
239
+ }
240
+ if (0 !== strpos($sc->getPath(), '/')) {
241
+ $sc->setPath($this->getCookiePathFromRequest($request));
242
+ }
243
+ if (!$sc->matchesDomain($request->getUri()->getHost())) {
244
+ continue;
245
+ }
246
+ // Note: At this point `$sc->getDomain()` being a public suffix should
247
+ // be rejected, but we don't want to pull in the full PSL dependency.
248
+ $this->setCookie($sc);
249
+ }
250
+ }
251
+ }
252
+
253
+ /**
254
+ * Computes cookie path following RFC 6265 section 5.1.4
255
+ *
256
+ * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
257
+ *
258
+ * @param RequestInterface $request
259
+ * @return string
260
+ */
261
+ private function getCookiePathFromRequest(RequestInterface $request)
262
+ {
263
+ $uriPath = $request->getUri()->getPath();
264
+ if ('' === $uriPath) {
265
+ return '/';
266
+ }
267
+ if (0 !== strpos($uriPath, '/')) {
268
+ return '/';
269
+ }
270
+ if ('/' === $uriPath) {
271
+ return '/';
272
+ }
273
+ if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
274
+ return '/';
275
+ }
276
+
277
+ return substr($uriPath, 0, $lastSlashPos);
278
+ }
279
+
280
+ public function withCookieHeader(RequestInterface $request)
281
+ {
282
+ $values = [];
283
+ $uri = $request->getUri();
284
+ $scheme = $uri->getScheme();
285
+ $host = $uri->getHost();
286
+ $path = $uri->getPath() ?: '/';
287
+
288
+ foreach ($this->cookies as $cookie) {
289
+ if ($cookie->matchesPath($path) &&
290
+ $cookie->matchesDomain($host) &&
291
+ !$cookie->isExpired() &&
292
+ (!$cookie->getSecure() || $scheme === 'https')
293
+ ) {
294
+ $values[] = $cookie->getName() . '='
295
+ . $cookie->getValue();
296
+ }
297
+ }
298
+
299
+ return $values
300
+ ? $request->withHeader('Cookie', implode('; ', $values))
301
+ : $request;
302
+ }
303
+
304
+ /**
305
+ * If a cookie already exists and the server asks to set it again with a
306
+ * null value, the cookie must be deleted.
307
+ *
308
+ * @param SetCookie $cookie
309
+ */
310
+ private function removeCookieIfEmpty(SetCookie $cookie)
311
+ {
312
+ $cookieValue = $cookie->getValue();
313
+ if ($cookieValue === null || $cookieValue === '') {
314
+ $this->clear(
315
+ $cookie->getDomain(),
316
+ $cookie->getPath(),
317
+ $cookie->getName()
318
+ );
319
+ }
320
+ }
321
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Cookie;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+ use Psr\Http\Message\ResponseInterface;
6
+
7
+ /**
8
+ * Stores HTTP cookies.
9
+ *
10
+ * It extracts cookies from HTTP requests, and returns them in HTTP responses.
11
+ * CookieJarInterface instances automatically expire contained cookies when
12
+ * necessary. Subclasses are also responsible for storing and retrieving
13
+ * cookies from a file, database, etc.
14
+ *
15
+ * @link http://docs.python.org/2/library/cookielib.html Inspiration
16
+ */
17
+ interface CookieJarInterface extends \Countable, \IteratorAggregate
18
+ {
19
+ /**
20
+ * Create a request with added cookie headers.
21
+ *
22
+ * If no matching cookies are found in the cookie jar, then no Cookie
23
+ * header is added to the request and the same request is returned.
24
+ *
25
+ * @param RequestInterface $request Request object to modify.
26
+ *
27
+ * @return RequestInterface returns the modified request.
28
+ */
29
+ public function withCookieHeader(RequestInterface $request);
30
+
31
+ /**
32
+ * Extract cookies from an HTTP response and store them in the CookieJar.
33
+ *
34
+ * @param RequestInterface $request Request that was sent
35
+ * @param ResponseInterface $response Response that was received
36
+ */
37
+ public function extractCookies(
38
+ RequestInterface $request,
39
+ ResponseInterface $response
40
+ );
41
+
42
+ /**
43
+ * Sets a cookie in the cookie jar.
44
+ *
45
+ * @param SetCookie $cookie Cookie to set.
46
+ *
47
+ * @return bool Returns true on success or false on failure
48
+ */
49
+ public function setCookie(SetCookie $cookie);
50
+
51
+ /**
52
+ * Remove cookies currently held in the cookie jar.
53
+ *
54
+ * Invoking this method without arguments will empty the whole cookie jar.
55
+ * If given a $domain argument only cookies belonging to that domain will
56
+ * be removed. If given a $domain and $path argument, cookies belonging to
57
+ * the specified path within that domain are removed. If given all three
58
+ * arguments, then the cookie with the specified name, path and domain is
59
+ * removed.
60
+ *
61
+ * @param string|null $domain Clears cookies matching a domain
62
+ * @param string|null $path Clears cookies matching a domain and path
63
+ * @param string|null $name Clears cookies matching a domain, path, and name
64
+ *
65
+ * @return CookieJarInterface
66
+ */
67
+ public function clear($domain = null, $path = null, $name = null);
68
+
69
+ /**
70
+ * Discard all sessions cookies.
71
+ *
72
+ * Removes cookies that don't have an expire field or a have a discard
73
+ * field set to true. To be called when the user agent shuts down according
74
+ * to RFC 2965.
75
+ */
76
+ public function clearSessionCookies();
77
+
78
+ /**
79
+ * Converts the cookie jar to an array.
80
+ *
81
+ * @return array
82
+ */
83
+ public function toArray();
84
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Cookie;
3
+
4
+ /**
5
+ * Persists non-session cookies using a JSON formatted file
6
+ */
7
+ class FileCookieJar extends CookieJar
8
+ {
9
+ /** @var string filename */
10
+ private $filename;
11
+
12
+ /** @var bool Control whether to persist session cookies or not. */
13
+ private $storeSessionCookies;
14
+
15
+ /**
16
+ * Create a new FileCookieJar object
17
+ *
18
+ * @param string $cookieFile File to store the cookie data
19
+ * @param bool $storeSessionCookies Set to true to store session cookies
20
+ * in the cookie jar.
21
+ *
22
+ * @throws \RuntimeException if the file cannot be found or created
23
+ */
24
+ public function __construct($cookieFile, $storeSessionCookies = false)
25
+ {
26
+ parent::__construct();
27
+ $this->filename = $cookieFile;
28
+ $this->storeSessionCookies = $storeSessionCookies;
29
+
30
+ if (file_exists($cookieFile)) {
31
+ $this->load($cookieFile);
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Saves the file when shutting down
37
+ */
38
+ public function __destruct()
39
+ {
40
+ $this->save($this->filename);
41
+ }
42
+
43
+ /**
44
+ * Saves the cookies to a file.
45
+ *
46
+ * @param string $filename File to save
47
+ * @throws \RuntimeException if the file cannot be found or created
48
+ */
49
+ public function save($filename)
50
+ {
51
+ $json = [];
52
+ foreach ($this as $cookie) {
53
+ /** @var SetCookie $cookie */
54
+ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
55
+ $json[] = $cookie->toArray();
56
+ }
57
+ }
58
+
59
+ $jsonStr = \GuzzleHttp\json_encode($json);
60
+ if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
61
+ throw new \RuntimeException("Unable to save file {$filename}");
62
+ }
63
+ }
64
+
65
+ /**
66
+ * Load cookies from a JSON formatted file.
67
+ *
68
+ * Old cookies are kept unless overwritten by newly loaded ones.
69
+ *
70
+ * @param string $filename Cookie file to load.
71
+ * @throws \RuntimeException if the file cannot be loaded.
72
+ */
73
+ public function load($filename)
74
+ {
75
+ $json = file_get_contents($filename);
76
+ if (false === $json) {
77
+ throw new \RuntimeException("Unable to load file {$filename}");
78
+ } elseif ($json === '') {
79
+ return;
80
+ }
81
+
82
+ $data = \GuzzleHttp\json_decode($json, true);
83
+ if (is_array($data)) {
84
+ foreach (json_decode($json, true) as $cookie) {
85
+ $this->setCookie(new SetCookie($cookie));
86
+ }
87
+ } elseif (strlen($data)) {
88
+ throw new \RuntimeException("Invalid cookie file: {$filename}");
89
+ }
90
+ }
91
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Cookie;
3
+
4
+ /**
5
+ * Persists cookies in the client session
6
+ */
7
+ class SessionCookieJar extends CookieJar
8
+ {
9
+ /** @var string session key */
10
+ private $sessionKey;
11
+
12
+ /** @var bool Control whether to persist session cookies or not. */
13
+ private $storeSessionCookies;
14
+
15
+ /**
16
+ * Create a new SessionCookieJar object
17
+ *
18
+ * @param string $sessionKey Session key name to store the cookie
19
+ * data in session
20
+ * @param bool $storeSessionCookies Set to true to store session cookies
21
+ * in the cookie jar.
22
+ */
23
+ public function __construct($sessionKey, $storeSessionCookies = false)
24
+ {
25
+ parent::__construct();
26
+ $this->sessionKey = $sessionKey;
27
+ $this->storeSessionCookies = $storeSessionCookies;
28
+ $this->load();
29
+ }
30
+
31
+ /**
32
+ * Saves cookies to session when shutting down
33
+ */
34
+ public function __destruct()
35
+ {
36
+ $this->save();
37
+ }
38
+
39
+ /**
40
+ * Save cookies to the client session
41
+ */
42
+ public function save()
43
+ {
44
+ $json = [];
45
+ foreach ($this as $cookie) {
46
+ /** @var SetCookie $cookie */
47
+ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
48
+ $json[] = $cookie->toArray();
49
+ }
50
+ }
51
+
52
+ $_SESSION[$this->sessionKey] = json_encode($json);
53
+ }
54
+
55
+ /**
56
+ * Load the contents of the client session into the data array
57
+ */
58
+ protected function load()
59
+ {
60
+ if (!isset($_SESSION[$this->sessionKey])) {
61
+ return;
62
+ }
63
+ $data = json_decode($_SESSION[$this->sessionKey], true);
64
+ if (is_array($data)) {
65
+ foreach ($data as $cookie) {
66
+ $this->setCookie(new SetCookie($cookie));
67
+ }
68
+ } elseif (strlen($data)) {
69
+ throw new \RuntimeException("Invalid cookie data");
70
+ }
71
+ }
72
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php ADDED
@@ -0,0 +1,410 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Cookie;
3
+
4
+ /**
5
+ * Set-Cookie object
6
+ */
7
+ class SetCookie
8
+ {
9
+ /** @var array */
10
+ private static $defaults = [
11
+ 'Name' => null,
12
+ 'Value' => null,
13
+ 'Domain' => null,
14
+ 'Path' => '/',
15
+ 'Max-Age' => null,
16
+ 'Expires' => null,
17
+ 'Secure' => false,
18
+ 'Discard' => false,
19
+ 'HttpOnly' => false
20
+ ];
21
+
22
+ /** @var array Cookie data */
23
+ private $data;
24
+
25
+ /**
26
+ * Create a new SetCookie object from a string
27
+ *
28
+ * @param string $cookie Set-Cookie header string
29
+ *
30
+ * @return self
31
+ */
32
+ public static function fromString($cookie)
33
+ {
34
+ // Create the default return array
35
+ $data = self::$defaults;
36
+ // Explode the cookie string using a series of semicolons
37
+ $pieces = array_filter(array_map('trim', explode(';', $cookie)));
38
+ // The name of the cookie (first kvp) must exist and include an equal sign.
39
+ if (empty($pieces[0]) || !strpos($pieces[0], '=')) {
40
+ return new self($data);
41
+ }
42
+
43
+ // Add the cookie pieces into the parsed data array
44
+ foreach ($pieces as $part) {
45
+ $cookieParts = explode('=', $part, 2);
46
+ $key = trim($cookieParts[0]);
47
+ $value = isset($cookieParts[1])
48
+ ? trim($cookieParts[1], " \n\r\t\0\x0B")
49
+ : true;
50
+
51
+ // Only check for non-cookies when cookies have been found
52
+ if (empty($data['Name'])) {
53
+ $data['Name'] = $key;
54
+ $data['Value'] = $value;
55
+ } else {
56
+ foreach (array_keys(self::$defaults) as $search) {
57
+ if (!strcasecmp($search, $key)) {
58
+ $data[$search] = $value;
59
+ continue 2;
60
+ }
61
+ }
62
+ $data[$key] = $value;
63
+ }
64
+ }
65
+
66
+ return new self($data);
67
+ }
68
+
69
+ /**
70
+ * @param array $data Array of cookie data provided by a Cookie parser
71
+ */
72
+ public function __construct(array $data = [])
73
+ {
74
+ $this->data = array_replace(self::$defaults, $data);
75
+ // Extract the Expires value and turn it into a UNIX timestamp if needed
76
+ if (!$this->getExpires() && $this->getMaxAge()) {
77
+ // Calculate the Expires date
78
+ $this->setExpires(time() + $this->getMaxAge());
79
+ } elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
80
+ $this->setExpires($this->getExpires());
81
+ }
82
+ }
83
+
84
+ public function __toString()
85
+ {
86
+ $str = $this->data['Name'] . '=' . $this->data['Value'] . '; ';
87
+ foreach ($this->data as $k => $v) {
88
+ if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
89
+ if ($k === 'Expires') {
90
+ $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
91
+ } else {
92
+ $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
93
+ }
94
+ }
95
+ }
96
+
97
+ return rtrim($str, '; ');
98
+ }
99
+
100
+ public function toArray()
101
+ {
102
+ return $this->data;
103
+ }
104
+
105
+ /**
106
+ * Get the cookie name
107
+ *
108
+ * @return string
109
+ */
110
+ public function getName()
111
+ {
112
+ return $this->data['Name'];
113
+ }
114
+
115
+ /**
116
+ * Set the cookie name
117
+ *
118
+ * @param string $name Cookie name
119
+ */
120
+ public function setName($name)
121
+ {
122
+ $this->data['Name'] = $name;
123
+ }
124
+
125
+ /**
126
+ * Get the cookie value
127
+ *
128
+ * @return string
129
+ */
130
+ public function getValue()
131
+ {
132
+ return $this->data['Value'];
133
+ }
134
+
135
+ /**
136
+ * Set the cookie value
137
+ *
138
+ * @param string $value Cookie value
139
+ */
140
+ public function setValue($value)
141
+ {
142
+ $this->data['Value'] = $value;
143
+ }
144
+
145
+ /**
146
+ * Get the domain
147
+ *
148
+ * @return string|null
149
+ */
150
+ public function getDomain()
151
+ {
152
+ return $this->data['Domain'];
153
+ }
154
+
155
+ /**
156
+ * Set the domain of the cookie
157
+ *
158
+ * @param string $domain
159
+ */
160
+ public function setDomain($domain)
161
+ {
162
+ $this->data['Domain'] = $domain;
163
+ }
164
+
165
+ /**
166
+ * Get the path
167
+ *
168
+ * @return string
169
+ */
170
+ public function getPath()
171
+ {
172
+ return $this->data['Path'];
173
+ }
174
+
175
+ /**
176
+ * Set the path of the cookie
177
+ *
178
+ * @param string $path Path of the cookie
179
+ */
180
+ public function setPath($path)
181
+ {
182
+ $this->data['Path'] = $path;
183
+ }
184
+
185
+ /**
186
+ * Maximum lifetime of the cookie in seconds
187
+ *
188
+ * @return int|null
189
+ */
190
+ public function getMaxAge()
191
+ {
192
+ return $this->data['Max-Age'];
193
+ }
194
+
195
+ /**
196
+ * Set the max-age of the cookie
197
+ *
198
+ * @param int $maxAge Max age of the cookie in seconds
199
+ */
200
+ public function setMaxAge($maxAge)
201
+ {
202
+ $this->data['Max-Age'] = $maxAge;
203
+ }
204
+
205
+ /**
206
+ * The UNIX timestamp when the cookie Expires
207
+ *
208
+ * @return mixed
209
+ */
210
+ public function getExpires()
211
+ {
212
+ return $this->data['Expires'];
213
+ }
214
+
215
+ /**
216
+ * Set the unix timestamp for which the cookie will expire
217
+ *
218
+ * @param int $timestamp Unix timestamp
219
+ */
220
+ public function setExpires($timestamp)
221
+ {
222
+ $this->data['Expires'] = is_numeric($timestamp)
223
+ ? (int) $timestamp
224
+ : strtotime($timestamp);
225
+ }
226
+
227
+ /**
228
+ * Get whether or not this is a secure cookie
229
+ *
230
+ * @return bool|null
231
+ */
232
+ public function getSecure()
233
+ {
234
+ return $this->data['Secure'];
235
+ }
236
+
237
+ /**
238
+ * Set whether or not the cookie is secure
239
+ *
240
+ * @param bool $secure Set to true or false if secure
241
+ */
242
+ public function setSecure($secure)
243
+ {
244
+ $this->data['Secure'] = $secure;
245
+ }
246
+
247
+ /**
248
+ * Get whether or not this is a session cookie
249
+ *
250
+ * @return bool|null
251
+ */
252
+ public function getDiscard()
253
+ {
254
+ return $this->data['Discard'];
255
+ }
256
+
257
+ /**
258
+ * Set whether or not this is a session cookie
259
+ *
260
+ * @param bool $discard Set to true or false if this is a session cookie
261
+ */
262
+ public function setDiscard($discard)
263
+ {
264
+ $this->data['Discard'] = $discard;
265
+ }
266
+
267
+ /**
268
+ * Get whether or not this is an HTTP only cookie
269
+ *
270
+ * @return bool
271
+ */
272
+ public function getHttpOnly()
273
+ {
274
+ return $this->data['HttpOnly'];
275
+ }
276
+
277
+ /**
278
+ * Set whether or not this is an HTTP only cookie
279
+ *
280
+ * @param bool $httpOnly Set to true or false if this is HTTP only
281
+ */
282
+ public function setHttpOnly($httpOnly)
283
+ {
284
+ $this->data['HttpOnly'] = $httpOnly;
285
+ }
286
+
287
+ /**
288
+ * Check if the cookie matches a path value.
289
+ *
290
+ * A request-path path-matches a given cookie-path if at least one of
291
+ * the following conditions holds:
292
+ *
293
+ * - The cookie-path and the request-path are identical.
294
+ * - The cookie-path is a prefix of the request-path, and the last
295
+ * character of the cookie-path is %x2F ("/").
296
+ * - The cookie-path is a prefix of the request-path, and the first
297
+ * character of the request-path that is not included in the cookie-
298
+ * path is a %x2F ("/") character.
299
+ *
300
+ * @param string $requestPath Path to check against
301
+ *
302
+ * @return bool
303
+ */
304
+ public function matchesPath($requestPath)
305
+ {
306
+ $cookiePath = $this->getPath();
307
+
308
+ // Match on exact matches or when path is the default empty "/"
309
+ if ($cookiePath === '/' || $cookiePath == $requestPath) {
310
+ return true;
311
+ }
312
+
313
+ // Ensure that the cookie-path is a prefix of the request path.
314
+ if (0 !== strpos($requestPath, $cookiePath)) {
315
+ return false;
316
+ }
317
+
318
+ // Match if the last character of the cookie-path is "/"
319
+ if (substr($cookiePath, -1, 1) === '/') {
320
+ return true;
321
+ }
322
+
323
+ // Match if the first character not included in cookie path is "/"
324
+ return substr($requestPath, strlen($cookiePath), 1) === '/';
325
+ }
326
+
327
+ /**
328
+ * Check if the cookie matches a domain value
329
+ *
330
+ * @param string $domain Domain to check against
331
+ *
332
+ * @return bool
333
+ */
334
+ public function matchesDomain($domain)
335
+ {
336
+ $cookieDomain = $this->getDomain();
337
+ if (null === $cookieDomain) {
338
+ return true;
339
+ }
340
+
341
+ // Remove the leading '.' as per spec in RFC 6265.
342
+ // http://tools.ietf.org/html/rfc6265#section-5.2.3
343
+ $cookieDomain = ltrim(strtolower($cookieDomain), '.');
344
+
345
+ $domain = strtolower($domain);
346
+
347
+ // Domain not set or exact match.
348
+ if ('' === $cookieDomain || $domain === $cookieDomain) {
349
+ return true;
350
+ }
351
+
352
+ // Matching the subdomain according to RFC 6265.
353
+ // http://tools.ietf.org/html/rfc6265#section-5.1.3
354
+ if (filter_var($domain, FILTER_VALIDATE_IP)) {
355
+ return false;
356
+ }
357
+
358
+ return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain);
359
+ }
360
+
361
+ /**
362
+ * Check if the cookie is expired
363
+ *
364
+ * @return bool
365
+ */
366
+ public function isExpired()
367
+ {
368
+ return $this->getExpires() !== null && time() > $this->getExpires();
369
+ }
370
+
371
+ /**
372
+ * Check if the cookie is valid according to RFC 6265
373
+ *
374
+ * @return bool|string Returns true if valid or an error message if invalid
375
+ */
376
+ public function validate()
377
+ {
378
+ // Names must not be empty, but can be 0
379
+ $name = $this->getName();
380
+ if (empty($name) && !is_numeric($name)) {
381
+ return 'The cookie name must not be empty';
382
+ }
383
+
384
+ // Check if any of the invalid characters are present in the cookie name
385
+ if (preg_match(
386
+ '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
387
+ $name
388
+ )) {
389
+ return 'Cookie name must not contain invalid characters: ASCII '
390
+ . 'Control characters (0-31;127), space, tab and the '
391
+ . 'following characters: ()<>@,;:\"/?={}';
392
+ }
393
+
394
+ // Value must not be empty, but can be 0
395
+ $value = $this->getValue();
396
+ if (empty($value) && !is_numeric($value)) {
397
+ return 'The cookie value must not be empty';
398
+ }
399
+
400
+ // Domains must not be empty, but can be 0
401
+ // A "0" is not a valid internet domain, but may be used as server name
402
+ // in a private network.
403
+ $domain = $this->getDomain();
404
+ if (empty($domain) && !is_numeric($domain)) {
405
+ return 'The cookie domain must not be empty';
406
+ }
407
+
408
+ return true;
409
+ }
410
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+ use Psr\Http\Message\ResponseInterface;
6
+
7
+ /**
8
+ * Exception when an HTTP error occurs (4xx or 5xx error)
9
+ */
10
+ class BadResponseException extends RequestException
11
+ {
12
+ public function __construct(
13
+ $message,
14
+ RequestInterface $request,
15
+ ResponseInterface $response = null,
16
+ \Exception $previous = null,
17
+ array $handlerContext = []
18
+ ) {
19
+ if (null === $response) {
20
+ @trigger_error(
21
+ 'Instantiating the ' . __CLASS__ . ' class without a Response is deprecated since version 6.3 and will be removed in 7.0.',
22
+ E_USER_DEPRECATED
23
+ );
24
+ }
25
+ parent::__construct($message, $request, $response, $previous, $handlerContext);
26
+ }
27
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ /**
5
+ * Exception when a client error is encountered (4xx codes)
6
+ */
7
+ class ClientException extends BadResponseException
8
+ {
9
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+
6
+ /**
7
+ * Exception thrown when a connection cannot be established.
8
+ *
9
+ * Note that no response is present for a ConnectException
10
+ */
11
+ class ConnectException extends RequestException
12
+ {
13
+ public function __construct(
14
+ $message,
15
+ RequestInterface $request,
16
+ \Exception $previous = null,
17
+ array $handlerContext = []
18
+ ) {
19
+ parent::__construct($message, $request, null, $previous, $handlerContext);
20
+ }
21
+
22
+ /**
23
+ * @return null
24
+ */
25
+ public function getResponse()
26
+ {
27
+ return null;
28
+ }
29
+
30
+ /**
31
+ * @return bool
32
+ */
33
+ public function hasResponse()
34
+ {
35
+ return false;
36
+ }
37
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use Throwable;
5
+
6
+ if (interface_exists(Throwable::class)) {
7
+ interface GuzzleException extends Throwable
8
+ {
9
+ }
10
+ } else {
11
+ /**
12
+ * @method string getMessage()
13
+ * @method \Throwable|null getPrevious()
14
+ * @method mixed getCode()
15
+ * @method string getFile()
16
+ * @method int getLine()
17
+ * @method array getTrace()
18
+ * @method string getTraceAsString()
19
+ */
20
+ interface GuzzleException
21
+ {
22
+ }
23
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Exception;
4
+
5
+ final class InvalidArgumentException extends \InvalidArgumentException implements GuzzleException
6
+ {
7
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use GuzzleHttp\Promise\PromiseInterface;
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ResponseInterface;
7
+ use Psr\Http\Message\UriInterface;
8
+
9
+ /**
10
+ * HTTP Request exception
11
+ */
12
+ class RequestException extends TransferException
13
+ {
14
+ /** @var RequestInterface */
15
+ private $request;
16
+
17
+ /** @var ResponseInterface|null */
18
+ private $response;
19
+
20
+ /** @var array */
21
+ private $handlerContext;
22
+
23
+ public function __construct(
24
+ $message,
25
+ RequestInterface $request,
26
+ ResponseInterface $response = null,
27
+ \Exception $previous = null,
28
+ array $handlerContext = []
29
+ ) {
30
+ // Set the code of the exception if the response is set and not future.
31
+ $code = $response && !($response instanceof PromiseInterface)
32
+ ? $response->getStatusCode()
33
+ : 0;
34
+ parent::__construct($message, $code, $previous);
35
+ $this->request = $request;
36
+ $this->response = $response;
37
+ $this->handlerContext = $handlerContext;
38
+ }
39
+
40
+ /**
41
+ * Wrap non-RequestExceptions with a RequestException
42
+ *
43
+ * @param RequestInterface $request
44
+ * @param \Exception $e
45
+ *
46
+ * @return RequestException
47
+ */
48
+ public static function wrapException(RequestInterface $request, \Exception $e)
49
+ {
50
+ return $e instanceof RequestException
51
+ ? $e
52
+ : new RequestException($e->getMessage(), $request, null, $e);
53
+ }
54
+
55
+ /**
56
+ * Factory method to create a new exception with a normalized error message
57
+ *
58
+ * @param RequestInterface $request Request
59
+ * @param ResponseInterface $response Response received
60
+ * @param \Exception $previous Previous exception
61
+ * @param array $ctx Optional handler context.
62
+ *
63
+ * @return self
64
+ */
65
+ public static function create(
66
+ RequestInterface $request,
67
+ ResponseInterface $response = null,
68
+ \Exception $previous = null,
69
+ array $ctx = []
70
+ ) {
71
+ if (!$response) {
72
+ return new self(
73
+ 'Error completing request',
74
+ $request,
75
+ null,
76
+ $previous,
77
+ $ctx
78
+ );
79
+ }
80
+
81
+ $level = (int) floor($response->getStatusCode() / 100);
82
+ if ($level === 4) {
83
+ $label = 'Client error';
84
+ $className = ClientException::class;
85
+ } elseif ($level === 5) {
86
+ $label = 'Server error';
87
+ $className = ServerException::class;
88
+ } else {
89
+ $label = 'Unsuccessful request';
90
+ $className = __CLASS__;
91
+ }
92
+
93
+ $uri = $request->getUri();
94
+ $uri = static::obfuscateUri($uri);
95
+
96
+ // Client Error: `GET /` resulted in a `404 Not Found` response:
97
+ // <html> ... (truncated)
98
+ $message = sprintf(
99
+ '%s: `%s %s` resulted in a `%s %s` response',
100
+ $label,
101
+ $request->getMethod(),
102
+ $uri,
103
+ $response->getStatusCode(),
104
+ $response->getReasonPhrase()
105
+ );
106
+
107
+ $summary = static::getResponseBodySummary($response);
108
+
109
+ if ($summary !== null) {
110
+ $message .= ":\n{$summary}\n";
111
+ }
112
+
113
+ return new $className($message, $request, $response, $previous, $ctx);
114
+ }
115
+
116
+ /**
117
+ * Get a short summary of the response
118
+ *
119
+ * Will return `null` if the response is not printable.
120
+ *
121
+ * @param ResponseInterface $response
122
+ *
123
+ * @return string|null
124
+ */
125
+ public static function getResponseBodySummary(ResponseInterface $response)
126
+ {
127
+ return \GuzzleHttp\Psr7\get_message_body_summary($response);
128
+ }
129
+
130
+ /**
131
+ * Obfuscates URI if there is a username and a password present
132
+ *
133
+ * @param UriInterface $uri
134
+ *
135
+ * @return UriInterface
136
+ */
137
+ private static function obfuscateUri(UriInterface $uri)
138
+ {
139
+ $userInfo = $uri->getUserInfo();
140
+
141
+ if (false !== ($pos = strpos($userInfo, ':'))) {
142
+ return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
143
+ }
144
+
145
+ return $uri;
146
+ }
147
+
148
+ /**
149
+ * Get the request that caused the exception
150
+ *
151
+ * @return RequestInterface
152
+ */
153
+ public function getRequest()
154
+ {
155
+ return $this->request;
156
+ }
157
+
158
+ /**
159
+ * Get the associated response
160
+ *
161
+ * @return ResponseInterface|null
162
+ */
163
+ public function getResponse()
164
+ {
165
+ return $this->response;
166
+ }
167
+
168
+ /**
169
+ * Check if a response was received
170
+ *
171
+ * @return bool
172
+ */
173
+ public function hasResponse()
174
+ {
175
+ return $this->response !== null;
176
+ }
177
+
178
+ /**
179
+ * Get contextual information about the error from the underlying handler.
180
+ *
181
+ * The contents of this array will vary depending on which handler you are
182
+ * using. It may also be just an empty array. Relying on this data will
183
+ * couple you to a specific handler, but can give more debug information
184
+ * when needed.
185
+ *
186
+ * @return array
187
+ */
188
+ public function getHandlerContext()
189
+ {
190
+ return $this->handlerContext;
191
+ }
192
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use Psr\Http\Message\StreamInterface;
5
+
6
+ /**
7
+ * Exception thrown when a seek fails on a stream.
8
+ */
9
+ class SeekException extends \RuntimeException implements GuzzleException
10
+ {
11
+ private $stream;
12
+
13
+ public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
14
+ {
15
+ $this->stream = $stream;
16
+ $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
17
+ parent::__construct($msg);
18
+ }
19
+
20
+ /**
21
+ * @return StreamInterface
22
+ */
23
+ public function getStream()
24
+ {
25
+ return $this->stream;
26
+ }
27
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ /**
5
+ * Exception when a server error is encountered (5xx codes)
6
+ */
7
+ class ServerException extends BadResponseException
8
+ {
9
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ class TooManyRedirectsException extends RequestException
5
+ {
6
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ class TransferException extends \RuntimeException implements GuzzleException
5
+ {
6
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php ADDED
@@ -0,0 +1,585 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Exception\ConnectException;
5
+ use GuzzleHttp\Exception\RequestException;
6
+ use GuzzleHttp\Promise\FulfilledPromise;
7
+ use GuzzleHttp\Psr7;
8
+ use GuzzleHttp\Psr7\LazyOpenStream;
9
+ use GuzzleHttp\TransferStats;
10
+ use Psr\Http\Message\RequestInterface;
11
+
12
+ /**
13
+ * Creates curl resources from a request
14
+ */
15
+ class CurlFactory implements CurlFactoryInterface
16
+ {
17
+ const CURL_VERSION_STR = 'curl_version';
18
+ const LOW_CURL_VERSION_NUMBER = '7.21.2';
19
+
20
+ /** @var array */
21
+ private $handles = [];
22
+
23
+ /** @var int Total number of idle handles to keep in cache */
24
+ private $maxHandles;
25
+
26
+ /**
27
+ * @param int $maxHandles Maximum number of idle handles.
28
+ */
29
+ public function __construct($maxHandles)
30
+ {
31
+ $this->maxHandles = $maxHandles;
32
+ }
33
+
34
+ public function create(RequestInterface $request, array $options)
35
+ {
36
+ if (isset($options['curl']['body_as_string'])) {
37
+ $options['_body_as_string'] = $options['curl']['body_as_string'];
38
+ unset($options['curl']['body_as_string']);
39
+ }
40
+
41
+ $easy = new EasyHandle;
42
+ $easy->request = $request;
43
+ $easy->options = $options;
44
+ $conf = $this->getDefaultConf($easy);
45
+ $this->applyMethod($easy, $conf);
46
+ $this->applyHandlerOptions($easy, $conf);
47
+ $this->applyHeaders($easy, $conf);
48
+ unset($conf['_headers']);
49
+
50
+ // Add handler options from the request configuration options
51
+ if (isset($options['curl'])) {
52
+ $conf = array_replace($conf, $options['curl']);
53
+ }
54
+
55
+ $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
56
+ $easy->handle = $this->handles
57
+ ? array_pop($this->handles)
58
+ : curl_init();
59
+ curl_setopt_array($easy->handle, $conf);
60
+
61
+ return $easy;
62
+ }
63
+
64
+ public function release(EasyHandle $easy)
65
+ {
66
+ $resource = $easy->handle;
67
+ unset($easy->handle);
68
+
69
+ if (count($this->handles) >= $this->maxHandles) {
70
+ curl_close($resource);
71
+ } else {
72
+ // Remove all callback functions as they can hold onto references
73
+ // and are not cleaned up by curl_reset. Using curl_setopt_array
74
+ // does not work for some reason, so removing each one
75
+ // individually.
76
+ curl_setopt($resource, CURLOPT_HEADERFUNCTION, null);
77
+ curl_setopt($resource, CURLOPT_READFUNCTION, null);
78
+ curl_setopt($resource, CURLOPT_WRITEFUNCTION, null);
79
+ curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null);
80
+ curl_reset($resource);
81
+ $this->handles[] = $resource;
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Completes a cURL transaction, either returning a response promise or a
87
+ * rejected promise.
88
+ *
89
+ * @param callable $handler
90
+ * @param EasyHandle $easy
91
+ * @param CurlFactoryInterface $factory Dictates how the handle is released
92
+ *
93
+ * @return \GuzzleHttp\Promise\PromiseInterface
94
+ */
95
+ public static function finish(
96
+ callable $handler,
97
+ EasyHandle $easy,
98
+ CurlFactoryInterface $factory
99
+ ) {
100
+ if (isset($easy->options['on_stats'])) {
101
+ self::invokeStats($easy);
102
+ }
103
+
104
+ if (!$easy->response || $easy->errno) {
105
+ return self::finishError($handler, $easy, $factory);
106
+ }
107
+
108
+ // Return the response if it is present and there is no error.
109
+ $factory->release($easy);
110
+
111
+ // Rewind the body of the response if possible.
112
+ $body = $easy->response->getBody();
113
+ if ($body->isSeekable()) {
114
+ $body->rewind();
115
+ }
116
+
117
+ return new FulfilledPromise($easy->response);
118
+ }
119
+
120
+ private static function invokeStats(EasyHandle $easy)
121
+ {
122
+ $curlStats = curl_getinfo($easy->handle);
123
+ $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
124
+ $stats = new TransferStats(
125
+ $easy->request,
126
+ $easy->response,
127
+ $curlStats['total_time'],
128
+ $easy->errno,
129
+ $curlStats
130
+ );
131
+ call_user_func($easy->options['on_stats'], $stats);
132
+ }
133
+
134
+ private static function finishError(
135
+ callable $handler,
136
+ EasyHandle $easy,
137
+ CurlFactoryInterface $factory
138
+ ) {
139
+ // Get error information and release the handle to the factory.
140
+ $ctx = [
141
+ 'errno' => $easy->errno,
142
+ 'error' => curl_error($easy->handle),
143
+ 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
144
+ ] + curl_getinfo($easy->handle);
145
+ $ctx[self::CURL_VERSION_STR] = curl_version()['version'];
146
+ $factory->release($easy);
147
+
148
+ // Retry when nothing is present or when curl failed to rewind.
149
+ if (empty($easy->options['_err_message'])
150
+ && (!$easy->errno || $easy->errno == 65)
151
+ ) {
152
+ return self::retryFailedRewind($handler, $easy, $ctx);
153
+ }
154
+
155
+ return self::createRejection($easy, $ctx);
156
+ }
157
+
158
+ private static function createRejection(EasyHandle $easy, array $ctx)
159
+ {
160
+ static $connectionErrors = [
161
+ CURLE_OPERATION_TIMEOUTED => true,
162
+ CURLE_COULDNT_RESOLVE_HOST => true,
163
+ CURLE_COULDNT_CONNECT => true,
164
+ CURLE_SSL_CONNECT_ERROR => true,
165
+ CURLE_GOT_NOTHING => true,
166
+ ];
167
+
168
+ // If an exception was encountered during the onHeaders event, then
169
+ // return a rejected promise that wraps that exception.
170
+ if ($easy->onHeadersException) {
171
+ return \GuzzleHttp\Promise\rejection_for(
172
+ new RequestException(
173
+ 'An error was encountered during the on_headers event',
174
+ $easy->request,
175
+ $easy->response,
176
+ $easy->onHeadersException,
177
+ $ctx
178
+ )
179
+ );
180
+ }
181
+ if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
182
+ $message = sprintf(
183
+ 'cURL error %s: %s (%s)',
184
+ $ctx['errno'],
185
+ $ctx['error'],
186
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
187
+ );
188
+ } else {
189
+ $message = sprintf(
190
+ 'cURL error %s: %s (%s) for %s',
191
+ $ctx['errno'],
192
+ $ctx['error'],
193
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
194
+ $easy->request->getUri()
195
+ );
196
+ }
197
+
198
+ // Create a connection exception if it was a specific error code.
199
+ $error = isset($connectionErrors[$easy->errno])
200
+ ? new ConnectException($message, $easy->request, null, $ctx)
201
+ : new RequestException($message, $easy->request, $easy->response, null, $ctx);
202
+
203
+ return \GuzzleHttp\Promise\rejection_for($error);
204
+ }
205
+
206
+ private function getDefaultConf(EasyHandle $easy)
207
+ {
208
+ $conf = [
209
+ '_headers' => $easy->request->getHeaders(),
210
+ CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
211
+ CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
212
+ CURLOPT_RETURNTRANSFER => false,
213
+ CURLOPT_HEADER => false,
214
+ CURLOPT_CONNECTTIMEOUT => 150,
215
+ ];
216
+
217
+ if (defined('CURLOPT_PROTOCOLS')) {
218
+ $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
219
+ }
220
+
221
+ $version = $easy->request->getProtocolVersion();
222
+ if ($version == 1.1) {
223
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;
224
+ } elseif ($version == 2.0) {
225
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0;
226
+ } else {
227
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
228
+ }
229
+
230
+ return $conf;
231
+ }
232
+
233
+ private function applyMethod(EasyHandle $easy, array &$conf)
234
+ {
235
+ $body = $easy->request->getBody();
236
+ $size = $body->getSize();
237
+
238
+ if ($size === null || $size > 0) {
239
+ $this->applyBody($easy->request, $easy->options, $conf);
240
+ return;
241
+ }
242
+
243
+ $method = $easy->request->getMethod();
244
+ if ($method === 'PUT' || $method === 'POST') {
245
+ // See http://tools.ietf.org/html/rfc7230#section-3.3.2
246
+ if (!$easy->request->hasHeader('Content-Length')) {
247
+ $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
248
+ }
249
+ } elseif ($method === 'HEAD') {
250
+ $conf[CURLOPT_NOBODY] = true;
251
+ unset(
252
+ $conf[CURLOPT_WRITEFUNCTION],
253
+ $conf[CURLOPT_READFUNCTION],
254
+ $conf[CURLOPT_FILE],
255
+ $conf[CURLOPT_INFILE]
256
+ );
257
+ }
258
+ }
259
+
260
+ private function applyBody(RequestInterface $request, array $options, array &$conf)
261
+ {
262
+ $size = $request->hasHeader('Content-Length')
263
+ ? (int) $request->getHeaderLine('Content-Length')
264
+ : null;
265
+
266
+ // Send the body as a string if the size is less than 1MB OR if the
267
+ // [curl][body_as_string] request value is set.
268
+ if (($size !== null && $size < 1000000) ||
269
+ !empty($options['_body_as_string'])
270
+ ) {
271
+ $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody();
272
+ // Don't duplicate the Content-Length header
273
+ $this->removeHeader('Content-Length', $conf);
274
+ $this->removeHeader('Transfer-Encoding', $conf);
275
+ } else {
276
+ $conf[CURLOPT_UPLOAD] = true;
277
+ if ($size !== null) {
278
+ $conf[CURLOPT_INFILESIZE] = $size;
279
+ $this->removeHeader('Content-Length', $conf);
280
+ }
281
+ $body = $request->getBody();
282
+ if ($body->isSeekable()) {
283
+ $body->rewind();
284
+ }
285
+ $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) {
286
+ return $body->read($length);
287
+ };
288
+ }
289
+
290
+ // If the Expect header is not present, prevent curl from adding it
291
+ if (!$request->hasHeader('Expect')) {
292
+ $conf[CURLOPT_HTTPHEADER][] = 'Expect:';
293
+ }
294
+
295
+ // cURL sometimes adds a content-type by default. Prevent this.
296
+ if (!$request->hasHeader('Content-Type')) {
297
+ $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:';
298
+ }
299
+ }
300
+
301
+ private function applyHeaders(EasyHandle $easy, array &$conf)
302
+ {
303
+ foreach ($conf['_headers'] as $name => $values) {
304
+ foreach ($values as $value) {
305
+ $value = (string) $value;
306
+ if ($value === '') {
307
+ // cURL requires a special format for empty headers.
308
+ // See https://github.com/guzzle/guzzle/issues/1882 for more details.
309
+ $conf[CURLOPT_HTTPHEADER][] = "$name;";
310
+ } else {
311
+ $conf[CURLOPT_HTTPHEADER][] = "$name: $value";
312
+ }
313
+ }
314
+ }
315
+
316
+ // Remove the Accept header if one was not set
317
+ if (!$easy->request->hasHeader('Accept')) {
318
+ $conf[CURLOPT_HTTPHEADER][] = 'Accept:';
319
+ }
320
+ }
321
+
322
+ /**
323
+ * Remove a header from the options array.
324
+ *
325
+ * @param string $name Case-insensitive header to remove
326
+ * @param array $options Array of options to modify
327
+ */
328
+ private function removeHeader($name, array &$options)
329
+ {
330
+ foreach (array_keys($options['_headers']) as $key) {
331
+ if (!strcasecmp($key, $name)) {
332
+ unset($options['_headers'][$key]);
333
+ return;
334
+ }
335
+ }
336
+ }
337
+
338
+ private function applyHandlerOptions(EasyHandle $easy, array &$conf)
339
+ {
340
+ $options = $easy->options;
341
+ if (isset($options['verify'])) {
342
+ if ($options['verify'] === false) {
343
+ unset($conf[CURLOPT_CAINFO]);
344
+ $conf[CURLOPT_SSL_VERIFYHOST] = 0;
345
+ $conf[CURLOPT_SSL_VERIFYPEER] = false;
346
+ } else {
347
+ $conf[CURLOPT_SSL_VERIFYHOST] = 2;
348
+ $conf[CURLOPT_SSL_VERIFYPEER] = true;
349
+ if (is_string($options['verify'])) {
350
+ // Throw an error if the file/folder/link path is not valid or doesn't exist.
351
+ if (!file_exists($options['verify'])) {
352
+ throw new \InvalidArgumentException(
353
+ "SSL CA bundle not found: {$options['verify']}"
354
+ );
355
+ }
356
+ // If it's a directory or a link to a directory use CURLOPT_CAPATH.
357
+ // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
358
+ if (is_dir($options['verify']) ||
359
+ (is_link($options['verify']) && is_dir(readlink($options['verify'])))) {
360
+ $conf[CURLOPT_CAPATH] = $options['verify'];
361
+ } else {
362
+ $conf[CURLOPT_CAINFO] = $options['verify'];
363
+ }
364
+ }
365
+ }
366
+ }
367
+
368
+ if (!empty($options['decode_content'])) {
369
+ $accept = $easy->request->getHeaderLine('Accept-Encoding');
370
+ if ($accept) {
371
+ $conf[CURLOPT_ENCODING] = $accept;
372
+ } else {
373
+ $conf[CURLOPT_ENCODING] = '';
374
+ // Don't let curl send the header over the wire
375
+ $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
376
+ }
377
+ }
378
+
379
+ if (isset($options['sink'])) {
380
+ $sink = $options['sink'];
381
+ if (!is_string($sink)) {
382
+ $sink = \GuzzleHttp\Psr7\stream_for($sink);
383
+ } elseif (!is_dir(dirname($sink))) {
384
+ // Ensure that the directory exists before failing in curl.
385
+ throw new \RuntimeException(sprintf(
386
+ 'Directory %s does not exist for sink value of %s',
387
+ dirname($sink),
388
+ $sink
389
+ ));
390
+ } else {
391
+ $sink = new LazyOpenStream($sink, 'w+');
392
+ }
393
+ $easy->sink = $sink;
394
+ $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) {
395
+ return $sink->write($write);
396
+ };
397
+ } else {
398
+ // Use a default temp stream if no sink was set.
399
+ $conf[CURLOPT_FILE] = fopen('php://temp', 'w+');
400
+ $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]);
401
+ }
402
+ $timeoutRequiresNoSignal = false;
403
+ if (isset($options['timeout'])) {
404
+ $timeoutRequiresNoSignal |= $options['timeout'] < 1;
405
+ $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
406
+ }
407
+
408
+ // CURL default value is CURL_IPRESOLVE_WHATEVER
409
+ if (isset($options['force_ip_resolve'])) {
410
+ if ('v4' === $options['force_ip_resolve']) {
411
+ $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
412
+ } elseif ('v6' === $options['force_ip_resolve']) {
413
+ $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6;
414
+ }
415
+ }
416
+
417
+ if (isset($options['connect_timeout'])) {
418
+ $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1;
419
+ $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
420
+ }
421
+
422
+ if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
423
+ $conf[CURLOPT_NOSIGNAL] = true;
424
+ }
425
+
426
+ if (isset($options['proxy'])) {
427
+ if (!is_array($options['proxy'])) {
428
+ $conf[CURLOPT_PROXY] = $options['proxy'];
429
+ } else {
430
+ $scheme = $easy->request->getUri()->getScheme();
431
+ if (isset($options['proxy'][$scheme])) {
432
+ $host = $easy->request->getUri()->getHost();
433
+ if (!isset($options['proxy']['no']) ||
434
+ !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])
435
+ ) {
436
+ $conf[CURLOPT_PROXY] = $options['proxy'][$scheme];
437
+ }
438
+ }
439
+ }
440
+ }
441
+
442
+ if (isset($options['cert'])) {
443
+ $cert = $options['cert'];
444
+ if (is_array($cert)) {
445
+ $conf[CURLOPT_SSLCERTPASSWD] = $cert[1];
446
+ $cert = $cert[0];
447
+ }
448
+ if (!file_exists($cert)) {
449
+ throw new \InvalidArgumentException(
450
+ "SSL certificate not found: {$cert}"
451
+ );
452
+ }
453
+ $conf[CURLOPT_SSLCERT] = $cert;
454
+ }
455
+
456
+ if (isset($options['ssl_key'])) {
457
+ if (is_array($options['ssl_key'])) {
458
+ if (count($options['ssl_key']) === 2) {
459
+ list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
460
+ } else {
461
+ list($sslKey) = $options['ssl_key'];
462
+ }
463
+ }
464
+
465
+ $sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
466
+
467
+ if (!file_exists($sslKey)) {
468
+ throw new \InvalidArgumentException(
469
+ "SSL private key not found: {$sslKey}"
470
+ );
471
+ }
472
+ $conf[CURLOPT_SSLKEY] = $sslKey;
473
+ }
474
+
475
+ if (isset($options['progress'])) {
476
+ $progress = $options['progress'];
477
+ if (!is_callable($progress)) {
478
+ throw new \InvalidArgumentException(
479
+ 'progress client option must be callable'
480
+ );
481
+ }
482
+ $conf[CURLOPT_NOPROGRESS] = false;
483
+ $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) {
484
+ $args = func_get_args();
485
+ // PHP 5.5 pushed the handle onto the start of the args
486
+ if (is_resource($args[0])) {
487
+ array_shift($args);
488
+ }
489
+ call_user_func_array($progress, $args);
490
+ };
491
+ }
492
+
493
+ if (!empty($options['debug'])) {
494
+ $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']);
495
+ $conf[CURLOPT_VERBOSE] = true;
496
+ }
497
+ }
498
+
499
+ /**
500
+ * This function ensures that a response was set on a transaction. If one
501
+ * was not set, then the request is retried if possible. This error
502
+ * typically means you are sending a payload, curl encountered a
503
+ * "Connection died, retrying a fresh connect" error, tried to rewind the
504
+ * stream, and then encountered a "necessary data rewind wasn't possible"
505
+ * error, causing the request to be sent through curl_multi_info_read()
506
+ * without an error status.
507
+ */
508
+ private static function retryFailedRewind(
509
+ callable $handler,
510
+ EasyHandle $easy,
511
+ array $ctx
512
+ ) {
513
+ try {
514
+ // Only rewind if the body has been read from.
515
+ $body = $easy->request->getBody();
516
+ if ($body->tell() > 0) {
517
+ $body->rewind();
518
+ }
519
+ } catch (\RuntimeException $e) {
520
+ $ctx['error'] = 'The connection unexpectedly failed without '
521
+ . 'providing an error. The request would have been retried, '
522
+ . 'but attempting to rewind the request body failed. '
523
+ . 'Exception: ' . $e;
524
+ return self::createRejection($easy, $ctx);
525
+ }
526
+
527
+ // Retry no more than 3 times before giving up.
528
+ if (!isset($easy->options['_curl_retries'])) {
529
+ $easy->options['_curl_retries'] = 1;
530
+ } elseif ($easy->options['_curl_retries'] == 2) {
531
+ $ctx['error'] = 'The cURL request was retried 3 times '
532
+ . 'and did not succeed. The most likely reason for the failure '
533
+ . 'is that cURL was unable to rewind the body of the request '
534
+ . 'and subsequent retries resulted in the same error. Turn on '
535
+ . 'the debug option to see what went wrong. See '
536
+ . 'https://bugs.php.net/bug.php?id=47204 for more information.';
537
+ return self::createRejection($easy, $ctx);
538
+ } else {
539
+ $easy->options['_curl_retries']++;
540
+ }
541
+
542
+ return $handler($easy->request, $easy->options);
543
+ }
544
+
545
+ private function createHeaderFn(EasyHandle $easy)
546
+ {
547
+ if (isset($easy->options['on_headers'])) {
548
+ $onHeaders = $easy->options['on_headers'];
549
+
550
+ if (!is_callable($onHeaders)) {
551
+ throw new \InvalidArgumentException('on_headers must be callable');
552
+ }
553
+ } else {
554
+ $onHeaders = null;
555
+ }
556
+
557
+ return function ($ch, $h) use (
558
+ $onHeaders,
559
+ $easy,
560
+ &$startingResponse
561
+ ) {
562
+ $value = trim($h);
563
+ if ($value === '') {
564
+ $startingResponse = true;
565
+ $easy->createResponse();
566
+ if ($onHeaders !== null) {
567
+ try {
568
+ $onHeaders($easy->response);
569
+ } catch (\Exception $e) {
570
+ // Associate the exception with the handle and trigger
571
+ // a curl header write error by returning 0.
572
+ $easy->onHeadersException = $e;
573
+ return -1;
574
+ }
575
+ }
576
+ } elseif ($startingResponse) {
577
+ $startingResponse = false;
578
+ $easy->headers = [$value];
579
+ } else {
580
+ $easy->headers[] = $value;
581
+ }
582
+ return strlen($h);
583
+ };
584
+ }
585
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+
6
+ interface CurlFactoryInterface
7
+ {
8
+ /**
9
+ * Creates a cURL handle resource.
10
+ *
11
+ * @param RequestInterface $request Request
12
+ * @param array $options Transfer options
13
+ *
14
+ * @return EasyHandle
15
+ * @throws \RuntimeException when an option cannot be applied
16
+ */
17
+ public function create(RequestInterface $request, array $options);
18
+
19
+ /**
20
+ * Release an easy handle, allowing it to be reused or closed.
21
+ *
22
+ * This function must call unset on the easy handle's "handle" property.
23
+ *
24
+ * @param EasyHandle $easy
25
+ */
26
+ public function release(EasyHandle $easy);
27
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Psr7;
5
+ use Psr\Http\Message\RequestInterface;
6
+
7
+ /**
8
+ * HTTP handler that uses cURL easy handles as a transport layer.
9
+ *
10
+ * When using the CurlHandler, custom curl options can be specified as an
11
+ * associative array of curl option constants mapping to values in the
12
+ * **curl** key of the "client" key of the request.
13
+ */
14
+ class CurlHandler
15
+ {
16
+ /** @var CurlFactoryInterface */
17
+ private $factory;
18
+
19
+ /**
20
+ * Accepts an associative array of options:
21
+ *
22
+ * - factory: Optional curl factory used to create cURL handles.
23
+ *
24
+ * @param array $options Array of options to use with the handler
25
+ */
26
+ public function __construct(array $options = [])
27
+ {
28
+ $this->factory = isset($options['handle_factory'])
29
+ ? $options['handle_factory']
30
+ : new CurlFactory(3);
31
+ }
32
+
33
+ public function __invoke(RequestInterface $request, array $options)
34
+ {
35
+ if (isset($options['delay'])) {
36
+ usleep($options['delay'] * 1000);
37
+ }
38
+
39
+ $easy = $this->factory->create($request, $options);
40
+ curl_exec($easy->handle);
41
+ $easy->errno = curl_errno($easy->handle);
42
+
43
+ return CurlFactory::finish($this, $easy, $this->factory);
44
+ }
45
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Promise as P;
5
+ use GuzzleHttp\Promise\Promise;
6
+ use GuzzleHttp\Utils;
7
+ use Psr\Http\Message\RequestInterface;
8
+
9
+ /**
10
+ * Returns an asynchronous response using curl_multi_* functions.
11
+ *
12
+ * When using the CurlMultiHandler, custom curl options can be specified as an
13
+ * associative array of curl option constants mapping to values in the
14
+ * **curl** key of the provided request options.
15
+ *
16
+ * @property resource $_mh Internal use only. Lazy loaded multi-handle.
17
+ */
18
+ class CurlMultiHandler
19
+ {
20
+ /** @var CurlFactoryInterface */
21
+ private $factory;
22
+ private $selectTimeout;
23
+ private $active;
24
+ private $handles = [];
25
+ private $delays = [];
26
+ private $options = [];
27
+
28
+ /**
29
+ * This handler accepts the following options:
30
+ *
31
+ * - handle_factory: An optional factory used to create curl handles
32
+ * - select_timeout: Optional timeout (in seconds) to block before timing
33
+ * out while selecting curl handles. Defaults to 1 second.
34
+ * - options: An associative array of CURLMOPT_* options and
35
+ * corresponding values for curl_multi_setopt()
36
+ *
37
+ * @param array $options
38
+ */
39
+ public function __construct(array $options = [])
40
+ {
41
+ $this->factory = isset($options['handle_factory'])
42
+ ? $options['handle_factory'] : new CurlFactory(50);
43
+
44
+ if (isset($options['select_timeout'])) {
45
+ $this->selectTimeout = $options['select_timeout'];
46
+ } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
47
+ $this->selectTimeout = $selectTimeout;
48
+ } else {
49
+ $this->selectTimeout = 1;
50
+ }
51
+
52
+ $this->options = isset($options['options']) ? $options['options'] : [];
53
+ }
54
+
55
+ public function __get($name)
56
+ {
57
+ if ($name === '_mh') {
58
+ $this->_mh = curl_multi_init();
59
+
60
+ foreach ($this->options as $option => $value) {
61
+ // A warning is raised in case of a wrong option.
62
+ curl_multi_setopt($this->_mh, $option, $value);
63
+ }
64
+
65
+ // Further calls to _mh will return the value directly, without entering the
66
+ // __get() method at all.
67
+ return $this->_mh;
68
+ }
69
+
70
+ throw new \BadMethodCallException();
71
+ }
72
+
73
+ public function __destruct()
74
+ {
75
+ if (isset($this->_mh)) {
76
+ curl_multi_close($this->_mh);
77
+ unset($this->_mh);
78
+ }
79
+ }
80
+
81
+ public function __invoke(RequestInterface $request, array $options)
82
+ {
83
+ $easy = $this->factory->create($request, $options);
84
+ $id = (int) $easy->handle;
85
+
86
+ $promise = new Promise(
87
+ [$this, 'execute'],
88
+ function () use ($id) {
89
+ return $this->cancel($id);
90
+ }
91
+ );
92
+
93
+ $this->addRequest(['easy' => $easy, 'deferred' => $promise]);
94
+
95
+ return $promise;
96
+ }
97
+
98
+ /**
99
+ * Ticks the curl event loop.
100
+ */
101
+ public function tick()
102
+ {
103
+ // Add any delayed handles if needed.
104
+ if ($this->delays) {
105
+ $currentTime = Utils::currentTime();
106
+ foreach ($this->delays as $id => $delay) {
107
+ if ($currentTime >= $delay) {
108
+ unset($this->delays[$id]);
109
+ curl_multi_add_handle(
110
+ $this->_mh,
111
+ $this->handles[$id]['easy']->handle
112
+ );
113
+ }
114
+ }
115
+ }
116
+
117
+ // Step through the task queue which may add additional requests.
118
+ P\queue()->run();
119
+
120
+ if ($this->active &&
121
+ curl_multi_select($this->_mh, $this->selectTimeout) === -1
122
+ ) {
123
+ // Perform a usleep if a select returns -1.
124
+ // See: https://bugs.php.net/bug.php?id=61141
125
+ usleep(250);
126
+ }
127
+
128
+ while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
129
+
130
+ $this->processMessages();
131
+ }
132
+
133
+ /**
134
+ * Runs until all outstanding connections have completed.
135
+ */
136
+ public function execute()
137
+ {
138
+ $queue = P\queue();
139
+
140
+ while ($this->handles || !$queue->isEmpty()) {
141
+ // If there are no transfers, then sleep for the next delay
142
+ if (!$this->active && $this->delays) {
143
+ usleep($this->timeToNext());
144
+ }
145
+ $this->tick();
146
+ }
147
+ }
148
+
149
+ private function addRequest(array $entry)
150
+ {
151
+ $easy = $entry['easy'];
152
+ $id = (int) $easy->handle;
153
+ $this->handles[$id] = $entry;
154
+ if (empty($easy->options['delay'])) {
155
+ curl_multi_add_handle($this->_mh, $easy->handle);
156
+ } else {
157
+ $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
158
+ }
159
+ }
160
+
161
+ /**
162
+ * Cancels a handle from sending and removes references to it.
163
+ *
164
+ * @param int $id Handle ID to cancel and remove.
165
+ *
166
+ * @return bool True on success, false on failure.
167
+ */
168
+ private function cancel($id)
169
+ {
170
+ // Cannot cancel if it has been processed.
171
+ if (!isset($this->handles[$id])) {
172
+ return false;
173
+ }
174
+
175
+ $handle = $this->handles[$id]['easy']->handle;
176
+ unset($this->delays[$id], $this->handles[$id]);
177
+ curl_multi_remove_handle($this->_mh, $handle);
178
+ curl_close($handle);
179
+
180
+ return true;
181
+ }
182
+
183
+ private function processMessages()
184
+ {
185
+ while ($done = curl_multi_info_read($this->_mh)) {
186
+ $id = (int) $done['handle'];
187
+ curl_multi_remove_handle($this->_mh, $done['handle']);
188
+
189
+ if (!isset($this->handles[$id])) {
190
+ // Probably was cancelled.
191
+ continue;
192
+ }
193
+
194
+ $entry = $this->handles[$id];
195
+ unset($this->handles[$id], $this->delays[$id]);
196
+ $entry['easy']->errno = $done['result'];
197
+ $entry['deferred']->resolve(
198
+ CurlFactory::finish(
199
+ $this,
200
+ $entry['easy'],
201
+ $this->factory
202
+ )
203
+ );
204
+ }
205
+ }
206
+
207
+ private function timeToNext()
208
+ {
209
+ $currentTime = Utils::currentTime();
210
+ $nextTime = PHP_INT_MAX;
211
+ foreach ($this->delays as $time) {
212
+ if ($time < $nextTime) {
213
+ $nextTime = $time;
214
+ }
215
+ }
216
+
217
+ return max(0, $nextTime - $currentTime) * 1000000;
218
+ }
219
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Psr7\Response;
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ResponseInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+
9
+ /**
10
+ * Represents a cURL easy handle and the data it populates.
11
+ *
12
+ * @internal
13
+ */
14
+ final class EasyHandle
15
+ {
16
+ /** @var resource cURL resource */
17
+ public $handle;
18
+
19
+ /** @var StreamInterface Where data is being written */
20
+ public $sink;
21
+
22
+ /** @var array Received HTTP headers so far */
23
+ public $headers = [];
24
+
25
+ /** @var ResponseInterface Received response (if any) */
26
+ public $response;
27
+
28
+ /** @var RequestInterface Request being sent */
29
+ public $request;
30
+
31
+ /** @var array Request options */
32
+ public $options = [];
33
+
34
+ /** @var int cURL error number (if any) */
35
+ public $errno = 0;
36
+
37
+ /** @var \Exception Exception during on_headers (if any) */
38
+ public $onHeadersException;
39
+
40
+ /**
41
+ * Attach a response to the easy handle based on the received headers.
42
+ *
43
+ * @throws \RuntimeException if no headers have been received.
44
+ */
45
+ public function createResponse()
46
+ {
47
+ if (empty($this->headers)) {
48
+ throw new \RuntimeException('No headers have been received');
49
+ }
50
+
51
+ // HTTP-version SP status-code SP reason-phrase
52
+ $startLine = explode(' ', array_shift($this->headers), 3);
53
+ $headers = \GuzzleHttp\headers_from_lines($this->headers);
54
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
55
+
56
+ if (!empty($this->options['decode_content'])
57
+ && isset($normalizedKeys['content-encoding'])
58
+ ) {
59
+ $headers['x-encoded-content-encoding']
60
+ = $headers[$normalizedKeys['content-encoding']];
61
+ unset($headers[$normalizedKeys['content-encoding']]);
62
+ if (isset($normalizedKeys['content-length'])) {
63
+ $headers['x-encoded-content-length']
64
+ = $headers[$normalizedKeys['content-length']];
65
+
66
+ $bodyLength = (int) $this->sink->getSize();
67
+ if ($bodyLength) {
68
+ $headers[$normalizedKeys['content-length']] = $bodyLength;
69
+ } else {
70
+ unset($headers[$normalizedKeys['content-length']]);
71
+ }
72
+ }
73
+ }
74
+
75
+ // Attach a response to the easy handle with the parsed headers.
76
+ $this->response = new Response(
77
+ $startLine[1],
78
+ $headers,
79
+ $this->sink,
80
+ substr($startLine[0], 5),
81
+ isset($startLine[2]) ? (string) $startLine[2] : null
82
+ );
83
+ }
84
+
85
+ public function __get($name)
86
+ {
87
+ $msg = $name === 'handle'
88
+ ? 'The EasyHandle has been released'
89
+ : 'Invalid property: ' . $name;
90
+ throw new \BadMethodCallException($msg);
91
+ }
92
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Exception\RequestException;
5
+ use GuzzleHttp\HandlerStack;
6
+ use GuzzleHttp\Promise\PromiseInterface;
7
+ use GuzzleHttp\Promise\RejectedPromise;
8
+ use GuzzleHttp\TransferStats;
9
+ use Psr\Http\Message\RequestInterface;
10
+ use Psr\Http\Message\ResponseInterface;
11
+
12
+ /**
13
+ * Handler that returns responses or throw exceptions from a queue.
14
+ */
15
+ class MockHandler implements \Countable
16
+ {
17
+ private $queue = [];
18
+ private $lastRequest;
19
+ private $lastOptions;
20
+ private $onFulfilled;
21
+ private $onRejected;
22
+
23
+ /**
24
+ * Creates a new MockHandler that uses the default handler stack list of
25
+ * middlewares.
26
+ *
27
+ * @param array $queue Array of responses, callables, or exceptions.
28
+ * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
29
+ * @param callable $onRejected Callback to invoke when the return value is rejected.
30
+ *
31
+ * @return HandlerStack
32
+ */
33
+ public static function createWithMiddleware(
34
+ array $queue = null,
35
+ callable $onFulfilled = null,
36
+ callable $onRejected = null
37
+ ) {
38
+ return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
39
+ }
40
+
41
+ /**
42
+ * The passed in value must be an array of
43
+ * {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions,
44
+ * callables, or Promises.
45
+ *
46
+ * @param array $queue
47
+ * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
48
+ * @param callable $onRejected Callback to invoke when the return value is rejected.
49
+ */
50
+ public function __construct(
51
+ array $queue = null,
52
+ callable $onFulfilled = null,
53
+ callable $onRejected = null
54
+ ) {
55
+ $this->onFulfilled = $onFulfilled;
56
+ $this->onRejected = $onRejected;
57
+
58
+ if ($queue) {
59
+ call_user_func_array([$this, 'append'], $queue);
60
+ }
61
+ }
62
+
63
+ public function __invoke(RequestInterface $request, array $options)
64
+ {
65
+ if (!$this->queue) {
66
+ throw new \OutOfBoundsException('Mock queue is empty');
67
+ }
68
+
69
+ if (isset($options['delay']) && is_numeric($options['delay'])) {
70
+ usleep($options['delay'] * 1000);
71
+ }
72
+
73
+ $this->lastRequest = $request;
74
+ $this->lastOptions = $options;
75
+ $response = array_shift($this->queue);
76
+
77
+ if (isset($options['on_headers'])) {
78
+ if (!is_callable($options['on_headers'])) {
79
+ throw new \InvalidArgumentException('on_headers must be callable');
80
+ }
81
+ try {
82
+ $options['on_headers']($response);
83
+ } catch (\Exception $e) {
84
+ $msg = 'An error was encountered during the on_headers event';
85
+ $response = new RequestException($msg, $request, $response, $e);
86
+ }
87
+ }
88
+
89
+ if (is_callable($response)) {
90
+ $response = call_user_func($response, $request, $options);
91
+ }
92
+
93
+ $response = $response instanceof \Exception
94
+ ? \GuzzleHttp\Promise\rejection_for($response)
95
+ : \GuzzleHttp\Promise\promise_for($response);
96
+
97
+ return $response->then(
98
+ function ($value) use ($request, $options) {
99
+ $this->invokeStats($request, $options, $value);
100
+ if ($this->onFulfilled) {
101
+ call_user_func($this->onFulfilled, $value);
102
+ }
103
+ if (isset($options['sink'])) {
104
+ $contents = (string) $value->getBody();
105
+ $sink = $options['sink'];
106
+
107
+ if (is_resource($sink)) {
108
+ fwrite($sink, $contents);
109
+ } elseif (is_string($sink)) {
110
+ file_put_contents($sink, $contents);
111
+ } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) {
112
+ $sink->write($contents);
113
+ }
114
+ }
115
+
116
+ return $value;
117
+ },
118
+ function ($reason) use ($request, $options) {
119
+ $this->invokeStats($request, $options, null, $reason);
120
+ if ($this->onRejected) {
121
+ call_user_func($this->onRejected, $reason);
122
+ }
123
+ return \GuzzleHttp\Promise\rejection_for($reason);
124
+ }
125
+ );
126
+ }
127
+
128
+ /**
129
+ * Adds one or more variadic requests, exceptions, callables, or promises
130
+ * to the queue.
131
+ */
132
+ public function append()
133
+ {
134
+ foreach (func_get_args() as $value) {
135
+ if ($value instanceof ResponseInterface
136
+ || $value instanceof \Exception
137
+ || $value instanceof PromiseInterface
138
+ || is_callable($value)
139
+ ) {
140
+ $this->queue[] = $value;
141
+ } else {
142
+ throw new \InvalidArgumentException('Expected a response or '
143
+ . 'exception. Found ' . \GuzzleHttp\describe_type($value));
144
+ }
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Get the last received request.
150
+ *
151
+ * @return RequestInterface
152
+ */
153
+ public function getLastRequest()
154
+ {
155
+ return $this->lastRequest;
156
+ }
157
+
158
+ /**
159
+ * Get the last received request options.
160
+ *
161
+ * @return array
162
+ */
163
+ public function getLastOptions()
164
+ {
165
+ return $this->lastOptions;
166
+ }
167
+
168
+ /**
169
+ * Returns the number of remaining items in the queue.
170
+ *
171
+ * @return int
172
+ */
173
+ public function count()
174
+ {
175
+ return count($this->queue);
176
+ }
177
+
178
+ public function reset()
179
+ {
180
+ $this->queue = [];
181
+ }
182
+
183
+ private function invokeStats(
184
+ RequestInterface $request,
185
+ array $options,
186
+ ResponseInterface $response = null,
187
+ $reason = null
188
+ ) {
189
+ if (isset($options['on_stats'])) {
190
+ $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
191
+ $stats = new TransferStats($request, $response, $transferTime, $reason);
192
+ call_user_func($options['on_stats'], $stats);
193
+ }
194
+ }
195
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\RequestOptions;
5
+ use Psr\Http\Message\RequestInterface;
6
+
7
+ /**
8
+ * Provides basic proxies for handlers.
9
+ */
10
+ class Proxy
11
+ {
12
+ /**
13
+ * Sends synchronous requests to a specific handler while sending all other
14
+ * requests to another handler.
15
+ *
16
+ * @param callable $default Handler used for normal responses
17
+ * @param callable $sync Handler used for synchronous responses.
18
+ *
19
+ * @return callable Returns the composed handler.
20
+ */
21
+ public static function wrapSync(
22
+ callable $default,
23
+ callable $sync
24
+ ) {
25
+ return function (RequestInterface $request, array $options) use ($default, $sync) {
26
+ return empty($options[RequestOptions::SYNCHRONOUS])
27
+ ? $default($request, $options)
28
+ : $sync($request, $options);
29
+ };
30
+ }
31
+
32
+ /**
33
+ * Sends streaming requests to a streaming compatible handler while sending
34
+ * all other requests to a default handler.
35
+ *
36
+ * This, for example, could be useful for taking advantage of the
37
+ * performance benefits of curl while still supporting true streaming
38
+ * through the StreamHandler.
39
+ *
40
+ * @param callable $default Handler used for non-streaming responses
41
+ * @param callable $streaming Handler used for streaming responses
42
+ *
43
+ * @return callable Returns the composed handler.
44
+ */
45
+ public static function wrapStreaming(
46
+ callable $default,
47
+ callable $streaming
48
+ ) {
49
+ return function (RequestInterface $request, array $options) use ($default, $streaming) {
50
+ return empty($options['stream'])
51
+ ? $default($request, $options)
52
+ : $streaming($request, $options);
53
+ };
54
+ }
55
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php ADDED
@@ -0,0 +1,545 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Exception\ConnectException;
5
+ use GuzzleHttp\Exception\RequestException;
6
+ use GuzzleHttp\Promise\FulfilledPromise;
7
+ use GuzzleHttp\Promise\PromiseInterface;
8
+ use GuzzleHttp\Psr7;
9
+ use GuzzleHttp\TransferStats;
10
+ use GuzzleHttp\Utils;
11
+ use Psr\Http\Message\RequestInterface;
12
+ use Psr\Http\Message\ResponseInterface;
13
+ use Psr\Http\Message\StreamInterface;
14
+
15
+ /**
16
+ * HTTP handler that uses PHP's HTTP stream wrapper.
17
+ */
18
+ class StreamHandler
19
+ {
20
+ private $lastHeaders = [];
21
+
22
+ /**
23
+ * Sends an HTTP request.
24
+ *
25
+ * @param RequestInterface $request Request to send.
26
+ * @param array $options Request transfer options.
27
+ *
28
+ * @return PromiseInterface
29
+ */
30
+ public function __invoke(RequestInterface $request, array $options)
31
+ {
32
+ // Sleep if there is a delay specified.
33
+ if (isset($options['delay'])) {
34
+ usleep($options['delay'] * 1000);
35
+ }
36
+
37
+ $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
38
+
39
+ try {
40
+ // Does not support the expect header.
41
+ $request = $request->withoutHeader('Expect');
42
+
43
+ // Append a content-length header if body size is zero to match
44
+ // cURL's behavior.
45
+ if (0 === $request->getBody()->getSize()) {
46
+ $request = $request->withHeader('Content-Length', '0');
47
+ }
48
+
49
+ return $this->createResponse(
50
+ $request,
51
+ $options,
52
+ $this->createStream($request, $options),
53
+ $startTime
54
+ );
55
+ } catch (\InvalidArgumentException $e) {
56
+ throw $e;
57
+ } catch (\Exception $e) {
58
+ // Determine if the error was a networking error.
59
+ $message = $e->getMessage();
60
+ // This list can probably get more comprehensive.
61
+ if (strpos($message, 'getaddrinfo') // DNS lookup failed
62
+ || strpos($message, 'Connection refused')
63
+ || strpos($message, "couldn't connect to host") // error on HHVM
64
+ || strpos($message, "connection attempt failed")
65
+ ) {
66
+ $e = new ConnectException($e->getMessage(), $request, $e);
67
+ }
68
+ $e = RequestException::wrapException($request, $e);
69
+ $this->invokeStats($options, $request, $startTime, null, $e);
70
+
71
+ return \GuzzleHttp\Promise\rejection_for($e);
72
+ }
73
+ }
74
+
75
+ private function invokeStats(
76
+ array $options,
77
+ RequestInterface $request,
78
+ $startTime,
79
+ ResponseInterface $response = null,
80
+ $error = null
81
+ ) {
82
+ if (isset($options['on_stats'])) {
83
+ $stats = new TransferStats(
84
+ $request,
85
+ $response,
86
+ Utils::currentTime() - $startTime,
87
+ $error,
88
+ []
89
+ );
90
+ call_user_func($options['on_stats'], $stats);
91
+ }
92
+ }
93
+
94
+ private function createResponse(
95
+ RequestInterface $request,
96
+ array $options,
97
+ $stream,
98
+ $startTime
99
+ ) {
100
+ $hdrs = $this->lastHeaders;
101
+ $this->lastHeaders = [];
102
+ $parts = explode(' ', array_shift($hdrs), 3);
103
+ $ver = explode('/', $parts[0])[1];
104
+ $status = $parts[1];
105
+ $reason = isset($parts[2]) ? $parts[2] : null;
106
+ $headers = \GuzzleHttp\headers_from_lines($hdrs);
107
+ list($stream, $headers) = $this->checkDecode($options, $headers, $stream);
108
+ $stream = Psr7\stream_for($stream);
109
+ $sink = $stream;
110
+
111
+ if (strcasecmp('HEAD', $request->getMethod())) {
112
+ $sink = $this->createSink($stream, $options);
113
+ }
114
+
115
+ $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
116
+
117
+ if (isset($options['on_headers'])) {
118
+ try {
119
+ $options['on_headers']($response);
120
+ } catch (\Exception $e) {
121
+ $msg = 'An error was encountered during the on_headers event';
122
+ $ex = new RequestException($msg, $request, $response, $e);
123
+ return \GuzzleHttp\Promise\rejection_for($ex);
124
+ }
125
+ }
126
+
127
+ // Do not drain when the request is a HEAD request because they have
128
+ // no body.
129
+ if ($sink !== $stream) {
130
+ $this->drain(
131
+ $stream,
132
+ $sink,
133
+ $response->getHeaderLine('Content-Length')
134
+ );
135
+ }
136
+
137
+ $this->invokeStats($options, $request, $startTime, $response, null);
138
+
139
+ return new FulfilledPromise($response);
140
+ }
141
+
142
+ private function createSink(StreamInterface $stream, array $options)
143
+ {
144
+ if (!empty($options['stream'])) {
145
+ return $stream;
146
+ }
147
+
148
+ $sink = isset($options['sink'])
149
+ ? $options['sink']
150
+ : fopen('php://temp', 'r+');
151
+
152
+ return is_string($sink)
153
+ ? new Psr7\LazyOpenStream($sink, 'w+')
154
+ : Psr7\stream_for($sink);
155
+ }
156
+
157
+ private function checkDecode(array $options, array $headers, $stream)
158
+ {
159
+ // Automatically decode responses when instructed.
160
+ if (!empty($options['decode_content'])) {
161
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
162
+ if (isset($normalizedKeys['content-encoding'])) {
163
+ $encoding = $headers[$normalizedKeys['content-encoding']];
164
+ if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
165
+ $stream = new Psr7\InflateStream(
166
+ Psr7\stream_for($stream)
167
+ );
168
+ $headers['x-encoded-content-encoding']
169
+ = $headers[$normalizedKeys['content-encoding']];
170
+ // Remove content-encoding header
171
+ unset($headers[$normalizedKeys['content-encoding']]);
172
+ // Fix content-length header
173
+ if (isset($normalizedKeys['content-length'])) {
174
+ $headers['x-encoded-content-length']
175
+ = $headers[$normalizedKeys['content-length']];
176
+
177
+ $length = (int) $stream->getSize();
178
+ if ($length === 0) {
179
+ unset($headers[$normalizedKeys['content-length']]);
180
+ } else {
181
+ $headers[$normalizedKeys['content-length']] = [$length];
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ return [$stream, $headers];
189
+ }
190
+
191
+ /**
192
+ * Drains the source stream into the "sink" client option.
193
+ *
194
+ * @param StreamInterface $source
195
+ * @param StreamInterface $sink
196
+ * @param string $contentLength Header specifying the amount of
197
+ * data to read.
198
+ *
199
+ * @return StreamInterface
200
+ * @throws \RuntimeException when the sink option is invalid.
201
+ */
202
+ private function drain(
203
+ StreamInterface $source,
204
+ StreamInterface $sink,
205
+ $contentLength
206
+ ) {
207
+ // If a content-length header is provided, then stop reading once
208
+ // that number of bytes has been read. This can prevent infinitely
209
+ // reading from a stream when dealing with servers that do not honor
210
+ // Connection: Close headers.
211
+ Psr7\copy_to_stream(
212
+ $source,
213
+ $sink,
214
+ (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
215
+ );
216
+
217
+ $sink->seek(0);
218
+ $source->close();
219
+
220
+ return $sink;
221
+ }
222
+
223
+ /**
224
+ * Create a resource and check to ensure it was created successfully
225
+ *
226
+ * @param callable $callback Callable that returns stream resource
227
+ *
228
+ * @return resource
229
+ * @throws \RuntimeException on error
230
+ */
231
+ private function createResource(callable $callback)
232
+ {
233
+ $errors = null;
234
+ set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
235
+ $errors[] = [
236
+ 'message' => $msg,
237
+ 'file' => $file,
238
+ 'line' => $line
239
+ ];
240
+ return true;
241
+ });
242
+
243
+ $resource = $callback();
244
+ restore_error_handler();
245
+
246
+ if (!$resource) {
247
+ $message = 'Error creating resource: ';
248
+ foreach ($errors as $err) {
249
+ foreach ($err as $key => $value) {
250
+ $message .= "[$key] $value" . PHP_EOL;
251
+ }
252
+ }
253
+ throw new \RuntimeException(trim($message));
254
+ }
255
+
256
+ return $resource;
257
+ }
258
+
259
+ private function createStream(RequestInterface $request, array $options)
260
+ {
261
+ static $methods;
262
+ if (!$methods) {
263
+ $methods = array_flip(get_class_methods(__CLASS__));
264
+ }
265
+
266
+ // HTTP/1.1 streams using the PHP stream wrapper require a
267
+ // Connection: close header
268
+ if ($request->getProtocolVersion() == '1.1'
269
+ && !$request->hasHeader('Connection')
270
+ ) {
271
+ $request = $request->withHeader('Connection', 'close');
272
+ }
273
+
274
+ // Ensure SSL is verified by default
275
+ if (!isset($options['verify'])) {
276
+ $options['verify'] = true;
277
+ }
278
+
279
+ $params = [];
280
+ $context = $this->getDefaultContext($request);
281
+
282
+ if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
283
+ throw new \InvalidArgumentException('on_headers must be callable');
284
+ }
285
+
286
+ if (!empty($options)) {
287
+ foreach ($options as $key => $value) {
288
+ $method = "add_{$key}";
289
+ if (isset($methods[$method])) {
290
+ $this->{$method}($request, $context, $value, $params);
291
+ }
292
+ }
293
+ }
294
+
295
+ if (isset($options['stream_context'])) {
296
+ if (!is_array($options['stream_context'])) {
297
+ throw new \InvalidArgumentException('stream_context must be an array');
298
+ }
299
+ $context = array_replace_recursive(
300
+ $context,
301
+ $options['stream_context']
302
+ );
303
+ }
304
+
305
+ // Microsoft NTLM authentication only supported with curl handler
306
+ if (isset($options['auth'])
307
+ && is_array($options['auth'])
308
+ && isset($options['auth'][2])
309
+ && 'ntlm' == $options['auth'][2]
310
+ ) {
311
+ throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
312
+ }
313
+
314
+ $uri = $this->resolveHost($request, $options);
315
+
316
+ $context = $this->createResource(
317
+ function () use ($context, $params) {
318
+ return stream_context_create($context, $params);
319
+ }
320
+ );
321
+
322
+ return $this->createResource(
323
+ function () use ($uri, &$http_response_header, $context, $options) {
324
+ $resource = fopen((string) $uri, 'r', null, $context);
325
+ $this->lastHeaders = $http_response_header;
326
+
327
+ if (isset($options['read_timeout'])) {
328
+ $readTimeout = $options['read_timeout'];
329
+ $sec = (int) $readTimeout;
330
+ $usec = ($readTimeout - $sec) * 100000;
331
+ stream_set_timeout($resource, $sec, $usec);
332
+ }
333
+
334
+ return $resource;
335
+ }
336
+ );
337
+ }
338
+
339
+ private function resolveHost(RequestInterface $request, array $options)
340
+ {
341
+ $uri = $request->getUri();
342
+
343
+ if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) {
344
+ if ('v4' === $options['force_ip_resolve']) {
345
+ $records = dns_get_record($uri->getHost(), DNS_A);
346
+ if (!isset($records[0]['ip'])) {
347
+ throw new ConnectException(
348
+ sprintf(
349
+ "Could not resolve IPv4 address for host '%s'",
350
+ $uri->getHost()
351
+ ),
352
+ $request
353
+ );
354
+ }
355
+ $uri = $uri->withHost($records[0]['ip']);
356
+ } elseif ('v6' === $options['force_ip_resolve']) {
357
+ $records = dns_get_record($uri->getHost(), DNS_AAAA);
358
+ if (!isset($records[0]['ipv6'])) {
359
+ throw new ConnectException(
360
+ sprintf(
361
+ "Could not resolve IPv6 address for host '%s'",
362
+ $uri->getHost()
363
+ ),
364
+ $request
365
+ );
366
+ }
367
+ $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
368
+ }
369
+ }
370
+
371
+ return $uri;
372
+ }
373
+
374
+ private function getDefaultContext(RequestInterface $request)
375
+ {
376
+ $headers = '';
377
+ foreach ($request->getHeaders() as $name => $value) {
378
+ foreach ($value as $val) {
379
+ $headers .= "$name: $val\r\n";
380
+ }
381
+ }
382
+
383
+ $context = [
384
+ 'http' => [
385
+ 'method' => $request->getMethod(),
386
+ 'header' => $headers,
387
+ 'protocol_version' => $request->getProtocolVersion(),
388
+ 'ignore_errors' => true,
389
+ 'follow_location' => 0,
390
+ ],
391
+ ];
392
+
393
+ $body = (string) $request->getBody();
394
+
395
+ if (!empty($body)) {
396
+ $context['http']['content'] = $body;
397
+ // Prevent the HTTP handler from adding a Content-Type header.
398
+ if (!$request->hasHeader('Content-Type')) {
399
+ $context['http']['header'] .= "Content-Type:\r\n";
400
+ }
401
+ }
402
+
403
+ $context['http']['header'] = rtrim($context['http']['header']);
404
+
405
+ return $context;
406
+ }
407
+
408
+ private function add_proxy(RequestInterface $request, &$options, $value, &$params)
409
+ {
410
+ if (!is_array($value)) {
411
+ $options['http']['proxy'] = $value;
412
+ } else {
413
+ $scheme = $request->getUri()->getScheme();
414
+ if (isset($value[$scheme])) {
415
+ if (!isset($value['no'])
416
+ || !\GuzzleHttp\is_host_in_noproxy(
417
+ $request->getUri()->getHost(),
418
+ $value['no']
419
+ )
420
+ ) {
421
+ $options['http']['proxy'] = $value[$scheme];
422
+ }
423
+ }
424
+ }
425
+ }
426
+
427
+ private function add_timeout(RequestInterface $request, &$options, $value, &$params)
428
+ {
429
+ if ($value > 0) {
430
+ $options['http']['timeout'] = $value;
431
+ }
432
+ }
433
+
434
+ private function add_verify(RequestInterface $request, &$options, $value, &$params)
435
+ {
436
+ if ($value === true) {
437
+ // PHP 5.6 or greater will find the system cert by default. When
438
+ // < 5.6, use the Guzzle bundled cacert.
439
+ if (PHP_VERSION_ID < 50600) {
440
+ $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
441
+ }
442
+ } elseif (is_string($value)) {
443
+ $options['ssl']['cafile'] = $value;
444
+ if (!file_exists($value)) {
445
+ throw new \RuntimeException("SSL CA bundle not found: $value");
446
+ }
447
+ } elseif ($value === false) {
448
+ $options['ssl']['verify_peer'] = false;
449
+ $options['ssl']['verify_peer_name'] = false;
450
+ return;
451
+ } else {
452
+ throw new \InvalidArgumentException('Invalid verify request option');
453
+ }
454
+
455
+ $options['ssl']['verify_peer'] = true;
456
+ $options['ssl']['verify_peer_name'] = true;
457
+ $options['ssl']['allow_self_signed'] = false;
458
+ }
459
+
460
+ private function add_cert(RequestInterface $request, &$options, $value, &$params)
461
+ {
462
+ if (is_array($value)) {
463
+ $options['ssl']['passphrase'] = $value[1];
464
+ $value = $value[0];
465
+ }
466
+
467
+ if (!file_exists($value)) {
468
+ throw new \RuntimeException("SSL certificate not found: {$value}");
469
+ }
470
+
471
+ $options['ssl']['local_cert'] = $value;
472
+ }
473
+
474
+ private function add_progress(RequestInterface $request, &$options, $value, &$params)
475
+ {
476
+ $this->addNotification(
477
+ $params,
478
+ function ($code, $a, $b, $c, $transferred, $total) use ($value) {
479
+ if ($code == STREAM_NOTIFY_PROGRESS) {
480
+ $value($total, $transferred, null, null);
481
+ }
482
+ }
483
+ );
484
+ }
485
+
486
+ private function add_debug(RequestInterface $request, &$options, $value, &$params)
487
+ {
488
+ if ($value === false) {
489
+ return;
490
+ }
491
+
492
+ static $map = [
493
+ STREAM_NOTIFY_CONNECT => 'CONNECT',
494
+ STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
495
+ STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
496
+ STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
497
+ STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
498
+ STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
499
+ STREAM_NOTIFY_PROGRESS => 'PROGRESS',
500
+ STREAM_NOTIFY_FAILURE => 'FAILURE',
501
+ STREAM_NOTIFY_COMPLETED => 'COMPLETED',
502
+ STREAM_NOTIFY_RESOLVE => 'RESOLVE',
503
+ ];
504
+ static $args = ['severity', 'message', 'message_code',
505
+ 'bytes_transferred', 'bytes_max'];
506
+
507
+ $value = \GuzzleHttp\debug_resource($value);
508
+ $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
509
+ $this->addNotification(
510
+ $params,
511
+ function () use ($ident, $value, $map, $args) {
512
+ $passed = func_get_args();
513
+ $code = array_shift($passed);
514
+ fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
515
+ foreach (array_filter($passed) as $i => $v) {
516
+ fwrite($value, $args[$i] . ': "' . $v . '" ');
517
+ }
518
+ fwrite($value, "\n");
519
+ }
520
+ );
521
+ }
522
+
523
+ private function addNotification(array &$params, callable $notify)
524
+ {
525
+ // Wrap the existing function if needed.
526
+ if (!isset($params['notification'])) {
527
+ $params['notification'] = $notify;
528
+ } else {
529
+ $params['notification'] = $this->callArray([
530
+ $params['notification'],
531
+ $notify
532
+ ]);
533
+ }
534
+ }
535
+
536
+ private function callArray(array $functions)
537
+ {
538
+ return function () use ($functions) {
539
+ $args = func_get_args();
540
+ foreach ($functions as $fn) {
541
+ call_user_func_array($fn, $args);
542
+ }
543
+ };
544
+ }
545
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/HandlerStack.php ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Promise\PromiseInterface;
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ResponseInterface;
7
+
8
+ /**
9
+ * Creates a composed Guzzle handler function by stacking middlewares on top of
10
+ * an HTTP handler function.
11
+ */
12
+ class HandlerStack
13
+ {
14
+ /** @var callable|null */
15
+ private $handler;
16
+
17
+ /** @var array */
18
+ private $stack = [];
19
+
20
+ /** @var callable|null */
21
+ private $cached;
22
+
23
+ /**
24
+ * Creates a default handler stack that can be used by clients.
25
+ *
26
+ * The returned handler will wrap the provided handler or use the most
27
+ * appropriate default handler for your system. The returned HandlerStack has
28
+ * support for cookies, redirects, HTTP error exceptions, and preparing a body
29
+ * before sending.
30
+ *
31
+ * The returned handler stack can be passed to a client in the "handler"
32
+ * option.
33
+ *
34
+ * @param callable $handler HTTP handler function to use with the stack. If no
35
+ * handler is provided, the best handler for your
36
+ * system will be utilized.
37
+ *
38
+ * @return HandlerStack
39
+ */
40
+ public static function create(callable $handler = null)
41
+ {
42
+ $stack = new self($handler ?: choose_handler());
43
+ $stack->push(Middleware::httpErrors(), 'http_errors');
44
+ $stack->push(Middleware::redirect(), 'allow_redirects');
45
+ $stack->push(Middleware::cookies(), 'cookies');
46
+ $stack->push(Middleware::prepareBody(), 'prepare_body');
47
+
48
+ return $stack;
49
+ }
50
+
51
+ /**
52
+ * @param callable $handler Underlying HTTP handler.
53
+ */
54
+ public function __construct(callable $handler = null)
55
+ {
56
+ $this->handler = $handler;
57
+ }
58
+
59
+ /**
60
+ * Invokes the handler stack as a composed handler
61
+ *
62
+ * @param RequestInterface $request
63
+ * @param array $options
64
+ *
65
+ * @return ResponseInterface|PromiseInterface
66
+ */
67
+ public function __invoke(RequestInterface $request, array $options)
68
+ {
69
+ $handler = $this->resolve();
70
+
71
+ return $handler($request, $options);
72
+ }
73
+
74
+ /**
75
+ * Dumps a string representation of the stack.
76
+ *
77
+ * @return string
78
+ */
79
+ public function __toString()
80
+ {
81
+ $depth = 0;
82
+ $stack = [];
83
+ if ($this->handler) {
84
+ $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
85
+ }
86
+
87
+ $result = '';
88
+ foreach (array_reverse($this->stack) as $tuple) {
89
+ $depth++;
90
+ $str = "{$depth}) Name: '{$tuple[1]}', ";
91
+ $str .= "Function: " . $this->debugCallable($tuple[0]);
92
+ $result = "> {$str}\n{$result}";
93
+ $stack[] = $str;
94
+ }
95
+
96
+ foreach (array_keys($stack) as $k) {
97
+ $result .= "< {$stack[$k]}\n";
98
+ }
99
+
100
+ return $result;
101
+ }
102
+
103
+ /**
104
+ * Set the HTTP handler that actually returns a promise.
105
+ *
106
+ * @param callable $handler Accepts a request and array of options and
107
+ * returns a Promise.
108
+ */
109
+ public function setHandler(callable $handler)
110
+ {
111
+ $this->handler = $handler;
112
+ $this->cached = null;
113
+ }
114
+
115
+ /**
116
+ * Returns true if the builder has a handler.
117
+ *
118
+ * @return bool
119
+ */
120
+ public function hasHandler()
121
+ {
122
+ return (bool) $this->handler;
123
+ }
124
+
125
+ /**
126
+ * Unshift a middleware to the bottom of the stack.
127
+ *
128
+ * @param callable $middleware Middleware function
129
+ * @param string $name Name to register for this middleware.
130
+ */
131
+ public function unshift(callable $middleware, $name = null)
132
+ {
133
+ array_unshift($this->stack, [$middleware, $name]);
134
+ $this->cached = null;
135
+ }
136
+
137
+ /**
138
+ * Push a middleware to the top of the stack.
139
+ *
140
+ * @param callable $middleware Middleware function
141
+ * @param string $name Name to register for this middleware.
142
+ */
143
+ public function push(callable $middleware, $name = '')
144
+ {
145
+ $this->stack[] = [$middleware, $name];
146
+ $this->cached = null;
147
+ }
148
+
149
+ /**
150
+ * Add a middleware before another middleware by name.
151
+ *
152
+ * @param string $findName Middleware to find
153
+ * @param callable $middleware Middleware function
154
+ * @param string $withName Name to register for this middleware.
155
+ */
156
+ public function before($findName, callable $middleware, $withName = '')
157
+ {
158
+ $this->splice($findName, $withName, $middleware, true);
159
+ }
160
+
161
+ /**
162
+ * Add a middleware after another middleware by name.
163
+ *
164
+ * @param string $findName Middleware to find
165
+ * @param callable $middleware Middleware function
166
+ * @param string $withName Name to register for this middleware.
167
+ */
168
+ public function after($findName, callable $middleware, $withName = '')
169
+ {
170
+ $this->splice($findName, $withName, $middleware, false);
171
+ }
172
+
173
+ /**
174
+ * Remove a middleware by instance or name from the stack.
175
+ *
176
+ * @param callable|string $remove Middleware to remove by instance or name.
177
+ */
178
+ public function remove($remove)
179
+ {
180
+ $this->cached = null;
181
+ $idx = is_callable($remove) ? 0 : 1;
182
+ $this->stack = array_values(array_filter(
183
+ $this->stack,
184
+ function ($tuple) use ($idx, $remove) {
185
+ return $tuple[$idx] !== $remove;
186
+ }
187
+ ));
188
+ }
189
+
190
+ /**
191
+ * Compose the middleware and handler into a single callable function.
192
+ *
193
+ * @return callable
194
+ */
195
+ public function resolve()
196
+ {
197
+ if (!$this->cached) {
198
+ if (!($prev = $this->handler)) {
199
+ throw new \LogicException('No handler has been specified');
200
+ }
201
+
202
+ foreach (array_reverse($this->stack) as $fn) {
203
+ $prev = $fn[0]($prev);
204
+ }
205
+
206
+ $this->cached = $prev;
207
+ }
208
+
209
+ return $this->cached;
210
+ }
211
+
212
+ /**
213
+ * @param string $name
214
+ * @return int
215
+ */
216
+ private function findByName($name)
217
+ {
218
+ foreach ($this->stack as $k => $v) {
219
+ if ($v[1] === $name) {
220
+ return $k;
221
+ }
222
+ }
223
+
224
+ throw new \InvalidArgumentException("Middleware not found: $name");
225
+ }
226
+
227
+ /**
228
+ * Splices a function into the middleware list at a specific position.
229
+ *
230
+ * @param string $findName
231
+ * @param string $withName
232
+ * @param callable $middleware
233
+ * @param bool $before
234
+ */
235
+ private function splice($findName, $withName, callable $middleware, $before)
236
+ {
237
+ $this->cached = null;
238
+ $idx = $this->findByName($findName);
239
+ $tuple = [$middleware, $withName];
240
+
241
+ if ($before) {
242
+ if ($idx === 0) {
243
+ array_unshift($this->stack, $tuple);
244
+ } else {
245
+ $replacement = [$tuple, $this->stack[$idx]];
246
+ array_splice($this->stack, $idx, 1, $replacement);
247
+ }
248
+ } elseif ($idx === count($this->stack) - 1) {
249
+ $this->stack[] = $tuple;
250
+ } else {
251
+ $replacement = [$this->stack[$idx], $tuple];
252
+ array_splice($this->stack, $idx, 1, $replacement);
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Provides a debug string for a given callable.
258
+ *
259
+ * @param array|callable $fn Function to write as a string.
260
+ *
261
+ * @return string
262
+ */
263
+ private function debugCallable($fn)
264
+ {
265
+ if (is_string($fn)) {
266
+ return "callable({$fn})";
267
+ }
268
+
269
+ if (is_array($fn)) {
270
+ return is_string($fn[0])
271
+ ? "callable({$fn[0]}::{$fn[1]})"
272
+ : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])";
273
+ }
274
+
275
+ return 'callable(' . spl_object_hash($fn) . ')';
276
+ }
277
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/MessageFormatter.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use Psr\Http\Message\MessageInterface;
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ResponseInterface;
7
+
8
+ /**
9
+ * Formats log messages using variable substitutions for requests, responses,
10
+ * and other transactional data.
11
+ *
12
+ * The following variable substitutions are supported:
13
+ *
14
+ * - {request}: Full HTTP request message
15
+ * - {response}: Full HTTP response message
16
+ * - {ts}: ISO 8601 date in GMT
17
+ * - {date_iso_8601} ISO 8601 date in GMT
18
+ * - {date_common_log} Apache common log date using the configured timezone.
19
+ * - {host}: Host of the request
20
+ * - {method}: Method of the request
21
+ * - {uri}: URI of the request
22
+ * - {version}: Protocol version
23
+ * - {target}: Request target of the request (path + query + fragment)
24
+ * - {hostname}: Hostname of the machine that sent the request
25
+ * - {code}: Status code of the response (if available)
26
+ * - {phrase}: Reason phrase of the response (if available)
27
+ * - {error}: Any error messages (if available)
28
+ * - {req_header_*}: Replace `*` with the lowercased name of a request header to add to the message
29
+ * - {res_header_*}: Replace `*` with the lowercased name of a response header to add to the message
30
+ * - {req_headers}: Request headers
31
+ * - {res_headers}: Response headers
32
+ * - {req_body}: Request body
33
+ * - {res_body}: Response body
34
+ */
35
+ class MessageFormatter
36
+ {
37
+ /**
38
+ * Apache Common Log Format.
39
+ * @link http://httpd.apache.org/docs/2.4/logs.html#common
40
+ * @var string
41
+ */
42
+ const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
43
+ const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
44
+ const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
45
+
46
+ /** @var string Template used to format log messages */
47
+ private $template;
48
+
49
+ /**
50
+ * @param string $template Log message template
51
+ */
52
+ public function __construct($template = self::CLF)
53
+ {
54
+ $this->template = $template ?: self::CLF;
55
+ }
56
+
57
+ /**
58
+ * Returns a formatted message string.
59
+ *
60
+ * @param RequestInterface $request Request that was sent
61
+ * @param ResponseInterface $response Response that was received
62
+ * @param \Exception $error Exception that was received
63
+ *
64
+ * @return string
65
+ */
66
+ public function format(
67
+ RequestInterface $request,
68
+ ResponseInterface $response = null,
69
+ \Exception $error = null
70
+ ) {
71
+ $cache = [];
72
+
73
+ return preg_replace_callback(
74
+ '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
75
+ function (array $matches) use ($request, $response, $error, &$cache) {
76
+ if (isset($cache[$matches[1]])) {
77
+ return $cache[$matches[1]];
78
+ }
79
+
80
+ $result = '';
81
+ switch ($matches[1]) {
82
+ case 'request':
83
+ $result = Psr7\str($request);
84
+ break;
85
+ case 'response':
86
+ $result = $response ? Psr7\str($response) : '';
87
+ break;
88
+ case 'req_headers':
89
+ $result = trim($request->getMethod()
90
+ . ' ' . $request->getRequestTarget())
91
+ . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
92
+ . $this->headers($request);
93
+ break;
94
+ case 'res_headers':
95
+ $result = $response ?
96
+ sprintf(
97
+ 'HTTP/%s %d %s',
98
+ $response->getProtocolVersion(),
99
+ $response->getStatusCode(),
100
+ $response->getReasonPhrase()
101
+ ) . "\r\n" . $this->headers($response)
102
+ : 'NULL';
103
+ break;
104
+ case 'req_body':
105
+ $result = $request->getBody();
106
+ break;
107
+ case 'res_body':
108
+ $result = $response ? $response->getBody() : 'NULL';
109
+ break;
110
+ case 'ts':
111
+ case 'date_iso_8601':
112
+ $result = gmdate('c');
113
+ break;
114
+ case 'date_common_log':
115
+ $result = date('d/M/Y:H:i:s O');
116
+ break;
117
+ case 'method':
118
+ $result = $request->getMethod();
119
+ break;
120
+ case 'version':
121
+ $result = $request->getProtocolVersion();
122
+ break;
123
+ case 'uri':
124
+ case 'url':
125
+ $result = $request->getUri();
126
+ break;
127
+ case 'target':
128
+ $result = $request->getRequestTarget();
129
+ break;
130
+ case 'req_version':
131
+ $result = $request->getProtocolVersion();
132
+ break;
133
+ case 'res_version':
134
+ $result = $response
135
+ ? $response->getProtocolVersion()
136
+ : 'NULL';
137
+ break;
138
+ case 'host':
139
+ $result = $request->getHeaderLine('Host');
140
+ break;
141
+ case 'hostname':
142
+ $result = gethostname();
143
+ break;
144
+ case 'code':
145
+ $result = $response ? $response->getStatusCode() : 'NULL';
146
+ break;
147
+ case 'phrase':
148
+ $result = $response ? $response->getReasonPhrase() : 'NULL';
149
+ break;
150
+ case 'error':
151
+ $result = $error ? $error->getMessage() : 'NULL';
152
+ break;
153
+ default:
154
+ // handle prefixed dynamic headers
155
+ if (strpos($matches[1], 'req_header_') === 0) {
156
+ $result = $request->getHeaderLine(substr($matches[1], 11));
157
+ } elseif (strpos($matches[1], 'res_header_') === 0) {
158
+ $result = $response
159
+ ? $response->getHeaderLine(substr($matches[1], 11))
160
+ : 'NULL';
161
+ }
162
+ }
163
+
164
+ $cache[$matches[1]] = $result;
165
+ return $result;
166
+ },
167
+ $this->template
168
+ );
169
+ }
170
+
171
+ /**
172
+ * Get headers from message as string
173
+ *
174
+ * @return string
175
+ */
176
+ private function headers(MessageInterface $message)
177
+ {
178
+ $result = '';
179
+ foreach ($message->getHeaders() as $name => $values) {
180
+ $result .= $name . ': ' . implode(', ', $values) . "\r\n";
181
+ }
182
+
183
+ return trim($result);
184
+ }
185
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Middleware.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Cookie\CookieJarInterface;
5
+ use GuzzleHttp\Exception\RequestException;
6
+ use GuzzleHttp\Promise\RejectedPromise;
7
+ use GuzzleHttp\Psr7;
8
+ use Psr\Http\Message\ResponseInterface;
9
+ use Psr\Log\LoggerInterface;
10
+
11
+ /**
12
+ * Functions used to create and wrap handlers with handler middleware.
13
+ */
14
+ final class Middleware
15
+ {
16
+ /**
17
+ * Middleware that adds cookies to requests.
18
+ *
19
+ * The options array must be set to a CookieJarInterface in order to use
20
+ * cookies. This is typically handled for you by a client.
21
+ *
22
+ * @return callable Returns a function that accepts the next handler.
23
+ */
24
+ public static function cookies()
25
+ {
26
+ return function (callable $handler) {
27
+ return function ($request, array $options) use ($handler) {
28
+ if (empty($options['cookies'])) {
29
+ return $handler($request, $options);
30
+ } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
31
+ throw new \InvalidArgumentException('cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface');
32
+ }
33
+ $cookieJar = $options['cookies'];
34
+ $request = $cookieJar->withCookieHeader($request);
35
+ return $handler($request, $options)
36
+ ->then(
37
+ function ($response) use ($cookieJar, $request) {
38
+ $cookieJar->extractCookies($request, $response);
39
+ return $response;
40
+ }
41
+ );
42
+ };
43
+ };
44
+ }
45
+
46
+ /**
47
+ * Middleware that throws exceptions for 4xx or 5xx responses when the
48
+ * "http_error" request option is set to true.
49
+ *
50
+ * @return callable Returns a function that accepts the next handler.
51
+ */
52
+ public static function httpErrors()
53
+ {
54
+ return function (callable $handler) {
55
+ return function ($request, array $options) use ($handler) {
56
+ if (empty($options['http_errors'])) {
57
+ return $handler($request, $options);
58
+ }
59
+ return $handler($request, $options)->then(
60
+ function (ResponseInterface $response) use ($request) {
61
+ $code = $response->getStatusCode();
62
+ if ($code < 400) {
63
+ return $response;
64
+ }
65
+ throw RequestException::create($request, $response);
66
+ }
67
+ );
68
+ };
69
+ };
70
+ }
71
+
72
+ /**
73
+ * Middleware that pushes history data to an ArrayAccess container.
74
+ *
75
+ * @param array|\ArrayAccess $container Container to hold the history (by reference).
76
+ *
77
+ * @return callable Returns a function that accepts the next handler.
78
+ * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
79
+ */
80
+ public static function history(&$container)
81
+ {
82
+ if (!is_array($container) && !$container instanceof \ArrayAccess) {
83
+ throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
84
+ }
85
+
86
+ return function (callable $handler) use (&$container) {
87
+ return function ($request, array $options) use ($handler, &$container) {
88
+ return $handler($request, $options)->then(
89
+ function ($value) use ($request, &$container, $options) {
90
+ $container[] = [
91
+ 'request' => $request,
92
+ 'response' => $value,
93
+ 'error' => null,
94
+ 'options' => $options
95
+ ];
96
+ return $value;
97
+ },
98
+ function ($reason) use ($request, &$container, $options) {
99
+ $container[] = [
100
+ 'request' => $request,
101
+ 'response' => null,
102
+ 'error' => $reason,
103
+ 'options' => $options
104
+ ];
105
+ return \GuzzleHttp\Promise\rejection_for($reason);
106
+ }
107
+ );
108
+ };
109
+ };
110
+ }
111
+
112
+ /**
113
+ * Middleware that invokes a callback before and after sending a request.
114
+ *
115
+ * The provided listener cannot modify or alter the response. It simply
116
+ * "taps" into the chain to be notified before returning the promise. The
117
+ * before listener accepts a request and options array, and the after
118
+ * listener accepts a request, options array, and response promise.
119
+ *
120
+ * @param callable $before Function to invoke before forwarding the request.
121
+ * @param callable $after Function invoked after forwarding.
122
+ *
123
+ * @return callable Returns a function that accepts the next handler.
124
+ */
125
+ public static function tap(callable $before = null, callable $after = null)
126
+ {
127
+ return function (callable $handler) use ($before, $after) {
128
+ return function ($request, array $options) use ($handler, $before, $after) {
129
+ if ($before) {
130
+ $before($request, $options);
131
+ }
132
+ $response = $handler($request, $options);
133
+ if ($after) {
134
+ $after($request, $options, $response);
135
+ }
136
+ return $response;
137
+ };
138
+ };
139
+ }
140
+
141
+ /**
142
+ * Middleware that handles request redirects.
143
+ *
144
+ * @return callable Returns a function that accepts the next handler.
145
+ */
146
+ public static function redirect()
147
+ {
148
+ return function (callable $handler) {
149
+ return new RedirectMiddleware($handler);
150
+ };
151
+ }
152
+
153
+ /**
154
+ * Middleware that retries requests based on the boolean result of
155
+ * invoking the provided "decider" function.
156
+ *
157
+ * If no delay function is provided, a simple implementation of exponential
158
+ * backoff will be utilized.
159
+ *
160
+ * @param callable $decider Function that accepts the number of retries,
161
+ * a request, [response], and [exception] and
162
+ * returns true if the request is to be retried.
163
+ * @param callable $delay Function that accepts the number of retries and
164
+ * returns the number of milliseconds to delay.
165
+ *
166
+ * @return callable Returns a function that accepts the next handler.
167
+ */
168
+ public static function retry(callable $decider, callable $delay = null)
169
+ {
170
+ return function (callable $handler) use ($decider, $delay) {
171
+ return new RetryMiddleware($decider, $handler, $delay);
172
+ };
173
+ }
174
+
175
+ /**
176
+ * Middleware that logs requests, responses, and errors using a message
177
+ * formatter.
178
+ *
179
+ * @param LoggerInterface $logger Logs messages.
180
+ * @param MessageFormatter $formatter Formatter used to create message strings.
181
+ * @param string $logLevel Level at which to log requests.
182
+ *
183
+ * @return callable Returns a function that accepts the next handler.
184
+ */
185
+ public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
186
+ {
187
+ return function (callable $handler) use ($logger, $formatter, $logLevel) {
188
+ return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
189
+ return $handler($request, $options)->then(
190
+ function ($response) use ($logger, $request, $formatter, $logLevel) {
191
+ $message = $formatter->format($request, $response);
192
+ $logger->log($logLevel, $message);
193
+ return $response;
194
+ },
195
+ function ($reason) use ($logger, $request, $formatter) {
196
+ $response = $reason instanceof RequestException
197
+ ? $reason->getResponse()
198
+ : null;
199
+ $message = $formatter->format($request, $response, $reason);
200
+ $logger->notice($message);
201
+ return \GuzzleHttp\Promise\rejection_for($reason);
202
+ }
203
+ );
204
+ };
205
+ };
206
+ }
207
+
208
+ /**
209
+ * This middleware adds a default content-type if possible, a default
210
+ * content-length or transfer-encoding header, and the expect header.
211
+ *
212
+ * @return callable
213
+ */
214
+ public static function prepareBody()
215
+ {
216
+ return function (callable $handler) {
217
+ return new PrepareBodyMiddleware($handler);
218
+ };
219
+ }
220
+
221
+ /**
222
+ * Middleware that applies a map function to the request before passing to
223
+ * the next handler.
224
+ *
225
+ * @param callable $fn Function that accepts a RequestInterface and returns
226
+ * a RequestInterface.
227
+ * @return callable
228
+ */
229
+ public static function mapRequest(callable $fn)
230
+ {
231
+ return function (callable $handler) use ($fn) {
232
+ return function ($request, array $options) use ($handler, $fn) {
233
+ return $handler($fn($request), $options);
234
+ };
235
+ };
236
+ }
237
+
238
+ /**
239
+ * Middleware that applies a map function to the resolved promise's
240
+ * response.
241
+ *
242
+ * @param callable $fn Function that accepts a ResponseInterface and
243
+ * returns a ResponseInterface.
244
+ * @return callable
245
+ */
246
+ public static function mapResponse(callable $fn)
247
+ {
248
+ return function (callable $handler) use ($fn) {
249
+ return function ($request, array $options) use ($handler, $fn) {
250
+ return $handler($request, $options)->then($fn);
251
+ };
252
+ };
253
+ }
254
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Pool.php ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Promise\EachPromise;
5
+ use GuzzleHttp\Promise\PromiseInterface;
6
+ use GuzzleHttp\Promise\PromisorInterface;
7
+ use Psr\Http\Message\RequestInterface;
8
+
9
+ /**
10
+ * Sends an iterator of requests concurrently using a capped pool size.
11
+ *
12
+ * The pool will read from an iterator until it is cancelled or until the
13
+ * iterator is consumed. When a request is yielded, the request is sent after
14
+ * applying the "request_options" request options (if provided in the ctor).
15
+ *
16
+ * When a function is yielded by the iterator, the function is provided the
17
+ * "request_options" array that should be merged on top of any existing
18
+ * options, and the function MUST then return a wait-able promise.
19
+ */
20
+ class Pool implements PromisorInterface
21
+ {
22
+ /** @var EachPromise */
23
+ private $each;
24
+
25
+ /**
26
+ * @param ClientInterface $client Client used to send the requests.
27
+ * @param array|\Iterator $requests Requests or functions that return
28
+ * requests to send concurrently.
29
+ * @param array $config Associative array of options
30
+ * - concurrency: (int) Maximum number of requests to send concurrently
31
+ * - options: Array of request options to apply to each request.
32
+ * - fulfilled: (callable) Function to invoke when a request completes.
33
+ * - rejected: (callable) Function to invoke when a request is rejected.
34
+ */
35
+ public function __construct(
36
+ ClientInterface $client,
37
+ $requests,
38
+ array $config = []
39
+ ) {
40
+ // Backwards compatibility.
41
+ if (isset($config['pool_size'])) {
42
+ $config['concurrency'] = $config['pool_size'];
43
+ } elseif (!isset($config['concurrency'])) {
44
+ $config['concurrency'] = 25;
45
+ }
46
+
47
+ if (isset($config['options'])) {
48
+ $opts = $config['options'];
49
+ unset($config['options']);
50
+ } else {
51
+ $opts = [];
52
+ }
53
+
54
+ $iterable = \GuzzleHttp\Promise\iter_for($requests);
55
+ $requests = function () use ($iterable, $client, $opts) {
56
+ foreach ($iterable as $key => $rfn) {
57
+ if ($rfn instanceof RequestInterface) {
58
+ yield $key => $client->sendAsync($rfn, $opts);
59
+ } elseif (is_callable($rfn)) {
60
+ yield $key => $rfn($opts);
61
+ } else {
62
+ throw new \InvalidArgumentException('Each value yielded by '
63
+ . 'the iterator must be a Psr7\Http\Message\RequestInterface '
64
+ . 'or a callable that returns a promise that fulfills '
65
+ . 'with a Psr7\Message\Http\ResponseInterface object.');
66
+ }
67
+ }
68
+ };
69
+
70
+ $this->each = new EachPromise($requests(), $config);
71
+ }
72
+
73
+ /**
74
+ * Get promise
75
+ *
76
+ * @return PromiseInterface
77
+ */
78
+ public function promise()
79
+ {
80
+ return $this->each->promise();
81
+ }
82
+
83
+ /**
84
+ * Sends multiple requests concurrently and returns an array of responses
85
+ * and exceptions that uses the same ordering as the provided requests.
86
+ *
87
+ * IMPORTANT: This method keeps every request and response in memory, and
88
+ * as such, is NOT recommended when sending a large number or an
89
+ * indeterminate number of requests concurrently.
90
+ *
91
+ * @param ClientInterface $client Client used to send the requests
92
+ * @param array|\Iterator $requests Requests to send concurrently.
93
+ * @param array $options Passes through the options available in
94
+ * {@see GuzzleHttp\Pool::__construct}
95
+ *
96
+ * @return array Returns an array containing the response or an exception
97
+ * in the same order that the requests were sent.
98
+ * @throws \InvalidArgumentException if the event format is incorrect.
99
+ */
100
+ public static function batch(
101
+ ClientInterface $client,
102
+ $requests,
103
+ array $options = []
104
+ ) {
105
+ $res = [];
106
+ self::cmpCallback($options, 'fulfilled', $res);
107
+ self::cmpCallback($options, 'rejected', $res);
108
+ $pool = new static($client, $requests, $options);
109
+ $pool->promise()->wait();
110
+ ksort($res);
111
+
112
+ return $res;
113
+ }
114
+
115
+ /**
116
+ * Execute callback(s)
117
+ *
118
+ * @return void
119
+ */
120
+ private static function cmpCallback(array &$options, $name, array &$results)
121
+ {
122
+ if (!isset($options[$name])) {
123
+ $options[$name] = function ($v, $k) use (&$results) {
124
+ $results[$k] = $v;
125
+ };
126
+ } else {
127
+ $currentFn = $options[$name];
128
+ $options[$name] = function ($v, $k) use (&$results, $currentFn) {
129
+ $currentFn($v, $k);
130
+ $results[$k] = $v;
131
+ };
132
+ }
133
+ }
134
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Promise\PromiseInterface;
5
+ use GuzzleHttp\Psr7;
6
+ use Psr\Http\Message\RequestInterface;
7
+
8
+ /**
9
+ * Prepares requests that contain a body, adding the Content-Length,
10
+ * Content-Type, and Expect headers.
11
+ */
12
+ class PrepareBodyMiddleware
13
+ {
14
+ /** @var callable */
15
+ private $nextHandler;
16
+
17
+ /**
18
+ * @param callable $nextHandler Next handler to invoke.
19
+ */
20
+ public function __construct(callable $nextHandler)
21
+ {
22
+ $this->nextHandler = $nextHandler;
23
+ }
24
+
25
+ /**
26
+ * @param RequestInterface $request
27
+ * @param array $options
28
+ *
29
+ * @return PromiseInterface
30
+ */
31
+ public function __invoke(RequestInterface $request, array $options)
32
+ {
33
+ $fn = $this->nextHandler;
34
+
35
+ // Don't do anything if the request has no body.
36
+ if ($request->getBody()->getSize() === 0) {
37
+ return $fn($request, $options);
38
+ }
39
+
40
+ $modify = [];
41
+
42
+ // Add a default content-type if possible.
43
+ if (!$request->hasHeader('Content-Type')) {
44
+ if ($uri = $request->getBody()->getMetadata('uri')) {
45
+ if ($type = Psr7\mimetype_from_filename($uri)) {
46
+ $modify['set_headers']['Content-Type'] = $type;
47
+ }
48
+ }
49
+ }
50
+
51
+ // Add a default content-length or transfer-encoding header.
52
+ if (!$request->hasHeader('Content-Length')
53
+ && !$request->hasHeader('Transfer-Encoding')
54
+ ) {
55
+ $size = $request->getBody()->getSize();
56
+ if ($size !== null) {
57
+ $modify['set_headers']['Content-Length'] = $size;
58
+ } else {
59
+ $modify['set_headers']['Transfer-Encoding'] = 'chunked';
60
+ }
61
+ }
62
+
63
+ // Add the expect header if needed.
64
+ $this->addExpectHeader($request, $options, $modify);
65
+
66
+ return $fn(Psr7\modify_request($request, $modify), $options);
67
+ }
68
+
69
+ /**
70
+ * Add expect header
71
+ *
72
+ * @return void
73
+ */
74
+ private function addExpectHeader(
75
+ RequestInterface $request,
76
+ array $options,
77
+ array &$modify
78
+ ) {
79
+ // Determine if the Expect header should be used
80
+ if ($request->hasHeader('Expect')) {
81
+ return;
82
+ }
83
+
84
+ $expect = isset($options['expect']) ? $options['expect'] : null;
85
+
86
+ // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
87
+ if ($expect === false || $request->getProtocolVersion() < 1.1) {
88
+ return;
89
+ }
90
+
91
+ // The expect header is unconditionally enabled
92
+ if ($expect === true) {
93
+ $modify['set_headers']['Expect'] = '100-Continue';
94
+ return;
95
+ }
96
+
97
+ // By default, send the expect header when the payload is > 1mb
98
+ if ($expect === null) {
99
+ $expect = 1048576;
100
+ }
101
+
102
+ // Always add if the body cannot be rewound, the size cannot be
103
+ // determined, or the size is greater than the cutoff threshold
104
+ $body = $request->getBody();
105
+ $size = $body->getSize();
106
+
107
+ if ($size === null || $size >= (int) $expect || !$body->isSeekable()) {
108
+ $modify['set_headers']['Expect'] = '100-Continue';
109
+ }
110
+ }
111
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Exception\BadResponseException;
5
+ use GuzzleHttp\Exception\TooManyRedirectsException;
6
+ use GuzzleHttp\Promise\PromiseInterface;
7
+ use GuzzleHttp\Psr7;
8
+ use Psr\Http\Message\RequestInterface;
9
+ use Psr\Http\Message\ResponseInterface;
10
+ use Psr\Http\Message\UriInterface;
11
+
12
+ /**
13
+ * Request redirect middleware.
14
+ *
15
+ * Apply this middleware like other middleware using
16
+ * {@see \GuzzleHttp\Middleware::redirect()}.
17
+ */
18
+ class RedirectMiddleware
19
+ {
20
+ const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
21
+
22
+ const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History';
23
+
24
+ public static $defaultSettings = [
25
+ 'max' => 5,
26
+ 'protocols' => ['http', 'https'],
27
+ 'strict' => false,
28
+ 'referer' => false,
29
+ 'track_redirects' => false,
30
+ ];
31
+
32
+ /** @var callable */
33
+ private $nextHandler;
34
+
35
+ /**
36
+ * @param callable $nextHandler Next handler to invoke.
37
+ */
38
+ public function __construct(callable $nextHandler)
39
+ {
40
+ $this->nextHandler = $nextHandler;
41
+ }
42
+
43
+ /**
44
+ * @param RequestInterface $request
45
+ * @param array $options
46
+ *
47
+ * @return PromiseInterface
48
+ */
49
+ public function __invoke(RequestInterface $request, array $options)
50
+ {
51
+ $fn = $this->nextHandler;
52
+
53
+ if (empty($options['allow_redirects'])) {
54
+ return $fn($request, $options);
55
+ }
56
+
57
+ if ($options['allow_redirects'] === true) {
58
+ $options['allow_redirects'] = self::$defaultSettings;
59
+ } elseif (!is_array($options['allow_redirects'])) {
60
+ throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
61
+ } else {
62
+ // Merge the default settings with the provided settings
63
+ $options['allow_redirects'] += self::$defaultSettings;
64
+ }
65
+
66
+ if (empty($options['allow_redirects']['max'])) {
67
+ return $fn($request, $options);
68
+ }
69
+
70
+ return $fn($request, $options)
71
+ ->then(function (ResponseInterface $response) use ($request, $options) {
72
+ return $this->checkRedirect($request, $options, $response);
73
+ });
74
+ }
75
+
76
+ /**
77
+ * @param RequestInterface $request
78
+ * @param array $options
79
+ * @param ResponseInterface $response
80
+ *
81
+ * @return ResponseInterface|PromiseInterface
82
+ */
83
+ public function checkRedirect(
84
+ RequestInterface $request,
85
+ array $options,
86
+ ResponseInterface $response
87
+ ) {
88
+ if (substr($response->getStatusCode(), 0, 1) != '3'
89
+ || !$response->hasHeader('Location')
90
+ ) {
91
+ return $response;
92
+ }
93
+
94
+ $this->guardMax($request, $options);
95
+ $nextRequest = $this->modifyRequest($request, $options, $response);
96
+
97
+ // If authorization is handled by curl, unset it if URI is cross-origin.
98
+ if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) {
99
+ unset(
100
+ $options['curl'][\CURLOPT_HTTPAUTH],
101
+ $options['curl'][\CURLOPT_USERPWD]
102
+ );
103
+ }
104
+
105
+ if (isset($options['allow_redirects']['on_redirect'])) {
106
+ call_user_func(
107
+ $options['allow_redirects']['on_redirect'],
108
+ $request,
109
+ $response,
110
+ $nextRequest->getUri()
111
+ );
112
+ }
113
+
114
+ /** @var PromiseInterface|ResponseInterface $promise */
115
+ $promise = $this($nextRequest, $options);
116
+
117
+ // Add headers to be able to track history of redirects.
118
+ if (!empty($options['allow_redirects']['track_redirects'])) {
119
+ return $this->withTracking(
120
+ $promise,
121
+ (string) $nextRequest->getUri(),
122
+ $response->getStatusCode()
123
+ );
124
+ }
125
+
126
+ return $promise;
127
+ }
128
+
129
+ /**
130
+ * Enable tracking on promise.
131
+ *
132
+ * @return PromiseInterface
133
+ */
134
+ private function withTracking(PromiseInterface $promise, $uri, $statusCode)
135
+ {
136
+ return $promise->then(
137
+ function (ResponseInterface $response) use ($uri, $statusCode) {
138
+ // Note that we are pushing to the front of the list as this
139
+ // would be an earlier response than what is currently present
140
+ // in the history header.
141
+ $historyHeader = $response->getHeader(self::HISTORY_HEADER);
142
+ $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);
143
+ array_unshift($historyHeader, $uri);
144
+ array_unshift($statusHeader, $statusCode);
145
+ return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
146
+ ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
147
+ }
148
+ );
149
+ }
150
+
151
+ /**
152
+ * Check for too many redirects.
153
+ *
154
+ * @return void
155
+ *
156
+ * @throws TooManyRedirectsException Too many redirects.
157
+ */
158
+ private function guardMax(RequestInterface $request, array &$options)
159
+ {
160
+ $current = isset($options['__redirect_count'])
161
+ ? $options['__redirect_count']
162
+ : 0;
163
+ $options['__redirect_count'] = $current + 1;
164
+ $max = $options['allow_redirects']['max'];
165
+
166
+ if ($options['__redirect_count'] > $max) {
167
+ throw new TooManyRedirectsException(
168
+ "Will not follow more than {$max} redirects",
169
+ $request
170
+ );
171
+ }
172
+ }
173
+
174
+ /**
175
+ * @param RequestInterface $request
176
+ * @param array $options
177
+ * @param ResponseInterface $response
178
+ *
179
+ * @return RequestInterface
180
+ */
181
+ public function modifyRequest(
182
+ RequestInterface $request,
183
+ array $options,
184
+ ResponseInterface $response
185
+ ) {
186
+ // Request modifications to apply.
187
+ $modify = [];
188
+ $protocols = $options['allow_redirects']['protocols'];
189
+
190
+ // Use a GET request if this is an entity enclosing request and we are
191
+ // not forcing RFC compliance, but rather emulating what all browsers
192
+ // would do.
193
+ $statusCode = $response->getStatusCode();
194
+ if ($statusCode == 303 ||
195
+ ($statusCode <= 302 && !$options['allow_redirects']['strict'])
196
+ ) {
197
+ $modify['method'] = 'GET';
198
+ $modify['body'] = '';
199
+ }
200
+
201
+ $uri = self::redirectUri($request, $response, $protocols);
202
+ if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
203
+ $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion'];
204
+ $uri = Utils::idnUriConvert($uri, $idnOptions);
205
+ }
206
+
207
+ $modify['uri'] = $uri;
208
+ Psr7\rewind_body($request);
209
+
210
+ // Add the Referer header if it is told to do so and only
211
+ // add the header if we are not redirecting from https to http.
212
+ if ($options['allow_redirects']['referer']
213
+ && $modify['uri']->getScheme() === $request->getUri()->getScheme()
214
+ ) {
215
+ $uri = $request->getUri()->withUserInfo('');
216
+ $modify['set_headers']['Referer'] = (string) $uri;
217
+ } else {
218
+ $modify['remove_headers'][] = 'Referer';
219
+ }
220
+
221
+ // Remove Authorization and Cookie headers if URI is cross-origin.
222
+ if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) {
223
+ $modify['remove_headers'][] = 'Authorization';
224
+ $modify['remove_headers'][] = 'Cookie';
225
+ }
226
+
227
+ return Psr7\modify_request($request, $modify);
228
+ }
229
+
230
+ /**
231
+ * Set the appropriate URL on the request based on the location header.
232
+ *
233
+ * @param RequestInterface $request
234
+ * @param ResponseInterface $response
235
+ * @param array $protocols
236
+ *
237
+ * @return UriInterface
238
+ */
239
+ private static function redirectUri(
240
+ RequestInterface $request,
241
+ ResponseInterface $response,
242
+ array $protocols
243
+ ) {
244
+ $location = Psr7\UriResolver::resolve(
245
+ $request->getUri(),
246
+ new Psr7\Uri($response->getHeaderLine('Location'))
247
+ );
248
+
249
+ // Ensure that the redirect URI is allowed based on the protocols.
250
+ if (!in_array($location->getScheme(), $protocols)) {
251
+ throw new BadResponseException(
252
+ sprintf(
253
+ 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
254
+ $location,
255
+ implode(', ', $protocols)
256
+ ),
257
+ $request,
258
+ $response
259
+ );
260
+ }
261
+
262
+ return $location;
263
+ }
264
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/RequestOptions.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ /**
5
+ * This class contains a list of built-in Guzzle request options.
6
+ *
7
+ * More documentation for each option can be found at http://guzzlephp.org/.
8
+ *
9
+ * @link http://docs.guzzlephp.org/en/v6/request-options.html
10
+ */
11
+ final class RequestOptions
12
+ {
13
+ /**
14
+ * allow_redirects: (bool|array) Controls redirect behavior. Pass false
15
+ * to disable redirects, pass true to enable redirects, pass an
16
+ * associative to provide custom redirect settings. Defaults to "false".
17
+ * This option only works if your handler has the RedirectMiddleware. When
18
+ * passing an associative array, you can provide the following key value
19
+ * pairs:
20
+ *
21
+ * - max: (int, default=5) maximum number of allowed redirects.
22
+ * - strict: (bool, default=false) Set to true to use strict redirects
23
+ * meaning redirect POST requests with POST requests vs. doing what most
24
+ * browsers do which is redirect POST requests with GET requests
25
+ * - referer: (bool, default=false) Set to true to enable the Referer
26
+ * header.
27
+ * - protocols: (array, default=['http', 'https']) Allowed redirect
28
+ * protocols.
29
+ * - on_redirect: (callable) PHP callable that is invoked when a redirect
30
+ * is encountered. The callable is invoked with the request, the redirect
31
+ * response that was received, and the effective URI. Any return value
32
+ * from the on_redirect function is ignored.
33
+ */
34
+ const ALLOW_REDIRECTS = 'allow_redirects';
35
+
36
+ /**
37
+ * auth: (array) Pass an array of HTTP authentication parameters to use
38
+ * with the request. The array must contain the username in index [0],
39
+ * the password in index [1], and you can optionally provide a built-in
40
+ * authentication type in index [2]. Pass null to disable authentication
41
+ * for a request.
42
+ */
43
+ const AUTH = 'auth';
44
+
45
+ /**
46
+ * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
47
+ * Body to send in the request.
48
+ */
49
+ const BODY = 'body';
50
+
51
+ /**
52
+ * cert: (string|array) Set to a string to specify the path to a file
53
+ * containing a PEM formatted SSL client side certificate. If a password
54
+ * is required, then set cert to an array containing the path to the PEM
55
+ * file in the first array element followed by the certificate password
56
+ * in the second array element.
57
+ */
58
+ const CERT = 'cert';
59
+
60
+ /**
61
+ * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
62
+ * Specifies whether or not cookies are used in a request or what cookie
63
+ * jar to use or what cookies to send. This option only works if your
64
+ * handler has the `cookie` middleware. Valid values are `false` and
65
+ * an instance of {@see GuzzleHttp\Cookie\CookieJarInterface}.
66
+ */
67
+ const COOKIES = 'cookies';
68
+
69
+ /**
70
+ * connect_timeout: (float, default=0) Float describing the number of
71
+ * seconds to wait while trying to connect to a server. Use 0 to wait
72
+ * indefinitely (the default behavior).
73
+ */
74
+ const CONNECT_TIMEOUT = 'connect_timeout';
75
+
76
+ /**
77
+ * debug: (bool|resource) Set to true or set to a PHP stream returned by
78
+ * fopen() enable debug output with the HTTP handler used to send a
79
+ * request.
80
+ */
81
+ const DEBUG = 'debug';
82
+
83
+ /**
84
+ * decode_content: (bool, default=true) Specify whether or not
85
+ * Content-Encoding responses (gzip, deflate, etc.) are automatically
86
+ * decoded.
87
+ */
88
+ const DECODE_CONTENT = 'decode_content';
89
+
90
+ /**
91
+ * delay: (int) The amount of time to delay before sending in milliseconds.
92
+ */
93
+ const DELAY = 'delay';
94
+
95
+ /**
96
+ * expect: (bool|integer) Controls the behavior of the
97
+ * "Expect: 100-Continue" header.
98
+ *
99
+ * Set to `true` to enable the "Expect: 100-Continue" header for all
100
+ * requests that sends a body. Set to `false` to disable the
101
+ * "Expect: 100-Continue" header for all requests. Set to a number so that
102
+ * the size of the payload must be greater than the number in order to send
103
+ * the Expect header. Setting to a number will send the Expect header for
104
+ * all requests in which the size of the payload cannot be determined or
105
+ * where the body is not rewindable.
106
+ *
107
+ * By default, Guzzle will add the "Expect: 100-Continue" header when the
108
+ * size of the body of a request is greater than 1 MB and a request is
109
+ * using HTTP/1.1.
110
+ */
111
+ const EXPECT = 'expect';
112
+
113
+ /**
114
+ * form_params: (array) Associative array of form field names to values
115
+ * where each value is a string or array of strings. Sets the Content-Type
116
+ * header to application/x-www-form-urlencoded when no Content-Type header
117
+ * is already present.
118
+ */
119
+ const FORM_PARAMS = 'form_params';
120
+
121
+ /**
122
+ * headers: (array) Associative array of HTTP headers. Each value MUST be
123
+ * a string or array of strings.
124
+ */
125
+ const HEADERS = 'headers';
126
+
127
+ /**
128
+ * http_errors: (bool, default=true) Set to false to disable exceptions
129
+ * when a non- successful HTTP response is received. By default,
130
+ * exceptions will be thrown for 4xx and 5xx responses. This option only
131
+ * works if your handler has the `httpErrors` middleware.
132
+ */
133
+ const HTTP_ERRORS = 'http_errors';
134
+
135
+ /**
136
+ * idn: (bool|int, default=true) A combination of IDNA_* constants for
137
+ * idn_to_ascii() PHP's function (see "options" parameter). Set to false to
138
+ * disable IDN support completely, or to true to use the default
139
+ * configuration (IDNA_DEFAULT constant).
140
+ */
141
+ const IDN_CONVERSION = 'idn_conversion';
142
+
143
+ /**
144
+ * json: (mixed) Adds JSON data to a request. The provided value is JSON
145
+ * encoded and a Content-Type header of application/json will be added to
146
+ * the request if no Content-Type header is already present.
147
+ */
148
+ const JSON = 'json';
149
+
150
+ /**
151
+ * multipart: (array) Array of associative arrays, each containing a
152
+ * required "name" key mapping to the form field, name, a required
153
+ * "contents" key mapping to a StreamInterface|resource|string, an
154
+ * optional "headers" associative array of custom headers, and an
155
+ * optional "filename" key mapping to a string to send as the filename in
156
+ * the part. If no "filename" key is present, then no "filename" attribute
157
+ * will be added to the part.
158
+ */
159
+ const MULTIPART = 'multipart';
160
+
161
+ /**
162
+ * on_headers: (callable) A callable that is invoked when the HTTP headers
163
+ * of the response have been received but the body has not yet begun to
164
+ * download.
165
+ */
166
+ const ON_HEADERS = 'on_headers';
167
+
168
+ /**
169
+ * on_stats: (callable) allows you to get access to transfer statistics of
170
+ * a request and access the lower level transfer details of the handler
171
+ * associated with your client. ``on_stats`` is a callable that is invoked
172
+ * when a handler has finished sending a request. The callback is invoked
173
+ * with transfer statistics about the request, the response received, or
174
+ * the error encountered. Included in the data is the total amount of time
175
+ * taken to send the request.
176
+ */
177
+ const ON_STATS = 'on_stats';
178
+
179
+ /**
180
+ * progress: (callable) Defines a function to invoke when transfer
181
+ * progress is made. The function accepts the following positional
182
+ * arguments: the total number of bytes expected to be downloaded, the
183
+ * number of bytes downloaded so far, the number of bytes expected to be
184
+ * uploaded, the number of bytes uploaded so far.
185
+ */
186
+ const PROGRESS = 'progress';
187
+
188
+ /**
189
+ * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
190
+ * array to specify different proxies for different protocols (where the
191
+ * key is the protocol and the value is a proxy string).
192
+ */
193
+ const PROXY = 'proxy';
194
+
195
+ /**
196
+ * query: (array|string) Associative array of query string values to add
197
+ * to the request. This option uses PHP's http_build_query() to create
198
+ * the string representation. Pass a string value if you need more
199
+ * control than what this method provides
200
+ */
201
+ const QUERY = 'query';
202
+
203
+ /**
204
+ * sink: (resource|string|StreamInterface) Where the data of the
205
+ * response is written to. Defaults to a PHP temp stream. Providing a
206
+ * string will write data to a file by the given name.
207
+ */
208
+ const SINK = 'sink';
209
+
210
+ /**
211
+ * synchronous: (bool) Set to true to inform HTTP handlers that you intend
212
+ * on waiting on the response. This can be useful for optimizations. Note
213
+ * that a promise is still returned if you are using one of the async
214
+ * client methods.
215
+ */
216
+ const SYNCHRONOUS = 'synchronous';
217
+
218
+ /**
219
+ * ssl_key: (array|string) Specify the path to a file containing a private
220
+ * SSL key in PEM format. If a password is required, then set to an array
221
+ * containing the path to the SSL key in the first array element followed
222
+ * by the password required for the certificate in the second element.
223
+ */
224
+ const SSL_KEY = 'ssl_key';
225
+
226
+ /**
227
+ * stream: Set to true to attempt to stream a response rather than
228
+ * download it all up-front.
229
+ */
230
+ const STREAM = 'stream';
231
+
232
+ /**
233
+ * verify: (bool|string, default=true) Describes the SSL certificate
234
+ * verification behavior of a request. Set to true to enable SSL
235
+ * certificate verification using the system CA bundle when available
236
+ * (the default). Set to false to disable certificate verification (this
237
+ * is insecure!). Set to a string to provide the path to a CA bundle on
238
+ * disk to enable verification using a custom certificate.
239
+ */
240
+ const VERIFY = 'verify';
241
+
242
+ /**
243
+ * timeout: (float, default=0) Float describing the timeout of the
244
+ * request in seconds. Use 0 to wait indefinitely (the default behavior).
245
+ */
246
+ const TIMEOUT = 'timeout';
247
+
248
+ /**
249
+ * read_timeout: (float, default=default_socket_timeout ini setting) Float describing
250
+ * the body read timeout, for stream requests.
251
+ */
252
+ const READ_TIMEOUT = 'read_timeout';
253
+
254
+ /**
255
+ * version: (float) Specifies the HTTP protocol version to attempt to use.
256
+ */
257
+ const VERSION = 'version';
258
+
259
+ /**
260
+ * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
261
+ */
262
+ const FORCE_IP_RESOLVE = 'force_ip_resolve';
263
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Promise\PromiseInterface;
5
+ use GuzzleHttp\Promise\RejectedPromise;
6
+ use GuzzleHttp\Psr7;
7
+ use Psr\Http\Message\RequestInterface;
8
+ use Psr\Http\Message\ResponseInterface;
9
+
10
+ /**
11
+ * Middleware that retries requests based on the boolean result of
12
+ * invoking the provided "decider" function.
13
+ */
14
+ class RetryMiddleware
15
+ {
16
+ /** @var callable */
17
+ private $nextHandler;
18
+
19
+ /** @var callable */
20
+ private $decider;
21
+
22
+ /** @var callable */
23
+ private $delay;
24
+
25
+ /**
26
+ * @param callable $decider Function that accepts the number of retries,
27
+ * a request, [response], and [exception] and
28
+ * returns true if the request is to be
29
+ * retried.
30
+ * @param callable $nextHandler Next handler to invoke.
31
+ * @param callable $delay Function that accepts the number of retries
32
+ * and [response] and returns the number of
33
+ * milliseconds to delay.
34
+ */
35
+ public function __construct(
36
+ callable $decider,
37
+ callable $nextHandler,
38
+ callable $delay = null
39
+ ) {
40
+ $this->decider = $decider;
41
+ $this->nextHandler = $nextHandler;
42
+ $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
43
+ }
44
+
45
+ /**
46
+ * Default exponential backoff delay function.
47
+ *
48
+ * @param int $retries
49
+ *
50
+ * @return int milliseconds.
51
+ */
52
+ public static function exponentialDelay($retries)
53
+ {
54
+ return (int) pow(2, $retries - 1) * 1000;
55
+ }
56
+
57
+ /**
58
+ * @param RequestInterface $request
59
+ * @param array $options
60
+ *
61
+ * @return PromiseInterface
62
+ */
63
+ public function __invoke(RequestInterface $request, array $options)
64
+ {
65
+ if (!isset($options['retries'])) {
66
+ $options['retries'] = 0;
67
+ }
68
+
69
+ $fn = $this->nextHandler;
70
+ return $fn($request, $options)
71
+ ->then(
72
+ $this->onFulfilled($request, $options),
73
+ $this->onRejected($request, $options)
74
+ );
75
+ }
76
+
77
+ /**
78
+ * Execute fulfilled closure
79
+ *
80
+ * @return mixed
81
+ */
82
+ private function onFulfilled(RequestInterface $req, array $options)
83
+ {
84
+ return function ($value) use ($req, $options) {
85
+ if (!call_user_func(
86
+ $this->decider,
87
+ $options['retries'],
88
+ $req,
89
+ $value,
90
+ null
91
+ )) {
92
+ return $value;
93
+ }
94
+ return $this->doRetry($req, $options, $value);
95
+ };
96
+ }
97
+
98
+ /**
99
+ * Execute rejected closure
100
+ *
101
+ * @return callable
102
+ */
103
+ private function onRejected(RequestInterface $req, array $options)
104
+ {
105
+ return function ($reason) use ($req, $options) {
106
+ if (!call_user_func(
107
+ $this->decider,
108
+ $options['retries'],
109
+ $req,
110
+ null,
111
+ $reason
112
+ )) {
113
+ return \GuzzleHttp\Promise\rejection_for($reason);
114
+ }
115
+ return $this->doRetry($req, $options);
116
+ };
117
+ }
118
+
119
+ /**
120
+ * @return self
121
+ */
122
+ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
123
+ {
124
+ $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
125
+
126
+ return $this($request, $options);
127
+ }
128
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/TransferStats.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+ use Psr\Http\Message\ResponseInterface;
6
+ use Psr\Http\Message\UriInterface;
7
+
8
+ /**
9
+ * Represents data at the point after it was transferred either successfully
10
+ * or after a network error.
11
+ */
12
+ final class TransferStats
13
+ {
14
+ private $request;
15
+ private $response;
16
+ private $transferTime;
17
+ private $handlerStats;
18
+ private $handlerErrorData;
19
+
20
+ /**
21
+ * @param RequestInterface $request Request that was sent.
22
+ * @param ResponseInterface|null $response Response received (if any)
23
+ * @param float|null $transferTime Total handler transfer time.
24
+ * @param mixed $handlerErrorData Handler error data.
25
+ * @param array $handlerStats Handler specific stats.
26
+ */
27
+ public function __construct(
28
+ RequestInterface $request,
29
+ ResponseInterface $response = null,
30
+ $transferTime = null,
31
+ $handlerErrorData = null,
32
+ $handlerStats = []
33
+ ) {
34
+ $this->request = $request;
35
+ $this->response = $response;
36
+ $this->transferTime = $transferTime;
37
+ $this->handlerErrorData = $handlerErrorData;
38
+ $this->handlerStats = $handlerStats;
39
+ }
40
+
41
+ /**
42
+ * @return RequestInterface
43
+ */
44
+ public function getRequest()
45
+ {
46
+ return $this->request;
47
+ }
48
+
49
+ /**
50
+ * Returns the response that was received (if any).
51
+ *
52
+ * @return ResponseInterface|null
53
+ */
54
+ public function getResponse()
55
+ {
56
+ return $this->response;
57
+ }
58
+
59
+ /**
60
+ * Returns true if a response was received.
61
+ *
62
+ * @return bool
63
+ */
64
+ public function hasResponse()
65
+ {
66
+ return $this->response !== null;
67
+ }
68
+
69
+ /**
70
+ * Gets handler specific error data.
71
+ *
72
+ * This might be an exception, a integer representing an error code, or
73
+ * anything else. Relying on this value assumes that you know what handler
74
+ * you are using.
75
+ *
76
+ * @return mixed
77
+ */
78
+ public function getHandlerErrorData()
79
+ {
80
+ return $this->handlerErrorData;
81
+ }
82
+
83
+ /**
84
+ * Get the effective URI the request was sent to.
85
+ *
86
+ * @return UriInterface
87
+ */
88
+ public function getEffectiveUri()
89
+ {
90
+ return $this->request->getUri();
91
+ }
92
+
93
+ /**
94
+ * Get the estimated time the request was being transferred by the handler.
95
+ *
96
+ * @return float|null Time in seconds.
97
+ */
98
+ public function getTransferTime()
99
+ {
100
+ return $this->transferTime;
101
+ }
102
+
103
+ /**
104
+ * Gets an array of all of the handler specific transfer data.
105
+ *
106
+ * @return array
107
+ */
108
+ public function getHandlerStats()
109
+ {
110
+ return $this->handlerStats;
111
+ }
112
+
113
+ /**
114
+ * Get a specific handler statistic from the handler by name.
115
+ *
116
+ * @param string $stat Handler specific transfer stat to retrieve.
117
+ *
118
+ * @return mixed|null
119
+ */
120
+ public function getHandlerStat($stat)
121
+ {
122
+ return isset($this->handlerStats[$stat])
123
+ ? $this->handlerStats[$stat]
124
+ : null;
125
+ }
126
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/UriTemplate.php ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ /**
5
+ * Expands URI templates. Userland implementation of PECL uri_template.
6
+ *
7
+ * @link http://tools.ietf.org/html/rfc6570
8
+ */
9
+ class UriTemplate
10
+ {
11
+ /** @var string URI template */
12
+ private $template;
13
+
14
+ /** @var array Variables to use in the template expansion */
15
+ private $variables;
16
+
17
+ /** @var array Hash for quick operator lookups */
18
+ private static $operatorHash = [
19
+ '' => ['prefix' => '', 'joiner' => ',', 'query' => false],
20
+ '+' => ['prefix' => '', 'joiner' => ',', 'query' => false],
21
+ '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false],
22
+ '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false],
23
+ '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false],
24
+ ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true],
25
+ '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true],
26
+ '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true]
27
+ ];
28
+
29
+ /** @var array Delimiters */
30
+ private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$',
31
+ '&', '\'', '(', ')', '*', '+', ',', ';', '='];
32
+
33
+ /** @var array Percent encoded delimiters */
34
+ private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D',
35
+ '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C',
36
+ '%3B', '%3D'];
37
+
38
+ public function expand($template, array $variables)
39
+ {
40
+ if (false === strpos($template, '{')) {
41
+ return $template;
42
+ }
43
+
44
+ $this->template = $template;
45
+ $this->variables = $variables;
46
+
47
+ return preg_replace_callback(
48
+ '/\{([^\}]+)\}/',
49
+ [$this, 'expandMatch'],
50
+ $this->template
51
+ );
52
+ }
53
+
54
+ /**
55
+ * Parse an expression into parts
56
+ *
57
+ * @param string $expression Expression to parse
58
+ *
59
+ * @return array Returns an associative array of parts
60
+ */
61
+ private function parseExpression($expression)
62
+ {
63
+ $result = [];
64
+
65
+ if (isset(self::$operatorHash[$expression[0]])) {
66
+ $result['operator'] = $expression[0];
67
+ $expression = substr($expression, 1);
68
+ } else {
69
+ $result['operator'] = '';
70
+ }
71
+
72
+ foreach (explode(',', $expression) as $value) {
73
+ $value = trim($value);
74
+ $varspec = [];
75
+ if ($colonPos = strpos($value, ':')) {
76
+ $varspec['value'] = substr($value, 0, $colonPos);
77
+ $varspec['modifier'] = ':';
78
+ $varspec['position'] = (int) substr($value, $colonPos + 1);
79
+ } elseif (substr($value, -1) === '*') {
80
+ $varspec['modifier'] = '*';
81
+ $varspec['value'] = substr($value, 0, -1);
82
+ } else {
83
+ $varspec['value'] = (string) $value;
84
+ $varspec['modifier'] = '';
85
+ }
86
+ $result['values'][] = $varspec;
87
+ }
88
+
89
+ return $result;
90
+ }
91
+
92
+ /**
93
+ * Process an expansion
94
+ *
95
+ * @param array $matches Matches met in the preg_replace_callback
96
+ *
97
+ * @return string Returns the replacement string
98
+ */
99
+ private function expandMatch(array $matches)
100
+ {
101
+ static $rfc1738to3986 = ['+' => '%20', '%7e' => '~'];
102
+
103
+ $replacements = [];
104
+ $parsed = self::parseExpression($matches[1]);
105
+ $prefix = self::$operatorHash[$parsed['operator']]['prefix'];
106
+ $joiner = self::$operatorHash[$parsed['operator']]['joiner'];
107
+ $useQuery = self::$operatorHash[$parsed['operator']]['query'];
108
+
109
+ foreach ($parsed['values'] as $value) {
110
+ if (!isset($this->variables[$value['value']])) {
111
+ continue;
112
+ }
113
+
114
+ $variable = $this->variables[$value['value']];
115
+ $actuallyUseQuery = $useQuery;
116
+ $expanded = '';
117
+
118
+ if (is_array($variable)) {
119
+ $isAssoc = $this->isAssoc($variable);
120
+ $kvp = [];
121
+ foreach ($variable as $key => $var) {
122
+ if ($isAssoc) {
123
+ $key = rawurlencode($key);
124
+ $isNestedArray = is_array($var);
125
+ } else {
126
+ $isNestedArray = false;
127
+ }
128
+
129
+ if (!$isNestedArray) {
130
+ $var = rawurlencode($var);
131
+ if ($parsed['operator'] === '+' ||
132
+ $parsed['operator'] === '#'
133
+ ) {
134
+ $var = $this->decodeReserved($var);
135
+ }
136
+ }
137
+
138
+ if ($value['modifier'] === '*') {
139
+ if ($isAssoc) {
140
+ if ($isNestedArray) {
141
+ // Nested arrays must allow for deeply nested
142
+ // structures.
143
+ $var = strtr(
144
+ http_build_query([$key => $var]),
145
+ $rfc1738to3986
146
+ );
147
+ } else {
148
+ $var = $key . '=' . $var;
149
+ }
150
+ } elseif ($key > 0 && $actuallyUseQuery) {
151
+ $var = $value['value'] . '=' . $var;
152
+ }
153
+ }
154
+
155
+ $kvp[$key] = $var;
156
+ }
157
+
158
+ if (empty($variable)) {
159
+ $actuallyUseQuery = false;
160
+ } elseif ($value['modifier'] === '*') {
161
+ $expanded = implode($joiner, $kvp);
162
+ if ($isAssoc) {
163
+ // Don't prepend the value name when using the explode
164
+ // modifier with an associative array.
165
+ $actuallyUseQuery = false;
166
+ }
167
+ } else {
168
+ if ($isAssoc) {
169
+ // When an associative array is encountered and the
170
+ // explode modifier is not set, then the result must be
171
+ // a comma separated list of keys followed by their
172
+ // respective values.
173
+ foreach ($kvp as $k => &$v) {
174
+ $v = $k . ',' . $v;
175
+ }
176
+ }
177
+ $expanded = implode(',', $kvp);
178
+ }
179
+ } else {
180
+ if ($value['modifier'] === ':') {
181
+ $variable = substr($variable, 0, $value['position']);
182
+ }
183
+ $expanded = rawurlencode($variable);
184
+ if ($parsed['operator'] === '+' || $parsed['operator'] === '#') {
185
+ $expanded = $this->decodeReserved($expanded);
186
+ }
187
+ }
188
+
189
+ if ($actuallyUseQuery) {
190
+ if (!$expanded && $joiner !== '&') {
191
+ $expanded = $value['value'];
192
+ } else {
193
+ $expanded = $value['value'] . '=' . $expanded;
194
+ }
195
+ }
196
+
197
+ $replacements[] = $expanded;
198
+ }
199
+
200
+ $ret = implode($joiner, $replacements);
201
+ if ($ret && $prefix) {
202
+ return $prefix . $ret;
203
+ }
204
+
205
+ return $ret;
206
+ }
207
+
208
+ /**
209
+ * Determines if an array is associative.
210
+ *
211
+ * This makes the assumption that input arrays are sequences or hashes.
212
+ * This assumption is a tradeoff for accuracy in favor of speed, but it
213
+ * should work in almost every case where input is supplied for a URI
214
+ * template.
215
+ *
216
+ * @param array $array Array to check
217
+ *
218
+ * @return bool
219
+ */
220
+ private function isAssoc(array $array)
221
+ {
222
+ return $array && array_keys($array)[0] !== 0;
223
+ }
224
+
225
+ /**
226
+ * Removes percent encoding on reserved characters (used with + and #
227
+ * modifiers).
228
+ *
229
+ * @param string $string String to fix
230
+ *
231
+ * @return string
232
+ */
233
+ private function decodeReserved($string)
234
+ {
235
+ return str_replace(self::$delimsPct, self::$delims, $string);
236
+ }
237
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/Utils.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Exception\InvalidArgumentException;
5
+ use Psr\Http\Message\UriInterface;
6
+ use Symfony\Polyfill\Intl\Idn\Idn;
7
+
8
+ final class Utils
9
+ {
10
+ /**
11
+ * Wrapper for the hrtime() or microtime() functions
12
+ * (depending on the PHP version, one of the two is used)
13
+ *
14
+ * @return float|mixed UNIX timestamp
15
+ *
16
+ * @internal
17
+ */
18
+ public static function currentTime()
19
+ {
20
+ return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true);
21
+ }
22
+
23
+ /**
24
+ * @param int $options
25
+ *
26
+ * @return UriInterface
27
+ * @throws InvalidArgumentException
28
+ *
29
+ * @internal
30
+ */
31
+ public static function idnUriConvert(UriInterface $uri, $options = 0)
32
+ {
33
+ if ($uri->getHost()) {
34
+ $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
35
+ if ($asciiHost === false) {
36
+ $errorBitSet = isset($info['errors']) ? $info['errors'] : 0;
37
+
38
+ $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
39
+ return substr($name, 0, 11) === 'IDNA_ERROR_';
40
+ });
41
+
42
+ $errors = [];
43
+ foreach ($errorConstants as $errorConstant) {
44
+ if ($errorBitSet & constant($errorConstant)) {
45
+ $errors[] = $errorConstant;
46
+ }
47
+ }
48
+
49
+ $errorMessage = 'IDN conversion failed';
50
+ if ($errors) {
51
+ $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')';
52
+ }
53
+
54
+ throw new InvalidArgumentException($errorMessage);
55
+ } else {
56
+ if ($uri->getHost() !== $asciiHost) {
57
+ // Replace URI only if the ASCII version is different
58
+ $uri = $uri->withHost($asciiHost);
59
+ }
60
+ }
61
+ }
62
+
63
+ return $uri;
64
+ }
65
+
66
+ /**
67
+ * @param string $domain
68
+ * @param int $options
69
+ * @param array $info
70
+ *
71
+ * @return string|false
72
+ */
73
+ private static function idnToAsci($domain, $options, &$info = [])
74
+ {
75
+ if (\preg_match('%^[ -~]+$%', $domain) === 1) {
76
+ return $domain;
77
+ }
78
+
79
+ if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) {
80
+ return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info);
81
+ }
82
+
83
+ /*
84
+ * The Idn class is marked as @internal. Verify that class and method exists.
85
+ */
86
+ if (method_exists(Idn::class, 'idn_to_ascii')) {
87
+ return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info);
88
+ }
89
+
90
+ throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old');
91
+ }
92
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/functions.php ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Handler\CurlHandler;
5
+ use GuzzleHttp\Handler\CurlMultiHandler;
6
+ use GuzzleHttp\Handler\Proxy;
7
+ use GuzzleHttp\Handler\StreamHandler;
8
+
9
+ /**
10
+ * Expands a URI template
11
+ *
12
+ * @param string $template URI template
13
+ * @param array $variables Template variables
14
+ *
15
+ * @return string
16
+ */
17
+ function uri_template($template, array $variables)
18
+ {
19
+ if (extension_loaded('uri_template')) {
20
+ // @codeCoverageIgnoreStart
21
+ return \uri_template($template, $variables);
22
+ // @codeCoverageIgnoreEnd
23
+ }
24
+
25
+ static $uriTemplate;
26
+ if (!$uriTemplate) {
27
+ $uriTemplate = new UriTemplate();
28
+ }
29
+
30
+ return $uriTemplate->expand($template, $variables);
31
+ }
32
+
33
+ /**
34
+ * Debug function used to describe the provided value type and class.
35
+ *
36
+ * @param mixed $input
37
+ *
38
+ * @return string Returns a string containing the type of the variable and
39
+ * if a class is provided, the class name.
40
+ */
41
+ function describe_type($input)
42
+ {
43
+ switch (gettype($input)) {
44
+ case 'object':
45
+ return 'object(' . get_class($input) . ')';
46
+ case 'array':
47
+ return 'array(' . count($input) . ')';
48
+ default:
49
+ ob_start();
50
+ var_dump($input);
51
+ // normalize float vs double
52
+ return str_replace('double(', 'float(', rtrim(ob_get_clean()));
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Parses an array of header lines into an associative array of headers.
58
+ *
59
+ * @param iterable $lines Header lines array of strings in the following
60
+ * format: "Name: Value"
61
+ * @return array
62
+ */
63
+ function headers_from_lines($lines)
64
+ {
65
+ $headers = [];
66
+
67
+ foreach ($lines as $line) {
68
+ $parts = explode(':', $line, 2);
69
+ $headers[trim($parts[0])][] = isset($parts[1])
70
+ ? trim($parts[1])
71
+ : null;
72
+ }
73
+
74
+ return $headers;
75
+ }
76
+
77
+ /**
78
+ * Returns a debug stream based on the provided variable.
79
+ *
80
+ * @param mixed $value Optional value
81
+ *
82
+ * @return resource
83
+ */
84
+ function debug_resource($value = null)
85
+ {
86
+ if (is_resource($value)) {
87
+ return $value;
88
+ } elseif (defined('STDOUT')) {
89
+ return STDOUT;
90
+ }
91
+
92
+ return fopen('php://output', 'w');
93
+ }
94
+
95
+ /**
96
+ * Chooses and creates a default handler to use based on the environment.
97
+ *
98
+ * The returned handler is not wrapped by any default middlewares.
99
+ *
100
+ * @return callable Returns the best handler for the given system.
101
+ * @throws \RuntimeException if no viable Handler is available.
102
+ */
103
+ function choose_handler()
104
+ {
105
+ $handler = null;
106
+ if (function_exists('curl_multi_exec') && function_exists('curl_exec')) {
107
+ $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
108
+ } elseif (function_exists('curl_exec')) {
109
+ $handler = new CurlHandler();
110
+ } elseif (function_exists('curl_multi_exec')) {
111
+ $handler = new CurlMultiHandler();
112
+ }
113
+
114
+ if (ini_get('allow_url_fopen')) {
115
+ $handler = $handler
116
+ ? Proxy::wrapStreaming($handler, new StreamHandler())
117
+ : new StreamHandler();
118
+ } elseif (!$handler) {
119
+ throw new \RuntimeException('GuzzleHttp requires cURL, the '
120
+ . 'allow_url_fopen ini setting, or a custom HTTP handler.');
121
+ }
122
+
123
+ return $handler;
124
+ }
125
+
126
+ /**
127
+ * Get the default User-Agent string to use with Guzzle
128
+ *
129
+ * @return string
130
+ */
131
+ function default_user_agent()
132
+ {
133
+ static $defaultAgent = '';
134
+
135
+ if (!$defaultAgent) {
136
+ $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
137
+ if (extension_loaded('curl') && function_exists('curl_version')) {
138
+ $defaultAgent .= ' curl/' . \curl_version()['version'];
139
+ }
140
+ $defaultAgent .= ' PHP/' . PHP_VERSION;
141
+ }
142
+
143
+ return $defaultAgent;
144
+ }
145
+
146
+ /**
147
+ * Returns the default cacert bundle for the current system.
148
+ *
149
+ * First, the openssl.cafile and curl.cainfo php.ini settings are checked.
150
+ * If those settings are not configured, then the common locations for
151
+ * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X
152
+ * and Windows are checked. If any of these file locations are found on
153
+ * disk, they will be utilized.
154
+ *
155
+ * Note: the result of this function is cached for subsequent calls.
156
+ *
157
+ * @return string
158
+ * @throws \RuntimeException if no bundle can be found.
159
+ */
160
+ function default_ca_bundle()
161
+ {
162
+ static $cached = null;
163
+ static $cafiles = [
164
+ // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
165
+ '/etc/pki/tls/certs/ca-bundle.crt',
166
+ // Ubuntu, Debian (provided by the ca-certificates package)
167
+ '/etc/ssl/certs/ca-certificates.crt',
168
+ // FreeBSD (provided by the ca_root_nss package)
169
+ '/usr/local/share/certs/ca-root-nss.crt',
170
+ // SLES 12 (provided by the ca-certificates package)
171
+ '/var/lib/ca-certificates/ca-bundle.pem',
172
+ // OS X provided by homebrew (using the default path)
173
+ '/usr/local/etc/openssl/cert.pem',
174
+ // Google app engine
175
+ '/etc/ca-certificates.crt',
176
+ // Windows?
177
+ 'C:\\windows\\system32\\curl-ca-bundle.crt',
178
+ 'C:\\windows\\curl-ca-bundle.crt',
179
+ ];
180
+
181
+ if ($cached) {
182
+ return $cached;
183
+ }
184
+
185
+ if ($ca = ini_get('openssl.cafile')) {
186
+ return $cached = $ca;
187
+ }
188
+
189
+ if ($ca = ini_get('curl.cainfo')) {
190
+ return $cached = $ca;
191
+ }
192
+
193
+ foreach ($cafiles as $filename) {
194
+ if (file_exists($filename)) {
195
+ return $cached = $filename;
196
+ }
197
+ }
198
+
199
+ throw new \RuntimeException(
200
+ <<< EOT
201
+ No system CA bundle could be found in any of the the common system locations.
202
+ PHP versions earlier than 5.6 are not properly configured to use the system's
203
+ CA bundle by default. In order to verify peer certificates, you will need to
204
+ supply the path on disk to a certificate bundle to the 'verify' request
205
+ option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
206
+ need a specific certificate bundle, then Mozilla provides a commonly used CA
207
+ bundle which can be downloaded here (provided by the maintainer of cURL):
208
+ https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once
209
+ you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
210
+ ini setting to point to the path to the file, allowing you to omit the 'verify'
211
+ request option. See http://curl.haxx.se/docs/sslcerts.html for more
212
+ information.
213
+ EOT
214
+ );
215
+ }
216
+
217
+ /**
218
+ * Creates an associative array of lowercase header names to the actual
219
+ * header casing.
220
+ *
221
+ * @param array $headers
222
+ *
223
+ * @return array
224
+ */
225
+ function normalize_header_keys(array $headers)
226
+ {
227
+ $result = [];
228
+ foreach (array_keys($headers) as $key) {
229
+ $result[strtolower($key)] = $key;
230
+ }
231
+
232
+ return $result;
233
+ }
234
+
235
+ /**
236
+ * Returns true if the provided host matches any of the no proxy areas.
237
+ *
238
+ * This method will strip a port from the host if it is present. Each pattern
239
+ * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a
240
+ * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" ==
241
+ * "baz.foo.com", but ".foo.com" != "foo.com").
242
+ *
243
+ * Areas are matched in the following cases:
244
+ * 1. "*" (without quotes) always matches any hosts.
245
+ * 2. An exact match.
246
+ * 3. The area starts with "." and the area is the last part of the host. e.g.
247
+ * '.mit.edu' will match any host that ends with '.mit.edu'.
248
+ *
249
+ * @param string $host Host to check against the patterns.
250
+ * @param array $noProxyArray An array of host patterns.
251
+ *
252
+ * @return bool
253
+ */
254
+ function is_host_in_noproxy($host, array $noProxyArray)
255
+ {
256
+ if (strlen($host) === 0) {
257
+ throw new \InvalidArgumentException('Empty host provided');
258
+ }
259
+
260
+ // Strip port if present.
261
+ if (strpos($host, ':')) {
262
+ $host = explode($host, ':', 2)[0];
263
+ }
264
+
265
+ foreach ($noProxyArray as $area) {
266
+ // Always match on wildcards.
267
+ if ($area === '*') {
268
+ return true;
269
+ } elseif (empty($area)) {
270
+ // Don't match on empty values.
271
+ continue;
272
+ } elseif ($area === $host) {
273
+ // Exact matches.
274
+ return true;
275
+ } else {
276
+ // Special match if the area when prefixed with ".". Remove any
277
+ // existing leading "." and add a new leading ".".
278
+ $area = '.' . ltrim($area, '.');
279
+ if (substr($host, -(strlen($area))) === $area) {
280
+ return true;
281
+ }
282
+ }
283
+ }
284
+
285
+ return false;
286
+ }
287
+
288
+ /**
289
+ * Wrapper for json_decode that throws when an error occurs.
290
+ *
291
+ * @param string $json JSON data to parse
292
+ * @param bool $assoc When true, returned objects will be converted
293
+ * into associative arrays.
294
+ * @param int $depth User specified recursion depth.
295
+ * @param int $options Bitmask of JSON decode options.
296
+ *
297
+ * @return mixed
298
+ * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
299
+ * @link http://www.php.net/manual/en/function.json-decode.php
300
+ */
301
+ function json_decode($json, $assoc = false, $depth = 512, $options = 0)
302
+ {
303
+ $data = \json_decode($json, $assoc, $depth, $options);
304
+ if (JSON_ERROR_NONE !== json_last_error()) {
305
+ throw new Exception\InvalidArgumentException(
306
+ 'json_decode error: ' . json_last_error_msg()
307
+ );
308
+ }
309
+
310
+ return $data;
311
+ }
312
+
313
+ /**
314
+ * Wrapper for JSON encoding that throws when an error occurs.
315
+ *
316
+ * @param mixed $value The value being encoded
317
+ * @param int $options JSON encode option bitmask
318
+ * @param int $depth Set the maximum depth. Must be greater than zero.
319
+ *
320
+ * @return string
321
+ * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
322
+ * @link http://www.php.net/manual/en/function.json-encode.php
323
+ */
324
+ function json_encode($value, $options = 0, $depth = 512)
325
+ {
326
+ $json = \json_encode($value, $options, $depth);
327
+ if (JSON_ERROR_NONE !== json_last_error()) {
328
+ throw new Exception\InvalidArgumentException(
329
+ 'json_encode error: ' . json_last_error_msg()
330
+ );
331
+ }
332
+
333
+ return $json;
334
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/guzzle/src/functions_include.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Don't redefine the functions if included multiple times.
4
+ if (!function_exists('GuzzleHttp\uri_template')) {
5
+ require __DIR__ . '/functions.php';
6
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/CHANGELOG.md ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CHANGELOG
2
+
3
+ ## 1.5.2 - 2022-08-07
4
+
5
+ ### Changed
6
+
7
+ - Officially support PHP 8.2
8
+
9
+ ## 1.5.1 - 2021-10-22
10
+
11
+ ### Fixed
12
+
13
+ - Revert "Call handler when waiting on fulfilled/rejected Promise"
14
+ - Fix pool memory leak when empty array of promises provided
15
+
16
+ ## 1.5.0 - 2021-10-07
17
+
18
+ ### Changed
19
+
20
+ - Call handler when waiting on fulfilled/rejected Promise
21
+ - Officially support PHP 8.1
22
+
23
+ ### Fixed
24
+
25
+ - Fix manually settle promises generated with `Utils::task`
26
+
27
+ ## 1.4.1 - 2021-02-18
28
+
29
+ ### Fixed
30
+
31
+ - Fixed `each_limit` skipping promises and failing
32
+
33
+ ## 1.4.0 - 2020-09-30
34
+
35
+ ### Added
36
+
37
+ - Support for PHP 8
38
+ - Optional `$recursive` flag to `all`
39
+ - Replaced functions by static methods
40
+
41
+ ### Fixed
42
+
43
+ - Fix empty `each` processing
44
+ - Fix promise handling for Iterators of non-unique keys
45
+ - Fixed `method_exists` crashes on PHP 8
46
+ - Memory leak on exceptions
47
+
48
+
49
+ ## 1.3.1 - 2016-12-20
50
+
51
+ ### Fixed
52
+
53
+ - `wait()` foreign promise compatibility
54
+
55
+
56
+ ## 1.3.0 - 2016-11-18
57
+
58
+ ### Added
59
+
60
+ - Adds support for custom task queues.
61
+
62
+ ### Fixed
63
+
64
+ - Fixed coroutine promise memory leak.
65
+
66
+
67
+ ## 1.2.0 - 2016-05-18
68
+
69
+ ### Changed
70
+
71
+ - Update to now catch `\Throwable` on PHP 7+
72
+
73
+
74
+ ## 1.1.0 - 2016-03-07
75
+
76
+ ### Changed
77
+
78
+ - Update EachPromise to prevent recurring on a iterator when advancing, as this
79
+ could trigger fatal generator errors.
80
+ - Update Promise to allow recursive waiting without unwrapping exceptions.
81
+
82
+
83
+ ## 1.0.3 - 2015-10-15
84
+
85
+ ### Changed
86
+
87
+ - Update EachPromise to immediately resolve when the underlying promise iterator
88
+ is empty. Previously, such a promise would throw an exception when its `wait`
89
+ function was called.
90
+
91
+
92
+ ## 1.0.2 - 2015-05-15
93
+
94
+ ### Changed
95
+
96
+ - Conditionally require functions.php.
97
+
98
+
99
+ ## 1.0.1 - 2015-06-24
100
+
101
+ ### Changed
102
+
103
+ - Updating EachPromise to call next on the underlying promise iterator as late
104
+ as possible to ensure that generators that generate new requests based on
105
+ callbacks are not iterated until after callbacks are invoked.
106
+
107
+
108
+ ## 1.0.0 - 2015-05-12
109
+
110
+ - Initial release
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/LICENSE ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com>
4
+ Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk>
5
+ Copyright (c) 2017 Tobias Schultze <webmaster@tubo-world.de>
6
+ Copyright (c) 2020 Tobias Nyholm <tobias.nyholm@gmail.com>
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/AggregateException.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * Exception thrown when too many errors occur in the some() or any() methods.
7
+ */
8
+ class AggregateException extends RejectionException
9
+ {
10
+ public function __construct($msg, array $reasons)
11
+ {
12
+ parent::__construct(
13
+ $reasons,
14
+ sprintf('%s; %d rejected promises', $msg, count($reasons))
15
+ );
16
+ }
17
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/CancellationException.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * Exception that is set as the reason for a promise that has been cancelled.
7
+ */
8
+ class CancellationException extends RejectionException
9
+ {
10
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Coroutine.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ use Exception;
6
+ use Generator;
7
+ use Throwable;
8
+
9
+ /**
10
+ * Creates a promise that is resolved using a generator that yields values or
11
+ * promises (somewhat similar to C#'s async keyword).
12
+ *
13
+ * When called, the Coroutine::of method will start an instance of the generator
14
+ * and returns a promise that is fulfilled with its final yielded value.
15
+ *
16
+ * Control is returned back to the generator when the yielded promise settles.
17
+ * This can lead to less verbose code when doing lots of sequential async calls
18
+ * with minimal processing in between.
19
+ *
20
+ * use GuzzleHttp\Promise;
21
+ *
22
+ * function createPromise($value) {
23
+ * return new Promise\FulfilledPromise($value);
24
+ * }
25
+ *
26
+ * $promise = Promise\Coroutine::of(function () {
27
+ * $value = (yield createPromise('a'));
28
+ * try {
29
+ * $value = (yield createPromise($value . 'b'));
30
+ * } catch (\Exception $e) {
31
+ * // The promise was rejected.
32
+ * }
33
+ * yield $value . 'c';
34
+ * });
35
+ *
36
+ * // Outputs "abc"
37
+ * $promise->then(function ($v) { echo $v; });
38
+ *
39
+ * @param callable $generatorFn Generator function to wrap into a promise.
40
+ *
41
+ * @return Promise
42
+ *
43
+ * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
44
+ */
45
+ final class Coroutine implements PromiseInterface
46
+ {
47
+ /**
48
+ * @var PromiseInterface|null
49
+ */
50
+ private $currentPromise;
51
+
52
+ /**
53
+ * @var Generator
54
+ */
55
+ private $generator;
56
+
57
+ /**
58
+ * @var Promise
59
+ */
60
+ private $result;
61
+
62
+ public function __construct(callable $generatorFn)
63
+ {
64
+ $this->generator = $generatorFn();
65
+ $this->result = new Promise(function () {
66
+ while (isset($this->currentPromise)) {
67
+ $this->currentPromise->wait();
68
+ }
69
+ });
70
+ try {
71
+ $this->nextCoroutine($this->generator->current());
72
+ } catch (\Exception $exception) {
73
+ $this->result->reject($exception);
74
+ } catch (Throwable $throwable) {
75
+ $this->result->reject($throwable);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Create a new coroutine.
81
+ *
82
+ * @return self
83
+ */
84
+ public static function of(callable $generatorFn)
85
+ {
86
+ return new self($generatorFn);
87
+ }
88
+
89
+ public function then(
90
+ callable $onFulfilled = null,
91
+ callable $onRejected = null
92
+ ) {
93
+ return $this->result->then($onFulfilled, $onRejected);
94
+ }
95
+
96
+ public function otherwise(callable $onRejected)
97
+ {
98
+ return $this->result->otherwise($onRejected);
99
+ }
100
+
101
+ public function wait($unwrap = true)
102
+ {
103
+ return $this->result->wait($unwrap);
104
+ }
105
+
106
+ public function getState()
107
+ {
108
+ return $this->result->getState();
109
+ }
110
+
111
+ public function resolve($value)
112
+ {
113
+ $this->result->resolve($value);
114
+ }
115
+
116
+ public function reject($reason)
117
+ {
118
+ $this->result->reject($reason);
119
+ }
120
+
121
+ public function cancel()
122
+ {
123
+ $this->currentPromise->cancel();
124
+ $this->result->cancel();
125
+ }
126
+
127
+ private function nextCoroutine($yielded)
128
+ {
129
+ $this->currentPromise = Create::promiseFor($yielded)
130
+ ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
131
+ }
132
+
133
+ /**
134
+ * @internal
135
+ */
136
+ public function _handleSuccess($value)
137
+ {
138
+ unset($this->currentPromise);
139
+ try {
140
+ $next = $this->generator->send($value);
141
+ if ($this->generator->valid()) {
142
+ $this->nextCoroutine($next);
143
+ } else {
144
+ $this->result->resolve($value);
145
+ }
146
+ } catch (Exception $exception) {
147
+ $this->result->reject($exception);
148
+ } catch (Throwable $throwable) {
149
+ $this->result->reject($throwable);
150
+ }
151
+ }
152
+
153
+ /**
154
+ * @internal
155
+ */
156
+ public function _handleFailure($reason)
157
+ {
158
+ unset($this->currentPromise);
159
+ try {
160
+ $nextYield = $this->generator->throw(Create::exceptionFor($reason));
161
+ // The throw was caught, so keep iterating on the coroutine
162
+ $this->nextCoroutine($nextYield);
163
+ } catch (Exception $exception) {
164
+ $this->result->reject($exception);
165
+ } catch (Throwable $throwable) {
166
+ $this->result->reject($throwable);
167
+ }
168
+ }
169
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Create.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Create
6
+ {
7
+ /**
8
+ * Creates a promise for a value if the value is not a promise.
9
+ *
10
+ * @param mixed $value Promise or value.
11
+ *
12
+ * @return PromiseInterface
13
+ */
14
+ public static function promiseFor($value)
15
+ {
16
+ if ($value instanceof PromiseInterface) {
17
+ return $value;
18
+ }
19
+
20
+ // Return a Guzzle promise that shadows the given promise.
21
+ if (is_object($value) && method_exists($value, 'then')) {
22
+ $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
23
+ $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
24
+ $promise = new Promise($wfn, $cfn);
25
+ $value->then([$promise, 'resolve'], [$promise, 'reject']);
26
+ return $promise;
27
+ }
28
+
29
+ return new FulfilledPromise($value);
30
+ }
31
+
32
+ /**
33
+ * Creates a rejected promise for a reason if the reason is not a promise.
34
+ * If the provided reason is a promise, then it is returned as-is.
35
+ *
36
+ * @param mixed $reason Promise or reason.
37
+ *
38
+ * @return PromiseInterface
39
+ */
40
+ public static function rejectionFor($reason)
41
+ {
42
+ if ($reason instanceof PromiseInterface) {
43
+ return $reason;
44
+ }
45
+
46
+ return new RejectedPromise($reason);
47
+ }
48
+
49
+ /**
50
+ * Create an exception for a rejected promise value.
51
+ *
52
+ * @param mixed $reason
53
+ *
54
+ * @return \Exception|\Throwable
55
+ */
56
+ public static function exceptionFor($reason)
57
+ {
58
+ if ($reason instanceof \Exception || $reason instanceof \Throwable) {
59
+ return $reason;
60
+ }
61
+
62
+ return new RejectionException($reason);
63
+ }
64
+
65
+ /**
66
+ * Returns an iterator for the given value.
67
+ *
68
+ * @param mixed $value
69
+ *
70
+ * @return \Iterator
71
+ */
72
+ public static function iterFor($value)
73
+ {
74
+ if ($value instanceof \Iterator) {
75
+ return $value;
76
+ }
77
+
78
+ if (is_array($value)) {
79
+ return new \ArrayIterator($value);
80
+ }
81
+
82
+ return new \ArrayIterator([$value]);
83
+ }
84
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Each.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Each
6
+ {
7
+ /**
8
+ * Given an iterator that yields promises or values, returns a promise that
9
+ * is fulfilled with a null value when the iterator has been consumed or
10
+ * the aggregate promise has been fulfilled or rejected.
11
+ *
12
+ * $onFulfilled is a function that accepts the fulfilled value, iterator
13
+ * index, and the aggregate promise. The callback can invoke any necessary
14
+ * side effects and choose to resolve or reject the aggregate if needed.
15
+ *
16
+ * $onRejected is a function that accepts the rejection reason, iterator
17
+ * index, and the aggregate promise. The callback can invoke any necessary
18
+ * side effects and choose to resolve or reject the aggregate if needed.
19
+ *
20
+ * @param mixed $iterable Iterator or array to iterate over.
21
+ * @param callable $onFulfilled
22
+ * @param callable $onRejected
23
+ *
24
+ * @return PromiseInterface
25
+ */
26
+ public static function of(
27
+ $iterable,
28
+ callable $onFulfilled = null,
29
+ callable $onRejected = null
30
+ ) {
31
+ return (new EachPromise($iterable, [
32
+ 'fulfilled' => $onFulfilled,
33
+ 'rejected' => $onRejected
34
+ ]))->promise();
35
+ }
36
+
37
+ /**
38
+ * Like of, but only allows a certain number of outstanding promises at any
39
+ * given time.
40
+ *
41
+ * $concurrency may be an integer or a function that accepts the number of
42
+ * pending promises and returns a numeric concurrency limit value to allow
43
+ * for dynamic a concurrency size.
44
+ *
45
+ * @param mixed $iterable
46
+ * @param int|callable $concurrency
47
+ * @param callable $onFulfilled
48
+ * @param callable $onRejected
49
+ *
50
+ * @return PromiseInterface
51
+ */
52
+ public static function ofLimit(
53
+ $iterable,
54
+ $concurrency,
55
+ callable $onFulfilled = null,
56
+ callable $onRejected = null
57
+ ) {
58
+ return (new EachPromise($iterable, [
59
+ 'fulfilled' => $onFulfilled,
60
+ 'rejected' => $onRejected,
61
+ 'concurrency' => $concurrency
62
+ ]))->promise();
63
+ }
64
+
65
+ /**
66
+ * Like limit, but ensures that no promise in the given $iterable argument
67
+ * is rejected. If any promise is rejected, then the aggregate promise is
68
+ * rejected with the encountered rejection.
69
+ *
70
+ * @param mixed $iterable
71
+ * @param int|callable $concurrency
72
+ * @param callable $onFulfilled
73
+ *
74
+ * @return PromiseInterface
75
+ */
76
+ public static function ofLimitAll(
77
+ $iterable,
78
+ $concurrency,
79
+ callable $onFulfilled = null
80
+ ) {
81
+ return each_limit(
82
+ $iterable,
83
+ $concurrency,
84
+ $onFulfilled,
85
+ function ($reason, $idx, PromiseInterface $aggregate) {
86
+ $aggregate->reject($reason);
87
+ }
88
+ );
89
+ }
90
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/EachPromise.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * Represents a promise that iterates over many promises and invokes
7
+ * side-effect functions in the process.
8
+ */
9
+ class EachPromise implements PromisorInterface
10
+ {
11
+ private $pending = [];
12
+
13
+ private $nextPendingIndex = 0;
14
+
15
+ /** @var \Iterator|null */
16
+ private $iterable;
17
+
18
+ /** @var callable|int|null */
19
+ private $concurrency;
20
+
21
+ /** @var callable|null */
22
+ private $onFulfilled;
23
+
24
+ /** @var callable|null */
25
+ private $onRejected;
26
+
27
+ /** @var Promise|null */
28
+ private $aggregate;
29
+
30
+ /** @var bool|null */
31
+ private $mutex;
32
+
33
+ /**
34
+ * Configuration hash can include the following key value pairs:
35
+ *
36
+ * - fulfilled: (callable) Invoked when a promise fulfills. The function
37
+ * is invoked with three arguments: the fulfillment value, the index
38
+ * position from the iterable list of the promise, and the aggregate
39
+ * promise that manages all of the promises. The aggregate promise may
40
+ * be resolved from within the callback to short-circuit the promise.
41
+ * - rejected: (callable) Invoked when a promise is rejected. The
42
+ * function is invoked with three arguments: the rejection reason, the
43
+ * index position from the iterable list of the promise, and the
44
+ * aggregate promise that manages all of the promises. The aggregate
45
+ * promise may be resolved from within the callback to short-circuit
46
+ * the promise.
47
+ * - concurrency: (integer) Pass this configuration option to limit the
48
+ * allowed number of outstanding concurrently executing promises,
49
+ * creating a capped pool of promises. There is no limit by default.
50
+ *
51
+ * @param mixed $iterable Promises or values to iterate.
52
+ * @param array $config Configuration options
53
+ */
54
+ public function __construct($iterable, array $config = [])
55
+ {
56
+ $this->iterable = Create::iterFor($iterable);
57
+
58
+ if (isset($config['concurrency'])) {
59
+ $this->concurrency = $config['concurrency'];
60
+ }
61
+
62
+ if (isset($config['fulfilled'])) {
63
+ $this->onFulfilled = $config['fulfilled'];
64
+ }
65
+
66
+ if (isset($config['rejected'])) {
67
+ $this->onRejected = $config['rejected'];
68
+ }
69
+ }
70
+
71
+ /** @psalm-suppress InvalidNullableReturnType */
72
+ public function promise()
73
+ {
74
+ if ($this->aggregate) {
75
+ return $this->aggregate;
76
+ }
77
+
78
+ try {
79
+ $this->createPromise();
80
+ /** @psalm-assert Promise $this->aggregate */
81
+ $this->iterable->rewind();
82
+ $this->refillPending();
83
+ } catch (\Throwable $e) {
84
+ $this->aggregate->reject($e);
85
+ } catch (\Exception $e) {
86
+ $this->aggregate->reject($e);
87
+ }
88
+
89
+ /**
90
+ * @psalm-suppress NullableReturnStatement
91
+ * @phpstan-ignore-next-line
92
+ */
93
+ return $this->aggregate;
94
+ }
95
+
96
+ private function createPromise()
97
+ {
98
+ $this->mutex = false;
99
+ $this->aggregate = new Promise(function () {
100
+ if ($this->checkIfFinished()) {
101
+ return;
102
+ }
103
+ reset($this->pending);
104
+ // Consume a potentially fluctuating list of promises while
105
+ // ensuring that indexes are maintained (precluding array_shift).
106
+ while ($promise = current($this->pending)) {
107
+ next($this->pending);
108
+ $promise->wait();
109
+ if (Is::settled($this->aggregate)) {
110
+ return;
111
+ }
112
+ }
113
+ });
114
+
115
+ // Clear the references when the promise is resolved.
116
+ $clearFn = function () {
117
+ $this->iterable = $this->concurrency = $this->pending = null;
118
+ $this->onFulfilled = $this->onRejected = null;
119
+ $this->nextPendingIndex = 0;
120
+ };
121
+
122
+ $this->aggregate->then($clearFn, $clearFn);
123
+ }
124
+
125
+ private function refillPending()
126
+ {
127
+ if (!$this->concurrency) {
128
+ // Add all pending promises.
129
+ while ($this->addPending() && $this->advanceIterator());
130
+ return;
131
+ }
132
+
133
+ // Add only up to N pending promises.
134
+ $concurrency = is_callable($this->concurrency)
135
+ ? call_user_func($this->concurrency, count($this->pending))
136
+ : $this->concurrency;
137
+ $concurrency = max($concurrency - count($this->pending), 0);
138
+ // Concurrency may be set to 0 to disallow new promises.
139
+ if (!$concurrency) {
140
+ return;
141
+ }
142
+ // Add the first pending promise.
143
+ $this->addPending();
144
+ // Note this is special handling for concurrency=1 so that we do
145
+ // not advance the iterator after adding the first promise. This
146
+ // helps work around issues with generators that might not have the
147
+ // next value to yield until promise callbacks are called.
148
+ while (--$concurrency
149
+ && $this->advanceIterator()
150
+ && $this->addPending());
151
+ }
152
+
153
+ private function addPending()
154
+ {
155
+ if (!$this->iterable || !$this->iterable->valid()) {
156
+ return false;
157
+ }
158
+
159
+ $promise = Create::promiseFor($this->iterable->current());
160
+ $key = $this->iterable->key();
161
+
162
+ // Iterable keys may not be unique, so we use a counter to
163
+ // guarantee uniqueness
164
+ $idx = $this->nextPendingIndex++;
165
+
166
+ $this->pending[$idx] = $promise->then(
167
+ function ($value) use ($idx, $key) {
168
+ if ($this->onFulfilled) {
169
+ call_user_func(
170
+ $this->onFulfilled,
171
+ $value,
172
+ $key,
173
+ $this->aggregate
174
+ );
175
+ }
176
+ $this->step($idx);
177
+ },
178
+ function ($reason) use ($idx, $key) {
179
+ if ($this->onRejected) {
180
+ call_user_func(
181
+ $this->onRejected,
182
+ $reason,
183
+ $key,
184
+ $this->aggregate
185
+ );
186
+ }
187
+ $this->step($idx);
188
+ }
189
+ );
190
+
191
+ return true;
192
+ }
193
+
194
+ private function advanceIterator()
195
+ {
196
+ // Place a lock on the iterator so that we ensure to not recurse,
197
+ // preventing fatal generator errors.
198
+ if ($this->mutex) {
199
+ return false;
200
+ }
201
+
202
+ $this->mutex = true;
203
+
204
+ try {
205
+ $this->iterable->next();
206
+ $this->mutex = false;
207
+ return true;
208
+ } catch (\Throwable $e) {
209
+ $this->aggregate->reject($e);
210
+ $this->mutex = false;
211
+ return false;
212
+ } catch (\Exception $e) {
213
+ $this->aggregate->reject($e);
214
+ $this->mutex = false;
215
+ return false;
216
+ }
217
+ }
218
+
219
+ private function step($idx)
220
+ {
221
+ // If the promise was already resolved, then ignore this step.
222
+ if (Is::settled($this->aggregate)) {
223
+ return;
224
+ }
225
+
226
+ unset($this->pending[$idx]);
227
+
228
+ // Only refill pending promises if we are not locked, preventing the
229
+ // EachPromise to recursively invoke the provided iterator, which
230
+ // cause a fatal error: "Cannot resume an already running generator"
231
+ if ($this->advanceIterator() && !$this->checkIfFinished()) {
232
+ // Add more pending promises if possible.
233
+ $this->refillPending();
234
+ }
235
+ }
236
+
237
+ private function checkIfFinished()
238
+ {
239
+ if (!$this->pending && !$this->iterable->valid()) {
240
+ // Resolve the promise if there's nothing left to do.
241
+ $this->aggregate->resolve(null);
242
+ return true;
243
+ }
244
+
245
+ return false;
246
+ }
247
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/FulfilledPromise.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * A promise that has been fulfilled.
7
+ *
8
+ * Thenning off of this promise will invoke the onFulfilled callback
9
+ * immediately and ignore other callbacks.
10
+ */
11
+ class FulfilledPromise implements PromiseInterface
12
+ {
13
+ private $value;
14
+
15
+ public function __construct($value)
16
+ {
17
+ if (is_object($value) && method_exists($value, 'then')) {
18
+ throw new \InvalidArgumentException(
19
+ 'You cannot create a FulfilledPromise with a promise.'
20
+ );
21
+ }
22
+
23
+ $this->value = $value;
24
+ }
25
+
26
+ public function then(
27
+ callable $onFulfilled = null,
28
+ callable $onRejected = null
29
+ ) {
30
+ // Return itself if there is no onFulfilled function.
31
+ if (!$onFulfilled) {
32
+ return $this;
33
+ }
34
+
35
+ $queue = Utils::queue();
36
+ $p = new Promise([$queue, 'run']);
37
+ $value = $this->value;
38
+ $queue->add(static function () use ($p, $value, $onFulfilled) {
39
+ if (Is::pending($p)) {
40
+ try {
41
+ $p->resolve($onFulfilled($value));
42
+ } catch (\Throwable $e) {
43
+ $p->reject($e);
44
+ } catch (\Exception $e) {
45
+ $p->reject($e);
46
+ }
47
+ }
48
+ });
49
+
50
+ return $p;
51
+ }
52
+
53
+ public function otherwise(callable $onRejected)
54
+ {
55
+ return $this->then(null, $onRejected);
56
+ }
57
+
58
+ public function wait($unwrap = true, $defaultDelivery = null)
59
+ {
60
+ return $unwrap ? $this->value : null;
61
+ }
62
+
63
+ public function getState()
64
+ {
65
+ return self::FULFILLED;
66
+ }
67
+
68
+ public function resolve($value)
69
+ {
70
+ if ($value !== $this->value) {
71
+ throw new \LogicException("Cannot resolve a fulfilled promise");
72
+ }
73
+ }
74
+
75
+ public function reject($reason)
76
+ {
77
+ throw new \LogicException("Cannot reject a fulfilled promise");
78
+ }
79
+
80
+ public function cancel()
81
+ {
82
+ // pass
83
+ }
84
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Is.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Is
6
+ {
7
+ /**
8
+ * Returns true if a promise is pending.
9
+ *
10
+ * @return bool
11
+ */
12
+ public static function pending(PromiseInterface $promise)
13
+ {
14
+ return $promise->getState() === PromiseInterface::PENDING;
15
+ }
16
+
17
+ /**
18
+ * Returns true if a promise is fulfilled or rejected.
19
+ *
20
+ * @return bool
21
+ */
22
+ public static function settled(PromiseInterface $promise)
23
+ {
24
+ return $promise->getState() !== PromiseInterface::PENDING;
25
+ }
26
+
27
+ /**
28
+ * Returns true if a promise is fulfilled.
29
+ *
30
+ * @return bool
31
+ */
32
+ public static function fulfilled(PromiseInterface $promise)
33
+ {
34
+ return $promise->getState() === PromiseInterface::FULFILLED;
35
+ }
36
+
37
+ /**
38
+ * Returns true if a promise is rejected.
39
+ *
40
+ * @return bool
41
+ */
42
+ public static function rejected(PromiseInterface $promise)
43
+ {
44
+ return $promise->getState() === PromiseInterface::REJECTED;
45
+ }
46
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Promise.php ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * Promises/A+ implementation that avoids recursion when possible.
7
+ *
8
+ * @link https://promisesaplus.com/
9
+ */
10
+ class Promise implements PromiseInterface
11
+ {
12
+ private $state = self::PENDING;
13
+ private $result;
14
+ private $cancelFn;
15
+ private $waitFn;
16
+ private $waitList;
17
+ private $handlers = [];
18
+
19
+ /**
20
+ * @param callable $waitFn Fn that when invoked resolves the promise.
21
+ * @param callable $cancelFn Fn that when invoked cancels the promise.
22
+ */
23
+ public function __construct(
24
+ callable $waitFn = null,
25
+ callable $cancelFn = null
26
+ ) {
27
+ $this->waitFn = $waitFn;
28
+ $this->cancelFn = $cancelFn;
29
+ }
30
+
31
+ public function then(
32
+ callable $onFulfilled = null,
33
+ callable $onRejected = null
34
+ ) {
35
+ if ($this->state === self::PENDING) {
36
+ $p = new Promise(null, [$this, 'cancel']);
37
+ $this->handlers[] = [$p, $onFulfilled, $onRejected];
38
+ $p->waitList = $this->waitList;
39
+ $p->waitList[] = $this;
40
+ return $p;
41
+ }
42
+
43
+ // Return a fulfilled promise and immediately invoke any callbacks.
44
+ if ($this->state === self::FULFILLED) {
45
+ $promise = Create::promiseFor($this->result);
46
+ return $onFulfilled ? $promise->then($onFulfilled) : $promise;
47
+ }
48
+
49
+ // It's either cancelled or rejected, so return a rejected promise
50
+ // and immediately invoke any callbacks.
51
+ $rejection = Create::rejectionFor($this->result);
52
+ return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
53
+ }
54
+
55
+ public function otherwise(callable $onRejected)
56
+ {
57
+ return $this->then(null, $onRejected);
58
+ }
59
+
60
+ public function wait($unwrap = true)
61
+ {
62
+ $this->waitIfPending();
63
+
64
+ if ($this->result instanceof PromiseInterface) {
65
+ return $this->result->wait($unwrap);
66
+ }
67
+ if ($unwrap) {
68
+ if ($this->state === self::FULFILLED) {
69
+ return $this->result;
70
+ }
71
+ // It's rejected so "unwrap" and throw an exception.
72
+ throw Create::exceptionFor($this->result);
73
+ }
74
+ }
75
+
76
+ public function getState()
77
+ {
78
+ return $this->state;
79
+ }
80
+
81
+ public function cancel()
82
+ {
83
+ if ($this->state !== self::PENDING) {
84
+ return;
85
+ }
86
+
87
+ $this->waitFn = $this->waitList = null;
88
+
89
+ if ($this->cancelFn) {
90
+ $fn = $this->cancelFn;
91
+ $this->cancelFn = null;
92
+ try {
93
+ $fn();
94
+ } catch (\Throwable $e) {
95
+ $this->reject($e);
96
+ } catch (\Exception $e) {
97
+ $this->reject($e);
98
+ }
99
+ }
100
+
101
+ // Reject the promise only if it wasn't rejected in a then callback.
102
+ /** @psalm-suppress RedundantCondition */
103
+ if ($this->state === self::PENDING) {
104
+ $this->reject(new CancellationException('Promise has been cancelled'));
105
+ }
106
+ }
107
+
108
+ public function resolve($value)
109
+ {
110
+ $this->settle(self::FULFILLED, $value);
111
+ }
112
+
113
+ public function reject($reason)
114
+ {
115
+ $this->settle(self::REJECTED, $reason);
116
+ }
117
+
118
+ private function settle($state, $value)
119
+ {
120
+ if ($this->state !== self::PENDING) {
121
+ // Ignore calls with the same resolution.
122
+ if ($state === $this->state && $value === $this->result) {
123
+ return;
124
+ }
125
+ throw $this->state === $state
126
+ ? new \LogicException("The promise is already {$state}.")
127
+ : new \LogicException("Cannot change a {$this->state} promise to {$state}");
128
+ }
129
+
130
+ if ($value === $this) {
131
+ throw new \LogicException('Cannot fulfill or reject a promise with itself');
132
+ }
133
+
134
+ // Clear out the state of the promise but stash the handlers.
135
+ $this->state = $state;
136
+ $this->result = $value;
137
+ $handlers = $this->handlers;
138
+ $this->handlers = null;
139
+ $this->waitList = $this->waitFn = null;
140
+ $this->cancelFn = null;
141
+
142
+ if (!$handlers) {
143
+ return;
144
+ }
145
+
146
+ // If the value was not a settled promise or a thenable, then resolve
147
+ // it in the task queue using the correct ID.
148
+ if (!is_object($value) || !method_exists($value, 'then')) {
149
+ $id = $state === self::FULFILLED ? 1 : 2;
150
+ // It's a success, so resolve the handlers in the queue.
151
+ Utils::queue()->add(static function () use ($id, $value, $handlers) {
152
+ foreach ($handlers as $handler) {
153
+ self::callHandler($id, $value, $handler);
154
+ }
155
+ });
156
+ } elseif ($value instanceof Promise && Is::pending($value)) {
157
+ // We can just merge our handlers onto the next promise.
158
+ $value->handlers = array_merge($value->handlers, $handlers);
159
+ } else {
160
+ // Resolve the handlers when the forwarded promise is resolved.
161
+ $value->then(
162
+ static function ($value) use ($handlers) {
163
+ foreach ($handlers as $handler) {
164
+ self::callHandler(1, $value, $handler);
165
+ }
166
+ },
167
+ static function ($reason) use ($handlers) {
168
+ foreach ($handlers as $handler) {
169
+ self::callHandler(2, $reason, $handler);
170
+ }
171
+ }
172
+ );
173
+ }
174
+ }
175
+
176
+ /**
177
+ * Call a stack of handlers using a specific callback index and value.
178
+ *
179
+ * @param int $index 1 (resolve) or 2 (reject).
180
+ * @param mixed $value Value to pass to the callback.
181
+ * @param array $handler Array of handler data (promise and callbacks).
182
+ */
183
+ private static function callHandler($index, $value, array $handler)
184
+ {
185
+ /** @var PromiseInterface $promise */
186
+ $promise = $handler[0];
187
+
188
+ // The promise may have been cancelled or resolved before placing
189
+ // this thunk in the queue.
190
+ if (Is::settled($promise)) {
191
+ return;
192
+ }
193
+
194
+ try {
195
+ if (isset($handler[$index])) {
196
+ /*
197
+ * If $f throws an exception, then $handler will be in the exception
198
+ * stack trace. Since $handler contains a reference to the callable
199
+ * itself we get a circular reference. We clear the $handler
200
+ * here to avoid that memory leak.
201
+ */
202
+ $f = $handler[$index];
203
+ unset($handler);
204
+ $promise->resolve($f($value));
205
+ } elseif ($index === 1) {
206
+ // Forward resolution values as-is.
207
+ $promise->resolve($value);
208
+ } else {
209
+ // Forward rejections down the chain.
210
+ $promise->reject($value);
211
+ }
212
+ } catch (\Throwable $reason) {
213
+ $promise->reject($reason);
214
+ } catch (\Exception $reason) {
215
+ $promise->reject($reason);
216
+ }
217
+ }
218
+
219
+ private function waitIfPending()
220
+ {
221
+ if ($this->state !== self::PENDING) {
222
+ return;
223
+ } elseif ($this->waitFn) {
224
+ $this->invokeWaitFn();
225
+ } elseif ($this->waitList) {
226
+ $this->invokeWaitList();
227
+ } else {
228
+ // If there's no wait function, then reject the promise.
229
+ $this->reject('Cannot wait on a promise that has '
230
+ . 'no internal wait function. You must provide a wait '
231
+ . 'function when constructing the promise to be able to '
232
+ . 'wait on a promise.');
233
+ }
234
+
235
+ Utils::queue()->run();
236
+
237
+ /** @psalm-suppress RedundantCondition */
238
+ if ($this->state === self::PENDING) {
239
+ $this->reject('Invoking the wait callback did not resolve the promise');
240
+ }
241
+ }
242
+
243
+ private function invokeWaitFn()
244
+ {
245
+ try {
246
+ $wfn = $this->waitFn;
247
+ $this->waitFn = null;
248
+ $wfn(true);
249
+ } catch (\Exception $reason) {
250
+ if ($this->state === self::PENDING) {
251
+ // The promise has not been resolved yet, so reject the promise
252
+ // with the exception.
253
+ $this->reject($reason);
254
+ } else {
255
+ // The promise was already resolved, so there's a problem in
256
+ // the application.
257
+ throw $reason;
258
+ }
259
+ }
260
+ }
261
+
262
+ private function invokeWaitList()
263
+ {
264
+ $waitList = $this->waitList;
265
+ $this->waitList = null;
266
+
267
+ foreach ($waitList as $result) {
268
+ do {
269
+ $result->waitIfPending();
270
+ $result = $result->result;
271
+ } while ($result instanceof Promise);
272
+
273
+ if ($result instanceof PromiseInterface) {
274
+ $result->wait(false);
275
+ }
276
+ }
277
+ }
278
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/PromiseInterface.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * A promise represents the eventual result of an asynchronous operation.
7
+ *
8
+ * The primary way of interacting with a promise is through its then method,
9
+ * which registers callbacks to receive either a promise’s eventual value or
10
+ * the reason why the promise cannot be fulfilled.
11
+ *
12
+ * @link https://promisesaplus.com/
13
+ */
14
+ interface PromiseInterface
15
+ {
16
+ const PENDING = 'pending';
17
+ const FULFILLED = 'fulfilled';
18
+ const REJECTED = 'rejected';
19
+
20
+ /**
21
+ * Appends fulfillment and rejection handlers to the promise, and returns
22
+ * a new promise resolving to the return value of the called handler.
23
+ *
24
+ * @param callable $onFulfilled Invoked when the promise fulfills.
25
+ * @param callable $onRejected Invoked when the promise is rejected.
26
+ *
27
+ * @return PromiseInterface
28
+ */
29
+ public function then(
30
+ callable $onFulfilled = null,
31
+ callable $onRejected = null
32
+ );
33
+
34
+ /**
35
+ * Appends a rejection handler callback to the promise, and returns a new
36
+ * promise resolving to the return value of the callback if it is called,
37
+ * or to its original fulfillment value if the promise is instead
38
+ * fulfilled.
39
+ *
40
+ * @param callable $onRejected Invoked when the promise is rejected.
41
+ *
42
+ * @return PromiseInterface
43
+ */
44
+ public function otherwise(callable $onRejected);
45
+
46
+ /**
47
+ * Get the state of the promise ("pending", "rejected", or "fulfilled").
48
+ *
49
+ * The three states can be checked against the constants defined on
50
+ * PromiseInterface: PENDING, FULFILLED, and REJECTED.
51
+ *
52
+ * @return string
53
+ */
54
+ public function getState();
55
+
56
+ /**
57
+ * Resolve the promise with the given value.
58
+ *
59
+ * @param mixed $value
60
+ *
61
+ * @throws \RuntimeException if the promise is already resolved.
62
+ */
63
+ public function resolve($value);
64
+
65
+ /**
66
+ * Reject the promise with the given reason.
67
+ *
68
+ * @param mixed $reason
69
+ *
70
+ * @throws \RuntimeException if the promise is already resolved.
71
+ */
72
+ public function reject($reason);
73
+
74
+ /**
75
+ * Cancels the promise if possible.
76
+ *
77
+ * @link https://github.com/promises-aplus/cancellation-spec/issues/7
78
+ */
79
+ public function cancel();
80
+
81
+ /**
82
+ * Waits until the promise completes if possible.
83
+ *
84
+ * Pass $unwrap as true to unwrap the result of the promise, either
85
+ * returning the resolved value or throwing the rejected exception.
86
+ *
87
+ * If the promise cannot be waited on, then the promise will be rejected.
88
+ *
89
+ * @param bool $unwrap
90
+ *
91
+ * @return mixed
92
+ *
93
+ * @throws \LogicException if the promise has no wait function or if the
94
+ * promise does not settle after waiting.
95
+ */
96
+ public function wait($unwrap = true);
97
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/PromisorInterface.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * Interface used with classes that return a promise.
7
+ */
8
+ interface PromisorInterface
9
+ {
10
+ /**
11
+ * Returns a promise.
12
+ *
13
+ * @return PromiseInterface
14
+ */
15
+ public function promise();
16
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/RejectedPromise.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * A promise that has been rejected.
7
+ *
8
+ * Thenning off of this promise will invoke the onRejected callback
9
+ * immediately and ignore other callbacks.
10
+ */
11
+ class RejectedPromise implements PromiseInterface
12
+ {
13
+ private $reason;
14
+
15
+ public function __construct($reason)
16
+ {
17
+ if (is_object($reason) && method_exists($reason, 'then')) {
18
+ throw new \InvalidArgumentException(
19
+ 'You cannot create a RejectedPromise with a promise.'
20
+ );
21
+ }
22
+
23
+ $this->reason = $reason;
24
+ }
25
+
26
+ public function then(
27
+ callable $onFulfilled = null,
28
+ callable $onRejected = null
29
+ ) {
30
+ // If there's no onRejected callback then just return self.
31
+ if (!$onRejected) {
32
+ return $this;
33
+ }
34
+
35
+ $queue = Utils::queue();
36
+ $reason = $this->reason;
37
+ $p = new Promise([$queue, 'run']);
38
+ $queue->add(static function () use ($p, $reason, $onRejected) {
39
+ if (Is::pending($p)) {
40
+ try {
41
+ // Return a resolved promise if onRejected does not throw.
42
+ $p->resolve($onRejected($reason));
43
+ } catch (\Throwable $e) {
44
+ // onRejected threw, so return a rejected promise.
45
+ $p->reject($e);
46
+ } catch (\Exception $e) {
47
+ // onRejected threw, so return a rejected promise.
48
+ $p->reject($e);
49
+ }
50
+ }
51
+ });
52
+
53
+ return $p;
54
+ }
55
+
56
+ public function otherwise(callable $onRejected)
57
+ {
58
+ return $this->then(null, $onRejected);
59
+ }
60
+
61
+ public function wait($unwrap = true, $defaultDelivery = null)
62
+ {
63
+ if ($unwrap) {
64
+ throw Create::exceptionFor($this->reason);
65
+ }
66
+
67
+ return null;
68
+ }
69
+
70
+ public function getState()
71
+ {
72
+ return self::REJECTED;
73
+ }
74
+
75
+ public function resolve($value)
76
+ {
77
+ throw new \LogicException("Cannot resolve a rejected promise");
78
+ }
79
+
80
+ public function reject($reason)
81
+ {
82
+ if ($reason !== $this->reason) {
83
+ throw new \LogicException("Cannot reject a rejected promise");
84
+ }
85
+ }
86
+
87
+ public function cancel()
88
+ {
89
+ // pass
90
+ }
91
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/RejectionException.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * A special exception that is thrown when waiting on a rejected promise.
7
+ *
8
+ * The reason value is available via the getReason() method.
9
+ */
10
+ class RejectionException extends \RuntimeException
11
+ {
12
+ /** @var mixed Rejection reason. */
13
+ private $reason;
14
+
15
+ /**
16
+ * @param mixed $reason Rejection reason.
17
+ * @param string $description Optional description
18
+ */
19
+ public function __construct($reason, $description = null)
20
+ {
21
+ $this->reason = $reason;
22
+
23
+ $message = 'The promise was rejected';
24
+
25
+ if ($description) {
26
+ $message .= ' with reason: ' . $description;
27
+ } elseif (is_string($reason)
28
+ || (is_object($reason) && method_exists($reason, '__toString'))
29
+ ) {
30
+ $message .= ' with reason: ' . $this->reason;
31
+ } elseif ($reason instanceof \JsonSerializable) {
32
+ $message .= ' with reason: '
33
+ . json_encode($this->reason, JSON_PRETTY_PRINT);
34
+ }
35
+
36
+ parent::__construct($message);
37
+ }
38
+
39
+ /**
40
+ * Returns the rejection reason.
41
+ *
42
+ * @return mixed
43
+ */
44
+ public function getReason()
45
+ {
46
+ return $this->reason;
47
+ }
48
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/TaskQueue.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * A task queue that executes tasks in a FIFO order.
7
+ *
8
+ * This task queue class is used to settle promises asynchronously and
9
+ * maintains a constant stack size. You can use the task queue asynchronously
10
+ * by calling the `run()` function of the global task queue in an event loop.
11
+ *
12
+ * GuzzleHttp\Promise\Utils::queue()->run();
13
+ */
14
+ class TaskQueue implements TaskQueueInterface
15
+ {
16
+ private $enableShutdown = true;
17
+ private $queue = [];
18
+
19
+ public function __construct($withShutdown = true)
20
+ {
21
+ if ($withShutdown) {
22
+ register_shutdown_function(function () {
23
+ if ($this->enableShutdown) {
24
+ // Only run the tasks if an E_ERROR didn't occur.
25
+ $err = error_get_last();
26
+ if (!$err || ($err['type'] ^ E_ERROR)) {
27
+ $this->run();
28
+ }
29
+ }
30
+ });
31
+ }
32
+ }
33
+
34
+ public function isEmpty()
35
+ {
36
+ return !$this->queue;
37
+ }
38
+
39
+ public function add(callable $task)
40
+ {
41
+ $this->queue[] = $task;
42
+ }
43
+
44
+ public function run()
45
+ {
46
+ while ($task = array_shift($this->queue)) {
47
+ /** @var callable $task */
48
+ $task();
49
+ }
50
+ }
51
+
52
+ /**
53
+ * The task queue will be run and exhausted by default when the process
54
+ * exits IFF the exit is not the result of a PHP E_ERROR error.
55
+ *
56
+ * You can disable running the automatic shutdown of the queue by calling
57
+ * this function. If you disable the task queue shutdown process, then you
58
+ * MUST either run the task queue (as a result of running your event loop
59
+ * or manually using the run() method) or wait on each outstanding promise.
60
+ *
61
+ * Note: This shutdown will occur before any destructors are triggered.
62
+ */
63
+ public function disableShutdown()
64
+ {
65
+ $this->enableShutdown = false;
66
+ }
67
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/TaskQueueInterface.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ interface TaskQueueInterface
6
+ {
7
+ /**
8
+ * Returns true if the queue is empty.
9
+ *
10
+ * @return bool
11
+ */
12
+ public function isEmpty();
13
+
14
+ /**
15
+ * Adds a task to the queue that will be executed the next time run is
16
+ * called.
17
+ */
18
+ public function add(callable $task);
19
+
20
+ /**
21
+ * Execute all of the pending task in the queue.
22
+ */
23
+ public function run();
24
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/Utils.php ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Utils
6
+ {
7
+ /**
8
+ * Get the global task queue used for promise resolution.
9
+ *
10
+ * This task queue MUST be run in an event loop in order for promises to be
11
+ * settled asynchronously. It will be automatically run when synchronously
12
+ * waiting on a promise.
13
+ *
14
+ * <code>
15
+ * while ($eventLoop->isRunning()) {
16
+ * GuzzleHttp\Promise\Utils::queue()->run();
17
+ * }
18
+ * </code>
19
+ *
20
+ * @param TaskQueueInterface $assign Optionally specify a new queue instance.
21
+ *
22
+ * @return TaskQueueInterface
23
+ */
24
+ public static function queue(TaskQueueInterface $assign = null)
25
+ {
26
+ static $queue;
27
+
28
+ if ($assign) {
29
+ $queue = $assign;
30
+ } elseif (!$queue) {
31
+ $queue = new TaskQueue();
32
+ }
33
+
34
+ return $queue;
35
+ }
36
+
37
+ /**
38
+ * Adds a function to run in the task queue when it is next `run()` and
39
+ * returns a promise that is fulfilled or rejected with the result.
40
+ *
41
+ * @param callable $task Task function to run.
42
+ *
43
+ * @return PromiseInterface
44
+ */
45
+ public static function task(callable $task)
46
+ {
47
+ $queue = self::queue();
48
+ $promise = new Promise([$queue, 'run']);
49
+ $queue->add(function () use ($task, $promise) {
50
+ try {
51
+ if (Is::pending($promise)) {
52
+ $promise->resolve($task());
53
+ }
54
+ } catch (\Throwable $e) {
55
+ $promise->reject($e);
56
+ } catch (\Exception $e) {
57
+ $promise->reject($e);
58
+ }
59
+ });
60
+
61
+ return $promise;
62
+ }
63
+
64
+ /**
65
+ * Synchronously waits on a promise to resolve and returns an inspection
66
+ * state array.
67
+ *
68
+ * Returns a state associative array containing a "state" key mapping to a
69
+ * valid promise state. If the state of the promise is "fulfilled", the
70
+ * array will contain a "value" key mapping to the fulfilled value of the
71
+ * promise. If the promise is rejected, the array will contain a "reason"
72
+ * key mapping to the rejection reason of the promise.
73
+ *
74
+ * @param PromiseInterface $promise Promise or value.
75
+ *
76
+ * @return array
77
+ */
78
+ public static function inspect(PromiseInterface $promise)
79
+ {
80
+ try {
81
+ return [
82
+ 'state' => PromiseInterface::FULFILLED,
83
+ 'value' => $promise->wait()
84
+ ];
85
+ } catch (RejectionException $e) {
86
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
87
+ } catch (\Throwable $e) {
88
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
89
+ } catch (\Exception $e) {
90
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Waits on all of the provided promises, but does not unwrap rejected
96
+ * promises as thrown exception.
97
+ *
98
+ * Returns an array of inspection state arrays.
99
+ *
100
+ * @see inspect for the inspection state array format.
101
+ *
102
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
103
+ *
104
+ * @return array
105
+ */
106
+ public static function inspectAll($promises)
107
+ {
108
+ $results = [];
109
+ foreach ($promises as $key => $promise) {
110
+ $results[$key] = inspect($promise);
111
+ }
112
+
113
+ return $results;
114
+ }
115
+
116
+ /**
117
+ * Waits on all of the provided promises and returns the fulfilled values.
118
+ *
119
+ * Returns an array that contains the value of each promise (in the same
120
+ * order the promises were provided). An exception is thrown if any of the
121
+ * promises are rejected.
122
+ *
123
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
124
+ *
125
+ * @return array
126
+ *
127
+ * @throws \Exception on error
128
+ * @throws \Throwable on error in PHP >=7
129
+ */
130
+ public static function unwrap($promises)
131
+ {
132
+ $results = [];
133
+ foreach ($promises as $key => $promise) {
134
+ $results[$key] = $promise->wait();
135
+ }
136
+
137
+ return $results;
138
+ }
139
+
140
+ /**
141
+ * Given an array of promises, return a promise that is fulfilled when all
142
+ * the items in the array are fulfilled.
143
+ *
144
+ * The promise's fulfillment value is an array with fulfillment values at
145
+ * respective positions to the original array. If any promise in the array
146
+ * rejects, the returned promise is rejected with the rejection reason.
147
+ *
148
+ * @param mixed $promises Promises or values.
149
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
150
+ *
151
+ * @return PromiseInterface
152
+ */
153
+ public static function all($promises, $recursive = false)
154
+ {
155
+ $results = [];
156
+ $promise = Each::of(
157
+ $promises,
158
+ function ($value, $idx) use (&$results) {
159
+ $results[$idx] = $value;
160
+ },
161
+ function ($reason, $idx, Promise $aggregate) {
162
+ $aggregate->reject($reason);
163
+ }
164
+ )->then(function () use (&$results) {
165
+ ksort($results);
166
+ return $results;
167
+ });
168
+
169
+ if (true === $recursive) {
170
+ $promise = $promise->then(function ($results) use ($recursive, &$promises) {
171
+ foreach ($promises as $promise) {
172
+ if (Is::pending($promise)) {
173
+ return self::all($promises, $recursive);
174
+ }
175
+ }
176
+ return $results;
177
+ });
178
+ }
179
+
180
+ return $promise;
181
+ }
182
+
183
+ /**
184
+ * Initiate a competitive race between multiple promises or values (values
185
+ * will become immediately fulfilled promises).
186
+ *
187
+ * When count amount of promises have been fulfilled, the returned promise
188
+ * is fulfilled with an array that contains the fulfillment values of the
189
+ * winners in order of resolution.
190
+ *
191
+ * This promise is rejected with a {@see AggregateException} if the number
192
+ * of fulfilled promises is less than the desired $count.
193
+ *
194
+ * @param int $count Total number of promises.
195
+ * @param mixed $promises Promises or values.
196
+ *
197
+ * @return PromiseInterface
198
+ */
199
+ public static function some($count, $promises)
200
+ {
201
+ $results = [];
202
+ $rejections = [];
203
+
204
+ return Each::of(
205
+ $promises,
206
+ function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
207
+ if (Is::settled($p)) {
208
+ return;
209
+ }
210
+ $results[$idx] = $value;
211
+ if (count($results) >= $count) {
212
+ $p->resolve(null);
213
+ }
214
+ },
215
+ function ($reason) use (&$rejections) {
216
+ $rejections[] = $reason;
217
+ }
218
+ )->then(
219
+ function () use (&$results, &$rejections, $count) {
220
+ if (count($results) !== $count) {
221
+ throw new AggregateException(
222
+ 'Not enough promises to fulfill count',
223
+ $rejections
224
+ );
225
+ }
226
+ ksort($results);
227
+ return array_values($results);
228
+ }
229
+ );
230
+ }
231
+
232
+ /**
233
+ * Like some(), with 1 as count. However, if the promise fulfills, the
234
+ * fulfillment value is not an array of 1 but the value directly.
235
+ *
236
+ * @param mixed $promises Promises or values.
237
+ *
238
+ * @return PromiseInterface
239
+ */
240
+ public static function any($promises)
241
+ {
242
+ return self::some(1, $promises)->then(function ($values) {
243
+ return $values[0];
244
+ });
245
+ }
246
+
247
+ /**
248
+ * Returns a promise that is fulfilled when all of the provided promises have
249
+ * been fulfilled or rejected.
250
+ *
251
+ * The returned promise is fulfilled with an array of inspection state arrays.
252
+ *
253
+ * @see inspect for the inspection state array format.
254
+ *
255
+ * @param mixed $promises Promises or values.
256
+ *
257
+ * @return PromiseInterface
258
+ */
259
+ public static function settle($promises)
260
+ {
261
+ $results = [];
262
+
263
+ return Each::of(
264
+ $promises,
265
+ function ($value, $idx) use (&$results) {
266
+ $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
267
+ },
268
+ function ($reason, $idx) use (&$results) {
269
+ $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
270
+ }
271
+ )->then(function () use (&$results) {
272
+ ksort($results);
273
+ return $results;
274
+ });
275
+ }
276
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/functions.php ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ /**
6
+ * Get the global task queue used for promise resolution.
7
+ *
8
+ * This task queue MUST be run in an event loop in order for promises to be
9
+ * settled asynchronously. It will be automatically run when synchronously
10
+ * waiting on a promise.
11
+ *
12
+ * <code>
13
+ * while ($eventLoop->isRunning()) {
14
+ * GuzzleHttp\Promise\queue()->run();
15
+ * }
16
+ * </code>
17
+ *
18
+ * @param TaskQueueInterface $assign Optionally specify a new queue instance.
19
+ *
20
+ * @return TaskQueueInterface
21
+ *
22
+ * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
23
+ */
24
+ function queue(TaskQueueInterface $assign = null)
25
+ {
26
+ return Utils::queue($assign);
27
+ }
28
+
29
+ /**
30
+ * Adds a function to run in the task queue when it is next `run()` and returns
31
+ * a promise that is fulfilled or rejected with the result.
32
+ *
33
+ * @param callable $task Task function to run.
34
+ *
35
+ * @return PromiseInterface
36
+ *
37
+ * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
38
+ */
39
+ function task(callable $task)
40
+ {
41
+ return Utils::task($task);
42
+ }
43
+
44
+ /**
45
+ * Creates a promise for a value if the value is not a promise.
46
+ *
47
+ * @param mixed $value Promise or value.
48
+ *
49
+ * @return PromiseInterface
50
+ *
51
+ * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
52
+ */
53
+ function promise_for($value)
54
+ {
55
+ return Create::promiseFor($value);
56
+ }
57
+
58
+ /**
59
+ * Creates a rejected promise for a reason if the reason is not a promise. If
60
+ * the provided reason is a promise, then it is returned as-is.
61
+ *
62
+ * @param mixed $reason Promise or reason.
63
+ *
64
+ * @return PromiseInterface
65
+ *
66
+ * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
67
+ */
68
+ function rejection_for($reason)
69
+ {
70
+ return Create::rejectionFor($reason);
71
+ }
72
+
73
+ /**
74
+ * Create an exception for a rejected promise value.
75
+ *
76
+ * @param mixed $reason
77
+ *
78
+ * @return \Exception|\Throwable
79
+ *
80
+ * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
81
+ */
82
+ function exception_for($reason)
83
+ {
84
+ return Create::exceptionFor($reason);
85
+ }
86
+
87
+ /**
88
+ * Returns an iterator for the given value.
89
+ *
90
+ * @param mixed $value
91
+ *
92
+ * @return \Iterator
93
+ *
94
+ * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
95
+ */
96
+ function iter_for($value)
97
+ {
98
+ return Create::iterFor($value);
99
+ }
100
+
101
+ /**
102
+ * Synchronously waits on a promise to resolve and returns an inspection state
103
+ * array.
104
+ *
105
+ * Returns a state associative array containing a "state" key mapping to a
106
+ * valid promise state. If the state of the promise is "fulfilled", the array
107
+ * will contain a "value" key mapping to the fulfilled value of the promise. If
108
+ * the promise is rejected, the array will contain a "reason" key mapping to
109
+ * the rejection reason of the promise.
110
+ *
111
+ * @param PromiseInterface $promise Promise or value.
112
+ *
113
+ * @return array
114
+ *
115
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
116
+ */
117
+ function inspect(PromiseInterface $promise)
118
+ {
119
+ return Utils::inspect($promise);
120
+ }
121
+
122
+ /**
123
+ * Waits on all of the provided promises, but does not unwrap rejected promises
124
+ * as thrown exception.
125
+ *
126
+ * Returns an array of inspection state arrays.
127
+ *
128
+ * @see inspect for the inspection state array format.
129
+ *
130
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
131
+ *
132
+ * @return array
133
+ *
134
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead.
135
+ */
136
+ function inspect_all($promises)
137
+ {
138
+ return Utils::inspectAll($promises);
139
+ }
140
+
141
+ /**
142
+ * Waits on all of the provided promises and returns the fulfilled values.
143
+ *
144
+ * Returns an array that contains the value of each promise (in the same order
145
+ * the promises were provided). An exception is thrown if any of the promises
146
+ * are rejected.
147
+ *
148
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
149
+ *
150
+ * @return array
151
+ *
152
+ * @throws \Exception on error
153
+ * @throws \Throwable on error in PHP >=7
154
+ *
155
+ * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead.
156
+ */
157
+ function unwrap($promises)
158
+ {
159
+ return Utils::unwrap($promises);
160
+ }
161
+
162
+ /**
163
+ * Given an array of promises, return a promise that is fulfilled when all the
164
+ * items in the array are fulfilled.
165
+ *
166
+ * The promise's fulfillment value is an array with fulfillment values at
167
+ * respective positions to the original array. If any promise in the array
168
+ * rejects, the returned promise is rejected with the rejection reason.
169
+ *
170
+ * @param mixed $promises Promises or values.
171
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
172
+ *
173
+ * @return PromiseInterface
174
+ *
175
+ * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead.
176
+ */
177
+ function all($promises, $recursive = false)
178
+ {
179
+ return Utils::all($promises, $recursive);
180
+ }
181
+
182
+ /**
183
+ * Initiate a competitive race between multiple promises or values (values will
184
+ * become immediately fulfilled promises).
185
+ *
186
+ * When count amount of promises have been fulfilled, the returned promise is
187
+ * fulfilled with an array that contains the fulfillment values of the winners
188
+ * in order of resolution.
189
+ *
190
+ * This promise is rejected with a {@see AggregateException} if the number of
191
+ * fulfilled promises is less than the desired $count.
192
+ *
193
+ * @param int $count Total number of promises.
194
+ * @param mixed $promises Promises or values.
195
+ *
196
+ * @return PromiseInterface
197
+ *
198
+ * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
199
+ */
200
+ function some($count, $promises)
201
+ {
202
+ return Utils::some($count, $promises);
203
+ }
204
+
205
+ /**
206
+ * Like some(), with 1 as count. However, if the promise fulfills, the
207
+ * fulfillment value is not an array of 1 but the value directly.
208
+ *
209
+ * @param mixed $promises Promises or values.
210
+ *
211
+ * @return PromiseInterface
212
+ *
213
+ * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
214
+ */
215
+ function any($promises)
216
+ {
217
+ return Utils::any($promises);
218
+ }
219
+
220
+ /**
221
+ * Returns a promise that is fulfilled when all of the provided promises have
222
+ * been fulfilled or rejected.
223
+ *
224
+ * The returned promise is fulfilled with an array of inspection state arrays.
225
+ *
226
+ * @see inspect for the inspection state array format.
227
+ *
228
+ * @param mixed $promises Promises or values.
229
+ *
230
+ * @return PromiseInterface
231
+ *
232
+ * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead.
233
+ */
234
+ function settle($promises)
235
+ {
236
+ return Utils::settle($promises);
237
+ }
238
+
239
+ /**
240
+ * Given an iterator that yields promises or values, returns a promise that is
241
+ * fulfilled with a null value when the iterator has been consumed or the
242
+ * aggregate promise has been fulfilled or rejected.
243
+ *
244
+ * $onFulfilled is a function that accepts the fulfilled value, iterator index,
245
+ * and the aggregate promise. The callback can invoke any necessary side
246
+ * effects and choose to resolve or reject the aggregate if needed.
247
+ *
248
+ * $onRejected is a function that accepts the rejection reason, iterator index,
249
+ * and the aggregate promise. The callback can invoke any necessary side
250
+ * effects and choose to resolve or reject the aggregate if needed.
251
+ *
252
+ * @param mixed $iterable Iterator or array to iterate over.
253
+ * @param callable $onFulfilled
254
+ * @param callable $onRejected
255
+ *
256
+ * @return PromiseInterface
257
+ *
258
+ * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
259
+ */
260
+ function each(
261
+ $iterable,
262
+ callable $onFulfilled = null,
263
+ callable $onRejected = null
264
+ ) {
265
+ return Each::of($iterable, $onFulfilled, $onRejected);
266
+ }
267
+
268
+ /**
269
+ * Like each, but only allows a certain number of outstanding promises at any
270
+ * given time.
271
+ *
272
+ * $concurrency may be an integer or a function that accepts the number of
273
+ * pending promises and returns a numeric concurrency limit value to allow for
274
+ * dynamic a concurrency size.
275
+ *
276
+ * @param mixed $iterable
277
+ * @param int|callable $concurrency
278
+ * @param callable $onFulfilled
279
+ * @param callable $onRejected
280
+ *
281
+ * @return PromiseInterface
282
+ *
283
+ * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
284
+ */
285
+ function each_limit(
286
+ $iterable,
287
+ $concurrency,
288
+ callable $onFulfilled = null,
289
+ callable $onRejected = null
290
+ ) {
291
+ return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
292
+ }
293
+
294
+ /**
295
+ * Like each_limit, but ensures that no promise in the given $iterable argument
296
+ * is rejected. If any promise is rejected, then the aggregate promise is
297
+ * rejected with the encountered rejection.
298
+ *
299
+ * @param mixed $iterable
300
+ * @param int|callable $concurrency
301
+ * @param callable $onFulfilled
302
+ *
303
+ * @return PromiseInterface
304
+ *
305
+ * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
306
+ */
307
+ function each_limit_all(
308
+ $iterable,
309
+ $concurrency,
310
+ callable $onFulfilled = null
311
+ ) {
312
+ return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
313
+ }
314
+
315
+ /**
316
+ * Returns true if a promise is fulfilled.
317
+ *
318
+ * @return bool
319
+ *
320
+ * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
321
+ */
322
+ function is_fulfilled(PromiseInterface $promise)
323
+ {
324
+ return Is::fulfilled($promise);
325
+ }
326
+
327
+ /**
328
+ * Returns true if a promise is rejected.
329
+ *
330
+ * @return bool
331
+ *
332
+ * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
333
+ */
334
+ function is_rejected(PromiseInterface $promise)
335
+ {
336
+ return Is::rejected($promise);
337
+ }
338
+
339
+ /**
340
+ * Returns true if a promise is fulfilled or rejected.
341
+ *
342
+ * @return bool
343
+ *
344
+ * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
345
+ */
346
+ function is_settled(PromiseInterface $promise)
347
+ {
348
+ return Is::settled($promise);
349
+ }
350
+
351
+ /**
352
+ * Create a new coroutine.
353
+ *
354
+ * @see Coroutine
355
+ *
356
+ * @return PromiseInterface
357
+ *
358
+ * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead.
359
+ */
360
+ function coroutine(callable $generatorFn)
361
+ {
362
+ return Coroutine::of($generatorFn);
363
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/promises/src/functions_include.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Don't redefine the functions if included multiple times.
4
+ if (!function_exists('GuzzleHttp\Promise\promise_for')) {
5
+ require __DIR__ . '/functions.php';
6
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/.php_cs.dist ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $config = PhpCsFixer\Config::create()
4
+ ->setRiskyAllowed(true)
5
+ ->setRules([
6
+ '@PSR2' => true,
7
+ 'array_syntax' => ['syntax' => 'short'],
8
+ 'concat_space' => ['spacing' => 'one'],
9
+ 'declare_strict_types' => false,
10
+ 'final_static_access' => true,
11
+ 'fully_qualified_strict_types' => true,
12
+ 'header_comment' => false,
13
+ 'is_null' => ['use_yoda_style' => true],
14
+ 'list_syntax' => ['syntax' => 'long'],
15
+ 'lowercase_cast' => true,
16
+ 'magic_method_casing' => true,
17
+ 'modernize_types_casting' => true,
18
+ 'multiline_comment_opening_closing' => true,
19
+ 'no_alias_functions' => true,
20
+ 'no_alternative_syntax' => true,
21
+ 'no_blank_lines_after_phpdoc' => true,
22
+ 'no_empty_comment' => true,
23
+ 'no_empty_phpdoc' => true,
24
+ 'no_empty_statement' => true,
25
+ 'no_extra_blank_lines' => true,
26
+ 'no_leading_import_slash' => true,
27
+ 'no_trailing_comma_in_singleline_array' => true,
28
+ 'no_unset_cast' => true,
29
+ 'no_unused_imports' => true,
30
+ 'no_whitespace_in_blank_line' => true,
31
+ 'ordered_imports' => true,
32
+ 'php_unit_ordered_covers' => true,
33
+ 'php_unit_test_annotation' => ['style' => 'prefix'],
34
+ 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
35
+ 'phpdoc_align' => ['align' => 'vertical'],
36
+ 'phpdoc_no_useless_inheritdoc' => true,
37
+ 'phpdoc_scalar' => true,
38
+ 'phpdoc_separation' => true,
39
+ 'phpdoc_single_line_var_spacing' => true,
40
+ 'phpdoc_trim' => true,
41
+ 'phpdoc_trim_consecutive_blank_line_separation' => true,
42
+ 'phpdoc_types' => true,
43
+ 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
44
+ 'phpdoc_var_without_name' => true,
45
+ 'single_trait_insert_per_statement' => true,
46
+ 'standardize_not_equals' => true,
47
+ ])
48
+ ->setFinder(
49
+ PhpCsFixer\Finder::create()
50
+ ->in(__DIR__.'/src')
51
+ ->in(__DIR__.'/tests')
52
+ ->name('*.php')
53
+ )
54
+ ;
55
+
56
+ return $config;
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/CHANGELOG.md ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+
3
+
4
+ All notable changes to this project will be documented in this file.
5
+
6
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
7
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+
10
+ ## Unreleased
11
+
12
+ ## 1.9.0 - 2022-06-20
13
+
14
+ ### Added
15
+
16
+ - Added `UriComparator::isCrossOrigin` method
17
+
18
+ ## 1.8.5 - 2022-03-20
19
+
20
+ ### Fixed
21
+
22
+ - Correct header value validation
23
+
24
+ ## 1.8.4 - 2022-03-20
25
+
26
+ ### Fixed
27
+
28
+ - Validate header values properly
29
+
30
+ ## 1.8.3 - 2021-10-05
31
+
32
+ ### Fixed
33
+
34
+ - Return `null` in caching stream size if remote size is `null`
35
+
36
+ ## 1.8.2 - 2021-04-26
37
+
38
+ ### Fixed
39
+
40
+ - Handle possibly unset `url` in `stream_get_meta_data`
41
+
42
+ ## 1.8.1 - 2021-03-21
43
+
44
+ ### Fixed
45
+
46
+ - Issue parsing IPv6 URLs
47
+ - Issue modifying ServerRequest lost all its attributes
48
+
49
+ ## 1.8.0 - 2021-03-21
50
+
51
+ ### Added
52
+
53
+ - Locale independent URL parsing
54
+ - Most classes got a `@final` annotation to prepare for 2.0
55
+
56
+ ### Fixed
57
+
58
+ - Issue when creating stream from `php://input` and curl-ext is not installed
59
+ - Broken `Utils::tryFopen()` on PHP 8
60
+
61
+ ## 1.7.0 - 2020-09-30
62
+
63
+ ### Added
64
+
65
+ - Replaced functions by static methods
66
+
67
+ ### Fixed
68
+
69
+ - Converting a non-seekable stream to a string
70
+ - Handle multiple Set-Cookie correctly
71
+ - Ignore array keys in header values when merging
72
+ - Allow multibyte characters to be parsed in `Message:bodySummary()`
73
+
74
+ ### Changed
75
+
76
+ - Restored partial HHVM 3 support
77
+
78
+
79
+ ## [1.6.1] - 2019-07-02
80
+
81
+ ### Fixed
82
+
83
+ - Accept null and bool header values again
84
+
85
+
86
+ ## [1.6.0] - 2019-06-30
87
+
88
+ ### Added
89
+
90
+ - Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
91
+ - Added MIME type for WEBP image format (#246)
92
+ - Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
93
+
94
+ ### Changed
95
+
96
+ - Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
97
+ - Accept port number 0 to be valid (#270)
98
+
99
+ ### Fixed
100
+
101
+ - Fixed subsequent reads from `php://input` in ServerRequest (#247)
102
+ - Fixed readable/writable detection for certain stream modes (#248)
103
+ - Fixed encoding of special characters in the `userInfo` component of an URI (#253)
104
+
105
+
106
+ ## [1.5.2] - 2018-12-04
107
+
108
+ ### Fixed
109
+
110
+ - Check body size when getting the message summary
111
+
112
+
113
+ ## [1.5.1] - 2018-12-04
114
+
115
+ ### Fixed
116
+
117
+ - Get the summary of a body only if it is readable
118
+
119
+
120
+ ## [1.5.0] - 2018-12-03
121
+
122
+ ### Added
123
+
124
+ - Response first-line to response string exception (fixes #145)
125
+ - A test for #129 behavior
126
+ - `get_message_body_summary` function in order to get the message summary
127
+ - `3gp` and `mkv` mime types
128
+
129
+ ### Changed
130
+
131
+ - Clarify exception message when stream is detached
132
+
133
+ ### Deprecated
134
+
135
+ - Deprecated parsing folded header lines as per RFC 7230
136
+
137
+ ### Fixed
138
+
139
+ - Fix `AppendStream::detach` to not close streams
140
+ - `InflateStream` preserves `isSeekable` attribute of the underlying stream
141
+ - `ServerRequest::getUriFromGlobals` to support URLs in query parameters
142
+
143
+
144
+ Several other fixes and improvements.
145
+
146
+
147
+ ## [1.4.2] - 2017-03-20
148
+
149
+ ### Fixed
150
+
151
+ - Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing
152
+ calls to `trigger_error` when deprecated methods are invoked.
153
+
154
+
155
+ ## [1.4.1] - 2017-02-27
156
+
157
+ ### Added
158
+
159
+ - Rriggering of silenced deprecation warnings.
160
+
161
+ ### Fixed
162
+
163
+ - Reverted BC break by reintroducing behavior to automagically fix a URI with a
164
+ relative path and an authority by adding a leading slash to the path. It's only
165
+ deprecated now.
166
+
167
+
168
+ ## [1.4.0] - 2017-02-21
169
+
170
+ ### Added
171
+
172
+ - Added common URI utility methods based on RFC 3986 (see documentation in the readme):
173
+ - `Uri::isDefaultPort`
174
+ - `Uri::isAbsolute`
175
+ - `Uri::isNetworkPathReference`
176
+ - `Uri::isAbsolutePathReference`
177
+ - `Uri::isRelativePathReference`
178
+ - `Uri::isSameDocumentReference`
179
+ - `Uri::composeComponents`
180
+ - `UriNormalizer::normalize`
181
+ - `UriNormalizer::isEquivalent`
182
+ - `UriResolver::relativize`
183
+
184
+ ### Changed
185
+
186
+ - Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form.
187
+ - Allow `parse_response` to parse a response without delimiting space and reason.
188
+ - Ensure each URI modification results in a valid URI according to PSR-7 discussions.
189
+ Invalid modifications will throw an exception instead of returning a wrong URI or
190
+ doing some magic.
191
+ - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception
192
+ because the path of a URI with an authority must start with a slash "/" or be empty
193
+ - `(new Uri())->withScheme('http')` will return `'http://localhost'`
194
+
195
+ ### Deprecated
196
+
197
+ - `Uri::resolve` in favor of `UriResolver::resolve`
198
+ - `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments`
199
+
200
+ ### Fixed
201
+
202
+ - `Stream::read` when length parameter <= 0.
203
+ - `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory.
204
+ - `ServerRequest::getUriFromGlobals` when `Host` header contains port.
205
+ - Compatibility of URIs with `file` scheme and empty host.
206
+
207
+
208
+ ## [1.3.1] - 2016-06-25
209
+
210
+ ### Fixed
211
+
212
+ - `Uri::__toString` for network path references, e.g. `//example.org`.
213
+ - Missing lowercase normalization for host.
214
+ - Handling of URI components in case they are `'0'` in a lot of places,
215
+ e.g. as a user info password.
216
+ - `Uri::withAddedHeader` to correctly merge headers with different case.
217
+ - Trimming of header values in `Uri::withAddedHeader`. Header values may
218
+ be surrounded by whitespace which should be ignored according to RFC 7230
219
+ Section 3.2.4. This does not apply to header names.
220
+ - `Uri::withAddedHeader` with an array of header values.
221
+ - `Uri::resolve` when base path has no slash and handling of fragment.
222
+ - Handling of encoding in `Uri::with(out)QueryValue` so one can pass the
223
+ key/value both in encoded as well as decoded form to those methods. This is
224
+ consistent with withPath, withQuery etc.
225
+ - `ServerRequest::withoutAttribute` when attribute value is null.
226
+
227
+
228
+ ## [1.3.0] - 2016-04-13
229
+
230
+ ### Added
231
+
232
+ - Remaining interfaces needed for full PSR7 compatibility
233
+ (ServerRequestInterface, UploadedFileInterface, etc.).
234
+ - Support for stream_for from scalars.
235
+
236
+ ### Changed
237
+
238
+ - Can now extend Uri.
239
+
240
+ ### Fixed
241
+ - A bug in validating request methods by making it more permissive.
242
+
243
+
244
+ ## [1.2.3] - 2016-02-18
245
+
246
+ ### Fixed
247
+
248
+ - Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
249
+ streams, which can sometimes return fewer bytes than requested with `fread`.
250
+ - Handling of gzipped responses with FNAME headers.
251
+
252
+
253
+ ## [1.2.2] - 2016-01-22
254
+
255
+ ### Added
256
+
257
+ - Support for URIs without any authority.
258
+ - Support for HTTP 451 'Unavailable For Legal Reasons.'
259
+ - Support for using '0' as a filename.
260
+ - Support for including non-standard ports in Host headers.
261
+
262
+
263
+ ## [1.2.1] - 2015-11-02
264
+
265
+ ### Changes
266
+
267
+ - Now supporting negative offsets when seeking to SEEK_END.
268
+
269
+
270
+ ## [1.2.0] - 2015-08-15
271
+
272
+ ### Changed
273
+
274
+ - Body as `"0"` is now properly added to a response.
275
+ - Now allowing forward seeking in CachingStream.
276
+ - Now properly parsing HTTP requests that contain proxy targets in
277
+ `parse_request`.
278
+ - functions.php is now conditionally required.
279
+ - user-info is no longer dropped when resolving URIs.
280
+
281
+
282
+ ## [1.1.0] - 2015-06-24
283
+
284
+ ### Changed
285
+
286
+ - URIs can now be relative.
287
+ - `multipart/form-data` headers are now overridden case-insensitively.
288
+ - URI paths no longer encode the following characters because they are allowed
289
+ in URIs: "(", ")", "*", "!", "'"
290
+ - A port is no longer added to a URI when the scheme is missing and no port is
291
+ present.
292
+
293
+
294
+ ## 1.0.0 - 2015-05-19
295
+
296
+ Initial release.
297
+
298
+ Currently unsupported:
299
+
300
+ - `Psr\Http\Message\ServerRequestInterface`
301
+ - `Psr\Http\Message\UploadedFileInterface`
302
+
303
+
304
+
305
+ [1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
306
+ [1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
307
+ [1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
308
+ [1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
309
+ [1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2
310
+ [1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1
311
+ [1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0
312
+ [1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1
313
+ [1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0
314
+ [1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3
315
+ [1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2
316
+ [1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1
317
+ [1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0
318
+ [1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/LICENSE ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com>
4
+ Copyright (c) 2015 Márk Sági-Kazár <mark.sagikazar@gmail.com>
5
+ Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk>
6
+ Copyright (c) 2016 Tobias Schultze <webmaster@tubo-world.de>
7
+ Copyright (c) 2016 George Mponos <gmponos@gmail.com>
8
+ Copyright (c) 2018 Tobias Nyholm <tobias.nyholm@gmail.com>
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/AppendStream.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Reads from multiple streams, one after the other.
9
+ *
10
+ * This is a read-only stream decorator.
11
+ *
12
+ * @final
13
+ */
14
+ class AppendStream implements StreamInterface
15
+ {
16
+ /** @var StreamInterface[] Streams being decorated */
17
+ private $streams = [];
18
+
19
+ private $seekable = true;
20
+ private $current = 0;
21
+ private $pos = 0;
22
+
23
+ /**
24
+ * @param StreamInterface[] $streams Streams to decorate. Each stream must
25
+ * be readable.
26
+ */
27
+ public function __construct(array $streams = [])
28
+ {
29
+ foreach ($streams as $stream) {
30
+ $this->addStream($stream);
31
+ }
32
+ }
33
+
34
+ public function __toString()
35
+ {
36
+ try {
37
+ $this->rewind();
38
+ return $this->getContents();
39
+ } catch (\Exception $e) {
40
+ return '';
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Add a stream to the AppendStream
46
+ *
47
+ * @param StreamInterface $stream Stream to append. Must be readable.
48
+ *
49
+ * @throws \InvalidArgumentException if the stream is not readable
50
+ */
51
+ public function addStream(StreamInterface $stream)
52
+ {
53
+ if (!$stream->isReadable()) {
54
+ throw new \InvalidArgumentException('Each stream must be readable');
55
+ }
56
+
57
+ // The stream is only seekable if all streams are seekable
58
+ if (!$stream->isSeekable()) {
59
+ $this->seekable = false;
60
+ }
61
+
62
+ $this->streams[] = $stream;
63
+ }
64
+
65
+ public function getContents()
66
+ {
67
+ return Utils::copyToString($this);
68
+ }
69
+
70
+ /**
71
+ * Closes each attached stream.
72
+ *
73
+ * {@inheritdoc}
74
+ */
75
+ public function close()
76
+ {
77
+ $this->pos = $this->current = 0;
78
+ $this->seekable = true;
79
+
80
+ foreach ($this->streams as $stream) {
81
+ $stream->close();
82
+ }
83
+
84
+ $this->streams = [];
85
+ }
86
+
87
+ /**
88
+ * Detaches each attached stream.
89
+ *
90
+ * Returns null as it's not clear which underlying stream resource to return.
91
+ *
92
+ * {@inheritdoc}
93
+ */
94
+ public function detach()
95
+ {
96
+ $this->pos = $this->current = 0;
97
+ $this->seekable = true;
98
+
99
+ foreach ($this->streams as $stream) {
100
+ $stream->detach();
101
+ }
102
+
103
+ $this->streams = [];
104
+
105
+ return null;
106
+ }
107
+
108
+ public function tell()
109
+ {
110
+ return $this->pos;
111
+ }
112
+
113
+ /**
114
+ * Tries to calculate the size by adding the size of each stream.
115
+ *
116
+ * If any of the streams do not return a valid number, then the size of the
117
+ * append stream cannot be determined and null is returned.
118
+ *
119
+ * {@inheritdoc}
120
+ */
121
+ public function getSize()
122
+ {
123
+ $size = 0;
124
+
125
+ foreach ($this->streams as $stream) {
126
+ $s = $stream->getSize();
127
+ if ($s === null) {
128
+ return null;
129
+ }
130
+ $size += $s;
131
+ }
132
+
133
+ return $size;
134
+ }
135
+
136
+ public function eof()
137
+ {
138
+ return !$this->streams ||
139
+ ($this->current >= count($this->streams) - 1 &&
140
+ $this->streams[$this->current]->eof());
141
+ }
142
+
143
+ public function rewind()
144
+ {
145
+ $this->seek(0);
146
+ }
147
+
148
+ /**
149
+ * Attempts to seek to the given position. Only supports SEEK_SET.
150
+ *
151
+ * {@inheritdoc}
152
+ */
153
+ public function seek($offset, $whence = SEEK_SET)
154
+ {
155
+ if (!$this->seekable) {
156
+ throw new \RuntimeException('This AppendStream is not seekable');
157
+ } elseif ($whence !== SEEK_SET) {
158
+ throw new \RuntimeException('The AppendStream can only seek with SEEK_SET');
159
+ }
160
+
161
+ $this->pos = $this->current = 0;
162
+
163
+ // Rewind each stream
164
+ foreach ($this->streams as $i => $stream) {
165
+ try {
166
+ $stream->rewind();
167
+ } catch (\Exception $e) {
168
+ throw new \RuntimeException('Unable to seek stream '
169
+ . $i . ' of the AppendStream', 0, $e);
170
+ }
171
+ }
172
+
173
+ // Seek to the actual position by reading from each stream
174
+ while ($this->pos < $offset && !$this->eof()) {
175
+ $result = $this->read(min(8096, $offset - $this->pos));
176
+ if ($result === '') {
177
+ break;
178
+ }
179
+ }
180
+ }
181
+
182
+ /**
183
+ * Reads from all of the appended streams until the length is met or EOF.
184
+ *
185
+ * {@inheritdoc}
186
+ */
187
+ public function read($length)
188
+ {
189
+ $buffer = '';
190
+ $total = count($this->streams) - 1;
191
+ $remaining = $length;
192
+ $progressToNext = false;
193
+
194
+ while ($remaining > 0) {
195
+
196
+ // Progress to the next stream if needed.
197
+ if ($progressToNext || $this->streams[$this->current]->eof()) {
198
+ $progressToNext = false;
199
+ if ($this->current === $total) {
200
+ break;
201
+ }
202
+ $this->current++;
203
+ }
204
+
205
+ $result = $this->streams[$this->current]->read($remaining);
206
+
207
+ // Using a loose comparison here to match on '', false, and null
208
+ if ($result == null) {
209
+ $progressToNext = true;
210
+ continue;
211
+ }
212
+
213
+ $buffer .= $result;
214
+ $remaining = $length - strlen($buffer);
215
+ }
216
+
217
+ $this->pos += strlen($buffer);
218
+
219
+ return $buffer;
220
+ }
221
+
222
+ public function isReadable()
223
+ {
224
+ return true;
225
+ }
226
+
227
+ public function isWritable()
228
+ {
229
+ return false;
230
+ }
231
+
232
+ public function isSeekable()
233
+ {
234
+ return $this->seekable;
235
+ }
236
+
237
+ public function write($string)
238
+ {
239
+ throw new \RuntimeException('Cannot write to an AppendStream');
240
+ }
241
+
242
+ public function getMetadata($key = null)
243
+ {
244
+ return $key ? null : [];
245
+ }
246
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/BufferStream.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Provides a buffer stream that can be written to to fill a buffer, and read
9
+ * from to remove bytes from the buffer.
10
+ *
11
+ * This stream returns a "hwm" metadata value that tells upstream consumers
12
+ * what the configured high water mark of the stream is, or the maximum
13
+ * preferred size of the buffer.
14
+ *
15
+ * @final
16
+ */
17
+ class BufferStream implements StreamInterface
18
+ {
19
+ private $hwm;
20
+ private $buffer = '';
21
+
22
+ /**
23
+ * @param int $hwm High water mark, representing the preferred maximum
24
+ * buffer size. If the size of the buffer exceeds the high
25
+ * water mark, then calls to write will continue to succeed
26
+ * but will return false to inform writers to slow down
27
+ * until the buffer has been drained by reading from it.
28
+ */
29
+ public function __construct($hwm = 16384)
30
+ {
31
+ $this->hwm = $hwm;
32
+ }
33
+
34
+ public function __toString()
35
+ {
36
+ return $this->getContents();
37
+ }
38
+
39
+ public function getContents()
40
+ {
41
+ $buffer = $this->buffer;
42
+ $this->buffer = '';
43
+
44
+ return $buffer;
45
+ }
46
+
47
+ public function close()
48
+ {
49
+ $this->buffer = '';
50
+ }
51
+
52
+ public function detach()
53
+ {
54
+ $this->close();
55
+
56
+ return null;
57
+ }
58
+
59
+ public function getSize()
60
+ {
61
+ return strlen($this->buffer);
62
+ }
63
+
64
+ public function isReadable()
65
+ {
66
+ return true;
67
+ }
68
+
69
+ public function isWritable()
70
+ {
71
+ return true;
72
+ }
73
+
74
+ public function isSeekable()
75
+ {
76
+ return false;
77
+ }
78
+
79
+ public function rewind()
80
+ {
81
+ $this->seek(0);
82
+ }
83
+
84
+ public function seek($offset, $whence = SEEK_SET)
85
+ {
86
+ throw new \RuntimeException('Cannot seek a BufferStream');
87
+ }
88
+
89
+ public function eof()
90
+ {
91
+ return strlen($this->buffer) === 0;
92
+ }
93
+
94
+ public function tell()
95
+ {
96
+ throw new \RuntimeException('Cannot determine the position of a BufferStream');
97
+ }
98
+
99
+ /**
100
+ * Reads data from the buffer.
101
+ */
102
+ public function read($length)
103
+ {
104
+ $currentLength = strlen($this->buffer);
105
+
106
+ if ($length >= $currentLength) {
107
+ // No need to slice the buffer because we don't have enough data.
108
+ $result = $this->buffer;
109
+ $this->buffer = '';
110
+ } else {
111
+ // Slice up the result to provide a subset of the buffer.
112
+ $result = substr($this->buffer, 0, $length);
113
+ $this->buffer = substr($this->buffer, $length);
114
+ }
115
+
116
+ return $result;
117
+ }
118
+
119
+ /**
120
+ * Writes data to the buffer.
121
+ */
122
+ public function write($string)
123
+ {
124
+ $this->buffer .= $string;
125
+
126
+ // TODO: What should happen here?
127
+ if (strlen($this->buffer) >= $this->hwm) {
128
+ return false;
129
+ }
130
+
131
+ return strlen($string);
132
+ }
133
+
134
+ public function getMetadata($key = null)
135
+ {
136
+ if ($key == 'hwm') {
137
+ return $this->hwm;
138
+ }
139
+
140
+ return $key ? null : [];
141
+ }
142
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/CachingStream.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Stream decorator that can cache previously read bytes from a sequentially
9
+ * read stream.
10
+ *
11
+ * @final
12
+ */
13
+ class CachingStream implements StreamInterface
14
+ {
15
+ use StreamDecoratorTrait;
16
+
17
+ /** @var StreamInterface Stream being wrapped */
18
+ private $remoteStream;
19
+
20
+ /** @var int Number of bytes to skip reading due to a write on the buffer */
21
+ private $skipReadBytes = 0;
22
+
23
+ /**
24
+ * We will treat the buffer object as the body of the stream
25
+ *
26
+ * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
27
+ * @param StreamInterface $target Optionally specify where data is cached
28
+ */
29
+ public function __construct(
30
+ StreamInterface $stream,
31
+ StreamInterface $target = null
32
+ ) {
33
+ $this->remoteStream = $stream;
34
+ $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
35
+ }
36
+
37
+ public function getSize()
38
+ {
39
+ $remoteSize = $this->remoteStream->getSize();
40
+
41
+ if (null === $remoteSize) {
42
+ return null;
43
+ }
44
+
45
+ return max($this->stream->getSize(), $remoteSize);
46
+ }
47
+
48
+ public function rewind()
49
+ {
50
+ $this->seek(0);
51
+ }
52
+
53
+ public function seek($offset, $whence = SEEK_SET)
54
+ {
55
+ if ($whence == SEEK_SET) {
56
+ $byte = $offset;
57
+ } elseif ($whence == SEEK_CUR) {
58
+ $byte = $offset + $this->tell();
59
+ } elseif ($whence == SEEK_END) {
60
+ $size = $this->remoteStream->getSize();
61
+ if ($size === null) {
62
+ $size = $this->cacheEntireStream();
63
+ }
64
+ $byte = $size + $offset;
65
+ } else {
66
+ throw new \InvalidArgumentException('Invalid whence');
67
+ }
68
+
69
+ $diff = $byte - $this->stream->getSize();
70
+
71
+ if ($diff > 0) {
72
+ // Read the remoteStream until we have read in at least the amount
73
+ // of bytes requested, or we reach the end of the file.
74
+ while ($diff > 0 && !$this->remoteStream->eof()) {
75
+ $this->read($diff);
76
+ $diff = $byte - $this->stream->getSize();
77
+ }
78
+ } else {
79
+ // We can just do a normal seek since we've already seen this byte.
80
+ $this->stream->seek($byte);
81
+ }
82
+ }
83
+
84
+ public function read($length)
85
+ {
86
+ // Perform a regular read on any previously read data from the buffer
87
+ $data = $this->stream->read($length);
88
+ $remaining = $length - strlen($data);
89
+
90
+ // More data was requested so read from the remote stream
91
+ if ($remaining) {
92
+ // If data was written to the buffer in a position that would have
93
+ // been filled from the remote stream, then we must skip bytes on
94
+ // the remote stream to emulate overwriting bytes from that
95
+ // position. This mimics the behavior of other PHP stream wrappers.
96
+ $remoteData = $this->remoteStream->read(
97
+ $remaining + $this->skipReadBytes
98
+ );
99
+
100
+ if ($this->skipReadBytes) {
101
+ $len = strlen($remoteData);
102
+ $remoteData = substr($remoteData, $this->skipReadBytes);
103
+ $this->skipReadBytes = max(0, $this->skipReadBytes - $len);
104
+ }
105
+
106
+ $data .= $remoteData;
107
+ $this->stream->write($remoteData);
108
+ }
109
+
110
+ return $data;
111
+ }
112
+
113
+ public function write($string)
114
+ {
115
+ // When appending to the end of the currently read stream, you'll want
116
+ // to skip bytes from being read from the remote stream to emulate
117
+ // other stream wrappers. Basically replacing bytes of data of a fixed
118
+ // length.
119
+ $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell();
120
+ if ($overflow > 0) {
121
+ $this->skipReadBytes += $overflow;
122
+ }
123
+
124
+ return $this->stream->write($string);
125
+ }
126
+
127
+ public function eof()
128
+ {
129
+ return $this->stream->eof() && $this->remoteStream->eof();
130
+ }
131
+
132
+ /**
133
+ * Close both the remote stream and buffer stream
134
+ */
135
+ public function close()
136
+ {
137
+ $this->remoteStream->close() && $this->stream->close();
138
+ }
139
+
140
+ private function cacheEntireStream()
141
+ {
142
+ $target = new FnStream(['write' => 'strlen']);
143
+ Utils::copyToStream($this, $target);
144
+
145
+ return $this->tell();
146
+ }
147
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/DroppingStream.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Stream decorator that begins dropping data once the size of the underlying
9
+ * stream becomes too full.
10
+ *
11
+ * @final
12
+ */
13
+ class DroppingStream implements StreamInterface
14
+ {
15
+ use StreamDecoratorTrait;
16
+
17
+ private $maxLength;
18
+
19
+ /**
20
+ * @param StreamInterface $stream Underlying stream to decorate.
21
+ * @param int $maxLength Maximum size before dropping data.
22
+ */
23
+ public function __construct(StreamInterface $stream, $maxLength)
24
+ {
25
+ $this->stream = $stream;
26
+ $this->maxLength = $maxLength;
27
+ }
28
+
29
+ public function write($string)
30
+ {
31
+ $diff = $this->maxLength - $this->stream->getSize();
32
+
33
+ // Begin returning 0 when the underlying stream is too large.
34
+ if ($diff <= 0) {
35
+ return 0;
36
+ }
37
+
38
+ // Write the stream or a subset of the stream if needed.
39
+ if (strlen($string) < $diff) {
40
+ return $this->stream->write($string);
41
+ }
42
+
43
+ return $this->stream->write(substr($string, 0, $diff));
44
+ }
45
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/FnStream.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Compose stream implementations based on a hash of functions.
9
+ *
10
+ * Allows for easy testing and extension of a provided stream without needing
11
+ * to create a concrete class for a simple extension point.
12
+ *
13
+ * @final
14
+ */
15
+ class FnStream implements StreamInterface
16
+ {
17
+ /** @var array */
18
+ private $methods;
19
+
20
+ /** @var array Methods that must be implemented in the given array */
21
+ private static $slots = ['__toString', 'close', 'detach', 'rewind',
22
+ 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write',
23
+ 'isReadable', 'read', 'getContents', 'getMetadata'];
24
+
25
+ /**
26
+ * @param array $methods Hash of method name to a callable.
27
+ */
28
+ public function __construct(array $methods)
29
+ {
30
+ $this->methods = $methods;
31
+
32
+ // Create the functions on the class
33
+ foreach ($methods as $name => $fn) {
34
+ $this->{'_fn_' . $name} = $fn;
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Lazily determine which methods are not implemented.
40
+ *
41
+ * @throws \BadMethodCallException
42
+ */
43
+ public function __get($name)
44
+ {
45
+ throw new \BadMethodCallException(str_replace('_fn_', '', $name)
46
+ . '() is not implemented in the FnStream');
47
+ }
48
+
49
+ /**
50
+ * The close method is called on the underlying stream only if possible.
51
+ */
52
+ public function __destruct()
53
+ {
54
+ if (isset($this->_fn_close)) {
55
+ call_user_func($this->_fn_close);
56
+ }
57
+ }
58
+
59
+ /**
60
+ * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
61
+ *
62
+ * @throws \LogicException
63
+ */
64
+ public function __wakeup()
65
+ {
66
+ throw new \LogicException('FnStream should never be unserialized');
67
+ }
68
+
69
+ /**
70
+ * Adds custom functionality to an underlying stream by intercepting
71
+ * specific method calls.
72
+ *
73
+ * @param StreamInterface $stream Stream to decorate
74
+ * @param array $methods Hash of method name to a closure
75
+ *
76
+ * @return FnStream
77
+ */
78
+ public static function decorate(StreamInterface $stream, array $methods)
79
+ {
80
+ // If any of the required methods were not provided, then simply
81
+ // proxy to the decorated stream.
82
+ foreach (array_diff(self::$slots, array_keys($methods)) as $diff) {
83
+ $methods[$diff] = [$stream, $diff];
84
+ }
85
+
86
+ return new self($methods);
87
+ }
88
+
89
+ public function __toString()
90
+ {
91
+ return call_user_func($this->_fn___toString);
92
+ }
93
+
94
+ public function close()
95
+ {
96
+ return call_user_func($this->_fn_close);
97
+ }
98
+
99
+ public function detach()
100
+ {
101
+ return call_user_func($this->_fn_detach);
102
+ }
103
+
104
+ public function getSize()
105
+ {
106
+ return call_user_func($this->_fn_getSize);
107
+ }
108
+
109
+ public function tell()
110
+ {
111
+ return call_user_func($this->_fn_tell);
112
+ }
113
+
114
+ public function eof()
115
+ {
116
+ return call_user_func($this->_fn_eof);
117
+ }
118
+
119
+ public function isSeekable()
120
+ {
121
+ return call_user_func($this->_fn_isSeekable);
122
+ }
123
+
124
+ public function rewind()
125
+ {
126
+ call_user_func($this->_fn_rewind);
127
+ }
128
+
129
+ public function seek($offset, $whence = SEEK_SET)
130
+ {
131
+ call_user_func($this->_fn_seek, $offset, $whence);
132
+ }
133
+
134
+ public function isWritable()
135
+ {
136
+ return call_user_func($this->_fn_isWritable);
137
+ }
138
+
139
+ public function write($string)
140
+ {
141
+ return call_user_func($this->_fn_write, $string);
142
+ }
143
+
144
+ public function isReadable()
145
+ {
146
+ return call_user_func($this->_fn_isReadable);
147
+ }
148
+
149
+ public function read($length)
150
+ {
151
+ return call_user_func($this->_fn_read, $length);
152
+ }
153
+
154
+ public function getContents()
155
+ {
156
+ return call_user_func($this->_fn_getContents);
157
+ }
158
+
159
+ public function getMetadata($key = null)
160
+ {
161
+ return call_user_func($this->_fn_getMetadata, $key);
162
+ }
163
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Header.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Header
6
+ {
7
+ /**
8
+ * Parse an array of header values containing ";" separated data into an
9
+ * array of associative arrays representing the header key value pair data
10
+ * of the header. When a parameter does not contain a value, but just
11
+ * contains a key, this function will inject a key with a '' string value.
12
+ *
13
+ * @param string|array $header Header to parse into components.
14
+ *
15
+ * @return array Returns the parsed header values.
16
+ */
17
+ public static function parse($header)
18
+ {
19
+ static $trimmed = "\"' \n\t\r";
20
+ $params = $matches = [];
21
+
22
+ foreach (self::normalize($header) as $val) {
23
+ $part = [];
24
+ foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
25
+ if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
26
+ $m = $matches[0];
27
+ if (isset($m[1])) {
28
+ $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
29
+ } else {
30
+ $part[] = trim($m[0], $trimmed);
31
+ }
32
+ }
33
+ }
34
+ if ($part) {
35
+ $params[] = $part;
36
+ }
37
+ }
38
+
39
+ return $params;
40
+ }
41
+
42
+ /**
43
+ * Converts an array of header values that may contain comma separated
44
+ * headers into an array of headers with no comma separated values.
45
+ *
46
+ * @param string|array $header Header to normalize.
47
+ *
48
+ * @return array Returns the normalized header field values.
49
+ */
50
+ public static function normalize($header)
51
+ {
52
+ if (!is_array($header)) {
53
+ return array_map('trim', explode(',', $header));
54
+ }
55
+
56
+ $result = [];
57
+ foreach ($header as $value) {
58
+ foreach ((array) $value as $v) {
59
+ if (strpos($v, ',') === false) {
60
+ $result[] = $v;
61
+ continue;
62
+ }
63
+ foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
64
+ $result[] = trim($vv);
65
+ }
66
+ }
67
+ }
68
+
69
+ return $result;
70
+ }
71
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/InflateStream.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
9
+ *
10
+ * This stream decorator skips the first 10 bytes of the given stream to remove
11
+ * the gzip header, converts the provided stream to a PHP stream resource,
12
+ * then appends the zlib.inflate filter. The stream is then converted back
13
+ * to a Guzzle stream resource to be used as a Guzzle stream.
14
+ *
15
+ * @link http://tools.ietf.org/html/rfc1952
16
+ * @link http://php.net/manual/en/filters.compression.php
17
+ *
18
+ * @final
19
+ */
20
+ class InflateStream implements StreamInterface
21
+ {
22
+ use StreamDecoratorTrait;
23
+
24
+ public function __construct(StreamInterface $stream)
25
+ {
26
+ // read the first 10 bytes, ie. gzip header
27
+ $header = $stream->read(10);
28
+ $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header);
29
+ // Skip the header, that is 10 + length of filename + 1 (nil) bytes
30
+ $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
31
+ $resource = StreamWrapper::getResource($stream);
32
+ stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
33
+ $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
34
+ }
35
+
36
+ /**
37
+ * @param StreamInterface $stream
38
+ * @param $header
39
+ *
40
+ * @return int
41
+ */
42
+ private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
43
+ {
44
+ $filename_header_length = 0;
45
+
46
+ if (substr(bin2hex($header), 6, 2) === '08') {
47
+ // we have a filename, read until nil
48
+ $filename_header_length = 1;
49
+ while ($stream->read(1) !== chr(0)) {
50
+ $filename_header_length++;
51
+ }
52
+ }
53
+
54
+ return $filename_header_length;
55
+ }
56
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/LazyOpenStream.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Lazily reads or writes to a file that is opened only after an IO operation
9
+ * take place on the stream.
10
+ *
11
+ * @final
12
+ */
13
+ class LazyOpenStream implements StreamInterface
14
+ {
15
+ use StreamDecoratorTrait;
16
+
17
+ /** @var string File to open */
18
+ private $filename;
19
+
20
+ /** @var string */
21
+ private $mode;
22
+
23
+ /**
24
+ * @param string $filename File to lazily open
25
+ * @param string $mode fopen mode to use when opening the stream
26
+ */
27
+ public function __construct($filename, $mode)
28
+ {
29
+ $this->filename = $filename;
30
+ $this->mode = $mode;
31
+ }
32
+
33
+ /**
34
+ * Creates the underlying stream lazily when required.
35
+ *
36
+ * @return StreamInterface
37
+ */
38
+ protected function createStream()
39
+ {
40
+ return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
41
+ }
42
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/LimitStream.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Decorator used to return only a subset of a stream.
9
+ *
10
+ * @final
11
+ */
12
+ class LimitStream implements StreamInterface
13
+ {
14
+ use StreamDecoratorTrait;
15
+
16
+ /** @var int Offset to start reading from */
17
+ private $offset;
18
+
19
+ /** @var int Limit the number of bytes that can be read */
20
+ private $limit;
21
+
22
+ /**
23
+ * @param StreamInterface $stream Stream to wrap
24
+ * @param int $limit Total number of bytes to allow to be read
25
+ * from the stream. Pass -1 for no limit.
26
+ * @param int $offset Position to seek to before reading (only
27
+ * works on seekable streams).
28
+ */
29
+ public function __construct(
30
+ StreamInterface $stream,
31
+ $limit = -1,
32
+ $offset = 0
33
+ ) {
34
+ $this->stream = $stream;
35
+ $this->setLimit($limit);
36
+ $this->setOffset($offset);
37
+ }
38
+
39
+ public function eof()
40
+ {
41
+ // Always return true if the underlying stream is EOF
42
+ if ($this->stream->eof()) {
43
+ return true;
44
+ }
45
+
46
+ // No limit and the underlying stream is not at EOF
47
+ if ($this->limit == -1) {
48
+ return false;
49
+ }
50
+
51
+ return $this->stream->tell() >= $this->offset + $this->limit;
52
+ }
53
+
54
+ /**
55
+ * Returns the size of the limited subset of data
56
+ * {@inheritdoc}
57
+ */
58
+ public function getSize()
59
+ {
60
+ if (null === ($length = $this->stream->getSize())) {
61
+ return null;
62
+ } elseif ($this->limit == -1) {
63
+ return $length - $this->offset;
64
+ } else {
65
+ return min($this->limit, $length - $this->offset);
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Allow for a bounded seek on the read limited stream
71
+ * {@inheritdoc}
72
+ */
73
+ public function seek($offset, $whence = SEEK_SET)
74
+ {
75
+ if ($whence !== SEEK_SET || $offset < 0) {
76
+ throw new \RuntimeException(sprintf(
77
+ 'Cannot seek to offset %s with whence %s',
78
+ $offset,
79
+ $whence
80
+ ));
81
+ }
82
+
83
+ $offset += $this->offset;
84
+
85
+ if ($this->limit !== -1) {
86
+ if ($offset > $this->offset + $this->limit) {
87
+ $offset = $this->offset + $this->limit;
88
+ }
89
+ }
90
+
91
+ $this->stream->seek($offset);
92
+ }
93
+
94
+ /**
95
+ * Give a relative tell()
96
+ * {@inheritdoc}
97
+ */
98
+ public function tell()
99
+ {
100
+ return $this->stream->tell() - $this->offset;
101
+ }
102
+
103
+ /**
104
+ * Set the offset to start limiting from
105
+ *
106
+ * @param int $offset Offset to seek to and begin byte limiting from
107
+ *
108
+ * @throws \RuntimeException if the stream cannot be seeked.
109
+ */
110
+ public function setOffset($offset)
111
+ {
112
+ $current = $this->stream->tell();
113
+
114
+ if ($current !== $offset) {
115
+ // If the stream cannot seek to the offset position, then read to it
116
+ if ($this->stream->isSeekable()) {
117
+ $this->stream->seek($offset);
118
+ } elseif ($current > $offset) {
119
+ throw new \RuntimeException("Could not seek to stream offset $offset");
120
+ } else {
121
+ $this->stream->read($offset - $current);
122
+ }
123
+ }
124
+
125
+ $this->offset = $offset;
126
+ }
127
+
128
+ /**
129
+ * Set the limit of bytes that the decorator allows to be read from the
130
+ * stream.
131
+ *
132
+ * @param int $limit Number of bytes to allow to be read from the stream.
133
+ * Use -1 for no limit.
134
+ */
135
+ public function setLimit($limit)
136
+ {
137
+ $this->limit = $limit;
138
+ }
139
+
140
+ public function read($length)
141
+ {
142
+ if ($this->limit == -1) {
143
+ return $this->stream->read($length);
144
+ }
145
+
146
+ // Check if the current position is less than the total allowed
147
+ // bytes + original offset
148
+ $remaining = ($this->offset + $this->limit) - $this->stream->tell();
149
+ if ($remaining > 0) {
150
+ // Only return the amount of requested data, ensuring that the byte
151
+ // limit is not exceeded
152
+ return $this->stream->read(min($remaining, $length));
153
+ }
154
+
155
+ return '';
156
+ }
157
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Message.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\MessageInterface;
6
+ use Psr\Http\Message\RequestInterface;
7
+ use Psr\Http\Message\ResponseInterface;
8
+
9
+ final class Message
10
+ {
11
+ /**
12
+ * Returns the string representation of an HTTP message.
13
+ *
14
+ * @param MessageInterface $message Message to convert to a string.
15
+ *
16
+ * @return string
17
+ */
18
+ public static function toString(MessageInterface $message)
19
+ {
20
+ if ($message instanceof RequestInterface) {
21
+ $msg = trim($message->getMethod() . ' '
22
+ . $message->getRequestTarget())
23
+ . ' HTTP/' . $message->getProtocolVersion();
24
+ if (!$message->hasHeader('host')) {
25
+ $msg .= "\r\nHost: " . $message->getUri()->getHost();
26
+ }
27
+ } elseif ($message instanceof ResponseInterface) {
28
+ $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
29
+ . $message->getStatusCode() . ' '
30
+ . $message->getReasonPhrase();
31
+ } else {
32
+ throw new \InvalidArgumentException('Unknown message type');
33
+ }
34
+
35
+ foreach ($message->getHeaders() as $name => $values) {
36
+ if (strtolower($name) === 'set-cookie') {
37
+ foreach ($values as $value) {
38
+ $msg .= "\r\n{$name}: " . $value;
39
+ }
40
+ } else {
41
+ $msg .= "\r\n{$name}: " . implode(', ', $values);
42
+ }
43
+ }
44
+
45
+ return "{$msg}\r\n\r\n" . $message->getBody();
46
+ }
47
+
48
+ /**
49
+ * Get a short summary of the message body.
50
+ *
51
+ * Will return `null` if the response is not printable.
52
+ *
53
+ * @param MessageInterface $message The message to get the body summary
54
+ * @param int $truncateAt The maximum allowed size of the summary
55
+ *
56
+ * @return string|null
57
+ */
58
+ public static function bodySummary(MessageInterface $message, $truncateAt = 120)
59
+ {
60
+ $body = $message->getBody();
61
+
62
+ if (!$body->isSeekable() || !$body->isReadable()) {
63
+ return null;
64
+ }
65
+
66
+ $size = $body->getSize();
67
+
68
+ if ($size === 0) {
69
+ return null;
70
+ }
71
+
72
+ $summary = $body->read($truncateAt);
73
+ $body->rewind();
74
+
75
+ if ($size > $truncateAt) {
76
+ $summary .= ' (truncated...)';
77
+ }
78
+
79
+ // Matches any printable character, including unicode characters:
80
+ // letters, marks, numbers, punctuation, spacing, and separators.
81
+ if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
82
+ return null;
83
+ }
84
+
85
+ return $summary;
86
+ }
87
+
88
+ /**
89
+ * Attempts to rewind a message body and throws an exception on failure.
90
+ *
91
+ * The body of the message will only be rewound if a call to `tell()`
92
+ * returns a value other than `0`.
93
+ *
94
+ * @param MessageInterface $message Message to rewind
95
+ *
96
+ * @throws \RuntimeException
97
+ */
98
+ public static function rewindBody(MessageInterface $message)
99
+ {
100
+ $body = $message->getBody();
101
+
102
+ if ($body->tell()) {
103
+ $body->rewind();
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Parses an HTTP message into an associative array.
109
+ *
110
+ * The array contains the "start-line" key containing the start line of
111
+ * the message, "headers" key containing an associative array of header
112
+ * array values, and a "body" key containing the body of the message.
113
+ *
114
+ * @param string $message HTTP request or response to parse.
115
+ *
116
+ * @return array
117
+ */
118
+ public static function parseMessage($message)
119
+ {
120
+ if (!$message) {
121
+ throw new \InvalidArgumentException('Invalid message');
122
+ }
123
+
124
+ $message = ltrim($message, "\r\n");
125
+
126
+ $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
127
+
128
+ if ($messageParts === false || count($messageParts) !== 2) {
129
+ throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
130
+ }
131
+
132
+ list($rawHeaders, $body) = $messageParts;
133
+ $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
134
+ $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
135
+
136
+ if ($headerParts === false || count($headerParts) !== 2) {
137
+ throw new \InvalidArgumentException('Invalid message: Missing status line');
138
+ }
139
+
140
+ list($startLine, $rawHeaders) = $headerParts;
141
+
142
+ if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
143
+ // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
144
+ $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
145
+ }
146
+
147
+ /** @var array[] $headerLines */
148
+ $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
149
+
150
+ // If these aren't the same, then one line didn't match and there's an invalid header.
151
+ if ($count !== substr_count($rawHeaders, "\n")) {
152
+ // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
153
+ if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
154
+ throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
155
+ }
156
+
157
+ throw new \InvalidArgumentException('Invalid header syntax');
158
+ }
159
+
160
+ $headers = [];
161
+
162
+ foreach ($headerLines as $headerLine) {
163
+ $headers[$headerLine[1]][] = $headerLine[2];
164
+ }
165
+
166
+ return [
167
+ 'start-line' => $startLine,
168
+ 'headers' => $headers,
169
+ 'body' => $body,
170
+ ];
171
+ }
172
+
173
+ /**
174
+ * Constructs a URI for an HTTP request message.
175
+ *
176
+ * @param string $path Path from the start-line
177
+ * @param array $headers Array of headers (each value an array).
178
+ *
179
+ * @return string
180
+ */
181
+ public static function parseRequestUri($path, array $headers)
182
+ {
183
+ $hostKey = array_filter(array_keys($headers), function ($k) {
184
+ return strtolower($k) === 'host';
185
+ });
186
+
187
+ // If no host is found, then a full URI cannot be constructed.
188
+ if (!$hostKey) {
189
+ return $path;
190
+ }
191
+
192
+ $host = $headers[reset($hostKey)][0];
193
+ $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
194
+
195
+ return $scheme . '://' . $host . '/' . ltrim($path, '/');
196
+ }
197
+
198
+ /**
199
+ * Parses a request message string into a request object.
200
+ *
201
+ * @param string $message Request message string.
202
+ *
203
+ * @return Request
204
+ */
205
+ public static function parseRequest($message)
206
+ {
207
+ $data = self::parseMessage($message);
208
+ $matches = [];
209
+ if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
210
+ throw new \InvalidArgumentException('Invalid request string');
211
+ }
212
+ $parts = explode(' ', $data['start-line'], 3);
213
+ $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
214
+
215
+ $request = new Request(
216
+ $parts[0],
217
+ $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
218
+ $data['headers'],
219
+ $data['body'],
220
+ $version
221
+ );
222
+
223
+ return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
224
+ }
225
+
226
+ /**
227
+ * Parses a response message string into a response object.
228
+ *
229
+ * @param string $message Response message string.
230
+ *
231
+ * @return Response
232
+ */
233
+ public static function parseResponse($message)
234
+ {
235
+ $data = self::parseMessage($message);
236
+ // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
237
+ // between status-code and reason-phrase is required. But browsers accept
238
+ // responses without space and reason as well.
239
+ if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
240
+ throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
241
+ }
242
+ $parts = explode(' ', $data['start-line'], 3);
243
+
244
+ return new Response(
245
+ (int) $parts[1],
246
+ $data['headers'],
247
+ $data['body'],
248
+ explode('/', $parts[0])[1],
249
+ isset($parts[2]) ? $parts[2] : null
250
+ );
251
+ }
252
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/MessageTrait.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Trait implementing functionality common to requests and responses.
9
+ */
10
+ trait MessageTrait
11
+ {
12
+ /** @var array Map of all registered headers, as original name => array of values */
13
+ private $headers = [];
14
+
15
+ /** @var array Map of lowercase header name => original name at registration */
16
+ private $headerNames = [];
17
+
18
+ /** @var string */
19
+ private $protocol = '1.1';
20
+
21
+ /** @var StreamInterface|null */
22
+ private $stream;
23
+
24
+ public function getProtocolVersion()
25
+ {
26
+ return $this->protocol;
27
+ }
28
+
29
+ public function withProtocolVersion($version)
30
+ {
31
+ if ($this->protocol === $version) {
32
+ return $this;
33
+ }
34
+
35
+ $new = clone $this;
36
+ $new->protocol = $version;
37
+ return $new;
38
+ }
39
+
40
+ public function getHeaders()
41
+ {
42
+ return $this->headers;
43
+ }
44
+
45
+ public function hasHeader($header)
46
+ {
47
+ return isset($this->headerNames[strtolower($header)]);
48
+ }
49
+
50
+ public function getHeader($header)
51
+ {
52
+ $header = strtolower($header);
53
+
54
+ if (!isset($this->headerNames[$header])) {
55
+ return [];
56
+ }
57
+
58
+ $header = $this->headerNames[$header];
59
+
60
+ return $this->headers[$header];
61
+ }
62
+
63
+ public function getHeaderLine($header)
64
+ {
65
+ return implode(', ', $this->getHeader($header));
66
+ }
67
+
68
+ public function withHeader($header, $value)
69
+ {
70
+ $this->assertHeader($header);
71
+ $value = $this->normalizeHeaderValue($value);
72
+ $normalized = strtolower($header);
73
+
74
+ $new = clone $this;
75
+ if (isset($new->headerNames[$normalized])) {
76
+ unset($new->headers[$new->headerNames[$normalized]]);
77
+ }
78
+ $new->headerNames[$normalized] = $header;
79
+ $new->headers[$header] = $value;
80
+
81
+ return $new;
82
+ }
83
+
84
+ public function withAddedHeader($header, $value)
85
+ {
86
+ $this->assertHeader($header);
87
+ $value = $this->normalizeHeaderValue($value);
88
+ $normalized = strtolower($header);
89
+
90
+ $new = clone $this;
91
+ if (isset($new->headerNames[$normalized])) {
92
+ $header = $this->headerNames[$normalized];
93
+ $new->headers[$header] = array_merge($this->headers[$header], $value);
94
+ } else {
95
+ $new->headerNames[$normalized] = $header;
96
+ $new->headers[$header] = $value;
97
+ }
98
+
99
+ return $new;
100
+ }
101
+
102
+ public function withoutHeader($header)
103
+ {
104
+ $normalized = strtolower($header);
105
+
106
+ if (!isset($this->headerNames[$normalized])) {
107
+ return $this;
108
+ }
109
+
110
+ $header = $this->headerNames[$normalized];
111
+
112
+ $new = clone $this;
113
+ unset($new->headers[$header], $new->headerNames[$normalized]);
114
+
115
+ return $new;
116
+ }
117
+
118
+ public function getBody()
119
+ {
120
+ if (!$this->stream) {
121
+ $this->stream = Utils::streamFor('');
122
+ }
123
+
124
+ return $this->stream;
125
+ }
126
+
127
+ public function withBody(StreamInterface $body)
128
+ {
129
+ if ($body === $this->stream) {
130
+ return $this;
131
+ }
132
+
133
+ $new = clone $this;
134
+ $new->stream = $body;
135
+ return $new;
136
+ }
137
+
138
+ private function setHeaders(array $headers)
139
+ {
140
+ $this->headerNames = $this->headers = [];
141
+ foreach ($headers as $header => $value) {
142
+ if (is_int($header)) {
143
+ // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
144
+ // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
145
+ $header = (string) $header;
146
+ }
147
+ $this->assertHeader($header);
148
+ $value = $this->normalizeHeaderValue($value);
149
+ $normalized = strtolower($header);
150
+ if (isset($this->headerNames[$normalized])) {
151
+ $header = $this->headerNames[$normalized];
152
+ $this->headers[$header] = array_merge($this->headers[$header], $value);
153
+ } else {
154
+ $this->headerNames[$normalized] = $header;
155
+ $this->headers[$header] = $value;
156
+ }
157
+ }
158
+ }
159
+
160
+ /**
161
+ * @param mixed $value
162
+ *
163
+ * @return string[]
164
+ */
165
+ private function normalizeHeaderValue($value)
166
+ {
167
+ if (!is_array($value)) {
168
+ return $this->trimAndValidateHeaderValues([$value]);
169
+ }
170
+
171
+ if (count($value) === 0) {
172
+ throw new \InvalidArgumentException('Header value can not be an empty array.');
173
+ }
174
+
175
+ return $this->trimAndValidateHeaderValues($value);
176
+ }
177
+
178
+ /**
179
+ * Trims whitespace from the header values.
180
+ *
181
+ * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.
182
+ *
183
+ * header-field = field-name ":" OWS field-value OWS
184
+ * OWS = *( SP / HTAB )
185
+ *
186
+ * @param mixed[] $values Header values
187
+ *
188
+ * @return string[] Trimmed header values
189
+ *
190
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2.4
191
+ */
192
+ private function trimAndValidateHeaderValues(array $values)
193
+ {
194
+ return array_map(function ($value) {
195
+ if (!is_scalar($value) && null !== $value) {
196
+ throw new \InvalidArgumentException(sprintf(
197
+ 'Header value must be scalar or null but %s provided.',
198
+ is_object($value) ? get_class($value) : gettype($value)
199
+ ));
200
+ }
201
+
202
+ $trimmed = trim((string) $value, " \t");
203
+ $this->assertValue($trimmed);
204
+
205
+ return $trimmed;
206
+ }, array_values($values));
207
+ }
208
+
209
+ /**
210
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2
211
+ *
212
+ * @param mixed $header
213
+ *
214
+ * @return void
215
+ */
216
+ private function assertHeader($header)
217
+ {
218
+ if (!is_string($header)) {
219
+ throw new \InvalidArgumentException(sprintf(
220
+ 'Header name must be a string but %s provided.',
221
+ is_object($header) ? get_class($header) : gettype($header)
222
+ ));
223
+ }
224
+
225
+ if ($header === '') {
226
+ throw new \InvalidArgumentException('Header name can not be empty.');
227
+ }
228
+
229
+ if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) {
230
+ throw new \InvalidArgumentException(
231
+ sprintf(
232
+ '"%s" is not valid header name',
233
+ $header
234
+ )
235
+ );
236
+ }
237
+ }
238
+
239
+ /**
240
+ * @param string $value
241
+ *
242
+ * @return void
243
+ *
244
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2
245
+ *
246
+ * field-value = *( field-content / obs-fold )
247
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
248
+ * field-vchar = VCHAR / obs-text
249
+ * VCHAR = %x21-7E
250
+ * obs-text = %x80-FF
251
+ * obs-fold = CRLF 1*( SP / HTAB )
252
+ */
253
+ private function assertValue($value)
254
+ {
255
+ // The regular expression intentionally does not support the obs-fold production, because as
256
+ // per RFC 7230#3.2.4:
257
+ //
258
+ // A sender MUST NOT generate a message that includes
259
+ // line folding (i.e., that has any field-value that contains a match to
260
+ // the obs-fold rule) unless the message is intended for packaging
261
+ // within the message/http media type.
262
+ //
263
+ // Clients must not send a request with line folding and a server sending folded headers is
264
+ // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
265
+ // folding is not likely to break any legitimate use case.
266
+ if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
267
+ throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
268
+ }
269
+ }
270
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/MimeType.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class MimeType
6
+ {
7
+ /**
8
+ * Determines the mimetype of a file by looking at its extension.
9
+ *
10
+ * @param string $filename
11
+ *
12
+ * @return string|null
13
+ */
14
+ public static function fromFilename($filename)
15
+ {
16
+ return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
17
+ }
18
+
19
+ /**
20
+ * Maps a file extensions to a mimetype.
21
+ *
22
+ * @param string $extension string The file extension.
23
+ *
24
+ * @return string|null
25
+ *
26
+ * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
27
+ */
28
+ public static function fromExtension($extension)
29
+ {
30
+ static $mimetypes = [
31
+ '3gp' => 'video/3gpp',
32
+ '7z' => 'application/x-7z-compressed',
33
+ 'aac' => 'audio/x-aac',
34
+ 'ai' => 'application/postscript',
35
+ 'aif' => 'audio/x-aiff',
36
+ 'asc' => 'text/plain',
37
+ 'asf' => 'video/x-ms-asf',
38
+ 'atom' => 'application/atom+xml',
39
+ 'avi' => 'video/x-msvideo',
40
+ 'bmp' => 'image/bmp',
41
+ 'bz2' => 'application/x-bzip2',
42
+ 'cer' => 'application/pkix-cert',
43
+ 'crl' => 'application/pkix-crl',
44
+ 'crt' => 'application/x-x509-ca-cert',
45
+ 'css' => 'text/css',
46
+ 'csv' => 'text/csv',
47
+ 'cu' => 'application/cu-seeme',
48
+ 'deb' => 'application/x-debian-package',
49
+ 'doc' => 'application/msword',
50
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
51
+ 'dvi' => 'application/x-dvi',
52
+ 'eot' => 'application/vnd.ms-fontobject',
53
+ 'eps' => 'application/postscript',
54
+ 'epub' => 'application/epub+zip',
55
+ 'etx' => 'text/x-setext',
56
+ 'flac' => 'audio/flac',
57
+ 'flv' => 'video/x-flv',
58
+ 'gif' => 'image/gif',
59
+ 'gz' => 'application/gzip',
60
+ 'htm' => 'text/html',
61
+ 'html' => 'text/html',
62
+ 'ico' => 'image/x-icon',
63
+ 'ics' => 'text/calendar',
64
+ 'ini' => 'text/plain',
65
+ 'iso' => 'application/x-iso9660-image',
66
+ 'jar' => 'application/java-archive',
67
+ 'jpe' => 'image/jpeg',
68
+ 'jpeg' => 'image/jpeg',
69
+ 'jpg' => 'image/jpeg',
70
+ 'js' => 'text/javascript',
71
+ 'json' => 'application/json',
72
+ 'latex' => 'application/x-latex',
73
+ 'log' => 'text/plain',
74
+ 'm4a' => 'audio/mp4',
75
+ 'm4v' => 'video/mp4',
76
+ 'mid' => 'audio/midi',
77
+ 'midi' => 'audio/midi',
78
+ 'mov' => 'video/quicktime',
79
+ 'mkv' => 'video/x-matroska',
80
+ 'mp3' => 'audio/mpeg',
81
+ 'mp4' => 'video/mp4',
82
+ 'mp4a' => 'audio/mp4',
83
+ 'mp4v' => 'video/mp4',
84
+ 'mpe' => 'video/mpeg',
85
+ 'mpeg' => 'video/mpeg',
86
+ 'mpg' => 'video/mpeg',
87
+ 'mpg4' => 'video/mp4',
88
+ 'oga' => 'audio/ogg',
89
+ 'ogg' => 'audio/ogg',
90
+ 'ogv' => 'video/ogg',
91
+ 'ogx' => 'application/ogg',
92
+ 'pbm' => 'image/x-portable-bitmap',
93
+ 'pdf' => 'application/pdf',
94
+ 'pgm' => 'image/x-portable-graymap',
95
+ 'png' => 'image/png',
96
+ 'pnm' => 'image/x-portable-anymap',
97
+ 'ppm' => 'image/x-portable-pixmap',
98
+ 'ppt' => 'application/vnd.ms-powerpoint',
99
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
100
+ 'ps' => 'application/postscript',
101
+ 'qt' => 'video/quicktime',
102
+ 'rar' => 'application/x-rar-compressed',
103
+ 'ras' => 'image/x-cmu-raster',
104
+ 'rss' => 'application/rss+xml',
105
+ 'rtf' => 'application/rtf',
106
+ 'sgm' => 'text/sgml',
107
+ 'sgml' => 'text/sgml',
108
+ 'svg' => 'image/svg+xml',
109
+ 'swf' => 'application/x-shockwave-flash',
110
+ 'tar' => 'application/x-tar',
111
+ 'tif' => 'image/tiff',
112
+ 'tiff' => 'image/tiff',
113
+ 'torrent' => 'application/x-bittorrent',
114
+ 'ttf' => 'application/x-font-ttf',
115
+ 'txt' => 'text/plain',
116
+ 'wav' => 'audio/x-wav',
117
+ 'webm' => 'video/webm',
118
+ 'webp' => 'image/webp',
119
+ 'wma' => 'audio/x-ms-wma',
120
+ 'wmv' => 'video/x-ms-wmv',
121
+ 'woff' => 'application/x-font-woff',
122
+ 'wsdl' => 'application/wsdl+xml',
123
+ 'xbm' => 'image/x-xbitmap',
124
+ 'xls' => 'application/vnd.ms-excel',
125
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
126
+ 'xml' => 'application/xml',
127
+ 'xpm' => 'image/x-xpixmap',
128
+ 'xwd' => 'image/x-xwindowdump',
129
+ 'yaml' => 'text/yaml',
130
+ 'yml' => 'text/yaml',
131
+ 'zip' => 'application/zip',
132
+ ];
133
+
134
+ $extension = strtolower($extension);
135
+
136
+ return isset($mimetypes[$extension])
137
+ ? $mimetypes[$extension]
138
+ : null;
139
+ }
140
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/MultipartStream.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Stream that when read returns bytes for a streaming multipart or
9
+ * multipart/form-data stream.
10
+ *
11
+ * @final
12
+ */
13
+ class MultipartStream implements StreamInterface
14
+ {
15
+ use StreamDecoratorTrait;
16
+
17
+ private $boundary;
18
+
19
+ /**
20
+ * @param array $elements Array of associative arrays, each containing a
21
+ * required "name" key mapping to the form field,
22
+ * name, a required "contents" key mapping to a
23
+ * StreamInterface/resource/string, an optional
24
+ * "headers" associative array of custom headers,
25
+ * and an optional "filename" key mapping to a
26
+ * string to send as the filename in the part.
27
+ * @param string $boundary You can optionally provide a specific boundary
28
+ *
29
+ * @throws \InvalidArgumentException
30
+ */
31
+ public function __construct(array $elements = [], $boundary = null)
32
+ {
33
+ $this->boundary = $boundary ?: sha1(uniqid('', true));
34
+ $this->stream = $this->createStream($elements);
35
+ }
36
+
37
+ /**
38
+ * Get the boundary
39
+ *
40
+ * @return string
41
+ */
42
+ public function getBoundary()
43
+ {
44
+ return $this->boundary;
45
+ }
46
+
47
+ public function isWritable()
48
+ {
49
+ return false;
50
+ }
51
+
52
+ /**
53
+ * Get the headers needed before transferring the content of a POST file
54
+ */
55
+ private function getHeaders(array $headers)
56
+ {
57
+ $str = '';
58
+ foreach ($headers as $key => $value) {
59
+ $str .= "{$key}: {$value}\r\n";
60
+ }
61
+
62
+ return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
63
+ }
64
+
65
+ /**
66
+ * Create the aggregate stream that will be used to upload the POST data
67
+ */
68
+ protected function createStream(array $elements)
69
+ {
70
+ $stream = new AppendStream();
71
+
72
+ foreach ($elements as $element) {
73
+ $this->addElement($stream, $element);
74
+ }
75
+
76
+ // Add the trailing boundary with CRLF
77
+ $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
78
+
79
+ return $stream;
80
+ }
81
+
82
+ private function addElement(AppendStream $stream, array $element)
83
+ {
84
+ foreach (['contents', 'name'] as $key) {
85
+ if (!array_key_exists($key, $element)) {
86
+ throw new \InvalidArgumentException("A '{$key}' key is required");
87
+ }
88
+ }
89
+
90
+ $element['contents'] = Utils::streamFor($element['contents']);
91
+
92
+ if (empty($element['filename'])) {
93
+ $uri = $element['contents']->getMetadata('uri');
94
+ if (substr($uri, 0, 6) !== 'php://') {
95
+ $element['filename'] = $uri;
96
+ }
97
+ }
98
+
99
+ list($body, $headers) = $this->createElement(
100
+ $element['name'],
101
+ $element['contents'],
102
+ isset($element['filename']) ? $element['filename'] : null,
103
+ isset($element['headers']) ? $element['headers'] : []
104
+ );
105
+
106
+ $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
107
+ $stream->addStream($body);
108
+ $stream->addStream(Utils::streamFor("\r\n"));
109
+ }
110
+
111
+ /**
112
+ * @return array
113
+ */
114
+ private function createElement($name, StreamInterface $stream, $filename, array $headers)
115
+ {
116
+ // Set a default content-disposition header if one was no provided
117
+ $disposition = $this->getHeader($headers, 'content-disposition');
118
+ if (!$disposition) {
119
+ $headers['Content-Disposition'] = ($filename === '0' || $filename)
120
+ ? sprintf(
121
+ 'form-data; name="%s"; filename="%s"',
122
+ $name,
123
+ basename($filename)
124
+ )
125
+ : "form-data; name=\"{$name}\"";
126
+ }
127
+
128
+ // Set a default content-length header if one was no provided
129
+ $length = $this->getHeader($headers, 'content-length');
130
+ if (!$length) {
131
+ if ($length = $stream->getSize()) {
132
+ $headers['Content-Length'] = (string) $length;
133
+ }
134
+ }
135
+
136
+ // Set a default Content-Type if one was not supplied
137
+ $type = $this->getHeader($headers, 'content-type');
138
+ if (!$type && ($filename === '0' || $filename)) {
139
+ if ($type = MimeType::fromFilename($filename)) {
140
+ $headers['Content-Type'] = $type;
141
+ }
142
+ }
143
+
144
+ return [$stream, $headers];
145
+ }
146
+
147
+ private function getHeader(array $headers, $key)
148
+ {
149
+ $lowercaseHeader = strtolower($key);
150
+ foreach ($headers as $k => $v) {
151
+ if (strtolower($k) === $lowercaseHeader) {
152
+ return $v;
153
+ }
154
+ }
155
+
156
+ return null;
157
+ }
158
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/NoSeekStream.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Stream decorator that prevents a stream from being seeked.
9
+ *
10
+ * @final
11
+ */
12
+ class NoSeekStream implements StreamInterface
13
+ {
14
+ use StreamDecoratorTrait;
15
+
16
+ public function seek($offset, $whence = SEEK_SET)
17
+ {
18
+ throw new \RuntimeException('Cannot seek a NoSeekStream');
19
+ }
20
+
21
+ public function isSeekable()
22
+ {
23
+ return false;
24
+ }
25
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/PumpStream.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Provides a read only stream that pumps data from a PHP callable.
9
+ *
10
+ * When invoking the provided callable, the PumpStream will pass the amount of
11
+ * data requested to read to the callable. The callable can choose to ignore
12
+ * this value and return fewer or more bytes than requested. Any extra data
13
+ * returned by the provided callable is buffered internally until drained using
14
+ * the read() function of the PumpStream. The provided callable MUST return
15
+ * false when there is no more data to read.
16
+ *
17
+ * @final
18
+ */
19
+ class PumpStream implements StreamInterface
20
+ {
21
+ /** @var callable */
22
+ private $source;
23
+
24
+ /** @var int */
25
+ private $size;
26
+
27
+ /** @var int */
28
+ private $tellPos = 0;
29
+
30
+ /** @var array */
31
+ private $metadata;
32
+
33
+ /** @var BufferStream */
34
+ private $buffer;
35
+
36
+ /**
37
+ * @param callable $source Source of the stream data. The callable MAY
38
+ * accept an integer argument used to control the
39
+ * amount of data to return. The callable MUST
40
+ * return a string when called, or false on error
41
+ * or EOF.
42
+ * @param array $options Stream options:
43
+ * - metadata: Hash of metadata to use with stream.
44
+ * - size: Size of the stream, if known.
45
+ */
46
+ public function __construct(callable $source, array $options = [])
47
+ {
48
+ $this->source = $source;
49
+ $this->size = isset($options['size']) ? $options['size'] : null;
50
+ $this->metadata = isset($options['metadata']) ? $options['metadata'] : [];
51
+ $this->buffer = new BufferStream();
52
+ }
53
+
54
+ public function __toString()
55
+ {
56
+ try {
57
+ return Utils::copyToString($this);
58
+ } catch (\Exception $e) {
59
+ return '';
60
+ }
61
+ }
62
+
63
+ public function close()
64
+ {
65
+ $this->detach();
66
+ }
67
+
68
+ public function detach()
69
+ {
70
+ $this->tellPos = false;
71
+ $this->source = null;
72
+
73
+ return null;
74
+ }
75
+
76
+ public function getSize()
77
+ {
78
+ return $this->size;
79
+ }
80
+
81
+ public function tell()
82
+ {
83
+ return $this->tellPos;
84
+ }
85
+
86
+ public function eof()
87
+ {
88
+ return !$this->source;
89
+ }
90
+
91
+ public function isSeekable()
92
+ {
93
+ return false;
94
+ }
95
+
96
+ public function rewind()
97
+ {
98
+ $this->seek(0);
99
+ }
100
+
101
+ public function seek($offset, $whence = SEEK_SET)
102
+ {
103
+ throw new \RuntimeException('Cannot seek a PumpStream');
104
+ }
105
+
106
+ public function isWritable()
107
+ {
108
+ return false;
109
+ }
110
+
111
+ public function write($string)
112
+ {
113
+ throw new \RuntimeException('Cannot write to a PumpStream');
114
+ }
115
+
116
+ public function isReadable()
117
+ {
118
+ return true;
119
+ }
120
+
121
+ public function read($length)
122
+ {
123
+ $data = $this->buffer->read($length);
124
+ $readLen = strlen($data);
125
+ $this->tellPos += $readLen;
126
+ $remaining = $length - $readLen;
127
+
128
+ if ($remaining) {
129
+ $this->pump($remaining);
130
+ $data .= $this->buffer->read($remaining);
131
+ $this->tellPos += strlen($data) - $readLen;
132
+ }
133
+
134
+ return $data;
135
+ }
136
+
137
+ public function getContents()
138
+ {
139
+ $result = '';
140
+ while (!$this->eof()) {
141
+ $result .= $this->read(1000000);
142
+ }
143
+
144
+ return $result;
145
+ }
146
+
147
+ public function getMetadata($key = null)
148
+ {
149
+ if (!$key) {
150
+ return $this->metadata;
151
+ }
152
+
153
+ return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
154
+ }
155
+
156
+ private function pump($length)
157
+ {
158
+ if ($this->source) {
159
+ do {
160
+ $data = call_user_func($this->source, $length);
161
+ if ($data === false || $data === null) {
162
+ $this->source = null;
163
+ return;
164
+ }
165
+ $this->buffer->write($data);
166
+ $length -= strlen($data);
167
+ } while ($length > 0);
168
+ }
169
+ }
170
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Query.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Query
6
+ {
7
+ /**
8
+ * Parse a query string into an associative array.
9
+ *
10
+ * If multiple values are found for the same key, the value of that key
11
+ * value pair will become an array. This function does not parse nested
12
+ * PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
13
+ * will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
14
+ *
15
+ * @param string $str Query string to parse
16
+ * @param int|bool $urlEncoding How the query string is encoded
17
+ *
18
+ * @return array
19
+ */
20
+ public static function parse($str, $urlEncoding = true)
21
+ {
22
+ $result = [];
23
+
24
+ if ($str === '') {
25
+ return $result;
26
+ }
27
+
28
+ if ($urlEncoding === true) {
29
+ $decoder = function ($value) {
30
+ return rawurldecode(str_replace('+', ' ', $value));
31
+ };
32
+ } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
33
+ $decoder = 'rawurldecode';
34
+ } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
35
+ $decoder = 'urldecode';
36
+ } else {
37
+ $decoder = function ($str) {
38
+ return $str;
39
+ };
40
+ }
41
+
42
+ foreach (explode('&', $str) as $kvp) {
43
+ $parts = explode('=', $kvp, 2);
44
+ $key = $decoder($parts[0]);
45
+ $value = isset($parts[1]) ? $decoder($parts[1]) : null;
46
+ if (!isset($result[$key])) {
47
+ $result[$key] = $value;
48
+ } else {
49
+ if (!is_array($result[$key])) {
50
+ $result[$key] = [$result[$key]];
51
+ }
52
+ $result[$key][] = $value;
53
+ }
54
+ }
55
+
56
+ return $result;
57
+ }
58
+
59
+ /**
60
+ * Build a query string from an array of key value pairs.
61
+ *
62
+ * This function can use the return value of `parse()` to build a query
63
+ * string. This function does not modify the provided keys when an array is
64
+ * encountered (like `http_build_query()` would).
65
+ *
66
+ * @param array $params Query string parameters.
67
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
68
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
69
+ * to encode using RFC1738.
70
+ *
71
+ * @return string
72
+ */
73
+ public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
74
+ {
75
+ if (!$params) {
76
+ return '';
77
+ }
78
+
79
+ if ($encoding === false) {
80
+ $encoder = function ($str) {
81
+ return $str;
82
+ };
83
+ } elseif ($encoding === PHP_QUERY_RFC3986) {
84
+ $encoder = 'rawurlencode';
85
+ } elseif ($encoding === PHP_QUERY_RFC1738) {
86
+ $encoder = 'urlencode';
87
+ } else {
88
+ throw new \InvalidArgumentException('Invalid type');
89
+ }
90
+
91
+ $qs = '';
92
+ foreach ($params as $k => $v) {
93
+ $k = $encoder($k);
94
+ if (!is_array($v)) {
95
+ $qs .= $k;
96
+ if ($v !== null) {
97
+ $qs .= '=' . $encoder($v);
98
+ }
99
+ $qs .= '&';
100
+ } else {
101
+ foreach ($v as $vv) {
102
+ $qs .= $k;
103
+ if ($vv !== null) {
104
+ $qs .= '=' . $encoder($vv);
105
+ }
106
+ $qs .= '&';
107
+ }
108
+ }
109
+ }
110
+
111
+ return $qs ? (string) substr($qs, 0, -1) : '';
112
+ }
113
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Request.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use InvalidArgumentException;
6
+ use Psr\Http\Message\RequestInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ /**
11
+ * PSR-7 request implementation.
12
+ */
13
+ class Request implements RequestInterface
14
+ {
15
+ use MessageTrait;
16
+
17
+ /** @var string */
18
+ private $method;
19
+
20
+ /** @var string|null */
21
+ private $requestTarget;
22
+
23
+ /** @var UriInterface */
24
+ private $uri;
25
+
26
+ /**
27
+ * @param string $method HTTP method
28
+ * @param string|UriInterface $uri URI
29
+ * @param array $headers Request headers
30
+ * @param string|resource|StreamInterface|null $body Request body
31
+ * @param string $version Protocol version
32
+ */
33
+ public function __construct(
34
+ $method,
35
+ $uri,
36
+ array $headers = [],
37
+ $body = null,
38
+ $version = '1.1'
39
+ ) {
40
+ $this->assertMethod($method);
41
+ if (!($uri instanceof UriInterface)) {
42
+ $uri = new Uri($uri);
43
+ }
44
+
45
+ $this->method = strtoupper($method);
46
+ $this->uri = $uri;
47
+ $this->setHeaders($headers);
48
+ $this->protocol = $version;
49
+
50
+ if (!isset($this->headerNames['host'])) {
51
+ $this->updateHostFromUri();
52
+ }
53
+
54
+ if ($body !== '' && $body !== null) {
55
+ $this->stream = Utils::streamFor($body);
56
+ }
57
+ }
58
+
59
+ public function getRequestTarget()
60
+ {
61
+ if ($this->requestTarget !== null) {
62
+ return $this->requestTarget;
63
+ }
64
+
65
+ $target = $this->uri->getPath();
66
+ if ($target == '') {
67
+ $target = '/';
68
+ }
69
+ if ($this->uri->getQuery() != '') {
70
+ $target .= '?' . $this->uri->getQuery();
71
+ }
72
+
73
+ return $target;
74
+ }
75
+
76
+ public function withRequestTarget($requestTarget)
77
+ {
78
+ if (preg_match('#\s#', $requestTarget)) {
79
+ throw new InvalidArgumentException(
80
+ 'Invalid request target provided; cannot contain whitespace'
81
+ );
82
+ }
83
+
84
+ $new = clone $this;
85
+ $new->requestTarget = $requestTarget;
86
+ return $new;
87
+ }
88
+
89
+ public function getMethod()
90
+ {
91
+ return $this->method;
92
+ }
93
+
94
+ public function withMethod($method)
95
+ {
96
+ $this->assertMethod($method);
97
+ $new = clone $this;
98
+ $new->method = strtoupper($method);
99
+ return $new;
100
+ }
101
+
102
+ public function getUri()
103
+ {
104
+ return $this->uri;
105
+ }
106
+
107
+ public function withUri(UriInterface $uri, $preserveHost = false)
108
+ {
109
+ if ($uri === $this->uri) {
110
+ return $this;
111
+ }
112
+
113
+ $new = clone $this;
114
+ $new->uri = $uri;
115
+
116
+ if (!$preserveHost || !isset($this->headerNames['host'])) {
117
+ $new->updateHostFromUri();
118
+ }
119
+
120
+ return $new;
121
+ }
122
+
123
+ private function updateHostFromUri()
124
+ {
125
+ $host = $this->uri->getHost();
126
+
127
+ if ($host == '') {
128
+ return;
129
+ }
130
+
131
+ if (($port = $this->uri->getPort()) !== null) {
132
+ $host .= ':' . $port;
133
+ }
134
+
135
+ if (isset($this->headerNames['host'])) {
136
+ $header = $this->headerNames['host'];
137
+ } else {
138
+ $header = 'Host';
139
+ $this->headerNames['host'] = 'Host';
140
+ }
141
+ // Ensure Host is the first header.
142
+ // See: http://tools.ietf.org/html/rfc7230#section-5.4
143
+ $this->headers = [$header => [$host]] + $this->headers;
144
+ }
145
+
146
+ private function assertMethod($method)
147
+ {
148
+ if (!is_string($method) || $method === '') {
149
+ throw new \InvalidArgumentException('Method must be a non-empty string.');
150
+ }
151
+ }
152
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Response.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\ResponseInterface;
6
+ use Psr\Http\Message\StreamInterface;
7
+
8
+ /**
9
+ * PSR-7 response implementation.
10
+ */
11
+ class Response implements ResponseInterface
12
+ {
13
+ use MessageTrait;
14
+
15
+ /** @var array Map of standard HTTP status code/reason phrases */
16
+ private static $phrases = [
17
+ 100 => 'Continue',
18
+ 101 => 'Switching Protocols',
19
+ 102 => 'Processing',
20
+ 200 => 'OK',
21
+ 201 => 'Created',
22
+ 202 => 'Accepted',
23
+ 203 => 'Non-Authoritative Information',
24
+ 204 => 'No Content',
25
+ 205 => 'Reset Content',
26
+ 206 => 'Partial Content',
27
+ 207 => 'Multi-status',
28
+ 208 => 'Already Reported',
29
+ 300 => 'Multiple Choices',
30
+ 301 => 'Moved Permanently',
31
+ 302 => 'Found',
32
+ 303 => 'See Other',
33
+ 304 => 'Not Modified',
34
+ 305 => 'Use Proxy',
35
+ 306 => 'Switch Proxy',
36
+ 307 => 'Temporary Redirect',
37
+ 400 => 'Bad Request',
38
+ 401 => 'Unauthorized',
39
+ 402 => 'Payment Required',
40
+ 403 => 'Forbidden',
41
+ 404 => 'Not Found',
42
+ 405 => 'Method Not Allowed',
43
+ 406 => 'Not Acceptable',
44
+ 407 => 'Proxy Authentication Required',
45
+ 408 => 'Request Time-out',
46
+ 409 => 'Conflict',
47
+ 410 => 'Gone',
48
+ 411 => 'Length Required',
49
+ 412 => 'Precondition Failed',
50
+ 413 => 'Request Entity Too Large',
51
+ 414 => 'Request-URI Too Large',
52
+ 415 => 'Unsupported Media Type',
53
+ 416 => 'Requested range not satisfiable',
54
+ 417 => 'Expectation Failed',
55
+ 418 => 'I\'m a teapot',
56
+ 422 => 'Unprocessable Entity',
57
+ 423 => 'Locked',
58
+ 424 => 'Failed Dependency',
59
+ 425 => 'Unordered Collection',
60
+ 426 => 'Upgrade Required',
61
+ 428 => 'Precondition Required',
62
+ 429 => 'Too Many Requests',
63
+ 431 => 'Request Header Fields Too Large',
64
+ 451 => 'Unavailable For Legal Reasons',
65
+ 500 => 'Internal Server Error',
66
+ 501 => 'Not Implemented',
67
+ 502 => 'Bad Gateway',
68
+ 503 => 'Service Unavailable',
69
+ 504 => 'Gateway Time-out',
70
+ 505 => 'HTTP Version not supported',
71
+ 506 => 'Variant Also Negotiates',
72
+ 507 => 'Insufficient Storage',
73
+ 508 => 'Loop Detected',
74
+ 511 => 'Network Authentication Required',
75
+ ];
76
+
77
+ /** @var string */
78
+ private $reasonPhrase = '';
79
+
80
+ /** @var int */
81
+ private $statusCode = 200;
82
+
83
+ /**
84
+ * @param int $status Status code
85
+ * @param array $headers Response headers
86
+ * @param string|resource|StreamInterface|null $body Response body
87
+ * @param string $version Protocol version
88
+ * @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
89
+ */
90
+ public function __construct(
91
+ $status = 200,
92
+ array $headers = [],
93
+ $body = null,
94
+ $version = '1.1',
95
+ $reason = null
96
+ ) {
97
+ $this->assertStatusCodeIsInteger($status);
98
+ $status = (int) $status;
99
+ $this->assertStatusCodeRange($status);
100
+
101
+ $this->statusCode = $status;
102
+
103
+ if ($body !== '' && $body !== null) {
104
+ $this->stream = Utils::streamFor($body);
105
+ }
106
+
107
+ $this->setHeaders($headers);
108
+ if ($reason == '' && isset(self::$phrases[$this->statusCode])) {
109
+ $this->reasonPhrase = self::$phrases[$this->statusCode];
110
+ } else {
111
+ $this->reasonPhrase = (string) $reason;
112
+ }
113
+
114
+ $this->protocol = $version;
115
+ }
116
+
117
+ public function getStatusCode()
118
+ {
119
+ return $this->statusCode;
120
+ }
121
+
122
+ public function getReasonPhrase()
123
+ {
124
+ return $this->reasonPhrase;
125
+ }
126
+
127
+ public function withStatus($code, $reasonPhrase = '')
128
+ {
129
+ $this->assertStatusCodeIsInteger($code);
130
+ $code = (int) $code;
131
+ $this->assertStatusCodeRange($code);
132
+
133
+ $new = clone $this;
134
+ $new->statusCode = $code;
135
+ if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
136
+ $reasonPhrase = self::$phrases[$new->statusCode];
137
+ }
138
+ $new->reasonPhrase = (string) $reasonPhrase;
139
+ return $new;
140
+ }
141
+
142
+ private function assertStatusCodeIsInteger($statusCode)
143
+ {
144
+ if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
145
+ throw new \InvalidArgumentException('Status code must be an integer value.');
146
+ }
147
+ }
148
+
149
+ private function assertStatusCodeRange($statusCode)
150
+ {
151
+ if ($statusCode < 100 || $statusCode >= 600) {
152
+ throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
153
+ }
154
+ }
155
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Rfc7230.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Rfc7230
6
+ {
7
+ /**
8
+ * Header related regular expressions (copied from amphp/http package)
9
+ * (Note: once we require PHP 7.x we could just depend on the upstream package)
10
+ *
11
+ * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
12
+ *
13
+ * @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
14
+ *
15
+ * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
16
+ */
17
+ const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
18
+ const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
19
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/ServerRequest.php ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use InvalidArgumentException;
6
+ use Psr\Http\Message\ServerRequestInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+ use Psr\Http\Message\UploadedFileInterface;
9
+ use Psr\Http\Message\UriInterface;
10
+
11
+ /**
12
+ * Server-side HTTP request
13
+ *
14
+ * Extends the Request definition to add methods for accessing incoming data,
15
+ * specifically server parameters, cookies, matched path parameters, query
16
+ * string arguments, body parameters, and upload file information.
17
+ *
18
+ * "Attributes" are discovered via decomposing the request (and usually
19
+ * specifically the URI path), and typically will be injected by the application.
20
+ *
21
+ * Requests are considered immutable; all methods that might change state are
22
+ * implemented such that they retain the internal state of the current
23
+ * message and return a new instance that contains the changed state.
24
+ */
25
+ class ServerRequest extends Request implements ServerRequestInterface
26
+ {
27
+ /**
28
+ * @var array
29
+ */
30
+ private $attributes = [];
31
+
32
+ /**
33
+ * @var array
34
+ */
35
+ private $cookieParams = [];
36
+
37
+ /**
38
+ * @var array|object|null
39
+ */
40
+ private $parsedBody;
41
+
42
+ /**
43
+ * @var array
44
+ */
45
+ private $queryParams = [];
46
+
47
+ /**
48
+ * @var array
49
+ */
50
+ private $serverParams;
51
+
52
+ /**
53
+ * @var array
54
+ */
55
+ private $uploadedFiles = [];
56
+
57
+ /**
58
+ * @param string $method HTTP method
59
+ * @param string|UriInterface $uri URI
60
+ * @param array $headers Request headers
61
+ * @param string|resource|StreamInterface|null $body Request body
62
+ * @param string $version Protocol version
63
+ * @param array $serverParams Typically the $_SERVER superglobal
64
+ */
65
+ public function __construct(
66
+ $method,
67
+ $uri,
68
+ array $headers = [],
69
+ $body = null,
70
+ $version = '1.1',
71
+ array $serverParams = []
72
+ ) {
73
+ $this->serverParams = $serverParams;
74
+
75
+ parent::__construct($method, $uri, $headers, $body, $version);
76
+ }
77
+
78
+ /**
79
+ * Return an UploadedFile instance array.
80
+ *
81
+ * @param array $files A array which respect $_FILES structure
82
+ *
83
+ * @return array
84
+ *
85
+ * @throws InvalidArgumentException for unrecognized values
86
+ */
87
+ public static function normalizeFiles(array $files)
88
+ {
89
+ $normalized = [];
90
+
91
+ foreach ($files as $key => $value) {
92
+ if ($value instanceof UploadedFileInterface) {
93
+ $normalized[$key] = $value;
94
+ } elseif (is_array($value) && isset($value['tmp_name'])) {
95
+ $normalized[$key] = self::createUploadedFileFromSpec($value);
96
+ } elseif (is_array($value)) {
97
+ $normalized[$key] = self::normalizeFiles($value);
98
+ continue;
99
+ } else {
100
+ throw new InvalidArgumentException('Invalid value in files specification');
101
+ }
102
+ }
103
+
104
+ return $normalized;
105
+ }
106
+
107
+ /**
108
+ * Create and return an UploadedFile instance from a $_FILES specification.
109
+ *
110
+ * If the specification represents an array of values, this method will
111
+ * delegate to normalizeNestedFileSpec() and return that return value.
112
+ *
113
+ * @param array $value $_FILES struct
114
+ *
115
+ * @return array|UploadedFileInterface
116
+ */
117
+ private static function createUploadedFileFromSpec(array $value)
118
+ {
119
+ if (is_array($value['tmp_name'])) {
120
+ return self::normalizeNestedFileSpec($value);
121
+ }
122
+
123
+ return new UploadedFile(
124
+ $value['tmp_name'],
125
+ (int) $value['size'],
126
+ (int) $value['error'],
127
+ $value['name'],
128
+ $value['type']
129
+ );
130
+ }
131
+
132
+ /**
133
+ * Normalize an array of file specifications.
134
+ *
135
+ * Loops through all nested files and returns a normalized array of
136
+ * UploadedFileInterface instances.
137
+ *
138
+ * @param array $files
139
+ *
140
+ * @return UploadedFileInterface[]
141
+ */
142
+ private static function normalizeNestedFileSpec(array $files = [])
143
+ {
144
+ $normalizedFiles = [];
145
+
146
+ foreach (array_keys($files['tmp_name']) as $key) {
147
+ $spec = [
148
+ 'tmp_name' => $files['tmp_name'][$key],
149
+ 'size' => $files['size'][$key],
150
+ 'error' => $files['error'][$key],
151
+ 'name' => $files['name'][$key],
152
+ 'type' => $files['type'][$key],
153
+ ];
154
+ $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
155
+ }
156
+
157
+ return $normalizedFiles;
158
+ }
159
+
160
+ /**
161
+ * Return a ServerRequest populated with superglobals:
162
+ * $_GET
163
+ * $_POST
164
+ * $_COOKIE
165
+ * $_FILES
166
+ * $_SERVER
167
+ *
168
+ * @return ServerRequestInterface
169
+ */
170
+ public static function fromGlobals()
171
+ {
172
+ $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
173
+ $headers = getallheaders();
174
+ $uri = self::getUriFromGlobals();
175
+ $body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
176
+ $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
177
+
178
+ $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
179
+
180
+ return $serverRequest
181
+ ->withCookieParams($_COOKIE)
182
+ ->withQueryParams($_GET)
183
+ ->withParsedBody($_POST)
184
+ ->withUploadedFiles(self::normalizeFiles($_FILES));
185
+ }
186
+
187
+ private static function extractHostAndPortFromAuthority($authority)
188
+ {
189
+ $uri = 'http://' . $authority;
190
+ $parts = parse_url($uri);
191
+ if (false === $parts) {
192
+ return [null, null];
193
+ }
194
+
195
+ $host = isset($parts['host']) ? $parts['host'] : null;
196
+ $port = isset($parts['port']) ? $parts['port'] : null;
197
+
198
+ return [$host, $port];
199
+ }
200
+
201
+ /**
202
+ * Get a Uri populated with values from $_SERVER.
203
+ *
204
+ * @return UriInterface
205
+ */
206
+ public static function getUriFromGlobals()
207
+ {
208
+ $uri = new Uri('');
209
+
210
+ $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
211
+
212
+ $hasPort = false;
213
+ if (isset($_SERVER['HTTP_HOST'])) {
214
+ list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']);
215
+ if ($host !== null) {
216
+ $uri = $uri->withHost($host);
217
+ }
218
+
219
+ if ($port !== null) {
220
+ $hasPort = true;
221
+ $uri = $uri->withPort($port);
222
+ }
223
+ } elseif (isset($_SERVER['SERVER_NAME'])) {
224
+ $uri = $uri->withHost($_SERVER['SERVER_NAME']);
225
+ } elseif (isset($_SERVER['SERVER_ADDR'])) {
226
+ $uri = $uri->withHost($_SERVER['SERVER_ADDR']);
227
+ }
228
+
229
+ if (!$hasPort && isset($_SERVER['SERVER_PORT'])) {
230
+ $uri = $uri->withPort($_SERVER['SERVER_PORT']);
231
+ }
232
+
233
+ $hasQuery = false;
234
+ if (isset($_SERVER['REQUEST_URI'])) {
235
+ $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2);
236
+ $uri = $uri->withPath($requestUriParts[0]);
237
+ if (isset($requestUriParts[1])) {
238
+ $hasQuery = true;
239
+ $uri = $uri->withQuery($requestUriParts[1]);
240
+ }
241
+ }
242
+
243
+ if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) {
244
+ $uri = $uri->withQuery($_SERVER['QUERY_STRING']);
245
+ }
246
+
247
+ return $uri;
248
+ }
249
+
250
+ /**
251
+ * {@inheritdoc}
252
+ */
253
+ public function getServerParams()
254
+ {
255
+ return $this->serverParams;
256
+ }
257
+
258
+ /**
259
+ * {@inheritdoc}
260
+ */
261
+ public function getUploadedFiles()
262
+ {
263
+ return $this->uploadedFiles;
264
+ }
265
+
266
+ /**
267
+ * {@inheritdoc}
268
+ */
269
+ public function withUploadedFiles(array $uploadedFiles)
270
+ {
271
+ $new = clone $this;
272
+ $new->uploadedFiles = $uploadedFiles;
273
+
274
+ return $new;
275
+ }
276
+
277
+ /**
278
+ * {@inheritdoc}
279
+ */
280
+ public function getCookieParams()
281
+ {
282
+ return $this->cookieParams;
283
+ }
284
+
285
+ /**
286
+ * {@inheritdoc}
287
+ */
288
+ public function withCookieParams(array $cookies)
289
+ {
290
+ $new = clone $this;
291
+ $new->cookieParams = $cookies;
292
+
293
+ return $new;
294
+ }
295
+
296
+ /**
297
+ * {@inheritdoc}
298
+ */
299
+ public function getQueryParams()
300
+ {
301
+ return $this->queryParams;
302
+ }
303
+
304
+ /**
305
+ * {@inheritdoc}
306
+ */
307
+ public function withQueryParams(array $query)
308
+ {
309
+ $new = clone $this;
310
+ $new->queryParams = $query;
311
+
312
+ return $new;
313
+ }
314
+
315
+ /**
316
+ * {@inheritdoc}
317
+ */
318
+ public function getParsedBody()
319
+ {
320
+ return $this->parsedBody;
321
+ }
322
+
323
+ /**
324
+ * {@inheritdoc}
325
+ */
326
+ public function withParsedBody($data)
327
+ {
328
+ $new = clone $this;
329
+ $new->parsedBody = $data;
330
+
331
+ return $new;
332
+ }
333
+
334
+ /**
335
+ * {@inheritdoc}
336
+ */
337
+ public function getAttributes()
338
+ {
339
+ return $this->attributes;
340
+ }
341
+
342
+ /**
343
+ * {@inheritdoc}
344
+ */
345
+ public function getAttribute($attribute, $default = null)
346
+ {
347
+ if (false === array_key_exists($attribute, $this->attributes)) {
348
+ return $default;
349
+ }
350
+
351
+ return $this->attributes[$attribute];
352
+ }
353
+
354
+ /**
355
+ * {@inheritdoc}
356
+ */
357
+ public function withAttribute($attribute, $value)
358
+ {
359
+ $new = clone $this;
360
+ $new->attributes[$attribute] = $value;
361
+
362
+ return $new;
363
+ }
364
+
365
+ /**
366
+ * {@inheritdoc}
367
+ */
368
+ public function withoutAttribute($attribute)
369
+ {
370
+ if (false === array_key_exists($attribute, $this->attributes)) {
371
+ return $this;
372
+ }
373
+
374
+ $new = clone $this;
375
+ unset($new->attributes[$attribute]);
376
+
377
+ return $new;
378
+ }
379
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Stream.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * PHP stream implementation.
9
+ *
10
+ * @var $stream
11
+ */
12
+ class Stream implements StreamInterface
13
+ {
14
+ /**
15
+ * Resource modes.
16
+ *
17
+ * @var string
18
+ *
19
+ * @see http://php.net/manual/function.fopen.php
20
+ * @see http://php.net/manual/en/function.gzopen.php
21
+ */
22
+ const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
23
+ const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
24
+
25
+ private $stream;
26
+ private $size;
27
+ private $seekable;
28
+ private $readable;
29
+ private $writable;
30
+ private $uri;
31
+ private $customMetadata;
32
+
33
+ /**
34
+ * This constructor accepts an associative array of options.
35
+ *
36
+ * - size: (int) If a read stream would otherwise have an indeterminate
37
+ * size, but the size is known due to foreknowledge, then you can
38
+ * provide that size, in bytes.
39
+ * - metadata: (array) Any additional metadata to return when the metadata
40
+ * of the stream is accessed.
41
+ *
42
+ * @param resource $stream Stream resource to wrap.
43
+ * @param array $options Associative array of options.
44
+ *
45
+ * @throws \InvalidArgumentException if the stream is not a stream resource
46
+ */
47
+ public function __construct($stream, $options = [])
48
+ {
49
+ if (!is_resource($stream)) {
50
+ throw new \InvalidArgumentException('Stream must be a resource');
51
+ }
52
+
53
+ if (isset($options['size'])) {
54
+ $this->size = $options['size'];
55
+ }
56
+
57
+ $this->customMetadata = isset($options['metadata'])
58
+ ? $options['metadata']
59
+ : [];
60
+
61
+ $this->stream = $stream;
62
+ $meta = stream_get_meta_data($this->stream);
63
+ $this->seekable = $meta['seekable'];
64
+ $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
65
+ $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
66
+ $this->uri = $this->getMetadata('uri');
67
+ }
68
+
69
+ /**
70
+ * Closes the stream when the destructed
71
+ */
72
+ public function __destruct()
73
+ {
74
+ $this->close();
75
+ }
76
+
77
+ public function __toString()
78
+ {
79
+ try {
80
+ if ($this->isSeekable()) {
81
+ $this->seek(0);
82
+ }
83
+ return $this->getContents();
84
+ } catch (\Exception $e) {
85
+ return '';
86
+ }
87
+ }
88
+
89
+ public function getContents()
90
+ {
91
+ if (!isset($this->stream)) {
92
+ throw new \RuntimeException('Stream is detached');
93
+ }
94
+
95
+ $contents = stream_get_contents($this->stream);
96
+
97
+ if ($contents === false) {
98
+ throw new \RuntimeException('Unable to read stream contents');
99
+ }
100
+
101
+ return $contents;
102
+ }
103
+
104
+ public function close()
105
+ {
106
+ if (isset($this->stream)) {
107
+ if (is_resource($this->stream)) {
108
+ fclose($this->stream);
109
+ }
110
+ $this->detach();
111
+ }
112
+ }
113
+
114
+ public function detach()
115
+ {
116
+ if (!isset($this->stream)) {
117
+ return null;
118
+ }
119
+
120
+ $result = $this->stream;
121
+ unset($this->stream);
122
+ $this->size = $this->uri = null;
123
+ $this->readable = $this->writable = $this->seekable = false;
124
+
125
+ return $result;
126
+ }
127
+
128
+ public function getSize()
129
+ {
130
+ if ($this->size !== null) {
131
+ return $this->size;
132
+ }
133
+
134
+ if (!isset($this->stream)) {
135
+ return null;
136
+ }
137
+
138
+ // Clear the stat cache if the stream has a URI
139
+ if ($this->uri) {
140
+ clearstatcache(true, $this->uri);
141
+ }
142
+
143
+ $stats = fstat($this->stream);
144
+ if (isset($stats['size'])) {
145
+ $this->size = $stats['size'];
146
+ return $this->size;
147
+ }
148
+
149
+ return null;
150
+ }
151
+
152
+ public function isReadable()
153
+ {
154
+ return $this->readable;
155
+ }
156
+
157
+ public function isWritable()
158
+ {
159
+ return $this->writable;
160
+ }
161
+
162
+ public function isSeekable()
163
+ {
164
+ return $this->seekable;
165
+ }
166
+
167
+ public function eof()
168
+ {
169
+ if (!isset($this->stream)) {
170
+ throw new \RuntimeException('Stream is detached');
171
+ }
172
+
173
+ return feof($this->stream);
174
+ }
175
+
176
+ public function tell()
177
+ {
178
+ if (!isset($this->stream)) {
179
+ throw new \RuntimeException('Stream is detached');
180
+ }
181
+
182
+ $result = ftell($this->stream);
183
+
184
+ if ($result === false) {
185
+ throw new \RuntimeException('Unable to determine stream position');
186
+ }
187
+
188
+ return $result;
189
+ }
190
+
191
+ public function rewind()
192
+ {
193
+ $this->seek(0);
194
+ }
195
+
196
+ public function seek($offset, $whence = SEEK_SET)
197
+ {
198
+ $whence = (int) $whence;
199
+
200
+ if (!isset($this->stream)) {
201
+ throw new \RuntimeException('Stream is detached');
202
+ }
203
+ if (!$this->seekable) {
204
+ throw new \RuntimeException('Stream is not seekable');
205
+ }
206
+ if (fseek($this->stream, $offset, $whence) === -1) {
207
+ throw new \RuntimeException('Unable to seek to stream position '
208
+ . $offset . ' with whence ' . var_export($whence, true));
209
+ }
210
+ }
211
+
212
+ public function read($length)
213
+ {
214
+ if (!isset($this->stream)) {
215
+ throw new \RuntimeException('Stream is detached');
216
+ }
217
+ if (!$this->readable) {
218
+ throw new \RuntimeException('Cannot read from non-readable stream');
219
+ }
220
+ if ($length < 0) {
221
+ throw new \RuntimeException('Length parameter cannot be negative');
222
+ }
223
+
224
+ if (0 === $length) {
225
+ return '';
226
+ }
227
+
228
+ $string = fread($this->stream, $length);
229
+ if (false === $string) {
230
+ throw new \RuntimeException('Unable to read from stream');
231
+ }
232
+
233
+ return $string;
234
+ }
235
+
236
+ public function write($string)
237
+ {
238
+ if (!isset($this->stream)) {
239
+ throw new \RuntimeException('Stream is detached');
240
+ }
241
+ if (!$this->writable) {
242
+ throw new \RuntimeException('Cannot write to a non-writable stream');
243
+ }
244
+
245
+ // We can't know the size after writing anything
246
+ $this->size = null;
247
+ $result = fwrite($this->stream, $string);
248
+
249
+ if ($result === false) {
250
+ throw new \RuntimeException('Unable to write to stream');
251
+ }
252
+
253
+ return $result;
254
+ }
255
+
256
+ public function getMetadata($key = null)
257
+ {
258
+ if (!isset($this->stream)) {
259
+ return $key ? null : [];
260
+ } elseif (!$key) {
261
+ return $this->customMetadata + stream_get_meta_data($this->stream);
262
+ } elseif (isset($this->customMetadata[$key])) {
263
+ return $this->customMetadata[$key];
264
+ }
265
+
266
+ $meta = stream_get_meta_data($this->stream);
267
+
268
+ return isset($meta[$key]) ? $meta[$key] : null;
269
+ }
270
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Stream decorator trait
9
+ *
10
+ * @property StreamInterface stream
11
+ */
12
+ trait StreamDecoratorTrait
13
+ {
14
+ /**
15
+ * @param StreamInterface $stream Stream to decorate
16
+ */
17
+ public function __construct(StreamInterface $stream)
18
+ {
19
+ $this->stream = $stream;
20
+ }
21
+
22
+ /**
23
+ * Magic method used to create a new stream if streams are not added in
24
+ * the constructor of a decorator (e.g., LazyOpenStream).
25
+ *
26
+ * @param string $name Name of the property (allows "stream" only).
27
+ *
28
+ * @return StreamInterface
29
+ */
30
+ public function __get($name)
31
+ {
32
+ if ($name == 'stream') {
33
+ $this->stream = $this->createStream();
34
+ return $this->stream;
35
+ }
36
+
37
+ throw new \UnexpectedValueException("$name not found on class");
38
+ }
39
+
40
+ public function __toString()
41
+ {
42
+ try {
43
+ if ($this->isSeekable()) {
44
+ $this->seek(0);
45
+ }
46
+ return $this->getContents();
47
+ } catch (\Exception $e) {
48
+ // Really, PHP? https://bugs.php.net/bug.php?id=53648
49
+ trigger_error('StreamDecorator::__toString exception: '
50
+ . (string) $e, E_USER_ERROR);
51
+ return '';
52
+ }
53
+ }
54
+
55
+ public function getContents()
56
+ {
57
+ return Utils::copyToString($this);
58
+ }
59
+
60
+ /**
61
+ * Allow decorators to implement custom methods
62
+ *
63
+ * @param string $method Missing method name
64
+ * @param array $args Method arguments
65
+ *
66
+ * @return mixed
67
+ */
68
+ public function __call($method, array $args)
69
+ {
70
+ $result = call_user_func_array([$this->stream, $method], $args);
71
+
72
+ // Always return the wrapped object if the result is a return $this
73
+ return $result === $this->stream ? $this : $result;
74
+ }
75
+
76
+ public function close()
77
+ {
78
+ $this->stream->close();
79
+ }
80
+
81
+ public function getMetadata($key = null)
82
+ {
83
+ return $this->stream->getMetadata($key);
84
+ }
85
+
86
+ public function detach()
87
+ {
88
+ return $this->stream->detach();
89
+ }
90
+
91
+ public function getSize()
92
+ {
93
+ return $this->stream->getSize();
94
+ }
95
+
96
+ public function eof()
97
+ {
98
+ return $this->stream->eof();
99
+ }
100
+
101
+ public function tell()
102
+ {
103
+ return $this->stream->tell();
104
+ }
105
+
106
+ public function isReadable()
107
+ {
108
+ return $this->stream->isReadable();
109
+ }
110
+
111
+ public function isWritable()
112
+ {
113
+ return $this->stream->isWritable();
114
+ }
115
+
116
+ public function isSeekable()
117
+ {
118
+ return $this->stream->isSeekable();
119
+ }
120
+
121
+ public function rewind()
122
+ {
123
+ $this->seek(0);
124
+ }
125
+
126
+ public function seek($offset, $whence = SEEK_SET)
127
+ {
128
+ $this->stream->seek($offset, $whence);
129
+ }
130
+
131
+ public function read($length)
132
+ {
133
+ return $this->stream->read($length);
134
+ }
135
+
136
+ public function write($string)
137
+ {
138
+ return $this->stream->write($string);
139
+ }
140
+
141
+ /**
142
+ * Implement in subclasses to dynamically create streams when requested.
143
+ *
144
+ * @return StreamInterface
145
+ *
146
+ * @throws \BadMethodCallException
147
+ */
148
+ protected function createStream()
149
+ {
150
+ throw new \BadMethodCallException('Not implemented');
151
+ }
152
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/StreamWrapper.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\StreamInterface;
6
+
7
+ /**
8
+ * Converts Guzzle streams into PHP stream resources.
9
+ *
10
+ * @final
11
+ */
12
+ class StreamWrapper
13
+ {
14
+ /** @var resource */
15
+ public $context;
16
+
17
+ /** @var StreamInterface */
18
+ private $stream;
19
+
20
+ /** @var string r, r+, or w */
21
+ private $mode;
22
+
23
+ /**
24
+ * Returns a resource representing the stream.
25
+ *
26
+ * @param StreamInterface $stream The stream to get a resource for
27
+ *
28
+ * @return resource
29
+ *
30
+ * @throws \InvalidArgumentException if stream is not readable or writable
31
+ */
32
+ public static function getResource(StreamInterface $stream)
33
+ {
34
+ self::register();
35
+
36
+ if ($stream->isReadable()) {
37
+ $mode = $stream->isWritable() ? 'r+' : 'r';
38
+ } elseif ($stream->isWritable()) {
39
+ $mode = 'w';
40
+ } else {
41
+ throw new \InvalidArgumentException('The stream must be readable, '
42
+ . 'writable, or both.');
43
+ }
44
+
45
+ return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
46
+ }
47
+
48
+ /**
49
+ * Creates a stream context that can be used to open a stream as a php stream resource.
50
+ *
51
+ * @param StreamInterface $stream
52
+ *
53
+ * @return resource
54
+ */
55
+ public static function createStreamContext(StreamInterface $stream)
56
+ {
57
+ return stream_context_create([
58
+ 'guzzle' => ['stream' => $stream]
59
+ ]);
60
+ }
61
+
62
+ /**
63
+ * Registers the stream wrapper if needed
64
+ */
65
+ public static function register()
66
+ {
67
+ if (!in_array('guzzle', stream_get_wrappers())) {
68
+ stream_wrapper_register('guzzle', __CLASS__);
69
+ }
70
+ }
71
+
72
+ public function stream_open($path, $mode, $options, &$opened_path)
73
+ {
74
+ $options = stream_context_get_options($this->context);
75
+
76
+ if (!isset($options['guzzle']['stream'])) {
77
+ return false;
78
+ }
79
+
80
+ $this->mode = $mode;
81
+ $this->stream = $options['guzzle']['stream'];
82
+
83
+ return true;
84
+ }
85
+
86
+ public function stream_read($count)
87
+ {
88
+ return $this->stream->read($count);
89
+ }
90
+
91
+ public function stream_write($data)
92
+ {
93
+ return (int) $this->stream->write($data);
94
+ }
95
+
96
+ public function stream_tell()
97
+ {
98
+ return $this->stream->tell();
99
+ }
100
+
101
+ public function stream_eof()
102
+ {
103
+ return $this->stream->eof();
104
+ }
105
+
106
+ public function stream_seek($offset, $whence)
107
+ {
108
+ $this->stream->seek($offset, $whence);
109
+
110
+ return true;
111
+ }
112
+
113
+ public function stream_cast($cast_as)
114
+ {
115
+ $stream = clone($this->stream);
116
+
117
+ return $stream->detach();
118
+ }
119
+
120
+ public function stream_stat()
121
+ {
122
+ static $modeMap = [
123
+ 'r' => 33060,
124
+ 'rb' => 33060,
125
+ 'r+' => 33206,
126
+ 'w' => 33188,
127
+ 'wb' => 33188
128
+ ];
129
+
130
+ return [
131
+ 'dev' => 0,
132
+ 'ino' => 0,
133
+ 'mode' => $modeMap[$this->mode],
134
+ 'nlink' => 0,
135
+ 'uid' => 0,
136
+ 'gid' => 0,
137
+ 'rdev' => 0,
138
+ 'size' => $this->stream->getSize() ?: 0,
139
+ 'atime' => 0,
140
+ 'mtime' => 0,
141
+ 'ctime' => 0,
142
+ 'blksize' => 0,
143
+ 'blocks' => 0
144
+ ];
145
+ }
146
+
147
+ public function url_stat($path, $flags)
148
+ {
149
+ return [
150
+ 'dev' => 0,
151
+ 'ino' => 0,
152
+ 'mode' => 0,
153
+ 'nlink' => 0,
154
+ 'uid' => 0,
155
+ 'gid' => 0,
156
+ 'rdev' => 0,
157
+ 'size' => 0,
158
+ 'atime' => 0,
159
+ 'mtime' => 0,
160
+ 'ctime' => 0,
161
+ 'blksize' => 0,
162
+ 'blocks' => 0
163
+ ];
164
+ }
165
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UploadedFile.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use InvalidArgumentException;
6
+ use Psr\Http\Message\StreamInterface;
7
+ use Psr\Http\Message\UploadedFileInterface;
8
+ use RuntimeException;
9
+
10
+ class UploadedFile implements UploadedFileInterface
11
+ {
12
+ /**
13
+ * @var int[]
14
+ */
15
+ private static $errors = [
16
+ UPLOAD_ERR_OK,
17
+ UPLOAD_ERR_INI_SIZE,
18
+ UPLOAD_ERR_FORM_SIZE,
19
+ UPLOAD_ERR_PARTIAL,
20
+ UPLOAD_ERR_NO_FILE,
21
+ UPLOAD_ERR_NO_TMP_DIR,
22
+ UPLOAD_ERR_CANT_WRITE,
23
+ UPLOAD_ERR_EXTENSION,
24
+ ];
25
+
26
+ /**
27
+ * @var string
28
+ */
29
+ private $clientFilename;
30
+
31
+ /**
32
+ * @var string
33
+ */
34
+ private $clientMediaType;
35
+
36
+ /**
37
+ * @var int
38
+ */
39
+ private $error;
40
+
41
+ /**
42
+ * @var string|null
43
+ */
44
+ private $file;
45
+
46
+ /**
47
+ * @var bool
48
+ */
49
+ private $moved = false;
50
+
51
+ /**
52
+ * @var int
53
+ */
54
+ private $size;
55
+
56
+ /**
57
+ * @var StreamInterface|null
58
+ */
59
+ private $stream;
60
+
61
+ /**
62
+ * @param StreamInterface|string|resource $streamOrFile
63
+ * @param int $size
64
+ * @param int $errorStatus
65
+ * @param string|null $clientFilename
66
+ * @param string|null $clientMediaType
67
+ */
68
+ public function __construct(
69
+ $streamOrFile,
70
+ $size,
71
+ $errorStatus,
72
+ $clientFilename = null,
73
+ $clientMediaType = null
74
+ ) {
75
+ $this->setError($errorStatus);
76
+ $this->setSize($size);
77
+ $this->setClientFilename($clientFilename);
78
+ $this->setClientMediaType($clientMediaType);
79
+
80
+ if ($this->isOk()) {
81
+ $this->setStreamOrFile($streamOrFile);
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Depending on the value set file or stream variable
87
+ *
88
+ * @param mixed $streamOrFile
89
+ *
90
+ * @throws InvalidArgumentException
91
+ */
92
+ private function setStreamOrFile($streamOrFile)
93
+ {
94
+ if (is_string($streamOrFile)) {
95
+ $this->file = $streamOrFile;
96
+ } elseif (is_resource($streamOrFile)) {
97
+ $this->stream = new Stream($streamOrFile);
98
+ } elseif ($streamOrFile instanceof StreamInterface) {
99
+ $this->stream = $streamOrFile;
100
+ } else {
101
+ throw new InvalidArgumentException(
102
+ 'Invalid stream or file provided for UploadedFile'
103
+ );
104
+ }
105
+ }
106
+
107
+ /**
108
+ * @param int $error
109
+ *
110
+ * @throws InvalidArgumentException
111
+ */
112
+ private function setError($error)
113
+ {
114
+ if (false === is_int($error)) {
115
+ throw new InvalidArgumentException(
116
+ 'Upload file error status must be an integer'
117
+ );
118
+ }
119
+
120
+ if (false === in_array($error, UploadedFile::$errors)) {
121
+ throw new InvalidArgumentException(
122
+ 'Invalid error status for UploadedFile'
123
+ );
124
+ }
125
+
126
+ $this->error = $error;
127
+ }
128
+
129
+ /**
130
+ * @param int $size
131
+ *
132
+ * @throws InvalidArgumentException
133
+ */
134
+ private function setSize($size)
135
+ {
136
+ if (false === is_int($size)) {
137
+ throw new InvalidArgumentException(
138
+ 'Upload file size must be an integer'
139
+ );
140
+ }
141
+
142
+ $this->size = $size;
143
+ }
144
+
145
+ /**
146
+ * @param mixed $param
147
+ *
148
+ * @return bool
149
+ */
150
+ private function isStringOrNull($param)
151
+ {
152
+ return in_array(gettype($param), ['string', 'NULL']);
153
+ }
154
+
155
+ /**
156
+ * @param mixed $param
157
+ *
158
+ * @return bool
159
+ */
160
+ private function isStringNotEmpty($param)
161
+ {
162
+ return is_string($param) && false === empty($param);
163
+ }
164
+
165
+ /**
166
+ * @param string|null $clientFilename
167
+ *
168
+ * @throws InvalidArgumentException
169
+ */
170
+ private function setClientFilename($clientFilename)
171
+ {
172
+ if (false === $this->isStringOrNull($clientFilename)) {
173
+ throw new InvalidArgumentException(
174
+ 'Upload file client filename must be a string or null'
175
+ );
176
+ }
177
+
178
+ $this->clientFilename = $clientFilename;
179
+ }
180
+
181
+ /**
182
+ * @param string|null $clientMediaType
183
+ *
184
+ * @throws InvalidArgumentException
185
+ */
186
+ private function setClientMediaType($clientMediaType)
187
+ {
188
+ if (false === $this->isStringOrNull($clientMediaType)) {
189
+ throw new InvalidArgumentException(
190
+ 'Upload file client media type must be a string or null'
191
+ );
192
+ }
193
+
194
+ $this->clientMediaType = $clientMediaType;
195
+ }
196
+
197
+ /**
198
+ * Return true if there is no upload error
199
+ *
200
+ * @return bool
201
+ */
202
+ private function isOk()
203
+ {
204
+ return $this->error === UPLOAD_ERR_OK;
205
+ }
206
+
207
+ /**
208
+ * @return bool
209
+ */
210
+ public function isMoved()
211
+ {
212
+ return $this->moved;
213
+ }
214
+
215
+ /**
216
+ * @throws RuntimeException if is moved or not ok
217
+ */
218
+ private function validateActive()
219
+ {
220
+ if (false === $this->isOk()) {
221
+ throw new RuntimeException('Cannot retrieve stream due to upload error');
222
+ }
223
+
224
+ if ($this->isMoved()) {
225
+ throw new RuntimeException('Cannot retrieve stream after it has already been moved');
226
+ }
227
+ }
228
+
229
+ /**
230
+ * {@inheritdoc}
231
+ *
232
+ * @throws RuntimeException if the upload was not successful.
233
+ */
234
+ public function getStream()
235
+ {
236
+ $this->validateActive();
237
+
238
+ if ($this->stream instanceof StreamInterface) {
239
+ return $this->stream;
240
+ }
241
+
242
+ return new LazyOpenStream($this->file, 'r+');
243
+ }
244
+
245
+ /**
246
+ * {@inheritdoc}
247
+ *
248
+ * @see http://php.net/is_uploaded_file
249
+ * @see http://php.net/move_uploaded_file
250
+ *
251
+ * @param string $targetPath Path to which to move the uploaded file.
252
+ *
253
+ * @throws RuntimeException if the upload was not successful.
254
+ * @throws InvalidArgumentException if the $path specified is invalid.
255
+ * @throws RuntimeException on any error during the move operation, or on
256
+ * the second or subsequent call to the method.
257
+ */
258
+ public function moveTo($targetPath)
259
+ {
260
+ $this->validateActive();
261
+
262
+ if (false === $this->isStringNotEmpty($targetPath)) {
263
+ throw new InvalidArgumentException(
264
+ 'Invalid path provided for move operation; must be a non-empty string'
265
+ );
266
+ }
267
+
268
+ if ($this->file) {
269
+ $this->moved = php_sapi_name() == 'cli'
270
+ ? rename($this->file, $targetPath)
271
+ : move_uploaded_file($this->file, $targetPath);
272
+ } else {
273
+ Utils::copyToStream(
274
+ $this->getStream(),
275
+ new LazyOpenStream($targetPath, 'w')
276
+ );
277
+
278
+ $this->moved = true;
279
+ }
280
+
281
+ if (false === $this->moved) {
282
+ throw new RuntimeException(
283
+ sprintf('Uploaded file could not be moved to %s', $targetPath)
284
+ );
285
+ }
286
+ }
287
+
288
+ /**
289
+ * {@inheritdoc}
290
+ *
291
+ * @return int|null The file size in bytes or null if unknown.
292
+ */
293
+ public function getSize()
294
+ {
295
+ return $this->size;
296
+ }
297
+
298
+ /**
299
+ * {@inheritdoc}
300
+ *
301
+ * @see http://php.net/manual/en/features.file-upload.errors.php
302
+ *
303
+ * @return int One of PHP's UPLOAD_ERR_XXX constants.
304
+ */
305
+ public function getError()
306
+ {
307
+ return $this->error;
308
+ }
309
+
310
+ /**
311
+ * {@inheritdoc}
312
+ *
313
+ * @return string|null The filename sent by the client or null if none
314
+ * was provided.
315
+ */
316
+ public function getClientFilename()
317
+ {
318
+ return $this->clientFilename;
319
+ }
320
+
321
+ /**
322
+ * {@inheritdoc}
323
+ */
324
+ public function getClientMediaType()
325
+ {
326
+ return $this->clientMediaType;
327
+ }
328
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Uri.php ADDED
@@ -0,0 +1,810 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\UriInterface;
6
+
7
+ /**
8
+ * PSR-7 URI implementation.
9
+ *
10
+ * @author Michael Dowling
11
+ * @author Tobias Schultze
12
+ * @author Matthew Weier O'Phinney
13
+ */
14
+ class Uri implements UriInterface
15
+ {
16
+ /**
17
+ * Absolute http and https URIs require a host per RFC 7230 Section 2.7
18
+ * but in generic URIs the host can be empty. So for http(s) URIs
19
+ * we apply this default host when no host is given yet to form a
20
+ * valid URI.
21
+ */
22
+ const HTTP_DEFAULT_HOST = 'localhost';
23
+
24
+ private static $defaultPorts = [
25
+ 'http' => 80,
26
+ 'https' => 443,
27
+ 'ftp' => 21,
28
+ 'gopher' => 70,
29
+ 'nntp' => 119,
30
+ 'news' => 119,
31
+ 'telnet' => 23,
32
+ 'tn3270' => 23,
33
+ 'imap' => 143,
34
+ 'pop' => 110,
35
+ 'ldap' => 389,
36
+ ];
37
+
38
+ private static $charUnreserved = 'a-zA-Z0-9_\-\.~';
39
+ private static $charSubDelims = '!\$&\'\(\)\*\+,;=';
40
+ private static $replaceQuery = ['=' => '%3D', '&' => '%26'];
41
+
42
+ /** @var string Uri scheme. */
43
+ private $scheme = '';
44
+
45
+ /** @var string Uri user info. */
46
+ private $userInfo = '';
47
+
48
+ /** @var string Uri host. */
49
+ private $host = '';
50
+
51
+ /** @var int|null Uri port. */
52
+ private $port;
53
+
54
+ /** @var string Uri path. */
55
+ private $path = '';
56
+
57
+ /** @var string Uri query string. */
58
+ private $query = '';
59
+
60
+ /** @var string Uri fragment. */
61
+ private $fragment = '';
62
+
63
+ /**
64
+ * @param string $uri URI to parse
65
+ */
66
+ public function __construct($uri = '')
67
+ {
68
+ // weak type check to also accept null until we can add scalar type hints
69
+ if ($uri != '') {
70
+ $parts = self::parse($uri);
71
+ if ($parts === false) {
72
+ throw new \InvalidArgumentException("Unable to parse URI: $uri");
73
+ }
74
+ $this->applyParts($parts);
75
+ }
76
+ }
77
+
78
+ /**
79
+ * UTF-8 aware \parse_url() replacement.
80
+ *
81
+ * The internal function produces broken output for non ASCII domain names
82
+ * (IDN) when used with locales other than "C".
83
+ *
84
+ * On the other hand, cURL understands IDN correctly only when UTF-8 locale
85
+ * is configured ("C.UTF-8", "en_US.UTF-8", etc.).
86
+ *
87
+ * @see https://bugs.php.net/bug.php?id=52923
88
+ * @see https://www.php.net/manual/en/function.parse-url.php#114817
89
+ * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING
90
+ *
91
+ * @param string $url
92
+ *
93
+ * @return array|false
94
+ */
95
+ private static function parse($url)
96
+ {
97
+ // If IPv6
98
+ $prefix = '';
99
+ if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
100
+ $prefix = $matches[1];
101
+ $url = $matches[2];
102
+ }
103
+
104
+ $encodedUrl = preg_replace_callback(
105
+ '%[^:/@?&=#]+%usD',
106
+ static function ($matches) {
107
+ return urlencode($matches[0]);
108
+ },
109
+ $url
110
+ );
111
+
112
+ $result = parse_url($prefix . $encodedUrl);
113
+
114
+ if ($result === false) {
115
+ return false;
116
+ }
117
+
118
+ return array_map('urldecode', $result);
119
+ }
120
+
121
+ public function __toString()
122
+ {
123
+ return self::composeComponents(
124
+ $this->scheme,
125
+ $this->getAuthority(),
126
+ $this->path,
127
+ $this->query,
128
+ $this->fragment
129
+ );
130
+ }
131
+
132
+ /**
133
+ * Composes a URI reference string from its various components.
134
+ *
135
+ * Usually this method does not need to be called manually but instead is used indirectly via
136
+ * `Psr\Http\Message\UriInterface::__toString`.
137
+ *
138
+ * PSR-7 UriInterface treats an empty component the same as a missing component as
139
+ * getQuery(), getFragment() etc. always return a string. This explains the slight
140
+ * difference to RFC 3986 Section 5.3.
141
+ *
142
+ * Another adjustment is that the authority separator is added even when the authority is missing/empty
143
+ * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with
144
+ * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But
145
+ * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
146
+ * that format).
147
+ *
148
+ * @param string $scheme
149
+ * @param string $authority
150
+ * @param string $path
151
+ * @param string $query
152
+ * @param string $fragment
153
+ *
154
+ * @return string
155
+ *
156
+ * @link https://tools.ietf.org/html/rfc3986#section-5.3
157
+ */
158
+ public static function composeComponents($scheme, $authority, $path, $query, $fragment)
159
+ {
160
+ $uri = '';
161
+
162
+ // weak type checks to also accept null until we can add scalar type hints
163
+ if ($scheme != '') {
164
+ $uri .= $scheme . ':';
165
+ }
166
+
167
+ if ($authority != ''|| $scheme === 'file') {
168
+ $uri .= '//' . $authority;
169
+ }
170
+
171
+ $uri .= $path;
172
+
173
+ if ($query != '') {
174
+ $uri .= '?' . $query;
175
+ }
176
+
177
+ if ($fragment != '') {
178
+ $uri .= '#' . $fragment;
179
+ }
180
+
181
+ return $uri;
182
+ }
183
+
184
+ /**
185
+ * Whether the URI has the default port of the current scheme.
186
+ *
187
+ * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used
188
+ * independently of the implementation.
189
+ *
190
+ * @param UriInterface $uri
191
+ *
192
+ * @return bool
193
+ */
194
+ public static function isDefaultPort(UriInterface $uri)
195
+ {
196
+ return $uri->getPort() === null
197
+ || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
198
+ }
199
+
200
+ /**
201
+ * Whether the URI is absolute, i.e. it has a scheme.
202
+ *
203
+ * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true
204
+ * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative
205
+ * to another URI, the base URI. Relative references can be divided into several forms:
206
+ * - network-path references, e.g. '//example.com/path'
207
+ * - absolute-path references, e.g. '/path'
208
+ * - relative-path references, e.g. 'subpath'
209
+ *
210
+ * @param UriInterface $uri
211
+ *
212
+ * @return bool
213
+ *
214
+ * @see Uri::isNetworkPathReference
215
+ * @see Uri::isAbsolutePathReference
216
+ * @see Uri::isRelativePathReference
217
+ * @link https://tools.ietf.org/html/rfc3986#section-4
218
+ */
219
+ public static function isAbsolute(UriInterface $uri)
220
+ {
221
+ return $uri->getScheme() !== '';
222
+ }
223
+
224
+ /**
225
+ * Whether the URI is a network-path reference.
226
+ *
227
+ * A relative reference that begins with two slash characters is termed an network-path reference.
228
+ *
229
+ * @param UriInterface $uri
230
+ *
231
+ * @return bool
232
+ *
233
+ * @link https://tools.ietf.org/html/rfc3986#section-4.2
234
+ */
235
+ public static function isNetworkPathReference(UriInterface $uri)
236
+ {
237
+ return $uri->getScheme() === '' && $uri->getAuthority() !== '';
238
+ }
239
+
240
+ /**
241
+ * Whether the URI is a absolute-path reference.
242
+ *
243
+ * A relative reference that begins with a single slash character is termed an absolute-path reference.
244
+ *
245
+ * @param UriInterface $uri
246
+ *
247
+ * @return bool
248
+ *
249
+ * @link https://tools.ietf.org/html/rfc3986#section-4.2
250
+ */
251
+ public static function isAbsolutePathReference(UriInterface $uri)
252
+ {
253
+ return $uri->getScheme() === ''
254
+ && $uri->getAuthority() === ''
255
+ && isset($uri->getPath()[0])
256
+ && $uri->getPath()[0] === '/';
257
+ }
258
+
259
+ /**
260
+ * Whether the URI is a relative-path reference.
261
+ *
262
+ * A relative reference that does not begin with a slash character is termed a relative-path reference.
263
+ *
264
+ * @param UriInterface $uri
265
+ *
266
+ * @return bool
267
+ *
268
+ * @link https://tools.ietf.org/html/rfc3986#section-4.2
269
+ */
270
+ public static function isRelativePathReference(UriInterface $uri)
271
+ {
272
+ return $uri->getScheme() === ''
273
+ && $uri->getAuthority() === ''
274
+ && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/');
275
+ }
276
+
277
+ /**
278
+ * Whether the URI is a same-document reference.
279
+ *
280
+ * A same-document reference refers to a URI that is, aside from its fragment
281
+ * component, identical to the base URI. When no base URI is given, only an empty
282
+ * URI reference (apart from its fragment) is considered a same-document reference.
283
+ *
284
+ * @param UriInterface $uri The URI to check
285
+ * @param UriInterface|null $base An optional base URI to compare against
286
+ *
287
+ * @return bool
288
+ *
289
+ * @link https://tools.ietf.org/html/rfc3986#section-4.4
290
+ */
291
+ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
292
+ {
293
+ if ($base !== null) {
294
+ $uri = UriResolver::resolve($base, $uri);
295
+
296
+ return ($uri->getScheme() === $base->getScheme())
297
+ && ($uri->getAuthority() === $base->getAuthority())
298
+ && ($uri->getPath() === $base->getPath())
299
+ && ($uri->getQuery() === $base->getQuery());
300
+ }
301
+
302
+ return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === '';
303
+ }
304
+
305
+ /**
306
+ * Removes dot segments from a path and returns the new path.
307
+ *
308
+ * @param string $path
309
+ *
310
+ * @return string
311
+ *
312
+ * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead.
313
+ * @see UriResolver::removeDotSegments
314
+ */
315
+ public static function removeDotSegments($path)
316
+ {
317
+ return UriResolver::removeDotSegments($path);
318
+ }
319
+
320
+ /**
321
+ * Converts the relative URI into a new URI that is resolved against the base URI.
322
+ *
323
+ * @param UriInterface $base Base URI
324
+ * @param string|UriInterface $rel Relative URI
325
+ *
326
+ * @return UriInterface
327
+ *
328
+ * @deprecated since version 1.4. Use UriResolver::resolve instead.
329
+ * @see UriResolver::resolve
330
+ */
331
+ public static function resolve(UriInterface $base, $rel)
332
+ {
333
+ if (!($rel instanceof UriInterface)) {
334
+ $rel = new self($rel);
335
+ }
336
+
337
+ return UriResolver::resolve($base, $rel);
338
+ }
339
+
340
+ /**
341
+ * Creates a new URI with a specific query string value removed.
342
+ *
343
+ * Any existing query string values that exactly match the provided key are
344
+ * removed.
345
+ *
346
+ * @param UriInterface $uri URI to use as a base.
347
+ * @param string $key Query string key to remove.
348
+ *
349
+ * @return UriInterface
350
+ */
351
+ public static function withoutQueryValue(UriInterface $uri, $key)
352
+ {
353
+ $result = self::getFilteredQueryString($uri, [$key]);
354
+
355
+ return $uri->withQuery(implode('&', $result));
356
+ }
357
+
358
+ /**
359
+ * Creates a new URI with a specific query string value.
360
+ *
361
+ * Any existing query string values that exactly match the provided key are
362
+ * removed and replaced with the given key value pair.
363
+ *
364
+ * A value of null will set the query string key without a value, e.g. "key"
365
+ * instead of "key=value".
366
+ *
367
+ * @param UriInterface $uri URI to use as a base.
368
+ * @param string $key Key to set.
369
+ * @param string|null $value Value to set
370
+ *
371
+ * @return UriInterface
372
+ */
373
+ public static function withQueryValue(UriInterface $uri, $key, $value)
374
+ {
375
+ $result = self::getFilteredQueryString($uri, [$key]);
376
+
377
+ $result[] = self::generateQueryString($key, $value);
378
+
379
+ return $uri->withQuery(implode('&', $result));
380
+ }
381
+
382
+ /**
383
+ * Creates a new URI with multiple specific query string values.
384
+ *
385
+ * It has the same behavior as withQueryValue() but for an associative array of key => value.
386
+ *
387
+ * @param UriInterface $uri URI to use as a base.
388
+ * @param array $keyValueArray Associative array of key and values
389
+ *
390
+ * @return UriInterface
391
+ */
392
+ public static function withQueryValues(UriInterface $uri, array $keyValueArray)
393
+ {
394
+ $result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
395
+
396
+ foreach ($keyValueArray as $key => $value) {
397
+ $result[] = self::generateQueryString($key, $value);
398
+ }
399
+
400
+ return $uri->withQuery(implode('&', $result));
401
+ }
402
+
403
+ /**
404
+ * Creates a URI from a hash of `parse_url` components.
405
+ *
406
+ * @param array $parts
407
+ *
408
+ * @return UriInterface
409
+ *
410
+ * @link http://php.net/manual/en/function.parse-url.php
411
+ *
412
+ * @throws \InvalidArgumentException If the components do not form a valid URI.
413
+ */
414
+ public static function fromParts(array $parts)
415
+ {
416
+ $uri = new self();
417
+ $uri->applyParts($parts);
418
+ $uri->validateState();
419
+
420
+ return $uri;
421
+ }
422
+
423
+ public function getScheme()
424
+ {
425
+ return $this->scheme;
426
+ }
427
+
428
+ public function getAuthority()
429
+ {
430
+ $authority = $this->host;
431
+ if ($this->userInfo !== '') {
432
+ $authority = $this->userInfo . '@' . $authority;
433
+ }
434
+
435
+ if ($this->port !== null) {
436
+ $authority .= ':' . $this->port;
437
+ }
438
+
439
+ return $authority;
440
+ }
441
+
442
+ public function getUserInfo()
443
+ {
444
+ return $this->userInfo;
445
+ }
446
+
447
+ public function getHost()
448
+ {
449
+ return $this->host;
450
+ }
451
+
452
+ public function getPort()
453
+ {
454
+ return $this->port;
455
+ }
456
+
457
+ public function getPath()
458
+ {
459
+ return $this->path;
460
+ }
461
+
462
+ public function getQuery()
463
+ {
464
+ return $this->query;
465
+ }
466
+
467
+ public function getFragment()
468
+ {
469
+ return $this->fragment;
470
+ }
471
+
472
+ public function withScheme($scheme)
473
+ {
474
+ $scheme = $this->filterScheme($scheme);
475
+
476
+ if ($this->scheme === $scheme) {
477
+ return $this;
478
+ }
479
+
480
+ $new = clone $this;
481
+ $new->scheme = $scheme;
482
+ $new->removeDefaultPort();
483
+ $new->validateState();
484
+
485
+ return $new;
486
+ }
487
+
488
+ public function withUserInfo($user, $password = null)
489
+ {
490
+ $info = $this->filterUserInfoComponent($user);
491
+ if ($password !== null) {
492
+ $info .= ':' . $this->filterUserInfoComponent($password);
493
+ }
494
+
495
+ if ($this->userInfo === $info) {
496
+ return $this;
497
+ }
498
+
499
+ $new = clone $this;
500
+ $new->userInfo = $info;
501
+ $new->validateState();
502
+
503
+ return $new;
504
+ }
505
+
506
+ public function withHost($host)
507
+ {
508
+ $host = $this->filterHost($host);
509
+
510
+ if ($this->host === $host) {
511
+ return $this;
512
+ }
513
+
514
+ $new = clone $this;
515
+ $new->host = $host;
516
+ $new->validateState();
517
+
518
+ return $new;
519
+ }
520
+
521
+ public function withPort($port)
522
+ {
523
+ $port = $this->filterPort($port);
524
+
525
+ if ($this->port === $port) {
526
+ return $this;
527
+ }
528
+
529
+ $new = clone $this;
530
+ $new->port = $port;
531
+ $new->removeDefaultPort();
532
+ $new->validateState();
533
+
534
+ return $new;
535
+ }
536
+
537
+ public function withPath($path)
538
+ {
539
+ $path = $this->filterPath($path);
540
+
541
+ if ($this->path === $path) {
542
+ return $this;
543
+ }
544
+
545
+ $new = clone $this;
546
+ $new->path = $path;
547
+ $new->validateState();
548
+
549
+ return $new;
550
+ }
551
+
552
+ public function withQuery($query)
553
+ {
554
+ $query = $this->filterQueryAndFragment($query);
555
+
556
+ if ($this->query === $query) {
557
+ return $this;
558
+ }
559
+
560
+ $new = clone $this;
561
+ $new->query = $query;
562
+
563
+ return $new;
564
+ }
565
+
566
+ public function withFragment($fragment)
567
+ {
568
+ $fragment = $this->filterQueryAndFragment($fragment);
569
+
570
+ if ($this->fragment === $fragment) {
571
+ return $this;
572
+ }
573
+
574
+ $new = clone $this;
575
+ $new->fragment = $fragment;
576
+
577
+ return $new;
578
+ }
579
+
580
+ /**
581
+ * Apply parse_url parts to a URI.
582
+ *
583
+ * @param array $parts Array of parse_url parts to apply.
584
+ */
585
+ private function applyParts(array $parts)
586
+ {
587
+ $this->scheme = isset($parts['scheme'])
588
+ ? $this->filterScheme($parts['scheme'])
589
+ : '';
590
+ $this->userInfo = isset($parts['user'])
591
+ ? $this->filterUserInfoComponent($parts['user'])
592
+ : '';
593
+ $this->host = isset($parts['host'])
594
+ ? $this->filterHost($parts['host'])
595
+ : '';
596
+ $this->port = isset($parts['port'])
597
+ ? $this->filterPort($parts['port'])
598
+ : null;
599
+ $this->path = isset($parts['path'])
600
+ ? $this->filterPath($parts['path'])
601
+ : '';
602
+ $this->query = isset($parts['query'])
603
+ ? $this->filterQueryAndFragment($parts['query'])
604
+ : '';
605
+ $this->fragment = isset($parts['fragment'])
606
+ ? $this->filterQueryAndFragment($parts['fragment'])
607
+ : '';
608
+ if (isset($parts['pass'])) {
609
+ $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
610
+ }
611
+
612
+ $this->removeDefaultPort();
613
+ }
614
+
615
+ /**
616
+ * @param string $scheme
617
+ *
618
+ * @return string
619
+ *
620
+ * @throws \InvalidArgumentException If the scheme is invalid.
621
+ */
622
+ private function filterScheme($scheme)
623
+ {
624
+ if (!is_string($scheme)) {
625
+ throw new \InvalidArgumentException('Scheme must be a string');
626
+ }
627
+
628
+ return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
629
+ }
630
+
631
+ /**
632
+ * @param string $component
633
+ *
634
+ * @return string
635
+ *
636
+ * @throws \InvalidArgumentException If the user info is invalid.
637
+ */
638
+ private function filterUserInfoComponent($component)
639
+ {
640
+ if (!is_string($component)) {
641
+ throw new \InvalidArgumentException('User info must be a string');
642
+ }
643
+
644
+ return preg_replace_callback(
645
+ '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
646
+ [$this, 'rawurlencodeMatchZero'],
647
+ $component
648
+ );
649
+ }
650
+
651
+ /**
652
+ * @param string $host
653
+ *
654
+ * @return string
655
+ *
656
+ * @throws \InvalidArgumentException If the host is invalid.
657
+ */
658
+ private function filterHost($host)
659
+ {
660
+ if (!is_string($host)) {
661
+ throw new \InvalidArgumentException('Host must be a string');
662
+ }
663
+
664
+ return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
665
+ }
666
+
667
+ /**
668
+ * @param int|null $port
669
+ *
670
+ * @return int|null
671
+ *
672
+ * @throws \InvalidArgumentException If the port is invalid.
673
+ */
674
+ private function filterPort($port)
675
+ {
676
+ if ($port === null) {
677
+ return null;
678
+ }
679
+
680
+ $port = (int) $port;
681
+ if (0 > $port || 0xffff < $port) {
682
+ throw new \InvalidArgumentException(
683
+ sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
684
+ );
685
+ }
686
+
687
+ return $port;
688
+ }
689
+
690
+ /**
691
+ * @param UriInterface $uri
692
+ * @param array $keys
693
+ *
694
+ * @return array
695
+ */
696
+ private static function getFilteredQueryString(UriInterface $uri, array $keys)
697
+ {
698
+ $current = $uri->getQuery();
699
+
700
+ if ($current === '') {
701
+ return [];
702
+ }
703
+
704
+ $decodedKeys = array_map('rawurldecode', $keys);
705
+
706
+ return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
707
+ return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
708
+ });
709
+ }
710
+
711
+ /**
712
+ * @param string $key
713
+ * @param string|null $value
714
+ *
715
+ * @return string
716
+ */
717
+ private static function generateQueryString($key, $value)
718
+ {
719
+ // Query string separators ("=", "&") within the key or value need to be encoded
720
+ // (while preventing double-encoding) before setting the query string. All other
721
+ // chars that need percent-encoding will be encoded by withQuery().
722
+ $queryString = strtr($key, self::$replaceQuery);
723
+
724
+ if ($value !== null) {
725
+ $queryString .= '=' . strtr($value, self::$replaceQuery);
726
+ }
727
+
728
+ return $queryString;
729
+ }
730
+
731
+ private function removeDefaultPort()
732
+ {
733
+ if ($this->port !== null && self::isDefaultPort($this)) {
734
+ $this->port = null;
735
+ }
736
+ }
737
+
738
+ /**
739
+ * Filters the path of a URI
740
+ *
741
+ * @param string $path
742
+ *
743
+ * @return string
744
+ *
745
+ * @throws \InvalidArgumentException If the path is invalid.
746
+ */
747
+ private function filterPath($path)
748
+ {
749
+ if (!is_string($path)) {
750
+ throw new \InvalidArgumentException('Path must be a string');
751
+ }
752
+
753
+ return preg_replace_callback(
754
+ '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
755
+ [$this, 'rawurlencodeMatchZero'],
756
+ $path
757
+ );
758
+ }
759
+
760
+ /**
761
+ * Filters the query string or fragment of a URI.
762
+ *
763
+ * @param string $str
764
+ *
765
+ * @return string
766
+ *
767
+ * @throws \InvalidArgumentException If the query or fragment is invalid.
768
+ */
769
+ private function filterQueryAndFragment($str)
770
+ {
771
+ if (!is_string($str)) {
772
+ throw new \InvalidArgumentException('Query and fragment must be a string');
773
+ }
774
+
775
+ return preg_replace_callback(
776
+ '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
777
+ [$this, 'rawurlencodeMatchZero'],
778
+ $str
779
+ );
780
+ }
781
+
782
+ private function rawurlencodeMatchZero(array $match)
783
+ {
784
+ return rawurlencode($match[0]);
785
+ }
786
+
787
+ private function validateState()
788
+ {
789
+ if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) {
790
+ $this->host = self::HTTP_DEFAULT_HOST;
791
+ }
792
+
793
+ if ($this->getAuthority() === '') {
794
+ if (0 === strpos($this->path, '//')) {
795
+ throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"');
796
+ }
797
+ if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) {
798
+ throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon');
799
+ }
800
+ } elseif (isset($this->path[0]) && $this->path[0] !== '/') {
801
+ @trigger_error(
802
+ 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' .
803
+ 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
804
+ E_USER_DEPRECATED
805
+ );
806
+ $this->path = '/' . $this->path;
807
+ //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
808
+ }
809
+ }
810
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UriComparator.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\UriInterface;
6
+
7
+ /**
8
+ * Provides methods to determine if a modified URL should be considered cross-origin.
9
+ *
10
+ * @author Graham Campbell
11
+ */
12
+ final class UriComparator
13
+ {
14
+ /**
15
+ * Determines if a modified URL should be considered cross-origin with
16
+ * respect to an original URL.
17
+ *
18
+ * @return bool
19
+ */
20
+ public static function isCrossOrigin(UriInterface $original, UriInterface $modified)
21
+ {
22
+ if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) {
23
+ return true;
24
+ }
25
+
26
+ if ($original->getScheme() !== $modified->getScheme()) {
27
+ return true;
28
+ }
29
+
30
+ if (self::computePort($original) !== self::computePort($modified)) {
31
+ return true;
32
+ }
33
+
34
+ return false;
35
+ }
36
+
37
+ /**
38
+ * @return int
39
+ */
40
+ private static function computePort(UriInterface $uri)
41
+ {
42
+ $port = $uri->getPort();
43
+
44
+ if (null !== $port) {
45
+ return $port;
46
+ }
47
+
48
+ return 'https' === $uri->getScheme() ? 443 : 80;
49
+ }
50
+
51
+ private function __construct()
52
+ {
53
+ // cannot be instantiated
54
+ }
55
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UriNormalizer.php ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\UriInterface;
6
+
7
+ /**
8
+ * Provides methods to normalize and compare URIs.
9
+ *
10
+ * @author Tobias Schultze
11
+ *
12
+ * @link https://tools.ietf.org/html/rfc3986#section-6
13
+ */
14
+ final class UriNormalizer
15
+ {
16
+ /**
17
+ * Default normalizations which only include the ones that preserve semantics.
18
+ *
19
+ * self::CAPITALIZE_PERCENT_ENCODING | self::DECODE_UNRESERVED_CHARACTERS | self::CONVERT_EMPTY_PATH |
20
+ * self::REMOVE_DEFAULT_HOST | self::REMOVE_DEFAULT_PORT | self::REMOVE_DOT_SEGMENTS
21
+ */
22
+ const PRESERVING_NORMALIZATIONS = 63;
23
+
24
+ /**
25
+ * All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized.
26
+ *
27
+ * Example: http://example.org/a%c2%b1b → http://example.org/a%C2%B1b
28
+ */
29
+ const CAPITALIZE_PERCENT_ENCODING = 1;
30
+
31
+ /**
32
+ * Decodes percent-encoded octets of unreserved characters.
33
+ *
34
+ * For consistency, percent-encoded octets in the ranges of ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39),
35
+ * hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and,
36
+ * when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers.
37
+ *
38
+ * Example: http://example.org/%7Eusern%61me/ → http://example.org/~username/
39
+ */
40
+ const DECODE_UNRESERVED_CHARACTERS = 2;
41
+
42
+ /**
43
+ * Converts the empty path to "/" for http and https URIs.
44
+ *
45
+ * Example: http://example.org → http://example.org/
46
+ */
47
+ const CONVERT_EMPTY_PATH = 4;
48
+
49
+ /**
50
+ * Removes the default host of the given URI scheme from the URI.
51
+ *
52
+ * Only the "file" scheme defines the default host "localhost".
53
+ * All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile`
54
+ * are equivalent according to RFC 3986. The first format is not accepted
55
+ * by PHPs stream functions and thus already normalized implicitly to the
56
+ * second format in the Uri class. See `GuzzleHttp\Psr7\Uri::composeComponents`.
57
+ *
58
+ * Example: file://localhost/myfile → file:///myfile
59
+ */
60
+ const REMOVE_DEFAULT_HOST = 8;
61
+
62
+ /**
63
+ * Removes the default port of the given URI scheme from the URI.
64
+ *
65
+ * Example: http://example.org:80/ → http://example.org/
66
+ */
67
+ const REMOVE_DEFAULT_PORT = 16;
68
+
69
+ /**
70
+ * Removes unnecessary dot-segments.
71
+ *
72
+ * Dot-segments in relative-path references are not removed as it would
73
+ * change the semantics of the URI reference.
74
+ *
75
+ * Example: http://example.org/../a/b/../c/./d.html → http://example.org/a/c/d.html
76
+ */
77
+ const REMOVE_DOT_SEGMENTS = 32;
78
+
79
+ /**
80
+ * Paths which include two or more adjacent slashes are converted to one.
81
+ *
82
+ * Webservers usually ignore duplicate slashes and treat those URIs equivalent.
83
+ * But in theory those URIs do not need to be equivalent. So this normalization
84
+ * may change the semantics. Encoded slashes (%2F) are not removed.
85
+ *
86
+ * Example: http://example.org//foo///bar.html → http://example.org/foo/bar.html
87
+ */
88
+ const REMOVE_DUPLICATE_SLASHES = 64;
89
+
90
+ /**
91
+ * Sort query parameters with their values in alphabetical order.
92
+ *
93
+ * However, the order of parameters in a URI may be significant (this is not defined by the standard).
94
+ * So this normalization is not safe and may change the semantics of the URI.
95
+ *
96
+ * Example: ?lang=en&article=fred → ?article=fred&lang=en
97
+ *
98
+ * Note: The sorting is neither locale nor Unicode aware (the URI query does not get decoded at all) as the
99
+ * purpose is to be able to compare URIs in a reproducible way, not to have the params sorted perfectly.
100
+ */
101
+ const SORT_QUERY_PARAMETERS = 128;
102
+
103
+ /**
104
+ * Returns a normalized URI.
105
+ *
106
+ * The scheme and host component are already normalized to lowercase per PSR-7 UriInterface.
107
+ * This methods adds additional normalizations that can be configured with the $flags parameter.
108
+ *
109
+ * PSR-7 UriInterface cannot distinguish between an empty component and a missing component as
110
+ * getQuery(), getFragment() etc. always return a string. This means the URIs "/?#" and "/" are
111
+ * treated equivalent which is not necessarily true according to RFC 3986. But that difference
112
+ * is highly uncommon in reality. So this potential normalization is implied in PSR-7 as well.
113
+ *
114
+ * @param UriInterface $uri The URI to normalize
115
+ * @param int $flags A bitmask of normalizations to apply, see constants
116
+ *
117
+ * @return UriInterface The normalized URI
118
+ *
119
+ * @link https://tools.ietf.org/html/rfc3986#section-6.2
120
+ */
121
+ public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS)
122
+ {
123
+ if ($flags & self::CAPITALIZE_PERCENT_ENCODING) {
124
+ $uri = self::capitalizePercentEncoding($uri);
125
+ }
126
+
127
+ if ($flags & self::DECODE_UNRESERVED_CHARACTERS) {
128
+ $uri = self::decodeUnreservedCharacters($uri);
129
+ }
130
+
131
+ if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' &&
132
+ ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')
133
+ ) {
134
+ $uri = $uri->withPath('/');
135
+ }
136
+
137
+ if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') {
138
+ $uri = $uri->withHost('');
139
+ }
140
+
141
+ if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) {
142
+ $uri = $uri->withPort(null);
143
+ }
144
+
145
+ if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) {
146
+ $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath()));
147
+ }
148
+
149
+ if ($flags & self::REMOVE_DUPLICATE_SLASHES) {
150
+ $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath()));
151
+ }
152
+
153
+ if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') {
154
+ $queryKeyValues = explode('&', $uri->getQuery());
155
+ sort($queryKeyValues);
156
+ $uri = $uri->withQuery(implode('&', $queryKeyValues));
157
+ }
158
+
159
+ return $uri;
160
+ }
161
+
162
+ /**
163
+ * Whether two URIs can be considered equivalent.
164
+ *
165
+ * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also
166
+ * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be
167
+ * resolved against the same base URI. If this is not the case, determination of equivalence or difference of
168
+ * relative references does not mean anything.
169
+ *
170
+ * @param UriInterface $uri1 An URI to compare
171
+ * @param UriInterface $uri2 An URI to compare
172
+ * @param int $normalizations A bitmask of normalizations to apply, see constants
173
+ *
174
+ * @return bool
175
+ *
176
+ * @link https://tools.ietf.org/html/rfc3986#section-6.1
177
+ */
178
+ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
179
+ {
180
+ return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
181
+ }
182
+
183
+ private static function capitalizePercentEncoding(UriInterface $uri)
184
+ {
185
+ $regex = '/(?:%[A-Fa-f0-9]{2})++/';
186
+
187
+ $callback = function (array $match) {
188
+ return strtoupper($match[0]);
189
+ };
190
+
191
+ return
192
+ $uri->withPath(
193
+ preg_replace_callback($regex, $callback, $uri->getPath())
194
+ )->withQuery(
195
+ preg_replace_callback($regex, $callback, $uri->getQuery())
196
+ );
197
+ }
198
+
199
+ private static function decodeUnreservedCharacters(UriInterface $uri)
200
+ {
201
+ $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i';
202
+
203
+ $callback = function (array $match) {
204
+ return rawurldecode($match[0]);
205
+ };
206
+
207
+ return
208
+ $uri->withPath(
209
+ preg_replace_callback($regex, $callback, $uri->getPath())
210
+ )->withQuery(
211
+ preg_replace_callback($regex, $callback, $uri->getQuery())
212
+ );
213
+ }
214
+
215
+ private function __construct()
216
+ {
217
+ // cannot be instantiated
218
+ }
219
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/UriResolver.php ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\UriInterface;
6
+
7
+ /**
8
+ * Resolves a URI reference in the context of a base URI and the opposite way.
9
+ *
10
+ * @author Tobias Schultze
11
+ *
12
+ * @link https://tools.ietf.org/html/rfc3986#section-5
13
+ */
14
+ final class UriResolver
15
+ {
16
+ /**
17
+ * Removes dot segments from a path and returns the new path.
18
+ *
19
+ * @param string $path
20
+ *
21
+ * @return string
22
+ *
23
+ * @link http://tools.ietf.org/html/rfc3986#section-5.2.4
24
+ */
25
+ public static function removeDotSegments($path)
26
+ {
27
+ if ($path === '' || $path === '/') {
28
+ return $path;
29
+ }
30
+
31
+ $results = [];
32
+ $segments = explode('/', $path);
33
+ foreach ($segments as $segment) {
34
+ if ($segment === '..') {
35
+ array_pop($results);
36
+ } elseif ($segment !== '.') {
37
+ $results[] = $segment;
38
+ }
39
+ }
40
+
41
+ $newPath = implode('/', $results);
42
+
43
+ if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) {
44
+ // Re-add the leading slash if necessary for cases like "/.."
45
+ $newPath = '/' . $newPath;
46
+ } elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) {
47
+ // Add the trailing slash if necessary
48
+ // If newPath is not empty, then $segment must be set and is the last segment from the foreach
49
+ $newPath .= '/';
50
+ }
51
+
52
+ return $newPath;
53
+ }
54
+
55
+ /**
56
+ * Converts the relative URI into a new URI that is resolved against the base URI.
57
+ *
58
+ * @param UriInterface $base Base URI
59
+ * @param UriInterface $rel Relative URI
60
+ *
61
+ * @return UriInterface
62
+ *
63
+ * @link http://tools.ietf.org/html/rfc3986#section-5.2
64
+ */
65
+ public static function resolve(UriInterface $base, UriInterface $rel)
66
+ {
67
+ if ((string) $rel === '') {
68
+ // we can simply return the same base URI instance for this same-document reference
69
+ return $base;
70
+ }
71
+
72
+ if ($rel->getScheme() != '') {
73
+ return $rel->withPath(self::removeDotSegments($rel->getPath()));
74
+ }
75
+
76
+ if ($rel->getAuthority() != '') {
77
+ $targetAuthority = $rel->getAuthority();
78
+ $targetPath = self::removeDotSegments($rel->getPath());
79
+ $targetQuery = $rel->getQuery();
80
+ } else {
81
+ $targetAuthority = $base->getAuthority();
82
+ if ($rel->getPath() === '') {
83
+ $targetPath = $base->getPath();
84
+ $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery();
85
+ } else {
86
+ if ($rel->getPath()[0] === '/') {
87
+ $targetPath = $rel->getPath();
88
+ } else {
89
+ if ($targetAuthority != '' && $base->getPath() === '') {
90
+ $targetPath = '/' . $rel->getPath();
91
+ } else {
92
+ $lastSlashPos = strrpos($base->getPath(), '/');
93
+ if ($lastSlashPos === false) {
94
+ $targetPath = $rel->getPath();
95
+ } else {
96
+ $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath();
97
+ }
98
+ }
99
+ }
100
+ $targetPath = self::removeDotSegments($targetPath);
101
+ $targetQuery = $rel->getQuery();
102
+ }
103
+ }
104
+
105
+ return new Uri(Uri::composeComponents(
106
+ $base->getScheme(),
107
+ $targetAuthority,
108
+ $targetPath,
109
+ $targetQuery,
110
+ $rel->getFragment()
111
+ ));
112
+ }
113
+
114
+ /**
115
+ * Returns the target URI as a relative reference from the base URI.
116
+ *
117
+ * This method is the counterpart to resolve():
118
+ *
119
+ * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target))
120
+ *
121
+ * One use-case is to use the current request URI as base URI and then generate relative links in your documents
122
+ * to reduce the document size or offer self-contained downloadable document archives.
123
+ *
124
+ * $base = new Uri('http://example.com/a/b/');
125
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'.
126
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'.
127
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'.
128
+ * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'.
129
+ *
130
+ * This method also accepts a target that is already relative and will try to relativize it further. Only a
131
+ * relative-path reference will be returned as-is.
132
+ *
133
+ * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well
134
+ *
135
+ * @param UriInterface $base Base URI
136
+ * @param UriInterface $target Target URI
137
+ *
138
+ * @return UriInterface The relative URI reference
139
+ */
140
+ public static function relativize(UriInterface $base, UriInterface $target)
141
+ {
142
+ if ($target->getScheme() !== '' &&
143
+ ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
144
+ ) {
145
+ return $target;
146
+ }
147
+
148
+ if (Uri::isRelativePathReference($target)) {
149
+ // As the target is already highly relative we return it as-is. It would be possible to resolve
150
+ // the target with `$target = self::resolve($base, $target);` and then try make it more relative
151
+ // by removing a duplicate query. But let's not do that automatically.
152
+ return $target;
153
+ }
154
+
155
+ if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
156
+ return $target->withScheme('');
157
+ }
158
+
159
+ // We must remove the path before removing the authority because if the path starts with two slashes, the URI
160
+ // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also
161
+ // invalid.
162
+ $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost('');
163
+
164
+ if ($base->getPath() !== $target->getPath()) {
165
+ return $emptyPathUri->withPath(self::getRelativePath($base, $target));
166
+ }
167
+
168
+ if ($base->getQuery() === $target->getQuery()) {
169
+ // Only the target fragment is left. And it must be returned even if base and target fragment are the same.
170
+ return $emptyPathUri->withQuery('');
171
+ }
172
+
173
+ // If the base URI has a query but the target has none, we cannot return an empty path reference as it would
174
+ // inherit the base query component when resolving.
175
+ if ($target->getQuery() === '') {
176
+ $segments = explode('/', $target->getPath());
177
+ $lastSegment = end($segments);
178
+
179
+ return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment);
180
+ }
181
+
182
+ return $emptyPathUri;
183
+ }
184
+
185
+ private static function getRelativePath(UriInterface $base, UriInterface $target)
186
+ {
187
+ $sourceSegments = explode('/', $base->getPath());
188
+ $targetSegments = explode('/', $target->getPath());
189
+ array_pop($sourceSegments);
190
+ $targetLastSegment = array_pop($targetSegments);
191
+ foreach ($sourceSegments as $i => $segment) {
192
+ if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) {
193
+ unset($sourceSegments[$i], $targetSegments[$i]);
194
+ } else {
195
+ break;
196
+ }
197
+ }
198
+ $targetSegments[] = $targetLastSegment;
199
+ $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments);
200
+
201
+ // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
202
+ // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
203
+ // as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
204
+ if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) {
205
+ $relativePath = "./$relativePath";
206
+ } elseif ('/' === $relativePath[0]) {
207
+ if ($base->getAuthority() != '' && $base->getPath() === '') {
208
+ // In this case an extra slash is added by resolve() automatically. So we must not add one here.
209
+ $relativePath = ".$relativePath";
210
+ } else {
211
+ $relativePath = "./$relativePath";
212
+ }
213
+ }
214
+
215
+ return $relativePath;
216
+ }
217
+
218
+ private function __construct()
219
+ {
220
+ // cannot be instantiated
221
+ }
222
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/Utils.php ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ServerRequestInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ final class Utils
11
+ {
12
+ /**
13
+ * Remove the items given by the keys, case insensitively from the data.
14
+ *
15
+ * @param iterable<string> $keys
16
+ *
17
+ * @return array
18
+ */
19
+ public static function caselessRemove($keys, array $data)
20
+ {
21
+ $result = [];
22
+
23
+ foreach ($keys as &$key) {
24
+ $key = strtolower($key);
25
+ }
26
+
27
+ foreach ($data as $k => $v) {
28
+ if (!in_array(strtolower($k), $keys)) {
29
+ $result[$k] = $v;
30
+ }
31
+ }
32
+
33
+ return $result;
34
+ }
35
+
36
+ /**
37
+ * Copy the contents of a stream into another stream until the given number
38
+ * of bytes have been read.
39
+ *
40
+ * @param StreamInterface $source Stream to read from
41
+ * @param StreamInterface $dest Stream to write to
42
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
43
+ * to read the entire stream.
44
+ *
45
+ * @throws \RuntimeException on error.
46
+ */
47
+ public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
48
+ {
49
+ $bufferSize = 8192;
50
+
51
+ if ($maxLen === -1) {
52
+ while (!$source->eof()) {
53
+ if (!$dest->write($source->read($bufferSize))) {
54
+ break;
55
+ }
56
+ }
57
+ } else {
58
+ $remaining = $maxLen;
59
+ while ($remaining > 0 && !$source->eof()) {
60
+ $buf = $source->read(min($bufferSize, $remaining));
61
+ $len = strlen($buf);
62
+ if (!$len) {
63
+ break;
64
+ }
65
+ $remaining -= $len;
66
+ $dest->write($buf);
67
+ }
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Copy the contents of a stream into a string until the given number of
73
+ * bytes have been read.
74
+ *
75
+ * @param StreamInterface $stream Stream to read
76
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
77
+ * to read the entire stream.
78
+ *
79
+ * @return string
80
+ *
81
+ * @throws \RuntimeException on error.
82
+ */
83
+ public static function copyToString(StreamInterface $stream, $maxLen = -1)
84
+ {
85
+ $buffer = '';
86
+
87
+ if ($maxLen === -1) {
88
+ while (!$stream->eof()) {
89
+ $buf = $stream->read(1048576);
90
+ // Using a loose equality here to match on '' and false.
91
+ if ($buf == null) {
92
+ break;
93
+ }
94
+ $buffer .= $buf;
95
+ }
96
+ return $buffer;
97
+ }
98
+
99
+ $len = 0;
100
+ while (!$stream->eof() && $len < $maxLen) {
101
+ $buf = $stream->read($maxLen - $len);
102
+ // Using a loose equality here to match on '' and false.
103
+ if ($buf == null) {
104
+ break;
105
+ }
106
+ $buffer .= $buf;
107
+ $len = strlen($buffer);
108
+ }
109
+
110
+ return $buffer;
111
+ }
112
+
113
+ /**
114
+ * Calculate a hash of a stream.
115
+ *
116
+ * This method reads the entire stream to calculate a rolling hash, based
117
+ * on PHP's `hash_init` functions.
118
+ *
119
+ * @param StreamInterface $stream Stream to calculate the hash for
120
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
121
+ * @param bool $rawOutput Whether or not to use raw output
122
+ *
123
+ * @return string Returns the hash of the stream
124
+ *
125
+ * @throws \RuntimeException on error.
126
+ */
127
+ public static function hash(StreamInterface $stream, $algo, $rawOutput = false)
128
+ {
129
+ $pos = $stream->tell();
130
+
131
+ if ($pos > 0) {
132
+ $stream->rewind();
133
+ }
134
+
135
+ $ctx = hash_init($algo);
136
+ while (!$stream->eof()) {
137
+ hash_update($ctx, $stream->read(1048576));
138
+ }
139
+
140
+ $out = hash_final($ctx, (bool) $rawOutput);
141
+ $stream->seek($pos);
142
+
143
+ return $out;
144
+ }
145
+
146
+ /**
147
+ * Clone and modify a request with the given changes.
148
+ *
149
+ * This method is useful for reducing the number of clones needed to mutate
150
+ * a message.
151
+ *
152
+ * The changes can be one of:
153
+ * - method: (string) Changes the HTTP method.
154
+ * - set_headers: (array) Sets the given headers.
155
+ * - remove_headers: (array) Remove the given headers.
156
+ * - body: (mixed) Sets the given body.
157
+ * - uri: (UriInterface) Set the URI.
158
+ * - query: (string) Set the query string value of the URI.
159
+ * - version: (string) Set the protocol version.
160
+ *
161
+ * @param RequestInterface $request Request to clone and modify.
162
+ * @param array $changes Changes to apply.
163
+ *
164
+ * @return RequestInterface
165
+ */
166
+ public static function modifyRequest(RequestInterface $request, array $changes)
167
+ {
168
+ if (!$changes) {
169
+ return $request;
170
+ }
171
+
172
+ $headers = $request->getHeaders();
173
+
174
+ if (!isset($changes['uri'])) {
175
+ $uri = $request->getUri();
176
+ } else {
177
+ // Remove the host header if one is on the URI
178
+ if ($host = $changes['uri']->getHost()) {
179
+ $changes['set_headers']['Host'] = $host;
180
+
181
+ if ($port = $changes['uri']->getPort()) {
182
+ $standardPorts = ['http' => 80, 'https' => 443];
183
+ $scheme = $changes['uri']->getScheme();
184
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
185
+ $changes['set_headers']['Host'] .= ':' . $port;
186
+ }
187
+ }
188
+ }
189
+ $uri = $changes['uri'];
190
+ }
191
+
192
+ if (!empty($changes['remove_headers'])) {
193
+ $headers = self::caselessRemove($changes['remove_headers'], $headers);
194
+ }
195
+
196
+ if (!empty($changes['set_headers'])) {
197
+ $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers);
198
+ $headers = $changes['set_headers'] + $headers;
199
+ }
200
+
201
+ if (isset($changes['query'])) {
202
+ $uri = $uri->withQuery($changes['query']);
203
+ }
204
+
205
+ if ($request instanceof ServerRequestInterface) {
206
+ $new = (new ServerRequest(
207
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
208
+ $uri,
209
+ $headers,
210
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
211
+ isset($changes['version'])
212
+ ? $changes['version']
213
+ : $request->getProtocolVersion(),
214
+ $request->getServerParams()
215
+ ))
216
+ ->withParsedBody($request->getParsedBody())
217
+ ->withQueryParams($request->getQueryParams())
218
+ ->withCookieParams($request->getCookieParams())
219
+ ->withUploadedFiles($request->getUploadedFiles());
220
+
221
+ foreach ($request->getAttributes() as $key => $value) {
222
+ $new = $new->withAttribute($key, $value);
223
+ }
224
+
225
+ return $new;
226
+ }
227
+
228
+ return new Request(
229
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
230
+ $uri,
231
+ $headers,
232
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
233
+ isset($changes['version'])
234
+ ? $changes['version']
235
+ : $request->getProtocolVersion()
236
+ );
237
+ }
238
+
239
+ /**
240
+ * Read a line from the stream up to the maximum allowed buffer length.
241
+ *
242
+ * @param StreamInterface $stream Stream to read from
243
+ * @param int|null $maxLength Maximum buffer length
244
+ *
245
+ * @return string
246
+ */
247
+ public static function readLine(StreamInterface $stream, $maxLength = null)
248
+ {
249
+ $buffer = '';
250
+ $size = 0;
251
+
252
+ while (!$stream->eof()) {
253
+ // Using a loose equality here to match on '' and false.
254
+ if (null == ($byte = $stream->read(1))) {
255
+ return $buffer;
256
+ }
257
+ $buffer .= $byte;
258
+ // Break when a new line is found or the max length - 1 is reached
259
+ if ($byte === "\n" || ++$size === $maxLength - 1) {
260
+ break;
261
+ }
262
+ }
263
+
264
+ return $buffer;
265
+ }
266
+
267
+ /**
268
+ * Create a new stream based on the input type.
269
+ *
270
+ * Options is an associative array that can contain the following keys:
271
+ * - metadata: Array of custom metadata.
272
+ * - size: Size of the stream.
273
+ *
274
+ * This method accepts the following `$resource` types:
275
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
276
+ * - `string`: Creates a stream object that uses the given string as the contents.
277
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
278
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
279
+ * stream object will be created that wraps the given iterable. Each time the
280
+ * stream is read from, data from the iterator will fill a buffer and will be
281
+ * continuously called until the buffer is equal to the requested read size.
282
+ * Subsequent read calls will first read from the buffer and then call `next`
283
+ * on the underlying iterator until it is exhausted.
284
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
285
+ * the object will be cast to a string and then a stream will be returned that
286
+ * uses the string value.
287
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
288
+ * - `callable` When a callable is passed, a read-only stream object will be
289
+ * created that invokes the given callable. The callable is invoked with the
290
+ * number of suggested bytes to read. The callable can return any number of
291
+ * bytes, but MUST return `false` when there is no more data to return. The
292
+ * stream object that wraps the callable will invoke the callable until the
293
+ * number of requested bytes are available. Any additional bytes will be
294
+ * buffered and used in subsequent reads.
295
+ *
296
+ * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
297
+ * @param array $options Additional options
298
+ *
299
+ * @return StreamInterface
300
+ *
301
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
302
+ */
303
+ public static function streamFor($resource = '', array $options = [])
304
+ {
305
+ if (is_scalar($resource)) {
306
+ $stream = self::tryFopen('php://temp', 'r+');
307
+ if ($resource !== '') {
308
+ fwrite($stream, $resource);
309
+ fseek($stream, 0);
310
+ }
311
+ return new Stream($stream, $options);
312
+ }
313
+
314
+ switch (gettype($resource)) {
315
+ case 'resource':
316
+ /*
317
+ * The 'php://input' is a special stream with quirks and inconsistencies.
318
+ * We avoid using that stream by reading it into php://temp
319
+ */
320
+ $metaData = \stream_get_meta_data($resource);
321
+ if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') {
322
+ $stream = self::tryFopen('php://temp', 'w+');
323
+ fwrite($stream, stream_get_contents($resource));
324
+ fseek($stream, 0);
325
+ $resource = $stream;
326
+ }
327
+ return new Stream($resource, $options);
328
+ case 'object':
329
+ if ($resource instanceof StreamInterface) {
330
+ return $resource;
331
+ } elseif ($resource instanceof \Iterator) {
332
+ return new PumpStream(function () use ($resource) {
333
+ if (!$resource->valid()) {
334
+ return false;
335
+ }
336
+ $result = $resource->current();
337
+ $resource->next();
338
+ return $result;
339
+ }, $options);
340
+ } elseif (method_exists($resource, '__toString')) {
341
+ return Utils::streamFor((string) $resource, $options);
342
+ }
343
+ break;
344
+ case 'NULL':
345
+ return new Stream(self::tryFopen('php://temp', 'r+'), $options);
346
+ }
347
+
348
+ if (is_callable($resource)) {
349
+ return new PumpStream($resource, $options);
350
+ }
351
+
352
+ throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
353
+ }
354
+
355
+ /**
356
+ * Safely opens a PHP stream resource using a filename.
357
+ *
358
+ * When fopen fails, PHP normally raises a warning. This function adds an
359
+ * error handler that checks for errors and throws an exception instead.
360
+ *
361
+ * @param string $filename File to open
362
+ * @param string $mode Mode used to open the file
363
+ *
364
+ * @return resource
365
+ *
366
+ * @throws \RuntimeException if the file cannot be opened
367
+ */
368
+ public static function tryFopen($filename, $mode)
369
+ {
370
+ $ex = null;
371
+ set_error_handler(function () use ($filename, $mode, &$ex) {
372
+ $ex = new \RuntimeException(sprintf(
373
+ 'Unable to open "%s" using mode "%s": %s',
374
+ $filename,
375
+ $mode,
376
+ func_get_args()[1]
377
+ ));
378
+
379
+ return true;
380
+ });
381
+
382
+ try {
383
+ $handle = fopen($filename, $mode);
384
+ } catch (\Throwable $e) {
385
+ $ex = new \RuntimeException(sprintf(
386
+ 'Unable to open "%s" using mode "%s": %s',
387
+ $filename,
388
+ $mode,
389
+ $e->getMessage()
390
+ ), 0, $e);
391
+ }
392
+
393
+ restore_error_handler();
394
+
395
+ if ($ex) {
396
+ /** @var $ex \RuntimeException */
397
+ throw $ex;
398
+ }
399
+
400
+ return $handle;
401
+ }
402
+
403
+ /**
404
+ * Returns a UriInterface for the given value.
405
+ *
406
+ * This function accepts a string or UriInterface and returns a
407
+ * UriInterface for the given value. If the value is already a
408
+ * UriInterface, it is returned as-is.
409
+ *
410
+ * @param string|UriInterface $uri
411
+ *
412
+ * @return UriInterface
413
+ *
414
+ * @throws \InvalidArgumentException
415
+ */
416
+ public static function uriFor($uri)
417
+ {
418
+ if ($uri instanceof UriInterface) {
419
+ return $uri;
420
+ }
421
+
422
+ if (is_string($uri)) {
423
+ return new Uri($uri);
424
+ }
425
+
426
+ throw new \InvalidArgumentException('URI must be a string or UriInterface');
427
+ }
428
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/functions.php ADDED
@@ -0,0 +1,422 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\MessageInterface;
6
+ use Psr\Http\Message\RequestInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ /**
11
+ * Returns the string representation of an HTTP message.
12
+ *
13
+ * @param MessageInterface $message Message to convert to a string.
14
+ *
15
+ * @return string
16
+ *
17
+ * @deprecated str will be removed in guzzlehttp/psr7:2.0. Use Message::toString instead.
18
+ */
19
+ function str(MessageInterface $message)
20
+ {
21
+ return Message::toString($message);
22
+ }
23
+
24
+ /**
25
+ * Returns a UriInterface for the given value.
26
+ *
27
+ * This function accepts a string or UriInterface and returns a
28
+ * UriInterface for the given value. If the value is already a
29
+ * UriInterface, it is returned as-is.
30
+ *
31
+ * @param string|UriInterface $uri
32
+ *
33
+ * @return UriInterface
34
+ *
35
+ * @throws \InvalidArgumentException
36
+ *
37
+ * @deprecated uri_for will be removed in guzzlehttp/psr7:2.0. Use Utils::uriFor instead.
38
+ */
39
+ function uri_for($uri)
40
+ {
41
+ return Utils::uriFor($uri);
42
+ }
43
+
44
+ /**
45
+ * Create a new stream based on the input type.
46
+ *
47
+ * Options is an associative array that can contain the following keys:
48
+ * - metadata: Array of custom metadata.
49
+ * - size: Size of the stream.
50
+ *
51
+ * This method accepts the following `$resource` types:
52
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
53
+ * - `string`: Creates a stream object that uses the given string as the contents.
54
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
55
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
56
+ * stream object will be created that wraps the given iterable. Each time the
57
+ * stream is read from, data from the iterator will fill a buffer and will be
58
+ * continuously called until the buffer is equal to the requested read size.
59
+ * Subsequent read calls will first read from the buffer and then call `next`
60
+ * on the underlying iterator until it is exhausted.
61
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
62
+ * the object will be cast to a string and then a stream will be returned that
63
+ * uses the string value.
64
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
65
+ * - `callable` When a callable is passed, a read-only stream object will be
66
+ * created that invokes the given callable. The callable is invoked with the
67
+ * number of suggested bytes to read. The callable can return any number of
68
+ * bytes, but MUST return `false` when there is no more data to return. The
69
+ * stream object that wraps the callable will invoke the callable until the
70
+ * number of requested bytes are available. Any additional bytes will be
71
+ * buffered and used in subsequent reads.
72
+ *
73
+ * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
74
+ * @param array $options Additional options
75
+ *
76
+ * @return StreamInterface
77
+ *
78
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
79
+ *
80
+ * @deprecated stream_for will be removed in guzzlehttp/psr7:2.0. Use Utils::streamFor instead.
81
+ */
82
+ function stream_for($resource = '', array $options = [])
83
+ {
84
+ return Utils::streamFor($resource, $options);
85
+ }
86
+
87
+ /**
88
+ * Parse an array of header values containing ";" separated data into an
89
+ * array of associative arrays representing the header key value pair data
90
+ * of the header. When a parameter does not contain a value, but just
91
+ * contains a key, this function will inject a key with a '' string value.
92
+ *
93
+ * @param string|array $header Header to parse into components.
94
+ *
95
+ * @return array Returns the parsed header values.
96
+ *
97
+ * @deprecated parse_header will be removed in guzzlehttp/psr7:2.0. Use Header::parse instead.
98
+ */
99
+ function parse_header($header)
100
+ {
101
+ return Header::parse($header);
102
+ }
103
+
104
+ /**
105
+ * Converts an array of header values that may contain comma separated
106
+ * headers into an array of headers with no comma separated values.
107
+ *
108
+ * @param string|array $header Header to normalize.
109
+ *
110
+ * @return array Returns the normalized header field values.
111
+ *
112
+ * @deprecated normalize_header will be removed in guzzlehttp/psr7:2.0. Use Header::normalize instead.
113
+ */
114
+ function normalize_header($header)
115
+ {
116
+ return Header::normalize($header);
117
+ }
118
+
119
+ /**
120
+ * Clone and modify a request with the given changes.
121
+ *
122
+ * This method is useful for reducing the number of clones needed to mutate a
123
+ * message.
124
+ *
125
+ * The changes can be one of:
126
+ * - method: (string) Changes the HTTP method.
127
+ * - set_headers: (array) Sets the given headers.
128
+ * - remove_headers: (array) Remove the given headers.
129
+ * - body: (mixed) Sets the given body.
130
+ * - uri: (UriInterface) Set the URI.
131
+ * - query: (string) Set the query string value of the URI.
132
+ * - version: (string) Set the protocol version.
133
+ *
134
+ * @param RequestInterface $request Request to clone and modify.
135
+ * @param array $changes Changes to apply.
136
+ *
137
+ * @return RequestInterface
138
+ *
139
+ * @deprecated modify_request will be removed in guzzlehttp/psr7:2.0. Use Utils::modifyRequest instead.
140
+ */
141
+ function modify_request(RequestInterface $request, array $changes)
142
+ {
143
+ return Utils::modifyRequest($request, $changes);
144
+ }
145
+
146
+ /**
147
+ * Attempts to rewind a message body and throws an exception on failure.
148
+ *
149
+ * The body of the message will only be rewound if a call to `tell()` returns a
150
+ * value other than `0`.
151
+ *
152
+ * @param MessageInterface $message Message to rewind
153
+ *
154
+ * @throws \RuntimeException
155
+ *
156
+ * @deprecated rewind_body will be removed in guzzlehttp/psr7:2.0. Use Message::rewindBody instead.
157
+ */
158
+ function rewind_body(MessageInterface $message)
159
+ {
160
+ Message::rewindBody($message);
161
+ }
162
+
163
+ /**
164
+ * Safely opens a PHP stream resource using a filename.
165
+ *
166
+ * When fopen fails, PHP normally raises a warning. This function adds an
167
+ * error handler that checks for errors and throws an exception instead.
168
+ *
169
+ * @param string $filename File to open
170
+ * @param string $mode Mode used to open the file
171
+ *
172
+ * @return resource
173
+ *
174
+ * @throws \RuntimeException if the file cannot be opened
175
+ *
176
+ * @deprecated try_fopen will be removed in guzzlehttp/psr7:2.0. Use Utils::tryFopen instead.
177
+ */
178
+ function try_fopen($filename, $mode)
179
+ {
180
+ return Utils::tryFopen($filename, $mode);
181
+ }
182
+
183
+ /**
184
+ * Copy the contents of a stream into a string until the given number of
185
+ * bytes have been read.
186
+ *
187
+ * @param StreamInterface $stream Stream to read
188
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
189
+ * to read the entire stream.
190
+ *
191
+ * @return string
192
+ *
193
+ * @throws \RuntimeException on error.
194
+ *
195
+ * @deprecated copy_to_string will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToString instead.
196
+ */
197
+ function copy_to_string(StreamInterface $stream, $maxLen = -1)
198
+ {
199
+ return Utils::copyToString($stream, $maxLen);
200
+ }
201
+
202
+ /**
203
+ * Copy the contents of a stream into another stream until the given number
204
+ * of bytes have been read.
205
+ *
206
+ * @param StreamInterface $source Stream to read from
207
+ * @param StreamInterface $dest Stream to write to
208
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
209
+ * to read the entire stream.
210
+ *
211
+ * @throws \RuntimeException on error.
212
+ *
213
+ * @deprecated copy_to_stream will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToStream instead.
214
+ */
215
+ function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
216
+ {
217
+ return Utils::copyToStream($source, $dest, $maxLen);
218
+ }
219
+
220
+ /**
221
+ * Calculate a hash of a stream.
222
+ *
223
+ * This method reads the entire stream to calculate a rolling hash, based on
224
+ * PHP's `hash_init` functions.
225
+ *
226
+ * @param StreamInterface $stream Stream to calculate the hash for
227
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
228
+ * @param bool $rawOutput Whether or not to use raw output
229
+ *
230
+ * @return string Returns the hash of the stream
231
+ *
232
+ * @throws \RuntimeException on error.
233
+ *
234
+ * @deprecated hash will be removed in guzzlehttp/psr7:2.0. Use Utils::hash instead.
235
+ */
236
+ function hash(StreamInterface $stream, $algo, $rawOutput = false)
237
+ {
238
+ return Utils::hash($stream, $algo, $rawOutput);
239
+ }
240
+
241
+ /**
242
+ * Read a line from the stream up to the maximum allowed buffer length.
243
+ *
244
+ * @param StreamInterface $stream Stream to read from
245
+ * @param int|null $maxLength Maximum buffer length
246
+ *
247
+ * @return string
248
+ *
249
+ * @deprecated readline will be removed in guzzlehttp/psr7:2.0. Use Utils::readLine instead.
250
+ */
251
+ function readline(StreamInterface $stream, $maxLength = null)
252
+ {
253
+ return Utils::readLine($stream, $maxLength);
254
+ }
255
+
256
+ /**
257
+ * Parses a request message string into a request object.
258
+ *
259
+ * @param string $message Request message string.
260
+ *
261
+ * @return Request
262
+ *
263
+ * @deprecated parse_request will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequest instead.
264
+ */
265
+ function parse_request($message)
266
+ {
267
+ return Message::parseRequest($message);
268
+ }
269
+
270
+ /**
271
+ * Parses a response message string into a response object.
272
+ *
273
+ * @param string $message Response message string.
274
+ *
275
+ * @return Response
276
+ *
277
+ * @deprecated parse_response will be removed in guzzlehttp/psr7:2.0. Use Message::parseResponse instead.
278
+ */
279
+ function parse_response($message)
280
+ {
281
+ return Message::parseResponse($message);
282
+ }
283
+
284
+ /**
285
+ * Parse a query string into an associative array.
286
+ *
287
+ * If multiple values are found for the same key, the value of that key value
288
+ * pair will become an array. This function does not parse nested PHP style
289
+ * arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed
290
+ * into `['foo[a]' => '1', 'foo[b]' => '2'])`.
291
+ *
292
+ * @param string $str Query string to parse
293
+ * @param int|bool $urlEncoding How the query string is encoded
294
+ *
295
+ * @return array
296
+ *
297
+ * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead.
298
+ */
299
+ function parse_query($str, $urlEncoding = true)
300
+ {
301
+ return Query::parse($str, $urlEncoding);
302
+ }
303
+
304
+ /**
305
+ * Build a query string from an array of key value pairs.
306
+ *
307
+ * This function can use the return value of `parse_query()` to build a query
308
+ * string. This function does not modify the provided keys when an array is
309
+ * encountered (like `http_build_query()` would).
310
+ *
311
+ * @param array $params Query string parameters.
312
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
313
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
314
+ * to encode using RFC1738.
315
+ *
316
+ * @return string
317
+ *
318
+ * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
319
+ */
320
+ function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
321
+ {
322
+ return Query::build($params, $encoding);
323
+ }
324
+
325
+ /**
326
+ * Determines the mimetype of a file by looking at its extension.
327
+ *
328
+ * @param string $filename
329
+ *
330
+ * @return string|null
331
+ *
332
+ * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead.
333
+ */
334
+ function mimetype_from_filename($filename)
335
+ {
336
+ return MimeType::fromFilename($filename);
337
+ }
338
+
339
+ /**
340
+ * Maps a file extensions to a mimetype.
341
+ *
342
+ * @param $extension string The file extension.
343
+ *
344
+ * @return string|null
345
+ *
346
+ * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
347
+ * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead.
348
+ */
349
+ function mimetype_from_extension($extension)
350
+ {
351
+ return MimeType::fromExtension($extension);
352
+ }
353
+
354
+ /**
355
+ * Parses an HTTP message into an associative array.
356
+ *
357
+ * The array contains the "start-line" key containing the start line of
358
+ * the message, "headers" key containing an associative array of header
359
+ * array values, and a "body" key containing the body of the message.
360
+ *
361
+ * @param string $message HTTP request or response to parse.
362
+ *
363
+ * @return array
364
+ *
365
+ * @internal
366
+ *
367
+ * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
368
+ */
369
+ function _parse_message($message)
370
+ {
371
+ return Message::parseMessage($message);
372
+ }
373
+
374
+ /**
375
+ * Constructs a URI for an HTTP request message.
376
+ *
377
+ * @param string $path Path from the start-line
378
+ * @param array $headers Array of headers (each value an array).
379
+ *
380
+ * @return string
381
+ *
382
+ * @internal
383
+ *
384
+ * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
385
+ */
386
+ function _parse_request_uri($path, array $headers)
387
+ {
388
+ return Message::parseRequestUri($path, $headers);
389
+ }
390
+
391
+ /**
392
+ * Get a short summary of the message body.
393
+ *
394
+ * Will return `null` if the response is not printable.
395
+ *
396
+ * @param MessageInterface $message The message to get the body summary
397
+ * @param int $truncateAt The maximum allowed size of the summary
398
+ *
399
+ * @return string|null
400
+ *
401
+ * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead.
402
+ */
403
+ function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
404
+ {
405
+ return Message::bodySummary($message, $truncateAt);
406
+ }
407
+
408
+ /**
409
+ * Remove the items given by the keys, case insensitively from the data.
410
+ *
411
+ * @param iterable<string> $keys
412
+ *
413
+ * @return array
414
+ *
415
+ * @internal
416
+ *
417
+ * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
418
+ */
419
+ function _caseless_remove($keys, array $data)
420
+ {
421
+ return Utils::caselessRemove($keys, $data);
422
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/guzzlehttp/psr7/src/functions_include.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Don't redefine the functions if included multiple times.
4
+ if (!function_exists('GuzzleHttp\Psr7\str')) {
5
+ require __DIR__ . '/functions.php';
6
+ }
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/CHANGELOG.md RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/LICENSE RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Factory/HttplugFactory.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Factory/Psr17Factory.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/MessageTrait.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Request.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/RequestTrait.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Response.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/ServerRequest.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Stream.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/UploadedFile.php RENAMED
File without changes
vendor/{nyholm → codeinwp/themeisle-content-forms/library/mailerlite/vendor/nyholm}/psr7/src/Uri.php RENAMED
File without changes
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/client-common/.php-cs-fixer.dist.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $finder = PhpCsFixer\Finder::create()
4
+ ->in(__DIR__.'/src')
5
+ ->in(__DIR__.'/tests')
6
+ ->name('*.php')
7
+ ;
8
+
9
+ $config = new PhpCsFixer\Config();
10
+
11
+ return $config
12
+ ->setRiskyAllowed(true)
13
+ ->setRules([
14
+ '@Symfony' => true,
15
+ 'single_line_throw' => false,
16
+ ])
17
+ ->setFinder($finder)
18
+ ;
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/.php_cs.dist RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/CHANGELOG.md RENAMED
@@ -1,5 +1,19 @@
1
  # Change Log
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ## 2.5.0 - 2021-11-26
4
 
5
  ### Added
1
  # Change Log
2
 
3
+ ## 2.6.0 - 2022-09-29
4
+
5
+ - [RedirectPlugin] Redirection of non GET/HEAD requests with a body now removes the body on follow-up requests, if the
6
+ HTTP method changes. To do this, the plugin needs to find a PSR-7 stream implementation. If none is found, you can
7
+ explicitly pass a PSR-17 StreamFactoryInterface in the `stream_factory` option.
8
+ To keep sending the body in all cases, set the `stream_factory` option to null explicitly.
9
+
10
+ ## 2.5.1 - 2022-09-29
11
+
12
+ ### Fixed
13
+
14
+ - [RedirectPlugin] Fixed handling of redirection to different domain with default port
15
+ - [RedirectPlugin] Fixed false positive circular detection in RedirectPlugin in cases when target location does not contain path
16
+
17
  ## 2.5.0 - 2021-11-26
18
 
19
  ### Added
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/LICENSE RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/BatchClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/BatchClientInterface.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/BatchResult.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Deferred.php RENAMED
@@ -146,7 +146,10 @@ final class Deferred implements Promise
146
  return $this->value;
147
  }
148
 
149
- /** @var ClientExceptionInterface */
 
 
 
150
  throw $this->failure;
151
  }
152
  }
146
  return $this->value;
147
  }
148
 
149
+ if (null === $this->failure) {
150
+ throw new \RuntimeException('Internal Error: Promise is not fulfilled but has no exception stored');
151
+ }
152
+
153
  throw $this->failure;
154
  }
155
  }
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/EmulatedHttpAsyncClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/EmulatedHttpClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/BatchException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/CircularRedirectionException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/ClientErrorException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/HttpClientNoMatchException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/HttpClientNotFoundException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/LoopException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/MultipleRedirectionException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Exception/ServerErrorException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/FlexibleHttpClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpAsyncClientDecorator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpAsyncClientEmulator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientDecorator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientEmulator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/HttpClientPool.php RENAMED
@@ -46,9 +46,9 @@ abstract class HttpClientPool implements HttpClientPoolInterface
46
  /**
47
  * Return an http client given a specific strategy.
48
  *
49
- * @throws HttpClientNotFoundException When no http client has been found into the pool
50
- *
51
  * @return HttpClientPoolItem Return a http client that can do both sync or async
 
 
52
  */
53
  abstract protected function chooseHttpClient(): HttpClientPoolItem;
54
 
46
  /**
47
  * Return an http client given a specific strategy.
48
  *
 
 
49
  * @return HttpClientPoolItem Return a http client that can do both sync or async
50
+ *
51
+ * @throws HttpClientNotFoundException When no http client has been found into the pool
52
  */
53
  abstract protected function chooseHttpClient(): HttpClientPoolItem;
54
 
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/HttpClientPoolItem.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/LeastUsedClientPool.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/RandomClientPool.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientPool/RoundRobinClientPool.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientRouter.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpClientRouterInterface.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpMethodsClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/HttpMethodsClientInterface.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/AddHostPlugin.php RENAMED
@@ -31,7 +31,7 @@ final class AddHostPlugin implements Plugin
31
  * @param array{'replace'?: bool} $config
32
  *
33
  * Configuration options:
34
- * - replace: True will replace all hosts, false will only add host when none is specified.
35
  */
36
  public function __construct(UriInterface $host, array $config = [])
37
  {
31
  * @param array{'replace'?: bool} $config
32
  *
33
  * Configuration options:
34
+ * - replace: True will replace all hosts, false will only add host when none is specified
35
  */
36
  public function __construct(UriInterface $host, array $config = [])
37
  {
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/AddPathPlugin.php RENAMED
@@ -70,7 +70,7 @@ final class AddPathPlugin implements Plugin
70
  if (substr($path, 0, strlen($prepend)) !== $prepend) {
71
  $request = $request->withUri($request->getUri()
72
  ->withPath($prepend.$path)
73
- );
74
  }
75
 
76
  return $next($request);
70
  if (substr($path, 0, strlen($prepend)) !== $prepend) {
71
  $request = $request->withUri($request->getUri()
72
  ->withPath($prepend.$path)
73
+ );
74
  }
75
 
76
  return $next($request);
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/AuthenticationPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/BaseUriPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ContentLengthPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ContentTypePlugin.php RENAMED
@@ -39,7 +39,7 @@ final class ContentTypePlugin implements Plugin
39
  *
40
  * Configuration options:
41
  * - skip_detection: true skip detection if stream size is bigger than $size_limit
42
- * - size_limit: size stream limit for which the detection as to be skipped.
43
  */
44
  public function __construct(array $config = [])
45
  {
39
  *
40
  * Configuration options:
41
  * - skip_detection: true skip detection if stream size is bigger than $size_limit
42
+ * - size_limit: size stream limit for which the detection as to be skipped
43
  */
44
  public function __construct(array $config = [])
45
  {
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/CookiePlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/DecoderPlugin.php RENAMED
@@ -34,7 +34,7 @@ final class DecoderPlugin implements Plugin
34
  * @param array{'use_content_encoding'?: bool} $config
35
  *
36
  * Configuration options:
37
- * - use_content_encoding: Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true).
38
  */
39
  public function __construct(array $config = [])
40
  {
34
  * @param array{'use_content_encoding'?: bool} $config
35
  *
36
  * Configuration options:
37
+ * - use_content_encoding: Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true)
38
  */
39
  public function __construct(array $config = [])
40
  {
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ErrorPlugin.php RENAMED
@@ -40,7 +40,7 @@ final class ErrorPlugin implements Plugin
40
  * @param array{'only_server_exception'?: bool} $config
41
  *
42
  * Configuration options:
43
- * - only_server_exception: Whether this plugin should only throw 5XX Exceptions (default to false).
44
  */
45
  public function __construct(array $config = [])
46
  {
@@ -72,10 +72,10 @@ final class ErrorPlugin implements Plugin
72
  * @param RequestInterface $request Request of the call
73
  * @param ResponseInterface $response Response of the call
74
  *
 
 
75
  * @throws ClientErrorException If response status code is a 4xx
76
  * @throws ServerErrorException If response status code is a 5xx
77
- *
78
- * @return ResponseInterface If status code is not in 4xx or 5xx return response
79
  */
80
  private function transformResponseToException(RequestInterface $request, ResponseInterface $response): ResponseInterface
81
  {
40
  * @param array{'only_server_exception'?: bool} $config
41
  *
42
  * Configuration options:
43
+ * - only_server_exception: Whether this plugin should only throw 5XX Exceptions (default to false)
44
  */
45
  public function __construct(array $config = [])
46
  {
72
  * @param RequestInterface $request Request of the call
73
  * @param ResponseInterface $response Response of the call
74
  *
75
+ * @return ResponseInterface If status code is not in 4xx or 5xx return response
76
+ *
77
  * @throws ClientErrorException If response status code is a 4xx
78
  * @throws ServerErrorException If response status code is a 5xx
 
 
79
  */
80
  private function transformResponseToException(RequestInterface $request, ResponseInterface $response): ResponseInterface
81
  {
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderAppendPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderDefaultsPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderRemovePlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HeaderSetPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/HistoryPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/Journal.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/QueryDefaultsPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RedirectPlugin.php RENAMED
@@ -4,14 +4,20 @@ declare(strict_types=1);
4
 
5
  namespace Http\Client\Common\Plugin;
6
 
 
7
  use Http\Client\Common\Exception\CircularRedirectionException;
8
  use Http\Client\Common\Exception\MultipleRedirectionException;
9
  use Http\Client\Common\Plugin;
10
  use Http\Client\Exception\HttpException;
 
11
  use Http\Promise\Promise;
 
12
  use Psr\Http\Message\RequestInterface;
13
  use Psr\Http\Message\ResponseInterface;
 
 
14
  use Psr\Http\Message\UriInterface;
 
15
  use Symfony\Component\OptionsResolver\OptionsResolver;
16
 
17
  /**
@@ -101,13 +107,19 @@ final class RedirectPlugin implements Plugin
101
  */
102
  private $circularDetection = [];
103
 
 
 
 
 
 
104
  /**
105
  * @param array{'preserve_header'?: bool|string[], 'use_default_for_multiple'?: bool, 'strict'?: bool} $config
106
  *
107
  * Configuration options:
108
  * - preserve_header: True keeps all headers, false remove all of them, an array is interpreted as a list of header names to keep
109
  * - use_default_for_multiple: Whether the location header must be directly used for a multiple redirection status code (300)
110
- * - strict: When true, redirect codes 300, 301, 302 will not modify request method and body.
 
111
  */
112
  public function __construct(array $config = [])
113
  {
@@ -116,10 +128,12 @@ final class RedirectPlugin implements Plugin
116
  'preserve_header' => true,
117
  'use_default_for_multiple' => true,
118
  'strict' => false,
 
119
  ]);
120
  $resolver->setAllowedTypes('preserve_header', ['bool', 'array']);
121
  $resolver->setAllowedTypes('use_default_for_multiple', 'bool');
122
  $resolver->setAllowedTypes('strict', 'bool');
 
123
  $resolver->setNormalizer('preserve_header', function (OptionsResolver $resolver, $value) {
124
  if (is_bool($value) && false === $value) {
125
  return [];
@@ -127,6 +141,9 @@ final class RedirectPlugin implements Plugin
127
 
128
  return $value;
129
  });
 
 
 
130
  $options = $resolver->resolve($config);
131
 
132
  $this->preserveHeader = $options['preserve_header'];
@@ -137,6 +154,8 @@ final class RedirectPlugin implements Plugin
137
  $this->redirectCodes[301]['switch'] = false;
138
  $this->redirectCodes[302]['switch'] = false;
139
  }
 
 
140
  }
141
 
142
  /**
@@ -170,7 +189,7 @@ final class RedirectPlugin implements Plugin
170
 
171
  $this->circularDetection[$chainIdentifier][] = (string) $request->getUri();
172
 
173
- if (in_array((string) $redirectRequest->getUri(), $this->circularDetection[$chainIdentifier])) {
174
  throw new CircularRedirectionException('Circular redirection detected', $request, $response);
175
  }
176
 
@@ -186,19 +205,62 @@ final class RedirectPlugin implements Plugin
186
  });
187
  }
188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  private function buildRedirectRequest(RequestInterface $originalRequest, UriInterface $targetUri, int $statusCode): RequestInterface
190
  {
191
  $originalRequest = $originalRequest->withUri($targetUri);
192
 
193
- if (false !== $this->redirectCodes[$statusCode]['switch'] && !in_array($originalRequest->getMethod(), $this->redirectCodes[$statusCode]['switch']['unless'])) {
194
  $originalRequest = $originalRequest->withMethod($this->redirectCodes[$statusCode]['switch']['to']);
 
 
 
 
 
 
195
  }
196
 
197
  if (is_array($this->preserveHeader)) {
198
  $headers = array_keys($originalRequest->getHeaders());
199
 
200
  foreach ($headers as $name) {
201
- if (!in_array($name, $this->preserveHeader)) {
202
  $originalRequest = $originalRequest->withoutHeader($name);
203
  }
204
  }
@@ -226,12 +288,43 @@ final class RedirectPlugin implements Plugin
226
  $location = $redirectResponse->getHeaderLine('Location');
227
  $parsedLocation = parse_url($location);
228
 
229
- if (false === $parsedLocation) {
230
- throw new HttpException(sprintf('Location %s could not be parsed', $location), $originalRequest, $redirectResponse);
231
  }
232
 
233
  $uri = $originalRequest->getUri();
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  if (array_key_exists('scheme', $parsedLocation)) {
236
  $uri = $uri->withScheme($parsedLocation['scheme']);
237
  }
@@ -242,22 +335,8 @@ final class RedirectPlugin implements Plugin
242
 
243
  if (array_key_exists('port', $parsedLocation)) {
244
  $uri = $uri->withPort($parsedLocation['port']);
245
- }
246
-
247
- if (array_key_exists('path', $parsedLocation)) {
248
- $uri = $uri->withPath($parsedLocation['path']);
249
- }
250
-
251
- if (array_key_exists('query', $parsedLocation)) {
252
- $uri = $uri->withQuery($parsedLocation['query']);
253
- } else {
254
- $uri = $uri->withQuery('');
255
- }
256
-
257
- if (array_key_exists('fragment', $parsedLocation)) {
258
- $uri = $uri->withFragment($parsedLocation['fragment']);
259
- } else {
260
- $uri = $uri->withFragment('');
261
  }
262
 
263
  return $uri;
4
 
5
  namespace Http\Client\Common\Plugin;
6
 
7
+ use GuzzleHttp\Psr7\Utils;
8
  use Http\Client\Common\Exception\CircularRedirectionException;
9
  use Http\Client\Common\Exception\MultipleRedirectionException;
10
  use Http\Client\Common\Plugin;
11
  use Http\Client\Exception\HttpException;
12
+ use Http\Discovery\Psr17FactoryDiscovery;
13
  use Http\Promise\Promise;
14
+ use Nyholm\Psr7\Factory\Psr17Factory;
15
  use Psr\Http\Message\RequestInterface;
16
  use Psr\Http\Message\ResponseInterface;
17
+ use Psr\Http\Message\StreamFactoryInterface;
18
+ use Psr\Http\Message\StreamInterface;
19
  use Psr\Http\Message\UriInterface;
20
+ use Symfony\Component\OptionsResolver\Options;
21
  use Symfony\Component\OptionsResolver\OptionsResolver;
22
 
23
  /**
107
  */
108
  private $circularDetection = [];
109
 
110
+ /**
111
+ * @var StreamFactoryInterface|null
112
+ */
113
+ private $streamFactory;
114
+
115
  /**
116
  * @param array{'preserve_header'?: bool|string[], 'use_default_for_multiple'?: bool, 'strict'?: bool} $config
117
  *
118
  * Configuration options:
119
  * - preserve_header: True keeps all headers, false remove all of them, an array is interpreted as a list of header names to keep
120
  * - use_default_for_multiple: Whether the location header must be directly used for a multiple redirection status code (300)
121
+ * - strict: When true, redirect codes 300, 301, 302 will not modify request method and body
122
+ * - stream_factory: If set, must be a PSR-17 StreamFactoryInterface - if not set, we try to discover one
123
  */
124
  public function __construct(array $config = [])
125
  {
128
  'preserve_header' => true,
129
  'use_default_for_multiple' => true,
130
  'strict' => false,
131
+ 'stream_factory' => null,
132
  ]);
133
  $resolver->setAllowedTypes('preserve_header', ['bool', 'array']);
134
  $resolver->setAllowedTypes('use_default_for_multiple', 'bool');
135
  $resolver->setAllowedTypes('strict', 'bool');
136
+ $resolver->setAllowedTypes('stream_factory', [StreamFactoryInterface::class, 'null']);
137
  $resolver->setNormalizer('preserve_header', function (OptionsResolver $resolver, $value) {
138
  if (is_bool($value) && false === $value) {
139
  return [];
141
 
142
  return $value;
143
  });
144
+ $resolver->setDefault('stream_factory', function (Options $options): ?StreamFactoryInterface {
145
+ return $this->guessStreamFactory();
146
+ });
147
  $options = $resolver->resolve($config);
148
 
149
  $this->preserveHeader = $options['preserve_header'];
154
  $this->redirectCodes[301]['switch'] = false;
155
  $this->redirectCodes[302]['switch'] = false;
156
  }
157
+
158
+ $this->streamFactory = $options['stream_factory'];
159
  }
160
 
161
  /**
189
 
190
  $this->circularDetection[$chainIdentifier][] = (string) $request->getUri();
191
 
192
+ if (in_array((string) $redirectRequest->getUri(), $this->circularDetection[$chainIdentifier], true)) {
193
  throw new CircularRedirectionException('Circular redirection detected', $request, $response);
194
  }
195
 
205
  });
206
  }
207
 
208
+ /**
209
+ * The default only needs to be determined if no value is provided.
210
+ */
211
+ public function guessStreamFactory(): ?StreamFactoryInterface
212
+ {
213
+ if (class_exists(Psr17FactoryDiscovery::class)) {
214
+ try {
215
+ return Psr17FactoryDiscovery::findStreamFactory();
216
+ } catch (\Throwable $t) {
217
+ // ignore and try other options
218
+ }
219
+ }
220
+ if (class_exists(Psr17Factory::class)) {
221
+ return new Psr17Factory();
222
+ }
223
+ if (class_exists(Utils::class)) {
224
+ return new class() implements StreamFactoryInterface {
225
+ public function createStream(string $content = ''): StreamInterface
226
+ {
227
+ return Utils::streamFor($content);
228
+ }
229
+
230
+ public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface
231
+ {
232
+ throw new \RuntimeException('Internal error: this method should not be needed');
233
+ }
234
+
235
+ public function createStreamFromResource($resource): StreamInterface
236
+ {
237
+ throw new \RuntimeException('Internal error: this method should not be needed');
238
+ }
239
+ };
240
+ }
241
+
242
+ return null;
243
+ }
244
+
245
  private function buildRedirectRequest(RequestInterface $originalRequest, UriInterface $targetUri, int $statusCode): RequestInterface
246
  {
247
  $originalRequest = $originalRequest->withUri($targetUri);
248
 
249
+ if (false !== $this->redirectCodes[$statusCode]['switch'] && !in_array($originalRequest->getMethod(), $this->redirectCodes[$statusCode]['switch']['unless'], true)) {
250
  $originalRequest = $originalRequest->withMethod($this->redirectCodes[$statusCode]['switch']['to']);
251
+ if ('GET' === $this->redirectCodes[$statusCode]['switch']['to'] && $this->streamFactory) {
252
+ // if we found a stream factory, remove the request body. otherwise leave the body there.
253
+ $originalRequest = $originalRequest->withoutHeader('content-type');
254
+ $originalRequest = $originalRequest->withoutHeader('content-length');
255
+ $originalRequest = $originalRequest->withBody($this->streamFactory->createStream());
256
+ }
257
  }
258
 
259
  if (is_array($this->preserveHeader)) {
260
  $headers = array_keys($originalRequest->getHeaders());
261
 
262
  foreach ($headers as $name) {
263
+ if (!in_array($name, $this->preserveHeader, true)) {
264
  $originalRequest = $originalRequest->withoutHeader($name);
265
  }
266
  }
288
  $location = $redirectResponse->getHeaderLine('Location');
289
  $parsedLocation = parse_url($location);
290
 
291
+ if (false === $parsedLocation || '' === $location) {
292
+ throw new HttpException(sprintf('Location "%s" could not be parsed', $location), $originalRequest, $redirectResponse);
293
  }
294
 
295
  $uri = $originalRequest->getUri();
296
 
297
+ // Redirections can either use an absolute uri or a relative reference https://www.rfc-editor.org/rfc/rfc3986#section-4.2
298
+ // If relative, we need to check if we have an absolute path or not
299
+
300
+ $path = array_key_exists('path', $parsedLocation) ? $parsedLocation['path'] : '';
301
+ if (!array_key_exists('host', $parsedLocation) && '/' !== $location[0]) {
302
+ // the target is a relative-path reference, we need to merge it with the base path
303
+ $originalPath = $uri->getPath();
304
+ if ('' === $path) {
305
+ $path = $originalPath;
306
+ } elseif (($pos = strrpos($originalPath, '/')) !== false) {
307
+ $path = substr($originalPath, 0, $pos + 1).$path;
308
+ } else {
309
+ $path = '/'.$path;
310
+ }
311
+ /* replace '/./' or '/foo/../' with '/' */
312
+ $re = ['#(/\./)#', '#/(?!\.\.)[^/]+/\.\./#'];
313
+ for ($n = 1; $n > 0; $path = preg_replace($re, '/', $path, -1, $n)) {
314
+ if (null === $path) {
315
+ throw new HttpException(sprintf('Failed to resolve Location %s', $location), $originalRequest, $redirectResponse);
316
+ }
317
+ }
318
+ }
319
+ if (null === $path) {
320
+ throw new HttpException(sprintf('Failed to resolve Location %s', $location), $originalRequest, $redirectResponse);
321
+ }
322
+ $uri = $uri
323
+ ->withPath($path)
324
+ ->withQuery(array_key_exists('query', $parsedLocation) ? $parsedLocation['query'] : '')
325
+ ->withFragment(array_key_exists('fragment', $parsedLocation) ? $parsedLocation['fragment'] : '')
326
+ ;
327
+
328
  if (array_key_exists('scheme', $parsedLocation)) {
329
  $uri = $uri->withScheme($parsedLocation['scheme']);
330
  }
335
 
336
  if (array_key_exists('port', $parsedLocation)) {
337
  $uri = $uri->withPort($parsedLocation['port']);
338
+ } elseif (array_key_exists('host', $parsedLocation)) {
339
+ $uri = $uri->withPort(null);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  }
341
 
342
  return $uri;
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RequestMatcherPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RequestSeekableBodyPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/ResponseSeekableBodyPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/RetryPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/SeekableBodyPlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/Plugin/VersionBridgePlugin.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginChain.php RENAMED
@@ -5,6 +5,7 @@ declare(strict_types=1);
5
  namespace Http\Client\Common;
6
 
7
  use function array_reverse;
 
8
  use Http\Client\Common\Exception\LoopException;
9
  use Http\Promise\Promise;
10
  use Psr\Http\Message\RequestInterface;
5
  namespace Http\Client\Common;
6
 
7
  use function array_reverse;
8
+
9
  use Http\Client\Common\Exception\LoopException;
10
  use Http\Promise\Promise;
11
  use Psr\Http\Message\RequestInterface;
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginClient.php RENAMED
@@ -124,7 +124,6 @@ final class PluginClient implements HttpClient, HttpAsyncClient
124
  */
125
  private function createPluginChain(array $plugins, callable $clientCallable): callable
126
  {
127
- /** @var callable(RequestInterface): Promise */
128
  return new PluginChain($plugins, $clientCallable, $this->options);
129
  }
130
  }
124
  */
125
  private function createPluginChain(array $plugins, callable $clientCallable): callable
126
  {
 
127
  return new PluginChain($plugins, $clientCallable, $this->options);
128
  }
129
  }
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginClientBuilder.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/PluginClientFactory.php RENAMED
@@ -39,11 +39,11 @@ final class PluginClientFactory
39
  /**
40
  * @param ClientInterface|HttpAsyncClient $client
41
  * @param Plugin[] $plugins
42
- * @param array{'client_name'?: string} $options
43
  *
44
  * Configuration options:
45
  * - client_name: to give client a name which may be used when displaying client information
46
- * like in the HTTPlugBundle profiler.
47
  *
48
  * @see PluginClient constructor for PluginClient specific $options.
49
  */
39
  /**
40
  * @param ClientInterface|HttpAsyncClient $client
41
  * @param Plugin[] $plugins
42
+ * @param array{'client_name'?: string} $options
43
  *
44
  * Configuration options:
45
  * - client_name: to give client a name which may be used when displaying client information
46
+ * like in the HTTPlugBundle profiler
47
  *
48
  * @see PluginClient constructor for PluginClient specific $options.
49
  */
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/client-common/src/VersionBridgeClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/.php-cs-fixer.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/CHANGELOG.md RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/LICENSE RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/ClassDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/ClassInstantiationFailedException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/DiscoveryFailedException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/NoCandidateFoundException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/NotFoundException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/PuliUnavailableException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Exception/StrategyUnavailableException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/HttpAsyncClientDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/HttpClientDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/MessageFactoryDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/NotFoundException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Psr17FactoryDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Psr18ClientDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/CommonClassesStrategy.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/CommonPsr17ClassesStrategy.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/DiscoveryStrategy.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/MockClientStrategy.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/Strategy/PuliBetaStrategy.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/StreamFactoryDiscovery.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/discovery/src/UriFactoryDiscovery.php RENAMED
File without changes
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/CHANGELOG.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+
3
+
4
+ All notable changes to this project will be documented in this file.
5
+
6
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
7
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
8
+
9
+ ## [2.0.2] - 2021-03-02
10
+
11
+ ### Added
12
+
13
+ - Add Support for PHP 8
14
+
15
+ ## [2.0.1] - 2018-12-16
16
+
17
+ ### Fixed
18
+ - `\Http\Adapter\Guzzle6\Client::sendRequest` no longer throws any exceptions that do not implement
19
+ the PSR exception interface.
20
+
21
+ Instead of `\UnexpectedValueException` we now throw `Http\Adapter\Guzzle6\Exception\UnexpectedValueException`
22
+ (which extends `\UnexpectedValueException` and implements `Psr\Http\Client\ClientExceptionInterface`).
23
+
24
+ Instead of `\RuntimeException` we now throw `Http\Client\Exception\TransferException`
25
+ (which extends `\RuntimeException` and implements `Psr\Http\Client\ClientExceptionInterface`).
26
+
27
+ ## [2.0.0] - 2018-11-14
28
+
29
+ ### Added
30
+
31
+ - Support for HTTPlug 2.0 and PSR-18
32
+
33
+ ### Changed
34
+
35
+ - `Client` and `Promise` are both final
36
+
37
+ ### Removed
38
+
39
+ - Support for PHP <7.1
40
+
41
+
42
+ ## [1.1.1] - 2016-05-10
43
+
44
+ ### Fixed
45
+
46
+ - Adapter can again be instantiated without a guzzle client.
47
+
48
+
49
+ ## [1.1.0] - 2016-05-09
50
+
51
+ ### Added
52
+
53
+ - Factory method Client::createWithConfig to create an adapter with custom
54
+ configuration for the underlying guzzle client.
55
+
56
+
57
+ ## [1.0.0] - 2016-01-26
58
+
59
+
60
+ ## [0.4.1] - 2016-01-13
61
+
62
+ ### Changed
63
+
64
+ - Updated integration tests
65
+
66
+ ### Removed
67
+
68
+ - Client common dependency
69
+
70
+
71
+ ## [0.4.0] - 2016-01-12
72
+
73
+ ### Changed
74
+
75
+ - Updated package files
76
+ - Updated HTTPlug to RC1
77
+
78
+
79
+ ## [0.3.1] - 2015-12-31
80
+
81
+
82
+ ## [0.3.0] - 2015-12-31
83
+
84
+
85
+ ## [0.2.1] - 2015-12-17
86
+
87
+ ### Added
88
+
89
+ - Puli configuration and bindings
90
+
91
+ ### Changed
92
+
93
+ - Guzzle setup conforms to HTTPlug requirement now: Minimal functionality in client
94
+
95
+
96
+ ## [0.2.0] - 2015-12-15
97
+
98
+ ### Added
99
+
100
+ - Async client capabalities
101
+
102
+ ### Changed
103
+
104
+ - HTTPlug instead of HTTP Adapter
105
+
106
+
107
+ ## 0.1.0 - 2015-06-12
108
+
109
+ ### Added
110
+
111
+ - Initial release
112
+
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2014-2015 Eric GELOEN <geloen.eric@gmail.com>
2
+ Copyright (c) 2015-2016 PHP HTTP Team <team@php-http.org>
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/puli.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "name": "php-http/guzzle6-adapter",
4
+ "bindings": {
5
+ "04b5a002-71a8-473d-a8df-75671551b84a": {
6
+ "_class": "Puli\\Discovery\\Binding\\ClassBinding",
7
+ "class": "Http\\Adapter\\Guzzle6\\Client",
8
+ "type": "Http\\Client\\HttpClient"
9
+ },
10
+ "9c856476-7f6b-43df-a740-15420a5f839c": {
11
+ "_class": "Puli\\Discovery\\Binding\\ClassBinding",
12
+ "class": "Http\\Adapter\\Guzzle6\\Client",
13
+ "type": "Http\\Client\\HttpAsyncClient"
14
+ }
15
+ }
16
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/src/Client.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace Http\Adapter\Guzzle6;
6
+
7
+ use GuzzleHttp\Client as GuzzleClient;
8
+ use GuzzleHttp\ClientInterface;
9
+ use GuzzleHttp\HandlerStack;
10
+ use GuzzleHttp\Middleware;
11
+ use Http\Client\HttpAsyncClient;
12
+ use Http\Client\HttpClient;
13
+ use Psr\Http\Message\RequestInterface;
14
+ use Psr\Http\Message\ResponseInterface;
15
+
16
+ /**
17
+ * HTTP Adapter for Guzzle 6.
18
+ *
19
+ * @author David de Boer <david@ddeboer.nl>
20
+ */
21
+ final class Client implements HttpClient, HttpAsyncClient
22
+ {
23
+ /**
24
+ * @var ClientInterface
25
+ */
26
+ private $client;
27
+
28
+ /**
29
+ * If you pass a Guzzle instance as $client, make sure to configure Guzzle to not
30
+ * throw exceptions on HTTP error status codes, or this adapter will violate PSR-18.
31
+ * See also self::buildClient at the bottom of this class.
32
+ */
33
+ public function __construct(?ClientInterface $client = null)
34
+ {
35
+ if (!$client) {
36
+ $client = self::buildClient();
37
+ }
38
+
39
+ $this->client = $client;
40
+ }
41
+
42
+ /**
43
+ * Factory method to create the Guzzle 6 adapter with custom Guzzle configuration.
44
+ */
45
+ public static function createWithConfig(array $config): Client
46
+ {
47
+ return new self(self::buildClient($config));
48
+ }
49
+
50
+ /**
51
+ * {@inheritdoc}
52
+ */
53
+ public function sendRequest(RequestInterface $request): ResponseInterface
54
+ {
55
+ $promise = $this->sendAsyncRequest($request);
56
+
57
+ return $promise->wait();
58
+ }
59
+
60
+ /**
61
+ * {@inheritdoc}
62
+ */
63
+ public function sendAsyncRequest(RequestInterface $request)
64
+ {
65
+ $promise = $this->client->sendAsync($request);
66
+
67
+ return new Promise($promise, $request);
68
+ }
69
+
70
+ /**
71
+ * Build the Guzzle client instance.
72
+ */
73
+ private static function buildClient(array $config = []): GuzzleClient
74
+ {
75
+ $handlerStack = new HandlerStack(\GuzzleHttp\choose_handler());
76
+ $handlerStack->push(Middleware::prepareBody(), 'prepare_body');
77
+ $config = array_merge(['handler' => $handlerStack], $config);
78
+
79
+ return new GuzzleClient($config);
80
+ }
81
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/src/Exception/UnexpectedValueException.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Http\Adapter\Guzzle6\Exception;
4
+
5
+ use Http\Client\Exception;
6
+
7
+ final class UnexpectedValueException extends \UnexpectedValueException implements Exception
8
+ {
9
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http/guzzle6-adapter/src/Promise.php ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace Http\Adapter\Guzzle6;
6
+
7
+ use GuzzleHttp\Exception as GuzzleExceptions;
8
+ use GuzzleHttp\Promise\PromiseInterface;
9
+ use Http\Adapter\Guzzle6\Exception\UnexpectedValueException;
10
+ use Http\Client\Exception as HttplugException;
11
+ use Http\Promise\Promise as HttpPromise;
12
+ use Psr\Http\Message\RequestInterface;
13
+ use Psr\Http\Message\ResponseInterface;
14
+
15
+ /**
16
+ * Wrapper around Guzzle promises.
17
+ *
18
+ * @author Joel Wurtz <joel.wurtz@gmail.com>
19
+ */
20
+ final class Promise implements HttpPromise
21
+ {
22
+ /**
23
+ * @var PromiseInterface
24
+ */
25
+ private $promise;
26
+
27
+ /**
28
+ * @var string State of the promise
29
+ */
30
+ private $state;
31
+
32
+ /**
33
+ * @var ResponseInterface
34
+ */
35
+ private $response;
36
+
37
+ /**
38
+ * @var HttplugException
39
+ */
40
+ private $exception;
41
+
42
+ /**
43
+ * @var RequestInterface
44
+ */
45
+ private $request;
46
+
47
+ public function __construct(PromiseInterface $promise, RequestInterface $request)
48
+ {
49
+ $this->request = $request;
50
+ $this->state = self::PENDING;
51
+ $this->promise = $promise->then(function ($response) {
52
+ $this->response = $response;
53
+ $this->state = self::FULFILLED;
54
+
55
+ return $response;
56
+ }, function ($reason) use ($request) {
57
+ $this->state = self::REJECTED;
58
+
59
+ if ($reason instanceof HttplugException) {
60
+ $this->exception = $reason;
61
+ } elseif ($reason instanceof GuzzleExceptions\GuzzleException) {
62
+ $this->exception = $this->handleException($reason, $request);
63
+ } elseif ($reason instanceof \Throwable) {
64
+ $this->exception = new HttplugException\TransferException('Invalid exception returned from Guzzle6', 0, $reason);
65
+ } else {
66
+ $this->exception = new UnexpectedValueException('Reason returned from Guzzle6 must be an Exception');
67
+ }
68
+
69
+ throw $this->exception;
70
+ });
71
+ }
72
+
73
+ /**
74
+ * {@inheritdoc}
75
+ */
76
+ public function then(callable $onFulfilled = null, callable $onRejected = null)
77
+ {
78
+ return new static($this->promise->then($onFulfilled, $onRejected), $this->request);
79
+ }
80
+
81
+ /**
82
+ * {@inheritdoc}
83
+ */
84
+ public function getState()
85
+ {
86
+ return $this->state;
87
+ }
88
+
89
+ /**
90
+ * {@inheritdoc}
91
+ */
92
+ public function wait($unwrap = true)
93
+ {
94
+ $this->promise->wait(false);
95
+
96
+ if ($unwrap) {
97
+ if (self::REJECTED == $this->getState()) {
98
+ throw $this->exception;
99
+ }
100
+
101
+ return $this->response;
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Converts a Guzzle exception into an Httplug exception.
107
+ */
108
+ private function handleException(GuzzleExceptions\GuzzleException $exception, RequestInterface $request): HttplugException
109
+ {
110
+ if ($exception instanceof GuzzleExceptions\SeekException) {
111
+ return new HttplugException\RequestException($exception->getMessage(), $request, $exception);
112
+ }
113
+
114
+ if ($exception instanceof GuzzleExceptions\ConnectException) {
115
+ return new HttplugException\NetworkException($exception->getMessage(), $exception->getRequest(), $exception);
116
+ }
117
+
118
+ if ($exception instanceof GuzzleExceptions\RequestException) {
119
+ // Make sure we have a response for the HttpException
120
+ if ($exception->hasResponse()) {
121
+ return new HttplugException\HttpException(
122
+ $exception->getMessage(),
123
+ $exception->getRequest(),
124
+ $exception->getResponse(),
125
+ $exception
126
+ );
127
+ }
128
+
129
+ return new HttplugException\RequestException($exception->getMessage(), $exception->getRequest(), $exception);
130
+ }
131
+
132
+ return new HttplugException\TransferException($exception->getMessage(), 0, $exception);
133
+ }
134
+ }
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/.php-cs-fixer.dist.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/CHANGELOG.md RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/LICENSE RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/puli.json RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/HttpException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/NetworkException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/RequestAwareTrait.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/RequestException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Exception/TransferException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/HttpAsyncClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/HttpClient.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Promise/HttpFulfilledPromise.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/httplug/src/Promise/HttpRejectedPromise.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/CHANGELOG.md RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/LICENSE RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/puli.json RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/MessageFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/RequestFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/ResponseFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/StreamFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message-factory/src/UriFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/CHANGELOG.md RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/LICENSE RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/apigen.neon RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/puli.json RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/AutoBasicAuth.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/BasicAuth.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Bearer.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Chain.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Header.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Matching.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/QueryParam.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/RequestConditional.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Authentication/Wsse.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Builder/ResponseBuilder.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Cookie.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/CookieJar.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/CookieUtil.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/MessageDecorator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/RequestDecorator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/ResponseDecorator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Decorator/StreamDecorator.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/ChunkStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/CompressStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/DechunkStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/DecompressStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/DeflateStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/Filter/Chunk.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/FilteredStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/GzipDecodeStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/GzipEncodeStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Encoding/InflateStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Exception.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Exception/UnexpectedValueException.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter/CurlCommandFormatter.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter/FullHttpMessageFormatter.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Formatter/SimpleFormatter.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/MessageFactory/DiactorosMessageFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/MessageFactory/GuzzleMessageFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/MessageFactory/SlimMessageFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher/CallbackRequestMatcher.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher/RegexRequestMatcher.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/RequestMatcher/RequestMatcher.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/Stream/BufferedStream.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/StreamFactory/DiactorosStreamFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/StreamFactory/GuzzleStreamFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/StreamFactory/SlimStreamFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/UriFactory/DiactorosUriFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/UriFactory/GuzzleUriFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/UriFactory/SlimUriFactory.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/message/src/filters.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/CHANGELOG.md RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/LICENSE RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/src/FulfilledPromise.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/src/Promise.php RENAMED
File without changes
vendor/{php-http → codeinwp/themeisle-content-forms/library/mailerlite/vendor/php-http}/promise/src/RejectedPromise.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/CHANGELOG.md RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/LICENSE RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/ClientExceptionInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/ClientInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/NetworkExceptionInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-client/src/RequestExceptionInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/.pullapprove.yml RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/LICENSE RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/RequestFactoryInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/ResponseFactoryInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/ServerRequestFactoryInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/StreamFactoryInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/UploadedFileFactoryInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-factory/src/UriFactoryInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/CHANGELOG.md RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/LICENSE RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/MessageInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/RequestInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/ResponseInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/ServerRequestInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/StreamInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/UploadedFileInterface.php RENAMED
File without changes
vendor/{psr → codeinwp/themeisle-content-forms/library/mailerlite/vendor/psr}/http-message/src/UriInterface.php RENAMED
File without changes
vendor/{mailerlite/mailerlite-api-v2-php-sdk/LICENSE.md → codeinwp/themeisle-content-forms/library/mailerlite/vendor/ralouphie/getallheaders/LICENSE} RENAMED
@@ -1,6 +1,6 @@
1
- MIT License
2
 
3
- Copyright (c) 2019 MailerLite
4
 
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
  of this software and associated documentation files (the "Software"), to deal
1
+ The MIT License (MIT)
2
 
3
+ Copyright (c) 2014 Ralph Khattar
4
 
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
  of this software and associated documentation files (the "Software"), to deal
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/ralouphie/getallheaders/src/getallheaders.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!function_exists('getallheaders')) {
4
+
5
+ /**
6
+ * Get all HTTP header key/values as an associative array for the current request.
7
+ *
8
+ * @return string[string] The HTTP header key/value pairs.
9
+ */
10
+ function getallheaders()
11
+ {
12
+ $headers = array();
13
+
14
+ $copy_server = array(
15
+ 'CONTENT_TYPE' => 'Content-Type',
16
+ 'CONTENT_LENGTH' => 'Content-Length',
17
+ 'CONTENT_MD5' => 'Content-Md5',
18
+ );
19
+
20
+ foreach ($_SERVER as $key => $value) {
21
+ if (substr($key, 0, 5) === 'HTTP_') {
22
+ $key = substr($key, 5);
23
+ if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {
24
+ $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
25
+ $headers[$key] = $value;
26
+ }
27
+ } elseif (isset($copy_server[$key])) {
28
+ $headers[$copy_server[$key]] = $value;
29
+ }
30
+ }
31
+
32
+ if (!isset($headers['Authorization'])) {
33
+ if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
34
+ $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
35
+ } elseif (isset($_SERVER['PHP_AUTH_USER'])) {
36
+ $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
37
+ $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
38
+ } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
39
+ $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
40
+ }
41
+ }
42
+
43
+ return $headers;
44
+ }
45
+
46
+ }
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/deprecation-contracts/CHANGELOG.md RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/deprecation-contracts/LICENSE RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/deprecation-contracts/function.php RENAMED
@@ -20,7 +20,7 @@ if (!function_exists('trigger_deprecation')) {
20
  *
21
  * @author Nicolas Grekas <p@tchwork.com>
22
  */
23
- function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
24
  {
25
  @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
26
  }
20
  *
21
  * @author Nicolas Grekas <p@tchwork.com>
22
  */
23
+ function trigger_deprecation(string $package, string $version, string $message, ...$args): void
24
  {
25
  @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
26
  }
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/CHANGELOG.md RENAMED
@@ -1,11 +1,6 @@
1
  CHANGELOG
2
  =========
3
 
4
- 6.0
5
- ---
6
-
7
- * Remove `OptionsResolverIntrospector::getDeprecationMessage()`
8
-
9
  5.3
10
  ---
11
 
1
  CHANGELOG
2
  =========
3
 
 
 
 
 
 
4
  5.3
5
  ---
6
 
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Debug/OptionsResolverIntrospector.php RENAMED
@@ -41,9 +41,11 @@ class OptionsResolverIntrospector
41
  }
42
 
43
  /**
 
 
44
  * @throws NoConfigurationException on no configured value
45
  */
46
- public function getDefault(string $option): mixed
47
  {
48
  return ($this->get)('defaults', $option, sprintf('No default value was set for the "%s" option.', $option));
49
  }
@@ -94,6 +96,20 @@ class OptionsResolverIntrospector
94
  return ($this->get)('normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option));
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  /**
98
  * @throws NoConfigurationException on no configured deprecation
99
  */
41
  }
42
 
43
  /**
44
+ * @return mixed
45
+ *
46
  * @throws NoConfigurationException on no configured value
47
  */
48
+ public function getDefault(string $option)
49
  {
50
  return ($this->get)('defaults', $option, sprintf('No default value was set for the "%s" option.', $option));
51
  }
96
  return ($this->get)('normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option));
97
  }
98
 
99
+ /**
100
+ * @return string|\Closure
101
+ *
102
+ * @throws NoConfigurationException on no configured deprecation
103
+ *
104
+ * @deprecated since Symfony 5.1, use "getDeprecation()" instead.
105
+ */
106
+ public function getDeprecationMessage(string $option)
107
+ {
108
+ trigger_deprecation('symfony/options-resolver', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__);
109
+
110
+ return $this->getDeprecation($option)['message'];
111
+ }
112
+
113
  /**
114
  * @throws NoConfigurationException on no configured deprecation
115
  */
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/AccessException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/ExceptionInterface.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/InvalidArgumentException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/InvalidOptionsException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/MissingOptionsException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/NoConfigurationException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/NoSuchOptionException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/OptionDefinitionException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Exception/UndefinedOptionsException.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/LICENSE RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/OptionConfigurator.php RENAMED
@@ -32,7 +32,7 @@ final class OptionConfigurator
32
  *
33
  * @throws AccessException If called from a lazy option or normalizer
34
  */
35
- public function allowedTypes(string ...$types): static
36
  {
37
  $this->resolver->setAllowedTypes($this->name, $types);
38
 
@@ -48,7 +48,7 @@ final class OptionConfigurator
48
  *
49
  * @throws AccessException If called from a lazy option or normalizer
50
  */
51
- public function allowedValues(mixed ...$values): static
52
  {
53
  $this->resolver->setAllowedValues($this->name, $values);
54
 
@@ -58,11 +58,13 @@ final class OptionConfigurator
58
  /**
59
  * Sets the default value for this option.
60
  *
 
 
61
  * @return $this
62
  *
63
  * @throws AccessException If called from a lazy option or normalizer
64
  */
65
- public function default(mixed $value): static
66
  {
67
  $this->resolver->setDefault($this->name, $value);
68
 
@@ -86,7 +88,7 @@ final class OptionConfigurator
86
  *
87
  * @return $this
88
  */
89
- public function deprecated(string $package, string $version, string|\Closure $message = 'The option "%name%" is deprecated.'): static
90
  {
91
  $this->resolver->setDeprecated($this->name, $package, $version, $message);
92
 
@@ -100,7 +102,7 @@ final class OptionConfigurator
100
  *
101
  * @throws AccessException If called from a lazy option or normalizer
102
  */
103
- public function normalize(\Closure $normalizer): static
104
  {
105
  $this->resolver->setNormalizer($this->name, $normalizer);
106
 
@@ -114,7 +116,7 @@ final class OptionConfigurator
114
  *
115
  * @throws AccessException If called from a lazy option or normalizer
116
  */
117
- public function required(): static
118
  {
119
  $this->resolver->setRequired($this->name);
120
 
@@ -128,7 +130,7 @@ final class OptionConfigurator
128
  *
129
  * @throws AccessException If called from a lazy option or normalizer
130
  */
131
- public function info(string $info): static
132
  {
133
  $this->resolver->setInfo($this->name, $info);
134
 
32
  *
33
  * @throws AccessException If called from a lazy option or normalizer
34
  */
35
+ public function allowedTypes(string ...$types): self
36
  {
37
  $this->resolver->setAllowedTypes($this->name, $types);
38
 
48
  *
49
  * @throws AccessException If called from a lazy option or normalizer
50
  */
51
+ public function allowedValues(...$values): self
52
  {
53
  $this->resolver->setAllowedValues($this->name, $values);
54
 
58
  /**
59
  * Sets the default value for this option.
60
  *
61
+ * @param mixed $value The default value of the option
62
+ *
63
  * @return $this
64
  *
65
  * @throws AccessException If called from a lazy option or normalizer
66
  */
67
+ public function default($value): self
68
  {
69
  $this->resolver->setDefault($this->name, $value);
70
 
88
  *
89
  * @return $this
90
  */
91
+ public function deprecated(string $package, string $version, $message = 'The option "%name%" is deprecated.'): self
92
  {
93
  $this->resolver->setDeprecated($this->name, $package, $version, $message);
94
 
102
  *
103
  * @throws AccessException If called from a lazy option or normalizer
104
  */
105
+ public function normalize(\Closure $normalizer): self
106
  {
107
  $this->resolver->setNormalizer($this->name, $normalizer);
108
 
116
  *
117
  * @throws AccessException If called from a lazy option or normalizer
118
  */
119
+ public function required(): self
120
  {
121
  $this->resolver->setRequired($this->name);
122
 
130
  *
131
  * @throws AccessException If called from a lazy option or normalizer
132
  */
133
+ public function info(string $info): self
134
  {
135
  $this->resolver->setInfo($this->name, $info);
136
 
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/Options.php RENAMED
File without changes
vendor/{symfony → codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony}/options-resolver/OptionsResolver.php RENAMED
@@ -187,11 +187,14 @@ class OptionsResolver implements Options
187
  * // 'default' === $parent['connection']
188
  * }
189
  *
 
 
 
190
  * @return $this
191
  *
192
  * @throws AccessException If called from a lazy option or normalizer
193
  */
194
- public function setDefault(string $option, mixed $value): static
195
  {
196
  // Setting is not possible once resolving starts, because then lazy
197
  // options could manipulate the state of the object, leading to
@@ -262,7 +265,7 @@ class OptionsResolver implements Options
262
  *
263
  * @throws AccessException If called from a lazy option or normalizer
264
  */
265
- public function setDefaults(array $defaults): static
266
  {
267
  foreach ($defaults as $option => $value) {
268
  $this->setDefault($option, $value);
@@ -276,8 +279,10 @@ class OptionsResolver implements Options
276
  *
277
  * Returns true if {@link setDefault()} was called for this option.
278
  * An option is also considered set if it was set to null.
 
 
279
  */
280
- public function hasDefault(string $option): bool
281
  {
282
  return \array_key_exists($option, $this->defaults);
283
  }
@@ -291,7 +296,7 @@ class OptionsResolver implements Options
291
  *
292
  * @throws AccessException If called from a lazy option or normalizer
293
  */
294
- public function setRequired(string|array $optionNames): static
295
  {
296
  if ($this->locked) {
297
  throw new AccessException('Options cannot be made required from a lazy option or normalizer.');
@@ -309,8 +314,10 @@ class OptionsResolver implements Options
309
  * Returns whether an option is required.
310
  *
311
  * An option is required if it was passed to {@link setRequired()}.
 
 
312
  */
313
- public function isRequired(string $option): bool
314
  {
315
  return isset($this->required[$option]);
316
  }
@@ -322,7 +329,7 @@ class OptionsResolver implements Options
322
  *
323
  * @see isRequired()
324
  */
325
- public function getRequiredOptions(): array
326
  {
327
  return array_keys($this->required);
328
  }
@@ -333,8 +340,10 @@ class OptionsResolver implements Options
333
  * An option is missing if it was passed to {@link setRequired()}, but not
334
  * to {@link setDefault()}. This option must be passed explicitly to
335
  * {@link resolve()}, otherwise an exception will be thrown.
 
 
336
  */
337
- public function isMissing(string $option): bool
338
  {
339
  return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults);
340
  }
@@ -344,7 +353,7 @@ class OptionsResolver implements Options
344
  *
345
  * @return string[]
346
  */
347
- public function getMissingOptions(): array
348
  {
349
  return array_keys(array_diff_key($this->required, $this->defaults));
350
  }
@@ -362,7 +371,7 @@ class OptionsResolver implements Options
362
  *
363
  * @throws AccessException If called from a lazy option or normalizer
364
  */
365
- public function setDefined(string|array $optionNames): static
366
  {
367
  if ($this->locked) {
368
  throw new AccessException('Options cannot be defined from a lazy option or normalizer.');
@@ -380,8 +389,10 @@ class OptionsResolver implements Options
380
  *
381
  * Returns true for any option passed to {@link setDefault()},
382
  * {@link setRequired()} or {@link setDefined()}.
 
 
383
  */
384
- public function isDefined(string $option): bool
385
  {
386
  return isset($this->defined[$option]);
387
  }
@@ -393,7 +404,7 @@ class OptionsResolver implements Options
393
  *
394
  * @see isDefined()
395
  */
396
- public function getDefinedOptions(): array
397
  {
398
  return array_keys($this->defined);
399
  }
@@ -426,7 +437,7 @@ class OptionsResolver implements Options
426
  *
427
  * @return $this
428
  */
429
- public function setDeprecated(string $option, string $package, string $version, string|\Closure $message = 'The option "%name%" is deprecated.'): static
430
  {
431
  if ($this->locked) {
432
  throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.');
@@ -436,6 +447,19 @@ class OptionsResolver implements Options
436
  throw new UndefinedOptionsException(sprintf('The option "%s" does not exist, defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
437
  }
438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  if (!\is_string($message) && !$message instanceof \Closure) {
440
  throw new InvalidArgumentException(sprintf('Invalid type for deprecation message argument, expected string or \Closure, but got "%s".', get_debug_type($message)));
441
  }
@@ -526,7 +550,7 @@ class OptionsResolver implements Options
526
  * @throws UndefinedOptionsException If the option is undefined
527
  * @throws AccessException If called from a lazy option or normalizer
528
  */
529
- public function addNormalizer(string $option, \Closure $normalizer, bool $forcePrepend = false): static
530
  {
531
  if ($this->locked) {
532
  throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.');
@@ -562,14 +586,15 @@ class OptionsResolver implements Options
562
  * The closure receives the value as argument and should return true to
563
  * accept the value and false to reject the value.
564
  *
565
- * @param mixed $allowedValues One or more acceptable values/closures
 
566
  *
567
  * @return $this
568
  *
569
  * @throws UndefinedOptionsException If the option is undefined
570
  * @throws AccessException If called from a lazy option or normalizer
571
  */
572
- public function setAllowedValues(string $option, mixed $allowedValues)
573
  {
574
  if ($this->locked) {
575
  throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.');
@@ -602,14 +627,15 @@ class OptionsResolver implements Options
602
  * The closure receives the value as argument and should return true to
603
  * accept the value and false to reject the value.
604
  *
605
- * @param mixed $allowedValues One or more acceptable values/closures
 
606
  *
607
  * @return $this
608
  *
609
  * @throws UndefinedOptionsException If the option is undefined
610
  * @throws AccessException If called from a lazy option or normalizer
611
  */
612
- public function addAllowedValues(string $option, mixed $allowedValues)
613
  {
614
  if ($this->locked) {
615
  throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.');
@@ -649,7 +675,7 @@ class OptionsResolver implements Options
649
  * @throws UndefinedOptionsException If the option is undefined
650
  * @throws AccessException If called from a lazy option or normalizer
651
  */
652
- public function setAllowedTypes(string $option, string|array $allowedTypes)
653
  {
654
  if ($this->locked) {
655
  throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
@@ -683,7 +709,7 @@ class OptionsResolver implements Options
683
  * @throws UndefinedOptionsException If the option is undefined
684
  * @throws AccessException If called from a lazy option or normalizer
685
  */
686
- public function addAllowedTypes(string $option, string|array $allowedTypes)
687
  {
688
  if ($this->locked) {
689
  throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.');
@@ -725,7 +751,7 @@ class OptionsResolver implements Options
725
  * @throws UndefinedOptionsException If the option is undefined
726
  * @throws AccessException If called from a lazy option or normalizer
727
  */
728
- public function setInfo(string $option, string $info): static
729
  {
730
  if ($this->locked) {
731
  throw new AccessException('The Info message cannot be set from a lazy option or normalizer.');
@@ -759,7 +785,7 @@ class OptionsResolver implements Options
759
  *
760
  * @throws AccessException If called from a lazy option, a normalizer or a root definition
761
  */
762
- public function setPrototype(bool $prototype): static
763
  {
764
  if ($this->locked) {
765
  throw new AccessException('The prototype property cannot be set from a lazy option or normalizer.');
@@ -790,7 +816,7 @@ class OptionsResolver implements Options
790
  *
791
  * @throws AccessException If called from a lazy option or normalizer
792
  */
793
- public function remove(string|array $optionNames): static
794
  {
795
  if ($this->locked) {
796
  throw new AccessException('Options cannot be removed from a lazy option or normalizer.');
@@ -811,7 +837,7 @@ class OptionsResolver implements Options
811
  *
812
  * @throws AccessException If called from a lazy option or normalizer
813
  */
814
- public function clear(): static
815
  {
816
  if ($this->locked) {
817
  throw new AccessException('Options cannot be cleared from a lazy option or normalizer.');
@@ -843,6 +869,8 @@ class OptionsResolver implements Options
843
  * - Options have invalid types;
844
  * - Options have invalid values.
845
  *
 
 
846
  * @throws UndefinedOptionsException If an option name is undefined
847
  * @throws InvalidOptionsException If an option doesn't fulfill the
848
  * specified validation rules
@@ -852,7 +880,7 @@ class OptionsResolver implements Options
852
  * @throws NoSuchOptionException If a lazy option reads an unavailable option
853
  * @throws AccessException If called from a lazy option or normalizer
854
  */
855
- public function resolve(array $options = []): array
856
  {
857
  if ($this->locked) {
858
  throw new AccessException('Options cannot be resolved from a lazy option or normalizer.');
@@ -904,6 +932,8 @@ class OptionsResolver implements Options
904
  *
905
  * @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default)
906
  *
 
 
907
  * @throws AccessException If accessing this method outside of
908
  * {@link resolve()}
909
  * @throws NoSuchOptionException If the option is not set
@@ -912,7 +942,8 @@ class OptionsResolver implements Options
912
  * @throws OptionDefinitionException If there is a cyclic dependency between
913
  * lazy options and/or normalizers
914
  */
915
- public function offsetGet(mixed $option, bool $triggerDeprecation = true): mixed
 
916
  {
917
  if (!$this->locked) {
918
  throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
@@ -1132,9 +1163,9 @@ class OptionsResolver implements Options
1132
  return $value;
1133
  }
1134
 
1135
- private function verifyTypes(string $type, mixed $value, array &$invalidTypes, int $level = 0): bool
1136
  {
1137
- if (\is_array($value) && str_ends_with($type, '[]')) {
1138
  $type = substr($type, 0, -2);
1139
  $valid = true;
1140
 
@@ -1161,11 +1192,16 @@ class OptionsResolver implements Options
1161
  /**
1162
  * Returns whether a resolved option with the given name exists.
1163
  *
 
 
 
 
1164
  * @throws AccessException If accessing this method outside of {@link resolve()}
1165
  *
1166
  * @see \ArrayAccess::offsetExists()
1167
  */
1168
- public function offsetExists(mixed $option): bool
 
1169
  {
1170
  if (!$this->locked) {
1171
  throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
@@ -1177,9 +1213,12 @@ class OptionsResolver implements Options
1177
  /**
1178
  * Not supported.
1179
  *
 
 
1180
  * @throws AccessException
1181
  */
1182
- public function offsetSet(mixed $option, mixed $value): void
 
1183
  {
1184
  throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.');
1185
  }
@@ -1187,9 +1226,12 @@ class OptionsResolver implements Options
1187
  /**
1188
  * Not supported.
1189
  *
 
 
1190
  * @throws AccessException
1191
  */
1192
- public function offsetUnset(mixed $option): void
 
1193
  {
1194
  throw new AccessException('Removing options via array access is not supported. Use remove() instead.');
1195
  }
@@ -1199,11 +1241,14 @@ class OptionsResolver implements Options
1199
  *
1200
  * This may be only a subset of the defined options.
1201
  *
 
 
1202
  * @throws AccessException If accessing this method outside of {@link resolve()}
1203
  *
1204
  * @see \Countable::count()
1205
  */
1206
- public function count(): int
 
1207
  {
1208
  if (!$this->locked) {
1209
  throw new AccessException('Counting is only supported within closures of lazy options and normalizers.');
@@ -1218,8 +1263,10 @@ class OptionsResolver implements Options
1218
  * This method returns the equivalent PHP tokens for most scalar types
1219
  * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped
1220
  * in double quotes (").
 
 
1221
  */
1222
- private function formatValue(mixed $value): string
1223
  {
1224
  if (\is_object($value)) {
1225
  return \get_class($value);
187
  * // 'default' === $parent['connection']
188
  * }
189
  *
190
+ * @param string $option The name of the option
191
+ * @param mixed $value The default value of the option
192
+ *
193
  * @return $this
194
  *
195
  * @throws AccessException If called from a lazy option or normalizer
196
  */
197
+ public function setDefault(string $option, $value)
198
  {
199
  // Setting is not possible once resolving starts, because then lazy
200
  // options could manipulate the state of the object, leading to
265
  *
266
  * @throws AccessException If called from a lazy option or normalizer
267
  */
268
+ public function setDefaults(array $defaults)
269
  {
270
  foreach ($defaults as $option => $value) {
271
  $this->setDefault($option, $value);
279
  *
280
  * Returns true if {@link setDefault()} was called for this option.
281
  * An option is also considered set if it was set to null.
282
+ *
283
+ * @return bool
284
  */
285
+ public function hasDefault(string $option)
286
  {
287
  return \array_key_exists($option, $this->defaults);
288
  }
296
  *
297
  * @throws AccessException If called from a lazy option or normalizer
298
  */
299
+ public function setRequired($optionNames)
300
  {
301
  if ($this->locked) {
302
  throw new AccessException('Options cannot be made required from a lazy option or normalizer.');
314
  * Returns whether an option is required.
315
  *
316
  * An option is required if it was passed to {@link setRequired()}.
317
+ *
318
+ * @return bool
319
  */
320
+ public function isRequired(string $option)
321
  {
322
  return isset($this->required[$option]);
323
  }
329
  *
330
  * @see isRequired()
331
  */
332
+ public function getRequiredOptions()
333
  {
334
  return array_keys($this->required);
335
  }
340
  * An option is missing if it was passed to {@link setRequired()}, but not
341
  * to {@link setDefault()}. This option must be passed explicitly to
342
  * {@link resolve()}, otherwise an exception will be thrown.
343
+ *
344
+ * @return bool
345
  */
346
+ public function isMissing(string $option)
347
  {
348
  return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults);
349
  }
353
  *
354
  * @return string[]
355
  */
356
+ public function getMissingOptions()
357
  {
358
  return array_keys(array_diff_key($this->required, $this->defaults));
359
  }
371
  *
372
  * @throws AccessException If called from a lazy option or normalizer
373
  */
374
+ public function setDefined($optionNames)
375
  {
376
  if ($this->locked) {
377
  throw new AccessException('Options cannot be defined from a lazy option or normalizer.');
389
  *
390
  * Returns true for any option passed to {@link setDefault()},
391
  * {@link setRequired()} or {@link setDefined()}.
392
+ *
393
+ * @return bool
394
  */
395
+ public function isDefined(string $option)
396
  {
397
  return isset($this->defined[$option]);
398
  }
404
  *
405
  * @see isDefined()
406
  */
407
+ public function getDefinedOptions()
408
  {
409
  return array_keys($this->defined);
410
  }
437
  *
438
  * @return $this
439
  */
440
+ public function setDeprecated(string $option/* , string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self
441
  {
442
  if ($this->locked) {
443
  throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.');
447
  throw new UndefinedOptionsException(sprintf('The option "%s" does not exist, defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
448
  }
449
 
450
+ $args = \func_get_args();
451
+
452
+ if (\func_num_args() < 3) {
453
+ trigger_deprecation('symfony/options-resolver', '5.1', 'The signature of method "%s()" requires 2 new arguments: "string $package, string $version", not defining them is deprecated.', __METHOD__);
454
+
455
+ $message = $args[1] ?? 'The option "%name%" is deprecated.';
456
+ $package = $version = '';
457
+ } else {
458
+ $package = $args[1];
459
+ $version = $args[2];
460
+ $message = $args[3] ?? 'The option "%name%" is deprecated.';
461
+ }
462
+
463
  if (!\is_string($message) && !$message instanceof \Closure) {
464
  throw new InvalidArgumentException(sprintf('Invalid type for deprecation message argument, expected string or \Closure, but got "%s".', get_debug_type($message)));
465
  }
550
  * @throws UndefinedOptionsException If the option is undefined
551
  * @throws AccessException If called from a lazy option or normalizer
552
  */
553
+ public function addNormalizer(string $option, \Closure $normalizer, bool $forcePrepend = false): self
554
  {
555
  if ($this->locked) {
556
  throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.');
586
  * The closure receives the value as argument and should return true to
587
  * accept the value and false to reject the value.
588
  *
589
+ * @param string $option The option name
590
+ * @param mixed $allowedValues One or more acceptable values/closures
591
  *
592
  * @return $this
593
  *
594
  * @throws UndefinedOptionsException If the option is undefined
595
  * @throws AccessException If called from a lazy option or normalizer
596
  */
597
+ public function setAllowedValues(string $option, $allowedValues)
598
  {
599
  if ($this->locked) {
600
  throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.');
627
  * The closure receives the value as argument and should return true to
628
  * accept the value and false to reject the value.
629
  *
630
+ * @param string $option The option name
631
+ * @param mixed $allowedValues One or more acceptable values/closures
632
  *
633
  * @return $this
634
  *
635
  * @throws UndefinedOptionsException If the option is undefined
636
  * @throws AccessException If called from a lazy option or normalizer
637
  */
638
+ public function addAllowedValues(string $option, $allowedValues)
639
  {
640
  if ($this->locked) {
641
  throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.');
675
  * @throws UndefinedOptionsException If the option is undefined
676
  * @throws AccessException If called from a lazy option or normalizer
677
  */
678
+ public function setAllowedTypes(string $option, $allowedTypes)
679
  {
680
  if ($this->locked) {
681
  throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
709
  * @throws UndefinedOptionsException If the option is undefined
710
  * @throws AccessException If called from a lazy option or normalizer
711
  */
712
+ public function addAllowedTypes(string $option, $allowedTypes)
713
  {
714
  if ($this->locked) {
715
  throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.');
751
  * @throws UndefinedOptionsException If the option is undefined
752
  * @throws AccessException If called from a lazy option or normalizer
753
  */
754
+ public function setInfo(string $option, string $info): self
755
  {
756
  if ($this->locked) {
757
  throw new AccessException('The Info message cannot be set from a lazy option or normalizer.');
785
  *
786
  * @throws AccessException If called from a lazy option, a normalizer or a root definition
787
  */
788
+ public function setPrototype(bool $prototype): self
789
  {
790
  if ($this->locked) {
791
  throw new AccessException('The prototype property cannot be set from a lazy option or normalizer.');
816
  *
817
  * @throws AccessException If called from a lazy option or normalizer
818
  */
819
+ public function remove($optionNames)
820
  {
821
  if ($this->locked) {
822
  throw new AccessException('Options cannot be removed from a lazy option or normalizer.');
837
  *
838
  * @throws AccessException If called from a lazy option or normalizer
839
  */
840
+ public function clear()
841
  {
842
  if ($this->locked) {
843
  throw new AccessException('Options cannot be cleared from a lazy option or normalizer.');
869
  * - Options have invalid types;
870
  * - Options have invalid values.
871
  *
872
+ * @return array
873
+ *
874
  * @throws UndefinedOptionsException If an option name is undefined
875
  * @throws InvalidOptionsException If an option doesn't fulfill the
876
  * specified validation rules
880
  * @throws NoSuchOptionException If a lazy option reads an unavailable option
881
  * @throws AccessException If called from a lazy option or normalizer
882
  */
883
+ public function resolve(array $options = [])
884
  {
885
  if ($this->locked) {
886
  throw new AccessException('Options cannot be resolved from a lazy option or normalizer.');
932
  *
933
  * @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default)
934
  *
935
+ * @return mixed
936
+ *
937
  * @throws AccessException If accessing this method outside of
938
  * {@link resolve()}
939
  * @throws NoSuchOptionException If the option is not set
942
  * @throws OptionDefinitionException If there is a cyclic dependency between
943
  * lazy options and/or normalizers
944
  */
945
+ #[\ReturnTypeWillChange]
946
+ public function offsetGet($option, bool $triggerDeprecation = true)
947
  {
948
  if (!$this->locked) {
949
  throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
1163
  return $value;
1164
  }
1165
 
1166
+ private function verifyTypes(string $type, $value, array &$invalidTypes, int $level = 0): bool
1167
  {
1168
+ if (\is_array($value) && '[]' === substr($type, -2)) {
1169
  $type = substr($type, 0, -2);
1170
  $valid = true;
1171
 
1192
  /**
1193
  * Returns whether a resolved option with the given name exists.
1194
  *
1195
+ * @param string $option The option name
1196
+ *
1197
+ * @return bool
1198
+ *
1199
  * @throws AccessException If accessing this method outside of {@link resolve()}
1200
  *
1201
  * @see \ArrayAccess::offsetExists()
1202
  */
1203
+ #[\ReturnTypeWillChange]
1204
+ public function offsetExists($option)
1205
  {
1206
  if (!$this->locked) {
1207
  throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
1213
  /**
1214
  * Not supported.
1215
  *
1216
+ * @return void
1217
+ *
1218
  * @throws AccessException
1219
  */
1220
+ #[\ReturnTypeWillChange]
1221
+ public function offsetSet($option, $value)
1222
  {
1223
  throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.');
1224
  }
1226
  /**
1227
  * Not supported.
1228
  *
1229
+ * @return void
1230
+ *
1231
  * @throws AccessException
1232
  */
1233
+ #[\ReturnTypeWillChange]
1234
+ public function offsetUnset($option)
1235
  {
1236
  throw new AccessException('Removing options via array access is not supported. Use remove() instead.');
1237
  }
1241
  *
1242
  * This may be only a subset of the defined options.
1243
  *
1244
+ * @return int
1245
+ *
1246
  * @throws AccessException If accessing this method outside of {@link resolve()}
1247
  *
1248
  * @see \Countable::count()
1249
  */
1250
+ #[\ReturnTypeWillChange]
1251
+ public function count()
1252
  {
1253
  if (!$this->locked) {
1254
  throw new AccessException('Counting is only supported within closures of lazy options and normalizers.');
1263
  * This method returns the equivalent PHP tokens for most scalar types
1264
  * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped
1265
  * in double quotes (").
1266
+ *
1267
+ * @param mixed $value The value to format as string
1268
  */
1269
+ private function formatValue($value): string
1270
  {
1271
  if (\is_object($value)) {
1272
  return \get_class($value);
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Idn.php ADDED
@@ -0,0 +1,925 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com> and Trevor Rowbotham <trevor.rowbotham@pm.me>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Symfony\Polyfill\Intl\Idn;
13
+
14
+ use Exception;
15
+ use Normalizer;
16
+ use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges;
17
+ use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex;
18
+
19
+ /**
20
+ * @see https://www.unicode.org/reports/tr46/
21
+ *
22
+ * @internal
23
+ */
24
+ final class Idn
25
+ {
26
+ public const ERROR_EMPTY_LABEL = 1;
27
+ public const ERROR_LABEL_TOO_LONG = 2;
28
+ public const ERROR_DOMAIN_NAME_TOO_LONG = 4;
29
+ public const ERROR_LEADING_HYPHEN = 8;
30
+ public const ERROR_TRAILING_HYPHEN = 0x10;
31
+ public const ERROR_HYPHEN_3_4 = 0x20;
32
+ public const ERROR_LEADING_COMBINING_MARK = 0x40;
33
+ public const ERROR_DISALLOWED = 0x80;
34
+ public const ERROR_PUNYCODE = 0x100;
35
+ public const ERROR_LABEL_HAS_DOT = 0x200;
36
+ public const ERROR_INVALID_ACE_LABEL = 0x400;
37
+ public const ERROR_BIDI = 0x800;
38
+ public const ERROR_CONTEXTJ = 0x1000;
39
+ public const ERROR_CONTEXTO_PUNCTUATION = 0x2000;
40
+ public const ERROR_CONTEXTO_DIGITS = 0x4000;
41
+
42
+ public const INTL_IDNA_VARIANT_2003 = 0;
43
+ public const INTL_IDNA_VARIANT_UTS46 = 1;
44
+
45
+ public const IDNA_DEFAULT = 0;
46
+ public const IDNA_ALLOW_UNASSIGNED = 1;
47
+ public const IDNA_USE_STD3_RULES = 2;
48
+ public const IDNA_CHECK_BIDI = 4;
49
+ public const IDNA_CHECK_CONTEXTJ = 8;
50
+ public const IDNA_NONTRANSITIONAL_TO_ASCII = 16;
51
+ public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32;
52
+
53
+ public const MAX_DOMAIN_SIZE = 253;
54
+ public const MAX_LABEL_SIZE = 63;
55
+
56
+ public const BASE = 36;
57
+ public const TMIN = 1;
58
+ public const TMAX = 26;
59
+ public const SKEW = 38;
60
+ public const DAMP = 700;
61
+ public const INITIAL_BIAS = 72;
62
+ public const INITIAL_N = 128;
63
+ public const DELIMITER = '-';
64
+ public const MAX_INT = 2147483647;
65
+
66
+ /**
67
+ * Contains the numeric value of a basic code point (for use in representing integers) in the
68
+ * range 0 to BASE-1, or -1 if b is does not represent a value.
69
+ *
70
+ * @var array<int, int>
71
+ */
72
+ private static $basicToDigit = [
73
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
74
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
75
+
76
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
77
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,
78
+
79
+ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
80
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
81
+
82
+ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
83
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
84
+
85
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
86
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
87
+
88
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
89
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
90
+
91
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
92
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
93
+
94
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
95
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
96
+ ];
97
+
98
+ /**
99
+ * @var array<int, int>
100
+ */
101
+ private static $virama;
102
+
103
+ /**
104
+ * @var array<int, string>
105
+ */
106
+ private static $mapped;
107
+
108
+ /**
109
+ * @var array<int, bool>
110
+ */
111
+ private static $ignored;
112
+
113
+ /**
114
+ * @var array<int, string>
115
+ */
116
+ private static $deviation;
117
+
118
+ /**
119
+ * @var array<int, bool>
120
+ */
121
+ private static $disallowed;
122
+
123
+ /**
124
+ * @var array<int, string>
125
+ */
126
+ private static $disallowed_STD3_mapped;
127
+
128
+ /**
129
+ * @var array<int, bool>
130
+ */
131
+ private static $disallowed_STD3_valid;
132
+
133
+ /**
134
+ * @var bool
135
+ */
136
+ private static $mappingTableLoaded = false;
137
+
138
+ /**
139
+ * @see https://www.unicode.org/reports/tr46/#ToASCII
140
+ *
141
+ * @param string $domainName
142
+ * @param int $options
143
+ * @param int $variant
144
+ * @param array $idna_info
145
+ *
146
+ * @return string|false
147
+ */
148
+ public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
149
+ {
150
+ if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
151
+ @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
152
+ }
153
+
154
+ $options = [
155
+ 'CheckHyphens' => true,
156
+ 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI),
157
+ 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ),
158
+ 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES),
159
+ 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII),
160
+ 'VerifyDnsLength' => true,
161
+ ];
162
+ $info = new Info();
163
+ $labels = self::process((string) $domainName, $options, $info);
164
+
165
+ foreach ($labels as $i => $label) {
166
+ // Only convert labels to punycode that contain non-ASCII code points
167
+ if (1 === preg_match('/[^\x00-\x7F]/', $label)) {
168
+ try {
169
+ $label = 'xn--'.self::punycodeEncode($label);
170
+ } catch (Exception $e) {
171
+ $info->errors |= self::ERROR_PUNYCODE;
172
+ }
173
+
174
+ $labels[$i] = $label;
175
+ }
176
+ }
177
+
178
+ if ($options['VerifyDnsLength']) {
179
+ self::validateDomainAndLabelLength($labels, $info);
180
+ }
181
+
182
+ $idna_info = [
183
+ 'result' => implode('.', $labels),
184
+ 'isTransitionalDifferent' => $info->transitionalDifferent,
185
+ 'errors' => $info->errors,
186
+ ];
187
+
188
+ return 0 === $info->errors ? $idna_info['result'] : false;
189
+ }
190
+
191
+ /**
192
+ * @see https://www.unicode.org/reports/tr46/#ToUnicode
193
+ *
194
+ * @param string $domainName
195
+ * @param int $options
196
+ * @param int $variant
197
+ * @param array $idna_info
198
+ *
199
+ * @return string|false
200
+ */
201
+ public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
202
+ {
203
+ if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
204
+ @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
205
+ }
206
+
207
+ $info = new Info();
208
+ $labels = self::process((string) $domainName, [
209
+ 'CheckHyphens' => true,
210
+ 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI),
211
+ 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ),
212
+ 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES),
213
+ 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE),
214
+ ], $info);
215
+ $idna_info = [
216
+ 'result' => implode('.', $labels),
217
+ 'isTransitionalDifferent' => $info->transitionalDifferent,
218
+ 'errors' => $info->errors,
219
+ ];
220
+
221
+ return 0 === $info->errors ? $idna_info['result'] : false;
222
+ }
223
+
224
+ /**
225
+ * @param string $label
226
+ *
227
+ * @return bool
228
+ */
229
+ private static function isValidContextJ(array $codePoints, $label)
230
+ {
231
+ if (!isset(self::$virama)) {
232
+ self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php';
233
+ }
234
+
235
+ $offset = 0;
236
+
237
+ foreach ($codePoints as $i => $codePoint) {
238
+ if (0x200C !== $codePoint && 0x200D !== $codePoint) {
239
+ continue;
240
+ }
241
+
242
+ if (!isset($codePoints[$i - 1])) {
243
+ return false;
244
+ }
245
+
246
+ // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True;
247
+ if (isset(self::$virama[$codePoints[$i - 1]])) {
248
+ continue;
249
+ }
250
+
251
+ // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then
252
+ // True;
253
+ // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}]
254
+ if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) {
255
+ $offset += \strlen($matches[1][0]);
256
+
257
+ continue;
258
+ }
259
+
260
+ return false;
261
+ }
262
+
263
+ return true;
264
+ }
265
+
266
+ /**
267
+ * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap
268
+ *
269
+ * @param string $input
270
+ * @param array<string, bool> $options
271
+ *
272
+ * @return string
273
+ */
274
+ private static function mapCodePoints($input, array $options, Info $info)
275
+ {
276
+ $str = '';
277
+ $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules'];
278
+ $transitional = $options['Transitional_Processing'];
279
+
280
+ foreach (self::utf8Decode($input) as $codePoint) {
281
+ $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules);
282
+
283
+ switch ($data['status']) {
284
+ case 'disallowed':
285
+ $info->errors |= self::ERROR_DISALLOWED;
286
+
287
+ // no break.
288
+
289
+ case 'valid':
290
+ $str .= mb_chr($codePoint, 'utf-8');
291
+
292
+ break;
293
+
294
+ case 'ignored':
295
+ // Do nothing.
296
+ break;
297
+
298
+ case 'mapped':
299
+ $str .= $data['mapping'];
300
+
301
+ break;
302
+
303
+ case 'deviation':
304
+ $info->transitionalDifferent = true;
305
+ $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8'));
306
+
307
+ break;
308
+ }
309
+ }
310
+
311
+ return $str;
312
+ }
313
+
314
+ /**
315
+ * @see https://www.unicode.org/reports/tr46/#Processing
316
+ *
317
+ * @param string $domain
318
+ * @param array<string, bool> $options
319
+ *
320
+ * @return array<int, string>
321
+ */
322
+ private static function process($domain, array $options, Info $info)
323
+ {
324
+ // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and
325
+ // we need to respect the VerifyDnsLength option.
326
+ $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'];
327
+
328
+ if ($checkForEmptyLabels && '' === $domain) {
329
+ $info->errors |= self::ERROR_EMPTY_LABEL;
330
+
331
+ return [$domain];
332
+ }
333
+
334
+ // Step 1. Map each code point in the domain name string
335
+ $domain = self::mapCodePoints($domain, $options, $info);
336
+
337
+ // Step 2. Normalize the domain name string to Unicode Normalization Form C.
338
+ if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) {
339
+ $domain = Normalizer::normalize($domain, Normalizer::FORM_C);
340
+ }
341
+
342
+ // Step 3. Break the string into labels at U+002E (.) FULL STOP.
343
+ $labels = explode('.', $domain);
344
+ $lastLabelIndex = \count($labels) - 1;
345
+
346
+ // Step 4. Convert and validate each label in the domain name string.
347
+ foreach ($labels as $i => $label) {
348
+ $validationOptions = $options;
349
+
350
+ if ('xn--' === substr($label, 0, 4)) {
351
+ try {
352
+ $label = self::punycodeDecode(substr($label, 4));
353
+ } catch (Exception $e) {
354
+ $info->errors |= self::ERROR_PUNYCODE;
355
+
356
+ continue;
357
+ }
358
+
359
+ $validationOptions['Transitional_Processing'] = false;
360
+ $labels[$i] = $label;
361
+ }
362
+
363
+ self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex);
364
+ }
365
+
366
+ if ($info->bidiDomain && !$info->validBidiDomain) {
367
+ $info->errors |= self::ERROR_BIDI;
368
+ }
369
+
370
+ // Any input domain name string that does not record an error has been successfully
371
+ // processed according to this specification. Conversely, if an input domain_name string
372
+ // causes an error, then the processing of the input domain_name string fails. Determining
373
+ // what to do with error input is up to the caller, and not in the scope of this document.
374
+ return $labels;
375
+ }
376
+
377
+ /**
378
+ * @see https://tools.ietf.org/html/rfc5893#section-2
379
+ *
380
+ * @param string $label
381
+ */
382
+ private static function validateBidiLabel($label, Info $info)
383
+ {
384
+ if (1 === preg_match(Regex::RTL_LABEL, $label)) {
385
+ $info->bidiDomain = true;
386
+
387
+ // Step 1. The first character must be a character with Bidi property L, R, or AL.
388
+ // If it has the R or AL property, it is an RTL label
389
+ if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) {
390
+ $info->validBidiDomain = false;
391
+
392
+ return;
393
+ }
394
+
395
+ // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES,
396
+ // CS, ET, ON, BN, or NSM are allowed.
397
+ if (1 === preg_match(Regex::BIDI_STEP_2, $label)) {
398
+ $info->validBidiDomain = false;
399
+
400
+ return;
401
+ }
402
+
403
+ // Step 3. In an RTL label, the end of the label must be a character with Bidi property
404
+ // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM.
405
+ if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) {
406
+ $info->validBidiDomain = false;
407
+
408
+ return;
409
+ }
410
+
411
+ // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa.
412
+ if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) {
413
+ $info->validBidiDomain = false;
414
+
415
+ return;
416
+ }
417
+
418
+ return;
419
+ }
420
+
421
+ // We are a LTR label
422
+ // Step 1. The first character must be a character with Bidi property L, R, or AL.
423
+ // If it has the L property, it is an LTR label.
424
+ if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) {
425
+ $info->validBidiDomain = false;
426
+
427
+ return;
428
+ }
429
+
430
+ // Step 5. In an LTR label, only characters with the Bidi properties L, EN,
431
+ // ES, CS, ET, ON, BN, or NSM are allowed.
432
+ if (1 === preg_match(Regex::BIDI_STEP_5, $label)) {
433
+ $info->validBidiDomain = false;
434
+
435
+ return;
436
+ }
437
+
438
+ // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or
439
+ // EN, followed by zero or more characters with Bidi property NSM.
440
+ if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) {
441
+ $info->validBidiDomain = false;
442
+
443
+ return;
444
+ }
445
+ }
446
+
447
+ /**
448
+ * @param array<int, string> $labels
449
+ */
450
+ private static function validateDomainAndLabelLength(array $labels, Info $info)
451
+ {
452
+ $maxDomainSize = self::MAX_DOMAIN_SIZE;
453
+ $length = \count($labels);
454
+
455
+ // Number of "." delimiters.
456
+ $domainLength = $length - 1;
457
+
458
+ // If the last label is empty and it is not the first label, then it is the root label.
459
+ // Increase the max size by 1, making it 254, to account for the root label's "."
460
+ // delimiter. This also means we don't need to check the last label's length for being too
461
+ // long.
462
+ if ($length > 1 && '' === $labels[$length - 1]) {
463
+ ++$maxDomainSize;
464
+ --$length;
465
+ }
466
+
467
+ for ($i = 0; $i < $length; ++$i) {
468
+ $bytes = \strlen($labels[$i]);
469
+ $domainLength += $bytes;
470
+
471
+ if ($bytes > self::MAX_LABEL_SIZE) {
472
+ $info->errors |= self::ERROR_LABEL_TOO_LONG;
473
+ }
474
+ }
475
+
476
+ if ($domainLength > $maxDomainSize) {
477
+ $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG;
478
+ }
479
+ }
480
+
481
+ /**
482
+ * @see https://www.unicode.org/reports/tr46/#Validity_Criteria
483
+ *
484
+ * @param string $label
485
+ * @param array<string, bool> $options
486
+ * @param bool $canBeEmpty
487
+ */
488
+ private static function validateLabel($label, Info $info, array $options, $canBeEmpty)
489
+ {
490
+ if ('' === $label) {
491
+ if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) {
492
+ $info->errors |= self::ERROR_EMPTY_LABEL;
493
+ }
494
+
495
+ return;
496
+ }
497
+
498
+ // Step 1. The label must be in Unicode Normalization Form C.
499
+ if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) {
500
+ $info->errors |= self::ERROR_INVALID_ACE_LABEL;
501
+ }
502
+
503
+ $codePoints = self::utf8Decode($label);
504
+
505
+ if ($options['CheckHyphens']) {
506
+ // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character
507
+ // in both the thrid and fourth positions.
508
+ if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) {
509
+ $info->errors |= self::ERROR_HYPHEN_3_4;
510
+ }
511
+
512
+ // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D
513
+ // HYPHEN-MINUS character.
514
+ if ('-' === substr($label, 0, 1)) {
515
+ $info->errors |= self::ERROR_LEADING_HYPHEN;
516
+ }
517
+
518
+ if ('-' === substr($label, -1, 1)) {
519
+ $info->errors |= self::ERROR_TRAILING_HYPHEN;
520
+ }
521
+ }
522
+
523
+ // Step 4. The label must not contain a U+002E (.) FULL STOP.
524
+ if (false !== strpos($label, '.')) {
525
+ $info->errors |= self::ERROR_LABEL_HAS_DOT;
526
+ }
527
+
528
+ // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark.
529
+ if (1 === preg_match(Regex::COMBINING_MARK, $label)) {
530
+ $info->errors |= self::ERROR_LEADING_COMBINING_MARK;
531
+ }
532
+
533
+ // Step 6. Each code point in the label must only have certain status values according to
534
+ // Section 5, IDNA Mapping Table:
535
+ $transitional = $options['Transitional_Processing'];
536
+ $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules'];
537
+
538
+ foreach ($codePoints as $codePoint) {
539
+ $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules);
540
+ $status = $data['status'];
541
+
542
+ if ('valid' === $status || (!$transitional && 'deviation' === $status)) {
543
+ continue;
544
+ }
545
+
546
+ $info->errors |= self::ERROR_DISALLOWED;
547
+
548
+ break;
549
+ }
550
+
551
+ // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in
552
+ // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA)
553
+ // [IDNA2008].
554
+ if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) {
555
+ $info->errors |= self::ERROR_CONTEXTJ;
556
+ }
557
+
558
+ // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must
559
+ // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2.
560
+ if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) {
561
+ self::validateBidiLabel($label, $info);
562
+ }
563
+ }
564
+
565
+ /**
566
+ * @see https://tools.ietf.org/html/rfc3492#section-6.2
567
+ *
568
+ * @param string $input
569
+ *
570
+ * @return string
571
+ */
572
+ private static function punycodeDecode($input)
573
+ {
574
+ $n = self::INITIAL_N;
575
+ $out = 0;
576
+ $i = 0;
577
+ $bias = self::INITIAL_BIAS;
578
+ $lastDelimIndex = strrpos($input, self::DELIMITER);
579
+ $b = false === $lastDelimIndex ? 0 : $lastDelimIndex;
580
+ $inputLength = \strlen($input);
581
+ $output = [];
582
+ $bytes = array_map('ord', str_split($input));
583
+
584
+ for ($j = 0; $j < $b; ++$j) {
585
+ if ($bytes[$j] > 0x7F) {
586
+ throw new Exception('Invalid input');
587
+ }
588
+
589
+ $output[$out++] = $input[$j];
590
+ }
591
+
592
+ if ($b > 0) {
593
+ ++$b;
594
+ }
595
+
596
+ for ($in = $b; $in < $inputLength; ++$out) {
597
+ $oldi = $i;
598
+ $w = 1;
599
+
600
+ for ($k = self::BASE; /* no condition */; $k += self::BASE) {
601
+ if ($in >= $inputLength) {
602
+ throw new Exception('Invalid input');
603
+ }
604
+
605
+ $digit = self::$basicToDigit[$bytes[$in++] & 0xFF];
606
+
607
+ if ($digit < 0) {
608
+ throw new Exception('Invalid input');
609
+ }
610
+
611
+ if ($digit > intdiv(self::MAX_INT - $i, $w)) {
612
+ throw new Exception('Integer overflow');
613
+ }
614
+
615
+ $i += $digit * $w;
616
+
617
+ if ($k <= $bias) {
618
+ $t = self::TMIN;
619
+ } elseif ($k >= $bias + self::TMAX) {
620
+ $t = self::TMAX;
621
+ } else {
622
+ $t = $k - $bias;
623
+ }
624
+
625
+ if ($digit < $t) {
626
+ break;
627
+ }
628
+
629
+ $baseMinusT = self::BASE - $t;
630
+
631
+ if ($w > intdiv(self::MAX_INT, $baseMinusT)) {
632
+ throw new Exception('Integer overflow');
633
+ }
634
+
635
+ $w *= $baseMinusT;
636
+ }
637
+
638
+ $outPlusOne = $out + 1;
639
+ $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi);
640
+
641
+ if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) {
642
+ throw new Exception('Integer overflow');
643
+ }
644
+
645
+ $n += intdiv($i, $outPlusOne);
646
+ $i %= $outPlusOne;
647
+ array_splice($output, $i++, 0, [mb_chr($n, 'utf-8')]);
648
+ }
649
+
650
+ return implode('', $output);
651
+ }
652
+
653
+ /**
654
+ * @see https://tools.ietf.org/html/rfc3492#section-6.3
655
+ *
656
+ * @param string $input
657
+ *
658
+ * @return string
659
+ */
660
+ private static function punycodeEncode($input)
661
+ {
662
+ $n = self::INITIAL_N;
663
+ $delta = 0;
664
+ $out = 0;
665
+ $bias = self::INITIAL_BIAS;
666
+ $inputLength = 0;
667
+ $output = '';
668
+ $iter = self::utf8Decode($input);
669
+
670
+ foreach ($iter as $codePoint) {
671
+ ++$inputLength;
672
+
673
+ if ($codePoint < 0x80) {
674
+ $output .= \chr($codePoint);
675
+ ++$out;
676
+ }
677
+ }
678
+
679
+ $h = $out;
680
+ $b = $out;
681
+
682
+ if ($b > 0) {
683
+ $output .= self::DELIMITER;
684
+ ++$out;
685
+ }
686
+
687
+ while ($h < $inputLength) {
688
+ $m = self::MAX_INT;
689
+
690
+ foreach ($iter as $codePoint) {
691
+ if ($codePoint >= $n && $codePoint < $m) {
692
+ $m = $codePoint;
693
+ }
694
+ }
695
+
696
+ if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) {
697
+ throw new Exception('Integer overflow');
698
+ }
699
+
700
+ $delta += ($m - $n) * ($h + 1);
701
+ $n = $m;
702
+
703
+ foreach ($iter as $codePoint) {
704
+ if ($codePoint < $n && 0 === ++$delta) {
705
+ throw new Exception('Integer overflow');
706
+ }
707
+
708
+ if ($codePoint === $n) {
709
+ $q = $delta;
710
+
711
+ for ($k = self::BASE; /* no condition */; $k += self::BASE) {
712
+ if ($k <= $bias) {
713
+ $t = self::TMIN;
714
+ } elseif ($k >= $bias + self::TMAX) {
715
+ $t = self::TMAX;
716
+ } else {
717
+ $t = $k - $bias;
718
+ }
719
+
720
+ if ($q < $t) {
721
+ break;
722
+ }
723
+
724
+ $qMinusT = $q - $t;
725
+ $baseMinusT = self::BASE - $t;
726
+ $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false);
727
+ ++$out;
728
+ $q = intdiv($qMinusT, $baseMinusT);
729
+ }
730
+
731
+ $output .= self::encodeDigit($q, false);
732
+ ++$out;
733
+ $bias = self::adaptBias($delta, $h + 1, $h === $b);
734
+ $delta = 0;
735
+ ++$h;
736
+ }
737
+ }
738
+
739
+ ++$delta;
740
+ ++$n;
741
+ }
742
+
743
+ return $output;
744
+ }
745
+
746
+ /**
747
+ * @see https://tools.ietf.org/html/rfc3492#section-6.1
748
+ *
749
+ * @param int $delta
750
+ * @param int $numPoints
751
+ * @param bool $firstTime
752
+ *
753
+ * @return int
754
+ */
755
+ private static function adaptBias($delta, $numPoints, $firstTime)
756
+ {
757
+ // xxx >> 1 is a faster way of doing intdiv(xxx, 2)
758
+ $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1;
759
+ $delta += intdiv($delta, $numPoints);
760
+ $k = 0;
761
+
762
+ while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) {
763
+ $delta = intdiv($delta, self::BASE - self::TMIN);
764
+ $k += self::BASE;
765
+ }
766
+
767
+ return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW);
768
+ }
769
+
770
+ /**
771
+ * @param int $d
772
+ * @param bool $flag
773
+ *
774
+ * @return string
775
+ */
776
+ private static function encodeDigit($d, $flag)
777
+ {
778
+ return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5));
779
+ }
780
+
781
+ /**
782
+ * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any
783
+ * invalid byte sequences will be replaced by a U+FFFD replacement code point.
784
+ *
785
+ * @see https://encoding.spec.whatwg.org/#utf-8-decoder
786
+ *
787
+ * @param string $input
788
+ *
789
+ * @return array<int, int>
790
+ */
791
+ private static function utf8Decode($input)
792
+ {
793
+ $bytesSeen = 0;
794
+ $bytesNeeded = 0;
795
+ $lowerBoundary = 0x80;
796
+ $upperBoundary = 0xBF;
797
+ $codePoint = 0;
798
+ $codePoints = [];
799
+ $length = \strlen($input);
800
+
801
+ for ($i = 0; $i < $length; ++$i) {
802
+ $byte = \ord($input[$i]);
803
+
804
+ if (0 === $bytesNeeded) {
805
+ if ($byte >= 0x00 && $byte <= 0x7F) {
806
+ $codePoints[] = $byte;
807
+
808
+ continue;
809
+ }
810
+
811
+ if ($byte >= 0xC2 && $byte <= 0xDF) {
812
+ $bytesNeeded = 1;
813
+ $codePoint = $byte & 0x1F;
814
+ } elseif ($byte >= 0xE0 && $byte <= 0xEF) {
815
+ if (0xE0 === $byte) {
816
+ $lowerBoundary = 0xA0;
817
+ } elseif (0xED === $byte) {
818
+ $upperBoundary = 0x9F;
819
+ }
820
+
821
+ $bytesNeeded = 2;
822
+ $codePoint = $byte & 0xF;
823
+ } elseif ($byte >= 0xF0 && $byte <= 0xF4) {
824
+ if (0xF0 === $byte) {
825
+ $lowerBoundary = 0x90;
826
+ } elseif (0xF4 === $byte) {
827
+ $upperBoundary = 0x8F;
828
+ }
829
+
830
+ $bytesNeeded = 3;
831
+ $codePoint = $byte & 0x7;
832
+ } else {
833
+ $codePoints[] = 0xFFFD;
834
+ }
835
+
836
+ continue;
837
+ }
838
+
839
+ if ($byte < $lowerBoundary || $byte > $upperBoundary) {
840
+ $codePoint = 0;
841
+ $bytesNeeded = 0;
842
+ $bytesSeen = 0;
843
+ $lowerBoundary = 0x80;
844
+ $upperBoundary = 0xBF;
845
+ --$i;
846
+ $codePoints[] = 0xFFFD;
847
+
848
+ continue;
849
+ }
850
+
851
+ $lowerBoundary = 0x80;
852
+ $upperBoundary = 0xBF;
853
+ $codePoint = ($codePoint << 6) | ($byte & 0x3F);
854
+
855
+ if (++$bytesSeen !== $bytesNeeded) {
856
+ continue;
857
+ }
858
+
859
+ $codePoints[] = $codePoint;
860
+ $codePoint = 0;
861
+ $bytesNeeded = 0;
862
+ $bytesSeen = 0;
863
+ }
864
+
865
+ // String unexpectedly ended, so append a U+FFFD code point.
866
+ if (0 !== $bytesNeeded) {
867
+ $codePoints[] = 0xFFFD;
868
+ }
869
+
870
+ return $codePoints;
871
+ }
872
+
873
+ /**
874
+ * @param int $codePoint
875
+ * @param bool $useSTD3ASCIIRules
876
+ *
877
+ * @return array{status: string, mapping?: string}
878
+ */
879
+ private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules)
880
+ {
881
+ if (!self::$mappingTableLoaded) {
882
+ self::$mappingTableLoaded = true;
883
+ self::$mapped = require __DIR__.'/Resources/unidata/mapped.php';
884
+ self::$ignored = require __DIR__.'/Resources/unidata/ignored.php';
885
+ self::$deviation = require __DIR__.'/Resources/unidata/deviation.php';
886
+ self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php';
887
+ self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php';
888
+ self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php';
889
+ }
890
+
891
+ if (isset(self::$mapped[$codePoint])) {
892
+ return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]];
893
+ }
894
+
895
+ if (isset(self::$ignored[$codePoint])) {
896
+ return ['status' => 'ignored'];
897
+ }
898
+
899
+ if (isset(self::$deviation[$codePoint])) {
900
+ return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]];
901
+ }
902
+
903
+ if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) {
904
+ return ['status' => 'disallowed'];
905
+ }
906
+
907
+ $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]);
908
+
909
+ if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) {
910
+ $status = 'disallowed';
911
+
912
+ if (!$useSTD3ASCIIRules) {
913
+ $status = $isDisallowedMapped ? 'mapped' : 'valid';
914
+ }
915
+
916
+ if ($isDisallowedMapped) {
917
+ return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]];
918
+ }
919
+
920
+ return ['status' => $status];
921
+ }
922
+
923
+ return ['status' => 'valid'];
924
+ }
925
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Info.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com> and Trevor Rowbotham <trevor.rowbotham@pm.me>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Symfony\Polyfill\Intl\Idn;
13
+
14
+ /**
15
+ * @internal
16
+ */
17
+ class Info
18
+ {
19
+ public $bidiDomain = false;
20
+ public $errors = 0;
21
+ public $validBidiDomain = true;
22
+ public $transitionalDifferent = false;
23
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php ADDED
@@ -0,0 +1,375 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
4
+
5
+ /**
6
+ * @internal
7
+ */
8
+ final class DisallowedRanges
9
+ {
10
+ /**
11
+ * @param int $codePoint
12
+ *
13
+ * @return bool
14
+ */
15
+ public static function inRange($codePoint)
16
+ {
17
+ if ($codePoint >= 128 && $codePoint <= 159) {
18
+ return true;
19
+ }
20
+
21
+ if ($codePoint >= 2155 && $codePoint <= 2207) {
22
+ return true;
23
+ }
24
+
25
+ if ($codePoint >= 3676 && $codePoint <= 3712) {
26
+ return true;
27
+ }
28
+
29
+ if ($codePoint >= 3808 && $codePoint <= 3839) {
30
+ return true;
31
+ }
32
+
33
+ if ($codePoint >= 4059 && $codePoint <= 4095) {
34
+ return true;
35
+ }
36
+
37
+ if ($codePoint >= 4256 && $codePoint <= 4293) {
38
+ return true;
39
+ }
40
+
41
+ if ($codePoint >= 6849 && $codePoint <= 6911) {
42
+ return true;
43
+ }
44
+
45
+ if ($codePoint >= 11859 && $codePoint <= 11903) {
46
+ return true;
47
+ }
48
+
49
+ if ($codePoint >= 42955 && $codePoint <= 42996) {
50
+ return true;
51
+ }
52
+
53
+ if ($codePoint >= 55296 && $codePoint <= 57343) {
54
+ return true;
55
+ }
56
+
57
+ if ($codePoint >= 57344 && $codePoint <= 63743) {
58
+ return true;
59
+ }
60
+
61
+ if ($codePoint >= 64218 && $codePoint <= 64255) {
62
+ return true;
63
+ }
64
+
65
+ if ($codePoint >= 64976 && $codePoint <= 65007) {
66
+ return true;
67
+ }
68
+
69
+ if ($codePoint >= 65630 && $codePoint <= 65663) {
70
+ return true;
71
+ }
72
+
73
+ if ($codePoint >= 65953 && $codePoint <= 65999) {
74
+ return true;
75
+ }
76
+
77
+ if ($codePoint >= 66046 && $codePoint <= 66175) {
78
+ return true;
79
+ }
80
+
81
+ if ($codePoint >= 66518 && $codePoint <= 66559) {
82
+ return true;
83
+ }
84
+
85
+ if ($codePoint >= 66928 && $codePoint <= 67071) {
86
+ return true;
87
+ }
88
+
89
+ if ($codePoint >= 67432 && $codePoint <= 67583) {
90
+ return true;
91
+ }
92
+
93
+ if ($codePoint >= 67760 && $codePoint <= 67807) {
94
+ return true;
95
+ }
96
+
97
+ if ($codePoint >= 67904 && $codePoint <= 67967) {
98
+ return true;
99
+ }
100
+
101
+ if ($codePoint >= 68256 && $codePoint <= 68287) {
102
+ return true;
103
+ }
104
+
105
+ if ($codePoint >= 68528 && $codePoint <= 68607) {
106
+ return true;
107
+ }
108
+
109
+ if ($codePoint >= 68681 && $codePoint <= 68735) {
110
+ return true;
111
+ }
112
+
113
+ if ($codePoint >= 68922 && $codePoint <= 69215) {
114
+ return true;
115
+ }
116
+
117
+ if ($codePoint >= 69298 && $codePoint <= 69375) {
118
+ return true;
119
+ }
120
+
121
+ if ($codePoint >= 69466 && $codePoint <= 69551) {
122
+ return true;
123
+ }
124
+
125
+ if ($codePoint >= 70207 && $codePoint <= 70271) {
126
+ return true;
127
+ }
128
+
129
+ if ($codePoint >= 70517 && $codePoint <= 70655) {
130
+ return true;
131
+ }
132
+
133
+ if ($codePoint >= 70874 && $codePoint <= 71039) {
134
+ return true;
135
+ }
136
+
137
+ if ($codePoint >= 71134 && $codePoint <= 71167) {
138
+ return true;
139
+ }
140
+
141
+ if ($codePoint >= 71370 && $codePoint <= 71423) {
142
+ return true;
143
+ }
144
+
145
+ if ($codePoint >= 71488 && $codePoint <= 71679) {
146
+ return true;
147
+ }
148
+
149
+ if ($codePoint >= 71740 && $codePoint <= 71839) {
150
+ return true;
151
+ }
152
+
153
+ if ($codePoint >= 72026 && $codePoint <= 72095) {
154
+ return true;
155
+ }
156
+
157
+ if ($codePoint >= 72441 && $codePoint <= 72703) {
158
+ return true;
159
+ }
160
+
161
+ if ($codePoint >= 72887 && $codePoint <= 72959) {
162
+ return true;
163
+ }
164
+
165
+ if ($codePoint >= 73130 && $codePoint <= 73439) {
166
+ return true;
167
+ }
168
+
169
+ if ($codePoint >= 73465 && $codePoint <= 73647) {
170
+ return true;
171
+ }
172
+
173
+ if ($codePoint >= 74650 && $codePoint <= 74751) {
174
+ return true;
175
+ }
176
+
177
+ if ($codePoint >= 75076 && $codePoint <= 77823) {
178
+ return true;
179
+ }
180
+
181
+ if ($codePoint >= 78905 && $codePoint <= 82943) {
182
+ return true;
183
+ }
184
+
185
+ if ($codePoint >= 83527 && $codePoint <= 92159) {
186
+ return true;
187
+ }
188
+
189
+ if ($codePoint >= 92784 && $codePoint <= 92879) {
190
+ return true;
191
+ }
192
+
193
+ if ($codePoint >= 93072 && $codePoint <= 93759) {
194
+ return true;
195
+ }
196
+
197
+ if ($codePoint >= 93851 && $codePoint <= 93951) {
198
+ return true;
199
+ }
200
+
201
+ if ($codePoint >= 94112 && $codePoint <= 94175) {
202
+ return true;
203
+ }
204
+
205
+ if ($codePoint >= 101590 && $codePoint <= 101631) {
206
+ return true;
207
+ }
208
+
209
+ if ($codePoint >= 101641 && $codePoint <= 110591) {
210
+ return true;
211
+ }
212
+
213
+ if ($codePoint >= 110879 && $codePoint <= 110927) {
214
+ return true;
215
+ }
216
+
217
+ if ($codePoint >= 111356 && $codePoint <= 113663) {
218
+ return true;
219
+ }
220
+
221
+ if ($codePoint >= 113828 && $codePoint <= 118783) {
222
+ return true;
223
+ }
224
+
225
+ if ($codePoint >= 119366 && $codePoint <= 119519) {
226
+ return true;
227
+ }
228
+
229
+ if ($codePoint >= 119673 && $codePoint <= 119807) {
230
+ return true;
231
+ }
232
+
233
+ if ($codePoint >= 121520 && $codePoint <= 122879) {
234
+ return true;
235
+ }
236
+
237
+ if ($codePoint >= 122923 && $codePoint <= 123135) {
238
+ return true;
239
+ }
240
+
241
+ if ($codePoint >= 123216 && $codePoint <= 123583) {
242
+ return true;
243
+ }
244
+
245
+ if ($codePoint >= 123648 && $codePoint <= 124927) {
246
+ return true;
247
+ }
248
+
249
+ if ($codePoint >= 125143 && $codePoint <= 125183) {
250
+ return true;
251
+ }
252
+
253
+ if ($codePoint >= 125280 && $codePoint <= 126064) {
254
+ return true;
255
+ }
256
+
257
+ if ($codePoint >= 126133 && $codePoint <= 126208) {
258
+ return true;
259
+ }
260
+
261
+ if ($codePoint >= 126270 && $codePoint <= 126463) {
262
+ return true;
263
+ }
264
+
265
+ if ($codePoint >= 126652 && $codePoint <= 126703) {
266
+ return true;
267
+ }
268
+
269
+ if ($codePoint >= 126706 && $codePoint <= 126975) {
270
+ return true;
271
+ }
272
+
273
+ if ($codePoint >= 127406 && $codePoint <= 127461) {
274
+ return true;
275
+ }
276
+
277
+ if ($codePoint >= 127590 && $codePoint <= 127743) {
278
+ return true;
279
+ }
280
+
281
+ if ($codePoint >= 129202 && $codePoint <= 129279) {
282
+ return true;
283
+ }
284
+
285
+ if ($codePoint >= 129751 && $codePoint <= 129791) {
286
+ return true;
287
+ }
288
+
289
+ if ($codePoint >= 129995 && $codePoint <= 130031) {
290
+ return true;
291
+ }
292
+
293
+ if ($codePoint >= 130042 && $codePoint <= 131069) {
294
+ return true;
295
+ }
296
+
297
+ if ($codePoint >= 173790 && $codePoint <= 173823) {
298
+ return true;
299
+ }
300
+
301
+ if ($codePoint >= 191457 && $codePoint <= 194559) {
302
+ return true;
303
+ }
304
+
305
+ if ($codePoint >= 195102 && $codePoint <= 196605) {
306
+ return true;
307
+ }
308
+
309
+ if ($codePoint >= 201547 && $codePoint <= 262141) {
310
+ return true;
311
+ }
312
+
313
+ if ($codePoint >= 262144 && $codePoint <= 327677) {
314
+ return true;
315
+ }
316
+
317
+ if ($codePoint >= 327680 && $codePoint <= 393213) {
318
+ return true;
319
+ }
320
+
321
+ if ($codePoint >= 393216 && $codePoint <= 458749) {
322
+ return true;
323
+ }
324
+
325
+ if ($codePoint >= 458752 && $codePoint <= 524285) {
326
+ return true;
327
+ }
328
+
329
+ if ($codePoint >= 524288 && $codePoint <= 589821) {
330
+ return true;
331
+ }
332
+
333
+ if ($codePoint >= 589824 && $codePoint <= 655357) {
334
+ return true;
335
+ }
336
+
337
+ if ($codePoint >= 655360 && $codePoint <= 720893) {
338
+ return true;
339
+ }
340
+
341
+ if ($codePoint >= 720896 && $codePoint <= 786429) {
342
+ return true;
343
+ }
344
+
345
+ if ($codePoint >= 786432 && $codePoint <= 851965) {
346
+ return true;
347
+ }
348
+
349
+ if ($codePoint >= 851968 && $codePoint <= 917501) {
350
+ return true;
351
+ }
352
+
353
+ if ($codePoint >= 917536 && $codePoint <= 917631) {
354
+ return true;
355
+ }
356
+
357
+ if ($codePoint >= 917632 && $codePoint <= 917759) {
358
+ return true;
359
+ }
360
+
361
+ if ($codePoint >= 918000 && $codePoint <= 983037) {
362
+ return true;
363
+ }
364
+
365
+ if ($codePoint >= 983040 && $codePoint <= 1048573) {
366
+ return true;
367
+ }
368
+
369
+ if ($codePoint >= 1048576 && $codePoint <= 1114109) {
370
+ return true;
371
+ }
372
+
373
+ return false;
374
+ }
375
+ }
vendor/codeinwp/themeisle-content-forms/library/mailerlite/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
4
+
5
+ /**
6
+ * @internal
7
+ */
8
+ final class Regex
9
+ {
10
+ const COMBINING_MARK = '/^[\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{0903}\x{093A}\x{093B}\x{093C}\x{093E}-\x{0940}\x{0941}-\x{0948}\x{0949}-\x{094C}\x{094D}\x{094E}-\x{094F}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{0982}-\x{0983}\x{09BC}\x{09BE}-\x{09C0}\x{09C1}-\x{09C4}\x{09C7}-\x{09C8}\x{09CB}-\x{09CC}\x{09CD}\x{09D7}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A03}\x{0A3C}\x{0A3E}-\x{0A40}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0A83}\x{0ABC}\x{0ABE}-\x{0AC0}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0AC9}\x{0ACB}-\x{0ACC}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B02}-\x{0B03}\x{0B3C}\x{0B3E}\x{0B3F}\x{0B40}\x{0B41}-\x{0B44}\x{0B47}-\x{0B48}\x{0B4B}-\x{0B4C}\x{0B4D}\x{0B55}-\x{0B56}\x{0B57}\x{0B62}-\x{0B63}\x{0B82}\x{0BBE}-\x{0BBF}\x{0BC0}\x{0BC1}-\x{0BC2}\x{0BC6}-\x{0BC8}\x{0BCA}-\x{0BCC}\x{0BCD}\x{0BD7}\x{0C00}\x{0C01}-\x{0C03}\x{0C04}\x{0C3E}-\x{0C40}\x{0C41}-\x{0C44}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0C82}-\x{0C83}\x{0CBC}\x{0CBE}\x{0CBF}\x{0CC0}-\x{0CC4}\x{0CC6}\x{0CC7}-\x{0CC8}\x{0CCA}-\x{0CCB}\x{0CCC}-\x{0CCD}\x{0CD5}-\x{0CD6}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D02}-\x{0D03}\x{0D3B}-\x{0D3C}\x{0D3E}-\x{0D40}\x{0D41}-\x{0D44}\x{0D46}-\x{0D48}\x{0D4A}-\x{0D4C}\x{0D4D}\x{0D57}\x{0D62}-\x{0D63}\x{0D81}\x{0D82}-\x{0D83}\x{0DCA}\x{0DCF}-\x{0DD1}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0DD8}-\x{0DDF}\x{0DF2}-\x{0DF3}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3E}-\x{0F3F}\x{0F71}-\x{0F7E}\x{0F7F}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102B}-\x{102C}\x{102D}-\x{1030}\x{1031}\x{1032}-\x{1037}\x{1038}\x{1039}-\x{103A}\x{103B}-\x{103C}\x{103D}-\x{103E}\x{1056}-\x{1057}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1062}-\x{1064}\x{1067}-\x{106D}\x{1071}-\x{1074}\x{1082}\x{1083}-\x{1084}\x{1085}-\x{1086}\x{1087}-\x{108C}\x{108D}\x{108F}\x{109A}-\x{109C}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B6}\x{17B7}-\x{17BD}\x{17BE}-\x{17C5}\x{17C6}\x{17C7}-\x{17C8}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1923}-\x{1926}\x{1927}-\x{1928}\x{1929}-\x{192B}\x{1930}-\x{1931}\x{1932}\x{1933}-\x{1938}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A19}-\x{1A1A}\x{1A1B}\x{1A55}\x{1A56}\x{1A57}\x{1A58}-\x{1A5E}\x{1A60}\x{1A61}\x{1A62}\x{1A63}-\x{1A64}\x{1A65}-\x{1A6C}\x{1A6D}-\x{1A72}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B04}\x{1B34}\x{1B35}\x{1B36}-\x{1B3A}\x{1B3B}\x{1B3C}\x{1B3D}-\x{1B41}\x{1B42}\x{1B43}-\x{1B44}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1B82}\x{1BA1}\x{1BA2}-\x{1BA5}\x{1BA6}-\x{1BA7}\x{1BA8}-\x{1BA9}\x{1BAA}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE7}\x{1BE8}-\x{1BE9}\x{1BEA}-\x{1BEC}\x{1BED}\x{1BEE}\x{1BEF}-\x{1BF1}\x{1BF2}-\x{1BF3}\x{1C24}-\x{1C2B}\x{1C2C}-\x{1C33}\x{1C34}-\x{1C35}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE1}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF7}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{302E}-\x{302F}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A823}-\x{A824}\x{A825}-\x{A826}\x{A827}\x{A82C}\x{A880}-\x{A881}\x{A8B4}-\x{A8C3}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A952}-\x{A953}\x{A980}-\x{A982}\x{A983}\x{A9B3}\x{A9B4}-\x{A9B5}\x{A9B6}-\x{A9B9}\x{A9BA}-\x{A9BB}\x{A9BC}-\x{A9BD}\x{A9BE}-\x{A9C0}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA2F}-\x{AA30}\x{AA31}-\x{AA32}\x{AA33}-\x{AA34}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA4D}\x{AA7B}\x{AA7C}\x{AA7D}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEB}\x{AAEC}-\x{AAED}\x{AAEE}-\x{AAEF}\x{AAF5}\x{AAF6}\x{ABE3}-\x{ABE4}\x{ABE5}\x{ABE6}-\x{ABE7}\x{ABE8}\x{ABE9}-\x{ABEA}\x{ABEC}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11000}\x{11001}\x{11002}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{11082}\x{110B0}-\x{110B2}\x{110B3}-\x{110B6}\x{110B7}-\x{110B8}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112C}\x{1112D}-\x{11134}\x{11145}-\x{11146}\x{11173}\x{11180}-\x{11181}\x{11182}\x{111B3}-\x{111B5}\x{111B6}-\x{111BE}\x{111BF}-\x{111C0}\x{111C9}-\x{111CC}\x{111CE}\x{111CF}\x{1122C}-\x{1122E}\x{1122F}-\x{11231}\x{11232}-\x{11233}\x{11234}\x{11235}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E0}-\x{112E2}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{11302}-\x{11303}\x{1133B}-\x{1133C}\x{1133E}-\x{1133F}\x{11340}\x{11341}-\x{11344}\x{11347}-\x{11348}\x{1134B}-\x{1134D}\x{11357}\x{11362}-\x{11363}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11435}-\x{11437}\x{11438}-\x{1143F}\x{11440}-\x{11441}\x{11442}-\x{11444}\x{11445}\x{11446}\x{1145E}\x{114B0}-\x{114B2}\x{114B3}-\x{114B8}\x{114B9}\x{114BA}\x{114BB}-\x{114BE}\x{114BF}-\x{114C0}\x{114C1}\x{114C2}-\x{114C3}\x{115AF}-\x{115B1}\x{115B2}-\x{115B5}\x{115B8}-\x{115BB}\x{115BC}-\x{115BD}\x{115BE}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11630}-\x{11632}\x{11633}-\x{1163A}\x{1163B}-\x{1163C}\x{1163D}\x{1163E}\x{1163F}-\x{11640}\x{116AB}\x{116AC}\x{116AD}\x{116AE}-\x{116AF}\x{116B0}-\x{116B5}\x{116B6}\x{116B7}\x{1171D}-\x{1171F}\x{11720}-\x{11721}\x{11722}-\x{11725}\x{11726}\x{11727}-\x{1172B}\x{1182C}-\x{1182E}\x{1182F}-\x{11837}\x{11838}\x{11839}-\x{1183A}\x{11930}-\x{11935}\x{11937}-\x{11938}\x{1193B}-\x{1193C}\x{1193D}\x{1193E}\x{11940}\x{11942}\x{11943}\x{119D1}-\x{119D3}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119DC}-\x{119DF}\x{119E0}\x{119E4}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A39}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A57}-\x{11A58}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A97}\x{11A98}-\x{11A99}\x{11C2F}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3E}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CA9}\x{11CAA}-\x{11CB0}\x{11CB1}\x{11CB2}-\x{11CB3}\x{11CB4}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D8A}-\x{11D8E}\x{11D90}-\x{11D91}\x{11D93}-\x{11D94}\x{11D95}\x{11D96}\x{11D97}\x{11EF3}-\x{11EF4}\x{11EF5}-\x{11EF6}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F51}-\x{16F87}\x{16F8F}-\x{16F92}\x{16FE4}\x{16FF0}-\x{16FF1}\x{1BC9D}-\x{1BC9E}\x{1D165}-\x{1D166}\x{1D167}-\x{1D169}\x{1D16D}-\x{1D172}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]/u';
11
+
12
+ const RTL_LABEL = '/[\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{200F}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u';
13
+
14
+ const BIDI_STEP_1_LTR = '/^[^\x{0000}-\x{0008}\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{000E}-\x{001B}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{0030}-\x{0039}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0085}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B2}-\x{00B3}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00B9}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{1680}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{2000}-\x{200A}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{205F}\x{2060}-\x{2064}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}\x{206A}-\x{206F}\x{2070}\x{2074}-\x{2079}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{2080}-\x{2089}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{2488}-\x{249B}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3000}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF10}-\x{FF19}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{102E1}-\x{102FB}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1D7CE}-\x{1D7FF}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F100}-\x{1F10A}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FBF0}-\x{1FBF9}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}]/u';
15
+ const BIDI_STEP_1_RTL = '/^[\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{200F}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u';
16
+ const BIDI_STEP_2 = '/[^\x{0000}-\x{0008}\x{000E}-\x{001B}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{0030}-\x{0039}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B2}-\x{00B3}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00B9}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{2060}-\x{2064}\x{2065}\x{206A}-\x{206F}\x{2070}\x{2074}-\x{2079}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{2080}-\x{2089}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{2488}-\x{249B}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF10}-\x{FF19}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{102E1}-\x{102FB}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1D7CE}-\x{1D7FF}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F100}-\x{1F10A}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FBF0}-\x{1FBF9}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}]/u';
17
+ const BIDI_STEP_3 = '/[\x{0030}-\x{0039}\x{00B2}-\x{00B3}\x{00B9}\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{200F}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2488}-\x{249B}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FF10}-\x{FF19}\x{102E1}-\x{102FB}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1D7CE}-\x{1D7FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F100}-\x{1F10A}\x{1FBF0}-\x{1FBF9}][\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1D167}-\x{1D169}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]*$/u';
18
+ const BIDI_STEP_4_AN = '/[\x{0600}-\x{0605}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{06DD}\x{08E2}\x{10D30}-\x{10D39}\x{10E60}-\x{10E7E}]/u';
19
+ const BIDI_STEP_4_EN = '/[\x{0030}-\x{0039}\x{00B2}-\x{00B3}\x{00B9}\x{06F0}-\x{06F9}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2488}-\x{249B}\x{FF10}-\x{FF19}\x{102E1}-\x{102FB}\x{1D7CE}-\x{1D7FF}\x{1F100}-\x{1F10A}\x{1FBF0}-\x{1FBF9}]/u';
20
+ const BIDI_STEP_5 = '/[\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0085}\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{1680}\x{2000}-\x{200A}\x{200F}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{205F}\x{2066}\x{2067}\x{2068}\x{2069}\x{3000}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u';
21
+ const BIDI_STEP_6 = '/[^\x{0000}-\x{0008}\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{000E}-\x{001B}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0085}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{1680}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{2000}-\x{200A}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{205F}\x{2060}-\x{2064}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}\x{206A}-\x{206F}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3000}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}][\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1D167}-\x{1D169}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]*$/u';
22
+
23
+ const ZWNJ = '/([\x{A872}\x{10ACD}\x{10AD7}\x{10D00}\x{10FCB}\x{0620}\x{0626}\x{0628}\x{062A}-\x{062E}\x{0633}-\x{063F}\x{0641}-\x{0647}\x{0649}-\x{064A}\x{066E}-\x{066F}\x{0678}-\x{0687}\x{069A}-\x{06BF}\x{06C1}-\x{06C2}\x{06CC}\x{06CE}\x{06D0}-\x{06D1}\x{06FA}-\x{06FC}\x{06FF}\x{0712}-\x{0714}\x{071A}-\x{071D}\x{071F}-\x{0727}\x{0729}\x{072B}\x{072D}-\x{072E}\x{074E}-\x{0758}\x{075C}-\x{076A}\x{076D}-\x{0770}\x{0772}\x{0775}-\x{0777}\x{077A}-\x{077F}\x{07CA}-\x{07EA}\x{0841}-\x{0845}\x{0848}\x{084A}-\x{0853}\x{0855}\x{0860}\x{0862}-\x{0865}\x{0868}\x{08A0}-\x{08A9}\x{08AF}-\x{08B0}\x{08B3}-\x{08B4}\x{08B6}-\x{08B8}\x{08BA}-\x{08C7}\x{1807}\x{1820}-\x{1842}\x{1843}\x{1844}-\x{1878}\x{1887}-\x{18A8}\x{18AA}\x{A840}-\x{A871}\x{10AC0}-\x{10AC4}\x{10AD3}-\x{10AD6}\x{10AD8}-\x{10ADC}\x{10ADE}-\x{10AE0}\x{10AEB}-\x{10AEE}\x{10B80}\x{10B82}\x{10B86}-\x{10B88}\x{10B8A}-\x{10B8B}\x{10B8D}\x{10B90}\x{10BAD}-\x{10BAE}\x{10D01}-\x{10D21}\x{10D23}\x{10F30}-\x{10F32}\x{10F34}-\x{10F44}\x{10F51}-\x{10F53}\x{10FB0}\x{10FB2}-\x{10FB3}\x{10FB8}\x{10FBB}-\x{10FBC}\x{10FBE}-\x{10FBF}\x{10FC1}\x{10FC4}\x{10FCA}\x{1E900}-\x{1E943}][\x{00AD}\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{061C}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{200B}\x{200E}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{206A}-\x{206F}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{FEFF}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{13430}-\x{13438}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1E94B}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}]*\x{200C}[\x{00AD}\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{061C}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{200B}\x{200E}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{206A}-\x{206F}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{FEFF}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{13430}-\x{13438}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1E94B}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}]*)[\x{0622}-\x{0625}\x{0627}\x{0629}\x{062F}-\x{0632}\x{0648}\x{0671}-\x{0673}\x{0675}-\x{0677}\x{0688}-\x{0699}\x{06C0}\x{06C3}-\x{06CB}\x{06CD}\x{06CF}\x{06D2}-\x{06D3}\x{06D5}\x{06EE}-\x{06EF}\x{0710}\x{0715}-\x{0719}\x{071E}\x{0728}\x{072A}\x{072C}\x{072F}\x{074D}\x{0759}-\x{075B}\x{076B}-\x{076C}\x{0771}\x{0773}-\x{0774}\x{0778}-\x{0779}\x{0840}\x{0846}-\x{0847}\x{0849}\x{0854}\x{0856}-\x{0858}\x{0867}\x{0869}-\x{086A}\x{08AA}-\x{08AC}\x{08AE}\x{08B1}-\x{08B2}\x{08B9}\x{10AC5}\x{10AC7}\x{10AC9}-\x{10ACA}\x{10ACE}-\x{10AD2}\x{10ADD}\x{10AE1}\x{10AE4}\x{10AEF}\x{10B81}\x{10B83}-\x{10B85}\x{10B89}\x{10B8C}\x{10B8E}-\x{10B8F}\x{10B91}\x{10BA9}-\x{10BAC}\x{10D22}\x{10F33}\x{10F54}\x{10FB4}-\x{10FB6}\x{10FB9}-\x{10FBA}\x{10FBD}\x{10FC2}-\x{10FC3}\x{10FC9}\x{0620}\x{0626}\x{0628}\x{062A}-\x{062E}\x{0633}-\x{063F}\x{0641}-\x{0647}\x{0649}-\x{064A}\x{066E}-\x{066F}\x{0678}-\x{0687}\x{069A}-\x{06BF}\x{06C1}-\x{06C2}\x{06CC}\x{06C