1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function($,Drupal){Drupal.behaviors.mw_photoswipe={attach:function(context,settings){once('mw_photoswipe',context.querySelectorAll('.photoswipe-me')).forEach(function(element,index){$('body').append('<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button><button class="pswp__button pswp__button--share" title="Share"></button><button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button><button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div> </div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button><button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>');var pswpElement=document.querySelectorAll('.pswp')[0];var items=$('a:has(> .image-style-gallery-item)',element).map(function(){return {src:$(this).attr('href'),w:$(this).attr('data-width')||0,h:$(this).attr('data-height')||0};}).get();console.log(items);var options={showHideOpacity:true,bgOpacity:0.9,shareEl:false};function openGallery(){var gallery=new PhotoSwipe(pswpElement,PhotoSwipeUI_Default,items,options);gallery.listen('gettingData',function(index,item){if(item.html===undefined&&item.onloading===undefined&&(item.w<1||item.h<1)){item.onloading=true;var img=new Image();img.onload=function(){item.w=this.width;item.h=this.height;gallery.invalidateCurrItems();gallery.updateSize(true);};img.src=item.src;}});gallery.init();}var $image_style_gallery_item=$('a:has(> .image-style-gallery-item)',element);$image_style_gallery_item.click(function(event){options.index=$image_style_gallery_item.index(this);openGallery();event.preventDefault();});var parameters={};$.each(window.location.hash.substring(1).split('&'),function(key,value){if(value){var parameter=value.split('=');parameters[parameter[0]]=parameter[1];}});if(parameters.hasOwnProperty('gid')&¶meters.hasOwnProperty('pid')){options.index=parseInt(parameters.pid,10);openGallery();}});}};})(jQuery,Drupal);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.