1var f=Object.defineProperty;var S=(i,t,e)=>t in i?f(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var s=(i,t)=>f(i,"name",{value:t,configurable:!0});var p=(i,t,e)=>S(i,typeof t!="symbol"?t+"":t,e);import{g as x}from"./site-B0JexaGd.js";var c={exports:{}},d={exports:{}},v;function I(){return v||(v=1,(function(i,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r==null)throw new TypeError("Expected a string but received a ".concat(r));if(r.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(r.constructor.name))}s(e,"assertString"),i.exports=t.default,i.exports.default=t.default})(d,d.exports)),d.exports}s(I,"requireAssertString");var h={exports:{}},b;function _(){return b||(b=1,(function(i,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function e(n){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(n)}s(e,"_typeof");function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;(e(n)!=="object"||n===null)&&(n={});for(var u in a)typeof n[u]>"u"&&(n[u]=a[u]);return n}s(r,"merge"),i.exports=t.default,i.exports.default=t.default})(h,h.exports)),h.exports}s(_,"requireMerge");var y;function A(){return y||(y=1,(function(i,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var e=n(I()),r=n(_());function n(o){return o&&o.__esModule?o:{default:o}}s(n,"_interopRequireDefault");var a={ignore_whitespace:!1};function u(o,m){return(0,e.default)(o),m=(0,r.default)(m,a),(m.ignore_whitespace?o.trim().length:o.length)===0}s(u,"isEmpty"),i.exports=t.default,i.exports.default=t.default})(c,c.exports)),c.exports}s(A,"requireIsEmpty");var w=A();const g=x(w),l=class l{constructor(t,e={}){this.element=t,this.options={...l.Options,...e},this.valid=!1,this.init()}init(){return this.createChildRefs().enable(),this}createChildRefs(){return this.accountInput=this.element.querySelector("input[data-login-account]"),this.domainSelect=this.element.querySelector("select"),this.submitButton=this.element.querySelector('button[type="submit"]'),this.location=window.location,this}enable(){this.accountInput.addEventListener("blur",this.onInputBlur),this.element.addEventListener("submit",this.handleLoginSubmit)}validateField(){g(this.accountInput.value)||g(this.domainSelect.value)||!this.accountInput.value.trim().match(/^[a-zA-Z0-9-]+$/)?(this.valid=!1,this.onFormError()):(this.valid=!0,this.clearFormError())}onInputBlur=s(t=>{(!t.target.value.length||!this.accountInput.value.match(/^[a-zA-Z0-9-]+$/))&&this.validateField()},"onInputBlur");onInputInput=s(()=>{this.valid===!1&&this.clearFormError()},"onInputInput");onFormError(){this.error||(this.error=document.createElement("div"),this.options.errorClass.length>1&&this.error.classList.forEach(t=>{this.error.classList.add(t)}),this.error.classList.add("form__error-message","text-center"),this.error.setAttribute("id","email-error"),this.error.setAttribute("aria-live","assertive"),this.error.setAttribute("aria-atomic","true"),this.error.setAttribute("role","alert")),this.error.textContent=this.options.errorText,this.element.appendChild(this.error),this.accountInput.setAttribute("aria-invalid","true"),this.accountInput.setAttribute("aria-describedby","email-error"),this.accountInput.addEventListener("input",this.onInputInput),this.submitButton.setAttribute("aria-disabled","true")}clearFormError(){this.error?.remove(),this.accountInput.removeAttribute("aria-invalid"),this.accountInput.removeAttribute("aria-describedby"),this.submitButton.removeAttribute("aria-disabled")}addSectionElement(){const t=this.location.search,e=new URLSearchParams(t);if(e){const r=e.get("section");if(r){const n=document.createElement("input");n.type="hidden",n.name="section",n.value=r,this.element.appendChild(n)}}}handleLoginSubmit=s(async t=>{t.preventDefault();const{hostname:e}=window.location;if(this.validateField(),this.valid&&(this.addSectionElement(),this.element.action="/account/",this.element.submit(),this.submitButton.disabled=!0,e==="www.activecampaign.com")){const r=window.s_gi("activecampaign-subs-dev");r.events="event46",r.linkTrackVars="events,eVar46",r.linkTrackEvents="event46",r.eVar46=1,r.tl(this,"o","Is AC Customer Already")}},"handleLoginSubmit")};s(l,"Login"),p(l,"Options",{errorText:"Please enter a valid account name.",errorClass:["form__error-message","text-center"],errorAdjustmentStyle:"clamp(-1.3125rem, -1.2487rem + 0.3191vi, -1.6875rem)"});let E=l;export{E as default};
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.