Browse Source

loader ajax

kevin tessier 6 months ago
parent
commit
ba59f31741
100 changed files with 5424 additions and 174 deletions
  1. 4 2
      .gitignore
  2. 5 0
      .htaccess
  3. BIN
      tmp/Grav-5d9771f040539/1.1.1
  4. 48 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/.gitignore
  5. 58 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/CHANGELOG.md
  6. 21 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/LICENSE
  7. 108 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/README.md
  8. 42 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/blueprints.yaml
  9. 5 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/composer.json
  10. 114 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/composer.lock
  11. 84 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/imgsrcset.php
  12. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/imgsrcset.yaml
  13. 7 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/autoload.php
  14. 445 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/ClassLoader.php
  15. 21 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/LICENSE
  16. 9 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_classmap.php
  17. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_namespaces.php
  18. 9 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_psr4.php
  19. 52 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_real.php
  20. 33 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_static.php
  21. 102 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/installed.json
  22. 10 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/.gitattributes
  23. 41 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/.scrutinizer.yml
  24. 33 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/composer.json
  25. 254 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Content.php
  26. 46 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Curl.php
  27. 19 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/CurlInterface.php
  28. 782 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom.php
  29. 505 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/AbstractNode.php
  30. 41 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/ArrayNode.php
  31. 168 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Collection.php
  32. 207 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/HtmlNode.php
  33. 442 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/InnerNode.php
  34. 13 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/LeafNode.php
  35. 60 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/MockNode.php
  36. 351 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Tag.php
  37. 136 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/TextNode.php
  38. 12 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/ChildNotFoundException.php
  39. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/CircularException.php
  40. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/CurlException.php
  41. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/EmptyCollectionException.php
  42. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/NotLoadedException.php
  43. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/ParentNotFoundException.php
  44. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/StrictException.php
  45. 11 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Exceptions/UnknownChildTypeException.php
  46. 55 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Finder.php
  47. 94 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Options.php
  48. 97 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector/Parser.php
  49. 7 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector/ParserInterface.php
  50. 338 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector/Selector.php
  51. 113 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/StaticDom.php
  52. 14 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/.travis.yml
  53. 21 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/CONTRIBUTING.md
  54. 28 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/README.md
  55. 28 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/composer.json
  56. 28 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/phpunit.php
  57. 26 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/phpunit.xml
  58. 121 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/src/stringEncode/Encode.php
  59. 4 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/src/stringEncode/Exception.php
  60. 30 0
      tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/string-encode/tests/EncodeTest.php
  61. 11 0
      user/config/plugins/imgsrcset.yaml
  62. 2 0
      user/config/plugins/lazy-image.yaml
  63. 7 0
      user/config/plugins/sitemap.yaml
  64. 14 29
      user/config/system.yaml
  65. 0 7
      user/pages/01.home/default.md
  66. 0 13
      user/pages/02.projets/blog.md
  67. 0 13
      user/pages/02.projets/culturelle/blog.md
  68. BIN
      user/pages/02.projets/culturelle/encyclopedie-de-la-parole/1.jpg
  69. 0 19
      user/pages/02.projets/culturelle/encyclopedie-de-la-parole/projet.md
  70. BIN
      user/pages/02.projets/culturelle/ethica/OSC_2810.jpg
  71. 0 17
      user/pages/02.projets/culturelle/ethica/projet.md
  72. BIN
      user/pages/02.projets/culturelle/les-spectacles-de-lencyclopedie/2.jpg
  73. BIN
      user/pages/02.projets/culturelle/les-spectacles-de-lencyclopedie/3.jpg
  74. BIN
      user/pages/02.projets/culturelle/les-spectacles-de-lencyclopedie/4.jpg
  75. 0 20
      user/pages/02.projets/culturelle/les-spectacles-de-lencyclopedie/projet.md
  76. BIN
      user/pages/02.projets/culturelle/obscurity-of-light/OSC_2861.jpg
  77. BIN
      user/pages/02.projets/culturelle/obscurity-of-light/OSC_2873.jpg
  78. BIN
      user/pages/02.projets/culturelle/obscurity-of-light/OSC_2884.jpg
  79. BIN
      user/pages/02.projets/culturelle/obscurity-of-light/OSC_2909.jpg
  80. BIN
      user/pages/02.projets/culturelle/obscurity-of-light/OSC_2913.jpg
  81. 0 12
      user/pages/02.projets/culturelle/obscurity-of-light/projet.md
  82. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2539.jpg
  83. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2614_01.jpg
  84. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2618_01.jpg
  85. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2625_02.jpg
  86. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2649.jpg
  87. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2672.jpg
  88. BIN
      user/pages/02.projets/culturelle/tous-des-sang-meles/OSC_2703_01.jpg
  89. 0 16
      user/pages/02.projets/culturelle/tous-des-sang-meles/projet.md
  90. 0 13
      user/pages/02.projets/logo-du-ceras/item.md
  91. 0 13
      user/pages/02.projets/publique/blog.md
  92. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2737.jpg
  93. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2765.jpg
  94. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2789.jpg
  95. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2803.jpg
  96. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2810.jpg
  97. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2831.jpg
  98. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2838.jpg
  99. BIN
      user/pages/02.projets/publique/gost-2017/OSC_2859.jpg
  100. 0 0
      user/pages/02.projets/publique/gost-2017/OSC_2873.jpg

+ 4 - 2
.gitignore

