j1-template 2024.3.21 → 2024.3.23

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 (383) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/amplitude_app.html +60 -51
  3. data/assets/data/{galeries.html → gallery_app.html} +4 -4
  4. data/assets/theme/bla +0 -0
  5. data/assets/theme/j1/adapter/js/advertising.js +40 -38
  6. data/assets/theme/j1/adapter/js/algolia.js +13 -11
  7. data/assets/theme/j1/adapter/js/amplitude.js +628 -380
  8. data/assets/theme/j1/adapter/js/analytics.js +19 -17
  9. data/assets/theme/j1/adapter/js/asciidoctor.js +10 -8
  10. data/assets/theme/j1/adapter/js/attic.js +24 -22
  11. data/assets/theme/j1/adapter/js/bmd.js +10 -8
  12. data/assets/theme/j1/adapter/js/carousel.js +12 -9
  13. data/assets/theme/j1/adapter/js/chatbot.js +106 -104
  14. data/assets/theme/j1/adapter/js/clipboard.js +16 -14
  15. data/assets/theme/j1/adapter/js/comments.js +24 -22
  16. data/assets/theme/j1/adapter/js/cookieConsent.js +5 -1
  17. data/assets/theme/j1/adapter/js/customFunctions.js +12 -10
  18. data/assets/theme/j1/adapter/js/customModule.js +10 -8
  19. data/assets/theme/j1/adapter/js/docsearch.js +33 -31
  20. data/assets/theme/j1/adapter/js/dropdowns.js +16 -14
  21. data/assets/theme/j1/adapter/js/fab.js +34 -32
  22. data/assets/theme/j1/adapter/js/gallery.js +22 -20
  23. data/assets/theme/j1/adapter/js/gemini.js +66 -64
  24. data/assets/theme/j1/adapter/js/iconPicker.js +31 -29
  25. data/assets/theme/j1/adapter/js/iconPickerPage.js +11 -9
  26. data/assets/theme/j1/adapter/js/iframer.js +17 -15
  27. data/assets/theme/j1/adapter/js/j1.js +146 -143
  28. data/assets/theme/j1/adapter/js/lazyLoader.js +33 -31
  29. data/assets/theme/j1/adapter/js/lightbox.js +9 -7
  30. data/assets/theme/j1/adapter/js/logger.js +11 -9
  31. data/assets/theme/j1/adapter/js/lunr.js +37 -35
  32. data/assets/theme/j1/adapter/js/masonry.js +23 -21
  33. data/assets/theme/j1/adapter/js/masterslider.js +31 -29
  34. data/assets/theme/j1/adapter/js/mmenu.js +25 -23
  35. data/assets/theme/j1/adapter/js/navigator.js +43 -41
  36. data/assets/theme/j1/adapter/js/particles.js +12 -10
  37. data/assets/theme/j1/adapter/js/rangeSlider.js +21 -19
  38. data/assets/theme/j1/adapter/js/rouge.js +10 -8
  39. data/assets/theme/j1/adapter/js/rtable.js +14 -12
  40. data/assets/theme/j1/adapter/js/rtextResizer.js +10 -8
  41. data/assets/theme/j1/adapter/js/scroller.js +15 -13
  42. data/assets/theme/j1/adapter/js/slick.js +18 -16
  43. data/assets/theme/j1/adapter/js/slimSelect.js +30 -28
  44. data/assets/theme/j1/adapter/js/speak2me.js +25 -23
  45. data/assets/theme/j1/adapter/js/swiper.js +13 -11
  46. data/assets/theme/j1/adapter/js/themeToggler.js +11 -9
  47. data/assets/theme/j1/adapter/js/themes.js +60 -86
  48. data/assets/theme/j1/adapter/js/toccer.js +13 -11
  49. data/assets/theme/j1/adapter/js/translator.js +19 -16
  50. data/assets/theme/j1/adapter/js/videojs.js +9 -7
  51. data/assets/theme/j1/adapter/js/waves.js +18 -16
  52. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +19 -52
  53. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  54. data/assets/theme/j1/core/js/template.js +11180 -10968
  55. data/assets/theme/j1/core/js/template.min.js +13 -18
  56. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +10 -4
  57. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
  58. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +15 -8
  59. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +2 -1
  60. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +35 -14
  61. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
  62. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +817 -695
  63. data/assets/theme/j1/modules/backstretch/js/backstretch.js +2 -2
  64. data/assets/theme/j1/modules/backstretch/js/backstretch.min.js +1 -1
  65. data/assets/theme/j1/modules/cookieConsent/js/cookieConsent.js +11 -11
  66. data/assets/theme/j1/modules/cookieConsent/js/cookieConsent.min.js +2 -1
  67. data/assets/theme/j1/modules/dropdowns/js/dropdowns.js +2 -2
  68. data/assets/theme/j1/modules/dropdowns/js/dropdowns.min.js +1 -1
  69. data/assets/theme/j1/modules/fab/js/fab.js +2 -2
  70. data/assets/theme/j1/modules/fab/js/fab.min.js +1 -1
  71. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.css +984 -0
  72. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.min.css +26 -0
  73. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.css +1627 -0
  74. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.min.css +25 -0
  75. data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/uno.css +1 -1
  76. data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/uno.min.css +1 -1
  77. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.svg +54 -0
  78. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.ttf +0 -0
  79. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff +0 -0
  80. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff2 +0 -0
  81. data/assets/theme/j1/modules/lightGallery/!v2.7.2/images/loading.gif +0 -0
  82. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/loading.gif +0 -0
  83. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/video-play.png +0 -0
  84. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/vimeo-play.png +0 -0
  85. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/youtube-play.png +0 -0
  86. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.js +2782 -0
  87. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.min.js +26 -0
  88. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/LICENSE.md +44 -0
  89. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/README.md +37 -0
  90. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.js +890 -0
  91. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.min.js +8 -0
  92. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/lg-video.1.js +585 -0
  93. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.js +275 -0
  94. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.min.js +26 -0
  95. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.js +230 -0
  96. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.min.js +26 -0
  97. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.js +160 -0
  98. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.min.js +26 -0
  99. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.js +223 -0
  100. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.min.js +27 -0
  101. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.js +157 -0
  102. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.min.js +26 -0
  103. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.js +164 -0
  104. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.min.js +26 -0
  105. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.js +299 -0
  106. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.min.js +26 -0
  107. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.js +244 -0
  108. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.min.js +27 -0
  109. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.js +509 -0
  110. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.min.js +26 -0
  111. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.js +909 -0
  112. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.min.js +26 -0
  113. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.js +207 -0
  114. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.min.js +26 -0
  115. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.js +999 -0
  116. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.min.js +26 -0
  117. data/assets/theme/j1/modules/lightGallery/css/lg-transitions.css +3 -126
  118. data/assets/theme/j1/modules/lightGallery/css/lg-transitions.min.css +3 -10
  119. data/assets/theme/j1/modules/lightGallery/css/lightgallery-bundle.css +70 -237
  120. data/assets/theme/j1/modules/lightGallery/css/lightgallery-bundle.min.css +4 -10
  121. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/animation-w.png +0 -0
  122. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/customize-w.png +0 -0
  123. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/dynamic-w.png +0 -0
  124. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/facebook-icon.svg +10 -0
  125. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/googleplus-icon.svg +30 -0
  126. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/html5-w.png +0 -0
  127. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/linked-in.png +0 -0
  128. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/module-w.png +0 -0
  129. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/play-button-hover.svg +94 -0
  130. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/play-button.png +0 -0
  131. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/play-button.svg +93 -0
  132. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/responsive-w.png +0 -0
  133. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/thumb-w.png +0 -0
  134. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/touch-w.png +0 -0
  135. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/twitter-icon.svg +15 -0
  136. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/twitter.png +0 -0
  137. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/video1-w.png +0 -0
  138. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/zoom-w.png +0 -0
  139. data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/zoom.png +0 -0
  140. data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.css +276 -0
  141. data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.min.css +17 -0
  142. data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +163 -120
  143. data/assets/theme/j1/modules/lightGallery/js/lightgallery.min.js +6 -6
  144. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.0.js +495 -0
  145. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.1.js +513 -0
  146. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.0.js +553 -0
  147. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js +1 -1
  148. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.2.js +914 -0
  149. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.js +4 -4
  150. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js +5 -5
  151. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.js +5 -5
  152. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.min.js +6 -6
  153. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +4 -4
  154. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.min.js +5 -5
  155. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.js +4 -4
  156. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.min.js +5 -6
  157. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +5 -5
  158. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.min.js +6 -6
  159. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.js +4 -4
  160. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.min.js +5 -5
  161. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.js +179 -0
  162. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.min.js +32 -0
  163. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.js +4 -4
  164. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.min.js +6 -6
  165. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.js +4 -4
  166. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.min.js +6 -7
  167. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +27 -20
  168. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.min.js +5 -5
  169. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +77 -125
  170. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +6 -6
  171. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +4 -4
  172. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.min.js +5 -5
  173. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.js +11 -5
  174. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.min.js +5 -5
  175. data/assets/theme/j1/modules/lunr/js/j1.js +1 -1
  176. data/assets/theme/j1/modules/lunr/js/j1.min.js +2 -1
  177. data/assets/theme/j1/modules/rtable/js/rtable.js +2 -2
  178. data/assets/theme/j1/modules/rtable/js/rtable.min.js +2 -1
  179. data/assets/theme/j1/modules/scroller/js/scroller.js +31 -29
  180. data/assets/theme/j1/modules/scroller/js/scroller.min.js +2 -1
  181. data/assets/theme/j1/modules/themeSwitcher/js/switcher.js +38 -37
  182. data/assets/theme/j1/modules/themeSwitcher/js/switcher.min.js +2 -1
  183. data/assets/theme/j1/modules/translator/js/translator.js +17 -17
  184. data/assets/theme/j1/modules/translator/js/translator.min.js +1 -1
  185. data/assets/theme/j1/modules/videoPlayer/tiktoc/README.md +1 -0
  186. data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/README.md +151 -0
  187. data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/VideoJS.svg +150 -0
  188. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.css +147 -0
  189. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.min.css +5 -0
  190. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.css +113 -0
  191. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.min.css +5 -0
  192. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.css +166 -0
  193. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.min.css +5 -0
  194. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.css +72 -0
  195. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.min.css +5 -0
  196. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.css +311 -0
  197. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.min.css +19 -0
  198. data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.css +1686 -0
  199. data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.min.css +13 -0
  200. data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.js +65226 -0
  201. data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.min.js +55 -0
  202. data/assets/theme/j1/modules/videojs/assets/README.md +1 -0
  203. data/assets/theme/j1/modules/videojs/assets/icons/speedometer-medium.svg +35 -0
  204. data/assets/theme/j1/modules/videojs/css/font/VideoJS.ttf +0 -0
  205. data/assets/theme/j1/modules/videojs/css/font/VideoJS.woff +0 -0
  206. data/assets/theme/j1/modules/videojs/css/themes/uno.css +157 -22
  207. data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
  208. data/assets/theme/j1/modules/videojs/css/videojs.css +674 -316
  209. data/assets/theme/j1/modules/videojs/css/videojs.min.css +4 -3
  210. data/assets/theme/j1/modules/videojs/js/video.js +15893 -12288
  211. data/assets/theme/j1/modules/videojs/js/video.min.js +22 -23
  212. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/!examples/index.html +31 -0
  213. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/LICENSE +19 -0
  214. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/README.md +69 -0
  215. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/css/aspect-ratio-panel.css +2 -0
  216. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/css/aspect-ratio-panel.min.css +2 -0
  217. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/js/aspect-ratio-panel.js +339 -0
  218. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/js/aspect-ratio-panel.min.js +2 -0
  219. data/assets/theme/j1/modules/videojs/{js/plugins/controls/autocaption → plugins/controls/autocaption/js}/autocaption.js +0 -5
  220. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/!examples/index.html +29 -0
  221. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/LICENSE +19 -0
  222. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/README.md +90 -0
  223. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/js/videojs-persist.js +120 -0
  224. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/js/videojs-persist.min.js +2 -0
  225. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/!examples/index.html +37 -0
  226. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/LICENSE +19 -0
  227. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/README.md +61 -0
  228. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/js/playbackrate-adjuster.js +94 -0
  229. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/js/playbackrate-adjuster.min.js +20 -0
  230. data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/skipbuttons/README.md +25 -11
  231. data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/zoom/css}/zoom.css +7 -6
  232. data/assets/theme/j1/modules/videojs/plugins/controls/zoom/css/zoom.min.css +22 -0
  233. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm → plugins/players/dm/js}/dailymotion.js +11 -9
  234. data/assets/theme/j1/modules/videojs/plugins/players/dm/js/dailymotion.min.js +19 -0
  235. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.0.js +521 -0
  236. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.1.js +605 -0
  237. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.3.js +643 -0
  238. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.4.js +583 -0
  239. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.5.js +665 -0
  240. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.6.js +642 -0
  241. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.7.js +673 -0
  242. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api → plugins/players/vm/api/js}/vimeo.js +1 -1
  243. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api → plugins/players/vm/api/js}/vimeo.min.js +1 -1
  244. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm → plugins/players/vm/js}/vimeo.js +13 -12
  245. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/vimeo.min.js +28 -0
  246. data/assets/theme/j1/modules/videojs/plugins/players/wt/!unused/wistia.0.js +395 -0
  247. data/assets/theme/j1/modules/videojs/plugins/players/wt/!unused/wistia.1.js +401 -0
  248. data/assets/theme/j1/modules/videojs/{js/plugins/players/wt → plugins/players/wt/js}/wistia.js +13 -11
  249. data/assets/theme/j1/modules/videojs/plugins/players/wt/js/wistia.min.js +21 -0
  250. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt → plugins/players/yt/js}/youtube.js +10 -8
  251. data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.min.js +21 -0
  252. data/lib/j1/version.rb +1 -1
  253. data/lib/starter_web/README.md +5 -5
  254. data/lib/starter_web/_config.yml +1 -1
  255. data/lib/starter_web/_data/modules/amplitude_playlists.yml +140 -80
  256. data/lib/starter_web/_data/modules/defaults/amplitude.yml +5 -3
  257. data/lib/starter_web/_data/modules/defaults/gallery.yml +3 -3
  258. data/lib/starter_web/_data/modules/gallery.yml +83 -87
  259. data/lib/starter_web/_data/modules/navigator_menu.yml +3 -3
  260. data/lib/starter_web/_data/resources.yml +16 -12
  261. data/lib/starter_web/_data/templates/feed.xml +1 -1
  262. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +50 -22
  263. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +37 -16
  264. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  265. data/lib/starter_web/assets/audio/album/emancipator/Alligator.mp3 +0 -0
  266. data/lib/starter_web/assets/audio/album/emancipator/DabCity.mp3 +0 -0
  267. data/lib/starter_web/assets/audio/album/emancipator/SeaToSky.mp3 +0 -0
  268. data/lib/starter_web/assets/audio/album/emancipator/TimeForSpace.mp3 +0 -0
  269. data/lib/starter_web/assets/audio/cover/emancipator/alligator.jpg +0 -0
  270. data/lib/starter_web/assets/audio/cover/emancipator/anthem.jpg +0 -0
  271. data/lib/starter_web/assets/audio/cover/emancipator/dab-city.jpg +0 -0
  272. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn.jpg +0 -0
  273. data/lib/starter_web/assets/audio/cover/emancipator/safe-in-the-steep-cliffs.jpg +0 -0
  274. data/lib/starter_web/assets/audio/cover/emancipator/sea-to-sky.jpg +0 -0
  275. data/lib/starter_web/assets/audio/cover/emancipator/soon-it-will-be-cold-enough.jpg +0 -0
  276. data/lib/starter_web/assets/audio/cover/emancipator/tine-for-space.jpg +0 -0
  277. data/lib/starter_web/assets/video/poster/vimeo/fall_2011.jpg +0 -0
  278. data/lib/starter_web/package.json +1 -1
  279. data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +282 -0
  280. data/lib/starter_web/pages/public/tour/audio_data.adoc +11 -6
  281. data/lib/starter_web/pages/public/tour/video_data.adoc +1 -0
  282. metadata +238 -115
  283. data/assets/data/swiper_app.2.html +0 -757
  284. data/assets/data/swiper_app.4.html +0 -769
  285. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +0 -32
  286. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +0 -31
  287. data/assets/theme/j1/modules/videojs/css/plugins/controls/zoom.min.css +0 -21
  288. data/assets/theme/j1/modules/videojs/js/plugins/players/dm/dailymotion.min.js +0 -19
  289. data/assets/theme/j1/modules/videojs/js/plugins/players/vm/vimeo.min.js +0 -16
  290. data/assets/theme/j1/modules/videojs/js/plugins/players/wt/api/src/WistiaPlayer.ts +0 -1617
  291. data/assets/theme/j1/modules/videojs/js/plugins/players/wt/wistia.min.js +0 -21
  292. data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.min.js +0 -21
  293. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/anthem.jpg +0 -0
  294. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/from-dusk-to-dawn.jpg +0 -0
  295. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/safe-in-the-steep-cliffs.jpg +0 -0
  296. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/soon-it-will-be-cold-enough.jpg +0 -0
  297. data/lib/starter_web/assets/video/poster/vimeo/stay_colorful.jpg +0 -0
  298. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/animation-w.png +0 -0
  299. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/customize-w.png +0 -0
  300. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/dynamic-w.png +0 -0
  301. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/facebook-icon.svg +0 -0
  302. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/googleplus-icon.svg +0 -0
  303. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/html5-w.png +0 -0
  304. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/linked-in.png +0 -0
  305. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/module-w.png +0 -0
  306. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/play-button-hover.svg +0 -0
  307. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/play-button.png +0 -0
  308. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/play-button.svg +0 -0
  309. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/responsive-w.png +0 -0
  310. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/thumb-w.png +0 -0
  311. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/touch-w.png +0 -0
  312. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/twitter-icon.svg +0 -0
  313. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/twitter.png +0 -0
  314. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/video1-w.png +0 -0
  315. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/zoom-w.png +0 -0
  316. /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/zoom.png +0 -0
  317. /data/assets/theme/j1/modules/lightGallery/{js → !v2.7.2/js}/plugins/j1/j1-video.js +0 -0
  318. /data/assets/theme/j1/modules/lightGallery/{js → !v2.7.2/js}/plugins/j1/j1-video.min.js +0 -0
  319. /data/assets/theme/j1/modules/videoPlayer/dailymotion/js/{!readme → README.md} +0 -0
  320. /data/assets/theme/j1/modules/videoPlayer/tiktoc/{js/player.min.js → player.min.js} +0 -0
  321. /data/assets/theme/j1/modules/videoPlayer/vimeo/js/{!readme → README.md} +0 -0
  322. /data/assets/theme/j1/modules/videoPlayer/wistia/js/{!readme → README.md} +0 -0
  323. /data/assets/theme/j1/modules/videojs/{css → !v8.12.0/css}/font/video-js-cdn.css +0 -0
  324. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/autocaption/LICENSE +0 -0
  325. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/autocaption/README.md +0 -0
  326. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/autocaption → plugins/controls/autocaption/js}/autocaption.min.js +0 -0
  327. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys/examples → plugins/controls/hotkeys/!examples}/example.html +0 -0
  328. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/hotkeys/LICENSE.md +0 -0
  329. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/hotkeys/README.md +0 -0
  330. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys → plugins/controls/hotkeys/js}/hotkeys.js +0 -0
  331. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys → plugins/controls/hotkeys/js}/hotkeys.min.js +0 -0
  332. /data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/skipbuttons/css}/skipbuttons.css +0 -0
  333. /data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/skipbuttons/css}/skipbuttons.min.css +0 -0
  334. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/skipbuttons → plugins/controls/skipbuttons/js}/skipbuttons.js +0 -0
  335. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/skipbuttons → plugins/controls/skipbuttons/js}/skipbuttons.min.js +0 -0
  336. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/index.html +0 -0
  337. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/index.js +0 -0
  338. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/styles.css +0 -0
  339. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/zoom/LICENSE.md +0 -0
  340. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/zoom/README.md +0 -0
  341. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom → plugins/controls/zoom/js}/zoom.js +0 -0
  342. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom → plugins/controls/zoom/js}/zoom.min.js +0 -0
  343. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-controls.html +0 -0
  344. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-javascript.html +0 -0
  345. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-playlist.html +0 -0
  346. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/global-parameters.html +0 -0
  347. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/simple.html +0 -0
  348. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/switch.html +0 -0
  349. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/LICENSE +0 -0
  350. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/doc → plugins/players/dm}/README.md +0 -0
  351. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/api/LICENSE +0 -0
  352. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api/doc → plugins/players/dm/api}/README.md +0 -0
  353. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api → plugins/players/dm/api/js}/dailymotion.sdk.js +0 -0
  354. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api → plugins/players/dm/api/js}/dailymotion.sdk.min.js +0 -0
  355. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/icon/scalable/dailymotion.svg +0 -0
  356. /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/examples → plugins/players/vm/!examples}/index.html +0 -0
  357. /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/examples → plugins/players/vm/!examples}/player/index.html +0 -0
  358. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/LICENSE +0 -0
  359. /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/doc → plugins/players/vm}/README.md +0 -0
  360. /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api/doc → plugins/players/vm/api}/README.md +0 -0
  361. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/embed.player.css +0 -0
  362. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/embed.player.uno.css +0 -0
  363. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/player.css +0 -0
  364. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/doc → plugins/players/wt}/README.md +0 -0
  365. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/api/doc/Readme.txt → plugins/players/wt/api/README.md} +0 -0
  366. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/api → plugins/players/wt/api/js}/wistia.min.js +0 -0
  367. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/global-parameters.html +0 -0
  368. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/simple.html +0 -0
  369. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/switch.html +0 -0
  370. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-controls.html +0 -0
  371. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-javascript.html +0 -0
  372. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-list.html +0 -0
  373. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-playlist.html +0 -0
  374. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/v3.0.0 → plugins/players/yt/!v3.0.0}/youtube.js +0 -0
  375. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/v3.0.0 → plugins/players/yt/!v3.0.0}/youtube.min.js +0 -0
  376. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/yt/LICENSE +0 -0
  377. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/doc → plugins/players/yt}/README.md +0 -0
  378. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/api → plugins/players/yt/api/js}/youtube.min.js +0 -0
  379. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn → !info}/!sound.links.txt +0 -0
  380. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/Anthem.mp3 → Anthem.mp3} +0 -0
  381. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/DuskToDawn.mp3 → DuskToDawn.mp3} +0 -0
  382. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/FirstSnow.mp3 → FirstSnow.mp3} +0 -0
  383. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/SafeInTheSteepCliffs.mp3 → SafeInTheSteepCliffs.mp3} +0 -0
