LiveChat – WP live chat plugin for WordPress - Version 4.0.0

Version Description

Download this release

Release Info

Developer livechat
Plugin Icon 128x128 LiveChat – WP live chat plugin for WordPress
Version 4.0.0
Comparing to
See all releases

Code changes from version 3.8.2 to 4.0.0

Files changed (233) hide show
  1. changelog.txt +10 -0
  2. composer.json +29 -0
  3. composer.lock +2516 -0
  4. languages/wp-live-chat-software-for-wordpress.pot +72 -74
  5. livechat.php +20 -9
  6. plugin_files/Exceptions/ApiClientException.class.php +28 -0
  7. plugin_files/Exceptions/ErrorCode.class.php +49 -0
  8. plugin_files/Exceptions/InvalidTokenException.class.php +44 -0
  9. plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php +32 -0
  10. plugin_files/Helpers/ConnectNoticeHelper.class.php +43 -0
  11. plugin_files/Helpers/ConnectServiceHelper.class.php +102 -0
  12. plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php +183 -0
  13. plugin_files/Helpers/LiveChatHelper.class.php +20 -0
  14. plugin_files/Helpers/ReviewNoticeHelper.class.php +41 -0
  15. plugin_files/{helpers → Helpers}/TrackingCodeHelper.class.php +28 -14
  16. plugin_files/LiveChat.class.php +128 -131
  17. plugin_files/LiveChatAdmin.class.php +507 -407
  18. plugin_files/Services/ApiClient.class.php +191 -0
  19. plugin_files/Services/CertProvider.class.php +83 -0
  20. plugin_files/Services/ConnectToken.class.php +128 -0
  21. plugin_files/Services/ConnectTokenProvider.class.php +75 -0
  22. plugin_files/Services/ModuleConfiguration.class.php +141 -0
  23. plugin_files/Services/Store.class.php +69 -0
  24. plugin_files/Services/TokenValidator.class.php +111 -0
  25. plugin_files/Services/UrlProvider.class.php +82 -0
  26. plugin_files/Services/User.class.php +170 -0
  27. plugin_files/css/livechat-general.css +30 -13
  28. plugin_files/css/livechat-menu.css +2 -2
  29. plugin_files/css/livechat-review.css +19 -19
  30. plugin_files/helpers/ConnectNoticeHelper.class.php +0 -34
  31. plugin_files/helpers/DeactivationFeedbackFormHelper.class.php +0 -170
  32. plugin_files/helpers/InstallHelper.class.php +0 -42
  33. plugin_files/helpers/LiveChatHelper.class.php +0 -6
  34. plugin_files/helpers/ReviewNoticeHelper.class.php +0 -32
  35. plugin_files/helpers/SettingsHelper.class.php +0 -97
  36. plugin_files/images/livechat-icon.svg +2 -2
  37. plugin_files/js/connect.js +812 -0
  38. plugin_files/js/livechat-review.js +51 -37
  39. plugin_files/js/livechat.js +309 -262
  40. plugin_files/templates/confirm_identity_notice.html.twig +22 -0
  41. plugin_files/templates/connect.html.twig +52 -0
  42. readme.txt +7 -12
  43. vendor/altorouter/altorouter/.travis.yml +7 -0
  44. vendor/altorouter/altorouter/AltoRouter.php +270 -0
  45. vendor/altorouter/altorouter/AltoRouterTest.php +423 -0
  46. vendor/altorouter/altorouter/README.md +92 -0
  47. vendor/altorouter/altorouter/composer.json +28 -0
  48. vendor/altorouter/altorouter/examples/basic/.htaccess +3 -0
  49. vendor/altorouter/altorouter/examples/basic/index.php +27 -0
  50. vendor/asm89/twig-cache-extension/.gitignore +4 -0
  51. vendor/asm89/twig-cache-extension/.travis.yml +36 -0
  52. vendor/asm89/twig-cache-extension/LICENSE +19 -0
  53. vendor/asm89/twig-cache-extension/README.md +238 -0
  54. vendor/asm89/twig-cache-extension/composer.json +39 -0
  55. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheProvider/DoctrineCacheAdapter.php +49 -0
  56. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheProvider/PsrCacheAdapter.php +68 -0
  57. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheProviderInterface.php +36 -0
  58. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/BlackholeCacheStrategy.php +53 -0
  59. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/GenerationalCacheStrategy.php +79 -0
  60. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/IndexedChainingCacheStrategy.php +76 -0
  61. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/KeyGeneratorInterface.php +29 -0
  62. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/LifetimeCacheStrategy.php +68 -0
  63. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategyInterface.php +49 -0
  64. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/BaseException.php +20 -0
  65. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/InvalidCacheKeyException.php +23 -0
  66. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/InvalidCacheLifetimeException.php +23 -0
  67. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/NonExistingStrategyException.php +23 -0
  68. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/NonExistingStrategyKeyException.php +23 -0
  69. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php +59 -0
  70. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Node/CacheNode.php +71 -0
  71. vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/TokenParser/Cache.php +59 -0
  72. vendor/asm89/twig-cache-extension/phpunit.xml.dist +25 -0
  73. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php +46 -0
  74. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/GenerationCacheStrategyTest.php +80 -0
  75. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/IndexedChainingCacheStrategyTest.php +80 -0
  76. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php +68 -0
  77. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/FunctionalExtensionTest.php +182 -0
  78. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/annotation_expression.twig +3 -0
  79. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/annotation_not_string.twig +2 -0
  80. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/gcs_value.twig +1 -0
  81. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/gcs_value_v2.twig +1 -0
  82. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/ics_no_key.twig +1 -0
  83. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/ics_value.twig +1 -0
  84. vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/lcs_value.twig +1 -0
  85. vendor/asm89/twig-cache-extension/test/bootstrap.php +16 -0
  86. vendor/autoload.php +7 -0
  87. vendor/composer/ClassLoader.php +445 -0
  88. vendor/composer/LICENSE +21 -0
  89. vendor/composer/autoload_classmap.php +40 -0
  90. vendor/composer/autoload_files.php +15 -0
  91. vendor/composer/autoload_namespaces.php +11 -0
  92. vendor/composer/autoload_psr4.php +20 -0
  93. vendor/composer/autoload_real.php +70 -0
  94. vendor/composer/autoload_static.php +161 -0
  95. vendor/composer/installed.json +818 -0
  96. vendor/composer/installers/LICENSE +19 -0
  97. vendor/composer/installers/composer.json +107 -0
  98. vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
  99. vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +9 -0
  100. vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
  101. vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +49 -0
  102. vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +9 -0
  103. vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +136 -0
  104. vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +126 -0
  105. vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +9 -0
  106. vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +82 -0
  107. vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +11 -0
  108. vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php +9 -0
  109. vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +10 -0
  110. vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +34 -0
  111. vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
  112. vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +13 -0
  113. vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +35 -0
  114. vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
  115. vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +10 -0
  116. vendor/composer/installers/src/Composer/Installers/DframeInstaller.php +10 -0
  117. vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +50 -0
  118. vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +16 -0
  119. vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +20 -0
  120. vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
  121. vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +12 -0
  122. vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +29 -0
  123. vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +10 -0
  124. vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
  125. vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +9 -0
  126. vendor/composer/installers/src/Composer/Installers/GravInstaller.php +30 -0
  127. vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +25 -0
  128. vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +11 -0
  129. vendor/composer/installers/src/Composer/Installers/Installer.php +278 -0
  130. vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +9 -0
  131. vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
  132. vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +18 -0
  133. vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +11 -0
  134. vendor/composer/installers/src/Composer/Installers/KnownInstaller.php +11 -0
  135. vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +10 -0
  136. vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
  137. vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +27 -0
  138. vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
  139. vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +10 -0
  140. vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
  141. vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
  142. vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
  143. vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
  144. vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +37 -0
  145. vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
  146. vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +25 -0
  147. vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +33 -0
  148. vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +51 -0
  149. vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +119 -0
  150. vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +12 -0
  151. vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +58 -0
  152. vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +47 -0
  153. vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +24 -0
  154. vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +14 -0
  155. vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +59 -0
  156. vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
  157. vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +11 -0
  158. vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
  159. vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +21 -0
  160. vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
  161. vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +29 -0
  162. vendor/composer/installers/src/Composer/Installers/Plugin.php +17 -0
  163. vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +9 -0
  164. vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +10 -0
  165. vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +11 -0
  166. vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +63 -0
  167. vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +24 -0
  168. vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +10 -0
  169. vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php +10 -0
  170. vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +10 -0
  171. vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +22 -0
  172. vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +10 -0
  173. vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +60 -0
  174. vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +35 -0
  175. vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +25 -0
  176. vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +49 -0
  177. vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
  178. vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +16 -0
  179. vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +38 -0
  180. vendor/composer/installers/src/Composer/Installers/TaoInstaller.php +12 -0
  181. vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +12 -0
  182. vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +14 -0
  183. vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +9 -0
  184. vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +10 -0
  185. vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +49 -0
  186. vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +21 -0
  187. vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
  188. vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +12 -0
  189. vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +32 -0
  190. vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
  191. vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
  192. vendor/composer/installers/src/bootstrap.php +13 -0
  193. vendor/firebase/php-jwt/LICENSE +30 -0
  194. vendor/firebase/php-jwt/README.md +200 -0
  195. vendor/firebase/php-jwt/composer.json +29 -0
  196. vendor/firebase/php-jwt/src/BeforeValidException.php +7 -0
  197. vendor/firebase/php-jwt/src/ExpiredException.php +7 -0
  198. vendor/firebase/php-jwt/src/JWT.php +379 -0
  199. vendor/firebase/php-jwt/src/SignatureInvalidException.php +7 -0
  200. vendor/guzzlehttp/guzzle/.php_cs +21 -0
  201. vendor/guzzlehttp/guzzle/CHANGELOG.md +1304 -0
  202. vendor/guzzlehttp/guzzle/Dockerfile +18 -0
  203. vendor/guzzlehttp/guzzle/LICENSE +19 -0
  204. vendor/guzzlehttp/guzzle/README.md +90 -0
  205. vendor/guzzlehttp/guzzle/UPGRADING.md +1203 -0
  206. vendor/guzzlehttp/guzzle/composer.json +58 -0
  207. vendor/guzzlehttp/guzzle/phpstan.neon.dist +9 -0
  208. vendor/guzzlehttp/guzzle/src/Client.php +422 -0
  209. vendor/guzzlehttp/guzzle/src/ClientInterface.php +84 -0
  210. vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +314 -0
  211. vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +84 -0
  212. vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +91 -0
  213. vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +72 -0
  214. vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +403 -0
  215. vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +27 -0
  216. vendor/guzzlehttp/guzzle/src/Exception/ClientException.php +9 -0
  217. vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php +37 -0
  218. vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +23 -0
  219. vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php +7 -0
  220. vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +217 -0
  221. vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +27 -0
  222. vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +9 -0
  223. vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php +6 -0
  224. vendor/guzzlehttp/guzzle/src/Exception/TransferException.php +6 -0
  225. vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +580 -0
  226. vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +27 -0
  227. vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php +45 -0
  228. vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +205 -0
  229. vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +92 -0
  230. vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +190 -0
  231. vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +55 -0
  232. vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +544 -0
  233. vendor/guzzlehttp/guzzle/src/HandlerStack.php +22 -0
changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 3.7.6 =
4
  * yet another security improvement, better security check for database operations
5
 
1
  == Changelog ==
2
 
3
+ = 3.8.2 =
4
+ * plugin usage tracking enhancements
5
+
6
+ = 3.8.1 =
7
+ * more secure way of displaying deactivation feedback modal
8
+
9
+ = 3.8.0 =
10
+ * plugin redesign
11
+ * deactivation feedback modal
12
+
13
  = 3.7.6 =
14
  * yet another security improvement, better security check for database operations
15
 
composer.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "livechatinc/wordpress-integration",
3
+ "description": "LiveChat for WordPress",
4
+ "type": "wordpress-module",
5
+ "license": "AFL 3.0",
6
+ "require": {
7
+ "timber/timber": "1.0",
8
+ "ext-json": "^1.2",
9
+ "firebase/php-jwt": "^5.0",
10
+ "guzzlehttp/guzzle": "^6.4",
11
+ "ext-curl": "*"
12
+ },
13
+ "require-dev": {
14
+ "squizlabs/php_codesniffer": "*",
15
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
16
+ "wp-coding-standards/wpcs": "^2.1",
17
+ "phpunit/phpunit": "~5.7",
18
+ "brain/monkey": "^2.3",
19
+ "mockery/mockery": "^1.2"
20
+ },
21
+ "autoload": {
22
+ "psr-4": {
23
+ "LiveChat\\": "plugin_files/"
24
+ },
25
+ "classmap": [
26
+ "plugin_files/"
27
+ ]
28
+ }
29
+ }
composer.lock ADDED
@@ -0,0 +1,2516 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "928dd1c14c1a1c533f23dbc643e06b30",
8
+ "packages": [
9
+ {
10
+ "name": "altorouter/altorouter",
11
+ "version": "v1.1.0",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://github.com/dannyvankooten/AltoRouter.git",
15
+ "reference": "09d9d946c546bae6d22a7654cdb3b825ffda54b4"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://api.github.com/repos/dannyvankooten/AltoRouter/zipball/09d9d946c546bae6d22a7654cdb3b825ffda54b4",
20
+ "reference": "09d9d946c546bae6d22a7654cdb3b825ffda54b4",
21
+ "shasum": ""
22
+ },
23
+ "require": {
24
+ "php": ">=5.3.0"
25
+ },
26
+ "type": "library",
27
+ "autoload": {
28
+ "classmap": [
29
+ "AltoRouter.php"
30
+ ]
31
+ },
32
+ "notification-url": "https://packagist.org/downloads/",
33
+ "license": [
34
+ "MIT"
35
+ ],
36
+ "authors": [
37
+ {
38
+ "name": "Danny van Kooten",
39
+ "email": "dannyvankooten@gmail.com",
40
+ "homepage": "http://dannyvankooten.com/"
41
+ },
42
+ {
43
+ "name": "Koen Punt",
44
+ "homepage": "https://github.com/koenpunt"
45
+ },
46
+ {
47
+ "name": "niahoo",
48
+ "homepage": "https://github.com/niahoo"
49
+ }
50
+ ],
51
+ "description": "A lightning fast router for PHP",
52
+ "homepage": "https://github.com/dannyvankooten/AltoRouter",
53
+ "keywords": [
54
+ "lightweight",
55
+ "router",
56
+ "routing"
57
+ ],
58
+ "time": "2014-04-16T09:44:40+00:00"
59
+ },
60
+ {
61
+ "name": "asm89/twig-cache-extension",
62
+ "version": "1.3.2",
63
+ "source": {
64
+ "type": "git",
65
+ "url": "https://github.com/asm89/twig-cache-extension.git",
66
+ "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55"
67
+ },
68
+ "dist": {
69
+ "type": "zip",
70
+ "url": "https://api.github.com/repos/asm89/twig-cache-extension/zipball/630ea7abdc3fc62ba6786c02590a1560e449cf55",
71
+ "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55",
72
+ "shasum": ""
73
+ },
74
+ "require": {
75
+ "php": ">=5.3.2",
76
+ "twig/twig": "^1.0|^2.0"
77
+ },
78
+ "require-dev": {
79
+ "doctrine/cache": "~1.0"
80
+ },
81
+ "suggest": {
82
+ "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter."
83
+ },
84
+ "type": "library",
85
+ "extra": {
86
+ "branch-alias": {
87
+ "dev-master": "1.3-dev"
88
+ }
89
+ },
90
+ "autoload": {
91
+ "psr-4": {
92
+ "": "lib/"
93
+ }
94
+ },
95
+ "notification-url": "https://packagist.org/downloads/",
96
+ "license": [
97
+ "MIT"
98
+ ],
99
+ "authors": [
100
+ {
101
+ "name": "Alexander",
102
+ "email": "iam.asm89@gmail.com"
103
+ }
104
+ ],
105
+ "description": "Cache fragments of templates directly within Twig.",
106
+ "homepage": "https://github.com/asm89/twig-cache-extension",
107
+ "keywords": [
108
+ "cache",
109
+ "extension",
110
+ "twig"
111
+ ],
112
+ "time": "2017-01-10T22:04:15+00:00"
113
+ },
114
+ {
115
+ "name": "composer/installers",
116
+ "version": "v1.7.0",
117
+ "source": {
118
+ "type": "git",
119
+ "url": "https://github.com/composer/installers.git",
120
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
121
+ },
122
+ "dist": {
123
+ "type": "zip",
124
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
125
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
126
+ "shasum": ""
127
+ },
128
+ "require": {
129
+ "composer-plugin-api": "^1.0"
130
+ },
131
+ "replace": {
132
+ "roundcube/plugin-installer": "*",
133
+ "shama/baton": "*"
134
+ },
135
+ "require-dev": {
136
+ "composer/composer": "1.0.*@dev",
137
+ "phpunit/phpunit": "^4.8.36"
138
+ },
139
+ "type": "composer-plugin",
140
+ "extra": {
141
+ "class": "Composer\\Installers\\Plugin",
142
+ "branch-alias": {
143
+ "dev-master": "1.0-dev"
144
+ }
145
+ },
146
+ "autoload": {
147
+ "psr-4": {
148
+ "Composer\\Installers\\": "src/Composer/Installers"
149
+ }
150
+ },
151
+ "notification-url": "https://packagist.org/downloads/",
152
+ "license": [
153
+ "MIT"
154
+ ],
155
+ "authors": [
156
+ {
157
+ "name": "Kyle Robinson Young",
158
+ "email": "kyle@dontkry.com",
159
+ "homepage": "https://github.com/shama"
160
+ }
161
+ ],
162
+ "description": "A multi-framework Composer library installer",
163
+ "homepage": "https://composer.github.io/installers/",
164
+ "keywords": [
165
+ "Craft",
166
+ "Dolibarr",
167
+ "Eliasis",
168
+ "Hurad",
169
+ "ImageCMS",
170
+ "Kanboard",
171
+ "Lan Management System",
172
+ "MODX Evo",
173
+ "Mautic",
174
+ "Maya",
175
+ "OXID",
176
+ "Plentymarkets",
177
+ "Porto",
178
+ "RadPHP",
179
+ "SMF",
180
+ "Thelia",
181
+ "Whmcs",
182
+ "WolfCMS",
183
+ "agl",
184
+ "aimeos",
185
+ "annotatecms",
186
+ "attogram",
187
+ "bitrix",
188
+ "cakephp",
189
+ "chef",
190
+ "cockpit",
191
+ "codeigniter",
192
+ "concrete5",
193
+ "croogo",
194
+ "dokuwiki",
195
+ "drupal",
196
+ "eZ Platform",
197
+ "elgg",
198
+ "expressionengine",
199
+ "fuelphp",
200
+ "grav",
201
+ "installer",
202
+ "itop",
203
+ "joomla",
204
+ "known",
205
+ "kohana",
206
+ "laravel",
207
+ "lavalite",
208
+ "lithium",
209
+ "magento",
210
+ "majima",
211
+ "mako",
212
+ "mediawiki",
213
+ "modulework",
214
+ "modx",
215
+ "moodle",
216
+ "osclass",
217
+ "phpbb",
218
+ "piwik",
219
+ "ppi",
220
+ "puppet",
221
+ "pxcms",
222
+ "reindex",
223
+ "roundcube",
224
+ "shopware",
225
+ "silverstripe",
226
+ "sydes",
227
+ "symfony",
228
+ "typo3",
229
+ "wordpress",
230
+ "yawik",
231
+ "zend",
232
+ "zikula"
233
+ ],
234
+ "time": "2019-08-12T15:00:31+00:00"
235
+ },
236
+ {
237
+ "name": "firebase/php-jwt",
238
+ "version": "v5.0.0",
239
+ "source": {
240
+ "type": "git",
241
+ "url": "https://github.com/firebase/php-jwt.git",
242
+ "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e"
243
+ },
244
+ "dist": {
245
+ "type": "zip",
246
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/9984a4d3a32ae7673d6971ea00bae9d0a1abba0e",
247
+ "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e",
248
+ "shasum": ""
249
+ },
250
+ "require": {
251
+ "php": ">=5.3.0"
252
+ },
253
+ "require-dev": {
254
+ "phpunit/phpunit": " 4.8.35"
255
+ },
256
+ "type": "library",
257
+ "autoload": {
258
+ "psr-4": {
259
+ "Firebase\\JWT\\": "src"
260
+ }
261
+ },
262
+ "notification-url": "https://packagist.org/downloads/",
263
+ "license": [
264
+ "BSD-3-Clause"
265
+ ],
266
+ "authors": [
267
+ {
268
+ "name": "Neuman Vong",
269
+ "email": "neuman+pear@twilio.com",
270
+ "role": "Developer"
271
+ },
272
+ {
273
+ "name": "Anant Narayanan",
274
+ "email": "anant@php.net",
275
+ "role": "Developer"
276
+ }
277
+ ],
278
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
279
+ "homepage": "https://github.com/firebase/php-jwt",
280
+ "time": "2017-06-27T22:17:23+00:00"
281
+ },
282
+ {
283
+ "name": "guzzlehttp/guzzle",
284
+ "version": "6.4.1",
285
+ "source": {
286
+ "type": "git",
287
+ "url": "https://github.com/guzzle/guzzle.git",
288
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
289
+ },
290
+ "dist": {
291
+ "type": "zip",
292
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
293
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
294
+ "shasum": ""
295
+ },
296
+ "require": {
297
+ "ext-json": "*",
298
+ "guzzlehttp/promises": "^1.0",
299
+ "guzzlehttp/psr7": "^1.6.1",
300
+ "php": ">=5.5"
301
+ },
302
+ "require-dev": {
303
+ "ext-curl": "*",
304
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
305
+ "psr/log": "^1.1"
306
+ },
307
+ "suggest": {
308
+ "psr/log": "Required for using the Log middleware"
309
+ },
310
+ "type": "library",
311
+ "extra": {
312
+ "branch-alias": {
313
+ "dev-master": "6.3-dev"
314
+ }
315
+ },
316
+ "autoload": {
317
+ "psr-4": {
318
+ "GuzzleHttp\\": "src/"
319
+ },
320
+ "files": [
321
+ "src/functions_include.php"
322
+ ]
323
+ },
324
+ "notification-url": "https://packagist.org/downloads/",
325
+ "license": [
326
+ "MIT"
327
+ ],
328
+ "authors": [
329
+ {
330
+ "name": "Michael Dowling",
331
+ "email": "mtdowling@gmail.com",
332
+ "homepage": "https://github.com/mtdowling"
333
+ }
334
+ ],
335
+ "description": "Guzzle is a PHP HTTP client library",
336
+ "homepage": "http://guzzlephp.org/",
337
+ "keywords": [
338
+ "client",
339
+ "curl",
340
+ "framework",
341
+ "http",
342
+ "http client",
343
+ "rest",
344
+ "web service"
345
+ ],
346
+ "time": "2019-10-23T15:58:00+00:00"
347
+ },
348
+ {
349
+ "name": "guzzlehttp/promises",
350
+ "version": "v1.3.1",
351
+ "source": {
352
+ "type": "git",
353
+ "url": "https://github.com/guzzle/promises.git",
354
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
355
+ },
356
+ "dist": {
357
+ "type": "zip",
358
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
359
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
360
+ "shasum": ""
361
+ },
362
+ "require": {
363
+ "php": ">=5.5.0"
364
+ },
365
+ "require-dev": {
366
+ "phpunit/phpunit": "^4.0"
367
+ },
368
+ "type": "library",
369
+ "extra": {
370
+ "branch-alias": {
371
+ "dev-master": "1.4-dev"
372
+ }
373
+ },
374
+ "autoload": {
375
+ "psr-4": {
376
+ "GuzzleHttp\\Promise\\": "src/"
377
+ },
378
+ "files": [
379
+ "src/functions_include.php"
380
+ ]
381
+ },
382
+ "notification-url": "https://packagist.org/downloads/",
383
+ "license": [
384
+ "MIT"
385
+ ],
386
+ "authors": [
387
+ {
388
+ "name": "Michael Dowling",
389
+ "email": "mtdowling@gmail.com",
390
+ "homepage": "https://github.com/mtdowling"
391
+ }
392
+ ],
393
+ "description": "Guzzle promises library",
394
+ "keywords": [
395
+ "promise"
396
+ ],
397
+ "time": "2016-12-20T10:07:11+00:00"
398
+ },
399
+ {
400
+ "name": "guzzlehttp/psr7",
401
+ "version": "1.6.1",
402
+ "source": {
403
+ "type": "git",
404
+ "url": "https://github.com/guzzle/psr7.git",
405
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
406
+ },
407
+ "dist": {
408
+ "type": "zip",
409
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
410
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
411
+ "shasum": ""
412
+ },
413
+ "require": {
414
+ "php": ">=5.4.0",
415
+ "psr/http-message": "~1.0",
416
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
417
+ },
418
+ "provide": {
419
+ "psr/http-message-implementation": "1.0"
420
+ },
421
+ "require-dev": {
422
+ "ext-zlib": "*",
423
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
424
+ },
425
+ "suggest": {
426
+ "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
427
+ },
428
+ "type": "library",
429
+ "extra": {
430
+ "branch-alias": {
431
+ "dev-master": "1.6-dev"
432
+ }
433
+ },
434
+ "autoload": {
435
+ "psr-4": {
436
+ "GuzzleHttp\\Psr7\\": "src/"
437
+ },
438
+ "files": [
439
+ "src/functions_include.php"
440
+ ]
441
+ },
442
+ "notification-url": "https://packagist.org/downloads/",
443
+ "license": [
444
+ "MIT"
445
+ ],
446
+ "authors": [
447
+ {
448
+ "name": "Michael Dowling",
449
+ "email": "mtdowling@gmail.com",
450
+ "homepage": "https://github.com/mtdowling"
451
+ },
452
+ {
453
+ "name": "Tobias Schultze",
454
+ "homepage": "https://github.com/Tobion"
455
+ }
456
+ ],
457
+ "description": "PSR-7 message implementation that also provides common utility methods",
458
+ "keywords": [
459
+ "http",
460
+ "message",
461
+ "psr-7",
462
+ "request",
463
+ "response",
464
+ "stream",
465
+ "uri",
466
+ "url"
467
+ ],
468
+ "time": "2019-07-01T23:21:34+00:00"
469
+ },
470
+ {
471
+ "name": "psr/http-message",
472
+ "version": "1.0.1",
473
+ "source": {
474
+ "type": "git",
475
+ "url": "https://github.com/php-fig/http-message.git",
476
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
477
+ },
478
+ "dist": {
479
+ "type": "zip",
480
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
481
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
482
+ "shasum": ""
483
+ },
484
+ "require": {
485
+ "php": ">=5.3.0"
486
+ },
487
+ "type": "library",
488
+ "extra": {
489
+ "branch-alias": {
490
+ "dev-master": "1.0.x-dev"
491
+ }
492
+ },
493
+ "autoload": {
494
+ "psr-4": {
495
+ "Psr\\Http\\Message\\": "src/"
496
+ }
497
+ },
498
+ "notification-url": "https://packagist.org/downloads/",
499
+ "license": [
500
+ "MIT"
501
+ ],
502
+ "authors": [
503
+ {
504
+ "name": "PHP-FIG",
505
+ "homepage": "http://www.php-fig.org/"
506
+ }
507
+ ],
508
+ "description": "Common interface for HTTP messages",
509
+ "homepage": "https://github.com/php-fig/http-message",
510
+ "keywords": [
511
+ "http",
512
+ "http-message",
513
+ "psr",
514
+ "psr-7",
515
+ "request",
516
+ "response"
517
+ ],
518
+ "time": "2016-08-06T14:39:51+00:00"
519
+ },
520
+ {
521
+ "name": "ralouphie/getallheaders",
522
+ "version": "3.0.3",
523
+ "source": {
524
+ "type": "git",
525
+ "url": "https://github.com/ralouphie/getallheaders.git",
526
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
527
+ },
528
+ "dist": {
529
+ "type": "zip",
530
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
531
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
532
+ "shasum": ""
533
+ },
534
+ "require": {
535
+ "php": ">=5.6"
536
+ },
537
+ "require-dev": {
538
+ "php-coveralls/php-coveralls": "^2.1",
539
+ "phpunit/phpunit": "^5 || ^6.5"
540
+ },
541
+ "type": "library",
542
+ "autoload": {
543
+ "files": [
544
+ "src/getallheaders.php"
545
+ ]
546
+ },
547
+ "notification-url": "https://packagist.org/downloads/",
548
+ "license": [
549
+ "MIT"
550
+ ],
551
+ "authors": [
552
+ {
553
+ "name": "Ralph Khattar",
554
+ "email": "ralph.khattar@gmail.com"
555
+ }
556
+ ],
557
+ "description": "A polyfill for getallheaders.",
558
+ "time": "2019-03-08T08:55:37+00:00"
559
+ },
560
+ {
561
+ "name": "symfony/polyfill-ctype",
562
+ "version": "v1.12.0",
563
+ "source": {
564
+ "type": "git",
565
+ "url": "https://github.com/symfony/polyfill-ctype.git",
566
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
567
+ },
568
+ "dist": {
569
+ "type": "zip",
570
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
571
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
572
+ "shasum": ""
573
+ },
574
+ "require": {
575
+ "php": ">=5.3.3"
576
+ },
577
+ "suggest": {
578
+ "ext-ctype": "For best performance"
579
+ },
580
+ "type": "library",
581
+ "extra": {
582
+ "branch-alias": {
583
+ "dev-master": "1.12-dev"
584
+ }
585
+ },
586
+ "autoload": {
587
+ "psr-4": {
588
+ "Symfony\\Polyfill\\Ctype\\": ""
589
+ },
590
+ "files": [
591
+ "bootstrap.php"
592
+ ]
593
+ },
594
+ "notification-url": "https://packagist.org/downloads/",
595
+ "license": [
596
+ "MIT"
597
+ ],
598
+ "authors": [
599
+ {
600
+ "name": "Gert de Pagter",
601
+ "email": "BackEndTea@gmail.com"
602
+ },
603
+ {
604
+ "name": "Symfony Community",
605
+ "homepage": "https://symfony.com/contributors"
606
+ }
607
+ ],
608
+ "description": "Symfony polyfill for ctype functions",
609
+ "homepage": "https://symfony.com",
610
+ "keywords": [
611
+ "compatibility",
612
+ "ctype",
613
+ "polyfill",
614
+ "portable"
615
+ ],
616
+ "time": "2019-08-06T08:03:45+00:00"
617
+ },
618
+ {
619
+ "name": "timber/timber",
620
+ "version": "1.0.0",
621
+ "source": {
622
+ "type": "git",
623
+ "url": "https://github.com/timber/timber.git",
624
+ "reference": "26b6585103c80c2262495087823fbc43241a95dc"
625
+ },
626
+ "dist": {
627
+ "type": "zip",
628
+ "url": "https://api.github.com/repos/timber/timber/zipball/26b6585103c80c2262495087823fbc43241a95dc",
629
+ "reference": "26b6585103c80c2262495087823fbc43241a95dc",
630
+ "shasum": ""
631
+ },
632
+ "require": {
633
+ "asm89/twig-cache-extension": "~1.0",
634
+ "composer/installers": "~1.0",
635
+ "php": ">=5.3.0",
636
+ "twig/twig": "1.*",
637
+ "upstatement/routes": "0.3"
638
+ },
639
+ "require-dev": {
640
+ "jarednova/markdowndocs": "dev-master",
641
+ "phpdocumentor/phpdocumentor": "2.*",
642
+ "phpunit/phpunit": "~4.0",
643
+ "satooshi/php-coveralls": "1.0.*",
644
+ "wp-cli/wp-cli": "*",
645
+ "wpackagist-plugin/advanced-custom-fields": "4.*"
646
+ },
647
+ "type": "library",
648
+ "autoload": {
649
+ "psr-4": {
650
+ "Timber\\": "lib/"
651
+ },
652
+ "files": [
653
+ "init.php"
654
+ ]
655
+ },
656
+ "notification-url": "https://packagist.org/downloads/",
657
+ "license": [
658
+ "MIT"
659
+ ],
660
+ "authors": [
661
+ {
662
+ "name": "Jared Novack",
663
+ "email": "jared@upstatement.com",
664
+ "homepage": "http://upstatement.com"
665
+ },
666
+ {
667
+ "name": "Connor J. Burton",
668
+ "email": "connorjburton@gmail.com",
669
+ "homepage": "http://connorburton.com"
670
+ }
671
+ ],
672
+ "description": "Plugin to write WordPress themes w Object-Oriented Code and the Twig Template Engine",
673
+ "homepage": "http://timber.upstatement.com",
674
+ "keywords": [
675
+ "templating",
676
+ "themes",
677
+ "timber",
678
+ "twig"
679
+ ],
680
+ "time": "2016-05-03T10:33:18+00:00"
681
+ },
682
+ {
683
+ "name": "twig/twig",
684
+ "version": "v1.42.4",
685
+ "source": {
686
+ "type": "git",
687
+ "url": "https://github.com/twigphp/Twig.git",
688
+ "reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152"
689
+ },
690
+ "dist": {
691
+ "type": "zip",
692
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/e587180584c3d2d6cb864a0454e777bb6dcb6152",
693
+ "reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152",
694
+ "shasum": ""
695
+ },
696
+ "require": {
697
+ "php": ">=5.5.0",
698
+ "symfony/polyfill-ctype": "^1.8"
699
+ },
700
+ "require-dev": {
701
+ "psr/container": "^1.0",
702
+ "symfony/debug": "^3.4|^4.2",
703
+ "symfony/phpunit-bridge": "^4.4@dev|^5.0"
704
+ },
705
+ "type": "library",
706
+ "extra": {
707
+ "branch-alias": {
708
+ "dev-master": "1.42-dev"
709
+ }
710
+ },
711
+ "autoload": {
712
+ "psr-0": {
713
+ "Twig_": "lib/"
714
+ },
715
+ "psr-4": {
716
+ "Twig\\": "src/"
717
+ }
718
+ },
719
+ "notification-url": "https://packagist.org/downloads/",
720
+ "license": [
721
+ "BSD-3-Clause"
722
+ ],
723
+ "authors": [
724
+ {
725
+ "name": "Fabien Potencier",
726
+ "email": "fabien@symfony.com",
727
+ "homepage": "http://fabien.potencier.org",
728
+ "role": "Lead Developer"
729
+ },
730
+ {
731
+ "name": "Twig Team",
732
+ "homepage": "https://twig.symfony.com/contributors",
733
+ "role": "Contributors"
734
+ },
735
+ {
736
+ "name": "Armin Ronacher",
737
+ "email": "armin.ronacher@active-4.com",
738
+ "role": "Project Founder"
739
+ }
740
+ ],
741
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
742
+ "homepage": "https://twig.symfony.com",
743
+ "keywords": [
744
+ "templating"
745
+ ],
746
+ "time": "2019-11-11T16:49:32+00:00"
747
+ },
748
+ {
749
+ "name": "upstatement/routes",
750
+ "version": "0.3",
751
+ "source": {
752
+ "type": "git",
753
+ "url": "https://github.com/Upstatement/routes.git",
754
+ "reference": "40d003b69c0f5c52fb4b15e5d1fa4d5c522c9475"
755
+ },
756
+ "dist": {
757
+ "type": "zip",
758
+ "url": "https://api.github.com/repos/Upstatement/routes/zipball/40d003b69c0f5c52fb4b15e5d1fa4d5c522c9475",
759
+ "reference": "40d003b69c0f5c52fb4b15e5d1fa4d5c522c9475",
760
+ "shasum": ""
761
+ },
762
+ "require": {
763
+ "altorouter/altorouter": "1.1.0",
764
+ "composer/installers": "~1.0",
765
+ "php": ">=5.3.0"
766
+ },
767
+ "require-dev": {
768
+ "phpunit/phpunit": "3.7.*",
769
+ "satooshi/php-coveralls": "dev-master",
770
+ "wp-cli/wp-cli": "*"
771
+ },
772
+ "type": "library",
773
+ "autoload": {
774
+ "psr-0": {
775
+ "Routes": ""
776
+ }
777
+ },
778
+ "notification-url": "https://packagist.org/downloads/",
779
+ "license": [
780
+ "MIT"
781
+ ],
782
+ "authors": [
783
+ {
784
+ "name": "Jared Novack",
785
+ "email": "jared@upstatement.com",
786
+ "homepage": "http://upstatement.com"
787
+ }
788
+ ],
789
+ "description": "Manage rewrites and routes in WordPress with this dead-simple plugin",
790
+ "homepage": "http://routes.upstatement.com",
791
+ "keywords": [
792
+ "redirects",
793
+ "rewrite",
794
+ "routes",
795
+ "routing"
796
+ ],
797
+ "time": "2015-03-07T13:41:29+00:00"
798
+ }
799
+ ],
800
+ "packages-dev": [
801
+ {
802
+ "name": "antecedent/patchwork",
803
+ "version": "2.1.11",
804
+ "source": {
805
+ "type": "git",
806
+ "url": "https://github.com/antecedent/patchwork.git",
807
+ "reference": "ff7aae02f1c5492716fe13d59de4cfc389b8c4b0"
808
+ },
809
+ "dist": {
810
+ "type": "zip",
811
+ "url": "https://api.github.com/repos/antecedent/patchwork/zipball/ff7aae02f1c5492716fe13d59de4cfc389b8c4b0",
812
+ "reference": "ff7aae02f1c5492716fe13d59de4cfc389b8c4b0",
813
+ "shasum": ""
814
+ },
815
+ "require": {
816
+ "php": ">=5.4.0"
817
+ },
818
+ "require-dev": {
819
+ "phpunit/phpunit": ">=4"
820
+ },
821
+ "type": "library",
822
+ "notification-url": "https://packagist.org/downloads/",
823
+ "license": [
824
+ "MIT"
825
+ ],
826
+ "authors": [
827
+ {
828
+ "name": "Ignas Rudaitis",
829
+ "email": "ignas.rudaitis@gmail.com"
830
+ }
831
+ ],
832
+ "description": "Method redefinition (monkey-patching) functionality for PHP.",
833
+ "homepage": "http://patchwork2.org/",
834
+ "keywords": [
835
+ "aop",
836
+ "aspect",
837
+ "interception",
838
+ "monkeypatching",
839
+ "redefinition",
840
+ "runkit",
841
+ "testing"
842
+ ],
843
+ "time": "2019-10-26T07:10:56+00:00"
844
+ },
845
+ {
846
+ "name": "brain/monkey",
847
+ "version": "2.3.1",
848
+ "source": {
849
+ "type": "git",
850
+ "url": "https://github.com/Brain-WP/BrainMonkey.git",
851
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776"
852
+ },
853
+ "dist": {
854
+ "type": "zip",
855
+ "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
856
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
857
+ "shasum": ""
858
+ },
859
+ "require": {
860
+ "antecedent/patchwork": "^2.0",
861
+ "mockery/mockery": ">=0.9 <2",
862
+ "php": ">=5.6.0"
863
+ },
864
+ "require-dev": {
865
+ "phpunit/phpunit": "~5.7.9"
866
+ },
867
+ "type": "library",
868
+ "extra": {
869
+ "branch-alias": {
870
+ "dev-version/1": "1.x-dev",
871
+ "dev-master": "2.0.x-dev"
872
+ }
873
+ },
874
+ "autoload": {
875
+ "psr-4": {
876
+ "Brain\\Monkey\\": "src/"
877
+ },
878
+ "files": [
879
+ "inc/api.php"
880
+ ]
881
+ },
882
+ "notification-url": "https://packagist.org/downloads/",
883
+ "license": [
884
+ "MIT"
885
+ ],
886
+ "authors": [
887
+ {
888
+ "name": "Giuseppe Mazzapica",
889
+ "email": "giuseppe.mazzapica@gmail.com",
890
+ "homepage": "https://gmazzap.me",
891
+ "role": "Developer"
892
+ }
893
+ ],
894
+ "description": "Mocking utility for PHP functions and WordPress plugin API",
895
+ "keywords": [
896
+ "Monkey Patching",
897
+ "interception",
898
+ "mock",
899
+ "mock functions",
900
+ "mockery",
901
+ "patchwork",
902
+ "redefinition",
903
+ "runkit",
904
+ "test",
905
+ "testing"
906
+ ],
907
+ "time": "2019-07-26T19:00:28+00:00"
908
+ },
909
+ {
910
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
911
+ "version": "v0.5.0",
912
+ "source": {
913
+ "type": "git",
914
+ "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
915
+ "reference": "e749410375ff6fb7a040a68878c656c2e610b132"
916
+ },
917
+ "dist": {
918
+ "type": "zip",
919
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
920
+ "reference": "e749410375ff6fb7a040a68878c656c2e610b132",
921
+ "shasum": ""
922
+ },
923
+ "require": {
924
+ "composer-plugin-api": "^1.0",
925
+ "php": "^5.3|^7",
926
+ "squizlabs/php_codesniffer": "^2|^3"
927
+ },
928
+ "require-dev": {
929
+ "composer/composer": "*",
930
+ "phpcompatibility/php-compatibility": "^9.0",
931
+ "sensiolabs/security-checker": "^4.1.0"
932
+ },
933
+ "type": "composer-plugin",
934
+ "extra": {
935
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
936
+ },
937
+ "autoload": {
938
+ "psr-4": {
939
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
940
+ }
941
+ },
942
+ "notification-url": "https://packagist.org/downloads/",
943
+ "license": [
944
+ "MIT"
945
+ ],
946
+ "authors": [
947
+ {
948
+ "name": "Franck Nijhof",
949
+ "email": "franck.nijhof@dealerdirect.com",
950
+ "homepage": "http://www.frenck.nl",
951
+ "role": "Developer / IT Manager"
952
+ }
953
+ ],
954
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
955
+ "homepage": "http://www.dealerdirect.com",
956
+ "keywords": [
957
+ "PHPCodeSniffer",
958
+ "PHP_CodeSniffer",
959
+ "code quality",
960
+ "codesniffer",
961
+ "composer",
962
+ "installer",
963
+ "phpcs",
964
+ "plugin",
965
+ "qa",
966
+ "quality",
967
+ "standard",
968
+ "standards",
969
+ "style guide",
970
+ "stylecheck",
971
+ "tests"
972
+ ],
973
+ "time": "2018-10-26T13:21:45+00:00"
974
+ },
975
+ {
976
+ "name": "doctrine/instantiator",
977
+ "version": "1.0.5",
978
+ "source": {
979
+ "type": "git",
980
+ "url": "https://github.com/doctrine/instantiator.git",
981
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
982
+ },
983
+ "dist": {
984
+ "type": "zip",
985
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
986
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
987
+ "shasum": ""
988
+ },
989
+ "require": {
990
+ "php": ">=5.3,<8.0-DEV"
991
+ },
992
+ "require-dev": {
993
+ "athletic/athletic": "~0.1.8",
994
+ "ext-pdo": "*",
995
+ "ext-phar": "*",
996
+ "phpunit/phpunit": "~4.0",
997
+ "squizlabs/php_codesniffer": "~2.0"
998
+ },
999
+ "type": "library",
1000
+ "extra": {
1001
+ "branch-alias": {
1002
+ "dev-master": "1.0.x-dev"
1003
+ }
1004
+ },
1005
+ "autoload": {
1006
+ "psr-4": {
1007
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
1008
+ }
1009
+ },
1010
+ "notification-url": "https://packagist.org/downloads/",
1011
+ "license": [
1012
+ "MIT"
1013
+ ],
1014
+ "authors": [
1015
+ {
1016
+ "name": "Marco Pivetta",
1017
+ "email": "ocramius@gmail.com",
1018
+ "homepage": "http://ocramius.github.com/"
1019
+ }
1020
+ ],
1021
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
1022
+ "homepage": "https://github.com/doctrine/instantiator",
1023
+ "keywords": [
1024
+ "constructor",
1025
+ "instantiate"
1026
+ ],
1027
+ "time": "2015-06-14T21:17:01+00:00"
1028
+ },
1029
+ {
1030
+ "name": "hamcrest/hamcrest-php",
1031
+ "version": "v2.0.0",
1032
+ "source": {
1033
+ "type": "git",
1034
+ "url": "https://github.com/hamcrest/hamcrest-php.git",
1035
+ "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
1036
+ },
1037
+ "dist": {
1038
+ "type": "zip",
1039
+ "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
1040
+ "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
1041
+ "shasum": ""
1042
+ },
1043
+ "require": {
1044
+ "php": "^5.3|^7.0"
1045
+ },
1046
+ "replace": {
1047
+ "cordoval/hamcrest-php": "*",
1048
+ "davedevelopment/hamcrest-php": "*",
1049
+ "kodova/hamcrest-php": "*"
1050
+ },
1051
+ "require-dev": {
1052
+ "phpunit/php-file-iterator": "1.3.3",
1053
+ "phpunit/phpunit": "~4.0",
1054
+ "satooshi/php-coveralls": "^1.0"
1055
+ },
1056
+ "type": "library",
1057
+ "extra": {
1058
+ "branch-alias": {
1059
+ "dev-master": "2.0-dev"
1060
+ }
1061
+ },
1062
+ "autoload": {
1063
+ "classmap": [
1064
+ "hamcrest"
1065
+ ]
1066
+ },
1067
+ "notification-url": "https://packagist.org/downloads/",
1068
+ "license": [
1069
+ "BSD"
1070
+ ],
1071
+ "description": "This is the PHP port of Hamcrest Matchers",
1072
+ "keywords": [
1073
+ "test"
1074
+ ],
1075
+ "time": "2016-01-20T08:20:44+00:00"
1076
+ },
1077
+ {
1078
+ "name": "mockery/mockery",
1079
+ "version": "1.2.4",
1080
+ "source": {
1081
+ "type": "git",
1082
+ "url": "https://github.com/mockery/mockery.git",
1083
+ "reference": "b3453f75fd23d9fd41685f2148f4abeacabc6405"
1084
+ },
1085
+ "dist": {
1086
+ "type": "zip",
1087
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/b3453f75fd23d9fd41685f2148f4abeacabc6405",
1088
+ "reference": "b3453f75fd23d9fd41685f2148f4abeacabc6405",
1089
+ "shasum": ""
1090
+ },
1091
+ "require": {
1092
+ "hamcrest/hamcrest-php": "~2.0",
1093
+ "lib-pcre": ">=7.0",
1094
+ "php": ">=5.6.0"
1095
+ },
1096
+ "require-dev": {
1097
+ "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
1098
+ },
1099
+ "type": "library",
1100
+ "extra": {
1101
+ "branch-alias": {
1102
+ "dev-master": "1.2.x-dev"
1103
+ }
1104
+ },
1105
+ "autoload": {
1106
+ "psr-0": {
1107
+ "Mockery": "library/"
1108
+ }
1109
+ },
1110
+ "notification-url": "https://packagist.org/downloads/",
1111
+ "license": [
1112
+ "BSD-3-Clause"
1113
+ ],
1114
+ "authors": [
1115
+ {
1116
+ "name": "Pádraic Brady",
1117
+ "email": "padraic.brady@gmail.com",
1118
+ "homepage": "http://blog.astrumfutura.com"
1119
+ },
1120
+ {
1121
+ "name": "Dave Marshall",
1122
+ "email": "dave.marshall@atstsolutions.co.uk",
1123
+ "homepage": "http://davedevelopment.co.uk"
1124
+ }
1125
+ ],
1126
+ "description": "Mockery is a simple yet flexible PHP mock object framework",
1127
+ "homepage": "https://github.com/mockery/mockery",
1128
+ "keywords": [
1129
+ "BDD",
1130
+ "TDD",
1131
+ "library",
1132
+ "mock",
1133
+ "mock objects",
1134
+ "mockery",
1135
+ "stub",
1136
+ "test",
1137
+ "test double",
1138
+ "testing"
1139
+ ],
1140
+ "time": "2019-09-30T08:30:27+00:00"
1141
+ },
1142
+ {
1143
+ "name": "myclabs/deep-copy",
1144
+ "version": "1.7.0",
1145
+ "source": {
1146
+ "type": "git",
1147
+ "url": "https://github.com/myclabs/DeepCopy.git",
1148
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
1149
+ },
1150
+ "dist": {
1151
+ "type": "zip",
1152
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
1153
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
1154
+ "shasum": ""
1155
+ },
1156
+ "require": {
1157
+ "php": "^5.6 || ^7.0"
1158
+ },
1159
+ "require-dev": {
1160
+ "doctrine/collections": "^1.0",
1161
+ "doctrine/common": "^2.6",
1162
+ "phpunit/phpunit": "^4.1"
1163
+ },
1164
+ "type": "library",
1165
+ "autoload": {
1166
+ "psr-4": {
1167
+ "DeepCopy\\": "src/DeepCopy/"
1168
+ },
1169
+ "files": [
1170
+ "src/DeepCopy/deep_copy.php"
1171
+ ]
1172
+ },
1173
+ "notification-url": "https://packagist.org/downloads/",
1174
+ "license": [
1175
+ "MIT"
1176
+ ],
1177
+ "description": "Create deep copies (clones) of your objects",
1178
+ "keywords": [
1179
+ "clone",
1180
+ "copy",
1181
+ "duplicate",
1182
+ "object",
1183
+ "object graph"
1184
+ ],
1185
+ "time": "2017-10-19T19:58:43+00:00"
1186
+ },
1187
+ {
1188
+ "name": "phpdocumentor/reflection-common",
1189
+ "version": "1.0.1",
1190
+ "source": {
1191
+ "type": "git",
1192
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
1193
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
1194
+ },
1195
+ "dist": {
1196
+ "type": "zip",
1197
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
1198
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
1199
+ "shasum": ""
1200
+ },
1201
+ "require": {
1202
+ "php": ">=5.5"
1203
+ },
1204
+ "require-dev": {
1205
+ "phpunit/phpunit": "^4.6"
1206
+ },
1207
+ "type": "library",
1208
+ "extra": {
1209
+ "branch-alias": {
1210
+ "dev-master": "1.0.x-dev"
1211
+ }
1212
+ },
1213
+ "autoload": {
1214
+ "psr-4": {
1215
+ "phpDocumentor\\Reflection\\": [
1216
+ "src"
1217
+ ]
1218
+ }
1219
+ },
1220
+ "notification-url": "https://packagist.org/downloads/",
1221
+ "license": [
1222
+ "MIT"
1223
+ ],
1224
+ "authors": [
1225
+ {
1226
+ "name": "Jaap van Otterdijk",
1227
+ "email": "opensource@ijaap.nl"
1228
+ }
1229
+ ],
1230
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
1231
+ "homepage": "http://www.phpdoc.org",
1232
+ "keywords": [
1233
+ "FQSEN",
1234
+ "phpDocumentor",
1235
+ "phpdoc",
1236
+ "reflection",
1237
+ "static analysis"
1238
+ ],
1239
+ "time": "2017-09-11T18:02:19+00:00"
1240
+ },
1241
+ {
1242
+ "name": "phpdocumentor/reflection-docblock",
1243
+ "version": "3.3.2",
1244
+ "source": {
1245
+ "type": "git",
1246
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
1247
+ "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
1248
+ },
1249
+ "dist": {
1250
+ "type": "zip",
1251
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
1252
+ "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
1253
+ "shasum": ""
1254
+ },
1255
+ "require": {
1256
+ "php": "^5.6 || ^7.0",
1257
+ "phpdocumentor/reflection-common": "^1.0.0",
1258
+ "phpdocumentor/type-resolver": "^0.4.0",
1259
+ "webmozart/assert": "^1.0"
1260
+ },
1261
+ "require-dev": {
1262
+ "mockery/mockery": "^0.9.4",
1263
+ "phpunit/phpunit": "^4.4"
1264
+ },
1265
+ "type": "library",
1266
+ "autoload": {
1267
+ "psr-4": {
1268
+ "phpDocumentor\\Reflection\\": [
1269
+ "src/"
1270
+ ]
1271
+ }
1272
+ },
1273
+ "notification-url": "https://packagist.org/downloads/",
1274
+ "license": [
1275
+ "MIT"
1276
+ ],
1277
+ "authors": [
1278
+ {
1279
+ "name": "Mike van Riel",
1280
+ "email": "me@mikevanriel.com"
1281
+ }
1282
+ ],
1283
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
1284
+ "time": "2017-11-10T14:09:06+00:00"
1285
+ },
1286
+ {
1287
+ "name": "phpdocumentor/type-resolver",
1288
+ "version": "0.4.0",
1289
+ "source": {
1290
+ "type": "git",
1291
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
1292
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
1293
+ },
1294
+ "dist": {
1295
+ "type": "zip",
1296
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
1297
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
1298
+ "shasum": ""
1299
+ },
1300
+ "require": {
1301
+ "php": "^5.5 || ^7.0",
1302
+ "phpdocumentor/reflection-common": "^1.0"
1303
+ },
1304
+ "require-dev": {
1305
+ "mockery/mockery": "^0.9.4",
1306
+ "phpunit/phpunit": "^5.2||^4.8.24"
1307
+ },
1308
+ "type": "library",
1309
+ "extra": {
1310
+ "branch-alias": {
1311
+ "dev-master": "1.0.x-dev"
1312
+ }
1313
+ },
1314
+ "autoload": {
1315
+ "psr-4": {
1316
+ "phpDocumentor\\Reflection\\": [
1317
+ "src/"
1318
+ ]
1319
+ }
1320
+ },
1321
+ "notification-url": "https://packagist.org/downloads/",
1322
+ "license": [
1323
+ "MIT"
1324
+ ],
1325
+ "authors": [
1326
+ {
1327
+ "name": "Mike van Riel",
1328
+ "email": "me@mikevanriel.com"
1329
+ }
1330
+ ],
1331
+ "time": "2017-07-14T14:27:02+00:00"
1332
+ },
1333
+ {
1334
+ "name": "phpspec/prophecy",
1335
+ "version": "1.9.0",
1336
+ "source": {
1337
+ "type": "git",
1338
+ "url": "https://github.com/phpspec/prophecy.git",
1339
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
1340
+ },
1341
+ "dist": {
1342
+ "type": "zip",
1343
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
1344
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
1345
+ "shasum": ""
1346
+ },
1347
+ "require": {
1348
+ "doctrine/instantiator": "^1.0.2",
1349
+ "php": "^5.3|^7.0",
1350
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
1351
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
1352
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
1353
+ },
1354
+ "require-dev": {
1355
+ "phpspec/phpspec": "^2.5|^3.2",
1356
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
1357
+ },
1358
+ "type": "library",
1359
+ "extra": {
1360
+ "branch-alias": {
1361
+ "dev-master": "1.8.x-dev"
1362
+ }
1363
+ },
1364
+ "autoload": {
1365
+ "psr-4": {
1366
+ "Prophecy\\": "src/Prophecy"
1367
+ }
1368
+ },
1369
+ "notification-url": "https://packagist.org/downloads/",
1370
+ "license": [
1371
+ "MIT"
1372
+ ],
1373
+ "authors": [
1374
+ {
1375
+ "name": "Konstantin Kudryashov",
1376
+ "email": "ever.zet@gmail.com",
1377
+ "homepage": "http://everzet.com"
1378
+ },
1379
+ {
1380
+ "name": "Marcello Duarte",
1381
+ "email": "marcello.duarte@gmail.com"
1382
+ }
1383
+ ],
1384
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
1385
+ "homepage": "https://github.com/phpspec/prophecy",
1386
+ "keywords": [
1387
+ "Double",
1388
+ "Dummy",
1389
+ "fake",
1390
+ "mock",
1391
+ "spy",
1392
+ "stub"
1393
+ ],
1394
+ "time": "2019-10-03T11:07:50+00:00"
1395
+ },
1396
+ {
1397
+ "name": "phpunit/php-code-coverage",
1398
+ "version": "4.0.8",
1399
+ "source": {
1400
+ "type": "git",
1401
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
1402
+ "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d"
1403
+ },
1404
+ "dist": {
1405
+ "type": "zip",
1406
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
1407
+ "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
1408
+ "shasum": ""
1409
+ },
1410
+ "require": {
1411
+ "ext-dom": "*",
1412
+ "ext-xmlwriter": "*",
1413
+ "php": "^5.6 || ^7.0",
1414
+ "phpunit/php-file-iterator": "^1.3",
1415
+ "phpunit/php-text-template": "^1.2",
1416
+ "phpunit/php-token-stream": "^1.4.2 || ^2.0",
1417
+ "sebastian/code-unit-reverse-lookup": "^1.0",
1418
+ "sebastian/environment": "^1.3.2 || ^2.0",
1419
+ "sebastian/version": "^1.0 || ^2.0"
1420
+ },
1421
+ "require-dev": {
1422
+ "ext-xdebug": "^2.1.4",
1423
+ "phpunit/phpunit": "^5.7"
1424
+ },
1425
+ "suggest": {
1426
+ "ext-xdebug": "^2.5.1"
1427
+ },
1428
+ "type": "library",
1429
+ "extra": {
1430
+ "branch-alias": {
1431
+ "dev-master": "4.0.x-dev"
1432
+ }
1433
+ },
1434
+ "autoload": {
1435
+ "classmap": [
1436
+ "src/"
1437
+ ]
1438
+ },
1439
+ "notification-url": "https://packagist.org/downloads/",
1440
+ "license": [
1441
+ "BSD-3-Clause"
1442
+ ],
1443
+ "authors": [
1444
+ {
1445
+ "name": "Sebastian Bergmann",
1446
+ "email": "sb@sebastian-bergmann.de",
1447
+ "role": "lead"
1448
+ }
1449
+ ],
1450
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
1451
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
1452
+ "keywords": [
1453
+ "coverage",
1454
+ "testing",
1455
+ "xunit"
1456
+ ],
1457
+ "time": "2017-04-02T07:44:40+00:00"
1458
+ },
1459
+ {
1460
+ "name": "phpunit/php-file-iterator",
1461
+ "version": "1.4.5",
1462
+ "source": {
1463
+ "type": "git",
1464
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
1465
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
1466
+ },
1467
+ "dist": {
1468
+ "type": "zip",
1469
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
1470
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
1471
+ "shasum": ""
1472
+ },
1473
+ "require": {
1474
+ "php": ">=5.3.3"
1475
+ },
1476
+ "type": "library",
1477
+ "extra": {
1478
+ "branch-alias": {
1479
+ "dev-master": "1.4.x-dev"
1480
+ }
1481
+ },
1482
+ "autoload": {
1483
+ "classmap": [
1484
+ "src/"
1485
+ ]
1486
+ },
1487
+ "notification-url": "https://packagist.org/downloads/",
1488
+ "license": [
1489
+ "BSD-3-Clause"
1490
+ ],
1491
+ "authors": [
1492
+ {
1493
+ "name": "Sebastian Bergmann",
1494
+ "email": "sb@sebastian-bergmann.de",
1495
+ "role": "lead"
1496
+ }
1497
+ ],
1498
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
1499
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
1500
+ "keywords": [
1501
+ "filesystem",
1502
+ "iterator"
1503
+ ],
1504
+ "time": "2017-11-27T13:52:08+00:00"
1505
+ },
1506
+ {
1507
+ "name": "phpunit/php-text-template",
1508
+ "version": "1.2.1",
1509
+ "source": {
1510
+ "type": "git",
1511
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
1512
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
1513
+ },
1514
+ "dist": {
1515
+ "type": "zip",
1516
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1517
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1518
+ "shasum": ""
1519
+ },
1520
+ "require": {
1521
+ "php": ">=5.3.3"
1522
+ },
1523
+ "type": "library",
1524
+ "autoload": {
1525
+ "classmap": [
1526
+ "src/"
1527
+ ]
1528
+ },
1529
+ "notification-url": "https://packagist.org/downloads/",
1530
+ "license": [
1531
+ "BSD-3-Clause"
1532
+ ],
1533
+ "authors": [
1534
+ {
1535
+ "name": "Sebastian Bergmann",
1536
+ "email": "sebastian@phpunit.de",
1537
+ "role": "lead"
1538
+ }
1539
+ ],
1540
+ "description": "Simple template engine.",
1541
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
1542
+ "keywords": [
1543
+ "template"
1544
+ ],
1545
+ "time": "2015-06-21T13:50:34+00:00"
1546
+ },
1547
+ {
1548
+ "name": "phpunit/php-timer",
1549
+ "version": "1.0.9",
1550
+ "source": {
1551
+ "type": "git",
1552
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
1553
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
1554
+ },
1555
+ "dist": {
1556
+ "type": "zip",
1557
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1558
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1559
+ "shasum": ""
1560
+ },
1561
+ "require": {
1562
+ "php": "^5.3.3 || ^7.0"
1563
+ },
1564
+ "require-dev": {
1565
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1566
+ },
1567
+ "type": "library",
1568
+ "extra": {
1569
+ "branch-alias": {
1570
+ "dev-master": "1.0-dev"
1571
+ }
1572
+ },
1573
+ "autoload": {
1574
+ "classmap": [
1575
+ "src/"
1576
+ ]
1577
+ },
1578
+ "notification-url": "https://packagist.org/downloads/",
1579
+ "license": [
1580
+ "BSD-3-Clause"
1581
+ ],
1582
+ "authors": [
1583
+ {
1584
+ "name": "Sebastian Bergmann",
1585
+ "email": "sb@sebastian-bergmann.de",
1586
+ "role": "lead"
1587
+ }
1588
+ ],
1589
+ "description": "Utility class for timing",
1590
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
1591
+ "keywords": [
1592
+ "timer"
1593
+ ],
1594
+ "time": "2017-02-26T11:10:40+00:00"
1595
+ },
1596
+ {
1597
+ "name": "phpunit/php-token-stream",
1598
+ "version": "1.4.12",
1599
+ "source": {
1600
+ "type": "git",
1601
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
1602
+ "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
1603
+ },
1604
+ "dist": {
1605
+ "type": "zip",
1606
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
1607
+ "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
1608
+ "shasum": ""
1609
+ },
1610
+ "require": {
1611
+ "ext-tokenizer": "*",
1612
+ "php": ">=5.3.3"
1613
+ },
1614
+ "require-dev": {
1615
+ "phpunit/phpunit": "~4.2"
1616
+ },
1617
+ "type": "library",
1618
+ "extra": {
1619
+ "branch-alias": {
1620
+ "dev-master": "1.4-dev"
1621
+ }
1622
+ },
1623
+ "autoload": {
1624
+ "classmap": [
1625
+ "src/"
1626
+ ]
1627
+ },
1628
+ "notification-url": "https://packagist.org/downloads/",
1629
+ "license": [
1630
+ "BSD-3-Clause"
1631
+ ],
1632
+ "authors": [
1633
+ {
1634
+ "name": "Sebastian Bergmann",
1635
+ "email": "sebastian@phpunit.de"
1636
+ }
1637
+ ],
1638
+ "description": "Wrapper around PHP's tokenizer extension.",
1639
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
1640
+ "keywords": [
1641
+ "tokenizer"
1642
+ ],
1643
+ "time": "2017-12-04T08:55:13+00:00"
1644
+ },
1645
+ {
1646
+ "name": "phpunit/phpunit",
1647
+ "version": "5.7.27",
1648
+ "source": {
1649
+ "type": "git",
1650
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
1651
+ "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c"
1652
+ },
1653
+ "dist": {
1654
+ "type": "zip",
1655
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
1656
+ "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
1657
+ "shasum": ""
1658
+ },
1659
+ "require": {
1660
+ "ext-dom": "*",
1661
+ "ext-json": "*",
1662
+ "ext-libxml": "*",
1663
+ "ext-mbstring": "*",
1664
+ "ext-xml": "*",
1665
+ "myclabs/deep-copy": "~1.3",
1666
+ "php": "^5.6 || ^7.0",
1667
+ "phpspec/prophecy": "^1.6.2",
1668
+ "phpunit/php-code-coverage": "^4.0.4",
1669
+ "phpunit/php-file-iterator": "~1.4",
1670
+ "phpunit/php-text-template": "~1.2",
1671
+ "phpunit/php-timer": "^1.0.6",
1672
+ "phpunit/phpunit-mock-objects": "^3.2",
1673
+ "sebastian/comparator": "^1.2.4",
1674
+ "sebastian/diff": "^1.4.3",
1675
+ "sebastian/environment": "^1.3.4 || ^2.0",
1676
+ "sebastian/exporter": "~2.0",
1677
+ "sebastian/global-state": "^1.1",
1678
+ "sebastian/object-enumerator": "~2.0",
1679
+ "sebastian/resource-operations": "~1.0",
1680
+ "sebastian/version": "^1.0.6|^2.0.1",
1681
+ "symfony/yaml": "~2.1|~3.0|~4.0"
1682
+ },
1683
+ "conflict": {
1684
+ "phpdocumentor/reflection-docblock": "3.0.2"
1685
+ },
1686
+ "require-dev": {
1687
+ "ext-pdo": "*"
1688
+ },
1689
+ "suggest": {
1690
+ "ext-xdebug": "*",
1691
+ "phpunit/php-invoker": "~1.1"
1692
+ },
1693
+ "bin": [
1694
+ "phpunit"
1695
+ ],
1696
+ "type": "library",
1697
+ "extra": {
1698
+ "branch-alias": {
1699
+ "dev-master": "5.7.x-dev"
1700
+ }
1701
+ },
1702
+ "autoload": {
1703
+ "classmap": [
1704
+ "src/"
1705
+ ]
1706
+ },
1707
+ "notification-url": "https://packagist.org/downloads/",
1708
+ "license": [
1709
+ "BSD-3-Clause"
1710
+ ],
1711
+ "authors": [
1712
+ {
1713
+ "name": "Sebastian Bergmann",
1714
+ "email": "sebastian@phpunit.de",
1715
+ "role": "lead"
1716
+ }
1717
+ ],
1718
+ "description": "The PHP Unit Testing framework.",
1719
+ "homepage": "https://phpunit.de/",
1720
+ "keywords": [
1721
+ "phpunit",
1722
+ "testing",
1723
+ "xunit"
1724
+ ],
1725
+ "time": "2018-02-01T05:50:59+00:00"
1726
+ },
1727
+ {
1728
+ "name": "phpunit/phpunit-mock-objects",
1729
+ "version": "3.4.4",
1730
+ "source": {
1731
+ "type": "git",
1732
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
1733
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118"
1734
+ },
1735
+ "dist": {
1736
+ "type": "zip",
1737
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118",
1738
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118",
1739
+ "shasum": ""
1740
+ },
1741
+ "require": {
1742
+ "doctrine/instantiator": "^1.0.2",
1743
+ "php": "^5.6 || ^7.0",
1744
+ "phpunit/php-text-template": "^1.2",
1745
+ "sebastian/exporter": "^1.2 || ^2.0"
1746
+ },
1747
+ "conflict": {
1748
+ "phpunit/phpunit": "<5.4.0"
1749
+ },
1750
+ "require-dev": {
1751
+ "phpunit/phpunit": "^5.4"
1752
+ },
1753
+ "suggest": {
1754
+ "ext-soap": "*"
1755
+ },
1756
+ "type": "library",
1757
+ "extra": {
1758
+ "branch-alias": {
1759
+ "dev-master": "3.2.x-dev"
1760
+ }
1761
+ },
1762
+ "autoload": {
1763
+ "classmap": [
1764
+ "src/"
1765
+ ]
1766
+ },
1767
+ "notification-url": "https://packagist.org/downloads/",
1768
+ "license": [
1769
+ "BSD-3-Clause"
1770
+ ],
1771
+ "authors": [
1772
+ {
1773
+ "name": "Sebastian Bergmann",
1774
+ "email": "sb@sebastian-bergmann.de",
1775
+ "role": "lead"
1776
+ }
1777
+ ],
1778
+ "description": "Mock Object library for PHPUnit",
1779
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
1780
+ "keywords": [
1781
+ "mock",
1782
+ "xunit"
1783
+ ],
1784
+ "abandoned": true,
1785
+ "time": "2017-06-30T09:13:00+00:00"
1786
+ },
1787
+ {
1788
+ "name": "sebastian/code-unit-reverse-lookup",
1789
+ "version": "1.0.1",
1790
+ "source": {
1791
+ "type": "git",
1792
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1793
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
1794
+ },
1795
+ "dist": {
1796
+ "type": "zip",
1797
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1798
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1799
+ "shasum": ""
1800
+ },
1801
+ "require": {
1802
+ "php": "^5.6 || ^7.0"
1803
+ },
1804
+ "require-dev": {
1805
+ "phpunit/phpunit": "^5.7 || ^6.0"
1806
+ },
1807
+ "type": "library",
1808
+ "extra": {
1809
+ "branch-alias": {
1810
+ "dev-master": "1.0.x-dev"
1811
+ }
1812
+ },
1813
+ "autoload": {
1814
+ "classmap": [
1815
+ "src/"
1816
+ ]
1817
+ },
1818
+ "notification-url": "https://packagist.org/downloads/",
1819
+ "license": [
1820
+ "BSD-3-Clause"
1821
+ ],
1822
+ "authors": [
1823
+ {
1824
+ "name": "Sebastian Bergmann",
1825
+ "email": "sebastian@phpunit.de"
1826
+ }
1827
+ ],
1828
+ "description": "Looks up which function or method a line of code belongs to",
1829
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
1830
+ "time": "2017-03-04T06:30:41+00:00"
1831
+ },
1832
+ {
1833
+ "name": "sebastian/comparator",
1834
+ "version": "1.2.4",
1835
+ "source": {
1836
+ "type": "git",
1837
+ "url": "https://github.com/sebastianbergmann/comparator.git",
1838
+ "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
1839
+ },
1840
+ "dist": {
1841
+ "type": "zip",
1842
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1843
+ "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1844
+ "shasum": ""
1845
+ },
1846
+ "require": {
1847
+ "php": ">=5.3.3",
1848
+ "sebastian/diff": "~1.2",
1849
+ "sebastian/exporter": "~1.2 || ~2.0"
1850
+ },
1851
+ "require-dev": {
1852
+ "phpunit/phpunit": "~4.4"
1853
+ },
1854
+ "type": "library",
1855
+ "extra": {
1856
+ "branch-alias": {
1857
+ "dev-master": "1.2.x-dev"
1858
+ }
1859
+ },
1860
+ "autoload": {
1861
+ "classmap": [
1862
+ "src/"
1863
+ ]
1864
+ },
1865
+ "notification-url": "https://packagist.org/downloads/",
1866
+ "license": [
1867
+ "BSD-3-Clause"
1868
+ ],
1869
+ "authors": [
1870
+ {
1871
+ "name": "Jeff Welch",
1872
+ "email": "whatthejeff@gmail.com"
1873
+ },
1874
+ {
1875
+ "name": "Volker Dusch",
1876
+ "email": "github@wallbash.com"
1877
+ },
1878
+ {
1879
+ "name": "Bernhard Schussek",
1880
+ "email": "bschussek@2bepublished.at"
1881
+ },
1882
+ {
1883
+ "name": "Sebastian Bergmann",
1884
+ "email": "sebastian@phpunit.de"
1885
+ }
1886
+ ],
1887
+ "description": "Provides the functionality to compare PHP values for equality",
1888
+ "homepage": "http://www.github.com/sebastianbergmann/comparator",
1889
+ "keywords": [
1890
+ "comparator",
1891
+ "compare",
1892
+ "equality"
1893
+ ],
1894
+ "time": "2017-01-29T09:50:25+00:00"
1895
+ },
1896
+ {
1897
+ "name": "sebastian/diff",
1898
+ "version": "1.4.3",
1899
+ "source": {
1900
+ "type": "git",
1901
+ "url": "https://github.com/sebastianbergmann/diff.git",
1902
+ "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
1903
+ },
1904
+ "dist": {
1905
+ "type": "zip",
1906
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1907
+ "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1908
+ "shasum": ""
1909
+ },
1910
+ "require": {
1911
+ "php": "^5.3.3 || ^7.0"
1912
+ },
1913
+ "require-dev": {
1914
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1915
+ },
1916
+ "type": "library",
1917
+ "extra": {
1918
+ "branch-alias": {
1919
+ "dev-master": "1.4-dev"
1920
+ }
1921
+ },
1922
+ "autoload": {
1923
+ "classmap": [
1924
+ "src/"
1925
+ ]
1926
+ },
1927
+ "notification-url": "https://packagist.org/downloads/",
1928
+ "license": [
1929
+ "BSD-3-Clause"
1930
+ ],
1931
+ "authors": [
1932
+ {
1933
+ "name": "Kore Nordmann",
1934
+ "email": "mail@kore-nordmann.de"
1935
+ },
1936
+ {
1937
+ "name": "Sebastian Bergmann",
1938
+ "email": "sebastian@phpunit.de"
1939
+ }
1940
+ ],
1941
+ "description": "Diff implementation",
1942
+ "homepage": "https://github.com/sebastianbergmann/diff",
1943
+ "keywords": [
1944
+ "diff"
1945
+ ],
1946
+ "time": "2017-05-22T07:24:03+00:00"
1947
+ },
1948
+ {
1949
+ "name": "sebastian/environment",
1950
+ "version": "2.0.0",
1951
+ "source": {
1952
+ "type": "git",
1953
+ "url": "https://github.com/sebastianbergmann/environment.git",
1954
+ "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
1955
+ },
1956
+ "dist": {
1957
+ "type": "zip",
1958
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
1959
+ "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
1960
+ "shasum": ""
1961
+ },
1962
+ "require": {
1963
+ "php": "^5.6 || ^7.0"
1964
+ },
1965
+ "require-dev": {
1966
+ "phpunit/phpunit": "^5.0"
1967
+ },
1968
+ "type": "library",
1969
+ "extra": {
1970
+ "branch-alias": {
1971
+ "dev-master": "2.0.x-dev"
1972
+ }
1973
+ },
1974
+ "autoload": {
1975
+ "classmap": [
1976
+ "src/"
1977
+ ]
1978
+ },
1979
+ "notification-url": "https://packagist.org/downloads/",
1980
+ "license": [
1981
+ "BSD-3-Clause"
1982
+ ],
1983
+ "authors": [
1984
+ {
1985
+ "name": "Sebastian Bergmann",
1986
+ "email": "sebastian@phpunit.de"
1987
+ }
1988
+ ],
1989
+ "description": "Provides functionality to handle HHVM/PHP environments",
1990
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
1991
+ "keywords": [
1992
+ "Xdebug",
1993
+ "environment",
1994
+ "hhvm"
1995
+ ],
1996
+ "time": "2016-11-26T07:53:53+00:00"
1997
+ },
1998
+ {
1999
+ "name": "sebastian/exporter",
2000
+ "version": "2.0.0",
2001
+ "source": {
2002
+ "type": "git",
2003
+ "url": "https://github.com/sebastianbergmann/exporter.git",
2004
+ "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
2005
+ },
2006
+ "dist": {
2007
+ "type": "zip",
2008
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
2009
+ "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
2010
+ "shasum": ""
2011
+ },
2012
+ "require": {
2013
+ "php": ">=5.3.3",
2014
+ "sebastian/recursion-context": "~2.0"
2015
+ },
2016
+ "require-dev": {
2017
+ "ext-mbstring": "*",
2018
+ "phpunit/phpunit": "~4.4"
2019
+ },
2020
+ "type": "library",
2021
+ "extra": {
2022
+ "branch-alias": {
2023
+ "dev-master": "2.0.x-dev"
2024
+ }
2025
+ },
2026
+ "autoload": {
2027
+ "classmap": [
2028
+ "src/"
2029
+ ]
2030
+ },
2031
+ "notification-url": "https://packagist.org/downloads/",
2032
+ "license": [
2033
+ "BSD-3-Clause"
2034
+ ],
2035
+ "authors": [
2036
+ {
2037
+ "name": "Jeff Welch",
2038
+ "email": "whatthejeff@gmail.com"
2039
+ },
2040
+ {
2041
+ "name": "Volker Dusch",
2042
+ "email": "github@wallbash.com"
2043
+ },
2044
+ {
2045
+ "name": "Bernhard Schussek",
2046
+ "email": "bschussek@2bepublished.at"
2047
+ },
2048
+ {
2049
+ "name": "Sebastian Bergmann",
2050
+ "email": "sebastian@phpunit.de"
2051
+ },
2052
+ {
2053
+ "name": "Adam Harvey",
2054
+ "email": "aharvey@php.net"
2055
+ }
2056
+ ],
2057
+ "description": "Provides the functionality to export PHP variables for visualization",
2058
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
2059
+ "keywords": [
2060
+ "export",
2061
+ "exporter"
2062
+ ],
2063
+ "time": "2016-11-19T08:54:04+00:00"
2064
+ },
2065
+ {
2066
+ "name": "sebastian/global-state",
2067
+ "version": "1.1.1",
2068
+ "source": {
2069
+ "type": "git",
2070
+ "url": "https://github.com/sebastianbergmann/global-state.git",
2071
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
2072
+ },
2073
+ "dist": {
2074
+ "type": "zip",
2075
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
2076
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
2077
+ "shasum": ""
2078
+ },
2079
+ "require": {
2080
+ "php": ">=5.3.3"
2081
+ },
2082
+ "require-dev": {
2083
+ "phpunit/phpunit": "~4.2"
2084
+ },
2085
+ "suggest": {
2086
+ "ext-uopz": "*"
2087
+ },
2088
+ "type": "library",
2089
+ "extra": {
2090
+ "branch-alias": {
2091
+ "dev-master": "1.0-dev"
2092
+ }
2093
+ },
2094
+ "autoload": {
2095
+ "classmap": [
2096
+ "src/"
2097
+ ]
2098
+ },
2099
+ "notification-url": "https://packagist.org/downloads/",
2100
+ "license": [
2101
+ "BSD-3-Clause"
2102
+ ],
2103
+ "authors": [
2104
+ {
2105
+ "name": "Sebastian Bergmann",
2106
+ "email": "sebastian@phpunit.de"
2107
+ }
2108
+ ],
2109
+ "description": "Snapshotting of global state",
2110
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
2111
+ "keywords": [
2112
+ "global state"
2113
+ ],
2114
+ "time": "2015-10-12T03:26:01+00:00"
2115
+ },
2116
+ {
2117
+ "name": "sebastian/object-enumerator",
2118
+ "version": "2.0.1",
2119
+ "source": {
2120
+ "type": "git",
2121
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
2122
+ "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
2123
+ },
2124
+ "dist": {
2125
+ "type": "zip",
2126
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
2127
+ "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
2128
+ "shasum": ""
2129
+ },
2130
+ "require": {
2131
+ "php": ">=5.6",
2132
+ "sebastian/recursion-context": "~2.0"
2133
+ },
2134
+ "require-dev": {
2135
+ "phpunit/phpunit": "~5"
2136
+ },
2137
+ "type": "library",
2138
+ "extra": {
2139
+ "branch-alias": {
2140
+ "dev-master": "2.0.x-dev"
2141
+ }
2142
+ },
2143
+ "autoload": {
2144
+ "classmap": [
2145
+ "src/"
2146
+ ]
2147
+ },
2148
+ "notification-url": "https://packagist.org/downloads/",
2149
+ "license": [
2150
+ "BSD-3-Clause"
2151
+ ],
2152
+ "authors": [
2153
+ {
2154
+ "name": "Sebastian Bergmann",
2155
+ "email": "sebastian@phpunit.de"
2156
+ }
2157
+ ],
2158
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
2159
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
2160
+ "time": "2017-02-18T15:18:39+00:00"
2161
+ },
2162
+ {
2163
+ "name": "sebastian/recursion-context",
2164
+ "version": "2.0.0",
2165
+ "source": {
2166
+ "type": "git",
2167
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
2168
+ "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
2169
+ },
2170
+ "dist": {
2171
+ "type": "zip",
2172
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
2173
+ "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
2174
+ "shasum": ""
2175
+ },
2176
+ "require": {
2177
+ "php": ">=5.3.3"
2178
+ },
2179
+ "require-dev": {
2180
+ "phpunit/phpunit": "~4.4"
2181
+ },
2182
+ "type": "library",
2183
+ "extra": {
2184
+ "branch-alias": {
2185
+ "dev-master": "2.0.x-dev"
2186
+ }
2187
+ },
2188
+ "autoload": {
2189
+ "classmap": [
2190
+ "src/"
2191
+ ]
2192
+ },
2193
+ "notification-url": "https://packagist.org/downloads/",
2194
+ "license": [
2195
+ "BSD-3-Clause"
2196
+ ],
2197
+ "authors": [
2198
+ {
2199
+ "name": "Jeff Welch",
2200
+ "email": "whatthejeff@gmail.com"
2201
+ },
2202
+ {
2203
+ "name": "Sebastian Bergmann",
2204
+ "email": "sebastian@phpunit.de"
2205
+ },
2206
+ {
2207
+ "name": "Adam Harvey",
2208
+ "email": "aharvey@php.net"
2209
+ }
2210
+ ],
2211
+ "description": "Provides functionality to recursively process PHP variables",
2212
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
2213
+ "time": "2016-11-19T07:33:16+00:00"
2214
+ },
2215
+ {
2216
+ "name": "sebastian/resource-operations",
2217
+ "version": "1.0.0",
2218
+ "source": {
2219
+ "type": "git",
2220
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
2221
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
2222
+ },
2223
+ "dist": {
2224
+ "type": "zip",
2225
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
2226
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
2227
+ "shasum": ""
2228
+ },
2229
+ "require": {
2230
+ "php": ">=5.6.0"
2231
+ },
2232
+ "type": "library",
2233
+ "extra": {
2234
+ "branch-alias": {
2235
+ "dev-master": "1.0.x-dev"
2236
+ }
2237
+ },
2238
+ "autoload": {
2239
+ "classmap": [
2240
+ "src/"
2241
+ ]
2242
+ },
2243
+ "notification-url": "https://packagist.org/downloads/",
2244
+ "license": [
2245
+ "BSD-3-Clause"
2246
+ ],
2247
+ "authors": [
2248
+ {
2249
+ "name": "Sebastian Bergmann",
2250
+ "email": "sebastian@phpunit.de"
2251
+ }
2252
+ ],
2253
+ "description": "Provides a list of PHP built-in functions that operate on resources",
2254
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
2255
+ "time": "2015-07-28T20:34:47+00:00"
2256
+ },
2257
+ {
2258
+ "name": "sebastian/version",
2259
+ "version": "2.0.1",
2260
+ "source": {
2261
+ "type": "git",
2262
+ "url": "https://github.com/sebastianbergmann/version.git",
2263
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
2264
+ },
2265
+ "dist": {
2266
+ "type": "zip",
2267
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
2268
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
2269
+ "shasum": ""
2270
+ },
2271
+ "require": {
2272
+ "php": ">=5.6"
2273
+ },
2274
+ "type": "library",
2275
+ "extra": {
2276
+ "branch-alias": {
2277
+ "dev-master": "2.0.x-dev"
2278
+ }
2279
+ },
2280
+ "autoload": {
2281
+ "classmap": [
2282
+ "src/"
2283
+ ]
2284
+ },
2285
+ "notification-url": "https://packagist.org/downloads/",
2286
+ "license": [
2287
+ "BSD-3-Clause"
2288
+ ],
2289
+ "authors": [
2290
+ {
2291
+ "name": "Sebastian Bergmann",
2292
+ "email": "sebastian@phpunit.de",
2293
+ "role": "lead"
2294
+ }
2295
+ ],
2296
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
2297
+ "homepage": "https://github.com/sebastianbergmann/version",
2298
+ "time": "2016-10-03T07:35:21+00:00"
2299
+ },
2300
+ {
2301
+ "name": "squizlabs/php_codesniffer",
2302
+ "version": "3.5.2",
2303
+ "source": {
2304
+ "type": "git",
2305
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
2306
+ "reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7"
2307
+ },
2308
+ "dist": {
2309
+ "type": "zip",
2310
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/65b12cdeaaa6cd276d4c3033a95b9b88b12701e7",
2311
+ "reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7",
2312
+ "shasum": ""
2313
+ },
2314
+ "require": {
2315
+ "ext-simplexml": "*",
2316
+ "ext-tokenizer": "*",
2317
+ "ext-xmlwriter": "*",
2318
+ "php": ">=5.4.0"
2319
+ },
2320
+ "require-dev": {
2321
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2322
+ },
2323
+ "bin": [
2324
+ "bin/phpcs",
2325
+ "bin/phpcbf"
2326
+ ],
2327
+ "type": "library",
2328
+ "extra": {
2329
+ "branch-alias": {
2330
+ "dev-master": "3.x-dev"
2331
+ }
2332
+ },
2333
+ "notification-url": "https://packagist.org/downloads/",
2334
+ "license": [
2335
+ "BSD-3-Clause"
2336
+ ],
2337
+ "authors": [
2338
+ {
2339
+ "name": "Greg Sherwood",
2340
+ "role": "lead"
2341
+ }
2342
+ ],
2343
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
2344
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
2345
+ "keywords": [
2346
+ "phpcs",
2347
+ "standards"
2348
+ ],
2349
+ "time": "2019-10-28T04:36:32+00:00"
2350
+ },
2351
+ {
2352
+ "name": "symfony/yaml",
2353
+ "version": "v3.4.35",
2354
+ "source": {
2355
+ "type": "git",
2356
+ "url": "https://github.com/symfony/yaml.git",
2357
+ "reference": "dab657db15207879217fc81df4f875947bf68804"
2358
+ },
2359
+ "dist": {
2360
+ "type": "zip",
2361
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/dab657db15207879217fc81df4f875947bf68804",
2362
+ "reference": "dab657db15207879217fc81df4f875947bf68804",
2363
+ "shasum": ""
2364
+ },
2365
+ "require": {
2366
+ "php": "^5.5.9|>=7.0.8",
2367
+ "symfony/polyfill-ctype": "~1.8"
2368
+ },
2369
+ "conflict": {
2370
+ "symfony/console": "<3.4"
2371
+ },
2372
+ "require-dev": {
2373
+ "symfony/console": "~3.4|~4.0"
2374
+ },
2375
+ "suggest": {
2376
+ "symfony/console": "For validating YAML files using the lint command"
2377
+ },
2378
+ "type": "library",
2379
+ "extra": {
2380
+ "branch-alias": {
2381
+ "dev-master": "3.4-dev"
2382
+ }
2383
+ },
2384
+ "autoload": {
2385
+ "psr-4": {
2386
+ "Symfony\\Component\\Yaml\\": ""
2387
+ },
2388
+ "exclude-from-classmap": [
2389
+ "/Tests/"
2390
+ ]
2391
+ },
2392
+ "notification-url": "https://packagist.org/downloads/",
2393
+ "license": [
2394
+ "MIT"
2395
+ ],
2396
+ "authors": [
2397
+ {
2398
+ "name": "Fabien Potencier",
2399
+ "email": "fabien@symfony.com"
2400
+ },
2401
+ {
2402
+ "name": "Symfony Community",
2403
+ "homepage": "https://symfony.com/contributors"
2404
+ }
2405
+ ],
2406
+ "description": "Symfony Yaml Component",
2407
+ "homepage": "https://symfony.com",
2408
+ "time": "2019-10-24T15:33:53+00:00"
2409
+ },
2410
+ {
2411
+ "name": "webmozart/assert",
2412
+ "version": "1.5.0",
2413
+ "source": {
2414
+ "type": "git",
2415
+ "url": "https://github.com/webmozart/assert.git",
2416
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
2417
+ },
2418
+ "dist": {
2419
+ "type": "zip",
2420
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
2421
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
2422
+ "shasum": ""
2423
+ },
2424
+ "require": {
2425
+ "php": "^5.3.3 || ^7.0",
2426
+ "symfony/polyfill-ctype": "^1.8"
2427
+ },
2428
+ "require-dev": {
2429
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
2430
+ },
2431
+ "type": "library",
2432
+ "extra": {
2433
+ "branch-alias": {
2434
+ "dev-master": "1.3-dev"
2435
+ }
2436
+ },
2437
+ "autoload": {
2438
+ "psr-4": {
2439
+ "Webmozart\\Assert\\": "src/"
2440
+ }
2441
+ },
2442
+ "notification-url": "https://packagist.org/downloads/",
2443
+ "license": [
2444
+ "MIT"
2445
+ ],
2446
+ "authors": [
2447
+ {
2448
+ "name": "Bernhard Schussek",
2449
+ "email": "bschussek@gmail.com"
2450
+ }
2451
+ ],
2452
+ "description": "Assertions to validate method input/output with nice error messages.",
2453
+ "keywords": [
2454
+ "assert",
2455
+ "check",
2456
+ "validate"
2457
+ ],
2458
+ "time": "2019-08-24T08:43:50+00:00"
2459
+ },
2460
+ {
2461
+ "name": "wp-coding-standards/wpcs",
2462
+ "version": "2.2.0",
2463
+ "source": {
2464
+ "type": "git",
2465
+ "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
2466
+ "reference": "f90e8692ce97b693633db7ab20bfa78d930f536a"
2467
+ },
2468
+ "dist": {
2469
+ "type": "zip",
2470
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/f90e8692ce97b693633db7ab20bfa78d930f536a",
2471
+ "reference": "f90e8692ce97b693633db7ab20bfa78d930f536a",
2472
+ "shasum": ""
2473
+ },
2474
+ "require": {
2475
+ "php": ">=5.4",
2476
+ "squizlabs/php_codesniffer": "^3.3.1"
2477
+ },
2478
+ "require-dev": {
2479
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
2480
+ "phpcompatibility/php-compatibility": "^9.0",
2481
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2482
+ },
2483
+ "suggest": {
2484
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
2485
+ },
2486
+ "type": "phpcodesniffer-standard",
2487
+ "notification-url": "https://packagist.org/downloads/",
2488
+ "license": [
2489
+ "MIT"
2490
+ ],
2491
+ "authors": [
2492
+ {
2493
+ "name": "Contributors",
2494
+ "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
2495
+ }
2496
+ ],
2497
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
2498
+ "keywords": [
2499
+ "phpcs",
2500
+ "standards",
2501
+ "wordpress"
2502
+ ],
2503
+ "time": "2019-11-11T12:34:03+00:00"
2504
+ }
2505
+ ],
2506
+ "aliases": [],
2507
+ "minimum-stability": "stable",
2508
+ "stability-flags": [],
2509
+ "prefer-stable": false,
2510
+ "prefer-lowest": false,
2511
+ "platform": {
2512
+ "ext-json": "^1.2",
2513
+ "ext-curl": "*"
2514
+ },
2515
+ "platform-dev": []
2516
+ }
languages/wp-live-chat-software-for-wordpress.pot CHANGED
@@ -1,158 +1,156 @@
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
- "Project-Id-Version: wp-live-chat-software-for-wordpress\n"
5
- "POT-Creation-Date: 2019-09-05 11:54+0200\n"
6
- "PO-Revision-Date: 2018-10-17 01:07+0200\n"
 
7
  "Last-Translator: \n"
8
- "Language-Team: LiveChat, Inc <apps@livechatinc.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.3\n"
13
- "X-Poedit-Basepath: .\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "Language: en\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e\n"
18
- "X-Poedit-SearchPath-0: ..\n"
 
 
 
 
19
 
20
- #: ../plugin_files/LiveChatAdmin.class.php:229
21
- #: ../plugin_files/LiveChatAdmin.class.php:230
22
- #: ../plugin_files/LiveChatAdmin.class.php:270
23
- msgid "Settings"
 
 
 
 
 
 
 
 
 
24
  msgstr ""
25
 
26
- #: ../plugin_files/helpers/ConnectNoticeHelper.class.php:16
27
  msgid "Action required - connect LiveChat"
28
  msgstr ""
29
 
30
- #: ../plugin_files/helpers/ConnectNoticeHelper.class.php:19
31
  msgid "Please"
32
  msgstr ""
33
 
34
- #: ../plugin_files/helpers/ConnectNoticeHelper.class.php:20
35
  msgid "connect your LiveChat account"
36
  msgstr ""
37
 
38
- #: ../plugin_files/helpers/ConnectNoticeHelper.class.php:21
39
  msgid "to start chatting with your customers."
40
  msgstr ""
41
 
42
- #: ../plugin_files/helpers/ConnectNoticeHelper.class.php:27
43
- msgid "Connect"
44
- msgstr ""
45
-
46
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:14
47
  msgid "Cancel"
48
  msgstr ""
49
 
50
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:34
51
  msgid "Quick Feedback"
52
  msgstr ""
53
 
54
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:47
55
- msgid "If you have a moment, please let us know why you are deactivating LiveChat:"
 
56
  msgstr ""
57
 
58
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:63
59
  msgid "I no longer need the plugin."
60
  msgstr ""
61
 
62
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:79
63
  msgid "I couldn't get the plugin to work."
64
  msgstr ""
65
 
66
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:95
67
  msgid "I found a better plugin."
68
  msgstr ""
69
 
70
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:111
71
  msgid "It's a temporary deactivation."
72
  msgstr ""
73
 
74
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:128
75
  msgid "Other"
76
  msgstr ""
77
 
78
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:136
79
  msgid "Tell us more..."
80
  msgstr ""
81
 
82
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:141
83
  msgid "Please choose one of available options."
84
  msgstr ""
85
 
86
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:144
87
  msgid "Please provide additional feedback."
88
  msgstr ""
89
 
90
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:160
91
  msgid "Skip & continue"
92
  msgstr ""
93
 
94
- #: ../plugin_files/helpers/DeactivationFeedbackFormHelper.class.php:163
95
  msgid "Send feedback"
96
  msgstr ""
97
 
98
- #: ../plugin_files/helpers/InstallHelper.class.php:33
99
- #: ../plugin_files/helpers/SettingsHelper.class.php:81
100
- msgid "Check out our apps for"
101
- msgstr ""
102
-
103
- #: ../plugin_files/helpers/InstallHelper.class.php:35
104
- #: ../plugin_files/helpers/SettingsHelper.class.php:83
105
- msgid "desktop or mobile!"
106
- msgstr ""
107
-
108
- #: ../plugin_files/helpers/ReviewNoticeHelper.class.php:15
109
- msgid "Hey, you’ve been using <strong>LiveChat</strong> for more than 14 days - that’s awesome! Could you please do us a BIG favour and <strong>give LiveChat a 5-star rating on WordPress</strong>? Just to help us spread the word and boost our motivation."
110
  msgstr ""
111
 
112
- #: ../plugin_files/helpers/ReviewNoticeHelper.class.php:16
113
  msgid "<strong>&ndash; The LiveChat Team</strong>"
114
  msgstr ""
115
 
116
- #: ../plugin_files/helpers/ReviewNoticeHelper.class.php:19
117
  msgid "Ok, you deserve it"
118
  msgstr ""
119
 
120
- #: ../plugin_files/helpers/ReviewNoticeHelper.class.php:22
121
  msgid "Maybe later"
122
  msgstr ""
123
 
124
- #: ../plugin_files/helpers/ReviewNoticeHelper.class.php:25
125
  msgid "No, thanks"
126
  msgstr ""
127
 
128
- #: ../plugin_files/helpers/SettingsHelper.class.php:21
129
- msgid "LiveChat is now installed on your website!"
130
- msgstr ""
131
-
132
- #: ../plugin_files/helpers/SettingsHelper.class.php:32
133
- msgid "Currently you are using your"
134
- msgstr ""
135
-
136
- #: ../plugin_files/helpers/SettingsHelper.class.php:34
137
- msgid "LiveChat account."
138
- msgstr ""
139
-
140
- #: ../plugin_files/helpers/SettingsHelper.class.php:39
141
- msgid "Open web application"
142
  msgstr ""
143
 
144
- #: ../plugin_files/helpers/SettingsHelper.class.php:46
145
- msgid "Hide chat on mobile"
 
146
  msgstr ""
147
 
148
- #: ../plugin_files/helpers/SettingsHelper.class.php:58
149
- msgid "Hide chat for Guest visitors"
150
  msgstr ""
151
 
152
- #: ../plugin_files/helpers/SettingsHelper.class.php:71
153
- msgid "Something went wrong?"
 
 
154
  msgstr ""
155
 
156
- #: ../plugin_files/helpers/SettingsHelper.class.php:72
157
- msgid "Disconect your account."
158
  msgstr ""
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: LiveChat\n"
6
+ "POT-Creation-Date: 2019-11-12 12:07+0100\n"
7
+ "PO-Revision-Date: 2019-11-12 12:07+0100\n"
8
  "Last-Translator: \n"
9
+ "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.2.4\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
+ "X-Poedit-WPHeader: livechat.php\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.min.js\n"
23
+ "X-Poedit-SearchPathExcluded-1: vendor\n"
24
 
25
+ #: plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php:23
26
+ msgid "Action required - confirm your identity"
27
+ msgstr ""
28
+
29
+ #: plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php:25
30
+ msgid ""
31
+ "Thank you for updating LiveChat to the latest version. Please click Connect "
32
+ "to confirm your identity and finish the installation."
33
+ msgstr ""
34
+
35
+ #: plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php:28
36
+ #: plugin_files/Helpers/ConnectNoticeHelper.class.php:36
37
+ msgid "Connect"
38
  msgstr ""
39
 
40
+ #: plugin_files/Helpers/ConnectNoticeHelper.class.php:25
41
  msgid "Action required - connect LiveChat"
42
  msgstr ""
43
 
44
+ #: plugin_files/Helpers/ConnectNoticeHelper.class.php:28
45
  msgid "Please"
46
  msgstr ""
47
 
48
+ #: plugin_files/Helpers/ConnectNoticeHelper.class.php:29
49
  msgid "connect your LiveChat account"
50
  msgstr ""
51
 
52
+ #: plugin_files/Helpers/ConnectNoticeHelper.class.php:30
53
  msgid "to start chatting with your customers."
54
  msgstr ""
55
 
56
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:27
 
 
 
 
57
  msgid "Cancel"
58
  msgstr ""
59
 
60
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:47
61
  msgid "Quick Feedback"
62
  msgstr ""
63
 
64
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:60
65
+ msgid ""
66
+ "If you have a moment, please let us know why you are deactivating LiveChat:"
67
  msgstr ""
68
 
69
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:76
70
  msgid "I no longer need the plugin."
71
  msgstr ""
72
 
73
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:92
74
  msgid "I couldn't get the plugin to work."
75
  msgstr ""
76
 
77
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:108
78
  msgid "I found a better plugin."
79
  msgstr ""
80
 
81
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:124
82
  msgid "It's a temporary deactivation."
83
  msgstr ""
84
 
85
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:141
86
  msgid "Other"
87
  msgstr ""
88
 
89
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:149
90
  msgid "Tell us more..."
91
  msgstr ""
92
 
93
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:154
94
  msgid "Please choose one of available options."
95
  msgstr ""
96
 
97
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:157
98
  msgid "Please provide additional feedback."
99
  msgstr ""
100
 
101
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:173
102
  msgid "Skip & continue"
103
  msgstr ""
104
 
105
+ #: plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php:176
106
  msgid "Send feedback"
107
  msgstr ""
108
 
109
+ #: plugin_files/Helpers/ReviewNoticeHelper.class.php:24
110
+ msgid ""
111
+ "Hey, you’ve been using <strong>LiveChat</strong> for more than 14 days - "
112
+ "that’s awesome! Could you please do us a BIG favour and <strong>give "
113
+ "LiveChat a 5-star rating on WordPress</strong>? Just to help us spread the "
114
+ "word and boost our motivation."
 
 
 
 
 
 
115
  msgstr ""
116
 
117
+ #: plugin_files/Helpers/ReviewNoticeHelper.class.php:25
118
  msgid "<strong>&ndash; The LiveChat Team</strong>"
119
  msgstr ""
120
 
121
+ #: plugin_files/Helpers/ReviewNoticeHelper.class.php:28
122
  msgid "Ok, you deserve it"
123
  msgstr ""
124
 
125
+ #: plugin_files/Helpers/ReviewNoticeHelper.class.php:31
126
  msgid "Maybe later"
127
  msgstr ""
128
 
129
+ #: plugin_files/Helpers/ReviewNoticeHelper.class.php:34
130
  msgid "No, thanks"
131
  msgstr ""
132
 
133
+ #: plugin_files/LiveChatAdmin.class.php:247
134
+ #: plugin_files/LiveChatAdmin.class.php:248
135
+ #: plugin_files/LiveChatAdmin.class.php:292
136
+ msgid "Settings"
 
 
 
 
 
 
 
 
 
 
137
  msgstr ""
138
 
139
+ #. Plugin Name of the plugin/theme
140
+ #. Author of the plugin/theme
141
+ msgid "LiveChat"
142
  msgstr ""
143
 
144
+ #. Plugin URI of the plugin/theme
145
+ msgid "https://www.livechatinc.com/addons/wordpress/"
146
  msgstr ""
147
 
148
+ #. Description of the plugin/theme
149
+ msgid ""
150
+ "Live chat software for live help, online sales and customer support. This "
151
+ "plugin allows to quickly install LiveChat on any WordPress website."
152
  msgstr ""
153
 
154
+ #. Author URI of the plugin/theme
155
+ msgid "https://www.livechatinc.com"
156
  msgstr ""
livechat.php CHANGED
@@ -5,19 +5,30 @@ Plugin URI: https://www.livechatinc.com/addons/wordpress/
5
  Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install LiveChat on any WordPress website.
6
  Author: LiveChat
7
  Author URI: https://www.livechatinc.com
8
- Version: 3.8.2
9
  Text Domain: wp-live-chat-software-for-wordpress
10
  Domain Path: /languages
11
  */
12
 
13
- if (is_admin())
14
- {
15
- require_once(dirname(__FILE__).'/plugin_files/LiveChatAdmin.class.php');
16
- LiveChatAdmin::get_instance();
 
 
 
 
 
 
17
  }
18
- else
19
- {
20
- require_once(dirname(__FILE__).'/plugin_files/LiveChat.class.php');
21
- LiveChat::get_instance();
 
 
 
 
 
22
  }
23
 
5
  Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install LiveChat on any WordPress website.
6
  Author: LiveChat
7
  Author URI: https://www.livechatinc.com
8
+ Version: 4.0.0
9
  Text Domain: wp-live-chat-software-for-wordpress
10
  Domain Path: /languages
11
  */
12
 
13
+ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
14
+
15
+ /**
16
+ * Uninstall hook handler.
17
+ *
18
+ * @throws \LiveChat\Exceptions\ApiClientException Can be thrown by uninstall_hook_header method.
19
+ * @throws \LiveChat\Exceptions\InvalidTokenException Can Can be thrown by uninstall_hook_header method.
20
+ */
21
+ function uninstall_hook_handler() {
22
+ \LiveChat\LiveChatAdmin::uninstall_hook_handler();
23
  }
24
+
25
+ if ( is_admin() ) {
26
+ require_once dirname( __FILE__ ) . '/plugin_files/LiveChatAdmin.class.php';
27
+ \LiveChat\LiveChatAdmin::get_instance();
28
+
29
+ register_uninstall_hook( __FILE__, 'uninstall_hook_handler' );
30
+ } else {
31
+ require_once dirname( __FILE__ ) . '/plugin_files/LiveChat.class.php';
32
+ \LiveChat\LiveChat::get_instance();
33
  }
34
 
plugin_files/Exceptions/ApiClientException.class.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ApiClientException
4
+ *
5
+ * @package LiveChat\Exceptions
6
+ */
7
+
8
+ namespace LiveChat\Exceptions;
9
+
10
+ use Exception;
11
+
12
+ /**
13
+ * Class ApiClientException
14
+ */
15
+ class ApiClientException extends Exception {
16
+ /**
17
+ * ApiClientException constructor.
18
+ *
19
+ * @param string $message Error message.
20
+ * @param int $code Error code.
21
+ * @param Exception $previous Exception which caused current error.
22
+ */
23
+ public function __construct(
24
+ $message = '', $code = 0, Exception $previous = null
25
+ ) {
26
+ parent::__construct( "ApiClient Error: $message", $code, $previous );
27
+ }
28
+ }
plugin_files/Exceptions/ErrorCode.class.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ErrorCodes
4
+ *
5
+ * @package LiveChat\Exceptions
6
+ */
7
+
8
+ namespace LiveChat\Exceptions;
9
+
10
+ /**
11
+ * Class ErrorCodes
12
+ */
13
+ class ErrorCodes {
14
+
15
+ /**
16
+ * Authorization token is missing
17
+ *
18
+ * @var int $missing_auth_token
19
+ */
20
+ public static $missing_auth_token = 100;
21
+
22
+ /**
23
+ * Public key (cert) is missing
24
+ *
25
+ * @var int $missing_public_key
26
+ */
27
+ public static $missing_public_key = 101;
28
+
29
+ /**
30
+ * HTTP client error
31
+ *
32
+ * @var int $http_client_error
33
+ */
34
+ public static $http_client_error = 103;
35
+
36
+ /**
37
+ * Given store token is invalid
38
+ *
39
+ * @var int $invalid_store_token
40
+ */
41
+ public static $invalid_store_token = 104;
42
+
43
+ /**
44
+ * Given user token is invalid
45
+ *
46
+ * @var int $invalid_user_token
47
+ */
48
+ public static $invalid_user_token = 105;
49
+ }
plugin_files/Exceptions/InvalidTokenException.class.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class InvalidTokenException
4
+ *
5
+ * @package LiveChat\Exceptions
6
+ */
7
+
8
+ namespace LiveChat\Exceptions;
9
+
10
+ use Exception;
11
+
12
+ /**
13
+ * Class InvalidTokenException
14
+ */
15
+ class InvalidTokenException extends Exception {
16
+ /**
17
+ * InvalidTokenException constructor.
18
+ *
19
+ * @param string $code Given invalid code.
20
+ *
21
+ * @inheritDoc
22
+ */
23
+ public function __construct( $code ) {
24
+ parent::__construct( 'Invalid token', $code );
25
+ }
26
+
27
+ /**
28
+ * Creates InvalidTokenException for invalid store token
29
+ *
30
+ * @return InvalidTokenException
31
+ */
32
+ public static function store() {
33
+ return new InvalidTokenException( ErrorCodes::$invalid_store_token );
34
+ }
35
+
36
+ /**
37
+ * Creates InvalidTokenException for invalid user token
38
+ *
39
+ * @return InvalidTokenException
40
+ */
41
+ public static function user() {
42
+ return new InvalidTokenException( ErrorCodes::$invalid_user_token );
43
+ }
44
+ }
plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ConfirmIdentityNoticeHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
+
8
+ namespace LiveChat\Helpers;
9
+
10
+ use Timber\Timber;
11
+
12
+ /**
13
+ * Class ConfirmIdentityNoticeHelper
14
+ */
15
+ class ConfirmIdentityNoticeHelper extends LiveChatHelper {
16
+
17
+ /**
18
+ * Renders helper.
19
+ */
20
+ public function render() {
21
+ $context = Timber::get_context();
22
+ $context['lcNoticeLogoUrl'] = esc_html( plugins_url( 'wp-live-chat-software-for-wordpress' ) . '/plugin_files/images/livechat-logo.svg' );
23
+ $context['header'] = esc_html__( 'Action required - confirm your identity', 'wp-live-chat-software-for-wordpress' );
24
+ $context['notice'] = esc_html__(
25
+ 'Thank you for updating LiveChat to the latest version. Please click Connect to confirm your identity and finish the installation.',
26
+ 'wp-live-chat-software-for-wordpress'
27
+ );
28
+ $context['button'] = esc_html__( 'Connect', 'wp-live-chat-software-for-wordpress' );
29
+ Timber::$dirname = '../templates';
30
+ Timber::render( 'confirm_identity_notice.html.twig', $context );
31
+ }
32
+ }
plugin_files/Helpers/ConnectNoticeHelper.class.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ConnectNoticeHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
+
8
+ namespace LiveChat\Helpers;
9
+
10
+ /**
11
+ * Class ConnectNoticeHelper
12
+ */
13
+ class ConnectNoticeHelper extends LiveChatHelper {
14
+ /**
15
+ * Renders ConnectNotice in WP dashboard.
16
+ */
17
+ public function render() {
18
+ ?>
19
+ <div class="lc-design-system-typography notice notice-info lc-notice" id="lc-connect-notice">
20
+ <div class="lc-notice-column">
21
+ <img class="lc-notice-logo" src="<?php echo esc_html( plugins_url( 'wp-live-chat-software-for-wordpress' ) . '/plugin_files/images/livechat-logo.svg' ); ?>" alt="LiveChat logo" />
22
+ </div>
23
+ <div class="lc-notice-column">
24
+ <p id="lc-connect-notice-header">
25
+ <?php esc_html_e( 'Action required - connect LiveChat', 'wp-live-chat-software-for-wordpress' ); ?>
26
+ </p>
27
+ <p>
28
+ <?php esc_html_e( 'Please' ); ?>
29
+ <a href="admin.php?page=livechat_settings"><?php esc_html_e( 'connect your LiveChat account' ); ?></a>
30
+ <?php esc_html_e( 'to start chatting with your customers.', 'wp-live-chat-software-for-wordpress' ); ?>
31
+ </p>
32
+ </div>
33
+ <div class="lc-notice-column" id="lc-connect-notice-button-column">
34
+ <p>
35
+ <button class="lc-btn lc-btn--primary" id="lc-connect-notice-button" type="button">
36
+ <?php esc_html_e( 'Connect', 'wp-live-chat-software-for-wordpress' ); ?>
37
+ </button>
38
+ </p>
39
+ </div>
40
+ </div>
41
+ <?php
42
+ }
43
+ }
plugin_files/Helpers/ConnectServiceHelper.class.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ConnectServiceHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
+
8
+ namespace LiveChat\Helpers;
9
+
10
+ use Exception;
11
+ use LiveChat\Exceptions\ApiClientException;
12
+ use LiveChat\Exceptions\InvalidTokenException;
13
+ use LiveChat\Services\CertProvider;
14
+ use LiveChat\Services\ConnectTokenProvider;
15
+ use LiveChat\Services\ModuleConfiguration;
16
+ use LiveChat\Services\Store;
17
+ use LiveChat\Services\UrlProvider;
18
+ use LiveChat\Services\User;
19
+ use Timber\Timber;
20
+
21
+ /**
22
+ * Class ConnectServiceHelper
23
+ */
24
+ class ConnectServiceHelper extends LiveChatHelper {
25
+ /**
26
+ * ModuleConfiguration instance
27
+ *
28
+ * @var ModuleConfiguration|null
29
+ */
30
+ private $module = null;
31
+
32
+ /**
33
+ * Current user instance
34
+ *
35
+ * @var User|null
36
+ */
37
+ private $user = null;
38
+
39
+ /**
40
+ * Current store instance.
41
+ *
42
+ * @var Store|null
43
+ */
44
+ private $store = null;
45
+
46
+ /**
47
+ * ConnectServiceHelper constructor.
48
+ *
49
+ * @param ModuleConfiguration $module ModuleConfiguration class instance.
50
+ * @param User $user User class instance.
51
+ * @param Store $store Store class instance.
52
+ */
53
+ public function __construct( $module, $user, $store ) {
54
+ $this->module = $module;
55
+ $this->user = $user;
56
+ $this->store = $store;
57
+ }
58
+
59
+ /**
60
+ * Returns app url with region from store token.
61
+ *
62
+ * @return string
63
+ */
64
+ private function get_app_url() {
65
+ try {
66
+ $decoded_token = ConnectTokenProvider::create( CertProvider::create() )->get( $this->store->get_store_token(), 'store' );
67
+ return UrlProvider::create( $decoded_token )->get_app_url();
68
+ } catch ( Exception $exception ) {
69
+ return UrlProvider::create()->get_app_url();
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Renders iframe with Connect service.
75
+ */
76
+ public function render() {
77
+ $context = Timber::get_context();
78
+ $context['appUrl'] = $this->get_app_url();
79
+ $context['siteUrl'] = $this->module->get_site_url();
80
+ $context['userEmail'] = $this->user->get_user_data()['email'];
81
+ $context['wpVer'] = $this->module->get_wp_version();
82
+ $context['moduleVer'] = $this->module->get_plugin_version();
83
+ $context['lcToken'] = $this->user->get_current_user_token();
84
+ $context['storeToken'] = $this->store->get_store_token();
85
+
86
+ Timber::$dirname = '../templates';
87
+ Timber::render( 'connect.html.twig', $context );
88
+ }
89
+
90
+ /**
91
+ * Returns new instance of ConnectServiceHelper.
92
+ *
93
+ * @return static
94
+ */
95
+ public static function create() {
96
+ return new static(
97
+ ModuleConfiguration::get_instance(),
98
+ User::get_instance(),
99
+ Store::get_instance()
100
+ );
101
+ }
102
+ }
plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class DeactivationFeedbackFormHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
+
8
+ namespace LiveChat\Helpers;
9
+
10
+ use LiveChat\LiveChat;
11
+ use LiveChat\Services\User;
12
+
13
+ /**
14
+ * Class DeactivationFeedbackFormHelper
15
+ */
16
+ class DeactivationFeedbackFormHelper extends LiveChatHelper {
17
+ /**
18
+ * Renders modal with deactivation feedback form.
19
+ */
20
+ public function render() {
21
+ $wp_user = User::get_instance()->get_user_data();
22
+ $license_id = LiveChat::get_instance()->get_license_number();
23
+
24
+ ?>
25
+ <div class="lc-design-system-typography lc-modal-base__overlay" id="lc-deactivation-feedback-modal-overlay" style="display: none">
26
+ <div class="lc-modal-base" id="lc-deactivation-feedback-modal-container">
27
+ <button title="<?php esc_html_e( 'Cancel', 'wp-live-chat-software-for-wordpress' ); ?>" class="lc-modal-base__close">
28
+ <svg
29
+ xmlns="http://www.w3.org/2000/svg"
30
+ width="24px"
31
+ height="24px"
32
+ viewBox="0 0 24 24"
33
+ fill="#424D57"
34
+ class="material material-close-icon undefined"
35
+ >
36
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
37
+ </svg>
38
+ </button>
39
+ <div class="lc-modal__header">
40
+ <div class="lc-modal__heading" id="lc-deactivation-feedback-modal-heading">
41
+ <img
42
+ id="lc-deactivation-feedback-logo"
43
+ alt="LiveChat logo"
44
+ src="<?php echo esc_html( plugins_url( 'wp-live-chat-software-for-wordpress' ) . '/plugin_files/images/livechat-logo.svg' ); ?>"
45
+ />
46
+ <h2 id="lc-deactivation-feedback-modal-title">
47
+ <?php esc_html_e( 'Quick Feedback', 'wp-live-chat-software-for-wordpress' ); ?>
48
+ </h2>
49
+ </div>
50
+ </div>
51
+ <div class="lc-modal__body">
52
+ <form
53
+ action="#"
54
+ method="post"
55
+ id="lc-deactivation-feedback-form"
56
+ >
57
+ <div role="group" class="lc-form-group">
58
+ <div class="lc-form-group__header">
59
+ <div class="lc-form-group__label">
60
+ <?php esc_html_e( 'If you have a moment, please let us know why you are deactivating LiveChat:', 'wp-live-chat-software-for-wordpress' ); ?>
61
+ </div>
62
+ </div>
63
+ <div class="lc-field-group">
64
+ <div class="lc-radio">
65
+ <label class="lc-radio__label">
66
+ <div class="lc-radio__circle">
67
+ <span class="lc-radio__inner-circle"></span>
68
+ <input
69
+ type="radio"
70
+ class="lc-radio__input"
71
+ value="I no longer need the plugin."
72
+ name="lc-deactivation-feedback-option"
73
+ />
74
+ </div>
75
+ <div class="lc-radio__text">
76
+ <?php esc_html_e( 'I no longer need the plugin.', 'wp-live-chat-software-for-wordpress' ); ?>
77
+ </div>
78
+ </label>
79
+ </div>
80
+ <div class="lc-radio">
81
+ <label class="lc-radio__label">
82
+ <div class="lc-radio__circle">
83
+ <span class="lc-radio__inner-circle"></span>
84
+ <input
85
+ type="radio"
86
+ class="lc-radio__input"
87
+ value="I couldn't get the plugin to work."
88
+ name="lc-deactivation-feedback-option"
89
+ />
90
+ </div>
91
+ <div class="lc-radio__text">
92
+ <?php esc_html_e( "I couldn't get the plugin to work.", 'wp-live-chat-software-for-wordpress' ); ?>
93
+ </div>
94
+ </label>
95
+ </div>
96
+ <div class="lc-radio">
97
+ <label class="lc-radio__label">
98
+ <div class="lc-radio__circle">
99
+ <span class="lc-radio__inner-circle"></span>
100
+ <input
101
+ type="radio"
102
+ class="lc-radio__input"
103
+ value="I found a better plugin."
104
+ name="lc-deactivation-feedback-option"
105
+ />
106
+ </div>
107
+ <div class="lc-radio__text">
108
+ <?php esc_html_e( 'I found a better plugin.', 'wp-live-chat-software-for-wordpress' ); ?>
109
+ </div>
110
+ </label>
111
+ </div>
112
+ <div class="lc-radio">
113
+ <label class="lc-radio__label">
114
+ <div class="lc-radio__circle">
115
+ <span class="lc-radio__inner-circle"></span>
116
+ <input
117
+ type="radio"
118
+ class="lc-radio__input"
119
+ value="It's a temporary deactivation."
120
+ name="lc-deactivation-feedback-option"
121
+ />
122
+ </div>
123
+ <div class="lc-radio__text">
124
+ <?php esc_html_e( "It's a temporary deactivation.", 'wp-live-chat-software-for-wordpress' ); ?>
125
+ </div>
126
+ </label>
127
+ </div>
128
+ <div class="lc-radio">
129
+ <label class="lc-radio__label">
130
+ <div class="lc-radio__circle">
131
+ <span class="lc-radio__inner-circle"></span>
132
+ <input
133
+ type="radio"
134
+ class="lc-radio__input"
135
+ value="Other"
136
+ name="lc-deactivation-feedback-option"
137
+ id="lc-deactivation-feedback-option-other"
138
+ />
139
+ </div>
140
+ <div class="lc-radio__text">
141
+ <?php esc_html_e( 'Other', 'wp-live-chat-software-for-wordpress' ); ?>
142
+ </div>
143
+ </label>
144
+ </div>
145
+ <div class="lc-text-field" id="lc-deactivation-feedback-other-field">
146
+ <div>
147
+ <textarea
148
+ class="lc-textarea"
149
+ placeholder="<?php esc_html_e( 'Tell us more...', 'wp-live-chat-software-for-wordpress' ); ?>"
150
+ ></textarea>
151
+ </div>
152
+ </div>
153
+ <span class="lc-field-error" id="lc-deactivation-feedback-form-option-error">
154
+ <?php esc_html_e( 'Please choose one of available options.', 'wp-live-chat-software-for-wordpress' ); ?>
155
+ </span>
156
+ <span class="lc-field-error" id="lc-deactivation-feedback-form-other-error">
157
+ <?php esc_html_e( 'Please provide additional feedback.', 'wp-live-chat-software-for-wordpress' ); ?>
158
+ </span>
159
+ </div>
160
+ </div>
161
+ </form>
162
+ <script>
163
+ window.deactivationDetails = window.deactivationDetails || {};
164
+ window.deactivationDetails = {
165
+ license: <?php echo esc_html( $license_id ); ?>,
166
+ name: '<?php echo esc_html( $wp_user['name'] ); ?>',
167
+ wpEmail: '<?php echo esc_html( $wp_user['email'] ); ?>'
168
+ };
169
+ </script>
170
+ </div>
171
+ <div class="lc-modal__footer">
172
+ <button class="lc-btn" id="lc-deactivation-feedback-modal-skip-btn">
173
+ <?php esc_html_e( 'Skip & continue', 'wp-live-chat-software-for-wordpress' ); ?>
174
+ </button>
175
+ <button class="lc-btn lc-btn--primary" id="lc-deactivation-feedback-modal-submit-btn">
176
+ <?php esc_html_e( 'Send feedback', 'wp-live-chat-software-for-wordpress' ); ?>
177
+ </button>
178
+ </div>
179
+ </div>
180
+ </div>
181
+ <?php
182
+ }
183
+ }
plugin_files/Helpers/LiveChatHelper.class.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class LiveChatHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
+
8
+ namespace LiveChat\Helpers;
9
+
10
+ /**
11
+ * Class LiveChatHelper
12
+ */
13
+ abstract class LiveChatHelper {
14
+ /**
15
+ * Renders helper.
16
+ *
17
+ * @return mixed
18
+ */
19
+ abstract public function render();
20
+ }
plugin_files/Helpers/ReviewNoticeHelper.class.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ReviewNoticeHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
+
8
+ namespace LiveChat\Helpers;
9
+
10
+ /**
11
+ * Class ReviewNoticeHelper
12
+ */
13
+ class ReviewNoticeHelper extends LiveChatHelper {
14
+ /**
15
+ * Renders review notice.
16
+ */
17
+ public function render() {
18
+ ?>
19
+ <div class="lc-design-system-typography lc-notice notice notice-info is-dismissible" id="lc-review-notice">
20
+ <div class="lc-notice-column">
21
+ <img class="lc-notice-logo" src="<?php echo esc_html( plugins_url( 'wp-live-chat-software-for-wordpress' ) . '/plugin_files/images/livechat-logo.svg' ); ?>" alt="LiveChat logo" />
22
+ </div>
23
+ <div class="lc-notice-column">
24
+ <p><?php esc_html_e( 'Hey, you’ve been using <strong>LiveChat</strong> for more than 14 days - that’s awesome! Could you please do us a BIG favour and <strong>give LiveChat a 5-star rating on WordPress</strong>? Just to help us spread the word and boost our motivation.', 'wp-live-chat-software-for-wordpress' ); ?></p>
25
+ <p><?php esc_html_e( '<strong>&ndash; The LiveChat Team</strong>' ); ?></p>
26
+ <div id="lc-review-notice-actions">
27
+ <a href="https://wordpress.org/support/plugin/wp-live-chat-software-for-wordpress/reviews/#new-post" target="_blank" class="lc-review-notice-action lc-btn lc-btn--compact lc-btn--primary" id="lc-review-now">
28
+ <i class="material-icons">thumb_up</i> <span><?php esc_html_e( 'Ok, you deserve it', 'wp-live-chat-software-for-wordpress' ); ?></span>
29
+ </a>
30
+ <a href="#" class="lc-review-notice-action lc-btn lc-btn--compact" id="lc-review-postpone">
31
+ <i class="material-icons">schedule</i> <span><?php esc_html_e( 'Maybe later', 'wp-live-chat-software-for-wordpress' ); ?></span>
32
+ </a>
33
+ <a href="#" class="lc-review-notice-action lc-btn lc-btn--compact" id="lc-review-dismiss">
34
+ <i class="material-icons">not_interested</i> <span><?php esc_html_e( 'No, thanks', 'wp-live-chat-software-for-wordpress' ); ?></span>
35
+ </a>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <?php
40
+ }
41
+ }
plugin_files/{helpers → Helpers}/TrackingCodeHelper.class.php RENAMED
@@ -1,23 +1,37 @@
1
  <?php
 
 
 
 
 
2
 
3
- require_once('LiveChatHelper.class.php');
4
 
5
- class TrackingCodeHelper extends LiveChatHelper
6
- {
7
- public function render()
8
- {
 
 
 
 
 
 
 
 
 
9
  $tracking = '';
 
10
 
11
- if (LiveChat::get_instance()->is_installed())
12
- {
13
  $license_number = LiveChat::get_instance()->get_license_number();
14
- $settings = LiveChat::get_instance()->get_settings();
15
- $check_mobile = LiveChat::get_instance()->check_mobile();
16
- $check_logged = LiveChat::get_instance()->check_logged();
17
- $visitor = LiveChat::get_instance()->get_user_data();
18
 
19
- if (!$settings['disableMobile'] || ($settings['disableMobile'] && !$check_mobile)) {
20
- if (!$settings['disableGuests'] || ($settings['disableGuests'] && $check_logged)) {
21
  $tracking = <<<TRACKING_CODE_START
22
  <script type="text/javascript">
23
  window.__lc = window.__lc || {};
@@ -56,4 +70,4 @@ NOSCRIPT;
56
 
57
  return $tracking;
58
  }
59
- }
1
  <?php
2
+ /**
3
+ * Class TrackingCodeHelper
4
+ *
5
+ * @package LiveChat\Helpers
6
+ */
7
 
8
+ namespace LiveChat\Helpers;
9
 
10
+ use LiveChat\LiveChat;
11
+ use LiveChat\Services\User;
12
+
13
+ /**
14
+ * Class TrackingCodeHelper
15
+ */
16
+ class TrackingCodeHelper extends LiveChatHelper {
17
+ /**
18
+ * Returns tracking code.
19
+ *
20
+ * @return string
21
+ */
22
+ public function render() {
23
  $tracking = '';
24
+ $livechat = LiveChat::get_instance();
25
 
26
+ if ( $livechat->has_license_number() || $livechat->is_installed() ) {
 
27
  $license_number = LiveChat::get_instance()->get_license_number();
28
+ $settings = LiveChat::get_instance()->get_settings();
29
+ $check_mobile = LiveChat::get_instance()->check_mobile();
30
+ $check_logged = User::get_instance()->check_logged();
31
+ $visitor = User::get_instance()->get_user_data();
32
 
33
+ if ( ! $settings['disableMobile'] || ( $settings['disableMobile'] && ! $check_mobile ) ) {
34
+ if ( ! $settings['disableGuests'] || ( $settings['disableGuests'] && $check_logged ) ) {
35
  $tracking = <<<TRACKING_CODE_START
36
  <script type="text/javascript">
37
  window.__lc = window.__lc || {};
70
 
71
  return $tracking;
72
  }
73
+ }
plugin_files/LiveChat.class.php CHANGED
@@ -1,72 +1,100 @@
1
  <?php
2
-
3
- class LiveChat
4
- {
5
- // singleton pattern
6
- protected static $instance;
7
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  /**
9
- * Absolute path to plugin files
 
 
10
  */
11
- protected $plugin_url = null;
12
 
13
  /**
14
- * LiveChat license parameters
 
 
15
  */
16
- protected $login = null;
17
- protected $license_number = null;
18
 
19
  /**
20
- * Remembers if LiveChat license number is set
 
 
21
  */
22
- protected $license_installed = false;
23
 
24
  /**
25
  * Starts the plugin
26
  */
27
- protected function __construct()
28
- {
29
- add_action ('wp_head', array($this, 'tracking_code'));
30
- }
31
 
32
- public static function get_instance()
33
- {
34
- if (!isset(self::$instance))
35
- {
36
- $c = __CLASS__;
37
- self::$instance = new $c;
38
  }
39
-
40
- return self::$instance;
41
  }
42
 
43
- /**
44
- * Returns plugin files absolute path
45
  *
46
- * @return string
47
  */
48
- public function get_plugin_url()
49
- {
50
- if (is_null($this->plugin_url))
51
- {
52
- $this->plugin_url = plugin_dir_url( __FILE__ );
53
  }
54
 
55
- return $this->plugin_url;
56
  }
57
 
58
  /**
59
- * Returns true if LiveChat license is set properly,
 
 
 
 
 
 
 
 
60
  * false otherwise
61
  *
62
  * @return bool
63
  */
64
- public function is_installed()
65
- {
66
-
67
- $this->license_installed = ($this->get_license_number() > 0);
68
 
69
- return $this->license_installed;
 
 
 
 
 
 
 
 
70
  }
71
 
72
  /**
@@ -74,25 +102,27 @@ class LiveChat
74
  *
75
  * @return int
76
  */
77
- public function get_license_number()
78
- {
79
- $this->license_number = get_option('livechat_license_number');
80
-
81
- // license_number must be >= 0
82
- // also, this prevents from NaN values
83
- $this->license_number = max(0, $this->license_number);
84
 
85
- return $this->license_number;
 
 
 
 
 
 
 
86
  }
87
 
88
  /**
89
  * Returns LiveChat login
90
  */
91
- public function get_login()
92
- {
93
- if (is_null($this->login))
94
- {
95
- $this->login = sanitize_email(get_option('livechat_email'));
96
  }
97
 
98
  return $this->login;
@@ -103,96 +133,63 @@ class LiveChat
103
  *
104
  * @return int
105
  */
106
- public function get_settings()
107
- {
108
- $settings['disableMobile'] = get_option('livechat_disable_mobile');
109
- $settings['disableGuests'] = get_option('livechat_disable_guests');
110
 
111
  return $settings;
112
  }
113
 
114
  /**
115
- * Injects tracking code
116
  */
117
- public function tracking_code()
118
- {
119
- $this->get_helper('TrackingCode');
120
- }
121
-
122
- /**
123
- * Echoes given helper
124
- */
125
- public static function get_helper($class, $echo=true, $params=array())
126
- {
127
- $class .= 'Helper';
128
-
129
- if (class_exists($class) == false)
130
- {
131
- $path = dirname(__FILE__).'/helpers/'.$class.'.class.php';
132
- if (file_exists($path) !== true)
133
- {
134
- return false;
135
- }
136
-
137
- require_once($path);
138
- }
139
-
140
- $c = new $class;
141
-
142
- if ($echo)
143
- {
144
- echo $c->render($params);
145
- return true;
146
- }
147
- else
148
- {
149
- return $c->render($params);
 
 
 
150
  }
151
  }
152
 
153
  /**
154
  * Checks if visitor is on mobile device.
 
155
  * @return boolean
156
  */
157
  public function check_mobile() {
158
- $userAgent = array_key_exists('HTTP_USER_AGENT', $_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : '';
159
- $regex = '/((Chrome).*(Mobile))|((Android).*)|((iPhone|iPod).*Apple.*Mobile)|((Android).*(Mobile))/i';
160
- return preg_match($regex, $userAgent);
161
- }
162
-
163
- /**
164
- * Checks if visitor is logged in
165
- * @return boolean
166
- */
167
- public function check_logged() {
168
- if (property_exists(wp_get_current_user()->data, 'ID')) {
169
- return true;
170
- }
171
- return false;
172
- }
173
-
174
- /**
175
- * Get visitor's name and email
176
- * @return array
177
- */
178
- public function get_user_data(){
179
- $currentUser = wp_get_current_user();
180
-
181
- $email = $name = '';
182
-
183
- if (!empty($currentUser->user_email)) {
184
- $email = $currentUser->user_email;
185
- }
186
-
187
- if (!empty($currentUser->user_firstname) && !empty($currentUser->user_lastname)) {
188
- $name = $currentUser->user_firstname . ' ' . $currentUser->user_lastname;
189
- } else {
190
- $name = $currentUser->user_login;
191
- }
192
-
193
- return array(
194
- 'name' => $name,
195
- 'email' => $email
196
- );
197
  }
198
- }
1
  <?php
2
+ /**
3
+ * Class LiveChat
4
+ *
5
+ * @package LiveChat
6
+ */
7
+
8
+ namespace LiveChat;
9
+
10
+ use Exception;
11
+ use LiveChat\Helpers\TrackingCodeHelper;
12
+ use LiveChat\Services\ApiClient;
13
+ use LiveChat\Services\CertProvider;
14
+ use LiveChat\Services\ConnectToken;
15
+ use LiveChat\Services\ConnectTokenProvider;
16
+ use LiveChat\Services\ModuleConfiguration;
17
+ use LiveChat\Services\Store;
18
+ use LiveChat\Services\UrlProvider;
19
+
20
+ /**
21
+ * Class LiveChat
22
+ */
23
+ class LiveChat {
24
  /**
25
+ * Singleton pattern
26
+ *
27
+ * @var LiveChat $instance
28
  */
29
+ protected static $instance;
30
 
31
  /**
32
+ * Instance of ModuleConfiguration class
33
+ *
34
+ * @var ModuleConfiguration|null
35
  */
36
+ protected $module = null;
 
37
 
38
  /**
39
+ * LiveChat account login
40
+ *
41
+ * @var string|null $login
42
  */
43
+ protected $login = null;
44
 
45
  /**
46
  * Starts the plugin
47
  */
48
+ public function __construct() {
49
+ $this->module = ModuleConfiguration::get_instance();
 
 
50
 
51
+ if ( $this->has_license_number() ) {
52
+ add_action( 'wp_head', array( $this, 'tracking_code' ) );
53
+ } else {
54
+ add_action( 'wp_enqueue_scripts', array( $this, 'widget_script' ) );
 
 
55
  }
 
 
56
  }
57
 
58
+ /**
59
+ * Singleton pattern
60
  *
61
+ * @return LiveChat
62
  */
63
+ public static function get_instance() {
64
+ if ( ! isset( static::$instance ) ) {
65
+ static::$instance = new static();
 
 
66
  }
67
 
68
+ return static::$instance;
69
  }
70
 
71
  /**
72
+ * Adds chat widget to WP site.
73
+ * It is used only for migrated users who are not connected to new integration.
74
+ */
75
+ public function tracking_code() {
76
+ echo ( new TrackingCodeHelper() )->render();
77
+ }
78
+
79
+ /**
80
+ * Returns true if LiveChat store token is set (not empty string),
81
  * false otherwise
82
  *
83
  * @return bool
84
  */
85
+ public function is_installed() {
86
+ return ! empty( Store::get_instance()->get_store_token() );
87
+ }
 
88
 
89
+ /**
90
+ * Returns true number if option exists and is valid,
91
+ * false otherwise
92
+ *
93
+ * @return bool
94
+ */
95
+ public function has_license_number() {
96
+ $license_number = max( 0, get_option( 'livechat_license_number' ) );
97
+ return $license_number > 0;
98
  }
99
 
100
  /**
102
  *
103
  * @return int
104
  */
105
+ public function get_license_number() {
106
+ if ( $this->has_license_number() ) {
107
+ return get_option( 'livechat_license_number' );
108
+ }
 
 
 
109
 
110
+ try {
111
+ $store_token = Store::get_instance()->get_store_token();
112
+ $connect_token = ConnectTokenProvider::create( CertProvider::create() )->get( $store_token, 'store' );
113
+ $response = ApiClient::create( $connect_token )->store_info();
114
+ return $response['store']['license'];
115
+ } catch ( Exception $exception ) {
116
+ return 0;
117
+ }
118
  }
119
 
120
  /**
121
  * Returns LiveChat login
122
  */
123
+ public function get_login() {
124
+ if ( is_null( $this->login ) ) {
125
+ $this->login = sanitize_email( get_option( 'livechat_email' ) );
 
 
126
  }
127
 
128
  return $this->login;
133
  *
134
  * @return int
135
  */
136
+ public function get_settings() {
137
+ $settings['disableMobile'] = get_option( 'livechat_disable_mobile' );
138
+ $settings['disableGuests'] = get_option( 'livechat_disable_guests' );
 
139
 
140
  return $settings;
141
  }
142
 
143
  /**
144
+ * Injects widget script code
145
  */
146
+ public function widget_script() {
147
+ try {
148
+ $token = ConnectToken::load(
149
+ Store::get_instance()->get_store_token(),
150
+ CertProvider::create()->get_stored_cert()
151
+ );
152
+ $api_url = UrlProvider::create( $token )->get_api_url();
153
+
154
+ $widget_url = sprintf(
155
+ $api_url . '/api/v1/script/%s/widget.js',
156
+ $token->get_store_uuid()
157
+ );
158
+
159
+ wp_register_script(
160
+ 'livechat-widget',
161
+ $widget_url,
162
+ array(),
163
+ $this->module->get_plugin_version(),
164
+ $in_footer = true
165
+ );
166
+ wp_enqueue_script( 'livechat-widget' );
167
+ } catch ( Exception $exception ) {
168
+ echo wp_kses(
169
+ ( new TrackingCodeHelper() )->render(),
170
+ array(
171
+ 'script' => array(
172
+ 'type' => array(),
173
+ ),
174
+ 'noscript' => array(),
175
+ 'a' => array(
176
+ 'href' => array(),
177
+ 'rel' => array(),
178
+ 'target' => array(),
179
+ ),
180
+ )
181
+ );
182
  }
183
  }
184
 
185
  /**
186
  * Checks if visitor is on mobile device.
187
+ *
188
  * @return boolean
189
  */
190
  public function check_mobile() {
191
+ $user_agent = array_key_exists( 'HTTP_USER_AGENT', $_SERVER ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '';
192
+ $regex = '/((Chrome).*(Mobile))|((Android).*)|((iPhone|iPod).*Apple.*Mobile)|((Android).*(Mobile))/i';
193
+ return preg_match( $regex, $user_agent );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  }
195
+ }
plugin_files/LiveChatAdmin.class.php CHANGED
@@ -1,410 +1,510 @@
1
  <?php
2
 
3
- require_once('LiveChat.class.php');
4
-
5
- final class LiveChatAdmin extends LiveChat
6
- {
7
- /**
8
- * Plugin's version
9
- */
10
- protected $plugin_version = null;
11
-
12
- /**
13
- * Returns true if "Advanced settings" form has just been submitted,
14
- * false otherwise
15
- *
16
- * @return bool
17
- */
18
- protected $changes_saved = false;
19
-
20
- /**
21
- * Timestamp from which review notice timeout count starts from
22
- */
23
- protected $review_notice_start_timestamp = null;
24
-
25
- /**
26
- * Timestamp offset
27
- */
28
- protected $review_notice_start_timestamp_offset = null;
29
-
30
- /**
31
- * Returns true if review notice was dismissed
32
- *
33
- * @return bool
34
- */
35
- protected $review_notice_dismissed = false;
36
-
37
- /**
38
- * Starts the plugin
39
- */
40
- protected function __construct()
41
- {
42
- parent::__construct();
43
-
44
- add_action('admin_init', array($this, 'load_translations'));
45
- add_action('admin_init', array($this, 'load_menu_icon_styles'));
46
- add_action('admin_init', array($this, 'load_general_scripts_and_styles'));
47
-
48
- // notice action
49
- if ($this->check_review_notice_conditions()) {
50
- add_action('admin_init', array($this, 'load_review_scripts_and_styles'));
51
- add_action('wp_ajax_lc_review_dismiss', array($this, 'ajax_review_dismiss'));
52
- add_action('wp_ajax_lc_review_postpone', array($this, 'ajax_review_postpone'));
53
- add_action('admin_notices', array($this, 'show_review_notice'));
54
- }
55
-
56
- if (!$this->is_installed() && !(array_key_exists('page', $_GET) && $_GET['page'] === 'livechat_settings')) {
57
- add_action('admin_notices', array($this, 'show_connect_notice'));
58
- }
59
-
60
- add_action('admin_menu', array($this, 'admin_menu'));
61
-
62
- // tricky error reporting
63
- if (defined('WP_DEBUG') && WP_DEBUG == true) {
64
- add_action('admin_init', array($this, 'error_reporting'));
65
- }
66
-
67
- add_action('admin_init', array($this, 'handle_post'));
68
-
69
- if (array_key_exists('SCRIPT_NAME', $_SERVER) && strpos($_SERVER['SCRIPT_NAME'], 'plugins.php')) {
70
- add_action('in_admin_header', array($this, 'show_deactivation_feedback_form'));
71
- }
72
- }
73
-
74
- public function handle_post() {
75
- if (
76
- current_user_can('manage_options') &&
77
- array_key_exists('nonce', $_GET) &&
78
- wp_verify_nonce($_GET['nonce'], 'livechat-security-check')
79
- ) {
80
- if (array_key_exists('reset', $_GET) && $_GET['reset'] == '1' && array_key_exists('page', $_GET) && $_GET['page'] === 'livechat_settings') {
81
- $this->reset_options();
82
- } else if (array_key_exists('REQUEST_METHOD', $_SERVER) && $_SERVER['REQUEST_METHOD'] === 'POST') {
83
- echo $this->update_options($_POST);
84
- }
85
- }
86
- }
87
-
88
- public static function get_instance()
89
- {
90
- if (!isset(self::$instance))
91
- {
92
- $c = __CLASS__;
93
- self::$instance = new $c;
94
- }
95
-
96
- return self::$instance;
97
- }
98
-
99
- /**
100
- * Make translation ready
101
- */
102
- public function load_translations()
103
- {
104
- load_plugin_textdomain(
105
- 'wp-live-chat-software-for-wordpress',
106
- false,
107
- 'wp-live-chat-software-for-wordpress/languages'
108
- );
109
- }
110
-
111
- /**
112
- * Fix CSS for icon in menu
113
- */
114
- public function load_menu_icon_styles()
115
- {
116
- wp_enqueue_style('livechat-menu', $this->get_plugin_url().'css/livechat-menu.css', false, $this->get_plugin_version());
117
- }
118
-
119
- /**
120
- * Set error reporting for debugging purposes
121
- */
122
- public function error_reporting()
123
- {
124
- error_reporting(E_ALL & ~E_USER_NOTICE);
125
- }
126
-
127
- /**
128
- * Returns this plugin's version
129
- *
130
- * @return string
131
- */
132
- public function get_plugin_version()
133
- {
134
- if (is_null($this->plugin_version))
135
- {
136
- if (!function_exists('get_plugins'))
137
- {
138
- require_once(ABSPATH.'wp-admin/includes/plugin.php');
139
- }
140
-
141
- $plugin_folder = get_plugins('/'.plugin_basename(dirname(__FILE__).'/..'));
142
- if(count($plugin_folder) === 0)
143
- $plugin_folder['livechat.php'] = get_plugin_data(dirname(__FILE__).'/../livechat.php');
144
- $this->plugin_version = $plugin_folder['livechat.php']['Version'];
145
- }
146
-
147
- return $this->plugin_version;
148
- }
149
-
150
- protected function get_review_notice_start_timestamp()
151
- {
152
- if (is_null($this->review_notice_start_timestamp))
153
- {
154
- $timestamp = get_option('livechat_review_notice_start_timestamp');
155
- // if timestamp was not set on install
156
- if (!$timestamp) {
157
- $timestamp = time();
158
- update_option('livechat_review_notice_start_timestamp', $timestamp); // set timestamp if not set on install
159
- }
160
-
161
- $this->review_notice_start_timestamp = $timestamp;
162
- }
163
-
164
- return $this->review_notice_start_timestamp;
165
- }
166
-
167
- protected function get_review_notice_start_timestamp_offset()
168
- {
169
- if (is_null($this->review_notice_start_timestamp_offset))
170
- {
171
- $offset = get_option('livechat_review_notice_start_timestamp_offset');
172
- // if offset was not set on install
173
- if (!$offset) {
174
- $offset = 16;
175
- update_option('livechat_review_notice_start_timestamp_offset', $offset); // set shorter offset
176
- }
177
-
178
- $this->review_notice_start_timestamp_offset = $offset;
179
- }
180
-
181
- return $this->review_notice_start_timestamp_offset;
182
- }
183
-
184
- protected function check_if_review_notice_was_dismissed()
185
- {
186
- if (!$this->review_notice_dismissed)
187
- {
188
- $this->review_notice_dismissed = get_option('livechat_review_notice_dismissed');
189
- }
190
-
191
- return $this->review_notice_dismissed;
192
- }
193
-
194
- protected function load_design_system_styles() {
195
- wp_register_style('livechat-source-sans-pro-font', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600');
196
- wp_register_style('livechat-material-icons', 'https://fonts.googleapis.com/icon?family=Material+Icons');
197
- wp_register_style('livechat-design-system', 'https://cdn.livechat-static.com/design-system/styles.css');
198
- wp_enqueue_style('livechat-source-sans-pro-font', false, $this->get_plugin_version());
199
- wp_enqueue_style('livechat-material-icons', false, $this->get_plugin_version());
200
- wp_enqueue_style('livechat-design-system', false, $this->get_plugin_version());
201
- }
202
-
203
- public function load_general_scripts_and_styles()
204
- {
205
- $this->load_design_system_styles();
206
- wp_enqueue_script('livechat', $this->get_plugin_url().'js/livechat.js', 'jquery', $this->get_plugin_version(), true);
207
- wp_enqueue_style('livechat', $this->get_plugin_url().'css/livechat-general.css', false, $this->get_plugin_version());
208
- }
209
-
210
- public function load_review_scripts_and_styles()
211
- {
212
- wp_enqueue_script('livechat-review', $this->get_plugin_url().'js/livechat-review.js', 'jquery', $this->get_plugin_version(), true);
213
- wp_enqueue_style('livechat-review', $this->get_plugin_url().'css/livechat-review.css', false, $this->get_plugin_version());
214
- }
215
-
216
- public function admin_menu()
217
- {
218
- add_menu_page(
219
- 'LiveChat',
220
- $this->is_installed() || (array_key_exists('page', $_GET) && $_GET['page'] === 'livechat_settings') ? 'LiveChat' : 'LiveChat <span class="awaiting-mod">!</span>',
221
- 'administrator',
222
- 'livechat',
223
- array($this, 'livechat_settings_page'),
224
- $this->get_plugin_url().'images/livechat-icon.svg'
225
- );
226
-
227
- add_submenu_page(
228
- 'livechat',
229
- __('Settings', 'wp-live-chat-software-for-wordpress'),
230
- __('Settings', 'wp-live-chat-software-for-wordpress'),
231
- 'administrator',
232
- 'livechat_settings',
233
- array($this, 'livechat_settings_page')
234
- );
235
-
236
- // remove the submenu that is automatically added
237
- if (function_exists('remove_submenu_page'))
238
- {
239
- remove_submenu_page('livechat', 'livechat');
240
- }
241
-
242
- // Settings link
243
- add_filter('plugin_action_links', array($this, 'livechat_settings_link'), 10, 2);
244
- }
245
-
246
- /**
247
- * Displays settings page
248
- */
249
- public function livechat_settings_page()
250
- {
251
- if ($this->is_installed()) {
252
- $this->get_helper( 'Settings' );
253
- } else {
254
- $this->get_helper( 'Install' );
255
- }
256
- }
257
-
258
- public function changes_saved()
259
- {
260
- return $this->changes_saved;
261
- }
262
-
263
- public function livechat_settings_link($links, $file)
264
- {
265
- if (basename($file) !== 'livechat.php')
266
- {
267
- return $links;
268
- }
269
-
270
- $settings_link = sprintf('<a href="admin.php?page=livechat_settings">%s</a>', __('Settings'));
271
- array_unshift ($links, $settings_link);
272
- return $links;
273
- }
274
-
275
- protected function reset_options()
276
- {
277
- delete_option('livechat_license_number');
278
- delete_option('livechat_email');
279
- delete_option('livechat_review_notice_start_timestamp');
280
- delete_option('livechat_review_notice_start_timestamp_offset');
281
- delete_option('livechat_disable_mobile');
282
- delete_option('livechat_disable_guests');
283
- }
284
-
285
- protected function check_review_notice_conditions()
286
- {
287
- if (!$this->check_if_review_notice_was_dismissed() && $this->check_if_license_is_active($this->get_license_number())) {
288
- $secondsInDay = 60 * 60 * 24;
289
- $noticeTimeout = time() - $this->get_review_notice_start_timestamp();
290
- $timestampOffset = $this->get_review_notice_start_timestamp_offset();
291
- if ($noticeTimeout >= $secondsInDay * $timestampOffset) {
292
- return true;
293
- }
294
- }
295
-
296
- return false;
297
- }
298
-
299
- protected function check_if_license_is_active($license_number)
300
- {
301
- if ($license_number > 0) {
302
- $url = 'https://api.livechatinc.com/v2/license/' . $license_number;
303
- try {
304
- if ( function_exists( 'curl_init' ) ) {
305
- $curl = curl_init( $url );
306
- curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
307
- $response = curl_exec( $curl );
308
- $code = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
309
- curl_close( $curl );
310
-
311
- if ( $code === 200 ) {
312
- return json_decode( $response )->license_active;
313
- } else {
314
- throw new Exception( $code );
315
- }
316
- } else if ( ini_get( 'allow_url_fopen' ) === '1' || strtolower( ini_get( 'allow_url_fopen' ) ) === 'on' ) {
317
- $options = array(
318
- 'http' => array(
319
- 'method' => 'GET'
320
- ),
321
- );
322
- $context = stream_context_create( $options );
323
- $result = file_get_contents( $url, false, $context );
324
-
325
- return json_decode( $result )->license_active;
326
- }
327
- } catch ( Exception $exception ) {
328
- error_log(
329
- 'check_if_license_is_active() error ' .
330
- $exception->getCode() .
331
- ': ' .
332
- $exception->getMessage()
333
- );
334
- }
335
- }
336
-
337
- return false;
338
- }
339
-
340
- public function show_review_notice()
341
- {
342
- $this->get_helper('ReviewNotice');
343
- }
344
-
345
- public function show_connect_notice()
346
- {
347
- $this->get_helper('ConnectNotice');
348
- }
349
-
350
- public function show_deactivation_feedback_form()
351
- {
352
- $this->get_helper('DeactivationFeedbackForm');
353
- }
354
-
355
- public function ajax_review_dismiss()
356
- {
357
- update_option('livechat_review_notice_dismissed', true);
358
- echo "OK";
359
- wp_die();
360
- }
361
-
362
- public function ajax_review_postpone()
363
- {
364
- update_option('livechat_review_notice_start_timestamp', time());
365
- update_option('livechat_review_notice_start_timestamp_offset', 7);
366
- echo "OK";
367
- wp_die();
368
- }
369
-
370
- protected function update_options($data)
371
- {
372
- if (!isset($data['licenseEmail']) || !isset($data['licenseNumber']))
373
- {
374
- if(array_key_exists('disableMobile', $data) || array_key_exists('disableGuests', $data)) {
375
- $disableMobile = array_key_exists('disableMobile', $data) ? (int) $data['disableMobile'] : 0;
376
- $disableGuests = array_key_exists('disableGuests', $data) ? (int) $data['disableGuests'] : 0;
377
-
378
- update_option('livechat_disable_mobile', $disableMobile);
379
- update_option('livechat_disable_guests', $disableGuests);
380
-
381
- $array = array(
382
- 'message' => 'success'
383
- );
384
-
385
- echo json_encode($array);
386
- die;
387
- } else {
388
- return false;
389
- }
390
-
391
- } else {
392
-
393
- $license_number = isset($data['licenseNumber']) ? (int) $data['licenseNumber'] : 0;
394
- $email = isset($data['licenseEmail']) ? (string) $data['licenseEmail'] : '';
395
-
396
- update_option('livechat_license_number', $license_number);
397
- update_option('livechat_email', sanitize_email($email));
398
-
399
- update_option('livechat_review_notice_start_timestamp', time());
400
- update_option('livechat_review_notice_start_timestamp_offset', 16);
401
-
402
- update_option('livechat_disable_mobile', 0);
403
- update_option('livechat_disable_guests', 0);
404
-
405
- if (isset($data['changes_saved']) && $data['changes_saved'] == '1') {
406
- $this->changes_saved = true;
407
- }
408
- }
409
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  }
1
  <?php
2
 
3
+ namespace LiveChat;
4
+
5
+ use Exception;
6
+ use LiveChat\Helpers\ConfirmIdentityNoticeHelper;
7
+ use LiveChat\Helpers\ConnectNoticeHelper;
8
+ use LiveChat\Helpers\ConnectServiceHelper;
9
+ use LiveChat\Helpers\DeactivationFeedbackFormHelper;
10
+ use LiveChat\Helpers\ReviewNoticeHelper;
11
+ use LiveChat\Services\ApiClient;
12
+ use LiveChat\Services\CertProvider;
13
+ use LiveChat\Services\ConnectTokenProvider;
14
+ use LiveChat\Services\Store;
15
+ use LiveChat\Services\TokenValidator;
16
+ use LiveChat\Services\User;
17
+ use WP_Error;
18
+
19
+ /**
20
+ * Class LiveChatAdmin
21
+ *
22
+ * @package LiveChat
23
+ */
24
+ final class LiveChatAdmin extends LiveChat {
25
+ /**
26
+ * Returns true if "Advanced settings" form has just been submitted,
27
+ * false otherwise
28
+ *
29
+ * @var bool
30
+ */
31
+ private $changes_saved = false;
32
+
33
+ /**
34
+ * Timestamp from which review notice timeout count starts from
35
+ *
36
+ * @var int
37
+ */
38
+ private $review_notice_start_timestamp = null;
39
+
40
+ /**
41
+ * Timestamp offset
42
+ *
43
+ * @var int
44
+ */
45
+ private $review_notice_start_timestamp_offset = null;
46
+
47
+ /**
48
+ * Returns true if review notice was dismissed
49
+ *
50
+ * @var bool
51
+ */
52
+ private $review_notice_dismissed = false;
53
+
54
+ /**
55
+ * Starts the plugin
56
+ *
57
+ * @throws Exception Can be thrown by check_notices_conditions method.
58
+ */
59
+ public function __construct() {
60
+ parent::__construct();
61
+
62
+ add_action( 'admin_init', array( $this, 'load_translations' ) );
63
+ add_action( 'admin_init', array( $this, 'load_menu_icon_styles' ) );
64
+ add_action( 'admin_init', array( $this, 'load_general_scripts_and_styles' ) );
65
+ add_action( 'admin_init', array( $this, 'inject_nonce_object' ) );
66
+
67
+ add_action( 'wp_ajax_lc_connect', array( $this, 'ajax_connect' ) );
68
+
69
+ // Notice action.
70
+ $this->check_notices_conditions();
71
+
72
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
73
+
74
+ add_action( 'admin_init', array( $this, 'handle_post' ) );
75
+
76
+ if ( array_key_exists( 'SCRIPT_NAME', $_SERVER ) && strpos( sanitize_text_field( wp_unslash( $_SERVER['SCRIPT_NAME'] ) ), 'plugins.php' ) ) {
77
+ add_action( 'in_admin_header', array( $this, 'show_deactivation_feedback_form' ) );
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Handles post.
83
+ */
84
+ public function handle_post() {
85
+ if ( current_user_can( 'manage_options' )
86
+ && array_key_exists( 'nonce', $_GET )
87
+ && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), 'livechat-security-check' )
88
+ ) {
89
+ if ( array_key_exists( 'reset', $_GET ) && '1' === $_GET['reset'] && array_key_exists( 'page', $_GET ) && 'livechat_settings' === $_GET['page'] ) {
90
+ $this->reset_options();
91
+ } elseif ( array_key_exists( 'REQUEST_METHOD', $_SERVER ) && 'POST' === $_SERVER['REQUEST_METHOD'] ) {
92
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
93
+ // Data is sanitized inside update_options method.
94
+ echo $this->update_options( $_POST );
95
+ // phpcs:enable
96
+ }
97
+ }
98
+ }
99
+
100
+ /**
101
+ * Returns instance of LiveChat class (singleton pattern).
102
+ *
103
+ * @return LiveChat
104
+ * @throws Exception Can be thrown by constructor.
105
+ */
106
+ public static function get_instance() {
107
+ if ( ! isset( static::$instance ) ) {
108
+ static::$instance = new static();
109
+ }
110
+
111
+ return static::$instance;
112
+ }
113
+
114
+ /**
115
+ * Make translation ready
116
+ */
117
+ public function load_translations() {
118
+ load_plugin_textdomain(
119
+ 'wp-live-chat-software-for-wordpress',
120
+ false,
121
+ 'wp-live-chat-software-for-wordpress/languages'
122
+ );
123
+ }
124
+
125
+ /**
126
+ * Fix CSS for icon in menu
127
+ */
128
+ public function load_menu_icon_styles() {
129
+ wp_enqueue_style( 'livechat-menu', $this->module->get_plugin_url() . 'css/livechat-menu.css', false, $this->module->get_plugin_version() );
130
+ }
131
+
132
+ /**
133
+ * Returns timestamp of review notice first occurrence.
134
+ *
135
+ * @return int
136
+ */
137
+ private function get_review_notice_start_timestamp() {
138
+ if ( is_null( $this->review_notice_start_timestamp ) ) {
139
+ $timestamp = get_option( 'livechat_review_notice_start_timestamp' );
140
+ // If timestamp was not set on install.
141
+ if ( ! $timestamp ) {
142
+ $timestamp = time();
143
+ update_option( 'livechat_review_notice_start_timestamp', $timestamp ); // Set timestamp if not set on install.
144
+ }
145
+
146
+ $this->review_notice_start_timestamp = $timestamp;
147
+ }
148
+
149
+ return $this->review_notice_start_timestamp;
150
+ }
151
+
152
+ /**
153
+ * Returns timestamp offset of review notice occurrence.
154
+ *
155
+ * @return int
156
+ */
157
+ private function get_review_notice_start_timestamp_offset() {
158
+ if ( is_null( $this->review_notice_start_timestamp_offset ) ) {
159
+ $offset = get_option( 'livechat_review_notice_start_timestamp_offset' );
160
+ // If offset was not set on install.
161
+ if ( ! $offset ) {
162
+ $offset = 16;
163
+ update_option( 'livechat_review_notice_start_timestamp_offset', $offset ); // Set shorter offset.
164
+ }
165
+
166
+ $this->review_notice_start_timestamp_offset = $offset;
167
+ }
168
+
169
+ return $this->review_notice_start_timestamp_offset;
170
+ }
171
+
172
+ /**
173
+ * Checks if review was dismissed.
174
+ *
175
+ * @return bool
176
+ */
177
+ private function check_if_review_notice_was_dismissed() {
178
+ if ( ! $this->review_notice_dismissed ) {
179
+ $this->review_notice_dismissed = get_option( 'livechat_review_notice_dismissed' );
180
+ }
181
+
182
+ return $this->review_notice_dismissed;
183
+ }
184
+
185
+ /**
186
+ * Loads CSS.
187
+ */
188
+ private function load_design_system_styles() {
189
+ // phpcs:disable WordPress.WP.EnqueuedResourceParameters.MissingVersion
190
+ // Files below don't need to be versioned.
191
+ wp_register_style( 'livechat-source-sans-pro-font', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600' );
192
+ wp_register_style( 'livechat-material-icons', 'https://fonts.googleapis.com/icon?family=Material+Icons' );
193
+ wp_register_style( 'livechat-design-system', 'https://cdn.livechat-static.com/design-system/styles.css' );
194
+ wp_enqueue_style( 'livechat-source-sans-pro-font', false, $this->module->get_plugin_version() );
195
+ wp_enqueue_style( 'livechat-material-icons', false, $this->module->get_plugin_version() );
196
+ wp_enqueue_style( 'livechat-design-system', false, $this->module->get_plugin_version() );
197
+ // phpcs:enable
198
+ }
199
+
200
+ /**
201
+ * Loads JS scripts and CSS.
202
+ */
203
+ public function load_general_scripts_and_styles() {
204
+ $this->load_design_system_styles();
205
+ wp_enqueue_script( 'livechat', $this->module->get_plugin_url() . 'js/livechat.js', 'jquery', $this->module->get_plugin_version(), true );
206
+ wp_enqueue_style( 'livechat', $this->module->get_plugin_url() . 'css/livechat-general.css', false, $this->module->get_plugin_version() );
207
+ wp_enqueue_script( 'bridge', $this->module->get_plugin_url() . 'js/connect.js', 'jquery', $this->module->get_plugin_version(), false );
208
+ }
209
+
210
+ /**
211
+ * Adds nonce value to AJAX object in JS script.
212
+ */
213
+ public function inject_nonce_object() {
214
+ $nonce = array(
215
+ 'value' => wp_create_nonce( 'wp_ajax_lc_connect' ),
216
+ );
217
+
218
+ wp_localize_script( 'bridge', 'ajax_nonce', $nonce );
219
+ }
220
+
221
+ /**
222
+ * Loads scripts and CSS for review modal.
223
+ */
224
+ public function load_review_scripts_and_styles() {
225
+ wp_enqueue_script( 'livechat-review', $this->module->get_plugin_url() . 'js/livechat-review.js', 'jquery', $this->module->get_plugin_version(), true );
226
+ wp_enqueue_style( 'livechat-review', $this->module->get_plugin_url() . 'css/livechat-review.css', false, $this->module->get_plugin_version() );
227
+ }
228
+
229
+ /**
230
+ * Adds LiveChat to WP administrator menu.
231
+ */
232
+ public function admin_menu() {
233
+ add_menu_page(
234
+ 'LiveChat',
235
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
236
+ // This is not a form's processing.
237
+ $this->is_installed() || ( array_key_exists( 'page', $_GET ) && 'livechat_settings' === $_GET['page'] ) ? 'LiveChat' : 'LiveChat <span class="awaiting-mod">!</span>',
238
+ // phpcs:enable
239
+ 'administrator',
240
+ 'livechat',
241
+ array( $this, 'livechat_settings_page' ),
242
+ $this->module->get_plugin_url() . 'images/livechat-icon.svg'
243
+ );
244
+
245
+ add_submenu_page(
246
+ 'livechat',
247
+ __( 'Settings', 'wp-live-chat-software-for-wordpress' ),
248
+ __( 'Settings', 'wp-live-chat-software-for-wordpress' ),
249
+ 'administrator',
250
+ 'livechat_settings',
251
+ array( $this, 'livechat_settings_page' )
252
+ );
253
+
254
+ // Remove the submenu that is automatically added.
255
+ if ( function_exists( 'remove_submenu_page' ) ) {
256
+ remove_submenu_page( 'livechat', 'livechat' );
257
+ }
258
+
259
+ // Settings link.
260
+ add_filter( 'plugin_action_links', array( $this, 'livechat_settings_link' ), 10, 2 );
261
+ }
262
+
263
+ /**
264
+ * Displays settings page
265
+ */
266
+ public function livechat_settings_page() {
267
+ ConnectServiceHelper::create()->render();
268
+ }
269
+
270
+ /**
271
+ * Returns flag changes_saved.
272
+ *
273
+ * @return bool
274
+ */
275
+ public function changes_saved() {
276
+ return $this->changes_saved;
277
+ }
278
+
279
+ /**
280
+ * Returns link to LiveChat setting page.
281
+ *
282
+ * @param array $links Array with links.
283
+ * @param string $file File name.
284
+ *
285
+ * @return mixed
286
+ */
287
+ public function livechat_settings_link( $links, $file ) {
288
+ if ( basename( $file ) !== 'livechat.php' ) {
289
+ return $links;
290
+ }
291
+
292
+ $settings_link = sprintf( '<a href="admin.php?page=livechat_settings">%s</a>', __( 'Settings' ) );
293
+ array_unshift( $links, $settings_link );
294
+ return $links;
295
+ }
296
+
297
+ /**
298
+ * Deletes options set by LiveChat plugin.
299
+ */
300
+ private function reset_options() {
301
+ delete_option( 'livechat_license_number' );
302
+ delete_option( 'livechat_email' );
303
+ delete_option( 'livechat_review_notice_start_timestamp' );
304
+ delete_option( 'livechat_review_notice_start_timestamp_offset' );
305
+ delete_option( 'livechat_disable_mobile' );
306
+ delete_option( 'livechat_disable_guests' );
307
+ }
308
+
309
+ /**
310
+ * Checks if review notice should be visible.
311
+ *
312
+ * @return bool
313
+ * @throws Exception Can be thrown by check_if_license_is_active.
314
+ */
315
+ private function check_review_notice_conditions() {
316
+ if ( $this->is_installed() && ! $this->check_if_review_notice_was_dismissed() && $this->check_if_license_is_active() ) {
317
+ $seconds_in_day = 60 * 60 * 24;
318
+ $notice_timeout = time() - $this->get_review_notice_start_timestamp();
319
+ $timestamp_offset = $this->get_review_notice_start_timestamp_offset();
320
+ if ( $notice_timeout >= $seconds_in_day * $timestamp_offset ) {
321
+ return true;
322
+ }
323
+ }
324
+
325
+ return false;
326
+ }
327
+
328
+ /**
329
+ * Checks if any notice should be displayed.
330
+ *
331
+ * @throws Exception Can be throw by is_installed method.
332
+ */
333
+ private function check_notices_conditions() {
334
+ if ( $this->check_review_notice_conditions() ) {
335
+ add_action( 'admin_init', array( $this, 'load_review_scripts_and_styles' ) );
336
+ add_action( 'wp_ajax_lc_review_dismiss', array( $this, 'ajax_review_dismiss' ) );
337
+ add_action( 'wp_ajax_lc_review_postpone', array( $this, 'ajax_review_postpone' ) );
338
+ add_action( 'admin_notices', array( $this, 'show_review_notice' ) );
339
+ }
340
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
341
+ // This is not a form's processing.
342
+ if ( ! $this->is_installed() && ! ( array_key_exists( 'page', $_GET ) && 'livechat_settings' === $_GET['page'] ) ) {
343
+ // phpcs:enable
344
+ if ( $this->has_license_number() ) {
345
+ add_action( 'admin_notices', array( $this, 'show_confirm_identity_notice' ) );
346
+ } else {
347
+ add_action( 'admin_notices', array( $this, 'show_connect_notice' ) );
348
+ }
349
+ }
350
+ }
351
+
352
+ /**
353
+ * Checks if LiveChat license is active.
354
+ *
355
+ * @return mixed
356
+ * @throws Exceptions\ApiClientException Can be thrown by ApiClient.
357
+ * @throws Exceptions\InvalidTokenException Can be throw by ConnectTokenProvider.
358
+ */
359
+ private function check_if_license_is_active() {
360
+ $store = Store::get_instance();
361
+ $connect_token = ConnectTokenProvider::create( CertProvider::create() )->get( $store->get_store_token(), 'store' );
362
+ return ApiClient::create( $connect_token )->license_info()['isActive'];
363
+ }
364
+
365
+ /**
366
+ * Shows review notice.
367
+ */
368
+ public function show_review_notice() {
369
+ ( new ReviewNoticeHelper() )->render();
370
+ }
371
+
372
+ /**
373
+ * Shows connect notice.
374
+ */
375
+ public function show_connect_notice() {
376
+ ( new ConnectNoticeHelper() )->render();
377
+ }
378
+
379
+ /**
380
+ * Shows confirm identity notice.
381
+ */
382
+ public function show_confirm_identity_notice() {
383
+ ( new ConfirmIdentityNoticeHelper() )->render();
384
+ }
385
+
386
+ /**
387
+ * Shows deactivation feedback form.
388
+ */
389
+ public function show_deactivation_feedback_form() {
390
+ ( new DeactivationFeedbackFormHelper() )->render();
391
+ }
392
+
393
+ /**
394
+ * Marks review as dismissed in WP options.
395
+ */
396
+ public function ajax_review_dismiss() {
397
+ update_option( 'livechat_review_notice_dismissed', true );
398
+ echo 'OK';
399
+ wp_die();
400
+ }
401
+
402
+ /**
403
+ * Marks review as postponed in WP options.
404
+ */
405
+ public function ajax_review_postpone() {
406
+ update_option( 'livechat_review_notice_start_timestamp', time() );
407
+ update_option( 'livechat_review_notice_start_timestamp_offset', 7 );
408
+ echo 'OK';
409
+ wp_die();
410
+ }
411
+
412
+ /**
413
+ * Connects WP plugin with LiveChat account.
414
+ * Validates tokens and, if they are valid, stores them in WP database.
415
+ */
416
+ public function ajax_connect() {
417
+ $user_token = null;
418
+ $store_token = null;
419
+
420
+ check_ajax_referer( 'wp_ajax_lc_connect', 'security' );
421
+
422
+ if ( array_key_exists( 'user_token', $_POST ) && array_key_exists( 'store_token', $_POST ) && array_key_exists( 'security', $_POST ) ) {
423
+ $user_token = sanitize_text_field( wp_unslash( $_POST['user_token'] ) );
424
+ $store_token = sanitize_text_field( wp_unslash( $_POST['store_token'] ) );
425
+ }
426
+
427
+ try {
428
+ TokenValidator::create( CertProvider::create() )->validate_tokens( $user_token, $store_token );
429
+ User::get_instance()->authorize_current_user( $user_token );
430
+ Store::get_instance()->authorize_store( $store_token );
431
+ delete_option( 'livechat_license_number' );
432
+ delete_option( 'livechat_email' );
433
+
434
+ wp_send_json_success( array( 'status' => 'ok' ) );
435
+ } catch ( Exception $e ) {
436
+ wp_send_json_error(
437
+ new WP_Error( $e->getCode(), $e->getMessage() )
438
+ );
439
+ }
440
+ }
441
+
442
+ /**
443
+ * Removes all LiveChat data stored in WP database.
444
+ * It's called as uninstall hook.
445
+ *
446
+ * @throws Exceptions\ApiClientException Can be thrown by ApiClient.
447
+ * @throws Exceptions\InvalidTokenException Can be thrown by ConnectTokenProvider.
448
+ */
449
+ public static function uninstall_hook_handler() {
450
+ $store = Store::get_instance();
451
+
452
+ if ( ! empty( $store->get_store_token() ) ) {
453
+ $connect_token = ConnectTokenProvider::create( CertProvider::create() )->get( $store->get_store_token(), 'store' );
454
+ ApiClient::create( $connect_token )->uninstall();
455
+ $store->remove_store_data();
456
+ }
457
+
458
+ User::get_instance()->remove_authorized_users();
459
+ CertProvider::create()->remove_stored_cert();
460
+
461
+ delete_option( 'livechat_review_notice_start_timestamp' );
462
+ delete_option( 'livechat_review_notice_start_timestamp_offset' );
463
+ delete_option( 'livechat_disable_mobile' );
464
+ delete_option( 'livechat_disable_guests' );
465
+ }
466
+
467
+ /**
468
+ * Updates options
469
+ *
470
+ * @param array $data Options to set.
471
+ *
472
+ * @return bool
473
+ */
474
+ private function update_options( $data ) {
475
+ if ( ! isset( $data['licenseEmail'] ) || ! isset( $data['licenseNumber'] ) ) {
476
+ if ( array_key_exists( 'disableMobile', $data ) || array_key_exists( 'disableGuests', $data ) ) {
477
+ $disable_mobile = array_key_exists( 'disableMobile', $data ) ? (int) $data['disableMobile'] : 0;
478
+ $disable_guests = array_key_exists( 'disableGuests', $data ) ? (int) $data['disableGuests'] : 0;
479
+
480
+ update_option( 'livechat_disable_mobile', $disable_mobile );
481
+ update_option( 'livechat_disable_guests', $disable_guests );
482
+
483
+ $array = array(
484
+ 'message' => 'success',
485
+ );
486
+
487
+ wp_send_json( $array );
488
+ } else {
489
+ return false;
490
+ }
491
+ } else {
492
+
493
+ $license_number = isset( $data['licenseNumber'] ) ? (int) $data['licenseNumber'] : 0;
494
+ $email = isset( $data['licenseEmail'] ) ? (string) $data['licenseEmail'] : '';
495
+
496
+ update_option( 'livechat_license_number', $license_number );
497
+ update_option( 'livechat_email', sanitize_email( $email ) );
498
+
499
+ update_option( 'livechat_review_notice_start_timestamp', time() );
500
+ update_option( 'livechat_review_notice_start_timestamp_offset', 16 );
501
+
502
+ update_option( 'livechat_disable_mobile', 0 );
503
+ update_option( 'livechat_disable_guests', 0 );
504
+
505
+ if ( isset( $data['changes_saved'] ) && '1' === $data['changes_saved'] ) {
506
+ $this->changes_saved = true;
507
+ }
508
+ }
509
+ }
510
  }
plugin_files/Services/ApiClient.class.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ApiClient
4
+ *
5
+ * @package LiveChat/Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ use GuzzleHttp\Client;
11
+ use GuzzleHttp\Exception\GuzzleException;
12
+ use LiveChat\Exceptions\ApiClientException;
13
+ use LiveChat\Exceptions\ErrorCodes;
14
+
15
+ /**
16
+ * Class ApiClient
17
+ *
18
+ * @package LiveChat\Services
19
+ */
20
+ class ApiClient {
21
+ /**
22
+ * Instance of ApiClient (singleton pattern)
23
+ *
24
+ * @var ApiClient|null
25
+ */
26
+ public static $instance = null;
27
+
28
+ /**
29
+ * URL of API server
30
+ *
31
+ * @var string
32
+ */
33
+ private $api_url;
34
+
35
+ /**
36
+ * Authorization token
37
+ *
38
+ * @var ConnectToken
39
+ */
40
+ private $connect_token = null;
41
+
42
+ /**
43
+ * HTTP client
44
+ *
45
+ * @var Client|null
46
+ */
47
+ private $client = null;
48
+
49
+ /**
50
+ * ApiClient constructor.
51
+ *
52
+ * @param Client $client HTTP client instance.
53
+ * @param string $api_url API url string.
54
+ * @param ConnectToken $connect_token ConnectToken instance.
55
+ */
56
+ public function __construct( $client, $api_url, $connect_token ) {
57
+ $this->client = $client;
58
+ $this->api_url = $api_url;
59
+ $this->connect_token = $connect_token;
60
+ }
61
+
62
+ /**
63
+ * Returns default headers
64
+ *
65
+ * @return array
66
+ */
67
+ private function headers() {
68
+ return array(
69
+ 'Accept' => 'application/json',
70
+ 'Platform' => 'wordpress',
71
+ 'Authorization' => sprintf( 'Bearer %s', $this->connect_token->get_token() ),
72
+ );
73
+ }
74
+
75
+ /**
76
+ * Returns full request url for given endpoint and API version
77
+ *
78
+ * @param string $endpoint API endpoint.
79
+ * @param string|null $api_version API version.
80
+ *
81
+ * @return string
82
+ */
83
+ private function get_request_url( $endpoint, $api_version = null ) {
84
+ return $this->api_url
85
+ . '/api/'
86
+ . ( $api_version ?: $this->connect_token->get_api_version() )
87
+ . '/'
88
+ . $endpoint;
89
+ }
90
+
91
+ /**
92
+ * Gets RSA public key from backend
93
+ *
94
+ * @return bool|string
95
+ * @throws ApiClientException Can be thrown from make_request method.
96
+ */
97
+ public function get_cert() {
98
+ $options = array(
99
+ 'headers' => array(
100
+ 'Accept' => 'application/x-pem-file',
101
+ 'Platform' => 'wordpress',
102
+ ),
103
+ );
104
+
105
+ return $this->make_request( 'GET', 'certs/jwt.pem', $options, 'v1', false );
106
+ }
107
+
108
+
109
+ /**
110
+ * Gets store info.
111
+ *
112
+ * @return array
113
+ * @throws ApiClientException Can be thrown from make_request method.
114
+ */
115
+ public function store_info() {
116
+ return $this->make_request( 'GET', 'store/info' );
117
+ }
118
+
119
+ /**
120
+ * Gets info about LiveChat license.
121
+ *
122
+ * @return array
123
+ * @throws ApiClientException Can be thrown from make_request method.
124
+ */
125
+ public function license_info() {
126
+ return $this->make_request( 'GET', 'license/info' );
127
+ }
128
+
129
+ /**
130
+ * Uninstalls site in Connect service
131
+ *
132
+ * @return array
133
+ * @throws ApiClientException Can be thrown from make_request method.
134
+ */
135
+ public function uninstall() {
136
+ return $this->make_request( 'POST', 'uninstall' );
137
+ }
138
+
139
+ /**
140
+ * Performs a request
141
+ *
142
+ * @param string $method HTTP method.
143
+ * @param string $endpoint API endpoint.
144
+ * @param array $options Request options.
145
+ * @param string|null $api_version API version.
146
+ * @param bool $with_authorization Check if user is authorized flag.
147
+ *
148
+ * @return array|string
149
+ * @throws ApiClientException Thrown on GuzzleException.
150
+ */
151
+ public function make_request( $method, $endpoint, $options = array(), $api_version = null, $with_authorization = true ) {
152
+ if ( $with_authorization && ! $this->connect_token->has_token() ) {
153
+ throw new ApiClientException( 'Missing auth token', ErrorCodes::$missing_auth_token );
154
+ }
155
+
156
+ if ( ! array_key_exists( 'headers', $options ) ) {
157
+ $options['headers'] = $this->headers();
158
+ }
159
+
160
+ try {
161
+ $response = $this->client->request(
162
+ $method,
163
+ $this->get_request_url( $endpoint, $api_version ),
164
+ $options
165
+ );
166
+
167
+ if ( strpos( $response->getHeaderLine( 'Content-Type' ), 'application/json' ) !== false ) {
168
+ return json_decode( $response->getBody(), true );
169
+ }
170
+
171
+ return $response->getBody()->getContents();
172
+ } catch ( GuzzleException $exception ) {
173
+ throw new ApiClientException( $exception->getMessage(), ErrorCodes::$http_client_error, $exception );
174
+ }
175
+ }
176
+
177
+ /**
178
+ * Returns instance of ApiClient
179
+ *
180
+ * @param ConnectToken $connect_token ConnectToken instance.
181
+ *
182
+ * @return ApiClient
183
+ */
184
+ public static function create( $connect_token = null ) {
185
+ return new ApiClient(
186
+ new Client(),
187
+ UrlProvider::create( $connect_token )->get_api_url(),
188
+ is_null( $connect_token ) ? new ConnectToken() : $connect_token
189
+ );
190
+ }
191
+ }
plugin_files/Services/CertProvider.class.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class CertProvider
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ use LiveChat\Exceptions\ApiClientException;
11
+
12
+ /**
13
+ * Class CertProvider
14
+ *
15
+ * @package LiveChat\Services
16
+ */
17
+ class CertProvider {
18
+
19
+ /**
20
+ * Public RSA key
21
+ *
22
+ * @var string|null
23
+ */
24
+ private $cert = null;
25
+
26
+ /**
27
+ * Instance of ApiClient class
28
+ *
29
+ * @var ApiClient|null
30
+ */
31
+ private $api_client = null;
32
+
33
+ /**
34
+ * CertProvider constructor.
35
+ *
36
+ * @param ApiClient $api_client ApiClient instance.
37
+ * @param string|null $cert RSA public key.
38
+ */
39
+ public function __construct( $api_client, $cert = null ) {
40
+ $this->cert = $cert;
41
+ $this->api_client = $api_client;
42
+ }
43
+
44
+ /**
45
+ * Returns RSA public key
46
+ *
47
+ * @return string
48
+ * @throws ApiClientException Can be thrown from get_cert method.
49
+ */
50
+ public function get_stored_cert() {
51
+ if ( is_null( $this->cert ) ) {
52
+ $cert = get_option( 'livechat_public_key' );
53
+ if ( ! $cert ) {
54
+ $cert = $this->api_client->get_cert();
55
+ update_option( 'livechat_public_key', $cert );
56
+ }
57
+
58
+ $this->cert = $cert;
59
+ }
60
+
61
+ return $this->cert;
62
+ }
63
+
64
+ /**
65
+ * Removes public RSA key from WP database
66
+ *
67
+ * @return bool
68
+ */
69
+ public function remove_stored_cert() {
70
+ return delete_option( 'livechat_public_key' );
71
+ }
72
+
73
+ /**
74
+ * Returns new instance of CertProvider
75
+ *
76
+ * @param string|null $cert RSA public key used to verify token.
77
+ *
78
+ * @return CertProvider
79
+ */
80
+ public static function create( $cert = null ) {
81
+ return new CertProvider( ApiClient::create(), $cert );
82
+ }
83
+ }
plugin_files/Services/ConnectToken.class.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ConnectToken
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ use Exception;
11
+ use Firebase\JWT\JWT;
12
+
13
+ /**
14
+ * Class ConnectToken
15
+ *
16
+ * @package LiveChat\Services
17
+ */
18
+ class ConnectToken {
19
+ /**
20
+ * JWT token string
21
+ *
22
+ * @var string|null $token
23
+ */
24
+ private $token = null;
25
+
26
+ /**
27
+ * JWT data object
28
+ *
29
+ * @var object|null $decoded_token
30
+ */
31
+ private $decoded_token = null;
32
+
33
+ /**
34
+ * Decodes and sets JWT
35
+ *
36
+ * @param string $token JWT token string.
37
+ * @param string $cert JWT public key.
38
+ *
39
+ * @throws Exception Any exception that could be thrown from JWT::decode.
40
+ */
41
+ private function set_token( $token, $cert ) {
42
+ $this->token = $token;
43
+ $this->decoded_token = JWT::decode( $token, $cert, array( 'RS256' ) );
44
+ }
45
+
46
+ /**
47
+ * Checks if JWT token is set
48
+ *
49
+ * @return bool
50
+ */
51
+ public function has_token() {
52
+ return (bool) $this->token;
53
+ }
54
+
55
+ /**
56
+ * Returns JWT token string
57
+ *
58
+ * @return string
59
+ */
60
+ public function get_token() {
61
+ return $this->has_token() ? $this->token : null;
62
+ }
63
+
64
+ /**
65
+ * Gets a property from JWT data object
66
+ *
67
+ * @param string $key JWT data object property key name.
68
+ *
69
+ * @return mixed
70
+ */
71
+ private function get_from_token( $key ) {
72
+ return $this->decoded_token && property_exists( $this->decoded_token, $key )
73
+ ? $this->decoded_token->{$key}
74
+ : null;
75
+ }
76
+
77
+ /**
78
+ * Gets API region from JWT data object
79
+ *
80
+ * @return string|null
81
+ */
82
+ public function get_api_region() {
83
+ return $this->get_from_token( 'apiRegion' );
84
+ }
85
+
86
+ /**
87
+ * Gets API version from JWT data object
88
+ *
89
+ * @return string|null
90
+ */
91
+ public function get_api_version() {
92
+ return $this->get_from_token( 'apiVersion' );
93
+ }
94
+
95
+ /**
96
+ * Gets store UUID from JWT data object
97
+ *
98
+ * @return string|null
99
+ */
100
+ public function get_store_uuid() {
101
+ return $this->get_from_token( 'storeUUID' );
102
+ }
103
+
104
+ /**
105
+ * Gets user UUID from JWT data object
106
+ *
107
+ * @return string|null
108
+ */
109
+ public function get_user_uuid() {
110
+ return $this->get_from_token( 'userUUID' );
111
+ }
112
+
113
+ /**
114
+ * Creates ConnectToken instance
115
+ *
116
+ * @param string $token JWT token string.
117
+ * @param string $cert Public key for given JWT token.
118
+ *
119
+ * @return ConnectToken
120
+ * @throws Exception Any exception that could be thrown from JWT::decode.
121
+ */
122
+ public static function load( $token, $cert ) {
123
+ $instance = new ConnectToken();
124
+ $instance->set_token( $token, $cert );
125
+
126
+ return $instance;
127
+ }
128
+ }
plugin_files/Services/ConnectTokenProvider.class.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace LiveChat\Services;
4
+
5
+ use LiveChat\Exceptions\ApiClientException;
6
+ use LiveChat\Exceptions\InvalidTokenException;
7
+
8
+ /**
9
+ * Class ConnectTokenProvider
10
+ *
11
+ * @package LiveChat\Services
12
+ */
13
+ class ConnectTokenProvider {
14
+ /**
15
+ * Instance of CertProvider
16
+ *
17
+ * @var CertProvider
18
+ */
19
+ private $cert_provider = null;
20
+
21
+ /**
22
+ * Instance of TokenValidator
23
+ *
24
+ * @var TokenValidator
25
+ */
26
+ private $token_validator = null;
27
+
28
+ /**
29
+ * ConnectTokenProvider constructor.
30
+ *
31
+ * @param CertProvider $cert_provider Instance of CertProvider.
32
+ * @param TokenValidator $token_validator Instance of TokenValidator.
33
+ */
34
+ public function __construct( $cert_provider, $token_validator ) {
35
+ $this->cert_provider = $cert_provider;
36
+ $this->token_validator = $token_validator;
37
+ }
38
+
39
+ /**
40
+ * Returns ConnectToken if user token is valid
41
+ *
42
+ * @param string $token JWT token.
43
+ * @param string $token_type Type of JWT token (could be store or user).
44
+ *
45
+ * @return ConnectToken
46
+ * @throws ApiClientException Can be thrown by get_stored_cert method.
47
+ * @throws InvalidTokenException Can be thrown by get_stored_cert method.
48
+ */
49
+ public function get( $token, $token_type = 'user' ) {
50
+ if ( 'store' === $token_type ) {
51
+ $this->token_validator->validate_store_token( $token );
52
+ } else {
53
+ $this->token_validator->validate_user_token( $token );
54
+ }
55
+
56
+ return ConnectToken::load(
57
+ $token,
58
+ $this->cert_provider->get_stored_cert()
59
+ );
60
+ }
61
+
62
+ /**
63
+ * Returns new instance of ConnectTokenProvider
64
+ *
65
+ * @param CertProvider $cert_provider Instance of CertProvider.
66
+ *
67
+ * @return static
68
+ */
69
+ public static function create( $cert_provider ) {
70
+ return new static(
71
+ $cert_provider,
72
+ TokenValidator::create( $cert_provider )
73
+ );
74
+ }
75
+ }
plugin_files/Services/ModuleConfiguration.class.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ModuleConfiguration
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ /**
11
+ * Class ModuleConfiguration
12
+ *
13
+ * @package LiveChat\Services
14
+ */
15
+ final class ModuleConfiguration {
16
+ /**
17
+ * Instance of ModuleConfiguration (singleton pattern)
18
+ *
19
+ * @var null
20
+ */
21
+ private static $instance = null;
22
+
23
+ /**
24
+ * WordPress site's url
25
+ *
26
+ * @var string
27
+ */
28
+ private $site_url;
29
+
30
+ /**
31
+ * Plugin's url
32
+ *
33
+ * @var string
34
+ */
35
+ private $plugin_url;
36
+
37
+ /**
38
+ * WordPress version
39
+ *
40
+ * @var string
41
+ */
42
+ private $wp_version;
43
+
44
+ /**
45
+ * Plugins version
46
+ *
47
+ * @var string
48
+ */
49
+ private $plugin_version;
50
+
51
+ /**
52
+ * RSA public key for tokens validation
53
+ *
54
+ * @var string
55
+ */
56
+ private $cert;
57
+
58
+ /**
59
+ * ModuleConfiguration constructor.
60
+ */
61
+ public function __construct() {
62
+ global $wp_version;
63
+
64
+ $this->wp_version = $wp_version;
65
+ }
66
+
67
+ /**
68
+ * Returns WordPress version
69
+ *
70
+ * @return string
71
+ */
72
+ public function get_wp_version() {
73
+ return $this->wp_version;
74
+ }
75
+
76
+ /**
77
+ * Returns plugin files absolute path
78
+ *
79
+ * @return string
80
+ */
81
+ public function get_plugin_url() {
82
+ if ( is_null( $this->plugin_url ) ) {
83
+ $this->plugin_url = plugin_dir_url( __DIR__ . '..' );
84
+ }
85
+
86
+ return $this->plugin_url;
87
+ }
88
+
89
+ /**
90
+ * Returns site's url
91
+ *
92
+ * @return string
93
+ */
94
+ public function get_site_url() {
95
+ if ( is_null( $this->site_url ) ) {
96
+ $this->site_url = get_site_url();
97
+ }
98
+
99
+ return $this->site_url;
100
+ }
101
+
102
+ /**
103
+ * Returns this plugin's version
104
+ *
105
+ * @return string
106
+ */
107
+ public function get_plugin_version() {
108
+ if ( is_null( $this->plugin_version ) ) {
109
+ $this->plugin_version = get_file_data( __DIR__ . '/../../livechat.php', array( 'Version' ) )[0];
110
+ }
111
+
112
+ return $this->plugin_version;
113
+ }
114
+
115
+ /**
116
+ * Returns frontend url with specified API region.
117
+ *
118
+ * @param string $region API region.
119
+ *
120
+ * @return string
121
+ */
122
+ public function get_app_url( $region = 'us' ) {
123
+ return sprintf(
124
+ 'https://connect.livechatinc.com/%s/wordpress',
125
+ $region
126
+ );
127
+ }
128
+
129
+ /**
130
+ * Returns new instance of ModuleConfiguration class
131
+ *
132
+ * @return ModuleConfiguration
133
+ */
134
+ public static function get_instance() {
135
+ if ( ! isset( static::$instance ) ) {
136
+ static::$instance = new static();
137
+ }
138
+
139
+ return static::$instance;
140
+ }
141
+ }
plugin_files/Services/Store.class.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Store
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ /**
11
+ * Class Store
12
+ *
13
+ * @package LiveChat\Services
14
+ */
15
+ class Store {
16
+ /**
17
+ * Instance of Store class (singleton pattern)
18
+ *
19
+ * @var Store
20
+ */
21
+ private static $instance = null;
22
+
23
+ /**
24
+ * Saves store token in WP database
25
+ *
26
+ * @param string $store_token JWT store token.
27
+ *
28
+ * @return bool
29
+ */
30
+ public function authorize_store( $store_token ) {
31
+ return update_option( 'livechat_store_token', $store_token );
32
+ }
33
+
34
+ /**
35
+ * Removes store token from WP database
36
+ *
37
+ * @return bool
38
+ */
39
+ public function remove_store_data() {
40
+ return delete_option( 'livechat_store_token' );
41
+ }
42
+
43
+ /**
44
+ * Returns store token if is saved in WP database
45
+ *
46
+ * @return string
47
+ */
48
+ public function get_store_token() {
49
+ $store_token = get_option( 'livechat_store_token' );
50
+ if ( ! $store_token ) {
51
+ return '';
52
+ }
53
+
54
+ return $store_token;
55
+ }
56
+
57
+ /**
58
+ * Returns new instance of User class
59
+ *
60
+ * @return Store
61
+ */
62
+ public static function get_instance() {
63
+ if ( ! isset( static::$instance ) ) {
64
+ static::$instance = new static();
65
+ }
66
+
67
+ return static::$instance;
68
+ }
69
+ }
plugin_files/Services/TokenValidator.class.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class TokenValidator
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ use Exception;
11
+ use LiveChat\Exceptions\ApiClientException;
12
+ use LiveChat\Exceptions\InvalidTokenException;
13
+
14
+ /**
15
+ * Class TokenValidator
16
+ *
17
+ * @package LiveChat\Services
18
+ */
19
+ class TokenValidator {
20
+
21
+ /**
22
+ * Public key
23
+ *
24
+ * @var string|null
25
+ */
26
+ private $cert_provider = null;
27
+
28
+ /**
29
+ * ConnectTokenProvider constructor.
30
+ *
31
+ * @param CertProvider $cert_provider Instance of CertProvider.
32
+ */
33
+ public function __construct( $cert_provider ) {
34
+ $this->cert_provider = $cert_provider;
35
+ }
36
+
37
+ /**
38
+ * Checks if given token is valid JWT token.
39
+ *
40
+ * @param string $token JWT token to validate.
41
+ *
42
+ * @return ConnectToken|null
43
+ */
44
+ private function validate_jwt_token( $token ) {
45
+ try {
46
+ return ConnectToken::load(
47
+ $token,
48
+ $this->cert_provider->get_stored_cert()
49
+ );
50
+ } catch ( Exception $exception ) {
51
+ return null;
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Validates signed store token
57
+ *
58
+ * @param string $store_token JWT store token.
59
+ *
60
+ * @throws InvalidTokenException Can be thrown if store_token is incorrect.
61
+ */
62
+ public function validate_store_token( $store_token ) {
63
+ $decoded_store_token = $this->validate_jwt_token( $store_token );
64
+
65
+ if ( is_null( $decoded_store_token ) || ! $decoded_store_token->get_store_uuid() ) {
66
+ throw InvalidTokenException::store();
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Verifies signed user token.
72
+ *
73
+ * @param string $user_token JWT user token.
74
+ *
75
+ * @throws InvalidTokenException Can be thrown if user_token is incorrect.
76
+ */
77
+ public function validate_user_token( $user_token ) {
78
+ $decoded_user_token = $this->validate_jwt_token( $user_token );
79
+
80
+ if ( is_null( $decoded_user_token ) || ! $decoded_user_token->get_user_uuid() ) {
81
+ throw InvalidTokenException::user();
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Validates user and store tokens
87
+ *
88
+ * @param string $user_token User JWT token.
89
+ * @param string $store_token Store JWT token.
90
+ *
91
+ * @return bool
92
+ * @throws InvalidTokenException|ApiClientException Can be thrown by validation methods.
93
+ */
94
+ public function validate_tokens( $user_token, $store_token ) {
95
+ $this->validate_user_token( $user_token );
96
+ $this->validate_store_token( $store_token );
97
+
98
+ return true;
99
+ }
100
+
101
+ /**
102
+ * Returns new instance of TokenValidator
103
+ *
104
+ * @param CertProvider $cert_provider CertProvider instance.
105
+ *
106
+ * @return TokenValidator
107
+ */
108
+ public static function create( $cert_provider ) {
109
+ return new static( $cert_provider );
110
+ }
111
+ }
plugin_files/Services/UrlProvider.class.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class UrlProvider
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ /**
11
+ * Class UrlProvider
12
+ */
13
+ class UrlProvider {
14
+ /**
15
+ * Instance of ConnectTokenProvider.
16
+ *
17
+ * @var ConnectToken|null
18
+ */
19
+ private $connect_token = null;
20
+
21
+ /**
22
+ * Format for API url.
23
+ *
24
+ * @var string
25
+ */
26
+ private $api_url_format = 'https://%s.livechatinc.com';
27
+
28
+ /**
29
+ * Format for frontend url.
30
+ *
31
+ * @var string
32
+ */
33
+ private $app_url_format = 'https://connect.livechatinc.com/%s/wordpress';
34
+
35
+ /**
36
+ * UrlProvider constructor.
37
+ *
38
+ * @param ConnectToken|null $connect_token Instance of ConnectTokenProvider.
39
+ */
40
+ public function __construct( $connect_token = null ) {
41
+ $this->connect_token = $connect_token;
42
+ }
43
+
44
+ /**
45
+ * Returns frontend url based on ConnectToken (if exists) or returns default url.
46
+ *
47
+ * @return string
48
+ */
49
+ public function get_app_url() {
50
+ return sprintf(
51
+ $this->app_url_format,
52
+ is_null( $this->connect_token ) ? 'us' : $this->connect_token->get_api_region()
53
+ );
54
+ }
55
+
56
+ /**
57
+ * Returns api url based on ConnectToken (if exists) or returns default url.
58
+ *
59
+ * @return string
60
+ */
61
+ public function get_api_url() {
62
+ if ( is_null( $this->connect_token ) ) {
63
+ return sprintf( $this->api_url_format, 'connect' );
64
+ }
65
+
66
+ return sprintf(
67
+ $this->api_url_format,
68
+ $this->connect_token->get_api_region() === 'us' ? 'connect' : 'connect-eu'
69
+ );
70
+ }
71
+
72
+ /**
73
+ * Returns new instance of UrlProvider class.
74
+ *
75
+ * @param ConnectToken|null $connect_token Instance of ConnectToken.
76
+ *
77
+ * @return $this
78
+ */
79
+ public static function create( $connect_token = null ) {
80
+ return new static( $connect_token );
81
+ }
82
+ }
plugin_files/Services/User.class.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class User
4
+ *
5
+ * @package LiveChat\Services
6
+ */
7
+
8
+ namespace LiveChat\Services;
9
+
10
+ /**
11
+ * Class User
12
+ */
13
+ class User {
14
+ /**
15
+ * Instance of User class (singleton pattern)
16
+ *
17
+ * @var null
18
+ */
19
+ private static $instance = null;
20
+
21
+ /**
22
+ * Currently logged in user data
23
+ *
24
+ * @var null
25
+ */
26
+ private $current_user = null;
27
+
28
+ /**
29
+ * User constructor.
30
+ */
31
+ public function __construct() {
32
+ $this->current_user = wp_get_current_user();
33
+ }
34
+
35
+ /**
36
+ * Checks if visitor is logged in
37
+ *
38
+ * @return boolean
39
+ */
40
+ public function check_logged() {
41
+ if ( property_exists( $this->current_user->data, 'ID' ) ) {
42
+ return true;
43
+ }
44
+ return false;
45
+ }
46
+
47
+ /**
48
+ * Get visitor's name and email
49
+ *
50
+ * @return array
51
+ */
52
+ public function get_user_data() {
53
+ $email = '';
54
+ $name = '';
55
+
56
+ if ( ! empty( $this->current_user->user_email ) ) {
57
+ $email = $this->current_user->user_email;
58
+ }
59
+
60
+ if ( ! empty( $this->current_user->user_firstname ) && ! empty( $this->current_user->user_lastname ) ) {
61
+ $name = $this->current_user->user_firstname . ' ' . $this->current_user->user_lastname;
62
+ } else {
63
+ $name = $this->current_user->user_login;
64
+ }
65
+
66
+ return array(
67
+ 'name' => $name,
68
+ 'email' => $email,
69
+ );
70
+ }
71
+
72
+ /**
73
+ * Return array of users authorized in LiveChat
74
+ *
75
+ * @return array|null
76
+ */
77
+ private function get_authorized_users() {
78
+ $authorized_users = get_option( 'livechat_authorized_users' );
79
+ if ( ! $authorized_users ) {
80
+ return null;
81
+ }
82
+
83
+ return array_values(
84
+ array_filter( explode( ',', $authorized_users ) )
85
+ );
86
+ }
87
+
88
+ /**
89
+ * Stores user token in WP database
90
+ *
91
+ * @param int $user_id User's id.
92
+ * @param string $token User authorization token.
93
+ *
94
+ * @return bool
95
+ */
96
+ private function set_user_token( $user_id, $token ) {
97
+ return update_option( 'livechat_user_' . $user_id . '_token', $token );
98
+ }
99
+
100
+ /**
101
+ * Removes token for given user from WP database
102
+ *
103
+ * @param int $user_id User's id.
104
+ *
105
+ * @return bool
106
+ */
107
+ private function remove_user_token( $user_id ) {
108
+ return delete_option( 'livechat_user_' . $user_id . '_token' );
109
+ }
110
+
111
+ /**
112
+ * Removes all users tokens from WP database
113
+ */
114
+ public function remove_authorized_users() {
115
+ $authorized_users = $this->get_authorized_users();
116
+
117
+ foreach ( $authorized_users as $user_id ) {
118
+ $this->remove_user_token( $user_id );
119
+ }
120
+
121
+ delete_option( 'livechat_authorized_users' );
122
+ }
123
+
124
+ /**
125
+ * Stores user token in WP database and adds user to list of users
126
+ * authorized in LiveChat.
127
+ *
128
+ * @param string $user_token User authorization token.
129
+ *
130
+ * @return bool
131
+ */
132
+ public function authorize_current_user( $user_token ) {
133
+ $authorized_users = $this->get_authorized_users();
134
+ $user_id = $this->current_user->ID;
135
+ $authorized_users[] = $user_id;
136
+ return update_option(
137
+ 'livechat_authorized_users',
138
+ implode( ',', $authorized_users )
139
+ ) && $this->set_user_token( $user_id, $user_token );
140
+ }
141
+
142
+ /**
143
+ * Returns token of current user
144
+ *
145
+ * @return mixed|string|void
146
+ */
147
+ public function get_current_user_token() {
148
+ $user_id = $this->current_user->ID;
149
+
150
+ $user_token = get_option( 'livechat_user_' . $user_id . '_token' );
151
+ if ( ! $user_token ) {
152
+ return '';
153
+ }
154
+
155
+ return $user_token;
156
+ }
157
+
158
+ /**
159
+ * Returns new instance of User class
160
+ *
161
+ * @return User
162
+ */
163
+ public static function get_instance() {
164
+ if ( ! isset( static::$instance ) ) {
165
+ static::$instance = new static();
166
+ }
167
+
168
+ return static::$instance;
169
+ }
170
+ }
plugin_files/css/livechat-general.css CHANGED
@@ -7,6 +7,7 @@
7
  .lc-table {
8
  padding-top: 50px;
9
  width: 100%;
 
10
  margin: 0;
11
  display: flex;
12
  flex-flow: row nowrap;
@@ -22,6 +23,22 @@
22
  box-sizing: border-box;
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  .lc-table img {
26
  max-width: 100%;
27
  }
@@ -304,8 +321,8 @@ p.lc-meta-text {
304
  }
305
 
306
  .lc-notice-column {
307
- min-width: 100px;
308
- padding: 0 10px 0 5px;
309
  }
310
 
311
  .lc-notice-logo {
@@ -325,26 +342,26 @@ p.lc-meta-text {
325
  }
326
 
327
  #lc-connect-notice-button-column {
328
- display: flex;
329
- flex-grow: 1;
330
- flex-flow: row nowrap;
331
- justify-content: flex-end;
332
- margin-right: 20px;
333
  padding-right: 0;
334
  }
335
 
336
  @media screen and (max-width: 539px) {
337
- .lc-notice {
338
- flex-wrap: wrap;
339
- }
340
 
341
  .lc-notice-logo {
342
  display: none;
343
  }
344
 
345
- #lc-connect-notice-button-column {
346
- justify-content: flex-start;
347
- }
348
  }
349
 
350
  /* Deactivation Feedback Form */
7
  .lc-table {
8
  padding-top: 50px;
9
  width: 100%;
10
+ height: 100%;
11
  margin: 0;
12
  display: flex;
13
  flex-flow: row nowrap;
23
  box-sizing: border-box;
24
  }
25
 
26
+ #lc-container {
27
+ padding-top: 50px;
28
+ padding-bottom: 10px;
29
+ height: 75vh;
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: center;
33
+ justify-content: center;
34
+ }
35
+
36
+ #lc-container > iframe {
37
+ width: 100%;
38
+ height: 100%;
39
+ box-sizing: content-box;
40
+ }
41
+
42
  .lc-table img {
43
  max-width: 100%;
44
  }
321
  }
322
 
323
  .lc-notice-column {
324
+ min-width: 100px;
325
+ padding: 0 10px 0 5px;
326
  }
327
 
328
  .lc-notice-logo {
342
  }
343
 
344
  #lc-connect-notice-button-column {
345
+ display: flex;
346
+ flex-grow: 1;
347
+ flex-flow: row nowrap;
348
+ justify-content: flex-end;
349
+ margin-right: 20px;
350
  padding-right: 0;
351
  }
352
 
353
  @media screen and (max-width: 539px) {
354
+ .lc-notice {
355
+ flex-wrap: wrap;
356
+ }
357
 
358
  .lc-notice-logo {
359
  display: none;
360
  }
361
 
362
+ #lc-connect-notice-button-column {
363
+ justify-content: flex-start;
364
+ }
365
  }
366
 
367
  /* Deactivation Feedback Form */
plugin_files/css/livechat-menu.css CHANGED
@@ -1,3 +1,3 @@
1
  a.toplevel_page_livechat div.wp-menu-image.dashicons-before img {
2
- padding: 6px 0 0 2px !important;
3
- }
1
  a.toplevel_page_livechat div.wp-menu-image.dashicons-before img {
2
+ padding: 6px 0 0 2px !important;
3
+ }
plugin_files/css/livechat-review.css CHANGED
@@ -1,39 +1,39 @@
1
  /* Review Notice */
2
 
3
  #lc-review-notice-actions {
4
- margin: 5px auto;
5
- display: flex;
6
- flex-flow: row nowrap;
7
- justify-content: flex-start;
8
- align-content: center;
9
  }
10
 
11
  .lc-review-notice-action {
12
- text-decoration: none;
13
- padding: 0 16px 0 8px;
14
- margin: 5px;
15
  }
16
 
17
  .lc-review-notice-action:first-of-type {
18
- margin-left: 0;
19
  }
20
 
21
  .lc-review-notice-action:last-of-type {
22
- margin-right: 0;
23
  }
24
 
25
  .lc-review-notice-action span {
26
- margin-left: 6px;
27
  }
28
 
29
  @media screen and (max-width: 635px) {
30
- #lc-review-notice-actions {
31
- flex-flow: column wrap;
32
- align-content: flex-start;
33
- align-items: baseline;
34
- }
35
 
36
- .lc-review-notice-action {
37
- margin: 3px 0;
38
- }
39
  }
1
  /* Review Notice */
2
 
3
  #lc-review-notice-actions {
4
+ margin: 5px auto;
5
+ display: flex;
6
+ flex-flow: row nowrap;
7
+ justify-content: flex-start;
8
+ align-content: center;
9
  }
10
 
11
  .lc-review-notice-action {
12
+ text-decoration: none;
13
+ padding: 0 16px 0 8px;
14
+ margin: 5px;
15
  }
16
 
17
  .lc-review-notice-action:first-of-type {
18
+ margin-left: 0;
19
  }
20
 
21
  .lc-review-notice-action:last-of-type {
22
+ margin-right: 0;
23
  }
24
 
25
  .lc-review-notice-action span {
26
+ margin-left: 6px;
27
  }
28
 
29
  @media screen and (max-width: 635px) {
30
+ #lc-review-notice-actions {
31
+ flex-flow: column wrap;
32
+ align-content: flex-start;
33
+ align-items: baseline;
34
+ }
35
 
36
+ .lc-review-notice-action {
37
+ margin: 3px 0;
38
+ }
39
  }
plugin_files/helpers/ConnectNoticeHelper.class.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- require_once('LiveChatHelper.class.php');
4
-
5
- class ConnectNoticeHelper extends LiveChatHelper
6
- {
7
- public function render()
8
- {
9
- ?>
10
- <div class="lc-design-system-typography notice notice-info lc-notice" id="lc-connect-notice">
11
- <div class="lc-notice-column">
12
- <img class="lc-notice-logo" src="<?php echo plugins_url('wp-live-chat-software-for-wordpress').'/plugin_files/images/livechat-logo.svg'; ?>" alt="LiveChat logo" />
13
- </div>
14
- <div class="lc-notice-column">
15
- <p id="lc-connect-notice-header">
16
- <?php _e('Action required - connect LiveChat', 'wp-live-chat-software-for-wordpress') ?>
17
- </p>
18
- <p>
19
- <?php _e('Please') ;?>
20
- <a href="admin.php?page=livechat_settings"><?php _e('connect your LiveChat account'); ?></a>
21
- <?php _e('to start chatting with your customers.', 'wp-live-chat-software-for-wordpress'); ?>
22
- </p>
23
- </div>
24
- <div class="lc-notice-column" id="lc-connect-notice-button-column">
25
- <p>
26
- <button class="lc-btn lc-btn--primary" id="lc-connect-notice-button" type="button">
27
- <?php _e('Connect', 'wp-live-chat-software-for-wordpress'); ?>
28
- </button>
29
- </p>
30
- </div>
31
- </div>
32
- <?php
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/helpers/DeactivationFeedbackFormHelper.class.php DELETED
@@ -1,170 +0,0 @@
1
- <?php
2
-
3
- require_once( 'LiveChatHelper.class.php' );
4
-
5
- class DeactivationFeedbackFormHelper extends LiveChatHelper {
6
- public function render() {
7
-
8
- $wp_user = LiveChat::get_instance()->get_user_data();
9
- $license_id = LiveChat::get_instance()->get_license_number();
10
-
11
- ?>
12
- <div class="lc-design-system-typography lc-modal-base__overlay" id="lc-deactivation-feedback-modal-overlay" style="display: none">
13
- <div class="lc-modal-base" id="lc-deactivation-feedback-modal-container">
14
- <button title="<?php _e('Cancel', 'wp-live-chat-software-for-wordpress') ?>" class="lc-modal-base__close">
15
- <svg
16
- xmlns="http://www.w3.org/2000/svg"
17
- width="24px"
18
- height="24px"
19
- viewBox="0 0 24 24"
20
- fill="#424D57"
21
- class="material material-close-icon undefined"
22
- >
23
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
24
- </svg>
25
- </button>
26
- <div class="lc-modal__header">
27
- <div class="lc-modal__heading" id="lc-deactivation-feedback-modal-heading">
28
- <img
29
- id="lc-deactivation-feedback-logo"
30
- alt="LiveChat logo"
31
- src="<?php echo plugins_url('wp-live-chat-software-for-wordpress').'/plugin_files/images/livechat-logo.svg'; ?>"
32
- />
33
- <h2 id="lc-deactivation-feedback-modal-title">
34
- <?php _e('Quick Feedback', 'wp-live-chat-software-for-wordpress') ?>
35
- </h2>
36
- </div>
37
- </div>
38
- <div class="lc-modal__body">
39
- <form
40
- action="#"
41
- method="post"
42
- id="lc-deactivation-feedback-form"
43
- >
44
- <div role="group" class="lc-form-group">
45
- <div class="lc-form-group__header">
46
- <div class="lc-form-group__label">
47
- <?php _e('If you have a moment, please let us know why you are deactivating LiveChat:', 'wp-live-chat-software-for-wordpress') ?>
48
- </div>
49
- </div>
50
- <div class="lc-field-group">
51
- <div class="lc-radio">
52
- <label class="lc-radio__label">
53
- <div class="lc-radio__circle">
54
- <span class="lc-radio__inner-circle"></span>
55
- <input
56
- type="radio"
57
- class="lc-radio__input"
58
- value="I no longer need the plugin."
59
- name="lc-deactivation-feedback-option"
60
- />
61
- </div>
62
- <div class="lc-radio__text">
63
- <?php _e('I no longer need the plugin.', 'wp-live-chat-software-for-wordpress') ?>
64
- </div>
65
- </label>
66
- </div>
67
- <div class="lc-radio">
68
- <label class="lc-radio__label">
69
- <div class="lc-radio__circle">
70
- <span class="lc-radio__inner-circle"></span>
71
- <input
72
- type="radio"
73
- class="lc-radio__input"
74
- value="I couldn't get the plugin to work."
75
- name="lc-deactivation-feedback-option"
76
- />
77
- </div>
78
- <div class="lc-radio__text">
79
- <?php _e("I couldn't get the plugin to work.", 'wp-live-chat-software-for-wordpress') ?>
80
- </div>
81
- </label>
82
- </div>
83
- <div class="lc-radio">
84
- <label class="lc-radio__label">
85
- <div class="lc-radio__circle">
86
- <span class="lc-radio__inner-circle"></span>
87
- <input
88
- type="radio"
89
- class="lc-radio__input"
90
- value="I found a better plugin."
91
- name="lc-deactivation-feedback-option"
92
- />
93
- </div>
94
- <div class="lc-radio__text">
95
- <?php _e('I found a better plugin.', 'wp-live-chat-software-for-wordpress') ?>
96
- </div>
97
- </label>
98
- </div>
99
- <div class="lc-radio">
100
- <label class="lc-radio__label">
101
- <div class="lc-radio__circle">
102
- <span class="lc-radio__inner-circle"></span>
103
- <input
104
- type="radio"
105
- class="lc-radio__input"
106
- value="It's a temporary deactivation."
107
- name="lc-deactivation-feedback-option"
108
- />
109
- </div>
110
- <div class="lc-radio__text">
111
- <?php _e("It's a temporary deactivation.", 'wp-live-chat-software-for-wordpress') ?>
112
- </div>
113
- </label>
114
- </div>
115
- <div class="lc-radio">
116
- <label class="lc-radio__label">
117
- <div class="lc-radio__circle">
118
- <span class="lc-radio__inner-circle"></span>
119
- <input
120
- type="radio"
121
- class="lc-radio__input"
122
- value="Other"
123
- name="lc-deactivation-feedback-option"
124
- id="lc-deactivation-feedback-option-other"
125
- />
126
- </div>
127
- <div class="lc-radio__text">
128
- <?php _e('Other', 'wp-live-chat-software-for-wordpress') ?>
129
- </div>
130
- </label>
131
- </div>
132
- <div class="lc-text-field" id="lc-deactivation-feedback-other-field">
133
- <div>
134
- <textarea
135
- class="lc-textarea"
136
- placeholder="<?php _e('Tell us more...', 'wp-live-chat-software-for-wordpress') ?>"
137
- ></textarea>
138
- </div>
139
- </div>
140
- <span class="lc-field-error" id="lc-deactivation-feedback-form-option-error">
141
- <?php _e('Please choose one of available options.', 'wp-live-chat-software-for-wordpress') ?>
142
- </span>
143
- <span class="lc-field-error" id="lc-deactivation-feedback-form-other-error">
144
- <?php _e('Please provide additional feedback.', 'wp-live-chat-software-for-wordpress') ?>
145
- </span>
146
- </div>
147
- </div>
148
- </form>
149
- <script>
150
- window.deactivationDetails = window.deactivationDetails || {};
151
- window.deactivationDetails = {
152
- license: <?php echo htmlspecialchars($license_id); ?>,
153
- name: '<?php echo htmlspecialchars($wp_user['name']); ?>',
154
- wpEmail: '<?php echo htmlspecialchars($wp_user['email']); ?>'
155
- };
156
- </script>
157
- </div>
158
- <div class="lc-modal__footer">
159
- <button class="lc-btn" id="lc-deactivation-feedback-modal-skip-btn">
160
- <?php _e('Skip & continue', 'wp-live-chat-software-for-wordpress') ?>
161
- </button>
162
- <button class="lc-btn lc-btn--primary" id="lc-deactivation-feedback-modal-submit-btn">
163
- <?php _e('Send feedback', 'wp-live-chat-software-for-wordpress') ?>
164
- </button>
165
- </div>
166
- </div>
167
- </div>
168
- <?php
169
- }
170
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/helpers/InstallHelper.class.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- require_once('LiveChatHelper.class.php');
4
-
5
- class InstallHelper extends LiveChatHelper {
6
- public function add_nonce() {
7
- echo '&nonce=' . wp_create_nonce('livechat-security-check');
8
- }
9
-
10
- public function render() {
11
- $user = LiveChat::get_instance()->get_user_data();
12
- $url = get_site_url();
13
-
14
- ?>
15
- <div class="lc-design-system-typography lc-table">
16
- <div class="lc-column">
17
- <p id="lc-plus-wp">
18
- <img src="<?php echo plugins_url('wp-live-chat-software-for-wordpress'); ?>/plugin_files/images/lc-plus-wp.png" srcset="<?php echo plugins_url('wp-live-chat-software-for-wordpress'); ?>/plugin_files/images/lc-plus-wp.png, <?php echo plugins_url('wp-live-chat-software-for-wordpress'); ?>/plugin_files/images/lc-plus-wp@2x.png 2x" alt="LiveChat for Wordpress">
19
- </p>
20
- <p>
21
- <iframe id="login-with-livechat" src="https://addons.livechatinc.com/sign-in-with-livechat/wordpress/?designSystem=1&popupRoute=signup&partner_id=wordpress&utm_source=wordpress.org&utm_medium=integration&utm_campaign=wordpress_plugin&email=<?php echo urlencode($user['email']); ?>&name=<?php echo urlencode($user['name']); ?>&url=<?php echo urlencode($url) ?>" > </iframe>
22
- </p>
23
- <form id="licenseForm" action="?page=livechat_settings&actionType=install<?php $this->add_nonce(); ?>" method="post">
24
- <input type="hidden" name="licenseEmail" id="licenseEmail">
25
- <input type="hidden" name="licenseNumber" id="licenseNumber">
26
- </form>
27
- </div>
28
- <div class="lc-column">
29
- <p>
30
- <img src="<?php echo plugins_url('wp-live-chat-software-for-wordpress').'/plugin_files/images/lc-app.png'; ?>" alt="LiveChat apps" id="lc-app-img">
31
- </p>
32
- <p>
33
- <?php _e('Check out our apps for', 'wp-live-chat-software-for-wordpress'); ?>
34
- <a href="https://www.livechatinc.com/applications/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=wordpress_plugin" target="_blank">
35
- <?php _e('desktop or mobile!', 'wp-live-chat-software-for-wordpress'); ?>
36
- </a>
37
- </p>
38
- </div>
39
- </div>
40
- <?php
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/helpers/LiveChatHelper.class.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- abstract class LiveChatHelper
4
- {
5
- abstract public function render();
6
- }
 
 
 
 
 
 
plugin_files/helpers/ReviewNoticeHelper.class.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- require_once('LiveChatHelper.class.php');
4
-
5
- class ReviewNoticeHelper extends LiveChatHelper
6
- {
7
- public function render()
8
- {
9
- ?>
10
- <div class="lc-design-system-typography lc-notice notice notice-info is-dismissible" id="lc-review-notice">
11
- <div class="lc-notice-column">
12
- <img class="lc-notice-logo" src="<?php echo plugins_url('wp-live-chat-software-for-wordpress').'/plugin_files/images/livechat-logo.svg'; ?>" alt="LiveChat logo" />
13
- </div>
14
- <div class="lc-notice-column">
15
- <p><?php _e('Hey, you’ve been using <strong>LiveChat</strong> for more than 14 days - that’s awesome! Could you please do us a BIG favour and <strong>give LiveChat a 5-star rating on WordPress</strong>? Just to help us spread the word and boost our motivation.', 'wp-live-chat-software-for-wordpress'); ?></p>
16
- <p><?php _e('<strong>&ndash; The LiveChat Team</strong>'); ?></p>
17
- <div id="lc-review-notice-actions">
18
- <a href="https://wordpress.org/support/plugin/wp-live-chat-software-for-wordpress/reviews/#new-post" target="_blank" class="lc-review-notice-action lc-btn lc-btn--compact lc-btn--primary" id="lc-review-now">
19
- <i class="material-icons">thumb_up</i> <span><?php _e('Ok, you deserve it', 'wp-live-chat-software-for-wordpress'); ?></span>
20
- </a>
21
- <a href="#" class="lc-review-notice-action lc-btn lc-btn--compact" id="lc-review-postpone">
22
- <i class="material-icons">schedule</i> <span><?php _e('Maybe later', 'wp-live-chat-software-for-wordpress'); ?></span>
23
- </a>
24
- <a href="#" class="lc-review-notice-action lc-btn lc-btn--compact" id="lc-review-dismiss">
25
- <i class="material-icons">not_interested</i> <span><?php _e('No, thanks', 'wp-live-chat-software-for-wordpress'); ?></span>
26
- </a>
27
- </div>
28
- </div>
29
- </div>
30
- <?php
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/helpers/SettingsHelper.class.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
-
3
- require_once('LiveChatHelper.class.php');
4
-
5
- class SettingsHelper extends LiveChatHelper
6
- {
7
- public function add_nonce() {
8
- echo '&nonce=' . wp_create_nonce('livechat-security-check');
9
- }
10
-
11
- public function render()
12
- {
13
-
14
- $license_email = LiveChat::get_instance()->get_login();
15
- $license_id = LiveChat::get_instance()->get_license_number();
16
- $settings = LiveChat::get_instance()->get_settings();
17
-
18
- if (isset($_GET['actionType']) && $_GET['actionType'] === 'install') { ?>
19
- <div class="updated installed">
20
- <p>
21
- <?php _e('LiveChat is now installed on your website!', 'wp-live-chat-software-for-wordpress'); ?>
22
- </p>
23
- <span id="installed-close">x</span>
24
- </div>
25
- <?php } ?>
26
- <div class="lc-design-system-typography lc-table">
27
- <div class="lc-column">
28
- <p id="lc-plus-wp">
29
- <img src="<?php echo plugins_url('wp-live-chat-software-for-wordpress'); ?>/plugin_files/images/lc-plus-wp.png" srcset="<?php echo plugins_url('wp-live-chat-software-for-wordpress'); ?>/plugin_files/images/lc-plus-wp.png, <?php echo plugins_url('wp-live-chat-software-for-wordpress'); ?>/plugin_files/images/lc-plus-wp@2x.png 2x" alt="LiveChat for Wordpress">
30
- </p>
31
- <p>
32
- <?php _e('Currently you are using your', 'wp-live-chat-software-for-wordpress'); ?><br>
33
- <strong><?php echo $license_email ?></strong><br>
34
- <?php _e('LiveChat account.', 'wp-live-chat-software-for-wordpress'); ?>
35
- </p>
36
- <p id="lc-webapp">
37
- <a href="https://my.livechatinc.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=wordpress_plugin" target="_blank">
38
- <button class="lc-btn lc-btn--primary">
39
- <?php _e('Open web application', 'wp-live-chat-software-for-wordpress'); ?>
40
- </button>
41
- </a>
42
- </p>
43
- <div class="settings">
44
- <div>
45
- <div class="title">
46
- <span><?php _e('Hide chat on mobile', 'wp-live-chat-software-for-wordpress'); ?></span>
47
- </div>
48
- <div class="onoffswitch">
49
- <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disableMobile" <?php echo ($settings['disableMobile']) ? 'checked': '' ?>>
50
- <label class="onoffswitch-label" for="disableMobile">
51
- <span class="onoffswitch-inner"></span>
52
- <span class="onoffswitch-switch"></span>
53
- </label>
54
- </div>
55
- </div>
56
- <div>
57
- <div class="title">
58
- <span><?php _e('Hide chat for Guest visitors', 'wp-live-chat-software-for-wordpress'); ?></span>
59
- </div>
60
- <div class="onoffswitch">
61
- <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disableGuests" <?php echo ($settings['disableGuests']) ? 'checked': '' ?>>
62
- <label class="onoffswitch-label" for="disableGuests">
63
- <span class="onoffswitch-inner"></span>
64
- <span class="onoffswitch-switch"></span>
65
- </label>
66
- </div>
67
- </div>
68
- </div>
69
- <iframe id="login-with-livechat" src="https://addons.livechatinc.com/sign-in-with-livechat" style="display: none"></iframe>
70
- <p class="lc-meta-text">
71
- <?php _e('Something went wrong?', 'wp-live-chat-software-for-wordpress'); ?> <a id="resetAccount" href="?page=livechat_settings&reset=1<?php $this->add_nonce(); ?>" style="display: inline-block">
72
- <?php _e('Disconect your account.', 'wp-live-chat-software-for-wordpress'); ?>
73
- </a>
74
- </p>
75
- </div>
76
- <div class="lc-column">
77
- <p>
78
- <img src="<?php echo plugins_url('wp-live-chat-software-for-wordpress').'/plugin_files/images/lc-app.png'; ?>" alt="LiveChat apps" id="lc-app-img">
79
- </p>
80
- <p>
81
- <?php _e('Check out our apps for', 'wp-live-chat-software-for-wordpress'); ?>
82
- <a href="https://www.livechatinc.com/applications/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=wordpress_plugin" target="_blank">
83
- <?php _e('desktop or mobile!', 'wp-live-chat-software-for-wordpress'); ?>
84
- </a>
85
- </p>
86
- </div>
87
- <script>
88
- var lcDetails = {
89
- license: <?php echo htmlspecialchars($license_id); ?>,
90
- email: '<?php echo htmlspecialchars($license_email); ?>',
91
- nonce: '<?php $this->add_nonce(); ?>'
92
- }
93
- </script>
94
- </div>
95
- <?php
96
- }
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/images/livechat-icon.svg CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve" width="22" height="22">
5
  <style type="text/css">
6
  .st0{fill:#313131;}
7
  .st1{fill:#FFFFFF;}
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
4
+ viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve" width="22" height="22">
5
  <style type="text/css">
6
  .st0{fill:#313131;}
7
  .st1{fill:#FFFFFF;}
plugin_files/js/connect.js ADDED
@@ -0,0 +1,812 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Version: "2.2.0"
2
+ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"MVLi":[function(require,module,exports) {
3
+ var global = arguments[3];
4
+ var t=arguments[3],o="object",e=function(t){return t&&t.Math==Math&&t};module.exports=e(typeof globalThis==o&&globalThis)||e(typeof window==o&&window)||e(typeof self==o&&self)||e(typeof t==o&&t)||Function("return this")();
5
+ },{}],"pWu7":[function(require,module,exports) {
6
+ module.exports=function(r){try{return!!r()}catch(t){return!0}};
7
+ },{}],"A8Ob":[function(require,module,exports) {
8
+ var e=require("../internals/fails");module.exports=!e(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a});
9
+ },{"../internals/fails":"pWu7"}],"sC3y":[function(require,module,exports) {
10
+ "use strict";var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);exports.f=t?function(r){var t=e(this,r);return!!t&&t.enumerable}:r;
11
+ },{}],"oNyT":[function(require,module,exports) {
12
+ module.exports=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}};
13
+ },{}],"jUdy":[function(require,module,exports) {
14
+ var r={}.toString;module.exports=function(t){return r.call(t).slice(8,-1)};
15
+ },{}],"Nn1j":[function(require,module,exports) {
16
+ var r=require("../internals/fails"),e=require("../internals/classof-raw"),t="".split;module.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(r){return"String"==e(r)?t.call(r,""):Object(r)}:Object;
17
+ },{"../internals/fails":"pWu7","../internals/classof-raw":"jUdy"}],"RWPB":[function(require,module,exports) {
18
+ module.exports=function(o){if(null==o)throw TypeError("Can't call method on "+o);return o};
19
+ },{}],"eb/r":[function(require,module,exports) {
20
+ var e=require("../internals/indexed-object"),r=require("../internals/require-object-coercible");module.exports=function(i){return e(r(i))};
21
+ },{"../internals/indexed-object":"Nn1j","../internals/require-object-coercible":"RWPB"}],"AsqF":[function(require,module,exports) {
22
+ module.exports=function(o){return"object"==typeof o?null!==o:"function"==typeof o};
23
+ },{}],"wZyz":[function(require,module,exports) {
24
+ var t=require("../internals/is-object");module.exports=function(r,e){if(!t(r))return r;var n,o;if(e&&"function"==typeof(n=r.toString)&&!t(o=n.call(r)))return o;if("function"==typeof(n=r.valueOf)&&!t(o=n.call(r)))return o;if(!e&&"function"==typeof(n=r.toString)&&!t(o=n.call(r)))return o;throw TypeError("Can't convert object to primitive value")};
25
+ },{"../internals/is-object":"AsqF"}],"j/yd":[function(require,module,exports) {
26
+ var r={}.hasOwnProperty;module.exports=function(e,n){return r.call(e,n)};
27
+ },{}],"3tvd":[function(require,module,exports) {
28
+
29
+ var e=require("../internals/global"),r=require("../internals/is-object"),t=e.document,n=r(t)&&r(t.createElement);module.exports=function(e){return n?t.createElement(e):{}};
30
+ },{"../internals/global":"MVLi","../internals/is-object":"AsqF"}],"nSk9":[function(require,module,exports) {
31
+ var e=require("../internals/descriptors"),r=require("../internals/fails"),n=require("../internals/document-create-element");module.exports=!e&&!r(function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a});
32
+ },{"../internals/descriptors":"A8Ob","../internals/fails":"pWu7","../internals/document-create-element":"3tvd"}],"6zm/":[function(require,module,exports) {
33
+ var e=require("../internals/descriptors"),r=require("../internals/object-property-is-enumerable"),i=require("../internals/create-property-descriptor"),t=require("../internals/to-indexed-object"),n=require("../internals/to-primitive"),s=require("../internals/has"),a=require("../internals/ie8-dom-define"),o=Object.getOwnPropertyDescriptor;exports.f=e?o:function(e,c){if(e=t(e),c=n(c,!0),a)try{return o(e,c)}catch(u){}if(s(e,c))return i(!r.f.call(e,c),e[c])};
34
+ },{"../internals/descriptors":"A8Ob","../internals/object-property-is-enumerable":"sC3y","../internals/create-property-descriptor":"oNyT","../internals/to-indexed-object":"eb/r","../internals/to-primitive":"wZyz","../internals/has":"j/yd","../internals/ie8-dom-define":"nSk9"}],"2eAP":[function(require,module,exports) {
35
+ var r=require("../internals/is-object");module.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e};
36
+ },{"../internals/is-object":"AsqF"}],"AtXZ":[function(require,module,exports) {
37
+ var e=require("../internals/descriptors"),r=require("../internals/ie8-dom-define"),i=require("../internals/an-object"),t=require("../internals/to-primitive"),n=Object.defineProperty;exports.f=e?n:function(e,o,s){if(i(e),o=t(o,!0),i(s),r)try{return n(e,o,s)}catch(u){}if("get"in s||"set"in s)throw TypeError("Accessors not supported");return"value"in s&&(e[o]=s.value),e};
38
+ },{"../internals/descriptors":"A8Ob","../internals/ie8-dom-define":"nSk9","../internals/an-object":"2eAP","../internals/to-primitive":"wZyz"}],"mnM5":[function(require,module,exports) {
39
+ var r=require("../internals/descriptors"),e=require("../internals/object-define-property"),t=require("../internals/create-property-descriptor");module.exports=r?function(r,n,i){return e.f(r,n,t(1,i))}:function(r,e,t){return r[e]=t,r};
40
+ },{"../internals/descriptors":"A8Ob","../internals/object-define-property":"AtXZ","../internals/create-property-descriptor":"oNyT"}],"ScNd":[function(require,module,exports) {
41
+
42
+ var r=require("../internals/global"),e=require("../internals/hide");module.exports=function(n,t){try{e(r,n,t)}catch(i){r[n]=t}return t};
43
+ },{"../internals/global":"MVLi","../internals/hide":"mnM5"}],"tGwT":[function(require,module,exports) {
44
+ module.exports=!1;
45
+ },{}],"1B1y":[function(require,module,exports) {
46
+
47
+ var r=require("../internals/global"),e=require("../internals/set-global"),i=require("../internals/is-pure"),o="__core-js_shared__",s=r[o]||e(o,{});(module.exports=function(r,e){return s[r]||(s[r]=void 0!==e?e:{})})("versions",[]).push({version:"3.2.1",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"});
48
+ },{"../internals/global":"MVLi","../internals/set-global":"ScNd","../internals/is-pure":"tGwT"}],"GWmL":[function(require,module,exports) {
49
+ var n=require("../internals/shared");module.exports=n("native-function-to-string",Function.toString);
50
+ },{"../internals/shared":"1B1y"}],"Z7Ix":[function(require,module,exports) {
51
+
52
+ var e=require("../internals/global"),t=require("../internals/function-to-string"),n=e.WeakMap;module.exports="function"==typeof n&&/native code/.test(t.call(n));
53
+ },{"../internals/global":"MVLi","../internals/function-to-string":"GWmL"}],"bxyG":[function(require,module,exports) {
54
+ var o=0,r=Math.random();module.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++o+r).toString(36)};
55
+ },{}],"OIOG":[function(require,module,exports) {
56
+ var e=require("../internals/shared"),r=require("../internals/uid"),n=e("keys");module.exports=function(e){return n[e]||(n[e]=r(e))};
57
+ },{"../internals/shared":"1B1y","../internals/uid":"bxyG"}],"Ln6o":[function(require,module,exports) {
58
+ module.exports={};
59
+ },{}],"vLSK":[function(require,module,exports) {
60
+
61
+ var e,r,n,t=require("../internals/native-weak-map"),i=require("../internals/global"),u=require("../internals/is-object"),a=require("../internals/hide"),l=require("../internals/has"),o=require("../internals/shared-key"),s=require("../internals/hidden-keys"),c=i.WeakMap,f=function(t){return n(t)?r(t):e(t,{})},q=function(e){return function(n){var t;if(!u(n)||(t=r(n)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(t){var h=new c,d=h.get,p=h.has,v=h.set;e=function(e,r){return v.call(h,e,r),r},r=function(e){return d.call(h,e)||{}},n=function(e){return p.call(h,e)}}else{var g=o("state");s[g]=!0,e=function(e,r){return a(e,g,r),r},r=function(e){return l(e,g)?e[g]:{}},n=function(e){return l(e,g)}}module.exports={set:e,get:r,has:n,enforce:f,getterFor:q};
62
+ },{"../internals/native-weak-map":"Z7Ix","../internals/global":"MVLi","../internals/is-object":"AsqF","../internals/hide":"mnM5","../internals/has":"j/yd","../internals/shared-key":"OIOG","../internals/hidden-keys":"Ln6o"}],"ztZs":[function(require,module,exports) {
63
+
64
+ var e=require("../internals/global"),n=require("../internals/shared"),t=require("../internals/hide"),r=require("../internals/has"),i=require("../internals/set-global"),o=require("../internals/function-to-string"),s=require("../internals/internal-state"),a=s.get,u=s.enforce,l=String(o).split("toString");n("inspectSource",function(e){return o.call(e)}),(module.exports=function(n,o,s,a){var c=!!a&&!!a.unsafe,f=!!a&&!!a.enumerable,g=!!a&&!!a.noTargetGet;"function"==typeof s&&("string"!=typeof o||r(s,"name")||t(s,"name",o),u(s).source=l.join("string"==typeof o?o:"")),n!==e?(c?!g&&n[o]&&(f=!0):delete n[o],f?n[o]=s:t(n,o,s)):f?n[o]=s:i(o,s)})(Function.prototype,"toString",function(){return"function"==typeof this&&a(this).source||o.call(this)});
65
+ },{"../internals/global":"MVLi","../internals/shared":"1B1y","../internals/hide":"mnM5","../internals/has":"j/yd","../internals/set-global":"ScNd","../internals/function-to-string":"GWmL","../internals/internal-state":"vLSK"}],"+h/M":[function(require,module,exports) {
66
+ module.exports=require("../internals/global");
67
+ },{"../internals/global":"MVLi"}],"mLk8":[function(require,module,exports) {
68
+
69
+ var n=require("../internals/path"),e=require("../internals/global"),r=function(n){return"function"==typeof n?n:void 0};module.exports=function(t,i){return arguments.length<2?r(n[t])||r(e[t]):n[t]&&n[t][i]||e[t]&&e[t][i]};
70
+ },{"../internals/path":"+h/M","../internals/global":"MVLi"}],"8GwU":[function(require,module,exports) {
71
+ var o=Math.ceil,r=Math.floor;module.exports=function(t){return isNaN(t=+t)?0:(t>0?r:o)(t)};
72
+ },{}],"6j9A":[function(require,module,exports) {
73
+ var e=require("../internals/to-integer"),r=Math.min;module.exports=function(n){return n>0?r(e(n),9007199254740991):0};
74
+ },{"../internals/to-integer":"8GwU"}],"QLhU":[function(require,module,exports) {
75
+ var r=require("../internals/to-integer"),e=Math.max,t=Math.min;module.exports=function(n,a){var i=r(n);return i<0?e(i+a,0):t(i,a)};
76
+ },{"../internals/to-integer":"8GwU"}],"b2MC":[function(require,module,exports) {
77
+ var e=require("../internals/to-indexed-object"),r=require("../internals/to-length"),n=require("../internals/to-absolute-index"),t=function(t){return function(i,u,o){var l,f=e(i),s=r(f.length),a=n(o,s);if(t&&u!=u){for(;s>a;)if((l=f[a++])!=l)return!0}else for(;s>a;a++)if((t||a in f)&&f[a]===u)return t||a||0;return!t&&-1}};module.exports={includes:t(!0),indexOf:t(!1)};
78
+ },{"../internals/to-indexed-object":"eb/r","../internals/to-length":"6j9A","../internals/to-absolute-index":"QLhU"}],"ijOr":[function(require,module,exports) {
79
+ var e=require("../internals/has"),r=require("../internals/to-indexed-object"),n=require("../internals/array-includes").indexOf,i=require("../internals/hidden-keys");module.exports=function(s,t){var u,a=r(s),d=0,l=[];for(u in a)!e(i,u)&&e(a,u)&&l.push(u);for(;t.length>d;)e(a,u=t[d++])&&(~n(l,u)||l.push(u));return l};
80
+ },{"../internals/has":"j/yd","../internals/to-indexed-object":"eb/r","../internals/array-includes":"b2MC","../internals/hidden-keys":"Ln6o"}],"asST":[function(require,module,exports) {
81
+ module.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];
82
+ },{}],"QFCk":[function(require,module,exports) {
83
+ var e=require("../internals/object-keys-internal"),r=require("../internals/enum-bug-keys"),t=r.concat("length","prototype");exports.f=Object.getOwnPropertyNames||function(r){return e(r,t)};
84
+ },{"../internals/object-keys-internal":"ijOr","../internals/enum-bug-keys":"asST"}],"5uqT":[function(require,module,exports) {
85
+ exports.f=Object.getOwnPropertySymbols;
86
+ },{}],"uZDC":[function(require,module,exports) {
87
+ var e=require("../internals/get-built-in"),r=require("../internals/object-get-own-property-names"),n=require("../internals/object-get-own-property-symbols"),t=require("../internals/an-object");module.exports=e("Reflect","ownKeys")||function(e){var o=r.f(t(e)),i=n.f;return i?o.concat(i(e)):o};
88
+ },{"../internals/get-built-in":"mLk8","../internals/object-get-own-property-names":"QFCk","../internals/object-get-own-property-symbols":"5uqT","../internals/an-object":"2eAP"}],"dZUE":[function(require,module,exports) {
89
+ var e=require("../internals/has"),r=require("../internals/own-keys"),n=require("../internals/object-get-own-property-descriptor"),t=require("../internals/object-define-property");module.exports=function(i,o){for(var a=r(o),s=t.f,l=n.f,p=0;p<a.length;p++){var u=a[p];e(i,u)||s(i,u,l(o,u))}};
90
+ },{"../internals/has":"j/yd","../internals/own-keys":"uZDC","../internals/object-get-own-property-descriptor":"6zm/","../internals/object-define-property":"AtXZ"}],"Y6Gi":[function(require,module,exports) {
91
+ var r=require("../internals/fails"),e=/#|\.prototype\./,t=function(e,t){var u=o[n(e)];return u==i||u!=a&&("function"==typeof t?r(t):!!t)},n=t.normalize=function(r){return String(r).replace(e,".").toLowerCase()},o=t.data={},a=t.NATIVE="N",i=t.POLYFILL="P";module.exports=t;
92
+ },{"../internals/fails":"pWu7"}],"rhEq":[function(require,module,exports) {
93
+
94
+ var e=require("../internals/global"),r=require("../internals/object-get-own-property-descriptor").f,t=require("../internals/hide"),i=require("../internals/redefine"),o=require("../internals/set-global"),n=require("../internals/copy-constructor-properties"),a=require("../internals/is-forced");module.exports=function(s,l){var u,f,p,c,d,q=s.target,g=s.global,y=s.stat;if(u=g?e:y?e[q]||o(q,{}):(e[q]||{}).prototype)for(f in l){if(c=l[f],p=s.noTargetGet?(d=r(u,f))&&d.value:u[f],!a(g?f:q+(y?".":"#")+f,s.forced)&&void 0!==p){if(typeof c==typeof p)continue;n(c,p)}(s.sham||p&&p.sham)&&t(c,"sham",!0),i(u,f,c,s)}};
95
+ },{"../internals/global":"MVLi","../internals/object-get-own-property-descriptor":"6zm/","../internals/hide":"mnM5","../internals/redefine":"ztZs","../internals/set-global":"ScNd","../internals/copy-constructor-properties":"dZUE","../internals/is-forced":"Y6Gi"}],"PgsN":[function(require,module,exports) {
96
+ var r=require("../internals/fails");module.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())});
97
+ },{"../internals/fails":"pWu7"}],"oqXF":[function(require,module,exports) {
98
+ var r=require("../internals/classof-raw");module.exports=Array.isArray||function(a){return"Array"==r(a)};
99
+ },{"../internals/classof-raw":"jUdy"}],"Q9KC":[function(require,module,exports) {
100
+ var e=require("../internals/require-object-coercible");module.exports=function(r){return Object(e(r))};
101
+ },{"../internals/require-object-coercible":"RWPB"}],"rmL3":[function(require,module,exports) {
102
+ var e=require("../internals/object-keys-internal"),r=require("../internals/enum-bug-keys");module.exports=Object.keys||function(n){return e(n,r)};
103
+ },{"../internals/object-keys-internal":"ijOr","../internals/enum-bug-keys":"asST"}],"ZdKd":[function(require,module,exports) {
104
+ var e=require("../internals/descriptors"),r=require("../internals/object-define-property"),n=require("../internals/an-object"),t=require("../internals/object-keys");module.exports=e?Object.defineProperties:function(e,i){n(e);for(var o,s=t(i),a=s.length,u=0;a>u;)r.f(e,o=s[u++],i[o]);return e};
105
+ },{"../internals/descriptors":"A8Ob","../internals/object-define-property":"AtXZ","../internals/an-object":"2eAP","../internals/object-keys":"rmL3"}],"tTwY":[function(require,module,exports) {
106
+ var e=require("../internals/get-built-in");module.exports=e("document","documentElement");
107
+ },{"../internals/get-built-in":"mLk8"}],"zWsZ":[function(require,module,exports) {
108
+ var e=require("../internals/an-object"),r=require("../internals/object-define-properties"),n=require("../internals/enum-bug-keys"),t=require("../internals/hidden-keys"),i=require("../internals/html"),l=require("../internals/document-create-element"),o=require("../internals/shared-key"),u=o("IE_PROTO"),a="prototype",s=function(){},c=function(){var e,r=l("iframe"),t=n.length;for(r.style.display="none",i.appendChild(r),r.src=String("javascript:"),(e=r.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;t--;)delete c[a][n[t]];return c()};module.exports=Object.create||function(n,t){var i;return null!==n?(s[a]=e(n),i=new s,s[a]=null,i[u]=n):i=c(),void 0===t?i:r(i,t)},t[u]=!0;
109
+ },{"../internals/an-object":"2eAP","../internals/object-define-properties":"ZdKd","../internals/enum-bug-keys":"asST","../internals/hidden-keys":"Ln6o","../internals/html":"tTwY","../internals/document-create-element":"3tvd","../internals/shared-key":"OIOG"}],"BNtO":[function(require,module,exports) {
110
+ var e=require("../internals/to-indexed-object"),t=require("../internals/object-get-own-property-names").f,r={}.toString,n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return t(e)}catch(r){return n.slice()}};module.exports.f=function(i){return n&&"[object Window]"==r.call(i)?o(i):t(e(i))};
111
+ },{"../internals/to-indexed-object":"eb/r","../internals/object-get-own-property-names":"QFCk"}],"Q0EA":[function(require,module,exports) {
112
+
113
+ var e=require("../internals/global"),r=require("../internals/shared"),n=require("../internals/uid"),i=require("../internals/native-symbol"),l=e.Symbol,a=r("wks");module.exports=function(e){return a[e]||(a[e]=i&&l[e]||(i?l:n)("Symbol."+e))};
114
+ },{"../internals/global":"MVLi","../internals/shared":"1B1y","../internals/uid":"bxyG","../internals/native-symbol":"PgsN"}],"2oKg":[function(require,module,exports) {
115
+ exports.f=require("../internals/well-known-symbol");
116
+ },{"../internals/well-known-symbol":"Q0EA"}],"TzLT":[function(require,module,exports) {
117
+ var e=require("../internals/path"),r=require("../internals/has"),n=require("../internals/wrapped-well-known-symbol"),l=require("../internals/object-define-property").f;module.exports=function(a){var i=e.Symbol||(e.Symbol={});r(i,a)||l(i,a,{value:n.f(a)})};
118
+ },{"../internals/path":"+h/M","../internals/has":"j/yd","../internals/wrapped-well-known-symbol":"2oKg","../internals/object-define-property":"AtXZ"}],"kLCt":[function(require,module,exports) {
119
+ var e=require("../internals/object-define-property").f,r=require("../internals/has"),n=require("../internals/well-known-symbol"),o=n("toStringTag");module.exports=function(n,t,i){n&&!r(n=i?n:n.prototype,o)&&e(n,o,{configurable:!0,value:t})};
120
+ },{"../internals/object-define-property":"AtXZ","../internals/has":"j/yd","../internals/well-known-symbol":"Q0EA"}],"SOPX":[function(require,module,exports) {
121
+ module.exports=function(n){if("function"!=typeof n)throw TypeError(String(n)+" is not a function");return n};
122
+ },{}],"NohZ":[function(require,module,exports) {
123
+ var n=require("../internals/a-function");module.exports=function(r,t,e){if(n(r),void 0===t)return r;switch(e){case 0:return function(){return r.call(t)};case 1:return function(n){return r.call(t,n)};case 2:return function(n,e){return r.call(t,n,e)};case 3:return function(n,e,u){return r.call(t,n,e,u)}}return function(){return r.apply(t,arguments)}};
124
+ },{"../internals/a-function":"SOPX"}],"/e6W":[function(require,module,exports) {
125
+ var r=require("../internals/is-object"),e=require("../internals/is-array"),n=require("../internals/well-known-symbol"),o=n("species");module.exports=function(n,i){var t;return e(n)&&("function"!=typeof(t=n.constructor)||t!==Array&&!e(t.prototype)?r(t)&&null===(t=t[o])&&(t=void 0):t=void 0),new(void 0===t?Array:t)(0===i?0:i)};
126
+ },{"../internals/is-object":"AsqF","../internals/is-array":"oqXF","../internals/well-known-symbol":"Q0EA"}],"EUh8":[function(require,module,exports) {
127
+ var e=require("../internals/bind-context"),r=require("../internals/indexed-object"),n=require("../internals/to-object"),i=require("../internals/to-length"),t=require("../internals/array-species-create"),a=[].push,s=function(s){var u=1==s,c=2==s,l=3==s,o=4==s,f=6==s,d=5==s||f;return function(h,q,v,p){for(var x,b,m=n(h),g=r(m),j=e(q,v,3),y=i(g.length),w=0,E=p||t,I=u?E(h,y):c?E(h,0):void 0;y>w;w++)if((d||w in g)&&(b=j(x=g[w],w,m),s))if(u)I[w]=b;else if(b)switch(s){case 3:return!0;case 5:return x;case 6:return w;case 2:a.call(I,x)}else if(o)return!1;return f?-1:l||o?o:I}};module.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)};
128
+ },{"../internals/bind-context":"NohZ","../internals/indexed-object":"Nn1j","../internals/to-object":"Q9KC","../internals/to-length":"6j9A","../internals/array-species-create":"/e6W"}],"diqY":[function(require,module,exports) {
129
+
130
+ "use strict";var e=require("../internals/export"),r=require("../internals/global"),t=require("../internals/is-pure"),n=require("../internals/descriptors"),i=require("../internals/native-symbol"),o=require("../internals/fails"),s=require("../internals/has"),a=require("../internals/is-array"),u=require("../internals/is-object"),l=require("../internals/an-object"),c=require("../internals/to-object"),f=require("../internals/to-indexed-object"),p=require("../internals/to-primitive"),y=require("../internals/create-property-descriptor"),b=require("../internals/object-create"),d=require("../internals/object-keys"),g=require("../internals/object-get-own-property-names"),q=require("../internals/object-get-own-property-names-external"),h=require("../internals/object-get-own-property-symbols"),m=require("../internals/object-get-own-property-descriptor"),v=require("../internals/object-define-property"),j=require("../internals/object-property-is-enumerable"),w=require("../internals/hide"),O=require("../internals/redefine"),S=require("../internals/shared"),k=require("../internals/shared-key"),P=require("../internals/hidden-keys"),E=require("../internals/uid"),x=require("../internals/well-known-symbol"),N=require("../internals/wrapped-well-known-symbol"),F=require("../internals/define-well-known-symbol"),J=require("../internals/set-to-string-tag"),T=require("../internals/internal-state"),C=require("../internals/array-iteration").forEach,D=k("hidden"),I="Symbol",Q="prototype",z=x("toPrimitive"),A=T.set,B=T.getterFor(I),G=Object[Q],H=r.Symbol,K=r.JSON,L=K&&K.stringify,M=m.f,R=v.f,U=q.f,V=j.f,W=S("symbols"),X=S("op-symbols"),Y=S("string-to-symbol-registry"),Z=S("symbol-to-string-registry"),$=S("wks"),_=r.QObject,ee=!_||!_[Q]||!_[Q].findChild,re=n&&o(function(){return 7!=b(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,r,t){var n=M(G,r);n&&delete G[r],R(e,r,t),n&&e!==G&&R(G,r,n)}:R,te=function(e,r){var t=W[e]=b(H[Q]);return A(t,{type:I,tag:e,description:r}),n||(t.description=r),t},ne=i&&"symbol"==typeof H.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},ie=function(e,r,t){e===G&&ie(X,r,t),l(e);var n=p(r,!0);return l(t),s(W,n)?(t.enumerable?(s(e,D)&&e[D][n]&&(e[D][n]=!1),t=b(t,{enumerable:y(0,!1)})):(s(e,D)||R(e,D,y(1,{})),e[D][n]=!0),re(e,n,t)):R(e,n,t)},oe=function(e,r){l(e);var t=f(r),i=d(t).concat(ce(t));return C(i,function(r){n&&!ae.call(t,r)||ie(e,r,t[r])}),e},se=function(e,r){return void 0===r?b(e):oe(b(e),r)},ae=function(e){var r=p(e,!0),t=V.call(this,r);return!(this===G&&s(W,r)&&!s(X,r))&&(!(t||!s(this,r)||!s(W,r)||s(this,D)&&this[D][r])||t)},ue=function(e,r){var t=f(e),n=p(r,!0);if(t!==G||!s(W,n)||s(X,n)){var i=M(t,n);return!i||!s(W,n)||s(t,D)&&t[D][n]||(i.enumerable=!0),i}},le=function(e){var r=U(f(e)),t=[];return C(r,function(e){s(W,e)||s(P,e)||t.push(e)}),t},ce=function(e){var r=e===G,t=U(r?X:f(e)),n=[];return C(t,function(e){!s(W,e)||r&&!s(G,e)||n.push(W[e])}),n};i||(O((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=E(e),t=function(e){this===G&&t.call(X,e),s(this,D)&&s(this[D],r)&&(this[D][r]=!1),re(this,r,y(1,e))};return n&&ee&&re(G,r,{configurable:!0,set:t}),te(r,e)})[Q],"toString",function(){return B(this).tag}),j.f=ae,v.f=ie,m.f=ue,g.f=q.f=le,h.f=ce,n&&(R(H[Q],"description",{configurable:!0,get:function(){return B(this).description}}),t||O(G,"propertyIsEnumerable",ae,{unsafe:!0})),N.f=function(e){return te(x(e),e)}),e({global:!0,wrap:!0,forced:!i,sham:!i},{Symbol:H}),C(d($),function(e){F(e)}),e({target:I,stat:!0,forced:!i},{for:function(e){var r=String(e);if(s(Y,r))return Y[r];var t=H(r);return Y[r]=t,Z[t]=r,t},keyFor:function(e){if(!ne(e))throw TypeError(e+" is not a symbol");if(s(Z,e))return Z[e]},useSetter:function(){ee=!0},useSimple:function(){ee=!1}}),e({target:"Object",stat:!0,forced:!i,sham:!n},{create:se,defineProperty:ie,defineProperties:oe,getOwnPropertyDescriptor:ue}),e({target:"Object",stat:!0,forced:!i},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),e({target:"Object",stat:!0,forced:o(function(){h.f(1)})},{getOwnPropertySymbols:function(e){return h.f(c(e))}}),K&&e({target:"JSON",stat:!0,forced:!i||o(function(){var e=H();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))})},{stringify:function(e){for(var r,t,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);if(t=r=n[1],(u(r)||void 0!==e)&&!ne(e))return a(r)||(r=function(e,r){if("function"==typeof t&&(r=t.call(this,e,r)),!ne(r))return r}),n[1]=r,L.apply(K,n)}}),H[Q][z]||w(H[Q],z,H[Q].valueOf),J(H,I),P[D]=!0;
131
+ },{"../internals/export":"rhEq","../internals/global":"MVLi","../internals/is-pure":"tGwT","../internals/descriptors":"A8Ob","../internals/native-symbol":"PgsN","../internals/fails":"pWu7","../internals/has":"j/yd","../internals/is-array":"oqXF","../internals/is-object":"AsqF","../internals/an-object":"2eAP","../internals/to-object":"Q9KC","../internals/to-indexed-object":"eb/r","../internals/to-primitive":"wZyz","../internals/create-property-descriptor":"oNyT","../internals/object-create":"zWsZ","../internals/object-keys":"rmL3","../internals/object-get-own-property-names":"QFCk","../internals/object-get-own-property-names-external":"BNtO","../internals/object-get-own-property-symbols":"5uqT","../internals/object-get-own-property-descriptor":"6zm/","../internals/object-define-property":"AtXZ","../internals/object-property-is-enumerable":"sC3y","../internals/hide":"mnM5","../internals/redefine":"ztZs","../internals/shared":"1B1y","../internals/shared-key":"OIOG","../internals/hidden-keys":"Ln6o","../internals/uid":"bxyG","../internals/well-known-symbol":"Q0EA","../internals/wrapped-well-known-symbol":"2oKg","../internals/define-well-known-symbol":"TzLT","../internals/set-to-string-tag":"kLCt","../internals/internal-state":"vLSK","../internals/array-iteration":"EUh8"}],"N3MB":[function(require,module,exports) {
132
+ var e=require("../internals/define-well-known-symbol");e("asyncIterator");
133
+ },{"../internals/define-well-known-symbol":"TzLT"}],"LYOo":[function(require,module,exports) {
134
+
135
+ "use strict";var r=require("../internals/export"),e=require("../internals/descriptors"),t=require("../internals/global"),i=require("../internals/has"),o=require("../internals/is-object"),n=require("../internals/object-define-property").f,s=require("../internals/copy-constructor-properties"),a=t.Symbol;if(e&&"function"==typeof a&&(!("description"in a.prototype)||void 0!==a().description)){var l={},c=function(){var r=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof c?new a(r):void 0===r?a():a(r);return""===r&&(l[e]=!0),e};s(c,a);var p=c.prototype=a.prototype;p.constructor=c;var u=p.toString,v="Symbol(test)"==String(a("test")),f=/^Symbol\((.*)\)[^)]+$/;n(p,"description",{configurable:!0,get:function(){var r=o(this)?this.valueOf():this,e=u.call(r);if(i(l,r))return"";var t=v?e.slice(7,-1):e.replace(f,"$1");return""===t?void 0:t}}),r({global:!0,forced:!0},{Symbol:c})}
136
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/global":"MVLi","../internals/has":"j/yd","../internals/is-object":"AsqF","../internals/object-define-property":"AtXZ","../internals/copy-constructor-properties":"dZUE"}],"3rFs":[function(require,module,exports) {
137
+ var e=require("../internals/define-well-known-symbol");e("hasInstance");
138
+ },{"../internals/define-well-known-symbol":"TzLT"}],"stDf":[function(require,module,exports) {
139
+ var e=require("../internals/define-well-known-symbol");e("isConcatSpreadable");
140
+ },{"../internals/define-well-known-symbol":"TzLT"}],"WXoU":[function(require,module,exports) {
141
+ var e=require("../internals/define-well-known-symbol");e("iterator");
142
+ },{"../internals/define-well-known-symbol":"TzLT"}],"Hc3y":[function(require,module,exports) {
143
+ var e=require("../internals/define-well-known-symbol");e("match");
144
+ },{"../internals/define-well-known-symbol":"TzLT"}],"lVca":[function(require,module,exports) {
145
+ var e=require("../internals/define-well-known-symbol");e("matchAll");
146
+ },{"../internals/define-well-known-symbol":"TzLT"}],"7pvv":[function(require,module,exports) {
147
+ var e=require("../internals/define-well-known-symbol");e("replace");
148
+ },{"../internals/define-well-known-symbol":"TzLT"}],"9rdE":[function(require,module,exports) {
149
+ var e=require("../internals/define-well-known-symbol");e("search");
150
+ },{"../internals/define-well-known-symbol":"TzLT"}],"jSLd":[function(require,module,exports) {
151
+ var e=require("../internals/define-well-known-symbol");e("species");
152
+ },{"../internals/define-well-known-symbol":"TzLT"}],"c6b0":[function(require,module,exports) {
153
+ var e=require("../internals/define-well-known-symbol");e("split");
154
+ },{"../internals/define-well-known-symbol":"TzLT"}],"sek4":[function(require,module,exports) {
155
+ var e=require("../internals/define-well-known-symbol");e("toPrimitive");
156
+ },{"../internals/define-well-known-symbol":"TzLT"}],"uDx9":[function(require,module,exports) {
157
+ var e=require("../internals/define-well-known-symbol");e("toStringTag");
158
+ },{"../internals/define-well-known-symbol":"TzLT"}],"yT7s":[function(require,module,exports) {
159
+ var e=require("../internals/define-well-known-symbol");e("unscopables");
160
+ },{"../internals/define-well-known-symbol":"TzLT"}],"aWUw":[function(require,module,exports) {
161
+ "use strict";var e=require("../internals/descriptors"),r=require("../internals/fails"),n=require("../internals/object-keys"),t=require("../internals/object-get-own-property-symbols"),i=require("../internals/object-property-is-enumerable"),o=require("../internals/to-object"),s=require("../internals/indexed-object"),a=Object.assign;module.exports=!a||r(function(){var e={},r={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),7!=a({},e)[t]||"abcdefghijklmnopqrst"!=n(a({},r)).join("")})?function(r,a){for(var l=o(r),c=arguments.length,u=1,b=t.f,f=i.f;c>u;)for(var j,p=s(arguments[u++]),q=b?n(p).concat(b(p)):n(p),d=q.length,g=0;d>g;)j=q[g++],e&&!f.call(p,j)||(l[j]=p[j]);return l}:a;
162
+ },{"../internals/descriptors":"A8Ob","../internals/fails":"pWu7","../internals/object-keys":"rmL3","../internals/object-get-own-property-symbols":"5uqT","../internals/object-property-is-enumerable":"sC3y","../internals/to-object":"Q9KC","../internals/indexed-object":"Nn1j"}],"d93j":[function(require,module,exports) {
163
+ var e=require("../internals/export"),r=require("../internals/object-assign");e({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r});
164
+ },{"../internals/export":"rhEq","../internals/object-assign":"aWUw"}],"pv5m":[function(require,module,exports) {
165
+ var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/object-create");e({target:"Object",stat:!0,sham:!r},{create:t});
166
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/object-create":"zWsZ"}],"XOQw":[function(require,module,exports) {
167
+ var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/object-define-property");e({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:t.f});
168
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/object-define-property":"AtXZ"}],"ddJ+":[function(require,module,exports) {
169
+ var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/object-define-properties");e({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:t});
170
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/object-define-properties":"ZdKd"}],"v9Vj":[function(require,module,exports) {
171
+ var e=require("../internals/descriptors"),r=require("../internals/object-keys"),n=require("../internals/to-indexed-object"),t=require("../internals/object-property-is-enumerable").f,i=function(i){return function(s){for(var u,o=n(s),l=r(o),a=l.length,c=0,p=[];a>c;)u=l[c++],e&&!t.call(o,u)||p.push(i?[u,o[u]]:o[u]);return p}};module.exports={entries:i(!0),values:i(!1)};
172
+ },{"../internals/descriptors":"A8Ob","../internals/object-keys":"rmL3","../internals/to-indexed-object":"eb/r","../internals/object-property-is-enumerable":"sC3y"}],"2KgV":[function(require,module,exports) {
173
+ var e=require("../internals/export"),r=require("../internals/object-to-array").entries;e({target:"Object",stat:!0},{entries:function(e){return r(e)}});
174
+ },{"../internals/export":"rhEq","../internals/object-to-array":"v9Vj"}],"ZrZO":[function(require,module,exports) {
175
+ var e=require("../internals/fails");module.exports=!e(function(){return Object.isExtensible(Object.preventExtensions({}))});
176
+ },{"../internals/fails":"pWu7"}],"Cjms":[function(require,module,exports) {
177
+ var e=require("../internals/hidden-keys"),r=require("../internals/is-object"),n=require("../internals/has"),t=require("../internals/object-define-property").f,i=require("../internals/uid"),u=require("../internals/freezing"),a=i("meta"),f=0,o=Object.isExtensible||function(){return!0},s=function(e){t(e,a,{value:{objectID:"O"+ ++f,weakData:{}}})},c=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n(e,a)){if(!o(e))return"F";if(!t)return"E";s(e)}return e[a].objectID},l=function(e,r){if(!n(e,a)){if(!o(e))return!0;if(!r)return!1;s(e)}return e[a].weakData},b=function(e){return u&&D.REQUIRED&&o(e)&&!n(e,a)&&s(e),e},D=module.exports={REQUIRED:!1,fastKey:c,getWeakData:l,onFreeze:b};e[a]=!0;
178
+ },{"../internals/hidden-keys":"Ln6o","../internals/is-object":"AsqF","../internals/has":"j/yd","../internals/object-define-property":"AtXZ","../internals/uid":"bxyG","../internals/freezing":"ZrZO"}],"LUIK":[function(require,module,exports) {
179
+ var e=require("../internals/export"),r=require("../internals/freezing"),n=require("../internals/fails"),t=require("../internals/is-object"),i=require("../internals/internal-metadata").onFreeze,a=Object.freeze,s=n(function(){a(1)});e({target:"Object",stat:!0,forced:s,sham:!r},{freeze:function(e){return a&&t(e)?a(i(e)):e}});
180
+ },{"../internals/export":"rhEq","../internals/freezing":"ZrZO","../internals/fails":"pWu7","../internals/is-object":"AsqF","../internals/internal-metadata":"Cjms"}],"XTOV":[function(require,module,exports) {
181
+ var r=require("../internals/well-known-symbol"),e=require("../internals/iterators"),t=r("iterator"),o=Array.prototype;module.exports=function(r){return void 0!==r&&(e.Array===r||o[t]===r)};
182
+ },{"../internals/well-known-symbol":"Q0EA","../internals/iterators":"Ln6o"}],"rs2T":[function(require,module,exports) {
183
+ var n=require("../internals/classof-raw"),e=require("../internals/well-known-symbol"),r=e("toStringTag"),t="Arguments"==n(function(){return arguments}()),u=function(n,e){try{return n[e]}catch(r){}};module.exports=function(e){var l,o,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=u(l=Object(e),r))?o:t?n(l):"Object"==(i=n(l))&&"function"==typeof l.callee?"Arguments":i};
184
+ },{"../internals/classof-raw":"jUdy","../internals/well-known-symbol":"Q0EA"}],"VM64":[function(require,module,exports) {
185
+ var r=require("../internals/classof"),e=require("../internals/iterators"),n=require("../internals/well-known-symbol"),t=n("iterator");module.exports=function(n){if(null!=n)return n[t]||n["@@iterator"]||e[r(n)]};
186
+ },{"../internals/classof":"rs2T","../internals/iterators":"Ln6o","../internals/well-known-symbol":"Q0EA"}],"DQY6":[function(require,module,exports) {
187
+ var r=require("../internals/an-object");module.exports=function(t,e,n,a){try{return a?e(r(n)[0],n[1]):e(n)}catch(c){var o=t.return;throw void 0!==o&&r(o.call(t)),c}};
188
+ },{"../internals/an-object":"2eAP"}],"Oj1G":[function(require,module,exports) {
189
+ var e=require("../internals/an-object"),r=require("../internals/is-array-iterator-method"),t=require("../internals/to-length"),n=require("../internals/bind-context"),i=require("../internals/get-iterator-method"),o=require("../internals/call-with-safe-iteration-closing"),a=function(e,r){this.stopped=e,this.result=r},s=module.exports=function(s,l,u,f,c){var h,d,p,q,g,w,b=n(l,u,f?2:1);if(c)h=s;else{if("function"!=typeof(d=i(s)))throw TypeError("Target is not iterable");if(r(d)){for(p=0,q=t(s.length);q>p;p++)if((g=f?b(e(w=s[p])[0],w[1]):b(s[p]))&&g instanceof a)return g;return new a(!1)}h=d.call(s)}for(;!(w=h.next()).done;)if((g=o(h,b,w.value,f))&&g instanceof a)return g;return new a(!1)};s.stop=function(e){return new a(!0,e)};
190
+ },{"../internals/an-object":"2eAP","../internals/is-array-iterator-method":"XTOV","../internals/to-length":"6j9A","../internals/bind-context":"NohZ","../internals/get-iterator-method":"VM64","../internals/call-with-safe-iteration-closing":"DQY6"}],"qU9w":[function(require,module,exports) {
191
+ "use strict";var e=require("../internals/to-primitive"),r=require("../internals/object-define-property"),i=require("../internals/create-property-descriptor");module.exports=function(t,n,o){var p=e(n);p in t?r.f(t,p,i(0,o)):t[p]=o};
192
+ },{"../internals/to-primitive":"wZyz","../internals/object-define-property":"AtXZ","../internals/create-property-descriptor":"oNyT"}],"5Uci":[function(require,module,exports) {
193
+ var r=require("../internals/export"),e=require("../internals/iterate"),t=require("../internals/create-property");r({target:"Object",stat:!0},{fromEntries:function(r){var n={};return e(r,function(r,e){t(n,r,e)},void 0,!0),n}});
194
+ },{"../internals/export":"rhEq","../internals/iterate":"Oj1G","../internals/create-property":"qU9w"}],"WFGt":[function(require,module,exports) {
195
+ var e=require("../internals/export"),r=require("../internals/fails"),t=require("../internals/to-indexed-object"),n=require("../internals/object-get-own-property-descriptor").f,i=require("../internals/descriptors"),o=r(function(){n(1)}),s=!i||o;e({target:"Object",stat:!0,forced:s,sham:!i},{getOwnPropertyDescriptor:function(e,r){return n(t(e),r)}});
196
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/to-indexed-object":"eb/r","../internals/object-get-own-property-descriptor":"6zm/","../internals/descriptors":"A8Ob"}],"aLxV":[function(require,module,exports) {
197
+ var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/own-keys"),n=require("../internals/to-indexed-object"),i=require("../internals/object-get-own-property-descriptor"),o=require("../internals/create-property");e({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var r,s,a=n(e),p=i.f,c=t(a),u={},l=0;c.length>l;)void 0!==(s=p(a,r=c[l++]))&&o(u,r,s);return u}});
198
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/own-keys":"uZDC","../internals/to-indexed-object":"eb/r","../internals/object-get-own-property-descriptor":"6zm/","../internals/create-property":"qU9w"}],"LvRP":[function(require,module,exports) {
199
+ var e=require("../internals/export"),r=require("../internals/fails"),t=require("../internals/object-get-own-property-names-external").f,n=r(function(){return!Object.getOwnPropertyNames(1)});e({target:"Object",stat:!0,forced:n},{getOwnPropertyNames:t});
200
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/object-get-own-property-names-external":"BNtO"}],"x9wq":[function(require,module,exports) {
201
+ var t=require("../internals/fails");module.exports=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype});
202
+ },{"../internals/fails":"pWu7"}],"xey/":[function(require,module,exports) {
203
+ var t=require("../internals/has"),e=require("../internals/to-object"),r=require("../internals/shared-key"),o=require("../internals/correct-prototype-getter"),n=r("IE_PROTO"),c=Object.prototype;module.exports=o?Object.getPrototypeOf:function(r){return r=e(r),t(r,n)?r[n]:"function"==typeof r.constructor&&r instanceof r.constructor?r.constructor.prototype:r instanceof Object?c:null};
204
+ },{"../internals/has":"j/yd","../internals/to-object":"Q9KC","../internals/shared-key":"OIOG","../internals/correct-prototype-getter":"x9wq"}],"jz0x":[function(require,module,exports) {
205
+ var e=require("../internals/export"),t=require("../internals/fails"),r=require("../internals/to-object"),n=require("../internals/object-get-prototype-of"),o=require("../internals/correct-prototype-getter"),i=t(function(){n(1)});e({target:"Object",stat:!0,forced:i,sham:!o},{getPrototypeOf:function(e){return n(r(e))}});
206
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/to-object":"Q9KC","../internals/object-get-prototype-of":"xey/","../internals/correct-prototype-getter":"x9wq"}],"bfhi":[function(require,module,exports) {
207
+ module.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};
208
+ },{}],"ux+h":[function(require,module,exports) {
209
+ var e=require("../internals/export"),r=require("../internals/same-value");e({target:"Object",stat:!0},{is:r});
210
+ },{"../internals/export":"rhEq","../internals/same-value":"bfhi"}],"jX7X":[function(require,module,exports) {
211
+ var e=require("../internals/export"),t=require("../internals/fails"),r=require("../internals/is-object"),i=Object.isExtensible,n=t(function(){i(1)});e({target:"Object",stat:!0,forced:n},{isExtensible:function(e){return!!r(e)&&(!i||i(e))}});
212
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/is-object":"AsqF"}],"kdOB":[function(require,module,exports) {
213
+ var e=require("../internals/export"),r=require("../internals/fails"),t=require("../internals/is-object"),n=Object.isFrozen,i=r(function(){n(1)});e({target:"Object",stat:!0,forced:i},{isFrozen:function(e){return!t(e)||!!n&&n(e)}});
214
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/is-object":"AsqF"}],"gpJf":[function(require,module,exports) {
215
+ var e=require("../internals/export"),r=require("../internals/fails"),t=require("../internals/is-object"),i=Object.isSealed,n=r(function(){i(1)});e({target:"Object",stat:!0,forced:n},{isSealed:function(e){return!t(e)||!!i&&i(e)}});
216
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/is-object":"AsqF"}],"Y3qw":[function(require,module,exports) {
217
+ var e=require("../internals/export"),r=require("../internals/to-object"),t=require("../internals/object-keys"),n=require("../internals/fails"),i=n(function(){t(1)});e({target:"Object",stat:!0,forced:i},{keys:function(e){return t(r(e))}});
218
+ },{"../internals/export":"rhEq","../internals/to-object":"Q9KC","../internals/object-keys":"rmL3","../internals/fails":"pWu7"}],"WvM7":[function(require,module,exports) {
219
+ var e=require("../internals/export"),r=require("../internals/is-object"),n=require("../internals/internal-metadata").onFreeze,t=require("../internals/freezing"),i=require("../internals/fails"),a=Object.preventExtensions,s=i(function(){a(1)});e({target:"Object",stat:!0,forced:s,sham:!t},{preventExtensions:function(e){return a&&r(e)?a(n(e)):e}});
220
+ },{"../internals/export":"rhEq","../internals/is-object":"AsqF","../internals/internal-metadata":"Cjms","../internals/freezing":"ZrZO","../internals/fails":"pWu7"}],"bZLD":[function(require,module,exports) {
221
+ var e=require("../internals/export"),r=require("../internals/is-object"),n=require("../internals/internal-metadata").onFreeze,t=require("../internals/freezing"),a=require("../internals/fails"),i=Object.seal,s=a(function(){i(1)});e({target:"Object",stat:!0,forced:s,sham:!t},{seal:function(e){return i&&r(e)?i(n(e)):e}});
222
+ },{"../internals/export":"rhEq","../internals/is-object":"AsqF","../internals/internal-metadata":"Cjms","../internals/freezing":"ZrZO","../internals/fails":"pWu7"}],"ckfP":[function(require,module,exports) {
223
+ var r=require("../internals/is-object");module.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t};
224
+ },{"../internals/is-object":"AsqF"}],"9eDC":[function(require,module,exports) {
225
+ var t=require("../internals/an-object"),r=require("../internals/a-possible-prototype");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,o=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),o=n instanceof Array}catch(c){}return function(n,c){return t(n),r(c),o?e.call(n,c):n.__proto__=c,n}}():void 0);
226
+ },{"../internals/an-object":"2eAP","../internals/a-possible-prototype":"ckfP"}],"Cykw":[function(require,module,exports) {
227
+ var t=require("../internals/export"),e=require("../internals/object-set-prototype-of");t({target:"Object",stat:!0},{setPrototypeOf:e});
228
+ },{"../internals/export":"rhEq","../internals/object-set-prototype-of":"9eDC"}],"HUM5":[function(require,module,exports) {
229
+ var e=require("../internals/export"),r=require("../internals/object-to-array").values;e({target:"Object",stat:!0},{values:function(e){return r(e)}});
230
+ },{"../internals/export":"rhEq","../internals/object-to-array":"v9Vj"}],"o+Sq":[function(require,module,exports) {
231
+ "use strict";var t=require("../internals/classof"),r=require("../internals/well-known-symbol"),e=r("toStringTag"),n={};n[e]="z",module.exports="[object z]"!==String(n)?function(){return"[object "+t(this)+"]"}:n.toString;
232
+ },{"../internals/classof":"rs2T","../internals/well-known-symbol":"Q0EA"}],"ecHe":[function(require,module,exports) {
233
+ var e=require("../internals/redefine"),r=require("../internals/object-to-string"),t=Object.prototype;r!==t.toString&&e(t,"toString",r,{unsafe:!0});
234
+ },{"../internals/redefine":"ztZs","../internals/object-to-string":"o+Sq"}],"HVQn":[function(require,module,exports) {
235
+
236
+ "use strict";var e=require("../internals/is-pure"),r=require("../internals/global"),n=require("../internals/fails");module.exports=e||!n(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete r[e]});
237
+ },{"../internals/is-pure":"tGwT","../internals/global":"MVLi","../internals/fails":"pWu7"}],"PTAU":[function(require,module,exports) {
238
+ "use strict";var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/forced-object-prototype-accessors-methods"),i=require("../internals/to-object"),n=require("../internals/a-function"),o=require("../internals/object-define-property");r&&e({target:"Object",proto:!0,forced:t},{__defineGetter__:function(e,r){o.f(i(this),e,{get:n(r),enumerable:!0,configurable:!0})}});
239
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/forced-object-prototype-accessors-methods":"HVQn","../internals/to-object":"Q9KC","../internals/a-function":"SOPX","../internals/object-define-property":"AtXZ"}],"PzdO":[function(require,module,exports) {
240
+ "use strict";var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/forced-object-prototype-accessors-methods"),i=require("../internals/to-object"),n=require("../internals/a-function"),o=require("../internals/object-define-property");r&&e({target:"Object",proto:!0,forced:t},{__defineSetter__:function(e,r){o.f(i(this),e,{set:n(r),enumerable:!0,configurable:!0})}});
241
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/forced-object-prototype-accessors-methods":"HVQn","../internals/to-object":"Q9KC","../internals/a-function":"SOPX","../internals/object-define-property":"AtXZ"}],"haYq":[function(require,module,exports) {
242
+ "use strict";var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/forced-object-prototype-accessors-methods"),o=require("../internals/to-object"),i=require("../internals/to-primitive"),n=require("../internals/object-get-prototype-of"),s=require("../internals/object-get-own-property-descriptor").f;r&&e({target:"Object",proto:!0,forced:t},{__lookupGetter__:function(e){var r,t=o(this),c=i(e,!0);do{if(r=s(t,c))return r.get}while(t=n(t))}});
243
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/forced-object-prototype-accessors-methods":"HVQn","../internals/to-object":"Q9KC","../internals/to-primitive":"wZyz","../internals/object-get-prototype-of":"xey/","../internals/object-get-own-property-descriptor":"6zm/"}],"vTXd":[function(require,module,exports) {
244
+ "use strict";var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/forced-object-prototype-accessors-methods"),o=require("../internals/to-object"),i=require("../internals/to-primitive"),n=require("../internals/object-get-prototype-of"),s=require("../internals/object-get-own-property-descriptor").f;r&&e({target:"Object",proto:!0,forced:t},{__lookupSetter__:function(e){var r,t=o(this),c=i(e,!0);do{if(r=s(t,c))return r.set}while(t=n(t))}});
245
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/forced-object-prototype-accessors-methods":"HVQn","../internals/to-object":"Q9KC","../internals/to-primitive":"wZyz","../internals/object-get-prototype-of":"xey/","../internals/object-get-own-property-descriptor":"6zm/"}],"ev+U":[function(require,module,exports) {
246
+ "use strict";var n=require("../internals/a-function"),t=require("../internals/is-object"),r=[].slice,e={},i=function(n,t,r){if(!(t in e)){for(var i=[],o=0;o<t;o++)i[o]="a["+o+"]";e[t]=Function("C,a","return new C("+i.join(",")+")")}return e[t](n,r)};module.exports=Function.bind||function(e){var o=n(this),a=r.call(arguments,1),c=function(){var n=a.concat(r.call(arguments));return this instanceof c?i(o,n.length,n):o.apply(e,n)};return t(o.prototype)&&(c.prototype=o.prototype),c};
247
+ },{"../internals/a-function":"SOPX","../internals/is-object":"AsqF"}],"rLkX":[function(require,module,exports) {
248
+ var n=require("../internals/export"),r=require("../internals/function-bind");n({target:"Function",proto:!0},{bind:r});
249
+ },{"../internals/export":"rhEq","../internals/function-bind":"ev+U"}],"kzOy":[function(require,module,exports) {
250
+ var r=require("../internals/descriptors"),t=require("../internals/object-define-property").f,e=Function.prototype,n=e.toString,i=/^\s*function ([^ (]*)/,c="name";!r||c in e||t(e,c,{configurable:!0,get:function(){try{return n.call(this).match(i)[1]}catch(r){return""}}});
251
+ },{"../internals/descriptors":"A8Ob","../internals/object-define-property":"AtXZ"}],"xOWp":[function(require,module,exports) {
252
+ "use strict";var e=require("../internals/is-object"),t=require("../internals/object-define-property"),r=require("../internals/object-get-prototype-of"),n=require("../internals/well-known-symbol"),i=n("hasInstance"),o=Function.prototype;i in o||t.f(o,i,{value:function(t){if("function"!=typeof this||!e(t))return!1;if(!e(this.prototype))return t instanceof this;for(;t=r(t);)if(this.prototype===t)return!0;return!1}});
253
+ },{"../internals/is-object":"AsqF","../internals/object-define-property":"AtXZ","../internals/object-get-prototype-of":"xey/","../internals/well-known-symbol":"Q0EA"}],"ITnL":[function(require,module,exports) {
254
+ "use strict";var e=require("../internals/bind-context"),r=require("../internals/to-object"),t=require("../internals/call-with-safe-iteration-closing"),n=require("../internals/is-array-iterator-method"),i=require("../internals/to-length"),a=require("../internals/create-property"),l=require("../internals/get-iterator-method");module.exports=function(o){var s,u,c,h,d=r(o),f="function"==typeof this?this:Array,q=arguments.length,v=q>1?arguments[1]:void 0,g=void 0!==v,y=0,p=l(d);if(g&&(v=e(v,q>2?arguments[2]:void 0,2)),null==p||f==Array&&n(p))for(u=new f(s=i(d.length));s>y;y++)a(u,y,g?v(d[y],y):d[y]);else for(h=p.call(d),u=new f;!(c=h.next()).done;y++)a(u,y,g?t(h,v,[c.value,y],!0):c.value);return u.length=y,u};
255
+ },{"../internals/bind-context":"NohZ","../internals/to-object":"Q9KC","../internals/call-with-safe-iteration-closing":"DQY6","../internals/is-array-iterator-method":"XTOV","../internals/to-length":"6j9A","../internals/create-property":"qU9w","../internals/get-iterator-method":"VM64"}],"/XOl":[function(require,module,exports) {
256
+ var r=require("../internals/well-known-symbol"),n=r("iterator"),t=!1;try{var e=0,o={next:function(){return{done:!!e++}},return:function(){t=!0}};o[n]=function(){return this},Array.from(o,function(){throw 2})}catch(u){}module.exports=function(r,e){if(!e&&!t)return!1;var o=!1;try{var i={};i[n]=function(){return{next:function(){return{done:o=!0}}}},r(i)}catch(u){}return o};
257
+ },{"../internals/well-known-symbol":"Q0EA"}],"Tzrg":[function(require,module,exports) {
258
+ var r=require("../internals/export"),e=require("../internals/array-from"),t=require("../internals/check-correctness-of-iteration"),a=!t(function(r){Array.from(r)});r({target:"Array",stat:!0,forced:a},{from:e});
259
+ },{"../internals/export":"rhEq","../internals/array-from":"ITnL","../internals/check-correctness-of-iteration":"/XOl"}],"hjCR":[function(require,module,exports) {
260
+ var r=require("../internals/export"),a=require("../internals/is-array");r({target:"Array",stat:!0},{isArray:a});
261
+ },{"../internals/export":"rhEq","../internals/is-array":"oqXF"}],"nKOp":[function(require,module,exports) {
262
+ "use strict";var r=require("../internals/export"),t=require("../internals/fails"),e=require("../internals/create-property"),n=t(function(){function r(){}return!(Array.of.call(r)instanceof r)});r({target:"Array",stat:!0,forced:n},{of:function(){for(var r=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>r;)e(n,r,arguments[r++]);return n.length=t,n}});
263
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/create-property":"qU9w"}],"A5g0":[function(require,module,exports) {
264
+ var n=require("../internals/fails"),r=require("../internals/well-known-symbol"),e=r("species");module.exports=function(r){return!n(function(){var n=[];return(n.constructor={})[e]=function(){return{foo:1}},1!==n[r](Boolean).foo})};
265
+ },{"../internals/fails":"pWu7","../internals/well-known-symbol":"Q0EA"}],"1nHC":[function(require,module,exports) {
266
+ "use strict";var r=require("../internals/export"),e=require("../internals/fails"),t=require("../internals/is-array"),n=require("../internals/is-object"),i=require("../internals/to-object"),a=require("../internals/to-length"),o=require("../internals/create-property"),s=require("../internals/array-species-create"),l=require("../internals/array-method-has-species-support"),u=require("../internals/well-known-symbol"),c=u("isConcatSpreadable"),f=9007199254740991,p="Maximum allowed index exceeded",q=!e(function(){var r=[];return r[c]=!1,r.concat()[0]!==r}),h=l("concat"),d=function(r){if(!n(r))return!1;var e=r[c];return void 0!==e?!!e:t(r)},y=!q||!h;r({target:"Array",proto:!0,forced:y},{concat:function(r){var e,t,n,l,u,c=i(this),q=s(c,0),h=0;for(e=-1,n=arguments.length;e<n;e++)if(u=-1===e?c:arguments[e],d(u)){if(h+(l=a(u.length))>f)throw TypeError(p);for(t=0;t<l;t++,h++)t in u&&o(q,h,u[t])}else{if(h>=f)throw TypeError(p);o(q,h++,u)}return q.length=h,q}});
267
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/is-array":"oqXF","../internals/is-object":"AsqF","../internals/to-object":"Q9KC","../internals/to-length":"6j9A","../internals/create-property":"qU9w","../internals/array-species-create":"/e6W","../internals/array-method-has-species-support":"A5g0","../internals/well-known-symbol":"Q0EA"}],"A81S":[function(require,module,exports) {
268
+ "use strict";var e=require("../internals/to-object"),t=require("../internals/to-absolute-index"),i=require("../internals/to-length"),n=Math.min;module.exports=[].copyWithin||function(r,o){var l=e(this),s=i(l.length),u=t(r,s),a=t(o,s),h=arguments.length>2?arguments[2]:void 0,d=n((void 0===h?s:t(h,s))-a,s-u),c=1;for(a<u&&u<a+d&&(c=-1,a+=d-1,u+=d-1);d-- >0;)a in l?l[u]=l[a]:delete l[u],u+=c,a+=c;return l};
269
+ },{"../internals/to-object":"Q9KC","../internals/to-absolute-index":"QLhU","../internals/to-length":"6j9A"}],"Tevp":[function(require,module,exports) {
270
+ var e=require("../internals/well-known-symbol"),r=require("../internals/object-create"),n=require("../internals/hide"),l=e("unscopables"),o=Array.prototype;null==o[l]&&n(o,l,r(null)),module.exports=function(e){o[l][e]=!0};
271
+ },{"../internals/well-known-symbol":"Q0EA","../internals/object-create":"zWsZ","../internals/hide":"mnM5"}],"kn+y":[function(require,module,exports) {
272
+ var r=require("../internals/export"),e=require("../internals/array-copy-within"),i=require("../internals/add-to-unscopables");r({target:"Array",proto:!0},{copyWithin:e}),i("copyWithin");
273
+ },{"../internals/export":"rhEq","../internals/array-copy-within":"A81S","../internals/add-to-unscopables":"Tevp"}],"fk+t":[function(require,module,exports) {
274
+ "use strict";var n=require("../internals/fails");module.exports=function(r,t){var u=[][r];return!u||!n(function(){u.call(null,t||function(){throw 1},1)})};
275
+ },{"../internals/fails":"pWu7"}],"YjOc":[function(require,module,exports) {
276
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-iteration").every,t=require("../internals/sloppy-array-method");r({target:"Array",proto:!0,forced:t("every")},{every:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}});
277
+ },{"../internals/export":"rhEq","../internals/array-iteration":"EUh8","../internals/sloppy-array-method":"fk+t"}],"Vois":[function(require,module,exports) {
278
+ "use strict";var e=require("../internals/to-object"),t=require("../internals/to-absolute-index"),r=require("../internals/to-length");module.exports=function(i){for(var n=e(this),o=r(n.length),l=arguments.length,s=t(l>1?arguments[1]:void 0,o),u=l>2?arguments[2]:void 0,a=void 0===u?o:t(u,o);a>s;)n[s++]=i;return n};
279
+ },{"../internals/to-object":"Q9KC","../internals/to-absolute-index":"QLhU","../internals/to-length":"6j9A"}],"wrzr":[function(require,module,exports) {
280
+ var r=require("../internals/export"),e=require("../internals/array-fill"),a=require("../internals/add-to-unscopables");r({target:"Array",proto:!0},{fill:e}),a("fill");
281
+ },{"../internals/export":"rhEq","../internals/array-fill":"Vois","../internals/add-to-unscopables":"Tevp"}],"OImK":[function(require,module,exports) {
282
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-iteration").filter,t=require("../internals/array-method-has-species-support");r({target:"Array",proto:!0,forced:!t("filter")},{filter:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}});
283
+ },{"../internals/export":"rhEq","../internals/array-iteration":"EUh8","../internals/array-method-has-species-support":"A5g0"}],"aGSB":[function(require,module,exports) {
284
+ "use strict";var r=require("../internals/export"),n=require("../internals/array-iteration").find,e=require("../internals/add-to-unscopables"),i="find",t=!0;i in[]&&Array(1)[i](function(){t=!1}),r({target:"Array",proto:!0,forced:t},{find:function(r){return n(this,r,arguments.length>1?arguments[1]:void 0)}}),e(i);
285
+ },{"../internals/export":"rhEq","../internals/array-iteration":"EUh8","../internals/add-to-unscopables":"Tevp"}],"BKbk":[function(require,module,exports) {
286
+ "use strict";var r=require("../internals/export"),n=require("../internals/array-iteration").findIndex,e=require("../internals/add-to-unscopables"),i="findIndex",t=!0;i in[]&&Array(1)[i](function(){t=!1}),r({target:"Array",proto:!0,forced:t},{findIndex:function(r){return n(this,r,arguments.length>1?arguments[1]:void 0)}}),e(i);
287
+ },{"../internals/export":"rhEq","../internals/array-iteration":"EUh8","../internals/add-to-unscopables":"Tevp"}],"Ygpf":[function(require,module,exports) {
288
+ "use strict";var e=require("../internals/is-array"),r=require("../internals/to-length"),t=require("../internals/bind-context"),n=function(i,a,l,o,s,u,c,f){for(var h,d=s,g=0,p=!!c&&t(c,f,3);g<o;){if(g in l){if(h=p?p(l[g],g,a):l[g],u>0&&e(h))d=n(i,a,h,r(h.length),d,u-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");i[d]=h}d++}g++}return d};module.exports=n;
289
+ },{"../internals/is-array":"oqXF","../internals/to-length":"6j9A","../internals/bind-context":"NohZ"}],"PATC":[function(require,module,exports) {
290
+ "use strict";var e=require("../internals/export"),r=require("../internals/flatten-into-array"),t=require("../internals/to-object"),n=require("../internals/to-length"),i=require("../internals/to-integer"),a=require("../internals/array-species-create");e({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,l=t(this),o=n(l.length),s=a(l,0);return s.length=r(s,l,l,o,0,void 0===e?1:i(e)),s}});
291
+ },{"../internals/export":"rhEq","../internals/flatten-into-array":"Ygpf","../internals/to-object":"Q9KC","../internals/to-length":"6j9A","../internals/to-integer":"8GwU","../internals/array-species-create":"/e6W"}],"dPcl":[function(require,module,exports) {
292
+ "use strict";var r=require("../internals/export"),e=require("../internals/flatten-into-array"),t=require("../internals/to-object"),n=require("../internals/to-length"),a=require("../internals/a-function"),i=require("../internals/array-species-create");r({target:"Array",proto:!0},{flatMap:function(r){var l,s=t(this),o=n(s.length);return a(r),(l=i(s,0)).length=e(l,s,s,o,0,1,r,arguments.length>1?arguments[1]:void 0),l}});
293
+ },{"../internals/export":"rhEq","../internals/flatten-into-array":"Ygpf","../internals/to-object":"Q9KC","../internals/to-length":"6j9A","../internals/a-function":"SOPX","../internals/array-species-create":"/e6W"}],"VXzW":[function(require,module,exports) {
294
+ "use strict";var r=require("../internals/array-iteration").forEach,e=require("../internals/sloppy-array-method");module.exports=e("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach;
295
+ },{"../internals/array-iteration":"EUh8","../internals/sloppy-array-method":"fk+t"}],"n8x2":[function(require,module,exports) {
296
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-for-each");r({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e});
297
+ },{"../internals/export":"rhEq","../internals/array-for-each":"VXzW"}],"4hJi":[function(require,module,exports) {
298
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-includes").includes,n=require("../internals/add-to-unscopables");r({target:"Array",proto:!0},{includes:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}}),n("includes");
299
+ },{"../internals/export":"rhEq","../internals/array-includes":"b2MC","../internals/add-to-unscopables":"Tevp"}],"L3SF":[function(require,module,exports) {
300
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-includes").indexOf,i=require("../internals/sloppy-array-method"),n=[].indexOf,t=!!n&&1/[1].indexOf(1,-0)<0,a=i("indexOf");r({target:"Array",proto:!0,forced:t||a},{indexOf:function(r){return t?n.apply(this,arguments)||0:e(this,r,arguments.length>1?arguments[1]:void 0)}});
301
+ },{"../internals/export":"rhEq","../internals/array-includes":"b2MC","../internals/sloppy-array-method":"fk+t"}],"HkIz":[function(require,module,exports) {
302
+ "use strict";var e=require("../internals/export"),r=require("../internals/indexed-object"),t=require("../internals/to-indexed-object"),i=require("../internals/sloppy-array-method"),n=[].join,o=r!=Object,a=i("join",",");e({target:"Array",proto:!0,forced:o||a},{join:function(e){return n.call(t(this),void 0===e?",":e)}});
303
+ },{"../internals/export":"rhEq","../internals/indexed-object":"Nn1j","../internals/to-indexed-object":"eb/r","../internals/sloppy-array-method":"fk+t"}],"aZkb":[function(require,module,exports) {
304
+ "use strict";var e=require("../internals/to-indexed-object"),r=require("../internals/to-integer"),t=require("../internals/to-length"),n=require("../internals/sloppy-array-method"),i=Math.min,a=[].lastIndexOf,l=!!a&&1/[1].lastIndexOf(1,-0)<0,s=n("lastIndexOf");module.exports=l||s?function(n){if(l)return a.apply(this,arguments)||0;var s=e(this),o=t(s.length),u=o-1;for(arguments.length>1&&(u=i(u,r(arguments[1]))),u<0&&(u=o+u);u>=0;u--)if(u in s&&s[u]===n)return u||0;return-1}:a;
305
+ },{"../internals/to-indexed-object":"eb/r","../internals/to-integer":"8GwU","../internals/to-length":"6j9A","../internals/sloppy-array-method":"fk+t"}],"YJwX":[function(require,module,exports) {
306
+ var r=require("../internals/export"),e=require("../internals/array-last-index-of");r({target:"Array",proto:!0,forced:e!==[].lastIndexOf},{lastIndexOf:e});
307
+ },{"../internals/export":"rhEq","../internals/array-last-index-of":"aZkb"}],"XwPX":[function(require,module,exports) {
308
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-iteration").map,t=require("../internals/array-method-has-species-support");r({target:"Array",proto:!0,forced:!t("map")},{map:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}});
309
+ },{"../internals/export":"rhEq","../internals/array-iteration":"EUh8","../internals/array-method-has-species-support":"A5g0"}],"SMm/":[function(require,module,exports) {
310
+ var e=require("../internals/a-function"),r=require("../internals/to-object"),n=require("../internals/indexed-object"),i=require("../internals/to-length"),t=function(t){return function(o,a,u,f){e(a);var l=r(o),c=n(l),h=i(l.length),s=t?h-1:0,d=t?-1:1;if(u<2)for(;;){if(s in c){f=c[s],s+=d;break}if(s+=d,t?s<0:h<=s)throw TypeError("Reduce of empty array with no initial value")}for(;t?s>=0:h>s;s+=d)s in c&&(f=a(f,c[s],s,l));return f}};module.exports={left:t(!1),right:t(!0)};
311
+ },{"../internals/a-function":"SOPX","../internals/to-object":"Q9KC","../internals/indexed-object":"Nn1j","../internals/to-length":"6j9A"}],"MGOS":[function(require,module,exports) {
312
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-reduce").left,t=require("../internals/sloppy-array-method");r({target:"Array",proto:!0,forced:t("reduce")},{reduce:function(r){return e(this,r,arguments.length,arguments.length>1?arguments[1]:void 0)}});
313
+ },{"../internals/export":"rhEq","../internals/array-reduce":"SMm/","../internals/sloppy-array-method":"fk+t"}],"qThj":[function(require,module,exports) {
314
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-reduce").right,t=require("../internals/sloppy-array-method");r({target:"Array",proto:!0,forced:t("reduceRight")},{reduceRight:function(r){return e(this,r,arguments.length,arguments.length>1?arguments[1]:void 0)}});
315
+ },{"../internals/export":"rhEq","../internals/array-reduce":"SMm/","../internals/sloppy-array-method":"fk+t"}],"ZdoE":[function(require,module,exports) {
316
+ "use strict";var r=require("../internals/export"),e=require("../internals/is-array"),t=[].reverse,i=[1,2];r({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return e(this)&&(this.length=this.length),t.call(this)}});
317
+ },{"../internals/export":"rhEq","../internals/is-array":"oqXF"}],"I5XU":[function(require,module,exports) {
318
+ "use strict";var r=require("../internals/export"),e=require("../internals/is-object"),t=require("../internals/is-array"),i=require("../internals/to-absolute-index"),n=require("../internals/to-length"),o=require("../internals/to-indexed-object"),a=require("../internals/create-property"),s=require("../internals/array-method-has-species-support"),l=require("../internals/well-known-symbol"),u=l("species"),c=[].slice,p=Math.max;r({target:"Array",proto:!0,forced:!s("slice")},{slice:function(r,s){var l,d,y,q=o(this),h=n(q.length),v=i(r,h),f=i(void 0===s?h:s,h);if(t(q)&&("function"!=typeof(l=q.constructor)||l!==Array&&!t(l.prototype)?e(l)&&null===(l=l[u])&&(l=void 0):l=void 0,l===Array||void 0===l))return c.call(q,v,f);for(d=new(void 0===l?Array:l)(p(f-v,0)),y=0;v<f;v++,y++)v in q&&a(d,y,q[v]);return d.length=y,d}});
319
+ },{"../internals/export":"rhEq","../internals/is-object":"AsqF","../internals/is-array":"oqXF","../internals/to-absolute-index":"QLhU","../internals/to-length":"6j9A","../internals/to-indexed-object":"eb/r","../internals/create-property":"qU9w","../internals/array-method-has-species-support":"A5g0","../internals/well-known-symbol":"Q0EA"}],"HTrq":[function(require,module,exports) {
320
+ "use strict";var r=require("../internals/export"),e=require("../internals/array-iteration").some,t=require("../internals/sloppy-array-method");r({target:"Array",proto:!0,forced:t("some")},{some:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}});
321
+ },{"../internals/export":"rhEq","../internals/array-iteration":"EUh8","../internals/sloppy-array-method":"fk+t"}],"6sDK":[function(require,module,exports) {
322
+ "use strict";var r=require("../internals/export"),t=require("../internals/a-function"),e=require("../internals/to-object"),i=require("../internals/fails"),n=require("../internals/sloppy-array-method"),o=[].sort,s=[1,2,3],a=i(function(){s.sort(void 0)}),l=i(function(){s.sort(null)}),u=n("sort"),c=a||!l||u;r({target:"Array",proto:!0,forced:c},{sort:function(r){return void 0===r?o.call(e(this)):o.call(e(this),t(r))}});
323
+ },{"../internals/export":"rhEq","../internals/a-function":"SOPX","../internals/to-object":"Q9KC","../internals/fails":"pWu7","../internals/sloppy-array-method":"fk+t"}],"AZfT":[function(require,module,exports) {
324
+ "use strict";var e=require("../internals/export"),r=require("../internals/to-absolute-index"),t=require("../internals/to-integer"),i=require("../internals/to-length"),n=require("../internals/to-object"),a=require("../internals/array-species-create"),l=require("../internals/create-property"),o=require("../internals/array-method-has-species-support"),s=Math.max,u=Math.min,h=9007199254740991,c="Maximum allowed length exceeded";e({target:"Array",proto:!0,forced:!o("splice")},{splice:function(e,o){var p,f,d,g,q,m,x=n(this),y=i(x.length),M=r(e,y),b=arguments.length;if(0===b?p=f=0:1===b?(p=0,f=y-M):(p=b-2,f=u(s(t(o),0),y-M)),y+p-f>h)throw TypeError(c);for(d=a(x,f),g=0;g<f;g++)(q=M+g)in x&&l(d,g,x[q]);if(d.length=f,p<f){for(g=M;g<y-f;g++)m=g+p,(q=g+f)in x?x[m]=x[q]:delete x[m];for(g=y;g>y-f+p;g--)delete x[g-1]}else if(p>f)for(g=y-f;g>M;g--)m=g+p-1,(q=g+f-1)in x?x[m]=x[q]:delete x[m];for(g=0;g<p;g++)x[g+M]=arguments[g+2];return x.length=y-f+p,d}});
325
+ },{"../internals/export":"rhEq","../internals/to-absolute-index":"QLhU","../internals/to-integer":"8GwU","../internals/to-length":"6j9A","../internals/to-object":"Q9KC","../internals/array-species-create":"/e6W","../internals/create-property":"qU9w","../internals/array-method-has-species-support":"A5g0"}],"bDBP":[function(require,module,exports) {
326
+ "use strict";var e=require("../internals/get-built-in"),r=require("../internals/object-define-property"),i=require("../internals/well-known-symbol"),n=require("../internals/descriptors"),t=i("species");module.exports=function(i){var s=e(i),u=r.f;n&&s&&!s[t]&&u(s,t,{configurable:!0,get:function(){return this}})};
327
+ },{"../internals/get-built-in":"mLk8","../internals/object-define-property":"AtXZ","../internals/well-known-symbol":"Q0EA","../internals/descriptors":"A8Ob"}],"4GKV":[function(require,module,exports) {
328
+ var e=require("../internals/set-species");e("Array");
329
+ },{"../internals/set-species":"bDBP"}],"bF+K":[function(require,module,exports) {
330
+ var a=require("../internals/add-to-unscopables");a("flat");
331
+ },{"../internals/add-to-unscopables":"Tevp"}],"AKUe":[function(require,module,exports) {
332
+ var a=require("../internals/add-to-unscopables");a("flatMap");
333
+ },{"../internals/add-to-unscopables":"Tevp"}],"Fgxq":[function(require,module,exports) {
334
+ "use strict";var e,r,t,n=require("../internals/object-get-prototype-of"),i=require("../internals/hide"),o=require("../internals/has"),s=require("../internals/well-known-symbol"),l=require("../internals/is-pure"),u=s("iterator"),a=!1,p=function(){return this};[].keys&&("next"in(t=[].keys())?(r=n(n(t)))!==Object.prototype&&(e=r):a=!0),null==e&&(e={}),l||o(e,u)||i(e,u,p),module.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:a};
335
+ },{"../internals/object-get-prototype-of":"xey/","../internals/hide":"mnM5","../internals/has":"j/yd","../internals/well-known-symbol":"Q0EA","../internals/is-pure":"tGwT"}],"v9+W":[function(require,module,exports) {
336
+ "use strict";var r=require("../internals/iterators-core").IteratorPrototype,e=require("../internals/object-create"),t=require("../internals/create-property-descriptor"),i=require("../internals/set-to-string-tag"),n=require("../internals/iterators"),o=function(){return this};module.exports=function(a,s,u){var c=s+" Iterator";return a.prototype=e(r,{next:t(1,u)}),i(a,c,!1,!0),n[c]=o,a};
337
+ },{"../internals/iterators-core":"Fgxq","../internals/object-create":"zWsZ","../internals/create-property-descriptor":"oNyT","../internals/set-to-string-tag":"kLCt","../internals/iterators":"Ln6o"}],"CpaJ":[function(require,module,exports) {
338
+ "use strict";var e=require("../internals/export"),r=require("../internals/create-iterator-constructor"),t=require("../internals/object-get-prototype-of"),n=require("../internals/object-set-prototype-of"),i=require("../internals/set-to-string-tag"),o=require("../internals/hide"),s=require("../internals/redefine"),u=require("../internals/well-known-symbol"),a=require("../internals/is-pure"),c=require("../internals/iterators"),l=require("../internals/iterators-core"),f=l.IteratorPrototype,p=l.BUGGY_SAFARI_ITERATORS,q=u("iterator"),y="keys",h="values",w="entries",b=function(){return this};module.exports=function(u,l,d,g,v,A,I){r(d,l,g);var j,k,m,x=function(e){if(e===v&&T)return T;if(!p&&e in O)return O[e];switch(e){case y:case h:case w:return function(){return new d(this,e)}}return function(){return new d(this)}},R=l+" Iterator",G=!1,O=u.prototype,S=O[q]||O["@@iterator"]||v&&O[v],T=!p&&S||x(v),_="Array"==l&&O.entries||S;if(_&&(j=t(_.call(new u)),f!==Object.prototype&&j.next&&(a||t(j)===f||(n?n(j,f):"function"!=typeof j[q]&&o(j,q,b)),i(j,R,!0,!0),a&&(c[R]=b))),v==h&&S&&S.name!==h&&(G=!0,T=function(){return S.call(this)}),a&&!I||O[q]===T||o(O,q,T),c[l]=T,v)if(k={values:x(h),keys:A?T:x(y),entries:x(w)},I)for(m in k)!p&&!G&&m in O||s(O,m,k[m]);else e({target:l,proto:!0,forced:p||G},k);return k};
339
+ },{"../internals/export":"rhEq","../internals/create-iterator-constructor":"v9+W","../internals/object-get-prototype-of":"xey/","../internals/object-set-prototype-of":"9eDC","../internals/set-to-string-tag":"kLCt","../internals/hide":"mnM5","../internals/redefine":"ztZs","../internals/well-known-symbol":"Q0EA","../internals/is-pure":"tGwT","../internals/iterators":"Ln6o","../internals/iterators-core":"Fgxq"}],"S91k":[function(require,module,exports) {
340
+ "use strict";var e=require("../internals/to-indexed-object"),r=require("../internals/add-to-unscopables"),t=require("../internals/iterators"),n=require("../internals/internal-state"),a=require("../internals/define-iterator"),i="Array Iterator",s=n.set,u=n.getterFor(i);module.exports=a(Array,"Array",function(r,t){s(this,{type:i,target:e(r),index:0,kind:t})},function(){var e=u(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==t?{value:n,done:!1}:"values"==t?{value:r[n],done:!1}:{value:[n,r[n]],done:!1}},"values"),t.Arguments=t.Array,r("keys"),r("values"),r("entries");
341
+ },{"../internals/to-indexed-object":"eb/r","../internals/add-to-unscopables":"Tevp","../internals/iterators":"Ln6o","../internals/internal-state":"vLSK","../internals/define-iterator":"CpaJ"}],"VRfe":[function(require,module,exports) {
342
+ var r=require("../internals/export"),t=require("../internals/to-absolute-index"),o=String.fromCharCode,e=String.fromCodePoint,n=!!e&&1!=e.length;r({target:"String",stat:!0,forced:n},{fromCodePoint:function(r){for(var e,n=[],i=arguments.length,a=0;i>a;){if(e=+arguments[a++],t(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}});
343
+ },{"../internals/export":"rhEq","../internals/to-absolute-index":"QLhU"}],"qnyo":[function(require,module,exports) {
344
+ var r=require("../internals/export"),t=require("../internals/to-indexed-object"),e=require("../internals/to-length");r({target:"String",stat:!0},{raw:function(r){for(var n=t(r.raw),i=e(n.length),a=arguments.length,g=[],o=0;i>o;)g.push(String(n[o++])),o<a&&g.push(String(arguments[o]));return g.join("")}});
345
+ },{"../internals/export":"rhEq","../internals/to-indexed-object":"eb/r","../internals/to-length":"6j9A"}],"FQEJ":[function(require,module,exports) {
346
+ var e=require("../internals/to-integer"),r=require("../internals/require-object-coercible"),t=function(t){return function(n,i){var c,o,a=String(r(n)),u=e(i),l=a.length;return u<0||u>=l?t?"":void 0:(c=a.charCodeAt(u))<55296||c>56319||u+1===l||(o=a.charCodeAt(u+1))<56320||o>57343?t?a.charAt(u):c:t?a.slice(u,u+2):o-56320+(c-55296<<10)+65536}};module.exports={codeAt:t(!1),charAt:t(!0)};
347
+ },{"../internals/to-integer":"8GwU","../internals/require-object-coercible":"RWPB"}],"X12Q":[function(require,module,exports) {
348
+ "use strict";var t=require("../internals/export"),r=require("../internals/string-multibyte").codeAt;t({target:"String",proto:!0},{codePointAt:function(t){return r(this,t)}});
349
+ },{"../internals/export":"rhEq","../internals/string-multibyte":"FQEJ"}],"fTdC":[function(require,module,exports) {
350
+ var e=require("../internals/is-object"),r=require("../internals/classof-raw"),n=require("../internals/well-known-symbol"),i=n("match");module.exports=function(n){var a;return e(n)&&(void 0!==(a=n[i])?!!a:"RegExp"==r(n))};
351
+ },{"../internals/is-object":"AsqF","../internals/classof-raw":"jUdy","../internals/well-known-symbol":"Q0EA"}],"gIbS":[function(require,module,exports) {
352
+ var e=require("../internals/is-regexp");module.exports=function(r){if(e(r))throw TypeError("The method doesn't accept regular expressions");return r};
353
+ },{"../internals/is-regexp":"fTdC"}],"cTby":[function(require,module,exports) {
354
+ var r=require("../internals/well-known-symbol"),t=r("match");module.exports=function(r){var e=/./;try{"/./"[r](e)}catch(n){try{return e[t]=!1,"/./"[r](e)}catch(a){}}return!1};
355
+ },{"../internals/well-known-symbol":"Q0EA"}],"xRPP":[function(require,module,exports) {
356
+ "use strict";var e=require("../internals/export"),r=require("../internals/to-length"),t=require("../internals/not-a-regexp"),i=require("../internals/require-object-coercible"),n=require("../internals/correct-is-regexp-logic"),l="".endsWith,o=Math.min;e({target:"String",proto:!0,forced:!n("endsWith")},{endsWith:function(e){var n=String(i(this));t(e);var s=arguments.length>1?arguments[1]:void 0,a=r(n.length),c=void 0===s?a:o(r(s),a),g=String(e);return l?l.call(n,g,c):n.slice(c-g.length,c)===g}});
357
+ },{"../internals/export":"rhEq","../internals/to-length":"6j9A","../internals/not-a-regexp":"gIbS","../internals/require-object-coercible":"RWPB","../internals/correct-is-regexp-logic":"cTby"}],"oCSF":[function(require,module,exports) {
358
+ "use strict";var e=require("../internals/export"),r=require("../internals/not-a-regexp"),i=require("../internals/require-object-coercible"),t=require("../internals/correct-is-regexp-logic");e({target:"String",proto:!0,forced:!t("includes")},{includes:function(e){return!!~String(i(this)).indexOf(r(e),arguments.length>1?arguments[1]:void 0)}});
359
+ },{"../internals/export":"rhEq","../internals/not-a-regexp":"gIbS","../internals/require-object-coercible":"RWPB","../internals/correct-is-regexp-logic":"cTby"}],"Mfpp":[function(require,module,exports) {
360
+ "use strict";var e=require("../internals/an-object");module.exports=function(){var i=e(this),t="";return i.global&&(t+="g"),i.ignoreCase&&(t+="i"),i.multiline&&(t+="m"),i.dotAll&&(t+="s"),i.unicode&&(t+="u"),i.sticky&&(t+="y"),t};
361
+ },{"../internals/an-object":"2eAP"}],"OSep":[function(require,module,exports) {
362
+ "use strict";var e=require("./regexp-flags"),l=RegExp.prototype.exec,t=String.prototype.replace,a=l,n=function(){var e=/a/,t=/b*/g;return l.call(e,"a"),l.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),r=void 0!==/()??/.exec("")[1],o=n||r;o&&(a=function(a){var o,c,i,s,x=this;return r&&(c=new RegExp("^"+x.source+"$(?!\\s)",e.call(x))),n&&(o=x.lastIndex),i=l.call(x,a),n&&i&&(x.lastIndex=x.global?i.index+i[0].length:o),r&&i&&i.length>1&&t.call(i[0],c,function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)}),i}),module.exports=a;
363
+ },{"./regexp-flags":"Mfpp"}],"2xX+":[function(require,module,exports) {
364
+ "use strict";var e=require("../internals/hide"),r=require("../internals/redefine"),n=require("../internals/fails"),t=require("../internals/well-known-symbol"),u=require("../internals/regexp-exec"),i=t("species"),c=!n(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),o=!n(function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});module.exports=function(a,l,s,p){var f=t(a),v=!n(function(){var e={};return e[f]=function(){return 7},7!=""[a](e)}),x=v&&!n(function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===a&&(r.constructor={},r.constructor[i]=function(){return r}),r[f](""),!e});if(!v||!x||"replace"===a&&!c||"split"===a&&!o){var d=/./[f],g=s(f,""[a],function(e,r,n,t,i){return r.exec===u?v&&!i?{done:!0,value:d.call(r,n,t)}:{done:!0,value:e.call(n,r,t)}:{done:!1}}),h=g[0],q=g[1];r(String.prototype,a,h),r(RegExp.prototype,f,2==l?function(e,r){return q.call(e,this,r)}:function(e){return q.call(e,this)}),p&&e(RegExp.prototype[f],"sham",!0)}};
365
+ },{"../internals/hide":"mnM5","../internals/redefine":"ztZs","../internals/fails":"pWu7","../internals/well-known-symbol":"Q0EA","../internals/regexp-exec":"OSep"}],"11A+":[function(require,module,exports) {
366
+ "use strict";var t=require("../internals/string-multibyte").charAt;module.exports=function(r,e,n){return e+(n?t(r,e).length:1)};
367
+ },{"../internals/string-multibyte":"FQEJ"}],"hv6q":[function(require,module,exports) {
368
+ var e=require("./classof-raw"),r=require("./regexp-exec");module.exports=function(o,t){var c=o.exec;if("function"==typeof c){var n=c.call(o,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==e(o))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(o,t)};
369
+ },{"./classof-raw":"jUdy","./regexp-exec":"OSep"}],"gtN7":[function(require,module,exports) {
370
+ "use strict";var e=require("../internals/fix-regexp-well-known-symbol-logic"),r=require("../internals/an-object"),n=require("../internals/to-length"),i=require("../internals/require-object-coercible"),t=require("../internals/advance-string-index"),l=require("../internals/regexp-exec-abstract");e("match",1,function(e,a,u){return[function(r){var n=i(this),t=null==r?void 0:r[e];return void 0!==t?t.call(r,n):new RegExp(r)[e](String(n))},function(e){var i=u(a,e,this);if(i.done)return i.value;var s=r(e),o=String(this);if(!s.global)return l(s,o);var c=s.unicode;s.lastIndex=0;for(var v,g=[],d=0;null!==(v=l(s,o));){var x=String(v[0]);g[d]=x,""===x&&(s.lastIndex=t(o,n(s.lastIndex),c)),d++}return 0===d?null:g}]});
371
+ },{"../internals/fix-regexp-well-known-symbol-logic":"2xX+","../internals/an-object":"2eAP","../internals/to-length":"6j9A","../internals/require-object-coercible":"RWPB","../internals/advance-string-index":"11A+","../internals/regexp-exec-abstract":"hv6q"}],"mxIp":[function(require,module,exports) {
372
+ var e=require("../internals/an-object"),n=require("../internals/a-function"),r=require("../internals/well-known-symbol"),i=r("species");module.exports=function(r,o){var t,l=e(r).constructor;return void 0===l||null==(t=e(l)[i])?o:n(t)};
373
+ },{"../internals/an-object":"2eAP","../internals/a-function":"SOPX","../internals/well-known-symbol":"Q0EA"}],"ftnR":[function(require,module,exports) {
374
+ var global = arguments[3];
375
+ var e=arguments[3],r=require("../internals/export"),n=require("../internals/create-iterator-constructor"),t=require("../internals/require-object-coercible"),i=require("../internals/to-length"),l=require("../internals/a-function"),a=require("../internals/an-object"),o=require("../internals/classof"),u=require("../internals/regexp-flags"),s=require("../internals/hide"),c=require("../internals/well-known-symbol"),g=require("../internals/species-constructor"),d=require("../internals/advance-string-index"),x=require("../internals/internal-state"),p=require("../internals/is-pure"),f=c("matchAll"),v="RegExp String",q=v+" Iterator",h=x.set,E=x.getterFor(q),b=RegExp.prototype,R=b.exec,w=function(e,r){var n,t=e.exec;if("function"==typeof t){if("object"!=typeof(n=t.call(e,r)))throw TypeError("Incorrect exec result");return n}return R.call(e,r)},y=n(function(e,r,n,t){h(this,{type:q,regexp:e,string:r,global:n,unicode:t,done:!1})},v,function(){var e=E(this);if(e.done)return{value:void 0,done:!0};var r=e.regexp,n=e.string,t=w(r,n);return null===t?{value:void 0,done:e.done=!0}:e.global?(""==String(t[0])&&(r.lastIndex=d(n,i(r.lastIndex),e.unicode)),{value:t,done:!1}):(e.done=!0,{value:t,done:!1})}),I=function(e){var r,n,t,l,o,s,c=a(this),d=String(e);return r=g(c,RegExp),void 0===(n=c.flags)&&c instanceof RegExp&&!("flags"in b)&&(n=u.call(c)),t=void 0===n?"":String(n),l=new r(r===RegExp?c.source:c,t),o=!!~t.indexOf("g"),s=!!~t.indexOf("u"),l.lastIndex=i(c.lastIndex),new y(l,d,o,s)};r({target:"String",proto:!0},{matchAll:function(e){var r,n,i,a=t(this);return null!=e&&(void 0===(n=e[f])&&p&&"RegExp"==o(e)&&(n=I),null!=n)?l(n).call(e,a):(r=String(a),i=new RegExp(e,"g"),p?I.call(i,r):i[f](r))}}),p||f in b||s(b,f,I);
376
+ },{"../internals/export":"rhEq","../internals/create-iterator-constructor":"v9+W","../internals/require-object-coercible":"RWPB","../internals/to-length":"6j9A","../internals/a-function":"SOPX","../internals/an-object":"2eAP","../internals/classof":"rs2T","../internals/regexp-flags":"Mfpp","../internals/hide":"mnM5","../internals/well-known-symbol":"Q0EA","../internals/species-constructor":"mxIp","../internals/advance-string-index":"11A+","../internals/internal-state":"vLSK","../internals/is-pure":"tGwT"}],"xEiV":[function(require,module,exports) {
377
+ "use strict";var r=require("../internals/to-integer"),e=require("../internals/require-object-coercible");module.exports="".repeat||function(t){var i=String(e(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(i+=i))1&o&&(n+=i);return n};
378
+ },{"../internals/to-integer":"8GwU","../internals/require-object-coercible":"RWPB"}],"O+1J":[function(require,module,exports) {
379
+ var e=require("../internals/to-length"),r=require("../internals/string-repeat"),t=require("../internals/require-object-coercible"),n=Math.ceil,i=function(i){return function(l,a,u){var c,o,g=String(t(l)),s=g.length,h=void 0===u?" ":String(u),q=e(a);return q<=s||""==h?g:(c=q-s,(o=r.call(h,n(c/h.length))).length>c&&(o=o.slice(0,c)),i?g+o:o+g)}};module.exports={start:i(!1),end:i(!0)};
380
+ },{"../internals/to-length":"6j9A","../internals/string-repeat":"xEiV","../internals/require-object-coercible":"RWPB"}],"eUSx":[function(require,module,exports) {
381
+ var e=require("../internals/get-built-in");module.exports=e("navigator","userAgent")||"";
382
+ },{"../internals/get-built-in":"mLk8"}],"dp+9":[function(require,module,exports) {
383
+ var e=require("../internals/user-agent");module.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(e);
384
+ },{"../internals/user-agent":"eUSx"}],"wchC":[function(require,module,exports) {
385
+ "use strict";var r=require("../internals/export"),e=require("../internals/string-pad").end,t=require("../internals/webkit-string-pad-bug");r({target:"String",proto:!0,forced:t},{padEnd:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}});
386
+ },{"../internals/export":"rhEq","../internals/string-pad":"O+1J","../internals/webkit-string-pad-bug":"dp+9"}],"QpWr":[function(require,module,exports) {
387
+ "use strict";var r=require("../internals/export"),t=require("../internals/string-pad").start,e=require("../internals/webkit-string-pad-bug");r({target:"String",proto:!0,forced:e},{padStart:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}});
388
+ },{"../internals/export":"rhEq","../internals/string-pad":"O+1J","../internals/webkit-string-pad-bug":"dp+9"}],"JXxO":[function(require,module,exports) {
389
+ var r=require("../internals/export"),e=require("../internals/string-repeat");r({target:"String",proto:!0},{repeat:e});
390
+ },{"../internals/export":"rhEq","../internals/string-repeat":"xEiV"}],"x0yB":[function(require,module,exports) {
391
+ var global = arguments[3];
392
+ var r=arguments[3],e=require("../internals/fix-regexp-well-known-symbol-logic"),n=require("../internals/an-object"),t=require("../internals/to-object"),i=require("../internals/to-length"),a=require("../internals/to-integer"),l=require("../internals/require-object-coercible"),u=require("../internals/advance-string-index"),c=require("../internals/regexp-exec-abstract"),o=Math.max,s=Math.min,v=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,d=/\$([$&'`]|\d\d?)/g,f=function(r){return void 0===r?r:String(r)};e("replace",2,function(r,e,h){return[function(n,t){var i=l(this),a=null==n?void 0:n[r];return void 0!==a?a.call(n,i,t):e.call(String(i),n,t)},function(r,t){var l=h(e,r,this,t);if(l.done)return l.value;var v=n(r),g=String(this),d="function"==typeof t;d||(t=String(t));var p=v.global;if(p){var x=v.unicode;v.lastIndex=0}for(var q=[];;){var S=c(v,g);if(null===S)break;if(q.push(S),!p)break;""===String(S[0])&&(v.lastIndex=u(g,i(v.lastIndex),x))}for(var $="",k=0,m=0;m<q.length;m++){S=q[m];for(var j=String(S[0]),w=o(s(a(S.index),g.length),0),y=[],A=1;A<S.length;A++)y.push(f(S[A]));var I=S.groups;if(d){var M=[j].concat(y,w,g);void 0!==I&&M.push(I);var z=String(t.apply(void 0,M))}else z=b(j,g,w,y,I,t);w>=k&&($+=g.slice(k,w)+z,k=w+j.length)}return $+g.slice(k)}];function b(r,n,i,a,l,u){var c=i+r.length,o=a.length,s=d;return void 0!==l&&(l=t(l),s=g),e.call(u,s,function(e,t){var u;switch(t.charAt(0)){case"$":return"$";case"&":return r;case"`":return n.slice(0,i);case"'":return n.slice(c);case"<":u=l[t.slice(1,-1)];break;default:var s=+t;if(0===s)return e;if(s>o){var g=v(s/10);return 0===g?e:g<=o?void 0===a[g-1]?t.charAt(1):a[g-1]+t.charAt(1):e}u=a[s-1]}return void 0===u?"":u})}});
393
+ },{"../internals/fix-regexp-well-known-symbol-logic":"2xX+","../internals/an-object":"2eAP","../internals/to-object":"Q9KC","../internals/to-length":"6j9A","../internals/to-integer":"8GwU","../internals/require-object-coercible":"RWPB","../internals/advance-string-index":"11A+","../internals/regexp-exec-abstract":"hv6q"}],"TMNY":[function(require,module,exports) {
394
+ "use strict";var e=require("../internals/fix-regexp-well-known-symbol-logic"),r=require("../internals/an-object"),n=require("../internals/require-object-coercible"),i=require("../internals/same-value"),t=require("../internals/regexp-exec-abstract");e("search",1,function(e,a,l){return[function(r){var i=n(this),t=null==r?void 0:r[e];return void 0!==t?t.call(r,i):new RegExp(r)[e](String(i))},function(e){var n=l(a,e,this);if(n.done)return n.value;var s=r(e),u=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var o=t(s,u);return i(s.lastIndex,c)||(s.lastIndex=c),null===o?-1:o.index}]});
395
+ },{"../internals/fix-regexp-well-known-symbol-logic":"2xX+","../internals/an-object":"2eAP","../internals/require-object-coercible":"RWPB","../internals/same-value":"bfhi","../internals/regexp-exec-abstract":"hv6q"}],"TT/v":[function(require,module,exports) {
396
+ "use strict";var e=require("../internals/fix-regexp-well-known-symbol-logic"),n=require("../internals/is-regexp"),i=require("../internals/an-object"),r=require("../internals/require-object-coercible"),t=require("../internals/species-constructor"),l=require("../internals/advance-string-index"),s=require("../internals/to-length"),u=require("../internals/regexp-exec-abstract"),a=require("../internals/regexp-exec"),c=require("../internals/fails"),g=[].push,o=Math.min,h=4294967295,p=!c(function(){return!RegExp(h,"y")});e("split",2,function(e,c,d){var f;return f="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var t=String(r(this)),l=void 0===i?h:i>>>0;if(0===l)return[];if(void 0===e)return[t];if(!n(e))return c.call(t,e,l);for(var s,u,o,p=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,v=new RegExp(e.source,d+"g");(s=a.call(v,t))&&!((u=v.lastIndex)>f&&(p.push(t.slice(f,s.index)),s.length>1&&s.index<t.length&&g.apply(p,s.slice(1)),o=s[0].length,f=u,p.length>=l));)v.lastIndex===s.index&&v.lastIndex++;return f===t.length?!o&&v.test("")||p.push(""):p.push(t.slice(f)),p.length>l?p.slice(0,l):p}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:c.call(this,e,n)}:c,[function(n,i){var t=r(this),l=null==n?void 0:n[e];return void 0!==l?l.call(n,t,i):f.call(String(t),n,i)},function(e,n){var r=d(f,e,this,n,f!==c);if(r.done)return r.value;var a=i(e),g=String(this),v=t(a,RegExp),x=a.unicode,q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(p?"y":"g"),b=new v(p?a:"^(?:"+a.source+")",q),m=void 0===n?h:n>>>0;if(0===m)return[];if(0===g.length)return null===u(b,g)?[g]:[];for(var y=0,I=0,w=[];I<g.length;){b.lastIndex=p?I:0;var E,R=u(b,p?g:g.slice(I));if(null===R||(E=o(s(b.lastIndex+(p?0:I)),g.length))===y)I=l(g,I,x);else{if(w.push(g.slice(y,I)),w.length===m)return w;for(var S=1;S<=R.length-1;S++)if(w.push(R[S]),w.length===m)return w;I=y=E}}return w.push(g.slice(y)),w}]},!p);
397
+ },{"../internals/fix-regexp-well-known-symbol-logic":"2xX+","../internals/is-regexp":"fTdC","../internals/an-object":"2eAP","../internals/require-object-coercible":"RWPB","../internals/species-constructor":"mxIp","../internals/advance-string-index":"11A+","../internals/to-length":"6j9A","../internals/regexp-exec-abstract":"hv6q","../internals/regexp-exec":"OSep","../internals/fails":"pWu7"}],"GB8Q":[function(require,module,exports) {
398
+ "use strict";var r=require("../internals/export"),e=require("../internals/to-length"),t=require("../internals/not-a-regexp"),i=require("../internals/require-object-coercible"),n=require("../internals/correct-is-regexp-logic"),s="".startsWith,a=Math.min;r({target:"String",proto:!0,forced:!n("startsWith")},{startsWith:function(r){var n=String(i(this));t(r);var l=e(a(arguments.length>1?arguments[1]:void 0,n.length)),o=String(r);return s?s.call(n,o,l):n.slice(l,l+o.length)===o}});
399
+ },{"../internals/export":"rhEq","../internals/to-length":"6j9A","../internals/not-a-regexp":"gIbS","../internals/require-object-coercible":"RWPB","../internals/correct-is-regexp-logic":"cTby"}],"52t1":[function(require,module,exports) {
400
+ module.exports="\t\n\v\f\r                \u2028\u2029\ufeff";
401
+ },{}],"Fme6":[function(require,module,exports) {
402
+ var e=require("../internals/require-object-coercible"),r=require("../internals/whitespaces"),t="["+r+"]",n=RegExp("^"+t+t+"*"),i=RegExp(t+t+"*$"),a=function(r){return function(t){var a=String(e(t));return 1&r&&(a=a.replace(n,"")),2&r&&(a=a.replace(i,"")),a}};module.exports={start:a(1),end:a(2),trim:a(3)};
403
+ },{"../internals/require-object-coercible":"RWPB","../internals/whitespaces":"52t1"}],"UtzI":[function(require,module,exports) {
404
+ var e=require("../internals/fails"),r=require("../internals/whitespaces"),n="​…᠎";module.exports=function(i){return e(function(){return!!r[i]()||n[i]()!=n||r[i].name!==i})};
405
+ },{"../internals/fails":"pWu7","../internals/whitespaces":"52t1"}],"A+FC":[function(require,module,exports) {
406
+ "use strict";var r=require("../internals/export"),t=require("../internals/string-trim").trim,i=require("../internals/forced-string-trim-method");r({target:"String",proto:!0,forced:i("trim")},{trim:function(){return t(this)}});
407
+ },{"../internals/export":"rhEq","../internals/string-trim":"Fme6","../internals/forced-string-trim-method":"UtzI"}],"jY0J":[function(require,module,exports) {
408
+ "use strict";var r=require("../internals/export"),t=require("../internals/string-trim").start,i=require("../internals/forced-string-trim-method"),e=i("trimStart"),n=e?function(){return t(this)}:"".trimStart;r({target:"String",proto:!0,forced:e},{trimStart:n,trimLeft:n});
409
+ },{"../internals/export":"rhEq","../internals/string-trim":"Fme6","../internals/forced-string-trim-method":"UtzI"}],"dAVn":[function(require,module,exports) {
410
+ "use strict";var r=require("../internals/export"),t=require("../internals/string-trim").end,i=require("../internals/forced-string-trim-method"),e=i("trimEnd"),n=e?function(){return t(this)}:"".trimEnd;r({target:"String",proto:!0,forced:e},{trimEnd:n,trimRight:n});
411
+ },{"../internals/export":"rhEq","../internals/string-trim":"Fme6","../internals/forced-string-trim-method":"UtzI"}],"PSYM":[function(require,module,exports) {
412
+ "use strict";var t=require("../internals/string-multibyte").charAt,e=require("../internals/internal-state"),r=require("../internals/define-iterator"),n="String Iterator",i=e.set,a=e.getterFor(n);r(String,"String",function(t){i(this,{type:n,string:String(t),index:0})},function(){var e,r=a(this),n=r.string,i=r.index;return i>=n.length?{value:void 0,done:!0}:(e=t(n,i),r.index+=e.length,{value:e,done:!1})});
413
+ },{"../internals/string-multibyte":"FQEJ","../internals/internal-state":"vLSK","../internals/define-iterator":"CpaJ"}],"vMTH":[function(require,module,exports) {
414
+ var r=require("../internals/require-object-coercible"),e=/"/g;module.exports=function(t,i,n,o){var u=String(r(t)),c="<"+i;return""!==n&&(c+=" "+n+'="'+String(o).replace(e,"&quot;")+'"'),c+">"+u+"</"+i+">"};
415
+ },{"../internals/require-object-coercible":"RWPB"}],"cH3E":[function(require,module,exports) {
416
+ var r=require("../internals/fails");module.exports=function(e){return r(function(){var r=""[e]('"');return r!==r.toLowerCase()||r.split('"').length>3})};
417
+ },{"../internals/fails":"pWu7"}],"J8PS":[function(require,module,exports) {
418
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("anchor")},{anchor:function(r){return e(this,"a","name",r)}});
419
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"alkc":[function(require,module,exports) {
420
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("big")},{big:function(){return e(this,"big","","")}});
421
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"AYvZ":[function(require,module,exports) {
422
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("blink")},{blink:function(){return e(this,"blink","","")}});
423
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"jQTw":[function(require,module,exports) {
424
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("bold")},{bold:function(){return e(this,"b","","")}});
425
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"It3T":[function(require,module,exports) {
426
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("fixed")},{fixed:function(){return e(this,"tt","","")}});
427
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"sE8q":[function(require,module,exports) {
428
+ "use strict";var r=require("../internals/export"),t=require("../internals/create-html"),e=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:e("fontcolor")},{fontcolor:function(r){return t(this,"font","color",r)}});
429
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"ABfs":[function(require,module,exports) {
430
+ "use strict";var e=require("../internals/export"),r=require("../internals/create-html"),t=require("../internals/forced-string-html-method");e({target:"String",proto:!0,forced:t("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}});
431
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"zvaT":[function(require,module,exports) {
432
+ "use strict";var r=require("../internals/export"),t=require("../internals/create-html"),e=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:e("italics")},{italics:function(){return t(this,"i","","")}});
433
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"QJ0z":[function(require,module,exports) {
434
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("link")},{link:function(r){return e(this,"a","href",r)}});
435
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"Ai0M":[function(require,module,exports) {
436
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("small")},{small:function(){return e(this,"small","","")}});
437
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"Scmo":[function(require,module,exports) {
438
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("strike")},{strike:function(){return e(this,"strike","","")}});
439
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"+e1a":[function(require,module,exports) {
440
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("sub")},{sub:function(){return e(this,"sub","","")}});
441
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"4rC3":[function(require,module,exports) {
442
+ "use strict";var r=require("../internals/export"),e=require("../internals/create-html"),t=require("../internals/forced-string-html-method");r({target:"String",proto:!0,forced:t("sup")},{sup:function(){return e(this,"sup","","")}});
443
+ },{"../internals/export":"rhEq","../internals/create-html":"vMTH","../internals/forced-string-html-method":"cH3E"}],"e5oz":[function(require,module,exports) {
444
+ var t=require("../internals/is-object"),e=require("../internals/object-set-prototype-of");module.exports=function(o,r,n){var p,i;return e&&"function"==typeof(p=r.constructor)&&p!==n&&t(i=p.prototype)&&i!==n.prototype&&e(o,i),o};
445
+ },{"../internals/is-object":"AsqF","../internals/object-set-prototype-of":"9eDC"}],"7DbB":[function(require,module,exports) {
446
+
447
+ var e=require("../internals/descriptors"),r=require("../internals/global"),n=require("../internals/is-forced"),i=require("../internals/inherit-if-required"),t=require("../internals/object-define-property").f,s=require("../internals/object-get-own-property-names").f,o=require("../internals/is-regexp"),a=require("../internals/regexp-flags"),u=require("../internals/redefine"),l=require("../internals/fails"),c=require("../internals/set-species"),f=require("../internals/well-known-symbol"),p=f("match"),g=r.RegExp,q=g.prototype,d=/a/g,x=/a/g,b=new g(d)!==d,h=e&&n("RegExp",!b||l(function(){return x[p]=!1,g(d)!=d||g(x)==x||"/a/i"!=g(d,"i")}));if(h){for(var w=function(e,r){var n=this instanceof w,t=o(e),s=void 0===r;return!n&&t&&e.constructor===w&&s?e:i(b?new g(t&&!s?e.source:e,r):g((t=e instanceof w)?e.source:e,t&&s?a.call(e):r),n?this:q,w)},y=function(e){e in w||t(w,e,{configurable:!0,get:function(){return g[e]},set:function(r){g[e]=r}})},v=s(g),E=0;v.length>E;)y(v[E++]);q.constructor=w,w.prototype=q,u(r,"RegExp",w)}c("RegExp");
448
+ },{"../internals/descriptors":"A8Ob","../internals/global":"MVLi","../internals/is-forced":"Y6Gi","../internals/inherit-if-required":"e5oz","../internals/object-define-property":"AtXZ","../internals/object-get-own-property-names":"QFCk","../internals/is-regexp":"fTdC","../internals/regexp-flags":"Mfpp","../internals/redefine":"ztZs","../internals/fails":"pWu7","../internals/set-species":"bDBP","../internals/well-known-symbol":"Q0EA"}],"MlTh":[function(require,module,exports) {
449
+ "use strict";var e=require("../internals/export"),r=require("../internals/regexp-exec");e({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r});
450
+ },{"../internals/export":"rhEq","../internals/regexp-exec":"OSep"}],"ERpX":[function(require,module,exports) {
451
+ var e=require("../internals/descriptors"),r=require("../internals/object-define-property"),g=require("../internals/regexp-flags");e&&"g"!=/./g.flags&&r.f(RegExp.prototype,"flags",{configurable:!0,get:g});
452
+ },{"../internals/descriptors":"A8Ob","../internals/object-define-property":"AtXZ","../internals/regexp-flags":"Mfpp"}],"g0xY":[function(require,module,exports) {
453
+ "use strict";var e=require("../internals/redefine"),r=require("../internals/an-object"),n=require("../internals/fails"),t=require("../internals/regexp-flags"),i="toString",a=RegExp.prototype,s=a[i],l=n(function(){return"/a/b"!=s.call({source:"a",flags:"b"})}),o=s.name!=i;(l||o)&&e(RegExp.prototype,i,function(){var e=r(this),n=String(e.source),i=e.flags;return"/"+n+"/"+String(void 0===i&&e instanceof RegExp&&!("flags"in a)?t.call(e):i)},{unsafe:!0});
454
+ },{"../internals/redefine":"ztZs","../internals/an-object":"2eAP","../internals/fails":"pWu7","../internals/regexp-flags":"Mfpp"}],"ZaNP":[function(require,module,exports) {
455
+
456
+ var r=require("../internals/global"),e=require("../internals/string-trim").trim,t=require("../internals/whitespaces"),i=r.parseInt,n=/^[+-]?0[Xx]/,s=8!==i(t+"08")||22!==i(t+"0x16");module.exports=s?function(r,t){var s=e(String(r));return i(s,t>>>0||(n.test(s)?16:10))}:i;
457
+ },{"../internals/global":"MVLi","../internals/string-trim":"Fme6","../internals/whitespaces":"52t1"}],"6GhQ":[function(require,module,exports) {
458
+ var r=require("../internals/export"),e=require("../internals/parse-int");r({global:!0,forced:parseInt!=e},{parseInt:e});
459
+ },{"../internals/export":"rhEq","../internals/parse-int":"ZaNP"}],"fN/f":[function(require,module,exports) {
460
+
461
+ var r=require("../internals/global"),e=require("../internals/string-trim").trim,t=require("../internals/whitespaces"),i=r.parseFloat,n=1/i(t+"-0")!=-1/0;module.exports=n?function(r){var t=e(String(r)),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i;
462
+ },{"../internals/global":"MVLi","../internals/string-trim":"Fme6","../internals/whitespaces":"52t1"}],"kPoD":[function(require,module,exports) {
463
+ var r=require("../internals/export"),e=require("../internals/parse-float");r({global:!0,forced:parseFloat!=e},{parseFloat:e});
464
+ },{"../internals/export":"rhEq","../internals/parse-float":"fN/f"}],"Bq/h":[function(require,module,exports) {
465
+
466
+ "use strict";var e=require("../internals/descriptors"),r=require("../internals/global"),t=require("../internals/is-forced"),i=require("../internals/redefine"),n=require("../internals/has"),a=require("../internals/classof-raw"),s=require("../internals/inherit-if-required"),o=require("../internals/to-primitive"),l=require("../internals/fails"),u=require("../internals/object-create"),c=require("../internals/object-get-own-property-names").f,f=require("../internals/object-get-own-property-descriptor").f,I=require("../internals/object-define-property").f,N=require("../internals/string-trim").trim,p="Number",q=r[p],g=q.prototype,h=a(u(g))==p,E=function(e){var r,t,i,n,a,s,l,u,c=o(e,!1);if("string"==typeof c&&c.length>2)if(43===(r=(c=N(c)).charCodeAt(0))||45===r){if(88===(t=c.charCodeAt(2))||120===t)return NaN}else if(48===r){switch(c.charCodeAt(1)){case 66:case 98:i=2,n=49;break;case 79:case 111:i=8,n=55;break;default:return+c}for(s=(a=c.slice(2)).length,l=0;l<s;l++)if((u=a.charCodeAt(l))<48||u>n)return NaN;return parseInt(a,i)}return+c};if(t(p,!q(" 0o1")||!q("0b1")||q("+0x1"))){for(var d,A=function(e){var r=arguments.length<1?0:e,t=this;return t instanceof A&&(h?l(function(){g.valueOf.call(t)}):a(t)!=p)?s(new q(E(r)),t,A):E(r)},b=e?c(q):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;b.length>_;_++)n(q,d=b[_])&&!n(A,d)&&I(A,d,f(q,d));A.prototype=g,g.constructor=A,i(r,p,A)}
467
+ },{"../internals/descriptors":"A8Ob","../internals/global":"MVLi","../internals/is-forced":"Y6Gi","../internals/redefine":"ztZs","../internals/has":"j/yd","../internals/classof-raw":"jUdy","../internals/inherit-if-required":"e5oz","../internals/to-primitive":"wZyz","../internals/fails":"pWu7","../internals/object-create":"zWsZ","../internals/object-get-own-property-names":"QFCk","../internals/object-get-own-property-descriptor":"6zm/","../internals/object-define-property":"AtXZ","../internals/string-trim":"Fme6"}],"SaF2":[function(require,module,exports) {
468
+ var r=require("../internals/export");r({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});
469
+ },{"../internals/export":"rhEq"}],"DaQS":[function(require,module,exports) {
470
+
471
+ var e=require("../internals/global"),i=e.isFinite;module.exports=Number.isFinite||function(e){return"number"==typeof e&&i(e)};
472
+ },{"../internals/global":"MVLi"}],"xykq":[function(require,module,exports) {
473
+ var e=require("../internals/export"),r=require("../internals/number-is-finite");e({target:"Number",stat:!0},{isFinite:r});
474
+ },{"../internals/export":"rhEq","../internals/number-is-finite":"DaQS"}],"HM9H":[function(require,module,exports) {
475
+ var e=require("../internals/is-object"),r=Math.floor;module.exports=function(i){return!e(i)&&isFinite(i)&&r(i)===i};
476
+ },{"../internals/is-object":"AsqF"}],"4mK5":[function(require,module,exports) {
477
+ var e=require("../internals/export"),r=require("../internals/is-integer");e({target:"Number",stat:!0},{isInteger:r});
478
+ },{"../internals/export":"rhEq","../internals/is-integer":"HM9H"}],"jYuH":[function(require,module,exports) {
479
+ var r=require("../internals/export");r({target:"Number",stat:!0},{isNaN:function(r){return r!=r}});
480
+ },{"../internals/export":"rhEq"}],"4+B+":[function(require,module,exports) {
481
+ var e=require("../internals/export"),r=require("../internals/is-integer"),t=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&t(e)<=9007199254740991}});
482
+ },{"../internals/export":"rhEq","../internals/is-integer":"HM9H"}],"D9EQ":[function(require,module,exports) {
483
+ var r=require("../internals/export");r({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991});
484
+ },{"../internals/export":"rhEq"}],"WlNN":[function(require,module,exports) {
485
+ var r=require("../internals/export");r({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991});
486
+ },{"../internals/export":"rhEq"}],"tHG2":[function(require,module,exports) {
487
+ var r=require("../internals/export"),e=require("../internals/parse-float");r({target:"Number",stat:!0,forced:Number.parseFloat!=e},{parseFloat:e});
488
+ },{"../internals/export":"rhEq","../internals/parse-float":"fN/f"}],"95e+":[function(require,module,exports) {
489
+ var r=require("../internals/export"),e=require("../internals/parse-int");r({target:"Number",stat:!0,forced:Number.parseInt!=e},{parseInt:e});
490
+ },{"../internals/export":"rhEq","../internals/parse-int":"ZaNP"}],"bMZq":[function(require,module,exports) {
491
+ var r=require("../internals/classof-raw");module.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e};
492
+ },{"../internals/classof-raw":"jUdy"}],"qTD4":[function(require,module,exports) {
493
+ "use strict";var r=require("../internals/export"),e=require("../internals/to-integer"),t=require("../internals/this-number-value"),i=require("../internals/string-repeat"),n=require("../internals/fails"),o=1..toFixed,a=Math.floor,f=function(r,e,t){return 0===e?t:e%2==1?f(r,e-1,t*r):f(r*r,e/2,t)},u=function(r){for(var e=0,t=r;t>=4096;)e+=12,t/=4096;for(;t>=2;)e+=1,t/=2;return e},l=o&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(function(){o.call({})});r({target:"Number",proto:!0,forced:l},{toFixed:function(r){var n,o,l,c,s=t(this),d=e(r),g=[0,0,0,0,0,0],v="",x="0",h=function(r,e){for(var t=-1,i=e;++t<6;)i+=r*g[t],g[t]=i%1e7,i=a(i/1e7)},F=function(r){for(var e=6,t=0;--e>=0;)t+=g[e],g[e]=a(t/r),t=t%r*1e7},q=function(){for(var r=6,e="";--r>=0;)if(""!==e||0===r||0!==g[r]){var t=String(g[r]);e=""===e?t:e+i.call("0",7-t.length)+t}return e};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(v="-",s=-s),s>1e-21)if(o=(n=u(s*f(2,69,1))-69)<0?s*f(2,-n,1):s/f(2,n,1),o*=4503599627370496,(n=52-n)>0){for(h(0,o),l=d;l>=7;)h(1e7,0),l-=7;for(h(f(10,l,1),0),l=n-1;l>=23;)F(1<<23),l-=23;F(1<<l),h(1,1),F(2),x=q()}else h(0,o),h(1<<-n,0),x=q()+i.call("0",d);return x=d>0?v+((c=x.length)<=d?"0."+i.call("0",d-c)+x:x.slice(0,c-d)+"."+x.slice(c-d)):v+x}});
494
+ },{"../internals/export":"rhEq","../internals/to-integer":"8GwU","../internals/this-number-value":"bMZq","../internals/string-repeat":"xEiV","../internals/fails":"pWu7"}],"PZps":[function(require,module,exports) {
495
+ "use strict";var r=require("../internals/export"),e=require("../internals/fails"),i=require("../internals/this-number-value"),t=1..toPrecision,n=e(function(){return"1"!==t.call(1,void 0)})||!e(function(){t.call({})});r({target:"Number",proto:!0,forced:n},{toPrecision:function(r){return void 0===r?t.call(i(this)):t.call(i(this),r)}});
496
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/this-number-value":"bMZq"}],"EUym":[function(require,module,exports) {
497
+ var e=Math.log;module.exports=Math.log1p||function(o){return(o=+o)>-1e-8&&o<1e-8?o-o*o/2:e(1+o)};
498
+ },{}],"szh2":[function(require,module,exports) {
499
+ var t=require("../internals/export"),a=require("../internals/math-log1p"),r=Math.acosh,e=Math.log,h=Math.sqrt,o=Math.LN2,n=!r||710!=Math.floor(r(Number.MAX_VALUE))||r(1/0)!=1/0;t({target:"Math",stat:!0,forced:n},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?e(t)+o:a(t-1+h(t-1)*h(t+1))}});
500
+ },{"../internals/export":"rhEq","../internals/math-log1p":"EUym"}],"lX9L":[function(require,module,exports) {
501
+ var t=require("../internals/export"),a=Math.asinh,r=Math.log,e=Math.sqrt;function i(t){return isFinite(t=+t)&&0!=t?t<0?-i(-t):r(t+e(t*t+1)):t}t({target:"Math",stat:!0,forced:!(a&&1/a(0)>0)},{asinh:i});
502
+ },{"../internals/export":"rhEq"}],"6dF5":[function(require,module,exports) {
503
+ var t=require("../internals/export"),a=Math.atanh,r=Math.log;t({target:"Math",stat:!0,forced:!(a&&1/a(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:r((1+t)/(1-t))/2}});
504
+ },{"../internals/export":"rhEq"}],"wL8P":[function(require,module,exports) {
505
+ module.exports=Math.sign||function(n){return 0==(n=+n)||n!=n?n:n<0?-1:1};
506
+ },{}],"RF5g":[function(require,module,exports) {
507
+ var t=require("../internals/export"),r=require("../internals/math-sign"),a=Math.abs,e=Math.pow;t({target:"Math",stat:!0},{cbrt:function(t){return r(t=+t)*e(a(t),1/3)}});
508
+ },{"../internals/export":"rhEq","../internals/math-sign":"wL8P"}],"k2zs":[function(require,module,exports) {
509
+ var t=require("../internals/export"),r=Math.floor,a=Math.log,e=Math.LOG2E;t({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-r(a(t+.5)*e):32}});
510
+ },{"../internals/export":"rhEq"}],"xAPX":[function(require,module,exports) {
511
+ var e=Math.expm1,t=Math.exp;module.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:t(e)-1}:e;
512
+ },{}],"KbzY":[function(require,module,exports) {
513
+ var t=require("../internals/export"),r=require("../internals/math-expm1"),a=Math.cosh,e=Math.abs,h=Math.E;t({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var a=r(e(t)-1)+1;return(a+1/(a*h*h))*(h/2)}});
514
+ },{"../internals/export":"rhEq","../internals/math-expm1":"xAPX"}],"gE1J":[function(require,module,exports) {
515
+ var e=require("../internals/export"),r=require("../internals/math-expm1");e({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r});
516
+ },{"../internals/export":"rhEq","../internals/math-expm1":"xAPX"}],"9mXo":[function(require,module,exports) {
517
+ var r=require("../internals/math-sign"),n=Math.abs,t=Math.pow,a=t(2,-52),e=t(2,-23),u=t(2,127)*(2-e),o=t(2,-126),i=function(r){return r+1/a-1/a};module.exports=Math.fround||function(t){var h,s,f=n(t),M=r(t);return f<o?M*i(f/o/e)*o*e:(s=(h=(1+e/a)*f)-(h-f))>u||s!=s?M*(1/0):M*s};
518
+ },{"../internals/math-sign":"wL8P"}],"zb0x":[function(require,module,exports) {
519
+ var r=require("../internals/export"),t=require("../internals/math-fround");r({target:"Math",stat:!0},{fround:t});
520
+ },{"../internals/export":"rhEq","../internals/math-fround":"9mXo"}],"B4c+":[function(require,module,exports) {
521
+ var t=require("../internals/export"),r=Math.hypot,a=Math.abs,e=Math.sqrt,h=!!r&&r(1/0,NaN)!==1/0;t({target:"Math",stat:!0,forced:h},{hypot:function(t,r){for(var h,n,o=0,s=0,M=arguments.length,f=0;s<M;)f<(h=a(arguments[s++]))?(o=o*(n=f/h)*n+1,f=h):o+=h>0?(n=h/f)*n:h;return f===1/0?1/0:f*e(o)}});
522
+ },{"../internals/export":"rhEq"}],"8Bl9":[function(require,module,exports) {
523
+ var r=require("../internals/export"),t=require("../internals/fails"),e=Math.imul,n=t(function(){return-5!=e(4294967295,5)||2!=e.length});r({target:"Math",stat:!0,forced:n},{imul:function(r,t){var e=+r,n=+t,a=65535&e,i=65535&n;return 0|a*i+((65535&e>>>16)*i+a*(65535&n>>>16)<<16>>>0)}});
524
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7"}],"Zbeu":[function(require,module,exports) {
525
+ var t=require("../internals/export"),r=Math.log,a=Math.LOG10E;t({target:"Math",stat:!0},{log10:function(t){return r(t)*a}});
526
+ },{"../internals/export":"rhEq"}],"e/Vj":[function(require,module,exports) {
527
+ var r=require("../internals/export"),t=require("../internals/math-log1p");r({target:"Math",stat:!0},{log1p:t});
528
+ },{"../internals/export":"rhEq","../internals/math-log1p":"EUym"}],"4HPC":[function(require,module,exports) {
529
+ var t=require("../internals/export"),r=Math.log,a=Math.LN2;t({target:"Math",stat:!0},{log2:function(t){return r(t)/a}});
530
+ },{"../internals/export":"rhEq"}],"wvgJ":[function(require,module,exports) {
531
+ var r=require("../internals/export"),t=require("../internals/math-sign");r({target:"Math",stat:!0},{sign:t});
532
+ },{"../internals/export":"rhEq","../internals/math-sign":"wL8P"}],"1VNT":[function(require,module,exports) {
533
+ var e=require("../internals/export"),t=require("../internals/fails"),r=require("../internals/math-expm1"),a=Math.abs,n=Math.exp,i=Math.E,h=t(function(){return-2e-17!=Math.sinh(-2e-17)});e({target:"Math",stat:!0,forced:h},{sinh:function(e){return a(e=+e)<1?(r(e)-r(-e))/2:(n(e-1)-n(-e-1))*(i/2)}});
534
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/math-expm1":"xAPX"}],"I2ip":[function(require,module,exports) {
535
+ var t=require("../internals/export"),r=require("../internals/math-expm1"),e=Math.exp;t({target:"Math",stat:!0},{tanh:function(t){var a=r(t=+t),n=r(-t);return a==1/0?1:n==1/0?-1:(a-n)/(e(t)+e(-t))}});
536
+ },{"../internals/export":"rhEq","../internals/math-expm1":"xAPX"}],"CevC":[function(require,module,exports) {
537
+ var t=require("../internals/set-to-string-tag");t(Math,"Math",!0);
538
+ },{"../internals/set-to-string-tag":"kLCt"}],"GaOn":[function(require,module,exports) {
539
+ var t=require("../internals/export"),r=Math.ceil,a=Math.floor;t({target:"Math",stat:!0},{trunc:function(t){return(t>0?a:r)(t)}});
540
+ },{"../internals/export":"rhEq"}],"Yqn8":[function(require,module,exports) {
541
+ var e=require("../internals/export");e({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});
542
+ },{"../internals/export":"rhEq"}],"KP08":[function(require,module,exports) {
543
+ "use strict";var t=require("../internals/export"),r=require("../internals/fails"),e=require("../internals/to-object"),n=require("../internals/to-primitive"),i=r(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})});t({target:"Date",proto:!0,forced:i},{toJSON:function(t){var r=e(this),i=n(r);return"number"!=typeof i||isFinite(i)?r.toISOString():null}});
544
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/to-object":"Q9KC","../internals/to-primitive":"wZyz"}],"rnka":[function(require,module,exports) {
545
+ "use strict";var t=require("../internals/fails"),e=require("../internals/string-pad").start,i=Math.abs,r=Date.prototype,n=r.getTime,s=r.toISOString;module.exports=t(function(){return"0385-07-25T07:06:39.999Z"!=s.call(new Date(-5e13-1))})||!t(function(){s.call(new Date(NaN))})?function(){if(!isFinite(n.call(this)))throw RangeError("Invalid time value");var t=this.getUTCFullYear(),r=this.getUTCMilliseconds(),s=t<0?"-":t>9999?"+":"";return s+e(i(t),s?6:4,0)+"-"+e(this.getUTCMonth()+1,2,0)+"-"+e(this.getUTCDate(),2,0)+"T"+e(this.getUTCHours(),2,0)+":"+e(this.getUTCMinutes(),2,0)+":"+e(this.getUTCSeconds(),2,0)+"."+e(r,3,0)+"Z"}:s;
546
+ },{"../internals/fails":"pWu7","../internals/string-pad":"O+1J"}],"FvU6":[function(require,module,exports) {
547
+ var t=require("../internals/export"),r=require("../internals/date-to-iso-string");t({target:"Date",proto:!0,forced:Date.prototype.toISOString!==r},{toISOString:r});
548
+ },{"../internals/export":"rhEq","../internals/date-to-iso-string":"rnka"}],"GjHx":[function(require,module,exports) {
549
+ var e=require("../internals/redefine"),t=Date.prototype,a="Invalid Date",r="toString",i=t[r],n=t.getTime;new Date(NaN)+""!=a&&e(t,r,function(){var e=n.call(this);return e==e?i.call(this):a});
550
+ },{"../internals/redefine":"ztZs"}],"1/IB":[function(require,module,exports) {
551
+ "use strict";var r=require("../internals/an-object"),e=require("../internals/to-primitive");module.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return e(r(this),"number"!==t)};
552
+ },{"../internals/an-object":"2eAP","../internals/to-primitive":"wZyz"}],"bfeb":[function(require,module,exports) {
553
+ var e=require("../internals/hide"),i=require("../internals/date-to-primitive"),r=require("../internals/well-known-symbol"),t=r("toPrimitive"),n=Date.prototype;t in n||e(n,t,i);
554
+ },{"../internals/hide":"mnM5","../internals/date-to-primitive":"1/IB","../internals/well-known-symbol":"Q0EA"}],"azWb":[function(require,module,exports) {
555
+
556
+ var r=require("../internals/global"),e=require("../internals/set-to-string-tag");e(r.JSON,"JSON",!0);
557
+ },{"../internals/global":"MVLi","../internals/set-to-string-tag":"kLCt"}],"O8N5":[function(require,module,exports) {
558
+
559
+ var e=require("../internals/global");module.exports=e.Promise;
560
+ },{"../internals/global":"MVLi"}],"oPIw":[function(require,module,exports) {
561
+ var r=require("../internals/redefine");module.exports=function(e,n,i){for(var o in n)r(e,o,n[o],i);return e};
562
+ },{"../internals/redefine":"ztZs"}],"pJoy":[function(require,module,exports) {
563
+ module.exports=function(o,r,n){if(!(o instanceof r))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return o};
564
+ },{}],"g1no":[function(require,module,exports) {
565
+
566
+
567
+ var e,n,t,i=require("../internals/global"),o=require("../internals/fails"),r=require("../internals/classof-raw"),s=require("../internals/bind-context"),a=require("../internals/html"),c=require("../internals/document-create-element"),u=i.location,l=i.setImmediate,p=i.clearImmediate,f=i.process,d=i.MessageChannel,m=i.Dispatch,h=0,g={},v="onreadystatechange",q=function(e){if(g.hasOwnProperty(e)){var n=g[e];delete g[e],n()}},w=function(e){return function(){q(e)}},y=function(e){q(e.data)},M=function(e){i.postMessage(e+"",u.protocol+"//"+u.host)};l&&p||(l=function(n){for(var t=[],i=1;arguments.length>i;)t.push(arguments[i++]);return g[++h]=function(){("function"==typeof n?n:Function(n)).apply(void 0,t)},e(h),h},p=function(e){delete g[e]},"process"==r(f)?e=function(e){f.nextTick(w(e))}:m&&m.now?e=function(e){m.now(w(e))}:d?(t=(n=new d).port2,n.port1.onmessage=y,e=s(t.postMessage,t,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||o(M)?e=v in c("script")?function(e){a.appendChild(c("script"))[v]=function(){a.removeChild(this),q(e)}}:function(e){setTimeout(w(e),0)}:(e=M,i.addEventListener("message",y,!1))),module.exports={set:l,clear:p};
568
+ },{"../internals/global":"MVLi","../internals/fails":"pWu7","../internals/classof-raw":"jUdy","../internals/bind-context":"NohZ","../internals/html":"tTwY","../internals/document-create-element":"3tvd"}],"jLqr":[function(require,module,exports) {
569
+
570
+
571
+ var e,t,r,n,i,o,a,s,c=require("../internals/global"),u=require("../internals/object-get-own-property-descriptor").f,l=require("../internals/classof-raw"),v=require("../internals/task").set,d=require("../internals/user-agent"),f=c.MutationObserver||c.WebKitMutationObserver,p=c.process,b=c.Promise,x="process"==l(p),q=u(c,"queueMicrotask"),h=q&&q.value;h||(e=function(){var e,i;for(x&&(e=p.domain)&&e.exit();t;){i=t.fn,t=t.next;try{i()}catch(o){throw t?n():r=void 0,o}}r=void 0,e&&e.enter()},x?n=function(){p.nextTick(e)}:f&&!/(iphone|ipod|ipad).*applewebkit/i.test(d)?(i=!0,o=document.createTextNode(""),new f(e).observe(o,{characterData:!0}),n=function(){o.data=i=!i}):b&&b.resolve?(a=b.resolve(void 0),s=a.then,n=function(){s.call(a,e)}):n=function(){v.call(c,e)}),module.exports=h||function(e){var i={fn:e,next:void 0};r&&(r.next=i),t||(t=i,n()),r=i};
572
+ },{"../internals/global":"MVLi","../internals/object-get-own-property-descriptor":"6zm/","../internals/classof-raw":"jUdy","../internals/task":"g1no","../internals/user-agent":"eUSx"}],"N/kS":[function(require,module,exports) {
573
+ "use strict";var r=require("../internals/a-function"),e=function(e){var t,i;this.promise=new e(function(r,e){if(void 0!==t||void 0!==i)throw TypeError("Bad Promise constructor");t=r,i=e}),this.resolve=r(t),this.reject=r(i)};module.exports.f=function(r){return new e(r)};
574
+ },{"../internals/a-function":"SOPX"}],"0S6u":[function(require,module,exports) {
575
+ var r=require("../internals/an-object"),e=require("../internals/is-object"),i=require("../internals/new-promise-capability");module.exports=function(n,t){if(r(n),e(t)&&t.constructor===n)return t;var o=i.f(n);return(0,o.resolve)(t),o.promise};
576
+ },{"../internals/an-object":"2eAP","../internals/is-object":"AsqF","../internals/new-promise-capability":"N/kS"}],"xiDB":[function(require,module,exports) {
577
+
578
+ var r=require("../internals/global");module.exports=function(e,o){var l=r.console;l&&l.error&&(1===arguments.length?l.error(e):l.error(e,o))};
579
+ },{"../internals/global":"MVLi"}],"16co":[function(require,module,exports) {
580
+ module.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}};
581
+ },{}],"ItbG":[function(require,module,exports) {
582
+
583
+
584
+ "use strict";var e,t,n,r,i=require("../internals/export"),o=require("../internals/is-pure"),a=require("../internals/global"),s=require("../internals/path"),c=require("../internals/native-promise-constructor"),u=require("../internals/redefine"),l=require("../internals/redefine-all"),f=require("../internals/set-to-string-tag"),v=require("../internals/set-species"),h=require("../internals/is-object"),p=require("../internals/a-function"),d=require("../internals/an-instance"),m=require("../internals/classof-raw"),q=require("../internals/iterate"),y=require("../internals/check-correctness-of-iteration"),j=require("../internals/species-constructor"),g=require("../internals/task").set,w=require("../internals/microtask"),b=require("../internals/promise-resolve"),E=require("../internals/host-report-errors"),k=require("../internals/new-promise-capability"),x=require("../internals/perform"),P=require("../internals/user-agent"),O=require("../internals/internal-state"),R=require("../internals/is-forced"),C=require("../internals/well-known-symbol"),F=C("species"),H="Promise",T=O.get,U=O.set,z=O.getterFor(H),A=c,B=a.TypeError,D=a.document,G=a.process,I=a.fetch,J=G&&G.versions,K=J&&J.v8||"",L=k.f,M=L,N="process"==m(G),Q=!!(D&&D.createEvent&&a.dispatchEvent),S="unhandledrejection",V="rejectionhandled",W=0,X=1,Y=2,Z=1,$=2,_=R(H,function(){var e=A.resolve(1),t=function(){},n=(e.constructor={})[F]=function(e){e(t,t)};return!((N||"function"==typeof PromiseRejectionEvent)&&(!o||e.finally)&&e.then(t)instanceof n&&0!==K.indexOf("6.6")&&-1===P.indexOf("Chrome/66"))}),ee=_||!y(function(e){A.all(e).catch(function(){})}),te=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},ne=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;w(function(){for(var i=t.value,o=t.state==X,a=0;r.length>a;){var s,c,u,l=r[a++],f=o?l.ok:l.fail,v=l.resolve,h=l.reject,p=l.domain;try{f?(o||(t.rejection===$&&ae(e,t),t.rejection=Z),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),u=!0)),s===l.promise?h(B("Promise-chain cycle")):(c=te(s))?c.call(s,v,h):v(s)):h(i)}catch(d){p&&!u&&p.exit(),h(d)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&ie(e,t)})}},re=function(e,t,n){var r,i;Q?((r=D.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),a.dispatchEvent(r)):r={promise:t,reason:n},(i=a["on"+e])?i(r):e===S&&E("Unhandled promise rejection",n)},ie=function(e,t){g.call(a,function(){var n,r=t.value;if(oe(t)&&(n=x(function(){N?G.emit("unhandledRejection",r,e):re(S,e,r)}),t.rejection=N||oe(t)?$:Z,n.error))throw n.value})},oe=function(e){return e.rejection!==Z&&!e.parent},ae=function(e,t){g.call(a,function(){N?G.emit("rejectionHandled",e):re(V,e,t.value)})},se=function(e,t,n,r){return function(i){e(t,n,i,r)}},ce=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=Y,ne(e,t,!0))},ue=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw B("Promise can't be resolved itself");var i=te(n);i?w(function(){var r={done:!1};try{i.call(n,se(ue,e,r,t),se(ce,e,r,t))}catch(o){ce(e,r,o,t)}}):(t.value=n,t.state=X,ne(e,t,!1))}catch(o){ce(e,{done:!1},o,t)}}};_&&(A=function(t){d(this,A,H),p(t),e.call(this);var n=T(this);try{t(se(ue,this,n),se(ce,this,n))}catch(r){ce(this,n,r)}},(e=function(e){U(this,{type:H,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:W,value:void 0})}).prototype=l(A.prototype,{then:function(e,t){var n=z(this),r=L(j(this,A));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=N?G.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=W&&ne(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),t=function(){var t=new e,n=T(t);this.promise=t,this.resolve=se(ue,t,n),this.reject=se(ce,t,n)},k.f=L=function(e){return e===A||e===n?new t(e):M(e)},o||"function"!=typeof c||(r=c.prototype.then,u(c.prototype,"then",function(e,t){var n=this;return new A(function(e,t){r.call(n,e,t)}).then(e,t)}),"function"==typeof I&&i({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return b(A,I.apply(a,arguments))}}))),i({global:!0,wrap:!0,forced:_},{Promise:A}),f(A,H,!1,!0),v(H),n=s[H],i({target:H,stat:!0,forced:_},{reject:function(e){var t=L(this);return t.reject.call(void 0,e),t.promise}}),i({target:H,stat:!0,forced:o||_},{resolve:function(e){return b(o&&this===n?A:this,e)}}),i({target:H,stat:!0,forced:ee},{all:function(e){var t=this,n=L(t),r=n.resolve,i=n.reject,o=x(function(){var n=p(t.resolve),o=[],a=0,s=1;q(e,function(e){var c=a++,u=!1;o.push(void 0),s++,n.call(t,e).then(function(e){u||(u=!0,o[c]=e,--s||r(o))},i)}),--s||r(o)});return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=L(t),r=n.reject,i=x(function(){var i=p(t.resolve);q(e,function(e){i.call(t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});
585
+ },{"../internals/export":"rhEq","../internals/is-pure":"tGwT","../internals/global":"MVLi","../internals/path":"+h/M","../internals/native-promise-constructor":"O8N5","../internals/redefine":"ztZs","../internals/redefine-all":"oPIw","../internals/set-to-string-tag":"kLCt","../internals/set-species":"bDBP","../internals/is-object":"AsqF","../internals/a-function":"SOPX","../internals/an-instance":"pJoy","../internals/classof-raw":"jUdy","../internals/iterate":"Oj1G","../internals/check-correctness-of-iteration":"/XOl","../internals/species-constructor":"mxIp","../internals/task":"g1no","../internals/microtask":"jLqr","../internals/promise-resolve":"0S6u","../internals/host-report-errors":"xiDB","../internals/new-promise-capability":"N/kS","../internals/perform":"16co","../internals/user-agent":"eUSx","../internals/internal-state":"vLSK","../internals/is-forced":"Y6Gi","../internals/well-known-symbol":"Q0EA"}],"i5OW":[function(require,module,exports) {
586
+ "use strict";var e=require("../internals/export"),r=require("../internals/a-function"),t=require("../internals/new-promise-capability"),i=require("../internals/perform"),n=require("../internals/iterate");e({target:"Promise",stat:!0},{allSettled:function(e){var a=this,s=t.f(a),u=s.resolve,l=s.reject,o=i(function(){var t=r(a.resolve),i=[],s=0,l=1;n(e,function(e){var r=s++,n=!1;i.push(void 0),l++,t.call(a,e).then(function(e){n||(n=!0,i[r]={status:"fulfilled",value:e},--l||u(i))},function(e){n||(n=!0,i[r]={status:"rejected",reason:e},--l||u(i))})}),--l||u(i)});return o.error&&l(o.value),s.promise}});
587
+ },{"../internals/export":"rhEq","../internals/a-function":"SOPX","../internals/new-promise-capability":"N/kS","../internals/perform":"16co","../internals/iterate":"Oj1G"}],"cWVQ":[function(require,module,exports) {
588
+ "use strict";var e=require("../internals/export"),r=require("../internals/is-pure"),t=require("../internals/native-promise-constructor"),n=require("../internals/get-built-in"),i=require("../internals/species-constructor"),o=require("../internals/promise-resolve"),u=require("../internals/redefine");e({target:"Promise",proto:!0,real:!0},{finally:function(e){var r=i(this,n("Promise")),t="function"==typeof e;return this.then(t?function(t){return o(r,e()).then(function(){return t})}:e,t?function(t){return o(r,e()).then(function(){throw t})}:e)}}),r||"function"!=typeof t||t.prototype.finally||u(t.prototype,"finally",n("Promise").prototype.finally);
589
+ },{"../internals/export":"rhEq","../internals/is-pure":"tGwT","../internals/native-promise-constructor":"O8N5","../internals/get-built-in":"mLk8","../internals/species-constructor":"mxIp","../internals/promise-resolve":"0S6u","../internals/redefine":"ztZs"}],"eBDp":[function(require,module,exports) {
590
+
591
+ "use strict";var e=require("../internals/export"),r=require("../internals/global"),n=require("../internals/is-forced"),t=require("../internals/redefine"),i=require("../internals/internal-metadata"),a=require("../internals/iterate"),s=require("../internals/an-instance"),u=require("../internals/is-object"),o=require("../internals/fails"),l=require("../internals/check-correctness-of-iteration"),c=require("../internals/set-to-string-tag"),f=require("../internals/inherit-if-required");module.exports=function(d,h,q,g,p){var v=r[d],w=v&&v.prototype,b=v,x=g?"set":"add",y={},E=function(e){var r=w[e];t(w,e,"add"==e?function(e){return r.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!u(e))&&r.call(this,0===e?0:e)}:"get"==e?function(e){return p&&!u(e)?void 0:r.call(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!u(e))&&r.call(this,0===e?0:e)}:function(e,n){return r.call(this,0===e?0:e,n),this})};if(n(d,"function"!=typeof v||!(p||w.forEach&&!o(function(){(new v).entries().next()}))))b=q.getConstructor(h,d,g,x),i.REQUIRED=!0;else if(n(d,!0)){var m=new b,R=m[x](p?{}:-0,1)!=m,j=o(function(){m.has(1)}),k=l(function(e){new v(e)}),C=!p&&o(function(){for(var e=new v,r=5;r--;)e[x](r,r);return!e.has(-0)});k||((b=h(function(e,r){s(e,b,d);var n=f(new v,e,b);return null!=r&&a(r,n[x],n,g),n})).prototype=w,w.constructor=b),(j||C)&&(E("delete"),E("has"),g&&E("get")),(C||R)&&E(x),p&&w.clear&&delete w.clear}return y[d]=b,e({global:!0,forced:b!=v},y),c(b,d),p||q.setStrong(b,d,g),b};
592
+ },{"../internals/export":"rhEq","../internals/global":"MVLi","../internals/is-forced":"Y6Gi","../internals/redefine":"ztZs","../internals/internal-metadata":"Cjms","../internals/iterate":"Oj1G","../internals/an-instance":"pJoy","../internals/is-object":"AsqF","../internals/fails":"pWu7","../internals/check-correctness-of-iteration":"/XOl","../internals/set-to-string-tag":"kLCt","../internals/inherit-if-required":"e5oz"}],"wHth":[function(require,module,exports) {
593
+ var define;
594
+ var e,t=require("../internals/object-define-property").f,r=require("../internals/object-create"),i=require("../internals/redefine-all"),n=require("../internals/bind-context"),s=require("../internals/an-instance"),a=require("../internals/iterate"),o=require("../internals/define-iterator"),u=require("../internals/set-species"),l=require("../internals/descriptors"),v=require("../internals/internal-metadata").fastKey,d=require("../internals/internal-state"),f=d.set,c=d.getterFor;module.exports={getConstructor:function(e,o,u,d){var p=e(function(e,t){s(e,p,o),f(e,{type:o,index:r(null),first:void 0,last:void 0,size:0}),l||(e.size=0),null!=t&&a(t,e[d],e,u)}),x=c(o),h=function(e,t,r){var i,n,s=x(e),a=y(e,t);return a?a.value=r:(s.last=a={index:n=v(t,!0),key:t,value:r,previous:i=s.last,next:void 0,removed:!1},s.first||(s.first=a),i&&(i.next=a),l?s.size++:e.size++,"F"!==n&&(s.index[n]=a)),e},y=function(e,t){var r,i=x(e),n=v(t);if("F"!==n)return i.index[n];for(r=i.first;r;r=r.next)if(r.key==t)return r};return i(p.prototype,{clear:function(){for(var e=x(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,l?e.size=0:this.size=0},delete:function(e){var t=x(this),r=y(this,e);if(r){var i=r.next,n=r.previous;delete t.index[r.index],r.removed=!0,n&&(n.next=i),i&&(i.previous=n),t.first==r&&(t.first=i),t.last==r&&(t.last=n),l?t.size--:this.size--}return!!r},forEach:function(e){for(var t,r=x(this),i=n(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),i(p.prototype,u?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return h(this,0===e?0:e,t)}}:{add:function(e){return h(this,e=0===e?0:e,e)}}),l&&t(p.prototype,"size",{get:function(){return x(this).size}}),p},setStrong:function(e,t,r){var i=t+" Iterator",n=c(t),s=c(i);o(e,t,function(e,t){f(this,{type:i,target:e,state:n(e),kind:t,last:void 0})},function(){for(var e=s(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})},r?"entries":"values",!r,!0),u(t)}};
595
+ },{"../internals/object-define-property":"AtXZ","../internals/object-create":"zWsZ","../internals/redefine-all":"oPIw","../internals/bind-context":"NohZ","../internals/an-instance":"pJoy","../internals/iterate":"Oj1G","../internals/define-iterator":"CpaJ","../internals/set-species":"bDBP","../internals/descriptors":"A8Ob","../internals/internal-metadata":"Cjms","../internals/internal-state":"vLSK"}],"3h/K":[function(require,module,exports) {
596
+ "use strict";var e=require("../internals/collection"),n=require("../internals/collection-strong");module.exports=e("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n,!0);
597
+ },{"../internals/collection":"eBDp","../internals/collection-strong":"wHth"}],"YQdF":[function(require,module,exports) {
598
+ "use strict";var e=require("../internals/collection"),t=require("../internals/collection-strong");module.exports=e("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},t);
599
+ },{"../internals/collection":"eBDp","../internals/collection-strong":"wHth"}],"cqZs":[function(require,module,exports) {
600
+ var define;
601
+ var e,t=require("../internals/redefine-all"),r=require("../internals/internal-metadata").getWeakData,n=require("../internals/an-object"),i=require("../internals/is-object"),u=require("../internals/an-instance"),a=require("../internals/iterate"),s=require("../internals/array-iteration"),o=require("../internals/has"),f=require("../internals/internal-state"),c=f.set,l=f.getterFor,d=s.find,h=s.findIndex,v=0,p=function(e){return e.frozen||(e.frozen=new q)},q=function(){this.entries=[]},g=function(e,t){return d(e.entries,function(e){return e[0]===t})};q.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=h(this.entries,function(t){return t[0]===e});return~t&&this.entries.splice(t,1),!!~t}},module.exports={getConstructor:function(e,s,f,d){var h=e(function(e,t){u(e,h,s),c(e,{type:s,id:v++,frozen:void 0}),null!=t&&a(t,e[d],e,f)}),q=l(s),g=function(e,t,i){var u=q(e),a=r(n(t),!0);return!0===a?p(u).set(t,i):a[u.id]=i,e};return t(h.prototype,{delete:function(e){var t=q(this);if(!i(e))return!1;var n=r(e);return!0===n?p(t).delete(e):n&&o(n,t.id)&&delete n[t.id]},has:function(e){var t=q(this);if(!i(e))return!1;var n=r(e);return!0===n?p(t).has(e):n&&o(n,t.id)}}),t(h.prototype,f?{get:function(e){var t=q(this);if(i(e)){var n=r(e);return!0===n?p(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}};
602
+ },{"../internals/redefine-all":"oPIw","../internals/internal-metadata":"Cjms","../internals/an-object":"2eAP","../internals/is-object":"AsqF","../internals/an-instance":"pJoy","../internals/iterate":"Oj1G","../internals/array-iteration":"EUh8","../internals/has":"j/yd","../internals/internal-state":"vLSK"}],"VLkh":[function(require,module,exports) {
603
+
604
+ "use strict";var e,t=require("../internals/global"),r=require("../internals/redefine-all"),n=require("../internals/internal-metadata"),i=require("../internals/collection"),l=require("../internals/collection-weak"),a=require("../internals/is-object"),s=require("../internals/internal-state").enforce,o=require("../internals/native-weak-map"),c=!t.ActiveXObject&&"ActiveXObject"in t,u=Object.isExtensible,f=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},h=module.exports=i("WeakMap",f,l,!0,!0);if(o&&c){e=l.getConstructor(f,"WeakMap",!0),n.REQUIRED=!0;var z=h.prototype,v=z.delete,q=z.has,d=z.get,b=z.set;r(z,{delete:function(t){if(a(t)&&!u(t)){var r=s(this);return r.frozen||(r.frozen=new e),v.call(this,t)||r.frozen.delete(t)}return v.call(this,t)},has:function(t){if(a(t)&&!u(t)){var r=s(this);return r.frozen||(r.frozen=new e),q.call(this,t)||r.frozen.has(t)}return q.call(this,t)},get:function(t){if(a(t)&&!u(t)){var r=s(this);return r.frozen||(r.frozen=new e),q.call(this,t)?d.call(this,t):r.frozen.get(t)}return d.call(this,t)},set:function(t,r){if(a(t)&&!u(t)){var n=s(this);n.frozen||(n.frozen=new e),q.call(this,t)?b.call(this,t,r):n.frozen.set(t,r)}else b.call(this,t,r);return this}})}
605
+ },{"../internals/global":"MVLi","../internals/redefine-all":"oPIw","../internals/internal-metadata":"Cjms","../internals/collection":"eBDp","../internals/collection-weak":"cqZs","../internals/is-object":"AsqF","../internals/internal-state":"vLSK","../internals/native-weak-map":"Z7Ix"}],"wv6n":[function(require,module,exports) {
606
+ "use strict";var e=require("../internals/collection"),n=require("../internals/collection-weak");e("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n,!1,!0);
607
+ },{"../internals/collection":"eBDp","../internals/collection-weak":"cqZs"}],"WAtV":[function(require,module,exports) {
608
+
609
+ "use strict";var r,t=require("../internals/descriptors"),e=require("../internals/global"),i=require("../internals/is-object"),o=require("../internals/has"),n=require("../internals/classof"),a=require("../internals/hide"),y=require("../internals/redefine"),p=require("../internals/object-define-property").f,f=require("../internals/object-get-prototype-of"),u=require("../internals/object-set-prototype-of"),s=require("../internals/well-known-symbol"),l=require("../internals/uid"),c=e.DataView,A=c&&c.prototype,d=e.Int8Array,T=d&&d.prototype,q=e.Uint8ClampedArray,E=q&&q.prototype,R=d&&f(d),v=T&&f(T),_=Object.prototype,h=_.isPrototypeOf,w=s("toStringTag"),I=l("TYPED_ARRAY_TAG"),b=!(!e.ArrayBuffer||!c),g=b&&!!u&&"Opera"!==n(e.opera),F=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},V=function(r){var t=n(r);return"DataView"===t||o(U,t)},Y=function(r){return i(r)&&o(U,n(r))},j=function(r){if(Y(r))return r;throw TypeError("Target is not a typed array")},P=function(t){if(u){if(h.call(R,t))return t}else for(var i in U)if(o(U,r)){var n=e[i];if(n&&(t===n||h.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},m=function(r,i,n){if(t){if(n)for(var a in U){var p=e[a];p&&o(p.prototype,r)&&delete p.prototype[r]}v[r]&&!n||y(v,r,n?i:g&&T[r]||i)}},D=function(r,i,n){var a,p;if(t){if(u){if(n)for(a in U)(p=e[a])&&o(p,r)&&delete p[r];if(R[r]&&!n)return;try{return y(R,r,n?i:g&&d[r]||i)}catch(f){}}for(a in U)!(p=e[a])||p[r]&&!n||y(p,r,i)}};for(r in U)e[r]||(g=!1);if((!g||"function"!=typeof R||R===Function.prototype)&&(R=function(){throw TypeError("Incorrect invocation")},g))for(r in U)e[r]&&u(e[r],R);if((!g||!v||v===_)&&(v=R.prototype,g))for(r in U)e[r]&&u(e[r].prototype,v);if(g&&f(E)!==v&&u(E,v),t&&!o(v,w))for(r in F=!0,p(v,w,{get:function(){return i(this)?this[I]:void 0}}),U)e[r]&&a(e[r],I,r);b&&u&&f(A)!==_&&u(A,_),module.exports={NATIVE_ARRAY_BUFFER:b,NATIVE_ARRAY_BUFFER_VIEWS:g,TYPED_ARRAY_TAG:F&&I,aTypedArray:j,aTypedArrayConstructor:P,exportProto:m,exportStatic:D,isView:V,isTypedArray:Y,TypedArray:R,TypedArrayPrototype:v};
610
+ },{"../internals/descriptors":"A8Ob","../internals/global":"MVLi","../internals/is-object":"AsqF","../internals/has":"j/yd","../internals/classof":"rs2T","../internals/hide":"mnM5","../internals/redefine":"ztZs","../internals/object-define-property":"AtXZ","../internals/object-get-prototype-of":"xey/","../internals/object-set-prototype-of":"9eDC","../internals/well-known-symbol":"Q0EA","../internals/uid":"bxyG"}],"oe6/":[function(require,module,exports) {
611
+ var r=require("../internals/to-integer"),e=require("../internals/to-length");module.exports=function(n){if(void 0===n)return 0;var t=r(n),i=e(t);if(t!==i)throw RangeError("Wrong length or index");return i};
612
+ },{"../internals/to-integer":"8GwU","../internals/to-length":"6j9A"}],"1PaB":[function(require,module,exports) {
613
+
614
+ "use strict";var t=require("../internals/global"),n=require("../internals/descriptors"),e=require("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER,r=require("../internals/hide"),i=require("../internals/redefine-all"),o=require("../internals/fails"),s=require("../internals/an-instance"),f=require("../internals/to-integer"),u=require("../internals/to-length"),a=require("../internals/to-index"),h=require("../internals/object-get-own-property-names").f,l=require("../internals/object-define-property").f,c=require("../internals/array-fill"),g=require("../internals/set-to-string-tag"),v=require("../internals/internal-state"),b=v.get,y=v.set,d="ArrayBuffer",w="DataView",q="prototype",I="Wrong length",p="Wrong index",L=t[d],U=L,A=t[w],F=t.Math,N=t.RangeError,O=1/0,x=F.abs,R=F.pow,E=F.floor,W=F.log,j=F.LN2,m=function(t,n,e){var r,i,o,s=new Array(e),f=8*e-n-1,u=(1<<f)-1,a=u>>1,h=23===n?R(2,-24)-R(2,-77):0,l=t<0||0===t&&1/t<0?1:0,c=0;for((t=x(t))!=t||t===O?(i=t!=t?1:0,r=u):(r=E(W(t)/j),t*(o=R(2,-r))<1&&(r--,o*=2),(t+=r+a>=1?h/o:h*R(2,1-a))*o>=2&&(r++,o/=2),r+a>=u?(i=0,r=u):r+a>=1?(i=(t*o-1)*R(2,n),r+=a):(i=t*R(2,a-1)*R(2,n),r=0));n>=8;s[c++]=255&i,i/=256,n-=8);for(r=r<<n|i,f+=n;f>0;s[c++]=255&r,r/=256,f-=8);return s[--c]|=128*l,s},B=function(t,n){var e,r=t.length,i=8*r-n-1,o=(1<<i)-1,s=o>>1,f=i-7,u=r-1,a=t[u--],h=127&a;for(a>>=7;f>0;h=256*h+t[u],u--,f-=8);for(e=h&(1<<-f)-1,h>>=-f,f+=n;f>0;e=256*e+t[u],u--,f-=8);if(0===h)h=1-s;else{if(h===o)return e?NaN:a?-O:O;e+=R(2,n),h-=s}return(a?-1:1)*e*R(2,h-n)},V=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},_=function(t){return[255&t]},D=function(t){return[255&t,t>>8&255]},M=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},T=function(t){return m(t,23,4)},Y=function(t){return m(t,52,8)},k=function(t,n){l(t[q],n,{get:function(){return b(this)[n]}})},z=function(t,n,e,r){var i=a(+e),o=b(t);if(i+n>o.byteLength)throw N(p);var s=b(o.buffer).bytes,f=i+o.byteOffset,u=s.slice(f,f+n);return r?u:u.reverse()},C=function(t,n,e,r,i,o){var s=a(+e),f=b(t);if(s+n>f.byteLength)throw N(p);for(var u=b(f.buffer).bytes,h=s+f.byteOffset,l=r(+i),c=0;c<n;c++)u[h+c]=l[o?c:n-c-1]};if(e){if(!o(function(){L(1)})||!o(function(){new L(-1)})||o(function(){return new L,new L(1.5),new L(NaN),L.name!=d})){for(var G,H=(U=function(t){return s(this,U),new L(a(t))})[q]=L[q],J=h(L),K=0;J.length>K;)(G=J[K++])in U||r(U,G,L[G]);H.constructor=U}var P=new A(new U(2)),Q=A[q].setInt8;P.setInt8(0,2147483648),P.setInt8(1,2147483649),!P.getInt8(0)&&P.getInt8(1)||i(A[q],{setInt8:function(t,n){Q.call(this,t,n<<24>>24)},setUint8:function(t,n){Q.call(this,t,n<<24>>24)}},{unsafe:!0})}else U=function(t){s(this,U,d);var e=a(t);y(this,{bytes:c.call(new Array(e),0),byteLength:e}),n||(this.byteLength=e)},A=function(t,e,r){s(this,A,w),s(t,U,w);var i=b(t).byteLength,o=f(e);if(o<0||o>i)throw N("Wrong offset");if(o+(r=void 0===r?i-o:u(r))>i)throw N(I);y(this,{buffer:t,byteLength:r,byteOffset:o}),n||(this.buffer=t,this.byteLength=r,this.byteOffset=o)},n&&(k(U,"byteLength"),k(A,"buffer"),k(A,"byteLength"),k(A,"byteOffset")),i(A[q],{getInt8:function(t){return z(this,1,t)[0]<<24>>24},getUint8:function(t){return z(this,1,t)[0]},getInt16:function(t){var n=z(this,2,t,arguments.length>1?arguments[1]:void 0);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=z(this,2,t,arguments.length>1?arguments[1]:void 0);return n[1]<<8|n[0]},getInt32:function(t){return V(z(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return V(z(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return B(z(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return B(z(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,n){C(this,1,t,_,n)},setUint8:function(t,n){C(this,1,t,_,n)},setInt16:function(t,n){C(this,2,t,D,n,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,n){C(this,2,t,D,n,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,n){C(this,4,t,M,n,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,n){C(this,4,t,M,n,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,n){C(this,4,t,T,n,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,n){C(this,8,t,Y,n,arguments.length>2?arguments[2]:void 0)}});g(U,d),g(A,w),exports[d]=U,exports[w]=A;
615
+ },{"../internals/global":"MVLi","../internals/descriptors":"A8Ob","../internals/array-buffer-view-core":"WAtV","../internals/hide":"mnM5","../internals/redefine-all":"oPIw","../internals/fails":"pWu7","../internals/an-instance":"pJoy","../internals/to-integer":"8GwU","../internals/to-length":"6j9A","../internals/to-index":"oe6/","../internals/object-get-own-property-names":"QFCk","../internals/object-define-property":"AtXZ","../internals/array-fill":"Vois","../internals/set-to-string-tag":"kLCt","../internals/internal-state":"vLSK"}],"k7bY":[function(require,module,exports) {
616
+
617
+ "use strict";var r=require("../internals/export"),e=require("../internals/global"),a=require("../internals/array-buffer"),i=require("../internals/set-species"),s="ArrayBuffer",l=a[s],n=e[s];r({global:!0,forced:n!==l},{ArrayBuffer:l}),i(s);
618
+ },{"../internals/export":"rhEq","../internals/global":"MVLi","../internals/array-buffer":"1PaB","../internals/set-species":"bDBP"}],"gshG":[function(require,module,exports) {
619
+ var r=require("../internals/export"),e=require("../internals/array-buffer-view-core"),i=e.NATIVE_ARRAY_BUFFER_VIEWS;r({target:"ArrayBuffer",stat:!0,forced:!i},{isView:e.isView});
620
+ },{"../internals/export":"rhEq","../internals/array-buffer-view-core":"WAtV"}],"hWBW":[function(require,module,exports) {
621
+ "use strict";var e=require("../internals/export"),r=require("../internals/fails"),t=require("../internals/array-buffer"),i=require("../internals/an-object"),n=require("../internals/to-absolute-index"),s=require("../internals/to-length"),a=require("../internals/species-constructor"),o=t.ArrayBuffer,u=t.DataView,l=o.prototype.slice,f=r(function(){return!new o(2).slice(1,void 0).byteLength});e({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:f},{slice:function(e,r){if(void 0!==l&&void 0===r)return l.call(i(this),e);for(var t=i(this).byteLength,f=n(e,t),c=n(void 0===r?t:r,t),h=new(a(this,o))(s(c-f)),q=new u(this),d=new u(h),v=0;f<c;)d.setUint8(v++,q.getUint8(f++));return h}});
622
+ },{"../internals/export":"rhEq","../internals/fails":"pWu7","../internals/array-buffer":"1PaB","../internals/an-object":"2eAP","../internals/to-absolute-index":"QLhU","../internals/to-length":"6j9A","../internals/species-constructor":"mxIp"}],"PIWk":[function(require,module,exports) {
623
+ var r=require("../internals/export"),e=require("../internals/array-buffer"),a=require("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER;r({global:!0,forced:!a},{DataView:e.DataView});
624
+ },{"../internals/export":"rhEq","../internals/array-buffer":"1PaB","../internals/array-buffer-view-core":"WAtV"}],"f/+b":[function(require,module,exports) {
625
+
626
+ var e=require("../internals/global"),n=require("../internals/fails"),r=require("../internals/check-correctness-of-iteration"),i=require("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,t=e.ArrayBuffer,u=e.Int8Array;module.exports=!i||!n(function(){u(1)})||!n(function(){new u(-1)})||!r(function(e){new u,new u(null),new u(1.5),new u(e)},!0)||n(function(){return 1!==new u(new t(2),1,void 0).length});
627
+ },{"../internals/global":"MVLi","../internals/fails":"pWu7","../internals/check-correctness-of-iteration":"/XOl","../internals/array-buffer-view-core":"WAtV"}],"x7gX":[function(require,module,exports) {
628
+ var r=require("../internals/to-integer");module.exports=function(e,n){var o=r(e);if(o<0||o%n)throw RangeError("Wrong offset");return o};
629
+ },{"../internals/to-integer":"8GwU"}],"FCc9":[function(require,module,exports) {
630
+ var e=require("../internals/to-object"),r=require("../internals/to-length"),t=require("../internals/get-iterator-method"),n=require("../internals/is-array-iterator-method"),i=require("../internals/bind-context"),o=require("../internals/array-buffer-view-core").aTypedArrayConstructor;module.exports=function(a){var l,u,s,d,h,c=e(a),f=arguments.length,q=f>1?arguments[1]:void 0,v=void 0!==q,g=t(c);if(null!=g&&!n(g))for(h=g.call(c),c=[];!(d=h.next()).done;)c.push(d.value);for(v&&f>2&&(q=i(q,arguments[2],2)),u=r(c.length),s=new(o(this))(u),l=0;u>l;l++)s[l]=v?q(c[l],l):c[l];return s};
631
+ },{"../internals/to-object":"Q9KC","../internals/to-length":"6j9A","../internals/get-iterator-method":"VM64","../internals/is-array-iterator-method":"XTOV","../internals/bind-context":"NohZ","../internals/array-buffer-view-core":"WAtV"}],"8Sko":[function(require,module,exports) {
632
+
633
+ "use strict";var e=require("../internals/export"),r=require("../internals/global"),t=require("../internals/descriptors"),n=require("../internals/typed-arrays-constructors-requires-wrappers"),i=require("../internals/array-buffer-view-core"),o=require("../internals/array-buffer"),a=require("../internals/an-instance"),u=require("../internals/create-property-descriptor"),s=require("../internals/hide"),f=require("../internals/to-length"),l=require("../internals/to-index"),c=require("../internals/to-offset"),y=require("../internals/to-primitive"),p=require("../internals/has"),b=require("../internals/classof"),q=require("../internals/is-object"),g=require("../internals/object-create"),d=require("../internals/object-set-prototype-of"),w=require("../internals/object-get-own-property-names").f,h=require("../internals/typed-array-from"),v=require("../internals/array-iteration").forEach,A=require("../internals/set-species"),m=require("../internals/object-define-property"),E=require("../internals/object-get-own-property-descriptor"),T=require("../internals/internal-state"),j=T.get,R=T.set,_=m.f,O=E.f,B=Math.round,P=r.RangeError,S=o.ArrayBuffer,x=o.DataView,L=i.NATIVE_ARRAY_BUFFER_VIEWS,Y=i.TYPED_ARRAY_TAG,D=i.TypedArray,V=i.TypedArrayPrototype,C=i.aTypedArrayConstructor,F=i.isTypedArray,I="BYTES_PER_ELEMENT",M="Wrong length",N=function(e,r){for(var t=0,n=r.length,i=new(C(e))(n);n>t;)i[t]=r[t++];return i},W=function(e,r){_(e,r,{get:function(){return j(this)[r]}})},G=function(e){var r;return e instanceof S||"ArrayBuffer"==(r=b(e))||"SharedArrayBuffer"==r},U=function(e,r){return F(e)&&"symbol"!=typeof r&&r in e&&String(+r)==String(r)},k=function(e,r){return U(e,r=y(r,!0))?u(2,e[r]):O(e,r)},z=function(e,r,t){return!(U(e,r=y(r,!0))&&q(t)&&p(t,"value"))||p(t,"get")||p(t,"set")||t.configurable||p(t,"writable")&&!t.writable||p(t,"enumerable")&&!t.enumerable?_(e,r,t):(e[r]=t.value,e)};t?(L||(E.f=k,m.f=z,W(V,"buffer"),W(V,"byteOffset"),W(V,"byteLength"),W(V,"length")),e({target:"Object",stat:!0,forced:!L},{getOwnPropertyDescriptor:k,defineProperty:z}),module.exports=function(t,i,o,u){var y=t+(u?"Clamped":"")+"Array",p="get"+t,b="set"+t,m=r[y],E=m,T=E&&E.prototype,O={},C=function(e,r){_(e,r,{get:function(){return function(e,r){var t=j(e);return t.view[p](r*i+t.byteOffset,!0)}(this,r)},set:function(e){return function(e,r,t){var n=j(e);u&&(t=(t=B(t))<0?0:t>255?255:255&t),n.view[b](r*i+n.byteOffset,t,!0)}(this,r,e)},enumerable:!0})};L?n&&(E=o(function(e,r,t,n){return a(e,E,y),q(r)?G(r)?void 0!==n?new m(r,c(t,i),n):void 0!==t?new m(r,c(t,i)):new m(r):F(r)?N(E,r):h.call(E,r):new m(l(r))}),d&&d(E,D),v(w(m),function(e){e in E||s(E,e,m[e])}),E.prototype=T):(E=o(function(e,r,t,n){a(e,E,y);var o,u,s,p=0,b=0;if(q(r)){if(!G(r))return F(r)?N(E,r):h.call(E,r);o=r,b=c(t,i);var g=r.byteLength;if(void 0===n){if(g%i)throw P(M);if((u=g-b)<0)throw P(M)}else if((u=f(n)*i)+b>g)throw P(M);s=u/i}else s=l(r),o=new S(u=s*i);for(R(e,{buffer:o,byteOffset:b,byteLength:u,length:s,view:new x(o)});p<s;)C(e,p++)}),d&&d(E,D),T=E.prototype=g(V)),T.constructor!==E&&s(T,"constructor",E),Y&&s(T,Y,y),O[y]=E,e({global:!0,forced:E!=m,sham:!L},O),I in E||s(E,I,i),I in T||s(T,I,i),A(y)}):module.exports=function(){};
634
+ },{"../internals/export":"rhEq","../internals/global":"MVLi","../internals/descriptors":"A8Ob","../internals/typed-arrays-constructors-requires-wrappers":"f/+b","../internals/array-buffer-view-core":"WAtV","../internals/array-buffer":"1PaB","../internals/an-instance":"pJoy","../internals/create-property-descriptor":"oNyT","../internals/hide":"mnM5","../internals/to-length":"6j9A","../internals/to-index":"oe6/","../internals/to-offset":"x7gX","../internals/to-primitive":"wZyz","../internals/has":"j/yd","../internals/classof":"rs2T","../internals/is-object":"AsqF","../internals/object-create":"zWsZ","../internals/object-set-prototype-of":"9eDC","../internals/object-get-own-property-names":"QFCk","../internals/typed-array-from":"FCc9","../internals/array-iteration":"EUh8","../internals/set-species":"bDBP","../internals/object-define-property":"AtXZ","../internals/object-get-own-property-descriptor":"6zm/","../internals/internal-state":"vLSK"}],"pj5Y":[function(require,module,exports) {
635
+ var r=require("../internals/typed-array-constructor");r("Int8",1,function(r){return function(n,t,e){return r(this,n,t,e)}});
636
+ },{"../internals/typed-array-constructor":"8Sko"}],"0bEo":[function(require,module,exports) {
637
+ var r=require("../internals/typed-array-constructor");r("Uint8",1,function(r){return function(n,t,e){return r(this,n,t,e)}});
638
+ },{"../internals/typed-array-constructor":"8Sko"}],"vkrB":[function(require,module,exports) {
639
+ var r=require("../internals/typed-array-constructor");r("Uint8",1,function(r){return function(n,t,e){return r(this,n,t,e)}},!0);
640
+ },{"../internals/typed-array-constructor":"8Sko"}],"gVoK":[function(require,module,exports) {
641
+ var r=require("../internals/typed-array-constructor");r("Int16",2,function(r){return function(n,t,e){return r(this,n,t,e)}});
642
+ },{"../internals/typed-array-constructor":"8Sko"}],"J7Nt":[function(require,module,exports) {
643
+ var r=require("../internals/typed-array-constructor");r("Uint16",2,function(r){return function(n,t,e){return r(this,n,t,e)}});
644
+ },{"../internals/typed-array-constructor":"8Sko"}],"KYTa":[function(require,module,exports) {
645
+ var r=require("../internals/typed-array-constructor");r("Int32",4,function(r){return function(n,t,e){return r(this,n,t,e)}});
646
+ },{"../internals/typed-array-constructor":"8Sko"}],"zDl8":[function(require,module,exports) {
647
+ var r=require("../internals/typed-array-constructor");r("Uint32",4,function(r){return function(n,t,e){return r(this,n,t,e)}});
648
+ },{"../internals/typed-array-constructor":"8Sko"}],"1YrP":[function(require,module,exports) {
649
+ var r=require("../internals/typed-array-constructor");r("Float32",4,function(r){return function(t,n,e){return r(this,t,n,e)}});
650
+ },{"../internals/typed-array-constructor":"8Sko"}],"UhAe":[function(require,module,exports) {
651
+ var r=require("../internals/typed-array-constructor");r("Float64",8,function(r){return function(t,n,e){return r(this,t,n,e)}});
652
+ },{"../internals/typed-array-constructor":"8Sko"}],"JVBr":[function(require,module,exports) {
653
+ "use strict";var r=require("../internals/typed-arrays-constructors-requires-wrappers"),e=require("../internals/array-buffer-view-core"),a=require("../internals/typed-array-from");e.exportStatic("from",a,r);
654
+ },{"../internals/typed-arrays-constructors-requires-wrappers":"f/+b","../internals/array-buffer-view-core":"WAtV","../internals/typed-array-from":"FCc9"}],"LSqt":[function(require,module,exports) {
655
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/typed-arrays-constructors-requires-wrappers"),t=r.aTypedArrayConstructor;r.exportStatic("of",function(){for(var r=0,e=arguments.length,a=new(t(this))(e);e>r;)a[r]=arguments[r++];return a},e);
656
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/typed-arrays-constructors-requires-wrappers":"f/+b"}],"Agsp":[function(require,module,exports) {
657
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-copy-within"),i=r.aTypedArray;r.exportProto("copyWithin",function(r,t){return e.call(i(this),r,t,arguments.length>2?arguments[2]:void 0)});
658
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-copy-within":"A81S"}],"b4EW":[function(require,module,exports) {
659
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").every,t=r.aTypedArray;r.exportProto("every",function(r){return e(t(this),r,arguments.length>1?arguments[1]:void 0)});
660
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8"}],"nfIa":[function(require,module,exports) {
661
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-fill"),a=r.aTypedArray;r.exportProto("fill",function(r){return e.apply(a(this),arguments)});
662
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-fill":"Vois"}],"/LZ+":[function(require,module,exports) {
663
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").filter,t=require("../internals/species-constructor"),i=r.aTypedArray,n=r.aTypedArrayConstructor;r.exportProto("filter",function(r){for(var a=e(i(this),r,arguments.length>1?arguments[1]:void 0),o=t(this,this.constructor),s=0,u=a.length,c=new(n(o))(u);u>s;)c[s]=a[s++];return c});
664
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8","../internals/species-constructor":"mxIp"}],"TGdF":[function(require,module,exports) {
665
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").find,i=r.aTypedArray;r.exportProto("find",function(r){return e(i(this),r,arguments.length>1?arguments[1]:void 0)});
666
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8"}],"1LiY":[function(require,module,exports) {
667
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").findIndex,i=r.aTypedArray;r.exportProto("findIndex",function(r){return e(i(this),r,arguments.length>1?arguments[1]:void 0)});
668
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8"}],"wEtZ":[function(require,module,exports) {
669
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").forEach,a=r.aTypedArray;r.exportProto("forEach",function(r){e(a(this),r,arguments.length>1?arguments[1]:void 0)});
670
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8"}],"xkZq":[function(require,module,exports) {
671
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-includes").includes,i=r.aTypedArray;r.exportProto("includes",function(r){return e(i(this),r,arguments.length>1?arguments[1]:void 0)});
672
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-includes":"b2MC"}],"eoPP":[function(require,module,exports) {
673
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-includes").indexOf,i=r.aTypedArray;r.exportProto("indexOf",function(r){return e(i(this),r,arguments.length>1?arguments[1]:void 0)});
674
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-includes":"b2MC"}],"5onH":[function(require,module,exports) {
675
+
676
+ "use strict";var r=require("../internals/global"),e=require("../internals/array-buffer-view-core"),t=require("../modules/es.array.iterator"),n=require("../internals/well-known-symbol"),a=n("iterator"),i=r.Uint8Array,l=t.values,s=t.keys,u=t.entries,o=e.aTypedArray,y=e.exportProto,c=i&&i.prototype[a],f=!!c&&("values"==c.name||null==c.name),v=function(){return l.call(o(this))};y("entries",function(){return u.call(o(this))}),y("keys",function(){return s.call(o(this))}),y("values",v,!f),y(a,v,!f);
677
+ },{"../internals/global":"MVLi","../internals/array-buffer-view-core":"WAtV","../modules/es.array.iterator":"S91k","../internals/well-known-symbol":"Q0EA"}],"+Nwa":[function(require,module,exports) {
678
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=r.aTypedArray,i=[].join;r.exportProto("join",function(r){return i.apply(e(this),arguments)});
679
+ },{"../internals/array-buffer-view-core":"WAtV"}],"V6i5":[function(require,module,exports) {
680
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-last-index-of"),a=r.aTypedArray;r.exportProto("lastIndexOf",function(r){return e.apply(a(this),arguments)});
681
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-last-index-of":"aZkb"}],"pY7Y":[function(require,module,exports) {
682
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").map,t=require("../internals/species-constructor"),n=r.aTypedArray,a=r.aTypedArrayConstructor;r.exportProto("map",function(r){return e(n(this),r,arguments.length>1?arguments[1]:void 0,function(r,e){return new(a(t(r,r.constructor)))(e)})});
683
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8","../internals/species-constructor":"mxIp"}],"sz4a":[function(require,module,exports) {
684
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-reduce").left,t=r.aTypedArray;r.exportProto("reduce",function(r){return e(t(this),r,arguments.length,arguments.length>1?arguments[1]:void 0)});
685
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-reduce":"SMm/"}],"sg6r":[function(require,module,exports) {
686
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-reduce").right,t=r.aTypedArray;r.exportProto("reduceRight",function(r){return e(t(this),r,arguments.length,arguments.length>1?arguments[1]:void 0)});
687
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-reduce":"SMm/"}],"IpMQ":[function(require,module,exports) {
688
+ "use strict";var r=require("../internals/array-buffer-view-core"),t=r.aTypedArray,e=Math.floor;r.exportProto("reverse",function(){for(var r,i=t(this).length,s=e(i/2),a=0;a<s;)r=this[a],this[a++]=this[--i],this[i]=r;return this});
689
+ },{"../internals/array-buffer-view-core":"WAtV"}],"E+eA":[function(require,module,exports) {
690
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/to-length"),t=require("../internals/to-offset"),n=require("../internals/to-object"),i=require("../internals/fails"),o=r.aTypedArray,a=i(function(){new Int8Array(1).set({})});r.exportProto("set",function(r){o(this);var i=t(arguments.length>1?arguments[1]:void 0,1),a=this.length,s=n(r),l=e(s.length),f=0;if(l+i>a)throw RangeError("Wrong length");for(;f<l;)this[i+f]=s[f++]},a);
691
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/to-length":"6j9A","../internals/to-offset":"x7gX","../internals/to-object":"Q9KC","../internals/fails":"pWu7"}],"R8cM":[function(require,module,exports) {
692
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/species-constructor"),t=require("../internals/fails"),i=r.aTypedArray,n=r.aTypedArrayConstructor,s=[].slice,a=t(function(){new Int8Array(1).slice()});r.exportProto("slice",function(r,t){for(var a=s.call(i(this),r,t),c=e(this,this.constructor),o=0,u=a.length,l=new(n(c))(u);u>o;)l[o]=a[o++];return l},a);
693
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/species-constructor":"mxIp","../internals/fails":"pWu7"}],"elGv":[function(require,module,exports) {
694
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/array-iteration").some,t=r.aTypedArray;r.exportProto("some",function(r){return e(t(this),r,arguments.length>1?arguments[1]:void 0)});
695
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/array-iteration":"EUh8"}],"d3I6":[function(require,module,exports) {
696
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=r.aTypedArray,t=[].sort;r.exportProto("sort",function(r){return t.call(e(this),r)});
697
+ },{"../internals/array-buffer-view-core":"WAtV"}],"+24v":[function(require,module,exports) {
698
+ "use strict";var r=require("../internals/array-buffer-view-core"),e=require("../internals/to-length"),t=require("../internals/to-absolute-index"),n=require("../internals/species-constructor"),i=r.aTypedArray;r.exportProto("subarray",function(r,s){var a=i(this),o=a.length,u=t(r,o);return new(n(a,a.constructor))(a.buffer,a.byteOffset+u*a.BYTES_PER_ELEMENT,e((void 0===s?o:t(s,o))-u))});
699
+ },{"../internals/array-buffer-view-core":"WAtV","../internals/to-length":"6j9A","../internals/to-absolute-index":"QLhU","../internals/species-constructor":"mxIp"}],"Y4JY":[function(require,module,exports) {
700
+
701
+ "use strict";var r=require("../internals/global"),t=require("../internals/array-buffer-view-core"),e=require("../internals/fails"),n=r.Int8Array,i=t.aTypedArray,o=[].toLocaleString,a=[].slice,l=!!n&&e(function(){o.call(new n(1))}),c=e(function(){return[1,2].toLocaleString()!=new n([1,2]).toLocaleString()})||!e(function(){n.prototype.toLocaleString.call([1,2])});t.exportProto("toLocaleString",function(){return o.apply(l?a.call(i(this)):i(this),arguments)},c);
702
+ },{"../internals/global":"MVLi","../internals/array-buffer-view-core":"WAtV","../internals/fails":"pWu7"}],"pSqK":[function(require,module,exports) {
703
+
704
+ "use strict";var r=require("../internals/global"),t=require("../internals/array-buffer-view-core"),i=require("../internals/fails"),e=r.Uint8Array,n=e&&e.prototype,o=[].toString,a=[].join;i(function(){o.call({})})&&(o=function(){return a.call(this)}),t.exportProto("toString",o,(n||{}).toString!=o);
705
+ },{"../internals/global":"MVLi","../internals/array-buffer-view-core":"WAtV","../internals/fails":"pWu7"}],"HvHw":[function(require,module,exports) {
706
+ var e=require("../internals/export"),n=require("../internals/get-built-in"),r=require("../internals/a-function"),t=require("../internals/an-object"),i=require("../internals/fails"),a=n("Reflect","apply"),l=Function.apply,u=!i(function(){a(function(){})});e({target:"Reflect",stat:!0,forced:u},{apply:function(e,n,i){return r(e),t(i),a?a(e,n,i):l.call(e,n,i)}});
707
+ },{"../internals/export":"rhEq","../internals/get-built-in":"mLk8","../internals/a-function":"SOPX","../internals/an-object":"2eAP","../internals/fails":"pWu7"}],"DGs4":[function(require,module,exports) {
708
+ var e=require("../internals/export"),n=require("../internals/get-built-in"),r=require("../internals/a-function"),t=require("../internals/an-object"),i=require("../internals/is-object"),u=require("../internals/object-create"),a=require("../internals/function-bind"),c=require("../internals/fails"),s=n("Reflect","construct"),l=c(function(){function e(){}return!(s(function(){},[],e)instanceof e)}),o=!c(function(){s(function(){})}),f=l||o;e({target:"Reflect",stat:!0,forced:f,sham:f},{construct:function(e,n){r(e),t(n);var c=arguments.length<3?e:r(arguments[2]);if(o&&!l)return s(e,n,c);if(e==c){switch(n.length){case 0:return new e;case 1:return new e(n[0]);case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[1],n[2]);case 4:return new e(n[0],n[1],n[2],n[3])}var f=[null];return f.push.apply(f,n),new(a.apply(e,f))}var p=c.prototype,q=u(i(p)?p:Object.prototype),w=Function.apply.call(e,q,n);return i(w)?w:q}});
709
+ },{"../internals/export":"rhEq","../internals/get-built-in":"mLk8","../internals/a-function":"SOPX","../internals/an-object":"2eAP","../internals/is-object":"AsqF","../internals/object-create":"zWsZ","../internals/function-bind":"ev+U","../internals/fails":"pWu7"}],"4Lhv":[function(require,module,exports) {
710
+ var e=require("../internals/export"),r=require("../internals/descriptors"),t=require("../internals/an-object"),i=require("../internals/to-primitive"),n=require("../internals/object-define-property"),a=require("../internals/fails"),u=a(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})});e({target:"Reflect",stat:!0,forced:u,sham:!r},{defineProperty:function(e,r,a){t(e);var u=i(r,!0);t(a);try{return n.f(e,u,a),!0}catch(f){return!1}}});
711
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/an-object":"2eAP","../internals/to-primitive":"wZyz","../internals/object-define-property":"AtXZ","../internals/fails":"pWu7"}],"sSoW":[function(require,module,exports) {
712
+ var e=require("../internals/export"),r=require("../internals/an-object"),t=require("../internals/object-get-own-property-descriptor").f;e({target:"Reflect",stat:!0},{deleteProperty:function(e,n){var a=t(r(e),n);return!(a&&!a.configurable)&&delete e[n]}});
713
+ },{"../internals/export":"rhEq","../internals/an-object":"2eAP","../internals/object-get-own-property-descriptor":"6zm/"}],"hsSr":[function(require,module,exports) {
714
+ var e=require("../internals/export"),r=require("../internals/is-object"),t=require("../internals/an-object"),i=require("../internals/has"),n=require("../internals/object-get-own-property-descriptor"),a=require("../internals/object-get-prototype-of");function o(e,l){var s,u,c=arguments.length<3?e:arguments[2];return t(e)===c?e[l]:(s=n.f(e,l))?i(s,"value")?s.value:void 0===s.get?void 0:s.get.call(c):r(u=a(e))?o(u,l,c):void 0}e({target:"Reflect",stat:!0},{get:o});
715
+ },{"../internals/export":"rhEq","../internals/is-object":"AsqF","../internals/an-object":"2eAP","../internals/has":"j/yd","../internals/object-get-own-property-descriptor":"6zm/","../internals/object-get-prototype-of":"xey/"}],"cznX":[function(require,module,exports) {
716
+ var r=require("../internals/export"),e=require("../internals/descriptors"),t=require("../internals/an-object"),n=require("../internals/object-get-own-property-descriptor");r({target:"Reflect",stat:!0,sham:!e},{getOwnPropertyDescriptor:function(r,e){return n.f(t(r),e)}});
717
+ },{"../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/an-object":"2eAP","../internals/object-get-own-property-descriptor":"6zm/"}],"ghbB":[function(require,module,exports) {
718
+ var e=require("../internals/export"),t=require("../internals/an-object"),r=require("../internals/object-get-prototype-of"),n=require("../internals/correct-prototype-getter");e({target:"Reflect",stat:!0,sham:!n},{getPrototypeOf:function(e){return r(t(e))}});
719
+ },{"../internals/export":"rhEq","../internals/an-object":"2eAP","../internals/object-get-prototype-of":"xey/","../internals/correct-prototype-getter":"x9wq"}],"LCUf":[function(require,module,exports) {
720
+ var t=require("../internals/export");t({target:"Reflect",stat:!0},{has:function(t,e){return e in t}});
721
+ },{"../internals/export":"rhEq"}],"GX83":[function(require,module,exports) {
722
+ var e=require("../internals/export"),t=require("../internals/an-object"),r=Object.isExtensible;e({target:"Reflect",stat:!0},{isExtensible:function(e){return t(e),!r||r(e)}});
723
+ },{"../internals/export":"rhEq","../internals/an-object":"2eAP"}],"/X8o":[function(require,module,exports) {
724
+ var e=require("../internals/export"),r=require("../internals/own-keys");e({target:"Reflect",stat:!0},{ownKeys:r});
725
+ },{"../internals/export":"rhEq","../internals/own-keys":"uZDC"}],"bog+":[function(require,module,exports) {
726
+ var e=require("../internals/export"),r=require("../internals/get-built-in"),t=require("../internals/an-object"),n=require("../internals/freezing");e({target:"Reflect",stat:!0,sham:!n},{preventExtensions:function(e){t(e);try{var n=r("Object","preventExtensions");return n&&n(e),!0}catch(i){return!1}}});
727
+ },{"../internals/export":"rhEq","../internals/get-built-in":"mLk8","../internals/an-object":"2eAP","../internals/freezing":"ZrZO"}],"lAc1":[function(require,module,exports) {
728
+ var e=require("../internals/export"),r=require("../internals/an-object"),t=require("../internals/is-object"),i=require("../internals/has"),n=require("../internals/object-define-property"),a=require("../internals/object-get-own-property-descriptor"),s=require("../internals/object-get-prototype-of"),l=require("../internals/create-property-descriptor");function o(e,u,f){var c,p,q=arguments.length<4?e:arguments[3],b=a.f(r(e),u);if(!b){if(t(p=s(e)))return o(p,u,f,q);b=l(0)}if(i(b,"value")){if(!1===b.writable||!t(q))return!1;if(c=a.f(q,u)){if(c.get||c.set||!1===c.writable)return!1;c.value=f,n.f(q,u,c)}else n.f(q,u,l(0,f));return!0}return void 0!==b.set&&(b.set.call(q,f),!0)}e({target:"Reflect",stat:!0},{set:o});
729
+ },{"../internals/export":"rhEq","../internals/an-object":"2eAP","../internals/is-object":"AsqF","../internals/has":"j/yd","../internals/object-define-property":"AtXZ","../internals/object-get-own-property-descriptor":"6zm/","../internals/object-get-prototype-of":"xey/","../internals/create-property-descriptor":"oNyT"}],"kZtr":[function(require,module,exports) {
730
+ var e=require("../internals/export"),t=require("../internals/an-object"),r=require("../internals/a-possible-prototype"),n=require("../internals/object-set-prototype-of");n&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(e,o){t(e),r(o);try{return n(e,o),!0}catch(a){return!1}}});
731
+ },{"../internals/export":"rhEq","../internals/an-object":"2eAP","../internals/a-possible-prototype":"ckfP","../internals/object-set-prototype-of":"9eDC"}],"L1QH":[function(require,module,exports) {
732
+ require("../modules/es.symbol"),require("../modules/es.symbol.async-iterator"),require("../modules/es.symbol.description"),require("../modules/es.symbol.has-instance"),require("../modules/es.symbol.is-concat-spreadable"),require("../modules/es.symbol.iterator"),require("../modules/es.symbol.match"),require("../modules/es.symbol.match-all"),require("../modules/es.symbol.replace"),require("../modules/es.symbol.search"),require("../modules/es.symbol.species"),require("../modules/es.symbol.split"),require("../modules/es.symbol.to-primitive"),require("../modules/es.symbol.to-string-tag"),require("../modules/es.symbol.unscopables"),require("../modules/es.object.assign"),require("../modules/es.object.create"),require("../modules/es.object.define-property"),require("../modules/es.object.define-properties"),require("../modules/es.object.entries"),require("../modules/es.object.freeze"),require("../modules/es.object.from-entries"),require("../modules/es.object.get-own-property-descriptor"),require("../modules/es.object.get-own-property-descriptors"),require("../modules/es.object.get-own-property-names"),require("../modules/es.object.get-prototype-of"),require("../modules/es.object.is"),require("../modules/es.object.is-extensible"),require("../modules/es.object.is-frozen"),require("../modules/es.object.is-sealed"),require("../modules/es.object.keys"),require("../modules/es.object.prevent-extensions"),require("../modules/es.object.seal"),require("../modules/es.object.set-prototype-of"),require("../modules/es.object.values"),require("../modules/es.object.to-string"),require("../modules/es.object.define-getter"),require("../modules/es.object.define-setter"),require("../modules/es.object.lookup-getter"),require("../modules/es.object.lookup-setter"),require("../modules/es.function.bind"),require("../modules/es.function.name"),require("../modules/es.function.has-instance"),require("../modules/es.array.from"),require("../modules/es.array.is-array"),require("../modules/es.array.of"),require("../modules/es.array.concat"),require("../modules/es.array.copy-within"),require("../modules/es.array.every"),require("../modules/es.array.fill"),require("../modules/es.array.filter"),require("../modules/es.array.find"),require("../modules/es.array.find-index"),require("../modules/es.array.flat"),require("../modules/es.array.flat-map"),require("../modules/es.array.for-each"),require("../modules/es.array.includes"),require("../modules/es.array.index-of"),require("../modules/es.array.join"),require("../modules/es.array.last-index-of"),require("../modules/es.array.map"),require("../modules/es.array.reduce"),require("../modules/es.array.reduce-right"),require("../modules/es.array.reverse"),require("../modules/es.array.slice"),require("../modules/es.array.some"),require("../modules/es.array.sort"),require("../modules/es.array.splice"),require("../modules/es.array.species"),require("../modules/es.array.unscopables.flat"),require("../modules/es.array.unscopables.flat-map"),require("../modules/es.array.iterator"),require("../modules/es.string.from-code-point"),require("../modules/es.string.raw"),require("../modules/es.string.code-point-at"),require("../modules/es.string.ends-with"),require("../modules/es.string.includes"),require("../modules/es.string.match"),require("../modules/es.string.match-all"),require("../modules/es.string.pad-end"),require("../modules/es.string.pad-start"),require("../modules/es.string.repeat"),require("../modules/es.string.replace"),require("../modules/es.string.search"),require("../modules/es.string.split"),require("../modules/es.string.starts-with"),require("../modules/es.string.trim"),require("../modules/es.string.trim-start"),require("../modules/es.string.trim-end"),require("../modules/es.string.iterator"),require("../modules/es.string.anchor"),require("../modules/es.string.big"),require("../modules/es.string.blink"),require("../modules/es.string.bold"),require("../modules/es.string.fixed"),require("../modules/es.string.fontcolor"),require("../modules/es.string.fontsize"),require("../modules/es.string.italics"),require("../modules/es.string.link"),require("../modules/es.string.small"),require("../modules/es.string.strike"),require("../modules/es.string.sub"),require("../modules/es.string.sup"),require("../modules/es.regexp.constructor"),require("../modules/es.regexp.exec"),require("../modules/es.regexp.flags"),require("../modules/es.regexp.to-string"),require("../modules/es.parse-int"),require("../modules/es.parse-float"),require("../modules/es.number.constructor"),require("../modules/es.number.epsilon"),require("../modules/es.number.is-finite"),require("../modules/es.number.is-integer"),require("../modules/es.number.is-nan"),require("../modules/es.number.is-safe-integer"),require("../modules/es.number.max-safe-integer"),require("../modules/es.number.min-safe-integer"),require("../modules/es.number.parse-float"),require("../modules/es.number.parse-int"),require("../modules/es.number.to-fixed"),require("../modules/es.number.to-precision"),require("../modules/es.math.acosh"),require("../modules/es.math.asinh"),require("../modules/es.math.atanh"),require("../modules/es.math.cbrt"),require("../modules/es.math.clz32"),require("../modules/es.math.cosh"),require("../modules/es.math.expm1"),require("../modules/es.math.fround"),require("../modules/es.math.hypot"),require("../modules/es.math.imul"),require("../modules/es.math.log10"),require("../modules/es.math.log1p"),require("../modules/es.math.log2"),require("../modules/es.math.sign"),require("../modules/es.math.sinh"),require("../modules/es.math.tanh"),require("../modules/es.math.to-string-tag"),require("../modules/es.math.trunc"),require("../modules/es.date.now"),require("../modules/es.date.to-json"),require("../modules/es.date.to-iso-string"),require("../modules/es.date.to-string"),require("../modules/es.date.to-primitive"),require("../modules/es.json.to-string-tag"),require("../modules/es.promise"),require("../modules/es.promise.all-settled"),require("../modules/es.promise.finally"),require("../modules/es.map"),require("../modules/es.set"),require("../modules/es.weak-map"),require("../modules/es.weak-set"),require("../modules/es.array-buffer.constructor"),require("../modules/es.array-buffer.is-view"),require("../modules/es.array-buffer.slice"),require("../modules/es.data-view"),require("../modules/es.typed-array.int8-array"),require("../modules/es.typed-array.uint8-array"),require("../modules/es.typed-array.uint8-clamped-array"),require("../modules/es.typed-array.int16-array"),require("../modules/es.typed-array.uint16-array"),require("../modules/es.typed-array.int32-array"),require("../modules/es.typed-array.uint32-array"),require("../modules/es.typed-array.float32-array"),require("../modules/es.typed-array.float64-array"),require("../modules/es.typed-array.from"),require("../modules/es.typed-array.of"),require("../modules/es.typed-array.copy-within"),require("../modules/es.typed-array.every"),require("../modules/es.typed-array.fill"),require("../modules/es.typed-array.filter"),require("../modules/es.typed-array.find"),require("../modules/es.typed-array.find-index"),require("../modules/es.typed-array.for-each"),require("../modules/es.typed-array.includes"),require("../modules/es.typed-array.index-of"),require("../modules/es.typed-array.iterator"),require("../modules/es.typed-array.join"),require("../modules/es.typed-array.last-index-of"),require("../modules/es.typed-array.map"),require("../modules/es.typed-array.reduce"),require("../modules/es.typed-array.reduce-right"),require("../modules/es.typed-array.reverse"),require("../modules/es.typed-array.set"),require("../modules/es.typed-array.slice"),require("../modules/es.typed-array.some"),require("../modules/es.typed-array.sort"),require("../modules/es.typed-array.subarray"),require("../modules/es.typed-array.to-locale-string"),require("../modules/es.typed-array.to-string"),require("../modules/es.reflect.apply"),require("../modules/es.reflect.construct"),require("../modules/es.reflect.define-property"),require("../modules/es.reflect.delete-property"),require("../modules/es.reflect.get"),require("../modules/es.reflect.get-own-property-descriptor"),require("../modules/es.reflect.get-prototype-of"),require("../modules/es.reflect.has"),require("../modules/es.reflect.is-extensible"),require("../modules/es.reflect.own-keys"),require("../modules/es.reflect.prevent-extensions"),require("../modules/es.reflect.set"),require("../modules/es.reflect.set-prototype-of"),module.exports=require("../internals/path");
733
+ },{"../modules/es.symbol":"diqY","../modules/es.symbol.async-iterator":"N3MB","../modules/es.symbol.description":"LYOo","../modules/es.symbol.has-instance":"3rFs","../modules/es.symbol.is-concat-spreadable":"stDf","../modules/es.symbol.iterator":"WXoU","../modules/es.symbol.match":"Hc3y","../modules/es.symbol.match-all":"lVca","../modules/es.symbol.replace":"7pvv","../modules/es.symbol.search":"9rdE","../modules/es.symbol.species":"jSLd","../modules/es.symbol.split":"c6b0","../modules/es.symbol.to-primitive":"sek4","../modules/es.symbol.to-string-tag":"uDx9","../modules/es.symbol.unscopables":"yT7s","../modules/es.object.assign":"d93j","../modules/es.object.create":"pv5m","../modules/es.object.define-property":"XOQw","../modules/es.object.define-properties":"ddJ+","../modules/es.object.entries":"2KgV","../modules/es.object.freeze":"LUIK","../modules/es.object.from-entries":"5Uci","../modules/es.object.get-own-property-descriptor":"WFGt","../modules/es.object.get-own-property-descriptors":"aLxV","../modules/es.object.get-own-property-names":"LvRP","../modules/es.object.get-prototype-of":"jz0x","../modules/es.object.is":"ux+h","../modules/es.object.is-extensible":"jX7X","../modules/es.object.is-frozen":"kdOB","../modules/es.object.is-sealed":"gpJf","../modules/es.object.keys":"Y3qw","../modules/es.object.prevent-extensions":"WvM7","../modules/es.object.seal":"bZLD","../modules/es.object.set-prototype-of":"Cykw","../modules/es.object.values":"HUM5","../modules/es.object.to-string":"ecHe","../modules/es.object.define-getter":"PTAU","../modules/es.object.define-setter":"PzdO","../modules/es.object.lookup-getter":"haYq","../modules/es.object.lookup-setter":"vTXd","../modules/es.function.bind":"rLkX","../modules/es.function.name":"kzOy","../modules/es.function.has-instance":"xOWp","../modules/es.array.from":"Tzrg","../modules/es.array.is-array":"hjCR","../modules/es.array.of":"nKOp","../modules/es.array.concat":"1nHC","../modules/es.array.copy-within":"kn+y","../modules/es.array.every":"YjOc","../modules/es.array.fill":"wrzr","../modules/es.array.filter":"OImK","../modules/es.array.find":"aGSB","../modules/es.array.find-index":"BKbk","../modules/es.array.flat":"PATC","../modules/es.array.flat-map":"dPcl","../modules/es.array.for-each":"n8x2","../modules/es.array.includes":"4hJi","../modules/es.array.index-of":"L3SF","../modules/es.array.join":"HkIz","../modules/es.array.last-index-of":"YJwX","../modules/es.array.map":"XwPX","../modules/es.array.reduce":"MGOS","../modules/es.array.reduce-right":"qThj","../modules/es.array.reverse":"ZdoE","../modules/es.array.slice":"I5XU","../modules/es.array.some":"HTrq","../modules/es.array.sort":"6sDK","../modules/es.array.splice":"AZfT","../modules/es.array.species":"4GKV","../modules/es.array.unscopables.flat":"bF+K","../modules/es.array.unscopables.flat-map":"AKUe","../modules/es.array.iterator":"S91k","../modules/es.string.from-code-point":"VRfe","../modules/es.string.raw":"qnyo","../modules/es.string.code-point-at":"X12Q","../modules/es.string.ends-with":"xRPP","../modules/es.string.includes":"oCSF","../modules/es.string.match":"gtN7","../modules/es.string.match-all":"ftnR","../modules/es.string.pad-end":"wchC","../modules/es.string.pad-start":"QpWr","../modules/es.string.repeat":"JXxO","../modules/es.string.replace":"x0yB","../modules/es.string.search":"TMNY","../modules/es.string.split":"TT/v","../modules/es.string.starts-with":"GB8Q","../modules/es.string.trim":"A+FC","../modules/es.string.trim-start":"jY0J","../modules/es.string.trim-end":"dAVn","../modules/es.string.iterator":"PSYM","../modules/es.string.anchor":"J8PS","../modules/es.string.big":"alkc","../modules/es.string.blink":"AYvZ","../modules/es.string.bold":"jQTw","../modules/es.string.fixed":"It3T","../modules/es.string.fontcolor":"sE8q","../modules/es.string.fontsize":"ABfs","../modules/es.string.italics":"zvaT","../modules/es.string.link":"QJ0z","../modules/es.string.small":"Ai0M","../modules/es.string.strike":"Scmo","../modules/es.string.sub":"+e1a","../modules/es.string.sup":"4rC3","../modules/es.regexp.constructor":"7DbB","../modules/es.regexp.exec":"MlTh","../modules/es.regexp.flags":"ERpX","../modules/es.regexp.to-string":"g0xY","../modules/es.parse-int":"6GhQ","../modules/es.parse-float":"kPoD","../modules/es.number.constructor":"Bq/h","../modules/es.number.epsilon":"SaF2","../modules/es.number.is-finite":"xykq","../modules/es.number.is-integer":"4mK5","../modules/es.number.is-nan":"jYuH","../modules/es.number.is-safe-integer":"4+B+","../modules/es.number.max-safe-integer":"D9EQ","../modules/es.number.min-safe-integer":"WlNN","../modules/es.number.parse-float":"tHG2","../modules/es.number.parse-int":"95e+","../modules/es.number.to-fixed":"qTD4","../modules/es.number.to-precision":"PZps","../modules/es.math.acosh":"szh2","../modules/es.math.asinh":"lX9L","../modules/es.math.atanh":"6dF5","../modules/es.math.cbrt":"RF5g","../modules/es.math.clz32":"k2zs","../modules/es.math.cosh":"KbzY","../modules/es.math.expm1":"gE1J","../modules/es.math.fround":"zb0x","../modules/es.math.hypot":"B4c+","../modules/es.math.imul":"8Bl9","../modules/es.math.log10":"Zbeu","../modules/es.math.log1p":"e/Vj","../modules/es.math.log2":"4HPC","../modules/es.math.sign":"wvgJ","../modules/es.math.sinh":"1VNT","../modules/es.math.tanh":"I2ip","../modules/es.math.to-string-tag":"CevC","../modules/es.math.trunc":"GaOn","../modules/es.date.now":"Yqn8","../modules/es.date.to-json":"KP08","../modules/es.date.to-iso-string":"FvU6","../modules/es.date.to-string":"GjHx","../modules/es.date.to-primitive":"bfeb","../modules/es.json.to-string-tag":"azWb","../modules/es.promise":"ItbG","../modules/es.promise.all-settled":"i5OW","../modules/es.promise.finally":"cWVQ","../modules/es.map":"3h/K","../modules/es.set":"YQdF","../modules/es.weak-map":"VLkh","../modules/es.weak-set":"wv6n","../modules/es.array-buffer.constructor":"k7bY","../modules/es.array-buffer.is-view":"gshG","../modules/es.array-buffer.slice":"hWBW","../modules/es.data-view":"PIWk","../modules/es.typed-array.int8-array":"pj5Y","../modules/es.typed-array.uint8-array":"0bEo","../modules/es.typed-array.uint8-clamped-array":"vkrB","../modules/es.typed-array.int16-array":"gVoK","../modules/es.typed-array.uint16-array":"J7Nt","../modules/es.typed-array.int32-array":"KYTa","../modules/es.typed-array.uint32-array":"zDl8","../modules/es.typed-array.float32-array":"1YrP","../modules/es.typed-array.float64-array":"UhAe","../modules/es.typed-array.from":"JVBr","../modules/es.typed-array.of":"LSqt","../modules/es.typed-array.copy-within":"Agsp","../modules/es.typed-array.every":"b4EW","../modules/es.typed-array.fill":"nfIa","../modules/es.typed-array.filter":"/LZ+","../modules/es.typed-array.find":"TGdF","../modules/es.typed-array.find-index":"1LiY","../modules/es.typed-array.for-each":"wEtZ","../modules/es.typed-array.includes":"xkZq","../modules/es.typed-array.index-of":"eoPP","../modules/es.typed-array.iterator":"5onH","../modules/es.typed-array.join":"+Nwa","../modules/es.typed-array.last-index-of":"V6i5","../modules/es.typed-array.map":"pY7Y","../modules/es.typed-array.reduce":"sz4a","../modules/es.typed-array.reduce-right":"sg6r","../modules/es.typed-array.reverse":"IpMQ","../modules/es.typed-array.set":"E+eA","../modules/es.typed-array.slice":"R8cM","../modules/es.typed-array.some":"elGv","../modules/es.typed-array.sort":"d3I6","../modules/es.typed-array.subarray":"+24v","../modules/es.typed-array.to-locale-string":"Y4JY","../modules/es.typed-array.to-string":"pSqK","../modules/es.reflect.apply":"HvHw","../modules/es.reflect.construct":"DGs4","../modules/es.reflect.define-property":"4Lhv","../modules/es.reflect.delete-property":"sSoW","../modules/es.reflect.get":"hsSr","../modules/es.reflect.get-own-property-descriptor":"cznX","../modules/es.reflect.get-prototype-of":"ghbB","../modules/es.reflect.has":"LCUf","../modules/es.reflect.is-extensible":"GX83","../modules/es.reflect.own-keys":"/X8o","../modules/es.reflect.prevent-extensions":"bog+","../modules/es.reflect.set":"lAc1","../modules/es.reflect.set-prototype-of":"kZtr","../internals/path":"+h/M"}],"H4Sx":[function(require,module,exports) {
734
+ module.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};
735
+ },{}],"GFxX":[function(require,module,exports) {
736
+
737
+ var r=require("../internals/global"),e=require("../internals/dom-iterables"),a=require("../internals/array-for-each"),i=require("../internals/hide");for(var n in e){var o=r[n],t=o&&o.prototype;if(t&&t.forEach!==a)try{i(t,"forEach",a)}catch(l){t.forEach=a}}
738
+ },{"../internals/global":"MVLi","../internals/dom-iterables":"H4Sx","../internals/array-for-each":"VXzW","../internals/hide":"mnM5"}],"8dkd":[function(require,module,exports) {
739
+
740
+ var r=require("../internals/global"),e=require("../internals/dom-iterables"),i=require("../modules/es.array.iterator"),a=require("../internals/hide"),t=require("../internals/well-known-symbol"),n=t("iterator"),l=t("toStringTag"),o=i.values;for(var s in e){var u=r[s],f=u&&u.prototype;if(f){if(f[n]!==o)try{a(f,n,o)}catch(v){f[n]=o}if(f[l]||a(f,l,s),e[s])for(var q in i)if(f[q]!==i[q])try{a(f,q,i[q])}catch(v){f[q]=i[q]}}}
741
+ },{"../internals/global":"MVLi","../internals/dom-iterables":"H4Sx","../modules/es.array.iterator":"S91k","../internals/hide":"mnM5","../internals/well-known-symbol":"Q0EA"}],"5hZL":[function(require,module,exports) {
742
+
743
+ var e=require("../internals/global"),r=require("../internals/task"),a=!e.setImmediate||!e.clearImmediate;require("../internals/export")({global:!0,bind:!0,enumerable:!0,forced:a},{setImmediate:r.set,clearImmediate:r.clear});
744
+ },{"../internals/global":"MVLi","../internals/task":"g1no","../internals/export":"rhEq"}],"ei+z":[function(require,module,exports) {
745
+
746
+
747
+ var e=require("../internals/export"),r=require("../internals/global"),a=require("../internals/microtask"),n=require("../internals/classof-raw"),i=r.process,s="process"==n(i);e({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var r=s&&i.domain;a(r?r.bind(e):e)}});
748
+ },{"../internals/export":"rhEq","../internals/global":"MVLi","../internals/microtask":"jLqr","../internals/classof-raw":"jUdy"}],"OTsy":[function(require,module,exports) {
749
+
750
+ var e=require("../internals/export"),t=require("../internals/global"),n=require("../internals/user-agent"),r=[].slice,i=/MSIE .\./.test(n),l=function(e){return function(t,n){var i=arguments.length>2,l=i?r.call(arguments,2):void 0;return e(i?function(){("function"==typeof t?t:Function(t)).apply(this,l)}:t,n)}};e({global:!0,bind:!0,forced:i},{setTimeout:l(t.setTimeout),setInterval:l(t.setInterval)});
751
+ },{"../internals/export":"rhEq","../internals/global":"MVLi","../internals/user-agent":"eUSx"}],"6Yrj":[function(require,module,exports) {
752
+ var e=require("../internals/fails"),a=require("../internals/well-known-symbol"),r=require("../internals/is-pure"),t=a("iterator");module.exports=!e(function(){var e=new URL("b?e=1","http://a"),a=e.searchParams;return e.pathname="c%20d",r&&!e.toJSON||!a.sort||"http://a/c%20d?e=1"!==e.href||"1"!==a.get("e")||"a=1"!==String(new URLSearchParams("?a=1"))||!a[t]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash});
753
+ },{"../internals/fails":"pWu7","../internals/well-known-symbol":"Q0EA","../internals/is-pure":"tGwT"}],"HC+l":[function(require,module,exports) {
754
+ "use strict";var r=2147483647,e=36,t=1,o=26,n=38,u=700,a=72,f=128,h="-",s=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,v="Overflow: input needs wider integers to process",l=e-t,p=Math.floor,g=String.fromCharCode,c=function(r){for(var e=[],t=0,o=r.length;t<o;){var n=r.charCodeAt(t++);if(n>=55296&&n<=56319&&t<o){var u=r.charCodeAt(t++);56320==(64512&u)?e.push(((1023&n)<<10)+(1023&u)+65536):(e.push(n),t--)}else e.push(n)}return e},d=function(r){return r+22+75*(r<26)},w=function(r,t,a){var f=0;for(r=a?p(r/u):r>>1,r+=p(r/t);r>l*o>>1;f+=e)r=p(r/l);return p(f+(l+1)*r/(r+n))},C=function(n){var u,s,i=[],l=(n=c(n)).length,C=f,E=0,F=a;for(u=0;u<n.length;u++)(s=n[u])<128&&i.push(g(s));var j=i.length,m=j;for(j&&i.push(h);m<l;){var x=r;for(u=0;u<n.length;u++)(s=n[u])>=C&&s<x&&(x=s);var A=m+1;if(x-C>p((r-E)/A))throw RangeError(v);for(E+=(x-C)*A,C=x,u=0;u<n.length;u++){if((s=n[u])<C&&++E>r)throw RangeError(v);if(s==C){for(var R=E,b=e;;b+=e){var k=b<=F?t:b>=F+o?o:b-F;if(R<k)break;var L=R-k,M=e-k;i.push(g(d(k+L%M))),R=p(L/M)}i.push(g(d(R))),F=w(E,A,m==j),E=0,++m}}++E,++C}return i.join("")};module.exports=function(r){var e,t,o=[],n=r.toLowerCase().replace(i,".").split(".");for(e=0;e<n.length;e++)t=n[e],o.push(s.test(t)?"xn--"+C(t):t);return o.join(".")};
755
+ },{}],"Uult":[function(require,module,exports) {
756
+ var r=require("../internals/an-object"),e=require("../internals/get-iterator-method");module.exports=function(t){var n=e(t);if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return r(n.call(t))};
757
+ },{"../internals/an-object":"2eAP","../internals/get-iterator-method":"VM64"}],"CpgZ":[function(require,module,exports) {
758
+ "use strict";require("../modules/es.array.iterator");var e=require("../internals/export"),t=require("../internals/native-url"),r=require("../internals/redefine"),n=require("../internals/redefine-all"),i=require("../internals/set-to-string-tag"),a=require("../internals/create-iterator-constructor"),u=require("../internals/internal-state"),s=require("../internals/an-instance"),o=require("../internals/has"),l=require("../internals/bind-context"),h=require("../internals/an-object"),c=require("../internals/is-object"),f=require("../internals/get-iterator"),g=require("../internals/get-iterator-method"),p=require("../internals/well-known-symbol"),v=p("iterator"),d="URLSearchParams",y=d+"Iterator",k=u.set,q=u.getterFor(d),m=u.getterFor(y),R=/\+/g,U=Array(4),x=function(e){return U[e-1]||(U[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},b=function(e){try{return decodeURIComponent(e)}catch(t){return e}},w=function(e){var t=e.replace(R," "),r=4;try{return decodeURIComponent(t)}catch(n){for(;r;)t=t.replace(x(r--),b);return t}},L=/[!'()~]|%20/g,E={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},S=function(e){return E[e]},I=function(e){return encodeURIComponent(e).replace(L,S)},j=function(e,t){if(t)for(var r,n,i=t.split("&"),a=0;a<i.length;)(r=i[a++]).length&&(n=r.split("="),e.push({key:w(n.shift()),value:w(n.join("="))}))},P=function(e){this.entries.length=0,j(this.entries,e)},A=function(e,t){if(e<t)throw TypeError("Not enough arguments")},C=a(function(e,t){k(this,{type:y,iterator:f(q(e).entries),kind:t})},"Iterator",function(){var e=m(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),F=function(){s(this,F,d);var e,t,r,n,i,a,u,l=arguments.length>0?arguments[0]:void 0,p=[];if(k(this,{type:d,entries:p,updateURL:function(){},updateSearchParams:P}),void 0!==l)if(c(l))if("function"==typeof(e=g(l)))for(t=e.call(l);!(r=t.next()).done;){if((i=(n=f(h(r.value))).next()).done||(a=n.next()).done||!n.next().done)throw TypeError("Expected sequence with length 2");p.push({key:i.value+"",value:a.value+""})}else for(u in l)o(l,u)&&p.push({key:u,value:l[u]+""});else j(p,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},T=F.prototype;n(T,{append:function(e,t){A(arguments.length,2);var r=q(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){A(arguments.length,1);for(var t=q(this),r=t.entries,n=e+"",i=0;i<r.length;)r[i].key===n?r.splice(i,1):i++;t.updateURL()},get:function(e){A(arguments.length,1);for(var t=q(this).entries,r=e+"",n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){A(arguments.length,1);for(var t=q(this).entries,r=e+"",n=[],i=0;i<t.length;i++)t[i].key===r&&n.push(t[i].value);return n},has:function(e){A(arguments.length,1);for(var t=q(this).entries,r=e+"",n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){A(arguments.length,1);for(var r,n=q(this),i=n.entries,a=!1,u=e+"",s=t+"",o=0;o<i.length;o++)(r=i[o]).key===u&&(a?i.splice(o--,1):(a=!0,r.value=s));a||i.push({key:u,value:s}),n.updateURL()},sort:function(){var e,t,r,n=q(this),i=n.entries,a=i.slice();for(i.length=0,r=0;r<a.length;r++){for(e=a[r],t=0;t<r;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===r&&i.push(e)}n.updateURL()},forEach:function(e){for(var t,r=q(this).entries,n=l(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new C(this,"keys")},values:function(){return new C(this,"values")},entries:function(){return new C(this,"entries")}},{enumerable:!0}),r(T,v,T.entries),r(T,"toString",function(){for(var e,t=q(this).entries,r=[],n=0;n<t.length;)e=t[n++],r.push(I(e.key)+"="+I(e.value));return r.join("&")},{enumerable:!0}),i(F,d),e({global:!0,forced:!t},{URLSearchParams:F}),module.exports={URLSearchParams:F,getState:q};
759
+ },{"../modules/es.array.iterator":"S91k","../internals/export":"rhEq","../internals/native-url":"6Yrj","../internals/redefine":"ztZs","../internals/redefine-all":"oPIw","../internals/set-to-string-tag":"kLCt","../internals/create-iterator-constructor":"v9+W","../internals/internal-state":"vLSK","../internals/an-instance":"pJoy","../internals/has":"j/yd","../internals/bind-context":"NohZ","../internals/an-object":"2eAP","../internals/is-object":"AsqF","../internals/get-iterator":"Uult","../internals/get-iterator-method":"VM64","../internals/well-known-symbol":"Q0EA"}],"ytq2":[function(require,module,exports) {
760
+
761
+ "use strict";require("../modules/es.string.iterator");var e,r=require("../internals/export"),t=require("../internals/descriptors"),n=require("../internals/native-url"),a=require("../internals/global"),s=require("../internals/object-define-properties"),i=require("../internals/redefine"),u=require("../internals/an-instance"),o=require("../internals/has"),l=require("../internals/object-assign"),f=require("../internals/array-from"),h=require("../internals/string-multibyte").codeAt,c=require("../internals/punycode-to-ascii"),p=require("../internals/set-to-string-tag"),m=require("../modules/web.url-search-params"),g=require("../internals/internal-state"),v=a.URL,d=m.URLSearchParams,q=m.getState,y=g.set,b=g.getterFor("URL"),w=Math.floor,A=Math.pow,L="Invalid authority",R="Invalid scheme",U="Invalid host",k="Invalid port",B=/[A-Za-z]/,S=/[\d+\-.A-Za-z]/,j=/\d/,P=/^(0x|0X)/,I=/^[0-7]+$/,C=/^\d+$/,O=/^[\dA-Fa-f]+$/,F=/[\u0000\u0009\u000A\u000D #%\/:?@[\\]]/,$=/[\u0000\u0009\u000A\u000D #\/:?@[\\]]/,D=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,E=/[\u0009\u000A\u000D]/g,T=function(e,r){var t,n,a;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return U;if(!(t=z(r.slice(1,-1))))return U;e.host=t}else if(Q(e)){if(r=c(r),F.test(r))return U;if(null===(t=x(r)))return U;e.host=t}else{if($.test(r))return U;for(t="",n=f(r),a=0;a<n.length;a++)t+=H(n[a],J);e.host=t}},x=function(e){var r,t,n,a,s,i,u,o=e.split(".");if(o.length&&""==o[o.length-1]&&o.pop(),(r=o.length)>4)return e;for(t=[],n=0;n<r;n++){if(""==(a=o[n]))return e;if(s=10,a.length>1&&"0"==a.charAt(0)&&(s=P.test(a)?16:8,a=a.slice(8==s?1:2)),""===a)i=0;else{if(!(10==s?C:8==s?I:O).test(a))return e;i=parseInt(a,s)}t.push(i)}for(n=0;n<r;n++)if(i=t[n],n==r-1){if(i>=A(256,5-r))return null}else if(i>255)return null;for(u=t.pop(),n=0;n<t.length;n++)u+=t[n]*A(256,3-n);return u},z=function(e){var r,t,n,a,s,i,u,o=[0,0,0,0,0,0,0,0],l=0,f=null,h=0,c=function(){return e.charAt(h)};if(":"==c()){if(":"!=e.charAt(1))return;h+=2,f=++l}for(;c();){if(8==l)return;if(":"!=c()){for(r=t=0;t<4&&O.test(c());)r=16*r+parseInt(c(),16),h++,t++;if("."==c()){if(0==t)return;if(h-=t,l>6)return;for(n=0;c();){if(a=null,n>0){if(!("."==c()&&n<4))return;h++}if(!j.test(c()))return;for(;j.test(c());){if(s=parseInt(c(),10),null===a)a=s;else{if(0==a)return;a=10*a+s}if(a>255)return;h++}o[l]=256*o[l]+a,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==c()){if(h++,!c())return}else if(c())return;o[l++]=r}else{if(null!==f)return;h++,f=++l}}if(null!==f)for(i=l-f,l=7;0!=l&&i>0;)u=o[l],o[l--]=o[f+i-1],o[f+--i]=u;else if(8!=l)return;return o},M=function(e){for(var r=null,t=1,n=null,a=0,s=0;s<8;s++)0!==e[s]?(a>t&&(r=n,t=a),n=null,a=0):(null===n&&(n=s),++a);return a>t&&(r=n,t=a),r},Z=function(e){var r,t,n,a;if("number"==typeof e){for(r=[],t=0;t<4;t++)r.unshift(e%256),e=w(e/256);return r.join(".")}if("object"==typeof e){for(r="",n=M(e),t=0;t<8;t++)a&&0===e[t]||(a&&(a=!1),n===t?(r+=t?":":"::",a=!0):(r+=e[t].toString(16),t<7&&(r+=":")));return"["+r+"]"}return e},J={},N=l({},J,{" ":1,'"':1,"<":1,">":1,"`":1}),X=l({},N,{"#":1,"?":1,"{":1,"}":1}),G=l({},X,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),H=function(e,r){var t=h(e,0);return t>32&&t<127&&!o(r,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},Q=function(e){return o(K,e.scheme)},V=function(e){return""!=e.username||""!=e.password},W=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Y=function(e,r){var t;return 2==e.length&&B.test(e.charAt(0))&&(":"==(t=e.charAt(1))||!r&&"|"==t)},_=function(e){var r;return e.length>1&&Y(e.slice(0,2))&&(2==e.length||"/"===(r=e.charAt(2))||"\\"===r||"?"===r||"#"===r)},ee=function(e){var r=e.path,t=r.length;!t||"file"==e.scheme&&1==t&&Y(r[0],!0)||r.pop()},re=function(e){return"."===e||"%2e"===e.toLowerCase()},te=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},ne={},ae={},se={},ie={},ue={},oe={},le={},fe={},he={},ce={},pe={},me={},ge={},ve={},de={},qe={},ye={},be={},we={},Ae={},Le={},Re=function(r,t,n,a){var s,i,u,l,h=n||ne,c=0,p="",m=!1,g=!1,v=!1;for(n||(r.scheme="",r.username="",r.password="",r.host=null,r.port=null,r.path=[],r.query=null,r.fragment=null,r.cannotBeABaseURL=!1,t=t.replace(D,"")),t=t.replace(E,""),s=f(t);c<=s.length;){switch(i=s[c],h){case ne:if(!i||!B.test(i)){if(n)return R;h=se;continue}p+=i.toLowerCase(),h=ae;break;case ae:if(i&&(S.test(i)||"+"==i||"-"==i||"."==i))p+=i.toLowerCase();else{if(":"!=i){if(n)return R;p="",h=se,c=0;continue}if(n&&(Q(r)!=o(K,p)||"file"==p&&(V(r)||null!==r.port)||"file"==r.scheme&&!r.host))return;if(r.scheme=p,n)return void(Q(r)&&K[r.scheme]==r.port&&(r.port=null));p="","file"==r.scheme?h=ve:Q(r)&&a&&a.scheme==r.scheme?h=ie:Q(r)?h=fe:"/"==s[c+1]?(h=ue,c++):(r.cannotBeABaseURL=!0,r.path.push(""),h=we)}break;case se:if(!a||a.cannotBeABaseURL&&"#"!=i)return R;if(a.cannotBeABaseURL&&"#"==i){r.scheme=a.scheme,r.path=a.path.slice(),r.query=a.query,r.fragment="",r.cannotBeABaseURL=!0,h=Le;break}h="file"==a.scheme?ve:oe;continue;case ie:if("/"!=i||"/"!=s[c+1]){h=oe;continue}h=he,c++;break;case ue:if("/"==i){h=ce;break}h=be;continue;case oe:if(r.scheme=a.scheme,i==e)r.username=a.username,r.password=a.password,r.host=a.host,r.port=a.port,r.path=a.path.slice(),r.query=a.query;else if("/"==i||"\\"==i&&Q(r))h=le;else if("?"==i)r.username=a.username,r.password=a.password,r.host=a.host,r.port=a.port,r.path=a.path.slice(),r.query="",h=Ae;else{if("#"!=i){r.username=a.username,r.password=a.password,r.host=a.host,r.port=a.port,r.path=a.path.slice(),r.path.pop(),h=be;continue}r.username=a.username,r.password=a.password,r.host=a.host,r.port=a.port,r.path=a.path.slice(),r.query=a.query,r.fragment="",h=Le}break;case le:if(!Q(r)||"/"!=i&&"\\"!=i){if("/"!=i){r.username=a.username,r.password=a.password,r.host=a.host,r.port=a.port,h=be;continue}h=ce}else h=he;break;case fe:if(h=he,"/"!=i||"/"!=p.charAt(c+1))continue;c++;break;case he:if("/"!=i&&"\\"!=i){h=ce;continue}break;case ce:if("@"==i){m&&(p="%40"+p),m=!0,u=f(p);for(var d=0;d<u.length;d++){var q=u[d];if(":"!=q||v){var y=H(q,G);v?r.password+=y:r.username+=y}else v=!0}p=""}else if(i==e||"/"==i||"?"==i||"#"==i||"\\"==i&&Q(r)){if(m&&""==p)return L;c-=f(p).length+1,p="",h=pe}else p+=i;break;case pe:case me:if(n&&"file"==r.scheme){h=qe;continue}if(":"!=i||g){if(i==e||"/"==i||"?"==i||"#"==i||"\\"==i&&Q(r)){if(Q(r)&&""==p)return U;if(n&&""==p&&(V(r)||null!==r.port))return;if(l=T(r,p))return l;if(p="",h=ye,n)return;continue}"["==i?g=!0:"]"==i&&(g=!1),p+=i}else{if(""==p)return U;if(l=T(r,p))return l;if(p="",h=ge,n==me)return}break;case ge:if(!j.test(i)){if(i==e||"/"==i||"?"==i||"#"==i||"\\"==i&&Q(r)||n){if(""!=p){var b=parseInt(p,10);if(b>65535)return k;r.port=Q(r)&&b===K[r.scheme]?null:b,p=""}if(n)return;h=ye;continue}return k}p+=i;break;case ve:if(r.scheme="file","/"==i||"\\"==i)h=de;else{if(!a||"file"!=a.scheme){h=be;continue}if(i==e)r.host=a.host,r.path=a.path.slice(),r.query=a.query;else if("?"==i)r.host=a.host,r.path=a.path.slice(),r.query="",h=Ae;else{if("#"!=i){_(s.slice(c).join(""))||(r.host=a.host,r.path=a.path.slice(),ee(r)),h=be;continue}r.host=a.host,r.path=a.path.slice(),r.query=a.query,r.fragment="",h=Le}}break;case de:if("/"==i||"\\"==i){h=qe;break}a&&"file"==a.scheme&&!_(s.slice(c).join(""))&&(Y(a.path[0],!0)?r.path.push(a.path[0]):r.host=a.host),h=be;continue;case qe:if(i==e||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&Y(p))h=be;else if(""==p){if(r.host="",n)return;h=ye}else{if(l=T(r,p))return l;if("localhost"==r.host&&(r.host=""),n)return;p="",h=ye}continue}p+=i;break;case ye:if(Q(r)){if(h=be,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=e&&(h=be,"/"!=i))continue}else r.fragment="",h=Le;else r.query="",h=Ae;break;case be:if(i==e||"/"==i||"\\"==i&&Q(r)||!n&&("?"==i||"#"==i)){if(te(p)?(ee(r),"/"==i||"\\"==i&&Q(r)||r.path.push("")):re(p)?"/"==i||"\\"==i&&Q(r)||r.path.push(""):("file"==r.scheme&&!r.path.length&&Y(p)&&(r.host&&(r.host=""),p=p.charAt(0)+":"),r.path.push(p)),p="","file"==r.scheme&&(i==e||"?"==i||"#"==i))for(;r.path.length>1&&""===r.path[0];)r.path.shift();"?"==i?(r.query="",h=Ae):"#"==i&&(r.fragment="",h=Le)}else p+=H(i,X);break;case we:"?"==i?(r.query="",h=Ae):"#"==i?(r.fragment="",h=Le):i!=e&&(r.path[0]+=H(i,J));break;case Ae:n||"#"!=i?i!=e&&("'"==i&&Q(r)?r.query+="%27":r.query+="#"==i?"%23":H(i,J)):(r.fragment="",h=Le);break;case Le:i!=e&&(r.fragment+=H(i,N))}c++}},Ue=function(e){var r,n,a=u(this,Ue,"URL"),s=arguments.length>1?arguments[1]:void 0,i=String(e),o=y(a,{type:"URL"});if(void 0!==s)if(s instanceof Ue)r=b(s);else if(n=Re(r={},String(s)))throw TypeError(n);if(n=Re(o,i,null,r))throw TypeError(n);var l=o.searchParams=new d,f=q(l);f.updateSearchParams(o.query),f.updateURL=function(){o.query=String(l)||null},t||(a.href=Be.call(a),a.origin=Se.call(a),a.protocol=je.call(a),a.username=Pe.call(a),a.password=Ie.call(a),a.host=Ce.call(a),a.hostname=Oe.call(a),a.port=Fe.call(a),a.pathname=$e.call(a),a.search=De.call(a),a.searchParams=Ee.call(a),a.hash=Te.call(a))},ke=Ue.prototype,Be=function(){var e=b(this),r=e.scheme,t=e.username,n=e.password,a=e.host,s=e.port,i=e.path,u=e.query,o=e.fragment,l=r+":";return null!==a?(l+="//",V(e)&&(l+=t+(n?":"+n:"")+"@"),l+=Z(a),null!==s&&(l+=":"+s)):"file"==r&&(l+="//"),l+=e.cannotBeABaseURL?i[0]:i.length?"/"+i.join("/"):"",null!==u&&(l+="?"+u),null!==o&&(l+="#"+o),l},Se=function(){var e=b(this),r=e.scheme,t=e.port;if("blob"==r)try{return new URL(r.path[0]).origin}catch(n){return"null"}return"file"!=r&&Q(e)?r+"://"+Z(e.host)+(null!==t?":"+t:""):"null"},je=function(){return b(this).scheme+":"},Pe=function(){return b(this).username},Ie=function(){return b(this).password},Ce=function(){var e=b(this),r=e.host,t=e.port;return null===r?"":null===t?Z(r):Z(r)+":"+t},Oe=function(){var e=b(this).host;return null===e?"":Z(e)},Fe=function(){var e=b(this).port;return null===e?"":String(e)},$e=function(){var e=b(this),r=e.path;return e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},De=function(){var e=b(this).query;return e?"?"+e:""},Ee=function(){return b(this).searchParams},Te=function(){var e=b(this).fragment;return e?"#"+e:""},xe=function(e,r){return{get:e,set:r,configurable:!0,enumerable:!0}};if(t&&s(ke,{href:xe(Be,function(e){var r=b(this),t=String(e),n=Re(r,t);if(n)throw TypeError(n);q(r.searchParams).updateSearchParams(r.query)}),origin:xe(Se),protocol:xe(je,function(e){var r=b(this);Re(r,String(e)+":",ne)}),username:xe(Pe,function(e){var r=b(this),t=f(String(e));if(!W(r)){r.username="";for(var n=0;n<t.length;n++)r.username+=H(t[n],G)}}),password:xe(Ie,function(e){var r=b(this),t=f(String(e));if(!W(r)){r.password="";for(var n=0;n<t.length;n++)r.password+=H(t[n],G)}}),host:xe(Ce,function(e){var r=b(this);r.cannotBeABaseURL||Re(r,String(e),pe)}),hostname:xe(Oe,function(e){var r=b(this);r.cannotBeABaseURL||Re(r,String(e),me)}),port:xe(Fe,function(e){var r=b(this);W(r)||(""==(e=String(e))?r.port=null:Re(r,e,ge))}),pathname:xe($e,function(e){var r=b(this);r.cannotBeABaseURL||(r.path=[],Re(r,e+"",ye))}),search:xe(De,function(e){var r=b(this);""==(e=String(e))?r.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),r.query="",Re(r,e,Ae)),q(r.searchParams).updateSearchParams(r.query)}),searchParams:xe(Ee),hash:xe(Te,function(e){var r=b(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),r.fragment="",Re(r,e,Le)):r.fragment=null})}),i(ke,"toJSON",function(){return Be.call(this)},{enumerable:!0}),i(ke,"toString",function(){return Be.call(this)},{enumerable:!0}),v){var ze=v.createObjectURL,Me=v.revokeObjectURL;ze&&i(Ue,"createObjectURL",function(e){return ze.apply(v,arguments)}),Me&&i(Ue,"revokeObjectURL",function(e){return Me.apply(v,arguments)})}p(Ue,"URL"),r({global:!0,forced:!n,sham:!t},{URL:Ue});
762
+ },{"../modules/es.string.iterator":"PSYM","../internals/export":"rhEq","../internals/descriptors":"A8Ob","../internals/native-url":"6Yrj","../internals/global":"MVLi","../internals/object-define-properties":"ZdKd","../internals/redefine":"ztZs","../internals/an-instance":"pJoy","../internals/has":"j/yd","../internals/object-assign":"aWUw","../internals/array-from":"ITnL","../internals/string-multibyte":"FQEJ","../internals/punycode-to-ascii":"HC+l","../internals/set-to-string-tag":"kLCt","../modules/web.url-search-params":"CpgZ","../internals/internal-state":"vLSK"}],"tFEl":[function(require,module,exports) {
763
+ "use strict";var t=require("../internals/export");t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}});
764
+ },{"../internals/export":"rhEq"}],"nU+S":[function(require,module,exports) {
765
+ require("../modules/web.dom-collections.for-each"),require("../modules/web.dom-collections.iterator"),require("../modules/web.immediate"),require("../modules/web.queue-microtask"),require("../modules/web.timers"),require("../modules/web.url"),require("../modules/web.url.to-json"),require("../modules/web.url-search-params"),module.exports=require("../internals/path");
766
+ },{"../modules/web.dom-collections.for-each":"GFxX","../modules/web.dom-collections.iterator":"8dkd","../modules/web.immediate":"5hZL","../modules/web.queue-microtask":"ei+z","../modules/web.timers":"OTsy","../modules/web.url":"ytq2","../modules/web.url.to-json":"tFEl","../modules/web.url-search-params":"CpgZ","../internals/path":"+h/M"}],"XqIO":[function(require,module,exports) {
767
+ require("../es"),require("../web"),module.exports=require("../internals/path");
768
+ },{"../es":"L1QH","../web":"nU+S","../internals/path":"+h/M"}],"QVnC":[function(require,module,exports) {
769
+ var t=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,r,e){var n=f;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return N()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=_(a,e);if(c){if(c===y)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=l;var u=h(t,r,e);if("normal"===u.type){if(n=e.done?p:s,u.arg===y)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=p,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(n){return{type:"throw",arg:n}}}t.wrap=u;var f="suspendedStart",s="suspendedYield",l="executing",p="completed",y={};function v(){}function d(){}function g(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,L=w&&w(w(G([])));L&&L!==e&&n.call(L,i)&&(m=L);var x=g.prototype=v.prototype=Object.create(m);function E(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function b(t){var r;this._invoke=function(e,o){function i(){return new Promise(function(r,i){!function r(e,o,i,a){var c=h(t[e],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,i,a)},function(t){r("throw",t,i,a)}):Promise.resolve(f).then(function(t){u.value=t,i(u)},function(t){return r("throw",t,i,a)})}a(c.arg)}(e,o,r,i)})}return r=r?r.then(i,i):i()}}function _(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,_(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function G(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:r,done:!0}}return d.prototype=x.constructor=g,g.constructor=d,g[c]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},E(b.prototype),b.prototype[a]=function(){return this},t.AsyncIterator=b,t.async=function(r,e,n,o){var i=new b(u(r,e,n,o));return t.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}
770
+ },{}],"5ZYc":[function(require,module,exports) {
771
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="application/x-postmate-v1+json",t=5,n=0,a=function(){return++n},i=function(){var e;return c.debug?(e=console).log.apply(e,arguments):null},r=function(e){var t=document.createElement("a");t.href=e;var n=t.protocol.length>4?t.protocol:window.location.protocol,a=t.host.length?"80"===t.port||"443"===t.port?t.hostname:t.host:window.location.host;return t.origin||n+"//"+a},o={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1},s=function(t,n){return("string"!=typeof n||t.origin===n)&&(!!t.data&&(("object"!=typeof t.data||"postmate"in t.data)&&(t.data.type===e&&!!o[t.data.postmate])))},d=function(e,t){var n="function"==typeof e[t]?e[t]():e[t];return c.Promise.resolve(n)},l=function(){function t(e){var t=this;this.parent=e.parent,this.frame=e.frame,this.child=e.child,this.childOrigin=e.childOrigin,this.events={},this.listener=function(e){if(!s(e,t.childOrigin))return!1;var n=((e||{}).data||{}).value||{},a=n.data,i=n.name;"emit"===e.data.postmate&&i in t.events&&t.events[i].call(t,a)},this.parent.addEventListener("message",this.listener,!1)}var n=t.prototype;return n.get=function(t){var n=this;return new c.Promise(function(i){var r=a();n.parent.addEventListener("message",function e(t){t.data.uid===r&&"reply"===t.data.postmate&&(n.parent.removeEventListener("message",e,!1),i(t.data.value))},!1),n.child.postMessage({postmate:"request",type:e,property:t,uid:r},n.childOrigin)})},n.call=function(t,n){this.child.postMessage({postmate:"call",type:e,property:t,data:n},this.childOrigin)},n.on=function(e,t){this.events[e]=t},n.destroy=function(){window.removeEventListener("message",this.listener,!1),this.frame.parentNode.removeChild(this.frame)},t}(),p=function(){function t(t){var n=this;this.model=t.model,this.parent=t.parent,this.parentOrigin=t.parentOrigin,this.child=t.child,this.child.addEventListener("message",function(t){if(s(t,n.parentOrigin)){0;var a=t.data,i=a.property,r=a.uid,o=a.data;"call"!==t.data.postmate?d(n.model,i).then(function(n){return t.source.postMessage({property:i,postmate:"reply",type:e,uid:r,value:n},t.origin)}):i in n.model&&"function"==typeof n.model[i]&&n.model[i].call(n,o)}})}return t.prototype.emit=function(t,n){this.parent.postMessage({postmate:"emit",type:e,value:{name:t,data:n}},this.parentOrigin)},t}(),c=function(){function n(e){var t=e.container,n=void 0===t?void 0!==n?n:document.body:t,a=e.model,i=e.url,r=e.classListArray,o=void 0===r?[]:r;return this.parent=window,this.frame=document.createElement("iframe"),this.frame.classList.add.apply(this.frame.classList,o),n.appendChild(this.frame),this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=a||{},this.sendHandshake(i)}return n.prototype.sendHandshake=function(a){var i,o=this,d=r(a),p=0;return new n.Promise(function(n,r){o.parent.addEventListener("message",function e(t){return!!s(t,d)&&("handshake-reply"===t.data.postmate?(clearInterval(i),o.parent.removeEventListener("message",e,!1),o.childOrigin=t.origin,n(new l(o))):r("Failed handshake"))},!1);var c=function(){p++,o.child.postMessage({postmate:"handshake",type:e,model:o.model},d),p===t&&clearInterval(i)},h=function(){c(),i=setInterval(c,500)};o.frame.attachEvent?o.frame.attachEvent("onload",h):o.frame.onload=h,o.frame.src=a})},n}();c.debug=!1,c.Promise=function(){try{return window?window.Promise:Promise}catch(e){return null}}(),c.Model=function(){function t(e){return this.child=window,this.model=e,this.parent=this.child.parent,this.sendHandshakeReply()}return t.prototype.sendHandshakeReply=function(){var t=this;return new c.Promise(function(n,a){t.child.addEventListener("message",function i(r){if(r.data.postmate){if("handshake"===r.data.postmate){t.child.removeEventListener("message",i,!1),r.source.postMessage({postmate:"handshake-reply",type:e},r.origin),t.parentOrigin=r.origin;var o=r.data.model;return o&&Object.keys(o).forEach(function(e){t.model[e]=o[e]}),n(new p(t))}return a("Handshake Reply Failed")}},!1)})},t}();var h=c;exports.default=h;
772
+ },{}],"776e":[function(require,module,exports) {
773
+ "use strict";function e(e,n,t,r,a,o,i){try{var u=e[o](i),s=u.value}catch(c){return void t(c)}u.done?n(s):Promise.resolve(s).then(r,a)}function n(n){return function(){var t=this,r=arguments;return new Promise(function(a,o){var i=n.apply(t,r);function u(n){e(i,a,o,u,s,"next",n)}function s(n){e(i,a,o,u,s,"throw",n)}u(void 0)})}}function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,n,t){return n&&r(e.prototype,n),t&&r(e,t),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppBridgeComponent=void 0;var o=function(){function e(){t(this,e),this.postmate=null,this.handshake=null}return a(e,[{key:"sendHandshake",value:function(){var e=n(regeneratorRuntime.mark(function e(){var n,t=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:1,n=Math.max(0,n),e.prev=2,e.next=5,this.postmate;case 5:this.handshake=e.sent,e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(2),!(n>0)){e.next=12;break}return e.abrupt("return",this.sendHandshake(--n));case 12:throw e.t0;case 13:case"end":return e.stop()}},e,this,[[2,8]])}));return function(){return e.apply(this,arguments)}}()},{key:"getHandshake",value:function(){return this.handshake}}],[{key:"init",value:function(){throw new Error("Method 'init' has to be implemented")}}]),e}();exports.AppBridgeComponent=o;
774
+ },{}],"D5HV":[function(require,module,exports) {
775
+ "use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.RegistrableObject=void 0;var r=function(){function t(){e(this,t)}return n(t,null,[{key:"getName",value:function(){throw new Error('Method "getName" has to be implemented')}}]),t}();exports.RegistrableObject=r;
776
+ },{}],"h36w":[function(require,module,exports) {
777
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Event=void 0;var t=require("../register/RegistrableObject");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function n(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),t}function i(t,r){return!r||"object"!==e(r)&&"function"!=typeof r?u(t):r}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function o(){var t;return r(this,o),(t=i(this,c(o).call(this))).createdAt=new Date,t.extraPayload={},t}return a(o,t.RegistrableObject),n(o,[{key:"addExtraPayload",value:function(t,e){this.extraPayload[t]=e}}]),o}();exports.Event=l;
778
+ },{"../register/RegistrableObject":"D5HV"}],"6ulf":[function(require,module,exports) {
779
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Command=void 0;var t=require("../register/RegistrableObject");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function n(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),t}function u(t,r){return!r||"object"!==e(r)&&"function"!=typeof r?i(t):r}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function o(t,e,n){var i;return r(this,o),(i=u(this,f(o).call(this))).platform=t,i.platformVer=e,i.moduleVer=n,i}return c(o,t.RegistrableObject),n(o,[{key:"setPlatform",value:function(t){this.platform=t}}]),o}();exports.Command=l;
780
+ },{"../register/RegistrableObject":"D5HV"}],"PvzX":[function(require,module,exports) {
781
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Register=void 0;var e=require("../events/Event"),r=require("../commands/Command");function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,r,t){return r&&n(e.prototype,r),t&&n(e,t),e}var o=function(){function e(){t(this,e),this.registeredObjects={}}return i(e,[{key:"register",value:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];this.registeredObjects[e.getName()]=t}},{key:"on",value:function(e){if(!this.registeredObjects[e.type])throw new Error("Object is not registered");return Promise.all(this.registeredObjects[e.type].map(function(r){return r(e.entries)}))}}]),e}();exports.Register=o;
782
+ },{"../events/Event":"h36w","../commands/Command":"6ulf"}],"CcKS":[function(require,module,exports) {
783
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommandsRegister=void 0;var e=require("../commands/Command"),t=require("./Register");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){function r(){return u(this,r),s(this,a(r).apply(this,arguments))}return b(r,t.Register),f(r,[{key:"toProperties",value:function(){var e=this;return Object.keys(this.registeredObjects).reduce(function(t,r){return o({},t,{},i({},r,function(t){return e.on(t)}))},{})}}]),r}();exports.CommandsRegister=y;
784
+ },{"../commands/Command":"6ulf","./Register":"PvzX"}],"lS0V":[function(require,module,exports) {
785
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppBridgeChild=void 0;var e=i(require("postmate")),t=require("./AppBridgeComponent"),r=require("../events/Event"),n=require("../commands/Command"),o=require("../register/CommandsRegister");function i(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(p){return void r(p)}c.done?t(a):Promise.resolve(a).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function u(e){c(i,n,o,u,a,"next",e)}function a(e){c(i,n,o,u,a,"throw",e)}u(void 0)})}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(r,!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}function v(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(r){function n(t){var r;return l(this,n),(r=v(this,d(n).call(this))).properties=t.toProperties(),r.postmate=new e.default.Model(r.properties),r}return h(n,t.AppBridgeComponent),b(n,[{key:"addProperty",value:function(e,t){this.properties[e]=t}},{key:"emitEvent",value:function(e){this.handshake.emit(e.constructor.getName(),{type:e.constructor.getName(),entries:f({},e)})}}],[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise(function(){var r=a(regeneratorRuntime.mark(function r(o,i){var u;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,u=new n(e),r.next=4,u.sendHandshake(t);case 4:o(u),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),i(r.t0);case 10:case"end":return r.stop()}},r,null,[[0,7]])}));return function(e,t){return r.apply(this,arguments)}}())}}]),n}();exports.AppBridgeChild=g;
786
+ },{"postmate":"5ZYc","./AppBridgeComponent":"776e","../events/Event":"h36w","../commands/Command":"6ulf","../register/CommandsRegister":"CcKS"}],"nSEc":[function(require,module,exports) {
787
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventsRegister=void 0;var e=require("../events/Event"),t=require("./Register");function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){function n(){return r(this,n),u(this,f(n).apply(this,arguments))}return s(n,t.Register),i(n,[{key:"setListeners",value:function(e){var t=this;Object.keys(this.registeredObjects).map(function(n){return e.on(n,function(e){return t.on(e)})})}}]),n}();exports.EventsRegister=a;
788
+ },{"../events/Event":"h36w","./Register":"PvzX"}],"G038":[function(require,module,exports) {
789
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppBridgeParent=void 0;var e=require("./AppBridgeComponent"),t=o(require("postmate")),n=require("../register/EventsRegister"),r=require("../events/Event");function o(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(s){return void n(s)}c.done?t(a):Promise.resolve(a).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){s(i,r,o,u,c,"next",e)}function c(e){s(i,r,o,u,c,"throw",e)}u(void 0)})}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function h(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=b(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function b(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var w=function(n){function r(e,n){var o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.body,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;return f(this,r),(o=h(this,g(r).call(this))).platform=e,o.events=n,o.postmateConfig={container:i,url:u,classListArray:c,model:a},o.postmate=new t.default(o.postmateConfig),o}return m(r,e.AppBridgeComponent),y(r,[{key:"sendHandshake",value:function(){var e=l(regeneratorRuntime.mark(function e(){var t,n=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:1,e.next=3,d(g(r.prototype),"sendHandshake",this).call(this,t);case 3:this.events.setListeners(this.handshake);case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onEvent",value:function(e){this.events.on(e)}},{key:"call",value:function(e){e.setPlatform(this.platform),this.handshake.call(e.constructor.getName(),{type:e.constructor.getName(),entries:c({},e)})}},{key:"get",value:function(e){return this.handshake.get(e).then(function(e){return e})}},{key:"destroy",value:function(){this.handshake.destroy()}}],[{key:"init",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;return new Promise(function(){var a=l(regeneratorRuntime.mark(function a(s,l){var f;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,f=new r(e,t,n,o,i,u),a.next=4,f.sendHandshake(c);case 4:s(f),a.next=10;break;case 7:a.prev=7,a.t0=a.catch(0),l(a.t0);case 10:case"end":return a.stop()}},a,null,[[0,7]])}));return function(e,t){return a.apply(this,arguments)}}())}}]),r}();exports.AppBridgeParent=w;
790
+ },{"./AppBridgeComponent":"776e","postmate":"5ZYc","../register/EventsRegister":"nSEc","../events/Event":"h36w"}],"aInX":[function(require,module,exports) {
791
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./AppBridgeChild");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})});var r=require("./AppBridgeParent");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});var t=require("./AppBridgeComponent");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
792
+ },{"./AppBridgeChild":"lS0V","./AppBridgeParent":"G038","./AppBridgeComponent":"776e"}],"B7pK":[function(require,module,exports) {
793
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConnectCommand=void 0;var t=require("./Command");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function u(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?i(t):n}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function o(t,e,r,i,f){var a;return n(this,o),(a=u(this,c(o).call(this,r,i,f))).storeUrl=t,a.userId=e,a}return f(o,t.Command),r(o,null,[{key:"getName",value:function(){return"ConnectCommand"}}]),o}();exports.ConnectCommand=l;
794
+ },{"./Command":"6ulf"}],"nEb6":[function(require,module,exports) {
795
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SignInCommand=void 0;var t=require("./Command");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function u(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?i(t):n}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function o(t,e,r,i){var f;return n(this,o),(f=u(this,c(o).call(this,e,r,i))).userToken=t,f}return f(o,t.Command),r(o,null,[{key:"getName",value:function(){return"SignInCommand"}}]),o}();exports.SignInCommand=l;
796
+ },{"./Command":"6ulf"}],"og2y":[function(require,module,exports) {
797
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JoinCommand=void 0;var t=require("./Command");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function u(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?i(t):n}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function o(t,e,r,i,f){var a;return n(this,o),(a=u(this,c(o).call(this,r,i,f))).storeToken=t,a.userId=e,a}return f(o,t.Command),r(o,null,[{key:"getName",value:function(){return"JoinCommand"}}]),o}();exports.JoinCommand=l;
798
+ },{"./Command":"6ulf"}],"wiV8":[function(require,module,exports) {
799
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Command");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})});var r=require("./ConnectCommand");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});var t=require("./SignInCommand");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});var n=require("./JoinCommand");Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
800
+ },{"./Command":"6ulf","./ConnectCommand":"B7pK","./SignInCommand":"nEb6","./JoinCommand":"og2y"}],"T8Ex":[function(require,module,exports) {
801
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserSignedInEvent=void 0;var e=require("./Event");function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function u(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?i(e):n}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(t){function r(e,t){var o;return n(this,r),(o=u(this,c(r).call(this))).userToken=e,o.storeToken=t,o}return f(r,e.Event),o(r,null,[{key:"getName",value:function(){return"UserSignedInEvent"}}]),r}();exports.UserSignedInEvent=s;
802
+ },{"./Event":"h36w"}],"mzHb":[function(require,module,exports) {
803
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AgentWasCreatedEvent=void 0;var e=require("./Event");function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function u(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?i(e):n}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(t){function r(e){var t;return n(this,r),(t=u(this,c(r).call(this))).userToken=e,t}return f(r,e.Event),o(r,null,[{key:"getName",value:function(){return"AgentWasCreatedEvent"}}]),r}();exports.AgentWasCreatedEvent=l;
804
+ },{"./Event":"h36w"}],"sxXM":[function(require,module,exports) {
805
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorOccurredEvent=void 0;var t=require("./Event");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function u(t,r){return!r||"object"!==e(r)&&"function"!=typeof r?c(t):r}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(e){function n(t,e){var o,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return r(this,n),(o=u(this,i(n).call(this))).errorMessage=t,o.statusCode=e,o.metadata=c,o}return f(n,t.Event),o(n,null,[{key:"getName",value:function(){return"ErrorOccurredEvent"}}]),n}();exports.ErrorOccurredEvent=l;
806
+ },{"./Event":"h36w"}],"Sykw":[function(require,module,exports) {
807
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Event");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})});var r=require("./UserSignedInEvent");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});var t=require("./AgentWasCreatedEvent");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});var n=require("./ErrorOccurredEvent");Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
808
+ },{"./Event":"h36w","./UserSignedInEvent":"T8Ex","./AgentWasCreatedEvent":"mzHb","./ErrorOccurredEvent":"sxXM"}],"ixYr":[function(require,module,exports) {
809
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Register");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})});var r=require("./CommandsRegister");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});var t=require("./EventsRegister");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
810
+ },{"./Register":"PvzX","./CommandsRegister":"CcKS","./EventsRegister":"nSEc"}],"Focm":[function(require,module,exports) {
811
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("core-js/stable"),require("regenerator-runtime/runtime");var e=require("./bridge");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})});var r=require("./commands");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});var t=require("./events");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});var u=require("./register");Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return u[e]}})});
812
+ },{"core-js/stable":"XqIO","regenerator-runtime/runtime":"QVnC","./bridge":"aInX","./commands":"wiV8","./events":"Sykw","./register":"ixYr"}]},{},["Focm"], "AppBridge")
plugin_files/js/livechat-review.js CHANGED
@@ -1,38 +1,52 @@
1
  (function ($) {
2
- $(document).ready(function () {
3
- var dismissButton = $("#lc-review-notice button");
4
- dismissButton.hide();
5
- $("#lc-review-dismiss").click(function (e) {
6
- e.preventDefault();
7
- $.ajax({
8
- url: ajaxurl,
9
- type: "POST",
10
- data: {
11
- action: 'lc_review_dismiss'
12
- }
13
- });
14
- dismissButton.click();
15
- });
16
- $("#lc-review-postpone").click(function (e) {
17
- e.preventDefault();
18
- $.ajax({
19
- url: ajaxurl,
20
- type: "POST",
21
- data: {
22
- action: 'lc_review_postpone'
23
- }
24
- });
25
- dismissButton.click();
26
- });
27
- $("#lc-review-now").click(function () {
28
- $.ajax({
29
- url: ajaxurl,
30
- type: "POST",
31
- data: {
32
- action: 'lc_review_dismiss'
33
- }
34
- });
35
- dismissButton.click();
36
- });
37
- })
38
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  (function ($) {
2
+ $( document ).ready(
3
+ function () {
4
+ var dismissButton = $( "#lc-review-notice button" );
5
+ dismissButton.hide();
6
+ $( "#lc-review-dismiss" ).click(
7
+ function (e) {
8
+ e.preventDefault();
9
+ $.ajax(
10
+ {
11
+ url: ajaxurl,
12
+ type: "POST",
13
+ data: {
14
+ action: 'lc_review_dismiss'
15
+ }
16
+ }
17
+ );
18
+ dismissButton.click();
19
+ }
20
+ );
21
+ $( "#lc-review-postpone" ).click(
22
+ function (e) {
23
+ e.preventDefault();
24
+ $.ajax(
25
+ {
26
+ url: ajaxurl,
27
+ type: "POST",
28
+ data: {
29
+ action: 'lc_review_postpone'
30
+ }
31
+ }
32
+ );
33
+ dismissButton.click();
34
+ }
35
+ );
36
+ $( "#lc-review-now" ).click(
37
+ function () {
38
+ $.ajax(
39
+ {
40
+ url: ajaxurl,
41
+ type: "POST",
42
+ data: {
43
+ action: 'lc_review_dismiss'
44
+ }
45
+ }
46
+ );
47
+ dismissButton.click();
48
+ }
49
+ );
50
+ }
51
+ )
52
+ })( jQuery );
plugin_files/js/livechat.js CHANGED
@@ -1,271 +1,318 @@
1
  (function($)
2
  {
3
- var LiveChat =
4
- {
5
- slug: 'wp-live-chat-software-for-wordpress',
6
- buttonLoaderHtml:
7
- '<div class="lc-loader-wrapper lc-btn__loader"><div class="lc-loader-spinner-wrapper lc-loader-spinner-wrapper--small"><div class="lc-loader-spinner lc-loader-spinner--thin" /></div></div>',
8
- init: function()
9
  {
10
- this.signInWithLiveChat();
11
- this.bindDisconnect();
12
- this.hideInstalledNotification();
13
- this.settingsForm();
14
- this.connectNoticeButtonHandler();
15
- this.deactivationModalOpenHandler();
16
- this.deactivationModalCloseHandler();
17
- this.deactivationFormOptionSelectHandler();
18
- this.deactivationFormSkipHandler();
19
- this.deactivationFormSubmitHandler();
20
- },
21
- sanitize: function (str) {
22
- var tmpDiv = document.createElement('div');
23
- tmpDiv.textContent = str;
24
- return tmpDiv.innerHTML;
25
- },
26
- bindEvent: function(element, eventName, eventHandler) {
27
- if (element.addEventListener){
28
- element.addEventListener(eventName, eventHandler, false);
29
- } else if (element.attachEvent) {
30
- element.attachEvent('on' + eventName, eventHandler);
31
- }
32
- },
33
- signInWithLiveChat: function () {
34
- var logoutButton = document.getElementById('resetAccount'),
35
- iframeEl = document.getElementById('login-with-livechat');
36
 
37
- LiveChat.bindEvent(window, 'message', function (e) {
38
- if (e.origin !== 'https://addons.livechatinc.com') {
39
- return false;
40
- }
 
 
 
41
 
42
- try {
43
- var lcDetails = JSON.parse(e.data);
44
- if (lcDetails.type === 'logged-in') {
45
- var licenseForm = $('form#licenseForm');
46
- if(licenseForm.length) {
47
- licenseForm.find('input#licenseEmail').val(lcDetails.email);
48
- licenseForm.find('input#licenseNumber').val(lcDetails.license);
49
- LiveChat.sendEvent(
50
- 'Integrations: User authorized the app',
51
- lcDetails.license,
52
- lcDetails.email,
53
- function () {
54
- licenseForm.submit();
55
- }
56
- );
57
- }
58
- }
59
- } catch (e) {
60
- console.warn(e);
61
- }
62
- });
 
63
 
64
- if(logoutButton) {
65
- LiveChat.bindEvent(logoutButton, 'click', function (e) {
66
- sendMessage('logout');
67
- });
68
- }
 
 
 
 
69
 
70
- var sendMessage = function(msg) {
71
- iframeEl.contentWindow.postMessage(msg, '*');
72
- };
73
- },
74
- bindDisconnect: function() {
75
- $('#resetAccount').click(function (e) {
76
- e.preventDefault();
77
- LiveChat.sendEvent(
78
- 'Integrations: User unauthorized the app',
79
- lcDetails.license,
80
- lcDetails.email,
81
- function () {
82
- location.href = $('#resetAccount').attr('href');
83
- }
84
- );
85
- });
86
- },
87
- sendEvent: function(eventName, license, email, callback) {
88
- var amplitudeURL = 'https://queue.livechatinc.com/app_event/';
89
- var data = {
90
- "e" : JSON.stringify(
91
- [{
92
- "event_type": eventName,
93
- "user_id": email,
94
- "user_properties": {
95
- "license": license
96
- },
97
- "product_name": "livechat",
98
- "event_properties": {
99
- "integration name": this.slug
100
- }
101
- }]
102
- )
103
- };
104
- $.ajax({
105
- url: amplitudeURL,
106
- type: 'GET',
107
- crossOrigin: true,
108
- data: data
109
- }).always(function () {
110
- if(callback) callback();
111
- });
112
- },
113
- hideInstalledNotification: function () {
114
- var notificationElement = $('.updated.installed');
115
- $('#installed-close').click(function () {
116
- notificationElement.slideUp();
117
- });
118
- setTimeout(function () {
119
- notificationElement.slideUp();
120
- }, 3000);
121
- },
122
- setSettings: function(settings) {
123
- $.ajax({
124
- url: '?page=livechat_settings' + lcDetails.nonce,
125
- type: 'POST',
126
- data: settings,
127
- dataType: 'json',
128
- cache: false,
129
- async: false,
130
- error: function () {
131
- alert('Something went wrong. Please try again or contact our support team.');
132
- }
133
- });
134
- },
135
- settingsForm: function() {
136
- $('.settings .title').click(function() {
137
- $(this).next('.onoffswitch').children('label').click();
138
- });
139
- $('.onoffswitch-checkbox').change(function() {
140
- var settings = {};
141
- $('.onoffswitch-checkbox').each(function(){
142
- var paramName = $(this).attr('id');
143
- settings[paramName] = $(this).is(':checked') ? 1 : 0;
144
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
- LiveChat.setSettings(settings);
147
- });
148
- },
149
- connectNoticeButtonHandler: function () {
150
- $('#lc-connect-notice-button').click(function () {
151
- window.location.replace('admin.php?page=livechat_settings');
152
- })
153
- },
154
- deactivationFormHelpers: {
155
- hideErrors: function () {
156
- $('.lc-field-error').hide();
157
- },
158
- toggleModal: function () {
159
- $('#lc-deactivation-feedback-modal-overlay').toggleClass('lc-modal-base__overlay--visible');
160
- },
161
- showError: function (errorType) {
162
- $('#lc-deactivation-feedback-form-' + errorType + '-error').show();
163
- }
164
- },
165
- deactivationModalOpenHandler: function() {
166
- var that = this;
167
- $('table.plugins tr[data-slug=' + that.slug + '] span.deactivate a').click(function (e) {
168
- if ($('#lc-deactivation-feedback-modal-container').length < 1) {
169
- return;
170
- }
171
- e.preventDefault();
172
- that.deactivationFormHelpers.toggleModal();
173
- })
174
- },
175
- deactivationModalCloseHandler: function() {
176
- var that = this;
177
- var modalOverlay = $('#lc-deactivation-feedback-modal-overlay');
178
- modalOverlay.click(function (e) {
179
- if (
180
- modalOverlay.hasClass('lc-modal-base__overlay--visible') &&
181
- (
182
- !$(e.target).closest('#lc-deactivation-feedback-modal-container').length ||
183
- $(e.target).closest('.lc-modal-base__close').length
184
- )
185
- ) {
186
- that.deactivationFormHelpers.toggleModal();
187
- }
188
- });
189
- },
190
- deactivationFormOptionSelectHandler: function () {
191
- var that = this;
192
- $('.lc-radio').click(function () {
193
- that.deactivationFormHelpers.hideErrors();
194
- var otherTextField = $('#lc-deactivation-feedback-other-field');
195
- $('.lc-radio').removeClass('lc-radio--selected');
196
- $(this).addClass('lc-radio--selected');
197
- if ($(this).find('#lc-deactivation-feedback-option-other').length > 0) {
198
- otherTextField.show();
199
- otherTextField.find('textarea').focus();
200
- } else {
201
- otherTextField.hide();
202
- }
203
- })
204
- },
205
- sendFeedback: function(response, comment) {
206
- var that = this;
207
- response = response ? this.sanitize(response) : 'skipped';
208
- comment = comment ? this.sanitize(comment) : '';
209
- $.ajax({
210
- method: 'POST',
211
- url: 'https://script.google.com/macros/s/AKfycbxqXkuWGYrjhWBQ1pfkJuaQ8o3d2uOrGdNiQdYGIBODL5OvOsI/exec',
212
- data: $.param({
213
- plugin: that.slug,
214
- url: window.location.href.replace(/(.*)wp-admin.*/, '$1'),
215
- license: window.deactivationDetails.license,
216
- name: window.deactivationDetails.name,
217
- wpEmail: window.deactivationDetails.wpEmail,
218
- response,
219
- comment
220
- }),
221
- dataType: 'jsonp',
222
- complete: function () {
223
- window.location.replace(
224
- $('table.plugins tr[data-slug=' + that.slug + '] span.deactivate a').attr('href')
225
- );
226
- }
227
- });
228
- },
229
- deactivationFormSkipHandler: function() {
230
- var that = this;
231
- $('#lc-deactivation-feedback-modal-skip-btn').click(function () {
232
- $(this).addClass('lc-btn--loading lc-btn--disabled').html(
233
- $(this).html() + that.buttonLoaderHtml
234
- );
235
- $('#lc-deactivation-feedback-modal-submit-btn')
236
- .attr('disabled', true)
237
- .addClass('lc-btn--disabled');
238
- that.sendFeedback();
239
- });
240
- },
241
- deactivationFormSubmitHandler: function () {
242
- var that = this;
243
- $('#lc-deactivation-feedback-modal-submit-btn').click(function (e) {
244
- e.preventDefault();
245
- that.deactivationFormHelpers.hideErrors();
246
- var response = $('.lc-radio.lc-radio--selected .lc-radio__input').val();
247
- if (!response) {
248
- that.deactivationFormHelpers.showError('option');
249
- return;
250
- }
251
- var comment = $('#lc-deactivation-feedback-other-field .lc-textarea').val();
252
- if (response.toLowerCase() === 'other' && !comment) {
253
- that.deactivationFormHelpers.showError('other');
254
- return;
255
- }
256
- $(this).addClass('lc-btn--loading lc-btn--disabled').html(
257
- $(this).html() + that.buttonLoaderHtml
258
- );
259
- $('#lc-deactivation-feedback-modal-skip-btn')
260
- .attr('disabled', true)
261
- .addClass('lc-btn--disabled');
262
- that.sendFeedback(response, comment);
263
- })
264
- }
265
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
 
267
- $(document).ready(function()
268
- {
269
- LiveChat.init();
270
- });
271
- })(jQuery);
 
 
1
  (function($)
2
  {
3
+ var LiveChat =
4
+ {
5
+ slug: 'wp-live-chat-software-for-wordpress',
6
+ buttonLoaderHtml:
7
+ '<div class="lc-loader-wrapper lc-btn__loader"><div class="lc-loader-spinner-wrapper lc-loader-spinner-wrapper--small"><div class="lc-loader-spinner lc-loader-spinner--thin" /></div></div>',
8
+ init: function()
9
  {
10
+ this.signInWithLiveChat();
11
+ this.bindDisconnect();
12
+ this.hideInstalledNotification();
13
+ this.settingsForm();
14
+ this.connectNoticeButtonHandler();
15
+ this.deactivationModalOpenHandler();
16
+ this.deactivationModalCloseHandler();
17
+ this.deactivationFormOptionSelectHandler();
18
+ this.deactivationFormSkipHandler();
19
+ this.deactivationFormSubmitHandler();
20
+ },
21
+ sanitize: function (str) {
22
+ var tmpDiv = document.createElement( 'div' );
23
+ tmpDiv.textContent = str;
24
+ return tmpDiv.innerHTML;
25
+ },
26
+ bindEvent: function(element, eventName, eventHandler) {
27
+ if (element.addEventListener) {
28
+ element.addEventListener( eventName, eventHandler, false );
29
+ } else if (element.attachEvent) {
30
+ element.attachEvent( 'on' + eventName, eventHandler );
31
+ }
32
+ },
33
+ signInWithLiveChat: function () {
34
+ var logoutButton = document.getElementById( 'resetAccount' ),
35
+ iframeEl = document.getElementById( 'login-with-livechat' );
36
 
37
+ LiveChat.bindEvent(
38
+ window,
39
+ 'message',
40
+ function (e) {
41
+ if (e.origin !== 'https://addons.livechatinc.com') {
42
+ return false;
43
+ }
44
 
45
+ try {
46
+ var lcDetails = JSON.parse( e.data );
47
+ if (lcDetails.type === 'logged-in') {
48
+ var licenseForm = $( 'form#licenseForm' );
49
+ if (licenseForm.length) {
50
+ licenseForm.find( 'input#licenseEmail' ).val( lcDetails.email );
51
+ licenseForm.find( 'input#licenseNumber' ).val( lcDetails.license );
52
+ LiveChat.sendEvent(
53
+ 'Integrations: User authorized the app',
54
+ lcDetails.license,
55
+ lcDetails.email,
56
+ function () {
57
+ licenseForm.submit();
58
+ }
59
+ );
60
+ }
61
+ }
62
+ } catch (e) {
63
+ console.warn( e );
64
+ }
65
+ }
66
+ );
67
 
68
+ if (logoutButton) {
69
+ LiveChat.bindEvent(
70
+ logoutButton,
71
+ 'click',
72
+ function (e) {
73
+ sendMessage( 'logout' );
74
+ }
75
+ );
76
+ }
77
 
78
+ var sendMessage = function(msg) {
79
+ iframeEl.contentWindow.postMessage( msg, '*' );
80
+ };
81
+ },
82
+ bindDisconnect: function() {
83
+ $( '#resetAccount' ).click(
84
+ function (e) {
85
+ e.preventDefault();
86
+ LiveChat.sendEvent(
87
+ 'Integrations: User unauthorized the app',
88
+ lcDetails.license,
89
+ lcDetails.email,
90
+ function () {
91
+ location.href = $( '#resetAccount' ).attr( 'href' );
92
+ }
93
+ );
94
+ }
95
+ );
96
+ },
97
+ sendEvent: function(eventName, license, email, callback) {
98
+ var amplitudeURL = 'https://queue.livechatinc.com/app_event/';
99
+ var data = {
100
+ "e" : JSON.stringify(
101
+ [{
102
+ "event_type": eventName,
103
+ "user_id": email,
104
+ "user_properties": {
105
+ "license": license
106
+ },
107
+ "product_name": "livechat",
108
+ "event_properties": {
109
+ "integration name": this.slug
110
+ }
111
+ }]
112
+ )
113
+ };
114
+ $.ajax(
115
+ {
116
+ url: amplitudeURL,
117
+ type: 'GET',
118
+ crossOrigin: true,
119
+ data: data
120
+ }
121
+ ).always(
122
+ function () {
123
+ if (callback) {
124
+ callback();
125
+ }
126
+ }
127
+ );
128
+ },
129
+ hideInstalledNotification: function () {
130
+ var notificationElement = $( '.updated.installed' );
131
+ $( '#installed-close' ).click(
132
+ function () {
133
+ notificationElement.slideUp();
134
+ }
135
+ );
136
+ setTimeout(
137
+ function () {
138
+ notificationElement.slideUp();
139
+ },
140
+ 3000
141
+ );
142
+ },
143
+ setSettings: function(settings) {
144
+ $.ajax(
145
+ {
146
+ url: '?page=livechat_settings' + lcDetails.nonce,
147
+ type: 'POST',
148
+ data: settings,
149
+ dataType: 'json',
150
+ cache: false,
151
+ async: false,
152
+ error: function () {
153
+ alert( 'Something went wrong. Please try again or contact our support team.' );
154
+ }
155
+ }
156
+ );
157
+ },
158
+ settingsForm: function() {
159
+ $( '.settings .title' ).click(
160
+ function() {
161
+ $( this ).next( '.onoffswitch' ).children( 'label' ).click();
162
+ }
163
+ );
164
+ $( '.onoffswitch-checkbox' ).change(
165
+ function() {
166
+ var settings = {};
167
+ $( '.onoffswitch-checkbox' ).each(
168
+ function(){
169
+ var paramName = $( this ).attr( 'id' );
170
+ settings[paramName] = $( this ).is( ':checked' ) ? 1 : 0;
171
+ }
172
+ );
173
 
174
+ LiveChat.setSettings( settings );
175
+ }
176
+ );
177
+ },
178
+ connectNoticeButtonHandler: function () {
179
+ $( '#lc-connect-notice-button' ).click(
180
+ function () {
181
+ window.location.replace( 'admin.php?page=livechat_settings' );
182
+ }
183
+ )
184
+ },
185
+ deactivationFormHelpers: {
186
+ hideErrors: function () {
187
+ $( '.lc-field-error' ).hide();
188
+ },
189
+ toggleModal: function () {
190
+ $( '#lc-deactivation-feedback-modal-overlay' ).toggleClass( 'lc-modal-base__overlay--visible' );
191
+ },
192
+ showError: function (errorType) {
193
+ $( '#lc-deactivation-feedback-form-' + errorType + '-error' ).show();
194
+ }
195
+ },
196
+ deactivationModalOpenHandler: function() {
197
+ var that = this;
198
+ $( 'table.plugins tr[data-slug=' + that.slug + '] span.deactivate a' ).click(
199
+ function (e) {
200
+ if ($( '#lc-deactivation-feedback-modal-container' ).length < 1) {
201
+ return;
202
+ }
203
+ e.preventDefault();
204
+ that.deactivationFormHelpers.toggleModal();
205
+ }
206
+ )
207
+ },
208
+ deactivationModalCloseHandler: function() {
209
+ var that = this;
210
+ var modalOverlay = $( '#lc-deactivation-feedback-modal-overlay' );
211
+ modalOverlay.click(
212
+ function (e) {
213
+ if (
214
+ modalOverlay.hasClass( 'lc-modal-base__overlay--visible' ) &&
215
+ (
216
+ ! $( e.target ).closest( '#lc-deactivation-feedback-modal-container' ).length ||
217
+ $( e.target ).closest( '.lc-modal-base__close' ).length
218
+ )
219
+ ) {
220
+ that.deactivationFormHelpers.toggleModal();
221
+ }
222
+ }
223
+ );
224
+ },
225
+ deactivationFormOptionSelectHandler: function () {
226
+ var that = this;
227
+ $( '.lc-radio' ).click(
228
+ function () {
229
+ that.deactivationFormHelpers.hideErrors();
230
+ var otherTextField = $( '#lc-deactivation-feedback-other-field' );
231
+ $( '.lc-radio' ).removeClass( 'lc-radio--selected' );
232
+ $( this ).addClass( 'lc-radio--selected' );
233
+ if ($( this ).find( '#lc-deactivation-feedback-option-other' ).length > 0) {
234
+ otherTextField.show();
235
+ otherTextField.find( 'textarea' ).focus();
236
+ } else {
237
+ otherTextField.hide();
238
+ }
239
+ }
240
+ )
241
+ },
242
+ sendFeedback: function(response, comment) {
243
+ var that = this;
244
+ response = response ? this.sanitize( response ) : 'skipped';
245
+ comment = comment ? this.sanitize( comment ) : '';
246
+ $.ajax(
247
+ {
248
+ method: 'POST',
249
+ url: 'https://script.google.com/macros/s/AKfycbxqXkuWGYrjhWBQ1pfkJuaQ8o3d2uOrGdNiQdYGIBODL5OvOsI/exec',
250
+ data: $.param(
251
+ {
252
+ plugin: that.slug,
253
+ url: window.location.href.replace( /(.*)wp-admin.*/, '$1' ),
254
+ license: window.deactivationDetails.license,
255
+ name: window.deactivationDetails.name,
256
+ wpEmail: window.deactivationDetails.wpEmail,
257
+ response,
258
+ comment
259
+ }
260
+ ),
261
+ dataType: 'jsonp',
262
+ complete: function () {
263
+ window.location.replace(
264
+ $( 'table.plugins tr[data-slug=' + that.slug + '] span.deactivate a' ).attr( 'href' )
265
+ );
266
+ }
267
+ }
268
+ );
269
+ },
270
+ deactivationFormSkipHandler: function() {
271
+ var that = this;
272
+ $( '#lc-deactivation-feedback-modal-skip-btn' ).click(
273
+ function () {
274
+ $( this ).addClass( 'lc-btn--loading lc-btn--disabled' ).html(
275
+ $( this ).html() + that.buttonLoaderHtml
276
+ );
277
+ $( '#lc-deactivation-feedback-modal-submit-btn' )
278
+ .attr( 'disabled', true )
279
+ .addClass( 'lc-btn--disabled' );
280
+ that.sendFeedback();
281
+ }
282
+ );
283
+ },
284
+ deactivationFormSubmitHandler: function () {
285
+ var that = this;
286
+ $( '#lc-deactivation-feedback-modal-submit-btn' ).click(
287
+ function (e) {
288
+ e.preventDefault();
289
+ that.deactivationFormHelpers.hideErrors();
290
+ var response = $( '.lc-radio.lc-radio--selected .lc-radio__input' ).val();
291
+ if ( ! response) {
292
+ that.deactivationFormHelpers.showError( 'option' );
293
+ return;
294
+ }
295
+ var comment = $( '#lc-deactivation-feedback-other-field .lc-textarea' ).val();
296
+ if (response.toLowerCase() === 'other' && ! comment) {
297
+ that.deactivationFormHelpers.showError( 'other' );
298
+ return;
299
+ }
300
+ $( this ).addClass( 'lc-btn--loading lc-btn--disabled' ).html(
301
+ $( this ).html() + that.buttonLoaderHtml
302
+ );
303
+ $( '#lc-deactivation-feedback-modal-skip-btn' )
304
+ .attr( 'disabled', true )
305
+ .addClass( 'lc-btn--disabled' );
306
+ that.sendFeedback( response, comment );
307
+ }
308
+ )
309
+ }
310
+ };
311
 
312
+ $( document ).ready(
313
+ function()
314
+ {
315
+ LiveChat.init();
316
+ }
317
+ );
318
+ })( jQuery );
plugin_files/templates/confirm_identity_notice.html.twig ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% block content %}
2
+ <div class="lc-design-system-typography notice notice-info lc-notice" id="lc-connect-notice">
3
+ <div class="lc-notice-column">
4
+ <img class="lc-notice-logo" src="{{ lcNoticeLogoUrl|e }}" alt="LiveChat logo" />
5
+ </div>
6
+ <div class="lc-notice-column">
7
+ <p id="lc-connect-notice-header">
8
+ {{ header|e }}
9
+ </p>
10
+ <p>
11
+ {{ notice|e }}
12
+ </p>
13
+ </div>
14
+ <div class="lc-notice-column" id="lc-connect-notice-button-column">
15
+ <p>
16
+ <button class="lc-btn lc-btn--primary" id="lc-connect-notice-button" type="button">
17
+ {{ button|e }}
18
+ </button>
19
+ </p>
20
+ </div>
21
+ </div>
22
+ {% endblock %}
plugin_files/templates/connect.html.twig ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% block content %}
2
+ <div id="lc-container"></div>
3
+ {% endblock %}
4
+
5
+ {% block javascripts %}
6
+ <script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=default,es6,fetch,Array.prototype.includes,Object.keys,Symbol.iterator&flags=gated" type="text/javascript"></script>
7
+ <script>
8
+ var LC_TOKEN = '{{ lcToken|e }}';
9
+ var STORE_TOKEN = '{{ storeToken|e }}';
10
+ var SITE_URL = '{{ siteUrl|e }}';
11
+ var USER_EMAIL = '{{ userEmail|e }}';
12
+ var WP_VER = '{{ wpVer|e }}';
13
+ var MODULE_VER = '{{ moduleVer|e }}';
14
+ (function () {
15
+ var interval = setInterval(function () {
16
+ if (window.AppBridge === undefined) {
17
+ return;
18
+ }
19
+ clearInterval(interval);
20
+
21
+ function userSignedInHandler(userToken, storeToken) {
22
+ jQuery.ajax({
23
+ url: ajaxurl, //ajaxurl is WP global variable
24
+ type: 'POST',
25
+ data: {
26
+ action: 'lc_connect',
27
+ user_token: userToken,
28
+ store_token: storeToken,
29
+ security: ajax_nonce.value
30
+ }
31
+ });
32
+ }
33
+
34
+ var eventsRegister = new AppBridge.EventsRegister();
35
+ eventsRegister.register(AppBridge.UserSignedInEvent, data => userSignedInHandler(data.userToken, data.storeToken));
36
+
37
+ AppBridge.AppBridgeParent.init('wordpress', eventsRegister, document.getElementById('lc-container'), '{{ appUrl }}').then(bridge => {
38
+ document.getElementsByTagName('iframe')[0].classList.add('lc-iframe');
39
+ if (LC_TOKEN) {
40
+ return bridge.call(new AppBridge.SignInCommand(LC_TOKEN, bridge.platform, WP_VER, MODULE_VER));
41
+ }
42
+
43
+ if (STORE_TOKEN) {
44
+ return bridge.call(new AppBridge.JoinCommand(STORE_TOKEN, USER_EMAIL, bridge.platform, WP_VER, MODULE_VER));
45
+ }
46
+
47
+ return bridge.call(new AppBridge.ConnectCommand(SITE_URL, USER_EMAIL, bridge.platform, WP_VER, MODULE_VER));
48
+ });
49
+ }, 100);
50
+ })();
51
+ </script>
52
+ {% endblock %}
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === LiveChat - WP live chat plugin for WordPress ===
2
  Contributors: LiveChat
3
  Tags: live chat, chat plugin, live chat plugin, wordpress live chat, live support, wordpress chat, chat
4
- Stable tag: 3.8.2
5
  Requires PHP: 5.6
6
- Tested up to: 5.2.2
7
- Requires at least: 3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -382,12 +382,7 @@ For more detailed instructions, go to the [live chat plugin page](https://www.li
382
 
383
  == Changelog ==
384
 
385
- = 3.8.2 =
386
- * plugin usage tracking enhancements
387
-
388
- = 3.8.1 =
389
- * more secure way of displaying deactivation feedback modal
390
-
391
- = 3.8.0 =
392
- * plugin redesign
393
- * deactivation feedback modal
1
  === LiveChat - WP live chat plugin for WordPress ===
2
  Contributors: LiveChat
3
  Tags: live chat, chat plugin, live chat plugin, wordpress live chat, live support, wordpress chat, chat
4
+ Stable tag: 4.0.0
5
  Requires PHP: 5.6
6
+ Tested up to: 5.3.0
7
+ Requires at least: 4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
382
 
383
  == Changelog ==
384
 
385
+ = 4.0.0. =
386
+ * revised in-admin signup/login page view
387
+ * introducing a new way of creating accounts in LiveChat
388
+ * added the possibility of creating or logging into a LiveChat account to all users in WordPress
 
 
 
 
 
vendor/altorouter/altorouter/.travis.yml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ language: php
2
+ php:
3
+ - 5.3
4
+ - 5.4
5
+ - 5.5
6
+
7
+ script: phpunit --coverage-text ./
vendor/altorouter/altorouter/AltoRouter.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class AltoRouter {
4
+
5
+ protected $routes = array();
6
+ protected $namedRoutes = array();
7
+ protected $basePath = '';
8
+ protected $matchTypes = array(
9
+ 'i' => '[0-9]++',
10
+ 'a' => '[0-9A-Za-z]++',
11
+ 'h' => '[0-9A-Fa-f]++',
12
+ '*' => '.+?',
13
+ '**' => '.++',
14
+ '' => '[^/\.]++'
15
+ );
16
+
17
+ /**
18
+ * Create router in one call from config.
19
+ *
20
+ * @param array $routes
21
+ * @param string $basePath
22
+ * @param array $matchTypes
23
+ */
24
+ public function __construct( $routes = array(), $basePath = '', $matchTypes = array() ) {
25
+ $this->addRoutes($routes);
26
+ $this->setBasePath($basePath);
27
+ $this->addMatchTypes($matchTypes);
28
+ }
29
+
30
+ /**
31
+ * Add multiple routes at once from array in the following format:
32
+ *
33
+ * $routes = array(
34
+ * array($method, $route, $target, $name)
35
+ * );
36
+ *
37
+ * @param array $routes
38
+ * @return void
39
+ * @author Koen Punt
40
+ */
41
+ public function addRoutes($routes){
42
+ if(!is_array($routes) && !$routes instanceof Traversable) {
43
+ throw new \Exception('Routes should be an array or an instance of Traversable');
44
+ }
45
+ foreach($routes as $route) {
46
+ call_user_func_array(array($this, 'map'), $route);
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Set the base path.
52
+ * Useful if you are running your application from a subdirectory.
53
+ */
54
+ public function setBasePath($basePath) {
55
+ $this->basePath = $basePath;
56
+ }
57
+
58
+ /**
59
+ * Add named match types. It uses array_merge so keys can be overwritten.
60
+ *
61
+ * @param array $matchTypes The key is the name and the value is the regex.
62
+ */
63
+ public function addMatchTypes($matchTypes) {
64
+ $this->matchTypes = array_merge($this->matchTypes, $matchTypes);
65
+ }
66
+
67
+ /**
68
+ * Map a route to a target
69
+ *
70
+ * @param string $method One of 4 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PUT|DELETE)
71
+ * @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id]
72
+ * @param mixed $target The target where this route should point to. Can be anything.
73
+ * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
74
+ */
75
+ public function map($method, $route, $target, $name = null) {
76
+
77
+ $this->routes[] = array($method, $route, $target, $name);
78
+
79
+ if($name) {
80
+ if(isset($this->namedRoutes[$name])) {
81
+ throw new \Exception("Can not redeclare route '{$name}'");
82
+ } else {
83
+ $this->namedRoutes[$name] = $route;
84
+ }
85
+
86
+ }
87
+
88
+ return;
89
+ }
90
+
91
+ /**
92
+ * Reversed routing
93
+ *
94
+ * Generate the URL for a named route. Replace regexes with supplied parameters
95
+ *
96
+ * @param string $routeName The name of the route.
97
+ * @param array @params Associative array of parameters to replace placeholders with.
98
+ * @return string The URL of the route with named parameters in place.
99
+ */
100
+ public function generate($routeName, array $params = array()) {
101
+
102
+ // Check if named route exists
103
+ if(!isset($this->namedRoutes[$routeName])) {
104
+ throw new \Exception("Route '{$routeName}' does not exist.");
105
+ }
106
+
107
+ // Replace named parameters
108
+ $route = $this->namedRoutes[$routeName];
109
+
110
+ // prepend base path to route url again
111
+ $url = $this->basePath . $route;
112
+
113
+ if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
114
+
115
+ foreach($matches as $match) {
116
+ list($block, $pre, $type, $param, $optional) = $match;
117
+
118
+ if ($pre) {
119
+ $block = substr($block, 1);
120
+ }
121
+
122
+ if(isset($params[$param])) {
123
+ $url = str_replace($block, $params[$param], $url);
124
+ } elseif ($optional) {
125
+ $url = str_replace($pre . $block, '', $url);
126
+ }
127
+ }
128
+
129
+
130
+ }
131
+
132
+ return $url;
133
+ }
134
+
135
+ /**
136
+ * Match a given Request Url against stored routes
137
+ * @param string $requestUrl
138
+ * @param string $requestMethod
139
+ * @return array|boolean Array with route information on success, false on failure (no match).
140
+ */
141
+ public function match($requestUrl = null, $requestMethod = null) {
142
+
143
+ $params = array();
144
+ $match = false;
145
+
146
+ // set Request Url if it isn't passed as parameter
147
+ if($requestUrl === null) {
148
+ $requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
149
+ }
150
+
151
+ // strip base path from request url
152
+ $requestUrl = substr($requestUrl, strlen($this->basePath));
153
+
154
+ // Strip query string (?a=b) from Request Url
155
+ if (($strpos = strpos($requestUrl, '?')) !== false) {
156
+ $requestUrl = substr($requestUrl, 0, $strpos);
157
+ }
158
+
159
+ // set Request Method if it isn't passed as a parameter
160
+ if($requestMethod === null) {
161
+ $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
162
+ }
163
+
164
+ // Force request_order to be GP
165
+ // http://www.mail-archive.com/internals@lists.php.net/msg33119.html
166
+ $_REQUEST = array_merge($_GET, $_POST);
167
+
168
+ foreach($this->routes as $handler) {
169
+ list($method, $_route, $target, $name) = $handler;
170
+
171
+ $methods = explode('|', $method);
172
+ $method_match = false;
173
+
174
+ // Check if request method matches. If not, abandon early. (CHEAP)
175
+ foreach($methods as $method) {
176
+ if (strcasecmp($requestMethod, $method) === 0) {
177
+ $method_match = true;
178
+ break;
179
+ }
180
+ }
181
+
182
+ // Method did not match, continue to next route.
183
+ if(!$method_match) continue;
184
+
185
+ // Check for a wildcard (matches all)
186
+ if ($_route === '*') {
187
+ $match = true;
188
+ } elseif (isset($_route[0]) && $_route[0] === '@') {
189
+ $match = preg_match('`' . substr($_route, 1) . '`u', $requestUrl, $params);
190
+ } else {
191
+ $route = null;
192
+ $regex = false;
193
+ $j = 0;
194
+ $n = isset($_route[0]) ? $_route[0] : null;
195
+ $i = 0;
196
+
197
+ // Find the longest non-regex substring and match it against the URI
198
+ while (true) {
199
+ if (!isset($_route[$i])) {
200
+ break;
201
+ } elseif (false === $regex) {
202
+ $c = $n;
203
+ $regex = $c === '[' || $c === '(' || $c === '.';
204
+ if (false === $regex && false !== isset($_route[$i+1])) {
205
+ $n = $_route[$i + 1];
206
+ $regex = $n === '?' || $n === '+' || $n === '*' || $n === '{';
207
+ }
208
+ if (false === $regex && $c !== '/' && (!isset($requestUrl[$j]) || $c !== $requestUrl[$j])) {
209
+ continue 2;
210
+ }
211
+ $j++;
212
+ }
213
+ $route .= $_route[$i++];
214
+ }
215
+
216
+ $regex = $this->compileRoute($route);
217
+ $match = preg_match($regex, $requestUrl, $params);
218
+ }
219
+
220
+ if(($match == true || $match > 0)) {
221
+
222
+ if($params) {
223
+ foreach($params as $key => $value) {
224
+ if(is_numeric($key)) unset($params[$key]);
225
+ }
226
+ }
227
+
228
+ return array(
229
+ 'target' => $target,
230
+ 'params' => $params,
231
+ 'name' => $name
232
+ );
233
+ }
234
+ }
235
+ return false;
236
+ }
237
+
238
+ /**
239
+ * Compile the regex for a given route (EXPENSIVE)
240
+ */
241
+ private function compileRoute($route) {
242
+ if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
243
+
244
+ $matchTypes = $this->matchTypes;
245
+ foreach($matches as $match) {
246
+ list($block, $pre, $type, $param, $optional) = $match;
247
+
248
+ if (isset($matchTypes[$type])) {
249
+ $type = $matchTypes[$type];
250
+ }
251
+ if ($pre === '.') {
252
+ $pre = '\.';
253
+ }
254
+
255
+ //Older versions of PCRE require the 'P' in (?P<named>)
256
+ $pattern = '(?:'
257
+ . ($pre !== '' ? $pre : null)
258
+ . '('
259
+ . ($param !== '' ? "?P<$param>" : null)
260
+ . $type
261
+ . '))'
262
+ . ($optional !== '' ? '?' : null);
263
+
264
+ $route = str_replace($block, $pattern, $route);
265
+ }
266
+
267
+ }
268
+ return "`^$route$`u";
269
+ }
270
+ }
vendor/altorouter/altorouter/AltoRouterTest.php ADDED
@@ -0,0 +1,423 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require 'AltoRouter.php';
4
+
5
+ class AltoRouterDebug extends AltoRouter{
6
+
7
+ public function getNamedRoutes(){
8
+ return $this->namedRoutes;
9
+ }
10
+
11
+ public function getRoutes(){
12
+ return $this->routes;
13
+ }
14
+
15
+ public function getBasePath(){
16
+ return $this->basePath;
17
+ }
18
+
19
+ }
20
+
21
+ class SimpleTraversable implements Iterator{
22
+
23
+ protected $_position = 0;
24
+
25
+ protected $_data = array(
26
+ array('GET', '/foo', 'foo_action', null),
27
+ array('POST', '/bar', 'bar_action', 'second_route')
28
+ );
29
+
30
+ public function current(){
31
+ return $this->_data[$this->_position];
32
+ }
33
+ public function key(){
34
+ return $this->_position;
35
+ }
36
+ public function next(){
37
+ ++$this->_position;
38
+ }
39
+ public function rewind(){
40
+ $this->_position = 0;
41
+ }
42
+ public function valid(){
43
+ return isset($this->_data[$this->_position]);
44
+ }
45
+
46
+ }
47
+
48
+ /**
49
+ * Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2013-07-14 at 17:47:46.
50
+ */
51
+ class AltoRouterTest extends PHPUnit_Framework_TestCase
52
+ {
53
+ /**
54
+ * @var AltoRouter
55
+ */
56
+ protected $router;
57
+
58
+ /**
59
+ * Sets up the fixture, for example, opens a network connection.
60
+ * This method is called before a test is executed.
61
+ */
62
+ protected function setUp()
63
+ {
64
+ $this->router = new AltoRouterDebug;
65
+ }
66
+
67
+ /**
68
+ * Tears down the fixture, for example, closes a network connection.
69
+ * This method is called after a test is executed.
70
+ */
71
+ protected function tearDown()
72
+ {
73
+ }
74
+
75
+ /**
76
+ * @covers AltoRouter::addRoutes
77
+ */
78
+ public function testAddRoutes()
79
+ {
80
+ $method = 'POST';
81
+ $route = '/[:controller]/[:action]';
82
+ $target = function(){};
83
+
84
+ $this->router->addRoutes(array(
85
+ array($method, $route, $target),
86
+ array($method, $route, $target, 'second_route')
87
+ ));
88
+
89
+ $routes = $this->router->getRoutes();
90
+
91
+ $this->assertEquals(array($method, $route, $target, null), $routes[0]);
92
+ $this->assertEquals(array($method, $route, $target, 'second_route'), $routes[1]);
93
+ }
94
+
95
+ /**
96
+ * @covers AltoRouter::addRoutes
97
+ */
98
+ public function testAddRoutesAcceptsTraverable()
99
+ {
100
+ $traversable = new SimpleTraversable();
101
+ $this->router->addRoutes($traversable);
102
+
103
+ $traversable->rewind();
104
+
105
+ $first = $traversable->current();
106
+ $traversable->next();
107
+ $second = $traversable->current();
108
+
109
+ $routes = $this->router->getRoutes();
110
+
111
+ $this->assertEquals($first, $routes[0]);
112
+ $this->assertEquals($second, $routes[1]);
113
+ }
114
+
115
+ /**
116
+ * @covers AltoRouter::addRoutes
117
+ * @expectedException Exception
118
+ */
119
+ public function testAddRoutesThrowsExceptionOnInvalidArgument()
120
+ {
121
+ $this->router->addRoutes(new stdClass);
122
+ }
123
+
124
+ /**
125
+ * @covers AltoRouter::setBasePath
126
+ */
127
+ public function testSetBasePath()
128
+ {
129
+ $basePath = $this->router->setBasePath('/some/path');
130
+ $this->assertEquals('/some/path', $this->router->getBasePath());
131
+
132
+ $basePath = $this->router->setBasePath('/some/path');
133
+ $this->assertEquals('/some/path', $this->router->getBasePath());
134
+ }
135
+
136
+ /**
137
+ * @covers AltoRouter::map
138
+ */
139
+ public function testMap()
140
+ {
141
+ $method = 'POST';
142
+ $route = '/[:controller]/[:action]';
143
+ $target = function(){};
144
+
145
+ $this->router->map($method, $route, $target);
146
+
147
+ $routes = $this->router->getRoutes();
148
+
149
+ $this->assertEquals(array($method, $route, $target, null), $routes[0]);
150
+ }
151
+
152
+ /**
153
+ * @covers AltoRouter::map
154
+ */
155
+ public function testMapWithName()
156
+ {
157
+ $method = 'POST';
158
+ $route = '/[:controller]/[:action]';
159
+ $target = function(){};
160
+ $name = 'myroute';
161
+
162
+ $this->router->map($method, $route, $target, $name);
163
+
164
+ $routes = $this->router->getRoutes();
165
+ $this->assertEquals(array($method, $route, $target, $name), $routes[0]);
166
+
167
+ $named_routes = $this->router->getNamedRoutes();
168
+ $this->assertEquals($route, $named_routes[$name]);
169
+
170
+ try{
171
+ $this->router->map($method, $route, $target, $name);
172
+ $this->fail('Should not be able to add existing named route');
173
+ }catch(Exception $e){
174
+ $this->assertEquals("Can not redeclare route '{$name}'", $e->getMessage());
175
+ }
176
+ }
177
+
178
+
179
+ /**
180
+ * @covers AltoRouter::generate
181
+ */
182
+ public function testGenerate()
183
+ {
184
+ $params = array(
185
+ 'controller' => 'test',
186
+ 'action' => 'someaction'
187
+ );
188
+
189
+ $this->router->map('GET', '/[:controller]/[:action]', function(){}, 'foo_route');
190
+
191
+ $this->assertEquals('/test/someaction',
192
+ $this->router->generate('foo_route', $params));
193
+
194
+ $params = array(
195
+ 'controller' => 'test',
196
+ 'action' => 'someaction',
197
+ 'type' => 'json'
198
+ );
199
+
200
+ $this->assertEquals('/test/someaction',
201
+ $this->router->generate('foo_route', $params));
202
+
203
+ }
204
+
205
+ public function testGenerateWithOptionalUrlParts()
206
+ {
207
+ $this->router->map('GET', '/[:controller]/[:action].[:type]?', function(){}, 'bar_route');
208
+
209
+ $params = array(
210
+ 'controller' => 'test',
211
+ 'action' => 'someaction'
212
+ );
213
+
214
+ $this->assertEquals('/test/someaction',
215
+ $this->router->generate('bar_route', $params));
216
+
217
+ $params = array(
218
+ 'controller' => 'test',
219
+ 'action' => 'someaction',
220
+ 'type' => 'json'
221
+ );
222
+
223
+ $this->assertEquals('/test/someaction.json',
224
+ $this->router->generate('bar_route', $params));
225
+ }
226
+
227
+ public function testGenerateWithNonexistingRoute()
228
+ {
229
+ try{
230
+ $this->router->generate('nonexisting_route');
231
+ $this->fail('Should trigger an exception on nonexisting named route');
232
+ }catch(Exception $e){
233
+ $this->assertEquals("Route 'nonexisting_route' does not exist.", $e->getMessage());
234
+ }
235
+ }
236
+
237
+ /**
238
+ * @covers AltoRouter::match
239
+ * @covers AltoRouter::compileRoute
240
+ */
241
+ public function testMatch()
242
+ {
243
+ $this->router->map('GET', '/foo/[:controller]/[:action]', 'foo_action', 'foo_route');
244
+
245
+ $this->assertEquals(array(
246
+ 'target' => 'foo_action',
247
+ 'params' => array(
248
+ 'controller' => 'test',
249
+ 'action' => 'do'
250
+ ),
251
+ 'name' => 'foo_route'
252
+ ), $this->router->match('/foo/test/do', 'GET'));
253
+
254
+ $this->assertFalse($this->router->match('/foo/test/do', 'POST'));
255
+
256
+ $this->assertEquals(array(
257
+ 'target' => 'foo_action',
258
+ 'params' => array(
259
+ 'controller' => 'test',
260
+ 'action' => 'do'
261
+ ),
262
+ 'name' => 'foo_route'
263
+ ), $this->router->match('/foo/test/do?param=value', 'GET'));
264
+
265
+ }
266
+
267
+ public function testMatchWithFixedParamValues()
268
+ {
269
+ $this->router->map('POST','/users/[i:id]/[delete|update:action]', 'usersController#doAction', 'users_do');
270
+
271
+ $this->assertEquals(array(
272
+ 'target' => 'usersController#doAction',
273
+ 'params' => array(
274
+ 'id' => 1,
275
+ 'action' => 'delete'
276
+ ),
277
+ 'name' => 'users_do'
278
+ ), $this->router->match('/users/1/delete', 'POST'));
279
+
280
+ $this->assertFalse($this->router->match('/users/1/delete', 'GET'));
281
+ $this->assertFalse($this->router->match('/users/abc/delete', 'POST'));
282
+ $this->assertFalse($this->router->match('/users/1/create', 'GET'));
283
+ }
284
+
285
+ public function testMatchWithServerVars()
286
+ {
287
+ $this->router->map('GET', '/foo/[:controller]/[:action]', 'foo_action', 'foo_route');
288
+
289
+ $_SERVER['REQUEST_URI'] = '/foo/test/do';
290
+ $_SERVER['REQUEST_METHOD'] = 'GET';
291
+
292
+ $this->assertEquals(array(
293
+ 'target' => 'foo_action',
294
+ 'params' => array(
295
+ 'controller' => 'test',
296
+ 'action' => 'do'
297
+ ),
298
+ 'name' => 'foo_route'
299
+ ), $this->router->match());
300
+ }
301
+
302
+ public function testMatchWithOptionalUrlParts()
303
+ {
304
+ $this->router->map('GET', '/bar/[:controller]/[:action].[:type]?', 'bar_action', 'bar_route');
305
+
306
+ $this->assertEquals(array(
307
+ 'target' => 'bar_action',
308
+ 'params' => array(
309
+ 'controller' => 'test',
310
+ 'action' => 'do',
311
+ 'type' => 'json'
312
+ ),
313
+ 'name' => 'bar_route'
314
+ ), $this->router->match('/bar/test/do.json', 'GET'));
315
+
316
+ }
317
+
318
+ public function testMatchWithWildcard()
319
+ {
320
+ $this->router->map('GET', '/a', 'foo_action', 'foo_route');
321
+ $this->router->map('GET', '*', 'bar_action', 'bar_route');
322
+
323
+ $this->assertEquals(array(
324
+ 'target' => 'bar_action',
325
+ 'params' => array(),
326
+ 'name' => 'bar_route'
327
+ ), $this->router->match('/everything', 'GET'));
328
+
329
+ }
330
+
331
+ public function testMatchWithCustomRegexp()
332
+ {
333
+ $this->router->map('GET', '@^/[a-z]*$', 'bar_action', 'bar_route');
334
+
335
+ $this->assertEquals(array(
336
+ 'target' => 'bar_action',
337
+ 'params' => array(),
338
+ 'name' => 'bar_route'
339
+ ), $this->router->match('/everything', 'GET'));
340
+
341
+ $this->assertFalse($this->router->match('/some-other-thing', 'GET'));
342
+
343
+ }
344
+
345
+ public function testMatchWithUnicodeRegex()
346
+ {
347
+ $pattern = '/(?<path>[^';
348
+ // Arabic characters
349
+ $pattern .= '\x{0600}-\x{06FF}';
350
+ $pattern .= '\x{FB50}-\x{FDFD}';
351
+ $pattern .= '\x{FE70}-\x{FEFF}';
352
+ $pattern .= '\x{0750}-\x{077F}';
353
+ // Alphanumeric, /, _, - and space characters
354
+ $pattern .= 'a-zA-Z0-9\/_-\s';
355
+ // 'ZERO WIDTH NON-JOINER'
356
+ $pattern .= '\x{200C}';
357
+ $pattern .= ']+)';
358
+
359
+ $this->router->map('GET', '@' . $pattern, 'unicode_action', 'unicode_route');
360
+
361
+ $this->assertEquals(array(
362
+ 'target' => 'unicode_action',
363
+ 'name' => 'unicode_route',
364
+ 'params' => array(
365
+ 'path' => '大家好'
366
+ )
367
+ ), $this->router->match('/大家好', 'GET'));
368
+
369
+ $this->assertFalse($this->router->match('/﷽‎', 'GET'));
370
+ }
371
+
372
+ /**
373
+ * @covers AltoRouter::addMatchTypes
374
+ */
375
+ public function testMatchWithCustomNamedRegex()
376
+ {
377
+ $this->router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?'));
378
+ $this->router->map('GET', '/bar/[cId:customId]', 'bar_action', 'bar_route');
379
+
380
+ $this->assertEquals(array(
381
+ 'target' => 'bar_action',
382
+ 'params' => array(
383
+ 'customId' => 'AB1',
384
+ ),
385
+ 'name' => 'bar_route'
386
+ ), $this->router->match('/bar/AB1', 'GET'));
387
+
388
+ $this->assertEquals(array(
389
+ 'target' => 'bar_action',
390
+ 'params' => array(
391
+ 'customId' => 'AB1_0123456789',
392
+ ),
393
+ 'name' => 'bar_route'
394
+ ), $this->router->match('/bar/AB1_0123456789', 'GET'));
395
+
396
+ $this->assertFalse($this->router->match('/some-other-thing', 'GET'));
397
+
398
+ }
399
+
400
+ public function testMatchWithCustomNamedUnicodeRegex()
401
+ {
402
+ $pattern = '[^';
403
+ // Arabic characters
404
+ $pattern .= '\x{0600}-\x{06FF}';
405
+ $pattern .= '\x{FB50}-\x{FDFD}';
406
+ $pattern .= '\x{FE70}-\x{FEFF}';
407
+ $pattern .= '\x{0750}-\x{077F}';
408
+ $pattern .= ']+';
409
+
410
+ $this->router->addMatchTypes(array('nonArabic' => $pattern));
411
+ $this->router->map('GET', '/bar/[nonArabic:string]', 'non_arabic_action', 'non_arabic_route');
412
+
413
+ $this->assertEquals(array(
414
+ 'target' => 'non_arabic_action',
415
+ 'name' => 'non_arabic_route',
416
+ 'params' => array(
417
+ 'string' => 'some-path'
418
+ )
419
+ ), $this->router->match('/bar/some-path', 'GET'));
420
+
421
+ $this->assertFalse($this->router->match('/﷽‎', 'GET'));
422
+ }
423
+ }
vendor/altorouter/altorouter/README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AltoRouter [![Build Status](https://api.travis-ci.org/dannyvankooten/AltoRouter.png)](http://travis-ci.org/dannyvankooten/AltoRouter)
2
+ AltoRouter is a small but powerful routing class for PHP 5.3+, heavily inspired by [klein.php](https://github.com/chriso/klein.php/).
3
+
4
+ * Dynamic routing with named parameters
5
+ * Reversed routing
6
+ * Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com/))
7
+ * Custom regexes
8
+
9
+ ## Getting started
10
+
11
+ 1. PHP 5.3.x is required
12
+ 2. Install AltoRouter using Composer or manually
13
+ 2. Setup URL rewriting so that all requests are handled by **index.php**
14
+ 3. Create an instance of AltoRouter, map your routes and match a request.
15
+ 4. Have a look at the basic example in the `examples` directory for a better understanding on how to use AltoRouter.
16
+
17
+ ## Routing
18
+ ```php
19
+ $router = new AltoRouter();
20
+ $router->setBasePath('/AltoRouter'); // (optional) the subdir AltoRouter lives in
21
+
22
+ // mapping routes
23
+ $router->map('GET|POST','/', 'home#index', 'home');
24
+ $router->map('GET','/users', array('c' => 'UserController', 'a' => 'ListAction'));
25
+ $router->map('GET','/users/[i:id]', 'users#show', 'users_show');
26
+ $router->map('POST','/users/[i:id]/[delete|update:action]', 'usersController#doAction', 'users_do');
27
+
28
+ // reversed routing
29
+ $router->generate('users_show', array('id' => 5));
30
+
31
+ ```
32
+
33
+ **You can use the following limits on your named parameters. AltoRouter will create the correct regexes for you.**
34
+
35
+ ```php
36
+ * // Match all request URIs
37
+ [i] // Match an integer
38
+ [i:id] // Match an integer as 'id'
39
+ [a:action] // Match alphanumeric characters as 'action'
40
+ [h:key] // Match hexadecimal characters as 'key'
41
+ [:action] // Match anything up to the next / or end of the URI as 'action'
42
+ [create|edit:action] // Match either 'create' or 'edit' as 'action'
43
+ [*] // Catch all (lazy, stops at the next trailing slash)
44
+ [*:trailing] // Catch all as 'trailing' (lazy)
45
+ [**:trailing] // Catch all (possessive - will match the rest of the URI)
46
+ .[:format]? // Match an optional parameter 'format' - a / or . before the block is also optional
47
+ ```
48
+
49
+ **Some more complicated examples**
50
+
51
+ ```php
52
+ @/(?[A-Za-z]{2}_[A-Za-z]{2})$ // custom regex, matches language codes like "en_us" etc.
53
+ /posts/[*:title][i:id] // Matches "/posts/this-is-a-title-123"
54
+ /output.[xml|json:format]? // Matches "/output", "output.xml", "output.json"
55
+ /[:controller]?/[:action]? // Matches the typical /controller/action format
56
+ ```
57
+
58
+ **The character before the colon (the 'match type') is a shortcut for one of the following regular expressions**
59
+
60
+ ```php
61
+ 'i' => '[0-9]++'
62
+ 'a' => '[0-9A-Za-z]++'
63
+ 'h' => '[0-9A-Fa-f]++'
64
+ '*' => '.+?'
65
+ '**' => '.++'
66
+ '' => '[^/\.]++'
67
+ ```
68
+
69
+ **New match types can be added using the `addMatchTypes()` method**
70
+
71
+ ```php
72
+ $router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?'));
73
+ ```
74
+
75
+
76
+ ## Contributors
77
+ - [Danny van Kooten](https://github.com/dannyvankooten)
78
+ - [Koen Punt](https://github.com/koenpunt)
79
+ - [John Long](https://github.com/adduc)
80
+ - [Niahoo Osef](https://github.com/niahoo)
81
+
82
+ ## License
83
+
84
+ (MIT License)
85
+
86
+ Copyright (c) 2012-2013 Danny van Kooten <hi@dannyvankooten.com>
87
+
88
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
89
+
90
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
91
+
92
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
vendor/altorouter/altorouter/composer.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "altorouter/altorouter",
3
+ "description": "A lightning fast router for PHP",
4
+ "keywords": ["router", "routing", "lightweight"],
5
+ "homepage": "https://github.com/dannyvankooten/AltoRouter",
6
+ "license": "MIT",
7
+ "authors": [
8
+ {
9
+ "name": "Danny van Kooten",
10
+ "email": "dannyvankooten@gmail.com",
11
+ "homepage": "http://dannyvankooten.com/"
12
+ },
13
+ {
14
+ "name": "Koen Punt",
15
+ "homepage": "https://github.com/koenpunt"
16
+ },
17
+ {
18
+ "name": "niahoo",
19
+ "homepage": "https://github.com/niahoo"
20
+ }
21
+ ],
22
+ "require": {
23
+ "php": ">=5.3.0"
24
+ },
25
+ "autoload": {
26
+ "classmap": ["AltoRouter.php"]
27
+ }
28
+ }
vendor/altorouter/altorouter/examples/basic/.htaccess ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ RewriteEngine On
2
+ RewriteCond %{REQUEST_FILENAME} !-f
3
+ RewriteRule . index.php [L]
vendor/altorouter/altorouter/examples/basic/index.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require '../../AltoRouter.php';
4
+
5
+ $router = new AltoRouter();
6
+ $router->setBasePath('/AltoRouter/examples/basic');
7
+ $router->map('GET|POST','/', 'home#index', 'home');
8
+ $router->map('GET','/users/', array('c' => 'UserController', 'a' => 'ListAction'));
9
+ $router->map('GET','/users/[i:id]', 'users#show', 'users_show');
10
+ $router->map('POST','/users/[i:id]/[delete|update:action]', 'usersController#doAction', 'users_do');
11
+
12
+ // match current request
13
+ $match = $router->match();
14
+ ?>
15
+ <h1>AltoRouter</h1>
16
+
17
+ <h3>Current request: </h3>
18
+ <pre>
19
+ Target: <?php var_dump($match['target']); ?>
20
+ Params: <?php var_dump($match['params']); ?>
21
+ Name: <?php var_dump($match['name']); ?>
22
+ </pre>
23
+
24
+ <h3>Try these requests: </h3>
25
+ <p><a href="<?php echo $router->generate('home'); ?>">GET <?php echo $router->generate('home'); ?></a></p>
26
+ <p><a href="<?php echo $router->generate('users_show', array('id' => 5)); ?>">GET <?php echo $router->generate('users_show', array('id' => 5)); ?></a></p>
27
+ <p><form action="<?php echo $router->generate('users_do', array('id' => 10, 'action' => 'update')); ?>" method="post"><button type="submit"><?php echo $router->generate('users_do', array('id' => 10, 'action' => 'update')); ?></button></form></p>
vendor/asm89/twig-cache-extension/.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ phpunit.xml
2
+ composer.lock
3
+ composer.phar
4
+ /vendor/
vendor/asm89/twig-cache-extension/.travis.yml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ language: php
2
+
3
+ cache:
4
+ directories:
5
+ - vendor
6
+ - $HOME/.composer/cache
7
+
8
+ env:
9
+ - TWIG_VERSION="^1.0"
10
+ - TWIG_VERSION="^2.0"
11
+
12
+ php:
13
+ - 5.3
14
+ - 5.4
15
+ - 5.5
16
+ - 5.6
17
+ - 7.0
18
+ - 7.1
19
+ - hhvm
20
+
21
+ matrix:
22
+ exclude:
23
+ - php: 5.3
24
+ env: TWIG_VERSION="^2.0"
25
+ - php: 5.4
26
+ env: TWIG_VERSION="^2.0"
27
+ - php: 5.5
28
+ env: TWIG_VERSION="^2.0"
29
+ - php: 5.6
30
+ env: TWIG_VERSION="^2.0"
31
+ - php: hhvm
32
+ env: TWIG_VERSION="^2.0"
33
+
34
+ install: composer require twig/twig:${TWIG_VERSION}
35
+
36
+ script: phpunit
vendor/asm89/twig-cache-extension/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2013 Alexander <iam.asm89@gmail.com>
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/asm89/twig-cache-extension/README.md ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Twig cache extension
2
+ ====================
3
+
4
+ The missing cache extension for Twig. The extension allows for caching rendered parts of
5
+ templates using several cache strategies.
6
+
7
+ [![Build Status](https://secure.travis-ci.org/asm89/twig-cache-extension.png?branch=master)](http://travis-ci.org/asm89/twig-cache-extension)
8
+
9
+ ## Installation
10
+
11
+ The extension is installable via composer:
12
+
13
+ ```json
14
+ {
15
+ "require": {
16
+ "asm89/twig-cache-extension": "~1.0"
17
+ }
18
+ }
19
+ ```
20
+
21
+ ## Quick start
22
+
23
+ ### Setup
24
+
25
+ A minimal setup for adding the extension with the `LifeTimeCacheStrategy` and
26
+ doctrine array cache is as following:
27
+
28
+ ```php
29
+ <?php
30
+
31
+ use Doctrine\Common\Cache\ArrayCache;
32
+ use Asm89\Twig\CacheExtension\CacheProvider\DoctrineCacheAdapter;
33
+ use Asm89\Twig\CacheExtension\CacheStrategy\LifetimeCacheStrategy;
34
+ use Asm89\Twig\CacheExtension\Extension as CacheExtension;
35
+
36
+ $cacheProvider = new DoctrineCacheAdapter(new ArrayCache());
37
+ $cacheStrategy = new LifetimeCacheStrategy($cacheProvider);
38
+ $cacheExtension = new CacheExtension($cacheStrategy);
39
+
40
+ $twig->addExtension($cacheExtension);
41
+ ```
42
+
43
+ ### Want to use a PSR-6 cache pool?
44
+
45
+ Instead of using the default `DoctrineCacheAdapter` the extension also has
46
+ a `PSR-6` compatible adapter. You need to instantiate one of the cache pool
47
+ implementations as can be found on: http://php-cache.readthedocs.io/en/latest/
48
+
49
+ Example: Making use of the `ApcuCachePool` via the `PsrCacheAdapter`:
50
+
51
+ ```bash
52
+ composer require cache/apcu-adapter
53
+ ```
54
+
55
+ ```php
56
+ <?php
57
+
58
+ use Asm89\Twig\CacheExtension\CacheProvider\PsrCacheAdapter;
59
+ use Asm89\Twig\CacheExtension\CacheStrategy\LifetimeCacheStrategy;
60
+ use Asm89\Twig\CacheExtension\Extension as CacheExtension;
61
+ use Cache\Adapter\Apcu\ApcuCachePool;
62
+
63
+ $cacheProvider = new PsrCacheAdapter(new ApcuCachePool());
64
+ $cacheStrategy = new LifetimeCacheStrategy($cacheProvider);
65
+ $cacheExtension = new CacheExtension($cacheStrategy);
66
+
67
+ $twig->addExtension($cacheExtension);
68
+ ```
69
+
70
+ ### Usage
71
+
72
+ To cache a part of a template in Twig surround the code with a `cache` block.
73
+ The cache block takes two parameters, first an "annotation" part, second the
74
+ "value" the cache strategy can work with. Example:
75
+
76
+ ```jinja
77
+ {% cache 'v1/summary' 900 %}
78
+ {# heavy lifting template stuff here, include/render other partials etc #}
79
+ {% endcache %}
80
+ ```
81
+
82
+ Cache blocks can be nested:
83
+
84
+ ```jinja
85
+ {% cache 'v1' 900 %}
86
+ {% for item in items %}
87
+ {% cache 'v1' item %}
88
+ {# ... #}
89
+ {% endcache %}
90
+ {% endfor %}
91
+ {% endcache %}
92
+ ```
93
+
94
+ The annotation can also be an expression:
95
+
96
+ ```jinja
97
+ {% set version = 42 %}
98
+ {% cache 'hello_v' ~ version 900 %}
99
+ Hello {{ name }}!
100
+ {% endcache %}
101
+ ```
102
+
103
+ ## Cache strategies
104
+
105
+ The extension ships with a few cache strategies out of the box. Setup and usage
106
+ of all of them is described below.
107
+
108
+ ### Lifetime
109
+
110
+ See the ["Quick start"](#quick-start) for usage information of the `LifetimeCacheStrategy`.
111
+
112
+ ### Generational
113
+
114
+ Strategy for generational caching.
115
+
116
+ In theory the strategy only saves fragments to the cache with infinite
117
+ lifetime. The key of the strategy lies in the fact that the keys for blocks
118
+ will change as the value for which the key is generated changes.
119
+
120
+ For example: entities containing a last update time, would include a timestamp
121
+ in the key. For an interesting blog post about this type of caching see:
122
+ http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works
123
+
124
+ ### Blackhole
125
+
126
+ Strategy for development mode.
127
+
128
+ In development mode it often not very useful to cache fragments. The blackhole
129
+ strategy provides an easy way to not cache anything it all. It always generates
130
+ a new key and does not fetch or save any fragments.
131
+
132
+ #### Setup
133
+
134
+ In order to use the strategy you need to setup a `KeyGenerator` class that is
135
+ able to generate a cache key for a given value.
136
+
137
+ The following naive example always assumes the value is an object with the methods
138
+ `getId()` and `getUpdatedAt()` method. The key then composed from the class
139
+ name, the id and the updated time of the object:
140
+
141
+ ```php
142
+ <?php
143
+
144
+ use Asm89\Twig\CacheExtension\CacheStrategy\KeyGeneratorInterface;
145
+
146
+ class MyKeyGenerator implements KeyGeneratorInterface
147
+ {
148
+ public function generateKey($value)
149
+ {
150
+ return get_class($value) . '_' . $value->getId() . '_' . $value->getUpdatedAt();
151
+ }
152
+
153
+ }
154
+ ```
155
+
156
+ Next the `GenerationalCacheStrategy` needs to be setup with the keygenerator.
157
+
158
+ ```php
159
+ <?php
160
+
161
+ use Asm89\Twig\CacheExtension\CacheStrategy\GenerationalCacheStrategy;
162
+ use Asm89\Twig\CacheExtension\Extension as CacheExtension;
163
+
164
+ $keyGenerator = new MyKeyGenerator();
165
+ $cacheProvider = /* see Quick start */;
166
+ $cacheStrategy = new GenerationalCacheStrategy($cacheProvider, $keyGenerator, 0 /* = infinite lifetime */);
167
+ $cacheExtension = new CacheExtension($cacheStrategy);
168
+
169
+ $twig->addExtension($cacheExtension);
170
+ ```
171
+
172
+ #### Usage
173
+
174
+ The strategy expects an object as value for determining the cache key of the
175
+ block:
176
+
177
+ ```jinja
178
+ {% cache 'v1/summary' item %}
179
+ {# heavy lifting template stuff here, include/render other partials etc #}
180
+ {% endcache %}
181
+ ```
182
+
183
+ ### Using multiple strategies
184
+
185
+ Different cache strategies are useful for different usecases. It is possible to
186
+ mix multiple strategies in an application with the
187
+ `IndexedChainingCacheStrategy`. The strategy takes an array of `'name' =>
188
+ $strategy` and delegates the caching to the appropriate strategy.
189
+
190
+ #### Setup
191
+
192
+ ```php
193
+ <?php
194
+
195
+ use Asm89\Twig\CacheExtension\CacheStrategy\IndexedChainingCacheStrategy;
196
+ use Asm89\Twig\CacheExtension\Extension as CacheExtension;
197
+
198
+ $cacheStrategy = new IndexedChainingCacheStrategy(array(
199
+ 'time' => $lifetimeCacheStrategy,
200
+ 'gen' => $generationalCacheStrategy,
201
+ ));
202
+ $cacheExtension = new CacheExtension($cacheStrategy);
203
+
204
+ $twig->addExtension($cacheExtension);
205
+ ```
206
+
207
+ #### Usage
208
+
209
+ The strategy expects an array with as key the name of the strategy which it
210
+ needs to delegate to and as value the appropriate value for the delegated
211
+ strategy.
212
+
213
+ ```jinja
214
+ {# delegate to lifetime strategy #}
215
+ {% cache 'v1/summary' {time: 300} %}
216
+ {# heavy lifting template stuff here, include/render other partials etc #}
217
+ {% endcache %}
218
+
219
+ {# delegate to generational strategy #}
220
+ {% cache 'v1/summary' {gen: item} %}
221
+ {# heavy lifting template stuff here, include/render other partials etc #}
222
+ {% endcache %}
223
+ ```
224
+
225
+ ## Implementing a cache strategy
226
+
227
+ Creating separate caches for different access levels, languages or other
228
+ usecases can be done by implementing a custom cache strategy. In order to do so
229
+ implement the `CacheProviderInterface`. It is recommended to use composition
230
+ and wrap a custom strategy around an existing one.
231
+
232
+ ## Authors
233
+
234
+ Alexander <iam.asm89@gmail.com>
235
+
236
+ ## License
237
+
238
+ twig-cache-extension is licensed under the MIT License - see the LICENSE file for details
vendor/asm89/twig-cache-extension/composer.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "asm89/twig-cache-extension",
3
+ "description": "Cache fragments of templates directly within Twig.",
4
+ "keywords": ["twig", "cache", "extension"],
5
+ "homepage": "https://github.com/asm89/twig-cache-extension",
6
+ "type": "library",
7
+ "license": "MIT",
8
+ "authors": [
9
+ {
10
+ "name": "Alexander",
11
+ "email": "iam.asm89@gmail.com"
12
+ }
13
+ ],
14
+ "require": {
15
+ "php": ">=5.3.2",
16
+ "twig/twig": "^1.0|^2.0"
17
+ },
18
+ "require-dev": {
19
+ "doctrine/cache": "~1.0"
20
+ },
21
+ "suggest": {
22
+ "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter."
23
+ },
24
+ "autoload": {
25
+ "psr-4": {
26
+ "": "lib/"
27
+ }
28
+ },
29
+ "autoload-dev": {
30
+ "psr-4": {
31
+ "": "test/"
32
+ }
33
+ },
34
+ "extra": {
35
+ "branch-alias": {
36
+ "dev-master": "1.3-dev"
37
+ }
38
+ }
39
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheProvider/DoctrineCacheAdapter.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheProvider;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheProviderInterface;
15
+ use Doctrine\Common\Cache\Cache;
16
+
17
+ /**
18
+ * Adapter class to use the cache classes provider by Doctrine.
19
+ *
20
+ * @author Alexander <iam.asm89@gmail.com>
21
+ */
22
+ class DoctrineCacheAdapter implements CacheProviderInterface
23
+ {
24
+ private $cache;
25
+
26
+ /**
27
+ * @param Cache $cache
28
+ */
29
+ public function __construct(Cache $cache)
30
+ {
31
+ $this->cache = $cache;
32
+ }
33
+
34
+ /**
35
+ * {@inheritDoc}
36
+ */
37
+ public function fetch($key)
38
+ {
39
+ return $this->cache->fetch($key);
40
+ }
41
+
42
+ /**
43
+ * {@inheritDoc}
44
+ */
45
+ public function save($key, $value, $lifetime = 0)
46
+ {
47
+ return $this->cache->save($key, $value, $lifetime);
48
+ }
49
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheProvider/PsrCacheAdapter.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheProvider;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheProviderInterface;
15
+ use Psr\Cache\CacheItemPoolInterface;
16
+
17
+ /**
18
+ * Adapter class to make extension interoperable with every PSR-6 adapter.
19
+ *
20
+ * @see http://php-cache.readthedocs.io/
21
+ *
22
+ * @author Rvanlaak <rvanlaak@gmail.com>
23
+ */
24
+ class PsrCacheAdapter implements CacheProviderInterface
25
+ {
26
+ /**
27
+ * @var CacheItemPoolInterface
28
+ */
29
+ private $cache;
30
+
31
+ /**
32
+ * @param CacheItemPoolInterface $cache
33
+ */
34
+ public function __construct(CacheItemPoolInterface $cache)
35
+ {
36
+ $this->cache = $cache;
37
+ }
38
+
39
+ /**
40
+ * @param string $key
41
+ * @return mixed|false
42
+ */
43
+ public function fetch($key)
44
+ {
45
+ // PSR-6 implementation returns null, CacheProviderInterface expects false
46
+ $item = $this->cache->getItem($key);
47
+ if ($item->isHit()) {
48
+ return $item->get();
49
+ }
50
+ return false;
51
+ }
52
+
53
+ /**
54
+ * @param string $key
55
+ * @param string $value
56
+ * @param int|\DateInterval $lifetime
57
+ * @return bool
58
+ */
59
+ public function save($key, $value, $lifetime = 0)
60
+ {
61
+ $item = $this->cache->getItem($key);
62
+ $item->set($value);
63
+ $item->expiresAfter($lifetime);
64
+
65
+ return $this->cache->save($item);
66
+ }
67
+
68
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheProviderInterface.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension;
13
+
14
+ /**
15
+ * Cache provider interface.
16
+ *
17
+ * @author Alexander <iam.asm89@gmail.com>
18
+ */
19
+ interface CacheProviderInterface
20
+ {
21
+ /**
22
+ * @param string $key
23
+ *
24
+ * @return mixed False, if there was no value to be fetched. Null or a string otherwise.
25
+ */
26
+ public function fetch($key);
27
+
28
+ /**
29
+ * @param string $key
30
+ * @param string $value
31
+ * @param integer $lifetime
32
+ *
33
+ * @return boolean
34
+ */
35
+ public function save($key, $value, $lifetime = 0);
36
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/BlackholeCacheStrategy.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheStrategyInterface;
15
+
16
+ /**
17
+ * CacheStrategy which doesn't cache at all
18
+ *
19
+ * This strategy can be used in development mode, e.g. editing twig templates,
20
+ * to prevent previously cached versions from being rendered.
21
+ *
22
+ * @see https://github.com/asm89/twig-cache-extension/pull/29
23
+ *
24
+ * @author Hagen Hübel <hhuebel@itinance.com>
25
+ *
26
+ * @package Asm89\Twig\CacheExtension\CacheStrategy
27
+ */
28
+ class BlackholeCacheStrategy implements CacheStrategyInterface
29
+ {
30
+ /**
31
+ * {@inheritDoc}
32
+ */
33
+ public function fetchBlock($key)
34
+ {
35
+ return false;
36
+ }
37
+
38
+ /**
39
+ * {@inheritDoc}
40
+ */
41
+ public function generateKey($annotation, $value)
42
+ {
43
+ return microtime(true) . mt_rand();
44
+ }
45
+
46
+ /**
47
+ * {@inheritDoc}
48
+ */
49
+ public function saveBlock($key, $block)
50
+ {
51
+ // fire and forget
52
+ }
53
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/GenerationalCacheStrategy.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheProviderInterface;
15
+ use Asm89\Twig\CacheExtension\CacheStrategyInterface;
16
+ use Asm89\Twig\CacheExtension\Exception\InvalidCacheKeyException;
17
+
18
+ /**
19
+ * Strategy for generational caching.
20
+ *
21
+ * In theory the strategy only saves fragments to the cache with infinite
22
+ * lifetime. The key of the strategy lies in the fact that the keys for blocks
23
+ * will change as the value for which the key is generated changes.
24
+ *
25
+ * For example: entities containing a last update time, would include a
26
+ * timestamp in the key.
27
+ *
28
+ * @see http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works
29
+ *
30
+ * @author Alexander <iam.asm89@gmail.com>
31
+ */
32
+ class GenerationalCacheStrategy implements CacheStrategyInterface
33
+ {
34
+ private $keyGenerator;
35
+ private $cache;
36
+ private $lifetime;
37
+
38
+ /**
39
+ * @param CacheProviderInterface $cache
40
+ * @param KeyGeneratorInterface $keyGenerator
41
+ * @param integer $lifetime
42
+ */
43
+ public function __construct(CacheProviderInterface $cache, KeyGeneratorInterface $keyGenerator, $lifetime = 0)
44
+ {
45
+ $this->keyGenerator = $keyGenerator;
46
+ $this->cache = $cache;
47
+ $this->lifetime = $lifetime;
48
+ }
49
+
50
+ /**
51
+ * {@inheritDoc}
52
+ */
53
+ public function fetchBlock($key)
54
+ {
55
+ return $this->cache->fetch($key);
56
+ }
57
+
58
+ /**
59
+ * {@inheritDoc}
60
+ */
61
+ public function generateKey($annotation, $value)
62
+ {
63
+ $key = $this->keyGenerator->generateKey($value);
64
+
65
+ if (null === $key) {
66
+ throw new InvalidCacheKeyException();
67
+ }
68
+
69
+ return $annotation . '__GCS__' . $key;
70
+ }
71
+
72
+ /**
73
+ * {@inheritDoc}
74
+ */
75
+ public function saveBlock($key, $block)
76
+ {
77
+ return $this->cache->save($key, $block, $this->lifetime);
78
+ }
79
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/IndexedChainingCacheStrategy.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheStrategyInterface;
15
+ use Asm89\Twig\CacheExtension\Exception\NonExistingStrategyException;
16
+ use Asm89\Twig\CacheExtension\Exception\NonExistingStrategyKeyException;
17
+
18
+ /**
19
+ * Combines several configured cache strategies.
20
+ *
21
+ * Useful for combining for example generational cache strategy with a lifetime
22
+ * cache strategy, but also useful when combining several generational cache
23
+ * strategies which differ on cache lifetime (infinite, 1hr, 5m).
24
+ *
25
+ * @author Alexander <iam.asm89@gmail.com>
26
+ */
27
+ class IndexedChainingCacheStrategy implements CacheStrategyInterface
28
+ {
29
+ /**
30
+ * @var CacheStrategyInterface[]
31
+ */
32
+ private $strategies;
33
+
34
+ /**
35
+ * @param array $strategies
36
+ */
37
+ public function __construct(array $strategies)
38
+ {
39
+ $this->strategies = $strategies;
40
+ }
41
+
42
+ /**
43
+ * {@inheritDoc}
44
+ */
45
+ public function fetchBlock($key)
46
+ {
47
+ return $this->strategies[$key['strategyKey']]->fetchBlock($key['key']);
48
+ }
49
+
50
+ /**
51
+ * {@inheritDoc}
52
+ */
53
+ public function generateKey($annotation, $value)
54
+ {
55
+ if (!is_array($value) || null === $strategyKey = key($value)) {
56
+ throw new NonExistingStrategyKeyException();
57
+ }
58
+
59
+ if (!isset($this->strategies[$strategyKey])) {
60
+ throw new NonExistingStrategyException($strategyKey);
61
+ }
62
+
63
+ return array(
64
+ 'strategyKey' => $strategyKey,
65
+ 'key' => $this->strategies[$strategyKey]->generateKey($annotation, current($value)),
66
+ );
67
+ }
68
+
69
+ /**
70
+ * {@inheritDoc}
71
+ */
72
+ public function saveBlock($key, $block)
73
+ {
74
+ return $this->strategies[$key['strategyKey']]->saveBlock($key['key'], $block);
75
+ }
76
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/KeyGeneratorInterface.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheStrategy;
13
+
14
+ /**
15
+ * Generates a key for a given value.
16
+ *
17
+ * @author Alexander <iam.asm89@gmail.com>
18
+ */
19
+ interface KeyGeneratorInterface
20
+ {
21
+ /**
22
+ * Generate a cache key for a given value.
23
+ *
24
+ * @param mixed $value
25
+ *
26
+ * @return string
27
+ */
28
+ public function generateKey($value);
29
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategy/LifetimeCacheStrategy.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheProviderInterface;
15
+ use Asm89\Twig\CacheExtension\CacheStrategyInterface;
16
+ use Asm89\Twig\CacheExtension\Exception\InvalidCacheLifetimeException;
17
+
18
+ /**
19
+ * Strategy for caching with a pre-defined lifetime.
20
+ *
21
+ * The value passed to the strategy is the lifetime of the cache block in
22
+ * seconds.
23
+ *
24
+ * @author Alexander <iam.asm89@gmail.com>
25
+ */
26
+ class LifetimeCacheStrategy implements CacheStrategyInterface
27
+ {
28
+ private $cache;
29
+
30
+ /**
31
+ * @param CacheProviderInterface $cache
32
+ */
33
+ public function __construct(CacheProviderInterface $cache)
34
+ {
35
+ $this->cache = $cache;
36
+ }
37
+
38
+ /**
39
+ * {@inheritDoc}
40
+ */
41
+ public function fetchBlock($key)
42
+ {
43
+ return $this->cache->fetch($key['key']);
44
+ }
45
+
46
+ /**
47
+ * {@inheritDoc}
48
+ */
49
+ public function generateKey($annotation, $value)
50
+ {
51
+ if (!is_numeric($value)) {
52
+ throw new InvalidCacheLifetimeException($value);
53
+ }
54
+
55
+ return array(
56
+ 'lifetime' => $value,
57
+ 'key' => '__LCS__' . $annotation,
58
+ );
59
+ }
60
+
61
+ /**
62
+ * {@inheritDoc}
63
+ */
64
+ public function saveBlock($key, $block)
65
+ {
66
+ return $this->cache->save($key['key'], $block, $key['lifetime']);
67
+ }
68
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/CacheStrategyInterface.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension;
13
+
14
+ /**
15
+ * Cache strategy interface.
16
+ *
17
+ * @author Alexander <iam.asm89@gmail.com>
18
+ */
19
+ interface CacheStrategyInterface
20
+ {
21
+ /**
22
+ * Fetch the block for a given key.
23
+ *
24
+ * @param mixed $key
25
+ *
26
+ * @return mixed
27
+ */
28
+ public function fetchBlock($key);
29
+
30
+ /**
31
+ * Generate a key for the value.
32
+ *
33
+ * @param string $annotation
34
+ * @param mixed $value
35
+ *
36
+ * @return mixed
37
+ */
38
+ public function generateKey($annotation, $value);
39
+
40
+ /**
41
+ * Save the contents of a rendered block.
42
+ *
43
+ * @param mixed $key
44
+ * @param string $block
45
+ *
46
+ * @return mixed
47
+ */
48
+ public function saveBlock($key, $block);
49
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/BaseException.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Exception;
13
+
14
+ /**
15
+ * @todo Replace \RuntimeException with \InvalidArgumentException at version 2.0
16
+ */
17
+ class BaseException extends \RuntimeException
18
+ {
19
+
20
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/InvalidCacheKeyException.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Exception;
13
+
14
+ class InvalidCacheKeyException extends BaseException
15
+ {
16
+ /**
17
+ * {@inheritdoc}
18
+ */
19
+ public function __construct($message = 'Key generator did not return a key.', $code = 0, \Exception $previous = null)
20
+ {
21
+ parent::__construct($message, $code, $previous);
22
+ }
23
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/InvalidCacheLifetimeException.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Exception;
13
+
14
+ class InvalidCacheLifetimeException extends BaseException
15
+ {
16
+ /**
17
+ * {@inheritdoc}
18
+ */
19
+ public function __construct($lifetime, $code = 0, \Exception $previous = null)
20
+ {
21
+ parent::__construct(sprintf('Value "%s" is not a valid lifetime.', gettype($lifetime)), $code, $previous);
22
+ }
23
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/NonExistingStrategyException.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Exception;
13
+
14
+ class NonExistingStrategyException extends BaseException
15
+ {
16
+ /**
17
+ * {@inheritdoc}
18
+ */
19
+ public function __construct($strategyKey, $code = 0, \Exception $previous = null)
20
+ {
21
+ parent::__construct(sprintf('No strategy configured with key "%s".', $strategyKey), $code, $previous);
22
+ }
23
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/NonExistingStrategyKeyException.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Exception;
13
+
14
+ class NonExistingStrategyKeyException extends BaseException
15
+ {
16
+ /**
17
+ * {@inheritdoc}
18
+ */
19
+ public function __construct($message = 'No strategy key found in value.', $code = 0, \Exception $previous = null)
20
+ {
21
+ parent::__construct($message, $code, $previous);
22
+ }
23
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension;
13
+
14
+ /**
15
+ * Extension for caching template blocks with twig.
16
+ *
17
+ * @author Alexander <iam.asm89@gmail.com>
18
+ */
19
+ class Extension extends \Twig_Extension
20
+ {
21
+ private $cacheStrategy;
22
+
23
+ /**
24
+ * @param CacheStrategyInterface $cacheStrategy
25
+ */
26
+ public function __construct(CacheStrategyInterface $cacheStrategy)
27
+ {
28
+ $this->cacheStrategy = $cacheStrategy;
29
+ }
30
+
31
+ /**
32
+ * @return CacheStrategyInterface
33
+ */
34
+ public function getCacheStrategy()
35
+ {
36
+ return $this->cacheStrategy;
37
+ }
38
+
39
+ /**
40
+ * {@inheritDoc}
41
+ */
42
+ public function getName()
43
+ {
44
+ if (version_compare(\Twig_Environment::VERSION, '1.26.0', '>=')) {
45
+ return get_class($this);
46
+ }
47
+ return 'asm89_cache';
48
+ }
49
+
50
+ /**
51
+ * {@inheritDoc}
52
+ */
53
+ public function getTokenParsers()
54
+ {
55
+ return array(
56
+ new TokenParser\Cache(),
57
+ );
58
+ }
59
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Node/CacheNode.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Node;
13
+
14
+ /**
15
+ * Cache twig node.
16
+ *
17
+ * @author Alexander <iam.asm89@gmail.com>
18
+ */
19
+ class CacheNode extends \Twig_Node
20
+ {
21
+ private static $cacheCount = 1;
22
+
23
+ /**
24
+ * @param \Twig_Node_Expression $annotation
25
+ * @param \Twig_Node_Expression $keyInfo
26
+ * @param \Twig_NodeInterface $body
27
+ * @param integer $lineno
28
+ * @param string $tag
29
+ */
30
+ public function __construct(\Twig_Node_Expression $annotation, \Twig_Node_Expression $keyInfo, \Twig_Node $body, $lineno, $tag = null)
31
+ {
32
+ parent::__construct(array('key_info' => $keyInfo, 'body' => $body, 'annotation' => $annotation), array(), $lineno, $tag);
33
+ }
34
+
35
+ /**
36
+ * {@inheritDoc}
37
+ */
38
+ public function compile(\Twig_Compiler $compiler)
39
+ {
40
+ $i = self::$cacheCount++;
41
+
42
+ if (version_compare(\Twig_Environment::VERSION, '1.26.0', '>=')) {
43
+ $extension = 'Asm89\Twig\CacheExtension\Extension';
44
+ } else {
45
+ $extension = 'asm89_cache';
46
+ }
47
+
48
+ $compiler
49
+ ->addDebugInfo($this)
50
+ ->write("\$asm89CacheStrategy".$i." = \$this->env->getExtension('{$extension}')->getCacheStrategy();\n")
51
+ ->write("\$asm89Key".$i." = \$asm89CacheStrategy".$i."->generateKey(")
52
+ ->subcompile($this->getNode('annotation'))
53
+ ->raw(", ")
54
+ ->subcompile($this->getNode('key_info'))
55
+ ->write(");\n")
56
+ ->write("\$asm89CacheBody".$i." = \$asm89CacheStrategy".$i."->fetchBlock(\$asm89Key".$i.");\n")
57
+ ->write("if (\$asm89CacheBody".$i." === false) {\n")
58
+ ->indent()
59
+ ->write("ob_start();\n")
60
+ ->indent()
61
+ ->subcompile($this->getNode('body'))
62
+ ->outdent()
63
+ ->write("\n")
64
+ ->write("\$asm89CacheBody".$i." = ob_get_clean();\n")
65
+ ->write("\$asm89CacheStrategy".$i."->saveBlock(\$asm89Key".$i.", \$asm89CacheBody".$i.");\n")
66
+ ->outdent()
67
+ ->write("}\n")
68
+ ->write("echo \$asm89CacheBody".$i.";\n")
69
+ ;
70
+ }
71
+ }
vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/TokenParser/Cache.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\TokenParser;
13
+
14
+ use Asm89\Twig\CacheExtension\Node\CacheNode;
15
+
16
+ /**
17
+ * Parser for cache/endcache blocks.
18
+ *
19
+ * @author Alexander <iam.asm89@gmail.com>
20
+ */
21
+ class Cache extends \Twig_TokenParser
22
+ {
23
+ /**
24
+ * @param \Twig_Token $token
25
+ *
26
+ * @return boolean
27
+ */
28
+ public function decideCacheEnd(\Twig_Token $token)
29
+ {
30
+ return $token->test('endcache');
31
+ }
32
+
33
+ /**
34
+ * {@inheritDoc}
35
+ */
36
+ public function getTag()
37
+ {
38
+ return 'cache';
39
+ }
40
+
41
+ /**
42
+ * {@inheritDoc}
43
+ */
44
+ public function parse(\Twig_Token $token)
45
+ {
46
+ $lineno = $token->getLine();
47
+ $stream = $this->parser->getStream();
48
+
49
+ $annotation = $this->parser->getExpressionParser()->parseExpression();
50
+
51
+ $key = $this->parser->getExpressionParser()->parseExpression();
52
+
53
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
54
+ $body = $this->parser->subparse(array($this, 'decideCacheEnd'), true);
55
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
56
+
57
+ return new CacheNode($annotation, $key, $body, $lineno, $this->getTag());
58
+ }
59
+ }
vendor/asm89/twig-cache-extension/phpunit.xml.dist ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <phpunit backupGlobals="false"
4
+ backupStaticAttributes="false"
5
+ colors="true"
6
+ convertErrorsToExceptions="true"
7
+ convertNoticesToExceptions="true"
8
+ convertWarningsToExceptions="true"
9
+ processIsolation="false"
10
+ stopOnFailure="false"
11
+ syntaxCheck="false"
12
+ bootstrap="test/bootstrap.php"
13
+ >
14
+ <testsuites>
15
+ <testsuite name="Twig Cache Extension Test Suite">
16
+ <directory>./test/Asm89/</directory>
17
+ </testsuite>
18
+ </testsuites>
19
+
20
+ <filter>
21
+ <whitelist>
22
+ <directory suffix=".php">./lib/</directory>
23
+ </whitelist>
24
+ </filter>
25
+ </phpunit>
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Tests\CacheProvider;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheProvider\DoctrineCacheAdapter;
15
+
16
+ class DoctrineCacheAdapterTest extends \PHPUnit_Framework_TestCase
17
+ {
18
+ public function testFetch()
19
+ {
20
+ $cacheMock = $this->createCacheMock();
21
+ $cacheMock->expects($this->any())
22
+ ->method('fetch')
23
+ ->will($this->returnValue('fromcache'));
24
+
25
+ $cache = new DoctrineCacheAdapter($cacheMock);
26
+
27
+ $this->assertEquals('fromcache', $cache->fetch('test'));
28
+ }
29
+
30
+ public function testSave()
31
+ {
32
+ $cacheMock = $this->createCacheMock();
33
+ $cacheMock->expects($this->once())
34
+ ->method('save')
35
+ ->with('key', 'value', 42);
36
+
37
+ $cache = new DoctrineCacheAdapter($cacheMock);
38
+
39
+ $cache->save('key', 'value', 42);
40
+ }
41
+
42
+ public function createCacheMock()
43
+ {
44
+ return $this->getMock('Doctrine\Common\Cache\Cache');
45
+ }
46
+ }
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/GenerationCacheStrategyTest.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Tests\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheStrategy\GenerationalCacheStrategy;
15
+
16
+ class GenerationalCacheStrategyTest extends \PHPUnit_Framework_TestCase
17
+ {
18
+ private $keyGeneratorMock;
19
+ private $cacheProviderMock;
20
+
21
+ public function createCacheStrategy($lifetime = 0)
22
+ {
23
+ $this->keyGeneratorMock = $this->createKeyGeneratorMock();
24
+ $this->cacheProviderMock = $this->createCacheProviderMock();
25
+
26
+ return new GenerationalCacheStrategy($this->cacheProviderMock, $this->keyGeneratorMock, $lifetime);
27
+ }
28
+
29
+ public function testGenerateKeyContainsAnnotation()
30
+ {
31
+ $strategy = $this->createCacheStrategy();
32
+ $this->keyGeneratorMock->expects($this->any())
33
+ ->method('generateKey')
34
+ ->will($this->returnValue('foo'));
35
+
36
+ $this->assertEquals('v42__GCS__foo', $strategy->generateKey('v42', 'value'));
37
+ }
38
+
39
+ /**
40
+ * @expectedException \Asm89\Twig\CacheExtension\Exception\InvalidCacheKeyException
41
+ */
42
+ public function testGenerationKeyThrowsExceptionWhenKeyGeneratorReturnsNull()
43
+ {
44
+ $strategy = $this->createCacheStrategy();
45
+
46
+ $strategy->generateKey('v42', 'value');
47
+ }
48
+
49
+ /**
50
+ * @dataProvider getLifeTimes
51
+ */
52
+ public function testSaveBlockUsesConfiguredLifetime($lifetime)
53
+ {
54
+ $strategy = $this->createCacheStrategy($lifetime);
55
+ $this->cacheProviderMock->expects($this->any())
56
+ ->method('save')
57
+ ->with('key', 'value', $lifetime)
58
+ ->will($this->returnValue('foo'));
59
+
60
+ $strategy->saveBlock('key', 'value');
61
+ }
62
+
63
+ public function getLifetimes()
64
+ {
65
+ return array(
66
+ array(0),
67
+ array(60),
68
+ );
69
+ }
70
+
71
+ public function createKeyGeneratorMock()
72
+ {
73
+ return $this->getMock('Asm89\Twig\CacheExtension\CacheStrategy\KeyGeneratorInterface');
74
+ }
75
+
76
+ public function createCacheProviderMock()
77
+ {
78
+ return $this->getMock('Asm89\Twig\CacheExtension\CacheProviderInterface');
79
+ }
80
+ }
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/IndexedChainingCacheStrategyTest.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Tests\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheStrategy\IndexedChainingCacheStrategy;
15
+
16
+ class IndexedChainingCacheStrategyTest extends \PHPUnit_Framework_TestCase
17
+ {
18
+ private $cacheStrategyMocks = array();
19
+
20
+ public function createCacheStrategy()
21
+ {
22
+ foreach($this->getStrategies() as $config) {
23
+ list($key, $return) = $config;
24
+
25
+ $cacheStrategyMock = $this->createCacheStrategyMock();
26
+ $cacheStrategyMock->expects($this->any())
27
+ ->method('generateKey')
28
+ ->will($this->returnValue($return));
29
+
30
+ $this->cacheStrategyMocks[$key] = $cacheStrategyMock;
31
+ }
32
+
33
+ return new IndexedChainingCacheStrategy($this->cacheStrategyMocks);
34
+ }
35
+
36
+ /**
37
+ * @dataProvider getStrategies
38
+ */
39
+ public function testGenerateKeyProxiesToAppropriateStrategy($key, $return)
40
+ {
41
+ $strategy = $this->createCacheStrategy();
42
+
43
+ $generatedKey = $strategy->generateKey('v42', array($key => 'proxied_value'));
44
+
45
+ $this->assertEquals($return, $generatedKey['key']);
46
+ $this->assertEquals($key, $generatedKey['strategyKey']);
47
+ }
48
+
49
+ /**
50
+ * @expectedException \Asm89\Twig\CacheExtension\Exception\NonExistingStrategyKeyException
51
+ */
52
+ public function testGenerateKeyThrowsExceptionOnMissingKey()
53
+ {
54
+ $strategy = $this->createCacheStrategy();
55
+ $strategy->generateKey('v42', 'proxied_value');
56
+ }
57
+
58
+ /**
59
+ * @expectedException \Asm89\Twig\CacheExtension\Exception\NonExistingStrategyException
60
+ * @expectedExceptionMessage No strategy configured with key "unknown"
61
+ */
62
+ public function testGenerateKeyThrowsExceptionOnUnknownKey()
63
+ {
64
+ $strategy = $this->createCacheStrategy();
65
+ $strategy->generateKey('v42', array('unknown' => 'proxied_value'));
66
+ }
67
+
68
+ public function getStrategies()
69
+ {
70
+ return array(
71
+ array('foo', 'foo_key'),
72
+ array('bar', 'bar_key'),
73
+ );
74
+ }
75
+
76
+ public function createCacheStrategyMock()
77
+ {
78
+ return $this->getMock('Asm89\Twig\CacheExtension\CacheStrategyInterface');
79
+ }
80
+ }
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Tests\CacheStrategy;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheStrategy\LifetimeCacheStrategy;
15
+
16
+ class LifetimeCacheStrategyTest extends \PHPUnit_Framework_TestCase
17
+ {
18
+ private $cacheProviderMock;
19
+
20
+ public function createCacheStrategy()
21
+ {
22
+ $this->cacheProviderMock = $this->createCacheProviderMock();
23
+
24
+ return new LifetimeCacheStrategy($this->cacheProviderMock);
25
+ }
26
+
27
+ public function testGenerateKeyUsesGivenLifetime()
28
+ {
29
+ $strategy = $this->createCacheStrategy();
30
+
31
+ $key = $strategy->generateKey('v42', 42);
32
+
33
+ $this->assertEquals(42, $key['lifetime']);
34
+ }
35
+
36
+ public function testGenerateKeyAnnotatesKey()
37
+ {
38
+ $strategy = $this->createCacheStrategy();
39
+
40
+ $key = $strategy->generateKey('the_annotation', 42);
41
+
42
+ $this->assertContains('the_annotation', $key['key']);
43
+ }
44
+
45
+ /**
46
+ * @dataProvider getInvalidLifetimeValues
47
+ * @expectedException \Asm89\Twig\CacheExtension\Exception\InvalidCacheLifetimeException
48
+ */
49
+ public function testGenerateKeyThrowsExceptionWhenNoLifetimeProvided($value)
50
+ {
51
+ $strategy = $this->createCacheStrategy();
52
+
53
+ $strategy->generateKey('v42', $value);
54
+ }
55
+
56
+ public function getInvalidLifetimeValues()
57
+ {
58
+ return array(
59
+ array('foo'),
60
+ array(array('foo')),
61
+ );
62
+ }
63
+
64
+ public function createCacheProviderMock()
65
+ {
66
+ return $this->getMock('Asm89\Twig\CacheExtension\CacheProviderInterface');
67
+ }
68
+ }
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/FunctionalExtensionTest.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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 Asm89\Twig\CacheExtension\Tests;
13
+
14
+ use Asm89\Twig\CacheExtension\CacheProvider\DoctrineCacheAdapter;
15
+ use Asm89\Twig\CacheExtension\CacheStrategy\KeyGeneratorInterface;
16
+ use Asm89\Twig\CacheExtension\CacheStrategy\GenerationalCacheStrategy;
17
+ use Asm89\Twig\CacheExtension\CacheStrategy\IndexedChainingCacheStrategy;
18
+ use Asm89\Twig\CacheExtension\CacheStrategy\LifetimeCacheStrategy;
19
+ use Asm89\Twig\CacheExtension\Extension;
20
+ use Doctrine\Common\Cache\ArrayCache;
21
+ use Twig_Loader_Filesystem;
22
+ use Twig_Environment;
23
+
24
+ class FunctionalExtensionTest extends \PHPUnit_Framework_TestCase
25
+ {
26
+ private $cache;
27
+
28
+ protected function createCacheProvider()
29
+ {
30
+ $this->cache = new ArrayCache();
31
+
32
+ return new DoctrineCacheAdapter($this->cache);
33
+ }
34
+
35
+ protected function createCacheStrategy($name = null)
36
+ {
37
+ $cacheProvider = $this->createCacheProvider();
38
+ $keyGenerator = $this->createKeyGenerator();
39
+ $lifetime = 0;
40
+
41
+ switch ($name) {
42
+ case 'time':
43
+ return new LifetimeCacheStrategy($cacheProvider);
44
+ case 'indexed':
45
+ return new IndexedChainingCacheStrategy(array(
46
+ 'gcs' => new GenerationalCacheStrategy($cacheProvider, $keyGenerator, $lifetime),
47
+ 'time' => new LifetimeCacheStrategy($cacheProvider),
48
+ ));
49
+ default:
50
+ return new GenerationalCacheStrategy($cacheProvider, $keyGenerator, $lifetime);
51
+ }
52
+ }
53
+
54
+ protected function createKeyGenerator()
55
+ {
56
+ return new KeyGenerator();
57
+ }
58
+
59
+ protected function createTwig($cacheStrategyName = null)
60
+ {
61
+ $loader = new Twig_Loader_Filesystem(__DIR__ . '/fixtures/');
62
+ $twig = new Twig_Environment($loader);
63
+
64
+ $cacheExtension = new Extension($this->createCacheStrategy($cacheStrategyName));
65
+
66
+ $twig->addExtension($cacheExtension);
67
+
68
+ return $twig;
69
+ }
70
+
71
+ protected function getValue($value, $updatedAt)
72
+ {
73
+ return new Value($value, $updatedAt);
74
+ }
75
+
76
+ public function testCachesWithSameCacheKey()
77
+ {
78
+ $twig = $this->createTwig();
79
+
80
+ $rendered = $twig->render('gcs_value.twig', array('value' => $this->getValue('asm89', 1)));
81
+ $this->assertEquals('Hello asm89!', $rendered);
82
+
83
+ $rendered2 = $twig->render('gcs_value.twig', array('value' => $this->getValue('fabpot', 1)));
84
+ $this->assertEquals('Hello asm89!', $rendered2);
85
+ }
86
+
87
+ public function testDifferentCacheOnDifferentAnnotation()
88
+ {
89
+ $twig = $this->createTwig();
90
+
91
+ $rendered = $twig->render('gcs_value.twig', array('value' => $this->getValue('asm89', 1)));
92
+ $this->assertEquals('Hello asm89!', $rendered);
93
+
94
+ $rendered2 = $twig->render('gcs_value.twig', array('value' => $this->getValue('fabpot', 1)));
95
+ $this->assertEquals('Hello asm89!', $rendered2);
96
+
97
+ $rendered3 = $twig->render('gcs_value_v2.twig', array('value' => $this->getValue('fabpot', 1)));
98
+ $this->assertEquals('Hello fabpot!', $rendered3);
99
+ }
100
+
101
+ public function testLifetimeCacheStrategy()
102
+ {
103
+ $twig = $this->createTwig('time');
104
+
105
+ $rendered = $twig->render('lcs_value.twig', array('value' => $this->getValue('asm89', 1)));
106
+ $this->assertEquals('Hello asm89!', $rendered);
107
+
108
+ $rendered2 = $twig->render('lcs_value.twig', array('value' => $this->getValue('fabpot', 1)));
109
+ $this->assertEquals('Hello asm89!', $rendered2);
110
+
111
+ $this->cache->flushAll();
112
+
113
+ $rendered3 = $twig->render('lcs_value.twig', array('value' => $this->getValue('fabpot', 1)));
114
+ $this->assertEquals('Hello fabpot!', $rendered3);
115
+ }
116
+
117
+ public function testIndexedChainingStrategy()
118
+ {
119
+ $twig = $this->createTwig('indexed');
120
+
121
+ $rendered = $twig->render('ics_value.twig', array('value' => $this->getValue('asm89', 1)));
122
+ $this->assertEquals('Hello asm89!', $rendered);
123
+
124
+ $rendered2 = $twig->render('ics_value.twig', array('value' => $this->getValue('fabpot', 1)));
125
+ $this->assertEquals('Hello asm89!', $rendered2);
126
+
127
+ $this->cache->flushAll();
128
+
129
+ $rendered3 = $twig->render('ics_value.twig', array('value' => $this->getValue('fabpot', 1)));
130
+ $this->assertEquals('Hello fabpot!', $rendered3);
131
+ }
132
+
133
+ /**
134
+ * @expectedException Twig_Error_Runtime
135
+ * @expectedExceptionMessage An exception has been thrown during the rendering of a template ("No strategy key found in value.")
136
+ */
137
+ public function testIndexedChainingStrategyNeedsKey()
138
+ {
139
+ $twig = $this->createTwig('indexed');
140
+
141
+ $twig->render('ics_no_key.twig', array('value' => $this->getValue('asm89', 1)));
142
+ }
143
+
144
+ public function testAnnotationExpression()
145
+ {
146
+ $twig = $this->createTwig('indexed');
147
+
148
+ $rendered = $twig->render('annotation_expression.twig', array('value' => $this->getValue('asm89', 1), 'version' => 1));
149
+ $this->assertEquals('Hello asm89!Hello asm89!', $rendered);
150
+ }
151
+ }
152
+
153
+ class KeyGenerator implements KeyGeneratorInterface
154
+ {
155
+ public function generateKey($value)
156
+ {
157
+ return get_class($value) . '_' . $value->getUpdatedAt();
158
+ }
159
+
160
+ }
161
+
162
+ class Value
163
+ {
164
+ private $value;
165
+ private $updatedAt;
166
+
167
+ public function __construct($value, $updatedAt)
168
+ {
169
+ $this->value = $value;
170
+ $this->updatedAt = $updatedAt;
171
+ }
172
+
173
+ public function getUpdatedAt()
174
+ {
175
+ return $this->updatedAt;
176
+ }
177
+
178
+ public function __toString()
179
+ {
180
+ return $this->value;
181
+ }
182
+ }
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/annotation_expression.twig ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ {%- set k = "v'" ~ version -%}
2
+ {%- cache k {time: 10} -%}Hello {{ value }}!{%- endcache -%}
3
+ {%- cache 'bob'|capitalize {gcs: value} %}Hello {{ value }}!{%- endcache -%}
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/annotation_not_string.twig ADDED
@@ -0,0 +1,2 @@
 
 
1
+ {% set annotation = 'v1' %}
2
+ {% cache annotation value %}Hello {{ value }}!{% endcache %}
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/gcs_value.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% cache 'v1' value %}Hello {{ value }}!{% endcache %}
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/gcs_value_v2.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% cache 'v2' value %}Hello {{ value }}!{% endcache %}
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/ics_no_key.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% cache 'v1' 10 %}Hello {{ value }}!{% endcache %}
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/ics_value.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% cache 'v1' {time: 10} %}Hello {{ value }}!{% endcache %}
vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/fixtures/lcs_value.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% cache 'v1' 10 %}Hello {{ value }}!{% endcache %}
vendor/asm89/twig-cache-extension/test/bootstrap.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of twig-cache-extension.
5
+ *
6
+ * (c) Alexander <iam.asm89@gmail.com>
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
+ if (file_exists($file = __DIR__.'/../vendor/autoload.php')) {
13
+ $autoload = require_once $file;
14
+ } else {
15
+ throw new RuntimeException('Install dependencies to run test suite.');
16
+ }
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 ComposerAutoloaderInitc3e392b78c714264f9aa3a99cbeeea30::getLoader();
vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,445 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 http://www.php-fig.org/psr/psr-0/
41
+ * @see http://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ // PSR-4
46
+ private $prefixLengthsPsr4 = array();
47
+ private $prefixDirsPsr4 = array();
48
+ private $fallbackDirsPsr4 = array();
49
+
50
+ // PSR-0
51
+ private $prefixesPsr0 = array();
52
+ private $fallbackDirsPsr0 = array();
53
+
54
+ private $useIncludePath = false;
55
+ private $classMap = array();
56
+ private $classMapAuthoritative = false;
57
+ private $missingClasses = array();
58
+ private $apcuPrefix;
59
+
60
+ public function getPrefixes()
61
+ {
62
+ if (!empty($this->prefixesPsr0)) {
63
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
64
+ }
65
+
66
+ return array();
67
+ }
68
+
69
+ public function getPrefixesPsr4()
70
+ {
71
+ return $this->prefixDirsPsr4;
72
+ }
73
+
74
+ public function getFallbackDirs()
75
+ {
76
+ return $this->fallbackDirsPsr0;
77
+ }
78
+
79
+ public function getFallbackDirsPsr4()
80
+ {
81
+ return $this->fallbackDirsPsr4;
82
+ }
83
+
84
+ public function getClassMap()
85
+ {
86
+ return $this->classMap;
87
+ }
88
+
89
+ /**
90
+ * @param array $classMap Class to filename map
91
+ */
92
+ public function addClassMap(array $classMap)
93
+ {
94
+ if ($this->classMap) {
95
+ $this->classMap = array_merge($this->classMap, $classMap);
96
+ } else {
97
+ $this->classMap = $classMap;
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Registers a set of PSR-0 directories for a given prefix, either
103
+ * appending or prepending to the ones previously set for this prefix.
104
+ *
105
+ * @param string $prefix The prefix
106
+ * @param array|string $paths The PSR-0 root directories
107
+ * @param bool $prepend Whether to prepend the directories
108
+ */
109
+ public function add($prefix, $paths, $prepend = false)
110
+ {
111
+ if (!$prefix) {
112
+ if ($prepend) {
113
+ $this->fallbackDirsPsr0 = array_merge(
114
+ (array) $paths,
115
+ $this->fallbackDirsPsr0
116
+ );
117
+ } else {
118
+ $this->fallbackDirsPsr0 = array_merge(
119
+ $this->fallbackDirsPsr0,
120
+ (array) $paths
121
+ );
122
+ }
123
+
124
+ return;
125
+ }
126
+
127
+ $first = $prefix[0];
128
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
129
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
130
+
131
+ return;
132
+ }
133
+ if ($prepend) {
134
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
135
+ (array) $paths,
136
+ $this->prefixesPsr0[$first][$prefix]
137
+ );
138
+ } else {
139
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
140
+ $this->prefixesPsr0[$first][$prefix],
141
+ (array) $paths
142
+ );
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Registers a set of PSR-4 directories for a given namespace, either
148
+ * appending or prepending to the ones previously set for this namespace.
149
+ *
150
+ * @param string $prefix The prefix/namespace, with trailing '\\'
151
+ * @param array|string $paths The PSR-4 base directories
152
+ * @param bool $prepend Whether to prepend the directories
153
+ *
154
+ * @throws \InvalidArgumentException
155
+ */
156
+ public function addPsr4($prefix, $paths, $prepend = false)
157
+ {
158
+ if (!$prefix) {
159
+ // Register directories for the root namespace.
160
+ if ($prepend) {
161
+ $this->fallbackDirsPsr4 = array_merge(
162
+ (array) $paths,
163
+ $this->fallbackDirsPsr4
164
+ );
165
+ } else {
166
+ $this->fallbackDirsPsr4 = array_merge(
167
+ $this->fallbackDirsPsr4,
168
+ (array) $paths
169
+ );
170
+ }
171
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172
+ // Register directories for a new namespace.
173
+ $length = strlen($prefix);
174
+ if ('\\' !== $prefix[$length - 1]) {
175
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
176
+ }
177
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
179
+ } elseif ($prepend) {
180
+ // Prepend directories for an already registered namespace.
181
+ $this->prefixDirsPsr4[$prefix] = array_merge(
182
+ (array) $paths,
183
+ $this->prefixDirsPsr4[$prefix]
184
+ );
185
+ } else {
186
+ // Append directories for an already registered namespace.
187
+ $this->prefixDirsPsr4[$prefix] = array_merge(
188
+ $this->prefixDirsPsr4[$prefix],
189
+ (array) $paths
190
+ );
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Registers a set of PSR-0 directories for a given prefix,
196
+ * replacing any others previously set for this prefix.
197
+ *
198
+ * @param string $prefix The prefix
199
+ * @param array|string $paths The PSR-0 base directories
200
+ */
201
+ public function set($prefix, $paths)
202
+ {
203
+ if (!$prefix) {
204
+ $this->fallbackDirsPsr0 = (array) $paths;
205
+ } else {
206
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Registers a set of PSR-4 directories for a given namespace,
212
+ * replacing any others previously set for this namespace.
213
+ *
214
+ * @param string $prefix The prefix/namespace, with trailing '\\'
215
+ * @param array|string $paths The PSR-4 base directories
216
+ *
217
+ * @throws \InvalidArgumentException
218
+ */
219
+ public function setPsr4($prefix, $paths)
220
+ {
221
+ if (!$prefix) {
222
+ $this->fallbackDirsPsr4 = (array) $paths;
223
+ } else {
224
+ $length = strlen($prefix);
225
+ if ('\\' !== $prefix[$length - 1]) {
226
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
227
+ }
228
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
230
+ }
231
+ }
232
+
233
+ /**
234
+ * Turns on searching the include path for class files.
235
+ *
236
+ * @param bool $useIncludePath
237
+ */
238
+ public function setUseIncludePath($useIncludePath)
239
+ {
240
+ $this->useIncludePath = $useIncludePath;
241
+ }
242
+
243
+ /**
244
+ * Can be used to check if the autoloader uses the include path to check
245
+ * for classes.
246
+ *
247
+ * @return bool
248
+ */
249
+ public function getUseIncludePath()
250
+ {
251
+ return $this->useIncludePath;
252
+ }
253
+
254
+ /**
255
+ * Turns off searching the prefix and fallback directories for classes
256
+ * that have not been registered with the class map.
257
+ *
258
+ * @param bool $classMapAuthoritative
259
+ */
260
+ public function setClassMapAuthoritative($classMapAuthoritative)
261
+ {
262
+ $this->classMapAuthoritative = $classMapAuthoritative;
263
+ }
264
+
265
+ /**
266
+ * Should class lookup fail if not found in the current class map?
267
+ *
268
+ * @return bool
269
+ */
270
+ public function isClassMapAuthoritative()
271
+ {
272
+ return $this->classMapAuthoritative;
273
+ }
274
+
275
+ /**
276
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
+ *
278
+ * @param string|null $apcuPrefix
279
+ */
280
+ public function setApcuPrefix($apcuPrefix)
281
+ {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283
+ }
284
+
285
+ /**
286
+ * The APCu prefix in use, or null if APCu caching is not enabled.
287
+ *
288
+ * @return string|null
289
+ */
290
+ public function getApcuPrefix()
291
+ {
292
+ return $this->apcuPrefix;
293
+ }
294
+
295
+ /**
296
+ * Registers this instance as an autoloader.
297
+ *
298
+ * @param bool $prepend Whether to prepend the autoloader or not
299
+ */
300
+ public function register($prepend = false)
301
+ {
302
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
303
+ }
304
+
305
+ /**
306
+ * Unregisters this instance as an autoloader.
307
+ */
308
+ public function unregister()
309
+ {
310
+ spl_autoload_unregister(array($this, 'loadClass'));
311
+ }
312
+
313
+ /**
314
+ * Loads the given class or interface.
315
+ *
316
+ * @param string $class The name of the class
317
+ * @return bool|null True if loaded, null otherwise
318
+ */
319
+ public function loadClass($class)
320
+ {
321
+ if ($file = $this->findFile($class)) {
322
+ includeFile($file);
323
+
324
+ return true;
325
+ }
326
+ }
327
+
328
+ /**
329
+ * Finds the path to the file where the class is defined.
330
+ *
331
+ * @param string $class The name of the class
332
+ *
333
+ * @return string|false The path if found, false otherwise
334
+ */
335
+ public function findFile($class)
336
+ {
337
+ // class map lookup
338
+ if (isset($this->classMap[$class])) {
339
+ return $this->classMap[$class];
340
+ }
341
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
+ return false;
343
+ }
344
+ if (null !== $this->apcuPrefix) {
345
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
+ if ($hit) {
347
+ return $file;
348
+ }
349
+ }
350
+
351
+ $file = $this->findFileWithExtension($class, '.php');
352
+
353
+ // Search for Hack files if we are running on HHVM
354
+ if (false === $file && defined('HHVM_VERSION')) {
355
+ $file = $this->findFileWithExtension($class, '.hh');
356
+ }
357
+
358
+ if (null !== $this->apcuPrefix) {
359
+ apcu_add($this->apcuPrefix.$class, $file);
360
+ }
361
+
362
+ if (false === $file) {
363
+ // Remember that this class does not exist.
364
+ $this->missingClasses[$class] = true;
365
+ }
366
+
367
+ return $file;
368
+ }
369
+
370
+ private function findFileWithExtension($class, $ext)
371
+ {
372
+ // PSR-4 lookup
373
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
374
+
375
+ $first = $class[0];
376
+ if (isset($this->prefixLengthsPsr4[$first])) {
377
+ $subPath = $class;
378
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
379
+ $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
+ if (isset($this->prefixDirsPsr4[$search])) {
382
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
+ if (file_exists($file = $dir . $pathEnd)) {
385
+ return $file;
386
+ }
387
+ }
388
+ }
389
+ }
390
+ }
391
+
392
+ // PSR-4 fallback dirs
393
+ foreach ($this->fallbackDirsPsr4 as $dir) {
394
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
395
+ return $file;
396
+ }
397
+ }
398
+
399
+ // PSR-0 lookup
400
+ if (false !== $pos = strrpos($class, '\\')) {
401
+ // namespaced class name
402
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
403
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404
+ } else {
405
+ // PEAR-like class name
406
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
407
+ }
408
+
409
+ if (isset($this->prefixesPsr0[$first])) {
410
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411
+ if (0 === strpos($class, $prefix)) {
412
+ foreach ($dirs as $dir) {
413
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
414
+ return $file;
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+
421
+ // PSR-0 fallback dirs
422
+ foreach ($this->fallbackDirsPsr0 as $dir) {
423
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
424
+ return $file;
425
+ }
426
+ }
427
+
428
+ // PSR-0 include paths.
429
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
+ return $file;
431
+ }
432
+
433
+ return false;
434
+ }
435
+ }
436
+
437
+ /**
438
+ * Scope isolated include.
439
+ *
440
+ * Prevents access to $this/self from included files.
441
+ */
442
+ function includeFile($file)
443
+ {
444
+ include $file;
445
+ }
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/composer/autoload_classmap.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'AltoRouter' => $vendorDir . '/altorouter/altorouter/AltoRouter.php',
10
+ 'LiveChat\\Exceptions\\ApiClientException' => $baseDir . '/plugin_files/Exceptions/ApiClientException.class.php',
11
+ 'LiveChat\\Exceptions\\ErrorCodes' => $baseDir . '/plugin_files/Exceptions/ErrorCode.class.php',
12
+ 'LiveChat\\Exceptions\\InvalidTokenException' => $baseDir . '/plugin_files/Exceptions/InvalidTokenException.class.php',
13
+ 'LiveChat\\Helpers\\ConfirmIdentityNoticeHelper' => $baseDir . '/plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php',
14
+ 'LiveChat\\Helpers\\ConnectNoticeHelper' => $baseDir . '/plugin_files/Helpers/ConnectNoticeHelper.class.php',
15
+ 'LiveChat\\Helpers\\ConnectServiceHelper' => $baseDir . '/plugin_files/Helpers/ConnectServiceHelper.class.php',
16
+ 'LiveChat\\Helpers\\DeactivationFeedbackFormHelper' => $baseDir . '/plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php',
17
+ 'LiveChat\\Helpers\\LiveChatHelper' => $baseDir . '/plugin_files/Helpers/LiveChatHelper.class.php',
18
+ 'LiveChat\\Helpers\\ReviewNoticeHelper' => $baseDir . '/plugin_files/Helpers/ReviewNoticeHelper.class.php',
19
+ 'LiveChat\\Helpers\\TrackingCodeHelper' => $baseDir . '/plugin_files/Helpers/TrackingCodeHelper.class.php',
20
+ 'LiveChat\\LiveChat' => $baseDir . '/plugin_files/LiveChat.class.php',
21
+ 'LiveChat\\LiveChatAdmin' => $baseDir . '/plugin_files/LiveChatAdmin.class.php',
22
+ 'LiveChat\\Services\\ApiClient' => $baseDir . '/plugin_files/Services/ApiClient.class.php',
23
+ 'LiveChat\\Services\\ApiClientTest' => $baseDir . '/plugin_files/tests/services/ApiClientTest.class.php',
24
+ 'LiveChat\\Services\\CertProvider' => $baseDir . '/plugin_files/Services/CertProvider.class.php',
25
+ 'LiveChat\\Services\\CertProviderTest' => $baseDir . '/plugin_files/tests/services/CertProviderTest.class.php',
26
+ 'LiveChat\\Services\\ConnectToken' => $baseDir . '/plugin_files/Services/ConnectToken.class.php',
27
+ 'LiveChat\\Services\\ConnectTokenProvider' => $baseDir . '/plugin_files/Services/ConnectTokenProvider.class.php',
28
+ 'LiveChat\\Services\\ConnectTokenProviderTest' => $baseDir . '/plugin_files/tests/services/ConnectTokenProviderTest.class.php',
29
+ 'LiveChat\\Services\\ConnectTokenTest' => $baseDir . '/plugin_files/tests/services/ConnectTokenTest.class.php',
30
+ 'LiveChat\\Services\\MockData' => $baseDir . '/plugin_files/tests/services/UserTest.class.php',
31
+ 'LiveChat\\Services\\ModuleConfiguration' => $baseDir . '/plugin_files/Services/ModuleConfiguration.class.php',
32
+ 'LiveChat\\Services\\Store' => $baseDir . '/plugin_files/Services/Store.class.php',
33
+ 'LiveChat\\Services\\StoreTest' => $baseDir . '/plugin_files/tests/services/StoreTest.class.php',
34
+ 'LiveChat\\Services\\TokenValidator' => $baseDir . '/plugin_files/Services/TokenValidator.class.php',
35
+ 'LiveChat\\Services\\TokenValidatorTest' => $baseDir . '/plugin_files/tests/services/TokenValidatorTest.class.php',
36
+ 'LiveChat\\Services\\UrlProvider' => $baseDir . '/plugin_files/Services/UrlProvider.class.php',
37
+ 'LiveChat\\Services\\UrlProviderTest' => $baseDir . '/plugin_files/tests/services/UrlProviderTest.class.php',
38
+ 'LiveChat\\Services\\User' => $baseDir . '/plugin_files/Services/User.class.php',
39
+ 'LiveChat\\Services\\UserTest' => $baseDir . '/plugin_files/tests/services/UserTest.class.php',
40
+ );
vendor/composer/autoload_files.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
10
+ '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
11
+ 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
12
+ 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
13
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
14
+ 'cb78221880aa21d756cc44a8539bb425' => $vendorDir . '/timber/timber/init.php',
15
+ );
vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
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
+ 'Twig_' => array($vendorDir . '/twig/twig/lib'),
10
+ 'Routes' => array($vendorDir . '/upstatement/routes'),
11
+ );
vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'Twig\\' => array($vendorDir . '/twig/twig/src'),
10
+ 'Timber\\' => array($vendorDir . '/timber/timber/lib'),
11
+ 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
12
+ 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
13
+ 'LiveChat\\' => array($baseDir . '/plugin_files'),
14
+ 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
15
+ 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
16
+ 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
17
+ 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
18
+ 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
19
+ '' => array($vendorDir . '/asm89/twig-cache-extension/lib'),
20
+ );
vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInitc3e392b78c714264f9aa3a99cbeeea30
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
+ public static function getLoader()
17
+ {
18
+ if (null !== self::$loader) {
19
+ return self::$loader;
20
+ }
21
+
22
+ spl_autoload_register(array('ComposerAutoloaderInitc3e392b78c714264f9aa3a99cbeeea30', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitc3e392b78c714264f9aa3a99cbeeea30', 'loadClassLoader'));
25
+
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
+ if ($useStaticLoader) {
28
+ require_once __DIR__ . '/autoload_static.php';
29
+
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::getInitializer($loader));
31
+ } else {
32
+ $map = require __DIR__ . '/autoload_namespaces.php';
33
+ foreach ($map as $namespace => $path) {
34
+ $loader->set($namespace, $path);
35
+ }
36
+
37
+ $map = require __DIR__ . '/autoload_psr4.php';
38
+ foreach ($map as $namespace => $path) {
39
+ $loader->setPsr4($namespace, $path);
40
+ }
41
+
42
+ $classMap = require __DIR__ . '/autoload_classmap.php';
43
+ if ($classMap) {
44
+ $loader->addClassMap($classMap);
45
+ }
46
+ }
47
+
48
+ $loader->register(true);
49
+
50
+ if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::$files;
52
+ } else {
53
+ $includeFiles = require __DIR__ . '/autoload_files.php';
54
+ }
55
+ foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequirec3e392b78c714264f9aa3a99cbeeea30($fileIdentifier, $file);
57
+ }
58
+
59
+ return $loader;
60
+ }
61
+ }
62
+
63
+ function composerRequirec3e392b78c714264f9aa3a99cbeeea30($fileIdentifier, $file)
64
+ {
65
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
+ require $file;
67
+
68
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
69
+ }
70
+ }
vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30
8
+ {
9
+ public static $files = array (
10
+ '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
11
+ '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
12
+ 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
13
+ 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
14
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
15
+ 'cb78221880aa21d756cc44a8539bb425' => __DIR__ . '/..' . '/timber/timber/init.php',
16
+ );
17
+
18
+ public static $prefixLengthsPsr4 = array (
19
+ 'T' =>
20
+ array (
21
+ 'Twig\\' => 5,
22
+ 'Timber\\' => 7,
23
+ ),
24
+ 'S' =>
25
+ array (
26
+ 'Symfony\\Polyfill\\Ctype\\' => 23,
27
+ ),
28
+ 'P' =>
29
+ array (
30
+ 'Psr\\Http\\Message\\' => 17,
31
+ ),
32
+ 'L' =>
33
+ array (
34
+ 'LiveChat\\' => 9,
35
+ ),
36
+ 'G' =>
37
+ array (
38
+ 'GuzzleHttp\\Psr7\\' => 16,
39
+ 'GuzzleHttp\\Promise\\' => 19,
40
+ 'GuzzleHttp\\' => 11,
41
+ ),
42
+ 'F' =>
43
+ array (
44
+ 'Firebase\\JWT\\' => 13,
45
+ ),
46
+ 'C' =>
47
+ array (
48
+ 'Composer\\Installers\\' => 20,
49
+ ),
50
+ );
51
+
52
+ public static $prefixDirsPsr4 = array (
53
+ 'Twig\\' =>
54
+ array (
55
+ 0 => __DIR__ . '/..' . '/twig/twig/src',
56
+ ),
57
+ 'Timber\\' =>
58
+ array (
59
+ 0 => __DIR__ . '/..' . '/timber/timber/lib',
60
+ ),
61
+ 'Symfony\\Polyfill\\Ctype\\' =>
62
+ array (
63
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
64
+ ),
65
+ 'Psr\\Http\\Message\\' =>
66
+ array (
67
+ 0 => __DIR__ . '/..' . '/psr/http-message/src',
68
+ ),
69
+ 'LiveChat\\' =>
70
+ array (
71
+ 0 => __DIR__ . '/../..' . '/plugin_files',
72
+ ),
73
+ 'GuzzleHttp\\Psr7\\' =>
74
+ array (
75
+ 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
76
+ ),
77
+ 'GuzzleHttp\\Promise\\' =>
78
+ array (
79
+ 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
80
+ ),
81
+ 'GuzzleHttp\\' =>
82
+ array (
83
+ 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
84
+ ),
85
+ 'Firebase\\JWT\\' =>
86
+ array (
87
+ 0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
88
+ ),
89
+ 'Composer\\Installers\\' =>
90
+ array (
91
+ 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
92
+ ),
93
+ );
94
+
95
+ public static $fallbackDirsPsr4 = array (
96
+ 0 => __DIR__ . '/..' . '/asm89/twig-cache-extension/lib',
97
+ );
98
+
99
+ public static $prefixesPsr0 = array (
100
+ 'T' =>
101
+ array (
102
+ 'Twig_' =>
103
+ array (
104
+ 0 => __DIR__ . '/..' . '/twig/twig/lib',
105
+ ),
106
+ ),
107
+ 'R' =>
108
+ array (
109
+ 'Routes' =>
110
+ array (
111
+ 0 => __DIR__ . '/..' . '/upstatement/routes',
112
+ ),
113
+ ),
114
+ );
115
+
116
+ public static $classMap = array (
117
+ 'AltoRouter' => __DIR__ . '/..' . '/altorouter/altorouter/AltoRouter.php',
118
+ 'LiveChat\\Exceptions\\ApiClientException' => __DIR__ . '/../..' . '/plugin_files/Exceptions/ApiClientException.class.php',
119
+ 'LiveChat\\Exceptions\\ErrorCodes' => __DIR__ . '/../..' . '/plugin_files/Exceptions/ErrorCode.class.php',
120
+ 'LiveChat\\Exceptions\\InvalidTokenException' => __DIR__ . '/../..' . '/plugin_files/Exceptions/InvalidTokenException.class.php',
121
+ 'LiveChat\\Helpers\\ConfirmIdentityNoticeHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/ConfirmIdentityNoticeHelper.class.php',
122
+ 'LiveChat\\Helpers\\ConnectNoticeHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/ConnectNoticeHelper.class.php',
123
+ 'LiveChat\\Helpers\\ConnectServiceHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/ConnectServiceHelper.class.php',
124
+ 'LiveChat\\Helpers\\DeactivationFeedbackFormHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/DeactivationFeedbackFormHelper.class.php',
125
+ 'LiveChat\\Helpers\\LiveChatHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/LiveChatHelper.class.php',
126
+ 'LiveChat\\Helpers\\ReviewNoticeHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/ReviewNoticeHelper.class.php',
127
+ 'LiveChat\\Helpers\\TrackingCodeHelper' => __DIR__ . '/../..' . '/plugin_files/Helpers/TrackingCodeHelper.class.php',
128
+ 'LiveChat\\LiveChat' => __DIR__ . '/../..' . '/plugin_files/LiveChat.class.php',
129
+ 'LiveChat\\LiveChatAdmin' => __DIR__ . '/../..' . '/plugin_files/LiveChatAdmin.class.php',
130
+ 'LiveChat\\Services\\ApiClient' => __DIR__ . '/../..' . '/plugin_files/Services/ApiClient.class.php',
131
+ 'LiveChat\\Services\\ApiClientTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/ApiClientTest.class.php',
132
+ 'LiveChat\\Services\\CertProvider' => __DIR__ . '/../..' . '/plugin_files/Services/CertProvider.class.php',
133
+ 'LiveChat\\Services\\CertProviderTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/CertProviderTest.class.php',
134
+ 'LiveChat\\Services\\ConnectToken' => __DIR__ . '/../..' . '/plugin_files/Services/ConnectToken.class.php',
135
+ 'LiveChat\\Services\\ConnectTokenProvider' => __DIR__ . '/../..' . '/plugin_files/Services/ConnectTokenProvider.class.php',
136
+ 'LiveChat\\Services\\ConnectTokenProviderTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/ConnectTokenProviderTest.class.php',
137
+ 'LiveChat\\Services\\ConnectTokenTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/ConnectTokenTest.class.php',
138
+ 'LiveChat\\Services\\MockData' => __DIR__ . '/../..' . '/plugin_files/tests/services/UserTest.class.php',
139
+ 'LiveChat\\Services\\ModuleConfiguration' => __DIR__ . '/../..' . '/plugin_files/Services/ModuleConfiguration.class.php',
140
+ 'LiveChat\\Services\\Store' => __DIR__ . '/../..' . '/plugin_files/Services/Store.class.php',
141
+ 'LiveChat\\Services\\StoreTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/StoreTest.class.php',
142
+ 'LiveChat\\Services\\TokenValidator' => __DIR__ . '/../..' . '/plugin_files/Services/TokenValidator.class.php',
143
+ 'LiveChat\\Services\\TokenValidatorTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/TokenValidatorTest.class.php',
144
+ 'LiveChat\\Services\\UrlProvider' => __DIR__ . '/../..' . '/plugin_files/Services/UrlProvider.class.php',
145
+ 'LiveChat\\Services\\UrlProviderTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/UrlProviderTest.class.php',
146
+ 'LiveChat\\Services\\User' => __DIR__ . '/../..' . '/plugin_files/Services/User.class.php',
147
+ 'LiveChat\\Services\\UserTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/UserTest.class.php',
148
+ );
149
+
150
+ public static function getInitializer(ClassLoader $loader)
151
+ {
152
+ return \Closure::bind(function () use ($loader) {
153
+ $loader->prefixLengthsPsr4 = ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::$prefixLengthsPsr4;
154
+ $loader->prefixDirsPsr4 = ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::$prefixDirsPsr4;
155
+ $loader->fallbackDirsPsr4 = ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::$fallbackDirsPsr4;
156
+ $loader->prefixesPsr0 = ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::$prefixesPsr0;
157
+ $loader->classMap = ComposerStaticInitc3e392b78c714264f9aa3a99cbeeea30::$classMap;
158
+
159
+ }, null, ClassLoader::class);
160
+ }
161
+ }
vendor/composer/installed.json ADDED
@@ -0,0 +1,818 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "altorouter/altorouter",
4
+ "version": "v1.1.0",
5
+ "version_normalized": "1.1.0.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/dannyvankooten/AltoRouter.git",
9
+ "reference": "09d9d946c546bae6d22a7654cdb3b825ffda54b4"
10
+ },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/dannyvankooten/AltoRouter/zipball/09d9d946c546bae6d22a7654cdb3b825ffda54b4",
14
+ "reference": "09d9d946c546bae6d22a7654cdb3b825ffda54b4",
15
+ "shasum": ""
16
+ },
17
+ "require": {
18
+ "php": ">=5.3.0"
19
+ },
20
+ "time": "2014-04-16T09:44:40+00:00",
21
+ "type": "library",
22
+ "installation-source": "dist",
23
+ "autoload": {
24
+ "classmap": [
25
+ "AltoRouter.php"
26
+ ]
27
+ },
28
+ "notification-url": "https://packagist.org/downloads/",
29
+ "license": [
30
+ "MIT"
31
+ ],
32
+ "authors": [
33
+ {
34
+ "name": "Danny van Kooten",
35
+ "email": "dannyvankooten@gmail.com",
36
+ "homepage": "http://dannyvankooten.com/"
37
+ },
38
+ {
39
+ "name": "Koen Punt",
40
+ "homepage": "https://github.com/koenpunt"
41
+ },
42
+ {
43
+ "name": "niahoo",
44
+ "homepage": "https://github.com/niahoo"
45
+ }
46
+ ],
47
+ "description": "A lightning fast router for PHP",
48
+ "homepage": "https://github.com/dannyvankooten/AltoRouter",
49
+ "keywords": [
50
+ "lightweight",
51
+ "router",
52
+ "routing"
53
+ ]
54
+ },
55
+ {
56
+ "name": "asm89/twig-cache-extension",
57
+ "version": "1.3.2",
58
+ "version_normalized": "1.3.2.0",
59
+ "source": {
60
+ "type": "git",
61
+ "url": "https://github.com/asm89/twig-cache-extension.git",
62
+ "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55"
63
+ },
64
+ "dist": {
65
+ "type": "zip",
66
+ "url": "https://api.github.com/repos/asm89/twig-cache-extension/zipball/630ea7abdc3fc62ba6786c02590a1560e449cf55",
67
+ "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55",
68
+ "shasum": ""
69
+ },
70
+ "require": {
71
+ "php": ">=5.3.2",
72
+ "twig/twig": "^1.0|^2.0"
73
+ },
74
+ "require-dev": {
75
+ "doctrine/cache": "~1.0"
76
+ },
77
+ "suggest": {
78
+ "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter."
79
+ },
80
+ "time": "2017-01-10T22:04:15+00:00",
81
+ "type": "library",
82
+ "extra": {
83
+ "branch-alias": {
84
+ "dev-master": "1.3-dev"
85
+ }
86
+ },
87
+ "installation-source": "dist",
88
+ "autoload": {
89
+ "psr-4": {
90
+ "": "lib/"
91
+ }
92
+ },
93
+ "notification-url": "https://packagist.org/downloads/",
94
+ "license": [
95
+ "MIT"
96
+ ],
97
+ "authors": [
98
+ {
99
+ "name": "Alexander",
100
+ "email": "iam.asm89@gmail.com"
101
+ }
102
+ ],
103
+ "description": "Cache fragments of templates directly within Twig.",
104
+ "homepage": "https://github.com/asm89/twig-cache-extension",
105
+ "keywords": [
106
+ "cache",
107
+ "extension",
108
+ "twig"
109
+ ]
110
+ },
111
+ {
112
+ "name": "composer/installers",
113
+ "version": "v1.7.0",
114
+ "version_normalized": "1.7.0.0",
115
+ "source": {
116
+ "type": "git",
117
+ "url": "https://github.com/composer/installers.git",
118
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
119
+ },
120
+ "dist": {
121
+ "type": "zip",
122
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
123
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
124
+ "shasum": ""
125
+ },
126
+ "require": {
127
+ "composer-plugin-api": "^1.0"
128
+ },
129
+ "replace": {
130
+ "roundcube/plugin-installer": "*",
131
+ "shama/baton": "*"
132
+ },
133
+ "require-dev": {
134
+ "composer/composer": "1.0.*@dev",
135
+ "phpunit/phpunit": "^4.8.36"
136
+ },
137
+ "time": "2019-08-12T15:00:31+00:00",
138
+ "type": "composer-plugin",
139
+ "extra": {
140
+ "class": "Composer\\Installers\\Plugin",
141
+ "branch-alias": {
142
+ "dev-master": "1.0-dev"
143
+ }
144
+ },
145
+ "installation-source": "dist",
146
+ "autoload": {
147
+ "psr-4": {
148
+ "Composer\\Installers\\": "src/Composer/Installers"
149
+ }
150
+ },
151
+ "notification-url": "https://packagist.org/downloads/",
152
+ "license": [
153
+ "MIT"
154
+ ],
155
+ "authors": [
156
+ {
157
+ "name": "Kyle Robinson Young",
158
+ "email": "kyle@dontkry.com",
159
+ "homepage": "https://github.com/shama"
160
+ }
161
+ ],
162
+ "description": "A multi-framework Composer library installer",
163
+ "homepage": "https://composer.github.io/installers/",
164
+ "keywords": [
165
+ "Craft",
166
+ "Dolibarr",
167
+ "Eliasis",
168
+ "Hurad",
169
+ "ImageCMS",
170
+ "Kanboard",
171
+ "Lan Management System",
172
+ "MODX Evo",
173
+ "Mautic",
174
+ "Maya",
175
+ "OXID",
176
+ "Plentymarkets",
177
+ "Porto",
178
+ "RadPHP",
179
+ "SMF",
180
+ "Thelia",
181
+ "Whmcs",
182
+ "WolfCMS",
183
+ "agl",
184
+ "aimeos",
185
+ "annotatecms",
186
+ "attogram",
187
+ "bitrix",
188
+ "cakephp",
189
+ "chef",
190
+ "cockpit",
191
+ "codeigniter",
192
+ "concrete5",
193
+ "croogo",
194
+ "dokuwiki",
195
+ "drupal",
196
+ "eZ Platform",
197
+ "elgg",
198
+ "expressionengine",
199
+ "fuelphp",
200
+ "grav",
201
+ "installer",
202
+ "itop",
203
+ "joomla",
204
+ "known",
205
+ "kohana",
206
+ "laravel",
207
+ "lavalite",
208
+ "lithium",
209
+ "magento",
210
+ "majima",
211
+ "mako",
212
+ "mediawiki",
213
+ "modulework",
214
+ "modx",
215
+ "moodle",
216
+ "osclass",
217
+ "phpbb",
218
+ "piwik",
219
+ "ppi",
220
+ "puppet",
221
+ "pxcms",
222
+ "reindex",
223
+ "roundcube",
224
+ "shopware",
225
+ "silverstripe",
226
+ "sydes",
227
+ "symfony",
228
+ "typo3",
229
+ "wordpress",
230
+ "yawik",
231
+ "zend",
232
+ "zikula"
233
+ ]
234
+ },
235
+ {
236
+ "name": "firebase/php-jwt",
237
+ "version": "v5.0.0",
238
+ "version_normalized": "5.0.0.0",
239
+ "source": {
240
+ "type": "git",
241
+ "url": "https://github.com/firebase/php-jwt.git",
242
+ "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e"
243
+ },
244
+ "dist": {
245
+ "type": "zip",
246
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/9984a4d3a32ae7673d6971ea00bae9d0a1abba0e",
247
+ "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e",
248
+ "shasum": ""
249
+ },
250
+ "require": {
251
+ "php": ">=5.3.0"
252
+ },
253
+ "require-dev": {
254
+ "phpunit/phpunit": " 4.8.35"
255
+ },
256
+ "time": "2017-06-27T22:17:23+00:00",
257
+ "type": "library",
258
+ "installation-source": "dist",
259
+ "autoload": {
260
+ "psr-4": {
261
+ "Firebase\\JWT\\": "src"
262
+ }
263
+ },
264
+ "notification-url": "https://packagist.org/downloads/",
265
+ "license": [
266
+ "BSD-3-Clause"
267
+ ],
268
+ "authors": [
269
+ {
270
+ "name": "Neuman Vong",
271
+ "email": "neuman+pear@twilio.com",
272
+ "role": "Developer"
273
+ },
274
+ {
275
+ "name": "Anant Narayanan",
276
+ "email": "anant@php.net",
277
+ "role": "Developer"
278
+ }
279
+ ],
280
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
281
+ "homepage": "https://github.com/firebase/php-jwt"
282
+ },
283
+ {
284
+ "name": "guzzlehttp/guzzle",
285
+ "version": "6.4.1",
286
+ "version_normalized": "6.4.1.0",
287
+ "source": {
288
+ "type": "git",
289
+ "url": "https://github.com/guzzle/guzzle.git",
290
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
291
+ },
292
+ "dist": {
293
+ "type": "zip",
294
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
295
+ "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
296
+ "shasum": ""
297
+ },
298
+ "require": {
299
+ "ext-json": "*",
300
+ "guzzlehttp/promises": "^1.0",
301
+ "guzzlehttp/psr7": "^1.6.1",
302
+ "php": ">=5.5"
303
+ },
304
+ "require-dev": {
305
+ "ext-curl": "*",
306
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
307
+ "psr/log": "^1.1"
308
+ },
309
+ "suggest": {
310
+ "psr/log": "Required for using the Log middleware"
311
+ },
312
+ "time": "2019-10-23T15:58:00+00:00",
313
+ "type": "library",
314
+ "extra": {
315
+ "branch-alias": {
316
+ "dev-master": "6.3-dev"
317
+ }
318
+ },
319
+ "installation-source": "dist",
320
+ "autoload": {
321
+ "psr-4": {
322
+ "GuzzleHttp\\": "src/"
323
+ },
324
+ "files": [
325
+ "src/functions_include.php"
326
+ ]
327
+ },
328
+ "notification-url": "https://packagist.org/downloads/",
329
+ "license": [
330
+ "MIT"
331
+ ],
332
+ "authors": [
333
+ {
334
+ "name": "Michael Dowling",
335
+ "email": "mtdowling@gmail.com",
336
+ "homepage": "https://github.com/mtdowling"
337
+ }
338
+ ],
339
+ "description": "Guzzle is a PHP HTTP client library",
340
+ "homepage": "http://guzzlephp.org/",
341
+ "keywords": [
342
+ "client",
343
+ "curl",
344
+ "framework",
345
+ "http",
346
+ "http client",
347
+ "rest",
348
+ "web service"
349
+ ]
350
+ },
351
+ {
352
+ "name": "guzzlehttp/promises",
353
+ "version": "v1.3.1",
354
+ "version_normalized": "1.3.1.0",
355
+ "source": {
356
+ "type": "git",
357
+ "url": "https://github.com/guzzle/promises.git",
358
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
359
+ },
360
+ "dist": {
361
+ "type": "zip",
362
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
363
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
364
+ "shasum": ""
365
+ },
366
+ "require": {
367
+ "php": ">=5.5.0"
368
+ },
369
+ "require-dev": {
370
+ "phpunit/phpunit": "^4.0"
371
+ },
372
+ "time": "2016-12-20T10:07:11+00:00",
373
+ "type": "library",
374
+ "extra": {
375
+ "branch-alias": {
376
+ "dev-master": "1.4-dev"
377
+ }
378
+ },
379
+ "installation-source": "dist",
380
+ "autoload": {
381
+ "psr-4": {
382
+ "GuzzleHttp\\Promise\\": "src/"
383
+ },
384
+ "files": [
385
+ "src/functions_include.php"
386
+ ]
387
+ },
388
+ "notification-url": "https://packagist.org/downloads/",
389
+ "license": [
390
+ "MIT"
391
+ ],
392
+ "authors": [
393
+ {
394
+ "name": "Michael Dowling",
395
+ "email": "mtdowling@gmail.com",
396
+ "homepage": "https://github.com/mtdowling"
397
+ }
398
+ ],
399
+ "description": "Guzzle promises library",
400
+ "keywords": [
401
+ "promise"
402
+ ]
403
+ },
404
+ {
405
+ "name": "guzzlehttp/psr7",
406
+ "version": "1.6.1",
407
+ "version_normalized": "1.6.1.0",
408
+ "source": {
409
+ "type": "git",
410
+ "url": "https://github.com/guzzle/psr7.git",
411
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
412
+ },
413
+ "dist": {
414
+ "type": "zip",
415
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
416
+ "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
417
+ "shasum": ""
418
+ },
419
+ "require": {
420
+ "php": ">=5.4.0",
421
+ "psr/http-message": "~1.0",
422
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
423
+ },
424
+ "provide": {
425
+ "psr/http-message-implementation": "1.0"
426
+ },
427
+ "require-dev": {
428
+ "ext-zlib": "*",
429
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
430
+ },
431
+ "suggest": {
432
+ "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
433
+ },
434
+ "time": "2019-07-01T23:21:34+00:00",
435
+ "type": "library",
436
+ "extra": {
437
+ "branch-alias": {
438
+ "dev-master": "1.6-dev"
439
+ }
440
+ },
441
+ "installation-source": "dist",
442
+ "autoload": {
443
+ "psr-4": {
444
+ "GuzzleHttp\\Psr7\\": "src/"
445
+ },
446
+ "files": [
447
+ "src/functions_include.php"
448
+ ]
449
+ },
450
+ "notification-url": "https://packagist.org/downloads/",
451
+ "license": [
452
+ "MIT"
453
+ ],
454
+ "authors": [
455
+ {
456
+ "name": "Michael Dowling",
457
+ "email": "mtdowling@gmail.com",
458
+ "homepage": "https://github.com/mtdowling"
459
+ },
460
+ {
461
+ "name": "Tobias Schultze",
462
+ "homepage": "https://github.com/Tobion"
463
+ }
464
+ ],
465
+ "description": "PSR-7 message implementation that also provides common utility methods",
466
+ "keywords": [
467
+ "http",
468
+ "message",
469
+ "psr-7",
470
+ "request",
471
+ "response",
472
+ "stream",
473
+ "uri",
474
+ "url"
475
+ ]
476
+ },
477
+ {
478
+ "name": "psr/http-message",
479
+ "version": "1.0.1",
480
+ "version_normalized": "1.0.1.0",
481
+ "source": {
482
+ "type": "git",
483
+ "url": "https://github.com/php-fig/http-message.git",
484
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
485
+ },
486
+ "dist": {
487
+ "type": "zip",
488
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
489
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
490
+ "shasum": ""
491
+ },
492
+ "require": {
493
+ "php": ">=5.3.0"
494
+ },
495
+ "time": "2016-08-06T14:39:51+00:00",
496
+ "type": "library",
497
+ "extra": {
498
+ "branch-alias": {
499
+ "dev-master": "1.0.x-dev"
500
+ }
501
+ },
502
+ "installation-source": "dist",
503
+ "autoload": {
504
+ "psr-4": {
505
+ "Psr\\Http\\Message\\": "src/"
506
+ }
507
+ },
508
+ "notification-url": "https://packagist.org/downloads/",
509
+ "license": [
510
+ "MIT"
511
+ ],
512
+ "authors": [
513
+ {
514
+ "name": "PHP-FIG",
515
+ "homepage": "http://www.php-fig.org/"
516
+ }
517
+ ],
518
+ "description": "Common interface for HTTP messages",
519
+ "homepage": "https://github.com/php-fig/http-message",
520
+ "keywords": [
521
+ "http",
522
+ "http-message",
523
+ "psr",
524
+ "psr-7",
525
+ "request",
526
+ "response"
527
+ ]
528
+ },
529
+ {
530
+ "name": "ralouphie/getallheaders",
531
+ "version": "3.0.3",
532
+ "version_normalized": "3.0.3.0",
533
+ "source": {
534
+ "type": "git",
535
+ "url": "https://github.com/ralouphie/getallheaders.git",
536
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
537
+ },
538
+ "dist": {
539
+ "type": "zip",
540
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
541
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
542
+ "shasum": ""
543
+ },
544
+ "require": {
545
+ "php": ">=5.6"
546
+ },
547
+ "require-dev": {
548
+ "php-coveralls/php-coveralls": "^2.1",
549
+ "phpunit/phpunit": "^5 || ^6.5"
550
+ },
551
+ "time": "2019-03-08T08:55:37+00:00",
552
+ "type": "library",
553
+ "installation-source": "dist",
554
+ "autoload": {
555
+ "files": [
556
+ "src/getallheaders.php"
557
+ ]
558
+ },
559
+ "notification-url": "https://packagist.org/downloads/",
560
+ "license": [
561
+ "MIT"
562
+ ],
563
+ "authors": [
564
+ {
565
+ "name": "Ralph Khattar",
566
+ "email": "ralph.khattar@gmail.com"
567
+ }
568
+ ],
569
+ "description": "A polyfill for getallheaders."
570
+ },
571
+ {
572
+ "name": "symfony/polyfill-ctype",
573
+ "version": "v1.12.0",
574
+ "version_normalized": "1.12.0.0",
575
+ "source": {
576
+ "type": "git",
577
+ "url": "https://github.com/symfony/polyfill-ctype.git",
578
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
579
+ },
580
+ "dist": {
581
+ "type": "zip",
582
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
583
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
584
+ "shasum": ""
585
+ },
586
+ "require": {
587
+ "php": ">=5.3.3"
588
+ },
589
+ "suggest": {
590
+ "ext-ctype": "For best performance"
591
+ },
592
+ "time": "2019-08-06T08:03:45+00:00",
593
+ "type": "library",
594
+ "extra": {
595
+ "branch-alias": {
596
+ "dev-master": "1.12-dev"
597
+ }
598
+ },
599
+ "installation-source": "dist",
600
+ "autoload": {
601
+ "psr-4": {
602
+ "Symfony\\Polyfill\\Ctype\\": ""
603
+ },
604
+ "files": [
605
+ "bootstrap.php"
606
+ ]
607
+ },
608
+ "notification-url": "https://packagist.org/downloads/",
609
+ "license": [
610
+ "MIT"
611
+ ],
612
+ "authors": [
613
+ {
614
+ "name": "Gert de Pagter",
615
+ "email": "BackEndTea@gmail.com"
616
+ },
617
+ {
618
+ "name": "Symfony Community",
619
+ "homepage": "https://symfony.com/contributors"
620
+ }
621
+ ],
622
+ "description": "Symfony polyfill for ctype functions",
623
+ "homepage": "https://symfony.com",
624
+ "keywords": [
625
+ "compatibility",
626
+ "ctype",
627
+ "polyfill",
628
+ "portable"
629
+ ]
630
+ },
631
+ {
632
+ "name": "timber/timber",
633
+ "version": "1.0.0",
634
+ "version_normalized": "1.0.0.0",
635
+ "source": {
636
+ "type": "git",
637
+ "url": "https://github.com/timber/timber.git",
638
+ "reference": "26b6585103c80c2262495087823fbc43241a95dc"
639
+ },
640
+ "dist": {
641
+ "type": "zip",
642
+ "url": "https://api.github.com/repos/timber/timber/zipball/26b6585103c80c2262495087823fbc43241a95dc",
643
+ "reference": "26b6585103c80c2262495087823fbc43241a95dc",
644
+ "shasum": ""
645
+ },
646
+ "require": {
647
+ "asm89/twig-cache-extension": "~1.0",
648
+ "composer/installers": "~1.0",
649
+ "php": ">=5.3.0",
650
+ "twig/twig": "1.*",
651
+ "upstatement/routes": "0.3"
652
+ },
653
+ "require-dev": {
654
+ "jarednova/markdowndocs": "dev-master",
655
+ "phpdocumentor/phpdocumentor": "2.*",
656
+ "phpunit/phpunit": "~4.0",
657
+ "satooshi/php-coveralls": "1.0.*",
658
+ "wp-cli/wp-cli": "*",
659
+ "wpackagist-plugin/advanced-custom-fields": "4.*"
660
+ },
661
+ "time": "2016-05-03T10:33:18+00:00",
662
+ "type": "library",
663
+ "installation-source": "dist",
664
+ "autoload": {
665
+ "psr-4": {
666
+ "Timber\\": "lib/"
667
+ },
668
+ "files": [
669
+ "init.php"
670
+ ]
671
+ },
672
+ "notification-url": "https://packagist.org/downloads/",
673
+ "license": [
674
+ "MIT"
675
+ ],
676
+ "authors": [
677
+ {
678
+ "name": "Jared Novack",
679
+ "email": "jared@upstatement.com",
680
+ "homepage": "http://upstatement.com"
681
+ },
682
+ {
683
+ "name": "Connor J. Burton",
684
+ "email": "connorjburton@gmail.com",
685
+ "homepage": "http://connorburton.com"
686
+ }
687
+ ],
688
+ "description": "Plugin to write WordPress themes w Object-Oriented Code and the Twig Template Engine",
689
+ "homepage": "http://timber.upstatement.com",
690
+ "keywords": [
691
+ "templating",
692
+ "themes",
693
+ "timber",
694
+ "twig"
695
+ ]
696
+ },
697
+ {
698
+ "name": "twig/twig",
699
+ "version": "v1.42.4",
700
+ "version_normalized": "1.42.4.0",
701
+ "source": {
702
+ "type": "git",
703
+ "url": "https://github.com/twigphp/Twig.git",
704
+ "reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152"
705
+ },
706
+ "dist": {
707
+ "type": "zip",
708
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/e587180584c3d2d6cb864a0454e777bb6dcb6152",
709
+ "reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152",
710
+ "shasum": ""
711
+ },
712
+ "require": {
713
+ "php": ">=5.5.0",
714
+ "symfony/polyfill-ctype": "^1.8"
715
+ },
716
+ "require-dev": {
717
+ "psr/container": "^1.0",
718
+ "symfony/debug": "^3.4|^4.2",
719
+ "symfony/phpunit-bridge": "^4.4@dev|^5.0"
720
+ },
721
+ "time": "2019-11-11T16:49:32+00:00",
722
+ "type": "library",
723
+ "extra": {
724
+ "branch-alias": {
725
+ "dev-master": "1.42-dev"
726
+ }
727
+ },
728
+ "installation-source": "dist",
729
+ "autoload": {
730
+ "psr-0": {
731
+ "Twig_": "lib/"
732
+ },
733
+ "psr-4": {
734
+ "Twig\\": "src/"
735
+ }
736
+ },
737
+ "notification-url": "https://packagist.org/downloads/",
738
+ "license": [
739
+ "BSD-3-Clause"
740
+ ],
741
+ "authors": [
742
+ {
743
+ "name": "Fabien Potencier",
744
+ "email": "fabien@symfony.com",
745
+ "homepage": "http://fabien.potencier.org",
746
+ "role": "Lead Developer"
747
+ },
748
+ {
749
+ "name": "Twig Team",
750
+ "homepage": "https://twig.symfony.com/contributors",
751
+ "role": "Contributors"
752
+ },
753
+ {
754
+ "name": "Armin Ronacher",
755
+ "email": "armin.ronacher@active-4.com",
756
+ "role": "Project Founder"
757
+ }
758
+ ],
759
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
760
+ "homepage": "https://twig.symfony.com",
761
+ "keywords": [
762
+ "templating"
763
+ ]
764
+ },
765
+ {
766
+ "name": "upstatement/routes",
767
+ "version": "0.3",
768
+ "version_normalized": "0.3.0.0",
769
+ "source": {
770
+ "type": "git",
771
+ "url": "https://github.com/Upstatement/routes.git",
772
+ "reference": "40d003b69c0f5c52fb4b15e5d1fa4d5c522c9475"
773
+ },
774
+ "dist": {
775
+ "type": "zip",
776
+ "url": "https://api.github.com/repos/Upstatement/routes/zipball/40d003b69c0f5c52fb4b15e5d1fa4d5c522c9475",
777
+ "reference": "40d003b69c0f5c52fb4b15e5d1fa4d5c522c9475",
778
+ "shasum": ""
779
+ },
780
+ "require": {
781
+ "altorouter/altorouter": "1.1.0",
782
+ "composer/installers": "~1.0",
783
+ "php": ">=5.3.0"
784
+ },
785
+ "require-dev": {
786
+ "phpunit/phpunit": "3.7.*",
787
+ "satooshi/php-coveralls": "dev-master",
788
+ "wp-cli/wp-cli": "*"
789
+ },
790
+ "time": "2015-03-07T13:41:29+00:00",
791
+ "type": "library",
792
+ "installation-source": "dist",
793
+ "autoload": {
794
+ "psr-0": {
795
+ "Routes": ""
796
+ }
797
+ },
798
+ "notification-url": "https://packagist.org/downloads/",
799
+ "license": [
800
+ "MIT"
801
+ ],
802
+ "authors": [
803
+ {
804
+ "name": "Jared Novack",
805
+ "email": "jared@upstatement.com",
806
+ "homepage": "http://upstatement.com"
807
+ }
808
+ ],
809
+ "description": "Manage rewrites and routes in WordPress with this dead-simple plugin",
810
+ "homepage": "http://routes.upstatement.com",
811
+ "keywords": [
812
+ "redirects",
813
+ "rewrite",
814
+ "routes",
815
+ "routing"
816
+ ]
817
+ }
818
+ ]
vendor/composer/installers/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2012 Kyle Robinson Young
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/composer/installers/composer.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "composer/installers",
3
+ "type": "composer-plugin",
4
+ "license": "MIT",
5
+ "description": "A multi-framework Composer library installer",
6
+ "keywords": [
7
+ "installer",
8
+ "Aimeos",
9
+ "AGL",
10
+ "AnnotateCms",
11
+ "Attogram",
12
+ "Bitrix",
13
+ "CakePHP",
14
+ "Chef",
15
+ "Cockpit",
16
+ "CodeIgniter",
17
+ "concrete5",
18
+ "Craft",
19
+ "Croogo",
20
+ "DokuWiki",
21
+ "Dolibarr",
22
+ "Drupal",
23
+ "Elgg",
24
+ "Eliasis",
25
+ "ExpressionEngine",
26
+ "eZ Platform",
27
+ "FuelPHP",
28
+ "Grav",
29
+ "Hurad",
30
+ "ImageCMS",
31
+ "iTop",
32
+ "Joomla",
33
+ "Kanboard",
34
+ "Known",
35
+ "Kohana",
36
+ "Lan Management System",
37
+ "Laravel",
38
+ "Lavalite",
39
+ "Lithium",
40
+ "Magento",
41
+ "majima",
42
+ "Mako",
43
+ "Mautic",
44
+ "Maya",
45
+ "MODX",
46
+ "MODX Evo",
47
+ "MediaWiki",
48
+ "OXID",
49
+ "osclass",
50
+ "MODULEWork",
51
+ "Moodle",
52
+ "Piwik",
53
+ "pxcms",
54
+ "phpBB",
55
+ "Plentymarkets",
56
+ "PPI",
57
+ "Puppet",
58
+ "Porto",
59
+ "RadPHP",
60
+ "ReIndex",
61
+ "Roundcube",
62
+ "shopware",
63
+ "SilverStripe",
64
+ "SMF",
65
+ "SyDES",
66
+ "symfony",
67
+ "Thelia",
68
+ "TYPO3",
69
+ "WHMCS",
70
+ "WolfCMS",
71
+ "WordPress",
72
+ "YAWIK",
73
+ "Zend",
74
+ "Zikula"
75
+ ],
76
+ "homepage": "https://composer.github.io/installers/",
77
+ "authors": [
78
+ {
79
+ "name": "Kyle Robinson Young",
80
+ "email": "kyle@dontkry.com",
81
+ "homepage": "https://github.com/shama"
82
+ }
83
+ ],
84
+ "autoload": {
85
+ "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
86
+ },
87
+ "extra": {
88
+ "class": "Composer\\Installers\\Plugin",
89
+ "branch-alias": {
90
+ "dev-master": "1.0-dev"
91
+ }
92
+ },
93
+ "replace": {
94
+ "shama/baton": "*",
95
+ "roundcube/plugin-installer": "*"
96
+ },
97
+ "require": {
98
+ "composer-plugin-api": "^1.0"
99
+ },
100
+ "require-dev": {
101
+ "composer/composer": "1.0.*@dev",
102
+ "phpunit/phpunit": "^4.8.36"
103
+ },
104
+ "scripts": {
105
+ "test": "phpunit"
106
+ }
107
+ }
vendor/composer/installers/src/Composer/Installers/AglInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AglInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'More/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
16
+ return strtoupper($matches[1]);
17
+ }, $vars['name']);
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AimeosInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AnnotateCmsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'addons/modules/{$name}/',
8
+ 'component' => 'addons/components/{$name}/',
9
+ 'service' => 'addons/services/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AsgardInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'Modules/{$name}/',
8
+ 'theme' => 'Themes/{$name}/'
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type asgard-module, cut off a trailing '-plugin' if present.
15
+ *
16
+ * For package type asgard-theme, cut off a trailing '-theme' if present.
17
+ *
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] === 'asgard-module') {
22
+ return $this->inflectPluginVars($vars);
23
+ }
24
+
25
+ if ($vars['type'] === 'asgard-theme') {
26
+ return $this->inflectThemeVars($vars);
27
+ }
28
+
29
+ return $vars;
30
+ }
31
+
32
+ protected function inflectPluginVars($vars)
33
+ {
34
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
35
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
36
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
44
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
45
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
46
+
47
+ return $vars;
48
+ }
49
+ }
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AttogramInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\IO\IOInterface;
5
+ use Composer\Composer;
6
+ use Composer\Package\PackageInterface;
7
+
8
+ abstract class BaseInstaller
9
+ {
10
+ protected $locations = array();
11
+ protected $composer;
12
+ protected $package;
13
+ protected $io;
14
+
15
+ /**
16
+ * Initializes base installer.
17
+ *
18
+ * @param PackageInterface $package
19
+ * @param Composer $composer
20
+ * @param IOInterface $io
21
+ */
22
+ public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
23
+ {
24
+ $this->composer = $composer;
25
+ $this->package = $package;
26
+ $this->io = $io;
27
+ }
28
+
29
+ /**
30
+ * Return the install path based on package type.
31
+ *
32
+ * @param PackageInterface $package
33
+ * @param string $frameworkType
34
+ * @return string
35
+ */
36
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
37
+ {
38
+ $type = $this->package->getType();
39
+
40
+ $prettyName = $this->package->getPrettyName();
41
+ if (strpos($prettyName, '/') !== false) {
42
+ list($vendor, $name) = explode('/', $prettyName);
43
+ } else {
44
+ $vendor = '';
45
+ $name = $prettyName;
46
+ }
47
+
48
+ $availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
49
+
50
+ $extra = $package->getExtra();
51
+ if (!empty($extra['installer-name'])) {
52
+ $availableVars['name'] = $extra['installer-name'];
53
+ }
54
+
55
+ if ($this->composer->getPackage()) {
56
+ $extra = $this->composer->getPackage()->getExtra();
57
+ if (!empty($extra['installer-paths'])) {
58
+ $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
59
+ if ($customPath !== false) {
60
+ return $this->templatePath($customPath, $availableVars);
61
+ }
62
+ }
63
+ }
64
+
65
+ $packageType = substr($type, strlen($frameworkType) + 1);
66
+ $locations = $this->getLocations();
67
+ if (!isset($locations[$packageType])) {
68
+ throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
69
+ }
70
+
71
+ return $this->templatePath($locations[$packageType], $availableVars);
72
+ }
73
+
74
+ /**
75
+ * For an installer to override to modify the vars per installer.
76
+ *
77
+ * @param array $vars
78
+ * @return array
79
+ */
80
+ public function inflectPackageVars($vars)
81
+ {
82
+ return $vars;
83
+ }
84
+
85
+ /**
86
+ * Gets the installer's locations
87
+ *
88
+ * @return array
89
+ */
90
+ public function getLocations()
91
+ {
92
+ return $this->locations;
93
+ }
94
+
95
+ /**
96
+ * Replace vars in a path
97
+ *
98
+ * @param string $path
99
+ * @param array $vars
100
+ * @return string
101
+ */
102
+ protected function templatePath($path, array $vars = array())
103
+ {
104
+ if (strpos($path, '{') !== false) {
105
+ extract($vars);
106
+ preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
107
+ if (!empty($matches[1])) {
108
+ foreach ($matches[1] as $var) {
109
+ $path = str_replace('{$' . $var . '}', $$var, $path);
110
+ }
111
+ }
112
+ }
113
+
114
+ return $path;
115
+ }
116
+
117
+ /**
118
+ * Search through a passed paths array for a custom install path.
119
+ *
120
+ * @param array $paths
121
+ * @param string $name
122
+ * @param string $type
123
+ * @param string $vendor = NULL
124
+ * @return string
125
+ */
126
+ protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
127
+ {
128
+ foreach ($paths as $path => $names) {
129
+ if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
130
+ return $path;
131
+ }
132
+ }
133
+
134
+ return false;
135
+ }
136
+ }
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Util\Filesystem;
6
+
7
+ /**
8
+ * Installer for Bitrix Framework. Supported types of extensions:
9
+ * - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
10
+ * - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
11
+ * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
12
+ *
13
+ * You can set custom path to directory with Bitrix kernel in `composer.json`:
14
+ *
15
+ * ```json
16
+ * {
17
+ * "extra": {
18
+ * "bitrix-dir": "s1/bitrix"
19
+ * }
20
+ * }
21
+ * ```
22
+ *
23
+ * @author Nik Samokhvalov <nik@samokhvalov.info>
24
+ * @author Denis Kulichkin <onexhovia@gmail.com>
25
+ */
26
+ class BitrixInstaller extends BaseInstaller
27
+ {
28
+ protected $locations = array(
29
+ 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
30
+ 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
31
+ 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
32
+ 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
33
+ 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
34
+ 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
35
+ );
36
+
37
+ /**
38
+ * @var array Storage for informations about duplicates at all the time of installation packages.
39
+ */
40
+ private static $checkedDuplicates = array();
41
+
42
+ /**
43
+ * {@inheritdoc}
44
+ */
45
+ public function inflectPackageVars($vars)
46
+ {
47
+ if ($this->composer->getPackage()) {
48
+ $extra = $this->composer->getPackage()->getExtra();
49
+
50
+ if (isset($extra['bitrix-dir'])) {
51
+ $vars['bitrix_dir'] = $extra['bitrix-dir'];
52
+ }
53
+ }
54
+
55
+ if (!isset($vars['bitrix_dir'])) {
56
+ $vars['bitrix_dir'] = 'bitrix';
57
+ }
58
+
59
+ return parent::inflectPackageVars($vars);
60
+ }
61
+
62
+ /**
63
+ * {@inheritdoc}
64
+ */
65
+ protected function templatePath($path, array $vars = array())
66
+ {
67
+ $templatePath = parent::templatePath($path, $vars);
68
+ $this->checkDuplicates($templatePath, $vars);
69
+
70
+ return $templatePath;
71
+ }
72
+
73
+ /**
74
+ * Duplicates search packages.
75
+ *
76
+ * @param string $path
77
+ * @param array $vars
78
+ */
79
+ protected function checkDuplicates($path, array $vars = array())
80
+ {
81
+ $packageType = substr($vars['type'], strlen('bitrix') + 1);
82
+ $localDir = explode('/', $vars['bitrix_dir']);
83
+ array_pop($localDir);
84
+ $localDir[] = 'local';
85
+ $localDir = implode('/', $localDir);
86
+
87
+ $oldPath = str_replace(
88
+ array('{$bitrix_dir}', '{$name}'),
89
+ array($localDir, $vars['name']),
90
+ $this->locations[$packageType]
91
+ );
92
+
93
+ if (in_array($oldPath, static::$checkedDuplicates)) {
94
+ return;
95
+ }
96
+
97
+ if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
98
+
99
+ $this->io->writeError(' <error>Duplication of packages:</error>');
100
+ $this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
101
+
102
+ while (true) {
103
+ switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
104
+ case 'y':
105
+ $fs = new Filesystem();
106
+ $fs->removeDirectory($oldPath);
107
+ break 2;
108
+
109
+ case 'n':
110
+ break 2;
111
+
112
+ case '?':
113
+ default:
114
+ $this->io->writeError(array(
115
+ ' y - delete package ' . $oldPath . ' and to continue with the installation',
116
+ ' n - don\'t delete and to continue with the installation',
117
+ ));
118
+ $this->io->writeError(' ? - print help');
119
+ break;
120
+ }
121
+ }
122
+ }
123
+
124
+ static::$checkedDuplicates[] = $oldPath;
125
+ }
126
+ }
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class BonefishInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'Packages/{$vendor}/{$name}/'
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\DependencyResolver\Pool;
5
+
6
+ class CakePHPInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'plugin' => 'Plugin/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name to CamelCase
14
+ */
15
+ public function inflectPackageVars($vars)
16
+ {
17
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
18
+ return $vars;
19
+ }
20
+
21
+ $nameParts = explode('/', $vars['name']);
22
+ foreach ($nameParts as &$value) {
23
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
24
+ $value = str_replace(array('-', '_'), ' ', $value);
25
+ $value = str_replace(' ', '', ucwords($value));
26
+ }
27
+ $vars['name'] = implode('/', $nameParts);
28
+
29
+ return $vars;
30
+ }
31
+
32
+ /**
33
+ * Change the default plugin location when cakephp >= 3.0
34
+ */
35
+ public function getLocations()
36
+ {
37
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
38
+ $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
39
+ }
40
+ return $this->locations;
41
+ }
42
+
43
+ /**
44
+ * Check if CakePHP version matches against a version
45
+ *
46
+ * @param string $matcher
47
+ * @param string $version
48
+ * @return bool
49
+ */
50
+ protected function matchesCakeVersion($matcher, $version)
51
+ {
52
+ if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
53
+ $multiClass = 'Composer\Semver\Constraint\MultiConstraint';
54
+ $constraintClass = 'Composer\Semver\Constraint\Constraint';
55
+ } else {
56
+ $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
57
+ $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
58
+ }
59
+
60
+ $repositoryManager = $this->composer->getRepositoryManager();
61
+ if ($repositoryManager) {
62
+ $repos = $repositoryManager->getLocalRepository();
63
+ if (!$repos) {
64
+ return false;
65
+ }
66
+ $cake3 = new $multiClass(array(
67
+ new $constraintClass($matcher, $version),
68
+ new $constraintClass('!=', '9999999-dev'),
69
+ ));
70
+ $pool = new Pool('dev');
71
+ $pool->addRepository($repos);
72
+ $packages = $pool->whatProvides('cakephp/cakephp');
73
+ foreach ($packages as $package) {
74
+ $installed = new $constraintClass('=', $package->getVersion());
75
+ if ($cake3->matches($installed)) {
76
+ return true;
77
+ }
78
+ }
79
+ }
80
+ return false;
81
+ }
82
+ }
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ChefInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'cookbook' => 'Chef/{$vendor}/{$name}/',
8
+ 'role' => 'Chef/roles/{$name}/',
9
+ );
10
+ }
11
+
vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CiviCrmInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'ext' => 'ext/{$name}/'
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ClanCatsFrameworkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'ship' => 'CCF/orbit/{$name}/',
8
+ 'theme' => 'CCF/app/themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CockpitInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'cockpit/modules/addons/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format module name.
12
+ *
13
+ * Strip `module-` prefix from package name.
14
+ *
15
+ * @param array @vars
16
+ *
17
+ * @return array
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] == 'cockpit-module') {
22
+ return $this->inflectModuleVars($vars);
23
+ }
24
+
25
+ return $vars;
26
+ }
27
+
28
+ public function inflectModuleVars($vars)
29
+ {
30
+ $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
31
+
32
+ return $vars;
33
+ }
34
+ }
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CodeIgniterInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'application/libraries/{$name}/',
8
+ 'third-party' => 'application/third_party/{$name}/',
9
+ 'module' => 'application/modules/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Concrete5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'concrete/',
8
+ 'block' => 'application/blocks/{$name}/',
9
+ 'package' => 'packages/{$name}/',
10
+ 'theme' => 'application/themes/{$name}/',
11
+ 'update' => 'updates/{$name}/',
12
+ );
13
+ }
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Installer for Craft Plugins
6
+ */
7
+ class CraftInstaller extends BaseInstaller
8
+ {
9
+ const NAME_PREFIX = 'craft';
10
+ const NAME_SUFFIX = 'plugin';
11
+
12
+ protected $locations = array(
13
+ 'plugin' => 'craft/plugins/{$name}/',
14
+ );
15
+
16
+ /**
17
+ * Strip `craft-` prefix and/or `-plugin` suffix from package names
18
+ *
19
+ * @param array $vars
20
+ *
21
+ * @return array
22
+ */
23
+ final public function inflectPackageVars($vars)
24
+ {
25
+ return $this->inflectPluginVars($vars);
26
+ }
27
+
28
+ private function inflectPluginVars($vars)
29
+ {
30
+ $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
31
+ $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
32
+
33
+ return $vars;
34
+ }
35
+ }
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CroogoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'Plugin/{$name}/',
8
+ 'theme' => 'View/Themed/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DecibelInstaller extends BaseInstaller
5
+ {
6
+ /** @var array */
7
+ protected $locations = array(
8
+ 'app' => 'app/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/DframeInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class DframeInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'module' => 'modules/{$vendor}/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DokuWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'lib/plugins/{$name}/',
8
+ 'template' => 'lib/tpl/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type dokuwiki-plugin, cut off a trailing '-plugin',
15
+ * or leading dokuwiki_ if present.
16
+ *
17
+ * For package type dokuwiki-template, cut off a trailing '-template' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+
23
+ if ($vars['type'] === 'dokuwiki-plugin') {
24
+ return $this->inflectPluginVars($vars);
25
+ }
26
+
27
+ if ($vars['type'] === 'dokuwiki-template') {
28
+ return $this->inflectTemplateVars($vars);
29
+ }
30
+
31
+ return $vars;
32
+ }
33
+
34
+ protected function inflectPluginVars($vars)
35
+ {
36
+ $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
37
+ $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
38
+
39
+ return $vars;
40
+ }
41
+
42
+ protected function inflectTemplateVars($vars)
43
+ {
44
+ $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
45
+ $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
46
+
47
+ return $vars;
48
+ }
49
+
50
+ }
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class DolibarrInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ * @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
9
+ */
10
+ class DolibarrInstaller extends BaseInstaller
11
+ {
12
+ //TODO: Add support for scripts and themes
13
+ protected $locations = array(
14
+ 'module' => 'htdocs/custom/{$name}/',
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DrupalInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'theme' => 'themes/{$name}/',
10
+ 'library' => 'libraries/{$name}/',
11
+ 'profile' => 'profiles/{$name}/',
12
+ 'drush' => 'drush/{$name}/',
13
+ 'custom-theme' => 'themes/custom/{$name}/',
14
+ 'custom-module' => 'modules/custom/{$name}/',
15
+ 'custom-profile' => 'profiles/custom/{$name}/',
16
+ 'drupal-multisite' => 'sites/{$name}/',
17
+ 'console' => 'console/{$name}/',
18
+ 'console-language' => 'console/language/{$name}/',
19
+ );
20
+ }
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ElggInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'mod/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class EliasisInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'plugin' => 'plugins/{$name}/',
10
+ 'template' => 'templates/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class ExpressionEngineInstaller extends BaseInstaller
7
+ {
8
+
9
+ protected $locations = array();
10
+
11
+ private $ee2Locations = array(
12
+ 'addon' => 'system/expressionengine/third_party/{$name}/',
13
+ 'theme' => 'themes/third_party/{$name}/',
14
+ );
15
+
16
+ private $ee3Locations = array(
17
+ 'addon' => 'system/user/addons/{$name}/',
18
+ 'theme' => 'themes/user/{$name}/',
19
+ );
20
+
21
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
22
+ {
23
+
24
+ $version = "{$frameworkType}Locations";
25
+ $this->locations = $this->$version;
26
+
27
+ return parent::getInstallPath($package, $frameworkType);
28
+ }
29
+ }
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class EzPlatformInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'meta-assets' => 'web/assets/ezplatform/',
8
+ 'assets' => 'web/assets/ezplatform/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'fuel/app/modules/{$name}/',
8
+ 'package' => 'fuel/packages/{$name}/',
9
+ 'theme' => 'fuel/app/themes/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelphpInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/GravInstaller.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class GravInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'user/plugins/{$name}/',
8
+ 'theme' => 'user/themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name
13
+ *
14
+ * @param array $vars
15
+ *
16
+ * @return array
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $restrictedWords = implode('|', array_keys($this->locations));
21
+
22
+ $vars['name'] = strtolower($vars['name']);
23
+ $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
24
+ '$1',
25
+ $vars['name']
26
+ );
27
+
28
+ return $vars;
29
+ }
30
+ }
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class HuradInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'plugins/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $nameParts = explode('/', $vars['name']);
17
+ foreach ($nameParts as &$value) {
18
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
19
+ $value = str_replace(array('-', '_'), ' ', $value);
20
+ $value = str_replace(' ', '', ucwords($value));
21
+ }
22
+ $vars['name'] = implode('/', $nameParts);
23
+ return $vars;
24
+ }
25
+ }
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ImageCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'template' => 'templates/{$name}/',
8
+ 'module' => 'application/modules/{$name}/',
9
+ 'library' => 'application/libraries/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/Installer.php ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Composer;
6
+ use Composer\Installer\BinaryInstaller;
7
+ use Composer\Installer\LibraryInstaller;
8
+ use Composer\IO\IOInterface;
9
+ use Composer\Package\PackageInterface;
10
+ use Composer\Repository\InstalledRepositoryInterface;
11
+ use Composer\Util\Filesystem;
12
+
13
+ class Installer extends LibraryInstaller
14
+ {
15
+
16
+ /**
17
+ * Package types to installer class map
18
+ *
19
+ * @var array
20
+ */
21
+ private $supportedTypes = array(
22
+ 'aimeos' => 'AimeosInstaller',
23
+ 'asgard' => 'AsgardInstaller',
24
+ 'attogram' => 'AttogramInstaller',
25
+ 'agl' => 'AglInstaller',
26
+ 'annotatecms' => 'AnnotateCmsInstaller',
27
+ 'bitrix' => 'BitrixInstaller',
28
+ 'bonefish' => 'BonefishInstaller',
29
+ 'cakephp' => 'CakePHPInstaller',
30
+ 'chef' => 'ChefInstaller',
31
+ 'civicrm' => 'CiviCrmInstaller',
32
+ 'ccframework' => 'ClanCatsFrameworkInstaller',
33
+ 'cockpit' => 'CockpitInstaller',
34
+ 'codeigniter' => 'CodeIgniterInstaller',
35
+ 'concrete5' => 'Concrete5Installer',
36
+ 'craft' => 'CraftInstaller',
37
+ 'croogo' => 'CroogoInstaller',
38
+ 'dframe' => 'DframeInstaller',
39
+ 'dokuwiki' => 'DokuWikiInstaller',
40
+ 'dolibarr' => 'DolibarrInstaller',
41
+ 'decibel' => 'DecibelInstaller',
42
+ 'drupal' => 'DrupalInstaller',
43
+ 'elgg' => 'ElggInstaller',
44
+ 'eliasis' => 'EliasisInstaller',
45
+ 'ee3' => 'ExpressionEngineInstaller',
46
+ 'ee2' => 'ExpressionEngineInstaller',
47
+ 'ezplatform' => 'EzPlatformInstaller',
48
+ 'fuel' => 'FuelInstaller',
49
+ 'fuelphp' => 'FuelphpInstaller',
50
+ 'grav' => 'GravInstaller',
51
+ 'hurad' => 'HuradInstaller',
52
+ 'imagecms' => 'ImageCMSInstaller',
53
+ 'itop' => 'ItopInstaller',
54
+ 'joomla' => 'JoomlaInstaller',
55
+ 'kanboard' => 'KanboardInstaller',
56
+ 'kirby' => 'KirbyInstaller',
57
+ 'known' => 'KnownInstaller',
58
+ 'kodicms' => 'KodiCMSInstaller',
59
+ 'kohana' => 'KohanaInstaller',
60
+ 'lms' => 'LanManagementSystemInstaller',
61
+ 'laravel' => 'LaravelInstaller',
62
+ 'lavalite' => 'LavaLiteInstaller',
63
+ 'lithium' => 'LithiumInstaller',
64
+ 'magento' => 'MagentoInstaller',
65
+ 'majima' => 'MajimaInstaller',
66
+ 'mako' => 'MakoInstaller',
67
+ 'maya' => 'MayaInstaller',
68
+ 'mautic' => 'MauticInstaller',
69
+ 'mediawiki' => 'MediaWikiInstaller',
70
+ 'microweber' => 'MicroweberInstaller',
71
+ 'modulework' => 'MODULEWorkInstaller',
72
+ 'modx' => 'ModxInstaller',
73
+ 'modxevo' => 'MODXEvoInstaller',
74
+ 'moodle' => 'MoodleInstaller',
75
+ 'october' => 'OctoberInstaller',
76
+ 'ontowiki' => 'OntoWikiInstaller',
77
+ 'oxid' => 'OxidInstaller',
78
+ 'osclass' => 'OsclassInstaller',
79
+ 'pxcms' => 'PxcmsInstaller',
80
+ 'phpbb' => 'PhpBBInstaller',
81
+ 'pimcore' => 'PimcoreInstaller',
82
+ 'piwik' => 'PiwikInstaller',
83
+ 'plentymarkets'=> 'PlentymarketsInstaller',
84
+ 'ppi' => 'PPIInstaller',
85
+ 'puppet' => 'PuppetInstaller',
86
+ 'radphp' => 'RadPHPInstaller',
87
+ 'phifty' => 'PhiftyInstaller',
88
+ 'porto' => 'PortoInstaller',
89
+ 'redaxo' => 'RedaxoInstaller',
90
+ 'redaxo5' => 'Redaxo5Installer',
91
+ 'reindex' => 'ReIndexInstaller',
92
+ 'roundcube' => 'RoundcubeInstaller',
93
+ 'shopware' => 'ShopwareInstaller',
94
+ 'sitedirect' => 'SiteDirectInstaller',
95
+ 'silverstripe' => 'SilverStripeInstaller',
96
+ 'smf' => 'SMFInstaller',
97
+ 'sydes' => 'SyDESInstaller',
98
+ 'symfony1' => 'Symfony1Installer',
99
+ 'tao' => 'TaoInstaller',
100
+ 'thelia' => 'TheliaInstaller',
101
+ 'tusk' => 'TuskInstaller',
102
+ 'typo3-cms' => 'TYPO3CmsInstaller',
103
+ 'typo3-flow' => 'TYPO3FlowInstaller',
104
+ 'userfrosting' => 'UserFrostingInstaller',
105
+ 'vanilla' => 'VanillaInstaller',
106
+ 'whmcs' => 'WHMCSInstaller',
107
+ 'wolfcms' => 'WolfCMSInstaller',
108
+ 'wordpress' => 'WordPressInstaller',
109
+ 'yawik' => 'YawikInstaller',
110
+ 'zend' => 'ZendInstaller',
111
+ 'zikula' => 'ZikulaInstaller',
112
+ 'prestashop' => 'PrestashopInstaller'
113
+ );
114
+
115
+ /**
116
+ * Installer constructor.
117
+ *
118
+ * Disables installers specified in main composer extra installer-disable
119
+ * list
120
+ *
121
+ * @param IOInterface $io
122
+ * @param Composer $composer
123
+ * @param string $type
124
+ * @param Filesystem|null $filesystem
125
+ * @param BinaryInstaller|null $binaryInstaller
126
+ */
127
+ public function __construct(
128
+ IOInterface $io,
129
+ Composer $composer,
130
+ $type = 'library',
131
+ Filesystem $filesystem = null,
132
+ BinaryInstaller $binaryInstaller = null
133
+ ) {
134
+ parent::__construct($io, $composer, $type, $filesystem,
135
+ $binaryInstaller);
136
+ $this->removeDisabledInstallers();
137
+ }
138
+
139
+ /**
140
+ * {@inheritDoc}
141
+ */
142
+ public function getInstallPath(PackageInterface $package)
143
+ {
144
+ $type = $package->getType();
145
+ $frameworkType = $this->findFrameworkType($type);
146
+
147
+ if ($frameworkType === false) {
148
+ throw new \InvalidArgumentException(
149
+ 'Sorry the package type of this package is not yet supported.'
150
+ );
151
+ }
152
+
153
+ $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
154
+ $installer = new $class($package, $this->composer, $this->getIO());
155
+
156
+ return $installer->getInstallPath($package, $frameworkType);
157
+ }
158
+
159
+ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
160
+ {
161
+ parent::uninstall($repo, $package);
162
+ $installPath = $this->getPackageBasePath($package);
163
+ $this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
164
+ }
165
+
166
+ /**
167
+ * {@inheritDoc}
168
+ */
169
+ public function supports($packageType)
170
+ {
171
+ $frameworkType = $this->findFrameworkType($packageType);
172
+
173
+ if ($frameworkType === false) {
174
+ return false;
175
+ }
176
+
177
+ $locationPattern = $this->getLocationPattern($frameworkType);
178
+
179
+ return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
180
+ }
181
+
182
+ /**
183
+ * Finds a supported framework type if it exists and returns it
184
+ *
185
+ * @param string $type
186
+ * @return string
187
+ */
188
+ protected function findFrameworkType($type)
189
+ {
190
+ $frameworkType = false;
191
+
192
+ krsort($this->supportedTypes);
193
+
194
+ foreach ($this->supportedTypes as $key => $val) {
195
+ if ($key === substr($type, 0, strlen($key))) {
196
+ $frameworkType = substr($type, 0, strlen($key));
197
+ break;
198
+ }
199
+ }
200
+
201
+ return $frameworkType;
202
+ }
203
+
204
+ /**
205
+ * Get the second part of the regular expression to check for support of a
206
+ * package type
207
+ *
208
+ * @param string $frameworkType
209
+ * @return string
210
+ */
211
+ protected function getLocationPattern($frameworkType)
212
+ {
213
+ $pattern = false;
214
+ if (!empty($this->supportedTypes[$frameworkType])) {
215
+ $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
216
+ /** @var BaseInstaller $framework */
217
+ $framework = new $frameworkClass(null, $this->composer, $this->getIO());
218
+ $locations = array_keys($framework->getLocations());
219
+ $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
220
+ }
221
+
222
+ return $pattern ? : '(\w+)';
223
+ }
224
+
225
+ /**
226
+ * Get I/O object
227
+ *
228
+ * @return IOInterface
229
+ */
230
+ private function getIO()
231
+ {
232
+ return $this->io;
233
+ }
234
+
235
+ /**
236
+ * Look for installers set to be disabled in composer's extra config and
237
+ * remove them from the list of supported installers.
238
+ *
239
+ * Globals:
240
+ * - true, "all", and "*" - disable all installers.
241
+ * - false - enable all installers (useful with
242
+ * wikimedia/composer-merge-plugin or similar)
243
+ *
244
+ * @return void
245
+ */
246
+ protected function removeDisabledInstallers()
247
+ {
248
+ $extra = $this->composer->getPackage()->getExtra();
249
+
250
+ if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
251
+ // No installers are disabled
252
+ return;
253
+ }
254
+
255
+ // Get installers to disable
256
+ $disable = $extra['installer-disable'];
257
+
258
+ // Ensure $disabled is an array
259
+ if (!is_array($disable)) {
260
+ $disable = array($disable);
261
+ }
262
+
263
+ // Check which installers should be disabled
264
+ $all = array(true, "all", "*");
265
+ $intersect = array_intersect($all, $disable);
266
+ if (!empty($intersect)) {
267
+ // Disable all installers
268
+ $this->supportedTypes = array();
269
+ } else {
270
+ // Disable specified installers
271
+ foreach ($disable as $key => $installer) {
272
+ if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
273
+ unset($this->supportedTypes[$installer]);
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ItopInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'extensions/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class JoomlaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'template' => 'templates/{$name}/',
10
+ 'plugin' => 'plugins/{$name}/',
11
+ 'library' => 'libraries/{$name}/',
12
+ );
13
+
14
+ // TODO: Add inflector for mod_ and com_ names
15
+ }
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ *
6
+ * Installer for kanboard plugins
7
+ *
8
+ * kanboard.net
9
+ *
10
+ * Class KanboardInstaller
11
+ * @package Composer\Installers
12
+ */
13
+ class KanboardInstaller extends BaseInstaller
14
+ {
15
+ protected $locations = array(
16
+ 'plugin' => 'plugins/{$name}/',
17
+ );
18
+ }
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KirbyInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'site/plugins/{$name}/',
8
+ 'field' => 'site/fields/{$name}/',
9
+ 'tag' => 'site/tags/{$name}/'
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/KnownInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KnownInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'IdnoPlugins/{$name}/',
8
+ 'theme' => 'Themes/{$name}/',
9
+ 'console' => 'ConsolePlugins/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KodiCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'cms/plugins/{$name}/',
8
+ 'media' => 'cms/media/vendor/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KohanaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class LanManagementSystemInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'plugin' => 'plugins/{$name}/',
10
+ 'template' => 'templates/{$name}/',
11
+ 'document-template' => 'documents/templates/{$name}/',
12
+ 'userpanel-module' => 'userpanel/modules/{$name}/',
13
+ );
14
+
15
+ /**
16
+ * Format package name to CamelCase
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
21
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
22
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
23
+
24
+ return $vars;
25
+ }
26
+
27
+ }
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LaravelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LavaLiteInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'packages/{$vendor}/{$name}/',
8
+ 'theme' => 'public/themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LithiumInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ 'source' => 'libraries/_source/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MODULEWorkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle MODX Evolution specifics when installing packages.
6
+ */
7
+ class MODXEvoInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'snippet' => 'assets/snippets/{$name}/',
11
+ 'plugin' => 'assets/plugins/{$name}/',
12
+ 'module' => 'assets/modules/{$name}/',
13
+ 'template' => 'assets/templates/{$name}/',
14
+ 'lib' => 'assets/lib/{$name}/'
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MagentoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'app/design/frontend/{$name}/',
8
+ 'skin' => 'skin/frontend/default/{$name}/',
9
+ 'library' => 'lib/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin/theme installer for majima
6
+ * @author David Neustadt
7
+ */
8
+ class MajimaInstaller extends BaseInstaller
9
+ {
10
+ protected $locations = array(
11
+ 'plugin' => 'plugins/{$name}/',
12
+ );
13
+
14
+ /**
15
+ * Transforms the names
16
+ * @param array $vars
17
+ * @return array
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ return $this->correctPluginName($vars);
22
+ }
23
+
24
+ /**
25
+ * Change hyphenated names to camelcase
26
+ * @param array $vars
27
+ * @return array
28
+ */
29
+ private function correctPluginName($vars)
30
+ {
31
+ $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
32
+ return strtoupper($matches[0][1]);
33
+ }, $vars['name']);
34
+ $vars['name'] = ucfirst($camelCasedName);
35
+ return $vars;
36
+ }
37
+ }
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MakoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'app/packages/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MauticInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name of mautic-plugins to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ if ($vars['type'] == 'mautic-plugin') {
17
+ $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
18
+ return strtoupper($matches[0][1]);
19
+ }, ucfirst($vars['name']));
20
+ }
21
+
22
+ return $vars;
23
+ }
24
+
25
+ }
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MayaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name.
12
+ *
13
+ * For package type maya-module, cut off a trailing '-module' if present.
14
+ *
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ if ($vars['type'] === 'maya-module') {
19
+ return $this->inflectModuleVars($vars);
20
+ }
21
+
22
+ return $vars;
23
+ }
24
+
25
+ protected function inflectModuleVars($vars)
26
+ {
27
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
28
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
29
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
30
+
31
+ return $vars;
32
+ }
33
+ }
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MediaWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'extension' => 'extensions/{$name}/',
9
+ 'skin' => 'skins/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name.
14
+ *
15
+ * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
16
+ * to CamelCase keeping existing uppercase chars.
17
+ *
18
+ * For package type mediawiki-skin, cut off a trailing '-skin' if present.
19
+ *
20
+ */
21
+ public function inflectPackageVars($vars)
22
+ {
23
+
24
+ if ($vars['type'] === 'mediawiki-extension') {
25
+ return $this->inflectExtensionVars($vars);
26
+ }
27
+
28
+ if ($vars['type'] === 'mediawiki-skin') {
29
+ return $this->inflectSkinVars($vars);
30
+ }
31
+
32
+ return $vars;
33
+ }
34
+
35
+ protected function inflectExtensionVars($vars)
36
+ {
37
+ $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
38
+ $vars['name'] = str_replace('-', ' ', $vars['name']);
39
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
40
+
41
+ return $vars;
42
+ }
43
+
44
+ protected function inflectSkinVars($vars)
45
+ {
46
+ $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
47
+
48
+ return $vars;
49
+ }
50
+
51
+ }
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MicroweberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'userfiles/modules/{$install_item_dir}/',
8
+ 'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
9
+ 'template' => 'userfiles/templates/{$install_item_dir}/',
10
+ 'element' => 'userfiles/elements/{$install_item_dir}/',
11
+ 'vendor' => 'vendor/{$install_item_dir}/',
12
+ 'components' => 'components/{$install_item_dir}/'
13
+ );
14
+
15
+ /**
16
+ * Format package name.
17
+ *
18
+ * For package type microweber-module, cut off a trailing '-module' if present
19
+ *
20
+ * For package type microweber-template, cut off a trailing '-template' if present.
21
+ *
22
+ */
23
+ public function inflectPackageVars($vars)
24
+ {
25
+
26
+
27
+ if ($this->package->getTargetDir()) {
28
+ $vars['install_item_dir'] = $this->package->getTargetDir();
29
+ } else {
30
+ $vars['install_item_dir'] = $vars['name'];
31
+ if ($vars['type'] === 'microweber-template') {
32
+ return $this->inflectTemplateVars($vars);
33
+ }
34
+ if ($vars['type'] === 'microweber-templates') {
35
+ return $this->inflectTemplatesVars($vars);
36
+ }
37
+ if ($vars['type'] === 'microweber-core') {
38
+ return $this->inflectCoreVars($vars);
39
+ }
40
+ if ($vars['type'] === 'microweber-adapter') {
41
+ return $this->inflectCoreVars($vars);
42
+ }
43
+ if ($vars['type'] === 'microweber-module') {
44
+ return $this->inflectModuleVars($vars);
45
+ }
46
+ if ($vars['type'] === 'microweber-modules') {
47
+ return $this->inflectModulesVars($vars);
48
+ }
49
+ if ($vars['type'] === 'microweber-skin') {
50
+ return $this->inflectSkinVars($vars);
51
+ }
52
+ if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
53
+ return $this->inflectElementVars($vars);
54
+ }
55
+ }
56
+
57
+
58
+ return $vars;
59
+ }
60
+
61
+ protected function inflectTemplateVars($vars)
62
+ {
63
+ $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
64
+ $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
65
+
66
+ return $vars;
67
+ }
68
+
69
+ protected function inflectTemplatesVars($vars)
70
+ {
71
+ $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
72
+ $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
73
+
74
+ return $vars;
75
+ }
76
+
77
+ protected function inflectCoreVars($vars)
78
+ {
79
+ $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
80
+ $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
81
+ $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
82
+
83
+ return $vars;
84
+ }
85
+
86
+ protected function inflectModuleVars($vars)
87
+ {
88
+ $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
89
+ $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
90
+
91
+ return $vars;
92
+ }
93
+
94
+ protected function inflectModulesVars($vars)
95
+ {
96
+ $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
97
+ $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
98
+
99
+ return $vars;
100
+ }
101
+
102
+ protected function inflectSkinVars($vars)
103
+ {
104
+ $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
105
+ $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
106
+
107
+ return $vars;
108
+ }
109
+
110
+ protected function inflectElementVars($vars)
111
+ {
112
+ $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
113
+ $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
114
+ $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
115
+ $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
116
+
117
+ return $vars;
118
+ }
119
+ }
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle MODX specifics when installing packages.
6
+ */
7
+ class ModxInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'extra' => 'core/packages/{$name}/'
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MoodleInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'mod' => 'mod/{$name}/',
8
+ 'admin_report' => 'admin/report/{$name}/',
9
+ 'atto' => 'lib/editor/atto/plugins/{$name}/',
10
+ 'tool' => 'admin/tool/{$name}/',
11
+ 'assignment' => 'mod/assignment/type/{$name}/',
12
+ 'assignsubmission' => 'mod/assign/submission/{$name}/',
13
+ 'assignfeedback' => 'mod/assign/feedback/{$name}/',
14
+ 'auth' => 'auth/{$name}/',
15
+ 'availability' => 'availability/condition/{$name}/',
16
+ 'block' => 'blocks/{$name}/',
17
+ 'booktool' => 'mod/book/tool/{$name}/',
18
+ 'cachestore' => 'cache/stores/{$name}/',
19
+ 'cachelock' => 'cache/locks/{$name}/',
20
+ 'calendartype' => 'calendar/type/{$name}/',
21
+ 'format' => 'course/format/{$name}/',
22
+ 'coursereport' => 'course/report/{$name}/',
23
+ 'customcertelement' => 'mod/customcert/element/{$name}/',
24
+ 'datafield' => 'mod/data/field/{$name}/',
25
+ 'datapreset' => 'mod/data/preset/{$name}/',
26
+ 'editor' => 'lib/editor/{$name}/',
27
+ 'enrol' => 'enrol/{$name}/',
28
+ 'filter' => 'filter/{$name}/',
29
+ 'gradeexport' => 'grade/export/{$name}/',
30
+ 'gradeimport' => 'grade/import/{$name}/',
31
+ 'gradereport' => 'grade/report/{$name}/',
32
+ 'gradingform' => 'grade/grading/form/{$name}/',
33
+ 'local' => 'local/{$name}/',
34
+ 'logstore' => 'admin/tool/log/store/{$name}/',
35
+ 'ltisource' => 'mod/lti/source/{$name}/',
36
+ 'ltiservice' => 'mod/lti/service/{$name}/',
37
+ 'message' => 'message/output/{$name}/',
38
+ 'mnetservice' => 'mnet/service/{$name}/',
39
+ 'plagiarism' => 'plagiarism/{$name}/',
40
+ 'portfolio' => 'portfolio/{$name}/',
41
+ 'qbehaviour' => 'question/behaviour/{$name}/',
42
+ 'qformat' => 'question/format/{$name}/',
43
+ 'qtype' => 'question/type/{$name}/',
44
+ 'quizaccess' => 'mod/quiz/accessrule/{$name}/',
45
+ 'quiz' => 'mod/quiz/report/{$name}/',
46
+ 'report' => 'report/{$name}/',
47
+ 'repository' => 'repository/{$name}/',
48
+ 'scormreport' => 'mod/scorm/report/{$name}/',
49
+ 'search' => 'search/engine/{$name}/',
50
+ 'theme' => 'theme/{$name}/',
51
+ 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
52
+ 'profilefield' => 'user/profile/field/{$name}/',
53
+ 'webservice' => 'webservice/{$name}/',
54
+ 'workshopallocation' => 'mod/workshop/allocation/{$name}/',
55
+ 'workshopeval' => 'mod/workshop/eval/{$name}/',
56
+ 'workshopform' => 'mod/workshop/form/{$name}/'
57
+ );
58
+ }
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OctoberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'plugin' => 'plugins/{$vendor}/{$name}/',
9
+ 'theme' => 'themes/{$name}/'
10
+ );
11
+
12
+ /**
13
+ * Format package name.
14
+ *
15
+ * For package type october-plugin, cut off a trailing '-plugin' if present.
16
+ *
17
+ * For package type october-theme, cut off a trailing '-theme' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+ if ($vars['type'] === 'october-plugin') {
23
+ return $this->inflectPluginVars($vars);
24
+ }
25
+
26
+ if ($vars['type'] === 'october-theme') {
27
+ return $this->inflectThemeVars($vars);
28
+ }
29
+
30
+ return $vars;
31
+ }
32
+
33
+ protected function inflectPluginVars($vars)
34
+ {
35
+ $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
36
+ $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
44
+
45
+ return $vars;
46
+ }
47
+ }
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OntoWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'extensions/{$name}/',
8
+ 'theme' => 'extensions/themes/{$name}/',
9
+ 'translation' => 'extensions/translations/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name to lower case and remove ".ontowiki" suffix
14
+ */
15
+ public function inflectPackageVars($vars)
16
+ {
17
+ $vars['name'] = strtolower($vars['name']);
18
+ $vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
19
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
20
+ $vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
21
+
22
+ return $vars;
23
+ }
24
+ }
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+
5
+ class OsclassInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'plugin' => 'oc-content/plugins/{$name}/',
10
+ 'theme' => 'oc-content/themes/{$name}/',
11
+ 'language' => 'oc-content/languages/{$name}/',
12
+ );
13
+
14
+ }
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class OxidInstaller extends BaseInstaller
7
+ {
8
+ const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
9
+
10
+ protected $locations = array(
11
+ 'module' => 'modules/{$name}/',
12
+ 'theme' => 'application/views/{$name}/',
13
+ 'out' => 'out/{$name}/',
14
+ );
15
+
16
+ /**
17
+ * getInstallPath
18
+ *
19
+ * @param PackageInterface $package
20
+ * @param string $frameworkType
21
+ * @return void
22
+ */
23
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+ {
25
+ $installPath = parent::getInstallPath($package, $frameworkType);
26
+ $type = $this->package->getType();
27
+ if ($type === 'oxid-module') {
28
+ $this->prepareVendorDirectory($installPath);
29
+ }
30
+ return $installPath;
31
+ }
32
+
33
+ /**
34
+ * prepareVendorDirectory
35
+ *
36
+ * Makes sure there is a vendormetadata.php file inside
37
+ * the vendor folder if there is a vendor folder.
38
+ *
39
+ * @param string $installPath
40
+ * @return void
41
+ */
42
+ protected function prepareVendorDirectory($installPath)
43
+ {
44
+ $matches = '';
45
+ $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
46
+ if (!$hasVendorDirectory) {
47
+ return;
48
+ }
49
+
50
+ $vendorDirectory = $matches['vendor'];
51
+ $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
52
+ if (!file_exists($vendorPath)) {
53
+ mkdir($vendorPath, 0755, true);
54
+ }
55
+
56
+ $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
57
+ touch($vendorMetaDataPath);
58
+ }
59
+ }
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PPIInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PhiftyInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'bundle' => 'bundles/{$name}/',
8
+ 'library' => 'libraries/{$name}/',
9
+ 'framework' => 'frameworks/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PhpBBInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$vendor}/{$name}/',
8
+ 'language' => 'language/{$name}/',
9
+ 'style' => 'styles/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PimcoreInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
16
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class PiwikInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ */
9
+ class PiwikInstaller extends BaseInstaller
10
+ {
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $locations = array(
15
+ 'plugin' => 'plugins/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Format package name to CamelCase
20
+ * @param array $vars
21
+ *
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PlentymarketsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => '{$name}/'
8
+ );
9
+
10
+ /**
11
+ * Remove hyphen, "plugin" and format to camelcase
12
+ * @param array $vars
13
+ *
14
+ * @return array
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ $vars['name'] = explode("-", $vars['name']);
19
+ foreach ($vars['name'] as $key => $name) {
20
+ $vars['name'][$key] = ucfirst($vars['name'][$key]);
21
+ if (strcasecmp($name, "Plugin") == 0) {
22
+ unset($vars['name'][$key]);
23
+ }
24
+ }
25
+ $vars['name'] = implode("",$vars['name']);
26
+
27
+ return $vars;
28
+ }
29
+ }
vendor/composer/installers/src/Composer/Installers/Plugin.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Composer;
6
+ use Composer\IO\IOInterface;
7
+ use Composer\Plugin\PluginInterface;
8
+
9
+ class Plugin implements PluginInterface
10
+ {
11
+
12
+ public function activate(Composer $composer, IOInterface $io)
13
+ {
14
+ $installer = new Installer($io, $composer);
15
+ $composer->getInstallationManager()->addInstaller($installer);
16
+ }
17
+ }
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PortoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'container' => 'app/Containers/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PrestashopInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class PuppetInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'module' => 'modules/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PxcmsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'app/Modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * @param array $vars
15
+ *
16
+ * @return array
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ if ($vars['type'] === 'pxcms-module') {
21
+ return $this->inflectModuleVars($vars);
22
+ }
23
+
24
+ if ($vars['type'] === 'pxcms-theme') {
25
+ return $this->inflectThemeVars($vars);
26
+ }
27
+
28
+ return $vars;
29
+ }
30
+
31
+ /**
32
+ * For package type pxcms-module, cut off a trailing '-plugin' if present.
33
+ *
34
+ * return string
35
+ */
36
+ protected function inflectModuleVars($vars)
37
+ {
38
+ $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
39
+ $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
40
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
41
+ $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
42
+ $vars['name'] = ucwords($vars['name']); // make module name camelcased
43
+
44
+ return $vars;
45
+ }
46
+
47
+
48
+ /**
49
+ * For package type pxcms-module, cut off a trailing '-plugin' if present.
50
+ *
51
+ * return string
52
+ */
53
+ protected function inflectThemeVars($vars)
54
+ {
55
+ $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
56
+ $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
57
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
58
+ $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
59
+ $vars['name'] = ucwords($vars['name']); // make module name camelcased
60
+
61
+ return $vars;
62
+ }
63
+ }
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RadPHPInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'bundle' => 'src/{$name}/'
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $nameParts = explode('/', $vars['name']);
16
+ foreach ($nameParts as &$value) {
17
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
18
+ $value = str_replace(array('-', '_'), ' ', $value);
19
+ $value = str_replace(' ', '', ucwords($value));
20
+ }
21
+ $vars['name'] = implode('/', $nameParts);
22
+ return $vars;
23
+ }
24
+ }
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ReIndexInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'themes/{$name}/',
8
+ 'plugin' => 'plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Redaxo5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'addon' => 'redaxo/src/addons/{$name}/',
8
+ 'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RedaxoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'addon' => 'redaxo/include/addons/{$name}/',
8
+ 'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RoundcubeInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Lowercase name and changes the name to a underscores
12
+ *
13
+ * @param array $vars
14
+ * @return array
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ $vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
19
+
20
+ return $vars;
21
+ }
22
+ }
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class SMFInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'Sources/{$name}/',
8
+ 'theme' => 'Themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin/theme installer for shopware
6
+ * @author Benjamin Boit
7
+ */
8
+ class ShopwareInstaller extends BaseInstaller
9
+ {
10
+ protected $locations = array(
11
+ 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
12
+ 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
13
+ 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
14
+ 'theme' => 'templates/{$name}/',
15
+ 'plugin' => 'custom/plugins/{$name}/',
16
+ 'frontend-theme' => 'themes/Frontend/{$name}/',
17
+ );
18
+
19
+ /**
20
+ * Transforms the names
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ if ($vars['type'] === 'shopware-theme') {
27
+ return $this->correctThemeName($vars);
28
+ }
29
+
30
+ return $this->correctPluginName($vars);
31
+ }
32
+
33
+ /**
34
+ * Changes the name to a camelcased combination of vendor and name
35
+ * @param array $vars
36
+ * @return array
37
+ */
38
+ private function correctPluginName($vars)
39
+ {
40
+ $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
41
+ return strtoupper($matches[0][1]);
42
+ }, $vars['name']);
43
+
44
+ $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
45
+
46
+ return $vars;
47
+ }
48
+
49
+ /**
50
+ * Changes the name to a underscore separated name
51
+ * @param array $vars
52
+ * @return array
53
+ */
54
+ private function correctThemeName($vars)
55
+ {
56
+ $vars['name'] = str_replace('-', '_', $vars['name']);
57
+
58
+ return $vars;
59
+ }
60
+ }
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class SilverStripeInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'module' => '{$name}/',
10
+ 'theme' => 'themes/{$name}/',
11
+ );
12
+
13
+ /**
14
+ * Return the install path based on package type.
15
+ *
16
+ * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
17
+ * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
18
+ *
19
+ * @param PackageInterface $package
20
+ * @param string $frameworkType
21
+ * @return string
22
+ */
23
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+ {
25
+ if (
26
+ $package->getName() == 'silverstripe/framework'
27
+ && preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
28
+ && version_compare($package->getVersion(), '2.999.999') < 0
29
+ ) {
30
+ return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
31
+ }
32
+
33
+ return parent::getInstallPath($package, $frameworkType);
34
+ }
35
+ }
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class SiteDirectInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'module' => 'modules/{$vendor}/{$name}/',
9
+ 'plugin' => 'plugins/{$vendor}/{$name}/'
10
+ );
11
+
12
+ public function inflectPackageVars($vars)
13
+ {
14
+ return $this->parseVars($vars);
15
+ }
16
+
17
+ protected function parseVars($vars)
18
+ {
19
+ $vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
20
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
21
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
22
+
23
+ return $vars;
24
+ }
25
+ }
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class SyDESInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'app/modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format module name.
13
+ *
14
+ * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
15
+ *
16
+ * @param array @vars
17
+ *
18
+ * @return array
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+ if ($vars['type'] == 'sydes-module') {
23
+ return $this->inflectModuleVars($vars);
24
+ }
25
+
26
+ if ($vars['type'] === 'sydes-theme') {
27
+ return $this->inflectThemeVars($vars);
28
+ }
29
+
30
+ return $vars;
31
+ }
32
+
33
+ public function inflectModuleVars($vars)
34
+ {
35
+ $vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
36
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
37
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
38
+
39
+ return $vars;
40
+ }
41
+
42
+ protected function inflectThemeVars($vars)
43
+ {
44
+ $vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
45
+ $vars['name'] = strtolower($vars['name']);
46
+
47
+ return $vars;
48
+ }
49
+ }
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin installer for symfony 1.x
6
+ *
7
+ * @author Jérôme Tamarelle <jerome@tamarelle.net>
8
+ */
9
+ class Symfony1Installer extends BaseInstaller
10
+ {
11
+ protected $locations = array(
12
+ 'plugin' => 'plugins/{$name}/',
13
+ );
14
+
15
+ /**
16
+ * Format package name to CamelCase
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
21
+ return strtoupper($matches[0][1]);
22
+ }, $vars['name']);
23
+
24
+ return $vars;
25
+ }
26
+ }
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Extension installer for TYPO3 CMS
6
+ *
7
+ * @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
8
+ *
9
+ * @author Sascha Egerer <sascha.egerer@dkd.de>
10
+ */
11
+ class TYPO3CmsInstaller extends BaseInstaller
12
+ {
13
+ protected $locations = array(
14
+ 'extension' => 'typo3conf/ext/{$name}/',
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TYPO3 Flow specifics when installing packages.
6
+ */
7
+ class TYPO3FlowInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'package' => 'Packages/Application/{$name}/',
11
+ 'framework' => 'Packages/Framework/{$name}/',
12
+ 'plugin' => 'Packages/Plugins/{$name}/',
13
+ 'site' => 'Packages/Sites/{$name}/',
14
+ 'boilerplate' => 'Packages/Boilerplates/{$name}/',
15
+ 'build' => 'Build/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Modify the package name to be a TYPO3 Flow style key.
20
+ *
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $autoload = $this->package->getAutoload();
27
+ if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
28
+ $namespace = key($autoload['psr-0']);
29
+ $vars['name'] = str_replace('\\', '.', $namespace);
30
+ }
31
+ if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
32
+ $namespace = key($autoload['psr-4']);
33
+ $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
34
+ }
35
+
36
+ return $vars;
37
+ }
38
+ }
vendor/composer/installers/src/Composer/Installers/TaoInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TAO extensions.
6
+ */
7
+ class TaoInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'extension' => '{$name}'
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class TheliaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'local/modules/{$name}/',
8
+ 'frontoffice-template' => 'templates/frontOffice/{$name}/',
9
+ 'backoffice-template' => 'templates/backOffice/{$name}/',
10
+ 'email-template' => 'templates/email/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+ /**
4
+ * Composer installer for 3rd party Tusk utilities
5
+ * @author Drew Ewing <drew@phenocode.com>
6
+ */
7
+ class TuskInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'task' => '.tusk/tasks/{$name}/',
11
+ 'command' => '.tusk/commands/{$name}/',
12
+ 'asset' => 'assets/tusk/{$name}/',
13
+ );
14
+ }
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class UserFrostingInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'sprinkle' => 'app/sprinkles/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class VanillaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class VgmcpInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'bundle' => 'src/{$vendor}/{$name}/',
8
+ 'theme' => 'themes/{$name}/'
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
15
+ *
16
+ * For package type vgmcp-theme, cut off a trailing '-theme' if present.
17
+ *
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] === 'vgmcp-bundle') {
22
+ return $this->inflectPluginVars($vars);
23
+ }
24
+
25
+ if ($vars['type'] === 'vgmcp-theme') {
26
+ return $this->inflectThemeVars($vars);
27
+ }
28
+
29
+ return $vars;
30
+ }
31
+
32
+ protected function inflectPluginVars($vars)
33
+ {
34
+ $vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
35
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
36
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
44
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
45
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
46
+
47
+ return $vars;
48
+ }
49
+ }
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class WHMCSInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'addons' => 'modules/addons/{$vendor}_{$name}/',
9
+ 'fraud' => 'modules/fraud/{$vendor}_{$name}/',
10
+ 'gateways' => 'modules/gateways/{$vendor}_{$name}/',
11
+ 'notifications' => 'modules/notifications/{$vendor}_{$name}/',
12
+ 'registrars' => 'modules/registrars/{$vendor}_{$name}/',
13
+ 'reports' => 'modules/reports/{$vendor}_{$name}/',
14
+ 'security' => 'modules/security/{$vendor}_{$name}/',
15
+ 'servers' => 'modules/servers/{$vendor}_{$name}/',
16
+ 'social' => 'modules/social/{$vendor}_{$name}/',
17
+ 'support' => 'modules/support/{$vendor}_{$name}/',
18
+ 'templates' => 'templates/{$vendor}_{$name}/',
19
+ 'includes' => 'includes/{$vendor}_{$name}/'
20
+ );
21
+ }
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WolfCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wolf/plugins/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WordPressInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wp-content/plugins/{$name}/',
8
+ 'theme' => 'wp-content/themes/{$name}/',
9
+ 'muplugin' => 'wp-content/mu-plugins/{$name}/',
10
+ 'dropin' => 'wp-content/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: cbleek
5
+ * Date: 25.03.16
6
+ * Time: 20:55
7
+ */
8
+
9
+ namespace Composer\Installers;
10
+
11
+
12
+ class YawikInstaller extends BaseInstaller
13
+ {
14
+ protected $locations = array(
15
+ 'module' => 'module/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Format package name to CamelCase
20
+ * @param array $vars
21
+ *
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZendInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'library/{$name}/',
8
+ 'extra' => 'extras/library/{$name}/',
9
+ 'module' => 'module/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZikulaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$vendor}-{$name}/',
8
+ 'theme' => 'themes/{$vendor}-{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/bootstrap.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function includeIfExists($file)
3
+ {
4
+ if (file_exists($file)) {
5
+ return include $file;
6
+ }
7
+ }
8
+ if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
9
+ die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
10
+ 'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
11
+ 'php composer.phar install'.PHP_EOL);
12
+ }
13
+ return $loader;
vendor/firebase/php-jwt/LICENSE ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2011, Neuman Vong
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above
12
+ copyright notice, this list of conditions and the following
13
+ disclaimer in the documentation and/or other materials provided
14
+ with the distribution.
15
+
16
+ * Neither the name of Neuman Vong nor the names of other
17
+ contributors may be used to endorse or promote products derived
18
+ from this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vendor/firebase/php-jwt/README.md ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [![Build Status](https://travis-ci.org/firebase/php-jwt.png?branch=master)](https://travis-ci.org/firebase/php-jwt)
2
+ [![Latest Stable Version](https://poser.pugx.org/firebase/php-jwt/v/stable)](https://packagist.org/packages/firebase/php-jwt)
3
+ [![Total Downloads](https://poser.pugx.org/firebase/php-jwt/downloads)](https://packagist.org/packages/firebase/php-jwt)
4
+ [![License](https://poser.pugx.org/firebase/php-jwt/license)](https://packagist.org/packages/firebase/php-jwt)
5
+
6
+ PHP-JWT
7
+ =======
8
+ A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to [RFC 7519](https://tools.ietf.org/html/rfc7519).
9
+
10
+ Installation
11
+ ------------
12
+
13
+ Use composer to manage your dependencies and download PHP-JWT:
14
+
15
+ ```bash
16
+ composer require firebase/php-jwt
17
+ ```
18
+
19
+ Example
20
+ -------
21
+ ```php
22
+ <?php
23
+ use \Firebase\JWT\JWT;
24
+
25
+ $key = "example_key";
26
+ $token = array(
27
+ "iss" => "http://example.org",
28
+ "aud" => "http://example.com",
29
+ "iat" => 1356999524,
30
+ "nbf" => 1357000000
31
+ );
32
+
33
+ /**
34
+ * IMPORTANT:
35
+ * You must specify supported algorithms for your application. See
36
+ * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
37
+ * for a list of spec-compliant algorithms.
38
+ */
39
+ $jwt = JWT::encode($token, $key);
40
+ $decoded = JWT::decode($jwt, $key, array('HS256'));
41
+
42
+ print_r($decoded);
43
+
44
+ /*
45
+ NOTE: This will now be an object instead of an associative array. To get
46
+ an associative array, you will need to cast it as such:
47
+ */
48
+
49
+ $decoded_array = (array) $decoded;
50
+
51
+ /**
52
+ * You can add a leeway to account for when there is a clock skew times between
53
+ * the signing and verifying servers. It is recommended that this leeway should
54
+ * not be bigger than a few minutes.
55
+ *
56
+ * Source: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#nbfDef
57
+ */
58
+ JWT::$leeway = 60; // $leeway in seconds
59
+ $decoded = JWT::decode($jwt, $key, array('HS256'));
60
+
61
+ ?>
62
+ ```
63
+ Example with RS256 (openssl)
64
+ ----------------------------
65
+ ```php
66
+ <?php
67
+ use \Firebase\JWT\JWT;
68
+
69
+ $privateKey = <<<EOD
70
+ -----BEGIN RSA PRIVATE KEY-----
71
+ MIICXAIBAAKBgQC8kGa1pSjbSYZVebtTRBLxBz5H4i2p/llLCrEeQhta5kaQu/Rn
72
+ vuER4W8oDH3+3iuIYW4VQAzyqFpwuzjkDI+17t5t0tyazyZ8JXw+KgXTxldMPEL9
73
+ 5+qVhgXvwtihXC1c5oGbRlEDvDF6Sa53rcFVsYJ4ehde/zUxo6UvS7UrBQIDAQAB
74
+ AoGAb/MXV46XxCFRxNuB8LyAtmLDgi/xRnTAlMHjSACddwkyKem8//8eZtw9fzxz
75
+ bWZ/1/doQOuHBGYZU8aDzzj59FZ78dyzNFoF91hbvZKkg+6wGyd/LrGVEB+Xre0J
76
+ Nil0GReM2AHDNZUYRv+HYJPIOrB0CRczLQsgFJ8K6aAD6F0CQQDzbpjYdx10qgK1
77
+ cP59UHiHjPZYC0loEsk7s+hUmT3QHerAQJMZWC11Qrn2N+ybwwNblDKv+s5qgMQ5
78
+ 5tNoQ9IfAkEAxkyffU6ythpg/H0Ixe1I2rd0GbF05biIzO/i77Det3n4YsJVlDck
79
+ ZkcvY3SK2iRIL4c9yY6hlIhs+K9wXTtGWwJBAO9Dskl48mO7woPR9uD22jDpNSwe
80
+ k90OMepTjzSvlhjbfuPN1IdhqvSJTDychRwn1kIJ7LQZgQ8fVz9OCFZ/6qMCQGOb
81
+ qaGwHmUK6xzpUbbacnYrIM6nLSkXgOAwv7XXCojvY614ILTK3iXiLBOxPu5Eu13k
82
+ eUz9sHyD6vkgZzjtxXECQAkp4Xerf5TGfQXGXhxIX52yH+N2LtujCdkQZjXAsGdm
83
+ B2zNzvrlgRmgBrklMTrMYgm1NPcW+bRLGcwgW2PTvNM=
84
+ -----END RSA PRIVATE KEY-----
85
+ EOD;
86
+
87
+ $publicKey = <<<EOD
88
+ -----BEGIN PUBLIC KEY-----
89
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8kGa1pSjbSYZVebtTRBLxBz5H
90
+ 4i2p/llLCrEeQhta5kaQu/RnvuER4W8oDH3+3iuIYW4VQAzyqFpwuzjkDI+17t5t
91
+ 0tyazyZ8JXw+KgXTxldMPEL95+qVhgXvwtihXC1c5oGbRlEDvDF6Sa53rcFVsYJ4
92
+ ehde/zUxo6UvS7UrBQIDAQAB
93
+ -----END PUBLIC KEY-----
94
+ EOD;
95
+
96
+ $token = array(
97
+ "iss" => "example.org",
98
+ "aud" => "example.com",
99
+ "iat" => 1356999524,
100
+ "nbf" => 1357000000
101
+ );
102
+
103
+ $jwt = JWT::encode($token, $privateKey, 'RS256');
104
+ echo "Encode:\n" . print_r($jwt, true) . "\n";
105
+
106
+ $decoded = JWT::decode($jwt, $publicKey, array('RS256'));
107
+
108
+ /*
109
+ NOTE: This will now be an object instead of an associative array. To get
110
+ an associative array, you will need to cast it as such:
111
+ */
112
+
113
+ $decoded_array = (array) $decoded;
114
+ echo "Decode:\n" . print_r($decoded_array, true) . "\n";
115
+ ?>
116
+ ```
117
+
118
+ Changelog
119
+ ---------
120
+
121
+ #### 5.0.0 / 2017-06-26
122
+ - Support RS384 and RS512.
123
+ See [#117](https://github.com/firebase/php-jwt/pull/117). Thanks [@joostfaassen](https://github.com/joostfaassen)!
124
+ - Add an example for RS256 openssl.
125
+ See [#125](https://github.com/firebase/php-jwt/pull/125). Thanks [@akeeman](https://github.com/akeeman)!
126
+ - Detect invalid Base64 encoding in signature.
127
+ See [#162](https://github.com/firebase/php-jwt/pull/162). Thanks [@psignoret](https://github.com/psignoret)!
128
+ - Update `JWT::verify` to handle OpenSSL errors.
129
+ See [#159](https://github.com/firebase/php-jwt/pull/159). Thanks [@bshaffer](https://github.com/bshaffer)!
130
+ - Add `array` type hinting to `decode` method
131
+ See [#101](https://github.com/firebase/php-jwt/pull/101). Thanks [@hywak](https://github.com/hywak)!
132
+ - Add all JSON error types.
133
+ See [#110](https://github.com/firebase/php-jwt/pull/110). Thanks [@gbalduzzi](https://github.com/gbalduzzi)!
134
+ - Bugfix 'kid' not in given key list.
135
+ See [#129](https://github.com/firebase/php-jwt/pull/129). Thanks [@stampycode](https://github.com/stampycode)!
136
+ - Miscellaneous cleanup, documentation and test fixes.
137
+ See [#107](https://github.com/firebase/php-jwt/pull/107), [#115](https://github.com/firebase/php-jwt/pull/115),
138
+ [#160](https://github.com/firebase/php-jwt/pull/160), [#161](https://github.com/firebase/php-jwt/pull/161), and
139
+ [#165](https://github.com/firebase/php-jwt/pull/165). Thanks [@akeeman](https://github.com/akeeman),
140
+ [@chinedufn](https://github.com/chinedufn), and [@bshaffer](https://github.com/bshaffer)!
141
+
142
+ #### 4.0.0 / 2016-07-17
143
+ - Add support for late static binding. See [#88](https://github.com/firebase/php-jwt/pull/88) for details. Thanks to [@chappy84](https://github.com/chappy84)!
144
+ - Use static `$timestamp` instead of `time()` to improve unit testing. See [#93](https://github.com/firebase/php-jwt/pull/93) for details. Thanks to [@josephmcdermott](https://github.com/josephmcdermott)!
145
+ - Fixes to exceptions classes. See [#81](https://github.com/firebase/php-jwt/pull/81) for details. Thanks to [@Maks3w](https://github.com/Maks3w)!
146
+ - Fixes to PHPDoc. See [#76](https://github.com/firebase/php-jwt/pull/76) for details. Thanks to [@akeeman](https://github.com/akeeman)!
147
+
148
+ #### 3.0.0 / 2015-07-22
149
+ - Minimum PHP version updated from `5.2.0` to `5.3.0`.
150
+ - Add `\Firebase\JWT` namespace. See
151
+ [#59](https://github.com/firebase/php-jwt/pull/59) for details. Thanks to
152
+ [@Dashron](https://github.com/Dashron)!
153
+ - Require a non-empty key to decode and verify a JWT. See
154
+ [#60](https://github.com/firebase/php-jwt/pull/60) for details. Thanks to
155
+ [@sjones608](https://github.com/sjones608)!
156
+ - Cleaner documentation blocks in the code. See
157
+ [#62](https://github.com/firebase/php-jwt/pull/62) for details. Thanks to
158
+ [@johanderuijter](https://github.com/johanderuijter)!
159
+
160
+ #### 2.2.0 / 2015-06-22
161
+ - Add support for adding custom, optional JWT headers to `JWT::encode()`. See
162
+ [#53](https://github.com/firebase/php-jwt/pull/53/files) for details. Thanks to
163
+ [@mcocaro](https://github.com/mcocaro)!
164
+
165
+ #### 2.1.0 / 2015-05-20
166
+ - Add support for adding a leeway to `JWT:decode()` that accounts for clock skew
167
+ between signing and verifying entities. Thanks to [@lcabral](https://github.com/lcabral)!
168
+ - Add support for passing an object implementing the `ArrayAccess` interface for
169
+ `$keys` argument in `JWT::decode()`. Thanks to [@aztech-dev](https://github.com/aztech-dev)!
170
+
171
+ #### 2.0.0 / 2015-04-01
172
+ - **Note**: It is strongly recommended that you update to > v2.0.0 to address
173
+ known security vulnerabilities in prior versions when both symmetric and
174
+ asymmetric keys are used together.
175
+ - Update signature for `JWT::decode(...)` to require an array of supported
176
+ algorithms to use when verifying token signatures.
177
+
178
+
179
+ Tests
180
+ -----
181
+ Run the tests using phpunit:
182
+
183
+ ```bash
184
+ $ pear install PHPUnit
185
+ $ phpunit --configuration phpunit.xml.dist
186
+ PHPUnit 3.7.10 by Sebastian Bergmann.
187
+ .....
188
+ Time: 0 seconds, Memory: 2.50Mb
189
+ OK (5 tests, 5 assertions)
190
+ ```
191
+
192
+ New Lines in private keys
193
+ -----
194
+
195
+ If your private key contains `\n` characters, be sure to wrap it in double quotes `""`
196
+ and not single quotes `''` in order to properly interpret the escaped characters.
197
+
198
+ License
199
+ -------
200
+ [3-Clause BSD](http://opensource.org/licenses/BSD-3-Clause).
vendor/firebase/php-jwt/composer.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "firebase/php-jwt",
3
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
4
+ "homepage": "https://github.com/firebase/php-jwt",
5
+ "authors": [
6
+ {
7
+ "name": "Neuman Vong",
8
+ "email": "neuman+pear@twilio.com",
9
+ "role": "Developer"
10
+ },
11
+ {
12
+ "name": "Anant Narayanan",
13
+ "email": "anant@php.net",
14
+ "role": "Developer"
15
+ }
16
+ ],
17
+ "license": "BSD-3-Clause",
18
+ "require": {
19
+ "php": ">=5.3.0"
20
+ },
21
+ "autoload": {
22
+ "psr-4": {
23
+ "Firebase\\JWT\\": "src"
24
+ }
25
+ },
26
+ "require-dev": {
27
+ "phpunit/phpunit": " 4.8.35"
28
+ }
29
+ }
vendor/firebase/php-jwt/src/BeforeValidException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Firebase\JWT;
3
+
4
+ class BeforeValidException extends \UnexpectedValueException
5
+ {
6
+
7
+ }
vendor/firebase/php-jwt/src/ExpiredException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Firebase\JWT;
3
+
4
+ class ExpiredException extends \UnexpectedValueException
5
+ {
6
+
7
+ }
vendor/firebase/php-jwt/src/JWT.php ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Firebase\JWT;
4
+ use \DomainException;
5
+ use \InvalidArgumentException;
6
+ use \UnexpectedValueException;
7
+ use \DateTime;
8
+
9
+ /**
10
+ * JSON Web Token implementation, based on this spec:
11
+ * https://tools.ietf.org/html/rfc7519
12
+ *
13
+ * PHP version 5
14
+ *
15
+ * @category Authentication
16
+ * @package Authentication_JWT
17
+ * @author Neuman Vong <neuman@twilio.com>
18
+ * @author Anant Narayanan <anant@php.net>
19
+ * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
20
+ * @link https://github.com/firebase/php-jwt
21
+ */
22
+ class JWT
23
+ {
24
+
25
+ /**
26
+ * When checking nbf, iat or expiration times,
27
+ * we want to provide some extra leeway time to
28
+ * account for clock skew.
29
+ */
30
+ public static $leeway = 0;
31
+
32
+ /**
33
+ * Allow the current timestamp to be specified.
34
+ * Useful for fixing a value within unit testing.
35
+ *
36
+ * Will default to PHP time() value if null.
37
+ */
38
+ public static $timestamp = null;
39
+
40
+ public static $supported_algs = array(
41
+ 'HS256' => array('hash_hmac', 'SHA256'),
42
+ 'HS512' => array('hash_hmac', 'SHA512'),
43
+ 'HS384' => array('hash_hmac', 'SHA384'),
44
+ 'RS256' => array('openssl', 'SHA256'),
45
+ 'RS384' => array('openssl', 'SHA384'),
46
+ 'RS512' => array('openssl', 'SHA512'),
47
+ );
48
+
49
+ /**
50
+ * Decodes a JWT string into a PHP object.
51
+ *
52
+ * @param string $jwt The JWT
53
+ * @param string|array $key The key, or map of keys.
54
+ * If the algorithm used is asymmetric, this is the public key
55
+ * @param array $allowed_algs List of supported verification algorithms
56
+ * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
57
+ *
58
+ * @return object The JWT's payload as a PHP object
59
+ *
60
+ * @throws UnexpectedValueException Provided JWT was invalid
61
+ * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
62
+ * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
63
+ * @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
64
+ * @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
65
+ *
66
+ * @uses jsonDecode
67
+ * @uses urlsafeB64Decode
68
+ */
69
+ public static function decode($jwt, $key, array $allowed_algs = array())
70
+ {
71
+ $timestamp = is_null(static::$timestamp) ? time() : static::$timestamp;
72
+
73
+ if (empty($key)) {
74
+ throw new InvalidArgumentException('Key may not be empty');
75
+ }
76
+ $tks = explode('.', $jwt);
77
+ if (count($tks) != 3) {
78
+ throw new UnexpectedValueException('Wrong number of segments');
79
+ }
80
+ list($headb64, $bodyb64, $cryptob64) = $tks;
81
+ if (null === ($header = static::jsonDecode(static::urlsafeB64Decode($headb64)))) {
82
+ throw new UnexpectedValueException('Invalid header encoding');
83
+ }
84
+ if (null === $payload = static::jsonDecode(static::urlsafeB64Decode($bodyb64))) {
85
+ throw new UnexpectedValueException('Invalid claims encoding');
86
+ }
87
+ if (false === ($sig = static::urlsafeB64Decode($cryptob64))) {
88
+ throw new UnexpectedValueException('Invalid signature encoding');
89
+ }
90
+ if (empty($header->alg)) {
91
+ throw new UnexpectedValueException('Empty algorithm');
92
+ }
93
+ if (empty(static::$supported_algs[$header->alg])) {
94
+ throw new UnexpectedValueException('Algorithm not supported');
95
+ }
96
+ if (!in_array($header->alg, $allowed_algs)) {
97
+ throw new UnexpectedValueException('Algorithm not allowed');
98
+ }
99
+ if (is_array($key) || $key instanceof \ArrayAccess) {
100
+ if (isset($header->kid)) {
101
+ if (!isset($key[$header->kid])) {
102
+ throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key');
103
+ }
104
+ $key = $key[$header->kid];
105
+ } else {
106
+ throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
107
+ }
108
+ }
109
+
110
+ // Check the signature
111
+ if (!static::verify("$headb64.$bodyb64", $sig, $key, $header->alg)) {
112
+ throw new SignatureInvalidException('Signature verification failed');
113
+ }
114
+
115
+ // Check if the nbf if it is defined. This is the time that the
116
+ // token can actually be used. If it's not yet that time, abort.
117
+ if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) {
118
+ throw new BeforeValidException(
119
+ 'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->nbf)
120
+ );
121
+ }
122
+
123
+ // Check that this token has been created before 'now'. This prevents
124
+ // using tokens that have been created for later use (and haven't
125
+ // correctly used the nbf claim).
126
+ if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
127
+ throw new BeforeValidException(
128
+ 'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->iat)
129
+ );
130
+ }
131
+
132
+ // Check if this token has expired.
133
+ if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {
134
+ throw new ExpiredException('Expired token');
135
+ }
136
+
137
+ return $payload;
138
+ }
139
+
140
+ /**
141
+ * Converts and signs a PHP object or array into a JWT string.
142
+ *
143
+ * @param object|array $payload PHP object or array
144
+ * @param string $key The secret key.
145
+ * If the algorithm used is asymmetric, this is the private key
146
+ * @param string $alg The signing algorithm.
147
+ * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
148
+ * @param mixed $keyId
149
+ * @param array $head An array with header elements to attach
150
+ *
151
+ * @return string A signed JWT
152
+ *
153
+ * @uses jsonEncode
154
+ * @uses urlsafeB64Encode
155
+ */
156
+ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)
157
+ {
158
+ $header = array('typ' => 'JWT', 'alg' => $alg);
159
+ if ($keyId !== null) {
160
+ $header['kid'] = $keyId;
161
+ }
162
+ if ( isset($head) && is_array($head) ) {
163
+ $header = array_merge($head, $header);
164
+ }
165
+ $segments = array();
166
+ $segments[] = static::urlsafeB64Encode(static::jsonEncode($header));
167
+ $segments[] = static::urlsafeB64Encode(static::jsonEncode($payload));
168
+ $signing_input = implode('.', $segments);
169
+
170
+ $signature = static::sign($signing_input, $key, $alg);
171
+ $segments[] = static::urlsafeB64Encode($signature);
172
+
173
+ return implode('.', $segments);
174
+ }
175
+
176
+ /**
177
+ * Sign a string with a given key and algorithm.
178
+ *
179
+ * @param string $msg The message to sign
180
+ * @param string|resource $key The secret key
181
+ * @param string $alg The signing algorithm.
182
+ * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
183
+ *
184
+ * @return string An encrypted message
185
+ *
186
+ * @throws DomainException Unsupported algorithm was specified
187
+ */
188
+ public static function sign($msg, $key, $alg = 'HS256')
189
+ {
190
+ if (empty(static::$supported_algs[$alg])) {
191
+ throw new DomainException('Algorithm not supported');
192
+ }
193
+ list($function, $algorithm) = static::$supported_algs[$alg];
194
+ switch($function) {
195
+ case 'hash_hmac':
196
+ return hash_hmac($algorithm, $msg, $key, true);
197
+ case 'openssl':
198
+ $signature = '';
199
+ $success = openssl_sign($msg, $signature, $key, $algorithm);
200
+ if (!$success) {
201
+ throw new DomainException("OpenSSL unable to sign data");
202
+ } else {
203
+ return $signature;
204
+ }
205
+ }
206
+ }
207
+
208
+ /**
209
+ * Verify a signature with the message, key and method. Not all methods
210
+ * are symmetric, so we must have a separate verify and sign method.
211
+ *
212
+ * @param string $msg The original message (header and body)
213
+ * @param string $signature The original signature
214
+ * @param string|resource $key For HS*, a string key works. for RS*, must be a resource of an openssl public key
215
+ * @param string $alg The algorithm
216
+ *
217
+ * @return bool
218
+ *
219
+ * @throws DomainException Invalid Algorithm or OpenSSL failure
220
+ */
221
+ private static function verify($msg, $signature, $key, $alg)
222
+ {
223
+ if (empty(static::$supported_algs[$alg])) {
224
+ throw new DomainException('Algorithm not supported');
225
+ }
226
+
227
+ list($function, $algorithm) = static::$supported_algs[$alg];
228
+ switch($function) {
229
+ case 'openssl':
230
+ $success = openssl_verify($msg, $signature, $key, $algorithm);
231
+ if ($success === 1) {
232
+ return true;
233
+ } elseif ($success === 0) {
234
+ return false;
235
+ }
236
+ // returns 1 on success, 0 on failure, -1 on error.
237
+ throw new DomainException(
238
+ 'OpenSSL error: ' . openssl_error_string()
239
+ );
240
+ case 'hash_hmac':
241
+ default:
242
+ $hash = hash_hmac($algorithm, $msg, $key, true);
243
+ if (function_exists('hash_equals')) {
244
+ return hash_equals($signature, $hash);
245
+ }
246
+ $len = min(static::safeStrlen($signature), static::safeStrlen($hash));
247
+
248
+ $status = 0;
249
+ for ($i = 0; $i < $len; $i++) {
250
+ $status |= (ord($signature[$i]) ^ ord($hash[$i]));
251
+ }
252
+ $status |= (static::safeStrlen($signature) ^ static::safeStrlen($hash));
253
+
254
+ return ($status === 0);
255
+ }
256
+ }
257
+
258
+ /**
259
+ * Decode a JSON string into a PHP object.
260
+ *
261
+ * @param string $input JSON string
262
+ *
263
+ * @return object Object representation of JSON string
264
+ *
265
+ * @throws DomainException Provided string was invalid JSON
266
+ */
267
+ public static function jsonDecode($input)
268
+ {
269
+ if (version_compare(PHP_VERSION, '5.4.0', '>=') && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) {
270
+ /** In PHP >=5.4.0, json_decode() accepts an options parameter, that allows you
271
+ * to specify that large ints (like Steam Transaction IDs) should be treated as
272
+ * strings, rather than the PHP default behaviour of converting them to floats.
273
+ */
274
+ $obj = json_decode($input, false, 512, JSON_BIGINT_AS_STRING);
275
+ } else {
276
+ /** Not all servers will support that, however, so for older versions we must
277
+ * manually detect large ints in the JSON string and quote them (thus converting
278
+ *them to strings) before decoding, hence the preg_replace() call.
279
+ */
280
+ $max_int_length = strlen((string) PHP_INT_MAX) - 1;
281
+ $json_without_bigints = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $input);
282
+ $obj = json_decode($json_without_bigints);
283
+ }
284
+
285
+ if (function_exists('json_last_error') && $errno = json_last_error()) {
286
+ static::handleJsonError($errno);
287
+ } elseif ($obj === null && $input !== 'null') {
288
+ throw new DomainException('Null result with non-null input');
289
+ }
290
+ return $obj;
291
+ }
292
+
293
+ /**
294
+ * Encode a PHP object into a JSON string.
295
+ *
296
+ * @param object|array $input A PHP object or array
297
+ *
298
+ * @return string JSON representation of the PHP object or array
299
+ *
300
+ * @throws DomainException Provided object could not be encoded to valid JSON
301
+ */
302
+ public static function jsonEncode($input)
303
+ {
304
+ $json = json_encode($input);
305
+ if (function_exists('json_last_error') && $errno = json_last_error()) {
306
+ static::handleJsonError($errno);
307
+ } elseif ($json === 'null' && $input !== null) {
308
+ throw new DomainException('Null result with non-null input');
309
+ }
310
+ return $json;
311
+ }
312
+
313
+ /**
314
+ * Decode a string with URL-safe Base64.
315
+ *
316
+ * @param string $input A Base64 encoded string
317
+ *
318
+ * @return string A decoded string
319
+ */
320
+ public static function urlsafeB64Decode($input)
321
+ {
322
+ $remainder = strlen($input) % 4;
323
+ if ($remainder) {
324
+ $padlen = 4 - $remainder;
325
+ $input .= str_repeat('=', $padlen);
326
+ }
327
+ return base64_decode(strtr($input, '-_', '+/'));
328
+ }
329
+
330
+ /**
331
+ * Encode a string with URL-safe Base64.
332
+ *
333
+ * @param string $input The string you want encoded
334
+ *
335
+ * @return string The base64 encode of what you passed in
336
+ */
337
+ public static function urlsafeB64Encode($input)
338
+ {
339
+ return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
340
+ }
341
+
342
+ /**
343
+ * Helper method to create a JSON error.
344
+ *
345
+ * @param int $errno An error number from json_last_error()
346
+ *
347
+ * @return void
348
+ */
349
+ private static function handleJsonError($errno)
350
+ {
351
+ $messages = array(
352
+ JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
353
+ JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',
354
+ JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
355
+ JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON',
356
+ JSON_ERROR_UTF8 => 'Malformed UTF-8 characters' //PHP >= 5.3.3
357
+ );
358
+ throw new DomainException(
359
+ isset($messages[$errno])
360
+ ? $messages[$errno]
361
+ : 'Unknown JSON error: ' . $errno
362
+ );
363
+ }
364
+
365
+ /**
366
+ * Get the number of bytes in cryptographic strings.
367
+ *
368
+ * @param string
369
+ *
370
+ * @return int
371
+ */
372
+ private static function safeStrlen($str)
373
+ {
374
+ if (function_exists('mb_strlen')) {
375
+ return mb_strlen($str, '8bit');
376
+ }
377
+ return strlen($str);
378
+ }
379
+ }
vendor/firebase/php-jwt/src/SignatureInvalidException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Firebase\JWT;
3
+
4
+ class SignatureInvalidException extends \UnexpectedValueException
5
+ {
6
+
7
+ }
vendor/guzzlehttp/guzzle/.php_cs ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // 'ordered_imports' => true,
11
+ // 'phpdoc_align' => ['align'=>'vertical'],
12
+ // 'native_function_invocation' => true,
13
+ ])
14
+ ->setFinder(
15
+ PhpCsFixer\Finder::create()
16
+ ->in(__DIR__.'/src')
17
+ ->name('*.php')
18
+ )
19
+ ;
20
+
21
+ return $config;
vendor/guzzlehttp/guzzle/CHANGELOG.md ADDED
@@ -0,0 +1,1304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+
3
+ ## 6.4.1 - 2019-10-23
4
+
5
+ * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
6
+ * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
7
+
8
+ ## 6.4.0 - 2019-10-23
9
+
10
+ * Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
11
+ * Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081)
12
+ * Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161)
13
+ * Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163)
14
+ * Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242)
15
+ * Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284)
16
+ * Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273)
17
+ * Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
18
+ * Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
19
+
20
+ ## 6.3.3 - 2018-04-22
21
+
22
+ * Fix: Default headers when decode_content is specified
23
+
24
+
25
+ ## 6.3.2 - 2018-03-26
26
+
27
+ * Fix: Release process
28
+
29
+
30
+ ## 6.3.1 - 2018-03-26
31
+
32
+ * Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014)
33
+ * Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012)
34
+ * Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999)
35
+ * Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998)
36
+ * Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953)
37
+ * Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915)
38
+ * Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916)
39
+
40
+ + Minor code cleanups, documentation fixes and clarifications.
41
+
42
+
43
+ ## 6.3.0 - 2017-06-22
44
+
45
+ * Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659)
46
+ * Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621)
47
+ * Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580)
48
+ * Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609)
49
+ * Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641)
50
+ * Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611)
51
+ * 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)
52
+ * Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642)
53
+ * Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569)
54
+ * Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711)
55
+ * Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745)
56
+ * Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721)
57
+ * Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318)
58
+ * Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684)
59
+ * Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827)
60
+
61
+
62
+ + Minor code cleanups, documentation fixes and clarifications.
63
+
64
+ ## 6.2.3 - 2017-02-28
65
+
66
+ * Fix deprecations with guzzle/psr7 version 1.4
67
+
68
+ ## 6.2.2 - 2016-10-08
69
+
70
+ * Allow to pass nullable Response to delay callable
71
+ * Only add scheme when host is present
72
+ * Fix drain case where content-length is the literal string zero
73
+ * Obfuscate in-URL credentials in exceptions
74
+
75
+ ## 6.2.1 - 2016-07-18
76
+
77
+ * Address HTTP_PROXY security vulnerability, CVE-2016-5385:
78
+ https://httpoxy.org/
79
+ * Fixing timeout bug with StreamHandler:
80
+ https://github.com/guzzle/guzzle/pull/1488
81
+ * Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when
82
+ a server does not honor `Connection: close`.
83
+ * Ignore URI fragment when sending requests.
84
+
85
+ ## 6.2.0 - 2016-03-21
86
+
87
+ * Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`.
88
+ https://github.com/guzzle/guzzle/pull/1389
89
+ * Bug fix: Fix sleep calculation when waiting for delayed requests.
90
+ https://github.com/guzzle/guzzle/pull/1324
91
+ * Feature: More flexible history containers.
92
+ https://github.com/guzzle/guzzle/pull/1373
93
+ * Bug fix: defer sink stream opening in StreamHandler.
94
+ https://github.com/guzzle/guzzle/pull/1377
95
+ * Bug fix: do not attempt to escape cookie values.
96
+ https://github.com/guzzle/guzzle/pull/1406
97
+ * Feature: report original content encoding and length on decoded responses.
98
+ https://github.com/guzzle/guzzle/pull/1409
99
+ * Bug fix: rewind seekable request bodies before dispatching to cURL.
100
+ https://github.com/guzzle/guzzle/pull/1422
101
+ * Bug fix: provide an empty string to `http_build_query` for HHVM workaround.
102
+ https://github.com/guzzle/guzzle/pull/1367
103
+
104
+ ## 6.1.1 - 2015-11-22
105
+
106
+ * Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler
107
+ https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4
108
+ * Feature: HandlerStack is now more generic.
109
+ https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e
110
+ * Bug fix: setting verify to false in the StreamHandler now disables peer
111
+ verification. https://github.com/guzzle/guzzle/issues/1256
112
+ * Feature: Middleware now uses an exception factory, including more error
113
+ context. https://github.com/guzzle/guzzle/pull/1282
114
+ * Feature: better support for disabled functions.
115
+ https://github.com/guzzle/guzzle/pull/1287
116
+ * Bug fix: fixed regression where MockHandler was not using `sink`.
117
+ https://github.com/guzzle/guzzle/pull/1292
118
+
119
+ ## 6.1.0 - 2015-09-08
120
+
121
+ * Feature: Added the `on_stats` request option to provide access to transfer
122
+ statistics for requests. https://github.com/guzzle/guzzle/pull/1202
123
+ * Feature: Added the ability to persist session cookies in CookieJars.
124
+ https://github.com/guzzle/guzzle/pull/1195
125
+ * Feature: Some compatibility updates for Google APP Engine
126
+ https://github.com/guzzle/guzzle/pull/1216
127
+ * Feature: Added support for NO_PROXY to prevent the use of a proxy based on
128
+ a simple set of rules. https://github.com/guzzle/guzzle/pull/1197
129
+ * Feature: Cookies can now contain square brackets.
130
+ https://github.com/guzzle/guzzle/pull/1237
131
+ * Bug fix: Now correctly parsing `=` inside of quotes in Cookies.
132
+ https://github.com/guzzle/guzzle/pull/1232
133
+ * Bug fix: Cusotm cURL options now correctly override curl options of the
134
+ same name. https://github.com/guzzle/guzzle/pull/1221
135
+ * Bug fix: Content-Type header is now added when using an explicitly provided
136
+ multipart body. https://github.com/guzzle/guzzle/pull/1218
137
+ * Bug fix: Now ignoring Set-Cookie headers that have no name.
138
+ * Bug fix: Reason phrase is no longer cast to an int in some cases in the
139
+ cURL handler. https://github.com/guzzle/guzzle/pull/1187
140
+ * Bug fix: Remove the Authorization header when redirecting if the Host
141
+ header changes. https://github.com/guzzle/guzzle/pull/1207
142
+ * Bug fix: Cookie path matching fixes
143
+ https://github.com/guzzle/guzzle/issues/1129
144
+ * Bug fix: Fixing the cURL `body_as_string` setting
145
+ https://github.com/guzzle/guzzle/pull/1201
146
+ * Bug fix: quotes are no longer stripped when parsing cookies.
147
+ https://github.com/guzzle/guzzle/issues/1172
148
+ * Bug fix: `form_params` and `query` now always uses the `&` separator.
149
+ https://github.com/guzzle/guzzle/pull/1163
150
+ * Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
151
+ https://github.com/guzzle/guzzle/pull/1189
152
+
153
+ ## 6.0.2 - 2015-07-04
154
+
155
+ * Fixed a memory leak in the curl handlers in which references to callbacks
156
+ were not being removed by `curl_reset`.
157
+ * Cookies are now extracted properly before redirects.
158
+ * Cookies now allow more character ranges.
159
+ * Decoded Content-Encoding responses are now modified to correctly reflect
160
+ their state if the encoding was automatically removed by a handler. This
161
+ means that the `Content-Encoding` header may be removed an the
162
+ `Content-Length` modified to reflect the message size after removing the
163
+ encoding.
164
+ * Added a more explicit error message when trying to use `form_params` and
165
+ `multipart` in the same request.
166
+ * Several fixes for HHVM support.
167
+ * Functions are now conditionally required using an additional level of
168
+ indirection to help with global Composer installations.
169
+
170
+ ## 6.0.1 - 2015-05-27
171
+
172
+ * Fixed a bug with serializing the `query` request option where the `&`
173
+ separator was missing.
174
+ * Added a better error message for when `body` is provided as an array. Please
175
+ use `form_params` or `multipart` instead.
176
+ * Various doc fixes.
177
+
178
+ ## 6.0.0 - 2015-05-26
179
+
180
+ * See the UPGRADING.md document for more information.
181
+ * Added `multipart` and `form_params` request options.
182
+ * Added `synchronous` request option.
183
+ * Added the `on_headers` request option.
184
+ * Fixed `expect` handling.
185
+ * No longer adding default middlewares in the client ctor. These need to be
186
+ present on the provided handler in order to work.
187
+ * Requests are no longer initiated when sending async requests with the
188
+ CurlMultiHandler. This prevents unexpected recursion from requests completing
189
+ while ticking the cURL loop.
190
+ * Removed the semantics of setting `default` to `true`. This is no longer
191
+ required now that the cURL loop is not ticked for async requests.
192
+ * Added request and response logging middleware.
193
+ * No longer allowing self signed certificates when using the StreamHandler.
194
+ * Ensuring that `sink` is valid if saving to a file.
195
+ * Request exceptions now include a "handler context" which provides handler
196
+ specific contextual information.
197
+ * Added `GuzzleHttp\RequestOptions` to allow request options to be applied
198
+ using constants.
199
+ * `$maxHandles` has been removed from CurlMultiHandler.
200
+ * `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
201
+
202
+ ## 5.3.0 - 2015-05-19
203
+
204
+ * Mock now supports `save_to`
205
+ * Marked `AbstractRequestEvent::getTransaction()` as public.
206
+ * Fixed a bug in which multiple headers using different casing would overwrite
207
+ previous headers in the associative array.
208
+ * Added `Utils::getDefaultHandler()`
209
+ * Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
210
+ * URL scheme is now always lowercased.
211
+
212
+ ## 6.0.0-beta.1
213
+
214
+ * Requires PHP >= 5.5
215
+ * Updated to use PSR-7
216
+ * Requires immutable messages, which basically means an event based system
217
+ owned by a request instance is no longer possible.
218
+ * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7).
219
+ * Removed the dependency on `guzzlehttp/streams`. These stream abstractions
220
+ are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7`
221
+ namespace.
222
+ * Added middleware and handler system
223
+ * Replaced the Guzzle event and subscriber system with a middleware system.
224
+ * No longer depends on RingPHP, but rather places the HTTP handlers directly
225
+ in Guzzle, operating on PSR-7 messages.
226
+ * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which
227
+ means the `guzzlehttp/retry-subscriber` is now obsolete.
228
+ * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`.
229
+ * Asynchronous responses
230
+ * No longer supports the `future` request option to send an async request.
231
+ Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`,
232
+ `getAsync`, etc.).
233
+ * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid
234
+ recursion required by chaining and forwarding react promises. See
235
+ https://github.com/guzzle/promises
236
+ * Added `requestAsync` and `sendAsync` to send request asynchronously.
237
+ * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests
238
+ asynchronously.
239
+ * Request options
240
+ * POST and form updates
241
+ * Added the `form_fields` and `form_files` request options.
242
+ * Removed the `GuzzleHttp\Post` namespace.
243
+ * The `body` request option no longer accepts an array for POST requests.
244
+ * The `exceptions` request option has been deprecated in favor of the
245
+ `http_errors` request options.
246
+ * The `save_to` request option has been deprecated in favor of `sink` request
247
+ option.
248
+ * Clients no longer accept an array of URI template string and variables for
249
+ URI variables. You will need to expand URI templates before passing them
250
+ into a client constructor or request method.
251
+ * Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are
252
+ now magic methods that will send synchronous requests.
253
+ * Replaced `Utils.php` with plain functions in `functions.php`.
254
+ * Removed `GuzzleHttp\Collection`.
255
+ * Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as
256
+ an array.
257
+ * Removed `GuzzleHttp\Query`. Query string handling is now handled using an
258
+ associative array passed into the `query` request option. The query string
259
+ is serialized using PHP's `http_build_query`. If you need more control, you
260
+ can pass the query string in as a string.
261
+ * `GuzzleHttp\QueryParser` has been replaced with the
262
+ `GuzzleHttp\Psr7\parse_query`.
263
+
264
+ ## 5.2.0 - 2015-01-27
265
+
266
+ * Added `AppliesHeadersInterface` to make applying headers to a request based
267
+ on the body more generic and not specific to `PostBodyInterface`.
268
+ * Reduced the number of stack frames needed to send requests.
269
+ * Nested futures are now resolved in the client rather than the RequestFsm
270
+ * Finishing state transitions is now handled in the RequestFsm rather than the
271
+ RingBridge.
272
+ * Added a guard in the Pool class to not use recursion for request retries.
273
+
274
+ ## 5.1.0 - 2014-12-19
275
+
276
+ * Pool class no longer uses recursion when a request is intercepted.
277
+ * The size of a Pool can now be dynamically adjusted using a callback.
278
+ See https://github.com/guzzle/guzzle/pull/943.
279
+ * Setting a request option to `null` when creating a request with a client will
280
+ ensure that the option is not set. This allows you to overwrite default
281
+ request options on a per-request basis.
282
+ See https://github.com/guzzle/guzzle/pull/937.
283
+ * Added the ability to limit which protocols are allowed for redirects by
284
+ specifying a `protocols` array in the `allow_redirects` request option.
285
+ * Nested futures due to retries are now resolved when waiting for synchronous
286
+ responses. See https://github.com/guzzle/guzzle/pull/947.
287
+ * `"0"` is now an allowed URI path. See
288
+ https://github.com/guzzle/guzzle/pull/935.
289
+ * `Query` no longer typehints on the `$query` argument in the constructor,
290
+ allowing for strings and arrays.
291
+ * Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
292
+ specific exceptions if necessary.
293
+
294
+ ## 5.0.3 - 2014-11-03
295
+
296
+ This change updates query strings so that they are treated as un-encoded values
297
+ by default where the value represents an un-encoded value to send over the
298
+ wire. A Query object then encodes the value before sending over the wire. This
299
+ means that even value query string values (e.g., ":") are url encoded. This
300
+ makes the Query class match PHP's http_build_query function. However, if you
301
+ want to send requests over the wire using valid query string characters that do
302
+ not need to be encoded, then you can provide a string to Url::setQuery() and
303
+ pass true as the second argument to specify that the query string is a raw
304
+ string that should not be parsed or encoded (unless a call to getQuery() is
305
+ subsequently made, forcing the query-string to be converted into a Query
306
+ object).
307
+
308
+ ## 5.0.2 - 2014-10-30
309
+
310
+ * Added a trailing `\r\n` to multipart/form-data payloads. See
311
+ https://github.com/guzzle/guzzle/pull/871
312
+ * Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
313
+ * Status codes are now returned as integers. See
314
+ https://github.com/guzzle/guzzle/issues/881
315
+ * No longer overwriting an existing `application/x-www-form-urlencoded` header
316
+ when sending POST requests, allowing for customized headers. See
317
+ https://github.com/guzzle/guzzle/issues/877
318
+ * Improved path URL serialization.
319
+
320
+ * No longer double percent-encoding characters in the path or query string if
321
+ they are already encoded.
322
+ * Now properly encoding the supplied path to a URL object, instead of only
323
+ encoding ' ' and '?'.
324
+ * Note: This has been changed in 5.0.3 to now encode query string values by
325
+ default unless the `rawString` argument is provided when setting the query
326
+ string on a URL: Now allowing many more characters to be present in the
327
+ query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
328
+
329
+ ## 5.0.1 - 2014-10-16
330
+
331
+ Bugfix release.
332
+
333
+ * Fixed an issue where connection errors still returned response object in
334
+ error and end events event though the response is unusable. This has been
335
+ corrected so that a response is not returned in the `getResponse` method of
336
+ these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
337
+ * Fixed an issue where transfer statistics were not being populated in the
338
+ RingBridge. https://github.com/guzzle/guzzle/issues/866
339
+
340
+ ## 5.0.0 - 2014-10-12
341
+
342
+ Adding support for non-blocking responses and some minor API cleanup.
343
+
344
+ ### New Features
345
+
346
+ * Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`.
347
+ * Added a public API for creating a default HTTP adapter.
348
+ * Updated the redirect plugin to be non-blocking so that redirects are sent
349
+ concurrently. Other plugins like this can now be updated to be non-blocking.
350
+ * Added a "progress" event so that you can get upload and download progress
351
+ events.
352
+ * Added `GuzzleHttp\Pool` which implements FutureInterface and transfers
353
+ requests concurrently using a capped pool size as efficiently as possible.
354
+ * Added `hasListeners()` to EmitterInterface.
355
+ * Removed `GuzzleHttp\ClientInterface::sendAll` and marked
356
+ `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the
357
+ recommended way).
358
+
359
+ ### Breaking changes
360
+
361
+ The breaking changes in this release are relatively minor. The biggest thing to
362
+ look out for is that request and response objects no longer implement fluent
363
+ interfaces.
364
+
365
+ * Removed the fluent interfaces (i.e., `return $this`) from requests,
366
+ responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
367
+ `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
368
+ `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
369
+ why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
370
+ This also makes the Guzzle message interfaces compatible with the current
371
+ PSR-7 message proposal.
372
+ * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
373
+ for the HTTP request functions from function.php, these functions are now
374
+ implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode`
375
+ moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
376
+ `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
377
+ `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
378
+ `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
379
+ caused problems for many users: they aren't PSR-4 compliant, require an
380
+ explicit include, and needed an if-guard to ensure that the functions are not
381
+ declared multiple times.
382
+ * Rewrote adapter layer.
383
+ * Removing all classes from `GuzzleHttp\Adapter`, these are now
384
+ implemented as callables that are stored in `GuzzleHttp\Ring\Client`.
385
+ * Removed the concept of "parallel adapters". Sending requests serially or
386
+ concurrently is now handled using a single adapter.
387
+ * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The
388
+ Transaction object now exposes the request, response, and client as public
389
+ properties. The getters and setters have been removed.
390
+ * Removed the "headers" event. This event was only useful for changing the
391
+ body a response once the headers of the response were known. You can implement
392
+ a similar behavior in a number of ways. One example might be to use a
393
+ FnStream that has access to the transaction being sent. For example, when the
394
+ first byte is written, you could check if the response headers match your
395
+ expectations, and if so, change the actual stream body that is being
396
+ written to.
397
+ * Removed the `asArray` parameter from
398
+ `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
399
+ value as an array, then use the newly added `getHeaderAsArray()` method of
400
+ `MessageInterface`. This change makes the Guzzle interfaces compatible with
401
+ the PSR-7 interfaces.
402
+ * `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
403
+ custom request options using double-dispatch (this was an implementation
404
+ detail). Instead, you should now provide an associative array to the
405
+ constructor which is a mapping of the request option name mapping to a
406
+ function that applies the option value to a request.
407
+ * Removed the concept of "throwImmediately" from exceptions and error events.
408
+ This control mechanism was used to stop a transfer of concurrent requests
409
+ from completing. This can now be handled by throwing the exception or by
410
+ cancelling a pool of requests or each outstanding future request individually.
411
+ * Updated to "GuzzleHttp\Streams" 3.0.
412
+ * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
413
+ `maxLen` parameter. This update makes the Guzzle streams project
414
+ compatible with the current PSR-7 proposal.
415
+ * `GuzzleHttp\Stream\Stream::__construct`,
416
+ `GuzzleHttp\Stream\Stream::factory`, and
417
+ `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
418
+ argument. They now accept an associative array of options, including the
419
+ "size" key and "metadata" key which can be used to provide custom metadata.
420
+
421
+ ## 4.2.2 - 2014-09-08
422
+
423
+ * Fixed a memory leak in the CurlAdapter when reusing cURL handles.
424
+ * No longer using `request_fulluri` in stream adapter proxies.
425
+ * Relative redirects are now based on the last response, not the first response.
426
+
427
+ ## 4.2.1 - 2014-08-19
428
+
429
+ * Ensuring that the StreamAdapter does not always add a Content-Type header
430
+ * Adding automated github releases with a phar and zip
431
+
432
+ ## 4.2.0 - 2014-08-17
433
+
434
+ * Now merging in default options using a case-insensitive comparison.
435
+ Closes https://github.com/guzzle/guzzle/issues/767
436
+ * Added the ability to automatically decode `Content-Encoding` response bodies
437
+ using the `decode_content` request option. This is set to `true` by default
438
+ to decode the response body if it comes over the wire with a
439
+ `Content-Encoding`. Set this value to `false` to disable decoding the
440
+ response content, and pass a string to provide a request `Accept-Encoding`
441
+ header and turn on automatic response decoding. This feature now allows you
442
+ to pass an `Accept-Encoding` header in the headers of a request but still
443
+ disable automatic response decoding.
444
+ Closes https://github.com/guzzle/guzzle/issues/764
445
+ * Added the ability to throw an exception immediately when transferring
446
+ requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760
447
+ * Updating guzzlehttp/streams dependency to ~2.1
448
+ * No longer utilizing the now deprecated namespaced methods from the stream
449
+ package.
450
+
451
+ ## 4.1.8 - 2014-08-14
452
+
453
+ * Fixed an issue in the CurlFactory that caused setting the `stream=false`
454
+ request option to throw an exception.
455
+ See: https://github.com/guzzle/guzzle/issues/769
456
+ * TransactionIterator now calls rewind on the inner iterator.
457
+ See: https://github.com/guzzle/guzzle/pull/765
458
+ * You can now set the `Content-Type` header to `multipart/form-data`
459
+ when creating POST requests to force multipart bodies.
460
+ See https://github.com/guzzle/guzzle/issues/768
461
+
462
+ ## 4.1.7 - 2014-08-07
463
+
464
+ * Fixed an error in the HistoryPlugin that caused the same request and response
465
+ to be logged multiple times when an HTTP protocol error occurs.
466
+ * Ensuring that cURL does not add a default Content-Type when no Content-Type
467
+ has been supplied by the user. This prevents the adapter layer from modifying
468
+ the request that is sent over the wire after any listeners may have already
469
+ put the request in a desired state (e.g., signed the request).
470
+ * Throwing an exception when you attempt to send requests that have the
471
+ "stream" set to true in parallel using the MultiAdapter.
472
+ * Only calling curl_multi_select when there are active cURL handles. This was
473
+ previously changed and caused performance problems on some systems due to PHP
474
+ always selecting until the maximum select timeout.
475
+ * Fixed a bug where multipart/form-data POST fields were not correctly
476
+ aggregated (e.g., values with "&").
477
+
478
+ ## 4.1.6 - 2014-08-03
479
+
480
+ * Added helper methods to make it easier to represent messages as strings,
481
+ including getting the start line and getting headers as a string.
482
+
483
+ ## 4.1.5 - 2014-08-02
484
+
485
+ * Automatically retrying cURL "Connection died, retrying a fresh connect"
486
+ errors when possible.
487
+ * cURL implementation cleanup
488
+ * Allowing multiple event subscriber listeners to be registered per event by
489
+ passing an array of arrays of listener configuration.
490
+
491
+ ## 4.1.4 - 2014-07-22
492
+
493
+ * Fixed a bug that caused multi-part POST requests with more than one field to
494
+ serialize incorrectly.
495
+ * Paths can now be set to "0"
496
+ * `ResponseInterface::xml` now accepts a `libxml_options` option and added a
497
+ missing default argument that was required when parsing XML response bodies.
498
+ * A `save_to` stream is now created lazily, which means that files are not
499
+ created on disk unless a request succeeds.
500
+
501
+ ## 4.1.3 - 2014-07-15
502
+
503
+ * Various fixes to multipart/form-data POST uploads
504
+ * Wrapping function.php in an if-statement to ensure Guzzle can be used
505
+ globally and in a Composer install
506
+ * Fixed an issue with generating and merging in events to an event array
507
+ * POST headers are only applied before sending a request to allow you to change
508
+ the query aggregator used before uploading
509
+ * Added much more robust query string parsing
510
+ * Fixed various parsing and normalization issues with URLs
511
+ * Fixing an issue where multi-valued headers were not being utilized correctly
512
+ in the StreamAdapter
513
+
514
+ ## 4.1.2 - 2014-06-18
515
+
516
+ * Added support for sending payloads with GET requests
517
+
518
+ ## 4.1.1 - 2014-06-08
519
+
520
+ * Fixed an issue related to using custom message factory options in subclasses
521
+ * Fixed an issue with nested form fields in a multi-part POST
522
+ * Fixed an issue with using the `json` request option for POST requests
523
+ * Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar`
524
+
525
+ ## 4.1.0 - 2014-05-27
526
+
527
+ * Added a `json` request option to easily serialize JSON payloads.
528
+ * Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON.
529
+ * Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`.
530
+ * Added the ability to provide an emitter to a client in the client constructor.
531
+ * Added the ability to persist a cookie session using $_SESSION.
532
+ * Added a trait that can be used to add event listeners to an iterator.
533
+ * Removed request method constants from RequestInterface.
534
+ * Fixed warning when invalid request start-lines are received.
535
+ * Updated MessageFactory to work with custom request option methods.
536
+ * Updated cacert bundle to latest build.
537
+
538
+ 4.0.2 (2014-04-16)
539
+ ------------------
540
+
541
+ * Proxy requests using the StreamAdapter now properly use request_fulluri (#632)
542
+ * Added the ability to set scalars as POST fields (#628)
543
+
544
+ ## 4.0.1 - 2014-04-04
545
+
546
+ * The HTTP status code of a response is now set as the exception code of
547
+ RequestException objects.
548
+ * 303 redirects will now correctly switch from POST to GET requests.
549
+ * The default parallel adapter of a client now correctly uses the MultiAdapter.
550
+ * HasDataTrait now initializes the internal data array as an empty array so
551
+ that the toArray() method always returns an array.
552
+
553
+ ## 4.0.0 - 2014-03-29
554
+
555
+ * For more information on the 4.0 transition, see:
556
+ http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
557
+ * For information on changes and upgrading, see:
558
+ https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
559
+ * Added `GuzzleHttp\batch()` as a convenience function for sending requests in
560
+ parallel without needing to write asynchronous code.
561
+ * Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`.
562
+ You can now pass a callable or an array of associative arrays where each
563
+ associative array contains the "fn", "priority", and "once" keys.
564
+
565
+ ## 4.0.0.rc-2 - 2014-03-25
566
+
567
+ * Removed `getConfig()` and `setConfig()` from clients to avoid confusion
568
+ around whether things like base_url, message_factory, etc. should be able to
569
+ be retrieved or modified.
570
+ * Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface
571
+ * functions.php functions were renamed using snake_case to match PHP idioms
572
+ * Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and
573
+ `GUZZLE_CURL_SELECT_TIMEOUT` environment variables
574
+ * Added the ability to specify custom `sendAll()` event priorities
575
+ * Added the ability to specify custom stream context options to the stream
576
+ adapter.
577
+ * Added a functions.php function for `get_path()` and `set_path()`
578
+ * CurlAdapter and MultiAdapter now use a callable to generate curl resources
579
+ * MockAdapter now properly reads a body and emits a `headers` event
580
+ * Updated Url class to check if a scheme and host are set before adding ":"
581
+ and "//". This allows empty Url (e.g., "") to be serialized as "".
582
+ * Parsing invalid XML no longer emits warnings
583
+ * Curl classes now properly throw AdapterExceptions
584
+ * Various performance optimizations
585
+ * Streams are created with the faster `Stream\create()` function
586
+ * Marked deprecation_proxy() as internal
587
+ * Test server is now a collection of static methods on a class
588
+
589
+ ## 4.0.0-rc.1 - 2014-03-15
590
+
591
+ * See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
592
+
593
+ ## 3.8.1 - 2014-01-28
594
+
595
+ * Bug: Always using GET requests when redirecting from a 303 response
596
+ * Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
597
+ `Guzzle\Http\ClientInterface::setSslVerification()`
598
+ * Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL
599
+ * Bug: The body of a request can now be set to `"0"`
600
+ * Sending PHP stream requests no longer forces `HTTP/1.0`
601
+ * Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of
602
+ each sub-exception
603
+ * Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than
604
+ clobbering everything).
605
+ * Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators)
606
+ * Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`.
607
+ For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`.
608
+ * Now properly escaping the regular expression delimiter when matching Cookie domains.
609
+ * Network access is now disabled when loading XML documents
610
+
611
+ ## 3.8.0 - 2013-12-05
612
+
613
+ * Added the ability to define a POST name for a file
614
+ * JSON response parsing now properly walks additionalProperties
615
+ * cURL error code 18 is now retried automatically in the BackoffPlugin
616
+ * Fixed a cURL error when URLs contain fragments
617
+ * Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were
618
+ CurlExceptions
619
+ * CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e)
620
+ * Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS`
621
+ * Fixed a bug that was encountered when parsing empty header parameters
622
+ * UriTemplate now has a `setRegex()` method to match the docs
623
+ * The `debug` request parameter now checks if it is truthy rather than if it exists
624
+ * Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin
625
+ * Added the ability to combine URLs using strict RFC 3986 compliance
626
+ * Command objects can now return the validation errors encountered by the command
627
+ * Various fixes to cache revalidation (#437 and 29797e5)
628
+ * Various fixes to the AsyncPlugin
629
+ * Cleaned up build scripts
630
+
631
+ ## 3.7.4 - 2013-10-02
632
+
633
+ * Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
634
+ * Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
635
+ (see https://github.com/aws/aws-sdk-php/issues/147)
636
+ * Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots
637
+ * Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420)
638
+ * Updated the bundled cacert.pem (#419)
639
+ * OauthPlugin now supports adding authentication to headers or query string (#425)
640
+
641
+ ## 3.7.3 - 2013-09-08
642
+
643
+ * Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
644
+ `CommandTransferException`.
645
+ * Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description
646
+ * Schemas are only injected into response models when explicitly configured.
647
+ * No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of
648
+ an EntityBody.
649
+ * Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator.
650
+ * Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`.
651
+ * Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody()
652
+ * Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin
653
+ * Bug fix: Visiting XML attributes first before visiting XML children when serializing requests
654
+ * Bug fix: Properly parsing headers that contain commas contained in quotes
655
+ * Bug fix: mimetype guessing based on a filename is now case-insensitive
656
+
657
+ ## 3.7.2 - 2013-08-02
658
+
659
+ * Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
660
+ See https://github.com/guzzle/guzzle/issues/371
661
+ * Bug fix: Cookie domains are now matched correctly according to RFC 6265
662
+ See https://github.com/guzzle/guzzle/issues/377
663
+ * Bug fix: GET parameters are now used when calculating an OAuth signature
664
+ * Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted
665
+ * `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched
666
+ * `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input.
667
+ See https://github.com/guzzle/guzzle/issues/379
668
+ * Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See
669
+ https://github.com/guzzle/guzzle/pull/380
670
+ * cURL multi cleanup and optimizations
671
+
672
+ ## 3.7.1 - 2013-07-05
673
+
674
+ * Bug fix: Setting default options on a client now works
675
+ * Bug fix: Setting options on HEAD requests now works. See #352
676
+ * Bug fix: Moving stream factory before send event to before building the stream. See #353
677
+ * Bug fix: Cookies no longer match on IP addresses per RFC 6265
678
+ * Bug fix: Correctly parsing header parameters that are in `<>` and quotes
679
+ * Added `cert` and `ssl_key` as request options
680
+ * `Host` header can now diverge from the host part of a URL if the header is set manually
681
+ * `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter
682
+ * OAuth parameters are only added via the plugin if they aren't already set
683
+ * Exceptions are now thrown when a URL cannot be parsed
684
+ * Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
685
+ * Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
686
+
687
+ ## 3.7.0 - 2013-06-10
688
+
689
+ * See UPGRADING.md for more information on how to upgrade.
690
+ * Requests now support the ability to specify an array of $options when creating a request to more easily modify a
691
+ request. You can pass a 'request.options' configuration setting to a client to apply default request options to
692
+ every request created by a client (e.g. default query string variables, headers, curl options, etc.).
693
+ * Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`.
694
+ See `Guzzle\Http\StaticClient::mount`.
695
+ * Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests
696
+ created by a command (e.g. custom headers, query string variables, timeout settings, etc.).
697
+ * Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the
698
+ headers of a response
699
+ * Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key
700
+ (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`)
701
+ * ServiceBuilders now support storing and retrieving arbitrary data
702
+ * CachePlugin can now purge all resources for a given URI
703
+ * CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource
704
+ * CachePlugin now uses the Vary header to determine if a resource is a cache hit
705
+ * `Guzzle\Http\Message\Response` now implements `\Serializable`
706
+ * Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters
707
+ * `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable
708
+ * Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()`
709
+ * Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size
710
+ * `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message
711
+ * Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older
712
+ Symfony users can still use the old version of Monolog.
713
+ * Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`.
714
+ Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`.
715
+ * Several performance improvements to `Guzzle\Common\Collection`
716
+ * Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
717
+ createRequest, head, delete, put, patch, post, options, prepareRequest
718
+ * Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
719
+ * Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
720
+ * Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
721
+ `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
722
+ resource, string, or EntityBody into the $options parameter to specify the download location of the response.
723
+ * Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
724
+ default `array()`
725
+ * Added `Guzzle\Stream\StreamInterface::isRepeatable`
726
+ * Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
727
+ $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
728
+ $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`.
729
+ * Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`.
730
+ * Removed `Guzzle\Http\ClientInterface::expandTemplate()`
731
+ * Removed `Guzzle\Http\ClientInterface::setRequestFactory()`
732
+ * Removed `Guzzle\Http\ClientInterface::getCurlMulti()`
733
+ * Removed `Guzzle\Http\Message\RequestInterface::canCache`
734
+ * Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`
735
+ * Removed `Guzzle\Http\Message\RequestInterface::isRedirect`
736
+ * Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
737
+ * You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting
738
+ `Guzzle\Common\Version::$emitWarnings` to true.
739
+ * Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use
740
+ `$request->getResponseBody()->isRepeatable()` instead.
741
+ * Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
742
+ `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
743
+ * Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
744
+ `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
745
+ * Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
746
+ * Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
747
+ * Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
748
+ * Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand.
749
+ These will work through Guzzle 4.0
750
+ * Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params].
751
+ * Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
752
+ * Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`.
753
+ * Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`.
754
+ * Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
755
+ * Marked `Guzzle\Common\Collection::inject()` as deprecated.
756
+ * Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');`
757
+ * CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
758
+ CacheStorageInterface. These two objects and interface will be removed in a future version.
759
+ * Always setting X-cache headers on cached responses
760
+ * Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
761
+ * `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
762
+ $request, Response $response);`
763
+ * `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
764
+ * `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
765
+ * Added `CacheStorageInterface::purge($url)`
766
+ * `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
767
+ $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
768
+ CanCacheStrategyInterface $canCache = null)`
769
+ * Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
770
+
771
+ ## 3.6.0 - 2013-05-29
772
+
773
+ * ServiceDescription now implements ToArrayInterface
774
+ * Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
775
+ * Guzzle can now correctly parse incomplete URLs
776
+ * Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
777
+ * Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
778
+ * Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
779
+ * Specific header implementations can be created for complex headers. When a message creates a header, it uses a
780
+ HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
781
+ CacheControl header implementation.
782
+ * Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
783
+ * Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
784
+ * Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
785
+ Guzzle\Http\Curl\RequestMediator
786
+ * Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
787
+ * Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
788
+ * Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
789
+ * Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
790
+ * Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
791
+ * All response header helper functions return a string rather than mixing Header objects and strings inconsistently
792
+ * Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
793
+ directly via interfaces
794
+ * Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
795
+ but are a no-op until removed.
796
+ * Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
797
+ `Guzzle\Service\Command\ArrayCommandInterface`.
798
+ * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
799
+ on a request while the request is still being transferred
800
+ * The ability to case-insensitively search for header values
801
+ * Guzzle\Http\Message\Header::hasExactHeader
802
+ * Guzzle\Http\Message\Header::raw. Use getAll()
803
+ * Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
804
+ instead.
805
+ * `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
806
+ * Added the ability to cast Model objects to a string to view debug information.
807
+
808
+ ## 3.5.0 - 2013-05-13
809
+
810
+ * Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
811
+ * Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove
812
+ itself from the EventDispatcher)
813
+ * Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values
814
+ * Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too
815
+ * Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a
816
+ non-existent key
817
+ * Bug: All __call() method arguments are now required (helps with mocking frameworks)
818
+ * Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference
819
+ to help with refcount based garbage collection of resources created by sending a request
820
+ * Deprecating ZF1 cache and log adapters. These will be removed in the next major version.
821
+ * Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the
822
+ HistoryPlugin for a history.
823
+ * Added a `responseBody` alias for the `response_body` location
824
+ * Refactored internals to no longer rely on Response::getRequest()
825
+ * HistoryPlugin can now be cast to a string
826
+ * HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests
827
+ and responses that are sent over the wire
828
+ * Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
829
+
830
+ ## 3.4.3 - 2013-04-30
831
+
832
+ * Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
833
+ * Added a check to re-extract the temp cacert bundle from the phar before sending each request
834
+
835
+ ## 3.4.2 - 2013-04-29
836
+
837
+ * Bug fix: Stream objects now work correctly with "a" and "a+" modes
838
+ * Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
839
+ * Bug fix: AsyncPlugin no longer forces HEAD requests
840
+ * Bug fix: DateTime timezones are now properly handled when using the service description schema formatter
841
+ * Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails
842
+ * Setting a response on a request will write to the custom request body from the response body if one is specified
843
+ * LogPlugin now writes to php://output when STDERR is undefined
844
+ * Added the ability to set multiple POST files for the same key in a single call
845
+ * application/x-www-form-urlencoded POSTs now use the utf-8 charset by default
846
+ * Added the ability to queue CurlExceptions to the MockPlugin
847
+ * Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
848
+ * Configuration loading now allows remote files
849
+
850
+ ## 3.4.1 - 2013-04-16
851
+
852
+ * Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
853
+ handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
854
+ * Exceptions are now properly grouped when sending requests in parallel
855
+ * Redirects are now properly aggregated when a multi transaction fails
856
+ * Redirects now set the response on the original object even in the event of a failure
857
+ * Bug fix: Model names are now properly set even when using $refs
858
+ * Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax
859
+ * Added support for oauth_callback in OAuth signatures
860
+ * Added support for oauth_verifier in OAuth signatures
861
+ * Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
862
+
863
+ ## 3.4.0 - 2013-04-11
864
+
865
+ * Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
866
+ * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
867
+ * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
868
+ * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
869
+ * Bug fix: Added `number` type to service descriptions.
870
+ * Bug fix: empty parameters are removed from an OAuth signature
871
+ * Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header
872
+ * Bug fix: Fixed "array to string" error when validating a union of types in a service description
873
+ * Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream
874
+ * Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin.
875
+ * Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs.
876
+ * The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections.
877
+ * Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if
878
+ the Content-Type can be determined based on the entity body or the path of the request.
879
+ * Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder.
880
+ * Added support for a PSR-3 LogAdapter.
881
+ * Added a `command.after_prepare` event
882
+ * Added `oauth_callback` parameter to the OauthPlugin
883
+ * Added the ability to create a custom stream class when using a stream factory
884
+ * Added a CachingEntityBody decorator
885
+ * Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized.
886
+ * The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar.
887
+ * You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies
888
+ * POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This
889
+ means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use
890
+ POST fields or files (the latter is only used when emulating a form POST in the browser).
891
+ * Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
892
+
893
+ ## 3.3.1 - 2013-03-10
894
+
895
+ * Added the ability to create PHP streaming responses from HTTP requests
896
+ * Bug fix: Running any filters when parsing response headers with service descriptions
897
+ * Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing
898
+ * Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across
899
+ response location visitors.
900
+ * Bug fix: Removed the possibility of creating configuration files with circular dependencies
901
+ * RequestFactory::create() now uses the key of a POST file when setting the POST file name
902
+ * Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
903
+
904
+ ## 3.3.0 - 2013-03-03
905
+
906
+ * A large number of performance optimizations have been made
907
+ * Bug fix: Added 'wb' as a valid write mode for streams
908
+ * Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned
909
+ * Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()`
910
+ * BC: Removed `Guzzle\Http\Utils` class
911
+ * BC: Setting a service description on a client will no longer modify the client's command factories.
912
+ * BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using
913
+ the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
914
+ * BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to
915
+ lowercase
916
+ * Operation parameter objects are now lazy loaded internally
917
+ * Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses
918
+ * Added support for instantiating responseType=class responseClass classes. Classes must implement
919
+ `Guzzle\Service\Command\ResponseClassInterface`
920
+ * Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These
921
+ additional properties also support locations and can be used to parse JSON responses where the outermost part of the
922
+ JSON is an array
923
+ * Added support for nested renaming of JSON models (rename sentAs to name)
924
+ * CachePlugin
925
+ * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
926
+ * Debug headers can now added to cached response in the CachePlugin
927
+
928
+ ## 3.2.0 - 2013-02-14
929
+
930
+ * CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
931
+ * URLs with no path no longer contain a "/" by default
932
+ * Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url.
933
+ * BadResponseException no longer includes the full request and response message
934
+ * Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface
935
+ * Adding getResponseBody() to Guzzle\Http\Message\RequestInterface
936
+ * Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription
937
+ * Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list
938
+ * xmlEncoding can now be customized for the XML declaration of a XML service description operation
939
+ * Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value
940
+ aggregation and no longer uses callbacks
941
+ * The URL encoding implementation of Guzzle\Http\QueryString can now be customized
942
+ * Bug fix: Filters were not always invoked for array service description parameters
943
+ * Bug fix: Redirects now use a target response body rather than a temporary response body
944
+ * Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
945
+ * Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
946
+
947
+ ## 3.1.2 - 2013-01-27
948
+
949
+ * Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
950
+ response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
951
+ * Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent
952
+ * CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444)
953
+ * Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
954
+ * Setting default headers on a client after setting the user-agent will not erase the user-agent setting
955
+
956
+ ## 3.1.1 - 2013-01-20
957
+
958
+ * Adding wildcard support to Guzzle\Common\Collection::getPath()
959
+ * Adding alias support to ServiceBuilder configs
960
+ * Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
961
+
962
+ ## 3.1.0 - 2013-01-12
963
+
964
+ * BC: CurlException now extends from RequestException rather than BadResponseException
965
+ * BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
966
+ * Added getData to ServiceDescriptionInterface
967
+ * Added context array to RequestInterface::setState()
968
+ * Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http
969
+ * Bug: Adding required content-type when JSON request visitor adds JSON to a command
970
+ * Bug: Fixing the serialization of a service description with custom data
971
+ * Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing
972
+ an array of successful and failed responses
973
+ * Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection
974
+ * Added Guzzle\Http\IoEmittingEntityBody
975
+ * Moved command filtration from validators to location visitors
976
+ * Added `extends` attributes to service description parameters
977
+ * Added getModels to ServiceDescriptionInterface
978
+
979
+ ## 3.0.7 - 2012-12-19
980
+
981
+ * Fixing phar detection when forcing a cacert to system if null or true
982
+ * Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
983
+ * Cleaning up `Guzzle\Common\Collection::inject` method
984
+ * Adding a response_body location to service descriptions
985
+
986
+ ## 3.0.6 - 2012-12-09
987
+
988
+ * CurlMulti performance improvements
989
+ * Adding setErrorResponses() to Operation
990
+ * composer.json tweaks
991
+
992
+ ## 3.0.5 - 2012-11-18
993
+
994
+ * Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
995
+ * Bug: Response body can now be a string containing "0"
996
+ * Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert
997
+ * Bug: QueryString::fromString now properly parses query string parameters that contain equal signs
998
+ * Added support for XML attributes in service description responses
999
+ * DefaultRequestSerializer now supports array URI parameter values for URI template expansion
1000
+ * Added better mimetype guessing to requests and post files
1001
+
1002
+ ## 3.0.4 - 2012-11-11
1003
+
1004
+ * Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
1005
+ * Bug: Cookies can now be added that have a name, domain, or value set to "0"
1006
+ * Bug: Using the system cacert bundle when using the Phar
1007
+ * Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures
1008
+ * Enhanced cookie jar de-duplication
1009
+ * Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added
1010
+ * Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
1011
+ * Added the ability to create any sort of hash for a stream rather than just an MD5 hash
1012
+
1013
+ ## 3.0.3 - 2012-11-04
1014
+
1015
+ * Implementing redirects in PHP rather than cURL
1016
+ * Added PECL URI template extension and using as default parser if available
1017
+ * Bug: Fixed Content-Length parsing of Response factory
1018
+ * Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams.
1019
+ * Adding ToArrayInterface throughout library
1020
+ * Fixing OauthPlugin to create unique nonce values per request
1021
+
1022
+ ## 3.0.2 - 2012-10-25
1023
+
1024
+ * Magic methods are enabled by default on clients
1025
+ * Magic methods return the result of a command
1026
+ * Service clients no longer require a base_url option in the factory
1027
+ * Bug: Fixed an issue with URI templates where null template variables were being expanded
1028
+
1029
+ ## 3.0.1 - 2012-10-22
1030
+
1031
+ * Models can now be used like regular collection objects by calling filter, map, etc.
1032
+ * Models no longer require a Parameter structure or initial data in the constructor
1033
+ * Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
1034
+
1035
+ ## 3.0.0 - 2012-10-15
1036
+
1037
+ * Rewrote service description format to be based on Swagger
1038
+ * Now based on JSON schema
1039
+ * Added nested input structures and nested response models
1040
+ * Support for JSON and XML input and output models
1041
+ * Renamed `commands` to `operations`
1042
+ * Removed dot class notation
1043
+ * Removed custom types
1044
+ * Broke the project into smaller top-level namespaces to be more component friendly
1045
+ * Removed support for XML configs and descriptions. Use arrays or JSON files.
1046
+ * Removed the Validation component and Inspector
1047
+ * Moved all cookie code to Guzzle\Plugin\Cookie
1048
+ * Magic methods on a Guzzle\Service\Client now return the command un-executed.
1049
+ * Calling getResult() or getResponse() on a command will lazily execute the command if needed.
1050
+ * Now shipping with cURL's CA certs and using it by default
1051
+ * Added previousResponse() method to response objects
1052
+ * No longer sending Accept and Accept-Encoding headers on every request
1053
+ * Only sending an Expect header by default when a payload is greater than 1MB
1054
+ * Added/moved client options:
1055
+ * curl.blacklist to curl.option.blacklist
1056
+ * Added ssl.certificate_authority
1057
+ * Added a Guzzle\Iterator component
1058
+ * Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin
1059
+ * Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin)
1060
+ * Added a more robust caching plugin
1061
+ * Added setBody to response objects
1062
+ * Updating LogPlugin to use a more flexible MessageFormatter
1063
+ * Added a completely revamped build process
1064
+ * Cleaning up Collection class and removing default values from the get method
1065
+ * Fixed ZF2 cache adapters
1066
+
1067
+ ## 2.8.8 - 2012-10-15
1068
+
1069
+ * Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
1070
+
1071
+ ## 2.8.7 - 2012-09-30
1072
+
1073
+ * Bug: Fixed config file aliases for JSON includes
1074
+ * Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
1075
+ * Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload
1076
+ * Bug: Hardening request and response parsing to account for missing parts
1077
+ * Bug: Fixed PEAR packaging
1078
+ * Bug: Fixed Request::getInfo
1079
+ * Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail
1080
+ * Adding the ability for the namespace Iterator factory to look in multiple directories
1081
+ * Added more getters/setters/removers from service descriptions
1082
+ * Added the ability to remove POST fields from OAuth signatures
1083
+ * OAuth plugin now supports 2-legged OAuth
1084
+
1085
+ ## 2.8.6 - 2012-09-05
1086
+
1087
+ * Added the ability to modify and build service descriptions
1088
+ * Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
1089
+ * Added a `json` parameter location
1090
+ * Now allowing dot notation for classes in the CacheAdapterFactory
1091
+ * Using the union of two arrays rather than an array_merge when extending service builder services and service params
1092
+ * Ensuring that a service is a string before doing strpos() checks on it when substituting services for references
1093
+ in service builder config files.
1094
+ * Services defined in two different config files that include one another will by default replace the previously
1095
+ defined service, but you can now create services that extend themselves and merge their settings over the previous
1096
+ * The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
1097
+ '_default' with a default JSON configuration file.
1098
+
1099
+ ## 2.8.5 - 2012-08-29
1100
+
1101
+ * Bug: Suppressed empty arrays from URI templates
1102
+ * Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
1103
+ * Added support for HTTP responses that do not contain a reason phrase in the start-line
1104
+ * AbstractCommand commands are now invokable
1105
+ * Added a way to get the data used when signing an Oauth request before a request is sent
1106
+
1107
+ ## 2.8.4 - 2012-08-15
1108
+
1109
+ * Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
1110
+ * 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.
1111
+ * Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream
1112
+ * Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream
1113
+ * Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5())
1114
+ * Added additional response status codes
1115
+ * Removed SSL information from the default User-Agent header
1116
+ * DELETE requests can now send an entity body
1117
+ * Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries
1118
+ * Added the ability of the MockPlugin to consume mocked request bodies
1119
+ * LogPlugin now exposes request and response objects in the extras array
1120
+
1121
+ ## 2.8.3 - 2012-07-30
1122
+
1123
+ * Bug: Fixed a case where empty POST requests were sent as GET requests
1124
+ * Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
1125
+ * Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
1126
+ * Added multiple inheritance to service description commands
1127
+ * Added an ApiCommandInterface and added `getParamNames()` and `hasParam()`
1128
+ * Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
1129
+ * Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
1130
+
1131
+ ## 2.8.2 - 2012-07-24
1132
+
1133
+ * Bug: Query string values set to 0 are no longer dropped from the query string
1134
+ * Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()`
1135
+ * Bug: `+` is now treated as an encoded space when parsing query strings
1136
+ * QueryString and Collection performance improvements
1137
+ * Allowing dot notation for class paths in filters attribute of a service descriptions
1138
+
1139
+ ## 2.8.1 - 2012-07-16
1140
+
1141
+ * Loosening Event Dispatcher dependency
1142
+ * POST redirects can now be customized using CURLOPT_POSTREDIR
1143
+
1144
+ ## 2.8.0 - 2012-07-15
1145
+
1146
+ * BC: Guzzle\Http\Query
1147
+ * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
1148
+ * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding()
1149
+ * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
1150
+ * Changed the aggregation functions of QueryString to be static methods
1151
+ * Can now use fromString() with querystrings that have a leading ?
1152
+ * cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters
1153
+ * Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
1154
+ * Cookies are no longer URL decoded by default
1155
+ * Bug: URI template variables set to null are no longer expanded
1156
+
1157
+ ## 2.7.2 - 2012-07-02
1158
+
1159
+ * BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
1160
+ * BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
1161
+ * CachePlugin now allows for a custom request parameter function to check if a request can be cached
1162
+ * Bug fix: CachePlugin now only caches GET and HEAD requests by default
1163
+ * Bug fix: Using header glue when transferring headers over the wire
1164
+ * Allowing deeply nested arrays for composite variables in URI templates
1165
+ * Batch divisors can now return iterators or arrays
1166
+
1167
+ ## 2.7.1 - 2012-06-26
1168
+
1169
+ * Minor patch to update version number in UA string
1170
+ * Updating build process
1171
+
1172
+ ## 2.7.0 - 2012-06-25
1173
+
1174
+ * BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
1175
+ * BC: Removed magic setX methods from commands
1176
+ * BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method
1177
+ * Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable.
1178
+ * Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity)
1179
+ * Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace
1180
+ * Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin
1181
+ * Added the ability to set POST fields and files in a service description
1182
+ * Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method
1183
+ * Adding a command.before_prepare event to clients
1184
+ * Added BatchClosureTransfer and BatchClosureDivisor
1185
+ * BatchTransferException now includes references to the batch divisor and transfer strategies
1186
+ * Fixed some tests so that they pass more reliably
1187
+ * Added Guzzle\Common\Log\ArrayLogAdapter
1188
+
1189
+ ## 2.6.6 - 2012-06-10
1190
+
1191
+ * BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
1192
+ * BC: Removing Guzzle\Service\Command\CommandSet
1193
+ * Adding generic batching system (replaces the batch queue plugin and command set)
1194
+ * Updating ZF cache and log adapters and now using ZF's composer repository
1195
+ * Bug: Setting the name of each ApiParam when creating through an ApiCommand
1196
+ * Adding result_type, result_doc, deprecated, and doc_url to service descriptions
1197
+ * Bug: Changed the default cookie header casing back to 'Cookie'
1198
+
1199
+ ## 2.6.5 - 2012-06-03
1200
+
1201
+ * BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
1202
+ * BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
1203
+ * BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data
1204
+ * BC: Renaming methods in the CookieJarInterface
1205
+ * Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations
1206
+ * Making the default glue for HTTP headers ';' instead of ','
1207
+ * Adding a removeValue to Guzzle\Http\Message\Header
1208
+ * Adding getCookies() to request interface.
1209
+ * Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
1210
+
1211
+ ## 2.6.4 - 2012-05-30
1212
+
1213
+ * BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
1214
+ * BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
1215
+ * Bug: Fixing magic method command calls on clients
1216
+ * Bug: Email constraint only validates strings
1217
+ * Bug: Aggregate POST fields when POST files are present in curl handle
1218
+ * Bug: Fixing default User-Agent header
1219
+ * Bug: Only appending or prepending parameters in commands if they are specified
1220
+ * Bug: Not requiring response reason phrases or status codes to match a predefined list of codes
1221
+ * Allowing the use of dot notation for class namespaces when using instance_of constraint
1222
+ * Added any_match validation constraint
1223
+ * Added an AsyncPlugin
1224
+ * Passing request object to the calculateWait method of the ExponentialBackoffPlugin
1225
+ * Allowing the result of a command object to be changed
1226
+ * Parsing location and type sub values when instantiating a service description rather than over and over at runtime
1227
+
1228
+ ## 2.6.3 - 2012-05-23
1229
+
1230
+ * [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
1231
+ * [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
1232
+ * You can now use an array of data when creating PUT request bodies in the request factory.
1233
+ * Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable.
1234
+ * [Http] Adding support for Content-Type in multipart POST uploads per upload
1235
+ * [Http] Added support for uploading multiple files using the same name (foo[0], foo[1])
1236
+ * Adding more POST data operations for easier manipulation of POST data.
1237
+ * You can now set empty POST fields.
1238
+ * The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files.
1239
+ * Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
1240
+ * CS updates
1241
+
1242
+ ## 2.6.2 - 2012-05-19
1243
+
1244
+ * [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method.
1245
+
1246
+ ## 2.6.1 - 2012-05-19
1247
+
1248
+ * [BC] Removing 'path' support in service descriptions. Use 'uri'.
1249
+ * [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
1250
+ * [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it.
1251
+ * [BC] Removing Guzzle\Common\XmlElement.
1252
+ * All commands, both dynamic and concrete, have ApiCommand objects.
1253
+ * Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits.
1254
+ * Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
1255
+ * Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
1256
+
1257
+ ## 2.6.0 - 2012-05-15
1258
+
1259
+ * [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
1260
+ * [BC] Executing a Command returns the result of the command rather than the command
1261
+ * [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed.
1262
+ * [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args.
1263
+ * [BC] Moving ResourceIterator* to Guzzle\Service\Resource
1264
+ * [BC] Completely refactored ResourceIterators to iterate over a cloned command object
1265
+ * [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate
1266
+ * [BC] Guzzle\Guzzle is now deprecated
1267
+ * Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject
1268
+ * Adding Guzzle\Version class to give version information about Guzzle
1269
+ * Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate()
1270
+ * Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data
1271
+ * ServiceDescription and ServiceBuilder are now cacheable using similar configs
1272
+ * Changing the format of XML and JSON service builder configs. Backwards compatible.
1273
+ * Cleaned up Cookie parsing
1274
+ * Trimming the default Guzzle User-Agent header
1275
+ * Adding a setOnComplete() method to Commands that is called when a command completes
1276
+ * Keeping track of requests that were mocked in the MockPlugin
1277
+ * Fixed a caching bug in the CacheAdapterFactory
1278
+ * Inspector objects can be injected into a Command object
1279
+ * Refactoring a lot of code and tests to be case insensitive when dealing with headers
1280
+ * Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL
1281
+ * Adding the ability to set global option overrides to service builder configs
1282
+ * Adding the ability to include other service builder config files from within XML and JSON files
1283
+ * Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
1284
+
1285
+ ## 2.5.0 - 2012-05-08
1286
+
1287
+ * Major performance improvements
1288
+ * [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated.
1289
+ * [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component.
1290
+ * [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}"
1291
+ * Added the ability to passed parameters to all requests created by a client
1292
+ * Added callback functionality to the ExponentialBackoffPlugin
1293
+ * Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies.
1294
+ * Rewinding request stream bodies when retrying requests
1295
+ * Exception is thrown when JSON response body cannot be decoded
1296
+ * Added configurable magic method calls to clients and commands. This is off by default.
1297
+ * Fixed a defect that added a hash to every parsed URL part
1298
+ * Fixed duplicate none generation for OauthPlugin.
1299
+ * Emitting an event each time a client is generated by a ServiceBuilder
1300
+ * Using an ApiParams object instead of a Collection for parameters of an ApiCommand
1301
+ * cache.* request parameters should be renamed to params.cache.*
1302
+ * Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle.
1303
+ * Added the ability to disable type validation of service descriptions
1304
+ * ServiceDescriptions and ServiceBuilders are now Serializable
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/guzzlehttp/guzzle/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
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
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all 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/guzzlehttp/guzzle/README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Guzzle, PHP HTTP client
2
+ =======================
3
+
4
+ [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
5
+ [![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle)
6
+ [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
7
+
8
+ Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
9
+ trivial to integrate with web services.
10
+
11
+ - Simple interface for building query strings, POST requests, streaming large
12
+ uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
13
+ etc...
14
+ - Can send both synchronous and asynchronous requests using the same interface.
15
+ - Uses PSR-7 interfaces for requests, responses, and streams. This allows you
16
+ to utilize other PSR-7 compatible libraries with Guzzle.
17
+ - Abstracts away the underlying HTTP transport, allowing you to write
18
+ environment and transport agnostic code; i.e., no hard dependency on cURL,
19
+ PHP streams, sockets, or non-blocking event loops.
20
+ - Middleware system allows you to augment and compose client behavior.
21
+
22
+ ```php
23
+ $client = new \GuzzleHttp\Client();
24
+ $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
25
+
26
+ echo $response->getStatusCode(); # 200
27
+ echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
28
+ echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
29
+
30
+ # Send an asynchronous request.
31
+ $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
32
+ $promise = $client->sendAsync($request)->then(function ($response) {
33
+ echo 'I completed! ' . $response->getBody();
34
+ });
35
+
36
+ $promise->wait();
37
+ ```
38
+
39
+ ## Help and docs
40
+
41
+ - [Documentation](http://guzzlephp.org/)
42
+ - [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
43
+ - [Gitter](https://gitter.im/guzzle/guzzle)
44
+
45
+
46
+ ## Installing Guzzle
47
+
48
+ The recommended way to install Guzzle is through
49
+ [Composer](http://getcomposer.org).
50
+
51
+ ```bash
52
+ # Install Composer
53
+ curl -sS https://getcomposer.org/installer | php
54
+ ```
55
+
56
+ Next, run the Composer command to install the latest stable version of Guzzle:
57
+
58
+ ```bash
59
+ composer require guzzlehttp/guzzle
60
+ ```
61
+
62
+ After installing, you need to require Composer's autoloader:
63
+
64
+ ```php
65
+ require 'vendor/autoload.php';
66
+ ```
67
+
68
+ You can then later update Guzzle using composer:
69
+
70
+ ```bash
71
+ composer update
72
+ ```
73
+
74
+
75
+ ## Version Guidance
76
+
77
+ | Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
78
+ |---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
79
+ | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
80
+ | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
81
+ | 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
82
+ | 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
83
+
84
+ [guzzle-3-repo]: https://github.com/guzzle/guzzle3
85
+ [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
86
+ [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
87
+ [guzzle-6-repo]: https://github.com/guzzle/guzzle
88
+ [guzzle-3-docs]: http://guzzle3.readthedocs.org
89
+ [guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
90
+ [guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
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/guzzlehttp/guzzle/composer.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "guzzlehttp/guzzle",
3
+ "type": "library",
4
+ "description": "Guzzle is a PHP HTTP client library",
5
+ "keywords": [
6
+ "framework",
7
+ "http",
8
+ "rest",
9
+ "web service",
10
+ "curl",
11
+ "client",
12
+ "HTTP client"
13
+ ],
14
+ "homepage": "http://guzzlephp.org/",
15
+ "license": "MIT",
16
+ "authors": [
17
+ {
18
+ "name": "Michael Dowling",
19
+ "email": "mtdowling@gmail.com",
20
+ "homepage": "https://github.com/mtdowling"
21
+ }
22
+ ],
23
+ "require": {
24
+ "php": ">=5.5",
25
+ "ext-json": "*",
26
+ "guzzlehttp/promises": "^1.0",
27
+ "guzzlehttp/psr7": "^1.6.1"
28
+ },
29
+ "require-dev": {
30
+ "ext-curl": "*",
31
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
32
+ "psr/log": "^1.1"
33
+ },
34
+ "suggest": {
35
+ "psr/log": "Required for using the Log middleware"
36
+ },
37
+ "config": {
38
+ "sort-packages": true
39
+ },
40
+ "extra": {
41
+ "branch-alias": {
42
+ "dev-master": "6.3-dev"
43
+ }
44
+ },
45
+ "autoload": {
46
+ "psr-4": {
47
+ "GuzzleHttp\\": "src/"
48
+ },
49
+ "files": [
50
+ "src/functions_include.php"
51
+ ]
52
+ },
53
+ "autoload-dev": {
54
+ "psr-4": {
55
+ "GuzzleHttp\\Tests\\": "tests/"
56
+ }
57
+ }
58
+ }
vendor/guzzlehttp/guzzle/phpstan.neon.dist ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ parameters:
2
+ level: 1
3
+ paths:
4
+ - src
5
+
6
+ ignoreErrors:
7
+ -
8
+ message: '#Function uri_template not found#'
9
+ path: %currentWorkingDirectory%/src/functions.php
vendor/guzzlehttp/guzzle/src/Client.php ADDED
@@ -0,0 +1,422 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Cookie\CookieJar;
5
+ use GuzzleHttp\Promise;
6
+ use GuzzleHttp\Psr7;
7
+ use Psr\Http\Message\UriInterface;
8
+ use Psr\Http\Message\RequestInterface;
9
+ use Psr\Http\Message\ResponseInterface;
10
+
11
+ /**
12
+ * @method ResponseInterface get(string|UriInterface $uri, array $options = [])
13
+ * @method ResponseInterface head(string|UriInterface $uri, array $options = [])
14
+ * @method ResponseInterface put(string|UriInterface $uri, array $options = [])
15
+ * @method ResponseInterface post(string|UriInterface $uri, array $options = [])
16
+ * @method ResponseInterface patch(string|UriInterface $uri, array $options = [])
17
+ * @method ResponseInterface delete(string|UriInterface $uri, array $options = [])
18
+ * @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = [])
19
+ * @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = [])
20
+ * @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = [])
21
+ * @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = [])
22
+ * @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = [])
23
+ * @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = [])
24
+ */
25
+ class Client implements ClientInterface
26
+ {
27
+ /** @var array Default request options */
28
+ private $config;
29
+
30
+ /**
31
+ * Clients accept an array of constructor parameters.
32
+ *
33
+ * Here's an example of creating a client using a base_uri and an array of
34
+ * default request options to apply to each request:
35
+ *
36
+ * $client = new Client([
37
+ * 'base_uri' => 'http://www.foo.com/1.0/',
38
+ * 'timeout' => 0,
39
+ * 'allow_redirects' => false,
40
+ * 'proxy' => '192.168.16.1:10'
41
+ * ]);
42
+ *
43
+ * Client configuration settings include the following options:
44
+ *
45
+ * - handler: (callable) Function that transfers HTTP requests over the
46
+ * wire. The function is called with a Psr7\Http\Message\RequestInterface
47
+ * and array of transfer options, and must return a
48
+ * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
49
+ * Psr7\Http\Message\ResponseInterface on success. "handler" is a
50
+ * constructor only option that cannot be overridden in per/request
51
+ * options. 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
+ public function __call($method, $args)
79
+ {
80
+ if (count($args) < 1) {
81
+ throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
82
+ }
83
+
84
+ $uri = $args[0];
85
+ $opts = isset($args[1]) ? $args[1] : [];
86
+
87
+ return substr($method, -5) === 'Async'
88
+ ? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
89
+ : $this->request($method, $uri, $opts);
90
+ }
91
+
92
+ public function sendAsync(RequestInterface $request, array $options = [])
93
+ {
94
+ // Merge the base URI into the request URI if needed.
95
+ $options = $this->prepareDefaults($options);
96
+
97
+ return $this->transfer(
98
+ $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')),
99
+ $options
100
+ );
101
+ }
102
+
103
+ public function send(RequestInterface $request, array $options = [])
104
+ {
105
+ $options[RequestOptions::SYNCHRONOUS] = true;
106
+ return $this->sendAsync($request, $options)->wait();
107
+ }
108
+
109
+ public function requestAsync($method, $uri = '', array $options = [])
110
+ {
111
+ $options = $this->prepareDefaults($options);
112
+ // Remove request modifying parameter because it can be done up-front.
113
+ $headers = isset($options['headers']) ? $options['headers'] : [];
114
+ $body = isset($options['body']) ? $options['body'] : null;
115
+ $version = isset($options['version']) ? $options['version'] : '1.1';
116
+ // Merge the URI into the base URI.
117
+ $uri = $this->buildUri($uri, $options);
118
+ if (is_array($body)) {
119
+ $this->invalidBody();
120
+ }
121
+ $request = new Psr7\Request($method, $uri, $headers, $body, $version);
122
+ // Remove the option so that they are not doubly-applied.
123
+ unset($options['headers'], $options['body'], $options['version']);
124
+
125
+ return $this->transfer($request, $options);
126
+ }
127
+
128
+ public function request($method, $uri = '', array $options = [])
129
+ {
130
+ $options[RequestOptions::SYNCHRONOUS] = true;
131
+ return $this->requestAsync($method, $uri, $options)->wait();
132
+ }
133
+
134
+ public function getConfig($option = null)
135
+ {
136
+ return $option === null
137
+ ? $this->config
138
+ : (isset($this->config[$option]) ? $this->config[$option] : null);
139
+ }
140
+
141
+ private function buildUri($uri, array $config)
142
+ {
143
+ // for BC we accept null which would otherwise fail in uri_for
144
+ $uri = Psr7\uri_for($uri === null ? '' : $uri);
145
+
146
+ if (isset($config['base_uri'])) {
147
+ $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
148
+ }
149
+
150
+ return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
151
+ }
152
+
153
+ /**
154
+ * Configures the default options for a client.
155
+ *
156
+ * @param array $config
157
+ */
158
+ private function configureDefaults(array $config)
159
+ {
160
+ $defaults = [
161
+ 'allow_redirects' => RedirectMiddleware::$defaultSettings,
162
+ 'http_errors' => true,
163
+ 'decode_content' => true,
164
+ 'verify' => true,
165
+ 'cookies' => false
166
+ ];
167
+
168
+ // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
169
+
170
+ // We can only trust the HTTP_PROXY environment variable in a CLI
171
+ // process due to the fact that PHP has no reliable mechanism to
172
+ // get environment variables that start with "HTTP_".
173
+ if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) {
174
+ $defaults['proxy']['http'] = getenv('HTTP_PROXY');
175
+ }
176
+
177
+ if ($proxy = getenv('HTTPS_PROXY')) {
178
+ $defaults['proxy']['https'] = $proxy;
179
+ }
180
+
181
+ if ($noProxy = getenv('NO_PROXY')) {
182
+ $cleanedNoProxy = str_replace(' ', '', $noProxy);
183
+ $defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
184
+ }
185
+
186
+ $this->config = $config + $defaults;
187
+
188
+ if (!empty($config['cookies']) && $config['cookies'] === true) {
189
+ $this->config['cookies'] = new CookieJar();
190
+ }
191
+
192
+ // Add the default user-agent header.
193
+ if (!isset($this->config['headers'])) {
194
+ $this->config['headers'] = ['User-Agent' => default_user_agent()];
195
+ } else {
196
+ // Add the User-Agent header if one was not already set.
197
+ foreach (array_keys($this->config['headers']) as $name) {
198
+ if (strtolower($name) === 'user-agent') {
199
+ return;
200
+ }
201
+ }
202
+ $this->config['headers']['User-Agent'] = default_user_agent();
203
+ }
204
+ }
205
+
206
+ /**
207
+ * Merges default options into the array.
208
+ *
209
+ * @param array $options Options to modify by reference
210
+ *
211
+ * @return array
212
+ */
213
+ private function prepareDefaults(array $options)
214
+ {
215
+ $defaults = $this->config;
216
+
217
+ if (!empty($defaults['headers'])) {
218
+ // Default headers are only added if they are not present.
219
+ $defaults['_conditional'] = $defaults['headers'];
220
+ unset($defaults['headers']);
221
+ }
222
+
223
+ // Special handling for headers is required as they are added as
224
+ // conditional headers and as headers passed to a request ctor.
225
+ if (array_key_exists('headers', $options)) {
226
+ // Allows default headers to be unset.
227
+ if ($options['headers'] === null) {
228
+ $defaults['_conditional'] = null;
229
+ unset($options['headers']);
230
+ } elseif (!is_array($options['headers'])) {
231
+ throw new \InvalidArgumentException('headers must be an array');
232
+ }
233
+ }
234
+
235
+ // Shallow merge defaults underneath options.
236
+ $result = $options + $defaults;
237
+
238
+ // Remove null values.
239
+ foreach ($result as $k => $v) {
240
+ if ($v === null) {
241
+ unset($result[$k]);
242
+ }
243
+ }
244
+
245
+ return $result;
246
+ }
247
+
248
+ /**
249
+ * Transfers the given request and applies request options.
250
+ *
251
+ * The URI of the request is not modified and the request options are used
252
+ * as-is without merging in default options.
253
+ *
254
+ * @param RequestInterface $request
255
+ * @param array $options
256
+ *
257
+ * @return Promise\PromiseInterface
258
+ */
259
+ private function transfer(RequestInterface $request, array $options)
260
+ {
261
+ // save_to -> sink
262
+ if (isset($options['save_to'])) {
263
+ $options['sink'] = $options['save_to'];
264
+ unset($options['save_to']);
265
+ }
266
+
267
+ // exceptions -> http_errors
268
+ if (isset($options['exceptions'])) {
269
+ $options['http_errors'] = $options['exceptions'];
270
+ unset($options['exceptions']);
271
+ }
272
+
273
+ $request = $this->applyOptions($request, $options);
274
+ $handler = $options['handler'];
275
+
276
+ try {
277
+ return Promise\promise_for($handler($request, $options));
278
+ } catch (\Exception $e) {
279
+ return Promise\rejection_for($e);
280
+ }
281
+ }
282
+
283
+ /**
284
+ * Applies the array of request options to a request.
285
+ *
286
+ * @param RequestInterface $request
287
+ * @param array $options
288
+ *
289
+ * @return RequestInterface
290
+ */
291
+ private function applyOptions(RequestInterface $request, array &$options)
292
+ {
293
+ $modify = [
294
+ 'set_headers' => [],
295
+ ];
296
+
297
+ if (isset($options['headers'])) {
298
+ $modify['set_headers'] = $options['headers'];
299
+ unset($options['headers']);
300
+ }
301
+
302
+ if (isset($options['form_params'])) {
303
+ if (isset($options['multipart'])) {
304
+ throw new \InvalidArgumentException('You cannot use '
305
+ . 'form_params and multipart at the same time. Use the '
306
+ . 'form_params option if you want to send application/'
307
+ . 'x-www-form-urlencoded requests, and the multipart '
308
+ . 'option to send multipart/form-data requests.');
309
+ }
310
+ $options['body'] = http_build_query($options['form_params'], '', '&');
311
+ unset($options['form_params']);
312
+ // Ensure that we don't have the header in different case and set the new value.
313
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
314
+ $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
315
+ }
316
+
317
+ if (isset($options['multipart'])) {
318
+ $options['body'] = new Psr7\MultipartStream($options['multipart']);
319
+ unset($options['multipart']);
320
+ }
321
+
322
+ if (isset($options['json'])) {
323
+ $options['body'] = \GuzzleHttp\json_encode($options['json']);
324
+ unset($options['json']);
325
+ // Ensure that we don't have the header in different case and set the new value.
326
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
327
+ $options['_conditional']['Content-Type'] = 'application/json';
328
+ }
329
+
330
+ if (!empty($options['decode_content'])
331
+ && $options['decode_content'] !== true
332
+ ) {
333
+ // Ensure that we don't have the header in different case and set the new value.
334
+ $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']);
335
+ $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
336
+ }
337
+
338
+ if (isset($options['body'])) {
339
+ if (is_array($options['body'])) {
340
+ $this->invalidBody();
341
+ }
342
+ $modify['body'] = Psr7\stream_for($options['body']);
343
+ unset($options['body']);
344
+ }
345
+
346
+ if (!empty($options['auth']) && is_array($options['auth'])) {
347
+ $value = $options['auth'];
348
+ $type = isset($value[2]) ? strtolower($value[2]) : 'basic';
349
+ switch ($type) {
350
+ case 'basic':
351
+ // Ensure that we don't have the header in different case and set the new value.
352
+ $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
353
+ $modify['set_headers']['Authorization'] = 'Basic '
354
+ . base64_encode("$value[0]:$value[1]");
355
+ break;
356
+ case 'digest':
357
+ // @todo: Do not rely on curl
358
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
359
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
360
+ break;
361
+ case 'ntlm':
362
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
363
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
364
+ break;
365
+ }
366
+ }
367
+
368
+ if (isset($options['query'])) {
369
+ $value = $options['query'];
370
+ if (is_array($value)) {
371
+ $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
372
+ }
373
+ if (!is_string($value)) {
374
+ throw new \InvalidArgumentException('query must be a string or array');
375
+ }
376
+ $modify['query'] = $value;
377
+ unset($options['query']);
378
+ }
379
+
380
+ // Ensure that sink is not an invalid value.
381
+ if (isset($options['sink'])) {
382
+ // TODO: Add more sink validation?
383
+ if (is_bool($options['sink'])) {
384
+ throw new \InvalidArgumentException('sink must not be a boolean');
385
+ }
386
+ }
387
+
388
+ $request = Psr7\modify_request($request, $modify);
389
+ if ($request->getBody() instanceof Psr7\MultipartStream) {
390
+ // Use a multipart/form-data POST if a Content-Type is not set.
391
+ // Ensure that we don't have the header in different case and set the new value.
392
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
393
+ $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
394
+ . $request->getBody()->getBoundary();
395
+ }
396
+
397
+ // Merge in conditional headers if they are not present.
398
+ if (isset($options['_conditional'])) {
399
+ // Build up the changes so it's in a single clone of the message.
400
+ $modify = [];
401
+ foreach ($options['_conditional'] as $k => $v) {
402
+ if (!$request->hasHeader($k)) {
403
+ $modify['set_headers'][$k] = $v;
404
+ }
405
+ }
406
+ $request = Psr7\modify_request($request, $modify);
407
+ // Don't pass this internal value along to middleware/handlers.
408
+ unset($options['_conditional']);
409
+ }
410
+
411
+ return $request;
412
+ }
413
+
414
+ private function invalidBody()
415
+ {
416
+ throw new \InvalidArgumentException('Passing in the "body" request '
417
+ . 'option as an array to send a POST request has been deprecated. '
418
+ . 'Please use the "form_params" request option to send a '
419
+ . 'application/x-www-form-urlencoded request, or the "multipart" '
420
+ . 'request option to send a multipart/form-data request.');
421
+ }
422
+ }
vendor/guzzlehttp/guzzle/src/ClientInterface.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use GuzzleHttp\Promise\PromiseInterface;
5
+ use GuzzleHttp\Exception\GuzzleException;
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
+ const VERSION = '6.4.1';
16
+
17
+ /**
18
+ * Send an HTTP request.
19
+ *
20
+ * @param RequestInterface $request Request to send
21
+ * @param array $options Request options to apply to the given
22
+ * request and to the transfer.
23
+ *
24
+ * @return ResponseInterface
25
+ * @throws GuzzleException
26
+ */
27
+ public function send(RequestInterface $request, array $options = []);
28
+
29
+ /**
30
+ * Asynchronously send an HTTP request.
31
+ *
32
+ * @param RequestInterface $request Request to send
33
+ * @param array $options Request options to apply to the given
34
+ * request and to the transfer.
35
+ *
36
+ * @return PromiseInterface
37
+ */
38
+ public function sendAsync(RequestInterface $request, array $options = []);
39
+
40
+ /**
41
+ * Create and send an HTTP request.
42
+ *
43
+ * Use an absolute path to override the base path of the client, or a
44
+ * relative path to append to the base path of the client. The URL can
45
+ * contain the query string as well.
46
+ *
47
+ * @param string $method HTTP method.
48
+ * @param string|UriInterface $uri URI object or string.
49
+ * @param array $options Request options to apply.
50
+ *
51
+ * @return ResponseInterface
52
+ * @throws GuzzleException
53
+ */
54
+ public function request($method, $uri, array $options = []);
55
+
56
+ /**
57
+ * Create and send an asynchronous HTTP request.
58
+ *
59
+ * Use an absolute path to override the base path of the client, or a
60
+ * relative path to append to the base path of the client. The URL can
61
+ * contain the query string as well. Use an array to provide a URL
62
+ * template and additional variables to use in the URL template expansion.
63
+ *
64
+ * @param string $method HTTP method
65
+ * @param string|UriInterface $uri URI object or string.
66
+ * @param array $options Request options to apply.
67
+ *
68
+ * @return PromiseInterface
69
+ */
70
+ public function requestAsync($method, $uri, array $options = []);
71
+
72
+ /**
73
+ * Get a client configuration option.
74
+ *
75
+ * These options include default request options of the client, a "handler"
76
+ * (if utilized by the concrete client), and a "base_uri" if utilized by
77
+ * the concrete client.
78
+ *
79
+ * @param string|null $option The config option to retrieve.
80
+ *
81
+ * @return mixed
82
+ */
83
+ public function getConfig($option = null);
84
+ }
vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 null name
98
+ if ($name === null) {
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
+
108
+ public function toArray()
109
+ {
110
+ return array_map(function (SetCookie $cookie) {
111
+ return $cookie->toArray();
112
+ }, $this->getIterator()->getArrayCopy());
113
+ }
114
+
115
+ public function clear($domain = null, $path = null, $name = null)
116
+ {
117
+ if (!$domain) {
118
+ $this->cookies = [];
119
+ return;
120
+ } elseif (!$path) {
121
+ $this->cookies = array_filter(
122
+ $this->cookies,
123
+ function (SetCookie $cookie) use ($domain) {
124
+ return !$cookie->matchesDomain($domain);
125
+ }
126
+ );
127
+ } elseif (!$name) {
128
+ $this->cookies = array_filter(
129
+ $this->cookies,
130
+ function (SetCookie $cookie) use ($path, $domain) {
131
+ return !($cookie->matchesPath($path) &&
132
+ $cookie->matchesDomain($domain));
133
+ }
134
+ );
135
+ } else {
136
+ $this->cookies = array_filter(
137
+ $this->cookies,
138
+ function (SetCookie $cookie) use ($path, $domain, $name) {
139
+ return !($cookie->getName() == $name &&
140
+ $cookie->matchesPath($path) &&
141
+ $cookie->matchesDomain($domain));
142
+ }
143
+ );
144
+ }
145
+ }
146
+
147
+ public function clearSessionCookies()
148
+ {
149
+ $this->cookies = array_filter(
150
+ $this->cookies,
151
+ function (SetCookie $cookie) {
152
+ return !$cookie->getDiscard() && $cookie->getExpires();
153
+ }
154
+ );
155
+ }
156
+
157
+ public function setCookie(SetCookie $cookie)
158
+ {
159
+ // If the name string is empty (but not 0), ignore the set-cookie
160
+ // string entirely.
161
+ $name = $cookie->getName();
162
+ if (!$name && $name !== '0') {
163
+ return false;
164
+ }
165
+
166
+ // Only allow cookies with set and valid domain, name, value
167
+ $result = $cookie->validate();
168
+ if ($result !== true) {
169
+ if ($this->strictMode) {
170
+ throw new \RuntimeException('Invalid cookie: ' . $result);
171
+ } else {
172
+ $this->removeCookieIfEmpty($cookie);
173
+ return false;
174
+ }
175
+ }
176
+
177
+ // Resolve conflicts with previously set cookies
178
+ foreach ($this->cookies as $i => $c) {
179
+
180
+ // Two cookies are identical, when their path, and domain are
181
+ // identical.
182
+ if ($c->getPath() != $cookie->getPath() ||
183
+ $c->getDomain() != $cookie->getDomain() ||
184
+ $c->getName() != $cookie->getName()
185
+ ) {
186
+ continue;
187
+ }
188
+
189
+ // The previously set cookie is a discard cookie and this one is
190
+ // not so allow the new cookie to be set
191
+ if (!$cookie->getDiscard() && $c->getDiscard()) {
192
+ unset($this->cookies[$i]);
193
+ continue;
194
+ }
195
+
196
+ // If the new cookie's expiration is further into the future, then
197
+ // replace the old cookie
198
+ if ($cookie->getExpires() > $c->getExpires()) {
199
+ unset($this->cookies[$i]);
200
+ continue;
201
+ }
202
+
203
+ // If the value has changed, we better change it
204
+ if ($cookie->getValue() !== $c->getValue()) {
205
+ unset($this->cookies[$i]);
206
+ continue;
207
+ }
208
+
209
+ // The cookie exists, so no need to continue
210
+ return false;
211
+ }
212
+
213
+ $this->cookies[] = $cookie;
214
+
215
+ return true;
216
+ }
217
+
218
+ public function count()
219
+ {
220
+ return count($this->cookies);
221
+ }
222
+
223
+ public function getIterator()
224
+ {
225
+ return new \ArrayIterator(array_values($this->cookies));
226
+ }
227
+
228
+ public function extractCookies(
229
+ RequestInterface $request,
230
+ ResponseInterface $response
231
+ ) {
232
+ if ($cookieHeader = $response->getHeader('Set-Cookie')) {
233
+ foreach ($cookieHeader as $cookie) {
234
+ $sc = SetCookie::fromString($cookie);
235
+ if (!$sc->getDomain()) {
236
+ $sc->setDomain($request->getUri()->getHost());
237
+ }
238
+ if (0 !== strpos($sc->getPath(), '/')) {
239
+ $sc->setPath($this->getCookiePathFromRequest($request));
240
+ }
241
+ $this->setCookie($sc);
242
+ }
243
+ }
244
+ }
245
+
246
+ /**
247
+ * Computes cookie path following RFC 6265 section 5.1.4
248
+ *
249
+ * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
250
+ *
251
+ * @param RequestInterface $request
252
+ * @return string
253
+ */
254
+ private function getCookiePathFromRequest(RequestInterface $request)
255
+ {
256
+ $uriPath = $request->getUri()->getPath();
257
+ if ('' === $uriPath) {
258
+ return '/';
259
+ }
260
+ if (0 !== strpos($uriPath, '/')) {
261
+ return '/';
262
+ }
263
+ if ('/' === $uriPath) {
264
+ return '/';
265
+ }
266
+ if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
267
+ return '/';
268
+ }
269
+
270
+ return substr($uriPath, 0, $lastSlashPos);
271
+ }
272
+
273
+ public function withCookieHeader(RequestInterface $request)
274
+ {
275
+ $values = [];
276
+ $uri = $request->getUri();
277
+ $scheme = $uri->getScheme();
278
+ $host = $uri->getHost();
279
+ $path = $uri->getPath() ?: '/';
280
+
281
+ foreach ($this->cookies as $cookie) {
282
+ if ($cookie->matchesPath($path) &&
283
+ $cookie->matchesDomain($host) &&
284
+ !$cookie->isExpired() &&
285
+ (!$cookie->getSecure() || $scheme === 'https')
286
+ ) {
287
+ $values[] = $cookie->getName() . '='
288
+ . $cookie->getValue();
289
+ }
290
+ }
291
+
292
+ return $values
293
+ ? $request->withHeader('Cookie', implode('; ', $values))
294
+ : $request;
295
+ }
296
+
297
+ /**
298
+ * If a cookie already exists and the server asks to set it again with a
299
+ * null value, the cookie must be deleted.
300
+ *
301
+ * @param SetCookie $cookie
302
+ */
303
+ private function removeCookieIfEmpty(SetCookie $cookie)
304
+ {
305
+ $cookieValue = $cookie->getValue();
306
+ if ($cookieValue === null || $cookieValue === '') {
307
+ $this->clear(
308
+ $cookie->getDomain(),
309
+ $cookie->getPath(),
310
+ $cookie->getName()
311
+ );
312
+ }
313
+ }
314
+ }
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 $domain Clears cookies matching a domain
62
+ * @param string $path Clears cookies matching a domain and path
63
+ * @param string $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/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/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/guzzlehttp/guzzle/src/Cookie/SetCookie.php ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // Remove the leading '.' as per spec in RFC 6265.
337
+ // http://tools.ietf.org/html/rfc6265#section-5.2.3
338
+ $cookieDomain = ltrim($this->getDomain(), '.');
339
+
340
+ // Domain not set or exact match.
341
+ if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
342
+ return true;
343
+ }
344
+
345
+ // Matching the subdomain according to RFC 6265.
346
+ // http://tools.ietf.org/html/rfc6265#section-5.1.3
347
+ if (filter_var($domain, FILTER_VALIDATE_IP)) {
348
+ return false;
349
+ }
350
+
351
+ return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain);
352
+ }
353
+
354
+ /**
355
+ * Check if the cookie is expired
356
+ *
357
+ * @return bool
358
+ */
359
+ public function isExpired()
360
+ {
361
+ return $this->getExpires() !== null && time() > $this->getExpires();
362
+ }
363
+
364
+ /**
365
+ * Check if the cookie is valid according to RFC 6265
366
+ *
367
+ * @return bool|string Returns true if valid or an error message if invalid
368
+ */
369
+ public function validate()
370
+ {
371
+ // Names must not be empty, but can be 0
372
+ $name = $this->getName();
373
+ if (empty($name) && !is_numeric($name)) {
374
+ return 'The cookie name must not be empty';
375
+ }
376
+
377
+ // Check if any of the invalid characters are present in the cookie name
378
+ if (preg_match(
379
+ '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
380
+ $name
381
+ )) {
382
+ return 'Cookie name must not contain invalid characters: ASCII '
383
+ . 'Control characters (0-31;127), space, tab and the '
384
+ . 'following characters: ()<>@,;:\"/?={}';
385
+ }
386
+
387
+ // Value must not be empty, but can be 0
388
+ $value = $this->getValue();
389
+ if (empty($value) && !is_numeric($value)) {
390
+ return 'The cookie value must not be empty';
391
+ }
392
+
393
+ // Domains must not be empty, but can be 0
394
+ // A "0" is not a valid internet domain, but may be used as server name
395
+ // in a private network.
396
+ $domain = $this->getDomain();
397
+ if (empty($domain) && !is_numeric($domain)) {
398
+ return 'The cookie domain must not be empty';
399
+ }
400
+
401
+ return true;
402
+ }
403
+ }
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/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/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/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/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/guzzlehttp/guzzle/src/Exception/RequestException.php ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+ use Psr\Http\Message\ResponseInterface;
6
+ use GuzzleHttp\Promise\PromiseInterface;
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 */
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
+ $body = $response->getBody();
128
+
129
+ if (!$body->isSeekable() || !$body->isReadable()) {
130
+ return null;
131
+ }
132
+
133
+ $size = $body->getSize();
134
+
135
+ if ($size === 0) {
136
+ return null;
137
+ }
138
+
139
+ $summary = $body->read(120);
140
+ $body->rewind();
141
+
142
+ if ($size > 120) {
143
+ $summary .= ' (truncated...)';
144
+ }
145
+
146
+ // Matches any printable character, including unicode characters:
147
+ // letters, marks, numbers, punctuation, spacing, and separators.
148
+ if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
149
+ return null;
150
+ }
151
+
152
+ return $summary;
153
+ }
154
+
155
+ /**
156
+ * Obfuscates URI if there is an username and a password present
157
+ *
158
+ * @param UriInterface $uri
159
+ *
160
+ * @return UriInterface
161
+ */
162
+ private static function obfuscateUri($uri)
163
+ {
164
+ $userInfo = $uri->getUserInfo();
165
+
166
+ if (false !== ($pos = strpos($userInfo, ':'))) {
167
+ return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
168
+ }
169
+
170
+ return $uri;
171
+ }
172
+
173
+ /**
174
+ * Get the request that caused the exception
175
+ *
176
+ * @return RequestInterface
177
+ */
178
+ public function getRequest()
179
+ {
180
+ return $this->request;
181
+ }
182
+
183
+ /**
184
+ * Get the associated response
185
+ *
186
+ * @return ResponseInterface|null
187
+ */
188
+ public function getResponse()
189
+ {
190
+ return $this->response;
191
+ }
192
+
193
+ /**
194
+ * Check if a response was received
195
+ *
196
+ * @return bool
197
+ */
198
+ public function hasResponse()
199
+ {
200
+ return $this->response !== null;
201
+ }
202
+
203
+ /**
204
+ * Get contextual information about the error from the underlying handler.
205
+ *
206
+ * The contents of this array will vary depending on which handler you are
207
+ * using. It may also be just an empty array. Relying on this data will
208
+ * couple you to a specific handler, but can give more debug information
209
+ * when needed.
210
+ *
211
+ * @return array
212
+ */
213
+ public function getHandlerContext()
214
+ {
215
+ return $this->handlerContext;
216
+ }
217
+ }
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/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/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/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/guzzlehttp/guzzle/src/Handler/CurlFactory.php ADDED
@@ -0,0 +1,580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Exception\RequestException;
5
+ use GuzzleHttp\Exception\ConnectException;
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
+ $sslKey = $options['ssl_key'];
458
+ if (is_array($sslKey)) {
459
+ $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1];
460
+ $sslKey = $sslKey[0];
461
+ }
462
+ if (!file_exists($sslKey)) {
463
+ throw new \InvalidArgumentException(
464
+ "SSL private key not found: {$sslKey}"
465
+ );
466
+ }
467
+ $conf[CURLOPT_SSLKEY] = $sslKey;
468
+ }
469
+
470
+ if (isset($options['progress'])) {
471
+ $progress = $options['progress'];
472
+ if (!is_callable($progress)) {
473
+ throw new \InvalidArgumentException(
474
+ 'progress client option must be callable'
475
+ );
476
+ }
477
+ $conf[CURLOPT_NOPROGRESS] = false;
478
+ $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) {
479
+ $args = func_get_args();
480
+ // PHP 5.5 pushed the handle onto the start of the args
481
+ if (is_resource($args[0])) {
482
+ array_shift($args);
483
+ }
484
+ call_user_func_array($progress, $args);
485
+ };
486
+ }
487
+
488
+ if (!empty($options['debug'])) {
489
+ $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']);
490
+ $conf[CURLOPT_VERBOSE] = true;
491
+ }
492
+ }
493
+
494
+ /**
495
+ * This function ensures that a response was set on a transaction. If one
496
+ * was not set, then the request is retried if possible. This error
497
+ * typically means you are sending a payload, curl encountered a
498
+ * "Connection died, retrying a fresh connect" error, tried to rewind the
499
+ * stream, and then encountered a "necessary data rewind wasn't possible"
500
+ * error, causing the request to be sent through curl_multi_info_read()
501
+ * without an error status.
502
+ */
503
+ private static function retryFailedRewind(
504
+ callable $handler,
505
+ EasyHandle $easy,
506
+ array $ctx
507
+ ) {
508
+ try {
509
+ // Only rewind if the body has been read from.
510
+ $body = $easy->request->getBody();
511
+ if ($body->tell() > 0) {
512
+ $body->rewind();
513
+ }
514
+ } catch (\RuntimeException $e) {
515
+ $ctx['error'] = 'The connection unexpectedly failed without '
516
+ . 'providing an error. The request would have been retried, '
517
+ . 'but attempting to rewind the request body failed. '
518
+ . 'Exception: ' . $e;
519
+ return self::createRejection($easy, $ctx);
520
+ }
521
+
522
+ // Retry no more than 3 times before giving up.
523
+ if (!isset($easy->options['_curl_retries'])) {
524
+ $easy->options['_curl_retries'] = 1;
525
+ } elseif ($easy->options['_curl_retries'] == 2) {
526
+ $ctx['error'] = 'The cURL request was retried 3 times '
527
+ . 'and did not succeed. The most likely reason for the failure '
528
+ . 'is that cURL was unable to rewind the body of the request '
529
+ . 'and subsequent retries resulted in the same error. Turn on '
530
+ . 'the debug option to see what went wrong. See '
531
+ . 'https://bugs.php.net/bug.php?id=47204 for more information.';
532
+ return self::createRejection($easy, $ctx);
533
+ } else {
534
+ $easy->options['_curl_retries']++;
535
+ }
536
+
537
+ return $handler($easy->request, $easy->options);
538
+ }
539
+
540
+ private function createHeaderFn(EasyHandle $easy)
541
+ {
542
+ if (isset($easy->options['on_headers'])) {
543
+ $onHeaders = $easy->options['on_headers'];
544
+
545
+ if (!is_callable($onHeaders)) {
546
+ throw new \InvalidArgumentException('on_headers must be callable');
547
+ }
548
+ } else {
549
+ $onHeaders = null;
550
+ }
551
+
552
+ return function ($ch, $h) use (
553
+ $onHeaders,
554
+ $easy,
555
+ &$startingResponse
556
+ ) {
557
+ $value = trim($h);
558
+ if ($value === '') {
559
+ $startingResponse = true;
560
+ $easy->createResponse();
561
+ if ($onHeaders !== null) {
562
+ try {
563
+ $onHeaders($easy->response);
564
+ } catch (\Exception $e) {
565
+ // Associate the exception with the handle and trigger
566
+ // a curl header write error by returning 0.
567
+ $easy->onHeadersException = $e;
568
+ return -1;
569
+ }
570
+ }
571
+ } elseif ($startingResponse) {
572
+ $startingResponse = false;
573
+ $easy->headers = [$value];
574
+ } else {
575
+ $easy->headers[] = $value;
576
+ }
577
+ return strlen($h);
578
+ };
579
+ }
580
+ }
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/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/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Promise as P;
5
+ use GuzzleHttp\Promise\Promise;
6
+ use GuzzleHttp\Psr7;
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
+
27
+ /**
28
+ * This handler accepts the following options:
29
+ *
30
+ * - handle_factory: An optional factory used to create curl handles
31
+ * - select_timeout: Optional timeout (in seconds) to block before timing
32
+ * out while selecting curl handles. Defaults to 1 second.
33
+ *
34
+ * @param array $options
35
+ */
36
+ public function __construct(array $options = [])
37
+ {
38
+ $this->factory = isset($options['handle_factory'])
39
+ ? $options['handle_factory'] : new CurlFactory(50);
40
+
41
+ if (isset($options['select_timeout'])) {
42
+ $this->selectTimeout = $options['select_timeout'];
43
+ } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
44
+ $this->selectTimeout = $selectTimeout;
45
+ } else {
46
+ $this->selectTimeout = 1;
47
+ }
48
+ }
49
+
50
+ public function __get($name)
51
+ {
52
+ if ($name === '_mh') {
53
+ return $this->_mh = curl_multi_init();
54
+ }
55
+
56
+ throw new \BadMethodCallException();
57
+ }
58
+
59
+ public function __destruct()
60
+ {
61
+ if (isset($this->_mh)) {
62
+ curl_multi_close($this->_mh);
63
+ unset($this->_mh);
64
+ }
65
+ }
66
+
67
+ public function __invoke(RequestInterface $request, array $options)
68
+ {
69
+ $easy = $this->factory->create($request, $options);
70
+ $id = (int) $easy->handle;
71
+
72
+ $promise = new Promise(
73
+ [$this, 'execute'],
74
+ function () use ($id) {
75
+ return $this->cancel($id);
76
+ }
77
+ );
78
+
79
+ $this->addRequest(['easy' => $easy, 'deferred' => $promise]);
80
+
81
+ return $promise;
82
+ }
83
+
84
+ /**
85
+ * Ticks the curl event loop.
86
+ */
87
+ public function tick()
88
+ {
89
+ // Add any delayed handles if needed.
90
+ if ($this->delays) {
91
+ $currentTime = \GuzzleHttp\_current_time();
92
+ foreach ($this->delays as $id => $delay) {
93
+ if ($currentTime >= $delay) {
94
+ unset($this->delays[$id]);
95
+ curl_multi_add_handle(
96
+ $this->_mh,
97
+ $this->handles[$id]['easy']->handle
98
+ );
99
+ }
100
+ }
101
+ }
102
+
103
+ // Step through the task queue which may add additional requests.
104
+ P\queue()->run();
105
+
106
+ if ($this->active &&
107
+ curl_multi_select($this->_mh, $this->selectTimeout) === -1
108
+ ) {
109
+ // Perform a usleep if a select returns -1.
110
+ // See: https://bugs.php.net/bug.php?id=61141
111
+ usleep(250);
112
+ }
113
+
114
+ while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
115
+
116
+ $this->processMessages();
117
+ }
118
+
119
+ /**
120
+ * Runs until all outstanding connections have completed.
121
+ */
122
+ public function execute()
123
+ {
124
+ $queue = P\queue();
125
+
126
+ while ($this->handles || !$queue->isEmpty()) {
127
+ // If there are no transfers, then sleep for the next delay
128
+ if (!$this->active && $this->delays) {
129
+ usleep($this->timeToNext());
130
+ }
131
+ $this->tick();
132
+ }
133
+ }
134
+
135
+ private function addRequest(array $entry)
136
+ {
137
+ $easy = $entry['easy'];
138
+ $id = (int) $easy->handle;
139
+ $this->handles[$id] = $entry;
140
+ if (empty($easy->options['delay'])) {
141
+ curl_multi_add_handle($this->_mh, $easy->handle);
142
+ } else {
143
+ $this->delays[$id] = \GuzzleHttp\_current_time() + ($easy->options['delay'] / 1000);
144
+ }
145
+ }
146
+
147
+ /**
148
+ * Cancels a handle from sending and removes references to it.
149
+ *
150
+ * @param int $id Handle ID to cancel and remove.
151
+ *
152
+ * @return bool True on success, false on failure.
153
+ */
154
+ private function cancel($id)
155
+ {
156
+ // Cannot cancel if it has been processed.
157
+ if (!isset($this->handles[$id])) {
158
+ return false;
159
+ }
160
+
161
+ $handle = $this->handles[$id]['easy']->handle;
162
+ unset($this->delays[$id], $this->handles[$id]);
163
+ curl_multi_remove_handle($this->_mh, $handle);
164
+ curl_close($handle);
165
+
166
+ return true;
167
+ }
168
+
169
+ private function processMessages()
170
+ {
171
+ while ($done = curl_multi_info_read($this->_mh)) {
172
+ $id = (int) $done['handle'];
173
+ curl_multi_remove_handle($this->_mh, $done['handle']);
174
+
175
+ if (!isset($this->handles[$id])) {
176
+ // Probably was cancelled.
177
+ continue;
178
+ }
179
+
180
+ $entry = $this->handles[$id];
181
+ unset($this->handles[$id], $this->delays[$id]);
182
+ $entry['easy']->errno = $done['result'];
183
+ $entry['deferred']->resolve(
184
+ CurlFactory::finish(
185
+ $this,
186
+ $entry['easy'],
187
+ $this->factory
188
+ )
189
+ );
190
+ }
191
+ }
192
+
193
+ private function timeToNext()
194
+ {
195
+ $currentTime = \GuzzleHttp\_current_time();
196
+ $nextTime = PHP_INT_MAX;
197
+ foreach ($this->delays as $time) {
198
+ if ($time < $nextTime) {
199
+ $nextTime = $time;
200
+ }
201
+ }
202
+
203
+ return max(0, $nextTime - $currentTime) * 1000000;
204
+ }
205
+ }
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/guzzlehttp/guzzle/src/Handler/MockHandler.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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'])) {
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
+ private function invokeStats(
179
+ RequestInterface $request,
180
+ array $options,
181
+ ResponseInterface $response = null,
182
+ $reason = null
183
+ ) {
184
+ if (isset($options['on_stats'])) {
185
+ $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
186
+ $stats = new TransferStats($request, $response, $transferTime, $reason);
187
+ call_user_func($options['on_stats'], $stats);
188
+ }
189
+ }
190
+ }
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/guzzlehttp/guzzle/src/Handler/StreamHandler.php ADDED
@@ -0,0 +1,544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Handler;
3
+
4
+ use GuzzleHttp\Exception\RequestException;
5
+ use GuzzleHttp\Exception\ConnectException;
6
+ use GuzzleHttp\Promise\FulfilledPromise;
7
+ use GuzzleHttp\Promise\PromiseInterface;
8
+ use GuzzleHttp\Psr7;
9
+ use GuzzleHttp\TransferStats;
10
+ use Psr\Http\Message\RequestInterface;
11
+ use Psr\Http\Message\ResponseInterface;
12
+ use Psr\Http\Message\StreamInterface;
13
+
14
+ /**
15
+ * HTTP handler that uses PHP's HTTP stream wrapper.
16
+ */
17
+ class StreamHandler
18
+ {
19
+ private $lastHeaders = [];
20
+
21
+ /**
22
+ * Sends an HTTP request.
23
+ *
24
+ * @param RequestInterface $request Request to send.
25
+ * @param array $options Request transfer options.
26
+ *
27
+ * @return PromiseInterface
28
+ */
29
+ public function __invoke(RequestInterface $request, array $options)
30
+ {
31
+ // Sleep if there is a delay specified.
32
+ if (isset($options['delay'])) {
33
+ usleep($options['delay'] * 1000);
34
+ }
35
+
36
+ $startTime = isset($options['on_stats']) ? \GuzzleHttp\_current_time() : null;
37
+
38
+ try {
39
+ // Does not support the expect header.
40
+ $request = $request->withoutHeader('Expect');
41
+
42
+ // Append a content-length header if body size is zero to match
43
+ // cURL's behavior.
44
+ if (0 === $request->getBody()->getSize()) {
45
+ $request = $request->withHeader('Content-Length', '0');
46
+ }
47
+
48
+ return $this->createResponse(
49
+ $request,
50
+ $options,
51
+ $this->createStream($request, $options),
52
+ $startTime
53
+ );
54
+ } catch (\InvalidArgumentException $e) {
55
+ throw $e;
56
+ } catch (\Exception $e) {
57
+ // Determine if the error was a networking error.
58
+ $message = $e->getMessage();
59
+ // This list can probably get more comprehensive.
60
+ if (strpos($message, 'getaddrinfo') // DNS lookup failed
61
+ || strpos($message, 'Connection refused')
62
+ || strpos($message, "couldn't connect to host") // error on HHVM
63
+ || strpos($message, "connection attempt failed")
64
+ ) {
65
+ $e = new ConnectException($e->getMessage(), $request, $e);
66
+ }
67
+ $e = RequestException::wrapException($request, $e);
68
+ $this->invokeStats($options, $request, $startTime, null, $e);
69
+
70
+ return \GuzzleHttp\Promise\rejection_for($e);
71
+ }
72
+ }
73
+
74
+ private function invokeStats(
75
+ array $options,
76
+ RequestInterface $request,
77
+ $startTime,
78
+ ResponseInterface $response = null,
79
+ $error = null
80
+ ) {
81
+ if (isset($options['on_stats'])) {
82
+ $stats = new TransferStats(
83
+ $request,
84
+ $response,
85
+ \GuzzleHttp\_current_time() - $startTime,
86
+ $error,
87
+ []
88
+ );
89
+ call_user_func($options['on_stats'], $stats);
90
+ }
91
+ }
92
+
93
+ private function createResponse(
94
+ RequestInterface $request,
95
+ array $options,
96
+ $stream,
97
+ $startTime
98
+ ) {
99
+ $hdrs = $this->lastHeaders;
100
+ $this->lastHeaders = [];
101
+ $parts = explode(' ', array_shift($hdrs), 3);
102
+ $ver = explode('/', $parts[0])[1];
103
+ $status = $parts[1];
104
+ $reason = isset($parts[2]) ? $parts[2] : null;
105
+ $headers = \GuzzleHttp\headers_from_lines($hdrs);
106
+ list($stream, $headers) = $this->checkDecode($options, $headers, $stream);
107
+ $stream = Psr7\stream_for($stream);
108
+ $sink = $stream;
109
+
110
+ if (strcasecmp('HEAD', $request->getMethod())) {
111
+ $sink = $this->createSink($stream, $options);
112
+ }
113
+
114
+ $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
115
+
116
+ if (isset($options['on_headers'])) {
117
+ try {
118
+ $options['on_headers']($response);
119
+ } catch (\Exception $e) {
120
+ $msg = 'An error was encountered during the on_headers event';
121
+ $ex = new RequestException($msg, $request, $response, $e);
122
+ return \GuzzleHttp\Promise\rejection_for($ex);
123
+ }
124
+ }
125
+
126
+ // Do not drain when the request is a HEAD request because they have
127
+ // no body.
128
+ if ($sink !== $stream) {
129
+ $this->drain(
130
+ $stream,
131
+ $sink,
132
+ $response->getHeaderLine('Content-Length')
133
+ );
134
+ }
135
+
136
+ $this->invokeStats($options, $request, $startTime, $response, null);
137
+
138
+ return new FulfilledPromise($response);
139
+ }
140
+
141
+ private function createSink(StreamInterface $stream, array $options)
142
+ {
143
+ if (!empty($options['stream'])) {
144
+ return $stream;
145
+ }
146
+
147
+ $sink = isset($options['sink'])
148
+ ? $options['sink']
149
+ : fopen('php://temp', 'r+');
150
+
151
+ return is_string($sink)
152
+ ? new Psr7\LazyOpenStream($sink, 'w+')
153
+ : Psr7\stream_for($sink);
154
+ }
155
+
156
+ private function checkDecode(array $options, array $headers, $stream)
157
+ {
158
+ // Automatically decode responses when instructed.
159
+ if (!empty($options['decode_content'])) {
160
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
161
+ if (isset($normalizedKeys['content-encoding'])) {
162
+ $encoding = $headers[$normalizedKeys['content-encoding']];
163
+ if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
164
+ $stream = new Psr7\InflateStream(
165
+ Psr7\stream_for($stream)
166
+ );
167
+ $headers['x-encoded-content-encoding']
168
+ = $headers[$normalizedKeys['content-encoding']];
169
+ // Remove content-encoding header
170
+ unset($headers[$normalizedKeys['content-encoding']]);
171
+ // Fix content-length header
172
+ if (isset($normalizedKeys['content-length'])) {
173
+ $headers['x-encoded-content-length']
174
+ = $headers[$normalizedKeys['content-length']];
175
+
176
+ $length = (int) $stream->getSize();
177
+ if ($length === 0) {
178
+ unset($headers[$normalizedKeys['content-length']]);
179
+ } else {
180
+ $headers[$normalizedKeys['content-length']] = [$length];
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+
187
+ return [$stream, $headers];
188
+ }
189
+
190
+ /**
191
+ * Drains the source stream into the "sink" client option.
192
+ *
193
+ * @param StreamInterface $source
194
+ * @param StreamInterface $sink
195
+ * @param string $contentLength Header specifying the amount of
196
+ * data to read.
197
+ *
198
+ * @return StreamInterface
199
+ * @throws \RuntimeException when the sink option is invalid.
200
+ */
201
+ private function drain(
202
+ StreamInterface $source,
203
+ StreamInterface $sink,
204
+ $contentLength
205
+ ) {
206
+ // If a content-length header is provided, then stop reading once
207
+ // that number of bytes has been read. This can prevent infinitely
208
+ // reading from a stream when dealing with servers that do not honor
209
+ // Connection: Close headers.
210
+ Psr7\copy_to_stream(
211
+ $source,
212
+ $sink,
213
+ (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
214
+ );
215
+
216
+ $sink->seek(0);
217
+ $source->close();
218
+
219
+ return $sink;
220
+ }
221
+
222
+ /**
223
+ * Create a resource and check to ensure it was created successfully
224
+ *
225
+ * @param callable $callback Callable that returns stream resource
226
+ *
227
+ * @return resource
228
+ * @throws \RuntimeException on error
229
+ */
230
+ private function createResource(callable $callback)
231
+ {
232
+ $errors = null;
233
+ set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
234
+ $errors[] = [
235
+ 'message' => $msg,
236
+ 'file' => $file,
237
+ 'line' => $line
238
+ ];
239
+ return true;
240
+ });
241
+
242
+ $resource = $callback();
243
+ restore_error_handler();
244
+
245
+ if (!$resource) {
246
+ $message = 'Error creating resource: ';
247
+ foreach ($errors as $err) {
248
+ foreach ($err as $key => $value) {
249
+ $message .= "[$key] $value" . PHP_EOL;
250
+ }
251
+ }
252
+ throw new \RuntimeException(trim($message));
253
+ }
254
+
255
+ return $resource;
256
+ }
257
+
258
+ private function createStream(RequestInterface $request, array $options)
259
+ {
260
+ static $methods;
261
+ if (!$methods) {
262
+ $methods = array_flip(get_class_methods(__CLASS__));
263
+ }
264
+
265
+ // HTTP/1.1 streams using the PHP stream wrapper require a
266
+ // Connection: close header
267
+ if ($request->getProtocolVersion() == '1.1'
268
+ && !$request->hasHeader('Connection')
269
+ ) {
270
+ $request = $request->withHeader('Connection', 'close');
271
+ }
272
+
273
+ // Ensure SSL is verified by default
274
+ if (!isset($options['verify'])) {
275
+ $options['verify'] = true;
276
+ }
277
+
278
+ $params = [];
279
+ $context = $this->getDefaultContext($request);
280
+
281
+ if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
282
+ throw new \InvalidArgumentException('on_headers must be callable');
283
+ }
284
+
285
+ if (!empty($options)) {
286
+ foreach ($options as $key => $value) {
287
+ $method = "add_{$key}";
288
+ if (isset($methods[$method])) {
289
+ $this->{$method}($request, $context, $value, $params);
290
+ }
291
+ }
292
+ }
293
+
294
+ if (isset($options['stream_context'])) {
295
+ if (!is_array($options['stream_context'])) {
296
+ throw new \InvalidArgumentException('stream_context must be an array');
297
+ }
298
+ $context = array_replace_recursive(
299
+ $context,
300
+ $options['stream_context']
301
+ );
302
+ }
303
+
304
+ // Microsoft NTLM authentication only supported with curl handler
305
+ if (isset($options['auth'])
306
+ && is_array($options['auth'])
307
+ && isset($options['auth'][2])
308
+ && 'ntlm' == $options['auth'][2]
309
+ ) {
310
+ throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
311
+ }
312
+
313
+ $uri = $this->resolveHost($request, $options);
314
+
315
+ $context = $this->createResource(
316
+ function () use ($context, $params) {
317
+ return stream_context_create($context, $params);
318
+ }
319
+ );
320
+
321
+ return $this->createResource(
322
+ function () use ($uri, &$http_response_header, $context, $options) {
323
+ $resource = fopen((string) $uri, 'r', null, $context);
324
+ $this->lastHeaders = $http_response_header;
325
+
326
+ if (isset($options['read_timeout'])) {
327
+ $readTimeout = $options['read_timeout'];
328
+ $sec = (int) $readTimeout;
329
+ $usec = ($readTimeout - $sec) * 100000;
330
+ stream_set_timeout($resource, $sec, $usec);
331
+ }
332
+
333
+ return $resource;
334
+ }
335
+ );
336
+ }
337
+
338
+ private function resolveHost(RequestInterface $request, array $options)
339
+ {
340
+ $uri = $request->getUri();
341
+
342
+ if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) {
343
+ if ('v4' === $options['force_ip_resolve']) {
344
+ $records = dns_get_record($uri->getHost(), DNS_A);
345
+ if (!isset($records[0]['ip'])) {
346
+ throw new ConnectException(
347
+ sprintf(
348
+ "Could not resolve IPv4 address for host '%s'",
349
+ $uri->getHost()
350
+ ),
351
+ $request
352
+ );
353
+ }
354
+ $uri = $uri->withHost($records[0]['ip']);
355
+ } elseif ('v6' === $options['force_ip_resolve']) {
356
+ $records = dns_get_record($uri->getHost(), DNS_AAAA);
357
+ if (!isset($records[0]['ipv6'])) {
358
+ throw new ConnectException(
359
+ sprintf(
360
+ "Could not resolve IPv6 address for host '%s'",
361
+ $uri->getHost()
362
+ ),
363
+ $request
364
+ );
365
+ }
366
+ $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
367
+ }
368
+ }
369
+
370
+ return $uri;
371
+ }
372
+
373
+ private function getDefaultContext(RequestInterface $request)
374
+ {
375
+ $headers = '';
376
+ foreach ($request->getHeaders() as $name => $value) {
377
+ foreach ($value as $val) {
378
+ $headers .= "$name: $val\r\n";
379
+ }
380
+ }
381
+
382
+ $context = [
383
+ 'http' => [
384
+ 'method' => $request->getMethod(),
385
+ 'header' => $headers,
386
+ 'protocol_version' => $request->getProtocolVersion(),
387
+ 'ignore_errors' => true,
388
+ 'follow_location' => 0,
389
+ ],
390
+ ];
391
+
392
+ $body = (string) $request->getBody();
393
+
394
+ if (!empty($body)) {
395
+ $context['http']['content'] = $body;
396
+ // Prevent the HTTP handler from adding a Content-Type header.
397
+ if (!$request->hasHeader('Content-Type')) {
398
+ $context['http']['header'] .= "Content-Type:\r\n";
399
+ }
400
+ }
401
+
402
+ $context['http']['header'] = rtrim($context['http']['header']);
403
+
404
+ return $context;
405
+ }
406
+
407
+ private function add_proxy(RequestInterface $request, &$options, $value, &$params)
408
+ {
409
+ if (!is_array($value)) {
410
+ $options['http']['proxy'] = $value;
411
+ } else {
412
+ $scheme = $request->getUri()->getScheme();
413
+ if (isset($value[$scheme])) {
414
+ if (!isset($value['no'])
415
+ || !\GuzzleHttp\is_host_in_noproxy(
416
+ $request->getUri()->getHost(),
417
+ $value['no']
418
+ )
419
+ ) {
420
+ $options['http']['proxy'] = $value[$scheme];
421
+ }
422
+ }
423
+ }
424
+ }
425
+
426
+ private function add_timeout(RequestInterface $request, &$options, $value, &$params)
427
+ {
428
+ if ($value > 0) {
429
+ $options['http']['timeout'] = $value;
430
+ }
431
+ }
432
+
433
+ private function add_verify(RequestInterface $request, &$options, $value, &$params)
434
+ {
435
+ if ($value === true) {
436
+ // PHP 5.6 or greater will find the system cert by default. When
437
+ // < 5.6, use the Guzzle bundled cacert.
438
+ if (PHP_VERSION_ID < 50600) {
439
+ $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
440
+ }
441
+ } elseif (is_string($value)) {
442
+ $options['ssl']['cafile'] = $value;
443
+ if (!file_exists($value)) {
444
+ throw new \RuntimeException("SSL CA bundle not found: $value");
445
+ }
446
+ } elseif ($value === false) {
447
+ $options['ssl']['verify_peer'] = false;
448
+ $options['ssl']['verify_peer_name'] = false;
449
+ return;
450
+ } else {
451
+ throw new \InvalidArgumentException('Invalid verify request option');
452
+ }
453
+
454
+ $options['ssl']['verify_peer'] = true;
455
+ $options['ssl']['verify_peer_name'] = true;
456
+ $options['ssl']['allow_self_signed'] = false;
457
+ }
458
+
459
+ private function add_cert(RequestInterface $request, &$options, $value, &$params)
460
+ {
461
+ if (is_array($value)) {
462
+ $options['ssl']['passphrase'] = $value[1];
463
+ $value = $value[0];
464
+ }
465
+
466
+ if (!file_exists($value)) {
467
+ throw new \RuntimeException("SSL certificate not found: {$value}");
468
+ }
469
+
470
+ $options['ssl']['local_cert'] = $value;
471
+ }
472
+
473
+ private function add_progress(RequestInterface $request, &$options, $value, &$params)
474
+ {
475
+ $this->addNotification(
476
+ $params,
477
+ function ($code, $a, $b, $c, $transferred, $total) use ($value) {
478
+ if ($code == STREAM_NOTIFY_PROGRESS) {
479
+ $value($total, $transferred, null, null);
480
+ }
481
+ }
482
+ );
483
+ }
484
+
485
+ private function add_debug(RequestInterface $request, &$options, $value, &$params)
486
+ {
487
+ if ($value === false) {
488
+ return;
489
+ }
490
+
491
+ static $map = [
492
+ STREAM_NOTIFY_CONNECT => 'CONNECT',
493
+ STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
494
+ STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
495
+ STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
496
+ STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
497
+ STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
498
+ STREAM_NOTIFY_PROGRESS => 'PROGRESS',
499
+ STREAM_NOTIFY_FAILURE => 'FAILURE',
500
+ STREAM_NOTIFY_COMPLETED => 'COMPLETED',
501
+ STREAM_NOTIFY_RESOLVE => 'RESOLVE',
502
+ ];
503
+ static $args = ['severity', 'message', 'message_code',
504
+ 'bytes_transferred', 'bytes_max'];
505
+
506
+ $value = \GuzzleHttp\debug_resource($value);
507
+ $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
508
+ $this->addNotification(
509
+ $params,
510
+ function () use ($ident, $value, $map, $args) {
511
+ $passed = func_get_args();
512
+ $code = array_shift($passed);
513
+ fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
514
+ foreach (array_filter($passed) as $i => $v) {
515
+ fwrite($value, $args[$i] . ': "' . $v . '" ');
516
+ }
517
+ fwrite($value, "\n");
518
+ }
519
+ );
520
+ }
521
+
522
+ private function addNotification(array &$params, callable $notify)
523
+ {
524
+ // Wrap the existing function if needed.
525
+ if (!isset($params['notification'])) {
526
+ $params['notification'] = $notify;
527
+ } else {
528
+ $params['notification'] = $this->callArray([
529
+ $params['notification'],
530
+ $notify
531
+ ]);
532
+ }
533
+ }
534
+
535
+ private function callArray(array $functions)
536
+ {
537
+ return function () use ($functions) {
538
+ $args = func_get_args();
539
+ foreach ($functions as $fn) {
540
+ call_user_func_array($fn, $args);
541
+ }
542
+ };
543
+ }
544
+ }
vendor/guzzlehttp/guzzle/src/HandlerStack.php ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ use Psr\Http\Message\RequestInterface;
5
+
6
+ /**
7
+ * Creates a composed Guzzle handler function by stacking middlewares on top of
8
+ * an HTTP handler function.
9
+ */
10
+ class HandlerStack
11
+ {
12
+ /** @var callable */
13
+ private $handler;
14
+
15
+ /** @var array */
16
+ private $stack = [];
17
+
18
+ /** @var callable|null */
19
+ private $cached;
20
+
21
+ /**
22
+ * C