@@ -23,8 +23,10 @@ user/data/*
 !user/data/.*
 user/plugins/*
 !user/plugins/.*
-user/themes/*
-!user/themes/.*
+user/themes/quark/
+!user/themes/quark/.*
+user/pages/*
+!user/pages/.*
 user/localhost/config/security.yaml
 user/config/security.yaml
 

+ 5 - 0
.htaccess

@@ -73,3 +73,8 @@ RewriteRule ^(LICENSE\.txt|composer\.lock|composer\.json|\.htaccess)$ error [F]
 Options -Indexes
 DirectoryIndex index.php index.html index.htm
 # End - Prevent Browsing and Set Default Resources
+
+
+# Redirect http://figureslibres.kevintessier.net/ https://figureslibres.kevintessier.net/
+
+Redirect 301 /sitemap /sitemap.xml

BIN
tmp/Grav-5d9771f040539/1.1.1


+ 48 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/.gitignore

@@ -0,0 +1,48 @@
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# =========================
+# Operating System Files
+# =========================
+
+# OSX
+# =========================
+
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+.php_cs.cache

+ 58 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/CHANGELOG.md

@@ -0,0 +1,58 @@
+# v1.1.1
+
+## 29-04-2019
+
+1. [](#bugfix)
+   - Content-processing
+
+# v1.1.1-beta-1
+
+## 11-04-2019
+
+1. [](#bugfix)
+   - Content-processing
+
+# v1.1.0
+
+## 14-02-2019
+
+1. [](#improved)
+   - Allow per-page options
+   - Bump vendor-dependency
+   - Code-cleanup
+
+# v1.0.3
+
+## 28-02-2017
+
+1. [](#improved)
+   - Use selectize in blueprint
+   - Code cleanup
+   - PSR-1 and PSR-2 compliance
+   - Change plugin icon
+   - Update readme
+2. [](#new)
+   - Document class and methods
+3. [](#bugfix)
+   - Fix changelog format
+
+# v1.0.2
+
+## 09-01-2017
+
+1. [](#bugfix)
+   - Fixed blueprint for admin interface
+
+# v1.0.1
+
+## 03-01-2017
+
+1. [](#bugfix)
+   - Restricted operations to non-admin pages only
+
+# v1.0.0
+
+## 14-05-2016
+
+1. [](#new)
+   - Initial release

+ 21 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/LICENSE

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

+ 108 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/README.md

@@ -0,0 +1,108 @@
+# [Grav](http://getgrav.org/) Image Srcset Plugin
+
+Adds a `srcset`-attribute to `img`-elements to allow for responsive images in Markdown. This allows [modern browsers](http://caniuse.com/#feat=srcset) to load the image which best fits within the viewport, based on available images and sizes, essentially choosing the best image to reduce loading times (see [RespImg](https://responsiveimages.org/)).
+
+Thus, on a small mobile screen this would load a much smaller image than on a large desktop. From this:
+
+```html
+<img title="Street view from the east" alt="Street view" src="street.jpg" />
+```
+
+To this:
+
+```html
+<img
+  title="Street view from the east"
+  alt="Street view"
+  src="street.jpg"
+  srcset="
+    street-320.jpg   320w,
+    street-480.jpg   480w,
+    street-640.jpg   640w,
+    street-960.jpg   960w,
+    street-1280.jpg 1280w,
+    street-1600.jpg 1600w,
+    street-1920.jpg 1920w,
+    street-2240.jpg 2240w
+  "
+  sizes="100vw"
+/>
+```
+
+This is only applied to image-elements generated from Markdown. Depends on [PHP Html Parser v1.7.0](https://github.com/paquettg/php-html-parser/) for DOM parsing and manipulation of `srcset` and `sizes`.
+
+# Installation and Configuration
+
+1. Download the zip version of [this repository](https://github.com/OleVik/grav-plugin-imgsrcset) and unzip it under `/your/site/grav/user/plugins`.
+2. Rename the folder to `imgsrcset`.
+
+You should now have all the plugin files under
+
+    /your/site/grav/user/plugins/imgsrcset
+
+The plugin is enabled by default, and can be disabled by copying `user/plugins/imgsrcset/imgsrcset.yaml` into `user/config/plugins/imgsrcset.yaml` and setting `enabled: false`. For a simple Twig-integration see [this gist](https://gist.github.com/OleVik/a7604215f127763b71bd8b8788d45cfd).
+
+**Note**: The plugin needs Twig to be processed first, so be sure to set `twig_first` to `true` in `system.yaml`, like this:
+
+```
+pages:
+  twig_first: true
+```
+
+## Generating images
+
+This plugin does **not** leverage Grav's media caching mechanisms, it simply circumvenes the need for caching by assuming that images are generated outside of Grav. This is necessary because Grav currently uses the Gregwar library, which relies on PHP's GD-module for image manipulation, and it handles large or many images poorly - indeed it tends to crash both caching and Grav itself. Thus by creating the images outside of this system the same quality and automation is achieved.
+
+**For an example of generating responsive images with NodeJS and Gulp see [this gist](https://gist.github.com/OleVik/f2c8b51a7153743b13607072c27cf8d2).**
+
+## Widths
+
+The `widths` setting is a YAML sequence wherein each integer represents the width of the image, defaulting to:
+
+```yaml
+- 320
+- 480
+- 640
+- 960
+- 1280
+- 1600
+- 1920
+- 2240
+```
+
+## Sizes
+
+The `sizes` setting is a YAML string defining the [sizes](https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-sizes)-attribute, defaulting to:
+
+```yaml
+sizes: "100vw"
+```
+
+## Images
+
+The plugin expects the images to be in the same folder as the source image. So, for the case of `street.jpg`, the page folder should contain:
+
+```bash
+street.jpg
+street-320.jpg
+street-480.jpg
+street-640.jpg
+street-960.jpg
+street-1280.jpg
+street-1600.jpg
+street-1920.jpg
+street-2240.jpg
+```
+
+## Per Page Options
+
+Configuration-options may also be set on an individual Page, using the following FrontMatter:
+
+```yaml
+imgsrcset:
+  enabled: true
+  widths: widths
+  sizes: sizes
+```
+
+MIT License 2019 by [Ole Vik](http://github.com/olevik).

+ 42 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/blueprints.yaml

@@ -0,0 +1,42 @@
+name: Image Srcset
+version: 1.1.1
+testing: true
+description: "Adds a srcset-attribute to img-elements to allow for responsive images in Markdown."
+icon: picture-o
+author:
+  name: Ole Vik
+  email: git@olevik.me
+  url: http://olevik.me
+homepage: https://github.com/olevik/grav-plugin-imgsrcset
+keywords: responsive, srcset
+bugs: https://github.com/olevik/grav-plugin-imgsrcset/issues
+license: MIT
+
+form:
+  validation: loose
+  fields:
+    enabled:
+      type: toggle
+      label: Plugin Status
+      highlight: 1
+      default: 1
+      options:
+        1: PLUGIN_ADMIN.ENABLED
+        0: PLUGIN_ADMIN.DISABLED
+      validate:
+        type: bool
+    widths:
+      type: selectize
+      label: Widths
+      description: Determines the available image sizes. Comma-separated list of widths.
+      classes: fancy
+      validate:
+        type: commalist
+    sizes:
+      type: text
+      size: x-small
+      label: Sizes
+      help: Determines the Sizes-attribute.
+      validate:
+        type: text
+        min: 1

+ 5 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/composer.json

@@ -0,0 +1,5 @@
+{
+  "require": {
+    "paquettg/php-html-parser": "^2.0.2"
+  }
+}

+ 114 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/composer.lock

@@ -0,0 +1,114 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "f38b95fb20b42face451f5eb678baf3e",
+    "packages": [
+        {
+            "name": "paquettg/php-html-parser",
+            "version": "2.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/paquettg/php-html-parser.git",
+                "reference": "77e4a44b0916690b4300fe9abf98fd05bbba48f0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/paquettg/php-html-parser/zipball/77e4a44b0916690b4300fe9abf98fd05bbba48f0",
+                "reference": "77e4a44b0916690b4300fe9abf98fd05bbba48f0",
+                "shasum": ""
+            },
+            "require": {
+                "ext-mbstring": "*",
+                "paquettg/string-encode": "~1.0.0",
+                "php": ">=7.1"
+            },
+            "require-dev": {
+                "mockery/mockery": "^1.2",
+                "php-coveralls/php-coveralls": "^2.1",
+                "phpunit/phpunit": "^7.5.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "PHPHtmlParser": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Gilles Paquette",
+                    "email": "paquettg@gmail.com",
+                    "homepage": "http://gillespaquette.ca"
+                }
+            ],
+            "description": "An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.",
+            "homepage": "https://github.com/paquettg/php-html-parser",
+            "keywords": [
+                "dom",
+                "html",
+                "parser"
+            ],
+            "time": "2019-02-10T01:35:49+00:00"
+        },
+        {
+            "name": "paquettg/string-encode",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/paquettg/string-encoder.git",
+                "reference": "a8708e9fac9d5ddfc8fc2aac6004e2cd05d80fee"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/paquettg/string-encoder/zipball/a8708e9fac9d5ddfc8fc2aac6004e2cd05d80fee",
+                "reference": "a8708e9fac9d5ddfc8fc2aac6004e2cd05d80fee",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.5.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "stringEncode": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Gilles Paquette",
+                    "email": "paquettg@gmail.com",
+                    "homepage": "http://gillespaquette.ca"
+                }
+            ],
+            "description": "Facilitating the process of altering string encoding in PHP.",
+            "homepage": "https://github.com/paquettg/string-encoder",
+            "keywords": [
+                "charset",
+                "encoding",
+                "string"
+            ],
+            "time": "2018-12-21T02:25:09+00:00"
+        }
+    ],
+    "packages-dev": [],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": [],
+    "platform-dev": []
+}

+ 84 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/imgsrcset.php

@@ -0,0 +1,84 @@
+<?php
+/**
+ * ImgSrcset Plugin
+ *
+ * PHP version 7
+ *
+ * @category   Extensions
+ * @package    Grav
+ * @subpackage ImgSrcset
+ * @author     Ole Vik <git@olevik.net>
+ * @license    http://www.opensource.org/licenses/mit-license.html MIT License
+ * @link       https://github.com/OleVik/grav-plugin-imgsrcset
+ */
+namespace Grav\Plugin;
+
+use Grav\Common\Data;
+use Grav\Common\Plugin;
+use Grav\Common\Grav;
+use Grav\Common\Page\Page;
+use RocketTheme\Toolbox\Event\Event;
+use PHPHtmlParser\Dom;
+
+/**
+ * Adds a srcset-attribute to img-elements to allow for responsive images in Markdown
+ *
+ * Class ImgSrcsetPlugin
+ *
+ * @category Extensions
+ * @package  Grav\Plugin
+ * @author   Ole Vik <git@olevik.net>
+ * @license  http://www.opensource.org/licenses/mit-license.html MIT License
+ * @link     https://github.com/OleVik/grav-plugin-imgsrcset
+ */
+class ImgSrcsetPlugin extends Plugin
+{
+
+    /**
+     * Register events with Grav
+     *
+     * @return array
+     */
+    public static function getSubscribedEvents()
+    {
+        return [
+            'onPageContentProcessed' => ['onPageContentProcessed', 0]
+        ];
+    }
+
+    /**
+     * Iterates over images in page content and rewrites paths
+     *
+     * @return void
+     */
+    public function onPageContentProcessed()
+    {
+        if ($this->isAdmin()) {
+            return;
+        }
+        $config = (array) $this->config->get('plugins.imgsrcset');
+        $page = $this->grav['page'];
+        $config = $this->mergeConfig($page);
+        if ($config['enabled']) {
+            include __DIR__ . '/vendor/autoload.php';
+            $dom = new Dom;
+            $dom->load($page->getRawContent());
+            $images = $dom->find('img');
+            $widths = $config['widths'];
+            foreach ($images as $image) {
+                $file = pathinfo($image->getAttribute('src'));
+                $dirname = $file['dirname'];
+                $filename = $file['filename'];
+                $extension = $file['extension'];
+                $srcsets = '';
+                foreach ($widths as $width) {
+                    $srcsets .= $dirname.'/'.$filename.'-'.$width.'.'.$extension.' '.$width.'w, ';
+                }
+                $srcsets = rtrim($srcsets, ", ");
+                $image->setAttribute('srcset', $srcsets);
+                $image->setAttribute('sizes', $config['sizes']);
+            }
+            $page->setRawContent($dom->outerHtml);
+        }
+    }
+}

