PageSourceSearch

https://singularia.blog/_static/??/wp-content/plugins/coblocks/2.1…/carousel-wpcom.js?m=1761899756j

js singularia.blog collected 2026-10-02 00:05:09 UTC 5,231 bytes, 117 lines download raw bytes

1!function(e){var o={};function n(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=o,n.d=function(e,o,t){n.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,o){if(1&o&&(e=n(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var r in e)n.d(t,r,function(o){return e[o]}.bind(null,r));return t},n.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(o,"a",o),o},n.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},n.p="",n(n.s=273)}({273:function(e,o){!function(){"use strict";let e,o;function n(e){return new Promise((o,n)=>{const t=document.createElement("script");t.onload=()=>o(),t.onerror=e=>n(e),t.src=e,document.body.appendChild(t)})}function t(){if(e)return e;const o=window.wpcom_coblocks_js;return e=n(o.coblocks_lightbox_js),e}function r(){if(o)return o;window.wpcomJQueryUsageLoggerDisabled=!0;const e=window.wpcom_coblocks_js,t=window.jQuery?Promise.resolve():n(e.jquery_core_js).then(()=>n(e.jquery_migrate_js)),r=t.then(()=>window.imagesLoaded?Promise.resolve():n(e.imagesloaded_js)),c=t.then(()=>window.Masonry?Promise.resolve():n(e.masonry_js)),u=Promise.all([t,r,c]).then(()=>n(e.coblocks_masonry_js));return o=u,o}function c(){document.querySelector(".wp-block-coblocks-gallery-masonry")&&r(),document.querySelector(".has-lightbox")&&t(),document.body.classList.contains("block-editor-page")&&(r(),t())}"loading"!==document.readyState?c():document.addEventListener("DOMContentLoaded",c)}()}});;
2( function () {
3	'use strict';
4
5	if ( typeof window.wpcom === 'undefined' ) {
6		window.wpcom = {};
7	}
8
9	if ( window.wpcom.carousel ) {
10		return;
11	}
12
13	var prebuilt_widths = jetpackCarouselStrings.widths;
14	var pageviews_stats_args = jetpackCarouselStrings.stats_query_args;
15
16	var findFirstLargeEnoughWidth = function ( original_w, original_h, dest_w, dest_h ) {
17		var inverse_ratio = original_h / original_w;
18
19		for ( var i = 0; i < prebuilt_widths.length; ++i ) {
20			if ( prebuilt_widths[ i ] >= dest_w || prebuilt_widths[ i ] * inverse_ratio >= dest_h ) {
21				return prebuilt_widths[ i ];
22			}
23		}
24
25		return original_w;
26	};
27
28	var removeResizeFromImageURL = function ( url ) {
29		return removeArgFromURL( url, 'resize' );
30	};
31
32	var removeArgFromURL = function ( url, arg ) {
33		var re = new RegExp( '[\\?&]' + arg + '(=[^?&]+)?' );
34		if ( url.match( re ) ) {
35			return url.replace( re, '' );
36		}
37		return url;
38	};
39
40	var addWidthToImageURL = function ( url, width ) {
41		width = parseInt( width, 10 );
42		// Give devices with a higher devicePixelRatio higher-res images (Retina display = 2, Android phones = 1.5, etc)
43		if ( 'undefined' !== typeof window.devicePixelRatio && window.devicePixelRatio > 1 ) {
44			width = Math.round( width * window.devicePixelRatio );
45		}
46		url = addArgToURL( url, 'w', width );
47		url = addArgToURL( url, 'h', '' );
48		return url;
49	};
50
51	var addArgToURL = function ( url, arg, value ) {
52		var re = new RegExp( arg + '=[^?&]+' );
53		if ( url.match( re ) ) {
54			return url.replace( re, arg + '=' + value );
55		} else {
56			var divider = url.indexOf( '?' ) !== -1 ? '&' : '?';
57			return url + divider + arg + '=' + value;
58		}
59	};
60
61	var stat = function ( names ) {
62		if ( typeof names !== 'string' ) {
63			names = names.join( ',' );
64		}
65
66		new Image().src = window.location.protocol +
67			'//pixel.wp.com/g.gif?v=wpcom-no-pv' +
68			'&x_carousel=' + names +
69			'&baba=' + Math.random();
70	};
71
72	var lastTrackedPostId = null;
73
74	var pageview = function ( post_id ) {
75		// Prevent duplicate tracking of the same post during slide transitions
76		if ( post_id === lastTrackedPostId ) {
77			return;
78		}
79
80		lastTrackedPostId = post_id;
81
82		new Image().src = window.location.protocol +
83			'//pixel.wp.com/g.gif?host=' + encodeURIComponent( window.location.host ) +
84			'&ref=' + encodeURIComponent( document.referrer ) +
85			'&rand=' + Math.random() +
86			'&' + pageviews_stats_args +
87			'&post=' + encodeURIComponent( post_id );
88	};
89
90	var generateImgSrc = function ( srcItem, max ) {
91		var origSize = srcItem.getAttribute( 'data-orig-size' ) || '';
92
93		var src = srcItem.getAttribute( 'src' ) || srcItem.getAttribute( 'original' ) || srcItem.getAttribute( 'data-original' ) || srcItem.getAttribute( 'data-lazy-src' );
94		if ( src.indexOf( 'imgpress' ) !== -1 ) {
95			src = srcItem.getAttribute( 'data-orig-file' );
96		}
97		// Square/Circle galleries use a resize param that needs to be removed.
98		src = removeResizeFromImageURL( src );
99		src = addWidthToImageURL(
100			src,
101			findFirstLargeEnoughWidth( origSize.width, origSize.height, max.width, max.height )
102		);
103
104		return src;
105	};
106
107	window.wpcom.carousel = {
108		findFirstLargeEnoughWidth: findFirstLargeEnoughWidth,
109		removeResizeFromImageURL: removeResizeFromImageURL,
110		addWidthToImageURL: addWidthToImageURL,
111		stat: stat,
112		pageview: pageview,
113		generateImgSrc: generateImgSrc
114	};
115
116} )();
117;

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.