1"use strict";const SUBSCRIBE_NEWSLETTER_URL=API_BASE_URL+"/connect/newsletter/subscribe";class Newsletter{constructor(e,t){this._form=e,this._data=t}subscribe(){if(!$(this._form)[0].checkValidity()){$(this._form).find(":input").addClass("show-invalid"),this._data.errorMessage="Please fill in all required fields.";return}this._data.inProgress=!0,this._data.errorMessage="",this._data.success=!1,subscribeToNewsletter(this._data.email,this._data.listId,this._data.captcha).done(()=>{this.onSubscribeSucceeded()}).fail(e=>{this.onSubscribeFailed(e.responseJSON?.message||"Subscribing to newsletter failed.")})}onSubscribeFailed(e){this._data.success=!1,this._data.errorMessage=e,this._data.inProgress=!1}onSubscribeSucceeded(){this._data.success=!0,this._data.errorMessage="",this._data.inProgress=!1}}function subscribeToNewsletter(e,t,n){return $.ajax({url:SUBSCRIBE_NEWSLETTER_URL,type:"POST",data:JSON.stringify({email:e,listIds:[t],captcha:n}),contentType:"application/json; charset=utf-8",dataType:"json"})}
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.