+ 11 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/imgsrcset.yaml

@@ -0,0 +1,11 @@
+enabled: true
+widths:
+ - 320
+ - 480
+ - 640
+ - 960
+ - 1280
+ - 1600
+ - 1920
+ - 2240
+sizes: "100vw"

+ 7 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/autoload.php

@@ -0,0 +1,7 @@
+<?php
+
+// autoload.php @generated by Composer
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInite863a36850238c27fe275e4df5c3a50c::getLoader();

+ 445 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/ClassLoader.php

@@ -0,0 +1,445 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ *     Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ *     $loader = new \Composer\Autoload\ClassLoader();
+ *
+ *     // register classes with namespaces
+ *     $loader->add('Symfony\Component', __DIR__.'/component');
+ *     $loader->add('Symfony',           __DIR__.'/framework');
+ *
+ *     // activate the autoloader
+ *     $loader->register();
+ *
+ *     // to enable searching the include path (eg. for PEAR packages)
+ *     $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see    http://www.php-fig.org/psr/psr-0/
+ * @see    http://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+    // PSR-4
+    private $prefixLengthsPsr4 = array();
+    private $prefixDirsPsr4 = array();
+    private $fallbackDirsPsr4 = array();
+
+    // PSR-0
+    private $prefixesPsr0 = array();
+    private $fallbackDirsPsr0 = array();
+
+    private $useIncludePath = false;
+    private $classMap = array();
+    private $classMapAuthoritative = false;
+    private $missingClasses = array();
+    private $apcuPrefix;
+
+    public function getPrefixes()
+    {
+        if (!empty($this->prefixesPsr0)) {
+            return call_user_func_array('array_merge', $this->prefixesPsr0);
+        }
+
+        return array();
+    }
+
+    public function getPrefixesPsr4()
+    {
+        return $this->prefixDirsPsr4;
+    }
+
+    public function getFallbackDirs()
+    {
+        return $this->fallbackDirsPsr0;
+    }
+
+    public function getFallbackDirsPsr4()
+    {
+        return $this->fallbackDirsPsr4;
+    }
+
+    public function getClassMap()
+    {
+        return $this->classMap;
+    }
+
+    /**
+     * @param array $classMap Class to filename map
+     */
+    public function addClassMap(array $classMap)
+    {
+        if ($this->classMap) {
+            $this->classMap = array_merge($this->classMap, $classMap);
+        } else {
+            $this->classMap = $classMap;
+        }
+    }
+
+    /**
+     * Registers a set of PSR-0 directories for a given prefix, either
+     * appending or prepending to the ones previously set for this prefix.
+     *
+     * @param string       $prefix  The prefix
+     * @param array|string $paths   The PSR-0 root directories
+     * @param bool         $prepend Whether to prepend the directories
+     */
+    public function add($prefix, $paths, $prepend = false)
+    {
+        if (!$prefix) {
+            if ($prepend) {
+                $this->fallbackDirsPsr0 = array_merge(
+                    (array) $paths,
+                    $this->fallbackDirsPsr0
+                );
+            } else {
+                $this->fallbackDirsPsr0 = array_merge(
+                    $this->fallbackDirsPsr0,
+                    (array) $paths
+                );
+            }
+
+            return;
+        }
+
+        $first = $prefix[0];
+        if (!isset($this->prefixesPsr0[$first][$prefix])) {
+            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+            return;
+        }
+        if ($prepend) {
+            $this->prefixesPsr0[$first][$prefix] = array_merge(
+                (array) $paths,
+                $this->prefixesPsr0[$first][$prefix]
+            );
+        } else {
+            $this->prefixesPsr0[$first][$prefix] = array_merge(
+                $this->prefixesPsr0[$first][$prefix],
+                (array) $paths
+            );
+        }
+    }
+
+    /**
+     * Registers a set of PSR-4 directories for a given namespace, either
+     * appending or prepending to the ones previously set for this namespace.
+     *
+     * @param string       $prefix  The prefix/namespace, with trailing '\\'
+     * @param array|string $paths   The PSR-4 base directories
+     * @param bool         $prepend Whether to prepend the directories
+     *
+     * @throws \InvalidArgumentException
+     */
+    public function addPsr4($prefix, $paths, $prepend = false)
+    {
+        if (!$prefix) {
+            // Register directories for the root namespace.
+            if ($prepend) {
+                $this->fallbackDirsPsr4 = array_merge(
+                    (array) $paths,
+                    $this->fallbackDirsPsr4
+                );
+            } else {
+                $this->fallbackDirsPsr4 = array_merge(
+                    $this->fallbackDirsPsr4,
+                    (array) $paths
+                );
+            }
+        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+            // Register directories for a new namespace.
+            $length = strlen($prefix);
+            if ('\\' !== $prefix[$length - 1]) {
+                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+            }
+            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+            $this->prefixDirsPsr4[$prefix] = (array) $paths;
+        } elseif ($prepend) {
+            // Prepend directories for an already registered namespace.
+            $this->prefixDirsPsr4[$prefix] = array_merge(
+                (array) $paths,
+                $this->prefixDirsPsr4[$prefix]
+            );
+        } else {
+            // Append directories for an already registered namespace.
+            $this->prefixDirsPsr4[$prefix] = array_merge(
+                $this->prefixDirsPsr4[$prefix],
+                (array) $paths
+            );
+        }
+    }
+
+    /**
+     * Registers a set of PSR-0 directories for a given prefix,
+     * replacing any others previously set for this prefix.
+     *
+     * @param string       $prefix The prefix
+     * @param array|string $paths  The PSR-0 base directories
+     */
+    public function set($prefix, $paths)
+    {
+        if (!$prefix) {
+            $this->fallbackDirsPsr0 = (array) $paths;
+        } else {
+            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+        }
+    }
+
+    /**
+     * Registers a set of PSR-4 directories for a given namespace,
+     * replacing any others previously set for this namespace.
+     *
+     * @param string       $prefix The prefix/namespace, with trailing '\\'
+     * @param array|string $paths  The PSR-4 base directories
+     *
+     * @throws \InvalidArgumentException
+     */
+    public function setPsr4($prefix, $paths)
+    {
+        if (!$prefix) {
+            $this->fallbackDirsPsr4 = (array) $paths;
+        } else {
+            $length = strlen($prefix);
+            if ('\\' !== $prefix[$length - 1]) {
+                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+            }
+            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+            $this->prefixDirsPsr4[$prefix] = (array) $paths;
+        }
+    }
+
+    /**
+     * Turns on searching the include path for class files.
+     *
+     * @param bool $useIncludePath
+     */
+    public function setUseIncludePath($useIncludePath)
+    {
+        $this->useIncludePath = $useIncludePath;
+    }
+
+    /**
+     * Can be used to check if the autoloader uses the include path to check
+     * for classes.
+     *
+     * @return bool
+     */
+    public function getUseIncludePath()
+    {
+        return $this->useIncludePath;
+    }
+
+    /**
+     * Turns off searching the prefix and fallback directories for classes
+     * that have not been registered with the class map.
+     *
+     * @param bool $classMapAuthoritative
+     */
+    public function setClassMapAuthoritative($classMapAuthoritative)
+    {
+        $this->classMapAuthoritative = $classMapAuthoritative;
+    }
+
+    /**
+     * Should class lookup fail if not found in the current class map?
+     *
+     * @return bool
+     */
+    public function isClassMapAuthoritative()
+    {
+        return $this->classMapAuthoritative;
+    }
+
+    /**
+     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+     *
+     * @param string|null $apcuPrefix
+     */
+    public function setApcuPrefix($apcuPrefix)
+    {
+        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+    }
+
+    /**
+     * The APCu prefix in use, or null if APCu caching is not enabled.
+     *
+     * @return string|null
+     */
+    public function getApcuPrefix()
+    {
+        return $this->apcuPrefix;
+    }
+
+    /**
+     * Registers this instance as an autoloader.
+     *
+     * @param bool $prepend Whether to prepend the autoloader or not
+     */
+    public function register($prepend = false)
+    {
+        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+    }
+
+    /**
+     * Unregisters this instance as an autoloader.
+     */
+    public function unregister()
+    {
+        spl_autoload_unregister(array($this, 'loadClass'));
+    }
+
+    /**
+     * Loads the given class or interface.
+     *
+     * @param  string    $class The name of the class
+     * @return bool|null True if loaded, null otherwise
+     */
+    public function loadClass($class)
+    {
+        if ($file = $this->findFile($class)) {
+            includeFile($file);
+
+            return true;
+        }
+    }
+
+    /**
+     * Finds the path to the file where the class is defined.
+     *
+     * @param string $class The name of the class
+     *
+     * @return string|false The path if found, false otherwise
+     */
+    public function findFile($class)
+    {
+        // class map lookup
+        if (isset($this->classMap[$class])) {
+            return $this->classMap[$class];
+        }
+        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+            return false;
+        }
+        if (null !== $this->apcuPrefix) {
+            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+            if ($hit) {
+                return $file;
+            }
+        }
+
+        $file = $this->findFileWithExtension($class, '.php');
+
+        // Search for Hack files if we are running on HHVM
+        if (false === $file && defined('HHVM_VERSION')) {
+            $file = $this->findFileWithExtension($class, '.hh');
+        }
+
+        if (null !== $this->apcuPrefix) {
+            apcu_add($this->apcuPrefix.$class, $file);
+        }
+
+        if (false === $file) {
+            // Remember that this class does not exist.
+            $this->missingClasses[$class] = true;
+        }
+
+        return $file;
+    }
+
+    private function findFileWithExtension($class, $ext)
+    {
+        // PSR-4 lookup
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+        $first = $class[0];
+        if (isset($this->prefixLengthsPsr4[$first])) {
+            $subPath = $class;
+            while (false !== $lastPos = strrpos($subPath, '\\')) {
+                $subPath = substr($subPath, 0, $lastPos);
+                $search = $subPath.'\\';
+                if (isset($this->prefixDirsPsr4[$search])) {
+                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
+                        $length = $this->prefixLengthsPsr4[$first][$search];
+                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
+                            return $file;
+                        }
+                    }
+                }
+            }
+        }
+
+        // PSR-4 fallback dirs
+        foreach ($this->fallbackDirsPsr4 as $dir) {
+            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+                return $file;
+            }
+        }
+
+        // PSR-0 lookup
+        if (false !== $pos = strrpos($class, '\\')) {
+            // namespaced class name
+            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+        } else {
+            // PEAR-like class name
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+        }
+
+        if (isset($this->prefixesPsr0[$first])) {
+            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+                if (0 === strpos($class, $prefix)) {
+                    foreach ($dirs as $dir) {
+                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+                            return $file;
+                        }
+                    }
+                }
+            }
+        }
+
+        // PSR-0 fallback dirs
+        foreach ($this->fallbackDirsPsr0 as $dir) {
+            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+                return $file;
+            }
+        }
+
+        // PSR-0 include paths.
+        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+            return $file;
+        }
+
+        return false;
+    }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+    include $file;
+}

