PageSourceSearch

https://www.madcapsoftware.com/Scripts/hubSpotFormHelpers.min.js?v=833607

js madcapsoftware.com collected 2026-10-02 07:02:38 UTC 17,747 bytes, 1 lines download raw bytes

1(()=>{var we=Object.create;var ee=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var ge=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var Ee=(t,e)=>()=>(t&&(e=t(t=0)),e);var ve=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Se=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ye(e))!be.call(t,r)&&r!==n&&ee(t,r,{get:()=>e[r],enumerable:!(l=he(e,r))||l.enumerable});return t};var Ie=(t,e,n)=>(n=t!=null?we(ge(t)):{},Se(e||!t||!t.__esModule?ee(n,"default",{value:t,enumerable:!0}):n,t));var R=(t,e,n)=>new Promise((l,r)=>{var i=f=>{try{d(n.next(f))}catch(s){r(s)}},a=f=>{try{d(n.throw(f))}catch(s){r(s)}},d=f=>f.done?l(f.value):Promise.resolve(f.value).then(i,a);d((n=n.apply(t,e)).next())});function te(t,e,n){document.cookie=t+"="+e+";Max-Age="+n*86400+"; path=/"}var ne=Ee(()=>{});var ce=ve(j=>{ne();var Z=null;function _e(){let t=document.querySelector("script[src*='hubSpotFormHelpers.min.js']"),e=t&&t.src?t.src.match(/[?&]v=(\d+)/):null;return e?`/Scripts/tzWindowsMap.min.js?v=${e[1]}`:"/Scripts/tzWindowsMap.min.js"}function oe(t){return R(this,null,function*(){window.mcFindWindowsTimeZone||(Z||(Z=new Promise(n=>
1{let l=document.createElement("script");l.src=_e(),l.onload=()=>n(),l.onerror=()=>n(),document.head.appendChild(l)})),yield Z);let e=window.mcFindWindowsTimeZone;if(typeof e!="function")return t;try{return e(t)||t}catch(n){return t}})}var x=t=>{let e=window.location.search;return new URLSearchParams(e).get(t)},Pe=()=>{var a,d;var t=window.navigator.userAgent;let e=((d=(a=window.navigator)==null?void 0:a.userAgentData)==null?void 0:d.platform)||(navigator==null?void 0:navigator.platform)||"unknown";var n=["Macintosh","MacIntel","MacPPC","Mac68K"],l=["Win32","Win64","Windows","WinCE"],r=["iPhone","iPad","iPod"],i="";return n.indexOf(e)!==-1?i="Mac":r.indexOf(e)!==-1?i="iOS":l.indexOf(e)!==-1?i="Windows":/Android/.test(t)?i="Android":/Linux/.test(e)&&(i="Linux"),i},qe=t=>/^[a-zA-Z0-9\-\._\/]+$/.test(t),Le="https://js.hsforms.net/forms/embed/v2.js",U=100,Me="https://www.zerobounce.net/widget/ZeroBounceHubSpotValidationWidget.js",ie="zerobounce-hubspot-widget",Ce=1e4,N="zbInvalidEmailMessage",Ae="Please enter a valid email address.",De="#d0201d",$e={"www.madcapsoftware.com":"6f1975643cac48809e068a27a5fd6d5d","www.madcapsoftware.dev":"a9a0bd5e89d249fa80c5e4fe72bac48a"}
1,re=new Set,Fe='input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], input[type="number"], input[type="password"], input:not([type]), textarea',ae=new WeakSet,Oe=t=>{try{if(t.hasAttribute("value")){let e=t.value;t.removeAttribute("value"),t.value!==e&&(t.value=e)}}catch(e){}},He=t=>{try{let e=t;if(Oe(e),ae.has(t))return;ae.add(t);let n=e.setAttribute.bind(e);e.setAttribute=function(l,r){if(String(l).toLowerCase()!=="value")return n(l,r)},Object.defineProperty(e,"defaultValue",{get(){return""},set(){},configurable:!0})}catch(e){}},se=!1,Re=t=>{try{let e=l=>{try{l.querySelectorAll(Fe).forEach(r=>He(r))}catch(r){}};if(e(t||document),se)return;let n=document.documentElement||document.body;typeof MutationObserver=="function"&&n&&(se=!0,new MutationObserver(()=>e(document)).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}))}catch(e){}},xe=(t,e)=>{let n=t.trim().toLowerCase();if(!n||re.has(n))return;let l=!1;try{let r=window.PrivacyManagerAPI,i=r&&typeof r.callApi=="function"?r.callApi("getGDPRConsentDecision",window.location.host):null,d=(i&&i.consentDecision||[]).some(C=>C===2||C==="2"||/functional/i.test(String(C))),f=window.truste,s=f&&f.eu&&f.eu.bindMap&&f.eu.bindMap.behavior==="implied",o=!!i&&i.source==="implied";l=d||s&&o}catch(r){}l&&(re.add(n),fetch("/ZeroBounceScrubLog/Submit/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t.trim(),formId:e,page:window.location.pathname})}).catch(()=>{}))};function le(t,e){if(document.getElementById(e))return console.warn(`Script with ID '${e}' is already present.`),null;let n=document.createElement("script");return n.src=t,n.id=e,n.defer=!0,document.head.appendChild(n),n}var Be=t=>{document.querySelectorAll('form[id^="hsForm_"]').forEach(n=>{if(!n.id.includes(t)||n.dataset.zbMessageAttached==="true")return;n.dataset.zbMessageAttached="true";let l=n.querySelector('input[type="submit"]');if(!l)return;let r=()=>{let d=n.querySelector('input[name^="zb_valid"]'),f=n.querySelector(".hs_email")||n,s=f.querySelector(`.hs-error-msgs:not(.${N})`),o=l.disabled===!0&&d!==null&&d.value==="invalid",C=o&&!s,_=n.querySelector('input[type="email"], input[name="email"]');_&&(_.style.borderColor=o?De:""),o&&_&&_.value&&document.activeElement!==_&&xe(_.value,t);let P=n.querySelector(`.${N}`);if(C&&!P){P=document.createElement("ul"),P.className=`no-list hs-error-msgs inputs-list ${N}`;let g=document.createElement("li"),b=document.createElement("label");b.className="hs-error-msg",b.textContent=Ae,g.appendChild(b),P.appendChild(g),f.appendChild(P)}P&&(P.style.display=C?"":"none")};new MutationObserver(r).observe(l,{attributes:!0,attributeFilter:["disabled"]}),n.addEventListener("focusout",d=>{let f=n.querySelector('input[type="email"], input[name="email"]');f&&d.target===f&&r()});let a=n.querySelector(".hs_email");a&&new MutationObserver(()=>{r()}).observe(a,{childList:!0,subtree:!0})})},ke=(t,e)=>{let n=window.location.hostname;if(!(n==="www.madcapsoftware.com"||n==="madcapsoftware.com")&&x("zerobounce")==="0")return;let r=e||$e[n]||"";if(!r||!t)return;document.getElementById(ie)||le(Me,ie);let i=0,a=setInterval(()=>{i+=U,typeof window.initializeZeroBounce=="function"?(clearInterval(a),window.initializeZeroBounce({apiKey:r,hubspotFormId:t,disableSubmitOnError:!0,hideResults:!0}),Be(t)):i>=Ce&&(clearInterval(a),console.error("ZeroBounce validation widget failed to load."))},U)};window.renderHubSpotForm=t=>R(null,null,function*(){let e=!1;if(typeof hbspt!="undefined"&&hbspt.forms&&typeof hbspt.forms.create=="function"?(e=!0,console.log("HubSpot embed script is already loaded.")):(le(Le,"hubspot-forms-embed-v2")!==null||document.getElementById("hubspot-forms-embed-v2"))&&(e=!0),e){let n=setInterval(()=>R(null,null,function*(){if(typeof hbspt!="undefined"&&hbspt.forms&&typeof hbspt.forms.create=="function"){clearInterval(n);let{formId:l,formInstanceId:r,confirmationPagePath:i,productCode:a,leadSourceDescription:d,abTestId:f,formType:s,source:o,webinarService:C,on24EventId:_,goToEventId:P,inquiryTopicId:g,target:b,leadSourceBusinessUnit:$,lastRequestedWhitePaper:ue,lastRequestedEBook:de,lastRequestedVideo:me,account:ze,zeroBounceApiKey:pe}=t;r||(r=s?s+"-"+Date.now():"form-"+Date.now());let O="",V=window.location.href;V.includes(".madcapsoftware.")?O="":($==="IxiaSoft"||$==="DocToHelp")&&(O="https://www.madcapsoftware.com"),i&&qe(i)!==!0&&(i="/confirmation/");let K=Intl.DateTimeFormat().resolvedOptions().timeZone;try{let E=(yield(yield fetch(`${O}/FormHelpers/CreateId/`,{method:"POST",body:""})).json()).id;if(!E)return;let k="";(s==="trial"||s==="trial-landing")&&(k=(yield(yield fetch(`${O}/FormHelpers/CreateSupportTrialKey/`,{method:"POST",body:""})).json()).supportTrialKey),a!=="IX"&&a!=="XY"&&a!=="CR"&&a!=="SY"&&s==="contact-sales"&&!d&&g&&(d=yield(yield fetch(`${O}/ContactSalesHubSpot/GetInquiryTopicByKey/?inquiryKey=${g}`,{method:"POST",body:""})).text());let Y=x("mc_source"),Ne=Y?`&mc_source=${Y}`:"",J=o?`&source=${o}`:"",X=_?`&on24EventId=${_}
1`:"",Q=P?`&goToEventId=${P}`:"",B="";a==="PFL"?a="FL":a==="RCE"?a="CE":a==="PLI"?a="LI":a==="PCO"?a="CO":a==="PDH"&&(a="DH");let W="";$==="IxiaSoft"&&s==="contact-sales"?W="Thanks for contacting us! Someone from our team will be in touch with you shortly. In the meantime, stay up to date by watching our industry and product related webinars.":s==="white-paper-request"&&(W="Thanks! You'll receive an email with download instructions shortly.");let Ue=a==null?void 0:a.toLowerCase(),fe=!1;hbspt.forms.create({region:"na1",portalId:"23466779",target:b||".madForm",formId:l,formInstanceId:r,translations:{en:{forbiddenEmailDomain:"A business email address is required."}},inlineMessage:W,onFormReady:function(D){Re(D&&D[0]||document),ke(l,pe),document.querySelectorAll('form[class*="hs-form-private"]').forEach(v=>{let S=window.scrollY,I=new IntersectionObserver(L=>{L.forEach(M=>{if(M.isIntersecting){S=window.scrollY;let T=v.querySelector('textarea[name="leadcomments__c"]');T&&(T.value=""),I.unobserve(v),window.scrollTo({top:S,behavior:"auto"})}})});I.observe(v)});let q=document.querySelector(".hs_demo_products");if(q&&q.querySelectorAll("input[type='checkbox']")&&q.querySelectorAll("input[type='checkbox']").length){let v,S=q.querySelectorAll("input[type='checkbox']"),I=document.querySelector("input[name='tri
1alproducts__c']"),L=()=>{for(let M of S){v=[];for(let T of S)T.checked&&v.push(T.value);I&&(v.length?I.value=v.join(","):I.value="",console.log(`trialProductsField.value: ${I.value}`))}};setTimeout(()=>{L()},1e3);for(let M of S)M.addEventListener("change",function(){L()})}},onFormSubmitted:function(D,u){return R(this,null,function*(){var L,M,T,H;let q=s==="trial"||s==="trial-landing",v=o==="privateDemo",S=!1;if(q||v)try{let p=window.PrivacyManagerAPI,y=p&&typeof p.callApi=="function"?p.callApi("getGDPRConsentDecision",window.location.host):null,c=(y&&y.consentDecision||[]).some(m=>m===3||m==="3"||/advertis/i.test(String(m))),h=(u==null?void 0:u.submissionValues)||{};if(c&&(h.email||h.phone)){let m={};h.email&&(m.em=h.email),h.phone&&(m.ph=h.phone),window.uetq=window.uetq||[],window.uetq.push("set",{pid:m})}if(c&&h.email&&window.oaiq&&window.crypto&&window.crypto.subtle&&typeof TextEncoder!="undefined")try{let m=String(h.email).trim().toLowerCase(),F=yield crypto.subtle.digest("SHA-256",new TextEncoder().encode(m)),z=Array.from(new Uint8Array(F)).map(A=>("0"+A.toString(16)).slice(-2)).join("");window.oaiq("init",{user:{email_sha256:z}})}catch(m){}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"mcLeadFormSubmit",mcFormType:s,mcFormCategory:q?"trial":"demo"}),S=!0}catch(p){}if(S&&!(o==="privateDemo")&&(yield new Promise(p=>setTimeout(p,600))),s==="trial"||s==="trial-landing"){let p=(M=(L=u==null?void 0:u.submissionValues)==null?void 0:L.customerstatus__c)!=null&&M.includes("Job")?"&jobBoardBanner=true":"",y="&source="+o;(H=(T=u==null?void 0:u.submissionValues)==null?void 0:T.customerstatus__c)!=null&&H.includes("install")?window.location.href="/downloads/licensed-products/":window.location.href=`${i}?id=${E}${y}${p}`}else if(o==="introTraining"||o==="liveWebinar"||o==="recordedWebinar"){if(B=`&timeZone=${yield oe(K)}`,o==="introTraining"){let y=yield(yield fetch(`/CalendarEventSignupHubSpot/SubmitWebinarEntry/?id=${E}${J}${X}${Q}${B}`,{method:"POST",body:""})).json()}o==="recordedWebinar"&&C==="goToWebinar"?(te("mcShowGatedRecordedWebinars",!0,1),window.location.href=`${i}?id=${Math.floor(Math.random()*1e6)+1}`):o==="recordedWebinar"&&C==="on24"?window.location.href=`${i}?id=${_}`:window.location.href=`${i}?id=${E}`}else if(s==="recordedTraining")window.location.href=`${i}`;else if(o==="publicDemo"){B=`&timeZone=${yield oe(K)}`;let p=yield fetch(`/CalendarEventSignupHubSpot/SubmitDemoRequest/?id=${E}${J}${X}${Q}${B}`,{method:"POST",body:""}),y=yield p.json();console.log(p.json()),window.location.href=`${i}?id=${E}`}else if(o==="privateDemo"||o==="recordedDemo"){if(o==="privateDemo"){let w=(u==null?void 0:u.submissionValues)||{},c={email:w.email,anything_else_we_should_know:w.leadcomments__c,company:w.company,country:w.country,first_name:w.firstname,for_syndication_and_aireadiness_what_is_your_focus:w.platform_interests,industry:w.industry,is_dita_compliance_required_or_desired:w.requires_dita,last_name:w.lastname,phone:w.phone};typeof qualified!="undefined"&&(qualified("saveFormData",c),qualified("emitFormFill","custom"))}let p=a?`&products=${a}`:"";a!="XY",setTimeout(()=>{var w,c;(c=(w=u==null?void 0:u.submissionValues)==null?void 0:w.customerstatus__c)!=null&&c.includes("Job Requires")?window.location.href="/resources/product-demonstration/":window.location.href=`${i}?id=${E}`},o==="privateDemo"?2e3:0)}else if(s==="contact-sales"){let p=!!(d!=null&&d.toLowerCase().includes("ixia")||d!=null&&d.toLowerCase().includes("ccms")||d!=null&&d.toLowerCase().includes("dita")||g!=null&&g.toLowerCase().includes("ixia")||g!=null&&g.toLowerCase().includes("ccms")||g!=null&&g.toLowerCase().includes("dita")||a=="IX"),y=$?`&leadSourceBusinessUnit=${$}`:"";o==="contact-sales-popup"||o==="contact-sales-ixia-popup"?document.querySelector(b).parentNode.classList.add("mcDialog-confirmationMessage-is-showing"):V.includes("ixiasoft.com")||(window.location.href=`${i}?id=${E}`)}else if(s==="free-trial-li"||s==="free-trial-co"){let p=document.querySelector(b),w=p.parentNode.querySelector(".mcDialog-confirmationMessage").querySelectorAll("p");
1if(w.length>0){let c=w[w.length-1],h=document.createElement("p");h.classList.add("bodyCopy1","mb-3"),h.innerHTML=`<a target="_blank" href="${i}?id=${E}">Visit the downloads page</a> to start your free trial.`,c.parentNode.insertBefore(h,c.nextSibling)}p.parentNode.classList.add("mcDialog-confirmationMessage-is-showing")}else if(s==="consulting-estimate"||s==="hire-technical-writer"){let w=yield(yield fetch(`${O}/HireConsultantHubspot/Submit/?id=${E}${s==="hire-technical-writer"?"&formKind=techwriter":""}`,{method:"POST",body:""})).json();o==="consulting-estimate-popup"||o==="hire-technical-writer-popup"?document.querySelector(b).parentNode.classList.add("mcDialog-confirmationMessage-is-showing"):window.location.href=`${i}?id=${E}`}else if(s==="translation-estimate"){let y=yield(yield fetch(`/TranslationQuoteHubspot/Submit/?id=${E}`,{method:"POST",body:""})).json();window.location.href=`${i}`}else if(s==="newsletter-signup")window.location.href=`${i}`;else if(s!=="newsletter-signup-footer")if(s==="white-paper-request"){let p=$?`&leadSourceBusinessUnit=${$}`:"";o==="white-paper-request-landing"||o==="white-paper-request-ixia-landing"||o==="white-paper-request-create-landing"||o==="white-paper-request-syndicate-landing"||o==="white-paper-request"||o==="white-paper-request-ixia"||o==="white-paper-request-create"||o==="white-paper-request-syndicate"?window.location.href=`${i}`:(o==="white-paper-request-popup"||o==="white-paper-request-ixia-popup")&&document.querySelector(b).parentNode.classList.add("mcDialog-confirmationMessage-is-showing")}else s==="webinar-suggestion"||s==="blog-suggestion"?document.querySelector(b).parentNode.classList.add("mcDialog-confirmationMessage-is-showing"):(s==="mwGetNotified"||s==="event-landing"||s==="mwSponsor"||o==="contact-sales-pricing"||o==="moved-resources"||o==="captchaTest")&&(window.location.href=`${i}`)})}}),window.addEventListener("message",D=>{var q;let u=document.getElementById(`hsForm_${l}`)||document.getElementById(`hsForm_${l}_${r}`);if(D.data.type==="hsFormCallback"&&D.data.eventName==="onFormReady"&&u!==null){if(!u)return;let v=u.querySelector('input[name="trialproducts__c"]');v&&(v.value=a);let S=u.querySelector('input[name="operatingsystem__c"]');S&&(S.value=Pe());let I=u.querySelector('input[name="gclid__c"]');I&&(I.value=(q=x("gclid"))!=null?q:"");let L=u.querySelector('input[name="msclkid__c"]');if(L){let c=x("msclkid");if(!c){let h=!1;try{let m=window.PrivacyManagerAPI,F=m&&typeof m.callApi=="function"?m.callApi("getGDPRConsentDecision",window.location.host):null;h=(F&&F.consentDecision||[]).some(A=>A===3||A==="3"||/advertis/i.test(String(A)))}catch(m){}if(h){let m=document.cookie.match(/(?:^|; )msclkid=([^;
1]+)/);c=m?decodeURIComponent(m[1]):""}}L.value=c!=null?c:""}let M=u.querySelector('input[name="oppref__c"]');if(M){let c=x("oppref");if(!c){let h=!1;try{let m=window.PrivacyManagerAPI,F=m&&typeof m.callApi=="function"?m.callApi("getGDPRConsentDecision",window.location.host):null;h=(F&&F.consentDecision||[]).some(A=>A===3||A==="3"||/advertis/i.test(String(A)))}catch(m){}if(h){let m=document.cookie.match(/(?:^|; )__oppref=([^;]+)/);c=m?m[1]:""}}c&&!/^[A-Za-z0-9._~%=\-]{1,1024}$/.test(c)&&(c=""),M.value=c!=null?c:""}let T=u.querySelector('input[name="lead_entry_id"]');T&&(T.value=E);let H=u.querySelector('input[name="last_requested_white_paper"]');H&&(H.value=ue);let p=u.querySelector('input[name="last_requested_ebook"]');p&&(p.value=de);let y=u.querySelector('input[name="last_requested_video"]');if(y&&(y.value=me),d){let c=u.querySelector('input[name="leadsourcedescription__c"]');if(c&&(c.value=d),(o==="contact-sales-popup"||o==="contact-sales-ixia-popup"||o==="contact-sales-create-popup"||o==="contact-sales-syndicate-popup")&&b){let m=document.querySelector(b).parentNode.querySelector(".mcDialog-inquiry-title");m&&d&&(m.innerHTML=d)}}if(f){let c=u.querySelector('input[name="abtestid"]');c&&(c.value=f)}let w=u.querySelector('input[name="local_time_zone"]');if(w&&(w.value=Intl.DateTimeFormat().resolvedOptions().timeZone),k){let c=u.querySelector('input[name="trial_support_key"]');c&&(c.value=k)}}})}catch(G){console.error(`Error: ${G.message}`)}}}),U)}else console.error("Failed to load HubSpot embed script or it was already present but hbspt.forms.create is missing.")});function We(){let t=document.querySelectorAll(".madForm-hubspot");if(t.length===0)return;let e=(n,l)=>{let r=n,i={};for(let a in r.dataset)i[a]=r.dataset[a];delete i.lazyRender,i.target||(r.id||(r.id=(r.dataset.formType||"form")+"-container-"+l),i.target="#"+r.id),window.renderHubSpotForm(i)};t.forEach((n,l)=>{if(!(n.dataset.lazyRender==="true"&&"IntersectionObserver"in window)){e(n,l);return}new IntersectionObserver((a,d)=>{a.forEach(f=>{f.isIntersecting&&(d.disconnect(),e(n,l))})},{rootMargin:"600px 0px"}).observe(n)})}We()});var Ge=Ie(ce());})();

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.