@@ -1,12 +1,12 @@
1
1
  /*
2
2
  # -----------------------------------------------------------------------------
3
3
  # ~/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.min.js
4
- # Provides lightGallery JS code for the plugin lgZoom
4
+ # Provides lightGallery v2.8.3 JS code for the plugin lgZoom
5
5
  #
6
6
  # Product/Info:
7
7
  # https://jekyll.one
8
8
  #
9
- # Copyright (C) 2023 Sachin Neravath
9
+ # Copyright (C) 2025 Sachin Neravath
10
10
  # Copyright (C) 2023-2025 Juergen Adams
11
11
  #
12
12
  # J1 Template is licensed under the MIT License.
@@ -16,11 +16,11 @@
16
16
  # -----------------------------------------------------------------------------
17
17
  */
18
18
 
19
- /**
20
- * lightgallery | 2.7.2 | September 20th 2023
19
+ /*!
20
+ * lightgallery | 2.8.3 | March 1st 2025
21
21
  * http://www.lightgalleryjs.com/
22
22
  * Copyright (c) 2020 Sachin Neravath;
23
23
  * @license GPLv3
24
24
  */
25
25
 
26
- !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).lgZoom=t()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},t={scale:1,zoom:!0,infiniteZoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300,zoomPluginStrings:{zoomIn:"Zoom in",zoomOut:"Zoom out",viewActualSize:"View actual size"}},o="lgContainerResize",i="lgBeforeOpen",s="lgAfterOpen",a="lgSlideItemLoad",n="lgAfterSlide",r="lgRotateLeft",l="lgRotateRight",g="lgFlipHorizontal",c="lgFlipVertical";return function(){function h(o,i){return this.core=o,this.$LG=i,this.settings=e(e({},t),this.core.settings),this}return h.prototype.buildTemplates=function(){var e=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(e+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.viewActualSize+'" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(e)},h.prototype.enableZoom=function(e){var t=this,o=this.settings.enableZoomAfter+e.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&e.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout((function(){t.isImageSlide(t.core.index)&&(t.core.getSlideItem(e.detail.index).addClass("lg-zoomable"),e.detail.index===t.core.index&&t.setZoomEssentials())}),o+30)},h.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(a+".zoom",this.enableZoom.bind(this))},h.prototype.getDragCords=function(e){return{x:e.pageX,y:e.pageY}},h.prototype.getSwipeCords=function(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}},h.prototype.getDragAllowedAxises=function(e,t){var o=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),i=0,s=0,a=o.getBoundingClientRect();e?(i=o.offsetHeight*e,s=o.offsetWidth*e):t?(i=a.height+t*a.height,s=a.width+t*a.width):(i=a.height,s=a.width);var n=i>this.containerRect.height;return{allowX:s>this.containerRect.width,allowY:n}},h.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},h.prototype.zoomImage=function(e,t,o,i){if(!(Math.abs(t)<=0)){var s,a,n=this.containerRect.width/2+this.containerRect.left,r=this.containerRect.height/2+this.containerRect.top+this.scrollTop;1===e&&(this.positionChanged=!1);var l=this.getDragAllowedAxises(0,t),g=l.allowY,c=l.allowX;this.positionChanged&&(s=this.left/(this.scale-t),a=this.top/(this.scale-t),this.pageX=n-s,this.pageY=r-a,this.positionChanged=!1);var h,m,u=this.getPossibleSwipeDragCords(t),d=n-this.pageX,f=r-this.pageY;if(e-t>1){var p=(e-t)/Math.abs(t);h=(d=(t<0?-d:d)+this.left*(p+(t<0?-1:1)))/p,m=(f=(t<0?-f:f)+this.top*(p+(t<0?-1:1)))/p}else{h=d*(p=(e-t)*t),m=f*p}o&&(c?this.isBeyondPossibleLeft(h,u.minX)?h=u.minX:this.isBeyondPossibleRight(h,u.maxX)&&(h=u.maxX):e>1&&(h<u.minX?h=u.minX:h>u.maxX&&(h=u.maxX)),g?this.isBeyondPossibleTop(m,u.minY)?m=u.minY:this.isBeyondPossibleBottom(m,u.maxY)&&(m=u.maxY):e>1&&(m<u.minY?m=u.minY:m>u.maxY&&(m=u.maxY))),this.setZoomStyles({x:h,y:m,scale:e}),this.left=h,this.top=m,i&&this.setZoomImageSize()}},h.prototype.resetImageTranslate=function(e){if(this.isImageSlide(e)){var t=this.core.getSlideItem(e).find(".lg-image").first();this.imageReset=!1,t.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),t.css("width","auto").css("height","auto"),setTimeout((function(){t.removeClass("no-transition")}),10)}},h.prototype.setZoomImageSize=function(){var e=this,t=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout((function(){var o=e.getCurrentImageActualSizeScale();e.scale>=o&&(t.addClass("no-transition"),e.imageReset=!0)}),500),setTimeout((function(){var o=e.getCurrentImageActualSizeScale();if(e.scale>=o){var i=e.getDragAllowedAxises(e.scale);t.css("width",t.get().naturalWidth+"px").css("height",t.get().naturalHeight+"px"),e.core.outer.addClass("lg-actual-size"),i.allowX&&i.allowY?t.addClass("reset-transition"):i.allowX&&!i.allowY?t.addClass("reset-transition-x"):!i.allowX&&i.allowY&&t.addClass("reset-transition-y")}}),550)},h.prototype.setZoomStyles=function(e){var t=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),o=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=e.scale,o.css("transform","scale3d("+e.scale+", "+e.scale+", 1)"),i.css("transform","scale3d("+e.scale+", "+e.scale+", 1)");var s="translate3d("+e.x+"px, "+e.y+"px, 0)";t.css("transform",s)},h.prototype.setActualSize=function(e,t){var o=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var i=this.core.galleryItems[this.core.index];this.resetImageTranslate(e),setTimeout((function(){if(i.src&&!o.core.outer.hasClass("lg-first-slide-loading")){var e=o.getCurrentImageActualSizeScale(),s=o.scale;o.core.outer.hasClass("lg-zoomed")?o.scale=1:o.scale=o.getScale(e),o.setPageCords(t),o.beginZoom(o.scale),o.zoomImage(o.scale,o.scale-s,!0,!0)}}),50),setTimeout((function(){o.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}),60),setTimeout((function(){o.zoomInProgress=!1}),610)}},h.prototype.getNaturalWidth=function(e){var t=this.core.getSlideItem(e).find(".lg-image").first(),o=this.core.galleryItems[e].width;return o?parseFloat(o):t.get().naturalWidth},h.prototype.getActualSizeScale=function(e,t){return e>=t?e/t||2:1},h.prototype.getCurrentImageActualSizeScale=function(){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,t=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(t,e)},h.prototype.getPageCords=function(e){var t={};if(e)t.x=e.pageX||e.touches[0].pageX,t.y=e.pageY||e.touches[0].pageY;else{var o=this.core.$content.get().getBoundingClientRect();t.x=o.width/2+o.left,t.y=o.height/2+this.scrollTop+o.top}return t},h.prototype.setPageCords=function(e){var t=this.getPageCords(e);this.pageX=t.x,this.pageY=t.y},h.prototype.manageActualPixelClassNames=function(){this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},h.prototype.beginZoom=function(e){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),e>1},h.prototype.getScale=function(e){var t=this.getCurrentImageActualSizeScale();return e<1?e=1:e>t&&(e=t),e},h.prototype.init=function(){var e=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var t=null;this.core.outer.on("dblclick.lg",(function(t){e.$LG(t.target).hasClass("lg-image")&&e.setActualSize(e.core.index,t)})),this.core.outer.on("touchstart.lg",(function(o){var i=e.$LG(o.target);1===o.touches.length&&i.hasClass("lg-image")&&(t?(clearTimeout(t),t=null,o.preventDefault(),e.setActualSize(e.core.index,o)):t=setTimeout((function(){t=null}),300))})),this.core.LGel.on(o+".zoom "+l+".zoom "+r+".zoom "+g+".zoom "+c+".zoom",(function(){if(e.core.lgOpened&&e.isImageSlide(e.core.index)&&!e.core.touchAction){var t=e.core.getSlideItem(e.core.index).find(".lg-img-wrap").first();e.top=0,e.left=0,e.setZoomEssentials(),e.setZoomSwipeStyles(t,{x:0,y:0}),e.positionChanged=!0}})),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,(function(){e.core.lgOpened&&(e.scrollTop=e.$LG(window).scrollTop())})),this.core.getElementById("lg-zoom-out").on("click.lg",(function(){if(e.isImageSlide(e.core.index)){var t=0;e.imageReset&&(e.resetImageTranslate(e.core.index),t=50),setTimeout((function(){var t=e.scale-e.settings.scale;t<1&&(t=1),e.beginZoom(t),e.zoomImage(t,-e.settings.scale,!0,!e.settings.infiniteZoom)}),t)}})),this.core.getElementById("lg-zoom-in").on("click.lg",(function(){e.zoomIn()})),this.core.getElementById("lg-actual-size").on("click.lg",(function(){e.setActualSize(e.core.index)})),this.core.LGel.on(i+".zoom",(function(){e.core.outer.find(".lg-item").removeClass("lg-zoomable")})),this.core.LGel.on(s+".zoom",(function(){e.scrollTop=e.$LG(window).scrollTop(),e.pageX=e.core.outer.width()/2,e.pageY=e.core.outer.height()/2+e.scrollTop,e.scale=1})),this.core.LGel.on(n+".zoom",(function(t){var o=t.detail.prevIndex;e.scale=1,e.positionChanged=!1,e.zoomInProgress=!1,e.resetZoom(o),e.resetImageTranslate(o),e.isImageSlide(e.core.index)&&e.setZoomEssentials()})),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},h.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var e=this.scale+this.settings.scale;this.settings.infiniteZoom||(e=this.getScale(e)),this.beginZoom(e),this.zoomImage(e,Math.min(this.settings.scale,e-this.scale),!0,!this.settings.infiniteZoom)}},h.prototype.resetZoom=function(e){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var t=this.core.getElementById("lg-actual-size"),o=this.core.getSlideItem(void 0!==e?e:this.core.index);t.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),o.find(".lg-img-wrap").first().removeAttr("style"),o.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},h.prototype.getTouchDistance=function(e){return Math.sqrt((e.touches[0].pageX-e.touches[1].pageX)*(e.touches[0].pageX-e.touches[1].pageX)+(e.touches[0].pageY-e.touches[1].pageY)*(e.touches[0].pageY-e.touches[1].pageY))},h.prototype.pinchZoom=function(){var e=this,t=0,o=!1,i=1,s=0,a=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",(function(o){if(a=e.core.getSlideItem(e.core.index),e.isImageSlide(e.core.index)&&2===o.touches.length){if(o.preventDefault(),e.core.outer.hasClass("lg-first-slide-loading"))return;i=e.scale||1,e.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e.setPageCords(o),e.resetImageTranslate(e.core.index),e.core.touchAction="pinch",t=e.getTouchDistance(o)}})),this.core.$inner.on("touchmove.lg",(function(n){if(2===n.touches.length&&"pinch"===e.core.touchAction&&(e.$LG(n.target).hasClass("lg-item")||a.get().contains(n.target))){n.preventDefault();var r=e.getTouchDistance(n),l=t-r;if(!o&&Math.abs(l)>5&&(o=!0),o){s=e.scale;var g=Math.max(1,i+.02*-l);e.scale=Math.round(100*(g+Number.EPSILON))/100;var c=e.scale-s;e.zoomImage(e.scale,Math.round(100*(c+Number.EPSILON))/100,!1,!1)}}})),this.core.$inner.on("touchend.lg",(function(i){if("pinch"===e.core.touchAction&&(e.$LG(i.target).hasClass("lg-item")||a.get().contains(i.target))){if(o=!1,t=0,e.scale<=1)e.resetZoom();else{var s=e.getCurrentImageActualSizeScale();if(e.scale>=s){var n=s-e.scale;0===n&&(n=.01),e.zoomImage(s,n,!1,!0)}e.manageActualPixelClassNames(),e.core.outer.addClass("lg-zoomed")}e.core.touchAction=void 0}}))},h.prototype.touchendZoom=function(e,t,o,i,s){var a=t.x-e.x,n=t.y-e.y,r=Math.abs(a)/s+1,l=Math.abs(n)/s+1;r>2&&(r+=1),l>2&&(l+=1),a*=r,n*=l;var g=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),c={};c.x=this.left+a,c.y=this.top+n;var h=this.getPossibleSwipeDragCords();(Math.abs(a)>15||Math.abs(n)>15)&&(i&&(this.isBeyondPossibleTop(c.y,h.minY)?c.y=h.minY:this.isBeyondPossibleBottom(c.y,h.maxY)&&(c.y=h.maxY)),o&&(this.isBeyondPossibleLeft(c.x,h.minX)?c.x=h.minX:this.isBeyondPossibleRight(c.x,h.maxX)&&(c.x=h.maxX)),i?this.top=c.y:c.y=this.top,o?this.left=c.x:c.x=this.left,this.setZoomSwipeStyles(g,c),this.positionChanged=!0)},h.prototype.getZoomSwipeCords=function(e,t,o,i,s){var a={};if(i){if(a.y=this.top+(t.y-e.y),this.isBeyondPossibleTop(a.y,s.minY)){var n=s.minY-a.y;a.y=s.minY-n/6}else if(this.isBeyondPossibleBottom(a.y,s.maxY)){var r=a.y-s.maxY;a.y=s.maxY+r/6}}else a.y=this.top;if(o){if(a.x=this.left+(t.x-e.x),this.isBeyondPossibleLeft(a.x,s.minX)){var l=s.minX-a.x;a.x=s.minX-l/6}else if(this.isBeyondPossibleRight(a.x,s.maxX)){var g=a.x-s.maxX;a.x=s.maxX+g/6}}else a.x=this.left;return a},h.prototype.isBeyondPossibleLeft=function(e,t){return e>=t},h.prototype.isBeyondPossibleRight=function(e,t){return e<=t},h.prototype.isBeyondPossibleTop=function(e,t){return e>=t},h.prototype.isBeyondPossibleBottom=function(e,t){return e<=t},h.prototype.isImageSlide=function(e){var t=this.core.galleryItems[e];return"image"===this.core.getSlideType(t)},h.prototype.getPossibleSwipeDragCords=function(e){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.mediaContainerPosition.bottom,i=t.get().getBoundingClientRect(),s=i.height,a=i.width;return e&&(s+=e*s,a+=e*a),{minY:(s-this.containerRect.height)/2,maxY:(this.containerRect.height-s)/2+o,minX:(a-this.containerRect.width)/2,maxX:(this.containerRect.width-a)/2}},h.prototype.setZoomSwipeStyles=function(e,t){e.css("transform","translate3d("+t.x+"px, "+t.y+"px, 0)")},h.prototype.zoomSwipe=function(){var e,t,o=this,i={},s={},a=!1,n=!1,r=!1,l=new Date,g=(new Date,this.core.getSlideItem(this.core.index));this.core.$inner.on("touchstart.lg",(function(s){if(o.isImageSlide(o.core.index)&&(g=o.core.getSlideItem(o.core.index),(o.$LG(s.target).hasClass("lg-item")||g.get().contains(s.target))&&1===s.touches.length&&o.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),l=new Date,o.core.touchAction="zoomSwipe",t=o.core.getSlideItem(o.core.index).find(".lg-img-wrap").first();var a=o.getDragAllowedAxises(0);r=a.allowY,((n=a.allowX)||r)&&(i=o.getSwipeCords(s)),e=o.getPossibleSwipeDragCords(),o.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}})),this.core.$inner.on("touchmove.lg",(function(l){if(1===l.touches.length&&"zoomSwipe"===o.core.touchAction&&(o.$LG(l.target).hasClass("lg-item")||g.get().contains(l.target))){l.preventDefault(),o.core.touchAction="zoomSwipe",s=o.getSwipeCords(l);var c=o.getZoomSwipeCords(i,s,n,r,e);(Math.abs(s.x-i.x)>15||Math.abs(s.y-i.y)>15)&&(a=!0,o.setZoomSwipeStyles(t,c))}})),this.core.$inner.on("touchend.lg",(function(e){if("zoomSwipe"===o.core.touchAction&&(o.$LG(e.target).hasClass("lg-item")||g.get().contains(e.target))){if(e.preventDefault(),o.core.touchAction=void 0,o.core.outer.removeClass("lg-zoom-dragging"),!a)return;a=!1;var t=(new Date).valueOf()-l.valueOf();o.touchendZoom(i,s,n,r,t)}}))},h.prototype.zoomDrag=function(){var e,t,o,i,s=this,a={},n={},r=!1,l=!1,g=!1,c=!1;this.core.outer.on("mousedown.lg.zoom",(function(t){if(s.isImageSlide(s.core.index)){var n=s.core.getSlideItem(s.core.index);if(s.$LG(t.target).hasClass("lg-item")||n.get().contains(t.target)){e=new Date,i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var l=s.getDragAllowedAxises(0);c=l.allowY,g=l.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(t.target).hasClass("lg-object")&&(g||c)&&(t.preventDefault(),a=s.getDragCords(t),o=s.getPossibleSwipeDragCords(),r=!0,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}})),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,(function(e){if(r){l=!0,n=s.getDragCords(e);var t=s.getZoomSwipeCords(a,n,g,c,o);s.setZoomSwipeStyles(i,t)}})),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,(function(o){if(r){if(t=new Date,r=!1,s.core.outer.removeClass("lg-zoom-dragging"),l&&(a.x!==n.x||a.y!==n.y)){n=s.getDragCords(o);var i=t.valueOf()-e.valueOf();s.touchendZoom(a,n,g,c,i)}l=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}))},h.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},h.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},h}()}));
26
+ !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).lgZoom=t()}(this,(function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},e.apply(this,arguments)},t={scale:1,zoom:!0,infiniteZoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300,zoomPluginStrings:{zoomIn:"Zoom in",zoomOut:"Zoom out",viewActualSize:"View actual size"}},o="lgContainerResize",i="lgBeforeOpen",s="lgAfterOpen",a="lgSlideItemLoad",n="lgAfterSlide",r="lgRotateLeft",l="lgRotateRight",c="lgFlipHorizontal",g="lgFlipVertical";return function(){function h(o,i){return this.core=o,this.$LG=i,this.settings=e(e({},t),this.core.settings),this}return h.prototype.buildTemplates=function(){var e=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomOut+'" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(e+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.viewActualSize+'" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(e)},h.prototype.enableZoom=function(e){var t=this,o=this.settings.enableZoomAfter+e.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&e.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout((function(){t.isImageSlide(t.core.index)&&(t.core.getSlideItem(e.detail.index).addClass("lg-zoomable"),e.detail.index===t.core.index&&t.setZoomEssentials())}),o+30)},h.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(a+".zoom",this.enableZoom.bind(this))},h.prototype.getDragCords=function(e){return{x:e.pageX,y:e.pageY}},h.prototype.getSwipeCords=function(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}},h.prototype.getDragAllowedAxises=function(e,t){if(!this.containerRect)return{allowX:!1,allowY:!1};var o=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),i=0,s=0,a=o.getBoundingClientRect();e?(i=o.offsetHeight*e,s=o.offsetWidth*e):t?(i=a.height+t*a.height,s=a.width+t*a.width):(i=a.height,s=a.width);var n=i>this.containerRect.height;return{allowX:s>this.containerRect.width,allowY:n}},h.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},h.prototype.zoomImage=function(e,t,o,i){if(!(Math.abs(t)<=0)){var s,a,n=this.containerRect.width/2+this.containerRect.left,r=this.containerRect.height/2+this.containerRect.top+this.scrollTop;1===e&&(this.positionChanged=!1);var l=this.getDragAllowedAxises(0,t),c=l.allowY,g=l.allowX;this.positionChanged&&(s=this.left/(this.scale-t),a=this.top/(this.scale-t),this.pageX=n-s,this.pageY=r-a,this.positionChanged=!1);var h,m,u=this.getPossibleSwipeDragCords(t),d=n-this.pageX,f=r-this.pageY;if(e-t>1){var p=(e-t)/Math.abs(t);h=(d=(t<0?-d:d)+this.left*(p+(t<0?-1:1)))/p,m=(f=(t<0?-f:f)+this.top*(p+(t<0?-1:1)))/p}else{h=d*(p=(e-t)*t),m=f*p}o&&(g?this.isBeyondPossibleLeft(h,u.minX)?h=u.minX:this.isBeyondPossibleRight(h,u.maxX)&&(h=u.maxX):e>1&&(h<u.minX?h=u.minX:h>u.maxX&&(h=u.maxX)),c?this.isBeyondPossibleTop(m,u.minY)?m=u.minY:this.isBeyondPossibleBottom(m,u.maxY)&&(m=u.maxY):e>1&&(m<u.minY?m=u.minY:m>u.maxY&&(m=u.maxY))),this.setZoomStyles({x:h,y:m,scale:e}),this.left=h,this.top=m,i&&this.setZoomImageSize()}},h.prototype.resetImageTranslate=function(e){if(this.isImageSlide(e)){var t=this.core.getSlideItem(e).find(".lg-image").first();this.imageReset=!1,t.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),t.css("width","auto").css("height","auto"),setTimeout((function(){t.removeClass("no-transition")}),10)}},h.prototype.setZoomImageSize=function(){var e=this,t=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout((function(){var o=e.getCurrentImageActualSizeScale();e.scale>=o&&(t.addClass("no-transition"),e.imageReset=!0)}),500),setTimeout((function(){var o=e.getCurrentImageActualSizeScale();if(e.scale>=o){var i=e.getDragAllowedAxises(e.scale);t.css("width",t.get().naturalWidth+"px").css("height",t.get().naturalHeight+"px"),e.core.outer.addClass("lg-actual-size"),i.allowX&&i.allowY?t.addClass("reset-transition"):i.allowX&&!i.allowY?t.addClass("reset-transition-x"):!i.allowX&&i.allowY&&t.addClass("reset-transition-y")}}),550)},h.prototype.setZoomStyles=function(e){var t=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),o=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=e.scale,o.css("transform","scale3d("+e.scale+", "+e.scale+", 1)"),i.css("transform","scale3d("+e.scale+", "+e.scale+", 1)");var s="translate3d("+e.x+"px, "+e.y+"px, 0)";t.css("transform",s)},h.prototype.setActualSize=function(e,t){var o=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var i=this.core.galleryItems[this.core.index];this.resetImageTranslate(e),setTimeout((function(){if(i.src&&!o.core.outer.hasClass("lg-first-slide-loading")){var e=o.getCurrentImageActualSizeScale(),s=o.scale;o.core.outer.hasClass("lg-zoomed")?o.scale=1:o.scale=o.getScale(e),o.setPageCords(t),o.beginZoom(o.scale),o.zoomImage(o.scale,o.scale-s,!0,!0)}}),50),setTimeout((function(){o.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}),60),setTimeout((function(){o.zoomInProgress=!1}),610)}},h.prototype.getNaturalWidth=function(e){var t=this.core.getSlideItem(e).find(".lg-image").first(),o=this.core.galleryItems[e].width;return o?parseFloat(o):t.get().naturalWidth},h.prototype.getActualSizeScale=function(e,t){return e>=t?e/t||2:1},h.prototype.getCurrentImageActualSizeScale=function(){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,t=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(t,e)},h.prototype.getPageCords=function(e){var t={};if(e)t.x=e.pageX||e.touches[0].pageX,t.y=e.pageY||e.touches[0].pageY;else{var o=this.core.$content.get().getBoundingClientRect();t.x=o.width/2+o.left,t.y=o.height/2+this.scrollTop+o.top}return t},h.prototype.setPageCords=function(e){var t=this.getPageCords(e);this.pageX=t.x,this.pageY=t.y},h.prototype.manageActualPixelClassNames=function(){this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},h.prototype.beginZoom=function(e){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),e>1},h.prototype.getScale=function(e){var t=this.getCurrentImageActualSizeScale();return e<1?e=1:e>t&&(e=t),e},h.prototype.init=function(){var e=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var t=null;this.core.outer.on("dblclick.lg",(function(t){e.$LG(t.target).hasClass("lg-image")&&e.setActualSize(e.core.index,t)})),this.core.outer.on("touchstart.lg",(function(o){var i=e.$LG(o.target);1===o.touches.length&&i.hasClass("lg-image")&&(t?(clearTimeout(t),t=null,o.preventDefault(),e.setActualSize(e.core.index,o)):t=setTimeout((function(){t=null}),300))})),this.core.LGel.on(o+".zoom "+l+".zoom "+r+".zoom "+c+".zoom "+g+".zoom",(function(){if(e.core.lgOpened&&e.isImageSlide(e.core.index)&&!e.core.touchAction){var t=e.core.getSlideItem(e.core.index).find(".lg-img-wrap").first();e.top=0,e.left=0,e.setZoomEssentials(),e.setZoomSwipeStyles(t,{x:0,y:0}),e.positionChanged=!0}})),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,(function(){e.core.lgOpened&&(e.scrollTop=e.$LG(window).scrollTop())})),this.core.getElementById("lg-zoom-out").on("click.lg",(function(){if(e.isImageSlide(e.core.index)){var t=0;e.imageReset&&(e.resetImageTranslate(e.core.index),t=50),setTimeout((function(){var t=e.scale-e.settings.scale;t<1&&(t=1),e.beginZoom(t),e.zoomImage(t,-e.settings.scale,!0,!e.settings.infiniteZoom)}),t)}})),this.core.getElementById("lg-zoom-in").on("click.lg",(function(){e.zoomIn()})),this.core.getElementById("lg-actual-size").on("click.lg",(function(){e.setActualSize(e.core.index)})),this.core.LGel.on(i+".zoom",(function(){e.core.outer.find(".lg-item").removeClass("lg-zoomable")})),this.core.LGel.on(s+".zoom",(function(){e.scrollTop=e.$LG(window).scrollTop(),e.pageX=e.core.outer.width()/2,e.pageY=e.core.outer.height()/2+e.scrollTop,e.scale=1})),this.core.LGel.on(n+".zoom",(function(t){var o=t.detail.prevIndex;e.scale=1,e.positionChanged=!1,e.zoomInProgress=!1,e.resetZoom(o),e.resetImageTranslate(o),e.isImageSlide(e.core.index)&&e.setZoomEssentials()})),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},h.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var e=this.scale+this.settings.scale;this.settings.infiniteZoom||(e=this.getScale(e)),this.beginZoom(e),this.zoomImage(e,Math.min(this.settings.scale,e-this.scale),!0,!this.settings.infiniteZoom)}},h.prototype.resetZoom=function(e){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var t=this.core.getElementById("lg-actual-size"),o=this.core.getSlideItem(void 0!==e?e:this.core.index);t.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),o.find(".lg-img-wrap").first().removeAttr("style"),o.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},h.prototype.getTouchDistance=function(e){return Math.sqrt((e.touches[0].pageX-e.touches[1].pageX)*(e.touches[0].pageX-e.touches[1].pageX)+(e.touches[0].pageY-e.touches[1].pageY)*(e.touches[0].pageY-e.touches[1].pageY))},h.prototype.pinchZoom=function(){var e=this,t=0,o=!1,i=1,s=0,a=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",(function(o){if(a=e.core.getSlideItem(e.core.index),e.isImageSlide(e.core.index)&&2===o.touches.length){if(o.preventDefault(),e.core.outer.hasClass("lg-first-slide-loading"))return;i=e.scale||1,e.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e.setPageCords(o),e.resetImageTranslate(e.core.index),e.core.touchAction="pinch",t=e.getTouchDistance(o)}})),this.core.$inner.on("touchmove.lg",(function(n){if(2===n.touches.length&&"pinch"===e.core.touchAction&&(e.$LG(n.target).hasClass("lg-item")||a.get().contains(n.target))){n.preventDefault();var r=e.getTouchDistance(n),l=t-r;if(!o&&Math.abs(l)>5&&(o=!0),o){s=e.scale;var c=Math.max(1,i+.02*-l);e.scale=Math.round(100*(c+Number.EPSILON))/100;var g=e.scale-s;e.zoomImage(e.scale,Math.round(100*(g+Number.EPSILON))/100,!1,!1)}}})),this.core.$inner.on("touchend.lg",(function(i){if("pinch"===e.core.touchAction&&(e.$LG(i.target).hasClass("lg-item")||a.get().contains(i.target))){if(o=!1,t=0,e.scale<=1)e.resetZoom();else{var s=e.getCurrentImageActualSizeScale();if(e.scale>=s){var n=s-e.scale;0===n&&(n=.01),e.zoomImage(s,n,!1,!0)}e.manageActualPixelClassNames(),e.core.outer.addClass("lg-zoomed")}e.core.touchAction=void 0}}))},h.prototype.touchendZoom=function(e,t,o,i,s){var a=t.x-e.x,n=t.y-e.y,r=Math.abs(a)/s+1,l=Math.abs(n)/s+1;r>2&&(r+=1),l>2&&(l+=1),a*=r,n*=l;var c=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),g={};g.x=this.left+a,g.y=this.top+n;var h=this.getPossibleSwipeDragCords();(Math.abs(a)>15||Math.abs(n)>15)&&(i&&(this.isBeyondPossibleTop(g.y,h.minY)?g.y=h.minY:this.isBeyondPossibleBottom(g.y,h.maxY)&&(g.y=h.maxY)),o&&(this.isBeyondPossibleLeft(g.x,h.minX)?g.x=h.minX:this.isBeyondPossibleRight(g.x,h.maxX)&&(g.x=h.maxX)),i?this.top=g.y:g.y=this.top,o?this.left=g.x:g.x=this.left,this.setZoomSwipeStyles(c,g),this.positionChanged=!0)},h.prototype.getZoomSwipeCords=function(e,t,o,i,s){var a={};if(i){if(a.y=this.top+(t.y-e.y),this.isBeyondPossibleTop(a.y,s.minY)){var n=s.minY-a.y;a.y=s.minY-n/6}else if(this.isBeyondPossibleBottom(a.y,s.maxY)){var r=a.y-s.maxY;a.y=s.maxY+r/6}}else a.y=this.top;if(o){if(a.x=this.left+(t.x-e.x),this.isBeyondPossibleLeft(a.x,s.minX)){var l=s.minX-a.x;a.x=s.minX-l/6}else if(this.isBeyondPossibleRight(a.x,s.maxX)){var c=a.x-s.maxX;a.x=s.maxX+c/6}}else a.x=this.left;return a},h.prototype.isBeyondPossibleLeft=function(e,t){return e>=t},h.prototype.isBeyondPossibleRight=function(e,t){return e<=t},h.prototype.isBeyondPossibleTop=function(e,t){return e>=t},h.prototype.isBeyondPossibleBottom=function(e,t){return e<=t},h.prototype.isImageSlide=function(e){var t=this.core.galleryItems[e];return"image"===this.core.getSlideType(t)},h.prototype.getPossibleSwipeDragCords=function(e){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.mediaContainerPosition.bottom,i=t.get().getBoundingClientRect(),s=i.height,a=i.width;return e&&(s+=e*s,a+=e*a),{minY:(s-this.containerRect.height)/2,maxY:(this.containerRect.height-s)/2+o,minX:(a-this.containerRect.width)/2,maxX:(this.containerRect.width-a)/2}},h.prototype.setZoomSwipeStyles=function(e,t){e.css("transform","translate3d("+t.x+"px, "+t.y+"px, 0)")},h.prototype.zoomSwipe=function(){var e,t,o=this,i={},s={},a=!1,n=!1,r=!1,l=new Date,c=(new Date,this.core.getSlideItem(this.core.index));this.core.$inner.on("touchstart.lg",(function(s){if(o.isImageSlide(o.core.index)&&(c=o.core.getSlideItem(o.core.index),(o.$LG(s.target).hasClass("lg-item")||c.get().contains(s.target))&&1===s.touches.length&&o.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),l=new Date,o.core.touchAction="zoomSwipe",t=o.core.getSlideItem(o.core.index).find(".lg-img-wrap").first();var a=o.getDragAllowedAxises(0);r=a.allowY,((n=a.allowX)||r)&&(i=o.getSwipeCords(s)),e=o.getPossibleSwipeDragCords(),o.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}})),this.core.$inner.on("touchmove.lg",(function(l){if(1===l.touches.length&&"zoomSwipe"===o.core.touchAction&&(o.$LG(l.target).hasClass("lg-item")||c.get().contains(l.target))){l.preventDefault(),o.core.touchAction="zoomSwipe",s=o.getSwipeCords(l);var g=o.getZoomSwipeCords(i,s,n,r,e);(Math.abs(s.x-i.x)>15||Math.abs(s.y-i.y)>15)&&(a=!0,o.setZoomSwipeStyles(t,g))}})),this.core.$inner.on("touchend.lg",(function(e){if("zoomSwipe"===o.core.touchAction&&(o.$LG(e.target).hasClass("lg-item")||c.get().contains(e.target))){if(e.preventDefault(),o.core.touchAction=void 0,o.core.outer.removeClass("lg-zoom-dragging"),!a)return;a=!1;var t=(new Date).valueOf()-l.valueOf();o.touchendZoom(i,s,n,r,t)}}))},h.prototype.zoomDrag=function(){var e,t,o,i,s=this,a={},n={},r=!1,l=!1,c=!1,g=!1;this.core.outer.on("mousedown.lg.zoom",(function(t){if(s.isImageSlide(s.core.index)){var n=s.core.getSlideItem(s.core.index);if(s.$LG(t.target).hasClass("lg-item")||n.get().contains(t.target)){e=new Date,i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var l=s.getDragAllowedAxises(0);g=l.allowY,c=l.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(t.target).hasClass("lg-object")&&(c||g)&&(t.preventDefault(),a=s.getDragCords(t),o=s.getPossibleSwipeDragCords(),r=!0,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}})),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,(function(e){if(r){l=!0,n=s.getDragCords(e);var t=s.getZoomSwipeCords(a,n,c,g,o);s.setZoomSwipeStyles(i,t)}})),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,(function(o){if(r){if(t=new Date,r=!1,s.core.outer.removeClass("lg-zoom-dragging"),l&&(a.x!==n.x||a.y!==n.y)){n=s.getDragCords(o);var i=t.valueOf()-e.valueOf();s.touchendZoom(a,n,c,g,i)}l=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}))},h.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},h.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},h}()}));
@@ -154,7 +154,7 @@
154
154
  // available), some cleanups are needed AFTER results generated.