+ 21 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/LICENSE

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

+ 9 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_classmap.php

@@ -0,0 +1,9 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+);

+ 11 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_namespaces.php

@@ -0,0 +1,11 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+    'stringEncode' => array($vendorDir . '/paquettg/string-encode/src'),
+    'PHPHtmlParser' => array($vendorDir . '/paquettg/php-html-parser/src'),
+);

+ 9 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_psr4.php

@@ -0,0 +1,9 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+);

+ 52 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_real.php

@@ -0,0 +1,52 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInite863a36850238c27fe275e4df5c3a50c
+{
+    private static $loader;
+
+    public static function loadClassLoader($class)
+    {
+        if ('Composer\Autoload\ClassLoader' === $class) {
+            require __DIR__ . '/ClassLoader.php';
+        }
+    }
+
+    public static function getLoader()
+    {
+        if (null !== self::$loader) {
+            return self::$loader;
+        }
+
+        spl_autoload_register(array('ComposerAutoloaderInite863a36850238c27fe275e4df5c3a50c', 'loadClassLoader'), true, true);
+        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+        spl_autoload_unregister(array('ComposerAutoloaderInite863a36850238c27fe275e4df5c3a50c', 'loadClassLoader'));
+
+        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+        if ($useStaticLoader) {
+            require_once __DIR__ . '/autoload_static.php';
+
+            call_user_func(\Composer\Autoload\ComposerStaticInite863a36850238c27fe275e4df5c3a50c::getInitializer($loader));
+        } else {
+            $map = require __DIR__ . '/autoload_namespaces.php';
+            foreach ($map as $namespace => $path) {
+                $loader->set($namespace, $path);
+            }
+
+            $map = require __DIR__ . '/autoload_psr4.php';
+            foreach ($map as $namespace => $path) {
+                $loader->setPsr4($namespace, $path);
+            }
+
+            $classMap = require __DIR__ . '/autoload_classmap.php';
+            if ($classMap) {
+                $loader->addClassMap($classMap);
+            }
+        }
+
+        $loader->register(true);
+
+        return $loader;
+    }
+}

+ 33 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/autoload_static.php

@@ -0,0 +1,33 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInite863a36850238c27fe275e4df5c3a50c
+{
+    public static $prefixesPsr0 = array (
+        's' => 
+        array (
+            'stringEncode' => 
+            array (
+                0 => __DIR__ . '/..' . '/paquettg/string-encode/src',
+            ),
+        ),
+        'P' => 
+        array (
+            'PHPHtmlParser' => 
+            array (
+                0 => __DIR__ . '/..' . '/paquettg/php-html-parser/src',
+            ),
+        ),
+    );
+
+    public static function getInitializer(ClassLoader $loader)
+    {
+        return \Closure::bind(function () use ($loader) {
+            $loader->prefixesPsr0 = ComposerStaticInite863a36850238c27fe275e4df5c3a50c::$prefixesPsr0;
+
+        }, null, ClassLoader::class);
+    }
+}

+ 102 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/composer/installed.json

@@ -0,0 +1,102 @@
+[
+    {
+        "name": "paquettg/string-encode",
+        "version": "1.0.1",
+        "version_normalized": "1.0.1.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/paquettg/string-encoder.git",
+            "reference": "a8708e9fac9d5ddfc8fc2aac6004e2cd05d80fee"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/paquettg/string-encoder/zipball/a8708e9fac9d5ddfc8fc2aac6004e2cd05d80fee",
+            "reference": "a8708e9fac9d5ddfc8fc2aac6004e2cd05d80fee",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=7.1"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "^7.5.1"
+        },
+        "time": "2018-12-21T02:25:09+00:00",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "stringEncode": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Gilles Paquette",
+                "email": "paquettg@gmail.com",
+                "homepage": "http://gillespaquette.ca"
+            }
+        ],
+        "description": "Facilitating the process of altering string encoding in PHP.",
+        "homepage": "https://github.com/paquettg/string-encoder",
+        "keywords": [
+            "charset",
+            "encoding",
+            "string"
+        ]
+    },
+    {
+        "name": "paquettg/php-html-parser",
+        "version": "2.0.2",
+        "version_normalized": "2.0.2.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/paquettg/php-html-parser.git",
+            "reference": "77e4a44b0916690b4300fe9abf98fd05bbba48f0"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/paquettg/php-html-parser/zipball/77e4a44b0916690b4300fe9abf98fd05bbba48f0",
+            "reference": "77e4a44b0916690b4300fe9abf98fd05bbba48f0",
+            "shasum": ""
+        },
+        "require": {
+            "ext-mbstring": "*",
+            "paquettg/string-encode": "~1.0.0",
+            "php": ">=7.1"
+        },
+        "require-dev": {
+            "mockery/mockery": "^1.2",
+            "php-coveralls/php-coveralls": "^2.1",
+            "phpunit/phpunit": "^7.5.1"
+        },
+        "time": "2019-02-10T01:35:49+00:00",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "PHPHtmlParser": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Gilles Paquette",
+                "email": "paquettg@gmail.com",
+                "homepage": "http://gillespaquette.ca"
+            }
+        ],
+        "description": "An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.",
+        "homepage": "https://github.com/paquettg/php-html-parser",
+        "keywords": [
+            "dom",
+            "html",
+            "parser"
+        ]
+    }
+]

+ 10 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/.gitattributes

@@ -0,0 +1,10 @@
+/tests              export-ignore
+/.scrutinizar.yml   export-ignore
+/.travis.yml        export-ignore
+/.gitignore         export-ignore
+/CHANGELOG.md       export-ignore
+/CONTRIBUTING.md    export-ignore
+/LICENSE.md         export-ignore
+/README.md          export-ignore
+/phpunit.php        export-ignore
+/phpunit.xml        export-ignore

+ 41 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/.scrutinizer.yml

