PageSourceSearch

https://www.twelfthmagpie.com/wp-content/plugins/fool-wp-ecap/dist/main.js?ver=2026-06-18-01-10-38

js twelfthmagpie.com collected 2026-10-09 04:51:04 UTC 3,202 bytes, 2 lines download raw bytes

1(()=>{var A=(function(i,t,u){function s(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function p(e,o){let a=e.querySelector('input[name="'.concat(o,'"]'));return a===null||a.type==="checkbox"&&a.checked}function b(e){let o=[];p(e,"acceptTermsCheckbox")||o.push(t.FoolEcapData.acceptTermsCheckboxUncheckedError),s(e.querySelector('input[type="email"]').value)||o.push(t.FoolEcapData.invalidEmailAddressError);for(let a of o)l(e,a);return!o.length}function d(e,o,a){let c=e.parentElement.querySelector(o);c&&(c.insertAdjacentHTML("beforeend",a),i(c).show("fast"))}function l(e,o){d(e,".ecap-error",o),console.error(o)}function x(e){let o=e.querySelector('[name="success"]').value;o===""&&(o=t.FoolEcapData.successMessage),d(e,".ecap-success",o)}function n(e){console.log("Ecap.resetForm"),r(e),e.classList.remove("loading")}function h(e){i(e.parentElement).find(".ecap-error, .ecap-success").empty().hide()}function f(e){e.querySelector('[type="submit"]').disabled=!0}function r(e){e.querySelector('[type="submit"]').disabled=!1}function g(e){return new Promise((o,a)=>{e.success=o,e.error=a,i.ajax(e)})}function m(e){e.classList.add("loading"),f(e)}async function y(e){let o=0;if("foolSegment"in t&&(o+=250,t.foolSegment.identify(e.uid,{email:e.email})),"dataLayer"in t){o+=250;let a="dataLayer"in e&&Object.getPrototypeOf(e.dataLayer)===Object.prototype?e.dataLayer:{};t.dataLayer.push(Object.assign(a,{event:"fool.ecapSubmit"}))}return o?new Promise(a=>setTimeout(a,o)):Promise.resolve(!0)}function v(e){"redirectUrl"in e&&e.redirectUrl&&(t.location=e.redirectUrl)}function z(e){let o=i(e).serializeArray();return g({method:"POST",url:t.FoolEcapData.adminAjaxUrl,data:{action:"fool_ecap_submit",form:i.param(o)}})}function k(e){var w;if(typeof((w=e==null?void 0:e.data)==null?void 0:w.revealMessageClass)<"u"){var o=i("."+e.data.revealMessageClass),a=i(".tmf-question-prompt"),c=i(".ecap-form");o.show(),a.hide(),c.show()}}async function E(e){e.preventDefault();let o=e.currentTarget;h(o),b(o)&&(m(o),z(o).then(async a=>{if(!("success"in a)||!a.success){console.error("Ecap submit error",a),l(o,t.FoolEcapData.unknownErrorException);return}x(o),await y(a),v(a)}).catch(a=>l(o,a.message)).finally(()=>n(o)))}i(u).ready(function(){i(".question-container .affirmative-choice").on("click",{revealMessageClass:"tmf-affirmative-message"},k),i(".question-container .negative-choice").on("click",{revealMessageClass:"tmf-negative-message"},k),i(".fool-ecap form").on("submit",E).each(function(){this.insertAdjacentHTML("beforeend",'<div class="loading-spinner"></div>')})})})(jQuery,window,document);(function(i,t,u){var s=!1,p=0,b=300;function d(n,h,f){var r;return function(){var g=this,m=arguments,y=function(){r=null,f||n.apply(g,m)},v=f&&!r;clearTimeout(r),r=setTimeout(y,h),v&&n.apply(g,m)}}function l(){i(t).scroll(d(function(){var n=i(this).scrollTop();!s&&Math.abs(p-n)>=b&&(n>p&&(i("#ecapModal").foundation("open"),s=!0),p=n)},250))}function x(){return i("#ecapModal").length}i(u).ready(function(n){x()&&l()})})(jQuery,window,document);})();
2//# sourceMappingURL=main.js.map

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.