PageSourceSearch

https://sweettntmagazine.com/_jb_static/??284760190a

js sweettntmagazine.com collected 2026-10-02 05:04:34 UTC 43,167 bytes, 180 lines download raw bytes

1(()=>{var e={37613(){},11775(){},72856(e,t,s){"use strict";s.d(t,{to:()=>i,u1:()=>n});let r="";function o(e){if("https://subscribe.wordpress.com"===e.origin&&e.data){let t=e.data;if("string"==typeof t)try{t=JSON.parse(t)}catch{return}if(t&&t.result&&t.result.jwt_token&&(r=t.result.jwt_token,c(r)),t&&"close"===t.action&&r)window.location.reload(!0);else if(t&&"close"===t.action){window.removeEventListener("message",o);document.getElementById("memberships-modal-window").close(),document.body.classList.remove("jetpack-memberships-modal-open")}}}function i(e){return new Promise(t=>{const s=document.getElementById("memberships-modal-window");s&&document.body.removeChild(s);const r=document.createElement("dialog");r.setAttribute("id","memberships-modal-window"),r.classList.add("jetpack-memberships-modal"),r.classList.add("is-loading");const i=document.createElement("iframe");i.setAttribute("frameborder","0"),i.setAttribute("allowtransparency","true"),i.setAttribute("allowfullscreen","true"),i.setAttribute("allow","payment *"),i.addEventListener("load",function(){document.body.classList.add("jetpack-memberships-modal-open"),r.classList.remove("is-loading"),t()}),i.setAttribute("id","memberships-modal-iframe"),i.innerText="This feature requires inline frames. You have iframes disabled or your browser does not support them.",i.src=e+"&display=alternate&jwt_token="+a();const n=document.querySelector('input[name="lang"]')?.value;n&&(i.src=i.src+"&lang="+encodeURIComponent(n)),document.body.appendChild(r),r.appendChild(i),window.addEventListener("message",o,!1),r.showModal()})}const n='<span class="jetpack-memberships-spinner">\t<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\t\t<path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25" fill="currentColor" />\t\t<path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="jetpack-memberships-spinner-rotating" fill="currentColor" />\t</svg></span>';const a=function(){const e=`; ${document.cookie}`.split("; wp-jp-premium-content-session=");if(2===e.length)return e.pop().split(";").shift()},c=function(e){const t=new Date,s=new Date(t.setMonth(t.getMonth()+1));document.cookie=`wp-jp-premium-content-session=${e}; expires=${s.toGMTString()}; path=/`}},79366(e,t,s){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(s.p=window.Jetpack_Block_Assets_Base_Url)},98490(e){"use strict";e.exports=window.wp.domReady}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../"})(),(()=>{"use strict";s(79366)})(),(()=>{"use strict";s(37613),s(11775);var e=s(98490),t=s.n(e),r=s(72856);function o(e){const t="https://subscribe.wordpress.com/memberships/?"+new URLSearchParams(e).toString();return(0,r.to)(t)}t()(function(){const e=document.querySelector("#jp_retrieve_subscriptions_link");e&&e.addEventListener("click",function(e){e.preventDefault(),function(){const e=document.querySelector(".wp-block-jetpack-subscriptions__container form");if(!e)return;if(!e.checkValidity())return void e.reportValidity();o({email:e.querySelector('input[type="email"]').value,blog:e.dataset.blog,plan:"newsletter",source:"jetpack_retrieve_subscriptions",post_access_level:e.dataset.post_access_level,display:"alternate"})}()});document.querySelectorAll(".wp-block-jetpack-subscriptions__container form").forEach(e
1=>{if(!e.payments_attached){e.payments_attached=!0;const t=e.querySelector('button[type="submit"]');t.insertAdjacentHTML("beforeend",r.u1),e.addEventListener("submit",function(s){if(e.resubmitted)return;t.classList.add("is-loading"),t.setAttribute("aria-busy","true"),t.setAttribute("aria-live","polite");let r=e.querySelector('input[type="email"]')?.value??"";!r&&e.dataset.subscriber_email&&(r=e.dataset.subscriber_email);if("subscribe"===e.querySelector("input[name=action]").value){s.preventDefault();const i=e.querySelector("input[name=post_id]")?.value??"",n=e.querySelector("input[name=tier_id]")?.value??"",a=e.querySelector("input[name=app_source]")?.value??"",c=e.querySelector("input[name=selected_newsletter_categories]")?.value??"";o({email:r,post_id:i,tier_id:n,blog:e.dataset.blog,plan:"newsletter",source:"jetpack_subscribe",app_source:a,post_access_level:e.dataset.post_access_level,display:"alternate",selected_newsletter_categories:c}).then(()=>{e.dispatchEvent(new Event("subscription-modal-loaded")),t.classList.remove("is-loading"),t.setAttribute("aria-busy","false")})}})}})})})()})();
2(function(){'use strict';var swiper;var util=(function(){var noop=function(){};function texturize(text){text=text+'';text=text.replace(/'/g,'&#8217;').replace(/&#039;/g,'&#8217;');text=text.replace(/"/g,'&#8221;').replace(/&#034;/g,'&#8221;').replace(/&quot;/g,'&#8221;').replace(/[\u201D]/g,'&#8221;');text=text.replace(/([\w]+)=&#[\d]+;(.+?)&#[\d]+;/g,'$1="$2"');return text.trim()}
3function applyReplacements(text,replacements){if(!text){return}
4if(!replacements){return text}
5return text.replace(/{(\d+)}/g,function(match,number){return typeof replacements[number]!=='undefined'?replacements[number]:match})}
6function getBackgroundImage(imgEl){var canvas=document.createElement('canvas'),context=canvas.getContext&&canvas.getContext('2d');if(!imgEl){return}
7context.filter='blur(20px) ';context.drawImage(imgEl,0,0);var url=canvas.toDataURL('image/png');canvas=null;return url}
8return{noop:noop,texturize:texturize,applyReplacements:applyReplacements,getBackgroundImage:getBackgroundImage,}})();var domUtil=(function(){function matches(el,sel){if(Element.prototype.matches){return el.matches(sel)}
9if(Element.prototype.msMatchesSelector){return el.msMatchesSelector(sel)}}
10function closest(el,sel){if(el.closest){return el.closest(sel)}
11var current=el;do{if(matches(current,sel)){return current}
12current=current.parentElement||current.parentNode}while(current!==null&&current.nodeType===1);return null}
13function hide(el){if(el){el.style.display='none'}}
14function show(el){if(el){el.style.display='block'}}
15function fade(el,start,end,callback){if(!el){return callback()}
16if(el.jpCarouselCancelFade){el.jpCarouselCancelFade()}
17el.classList.remove('jp-carousel-fade');el.style.removeProperty('display');el.style.opacity=start;el.style.pointerEvents='none';void el.offsetWidth;el.classList.add('jp-carousel-fade');el.style.opacity=end;var duration=parseFloat(getComputedStyle(el).transitionDuration)*1000||0;var timer=setTimeout(function(){el.jpCarouselCancelFade=null;el.style.removeProperty('pointer-events');callback()},duration+50);el.jpCarouselCancelFade=function(){clearTimeout(timer);el.jpCarouselCancelFade=null}}
18function fadeIn(el,callback){callback=callback||util.noop;fade(el,0,1,callback)}
19function fadeOut(el,callback){callback=callback||util.noop;fade(el,1,0,function(){if(el){el.style.display='none'}
20callback()})}
21function emitEvent(el,type,detail){var e;try{e=new CustomEvent(type,{bubbles:!0,cancelable:!0,detail:detail||null,})}catch{e=document.createEvent('CustomEvent');e.initCustomEvent(type,!0,!0,detail||null)}
22el.dispatchEvent(e)}
23function easeInOutQuad(num){return num<0.5?2*num*num:1-Math.pow(-2*num+2,2)/2}
24function getFooterClearance(container){var footer=container.querySelector('.jp-carousel-info-footer');var infoArea=container.querySelector('.jp-carousel-info-extra');var contentArea=container.querySelector('.jp-carousel-info-content-wrapper');if(footer&&infoArea&&contentArea){var styles=window.getComputedStyle(infoArea);var padding=parseInt(styles.paddingTop,10)+parseInt(styles.paddingBottom,10);padding=isNaN(padding)?0:padding;return contentArea.offsetHeight+footer.offsetHeight+padding}
25return 0}
26function isTouch(){return('ontouchstart' in window||(window.DocumentTouch&&document instanceof DocumentTouch))}
27function scrollToElement(el,container,callback){if(!el||!container){if(callback){return callback()}
28return}
29var infoArea=container.querySelector('.jp-carousel-info-extra');if(infoArea){infoArea.style.minHeight=window.innerHeight-64+'px'}
30var isScrolling=!0;var startTime=Date.now();var duration=300;var originalPosition=container.scrollTop;var targetPosition=Math.max(0,el.offsetTop-Math.max(0,window.innerHeight-getFooterClearance(container)));var distance=targetPosition-container.scrollTop;distance=Math.min(distance,container.scrollHeight-window.innerHeight);function stopScroll(){isScrolling=!1}
31function runScroll(){var now=Date.now();var progress=easeInOutQuad((now-startTime)/duration);progress=progress>1?1:progress;var newVal=progress*distance;container.scrollTop=originalPosition+newVal;if(now<=startTime+duration&&isScrolling){return requestAnimationFrame(runScroll)}
32if(callback){callback()}
33if(infoArea){infoArea.style.minHeight=''}
34isScrolling=!1;container.removeEventListener('wheel',stopScroll)}
35container.addEventListener('wheel',stopScroll);runScroll()}
36function getJSONAttribute(el,attr){if(!el||!el.hasAttribute(attr)){return undefined}
37try{return JSON.parse(el.getAttribute(attr))}catch{return undefined}}
38function convertToPlainText(html){var dummy=document.createElement('div');dummy.textContent=html;return dummy.innerHTML}
39function stripHTML(text){var tmp=document.createElement('div');tmp.innerHTML=text.replace(/<[^>]*>?/gm,'');return tmp.textContent}
40return{closest:closest,matches:matches,hide:hide,show:show,fadeIn:fadeIn,fadeOut:fadeOut,scrollToElement:scrollToElement,getJSONAttribute:getJSONAttribute,convertToPlainText:convertToPlainText,stripHTML:stripHTML,emitEvent:emitEvent,isTouch:isTouch,}}
40)();function init(){var commentInterval;var screenPadding;var originalOverflow;var originalHOverflow;var scrollPos;var lastKnownLocationHash='';var isUserTyping=!1;var gallerySelector='div.gallery, div.tiled-gallery, ul.wp-block-gallery, ul.blocks-gallery-grid, '+'figure.wp-block-gallery.has-nested-images, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery';var galleryItemSelector='.gallery-item, .tiled-gallery-item, .blocks-gallery-item, '+' .tiled-gallery__item';var itemSelector=galleryItemSelector+', .wp-block-image';var carousel={};var stat=typeof wpcom!=='undefined'&&wpcom.carousel&&wpcom.carousel.stat?wpcom.carousel.stat:util.noop;var pageview=typeof wpcom!=='undefined'&&wpcom.carousel&&wpcom.carousel.pageview?wpcom.carousel.pageview:util.noop;function handleKeyboardEvent(e){if(!isUserTyping){switch(e.which){case 38:e.preventDefault();carousel.overlay.scrollTop-=100;break;case 40:e.preventDefault();carousel.overlay.scrollTop+=100;break;case 39:e.preventDefault();swiper.slideNext();break;case 37:case 8:e.preventDefault();swiper.slidePrev();break;case 27:e.preventDefault();closeCarousel();break;default:break}}}
41function disableKeyboardNavigation(){isUserTyping=!0}
42function enableKeyboardNavigation(){isUserTyping=!1}
43function calculatePadding(){var baseScreenPadding=110;screenPadding=baseScreenPadding;if(window.innerWidth<=760){screenPadding=Math.round((window.innerWidth/760)*baseScreenPadding);if(screenPadding<40&&domUtil.isTouch()){screenPadding=0}}}
44function makeGalleryImageAccessible(img){img.role='button';img.tabIndex=0;img.ariaLabel=jetpackCarouselStrings.image_label}
45function initializeCarousel(){if(!carousel.overlay){carousel.overlay=document.querySelector('.jp-carousel-overlay');carousel.container=carousel.overlay.querySelector('.jp-carousel-wrap');carousel.gallery=carousel.container.querySelector('.jp-carousel');carousel.info=carousel.overlay.querySelector('.jp-carousel-info');carousel.caption=carousel.info.querySelector('.jp-carousel-caption');carousel.commentField=carousel.overlay.querySelector('#jp-carousel-comment-form-comment-field');carousel.emailField=carousel.overlay.querySelector('#jp-carousel-comment-form-email-field');carousel.authorField=carousel.overlay.querySelector('#jp-carousel-comment-form-author-field');carousel.urlField=carousel.overlay.querySelector('#jp-carousel-comment-form-url-field');calculatePadding();[carousel.commentField,carousel.emailField,carousel.authorField,carousel.urlField,].forEach(function(field){if(field){field.addEventListener('focus',disableKeyboardNavigation);field.addEventListener('blur',enableKeyboardNavigation)}});carousel.overlay.addEventListener('click',function(e){var target=e.target;var isTargetCloseHint=!!domUtil.closest(target,'.jp-carousel-close-hint');var isSmallScreen=!!window.matchMedia('(max-device-width: 760px)').matches;if(target===carousel.overlay){if(!isSmallScreen){closeCarousel()}}else if(isTargetCloseHint){closeCarousel()}else if(target.classList.contains('jp-carousel-image-download')){stat('download_original_click')}else if(target.classList.contains('jp-carousel-comment-login')){handleCommentLoginClick(e)}else if(domUtil.closest(target,'#jp-carousel-comment-form-container')){handleCommentFormClick(e)}else if(domUtil.closest(target,'.jp-carousel-photo-icons-container')||target.classList.contains('jp-carousel-photo-title')){handleFooterElementClick(e)}});window.addEventListener('keydown',handleKeyboardEvent);carousel.overlay.addEventListener('jp_carousel.afterOpen',function(){enableKeyboardNavigation();if(carousel.slides.length<=1){return}
46if(carousel.slides.length<=5){domUtil.show(carousel.info.querySelector('.jp-swiper-pagination'))}else{domUtil.show(carousel.info.querySelector('.jp-carousel-pagination'))}});carousel.overlay.addEventListener('jp_carousel.beforeClose',function(){disableKeyboardNavigation();document.documentElement.style.removeProperty('height');if(swiper){swiper.enable()}
47domUtil.hide(carousel.info.querySelector('.jp-swiper-pagination'));domUtil.hide(carousel.info.querySelector('.jp-carousel-pagination'))});carousel.overlay.addEventListener('jp_carousel.afterClose',function(){if(window.history.pushState){history.pushState('',document.title,window.location.pathname+window.location.search)}else{window.location.href=''}
48lastKnownLocationHash='';carousel.isOpen=!1});carousel.overlay.addEventListener('touchstart',function(e){if(e.touches.length>1){e.preventDefault()}})}}
49function handleCommentLoginClick(){var slide=carousel.currentSlide;var attachmentId=slide?slide.attrs.attachmentId:'0';window.location.href=jetpackCarouselStrings.login_url+'%23jp-carousel-'+attachmentId}
50function updatePostResults(msg,isSuccess){var results=carousel.overlay.querySelector('#jp-carousel-comment-post-results');var elClass='jp-carousel-comment-post-'+(isSuccess?'success':'error');results.innerHTML='<span class="'+elClass+'">'+msg+'</span>';domUtil.hide(carousel.overlay.querySelector('#jp-carousel-comment-form-spinner'));carousel.overlay.querySelector('#jp-carousel-comment-form').classList.remove('jp-carousel-is-disabled');domUtil.show(results)}
51function handleCommentFormClick(e){var target=e.target;var data=domUtil.getJSONAttribute(carousel.container,'data-carousel-extra')||{};var attachmentId=carousel.currentSlide.attrs.attachmentId;var wrapper=document.querySelector('#jp-carousel-comment-form-submit-and-info-wrapper');var spinner=document.querySelector('#jp-carousel-comment-form-spinner');var submit=document.querySelector('#jp-carousel-comment-form-button-submit');var form=document.querySelector('#jp-carousel-comment-form');if(carousel.commentField&&carousel.commentField.getAttribute('id')===target.getAttribute('id')){disableKeyboardNavigation();domUtil.show(wrapper)}else if(domUtil.matches(target,'input[type="submit"]')){e.preventDefault();e.stopPropagation();domUtil.show(spinner);form.classList.add('jp-carousel-is-disabled');var ajaxData={action:'post_attachment_comment',nonce:jetpackCarouselStrings.nonce,blog_id:data.blog_id,id:attachmentId,comment:carousel.commentField.value,};if(!ajaxData.comment.length){updatePostResults(jetpackCarouselStrings.no_comment_text,!1);return}
52if(Number(jetpackCarouselStrings.is_logged_in)!==1){ajaxData.email=carousel.emailField.value;
52ajaxData.author=carousel.authorField.value;ajaxData.url=carousel.urlField.value;if(Number(jetpackCarouselStrings.require_name_email)===1){if(!ajaxData.email.length||!ajaxData.email.match('@')){updatePostResults(jetpackCarouselStrings.no_comment_email,!1);return}else if(!ajaxData.author.length){updatePostResults(jetpackCarouselStrings.no_comment_author,!1);return}}}
53var xhr=new XMLHttpRequest();xhr.open('POST',jetpackCarouselStrings.ajaxurl,!0);xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');xhr.onreadystatechange=function(){if(this.readyState===XMLHttpRequest.DONE&&this.status>=200&&this.status<300){var response;try{response=JSON.parse(this.response)}catch{updatePostResults(jetpackCarouselStrings.comment_post_error,!1);return}
54if(response.comment_status==='approved'){updatePostResults(jetpackCarouselStrings.comment_approved,!0)}else if(response.comment_status==='unapproved'){updatePostResults(jetpackCarouselStrings.comment_unapproved,!0)}else{updatePostResults(jetpackCarouselStrings.comment_post_error,!1)}
55clearCommentTextAreaValue();fetchComments(attachmentId);submit.value=jetpackCarouselStrings.post_comment;domUtil.hide(spinner);form.classList.remove('jp-carousel-is-disabled')}else{updatePostResults(jetpackCarouselStrings.comment_post_error,!1)}};var params=[];for(var item in ajaxData){if(item){var encoded=encodeURIComponent(item)+'='+encodeURIComponent(ajaxData[item]);params.push(encoded.replace(/%20/g,'+'))}}
56var encodedData=params.join('&');xhr.send(encodedData)}}
57function handleFooterElementClick(e){e.preventDefault();var target=e.target;var extraInfoContainer=carousel.info.querySelector('.jp-carousel-info-extra');var photoMetaContainer=carousel.info.querySelector('.jp-carousel-image-meta');var commentsContainer=carousel.info.querySelector('.jp-carousel-comments-wrapper');var infoIcon=carousel.info.querySelector('.jp-carousel-icon-info');var commentsIcon=carousel.info.querySelector('.jp-carousel-icon-comments');function handleInfoToggle(){if(commentsIcon){commentsIcon.classList.remove('jp-carousel-selected')}
58infoIcon.classList.toggle('jp-carousel-selected');if(commentsContainer){commentsContainer.classList.remove('jp-carousel-show')}
59if(photoMetaContainer){photoMetaContainer.classList.toggle('jp-carousel-show');if(photoMetaContainer.classList.contains('jp-carousel-show')){extraInfoContainer.classList.add('jp-carousel-show')}else{extraInfoContainer.classList.remove('jp-carousel-show')}}}
60function handleCommentToggle(){if(infoIcon){infoIcon.classList.remove('jp-carousel-selected')}
61commentsIcon.classList.toggle('jp-carousel-selected');if(photoMetaContainer){photoMetaContainer.classList.remove('jp-carousel-show')}
62if(commentsContainer){commentsContainer.classList.toggle('jp-carousel-show');if(commentsContainer.classList.contains('jp-carousel-show')){extraInfoContainer.classList.add('jp-carousel-show')}else{extraInfoContainer.classList.remove('jp-carousel-show')}}}
63if(domUtil.closest(target,'.jp-carousel-icon-info')||target.classList.contains('jp-carousel-photo-title')){if(photoMetaContainer&&photoMetaContainer.classList.contains('jp-carousel-show')){domUtil.scrollToElement(carousel.overlay,carousel.overlay,handleInfoToggle)}else{handleInfoToggle();domUtil.scrollToElement(carousel.info,carousel.overlay)}}
64if(domUtil.closest(target,'.jp-carousel-icon-comments')){if(commentsContainer&&commentsContainer.classList.contains('jp-carousel-show')){domUtil.scrollToElement(carousel.overlay,carousel.overlay,handleCommentToggle)}else{handleCommentToggle();domUtil.scrollToElement(carousel.info,carousel.overlay)}}}
65function processSingleImageGallery(){var images=document.querySelectorAll('a img[data-attachment-id]');Array.prototype.forEach.call(images,function(image){var link=image.parentElement;var container=link.parentElement;if(container.classList.contains('gallery-icon')){return}
66if(domUtil.closest(container,galleryItemSelector)){return}
67if(!link.hasAttribute('href')){return}
68var valid=!1;if(link.getAttribute('href').split('?')[0]===image.getAttribute('data-orig-file').split('?')[0]&&Number(jetpackCarouselStrings.single_image_gallery_media_file)===1){valid=!0}
69if(link.getAttribute('href')===image.getAttribute('data-permalink')){valid=!0}
70if(!valid){return}
71makeGalleryImageAccessible(image);link.classList.add('single-image-gallery');link.setAttribute('data-carousel-extra',JSON.stringify({blog_id:Number(jetpackCarouselStrings.blog_id),}))})}
72function testForData(el){return!!(el&&el.getAttribute('data-carousel-extra'))}
73function openOrSelectSlide(gal,index){if(!carousel.isOpen){loadSwiper(gal,{startIndex:index})}else{selectSlideAtIndex(index);swiper.slideTo(index+1)}}
74function selectSlideAtIndex(index){if(!index||index<0||index>carousel.slides.length){index=0}
75carousel.currentSlide=carousel.slides[index];var current=carousel.currentSlide;var attachmentId=current.attrs.attachmentId;loadFullImage(carousel.slides[index]);preloadAdjacentImages(index);if(Number(jetpackCarouselStrings.display_background_image)===1&&!carousel.slides[index].backgroundImage){loadBackgroundImage(carousel.slides[index])}
76domUtil.hide(carousel.caption);updateTitleCaptionAndDesc({caption:current.attrs.caption,title:current.attrs.title,desc:current.attrs.desc,});var imageMeta=carousel.slides[index].attrs.imageMeta;updateExif(imageMeta);updateFullSizeLink(current);if(Number(jetpackCarouselStrings.display_comments)===1){testCommentsOpened(carousel.slides[index].attrs.commentsOpened);fetchComments(attachmentId);domUtil.hide(carousel.info.querySelector('#jp-carousel-comment-post-results'))}
77var pagination=carousel.info.querySelector('.jp-carousel-pagination');if(pagination&&carousel.slides.length>5){var currentPage=index+1;pagination.innerHTML='<span>'+currentPage+' / '+carousel.slides.length+'</span>'}
78if(jetpackCarouselStrings.stats&&carousel.isOpen){new Image().src=document.location.protocol+'//pixel.wp.com/g.gif?'+jetpackCarouselStrings.stats+'&post='+encodeURIComponent(attachmentId)+'&rand='+Math.random()}
79if(carousel.isOpen){pageview(attachmentId)}
80lastKnownLocationHash='#jp-carousel-'+attachmentId;window.location.hash=lastKnownLocationHash}
81function restoreScroll(){window.scrollTo(window.scrollX||window.pageXOffset||0,scrollPos||0)}
82function closeCarousel(){document.body.style.overflow=originalOverflow;document.documentElement.style.overflow=originalHOverflow;clearCommentTextAreaValue();disableKeyboardNavigation();domUtil.emitEvent(carousel.overlay,'jp_carousel.beforeClose');restoreScroll();carousel.isOpen=!1;swiper.destroy();carousel.slides=[];carousel.currentSlide=undefined;carousel.gallery.innerHTML='';domUtil.fadeOut(carousel.overlay,function(){domUtil.emitEvent(carousel.overlay,'jp_carousel.afterClose')})}
83function calculateMaxSlideDimensions(){return{width:window.innerWidth,height:window.innerHeight-64,}}
84function sanitizePhotonUrl(url){var urlObj;try{urlObj=new URL(url)}catch(e){return url}
85var whitelistedPhotonArgs=['quality','ssl','filter','brightness','contrast','colorize','smooth',];var searchParams=Array.from(urlObj.searchParams.entries());urlObj.search='';searchParams.forEach(([key,value])=>{if(whitelistedPhotonArgs.includes(key)){urlObj.searchParams.append(key,value)}});return urlObj}
86function selectBestImageUrl(args){if(typeof args!=='object'){args={}}
87if(typeof args.origFile==='undefined'){return''}
88if(typeof args.origWidth==='undefined'||typeof args.maxWidth==='undefined'){return args.origFile}
89if(!args.largeFile){return args.origFile}
90var imageLinkParser=document.createElement('a');imageLinkParser.href=args.largeFile;var isPhotonUrl=/^i[0-2]\.wp\.com$/i.test(imageLinkParser.hostname);var largeSizeParts=getImageSizeParts(args.largeFile,args.origWidth,isPhotonUrl);var largeWidth=parseInt(largeSizeParts[0],10);var largeHeight=parseInt(largeSizeParts[1],10);args.origMaxWidth=args.maxWidth;args.origMaxHeight=args.maxHeight;if(typeof window.devicePixelRatio!=='undefined'&&window.devicePixelRatio>1){args.maxWidth=args.maxWidth*window.devicePixelRatio;args.maxHeight=args.maxHeight*window.devicePixelRatio}
91if(largeWidth>=args.maxWidth||largeHeight>=args.maxHeight){return args.largeFile}
92if(isPhotonUrl){if(args.largeFile.lastIndexOf('?')===-1){return args.largeFile}
93var sanitizedUrl=sanitizePhotonUrl(args.largeFile);if(args.origWidth>args.maxWidth||args.origHeight>args.maxHeight){args.origMaxWidth=args.maxWidth*2;args.origMaxHeight=args.maxHeight*2;sanitizedUrl.searchParams.set('fit',args.origMaxWidth+','+args.origMaxHeight)}
94return sanitizedUrl.toString()}
95return args.origFile}
96function getImageSizeParts(file,origWidth,isPhotonUrl){var size=isPhotonUrl?file.replace(/.*=([\d]+%2C[\d]+).*$/,'$1'):file.replace(/.*-([\d]+x[\d]+)\..+$/,'$1');var sizeParts;if(size!==file){sizeParts=isPhotonUrl?size.split('%2C'):size.split('x')}else{sizeParts=[origWidth,0]}
97if(sizeParts[0]==='9999'){sizeParts[0]='0'}
98if(sizeParts[1]==='9999'){sizeParts[1]='0'}
99return sizeParts}
100function formatShutterSpeed(speed){var denominator;if(speed>=1){return Math.round(speed*10)/10+'s'}
101denominator=Math.round(1/speed);return'1/'+denominator+'s'}
102function parseTitleOrDesc(value){if(!value.match(' ')&&value.match('_')){return''}
103return value}
104function updateTitleCaptionAndDesc(data){var caption;var title;var desc;var captionMainElement;var captionInfoExtraElement;var titleElement;var descriptionElement;captionMainElement=carousel.overlay.querySelector('.jp-carousel-photo-caption');captionInfoExtraElement=carousel.overlay.querySelector('.jp-carousel-caption');titleElement=carousel.overlay.querySelector('.jp-carousel-photo-title');
104descriptionElement=carousel.overlay.querySelector('.jp-carousel-photo-description');domUtil.hide(captionMainElement);domUtil.hide(captionInfoExtraElement);domUtil.hide(titleElement);domUtil.hide(descriptionElement);caption=parseTitleOrDesc(data.caption)||'';title=parseTitleOrDesc(data.title)||'';desc=parseTitleOrDesc(data.desc)||'';if(caption||title||desc){if(caption){captionMainElement.innerHTML=caption;captionInfoExtraElement.innerHTML=caption;domUtil.show(captionMainElement);domUtil.show(captionInfoExtraElement)}
105if(domUtil.stripHTML(caption)===domUtil.stripHTML(title)){title=''}
106if(domUtil.stripHTML(caption)===domUtil.stripHTML(desc)){desc=''}
107if(domUtil.stripHTML(title)===domUtil.stripHTML(desc)){desc=''}
108if(desc){descriptionElement.innerHTML=desc;domUtil.show(descriptionElement);if(!title&&!caption){captionMainElement.textContent=domUtil.stripHTML(desc);domUtil.show(captionMainElement)}}
109if(title){var plainTitle=domUtil.stripHTML(title);titleElement.textContent=plainTitle;if(!caption){captionMainElement.textContent=plainTitle;captionInfoExtraElement.textContent=plainTitle;domUtil.show(captionMainElement)}
110domUtil.show(titleElement)}}}
111function updateExif(meta){if(!meta||Number(jetpackCarouselStrings.display_exif)!==1){return!1}
112var metaContainer=carousel.info.querySelector('.jp-carousel-image-meta');if(!metaContainer){return!1}
113var html='';for(var key in meta){var val=meta[key];var metaKeys=jetpackCarouselStrings.meta_data||[];if(parseFloat(val)===0||!val.length||metaKeys.indexOf(key)===-1){continue}
114switch(key){case 'focal_length':val=val+'mm';break;case 'shutter_speed':val=formatShutterSpeed(val);break;case 'aperture':val='f/'+val;break}
115html+='<li><h5>'+jetpackCarouselStrings[key]+'</h5>'+val+'</li>'}
116var ul=metaContainer.querySelector('ul.jp-carousel-image-exif');if(html!==''){if(!ul){ul=document.createElement('ul');ul.className='jp-carousel-image-exif';var titleAndCaption=metaContainer.querySelector('.jp-carousel-title-and-caption');if(titleAndCaption&&titleAndCaption.nextSibling){metaContainer.insertBefore(ul,titleAndCaption.nextSibling)}else{metaContainer.insertBefore(ul,metaContainer.firstChild)}}
117ul.innerHTML=html;ul.style.removeProperty('display')}else if(ul){ul.parentNode.removeChild(ul)}}
118function updateFullSizeLink(currentSlide){if(!currentSlide){return!1}
119var original;var origSize=[currentSlide.attrs.origWidth,currentSlide.attrs.origHeight];var imageLinkParser=document.createElement('a');imageLinkParser.href=currentSlide.attrs.src.replace(/\?.+$/,'');if(imageLinkParser.hostname.match(/^i[\d]{1}\.wp\.com$/i)!==null){original=imageLinkParser.href}else{original=currentSlide.attrs.origFile.replace(/\?.+$/,'')}
120var downloadText=carousel.info.querySelector('.jp-carousel-download-text');var permalink=carousel.info.querySelector('.jp-carousel-image-download');downloadText.innerHTML=util.applyReplacements(jetpackCarouselStrings.download_original,origSize);permalink.setAttribute('href',original);permalink.style.removeProperty('display')}
121function testCommentsOpened(opened){var commentForm=carousel.info.querySelector('#jp-carousel-comment-form-container');var isOpened=parseInt(opened,10)===1;if(isOpened){domUtil.fadeIn(commentForm)}else{domUtil.fadeOut(commentForm)}}
122function fetchComments(attachmentId,offset){var shouldClear=offset===undefined;var commentsIndicator=carousel.info.querySelector('.jp-carousel-icon-comments .jp-carousel-has-comments-indicator');commentsIndicator.classList.remove('jp-carousel-show');clearInterval(commentInterval);if(!attachmentId){return}
123if(!offset||offset<1){offset=0}
124var comments=carousel.info.querySelector('.jp-carousel-comments');var commentsLoading=carousel.info.querySelector('#jp-carousel-comments-loading');domUtil.show(commentsLoading);if(shouldClear){domUtil.hide(comments);comments.innerHTML=''}
125var xhr=new XMLHttpRequest();var url=jetpackCarouselStrings.ajaxurl+'?action=get_attachment_comments'+'&nonce='+jetpackCarouselStrings.nonce+'&id='+attachmentId+'&offset='+offset;xhr.open('GET',url);xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');var onError=function(){domUtil.fadeIn(comments);domUtil.fadeOut(commentsLoading)};xhr.onload=function(){if(!carousel.currentSlide||carousel.currentSlide.attrs.attachmentId!==attachmentId){return}
126var isSuccess=xhr.status>=200&&xhr.status<300;var data;try{data=JSON.parse(xhr.responseText)}catch{}
127if(!isSuccess||!data||!Array.isArray(data)){return onError()}
128if(shouldClear){comments.innerHTML=''}
129for(var i=0;i<data.length;i++){var entry=data[i];var comment=document.createElement('div');comment.classList.add('jp-carousel-comment');comment.setAttribute('id','jp-carousel-comment-'+entry.id);comment.innerHTML='<div class="comment-gravatar">'+entry.gravatar_markup+'</div>'+'<div class="comment-content">'+'<div class="comment-author">'+entry.author_markup+'</div>'+'<div class="comment-date">'+entry.date_gmt+'</div>'+entry.content+'</div>';comments.appendChild(comment);clearInterval(commentInterval);commentInterval=setInterval(function(){if(carousel.container.scrollTop+150>window.innerHeight){fetchComments(attachmentId,offset+10);clearInterval(commentInterval)}},300)}
130if(data.length>0){domUtil.show(comments);commentsIndicator.innerText=data.length;commentsIndicator.classList.add('jp-carousel-show')}
131domUtil.hide(commentsLoading)};xhr.onerror=onError;xhr.send()}
132function loadFullImage(slide){var attrs=slide.attrs;var image=slide.el.querySelector('img');if(image.hasAttribute('data-loaded')){return}
133image.setAttribute('itemprop','image');image.setAttribute('data-loaded',1);var hasPreview=attrs.previewImage&&attrs.previewImage!==attrs.src;if(!hasPreview){image.src=attrs.src;return}
134image.src=attrs.previewImage;image.style.filter='blur(8px)';var fullImage=new window.Image();fullImage.addEventListener('load',function(){image.src=attrs.src;image.style.filter=''},{once:!0});fullImage.addEventListener('error',function(){image.style.filter=''},{once:!0});fullImage.src=attrs.src}
135function preloadAdjacentImages(currentIndex){var indicesToPreload=[];var totalSlides=carousel.slides.length;if(totalSlides>1){var prevIndex=currentIndex>0?currentIndex-1:totalSlides-1;indicesToPreload.push(prevIndex);var nextIndex=currentIndex<totalSlides-1?currentIndex+1:0;indicesToPreload.push(nextIndex)}
136indicesToPreload.forEach(function(index){var slide=carousel.slides[index];if(slide){loadFullImage(slide);if(Number(jetpackCarouselStrings.display_background_image)===1&&!slide.backgroundImage){loadBackgroundImage(slide)}}})}
137function loadBackgroundImage(slide){var image=slide.attrs.originalElement;if(!image){return}
138if(image.complete&&image.naturalHeight!==0){applyBackgroundImage(slide,image);return}
139var onLoad=function(){image.removeEventListener('error',onError);applyBackgroundImage(slide,image)};var onError=function(){image.removeEventListener('load',onLoad)};image.addEventListener('load',onLoad,{once:!0});image.addEventListener('error',onError,{once:!0})}
140function applyBackgroundImage(slide,image){var url=util.getBackgroundImage(image);if(!url){return}
141slide.backgroundImage=url;slide.el.style.backgroundImage='url('+url+')';slide.el.style.backgroundSize='cover';slide.el.style.backgroundPosition='center'}
142function clearCommentTextAreaValue(){if(carousel.commentField){carousel.commentField.value=''}}
143function getOriginalDimensions(el){var size=el.getAttribute('data-orig-size')||'';if(size){var parts=size.split(',');return{width:parseInt(parts[0],10),height:parseInt(parts[1],10)}}
144return{width:el.getAttribute('data-original-width')||el.getAttribute('width')||undefined,height:el.getAttribute('data-original-height')||el.getAttribute('height')||undefined,}}
145function initCarouselSlides(items,startIndex){carousel.slides=[];var max=calculateMaxSlideDimensions();if(startIndex!==0&&items[startIndex].getAttribute('data-gallery-src')!==null){var img=new Image();img.src=items[startIndex].getAttribute('data-gallery-src')}
146Array.prototype.forEach.call(items,function(item,i){var permalinkEl=domUtil.closest(item,'a');var origFile=item.getAttribute('data-orig-file')||item.getAttribute('src-orig');var attrID=item.getAttribute('data-attachment-id')||item.getAttribute('data-id')||'0';var caption=document.querySelector('img[data-attachment-id="'+attrID+'"] + figcaption');if(caption){caption=caption.innerHTML}else{caption=item.getAttribute('data-image-caption')}
147var attrs={originalElement:item,attachmentId:attrID,commentsOpened:item.getAttribute('data-comments-opened')||'0',imageMeta:domUtil.getJSONAttribute(item,'data-image-meta')||{},title:item.getAttribute('data-image-title')||'',desc:item.getAttribute('data-image-description')||'',largeFile:item.getAttribute('data-large-file')||'',origFile:origFile||'',thumbSize:{width:item.naturalWidth,height:item.naturalHeight},caption:caption||'',permalink:permalinkEl&&permalinkEl.getAttribute('href'),src:origFile||item.getAttribute('src')||'',};var tiledGalleryItem=domUtil.closest(item,'.tiled-gallery-item');var tiledCaptionEl=tiledGalleryItem&&tiledGalleryItem.querySelector('.tiled-gallery-caption');var tiledCaption=tiledCaptionEl&&tiledCaptionEl.innerHTML;if(tiledCaption){attrs.caption=tiledCaption}
148var origDimensions=getOriginalDimensions(item);attrs.origWidth=origDimensions.width||attrs.thumbSize.width;attrs.origHeight=origDimensions.height||attrs.thumbSize.height;if(typeof wpcom!=='undefined'&&wpcom.carousel&&wpcom.carousel.generateImgSrc){attrs.src=wpcom.carousel.generateImgSrc(item,max)}else{attrs.src=selectBestImageUrl({origFile:attrs.src,origWidth:attrs.origWidth,origHeight:attrs.origHeight,maxWidth:max.width,maxHeight:max.height,largeFile:attrs.largeFile,})}
149item.setAttribute('data-gallery-src',attrs.src);if(attrs.attachmentId!=='0'){attrs.title=util.texturize(attrs.title);attrs.desc=util.texturize(attrs.desc);attrs.caption=util.texturize(attrs.caption);var image=new Image();var slideEl=document.createElement('div');slideEl.classList.add('swiper-slide');slideEl.setAttribute('itemprop','associatedMedia');slideEl.setAttribute('itemscope','');slideEl.setAttribute('itemtype','https://schema.org/ImageObject');var zoomEl=document.createElement('div');zoomEl.classList.add('swiper-zoom-container');carousel.gallery.appendChild(slideEl);slideEl.appendChild(zoomEl);zoomEl.appendChild(image);slideEl.setAttribute('data-attachment-id',attrs.attachmentId);slideEl.setAttribute('data-permalink',attrs.permalink);slideEl.setAttribute('data-orig-file',attrs.origFile);attrs.previewImage=item.currentSrc||item.getAttribute('src')||'';var slide={el:slideEl,attrs:attrs,index:i};carousel.slides.push(slide)}})}
150function loadSwiper(gallery,options){if(!window.JetpackSwiper){var loader=document.querySelector('#jp-carousel-loading-overlay');domUtil.show(loader);var jsScript=document.createElement('script');jsScript.id='jetpack-carousel-swiper-js';jsScript.src=window.jetpackSwiperLibraryPath.url;jsScript.async=!0;jsScript.onload=function(){domUtil.hide(loader);
150openCarousel(gallery,options)};jsScript.onerror=function(){domUtil.hide(loader)};document.head.appendChild(jsScript);return}
151openCarousel(gallery,options)}
152function openCarousel(gallery,options){var settings={imgSelector:'.gallery-item [data-attachment-id], .tiled-gallery-item [data-attachment-id], img[data-attachment-id], img[data-id]',startIndex:0,};var data=domUtil.getJSONAttribute(gallery,'data-carousel-extra');var tapTimeout;if(!data){return}
153const images=gallery.querySelectorAll(settings.imgSelector);if(!images.length){return}
154initializeCarousel();if(carousel.isOpen){return}
155carousel.isOpen=!0;originalOverflow=getComputedStyle(document.body).overflow;document.body.style.overflow='hidden';originalHOverflow=getComputedStyle(document.documentElement).overflow;document.documentElement.style.overflow='hidden';scrollPos=window.scrollY||window.pageYOffset||0;carousel.container.setAttribute('data-carousel-extra',JSON.stringify(data));stat(['open','view_image']);for(var option in options||{}){settings[option]=options[option]}
156if(settings.startIndex===-1){settings.startIndex=0}
157domUtil.emitEvent(carousel.overlay,'jp_carousel.beforeOpen');carousel.gallery.innerHTML='';carousel.overlay.style.opacity=1;carousel.overlay.style.display='block';initCarouselSlides(images,settings.startIndex);swiper=new window.JetpackSwiper('.jp-carousel-swiper-container',{centeredSlides:!0,zoom:!0,loop:carousel.slides.length>1,enabled:carousel.slides.length>1,pagination:{el:'.jp-swiper-pagination',clickable:!0,},navigation:{nextEl:'.jp-swiper-button-next',prevEl:'.jp-swiper-button-prev',},initialSlide:settings.startIndex,on:{init:function(){selectSlideAtIndex(settings.startIndex)},},preventClicks:!1,preventClicksPropagation:!1,preventInteractionOnTransition:!domUtil.isTouch(),threshold:5,});swiper.on('slideChange',function(swiper){if(!carousel.isOpen){return}
158selectSlideAtIndex(swiper.realIndex);carousel.overlay.classList.remove('jp-carousel-hide-controls')});swiper.on('zoomChange',function(swiper,scale){if(scale>1){carousel.overlay.classList.add('jp-carousel-hide-controls')}
159if(scale===1){carousel.overlay.classList.remove('jp-carousel-hide-controls')}});swiper.on('doubleTap',function(swiper){clearTimeout(tapTimeout);if(swiper.zoom.scale===1){var zoomTimeout=setTimeout(function(){carousel.overlay.classList.remove('jp-carousel-hide-controls');clearTimeout(zoomTimeout)},150)}});swiper.on('tap',function(){if(swiper.zoom.scale>1){tapTimeout=setTimeout(function(){carousel.overlay.classList.toggle('jp-carousel-hide-controls')},150)}});domUtil.fadeIn(carousel.overlay,function(){domUtil.emitEvent(carousel.overlay,'jp_carousel.afterOpen')})}
160document.body.addEventListener('click',handleInteraction);document.body.addEventListener('keydown',handleInteraction);document.querySelectorAll(galleryItemSelector+'img').forEach(function(galleryImage){if(shouldOpenModal(galleryImage)){makeGalleryImageAccessible(galleryImage)}});function handleInteraction(e){if(e.type==='click'){handleClick(e);return}
161if(e.type==='keydown'){const parentElement=document.activeElement.parentElement;const isParentCarouselContainer=parentElement&&parentElement.classList.contains('tiled-gallery__item');if((e.key===' '||e.key==='Enter')&&isParentCarouselContainer){handleClick(e)}}}
162function normalizeUrl(url){return(url||'').split('?')[0].replace(/\/$/,'')}
163function shouldOpenModal(el){if(el.tagName==='A'){el=el.querySelector('img')||el}
164var parent=el.parentElement;var grandparent=parent?parent.parentElement:null;var parentHref=null;if(grandparent&&grandparent.classList.contains('wp-block-image')){parentHref=parent.getAttribute('href')}else if(parent&&parent.classList.contains('wp-block-image')&&parent.querySelector(':scope > a')){parentHref=parent.querySelector(':scope > a').getAttribute('href')}
165if(parentHref){var cleanHref=normalizeUrl(parentHref);var cleanOrig=normalizeUrl(el.getAttribute('data-orig-file'));var cleanPerm=normalizeUrl(el.getAttribute('data-permalink'));if(cleanHref!==cleanOrig&&cleanHref!==cleanPerm){return!1}}
166if(parent&&parent.classList.contains('gallery-caption')){return!1}
167if(domUtil.matches(parent,'figcaption')){return!1}
168return!0}
169function handleClick(e){var isCompatible=window.CSS&&window.CSS.supports&&window.CSS.supports('display','grid');if(!isCompatible){return}
170var target=e.target;var gallery=domUtil.closest(target,gallerySelector);if(gallery){if(!testForData(gallery)){return}
171if(!shouldOpenModal(target)){return}
172document.documentElement.style.height='auto';e.preventDefault();e.stopPropagation();var item=domUtil.closest(target,itemSelector);var index=Array.prototype.indexOf.call(gallery.querySelectorAll(itemSelector),item);loadSwiper(gallery,{startIndex:index})}}
173if(Number(jetpackCarouselStrings.single_image_gallery)===1){processSingleImageGallery();document.body.addEventListener('is.post-load',function(){processSingleImageGallery()})}
174window.addEventListener('hashchange',function(){var hashRegExp=/jp-carousel-(\d+)/;if(!window.location.hash||!hashRegExp.test(window.location.hash)){if(carousel.isOpen){closeCarousel()}
175return}
176if(window.location.hash===lastKnownLocationHash&&carousel.isOpen){return}
177if(window.location.hash&&carousel.gallery&&!carousel.isOpen&&history.back){history.back();return}
178lastKnownLocationHash=window.location.hash;var matchList=window.location.hash.match(hashRegExp);var attachmentId=parseInt(matchList[1],10);var galleries=document.querySelectorAll(gallerySelector);for(var i=0;i<galleries.length;i++){var gallery=galleries[i];var selected;var images=gallery.querySelectorAll('img');for(var j=0;j<images.length;j++){if(parseInt(images[j].getAttribute('data-attachment-id'),10)===attachmentId||parseInt(images[j].getAttribute('data-id'),10)===attachmentId){selected=j;break}}
179if(selected!==undefined){openOrSelectSlide(gallery,selected);break}}});if(window.location.hash){domUtil.emitEvent(window,'hashchange')}}
180if(document.readyState!=='loading'){init()}else{document.addEventListener('DOMContentLoaded',init)}})();

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.