PageSourceSearch

https://uisoftware.com/_static/??wp-content/plugins/mailchimp/asse…/likes/queuehandler.min.js?m=1789494668

js uisoftware.com collected 2026-09-24 18:45:46 UTC 9,369 bytes, 113 lines download raw bytes

1/* Form submission functions for the Mailchimp Widget */
2(function ($) {
3	function mc_beforeForm() {
4		// Disable the submit button
5		$('.mc_signup_submit_button').attr('disabled', 'disabled');
6	}
7
8	function mc_success(data, status, xhr, submittedForm) {
9		let form = $(submittedForm);
10		if (!submittedForm || !form) {
11			form = $('.mc_signup_form');
12		}
13
14		// Re-enable the submit button
15		$('.mc_signup_submit_button').removeAttr('disabled');
16
17		// Put the response in the message div
18		form.find('.mc_message_wrapper').html(data);
19
20		// See if we're successful, if so, wipe the fields
21		const reg = /class=(["'])mc_success_msg\1/i;
22
23		if (reg.test(data)) {
24			$(form).each(function () {
25				this.reset();
26			});
27
28			$('.mc_submit_type').val('js');
29		}
30
31		window.scrollTo({
32			top: parseInt(form.offset().top, 10) - 28,
33			behavior: 'smooth',
34		});
35	}
36
37	$(function ($) {
38		// Change our submit type from HTML (default) to JS
39		$('.mc_submit_type').val('js');
40
41		// Remove the no JS field.
42		$('.mailchimp_sf_no_js').remove();
43
44		// Attach our form submitter action
45		$('.mc_signup_form').ajaxForm({
46			url: window.mailchimpSF.ajax_url,
47			type: 'POST',
48			dataType: 'text',
49			beforeSubmit: mc_beforeForm,
50			success: mc_success,
51		});
52	});
53})(window.jQuery);
54
55/* Datepicker functions for the Mailchimp Widget */
56(function ($) {
57	if ($('.date-pick').length > 0) {
58		// Datepicker for the date-pick class
59		$('.date-pick').each(function () {
60			let format = $(this).data('format') || 'mm/dd/yyyy';
61			format = format.replace(/yyyy/i, 'yy');
62			$(this).datepicker({
63				autoFocusNextInput: true,
64				constrainInput: false,
65				changeMonth: true,
66				changeYear: true,
67				// eslint-disable-next-line no-unused-vars
68				beforeShow(input, inst) {
69					$('#ui-datepicker-div').addClass('show');
70				},
71				dateFormat: format.toLowerCase(),
72			});
73		});
74	}
75
76	if ($('.birthdate-pick').length > 0) {
77		const d = new Date();
78		$('.birthdate-pick').each(function () {
79			let format = $(this).data('format') || 'mm/dd';
80			format = format.replace(/yyyy/i, 'yy');
81			$(this).datepicker({
82				autoFocusNextInput: true,
83				constrainInput: false,
84				changeMonth: true,
85				changeYear: false,
86				minDate: new Date(d.getFullYear(), 1 - 1, 1),
87				maxDate: new Date(d.getFullYear(), 12 - 1, 31),
88				// eslint-disable-next-line no-unused-vars
89				beforeShow(input, inst) {
90					$('#ui-datepicker-div').removeClass('show');
91				},
92				dateFormat: format.toLowerCase(),
93			});
94		});
95	}
96
97	// Phone validation custom error message.
98	if ($('.mailchimp-sf-phone').length > 0) {
99		$('.mailchimp-sf-phone').each(function () {
100			$(this)
101				.on('input', function () {
102					this.setCustomValidity('');
103				})
104				.on('invalid', function () {
105					if (!this.validity.valid) {
106						this.setCustomValidity(window.mailchimpSF.phone_validation_error);
107					}
108				});
109		});
110	}
111})(window.jQuery);
112;
113(()=>{var e=[],t=!1,n=2e3,i=[],o=new Promise(e=>{"loading"!==document.readyState?e():window.addEventListener("DOMContentLoaded",()=>e())});function s(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch{return}if(t&&"function"==typeof t.postMessage)try{t.postMessage(JSON.stringify({type:"likesMessage",data:e}),"*")}catch{}}function r(){const t=[];document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(n=>{if(!(e.indexOf(n.id)>-1)&&d(n)){e.push(n.id);var i,o=/like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/.exec(n.id);o&&5===o.length&&(i={blog_id:o[2],width:n.width},"post"===o[1]?i.post_id=o[3]:"comment"===o[1]&&(i.comment_id=o[3]),i.obj_id=o[4],t.push(i))}}),t.length>0&&s({event:"initialBatch",requests:t},window.frames["likes-master"])}function a(){const e=document.querySelector("#likes-other-gravatars");if(e){e.style.display="none",e.setAttribute("aria-hidden","true");const t=e.__resizeHandler;t&&(window.removeEventListener("resize",t),delete e.__resizeHandler)}}function l(){var e;if(!t)return s({event:"queryMasterReady"},window.frames["likes-master"]),void setTimeout(l,500);!function(){for(let e=i.length-1;e>=0;e--){const t=i[e];if(!d(t)){const n=t&&t.parentElement&&t.parentElement.parentElement;n.classList.remove("jetpack-likes-widget-loaded"),n.classList.remove("jetpack-likes-widget-loading"),n.classList.add("jetpack-likes-widget-unloaded");const o=n.querySelector(".likes-widget-placeholder");o&&(o.style.display=""),i.splice(e,1),t.remove()}}}(),function(){if(!g)return;document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(e
113=>g.observe(e))}();var n=[...document.querySelectorAll("div.jetpack-likes-widget-unloaded")].filter(e=>d(e));n.length>0&&r();for(var o=0,a=n.length;o<=a-1;o++)(e=n[o].id)&&c(e)}function c(e){if(void 0===e)return;const t=document.querySelector("#"+e);t.querySelectorAll("iframe").forEach(e=>e.remove());const n=t.querySelector(".likes-widget-placeholder");if(n&&n.classList.contains("post-likes-widget-placeholder")){const e=document.createElement("iframe");e.classList.add("post-likes-widget","jetpack-likes-widget"),e.name=t.dataset.name,e.src=t.dataset.src,e.height="55px",e.width="100%",e.frameBorder="0",e.scrolling="no",e.title=t.dataset.title,n.after(e)}if(n.classList.contains("comment-likes-widget-placeholder")){const e=document.createElement("iframe");e.class="comment-likes-widget-frame jetpack-likes-widget-frame",e.name=t.dataset.name,e.src=t.dataset.src,e.height="18px",e.width="100%",e.frameBorder="0",e.scrolling="no",t.querySelector(".comment-like-feedback").after(e),i.push(e)}t.classList.remove("jetpack-likes-widget-unloaded"),t.classList.add("jetpack-likes-widget-loading"),t.querySelector("iframe").addEventListener("load",e=>{t.contains(e.target)&&(s({event:"loadLikeWidget",name:e.target.name,width:e.target.width},window.frames["likes-master"]),n&&(n.style.display="none"),t.classList.remove("jetpack-likes-widget-loading"),t.classList.add("jetpack-likes-widget-loaded"))})}function d(e){const t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t+n>=0&&i<=window.innerHeight+n}window.addEventListener("message",function(e){let n=e&&e.data;if("string"==typeof n)try{n=JSON.parse(n)}catch{return}const i=n&&n.type,l=n&&n.data;if("likesMessage"!==i||void 0===l.event)return;if("https://widgets.wp.com"===e.origin)switch(l.event){case"masterReady":o.then(()=>{t=!0;const e={event:"injectStyles"},n=document.querySelector(".sd-text-color"),i=document.querySelector(".sd-link-color"),o=n&&getComputedStyle(n)||{},a=i&&getComputedStyle(i)||{};document.body.classList.contains("single")&&s({event:"reblogsEnabled"},window.frames["likes-master"]),e.textStyles={color:o.color,fontFamily:o["font-family"],fontSize:o["font-size"],direction:o.direction,fontWeight:o["font-weight"],fontStyle:o["font-style"],textDecoration:o["text-decoration"]},e.linkStyles={color:a.color,fontFamily:a["font-family"],fontSize:a["font-size"],textDecoration:a["text-decoration"],fontWeight:a["font-weight"],fontStyle:a["font-style"]},s(e,window.frames["likes-master"]),r()});break;case"showLikeWidget":case"showCommentLikeWidget":break;case"killCommentLikes":document.querySelectorAll(".jetpack-comment-likes-widget-wrapper").forEach(e=>e.remove());break;case"clickReblogFlair":wpcom_reblog&&"function"==typeof wpcom_reblog.toggle_reblog_box_flair&&wpcom_reblog.toggle_reblog_box_flair(l.obj_id);break;case"hideOtherGravatars":a();break;case"showOtherGravatars":{const e=document.querySelector("#likes-other-gravatars");if(!e)break;const t=e.querySelector("ul");e.style.display="none",t.innerHTML="",e.querySelectorAll(".likes-text span").forEach(e=>e.textContent=l.totalLikesLabel),(l.likers||[]).forEach(async(e,n)=>{if("http"!==e.profile_URL.substr(0,4))return;const i=document.createElement("li");t.append(i);const o=encodeURI(e.profile_URL),r=encodeURI(e.avatar_URL);i.innerHTML=`<a href="${o}" rel="nofollow" target="_parent" class="wpl-liker">\n\t\t\t\t\t\t<img src="${r}"\n\t\t\t\t\t\t\talt=""\n\t\t\t\t\t\t\tstyle="width: 28px; height: 28px;" />\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</a>`,i.classList.add(e.css_class),i.querySelector("img").alt=l.avatarAltTitle.replace("%s",e.name),i.querySelector("span").innerText=e.name,n===l.likers.length-1&&i.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),a(),s({event:"focusLikesCount",parent:l.parent},window.frames["likes-master"]))})});const n=function(){const t="rtl"===getComputedStyle(e).direction,n=document.querySelector(`*[name='${l.parent}']`),i=n.getBoundingClientRect(),o=n.ownerDocument.defaultView,s=i.top+o.pageYOffset,r=i.left+o.pageXOffset;let a;if(e.style.top=s+l.position.top-1+"px",t){const t=l&&l.likers?Math.min(l.likers.length,5):0;a=r+l.position.left+24*t+4,e.style.transform="translateX(-100%)"}else a=r+l.position.left;e.style.left=a+"px",e.style.left="-9999px",e.style.display="block";const c=e.offsetWidth;a+c>o.innerWidth&&(a=i.right-c),e.style.left=a+"px",e.setAttribute("aria-hidden","false")};n(),e.focus();const i=function(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}},o=i(n,100);e.__resizeHandler=o,window.addEventListener("resize",o),e.focus()}}}),document.addEventListener("click",a);var f,m,u,p=(f=250,m=l,function(){clearTimeout(u),u=setTimeout(m,f)}),g="function"==typeof IntersectionObserver?new IntersectionObserver(p,{rootMargin:"2000px",threshold:[0,1]}):null;l(),window.addEventListener("scroll",p,!0)})();;

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.