@@ -0,0 +1,41 @@
+filter:
+    paths: [src/*]
+    excluded_paths: [tests/*]
+checks:
+    php:
+        code_rating: true
+        remove_extra_empty_lines: true
+        remove_php_closing_tag: true
+        remove_trailing_whitespace: true
+        fix_use_statements:
+            remove_unused: true
+            preserve_multiple: false
+            preserve_blanklines: true
+            order_alphabetically: true
+        fix_php_opening_tag: true
+        fix_linefeed: true
+        fix_line_ending: true
+        fix_identation_4spaces: true
+        fix_doc_comments: true
+tools:
+    external_code_coverage:
+        timeout: 600
+        runs: 3
+    php_code_coverage: false
+    php_code_sniffer:
+        config:
+            standard: PSR2
+        filter:
+            paths: ['src']
+    php_loc:
+        enabled: true
+        excluded_dirs: [vendor, test]
+    php_cpd:
+        enabled: true
+        excluded_dirs: [vendor, test]
+build:
+    nodes:
+        analysis:
+            tests:
+                override:
+                    - php-scrutinizer-run

+ 33 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/composer.json

@@ -0,0 +1,33 @@
+{
+    "name": "paquettg/php-html-parser",
+    "type": "library",
+    "version": "2.0.2",
+    "description": "An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.",
+    "keywords": ["html", "dom", "parser"],
+    "homepage": "https://github.com/paquettg/php-html-parser",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Gilles Paquette",
+            "email": "paquettg@gmail.com",
+            "homepage": "http://gillespaquette.ca"
+        }
+    ],
+    "require": {
+        "php": ">=7.1",
+        "ext-mbstring": "*",
+        "paquettg/string-encode": "~1.0.0"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "^7.5.1",
+        "mockery/mockery": "^1.2",
+        "php-coveralls/php-coveralls": "^2.1"
+    },
+    "autoload": {
+        "psr-0": { 
+        	"PHPHtmlParser": "src/"
+       	}
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true
+}

+ 254 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Content.php

@@ -0,0 +1,254 @@
+<?php
+namespace PHPHtmlParser;
+
+/**
+ * Class Content
+ *
+ * @package PHPHtmlParser
+ */
+class Content
+{
+
+    /**
+     * The content string.
+     *
+     * @var string
+     */
+    protected $content;
+
+    /**
+     * The size of the content.
+     *
+     * @var integer
+     */
+    protected $size;
+
+    /**
+     * The current position we are in the content.
+     *
+     * @var integer
+     */
+    protected $pos;
+
+    /**
+     * The following 4 strings are tags that are important to us.
+     *
+     * @var string
+     */
+    protected $blank = " \t\r\n";
+    protected $equal = ' =/>';
+    protected $slash = " />\r\n\t";
+    protected $attr = ' >';
+
+    /**
+     * Content constructor.
+     *
+     * @param string $content
+     */
+    public function __construct(string $content = '')
+    {
+        $this->content = $content;
+        $this->size    = strlen($content);
+        $this->pos     = 0;
+    }
+
+    /**
+     * Returns the current position of the content.
+     *
+     * @return int
+     */
+    public function getPosition(): int
+    {
+        return $this->pos;
+    }
+
+    /**
+     * Gets the current character we are at.
+     *
+     * @param int $char
+     * @return string
+     */
+    public function char(int $char = null): string
+    {
+        $pos = $this->pos;
+        if ( ! is_null($char)) {
+            $pos = $char;
+        }
+
+        if ( ! isset($this->content[$pos])) {
+            return '';
+        }
+
+        return $this->content[$pos];
+    }
+
+    /**
+     * Moves the current position forward.
+     *
+     * @param int $count
+     * @return Content
+     * @chainable
+     */
+    public function fastForward(int $count): Content
+    {
+        $this->pos += $count;
+
+        return $this;
+    }
+
+    /**
+     * Moves the current position backward.
+     *
+     * @param int $count
+     * @return Content
+     * @chainable
+     */
+    public function rewind(int $count): Content
+    {
+        $this->pos -= $count;
+        if ($this->pos < 0) {
+            $this->pos = 0;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Copy the content until we find the given string.
+     *
+     * @param string $string
+     * @param bool $char
+     * @param bool $escape
+     * @return string
+     */
+    public function copyUntil(string $string, bool $char = false, bool $escape = false): string
+    {
+        if ($this->pos >= $this->size) {
+            // nothing left
+            return '';
+        }
+
+        if ($escape) {
+            $position = $this->pos;
+            $found    = false;
+            while ( ! $found) {
+                $position = strpos($this->content, $string, $position);
+                if ($position === false) {
+                    // reached the end
+                    $found = true;
+                    continue;
+                }
+
+                if ($this->char($position - 1) == '\\') {
+                    // this character is escaped
+                    ++$position;
+                    continue;
+                }
+
+                $found = true;
+            }
+        } elseif ($char) {
+            $position = strcspn($this->content, $string, $this->pos);
+            $position += $this->pos;
+        } else {
+            $position = strpos($this->content, $string, $this->pos);
+        }
+
+        if ($position === false) {
+            // could not find character, just return the remaining of the content
+            $return    = substr($this->content, $this->pos, $this->size - $this->pos);
+            $this->pos = $this->size;
+
+            return $return;
+        }
+
+        if ($position == $this->pos) {
+            // we are at the right place
+            return '';
+        }
+
+        $return = substr($this->content, $this->pos, $position - $this->pos);
+        // set the new position
+        $this->pos = $position;
+
+        return $return;
+    }
+
+    /**
+     * Copies the content until the string is found and return it
+     * unless the 'unless' is found in the substring.
+     *
+     * @param string $string
+     * @param string $unless
+     * @return string
+     */
+    public function copyUntilUnless(string $string, string $unless)
+    {
+        $lastPos = $this->pos;
+        $this->fastForward(1);
+        $foundString = $this->copyUntil($string, true, true);
+
+        $position = strcspn($foundString, $unless);
+        if ($position == strlen($foundString)) {
+            return $string.$foundString;
+        }
+        // rewind changes and return nothing
+        $this->pos = $lastPos;
+
+        return '';
+    }
+
+    /**
+     * Copies the content until it reaches the token string.,
+     *
+     * @param string $token
+     * @param bool $char
+     * @param bool $escape
+     * @return string
+     * @uses $this->copyUntil()
+     */
+    public function copyByToken(string $token, bool $char = false, bool $escape = false)
+    {
+        $string = $this->$token;
+
+        return $this->copyUntil($string, $char, $escape);
+    }
+
+    /**
+     * Skip a given set of characters.
+     *
+     * @param string $string
+     * @param bool $copy
+     * @return Content|string
+     */
+    public function skip(string $string, bool $copy = false)
+    {
+        $len = strspn($this->content, $string, $this->pos);
+
+        // make it chainable if they don't want a copy
+        $return = $this;
+        if ($copy) {
+            $return = substr($this->content, $this->pos, $len);
+        }
+
+        // update the position
+        $this->pos += $len;
+
+        return $return;
+    }
+
+    /**
+     * Skip a given token of pre-defined characters.
+     *
+     * @param string $token
+     * @param bool $copy
+     * @return Content|string
+     * @uses $this->skip()
+     */
+    public function skipByToken(string $token, bool $copy = false)
+    {
+        $string = $this->$token;
+
+        return $this->skip($string, $copy);
+    }
+}

+ 46 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Curl.php

@@ -0,0 +1,46 @@
+<?php
+namespace PHPHtmlParser;
+
+use PHPHtmlParser\Exceptions\CurlException;
+
+/**
+ * Class Curl
+ *
+ * @package PHPHtmlParser
+ */
+class Curl implements CurlInterface
+{
+
+    /**
+     * A simple curl implementation to get the content of the url.
+     *
+     * @param string $url
+     * @return string
+     * @throws CurlException
+     */
+    public function get(string $url): string
+    {
+        $ch = curl_init($url);
+
+        if ( ! ini_get('open_basedir')) {
+            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+        }
+
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
+        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+        curl_setopt($ch, CURLOPT_VERBOSE, true);
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36');
+        curl_setopt($ch, CURLOPT_URL, $url);
+
+        $content = curl_exec($ch);
+        if ($content === false) {
+            // there was a problem
+            $error = curl_error($ch);
+            throw new CurlException('Error retrieving "'.$url.'" ('.$error.')');
+        }
+
+        return $content;
+    }
+}

+ 19 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/CurlInterface.php

@@ -0,0 +1,19 @@
+<?php
+namespace PHPHtmlParser;
+
+/**
+ * Interface CurlInterface
+ *
+ * @package PHPHtmlParser
+ */
+interface CurlInterface
+{
+
+    /**
+     * This method should return the content of the url in a string
+     *
+     * @param string $url
+     * @return string
+     */
+    public function get(string $url): string;
+}

+ 782 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom.php

@@ -0,0 +1,782 @@
+<?php
+namespace PHPHtmlParser;
+
+use PHPHtmlParser\Dom\AbstractNode;
+use PHPHtmlParser\Dom\HtmlNode;
+use PHPHtmlParser\Dom\TextNode;
+use PHPHtmlParser\Exceptions\NotLoadedException;
+use PHPHtmlParser\Exceptions\StrictException;
+use stringEncode\Encode;
+
+/**
+ * Class Dom
+ *
+ * @package PHPHtmlParser
+ */
+class Dom
+{
+
+    /**
+     * The charset we would like the output to be in.
+     *
+     * @var string
+     */
+    protected $defaultCharset = 'UTF-8';
+
+    /**
+     * Contains the root node of this dom tree.
+     *
+     * @var HtmlNode
+     */
+    public $root;
+
+    /**
+     * The raw version of the document string.
+     *
+     * @var string
+     */
+    protected $raw;
+
+    /**
+     * The document string.
+     *
+     * @var Content
+     */
+    protected $content = null;
+
+    /**
+     * The original file size of the document.
+     *
+     * @var int
+     */
+    protected $rawSize;
+
+    /**
+     * The size of the document after it is cleaned.
+     *
+     * @var int
+     */
+    protected $size;
+
+    /**
+     * A global options array to be used by all load calls.
+     *
+     * @var array
+     */
+    protected $globalOptions = [];
+
+    /**
+     * A persistent option object to be used for all options in the
+     * parsing of the file.
+     *
+     * @var Options
+     */
+    protected $options;
+
+    /**
+     * A list of tags which will always be self closing
+     *
+     * @var array
+     */
+    protected $selfClosing = [
+        'area',
+        'base',
+        'basefont',
+        'br',
+        'col',
+        'embed',
+        'hr',
+        'img',
+        'input',
+        'keygen',
+        'link',
+        'meta',
+        'param',
+        'source',
+        'spacer',
+        'track',
+        'wbr'
+    ];
+
+    /**
+     * A list of tags where there should be no /> at the end (html5 style)
+     *
+     * @var array
+     */
+    protected $noSlash = [];
+
+    /**
+     * Returns the inner html of the root node.
+     *
+     * @return string
+     */
+    public function __toString(): string
+    {
+        return $this->root->innerHtml();
+    }
+
+    /**
+     * A simple wrapper around the root node.
+     *
+     * @param string $name
+     * @return mixed
+     */
+    public function __get($name)
+    {
+        return $this->root->$name;
+    }
+
+    /**
+     * Attempts to load the dom from any resource, string, file, or URL.
+     *
+     * @param string $str
+     * @param array $options
+     * @return Dom
+     * @chainable
+     */
+    public function load(string $str, array $options = []): Dom
+    {
+        AbstractNode::resetCount();
+        // check if it's a file
+        if (strpos($str, "\n") === false && is_file($str)) {
+            return $this->loadFromFile($str, $options);
+        }
+        // check if it's a url
+        if (preg_match("/^https?:\/\//i", $str)) {
+            return $this->loadFromUrl($str, $options);
+        }
+
+        return $this->loadStr($str, $options);
+    }
+
+    /**
+     * Loads the dom from a document file/url
+     *
+     * @param string $file
+     * @param array $options
+     * @return Dom
+     * @chainable
+     */
+    public function loadFromFile(string $file, array $options = []): Dom
+    {
+        return $this->loadStr(file_get_contents($file), $options);
+    }
+
+    /**
+     * Use a curl interface implementation to attempt to load
+     * the content from a url.
+     *
+     * @param string $url
+     * @param array $options
+     * @param CurlInterface $curl
+     * @return Dom
+     * @chainable
+     */
+    public function loadFromUrl(string $url, array $options = [], CurlInterface $curl = null): Dom
+    {
+        if (is_null($curl)) {
+            // use the default curl interface
+            $curl = new Curl;
+        }
+        $content = $curl->get($url);
+
+        return $this->loadStr($content, $options);
+    }
+
+    /**
+     * Parsers the html of the given string. Used for load(), loadFromFile(),
+     * and loadFromUrl().
+     *
+     * @param string $str
+     * @param array $option
+     * @return Dom
+     * @chainable
+     */
+    public function loadStr(string $str, array $option = []): Dom
+    {
+        $this->options = new Options;
+        $this->options->setOptions($this->globalOptions)
+                      ->setOptions($option);
+
+        $this->rawSize = strlen($str);
+        $this->raw     = $str;
+
+        $html = $this->clean($str);
+
+        $this->size    = strlen($str);
+        $this->content = new Content($html);
+
+        $this->parse();
+        $this->detectCharset();
+
+        return $this;
+    }
+
+    /**
+     * Sets a global options array to be used by all load calls.
+     *
+     * @param array $options
+     * @return Dom
+     * @chainable
+     */
+    public function setOptions(array $options): Dom
+    {
+        $this->globalOptions = $options;
+
+        return $this;
+    }
+
+    /**
+     * Find elements by css selector on the root node.
+     *
+     * @param string $selector
+     * @param int $nth
+     * @return mixed
+     */
+    public function find(string $selector, int $nth = null)
+    {
+        $this->isLoaded();
+
+        return $this->root->find($selector, $nth);
+    }
+
+    /**
+     * Find element by Id on the root node
+     *
+     * @param int $id
+     * @return mixed
+     */
+    public function findById(int $id)
+    {
+        $this->isLoaded();
+
+        return $this->root->findById($id);
+    }
+
+    /**
+     * Adds the tag (or tags in an array) to the list of tags that will always
+     * be self closing.
+     *
+     * @param string|array $tag
+     * @return Dom
+     * @chainable
+     */
+    public function addSelfClosingTag($tag): Dom
+    {
+        if ( ! is_array($tag)) {
+            $tag = [$tag];
+        }
+        foreach ($tag as $value) {
+            $this->selfClosing[] = $value;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Removes the tag (or tags in an array) from the list of tags that will
+     * always be self closing.
+     *
+     * @param string|array $tag
+     * @return Dom
+     * @chainable
+     */
+    public function removeSelfClosingTag($tag): Dom
+    {
+        if ( ! is_array($tag)) {
+            $tag = [$tag];
+        }
+        $this->selfClosing = array_diff($this->selfClosing, $tag);
+
+        return $this;
+    }
+
+    /**
+     * Sets the list of self closing tags to empty.
+     *
+     * @return Dom
+     * @chainable
+     */
+    public function clearSelfClosingTags(): Dom
+    {
+        $this->selfClosing = [];
+
+        return $this;
+    }
+
+
+    /**
+     * Adds a tag to the list of self closing tags that should not have a trailing slash
+     *
+     * @param $tag
+     * @return Dom
+     * @chainable
+     */
+    public function addNoSlashTag($tag): Dom
+    {
+        if ( ! is_array($tag)) {
+            $tag = [$tag];
+        }
+        foreach ($tag as $value) {
+            $this->noSlash[] = $value;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Removes a tag from the list of no-slash tags.
+     *
+     * @param $tag
+     * @return Dom
+     * @chainable
+     */
+    public function removeNoSlashTag($tag): Dom
+    {
+        if ( ! is_array($tag)) {
+            $tag = [$tag];
+        }
+        $this->noSlash = array_diff($this->noSlash, $tag);
+
+        return $this;
+    }
+
+    /**
+     * Empties the list of no-slash tags.
+     *
+     * @return Dom
+     * @chainable
+     */
+    public function clearNoSlashTags(): Dom
+    {
+        $this->noSlash = [];
+
+        return $this;
+    }
+
+    /**
+     * Simple wrapper function that returns the first child.
+     *
+     * @return \PHPHtmlParser\Dom\AbstractNode
+     */
+    public function firstChild(): \PHPHtmlParser\Dom\AbstractNode
+    {
+        $this->isLoaded();
+
+        return $this->root->firstChild();
+    }
+
+    /**
+     * Simple wrapper function that returns the last child.
+     *
+     * @return \PHPHtmlParser\Dom\AbstractNode
+     */
+    public function lastChild(): \PHPHtmlParser\Dom\AbstractNode
+    {
+        $this->isLoaded();
+
+        return $this->root->lastChild();
+    }
+
+    /**
+     * Simple wrapper function that returns count of child elements
+     *
+     * @return int
+     */
+    public function countChildren(): int
+    {
+        $this->isLoaded();
+
+        return $this->root->countChildren();
+    }
+
+    /**
+     * Get array of children
+     *
+     * @return array
+     */
+    public function getChildren(): array
+    {
+        $this->isLoaded();
+
+        return $this->root->getChildren();
+    }
+
+    /**
+     * Check if node have children nodes
+     *
+     * @return bool
+     */
+    public function hasChildren(): bool
+    {
+        $this->isLoaded();
+
+        return $this->root->hasChildren();
+    }
+
+    /**
+     * Simple wrapper function that returns an element by the
+     * id.
+     *
+     * @param string $id
+     * @return \PHPHtmlParser\Dom\AbstractNode|null
+     */
+    public function getElementById($id)
+    {
+        $this->isLoaded();
+
+        return $this->find('#'.$id, 0);
+    }
+
+    /**
+     * Simple wrapper function that returns all elements by
+     * tag name.
+     *
+     * @param string $name
+     * @return mixed
+     */
+    public function getElementsByTag(string $name)
+    {
+        $this->isLoaded();
+
+        return $this->find($name);
+    }
+
+    /**
+     * Simple wrapper function that returns all elements by
+     * class name.
+     *
+     * @param string $class
+     * @return mixed
+     */
+    public function getElementsByClass(string $class)
+    {
+        $this->isLoaded();
+
+        return $this->find('.'.$class);
+    }
+
+    /**
+     * Checks if the load methods have been called.
+     *
+     * @throws NotLoadedException
+     */
+    protected function isLoaded(): void
+    {
+        if (is_null($this->content)) {
+            throw new NotLoadedException('Content is not loaded!');
+        }
+    }
+
+    /**
+     * Cleans the html of any none-html information.
+     *
+     * @param string $str
+     * @return string
+     */
+    protected function clean(string $str): string
+    {
+        if ($this->options->get('cleanupInput') != true) {
+            // skip entire cleanup step
+            return $str;
+        }
+
+        // remove white space before closing tags
+        $str = mb_eregi_replace("'\s+>", "'>", $str);
+        $str = mb_eregi_replace('"\s+>', '">', $str);
+
+        // clean out the \n\r
+        $replace = ' ';
+        if ($this->options->get('preserveLineBreaks')) {
+            $replace = '&#10;';
+        }
+        $str = str_replace(["\r\n", "\r", "\n"], $replace, $str);
+
+        // strip the doctype
+        $str = mb_eregi_replace("<!doctype(.*?)>", '', $str);
+
+        // strip out comments
+        $str = mb_eregi_replace("<!--(.*?)-->", '', $str);
+
+        // strip out cdata
+        $str = mb_eregi_replace("<!\[CDATA\[(.*?)\]\]>", '', $str);
+
+        // strip out <script> tags
+        if ($this->options->get('removeScripts') == true) {
+            $str = mb_eregi_replace("<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>", '', $str);
+            $str = mb_eregi_replace("<\s*script\s*>(.*?)<\s*/\s*script\s*>", '', $str);
+        }
+
+        // strip out <style> tags
+        if ($this->options->get('removeStyles') == true) {
+            $str = mb_eregi_replace("<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>", '', $str);
+            $str = mb_eregi_replace("<\s*style\s*>(.*?)<\s*/\s*style\s*>", '', $str);
+        }
+
+        // strip out server side scripts
+        if ($this->options->get('serverSideScriptis') == true){
+            $str = mb_eregi_replace("(<\?)(.*?)(\?>)", '', $str);
+        }
+
+        // strip smarty scripts
+        $str = mb_eregi_replace("(\{\w)(.*?)(\})", '', $str);
+
+        return $str;
+    }
+
+    /**
+     * Attempts to parse the html in content.
+     */
+    protected function parse(): void
+    {
+        // add the root node
+        $this->root = new HtmlNode('root');
+        $activeNode = $this->root;
+        while ( ! is_null($activeNode)) {
+            $str = $this->content->copyUntil('<');
+            if ($str == '') {
+                $info = $this->parseTag();
+                if ( ! $info['status']) {
+                    // we are done here
+                    $activeNode = null;
+                    continue;
+                }
+
+                // check if it was a closing tag
+                if ($info['closing']) {
+                    $foundOpeningTag  = true;
+                    $originalNode     = $activeNode;
+                    while ($activeNode->getTag()->name() != $info['tag']) {
+                        $activeNode = $activeNode->getParent();
+                        if (is_null($activeNode)) {
+                            // we could not find opening tag
+                            $activeNode = $originalNode;
+                            $foundOpeningTag = false;
+                            break;
+                        }
+                    }
+                    if ($foundOpeningTag) {
+                        $activeNode = $activeNode->getParent();
+                    }
+                    continue;
+                }
+
+                if ( ! isset($info['node'])) {
+                    continue;
+                }
+
+                /** @var AbstractNode $node */
+                $node = $info['node'];
+                $activeNode->addChild($node);
+
+                // check if node is self closing
+                if ( ! $node->getTag()->isSelfClosing()) {
+                    $activeNode = $node;
+                }
+            } else if ($this->options->whitespaceTextNode ||
+                trim($str) != ''
+            ) {
+                // we found text we care about
+                $textNode = new TextNode($str, $this->options->removeDoubleSpace);
+                $activeNode->addChild($textNode);
+            }
+        }
+    }
+
+    /**
+     * Attempt to parse a tag out of the content.
+     *
+     * @return array
+     * @throws StrictException
+     */
+    protected function parseTag(): array
+    {
+        $return = [
+            'status'  => false,
+            'closing' => false,
+            'node'    => null,
+        ];
+        if ($this->content->char() != '<') {
+            // we are not at the beginning of a tag
+            return $return;
+        }
+
+        // check if this is a closing tag
+        if ($this->content->fastForward(1)->char() == '/') {
+            // end tag
+            $tag = $this->content->fastForward(1)
+                                 ->copyByToken('slash', true);
+            // move to end of tag
+            $this->content->copyUntil('>');
+            $this->content->fastForward(1);
+
+            // check if this closing tag counts
+            $tag = strtolower($tag);
+            if (in_array($tag, $this->selfClosing)) {
+                $return['status'] = true;
+
+                return $return;
+            } else {
+                $return['status']  = true;
+                $return['closing'] = true;
+                $return['tag']     = strtolower($tag);
+            }
+
+            return $return;
+        }
+
+        $tag  = strtolower($this->content->copyByToken('slash', true));
+        $node = new HtmlNode($tag);
+
+        // attributes
+        while ($this->content->char() != '>' &&
+            $this->content->char() != '/') {
+            $space = $this->content->skipByToken('blank', true);
+            if (empty($space)) {
+                $this->content->fastForward(1);
+                continue;
+            }
+
+            $name = $this->content->copyByToken('equal', true);
+            if ($name == '/') {
+                break;
+            }
+
+            if (empty($name)) {
+				$this->content->skipByToken('blank');
+				continue;
+            }
+
+            $this->content->skipByToken('blank');
+            if ($this->content->char() == '=') {
+                $attr = [];
+                $this->content->fastForward(1)
+                              ->skipByToken('blank');
+                switch ($this->content->char()) {
+                    case '"':
+                        $attr['doubleQuote'] = true;
+                        $this->content->fastForward(1);
+                        $string = $this->content->copyUntil('"', true, true);
+                        do {
+                            $moreString = $this->content->copyUntilUnless('"', '=>');
+                            $string .= $moreString;
+                        } while ( ! empty($moreString));
+                        $attr['value'] = $string;
+                        $this->content->fastForward(1);
+                        $node->getTag()->$name = $attr;
+                        break;
+                    case "'":
+                        $attr['doubleQuote'] = false;
+                        $this->content->fastForward(1);
+                        $string = $this->content->copyUntil("'", true, true);
+                        do {
+                            $moreString = $this->content->copyUntilUnless("'", '=>');
+                            $string .= $moreString;
+                        } while ( ! empty($moreString));
+                        $attr['value'] = $string;
+                        $this->content->fastForward(1);
+                        $node->getTag()->$name = $attr;
+                        break;
+                    default:
+                        $attr['doubleQuote']   = true;
+                        $attr['value']         = $this->content->copyByToken('attr', true);
+                        $node->getTag()->$name = $attr;
+                        break;
+                }
+            } else {
+                // no value attribute
+                if ($this->options->strict) {
+                    // can't have this in strict html
+                    $character = $this->content->getPosition();
+                    throw new StrictException("Tag '$tag' has an attribute '$name' with out a value! (character #$character)");
+                }
+                $node->getTag()->$name = [
+                    'value'       => null,
+                    'doubleQuote' => true,
+                ];
+                if ($this->content->char() != '>') {
+                    $this->content->rewind(1);
+                }
+            }
+        }
+
+        $this->content->skipByToken('blank');
+        if ($this->content->char() == '/') {
+            // self closing tag
+            $node->getTag()->selfClosing();
+            $this->content->fastForward(1);
+        } elseif (in_array($tag, $this->selfClosing)) {
+
+            // Should be a self closing tag, check if we are strict
+            if ($this->options->strict) {
+                $character = $this->content->getPosition();
+                throw new StrictException("Tag '$tag' is not self closing! (character #$character)");
+            }
+
+            // We force self closing on this tag.
+            $node->getTag()->selfClosing();
+
+            // Should this tag use a trailing slash?
+            if(in_array($tag, $this->noSlash))
+            {
+                $node->getTag()->noTrailingSlash();
+            }
+
+        }
+
+        $this->content->fastForward(1);
+
+        $return['status'] = true;
+        $return['node']   = $node;
+
+        return $return;
+    }
+
+    /**
+     * Attempts to detect the charset that the html was sent in.
+     *
+     * @return bool
+     */
+    protected function detectCharset(): bool
+    {
+        // set the default
+        $encode = new Encode;
+        $encode->from($this->defaultCharset);
+        $encode->to($this->defaultCharset);
+
+        if ( ! is_null($this->options->enforceEncoding)) {
+            //  they want to enforce the given encoding
+            $encode->from($this->options->enforceEncoding);
+            $encode->to($this->options->enforceEncoding);
+
+            return false;
+        }
+
+        $meta = $this->root->find('meta[http-equiv=Content-Type]', 0);
+        if (is_null($meta)) {
+            // could not find meta tag
+            $this->root->propagateEncoding($encode);
+
+            return false;
+        }
+        $content = $meta->content;
+        if (empty($content)) {
+            // could not find content
+            $this->root->propagateEncoding($encode);
+
+            return false;
+        }
+        $matches = [];
+        if (preg_match('/charset=(.+)/', $content, $matches)) {
+            $encode->from(trim($matches[1]));
+            $this->root->propagateEncoding($encode);
+
+            return true;
+        }
+
+        // no charset found
+        $this->root->propagateEncoding($encode);
+
+        return false;
+    }
+}

+ 505 - 0
tmp/Grav-5d9771f1b1ffd/OleVik-grav-plugin-imgsrcset-c25bfd7/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/AbstractNode.php

@@ -0,0 +1,505 @@
+<?php
+namespace PHPHtmlParser\Dom;
+
+use PHPHtmlParser\Exceptions\CircularException;
+use PHPHtmlParser\Exceptions\ParentNotFoundException;
+use PHPHtmlParser\Exceptions\ChildNotFoundException;
+use PHPHtmlParser\Selector\Selector;
+use PHPHtmlParser\Selector\Parser as SelectorParser;
+use stringEncode\Encode;
+use PHPHtmlParser\Finder;
+
+/**
+ * Dom node object.
+ *
+ * @property string outerhtml
+ * @property string innerhtml
+ * @property string text
+ * @property int prev
+ * @property int next
+ * @property \PHPHtmlParser\Dom\Tag tag
+ * @property InnerNode parent
+ */
+abstract class AbstractNode
+{
+    private static $count = 0;
+    /**
+     * Contains the tag name/type
+     *
+     * @var \PHPHtmlParser\Dom\Tag
+     */
+    protected $tag;
+
+    /**
+     * Contains a list of attributes on this tag.
+     *
+     * @var array
+     */
+    protected $attr = [];
+
+    /**
+     * Contains the parent Node.
+     *
+     * @var InnerNode
+     */
+    protected $parent = null;
+
+    /**
+     * The unique id of the class. Given by PHP.
+     *
+     * @var int
+     */
+    protected $id;
+
+    /**
+     * The encoding class used to encode strings.
+     *
+     * @var mixed
+     */
+    protected $encode;
+
+    /**
+     * An array of all the children.
+     *
+     * @var array
+     */
+    protected $children = [];
+
+    /**
+     * Creates a unique id for this node.
+     */
+    public function __construct()
+    {
+        $this->id = self::$count;
+        self::$count++;
+    }
+
+    /**
+     * Magic get method for attributes and certain methods.
+     *
+     * @param string $key
+     * @return mixed
+     */
+    public function __get(string $key)
+    {
+        // check attribute first
+        if ( ! is_null($this->getAttribute($key))) {
+            return $this->getAttribute($key);
+        }
+        switch (strtolower($key)) {
+            case 'outerhtml':
+                return $this->outerHtml();
+            case 'innerhtml':
+                return $this->innerHtml();
+            case 'text':
+                return $this->text();
+            case 'tag':
+                return $this->getTag();
+            case 'parent':
+                return $this->getParent();
+        }
+
+        return null;
+    }
+
+    /**
+     * Attempts to clear out any object references.
+     */
+    public function __destruct()
+    {
+        $this->tag      = null;
+        $this->attr     = [];
+        $this->parent   = null;
+        $this->children = [];
+    }
+
+    /**
+     * Simply calls the outer text method.
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->outerHtml();
+    }
+
+    /**
+     * Reset node counter
+     *
+     * @return void
+     */
+    public static function resetCount()
+    {
+        self::$count = 0;
+    }
+
+    /**
+     * Returns the id of this object.
+     *
+     * @return int
+     */
+    public function id(): int
+    {
+        return $this->id;
+    }
+
+    /**
+     * Returns the parent of node.
+     *
+     * @return AbstractNode
+     */
+    public function getParent()
+    {
+        return $this->parent;
+    }
+
+    /**
+     * Sets the parent node.
+     *
+     * @param InnerNode $parent
+     * @return AbstractNode
+     * @throws CircularException
+     * @chainable
+     */
+    public function setParent(InnerNode $parent): AbstractNode
+    {
+        // remove from old parent
+        if ( ! is_null($this->parent)) {
+            if ($this->parent->id() == $parent->id()) {
+                // already the parent
+                return $this;
+            }
+
+            $this->parent->removeChild($this->id);
+        }
+
+        $this->parent = $parent;
+
+        // assign child to parent
+        $this->parent->addChild($this);
+
+        return $this;
+    }
+
+    /**
+     * Removes this node and all its children from the
+     * DOM tree.
+     *
+     * @return void
+     */
+    public function delete()
+    {
+        if ( ! is_null($this->parent)) {
+            $this->parent->removeChild($this->id);
+        }
+        $this->parent->clear();
+        $this->clear();
+    }
+
+    /**
+     * Sets the encoding class to this node.
+     *
+     * @param Encode $encode
+     * @return void
+     */
+    public function propagateEncoding(Encode $encode)
+    {
+        $this->encode = $encode;
+        $this->tag->setEncoding($encode);
+    }
+
+    /**
+     * Checks if the given node id is an ancestor of
+     * the current node.
+     *
+     * @param int $id
+     * @return bool
+     */
+    public function isAncestor(int $id): Bool
+    {
+        if ( ! is_null($this->getAncestor($id))) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Attempts to get an ancestor node by the given id.
+     *
+     * @param int $id
+     * @return null|AbstractNode
+     */
+    public function getAncestor(int $id)
+    {
+        if ( ! is_null($this->parent)) {
+            if ($this->parent->id() == $id) {
+                return $this->parent;
+            }
+
+            return $this->parent->getAncestor($id);
+        }
+
+        return null;
+    }
+
+    /**
+     * Checks if the current node has a next sibling.
+     *
+     * @return bool
+     */
+    public function hasNextSibling(): bool
+    {
+        try
+        {
+            $this->nextSibling();
+
+            // sibling found, return true;
+            return true;
+        }
+        catch (ParentNotFoundException $e)
+        {
+            // no parent, no next sibling
+            return false;
+        }
+        catch (ChildNotFoundException $e)
+        {
+            // no sibling found
+            return false;
+        }
+    }
+
+    /**
+     * Attempts to get the next sibling.
+     *
+     * @return AbstractNode
+     * @throws ParentNotFoundException
+     */
+    public function nextSibling(): AbstractNode
+    {
+        if (is_null($this->parent)) {
+            throw new ParentNotFoundException('Parent is not set for this node.');
+        }
+
+        return $this->parent->nextChild($this->id);
+    }
+
+    /**
+     * Attempts to get the previous sibling
+     *
+     * @return AbstractNode
+     * @throws ParentNotFoundException
+     */
+    public function previousSibling(): AbstractNode
+    {
+        if (is_null($this->parent)) {
+            throw new ParentNotFoundException('Parent is not set for this node.');
+        }
+
+        return $this->parent->previousChild($this->id);
+    }
+
+    /**
+     * Gets the tag object of this node.
+     *
+     * @return Tag
+     */
+    public function getTag(): Tag
+    {
+        return $this->tag;
+    }
+
+    /**
+     * A wrapper method that simply calls the getAttribute method
+     * on the tag of this node.
+     *
+     * @return array
+     */
+    public function getAttributes(): array
+    {
+        $attributes = $this->tag->getAttributes();
+        foreach ($attributes as $name => $info) {
+            $attributes[$name] = $info['value'];
+        }
+
+        return $attributes;
+    }
+
+    /**
+     * A wrapper method that simply calls the getAttribute method
+     * on the tag of this node.
+     *
+     * @param string $key
+     * @return mixed
+     */
+    public function getAttribute(string $key)
+    {
+        $attribute = $this->tag->getAttribute($key);
+        if ( ! is_null($attribute)) {
+            $attribute = $attribute['value'];
+        }
+
+        return $attribute;
+    }
+
+    /**
+     * A wrapper method that simply calls the hasAttribute method
+     * on the tag of this node.
+     *
+     * @param string $key
+     * @return bool
+     */
+    public function hasAttribute(string $key): bool
+    {
+        return $this->tag->hasAttribute($key);
+    }
+
+    /**
+     * A wrapper method that simply calls the setAttribute method
+     * on the tag of this node.
+     *
+     * @param string $key
+     * @param string|null $value
+     * @return AbstractNode
+     * @chainable
+     */
+    public function setAttribute(string $key, $value): AbstractNode
+    {
+        $this->tag->setAttribute($key, $value);
+
+        //clear any cache
+        $this->clear();
+
+        return $this;
+    }
+
+    /**
+     * A wrapper method that simply calls the removeAttribute method
+     * on the tag of this node.
+     *
+     * @param string $key
+     * @return void
+     */
+    public function removeAttribute(string $key): void
+    {
+        $this->tag->removeAttribute($key);
+
+        //clear any cache
+        $this->clear();
+    }
+
+    /**
+     * A wrapper method that simply calls the removeAllAttributes