155
155
  if (docs.length > 0) {
156
156
  var logger = log4javascript.getLogger('j1.lunr');
157
- var log_text = '\n' + 'post cleanup of tags and categories';
157
+ var log_text = 'post cleanup of tags and categories';
158
158
  var sr_categories;
159
159
  var sr_tags;
160
160
 
@@ -14,4 +14,5 @@
14
14
  # TODO:
15
15
  # -----------------------------------------------------------------------------
16
16
  */
17
- "use strict";!function(t){var e=function(t){var e=t.match(/(\d+)/g);return new Date(e[0],e[1]-1,e[2])},n=function(){function n(e,n){this.$elem=e,this.$results=t(n.results),this.indexData=n.index_file,this.template=this.compileTemplate(t(n.template)),this.titleMsg=n.titleMsg,this.emptyMsg=n.emptyMsg,this.onResultShown=n.onResultShown,this.initialize()}return n.prototype.initialize=function(){var e=this;this.loadIndexData(function(n){e.docs=t.map(n.docs,e.createEntry),e.index=lunr.Index.load(n.index),e.populateSearchFromQuery(),e.bindKeypress()})},n.prototype.compileTemplate=function(t){var e=t.text();return Mustache.parse(e),function(t,n){return Mustache.render(e,t,n)}},n.prototype.loadIndexData=function(e){t.getJSON(this.indexData,e)},n.prototype.createEntry=function(n,s){var i=t.extend({id:s+1},n);return n.date&&t.extend(i,{date:e(n.date),pubdate:function(){return dateFormat(e(n.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(e(n.date),"mmm dd, yyyy")}}),i},n.prototype.bindKeypress=function(){var t,e,n,s=this,i=this.$elem.val();this.$elem.bind("keyup",(t=function(){var t=s.$elem.val();t!==i&&s.search(t),i=t},n=Array.prototype.slice,function(){var s=n.call(arguments),i=this;clearTimeout(e),e=setTimeout(function(){t.apply(i,s)},100)}))},n.prototype.search=function(e){var n=this.docs;if(e.length<3)this.$results.hide().empty();else{var s=t.map(this.index.search(e),function(e){return t.grep(n,function(t){return t.id===parseInt(e.ref,10)})[0]});this.displayResults(s),this.onResultShown()}},n.prototype.displayResults=function(e){var n=this.$results;if(n.empty(),0===e.length?n.append(this.emptyMsg):(this.titleMsg&&0!==this.titleMsg.length&&n.append(this.titleMsg),n.append(this.template({docs:e}))),n.show(),e.length>0){var s,i;log4javascript.getLogger("j1.lunr").info("\npost cleanup of tags and categories"),t(".sr-tags").each(function(){i=t(this).html().replace(/^\s+(.*)(\s+·\s+$)/,"$1"),t(this).text(i)}),t(".sr-categories").each(function(){s=t(this).html().replace(/^(.*)(\s+·\s+$)/,"$1"),t(this).text(s)})}},n.prototype.populateSearchFromQuery=function(){var t=new URI(window.location.search.toString()).search(!0);t.hasOwnProperty("q")&&(this.$elem.val(t.q),this.search(t.q.toString()))},n}();t.fn.lunrSearch=function(e){return e=t.extend({},t.fn.lunrSearch.defaults,e),new n(this,e),this},t.fn.lunrSearch.defaults={index_file:"/assets/data/lunr-index.json",results:"#search-results",template:"#search-results-template",titleMsg:"<h1>Search results<h1>",emptyMsg:"<p>Nothing found.</p>",onResultShown:function(){}}}(jQuery);
17
+
18
+ "use strict";!function(t){var e=function(t){var e=t.match(/(\d+)/g);return new Date(e[0],e[1]-1,e[2])},n=function(){function n(e,n){this.$elem=e,this.$results=t(n.results),this.indexData=n.index_file,this.template=this.compileTemplate(t(n.template)),this.titleMsg=n.titleMsg,this.emptyMsg=n.emptyMsg,this.onResultShown=n.onResultShown,this.initialize()}return n.prototype.initialize=function(){var e=this;this.loadIndexData((function(n){e.docs=t.map(n.docs,e.createEntry),e.index=lunr.Index.load(n.index),e.populateSearchFromQuery(),e.bindKeypress()}))},n.prototype.compileTemplate=function(t){var e=t.text();return Mustache.parse(e),function(t,n){return Mustache.render(e,t,n)}},n.prototype.loadIndexData=function(e){t.getJSON(this.indexData,e)},n.prototype.createEntry=function(n,s){var i=t.extend({id:s+1},n);return n.date&&t.extend(i,{date:e(n.date),pubdate:function(){return dateFormat(e(n.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(e(n.date),"mmm dd, yyyy")}}),i},n.prototype.bindKeypress=function(){var t,e,n,s=this,i=this.$elem.val();this.$elem.bind("keyup",(t=function(){var t=s.$elem.val();t!==i&&s.search(t),i=t},n=Array.prototype.slice,function(){var s=n.call(arguments),i=this;clearTimeout(e),e=setTimeout((function(){t.apply(i,s)}),100)}))},n.prototype.search=function(e){var n=this.docs;if(e.length<3)this.$results.hide().empty();else{var s=t.map(this.index.search(e),(function(e){return t.grep(n,(function(t){return t.id===parseInt(e.ref,10)}))[0]}));this.displayResults(s),this.onResultShown()}},n.prototype.displayResults=function(e){var n=this.$results;if(n.empty(),0===e.length?n.append(this.emptyMsg):(this.titleMsg&&0!==this.titleMsg.length&&n.append(this.titleMsg),n.append(this.template({docs:e}))),n.show(),e.length>0){var s,i;log4javascript.getLogger("j1.lunr").info("post cleanup of tags and categories"),t(".sr-tags").each((function(){i=t(this).html().replace(/^\s+(.*)(\s+·\s+$)/,"$1"),t(this).text(i)})),t(".sr-categories").each((function(){s=t(this).html().replace(/^(.*)(\s+·\s+$)/,"$1"),t(this).text(s)}))}},n.prototype.populateSearchFromQuery=function(){var t=new URI(window.location.search.toString()).search(!0);t.hasOwnProperty("q")&&(this.$elem.val(t.q),this.search(t.q.toString()))},n}();t.fn.lunrSearch=function(e){return e=t.extend({},t.fn.lunrSearch.defaults,e),new n(this,e),this},t.fn.lunrSearch.defaults={index_file:"/assets/data/lunr-index.json",results:"#search-results",template:"#search-results-template",titleMsg:"<h1>Search results<h1>",emptyMsg:"<p>Nothing found.</p>",onResultShown:function(){}}}(jQuery);
@@ -572,12 +572,12 @@
572
572
  winWidth = $(window).width();
573
573
  // set show/hide all table/colgroup elements
574
574
  if ($(window).width() < Tablesaw.bsMediaBreakpoints[Tablesaw.options.breakpoint]) {
575
- log_text = '\n' + 'hide colgroups: ' + curTable.attr('id')
575
+ log_text = 'hide colgroups: ' + curTable.attr('id')
576
576
  // hide colgroups if table is collapsed
577
577
  curTable.find('colgroup').hide();
578
578
  logger.debug(log_text);
579
579
  } else {
580
- log_text = '\n' + 'show colgroup: ' + curTable.attr('id')
580
+ log_text = 'show colgroup: ' + curTable.attr('id')
581
581
  // show colgroups if table is expanded
582
582
  curTable.find('colgroup').show();
583
583
  logger.debug(log_text);
@@ -16,4 +16,5 @@
16
16
  # See: https://github.com/filamentgroup/tablesaw/blob/master/LICENSE
17
17
  # -----------------------------------------------------------------------------
18
18
  */
19
- !function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(a){return t.Tablesaw=e(a,t)}):"object"==typeof exports?module.exports=e("document"in t?require("jquery"):require("jquery")(t),t):t.Tablesaw=e(jQuery,t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var a=e.document,i=/complete|loaded/.test(a.readyState);a.addEventListener("DOMContentLoaded",function(){i=!0});var n,r,s,o,l,d,h,c={i18n:{modeStack:"Stack",modeSwipe:"Swipe",modeToggle:"Toggle",modeSwitchColumnsAbbreviated:"Cols",modeSwitchColumns:"Columns",columnToggleButton:"Columns",columnToggleError:"No eligible columns.",sort:"Sort",swipePreviousColumn:"Previous column",swipeNextColumn:"Next column"},bsMediaBreakpoints:{xl:"1200",lg:"992",md:"768",sm:"576",xs:"575",default:"992"},mustard:"head"in a&&(!e.blackberry||e.WebKitPoint)&&!e.operamini,$:t,_init:function(t,e){c.$(t||a).trigger("enhance.tablesaw"),c.options=e},init:function(t,e){(i=i||/complete|loaded/.test(a.readyState))?c._init(t,e):"addEventListener"in a&&a.addEventListener("DOMContentLoaded",function(){c._init(t,e)})}};return t(a).on("enhance.tablesaw",function(){"undefined"!=typeof TablesawConfig&&TablesawConfig.i18n&&(c.i18n=t.extend(c.i18n,TablesawConfig.i18n||{})),c.i18n.modes=[c.i18n.modeStack,c.i18n.modeSwipe,c.i18n.modeToggle]}),c.mustard&&t(a.documentElement).addClass("tablesaw-enhanced"),function(){var i="tablesaw-bar",n={create:"tablesawcreate",destroy:"tablesawdestroy",refresh:"tablesawrefresh",resize:"tablesawresize"},r={},s=log4javascript.getLogger("j1.rtable");c.events=n;var o=function(e){if(!e)throw new Error("Tablesaw requires an element.");this.table=e,this.$table=t(e),this.$thead=this.$table.children().filter("thead").eq(0),this.$tbody=this.$table.children().filter("tbody"),this.mode=this.$table.attr("data-tablesaw-mode")||"stack",this.$toolbar=null,this.attributes={subrow:"data-tablesaw-subrow",ignorerow:"data-tablesaw-ignorerow"},this.init()};o.prototype.init=function(){if(!this.$thead.length)throw new Error("tablesaw: a <thead> is required, but none was found.");if(!this.$thead.find("th").length)throw new Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?");this.$table.attr("id")||this.$table.attr("id","tablesaw-"+Math.round(1e4*Math.random())),this.createToolbar(),this._initCells(),this.$table.data("tablesaw",this),this.$table.trigger(n.create,[this])},o.prototype.getConfig=function(e){var a=t.extend(r,e||{});return t.extend(a,"undefined"!=typeof TablesawConfig?TablesawConfig:{})},o.prototype._getPrimaryHeaderRow=function(){return this._getHeaderRows().eq(0)},o.prototype._getHeaderRows=function(){return this.$thead.children().filter("tr").filter(function(){return!t(this).is("[data-tablesaw-ignorerow]")})},o.prototype._getRowIndex=function(t){return t.prevAll().length},o.prototype._getHeaderRowIndeces=function(){var e=this,a=[];return this._getHeaderRows().each(function(){a.push(e._getRowIndex(t(this)))}),a},o.prototype._getPrimaryHeaderCells=function(t){return(t||this._getPrimaryHeaderRow()).find("th")},o.prototype._$getCells=function(e){var a=this;return t(e).add(e.cells).filter(function(){var e=t(this),i=e.parent(),n=e.is("[colspan]");return!(i.is("["+a.attributes.subrow+"]")||i.is("["+a.attributes.ignorerow+"]")&&n)})},o.prototype._getVisibleColspan=function(){var e=0;return this._getPrimaryHeaderCells().each(function(){var a=t(this);"none"!==a.css("display")&&(e+=parseInt(a.attr("colspan"),10)||1)}),e},o.prototype.getColspanForCell=function(e){var a=this._getVisibleColspan(),i=0;return e.closest("tr").data("tablesaw-rowspanned")&&i++,e.siblings().each(function(){var e=t(this),a=parseInt(e.attr("colspan"),10)||1;"none"!==e.css("display")&&(i+=a)}),a-i},o.prototype.isCellInColumn=function(e,a){return t(e).add(e.cells).filter(function(){return this===a}).length},o.prototype.updateColspanCells=function(e,a,i){var n=this,r=n._getPrimaryHeaderRow();this.$table.find("[rowspan][data-tablesaw-priority]").each(function(){var e=t(this);if("persist"===e.attr("data-tablesaw-priority")){var a=e.closest("tr"),i=parseInt(e.attr("rowspan"),10);i>1&&((a=a.next()).data("tablesaw-rowspanned",!0),i--)}}),this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter(function(){return t(this).closest("tr")[0]!==r[0]}).each(function(){var r=t(this);if(void 0===i||n.isCellInColumn(a,this)){var s=n.getColspanForCell(r);e&&void 0!==i&&r[0===s?"addClass":"removeClass"](e);var o=parseInt(r.attr("data-tablesaw-maxcolspan"),10);o?s>o&&(s=o):r.attr("data-tablesaw-maxcolspan",r.attr("colspan")),r.attr("colspan",s)}})},o.prototype._findPrimaryHeadersForCell=function(t){for(var e=this._getPrimaryHeaderRow(),a=this._getRowIndex(e),i=[],n=0;n<this.headerMapping.length;n++)if(n!==a)for(var r=0;r<this.headerMapping[n].length;r++)this.headerMapping[n][r]===t&&i.push(this.headerMapping[a][r]);return i},o.prototype.getRows=function(){var e=this;return this.$table.find("tr").filter(function(){return t(this).closest("table").is(e.$table)})},o.prototype.getBodyRows=function(e){return(e?t(e):this.$tbody).children().filter("tr")},o.prototype.getHeaderCellIndex=function(t){for(var e=this.headerMapping[0],a=0;a<e.length;a++)if(e[a]===t)return a;return-1},o.prototype._initCells=function(){this.$table.find("[data-tablesaw-maxcolspan]").each(function(){var e=t(this);e.attr("colspan",e.attr("data-tablesaw-maxcolspan"))});var e=this.getRows(),a=[];e.each(function(t){a[t]=[]}),e.each(function(e){var i=0;t(this).children().each(function(){for(var t=parseInt(this.getAttribute("data-tablesaw-maxcolspan")||this.getAttribute("colspan"),10),n=parseInt(this.getAttribute("rowspan"),10);a[e][i];)i++;if(a[e][i]=this,t)for(var r=0;r<t-1;r++)i++,a[e][i]=this;if(n)for(var s=1;s<n;s++)a[e+s][i]=this;i++})});for(var i=this._getHeaderRowIndeces(),n=0;n<a[0].length;n++)for(var r=0,s=i.length;r<s;r++){var o,l=a[i[r]][n],d=i[r];for(l.cells||(l.cells=[]);d<a.length;)l!==(o=a[d][n])&&l.cells.push(o),d++}this.headerMapping=a},o.prototype.refresh=function(){this._initCells(),this.$table.trigger(n.refresh,[this])},o.prototype._getToolbarAnchor=function(){var t=this.$table.parent();return t.is(".tablesaw-overflow")?t:this.$table},o.prototype._getToolbar=function(t){return t||(t=this._getToolbarAnchor()),t.prev().filter("."+i)},o.prototype.createToolbar=function(){var e=this._getToolbarAnchor(),a=this._getToolbar(e);a.length||(a=t("<div>").addClass(i).insertBefore(e)),this.$toolbar=a,this.mode&&this.$toolbar.addClass("tablesaw-mode-"+this.mode)},o.prototype.destroy=function(){this._getToolbar().each(function(){this.className=this.className.replace(/\btablesaw-mode\-\w*\b/gi,"")});var i=this.$table.attr("id");t(a).off("."+i),t(e).off("."+i),this.$table.trigger(n.destroy,[this]),this.$table.removeData("tablesaw")},t.fn.tablesaw=function(){return this.each(function(){t(this).data("tablesaw")||new o(this)})};var l=t(a);l.on("enhance.tablesaw",function(e){if(c.mustard){var a=t(e.target);a.parent().length&&(a=a.parent()),a.find("table").filter("[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]").tablesaw()}});var d,h,u=!1;l.on("scroll.tablesaw",function(){u=!0,e.clearTimeout(d),d=e.setTimeout(function(){u=!1},300)}),t(e).on("resize",function(){t("table").each(function(){var a,i=t(this);t(i).hasClass("rtable")&&(t(e).width(),t(e).width()<c.bsMediaBreakpoints[c.options.breakpoint]?(a="\nhide colgroups: "+i.attr("id"),i.find("colgroup").hide(),s.debug(a)):(a="\nshow colgroup: "+i.attr("id"),i.find("colgroup").show(),s.debug(a)))}),u||(e.clearTimeout(h),h=e.setTimeout(function(){l.trigger(n.resize)},150))}),c.Table=o}(),n="tablesaw-stack",r="tablesaw-cell-label",s="tablesaw-cell-content",o="tablesaw-stack",l="data-tablesaw-no-labels",d="data-tablesaw-hide-empty",(h=function(e,a){this.tablesaw=a,this.$table=t(e),this.labelless=this.$table.is("["+l+"]"),this.hideempty=this.$table.is("["+d+"]"),this.$table.data(o,this)}).prototype.init=function(){if(this.$table.addClass(n),!this.labelless){var e=this;this.$table.find("th, td").filter(function(){return!t(this).closest("thead").length}).filter(function(){return!(t(this).is("["+l+"]")||t(this).closest("tr").is("["+l+"]")||e.hideempty&&!t(this).html())}).each(function(){var i=t(a.createElement("b")).addClass(r),n=t(this);t(e.tablesaw._findPrimaryHeadersForCell(this)).each(function(e){var n=t(this.cloneNode(!0)),r=n.find(".tablesaw-sortable-btn");n.find(".tablesaw-sortable-arrow").remove();var s=n.find("[data-tablesaw-checkall]");if(s.closest("label").remove(),s.length)i=t([]);else{e>0&&i.append(a.createTextNode(", "));for(var o,l=r.length?r[0]:n[0];o=l.firstChild;)i[0].appendChild(o)}}),i.length&&!n.find("."+s).length&&n.wrapInner("<span class='"+s+"'></span>");var o=n.find("."+r);o.length?o.replaceWith(i):(n.prepend(a.createTextNode(" ")),n.prepend(i))})}},h.prototype.destroy=function(){this.$table.removeClass(n),this.$table.find("."+r).remove(),this.$table.find("."+s).each(function(){t(this).replaceWith(t(this.childNodes))})},t(a).on(c.events.create,function(t,e){"stack"===e.mode&&new h(e.table,e).init()}).on(c.events.refresh,function(e,a){"stack"===a.mode&&t(a.table).data(o).init()}).on(c.events.destroy,function(e,a){"stack"===a.mode&&t(a.table).data(o).destroy()}),c.Stack=h,c});
19
+
20
+ !function(t,e){"function"==typeof define&&define.amd?define(["jquery"],(function(a){return t.Tablesaw=e(a,t)})):"object"==typeof exports?module.exports=e("document"in t?require("jquery"):require("jquery")(t),t):t.Tablesaw=e(jQuery,t)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var a=e.document,i=/complete|loaded/.test(a.readyState);a.addEventListener("DOMContentLoaded",(function(){i=!0}));var n,r,s,o,l,d,h,c={i18n:{modeStack:"Stack",modeSwipe:"Swipe",modeToggle:"Toggle",modeSwitchColumnsAbbreviated:"Cols",modeSwitchColumns:"Columns",columnToggleButton:"Columns",columnToggleError:"No eligible columns.",sort:"Sort",swipePreviousColumn:"Previous column",swipeNextColumn:"Next column"},bsMediaBreakpoints:{xl:"1200",lg:"992",md:"768",sm:"576",xs:"575",default:"992"},mustard:"head"in a&&(!e.blackberry||e.WebKitPoint)&&!e.operamini,$:t,_init:function(t,e){c.$(t||a).trigger("enhance.tablesaw"),c.options=e},init:function(t,e){(i=i||/complete|loaded/.test(a.readyState))?c._init(t,e):"addEventListener"in a&&a.addEventListener("DOMContentLoaded",(function(){c._init(t,e)}))}};return t(a).on("enhance.tablesaw",(function(){"undefined"!=typeof TablesawConfig&&TablesawConfig.i18n&&(c.i18n=t.extend(c.i18n,TablesawConfig.i18n||{})),c.i18n.modes=[c.i18n.modeStack,c.i18n.modeSwipe,c.i18n.modeToggle]})),c.mustard&&t(a.documentElement).addClass("tablesaw-enhanced"),function(){var i="tablesaw",n="tablesaw-bar",r={create:"tablesawcreate",destroy:"tablesawdestroy",refresh:"tablesawrefresh",resize:"tablesawresize"},s={},o=log4javascript.getLogger("j1.rtable");c.events=r;var l=function(e){if(!e)throw new Error("Tablesaw requires an element.");this.table=e,this.$table=t(e),this.$thead=this.$table.children().filter("thead").eq(0),this.$tbody=this.$table.children().filter("tbody"),this.mode=this.$table.attr("data-tablesaw-mode")||"stack",this.$toolbar=null,this.attributes={subrow:"data-tablesaw-subrow",ignorerow:"data-tablesaw-ignorerow"},this.init()};l.prototype.init=function(){if(!this.$thead.length)throw new Error("tablesaw: a <thead> is required, but none was found.");if(!this.$thead.find("th").length)throw new Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?");this.$table.attr("id")||this.$table.attr("id",i+"-"+Math.round(1e4*Math.random())),this.createToolbar(),this._initCells(),this.$table.data(i,this),this.$table.trigger(r.create,[this])},l.prototype.getConfig=function(e){var a=t.extend(s,e||{});return t.extend(a,"undefined"!=typeof TablesawConfig?TablesawConfig:{})},l.prototype._getPrimaryHeaderRow=function(){return this._getHeaderRows().eq(0)},l.prototype._getHeaderRows=function(){return this.$thead.children().filter("tr").filter((function(){return!t(this).is("[data-tablesaw-ignorerow]")}))},l.prototype._getRowIndex=function(t){return t.prevAll().length},l.prototype._getHeaderRowIndeces=function(){var e=this,a=[];return this._getHeaderRows().each((function(){a.push(e._getRowIndex(t(this)))})),a},l.prototype._getPrimaryHeaderCells=function(t){return(t||this._getPrimaryHeaderRow()).find("th")},l.prototype._$getCells=function(e){var a=this;return t(e).add(e.cells).filter((function(){var e=t(this),i=e.parent(),n=e.is("[colspan]");return!(i.is("["+a.attributes.subrow+"]")||i.is("["+a.attributes.ignorerow+"]")&&n)}))},l.prototype._getVisibleColspan=function(){var e=0;return this._getPrimaryHeaderCells().each((function(){var a=t(this);"none"!==a.css("display")&&(e+=parseInt(a.attr("colspan"),10)||1)})),e},l.prototype.getColspanForCell=function(e){var a=this._getVisibleColspan(),i=0;return e.closest("tr").data("tablesaw-rowspanned")&&i++,e.siblings().each((function(){var e=t(this),a=parseInt(e.attr("colspan"),10)||1;"none"!==e.css("display")&&(i+=a)})),a-i},l.prototype.isCellInColumn=function(e,a){return t(e).add(e.cells).filter((function(){return this===a})).length},l.prototype.updateColspanCells=function(e,a,i){var n=this,r=n._getPrimaryHeaderRow();this.$table.find("[rowspan][data-tablesaw-priority]").each((function(){var e=t(this);if("persist"===e.attr("data-tablesaw-priority")){var a=e.closest("tr"),i=parseInt(e.attr("rowspan"),10);i>1&&((a=a.next()).data("tablesaw-rowspanned",!0),i--)}})),this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter((function(){return t(this).closest("tr")[0]!==r[0]})).each((function(){var r=t(this);if(void 0===i||n.isCellInColumn(a,this)){var s=n.getColspanForCell(r);e&&void 0!==i&&r[0===s?"addClass":"removeClass"](e);var o=parseInt(r.attr("data-tablesaw-maxcolspan"),10);o?s>o&&(s=o):r.attr("data-tablesaw-maxcolspan",r.attr("colspan")),r.attr("colspan",s)}}))},l.prototype._findPrimaryHeadersForCell=function(t){for(var e=this._getPrimaryHeaderRow(),a=this._getRowIndex(e),i=[],n=0;n<this.headerMapping.length;n++)if(n!==a)for(var r=0;r<this.headerMapping[n].length;r++)this.headerMapping[n][r]===t&&i.push(this.headerMapping[a][r]);return i},l.prototype.getRows=function(){var e=this;return this.$table.find("tr").filter((function(){return t(this).closest("table").is(e.$table)}))},l.prototype.getBodyRows=function(e){return(e?t(e):this.$tbody).children().filter("tr")},l.prototype.getHeaderCellIndex=function(t){for(var e=this.headerMapping[0],a=0;a<e.length;a++)if(e[a]===t)return a;return-1},l.prototype._initCells=function(){this.$table.find("[data-tablesaw-maxcolspan]").each((function(){var e=t(this);e.attr("colspan",e.attr("data-tablesaw-maxcolspan"))}));var e=this.getRows(),a=[];e.each((function(t){a[t]=[]})),e.each((function(e){var i=0;t(this).children().each((function(){for(var t=parseInt(this.getAttribute("data-tablesaw-maxcolspan")||this.getAttribute("colspan"),10),n=parseInt(this.getAttribute("rowspan"),10);a[e][i];)i++;if(a[e][i]=this,t)for(var r=0;r<t-1;r++)i++,a[e][i]=this;if(n)for(var s=1;s<n;s++)a[e+s][i]=this;i++}))}));for(var i=this._getHeaderRowIndeces(),n=0;n<a[0].length;n++)for(var r=0,s=i.length;r<s;r++){var o,l=a[i[r]][n],d=i[r];for(l.cells||(l.cells=[]);d<a.length;)l!==(o=a[d][n])&&l.cells.push(o),d++}this.headerMapping=a},l.prototype.refresh=function(){this._initCells(),this.$table.trigger(r.refresh,[this])},l.prototype._getToolbarAnchor=function(){var t=this.$table.parent();return t.is(".tablesaw-overflow")?t:this.$table},l.prototype._getToolbar=function(t){return t||(t=this._getToolbarAnchor()),t.prev().filter("."+n)},l.prototype.createToolbar=function(){var e=this._getToolbarAnchor(),a=this._getToolbar(e);a.length||(a=t("<div>").addClass(n).insertBefore(e)),this.$toolbar=a,this.mode&&this.$toolbar.addClass("tablesaw-mode-"+this.mode)},l.prototype.destroy=function(){this._getToolbar().each((function(){this.className=this.className.replace(/\btablesaw-mode\-\w*\b/gi,"")}));var n=this.$table.attr("id");t(a).off("."+n),t(e).off("."+n),this.$table.trigger(r.destroy,[this]),this.$table.removeData(i)},t.fn[i]=function(){return this.each((function(){t(this).data(i)||new l(this)}))};var d=t(a);d.on("enhance.tablesaw",(function(e){if(c.mustard){var a=t(e.target);a.parent().length&&(a=a.parent()),a.find("table").filter("[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]")[i]()}}));var h,u,f=!1;d.on("scroll.tablesaw",(function(){f=!0,e.clearTimeout(h),h=e.setTimeout((function(){f=!1}),300)})),t(e).on("resize",(function(){t("table").each((function(){var a,i=t(this);t(i).hasClass("rtable")&&(t(e).width(),t(e).width()<c.bsMediaBreakpoints[c.options.breakpoint]?(a="hide colgroups: "+i.attr("id"),i.find("colgroup").hide(),o.debug(a)):(a="show colgroup: "+i.attr("id"),i.find("colgroup").show(),o.debug(a)))})),f||(e.clearTimeout(u),u=e.setTimeout((function(){d.trigger(r.resize)}),150))})),c.Table=l}(),n="tablesaw-stack",r="tablesaw-cell-label",s="tablesaw-cell-content",o="tablesaw-stack",l="data-tablesaw-no-labels",d="data-tablesaw-hide-empty",(h=function(e,a){this.tablesaw=a,this.$table=t(e),this.labelless=this.$table.is("["+l+"]"),this.hideempty=this.$table.is("["+d+"]"),this.$table.data(o,this)}).prototype.init=function(){if(this.$table.addClass(n),!this.labelless){var e=this;this.$table.find("th, td").filter((function(){return!t(this).closest("thead").length})).filter((function(){return!(t(this).is("["+l+"]")||t(this).closest("tr").is("["+l+"]")||e.hideempty&&!t(this).html())})).each((function(){var i=t(a.createElement("b")).addClass(r),n=t(this);t(e.tablesaw._findPrimaryHeadersForCell(this)).each((function(e){var n=t(this.cloneNode(!0)),r=n.find(".tablesaw-sortable-btn");n.find(".tablesaw-sortable-arrow").remove();var s=n.find("[data-tablesaw-checkall]");if(s.closest("label").remove(),s.length)i=t([]);else{e>0&&i.append(a.createTextNode(", "));for(var o,l=r.length?r[0]:n[0];o=l.firstChild;)i[0].appendChild(o)}})),i.length&&!n.find("."+s).length&&n.wrapInner("<span class='"+s+"'></span>");var o=n.find("."+r);o.length?o.replaceWith(i):(n.prepend(a.createTextNode(" ")),n.prepend(i))}))}},h.prototype.destroy=function(){this.$table.removeClass(n),this.$table.find("."+r).remove(),this.$table.find("."+s).each((function(){t(this).replaceWith(t(this.childNodes))}))},t(a).on(c.events.create,(function(t,e){"stack"===e.mode&&new h(e.table,e).init()})).on(c.events.refresh,(function(e,a){"stack"===a.mode&&t(a.table).data(o).init()})).on(c.events.destroy,(function(e,a){"stack"===a.mode&&t(a.table).data(o).destroy()})),c.Stack=h,c}));
@@ -23,6 +23,8 @@
23
23
  ;(function($, window, document, undefined) {
24
24
  'use strict';
25
25
 
26
+ const isDev = (j1.env === "development" || j1.env === "dev") ? true : false;
27
+
26
28
  // plugin defaults
27
29
  var pluginName = 'scroller', defaults = {
28
30
  type: 'infiniteScroll',
@@ -57,8 +59,8 @@
57
59
  var logger = log4javascript.getLogger('j1.scroller.core');
58
60
  var _this = this;
59
61
 
60
- logger.debug('\n' + 'initializing plugin: started');
61
- logger.debug('\n' + 'state: started');
62
+ isDev && logger.debug('initializing plugin: started');
63
+ isDev && logger.debug('state: started');
62
64
 
63
65
  if (options.elementScroll) {
64
66
  _this.scroller = _this.element;
@@ -78,22 +80,22 @@
78
80
 
79
81
  // initialize infinite scroll
80
82
  if (options.type === 'infiniteScroll') {
81
- logger.debug('\n' + 'processing mode: ' + options.type);
82
- logger.debug('\n' + 'loading items from path: ' + options.pagePath);
83
- logger.debug('\n' + 'monitoring element set to: ' + _this.scroller);
83
+ isDev && logger.debug('processing mode: ' + options.type);
84
+ isDev && logger.debug('loading items from path: ' + options.pagePath);
85
+ isDev && logger.debug('monitoring element set to: ' + _this.scroller);
84
86
  _this.registerScrollEvent(options);
85
87
  }
86
88
 
87
89
  // initialize show on scroll
88
90
  if (options.type === 'showOnScroll') {
89
- logger.debug('\n' + 'processing mode: ' + options.type);
90
- logger.debug('\n' + 'loading items from path: ' + options.pagePath);
91
- logger.debug('\n' + 'monitoring element set to: ' + _this.scroller);
91
+ isDev && logger.debug('processing mode: ' + options.type);
92
+ isDev && logger.debug('loading items from path: ' + options.pagePath);
93
+ isDev && logger.debug('monitoring element set to: ' + _this.scroller);
92
94
  _this.registerScrollEvent(options);
93
95
  }
94
96
 
95
- logger.debug('\n' + 'initializing plugin: finished');
96
- logger.debug('\n' + 'state: finished');
97
+ isDev && logger.debug('initializing plugin: finished');
98
+ isDev && logger.debug('state: finished');
97
99
 
98
100
  clearInterval(dependencies_met_page_ready);
99
101
  } // END if pageVisible
@@ -179,10 +181,10 @@
179
181
  if (_this.isBottomReached(options)) {
180
182
  if (options.firstPage > options.lastPage ) {
181
183
  window.removeEventListener('scroll', _this[options.id]);
182
- logger.debug('\n' + 'scroll event removed: ' + options.type);
184
+ isDev && logger.debug('scroll event removed: ' + options.type);
183
185
 
184
186
  if (options.infoLastPage ) {
185
- logger.debug('\n' + 'show last page info');
187
+ isDev && logger.debug('show last page info');
186
188
  _this.infoLastPage(options);
187
189
  }
188
190
  return false;
@@ -192,7 +194,7 @@
192
194
  }; // END event
193
195
 
194
196
  window.addEventListener('scroll', _this[options.id]);
195
- logger.debug('\n' + 'scroll event registered: ' + options.type);
197
+ isDev && logger.debug('scroll event registered: ' + options.type);
196
198
  } // END if type infiniteScroll
197
199
 
198
200
  // scroller type 'showOnScroll'
@@ -200,15 +202,15 @@
200
202
  // register event function DYNAMICALLY
201
203
  _this[options.id] = function (event) {
202
204
  if (_this.isInViewport ($('#' + options.id ), options.scrollOffset)) {
203
- logger.debug('\n' + 'specified container is in view: ' + options.id);
205
+ isDev && logger.debug('specified container is in view: ' + options.id);
204
206
  $('.' + options.id).show(options.showDelay);
205
207
  window.removeEventListener('scroll', _this[options.id]);
206
- logger.debug('\n' + 'scroll event showOnScroll: removed');
208
+ isDev && logger.debug('scroll event showOnScroll: removed');
207
209
  } // END if isInViewport
208
210
  } // END event
209
211
 
210
212
  window.addEventListener('scroll', _this[options.id]);
211
- logger.debug('\n' + 'scroll event registered: ' + options.type);
213
+ isDev && logger.debug('scroll event registered: ' + options.type);
212
214
  } // END if type showOnScrol
213
215
  }, // END registerScrollEvent
214
216
 
@@ -222,7 +224,7 @@
222
224
  var logger = log4javascript.getLogger('j1.scroller.core');
223
225
  var _this = this;
224
226
 
225
- logger.debug('\n' + 'loading new posts');
227
+ isDev && logger.debug('loading new posts');
226
228
 
227
229
  // initialze loader flag
228
230
  if (this.itemsLoaded === false) return false;
@@ -232,7 +234,7 @@
232
234
 
233
235
  // display spinner while loading
234
236
  if (options.loadStatus) {
235
- logger.debug('\n' + 'show: spinner');
237
+ isDev && logger.debug('show: spinner');
236
238
  $('.loader-ellips').show();
237
239
  }
238
240
 
@@ -244,11 +246,11 @@
244
246
  var childItems = _this.getChildItemsByAjaxHTML(options, xmlhttp.responseText);
245
247
  _this.appendNewItems(childItems);
246
248
 
247
- logger.debug('\n' + 'loading new items: successful');
249
+ isDev && logger.debug('loading new items: successful');
248
250
 
249
251
  // hide the spinner after loading
250
252
  if (options.loadStatus) {
251
- logger.debug('\n' + 'hide: spinner');
253
+ isDev && logger.debug('hide: spinner');
252
254
  $('.loader-ellips').hide();
253
255
  }
254
256
 
@@ -258,17 +260,17 @@
258
260
  } else {
259
261
  // hide the spinner
260
262
  if (options.loadStatus) {
261
- logger.debug('\n' + 'hide: spinner');
263
+ isDev && logger.debug('hide: spinner');
262
264
  $('.loader-ellips').hide();
263
265
  }
264
266
 
265
- logger.error('\n' + 'loading new items failed, HTTP response: ' + xmlhttp.status );
267
+ isDev && logger.error('loading new items failed, HTTP response: ' + xmlhttp.status );
266
268
  _this.itemsLoaded = false;
267
269
  } // END if xmlhttp. tatus 200
268
270
  } // END if if xmlhttp readyState
269
271
  }; // END onreadystatechange
270
272
 
271
- logger.debug('\n' + 'loading new items from path: ' + options.pagePath + options.firstPage);
273
+ isDev && logger.debug('loading new items from path: ' + options.pagePath + options.firstPage);
272
274
  xmlhttp.open("GET", location.origin + options.pagePath + options.firstPage + '/index.html', true);
273
275
 
274
276
  xmlhttp.send();
@@ -282,7 +284,7 @@
282
284
  var logger = log4javascript.getLogger('j1.scroller.core');
283
285
  var newHTML = document.createElement('html');
284
286
 
285
- logger.debug('\n' + 'load new items');
287
+ isDev && logger.debug('load new items');
286
288
  newHTML.innerHTML = HTMLText;
287
289
  var childItems = newHTML.querySelectorAll(options.elementID + ' > *');
288
290
 
@@ -302,17 +304,17 @@
302
304
  items.forEach(function (item) {
303
305
  var elmID = _this.element.id
304
306
  document.getElementById(elmID).appendChild(item);
305
- logger.debug('\n' + 'new item appended');
307
+ isDev && logger.debug('new item appended');
306
308
  }); // END forEach
307
309
 
308
310
  // no dropcaps if translation enabled
309
311
  if (user_translate.translationEnabled) {
310
- logger.debug('\n' + 'translation enabled: ' + user_translate.translationEnabled);
311
- logger.debug('\n' + 'skipped processing of dropcaps');
312
+ isDev && logger.debug('translation enabled: ' + user_translate.translationEnabled);
313
+ isDev && logger.debug('skipped processing of dropcaps');
312
314
  } else {
313
315
  // initialize dropcaps
314
- logger.debug('\n' + 'post processing: createDropCap');
315
- j1.core.createDropCap();
316
+ isDev && logger.debug('post processing: createDropCap');
317
+ j1.api.createDropCap();
316
318
  } // END if translationEnabled
317
319
  }, // END appendNewItems
318
320
 
@@ -12,4 +12,5 @@
12
12
  # For details, see: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE
13
13
  # -----------------------------------------------------------------------------
14
14
  */
15
- !function(e,t,n,i){"use strict";var s={type:"infiniteScroll",scrollOffset:100,elementScroll:!1,firstPage:2,lastPage:!1,infoLastPage:!1,loadStatus:!1,onInit:function(){},onBeforeLoad:function(){},onAfterLoad:function(){}};function o(t,n){this.element=t,this.settings=e.extend({},s,n),this.settings.elementID="#"+this.element.id,this.init(this.settings)}e.extend(o.prototype,{init:function(n){var i=log4javascript.getLogger("j1.scroller.core"),s=this;i.debug("\ninitializing plugin: started"),i.debug("\nstate: started"),n.elementScroll?s.scroller=s.element:s.scroller=t;var o=setInterval(function(){var t="block"===e("#content").css("display");"finished"===j1.getState()&&t&&("infiniteScroll"===n.type&&(i.debug("\nprocessing mode: "+n.type),i.debug("\nloading items from path: "+n.pagePath),i.debug("\nmonitoring element set to: "+s.scroller),s.registerScrollEvent(n)),"showOnScroll"===n.type&&(i.debug("\nprocessing mode: "+n.type),i.debug("\nloading items from path: "+n.pagePath),i.debug("\nmonitoring element set to: "+s.scroller),s.registerScrollEvent(n)),i.debug("\ninitializing plugin: finished"),i.debug("\nstate: finished"),clearInterval(o))},25)},isInViewport:function(e,n){if(0!=e.length){var i=jQuery(t),s=i.scrollTop(),o=i.height(),r=s+o,l=jQuery(e),a=l.offset().top+n,d=l.height(),g=a+d;return a>=s&&a<r||g>s&&g<=r||d>o&&a<=s&&g>=r}},isBottomReached:function(i){var s,o=e(i.elementID).height();if(this.settings.elementScroll){var r=e(t),l=r.scrollTop(),a=r.height(),d=l+a-i.scrollOffset,g=e(i.elementID),c=g.offset().top+o,u=g.height();return s=c+u,c>=l&&c<d||s>l&&s<=d||u>a&&c<=l&&s>=d}return t.innerHeight+t.pageYOffset+i.scrollOffset>=n.body.offsetHeight},registerScrollEvent:function(n){var i=log4javascript.getLogger("j1.scroller.core"),s=this;"infiniteScroll"===n.type&&(s[n.id]=function(e){var n=s.settings;if(s.isBottomReached(n)){if(n.firstPage>n.lastPage)return t.removeEventListener("scroll",s[n.id]),i.debug("\nscroll event removed: "+n.type),n.infoLastPage&&(i.debug("\nshow last page info"),s.infoLastPage(n)),!1;s.getNewPost(n)}},t.addEventListener("scroll",s[n.id]),i.debug("\nscroll event registered: "+n.type)),"showOnScroll"===n.type&&(s[n.id]=function(o){s.isInViewport(e("#"+n.id),n.scrollOffset)&&(i.debug("\nspecified container is in view: "+n.id),e("."+n.id).show(n.showDelay),t.removeEventListener("scroll",s[n.id]),i.debug("\nscroll event showOnScroll: removed"))},t.addEventListener("scroll",s[n.id]),i.debug("\nscroll event registered: "+n.type))},getNewPost:function(t){var n=log4javascript.getLogger("j1.scroller.core"),i=this;if(n.debug("\nloading new posts"),!1===this.itemsLoaded)return!1;this.itemsLoaded=!1,t.loadStatus&&(n.debug("\nshow: spinner"),e(".loader-ellips").show());var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState==XMLHttpRequest.DONE)if(200==s.status){t.firstPage++;var o=i.getChildItemsByAjaxHTML(t,s.responseText);i.appendNewItems(o),n.debug("\nloading new items: successful"),t.loadStatus&&(n.debug("\nhide: spinner"),e(".loader-ellips").hide()),i.itemsLoaded=!0}else t.loadStatus&&(n.debug("\nhide: spinner"),e(".loader-ellips").hide()),n.error("\nloading new items failed, HTTP response: "+s.status),i.itemsLoaded=!1},n.debug("\nloading new items from path: "+t.pagePath+t.firstPage),s.open("GET",location.origin+t.pagePath+t.firstPage+"/index.html",!0),s.send()},getChildItemsByAjaxHTML:function(e,t){var i=log4javascript.getLogger("j1.scroller.core"),s=n.createElement("html");return i.debug("\nload new items"),s.innerHTML=t,s.querySelectorAll(e.elementID+" > *")},appendNewItems:function(e){var t=log4javascript.getLogger("j1.scroller.core"),i=this,s=j1.getCookieNames(),o=j1.readCookie(s.user_translate);e.forEach(function(e){var s=i.element.id;n.getElementById(s).appendChild(e),t.debug("\nnew item appended")}),o.translationEnabled?(t.debug("\ntranslation enabled: "+o.translationEnabled),t.debug("\nskipped processing of dropcaps")):(t.debug("\npost processing: createDropCap"),j1.core.createDropCap())},infoLastPage:function(t){var n=t.lastPageInfo;e(n).insertAfter(t.elementID),e(".page-scroll-last").show()}}),e.fn.scroller=function(t){return this.each(function(){e.data(this,"plugin_scroller")||e.data(this,"plugin_scroller",new o(this,t))})}}(jQuery,window,document);
15
+
16
+ !function(e,t,i,n){"use strict";const s="development"!==j1.env&&"dev"!==j1.env;var o="scroller",r={type:"infiniteScroll",scrollOffset:100,elementScroll:!1,firstPage:2,lastPage:!1,infoLastPage:!1,loadStatus:!1,onInit:function(){},onBeforeLoad:function(){},onAfterLoad:function(){}};function l(t,i){this.element=t,this.settings=e.extend({},r,i),this.settings.elementID="#"+this.element.id,this.init(this.settings)}e.extend(l.prototype,{init:function(i){var n=log4javascript.getLogger("j1.scroller.core"),o=this;s&&n.debug("initializing plugin: started"),s&&n.debug("state: started"),i.elementScroll?o.scroller=o.element:o.scroller=t;var r=setInterval((function(){var t="block"===e("#content").css("display");"finished"===j1.getState()&&t&&("infiniteScroll"===i.type&&(s&&n.debug("processing mode: "+i.type),s&&n.debug("loading items from path: "+i.pagePath),s&&n.debug("monitoring element set to: "+o.scroller),o.registerScrollEvent(i)),"showOnScroll"===i.type&&(s&&n.debug("processing mode: "+i.type),s&&n.debug("loading items from path: "+i.pagePath),s&&n.debug("monitoring element set to: "+o.scroller),o.registerScrollEvent(i)),s&&n.debug("initializing plugin: finished"),s&&n.debug("state: finished"),clearInterval(r))}),25)},isInViewport:function(e,i){if(0!=e.length){var n=jQuery(t),s=n.scrollTop(),o=n.height(),r=s+o,l=jQuery(e),a=l.offset().top+i,d=l.height(),g=a+d;return a>=s&&a<r||g>s&&g<=r||d>o&&a<=s&&g>=r}},isBottomReached:function(n){var s,o=e(n.elementID).height();if(this.settings.elementScroll){var r=e(t),l=r.scrollTop(),a=r.height(),d=l+a-n.scrollOffset,g=e(n.elementID),c=g.offset().top+o,u=g.height();return s=c+u,c>=l&&c<d||s>l&&s<=d||u>a&&c<=l&&s>=d}return t.innerHeight+t.pageYOffset+n.scrollOffset>=i.body.offsetHeight},registerScrollEvent:function(i){var n=log4javascript.getLogger("j1.scroller.core"),o=this;"infiniteScroll"===i.type&&(o[i.id]=function(e){var i=o.settings;if(o.isBottomReached(i)){if(i.firstPage>i.lastPage)return t.removeEventListener("scroll",o[i.id]),s&&n.debug("scroll event removed: "+i.type),i.infoLastPage&&(s&&n.debug("show last page info"),o.infoLastPage(i)),!1;o.getNewPost(i)}},t.addEventListener("scroll",o[i.id]),s&&n.debug("scroll event registered: "+i.type)),"showOnScroll"===i.type&&(o[i.id]=function(r){o.isInViewport(e("#"+i.id),i.scrollOffset)&&(s&&n.debug("specified container is in view: "+i.id),e("."+i.id).show(i.showDelay),t.removeEventListener("scroll",o[i.id]),s&&n.debug("scroll event showOnScroll: removed"))},t.addEventListener("scroll",o[i.id]),s&&n.debug("scroll event registered: "+i.type))},getNewPost:function(t){var i=log4javascript.getLogger("j1.scroller.core"),n=this;if(s&&i.debug("loading new posts"),!1===this.itemsLoaded)return!1;this.itemsLoaded=!1,t.loadStatus&&(s&&i.debug("show: spinner"),e(".loader-ellips").show());var o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState==XMLHttpRequest.DONE)if(200==o.status){t.firstPage++;var r=n.getChildItemsByAjaxHTML(t,o.responseText);n.appendNewItems(r),s&&i.debug("loading new items: successful"),t.loadStatus&&(s&&i.debug("hide: spinner"),e(".loader-ellips").hide()),n.itemsLoaded=!0}else t.loadStatus&&(s&&i.debug("hide: spinner"),e(".loader-ellips").hide()),s&&i.error("loading new items failed, HTTP response: "+o.status),n.itemsLoaded=!1},s&&i.debug("loading new items from path: "+t.pagePath+t.firstPage),o.open("GET",location.origin+t.pagePath+t.firstPage+"/index.html",!0),o.send()},getChildItemsByAjaxHTML:function(e,t){var n=log4javascript.getLogger("j1.scroller.core"),o=i.createElement("html");return s&&n.debug("load new items"),o.innerHTML=t,o.querySelectorAll(e.elementID+" > *")},appendNewItems:function(e){var t=log4javascript.getLogger("j1.scroller.core"),n=this,o=j1.getCookieNames(),r=j1.readCookie(o.user_translate);e.forEach((function(e){var o=n.element.id;i.getElementById(o).appendChild(e),s&&t.debug("new item appended")})),r.translationEnabled?(s&&t.debug("translation enabled: "+r.translationEnabled),s&&t.debug("skipped processing of dropcaps")):(s&&t.debug("post processing: createDropCap"),j1.api.createDropCap())},infoLastPage:function(t){var i=t.lastPageInfo;e(i).insertAfter(t.elementID),e(".page-scroll-last").show()}}),e.fn[o]=function(t){return this.each((function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new l(this,t))}))}}(jQuery,window,document);
@@ -79,13 +79,13 @@
79
79
  // ---------------------------------------------------------------------------
80
80
  ThemeSwitcher.prototype = {
81
81
  clear: function () {
82
- logger.debug('\n' + 'ThemeSwitcher.clear');
82
+ logger.debug('ThemeSwitcher.clear');
83
83
  return this.$element.each(function () {
84
84
  this.$element.empty();
85
85
  });
86
86
  },
87
87
  update: function () {
88
- logger.debug('\n' + 'ThemeSwitcher.update');
88
+ logger.debug('ThemeSwitcher.update');
89
89
  this.getThemes();
90
90
  },
91
91
 
@@ -126,13 +126,13 @@
126
126
  // detect|set user state cookie
127
127
  user_state_detected = j1.existsCookie (cookie_names.user_state);
128
128
  if ( user_state_detected ) {
129
- logger.info('\n' + 'cookie found: ' + cookie_names.user_state);
129
+ logger.info('cookie found: ' + cookie_names.user_state);
130
130
  user_state = j1.readCookie(cookie_names.user_state);
131
131
  } else {
132
- logger.error('\n' + 'cookie not found: ' + cookie_names.user_state);
133
- logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
132
+ logger.error('cookie not found: ' + cookie_names.user_state);
133
+ logger.info('j1 cookies found:' + j1Cookies.length);
134
134
  j1Cookies.forEach(function (item) {console.log('j1.themes.switcher: ' + item);});
135
- logger.info('\n' + 'ga cookies found:' + gaCookies.length);
135
+ logger.info('ga cookies found:' + gaCookies.length);
136
136
  gaCookies.forEach(function (item) {console.log('j1.themes.switcher: ' + item);});
137
137
  }
138
138
 
@@ -146,7 +146,7 @@
146
146
  if (settings.saveToCookie) {
147
147
  if ( typeof Cookies === 'undefined' ) {
148
148
  if ( debug === 'true' ) {
149
- logger.error('\n' + 'cookies library not present');
149
+ logger.error('cookies library not present');
150
150
  }
151
151
  return false;
152
152
  }
@@ -162,7 +162,7 @@
162
162
  user_state.theme_author_url = 'https://jekyll.one/';
163
163
  }
164
164
 
165
- logger.info('\n' + 'write to cookie : ' + cookie_names.user_state);
165
+ logger.info('write to cookie : ' + cookie_names.user_state);
166
166
  j1.writeCookie({
167
167
  name: cookie_names.user_state,
168
168
  data: user_state,
@@ -173,8 +173,8 @@
173
173
  // reload current page (skip cache)
174
174
  location.reload(true);
175
175
  } else {
176
- logger.info('\n' + 'write to cookie : disabled');
177
- logger.warn('\n' + 'selected theme not activated: ' + name);
176
+ logger.info('write to cookie : disabled');
177
+ logger.warn('selected theme not activated: ' + name);
178
178
  } // END if saveToCookie
179
179
 
180
180
  }, // END switchTheme
@@ -185,7 +185,7 @@
185
185
  loadThemeFromCookie: function (options) {
186
186
 
187
187
  if ( typeof Cookies === 'undefined' ) {
188
- logger.error('\n' + 'cookies library not present');
188
+ logger.error('cookies library not present');
189
189
  return false;
190
190
  }
191
191
 
@@ -195,13 +195,13 @@
195
195
  user_state_detected = j1.existsCookie (cookie_names.user_state);
196
196
 
197
197
  if ( user_state_detected ) {
198
- logger.info('\n' + 'cookie found: ' + cookie_names.user_state);
198
+ logger.info('cookie found: ' + cookie_names.user_state);
199
199
  user_state = j1.readCookie(cookie_names.user_state);
200
200
  } else {
201
- logger.error('\n' + 'cookie not found: ' + cookie_names.user_state);
202
- logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
201
+ logger.error('cookie not found: ' + cookie_names.user_state);
202
+ logger.info('j1 cookies found:' + j1Cookies.length);
203
203
  j1Cookies.forEach(function (item) {console.log('j1.themes.switcher: ' + item);});
204
- logger.info('\n' + 'ga cookies found:' + gaCookies.length);
204
+ logger.info('ga cookies found:' + gaCookies.length);
205
205
  gaCookies.forEach(function (item) {console.log('j1.themes.switcher: ' + item);});
206
206
  }
207
207
 
@@ -226,11 +226,11 @@
226
226
  // -------------------------------------------------------------------------
227
227
  addThemesToControl: function () {
228
228
  if (typeof this.$element === 'undefined') {
229
- logger.error('\n' + 'bootstrapThemeSelector|addThemesToControl: Element is undefined');
229
+ logger.error('bootstrapThemeSelector|addThemesToControl: Element is undefined');
230
230
  return false;
231
231
  }
232
232
  if (typeof this.themesList === 'undefined') {
233
- logger.error('\n' + 'bootstrapThemeSelector|addThemesToControl: Themes is undefined');
233
+ logger.error('bootstrapThemeSelector|addThemesToControl: Themes is undefined');
234
234
  return false;
235
235
  }
236
236
 
@@ -268,20 +268,20 @@
268
268
  // detect|set user state cookie
269
269
  user_state_detected = j1.existsCookie (cookie_names.user_state);
270
270
  if ( user_state_detected ) {
271
- logger.info('\n' + 'user state cookie found');
271
+ logger.info('user state cookie found');
272
272
  user_state = j1.readCookie(cookie_names.user_state);
273
273
  } else {
274
- logger.error('\n' + 'user state NOT cookie found');
275
- logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
274
+ logger.error('user state NOT cookie found');
275
+ logger.info('j1 cookies found:' + j1Cookies.length);
276
276
  j1Cookies.forEach(function (item) {console.log('j1.themes.switcher: ' + item);});
277
- logger.info('\n' + 'ga cookies found:' + gaCookies.length);
277
+ logger.info('ga cookies found:' + gaCookies.length);
278
278
  gaCookies.forEach(function (item) {console.log('j1.themes.switcher: ' + item);});
279
279
  }
280
280
 
281
281
  themeName = user_state.theme_name;
282
282
 
283
283
  if ( debug === 'true' ) {
284
- logger.info('\n' + 'bootstrapThemeSelector: UL element selected');
284
+ logger.info('bootstrapThemeSelector: UL element selected');
285
285
  }
286
286
  this.$element.empty();
287
287
 
@@ -328,7 +328,7 @@
328
328
 
329
329
  // END if element is 'ul'
330
330
  } else if (this.$element.is('select')) {
331
- logger.info('\n' + 'bootstrapThemeSelector: SELECT element selected');
331
+ logger.info('bootstrapThemeSelector: SELECT element selected');
332
332
  this.$element.empty();
333
333
 
334
334
  var optionSelectedMarker;
@@ -350,8 +350,8 @@
350
350
  // END if element is 'select'
351
351
  } else {
352
352
  // no container found to add Theme list
353
- logger.info('\n' + 'bootstrapThemeSelector: no UL or SELECT element found');
354
- logger.error('\n' + 'bootstrapThemeSelector: failed');
353
+ logger.info('bootstrapThemeSelector: no UL or SELECT element found');
354
+ logger.error('bootstrapThemeSelector: failed');
355
355
  // console.warn('bootstrapThemeSelector only works with ul or select elements');
356
356
  } // END if
357
357
  }, // END addThemesToControl
@@ -363,36 +363,37 @@
363
363
  var base = this;
364
364
 
365
365
  if (this.settings.localFeed !== null && this.settings.localFeed !== '') {
366
- // Deferred loading themes from local themes (json file)
366
+ // Deferred loading themes (feed) from LOCAL: theme file (JSON file)
367
+ // ---------------------------------------------------------------------
367
368
  $.ajax({
368
369
  url: this.settings.localFeed,
369
- // jadams 2016-10-10: removed the setting for sychronous XMLHttpRequest
370
- // async: false,
371
370
  dataType: 'json',
372
371
  success: function (data) {
373
372
  base.themesList = data.themes;
374
373
  base.addThemesToControl();
375
374
  },
376
375
  error: function (jqXHR, textStatus, errorThrown) {
377
- logger.error('\n' + 'failed to retrieve the local feed from: \'' + base.settings.localFeed + '\'');
376
+ logger.error('failed to retrieve the LOCAL feed from: ' + this.settings.localFeed);
378
377
  }
379
378
  });
380
379
  } else {
381
- // Deferred loading remote themes from Bootswatch API
382
- // -----------------------------------------------------------------------
380
+ // Deferred loading themes (feed) from REMOTE: Bootswatch API (JSON file)
381
+ // ---------------------------------------------------------------------
382
+ var bootswatchApiJson = `${this.settings.bootswatchApiUrl}/${this.settings.bootswatchApiVersion}.json`;
383
383
  $.ajax({
384
- url: this.settings.bootswatchApiUrl + '/' + this.settings.bootswatchApiVersion + '.json',
385
- // jadams 2016-10-10: removed the setting for sychronous XMLHttpRequest
386
- // async: false,
387
- dataType: 'json',
388
- success: function (data) {
384
+ url: bootswatchApiJson,
385
+ dataType: 'json',
386
+ success: function (data) {
389
387
  if (typeof data.themes === 'undefined') {
390
388
  return null;
391
389
  }
392
390
  base.themesList = data.themes;
393
391
  base.themesList.splice(0,0, {name: 'default', css: base.settings.defaultCssFile});
394
392
  base.addThemesToControl();
395
- }
393
+ },
394
+ error: function (jqXHR, textStatus, errorThrown) {
395
+ logger.error('failed to retrieve the REMOTE feed from: ' + bootswatchApiJson);
396
+ }
396
397
  });
397
398
  }
398
399
  }, // END getThemes