ghost 5.66.1 → 5.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.67.0.tgz +0 -0
  2. package/components/{tryghost-adapter-cache-redis-5.66.1.tgz → tryghost-adapter-cache-redis-5.67.0.tgz} +0 -0
  3. package/components/tryghost-adapter-manager-5.67.0.tgz +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.67.0.tgz +0 -0
  5. package/components/tryghost-api-framework-5.67.0.tgz +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.67.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.67.0.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.67.0.tgz +0 -0
  9. package/components/{tryghost-bootstrap-socket-5.66.1.tgz → tryghost-bootstrap-socket-5.67.0.tgz} +0 -0
  10. package/components/tryghost-collections-5.67.0.tgz +0 -0
  11. package/components/tryghost-constants-5.67.0.tgz +0 -0
  12. package/components/{tryghost-custom-theme-settings-service-5.66.1.tgz → tryghost-custom-theme-settings-service-5.67.0.tgz} +0 -0
  13. package/components/{tryghost-data-generator-5.66.1.tgz → tryghost-data-generator-5.67.0.tgz} +0 -0
  14. package/components/tryghost-domain-events-5.67.0.tgz +0 -0
  15. package/components/tryghost-donations-5.67.0.tgz +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.67.0.tgz +0 -0
  17. package/components/tryghost-email-analytics-provider-mailgun-5.67.0.tgz +0 -0
  18. package/components/{tryghost-email-analytics-service-5.66.1.tgz → tryghost-email-analytics-service-5.67.0.tgz} +0 -0
  19. package/components/tryghost-email-content-generator-5.67.0.tgz +0 -0
  20. package/components/tryghost-email-events-5.67.0.tgz +0 -0
  21. package/components/{tryghost-email-service-5.66.1.tgz → tryghost-email-service-5.67.0.tgz} +0 -0
  22. package/components/tryghost-email-suppression-list-5.67.0.tgz +0 -0
  23. package/components/tryghost-event-aware-cache-wrapper-5.67.0.tgz +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.67.0.tgz +0 -0
  25. package/components/tryghost-external-media-inliner-5.67.0.tgz +0 -0
  26. package/components/tryghost-extract-api-key-5.67.0.tgz +0 -0
  27. package/components/{tryghost-html-to-plaintext-5.66.1.tgz → tryghost-html-to-plaintext-5.67.0.tgz} +0 -0
  28. package/components/tryghost-i18n-5.67.0.tgz +0 -0
  29. package/components/tryghost-importer-handler-content-files-5.67.0.tgz +0 -0
  30. package/components/tryghost-importer-revue-5.67.0.tgz +0 -0
  31. package/components/{tryghost-in-memory-repository-5.66.1.tgz → tryghost-in-memory-repository-5.67.0.tgz} +0 -0
  32. package/components/{tryghost-job-manager-5.66.1.tgz → tryghost-job-manager-5.67.0.tgz} +0 -0
  33. package/components/{tryghost-link-redirects-5.66.1.tgz → tryghost-link-redirects-5.67.0.tgz} +0 -0
  34. package/components/tryghost-link-replacer-5.67.0.tgz +0 -0
  35. package/components/{tryghost-link-tracking-5.66.1.tgz → tryghost-link-tracking-5.67.0.tgz} +0 -0
  36. package/components/tryghost-magic-link-5.67.0.tgz +0 -0
  37. package/components/{tryghost-mail-events-5.66.1.tgz → tryghost-mail-events-5.67.0.tgz} +0 -0
  38. package/components/{tryghost-mailgun-client-5.66.1.tgz → tryghost-mailgun-client-5.67.0.tgz} +0 -0
  39. package/components/{tryghost-member-attribution-5.66.1.tgz → tryghost-member-attribution-5.67.0.tgz} +0 -0
  40. package/components/tryghost-member-events-5.67.0.tgz +0 -0
  41. package/components/{tryghost-members-api-5.66.1.tgz → tryghost-members-api-5.67.0.tgz} +0 -0
  42. package/components/{tryghost-members-csv-5.66.1.tgz → tryghost-members-csv-5.67.0.tgz} +0 -0
  43. package/components/{tryghost-members-events-service-5.66.1.tgz → tryghost-members-events-service-5.67.0.tgz} +0 -0
  44. package/components/tryghost-members-importer-5.67.0.tgz +0 -0
  45. package/components/{tryghost-members-offers-5.66.1.tgz → tryghost-members-offers-5.67.0.tgz} +0 -0
  46. package/components/tryghost-members-payments-5.67.0.tgz +0 -0
  47. package/components/tryghost-members-ssr-5.67.0.tgz +0 -0
  48. package/components/{tryghost-members-stripe-service-5.66.1.tgz → tryghost-members-stripe-service-5.67.0.tgz} +0 -0
  49. package/components/tryghost-mentions-email-report-5.67.0.tgz +0 -0
  50. package/components/tryghost-milestones-5.67.0.tgz +0 -0
  51. package/components/tryghost-minifier-5.67.0.tgz +0 -0
  52. package/components/tryghost-model-to-domain-event-interceptor-5.67.0.tgz +0 -0
  53. package/components/tryghost-mw-api-version-mismatch-5.67.0.tgz +0 -0
  54. package/components/tryghost-mw-cache-control-5.67.0.tgz +0 -0
  55. package/components/{tryghost-mw-error-handler-5.66.1.tgz → tryghost-mw-error-handler-5.67.0.tgz} +0 -0
  56. package/components/tryghost-mw-session-from-token-5.67.0.tgz +0 -0
  57. package/components/tryghost-mw-update-user-last-seen-5.67.0.tgz +0 -0
  58. package/components/tryghost-mw-version-match-5.67.0.tgz +0 -0
  59. package/components/tryghost-mw-vhost-5.67.0.tgz +0 -0
  60. package/components/tryghost-nql-filter-expansions-5.67.0.tgz +0 -0
  61. package/components/tryghost-oembed-service-5.67.0.tgz +0 -0
  62. package/components/tryghost-package-json-5.67.0.tgz +0 -0
  63. package/components/{tryghost-post-events-5.66.1.tgz → tryghost-post-events-5.67.0.tgz} +0 -0
  64. package/components/tryghost-post-revisions-5.67.0.tgz +0 -0
  65. package/components/tryghost-posts-service-5.67.0.tgz +0 -0
  66. package/components/tryghost-recommendations-5.67.0.tgz +0 -0
  67. package/components/tryghost-referrers-5.67.0.tgz +0 -0
  68. package/components/{tryghost-security-5.66.1.tgz → tryghost-security-5.67.0.tgz} +0 -0
  69. package/components/tryghost-session-service-5.67.0.tgz +0 -0
  70. package/components/{tryghost-settings-path-manager-5.66.1.tgz → tryghost-settings-path-manager-5.67.0.tgz} +0 -0
  71. package/components/tryghost-slack-notifications-5.67.0.tgz +0 -0
  72. package/components/tryghost-staff-service-5.67.0.tgz +0 -0
  73. package/components/tryghost-stats-service-5.67.0.tgz +0 -0
  74. package/components/tryghost-tiers-5.67.0.tgz +0 -0
  75. package/components/{tryghost-update-check-service-5.66.1.tgz → tryghost-update-check-service-5.67.0.tgz} +0 -0
  76. package/components/tryghost-verification-trigger-5.67.0.tgz +0 -0
  77. package/components/tryghost-version-notifications-data-service-5.67.0.tgz +0 -0
  78. package/components/tryghost-webmentions-5.67.0.tgz +0 -0
  79. package/content/themes/casper/assets/css/screen.css +0 -4
  80. package/content/themes/source/LICENSE +22 -0
  81. package/content/themes/source/README.md +65 -0
  82. package/content/themes/source/assets/built/screen.css +2 -0
  83. package/content/themes/source/assets/built/screen.css.map +1 -0
  84. package/content/themes/source/assets/built/source.js +2 -0
  85. package/content/themes/source/assets/built/source.js.map +1 -0
  86. package/content/themes/source/assets/css/screen.css +3206 -0
  87. package/content/themes/source/assets/fonts/eb-garamond-italic.woff2 +0 -0
  88. package/content/themes/source/assets/fonts/eb-garamond-roman.woff2 +0 -0
  89. package/content/themes/source/assets/fonts/inter-roman.woff2 +0 -0
  90. package/content/themes/source/assets/fonts/jetbrains-mono-italic.woff2 +0 -0
  91. package/content/themes/source/assets/fonts/jetbrains-mono-roman.woff2 +0 -0
  92. package/content/themes/source/assets/images/default-skin.png +0 -0
  93. package/content/themes/source/assets/images/default-skin.svg +1 -0
  94. package/content/themes/source/assets/images/preloader.gif +0 -0
  95. package/content/themes/source/assets/js/casper.js +46 -0
  96. package/content/themes/source/assets/js/dropdown.js +86 -0
  97. package/content/themes/source/assets/js/lib/imagesloaded.pkgd.min.js +7 -0
  98. package/content/themes/source/assets/js/lib/photoswipe-ui-default.min.js +4 -0
  99. package/content/themes/source/assets/js/lib/photoswipe.min.js +4 -0
  100. package/content/themes/source/assets/js/lib/reframe.min.js +1 -0
  101. package/content/themes/source/assets/js/lightbox.js +103 -0
  102. package/content/themes/source/assets/js/pagination.js +95 -0
  103. package/content/themes/source/author.hbs +43 -0
  104. package/content/themes/source/default.hbs +65 -0
  105. package/content/themes/source/gulpfile.js +174 -0
  106. package/content/themes/source/home.hbs +12 -0
  107. package/content/themes/source/index.hbs +6 -0
  108. package/content/themes/source/package.json +202 -0
  109. package/content/themes/source/page.hbs +26 -0
  110. package/content/themes/source/partials/components/cta.hbs +25 -0
  111. package/content/themes/source/partials/components/featured.hbs +14 -0
  112. package/content/themes/source/partials/components/footer.hbs +35 -0
  113. package/content/themes/source/partials/components/header-content.hbs +81 -0
  114. package/content/themes/source/partials/components/header.hbs +19 -0
  115. package/content/themes/source/partials/components/navigation.hbs +53 -0
  116. package/content/themes/source/partials/components/post-list.hbs +114 -0
  117. package/content/themes/source/partials/email-subscription.hbs +8 -0
  118. package/content/themes/source/partials/feature-image.hbs +16 -0
  119. package/content/themes/source/partials/icons/arrow.hbs +1 -0
  120. package/content/themes/source/partials/icons/avatar.hbs +1 -0
  121. package/content/themes/source/partials/icons/burger.hbs +1 -0
  122. package/content/themes/source/partials/icons/checkmark.hbs +24 -0
  123. package/content/themes/source/partials/icons/close.hbs +1 -0
  124. package/content/themes/source/partials/icons/facebook.hbs +1 -0
  125. package/content/themes/source/partials/icons/fire.hbs +3 -0
  126. package/content/themes/source/partials/icons/loader.hbs +17 -0
  127. package/content/themes/source/partials/icons/lock.hbs +5 -0
  128. package/content/themes/source/partials/icons/rss.hbs +1 -0
  129. package/content/themes/source/partials/icons/search.hbs +1 -0
  130. package/content/themes/source/partials/icons/twitter.hbs +1 -0
  131. package/content/themes/source/partials/lightbox.hbs +41 -0
  132. package/content/themes/source/partials/post-card.hbs +37 -0
  133. package/content/themes/source/partials/search-toggle.hbs +3 -0
  134. package/content/themes/source/post.hbs +76 -0
  135. package/content/themes/source/tag.hbs +22 -0
  136. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-b1c6a306.mjs → CodeEditorView-1643e910.mjs} +2 -2
  137. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  138. package/core/built/admin/assets/admin-x-settings/{index-02567620.mjs → index-b4c2ef5b.mjs} +2248 -2187
  139. package/core/built/admin/assets/admin-x-settings/{limit-service-bf02ec54.mjs → limit-service-c343d244.mjs} +2 -2
  140. package/core/built/admin/assets/admin-x-settings/modals-8b0aeacd.mjs +23887 -0
  141. package/core/built/admin/assets/{chunk.143.6ae91642f45fce60949c.js → chunk.143.da2301d9edb6ad0b5496.js} +5 -5
  142. package/core/built/admin/assets/{chunk.178.4842a4a973bb574d843b.js → chunk.178.efec05ab07e1e216d657.js} +4 -4
  143. package/core/built/admin/assets/{chunk.555.ba02d5a0095b4c4a7700.js → chunk.940.b09a2c2049ed9c373dd0.js} +55 -62
  144. package/core/built/admin/assets/{ghost-b24dd6efffe76ca031de95be6e91b543.js → ghost-193c98abe66483968da753e54917e87a.js} +114 -107
  145. package/core/built/admin/assets/ghost-9e454659c8c0896ed10336b640d1b1eb.css +1 -0
  146. package/core/built/admin/assets/ghost-dark-1d24186396fe74946c926faa9faa247b.css +1 -0
  147. package/core/built/admin/assets/img/themes/Source-Magazine-176385eb99561485ce6385598f7599b0.png +0 -0
  148. package/core/built/admin/assets/img/themes/Source-Newsletter-bb1a8611a326edb78f9ecb8bc1838c81.png +0 -0
  149. package/core/built/admin/assets/img/themes/Source-f29c6d6abe774ea7d5940a7431069fce.png +0 -0
  150. package/core/built/admin/assets/{vendor-5aa07b661eeb443bf7dd2c1de3b3f387.js → vendor-71d23939faaa5d1478ead73d917111b9.js} +48 -40
  151. package/core/built/admin/index.html +6 -6
  152. package/core/server/api/endpoints/recommendations.js +2 -1
  153. package/core/server/data/migrations/versions/5.67/2023-10-03-00-32-32-rollback-source-theme.js +40 -0
  154. package/core/server/data/schema/default-settings/default-settings.json +1 -1
  155. package/core/server/services/auth/setup.js +3 -3
  156. package/core/server/services/recommendations/RecommendationServiceWrapper.js +5 -4
  157. package/core/server/services/themes/storage.js +7 -7
  158. package/package.json +154 -154
  159. package/yarn.lock +221 -255
  160. package/components/tryghost-adapter-cache-memory-ttl-5.66.1.tgz +0 -0
  161. package/components/tryghost-adapter-manager-5.66.1.tgz +0 -0
  162. package/components/tryghost-announcement-bar-settings-5.66.1.tgz +0 -0
  163. package/components/tryghost-api-framework-5.66.1.tgz +0 -0
  164. package/components/tryghost-api-version-compatibility-service-5.66.1.tgz +0 -0
  165. package/components/tryghost-audience-feedback-5.66.1.tgz +0 -0
  166. package/components/tryghost-bookshelf-repository-5.66.1.tgz +0 -0
  167. package/components/tryghost-collections-5.66.1.tgz +0 -0
  168. package/components/tryghost-constants-5.66.1.tgz +0 -0
  169. package/components/tryghost-domain-events-5.66.1.tgz +0 -0
  170. package/components/tryghost-donations-5.66.1.tgz +0 -0
  171. package/components/tryghost-dynamic-routing-events-5.66.1.tgz +0 -0
  172. package/components/tryghost-email-analytics-provider-mailgun-5.66.1.tgz +0 -0
  173. package/components/tryghost-email-content-generator-5.66.1.tgz +0 -0
  174. package/components/tryghost-email-events-5.66.1.tgz +0 -0
  175. package/components/tryghost-email-suppression-list-5.66.1.tgz +0 -0
  176. package/components/tryghost-event-aware-cache-wrapper-5.66.1.tgz +0 -0
  177. package/components/tryghost-express-dynamic-redirects-5.66.1.tgz +0 -0
  178. package/components/tryghost-external-media-inliner-5.66.1.tgz +0 -0
  179. package/components/tryghost-extract-api-key-5.66.1.tgz +0 -0
  180. package/components/tryghost-i18n-5.66.1.tgz +0 -0
  181. package/components/tryghost-importer-handler-content-files-5.66.1.tgz +0 -0
  182. package/components/tryghost-importer-revue-5.66.1.tgz +0 -0
  183. package/components/tryghost-link-replacer-5.66.1.tgz +0 -0
  184. package/components/tryghost-magic-link-5.66.1.tgz +0 -0
  185. package/components/tryghost-member-events-5.66.1.tgz +0 -0
  186. package/components/tryghost-members-importer-5.66.1.tgz +0 -0
  187. package/components/tryghost-members-payments-5.66.1.tgz +0 -0
  188. package/components/tryghost-members-ssr-5.66.1.tgz +0 -0
  189. package/components/tryghost-mentions-email-report-5.66.1.tgz +0 -0
  190. package/components/tryghost-milestones-5.66.1.tgz +0 -0
  191. package/components/tryghost-minifier-5.66.1.tgz +0 -0
  192. package/components/tryghost-model-to-domain-event-interceptor-5.66.1.tgz +0 -0
  193. package/components/tryghost-mw-api-version-mismatch-5.66.1.tgz +0 -0
  194. package/components/tryghost-mw-cache-control-5.66.1.tgz +0 -0
  195. package/components/tryghost-mw-session-from-token-5.66.1.tgz +0 -0
  196. package/components/tryghost-mw-update-user-last-seen-5.66.1.tgz +0 -0
  197. package/components/tryghost-mw-version-match-5.66.1.tgz +0 -0
  198. package/components/tryghost-mw-vhost-5.66.1.tgz +0 -0
  199. package/components/tryghost-nql-filter-expansions-5.66.1.tgz +0 -0
  200. package/components/tryghost-oembed-service-5.66.1.tgz +0 -0
  201. package/components/tryghost-package-json-5.66.1.tgz +0 -0
  202. package/components/tryghost-post-revisions-5.66.1.tgz +0 -0
  203. package/components/tryghost-posts-service-5.66.1.tgz +0 -0
  204. package/components/tryghost-recommendations-5.66.1.tgz +0 -0
  205. package/components/tryghost-referrers-5.66.1.tgz +0 -0
  206. package/components/tryghost-session-service-5.66.1.tgz +0 -0
  207. package/components/tryghost-slack-notifications-5.66.1.tgz +0 -0
  208. package/components/tryghost-staff-service-5.66.1.tgz +0 -0
  209. package/components/tryghost-stats-service-5.66.1.tgz +0 -0
  210. package/components/tryghost-tiers-5.66.1.tgz +0 -0
  211. package/components/tryghost-verification-trigger-5.66.1.tgz +0 -0
  212. package/components/tryghost-version-notifications-data-service-5.66.1.tgz +0 -0
  213. package/components/tryghost-webmentions-5.66.1.tgz +0 -0
  214. package/core/built/admin/assets/admin-x-settings/modals-d2fd552b.mjs +0 -11622
  215. package/core/built/admin/assets/ghost-dark-54c925ac8f527d36132c18af7bef116e.css +0 -1
  216. package/core/built/admin/assets/ghost-f1a535bfec933b08a7a45f607cc245b1.css +0 -1
  217. /package/core/built/admin/assets/{chunk.555.ba02d5a0095b4c4a7700.js.LICENSE.txt → chunk.940.b09a2c2049ed9c373dd0.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ <svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>
@@ -0,0 +1,46 @@
1
+ /* Mobile menu burger toggle */
2
+ (function () {
3
+ const navigation = document.querySelector('.gh-navigation');
4
+ const burger = navigation.querySelector('.gh-burger');
5
+ if (!burger) return;
6
+
7
+ burger.addEventListener('click', function () {
8
+ if (!navigation.classList.contains('is-open')) {
9
+ navigation.classList.add('is-open');
10
+ } else {
11
+ navigation.classList.remove('is-open');
12
+ }
13
+ });
14
+ })();
15
+
16
+ /* Add lightbox to gallery images */
17
+ (function () {
18
+ lightbox(
19
+ '.kg-image-card > .kg-image[width][height], .kg-gallery-image > img'
20
+ );
21
+ })();
22
+
23
+ /* Responsive video in post content */
24
+ (function () {
25
+ const sources = [
26
+ '.gh-content iframe[src*="youtube.com"]',
27
+ '.gh-content iframe[src*="youtube-nocookie.com"]',
28
+ '.gh-content iframe[src*="player.vimeo.com"]',
29
+ '.gh-content iframe[src*="kickstarter.com"][src*="video.html"]',
30
+ '.gh-content object',
31
+ '.gh-content embed',
32
+ ];
33
+ reframe(document.querySelectorAll(sources.join(',')));
34
+ })();
35
+
36
+ /* Turn the main nav into dropdown menu when there are more than 5 menu items */
37
+ (function () {
38
+ dropdown();
39
+ })();
40
+
41
+ /* Infinite scroll pagination */
42
+ (function () {
43
+ if (document.body.classList.contains('paged')) {
44
+ pagination();
45
+ }
46
+ })();
@@ -0,0 +1,86 @@
1
+ function dropdown() {
2
+ const mediaQuery = window.matchMedia('(max-width: 767px)');
3
+
4
+ const head = document.querySelector('.gh-navigation');
5
+ const menu = head.querySelector('.gh-navigation-menu');
6
+ const nav = menu?.querySelector('.nav');
7
+ if (!nav) return;
8
+
9
+ const logo = document.querySelector('.gh-navigation-logo');
10
+ const navHTML = nav.innerHTML;
11
+
12
+ if (mediaQuery.matches) {
13
+ const items = nav.querySelectorAll('li');
14
+ items.forEach(function (item, index) {
15
+ item.style.transitionDelay = `${0.03 * (index + 1)}s`;
16
+ });
17
+ }
18
+
19
+ const makeDropdown = function () {
20
+ if (mediaQuery.matches) return;
21
+ const submenuItems = [];
22
+
23
+ while ((nav.offsetWidth + 64) > menu.offsetWidth) {
24
+ if (nav.lastElementChild) {
25
+ submenuItems.unshift(nav.lastElementChild);
26
+ nav.lastElementChild.remove();
27
+ } else {
28
+ break;
29
+ }
30
+ }
31
+
32
+ if (!submenuItems.length) {
33
+ head.classList.add('is-dropdown-loaded');
34
+ return;
35
+ }
36
+
37
+ const toggle = document.createElement('button');
38
+ toggle.setAttribute('class', 'gh-more-toggle gh-icon-button');
39
+ toggle.setAttribute('aria-label', 'More');
40
+ toggle.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>';
41
+
42
+ const wrapper = document.createElement('div');
43
+ wrapper.setAttribute('class', 'gh-dropdown');
44
+
45
+ if (submenuItems.length >= 10) {
46
+ head.classList.add('is-dropdown-mega');
47
+ wrapper.style.gridTemplateRows = `repeat(${Math.ceil(submenuItems.length / 2)}, 1fr)`;
48
+ } else {
49
+ head.classList.remove('is-dropdown-mega');
50
+ }
51
+
52
+ submenuItems.forEach(function (child) {
53
+ wrapper.appendChild(child);
54
+ });
55
+
56
+ toggle.appendChild(wrapper);
57
+ nav.appendChild(toggle);
58
+
59
+ head.classList.add('is-dropdown-loaded');
60
+
61
+ window.addEventListener('click', function (e) {
62
+ if (head.classList.contains('is-dropdown-open')) {
63
+ head.classList.remove('is-dropdown-open');
64
+ } else if (toggle.contains(e.target)) {
65
+ head.classList.add('is-dropdown-open');
66
+ }
67
+ });
68
+ }
69
+
70
+ imagesLoaded(logo, function () {
71
+ makeDropdown();
72
+ });
73
+
74
+ window.addEventListener('load', function () {
75
+ if (!logo) {
76
+ makeDropdown();
77
+ }
78
+ });
79
+
80
+ window.addEventListener('resize', function () {
81
+ setTimeout(() => {
82
+ nav.innerHTML = navHTML;
83
+ makeDropdown();
84
+ }, 1);
85
+ });
86
+ }
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * imagesLoaded PACKAGED v4.1.4
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
@@ -0,0 +1,4 @@
1
+ /*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
2
+ * http://photoswipe.com
3
+ * Copyright (c) 2019 Dmitry Semenov; */
4
+ !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g<S.length;g++)c=S[g],c.onTap&&f.indexOf("pswp__"+c.name)>-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g<q.shareButtons.length;g++)a=q.shareButtons[g],c=q.getImageURLForShare(a),d=q.getPageURLForShare(a),e=q.getTextForShare(a),b=a.url.replace("{{url}}",encodeURIComponent(d)).replace("{{image_url}}",encodeURIComponent(c)).replace("{{raw_image_url}}",c).replace("{{text}}",encodeURIComponent(e)),f+='<a href="'+b+'" target="_blank" class="pswp__share--'+a.id+'"'+(a.download?"download":"")+">"+a.label+"</a>",q.parseShareButtonOut&&(f=q.parseShareButtonOut(a,f));i.children[0].innerHTML=f,i.children[0].onclick=G},I=function(a){for(var c=0;c<q.closeElClasses.length;c++)if(b.hasClass(a,"pswp__"+q.closeElClasses[c]))return!0},J=0,K=function(){clearTimeout(u),J=0,k&&v.setIdle(!1)},L=function(a){a=a?a:window.event;var b=a.relatedTarget||a.toElement;b&&"HTML"!==b.nodeName||(clearTimeout(u),u=setTimeout(function(){v.setIdle(!0)},q.timeToIdleOutside))},M=function(){q.fullscreenEl&&!b.features.isOldAndroid&&(c||(c=v.getFullscreenAPI()),c?(b.bind(document,c.eventK,v.updateFullscreen),v.updateFullscreen(),b.addClass(a.template,"pswp--supports-fs")):b.removeClass(a.template,"pswp--supports-fs"))},N=function(){q.preloaderEl&&(O(!0),l("beforeChange",function(){clearTimeout(o),o=setTimeout(function(){a.currItem&&a.currItem.loading?(!a.allowProgressiveImg()||a.currItem.img&&!a.currItem.img.naturalWidth)&&O(!1):O(!0)},q.loadingIndicatorDelay)}),l("imageLoadComplete",function(b,c){a.currItem===c&&O(!0)}))},O=function(a){n!==a&&(C(m,"preloader--active",!a),n=a)},P=function(a){var c=a.vGap;if(B()){var g=q.barsSize;if(q.captionEl&&"auto"===g.bottom)if(f||(f=b.createEl("pswp__caption pswp__caption--fake"),f.appendChild(b.createEl("pswp__caption__center")),d.insertBefore(f,e),b.addClass(d,"pswp__ui--fit")),q.addCaptionHTMLFn(a,f,!0)){var h=f.clientHeight;c.bottom=parseInt(h,10)||44}else c.bottom=g.top;else c.bottom="auto"===g.bottom?0:g.bottom;c.top=g.top}else c.top=c.bottom=0},Q=function(){q.timeToIdle&&l("mouseUsed",function(){b.bind(document,"mousemove",K),b.bind(document,"mouseout",L),t=setInterval(function(){J++,2===J&&v.setIdle(!0)},q.timeToIdle/2)})},R=function(){l("onVerticalDrag",function(a){x&&a<.95?v.hideControls():!x&&a>=.95&&v.showControls()});var a;l("onPinchClose",function(b){x&&b<.9?(v.hideControls(),a=!0):a&&!x&&b>.9&&v.showControls()}),l("zoomGestureEnded",function(){a=!1,a&&!x&&v.showControls()})},S=[{name:"caption",option:"captionEl",onInit:function(a){e=a}},{name:"share-modal",option:"shareEl",onInit:function(a){i=a},onTap:function(){F()}},{name:"button--share",option:"shareEl",onInit:function(a){h=a},onTap:function(){F()}},{name:"button--zoom",option:"zoomEl",onTap:a.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(a){g=a}},{name:"button--close",option:"closeEl",onTap:a.close},{name:"button--arrow--left",option:"arrowEl",onTap:a.prev},{name:"button--arrow--right",option:"arrowEl",onTap:a.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){c.isFullscreen()?c.exit():c.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(a){m=a}}],T=function(){var a,c,e,f=function(d){if(d)for(var f=d.length,g=0;g<f;g++){a=d[g],c=a.className;for(var h=0;h<S.length;h++)e=S[h],c.indexOf("pswp__"+e.name)>-1&&(q[e.option]?(b.removeClass(a,"pswp__element--disabled"),e.onInit&&e.onInit(a)):b.addClass(a,"pswp__element--disabled"))}};f(d.children);var g=b.getChildByClass(d,"pswp__top-bar");g&&f(g.children)};v.init=function(){b.extend(a.options,z,!0),q=a.options,d=b.getChildByClass(a.scrollWrap,"pswp__ui"),l=a.listen,R(),l("beforeChange",v.update),l("doubleTap",function(b){var c=a.currItem.initialZoomLevel;a.getZoomLevel()!==c?a.zoomTo(c,b,333):a.zoomTo(q.getDoubleTapZoom(!1,a.currItem),b,333)}),l("preventDragEvent",function(a,b,c){var d=a.target||a.srcElement;d&&d.getAttribute("class")&&a.type.indexOf("mouse")>-1&&(d.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(d.tagName))&&(c.prevent=!1)}),l("bindEvents",function(){b.bind(d,"pswpTap click",A),b.bind(a.scrollWrap,"pswpTap",v.onGlobalTap),a.likelyTouchDevice||b.bind(a.scrollWrap,"mouseover",v.onMouseOver)}),l("unbindEvents",function(){y||F(),t&&clearInterval(t),b.unbind(document,"mouseout",L),b.unbind(document,"mousemove",K),b.unbind(d,"pswpTap click",A),b.unbind(a.scrollWrap,"pswpTap",v.onGlobalTap),b.unbind(a.scrollWrap,"mouseover",v.onMouseOver),c&&(b.unbind(document,c.eventK,v.updateFullscreen),c.isFullscreen()&&(q.hideAnimationDuration=0,c.exit()),c=null)}),l("destroy",function(){q.captionEl&&(f&&d.removeChild(f),b.removeClass(e,"pswp__caption--empty")),i&&(i.children[0].onclick=null),b.removeClass(d,"pswp__ui--over-close"),b.addClass(d,"pswp__ui--hidden"),v.setIdle(!1)}),q.showAnimationDuration||b.removeClass(d,"pswp__ui--hidden"),l("initialZoomIn",function(){q.showAnimationDuration&&b.removeClass(d,"pswp__ui--hidden")}),l("initialZoomOut",function(){b.addClass(d,"pswp__ui--hidden")}),l("parseVerticalMargin",P),T(),q.shareEl&&h&&i&&(y=!0),D(),Q(),M(),N()},v.setIdle=function(a){k=a,C(d,"ui--idle",a)},v.update=function(){x&&a.currItem?(v.updateIndexIndicator(),q.captionEl&&(q.addCaptionHTMLFn(a.currItem,e),C(e,"caption--empty",!a.currItem.title)),w=!0):w=!1,y||F(),D()},v.updateFullscreen=function(d){d&&setTimeout(function(){a.setScrollOffset(0,b.getScrollY())},50),b[(c.isFullscreen()?"add":"remove")+"Class"](a.template,"pswp--fs")},v.updateIndexIndicator=function(){q.counterEl&&(g.innerHTML=a.getCurrentIndex()+1+q.indexIndicatorSep+q.getNumItemsFn())},v.onGlobalTap=function(c){c=c||window.event;var d=c.target||c.srcElement;if(!r)if(c.detail&&"mouse"===c.detail.pointerType){if(I(d))return void a.close();b.hasClass(d,"pswp__img")&&(1===a.getZoomLevel()&&a.getZoomLevel()<=a.currItem.fitRatio?q.clickToCloseNonZoomable&&a.close():a.toggleDesktopZoom(c.detail.releasePoint))}else if(q.tapToToggleControls&&(x?v.hideControls():v.showControls()),q.tapToClose&&(b.hasClass(d,"pswp__img")||I(d)))return void a.close()},v.onMouseOver=function(a){a=a||window.event;var b=a.target||a.srcElement;C(d,"ui--over-close",I(b))},v.hideControls=function(){b.addClass(d,"pswp__ui--hidden"),x=!1},v.showControls=function(){x=!0,w||v.update(),b.removeClass(d,"pswp__ui--hidden")},v.supportsFullscreen=function(){var a=document;return!!(a.exitFullscreen||a.mozCancelFullScreen||a.webkitExitFullscreen||a.msExitFullscreen)},v.getFullscreenAPI=function(){var b,c=document.documentElement,d="fullscreenchange";return c.requestFullscreen?b={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:d}:c.mozRequestFullScreen?b={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+d}:c.webkitRequestFullscreen?b={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+d}:c.msRequestFullscreen&&(b={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),b&&(b.enter=function(){return j=q.closeOnScroll,q.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?a.template[this.enterK]():void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},b.exit=function(){return q.closeOnScroll=j,document[this.exitK]()},b.isFullscreen=function(){return document[this.elementK]}),b}};return a});
@@ -0,0 +1,4 @@
1
+ /*! PhotoSwipe - v4.1.3 - 2019-01-08
2
+ * http://photoswipe.com
3
+ * Copyright (c) 2019 Dmitry Semenov; */
4
+ !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f<b.length;f++)b[f]&&a[e](b[f],c,!1)},isArray:function(a){return a instanceof Array},createEl:function(a,b){var c=document.createElement(b||"div");return a&&(c.className=a),c},getScrollY:function(){var a=window.pageYOffset;return void 0!==a?a:document.documentElement.scrollTop},unbind:function(a,b,c){e.bind(a,b,c,!0)},removeClass:function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(a,b){e.hasClass(a,b)||(a.className+=(a.className?" ":"")+b)},hasClass:function(a,b){return a.className&&new RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className)},getChildByClass:function(a,b){for(var c=a.firstChild;c;){if(e.hasClass(c,b))return c;c=c.nextSibling}},arraySearch:function(a,b,c){for(var d=a.length;d--;)if(a[d][c]===b)return d;return-1},extend:function(a,b,c){for(var d in b)if(b.hasOwnProperty(d)){if(c&&a.hasOwnProperty(d))continue;a[d]=b[d]}},easing:{sine:{out:function(a){return Math.sin(a*(Math.PI/2))},inOut:function(a){return-(Math.cos(Math.PI*a)-1)/2}},cubic:{out:function(a){return--a*a*a+1}}},detectFeatures:function(){if(e.features)return e.features;var a=e.createEl(),b=a.style,c="",d={};if(d.oldIE=document.all&&!document.addEventListener,d.touch="ontouchstart"in window,window.requestAnimationFrame&&(d.raf=window.requestAnimationFrame,d.caf=window.cancelAnimationFrame),d.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!d.pointerEvent){var f=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var g=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);g&&g.length>0&&(g=parseInt(g[1],10),g>=1&&g<8&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(i<4.4&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;n<4;n++){c=m[n];for(var o=0;o<3;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;h<b.length;h++)if(e=b[h])if("object"==typeof c&&c.handleEvent){if(d){if(!c["oldIE"+e])return!1}else c["oldIE"+e]=g;a[f]("on"+e,c["oldIE"+e])}else a[f]("on"+e,c)});var f=this,g=25,h=3,i={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(a){return"A"===a.tagName},getDoubleTapZoom:function(a,b){return a?1:b.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};e.extend(i,d);var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma=function(){return{x:0,y:0}},na=ma(),oa=ma(),pa=ma(),qa={},ra=0,sa={},ta=ma(),ua=0,va=!0,wa=[],xa={},ya=!1,za=function(a,b){e.extend(f,b.publicMethods),wa.push(a)},Aa=function(a){var b=ac();return a>b-1?a-b:a<0?b+a:a},Ba={},Ca=function(a,b){return Ba[a]||(Ba[a]=[]),Ba[a].push(b)},Da=function(a){var b=Ba[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;d<b.length;d++)b[d].apply(f,c)}},Ea=function(){return(new Date).getTime()},Fa=function(a){ja=a,f.bg.style.opacity=a*i.bgOpacity},Ga=function(a,b,c,d,e){(!ya||e&&e!==f.currItem)&&(d/=e?e.fitRatio:f.currItem.fitRatio),a[E]=u+b+"px, "+c+"px"+v+" scale("+d+")"},Ha=function(a){ea&&(a&&(s>f.currItem.fitRatio?ya||(mc(f.currItem,!1,!0),ya=!0):ya&&(mc(f.currItem),ya=!1)),Ga(ea,pa.x,pa.y,s))},Ia=function(a){a.container&&Ga(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ja=function(a,b){b[E]=u+a+"px, 0px"+v},Ka=function(a,b){if(!i.loop&&b){var c=m+(ta.x*ra-a)/ta.x,d=Math.round(a-tb.x);(c<0&&d>0||c>=ac()-1&&d<0)&&(a=tb.x+d*i.mainScrollEndFriction)}tb.x=a,Ja(a,n)},La=function(a,b){var c=ub[a]-sa[a];return oa[a]+na[a]+c-c*(b/t)},Ma=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Na=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Oa=null,Pa=function(){Oa&&(e.unbind(document,"mousemove",Pa),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Da("mouseUsed")),Oa=setTimeout(function(){Oa=null},100)},Qa=function(){e.bind(document,"keydown",f),N.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Pa),e.bind(window,"resize scroll orientationchange",f),Da("bindEvents")},Ra=function(){e.unbind(window,"resize scroll orientationchange",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Pa),N.transform&&e.unbind(f.scrollWrap,"click",f),V&&e.unbind(window,p,f),clearTimeout(O),Da("unbindEvents")},Sa=function(a,b){var c=ic(f.currItem,qa,a);return b&&(da=c),c},Ta=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ua=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Va=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=La(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]<b.max[a]&&(c[a]=b.max[a],!0))},Wa=function(){if(E){var b=N.perspective&&!G;return u="translate"+(b?"3d(":"("),void(v=N.perspective?", 0px)":")")}E="left",e.addClass(a,"pswp--ie"),Ja=function(a,b){b.left=a+"px"},Ia=function(a){var b=a.fitRatio>1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ha=function(){if(ea){var a=ea,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=pa.x+"px",a.top=pa.y+"px"}}},Xa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Ya=function(a){a&&(Y||X||fa||T)&&(a.preventDefault(),a.stopPropagation())},Za=function(){f.setScrollOffset(0,e.getScrollY())},$a={},_a=0,ab=function(a){$a[a]&&($a[a].raf&&I($a[a].raf),_a--,delete $a[a])},bb=function(a){$a[a]&&ab(a),$a[a]||(_a++,$a[a]={})},cb=function(){for(var a in $a)$a.hasOwnProperty(a)&&ab(a)},db=function(a,b,c,d,e,f,g){var h,i=Ea();bb(a);var j=function(){if($a[a]){if(h=Ea()-i,h>=d)return ab(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),$a[a].raf=H(j)}};j()},eb={shout:Da,listen:Ca,viewportSize:qa,options:i,isMainScrollAnimating:function(){return fa},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return V},isZooming:function(){return aa},setScrollOffset:function(a,b){sa.x=a,M=sa.y=b,Da("updateScrollOffset",sa)},applyZoomPan:function(a,b,c,d){pa.x=b,pa.y=c,s=a,Ha(d)},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),J=a.className,j=!0,N=e.detectFeatures(),H=N.raf,I=N.caf,E=N.transform,L=N.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=y=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],y[0].el.style.display=y[2].el.style.display="none",Wa(),r={resize:f.updateSize,orientationchange:function(){clearTimeout(O),O=setTimeout(function(){qa.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:Za,keydown:Xa,click:Ya};var d=N.isOldIOSPhone||N.isOldAndroid||N.isMobileOpera;for(N.animationName&&N.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;c<wa.length;c++)f["init"+wa[c]]();if(b){var g=f.ui=new b(f,e);g.init()}Da("firstUpdate"),m=m||i.index||0,(isNaN(m)||m<0||m>=ac())&&(m=0),f.currItem=_b(m),(N.isOldIOSPhone||N.isOldAndroid)&&(va=!1),a.setAttribute("aria-hidden","false"),i.modal&&(va?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===M&&(Da("initialLayout"),M=K=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=G?"pswp--touch":"pswp--notouch",l+=N.animationName?" pswp--css_animation":"",l+=N.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,ua=null,c=0;c<h;c++)Ja((c+o)*ta.x,y[c].el.style);L||e.bind(f.scrollWrap,q,f),Ca("initialZoomInEnd",function(){f.setContent(y[0],m-1),f.setContent(y[2],m+1),y[0].el.style.display=y[2].el.style.display="block",i.focus&&a.focus(),Qa()}),f.setContent(y[1],m),f.updateCurrItem(),Da("afterInit"),va||(w=setInterval(function(){_a||V||aa||s!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),e.addClass(a,"pswp--visible")}},close:function(){j&&(j=!1,k=!0,Da("close"),Ra(),cc(f.currItem,null,!0,f.destroy))},destroy:function(){Da("destroy"),Xb&&clearTimeout(Xb),a.setAttribute("aria-hidden","true"),a.className=J,w&&clearInterval(w),e.unbind(f.scrollWrap,q,f),e.unbind(window,"scroll",f),zb(),cb(),Ba=null},panTo:function(a,b,c){c||(a>da.min.x?a=da.min.x:a<da.max.x&&(a=da.max.x),b>da.min.y?b=da.min.y:b<da.max.y&&(b=da.max.y)),pa.x=a,pa.y=b,Ha()},handleEvent:function(a){a=a||window.event,r[a.type]&&r[a.type](a)},goTo:function(a){a=Aa(a);var b=a-m;ua=b,m=a,f.currItem=_b(m),ra-=b,Ka(ta.x*ra),cb(),fa=!1,f.updateCurrItem()},next:function(){f.goTo(m+1)},prev:function(){f.goTo(m-1)},updateCurrZoomItem:function(a){if(a&&Da("beforeChange",0),y[1].el.children.length){var b=y[1].el.children[0];ea=e.hasClass(b,"pswp__zoom-wrap")?b.style:null}else ea=null;da=f.currItem.bounds,t=s=f.currItem.initialZoomLevel,pa.x=da.center.x,pa.y=da.center.y,a&&Da("afterChange")},invalidateCurrItems:function(){x=!0;for(var a=0;a<h;a++)y[a].item&&(y[a].item.needsUpdate=!0)},updateCurrItem:function(a){if(0!==ua){var b,c=Math.abs(ua);if(!(a&&c<2)){f.currItem=_b(m),ya=!1,Da("beforeChange",ua),c>=h&&(o+=ua+(ua>0?-h:h),c=h);for(var d=0;d<c;d++)ua>0?(b=y.shift(),y[h-1]=b,o++,Ja((o+2)*ta.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=y.pop(),y.unshift(b),o--,Ja(o*ta.x,b.el.style),f.setContent(b,m+c-d-1-1));if(ea&&1===Math.abs(ua)){var e=_b(z);e.initialZoomLevel!==s&&(ic(e,qa),mc(e),Ia(e))}ua=0,f.updateCurrZoomItem(),z=m,Da("afterChange")}}},updateSize:function(b){if(!va&&i.modal){var c=e.getScrollY();if(M!==c&&(a.style.top=c+"px",M=c),!b&&xa.x===window.innerWidth&&xa.y===window.innerHeight)return;xa.x=window.innerWidth,xa.y=window.innerHeight,a.style.height=xa.y+"px"}if(qa.x=f.scrollWrap.clientWidth,qa.y=f.scrollWrap.clientHeight,Za(),ta.x=qa.x+Math.round(qa.x*i.spacing),ta.y=qa.y,Ka(ta.x*ra),Da("beforeResize"),void 0!==o){for(var d,g,j,k=0;k<h;k++)d=y[k],Ja((k+o)*ta.x,d.el.style),j=m+k-1,i.loop&&ac()>2&&(j=Aa(j)),g=_b(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):d.index===-1&&j>=0&&f.setContent(d,j),g&&g.container&&(ic(g,qa),mc(g),Ia(g));x=!1}t=s=f.currItem.initialZoomLevel,da=f.currItem.bounds,da&&(pa.x=da.center.x,pa.y=da.center.y,Ha(!0)),Da("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,ub.x=Math.abs(b.x)-pa.x,ub.y=Math.abs(b.y)-pa.y,Ma(oa,pa));var g=Sa(a,!1),h={};Va("x",g,h,a),Va("y",g,h,a);var i=s,j={x:pa.x,y:pa.y};Na(h);var k=function(b){1===b?(s=a,pa.x=h.x,pa.y=h.y):(s=(a-i)*b+i,pa.x=(h.x-j.x)*b+j.x,pa.y=(h.y-j.y)*b+j.y),f&&f(b),Ha(1===b)};c?db("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},fb=30,gb=10,hb={},ib={},jb={},kb={},lb={},mb=[],nb={},ob=[],pb={},qb=0,rb=ma(),sb=0,tb=ma(),ub=ma(),vb=ma(),wb=function(a,b){return a.x===b.x&&a.y===b.y},xb=function(a,b){return Math.abs(a.x-b.x)<g&&Math.abs(a.y-b.y)<g},yb=function(a,b){return pb.x=Math.abs(a.x-b.x),pb.y=Math.abs(a.y-b.y),Math.sqrt(pb.x*pb.x+pb.y*pb.y)},zb=function(){Z&&(I(Z),Z=null)},Ab=function(){V&&(Z=H(Ab),Qb())},Bb=function(){return!("fit"===i.scaleMode&&s===f.currItem.initialZoomLevel)},Cb=function(a,b){return!(!a||a===document)&&(!(a.getAttribute("class")&&a.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(b(a)?a:Cb(a.parentNode,b)))},Db={},Eb=function(a,b){return Db.prevent=!Cb(a.target,i.isClickableElement),Da("preventDragEvent",a,b,Db),Db.prevent},Fb=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Gb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Hb=function(a,b,c){if(a-Q>50){var d=ob.length>2?ob.shift():{};d.x=b,d.y=c,ob.push(d),Q=a}},Ib=function(){var a=pa.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(qa.y/2))},Jb={},Kb={},Lb=[],Mb=function(a){for(;Lb.length>0;)Lb.pop();return F?(la=0,mb.forEach(function(a){0===la?Lb[0]=a:1===la&&(Lb[1]=a),la++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Lb[0]=Fb(a.touches[0],Jb),a.touches.length>1&&(Lb[1]=Fb(a.touches[1],Kb))):(Jb.x=a.pageX,Jb.y=a.pageY,Jb.id="",Lb[0]=Jb),Lb},Nb=function(a,b){var c,d,e,g,h=0,j=pa[a]+b[a],k=b[a]>0,l=tb.x+b.x,m=tb.x-nb.x;return c=j>da.min[a]||j<da.max[a]?i.panEndFriction:1,j=pa[a]+b[a]*c,!i.allowPanToNext&&s!==f.currItem.initialZoomLevel||(ea?"h"!==ga||"x"!==a||X||(k?(j>da.min[a]&&(c=i.panEndFriction,h=da.min[a]-j,d=da.min[a]-oa[a]),(d<=0||m<0)&&ac()>1?(g=l,m<0&&l>nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j)):(j<da.max[a]&&(c=i.panEndFriction,h=j-da.max[a],d=oa[a]-da.max[a]),(d<=0||m>0)&&ac()>1?(g=l,m>0&&l<nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j))):g=l,"x"!==a)?void(fa||$||s>f.currItem.fitRatio&&(pa[a]+=b[a]*c)):(void 0!==g&&(Ka(g,!0),$=g!==nb.x),da.min.x!==da.max.x&&(void 0!==e?pa.x=e:$||(pa.x+=b.x*c)),void 0!==g)},Ob=function(a){if(!("mousedown"===a.type&&a.button>0)){if($b)return void a.preventDefault();if(!U||"mousedown"!==a.type){if(Eb(a,!0)&&a.preventDefault(),Da("pointerDown"),F){var b=e.arraySearch(mb,a.pointerId,"id");b<0&&(b=mb.length),mb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Mb(a),d=c.length;_=null,cb(),V&&1!==d||(V=ha=!0,e.bind(window,p,f),S=ka=ia=T=$=Y=W=X=!1,ga=null,Da("firstTouchStart",c),Ma(oa,pa),na.x=na.y=0,Ma(kb,c[0]),Ma(lb,kb),nb.x=ta.x*ra,ob=[{x:kb.x,y:kb.y}],Q=P=Ea(),Sa(s,!0),zb(),Ab()),!aa&&d>1&&!fa&&!$&&(t=s,X=!1,aa=W=!0,na.y=na.x=0,Ma(oa,pa),Ma(hb,c[0]),Ma(ib,c[1]),Gb(hb,ib,vb),ub.x=Math.abs(vb.x)-pa.x,ub.y=Math.abs(vb.y)-pa.y,ba=ca=yb(hb,ib))}}},Pb=function(a){if(a.preventDefault(),F){var b=e.arraySearch(mb,a.pointerId,"id");if(b>-1){var c=mb[b];c.x=a.pageX,c.y=a.pageY}}if(V){var d=Mb(a);if(ga||Y||aa)_=d;else if(tb.x!==ta.x*ra)ga="h";else{var f=Math.abs(d[0].x-kb.x)-Math.abs(d[0].y-kb.y);Math.abs(f)>=gb&&(ga=f>0?"h":"v",_=d)}}},Qb=function(){if(_){var a=_.length;if(0!==a)if(Ma(hb,_[0]),jb.x=hb.x-kb.x,jb.y=hb.y-kb.y,aa&&a>1){if(kb.x=hb.x,kb.y=hb.y,!jb.x&&!jb.y&&wb(_[1],ib))return;Ma(ib,_[1]),X||(X=!0,Da("zoomGestureStarted"));var b=yb(hb,ib),c=Vb(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ka=!0);var d=1,e=Ta(),g=Ua();if(c<e)if(i.pinchToClose&&!ka&&t<=f.currItem.initialZoomLevel){var h=e-c,j=1-h/(e/1.2);Fa(j),Da("onPinchClose",j),ia=!0}else d=(e-c)/e,d>1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);d<0&&(d=0),ba=b,Gb(hb,ib,rb),na.x+=rb.x-vb.x,na.y+=rb.y-vb.y,Ma(vb,rb),pa.x=La("x",c),pa.y=La("y",c),S=c>s,s=c,Ha()}else{if(!ga)return;if(ha&&(ha=!1,Math.abs(jb.x)>=gb&&(jb.x-=_[0].x-lb.x),Math.abs(jb.y)>=gb&&(jb.y-=_[0].y-lb.y)),kb.x=hb.x,kb.y=hb.y,0===jb.x&&0===jb.y)return;if("v"===ga&&i.closeOnVerticalDrag&&!Bb()){na.y+=jb.y,pa.y+=jb.y;var k=Ib();return T=!0,Da("onVerticalDrag",k),Fa(k),void Ha()}Hb(Ea(),hb.x,hb.y),Y=!0,da=f.currItem.bounds;var l=Nb("x",jb);l||(Nb("y",jb),Na(pa),Ha())}}},Rb=function(a){if(N.isOldAndroid){if(U&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(U),U=setTimeout(function(){U=0},600))}Da("pointerUp"),Eb(a,!1)&&a.preventDefault();var b;if(F){var c=e.arraySearch(mb,a.pointerId,"id");if(c>-1)if(b=mb.splice(c,1)[0],navigator.msPointerEnabled){var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}else b.type=a.pointerType||"mouse"}var g,h=Mb(a),j=h.length;if("mouseup"===a.type&&(j=0),2===j)return _=null,!0;1===j&&Ma(lb,h[0]),0!==j||ga||fa||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Da("touchRelease",a,b));var k=-1;if(0===j&&(V=!1,e.unbind(window,p,f),zb(),aa?k=0:sb!==-1&&(k=Ea()-sb)),sb=1===j?Ea():-1,g=k!==-1&&k<150?"zoom":"swipe",aa&&j<2&&(aa=!1,1===j&&(g="zoomPointerUp"),Da("zoomGestureEnded")),_=null,Y||X||fa||T)if(cb(),R||(R=Sb()),R.calculateSwipeSpeed("x"),T){var l=Ib();if(l<i.verticalDragRange)f.close();else{var m=pa.y,n=ja;db("verticalDrag",0,1,300,e.easing.cubic.out,function(a){pa.y=(f.currItem.initialPosition.y-m)*a+m,Fa((1-n)*a+n),Ha()}),Da("onVerticalDrag",1)}}else{if(($||fa)&&0===j){var o=Ub(g,R);if(o)return;g="zoomPointerUp"}if(!fa)return"swipe"!==g?void Wb():void(!$&&s>f.currItem.fitRatio&&Tb(R))}},Sb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){ob.length>1?(a=Ea()-Q+50,b=ob[ob.length-2][d]):(a=Ea()-P,b=lb[d]),c.lastFlickOffset[d]=kb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(pa[a]>da.min[a]?c.backAnimDestination[a]=da.min[a]:pa[a]<da.max[a]&&(c.backAnimDestination[a]=da.max[a]),void 0!==c.backAnimDestination[a]&&(c.slowDownRatio[a]=.7,c.slowDownRatioReverse[a]=1-c.slowDownRatio[a],c.speedDecelerationRatioAbs[a]<.05&&(c.lastFlickSpeed[a]=0,c.backAnimStarted[a]=!0,db("bounceZoomPan"+a,pa[a],c.backAnimDestination[a],b||300,e.easing.sine.out,function(b){pa[a]=b,Ha()}))))},calculateAnimOffset:function(a){c.backAnimStarted[a]||(c.speedDecelerationRatio[a]=c.speedDecelerationRatio[a]*(c.slowDownRatio[a]+c.slowDownRatioReverse[a]-c.slowDownRatioReverse[a]*c.timeDiff/10),c.speedDecelerationRatioAbs[a]=Math.abs(c.lastFlickSpeed[a]*c.speedDecelerationRatio[a]),c.distanceOffset[a]=c.lastFlickSpeed[a]*c.speedDecelerationRatio[a]*c.timeDiff,pa[a]+=c.distanceOffset[a])},panAnimLoop:function(){if($a.zoomPan&&($a.zoomPan.raf=H(c.panAnimLoop),c.now=Ea(),c.timeDiff=c.now-c.lastNow,c.lastNow=c.now,c.calculateAnimOffset("x"),c.calculateAnimOffset("y"),Ha(),c.calculateOverBoundsAnimOffset("x"),c.calculateOverBoundsAnimOffset("y"),c.speedDecelerationRatioAbs.x<.05&&c.speedDecelerationRatioAbs.y<.05))return pa.x=Math.round(pa.x),pa.y=Math.round(pa.y),Ha(),void ab("zoomPan")}};return c},Tb=function(a){return a.calculateSwipeSpeed("y"),da=f.currItem.bounds,a.backAnimDestination={},a.backAnimStarted={},Math.abs(a.lastFlickSpeed.x)<=.05&&Math.abs(a.lastFlickSpeed.y)<=.05?(a.speedDecelerationRatioAbs.x=a.speedDecelerationRatioAbs.y=0,a.calculateOverBoundsAnimOffset("x"),a.calculateOverBoundsAnimOffset("y"),!0):(bb("zoomPan"),a.lastNow=Ea(),void a.panAnimLoop())},Ub=function(a,b){var c;fa||(qb=m);var d;if("swipe"===a){var g=kb.x-lb.x,h=b.lastFlickDist.x<10;g>fb&&(h||b.lastFlickOffset.x>20)?d=-1:g<-fb&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,m<0?(m=i.loop?ac()-1:0,j=!0):m>=ac()&&(m=i.loop?0:ac()-1,j=!0),j&&!i.loop||(ua+=d,ra-=d,c=!0));var k,l=ta.x*ra,n=Math.abs(l-tb.x);return c||l>tb.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,qb===m&&(c=!1),fa=!0,Da("mainScrollAnimStart"),db("mainScroll",tb.x,l,k,e.easing.cubic.out,Ka,function(){cb(),fa=!1,qb=-1,(c||qb!==m)&&f.updateCurrItem(),Da("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Vb=function(a){return 1/ca*a*t},Wb=function(){var a=s,b=Ta(),c=Ua();s<b?a=b:s>c&&(a=c);var d,g=1,h=ja;return ia&&!S&&!ka&&s<b?(f.close(),!0):(ia&&(d=function(a){Fa((g-h)*a+h)}),f.zoomTo(a,0,200,e.easing.cubic.out,d),!0)};za("Gestures",{publicMethods:{initGestures:function(){var a=function(a,b,c,d,e){A=a+b,B=a+c,C=a+d,D=e?a+e:""};F=N.pointerEvent,F&&N.touch&&(N.touch=!1),F?navigator.msPointerEnabled?a("MSPointer","Down","Move","Up","Cancel"):a("pointer","down","move","up","cancel"):N.touch?(a("touch","start","move","end","cancel"),G=!0):a("mouse","down","move","up"),p=B+" "+C+" "+D,q=A,F&&!G&&(G=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=G,r[A]=Ob,r[B]=Pb,r[C]=Rb,D&&(r[D]=r[C]),N.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[A],r.mousemove=r[B],r.mouseup=r[C]),G||(i.allowPanToNext=!1)}}});var Xb,Yb,Zb,$b,_b,ac,bc,cc=function(b,c,d,g){Xb&&clearTimeout(Xb),$b=!0,Zb=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){ab("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Fa(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Da("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),$b=!1};if(!j||!h||void 0===h.x)return Da("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),a.style.opacity=d?0:1,Fa(1),void(j?setTimeout(function(){k()},j):k());var n=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,pa.x=h.x,pa.y=h.y-K,f[g?"template":"bg"].style.opacity=.001,Ha()),bb("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Xb=setTimeout(function(){if(Da("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:pa.x,y:pa.y},l=s,m=ja,n=function(b){1===b?(s=f,pa.x=h.x,pa.y=h.y-M):(s=(f-l)*b+l,pa.x=(h.x-i.x)*b+i.x,pa.y=(h.y-M-i.y)*b+i.y),Ha(),g?a.style.opacity=1-b:Fa(m-b*m)};c?db("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Xb=setTimeout(k,j+20))}else s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),Fa(1),g?a.style.opacity=1:Fa(1),Xb=setTimeout(k,j+20)},d?25:90)};n()},dc={},ec=[],fc={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Yb.length}},gc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},hc=function(a,b,c){var d=a.bounds;d.center.x=Math.round((dc.x-b)/2),d.center.y=Math.round((dc.y-c)/2)+a.vGap.top,d.max.x=b>dc.x?Math.round(dc.x-b):d.center.x,d.max.y=c>dc.y?Math.round(dc.y-c)+a.vGap.top:d.center.y,d.min.x=b>dc.x?0:d.center.x,d.min.y=c>dc.y?a.vGap.top:d.center.y},ic=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Da("parseVerticalMargin",a)),dc.x=b.x,dc.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=dc.x/a.w,f=dc.y/a.h;a.fitRatio=e<f?e:f;var g=i.scaleMode;"orig"===g?c=1:"fit"===g&&(c=a.fitRatio),c>1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=gc())}if(!c)return;return hc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=gc(),a.initialPosition=a.bounds.center,a.bounds},jc=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,mc(b,d,b===f.currItem&&ya),c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},kc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},lc=function(a,b){if(a.src&&a.loadError&&a.container)return b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0},mc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},nc=function(){if(ec.length){for(var a,b=0;b<ec.length;b++)a=ec[b],a.holder.index===a.index&&jc(a.index,a.item,a.baseDiv,a.img,!1,a.clearPlaceholder);ec=[]}};za("Controller",{publicMethods:{lazyLoadItem:function(a){a=Aa(a);var b=_b(a);b&&(!b.loaded&&!b.loading||x)&&(Da("gettingData",a,b),b.src&&kc(b))},initController:function(){e.extend(i,fc,!0),f.items=Yb=c,_b=f.getItemAt,ac=i.getNumItemsFn,bc=i.loop,ac()<3&&(i.loop=!1),Ca("beforeChange",function(a){var b,c=i.preload,d=null===a||a>=0,e=Math.min(c[0],ac()),g=Math.min(c[1],ac());for(b=1;b<=(d?g:e);b++)f.lazyLoadItem(m+b);for(b=1;b<=(d?e:g);b++)f.lazyLoadItem(m-b)}),Ca("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ca("mainScrollAnimComplete",nc),Ca("initialZoomInEnd",nc),Ca("destroy",function(){for(var a,b=0;b<Yb.length;b++)a=Yb[b],a.container&&(a.container=null),a.placeholder&&(a.placeholder=null),a.img&&(a.img=null),a.preloader&&(a.preloader=null),a.loadError&&(a.loaded=a.loadError=!1);ec=null})},getItemAt:function(a){return a>=0&&(void 0!==Yb[a]&&Yb[a])},allowProgressiveImg:function(){return i.forceProgressiveLoading||!G||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=Aa(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Da("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),lc(g),ic(g,qa),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=g.src,mc(g,d),jc(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(a&&a.index===b){if(lc(c,!0))return c.loadComplete=c.img=null,ic(c,qa),Ia(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!$b&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):N.transform&&(fa||$b)?ec.push({item:c,baseDiv:h,img:c.img,index:b,holder:a,clearPlaceholder:!0}):jc(b,c,h,c.img,fa||$b,!0)}c.loadComplete=null,c.img=null,Da("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),mc(g,l),h.appendChild(l),g.placeholder=l}g.loading||kc(g),f.allowProgressiveImg()&&(!Zb&&N.transform?ec.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):jc(b,g,h,g.img,!0,!0))}Zb||b!==m?Ia(g):(ea=h.style,cc(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var oc,pc={},qc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};za("Tap",{publicMethods:{initTap:function(){Ca("firstTouchStart",f.onTapStart),Ca("touchRelease",f.onTapRelease),Ca("destroy",function(){pc={},oc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(oc),oc=null)},onTapRelease:function(a,b){if(b&&!Y&&!W&&!_a){var c=b;if(oc&&(clearTimeout(oc),oc=null,xb(c,pc)))return void Da("doubleTap",c);if("mouse"===b.type)return void qc(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void qc(a,b);Ma(pc,c),oc=setTimeout(function(){qc(a,b),oc=null},300)}}}});var rc;za("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(G?Ca("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){rc={};var c="wheel mousewheel DOMMouseScroll";Ca("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ca("unbindEvents",function(){rc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),s<1?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ca("resize",g),Ca("afterChange",g),Ca("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ca("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.modal&&(!i.closeOnScroll||_a||V?a.preventDefault():E&&Math.abs(a.deltaY)>2&&(l=!0,f.close())),!0;if(a.stopPropagation(),rc.x=0,"deltaX"in a)1===a.deltaMode?(rc.x=18*a.deltaX,rc.y=18*a.deltaY):(rc.x=a.deltaX,rc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(rc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?rc.y=-.16*a.wheelDeltaY:rc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;rc.y=a.detail}Sa(s,!0);var b=pa.x-rc.x,c=pa.y-rc.y;(i.modal||b<=da.min.x&&b>=da.max.x&&c<=da.min.y&&c>=da.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:qa.x/2+sa.x,y:qa.y/2+sa.y};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec={history:!0,galleryUID:1},Fc=function(){return Cc.hash.substring(1)},Gc=function(){sc&&clearTimeout(sc),uc&&clearTimeout(uc)},Hc=function(){var a=Fc(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c<d.length;c++)if(d[c]){var e=d[c].split("=");e.length<2||(b[e[0]]=e[1])}if(i.galleryPIDs){var f=b.pid;for(b.pid=0,c=0;c<Yb.length;c++)if(Yb[c].pid===f){b.pid=c;break}}else b.pid=parseInt(b.pid,10)-1;return b.pid<0&&(b.pid=0),b},Ic=function(){if(uc&&clearTimeout(uc),_a||V)return void(uc=setTimeout(Ic,500));vc?clearTimeout(tc):vc=!0;var a=m+1,b=_b(m);b.hasOwnProperty("pid")&&(a=b.pid);var c=yc+"&gid="+i.galleryUID+"&pid="+a;zc||Cc.hash.indexOf(c)===-1&&(Bc=!0);var d=Cc.href.split("#")[0]+"#"+c;Dc?"#"+c!==window.location.hash&&history[zc?"replaceState":"pushState"]("",document.title,d):zc?Cc.replace(d):Cc.hash=c,zc=!0,tc=setTimeout(function(){vc=!1},60)};za("History",{publicMethods:{initHistory:function(){if(e.extend(i,Ec,!0),i.history){Cc=window.location,Bc=!1,Ac=!1,zc=!1,yc=Fc(),Dc="pushState"in history,yc.indexOf("gid=")>-1&&(yc=yc.split("&gid=")[0],yc=yc.split("?gid=")[0]),Ca("afterChange",f.updateURL),Ca("unbindEvents",function(){e.unbind(window,"hashchange",f.onHashChange)});var a=function(){xc=!0,Ac||(Bc?history.back():yc?Cc.hash=yc:Dc?history.pushState("",document.title,Cc.pathname+Cc.search):Cc.hash=""),Gc()};Ca("unbindEvents",function(){l&&a()}),Ca("destroy",function(){xc||a()}),Ca("firstUpdate",function(){m=Hc().pid});var b=yc.indexOf("pid=");b>-1&&(yc=yc.substring(0,b),"&"===yc.slice(-1)&&(yc=yc.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Fc()===yc?(Ac=!0,void f.close()):void(vc||(wc=!0,f.goTo(Hc().pid),wc=!1))},updateURL:function(){Gc(),wc||(zc?sc=setTimeout(Ic,800):Ic())}}}),e.extend(f,eb)};return a});
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).reframe=t()}(this,function(){"use strict";function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),o=0,t=0;t<n;t++)for(var r=arguments[t],f=0,d=r.length;f<d;f++,o++)i[o]=r[f];return i}return function(e,s){return void 0===s&&(s="js-reframe"),("string"==typeof e?t(document.querySelectorAll(e)):"length"in e?t(e):[e]).forEach(function(e){var t,n,i,o,r,f,d,l;-1!==e.className.split(" ").indexOf(s)||-1<e.style.width.indexOf("%")||(i=e.getAttribute("height")||e.offsetHeight,o=e.getAttribute("width")||e.offsetWidth,r=("string"==typeof i?parseInt(i):i)/("string"==typeof o?parseInt(o):o)*100,(f=document.createElement("div")).className=s,(d=f.style).position="relative",d.width="100%",d.paddingTop=r+"%",(l=e.style).position="absolute",l.width="100%",l.height="100%",l.left="0",l.top="0",null!==(t=e.parentNode)&&void 0!==t&&t.insertBefore(f,e),null!==(n=e.parentNode)&&void 0!==n&&n.removeChild(e),f.appendChild(e))})}});
@@ -0,0 +1,103 @@
1
+ function lightbox(trigger) {
2
+ var onThumbnailsClick = function (e) {
3
+ e.preventDefault();
4
+
5
+ var items = [];
6
+ var index = 0;
7
+
8
+ var prevSibling = e.target.closest('.kg-card').previousElementSibling;
9
+
10
+ while (prevSibling && (prevSibling.classList.contains('kg-image-card') || prevSibling.classList.contains('kg-gallery-card'))) {
11
+ var prevItems = [];
12
+
13
+ prevSibling.querySelectorAll('img').forEach(function (item) {
14
+ prevItems.push({
15
+ src: item.getAttribute('src'),
16
+ msrc: item.getAttribute('src'),
17
+ w: item.getAttribute('width'),
18
+ h: item.getAttribute('height'),
19
+ el: item,
20
+ })
21
+
22
+ index += 1;
23
+ });
24
+ prevSibling = prevSibling.previousElementSibling;
25
+
26
+ items = prevItems.concat(items);
27
+ }
28
+
29
+ if (e.target.classList.contains('kg-image')) {
30
+ items.push({
31
+ src: e.target.getAttribute('src'),
32
+ msrc: e.target.getAttribute('src'),
33
+ w: e.target.getAttribute('width'),
34
+ h: e.target.getAttribute('height'),
35
+ el: e.target,
36
+ });
37
+ } else {
38
+ var reachedCurrentItem = false;
39
+
40
+ e.target.closest('.kg-gallery-card').querySelectorAll('img').forEach(function (item) {
41
+ items.push({
42
+ src: item.getAttribute('src'),
43
+ msrc: item.getAttribute('src'),
44
+ w: item.getAttribute('width'),
45
+ h: item.getAttribute('height'),
46
+ el: item,
47
+ });
48
+
49
+ if (!reachedCurrentItem && item !== e.target) {
50
+ index += 1;
51
+ } else {
52
+ reachedCurrentItem = true;
53
+ }
54
+ });
55
+ }
56
+
57
+ var nextSibling = e.target.closest('.kg-card').nextElementSibling;
58
+
59
+ while (nextSibling && (nextSibling.classList.contains('kg-image-card') || nextSibling.classList.contains('kg-gallery-card'))) {
60
+ nextSibling.querySelectorAll('img').forEach(function (item) {
61
+ items.push({
62
+ src: item.getAttribute('src'),
63
+ msrc: item.getAttribute('src'),
64
+ w: item.getAttribute('width'),
65
+ h: item.getAttribute('height'),
66
+ el: item,
67
+ })
68
+ });
69
+ nextSibling = nextSibling.nextElementSibling;
70
+ }
71
+
72
+ var pswpElement = document.querySelectorAll('.pswp')[0];
73
+
74
+ var options = {
75
+ bgOpacity: 0.9,
76
+ closeOnScroll: true,
77
+ fullscreenEl: false,
78
+ history: false,
79
+ index: index,
80
+ shareEl: false,
81
+ zoomEl: false,
82
+ getThumbBoundsFn: function(index) {
83
+ var thumbnail = items[index].el,
84
+ pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
85
+ rect = thumbnail.getBoundingClientRect();
86
+
87
+ return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
88
+ }
89
+ }
90
+
91
+ var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
92
+ gallery.init();
93
+
94
+ return false;
95
+ };
96
+
97
+ var triggers = document.querySelectorAll(trigger);
98
+ triggers.forEach(function (trig) {
99
+ trig.addEventListener('click', function (e) {
100
+ onThumbnailsClick(e);
101
+ });
102
+ });
103
+ }
@@ -0,0 +1,95 @@
1
+ function pagination(isInfinite = true, done, isMasonry = false) {
2
+ const feedElement = document.querySelector('.gh-feed');
3
+ if (!feedElement) return;
4
+
5
+ let loading = false;
6
+ const target = feedElement.nextElementSibling || document.querySelector('.gh-footer');
7
+ const buttonElement = document.querySelector('.gh-loadmore');
8
+
9
+ if (!document.querySelector('link[rel=next]') && buttonElement) {
10
+ buttonElement.remove();
11
+ }
12
+
13
+ const loadNextPage = async function () {
14
+ const nextElement = document.querySelector('link[rel=next]');
15
+ if (!nextElement) return;
16
+
17
+ try {
18
+ const res = await fetch(nextElement.href);
19
+ const html = await res.text();
20
+ const parser = new DOMParser();
21
+ const doc = parser.parseFromString(html, 'text/html');
22
+
23
+ const postElements = doc.querySelectorAll('.gh-feed:not(.gh-featured):not(.gh-related) > *');
24
+ const fragment = document.createDocumentFragment();
25
+ const elems = [];
26
+
27
+ postElements.forEach(function (post) {
28
+ var clonedItem = document.importNode(post, true);
29
+
30
+ if (isMasonry) {
31
+ clonedItem.style.visibility = 'hidden';
32
+ }
33
+
34
+ fragment.appendChild(clonedItem);
35
+ elems.push(clonedItem);
36
+ });
37
+
38
+ feedElement.appendChild(fragment);
39
+
40
+ if (done) {
41
+ done(elems, loadNextWithCheck);
42
+ }
43
+
44
+ const resNextElement = doc.querySelector('link[rel=next]');
45
+ if (resNextElement && resNextElement.href) {
46
+ nextElement.href = resNextElement.href;
47
+ } else {
48
+ nextElement.remove();
49
+ if (buttonElement) {
50
+ buttonElement.remove();
51
+ }
52
+ }
53
+ } catch (e) {
54
+ nextElement.remove();
55
+ throw e;
56
+ }
57
+ };
58
+
59
+ const loadNextWithCheck = async function () {
60
+ if (target.getBoundingClientRect().top <= window.innerHeight && document.querySelector('link[rel=next]')) {
61
+ await loadNextPage();
62
+ }
63
+ }
64
+
65
+ const callback = async function (entries) {
66
+ if (loading) return;
67
+
68
+ loading = true;
69
+
70
+ if (entries[0].isIntersecting) {
71
+ // keep loading next page until target is out of the viewport or we've loaded the last page
72
+ if (!isMasonry) {
73
+ while (target.getBoundingClientRect().top <= window.innerHeight && document.querySelector('link[rel=next]')) {
74
+ await loadNextPage();
75
+ }
76
+ } else {
77
+ await loadNextPage();
78
+ }
79
+ }
80
+
81
+ loading = false;
82
+
83
+ if (!document.querySelector('link[rel=next]')) {
84
+ observer.disconnect();
85
+ }
86
+ };
87
+
88
+ const observer = new IntersectionObserver(callback);
89
+
90
+ if (isInfinite) {
91
+ observer.observe(target);
92
+ } else {
93
+ buttonElement.addEventListener('click', loadNextPage);
94
+ }
95
+ }
@@ -0,0 +1,43 @@
1
+ {{!< default}}
2
+ {{!-- The tag above means: insert everything in this file into the body of the default.hbs template --}}
3
+
4
+ <main class="gh-main gh-outer">
5
+
6
+ {{#author}}
7
+ <section class="gh-archive{{#if @custom.show_publication_info_sidebar}} has-sidebar{{/if}} gh-inner">
8
+ <div class="gh-archive-inner">
9
+ <div class="gh-archive-wrapper">
10
+ <h1 class="gh-article-title is-title">
11
+ {{#if website}}
12
+ <a class="gh-author-social-link" href="{{website}}" target="_blank" rel="noopener">{{name}}</a>
13
+ {{else}}
14
+ {{name}}
15
+ {{/if}}
16
+ </h1>
17
+ {{#if bio}}
18
+ <p class="gh-article-excerpt">{{bio}}</p>
19
+ {{/if}}
20
+ <footer class="gh-author-meta">
21
+ <div class="gh-author-social">
22
+ {{#if facebook}}
23
+ <a class="gh-author-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
24
+ {{/if}}
25
+ {{#if twitter}}
26
+ <a class="gh-author-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
27
+ {{/if}}
28
+ </div>
29
+ {{#if location}}
30
+ <div class="gh-author-location">{{location}}</div>
31
+ {{/if}}
32
+ </footer>
33
+ </div>
34
+ {{#if profile_image}}
35
+ <img class="gh-article-image" src="{{img_url profile_image size="s"}}" alt="{{name}}">
36
+ {{/if}}
37
+ </div>
38
+ </section>
39
+ {{/author}}
40
+
41
+ {{> "components/post-list" feed="archive" postFeedStyle=@custom.post_feed_style showTitle=false showSidebar=@custom.show_publication_info_sidebar}}
42
+
43
+ </main>
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{@site.locale}}">
3
+ <head>
4
+
5
+ {{!-- Basic meta - advanced meta is output with {{ghost_head}} below --}}
6
+ <title>{{meta_title}}</title>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+
10
+ {{!-- Preload main styles and scripts for better performance --}}
11
+ <link rel="preload" as="style" href="{{asset "built/screen.css"}}">
12
+ <link rel="preload" as="script" href="{{asset "built/source.js"}}">
13
+
14
+ {{!-- Theme assets - use the {{asset}} helper to reference styles & scripts, this will take care of caching and cache-busting automatically --}}
15
+ <link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}">
16
+
17
+ {{!-- Custom background color --}}
18
+ <style>
19
+ :root {
20
+ --background-color: {{@custom.site_background_color}}
21
+ }
22
+ </style>
23
+
24
+ <script>
25
+ /* The script for calculating the color contrast has been taken from
26
+ https://gomakethings.com/dynamically-changing-the-text-color-based-on-background-color-contrast-with-vanilla-js/ */
27
+ var accentColor = getComputedStyle(document.documentElement).getPropertyValue('--background-color');
28
+ accentColor = accentColor.trim().slice(1);
29
+ var r = parseInt(accentColor.substr(0, 2), 16);
30
+ var g = parseInt(accentColor.substr(2, 2), 16);
31
+ var b = parseInt(accentColor.substr(4, 2), 16);
32
+ var yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
33
+ var textColor = (yiq >= 128) ? 'dark' : 'light';
34
+
35
+ document.documentElement.className = `has-${textColor}-text`;
36
+ </script>
37
+
38
+ {{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings, it should always be the last tag before the closing head tag --}}
39
+ {{ghost_head}}
40
+
41
+ </head>
42
+ <body class="{{body_class}} has-{{#match @custom.title_font "Elegant serif"}}serif{{else match @custom.title_font "Consistent mono"}}mono{{else}}sans{{/match}}-title has-{{#match @custom.body_font "Elegant serif"}}serif{{else}}sans{{/match}}-body">
43
+
44
+ <div class="gh-viewport">
45
+
46
+ {{> "components/navigation" navigationLayout=@custom.navigation_layout}}
47
+
48
+ {{{body}}}
49
+
50
+ {{> "components/footer"}}
51
+
52
+ </div>
53
+
54
+ {{#is "post, page"}}
55
+ {{> "lightbox"}}
56
+ {{/is}}
57
+
58
+ {{!-- Scripts - handle responsive videos, infinite scroll, and navigation dropdowns --}}
59
+ <script src="{{asset "built/source.js"}}"></script>
60
+
61
+ {{!-- Ghost outputs required functional scripts with this tag, it should always be the last thing before the closing body tag --}}
62
+ {{ghost_foot}}
63
+
64
+ </body>
65
+ </html>