diff --git a/scripts/upkeep b/scripts/upkeep index 96e5e7a24..bb76f31cd 100755 --- a/scripts/upkeep +++ b/scripts/upkeep @@ -75,8 +75,7 @@ echo "" echo "**************************************************" echo "Adding missing data files for NVRF..." echo "**************************************************" -cp -rfp ${app_path}/web/es/nvrf/data ${html_path}/es/nvrf -cp -rfp ${app_path}/web/nvrf/data ${html_path}/nvrf +cp -rfp ${app_path}/web/data ${html_path}/data echo "Missing data files for NVRF...completed!" echo "" diff --git a/web/es/nvrf/data/Federal_Voter_Registration_es.pdf b/web/data/es/nvrf/Federal_Voter_Registration_es.pdf similarity index 100% rename from web/es/nvrf/data/Federal_Voter_Registration_es.pdf rename to web/data/es/nvrf/Federal_Voter_Registration_es.pdf diff --git a/web/es/nvrf/data/navigation.json b/web/data/es/nvrf/navigation.json similarity index 100% rename from web/es/nvrf/data/navigation.json rename to web/data/es/nvrf/navigation.json diff --git a/web/es/nvrf/data/strings.json b/web/data/es/nvrf/strings.json similarity index 100% rename from web/es/nvrf/data/strings.json rename to web/data/es/nvrf/strings.json diff --git a/web/nvrf/data/Federal_Voter_Registration_en.pdf b/web/data/nvrf/Federal_Voter_Registration_en.pdf similarity index 100% rename from web/nvrf/data/Federal_Voter_Registration_en.pdf rename to web/data/nvrf/Federal_Voter_Registration_en.pdf diff --git a/web/nvrf/data/navigation.json b/web/data/nvrf/navigation.json similarity index 100% rename from web/nvrf/data/navigation.json rename to web/data/nvrf/navigation.json diff --git a/web/nvrf/data/strings.json b/web/data/nvrf/strings.json similarity index 100% rename from web/nvrf/data/strings.json rename to web/data/nvrf/strings.json diff --git a/web/modules/custom/vote_nvrf/dist/assets/index.js b/web/modules/custom/vote_nvrf/dist/assets/index.js index cfefeb779..dfbc1ee9f 100644 --- a/web/modules/custom/vote_nvrf/dist/assets/index.js +++ b/web/modules/custom/vote_nvrf/dist/assets/index.js @@ -66,7 +66,7 @@ Error generating stack: `+i.message+` `&&e.push(W2),i!==null&&e.push(lt(Cr(""+i))),null;case"input":e.push(Aa("input")),o=p=h=i=null;for(s in r)if(un.call(r,s)&&(d=r[s],d!=null))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(st(399,"input"));case"defaultChecked":o=d;break;case"defaultValue":h=d;break;case"checked":p=d;break;case"value":i=d;break;default:xn(e,n,s,d)}return p!==null?xn(e,n,"checked",p):o!==null&&xn(e,n,"checked",o),i!==null?xn(e,n,"value",i):h!==null&&xn(e,n,"value",h),e.push(V9),null;case"menuitem":e.push(Aa("menuitem"));for(var m in r)if(un.call(r,m)&&(i=r[m],i!=null))switch(m){case"children":case"dangerouslySetInnerHTML":throw Error(st(400));default:xn(e,n,m,i)}return e.push(Oi),null;case"title":e.push(Aa("title")),i=null;for(v in r)if(un.call(r,v)&&(s=r[v],s!=null))switch(v){case"children":i=s;break;case"dangerouslySetInnerHTML":throw Error(st(434));default:xn(e,n,v,s)}return e.push(Oi),i;case"listing":case"pre":e.push(Aa(t)),s=i=null;for(o in r)if(un.call(r,o)&&(h=r[o],h!=null))switch(o){case"children":i=h;break;case"dangerouslySetInnerHTML":s=h;break;default:xn(e,n,o,h)}if(e.push(Oi),s!=null){if(i!=null)throw Error(st(60));if(typeof s!="object"||!("__html"in s))throw Error(st(61));r=s.__html,r!=null&&(typeof r=="string"&&0"),lU=Ee(''),cU=Ee(""),dU=Ee(''),hU=Ee(""),pU=Ee(""),vU=Ee("");function U9(e,t,r){if(ze(e,dU),r===null)throw Error(st(395));return ze(e,r),Vt(e,fU)}var wU=Ee('"),OU=Ee('"),kU=Ee('"),TU=Ee(''),PU=Ee(""),NU=Ee(''),MU=Ee(""),zU=Ee(''),RU=Ee(""),LU=Ee(''),_U=Ee("");function BU(e,t,r,n){switch(r.insertionMode){case 0:case 1:return ze(e,wU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,bU);case 2:return ze(e,OU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,EU);case 3:return ze(e,kU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,jU);case 4:return ze(e,TU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,FU);case 5:return ze(e,NU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,AU);case 6:return ze(e,zU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,DU);case 7:return ze(e,LU),ze(e,t.segmentPrefix),ze(e,lt(n.toString(16))),Vt(e,IU);default:throw Error(st(397))}}function VU(e,t){switch(t.insertionMode){case 0:case 1:return Vt(e,xU);case 2:return Vt(e,SU);case 3:return Vt(e,CU);case 4:return Vt(e,PU);case 5:return Vt(e,MU);case 6:return Vt(e,RU);case 7:return Vt(e,_U);default:throw Error(st(397))}}var HU=Ee('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),UU=Ee('$RS("'),WU=Ee('","'),GU=Ee('")<\/script>'),qU=Ee('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),KU=Ee('$RC("'),XU=Ee('","'),ZU=Ee('")<\/script>'),YU=Ee('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),QU=Ee('$RX("'),JU=Ee('"'),$U=Ee(")<\/script>"),G2=Ee(","),eW=/[<\u2028\u2029]/g;function q2(e){return JSON.stringify(e).replace(eW,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var bu=Object.assign,tW=Symbol.for("react.element"),Aj=Symbol.for("react.portal"),Mj=Symbol.for("react.fragment"),zj=Symbol.for("react.strict_mode"),Dj=Symbol.for("react.profiler"),Rj=Symbol.for("react.provider"),Lj=Symbol.for("react.context"),Ij=Symbol.for("react.forward_ref"),_j=Symbol.for("react.suspense"),Bj=Symbol.for("react.suspense_list"),Vj=Symbol.for("react.memo"),rb=Symbol.for("react.lazy"),rW=Symbol.for("react.scope"),nW=Symbol.for("react.debug_trace_mode"),aW=Symbol.for("react.legacy_hidden"),iW=Symbol.for("react.default_value"),W9=Symbol.iterator;function bw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mj:return"Fragment";case Aj:return"Portal";case Dj:return"Profiler";case zj:return"StrictMode";case _j:return"Suspense";case Bj:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lj:return(e.displayName||"Context")+".Consumer";case Rj:return(e._context.displayName||"Context")+".Provider";case Ij:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vj:return t=e.displayName||null,t!==null?t:bw(e.type)||"Memo";case rb:t=e._payload,e=e._init;try{return bw(e(t))}catch{}}return null}var Hj={};function G9(e,t){if(e=e.contextTypes,!e)return Hj;var r={},n;for(n in e)r[n]=t[n];return r}var jo=null;function Bh(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var r=t.parent;if(e===null){if(r!==null)throw Error(st(401))}else{if(r===null)throw Error(st(401));Bh(e,r)}t.context._currentValue=t.value}}function Uj(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&Uj(e)}function Wj(e){var t=e.parent;t!==null&&Wj(t),e.context._currentValue=e.value}function Gj(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(st(402));e.depth===t.depth?Bh(e,t):Gj(e,t)}function qj(e,t){var r=t.parent;if(r===null)throw Error(st(402));e.depth===r.depth?Bh(e,r):qj(e,r),t.context._currentValue=t.value}function th(e){var t=jo;t!==e&&(t===null?Wj(e):e===null?Uj(t):t.depth===e.depth?Bh(t,e):t.depth>e.depth?Gj(t,e):qj(t,e),jo=e)}var q9={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function K9(e,t,r,n){var a=e.state!==void 0?e.state:null;e.updater=q9,e.props=r,e.state=a;var i={queue:[],replace:!1};e._reactInternals=i;var s=t.contextType;if(e.context=typeof s=="object"&&s!==null?s._currentValue:n,s=t.getDerivedStateFromProps,typeof s=="function"&&(s=s(r,a),a=s==null?a:bu({},a,s),e.state=a),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&q9.enqueueReplaceState(e,e.state,null),i.queue!==null&&0>=s,a-=s,{id:1<<32-lf(t)+a|r<>>=0,e===0?32:31-(sW(e)/lW|0)|0}function cW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dW=typeof Object.is=="function"?Object.is:cW,ii=null,nb=null,uf=null,It=null,tu=!1,rh=!1,Yu=0,zi=null,Vh=0;function bo(){if(ii===null)throw Error(st(321));return ii}function X9(){if(0e.progressiveChunkSize)n.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(n),U9(t,e.responseState,n.id),xd(e,t,r);else{if(Vt(t,cU),r=n.completedSegments,r.length!==1)throw Error(st(391));Hh(e,t,r[0])}return Vt(t,pU)}function rE(e,t,r){return BU(t,e.responseState,r.formatContext,r.id),Hh(e,t,r),VU(t,r.formatContext)}function nE(e,t,r){for(var n=r.completedSegments,a=0;a1?r-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:df;iE&&iE(e,null);let n=t.length;for(;n--;){let a=t[n];if(typeof a=="string"){const i=r(a);i!==a&&(gW(t)||(t[n]=i),a=i)}e[a]=!0}return e}function EW(e){for(let t=0;t/gm),TW=ta(/\${[\w\W]*}/gm),FW=ta(/^data-[\-\w.\u00B7-\uFFFF]/),PW=ta(/^aria-[\-\w]+$/),rC=ta(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NW=ta(/^(?:\w+script|data):/i),AW=ta(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nC=ta(/^html$/i),MW=ta(/^[a-z][.\w]*(-[.\w]+)+$/i);var fE=Object.freeze({__proto__:null,MUSTACHE_EXPR:jW,ERB_EXPR:CW,TMPLIT_EXPR:TW,DATA_ATTR:FW,ARIA_ATTR:PW,IS_ALLOWED_URI:rC,IS_SCRIPT_OR_DATA:NW,ATTR_WHITESPACE:AW,DOCTYPE_NAME:nC,CUSTOM_ELEMENT:MW});const Il={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},zW=function(){return typeof window>"u"?null:window},DW=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function aC(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zW();const t=De=>aC(De);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==Il.document)return t.isSupported=!1,t;let{document:r}=e;const n=r,a=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:h,Element:o,NodeFilter:d,NamedNodeMap:p=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:v,DOMParser:m,trustedTypes:g}=e,w=o.prototype,O=Ll(w,"cloneNode"),S=Ll(w,"remove"),y=Ll(w,"nextSibling"),x=Ll(w,"childNodes"),E=Ll(w,"parentNode");if(typeof s=="function"){const De=r.createElement("template");De.content&&De.content.ownerDocument&&(r=De.content.ownerDocument)}let k,F="";const{implementation:A,createNodeIterator:M,createDocumentFragment:R,getElementsByTagName:H}=r,{importNode:G}=n;let _={};t.isSupported=typeof eC=="function"&&typeof E=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:X,ERB_EXPR:K,TMPLIT_EXPR:se,DATA_ATTR:be,ARIA_ATTR:ve,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:Y}=fE;let{IS_ALLOWED_URI:$}=fE,ue=null;const oe=ut({},[...lE,...Z2,...Y2,...Q2,...uE]);let Ae=null;const _e=ut({},[...cE,...J2,...dE,...Ed]);let ke=Object.seal(tC(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),nt=null,At=null,tt=!0,Er=!0,dt=!1,sr=!0,lr=!1,Qt=!0,Vr=!1,Sa=!1,xe=!1,Z=!1,Me=!1,ft=!1,Mt=!0,Gt=!1;const ci="user-content-";let nn=!0,oa=!1,an={},gn=null;const kc=ut({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zo=null;const jc=ut({},["audio","video","img","source","image","track"]);let Yo=null;const Cc=ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),di="http://www.w3.org/1998/Math/MathML",Qo="http://www.w3.org/2000/svg",In="http://www.w3.org/1999/xhtml";let fi=In,oo=!1,hl=null;const Tc=ut({},[di,Qo,In],X2);let so=null;const pl=["application/xhtml+xml","text/html"],u0="text/html";let er=null,hi=null;const vl=r.createElement("form"),Fc=function(B){return B instanceof RegExp||B instanceof Function},Jo=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(hi&&hi===B)){if((!B||typeof B!="object")&&(B={}),B=go(B),so=pl.indexOf(B.PARSER_MEDIA_TYPE)===-1?u0:B.PARSER_MEDIA_TYPE,er=so==="application/xhtml+xml"?X2:df,ue=ca(B,"ALLOWED_TAGS")?ut({},B.ALLOWED_TAGS,er):oe,Ae=ca(B,"ALLOWED_ATTR")?ut({},B.ALLOWED_ATTR,er):_e,hl=ca(B,"ALLOWED_NAMESPACES")?ut({},B.ALLOWED_NAMESPACES,X2):Tc,Yo=ca(B,"ADD_URI_SAFE_ATTR")?ut(go(Cc),B.ADD_URI_SAFE_ATTR,er):Cc,Zo=ca(B,"ADD_DATA_URI_TAGS")?ut(go(jc),B.ADD_DATA_URI_TAGS,er):jc,gn=ca(B,"FORBID_CONTENTS")?ut({},B.FORBID_CONTENTS,er):kc,nt=ca(B,"FORBID_TAGS")?ut({},B.FORBID_TAGS,er):{},At=ca(B,"FORBID_ATTR")?ut({},B.FORBID_ATTR,er):{},an=ca(B,"USE_PROFILES")?B.USE_PROFILES:!1,tt=B.ALLOW_ARIA_ATTR!==!1,Er=B.ALLOW_DATA_ATTR!==!1,dt=B.ALLOW_UNKNOWN_PROTOCOLS||!1,sr=B.ALLOW_SELF_CLOSE_IN_ATTR!==!1,lr=B.SAFE_FOR_TEMPLATES||!1,Qt=B.SAFE_FOR_XML!==!1,Vr=B.WHOLE_DOCUMENT||!1,Z=B.RETURN_DOM||!1,Me=B.RETURN_DOM_FRAGMENT||!1,ft=B.RETURN_TRUSTED_TYPE||!1,xe=B.FORCE_BODY||!1,Mt=B.SANITIZE_DOM!==!1,Gt=B.SANITIZE_NAMED_PROPS||!1,nn=B.KEEP_CONTENT!==!1,oa=B.IN_PLACE||!1,$=B.ALLOWED_URI_REGEXP||rC,fi=B.NAMESPACE||In,ke=B.CUSTOM_ELEMENT_HANDLING||{},B.CUSTOM_ELEMENT_HANDLING&&Fc(B.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=B.CUSTOM_ELEMENT_HANDLING.tagNameCheck),B.CUSTOM_ELEMENT_HANDLING&&Fc(B.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=B.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),B.CUSTOM_ELEMENT_HANDLING&&typeof B.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ke.allowCustomizedBuiltInElements=B.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),lr&&(Er=!1),Me&&(Z=!0),an&&(ue=ut({},uE),Ae=[],an.html===!0&&(ut(ue,lE),ut(Ae,cE)),an.svg===!0&&(ut(ue,Z2),ut(Ae,J2),ut(Ae,Ed)),an.svgFilters===!0&&(ut(ue,Y2),ut(Ae,J2),ut(Ae,Ed)),an.mathMl===!0&&(ut(ue,Q2),ut(Ae,dE),ut(Ae,Ed))),B.ADD_TAGS&&(ue===oe&&(ue=go(ue)),ut(ue,B.ADD_TAGS,er)),B.ADD_ATTR&&(Ae===_e&&(Ae=go(Ae)),ut(Ae,B.ADD_ATTR,er)),B.ADD_URI_SAFE_ATTR&&ut(Yo,B.ADD_URI_SAFE_ATTR,er),B.FORBID_CONTENTS&&(gn===kc&&(gn=go(gn)),ut(gn,B.FORBID_CONTENTS,er)),nn&&(ue["#text"]=!0),Vr&&ut(ue,["html","head","body"]),ue.table&&(ut(ue,["tbody"]),delete nt.tbody),B.TRUSTED_TYPES_POLICY){if(typeof B.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof B.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=B.TRUSTED_TYPES_POLICY,F=k.createHTML("")}else k===void 0&&(k=DW(g,a)),k!==null&&typeof F=="string"&&(F=k.createHTML(""));Jr&&Jr(B),hi=B}},Pc=ut({},["mi","mo","mn","ms","mtext"]),$o=ut({},["foreignobject","annotation-xml"]),c0=ut({},["title","style","font","a","script"]),ml=ut({},[...Z2,...Y2,...SW]),Nc=ut({},[...Q2,...kW]),gl=function(B){let me=E(B);(!me||!me.tagName)&&(me={namespaceURI:fi,tagName:"template"});const Ne=df(B.tagName),Dt=df(me.tagName);return hl[B.namespaceURI]?B.namespaceURI===Qo?me.namespaceURI===In?Ne==="svg":me.namespaceURI===di?Ne==="svg"&&(Dt==="annotation-xml"||Pc[Dt]):!!ml[Ne]:B.namespaceURI===di?me.namespaceURI===In?Ne==="math":me.namespaceURI===Qo?Ne==="math"&&$o[Dt]:!!Nc[Ne]:B.namespaceURI===In?me.namespaceURI===Qo&&!$o[Dt]||me.namespaceURI===di&&!Pc[Dt]?!1:!Nc[Ne]&&(c0[Ne]||!ml[Ne]):!!(so==="application/xhtml+xml"&&hl[B.namespaceURI]):!1},_n=function(B){zl(t.removed,{element:B});try{E(B).removeChild(B)}catch{S(B)}},lo=function(B,me){try{zl(t.removed,{attribute:me.getAttributeNode(B),from:me})}catch{zl(t.removed,{attribute:null,from:me})}if(me.removeAttribute(B),B==="is"&&!Ae[B])if(Z||Me)try{_n(me)}catch{}else try{me.setAttribute(B,"")}catch{}},Ac=function(B){let me=null,Ne=null;if(xe)B=""+B;else{const cr=sE(B,/^[\r\n\t ]+/);Ne=cr&&cr[0]}so==="application/xhtml+xml"&&fi===In&&(B=''+B+"");const Dt=k?k.createHTML(B):B;if(fi===In)try{me=new m().parseFromString(Dt,so)}catch{}if(!me||!me.documentElement){me=A.createDocument(fi,"template",null);try{me.documentElement.innerHTML=oo?F:Dt}catch{}}const ur=me.body||me.documentElement;return B&&Ne&&ur.insertBefore(r.createTextNode(Ne),ur.childNodes[0]||null),fi===In?H.call(me,Vr?"html":"body")[0]:Vr?me.documentElement:ur},es=function(B){return M.call(B.ownerDocument||B,B,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Mc=function(B){return B instanceof v&&(typeof B.nodeName!="string"||typeof B.textContent!="string"||typeof B.removeChild!="function"||!(B.attributes instanceof p)||typeof B.removeAttribute!="function"||typeof B.setAttribute!="function"||typeof B.namespaceURI!="string"||typeof B.insertBefore!="function"||typeof B.hasChildNodes!="function")},yl=function(B){return typeof h=="function"&&B instanceof h},sa=function(B,me,Ne){_[B]&&Od(_[B],Dt=>{Dt.call(t,me,Ne,hi)})},ts=function(B){let me=null;if(sa("beforeSanitizeElements",B,null),Mc(B))return _n(B),!0;const Ne=er(B.nodeName);if(sa("uponSanitizeElement",B,{tagName:Ne,allowedTags:ue}),B.hasChildNodes()&&!yl(B.firstElementChild)&&Gr(/<[/\w]/g,B.innerHTML)&&Gr(/<[/\w]/g,B.textContent)||B.nodeType===Il.progressingInstruction||Qt&&B.nodeType===Il.comment&&Gr(/<[/\w]/g,B.data))return _n(B),!0;if(!ue[Ne]||nt[Ne]){if(!nt[Ne]&&wl(Ne)&&(ke.tagNameCheck instanceof RegExp&&Gr(ke.tagNameCheck,Ne)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Ne)))return!1;if(nn&&!gn[Ne]){const Dt=E(B)||B.parentNode,ur=x(B)||B.childNodes;if(ur&&Dt){const cr=ur.length;for(let yr=cr-1;yr>=0;--yr){const Bn=O(ur[yr],!0);Bn.__removalCount=(B.__removalCount||0)+1,Dt.insertBefore(Bn,y(B))}}}return _n(B),!0}return B instanceof o&&!gl(B)||(Ne==="noscript"||Ne==="noembed"||Ne==="noframes")&&Gr(/<\/no(script|embed|frames)/i,B.innerHTML)?(_n(B),!0):(lr&&B.nodeType===Il.text&&(me=B.textContent,Od([X,K,se],Dt=>{me=Dl(me,Dt," ")}),B.textContent!==me&&(zl(t.removed,{element:B.cloneNode()}),B.textContent=me)),sa("afterSanitizeElements",B,null),!1)},zc=function(B,me,Ne){if(Mt&&(me==="id"||me==="name")&&(Ne in r||Ne in vl))return!1;if(!(Er&&!At[me]&&Gr(be,me))){if(!(tt&&Gr(ve,me))){if(!Ae[me]||At[me]){if(!(wl(B)&&(ke.tagNameCheck instanceof RegExp&&Gr(ke.tagNameCheck,B)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(B))&&(ke.attributeNameCheck instanceof RegExp&&Gr(ke.attributeNameCheck,me)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(me))||me==="is"&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&Gr(ke.tagNameCheck,Ne)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Ne))))return!1}else if(!Yo[me]){if(!Gr($,Dl(Ne,W,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&B!=="script"&&bW(Ne,"data:")===0&&Zo[B])){if(!(dt&&!Gr(Q,Dl(Ne,W,"")))){if(Ne)return!1}}}}}}return!0},wl=function(B){return B!=="annotation-xml"&&sE(B,Y)},Dc=function(B){sa("beforeSanitizeAttributes",B,null);const{attributes:me}=B;if(!me)return;const Ne={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae};let Dt=me.length;for(;Dt--;){const ur=me[Dt],{name:cr,namespaceURI:yr,value:Bn}=ur,pi=er(cr);let Sr=cr==="value"?Bn:xW(Bn);if(Ne.attrName=pi,Ne.attrValue=Sr,Ne.keepAttr=!0,Ne.forceKeepAttr=void 0,sa("uponSanitizeAttribute",B,Ne),Sr=Ne.attrValue,Qt&&Gr(/((--!?|])>)|<\/(style|title)/i,Sr)){lo(cr,B);continue}if(Ne.forceKeepAttr||(lo(cr,B),!Ne.keepAttr))continue;if(!sr&&Gr(/\/>/i,Sr)){lo(cr,B);continue}lr&&Od([X,K,se],Rc=>{Sr=Dl(Sr,Rc," ")});const rs=er(B.nodeName);if(zc(rs,pi,Sr)){if(Gt&&(pi==="id"||pi==="name")&&(lo(cr,B),Sr=ci+Sr),k&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!yr)switch(g.getAttributeType(rs,pi)){case"TrustedHTML":{Sr=k.createHTML(Sr);break}case"TrustedScriptURL":{Sr=k.createScriptURL(Sr);break}}try{yr?B.setAttributeNS(yr,cr,Sr):B.setAttribute(cr,Sr),Mc(B)?_n(B):oE(t.removed)}catch{}}}sa("afterSanitizeAttributes",B,null)},bl=function De(B){let me=null;const Ne=es(B);for(sa("beforeSanitizeShadowDOM",B,null);me=Ne.nextNode();)sa("uponSanitizeShadowNode",me,null),!ts(me)&&(me.content instanceof i&&De(me.content),Dc(me));sa("afterSanitizeShadowDOM",B,null)};return t.sanitize=function(De){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=null,Ne=null,Dt=null,ur=null;if(oo=!De,oo&&(De=""),typeof De!="string"&&!yl(De))if(typeof De.toString=="function"){if(De=De.toString(),typeof De!="string")throw Rl("dirty is not a string, aborting")}else throw Rl("toString is not a function");if(!t.isSupported)return De;if(Sa||Jo(B),t.removed=[],typeof De=="string"&&(oa=!1),oa){if(De.nodeName){const Bn=er(De.nodeName);if(!ue[Bn]||nt[Bn])throw Rl("root node is forbidden and cannot be sanitized in-place")}}else if(De instanceof h)me=Ac(""),Ne=me.ownerDocument.importNode(De,!0),Ne.nodeType===Il.element&&Ne.nodeName==="BODY"||Ne.nodeName==="HTML"?me=Ne:me.appendChild(Ne);else{if(!Z&&!lr&&!Vr&&De.indexOf("<")===-1)return k&&ft?k.createHTML(De):De;if(me=Ac(De),!me)return Z?null:ft?F:""}me&&xe&&_n(me.firstChild);const cr=es(oa?De:me);for(;Dt=cr.nextNode();)ts(Dt)||(Dt.content instanceof i&&bl(Dt.content),Dc(Dt));if(oa)return De;if(Z){if(Me)for(ur=R.call(me.ownerDocument);me.firstChild;)ur.appendChild(me.firstChild);else ur=me;return(Ae.shadowroot||Ae.shadowrootmode)&&(ur=G.call(n,ur,!0)),ur}let yr=Vr?me.outerHTML:me.innerHTML;return Vr&&ue["!doctype"]&&me.ownerDocument&&me.ownerDocument.doctype&&me.ownerDocument.doctype.name&&Gr(nC,me.ownerDocument.doctype.name)&&(yr=" -`+yr),lr&&Od([X,K,se],Bn=>{yr=Dl(yr,Bn," ")}),k&&ft?k.createHTML(yr):yr},t.setConfig=function(){let De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jo(De),Sa=!0},t.clearConfig=function(){hi=null,Sa=!1},t.isValidAttribute=function(De,B,me){hi||Jo({});const Ne=er(De),Dt=er(B);return zc(Ne,Dt,me)},t.addHook=function(De,B){typeof B=="function"&&(_[De]=_[De]||[],zl(_[De],B))},t.removeHook=function(De){if(_[De])return oE(_[De])},t.removeHooks=function(De){_[De]&&(_[De]=[])},t.removeAllHooks=function(){_={}},t}var iC=aC();iC.setConfig({ADD_ATTR:["target"]});const hE=document.documentElement.lang,oC=hE!=="en"?`/${hE}`:"",Sd=async(e,t,r)=>{const n=`${[]}${oC}/nvrf/assets/${e}`,a=await fetch(n).then(i=>i.json()).catch(()=>r(!0));t(a)},pE=async(e,t,r)=>{const n=`${[]}${oC}/nvrf/data/${e}`,a=await fetch(n).then(i=>i.json()).catch(()=>r(!0));t(a)},nr=e=>iC.sanitize(e),sC=e=>{if(!document.getElementById(e).checkValidity()){const t=document.getElementById(e).querySelectorAll(":invalid")[0];let r;r=t.id==="eligibility-checkbox"||t.id==="acknowledge-checkbox"?t.parentNode.parentNode:t.parentNode,r.className="vote-error-container"}},ga=(e,t)=>{let r=e.currentTarget,n=r.id==="date_of_birth_month"||r.id==="date_of_birth_day"||r.id==="date_of_birth_year",a;a=r.id==="eligibility-checkbox"||r.id==="date_of_birth"||r.id==="acknowledge-checkbox"?r.parentNode.parentNode:r.parentNode,a=n?r.parentNode.parentNode.parentNode.parentNode:a,t?a.className="vote-error-container":a.className=""},vE=(e,t)=>{/^[0-9]$/i.test(e.key)&&e.target.value.length==e.target.maxLength&&document.getElementById(t).focus()},ff=(e,t)=>{let r=["Backspace","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Tab"],n=/^[A-Za-z\s]*$/;if(!r.includes(e.key)){if(t==="letters"&&!e.key.match(n)){e.preventDefault();return}else if(t==="number"&&isNaN(e.key)){e.preventDefault();return}}},RW=e=>{e=e.replace(/\D/g,"");var t=e.length;return t>0&&(e="("+e),t>3&&(e=e.slice(0,4)+") "+e.slice(4,11)),t>6&&(e=e.slice(0,9)+"-"+e.slice(9)),e},hc=(e,t)=>{const r=e.target.value,n=e.target.required;if(r||n)switch(t){case"check value exists":return!r;case"check value length":let a=e.target.minLength,i=e.target.maxLength>-1?e.target.maxLength:Number.MAX_SAFE_INTEGER;return e.target.value.length>=a&&e.target.value.length<=i?(e.target.setCustomValidity(""),!1):(e.target.setCustomValidity(" "),!0);case"check state selection":return r==="";default:return}};function LW(e){let t=e.content;const r=e.navContent,n=e.stateData,a=e.stringContent,i=e.fieldContent,s=e.returnPath;t=t.find(g=>g.uuid==="94eab1c9-8343-4747-94b4-08732a175614");const h=i.find(g=>g.uuid==="39fc63ad-ed5a-4ad5-98d3-aa236c96c61c"),d=nr(t.body).split("@reg_confirm_eligibility"),p=nr(h.instructions),v={eligibilityTitle:"Before you get started page"},m=()=>b.jsx("ul",{children:b.jsx("li",{dangerouslySetInnerHTML:{__html:n.postmarked_mail_deadline||n.received_mail_deadline}})});return b.jsxs(b.Fragment,{children:[s&&b.jsx("a",{href:s,className:"usa-button usa-button--outline maxw-mobile-lg width-full tablet:width-auto",children:b.jsx("span",{children:r.back.state_reg_options})}),b.jsxs("div",{className:"margin-top-5 maxw-tablet margin-x-auto",children:[b.jsx("h1",{children:t.title.replace("@state_name",n.name)}),b.jsx("div",{className:"margin-top-5",dangerouslySetInnerHTML:{__html:d[0].replace("@state_name",n.name).replace("@reg_eligibility_desc",n.reg_eligibility_desc)}}),b.jsxs(ie.Form,{id:"eligibility",autoComplete:"off",className:"margin-top-2",style:{maxWidth:"none"},onSubmit:g=>{g.preventDefault(),e.handleNext(),dataLayer.push({NVRF_page_title:v.eligibilityTitle,event:"NVRF_STEP_SUBMIT"})},children:[b.jsxs("div",{className:"input-parent","data-test":"checkBox",children:[b.jsx(ie.Label,{id:"confirm-eligibility",for:"eligibility-checkbox",className:"margin-top-1",children:b.jsx("strong",{children:h.name})}),b.jsx(ie.Checkbox,{id:"eligibility-checkbox",name:"eligibility-checkbox",value:"eligibility-checkbox",label:sH(i,"39fc63ad-ed5a-4ad5-98d3-aa236c96c61c"),"aria-required":"true","aria-labelledby":"confirm-eligibility","aria-describedby":"eligibility-checkbox_error",required:!0,defaultChecked:e.hasConfirmed,onChange:g=>e.confirmCheckbox(g.target.checked),onInvalid:g=>g.target.setCustomValidity(" "),onInput:g=>g.target.setCustomValidity(""),onBlur:g=>ga(g,!e.hasConfirmed)}),b.jsx("span",{id:"eligibility-checkbox_error",role:"alert",className:"vote-error-text","data-test":"errorText",children:lH(i,"39fc63ad-ed5a-4ad5-98d3-aa236c96c61c")})]}),b.jsx("div",{className:"margin-top-2",dangerouslySetInnerHTML:{__html:p}}),b.jsx("div",{className:"margin-top-5",dangerouslySetInnerHTML:{__html:d[1].replace("@state_name",n.name).replace("@mail_deadline",$j(m()))}}),b.jsx(tj,{stringContent:a,type:"submit",onClick:g=>sC("eligibility"),text:r.next.start})]})]})]})}function IW(e){const t=e.content,r=e.cards,n=e.navContent,a=e.stringContent,i=t.find(m=>m.uuid==="b3299979-e26c-4885-a949-e1a2c27de91b"),s=r.find(m=>m.uuid==="0ac52b5d-4381-4b4e-830e-38319f3a3757"),h=r.find(m=>m.uuid==="3abd804c-2787-44f9-a06b-ad6d63ca797f"),o=nr(i.body),d=nr(s.body),p=nr(h.body),v={pathSelectionTitle:"Path Selection page"};return b.jsxs(b.Fragment,{children:[b.jsx(ej,{stringContent:a,type:"button",onClick:e.handlePrev,text:n.back.eligibility_req}),b.jsxs("div",{className:"margin-top-5 maxw-tablet margin-x-auto",children:[b.jsx("h1",{children:i.title.replace("@state_name",e.stateData.name)}),b.jsx("div",{dangerouslySetInnerHTML:{__html:o}}),b.jsxs(ie.CardGroup,{className:"padding-top-4",children:[b.jsxs(ie.Card,{className:"card-info",gridLayout:{tablet:{col:6}},containerProps:{className:"border-1px border-gray-30 radius-md"},children:[b.jsx(ie.CardHeader,{className:"container-test-3",children:b.jsx("h3",{className:"usa-card__heading",children:s.heading.replace("@state_name",e.stateData.name)})}),b.jsx(ie.CardBody,{dangerouslySetInnerHTML:{__html:d}}),b.jsx(ie.CardFooter,{className:"margin-top-3",children:b.jsxs(ie.Button,{"data-test":"pathBtn",type:"submit",onClick:()=>{e.getRegPath("update"),e.handleNext(),dataLayer.push({NVRF_path:"update_registration_path",NVRF_page_title:v.pathSelectionTitle,event:"NVRF_STEP_SUBMIT"})},children:[b.jsx("span",{children:s.button_label}),b.jsx(ie.Icon.ArrowForward,{"aria-label":a.forwardIcon,style:{margin:"-3px -3px -3px 4px"}})]})})]}),b.jsxs(ie.Card,{className:"card-info",gridLayout:{tablet:{col:6}},containerProps:{className:"border-1px border-gray-30 radius-md"},children:[b.jsx(ie.CardHeader,{children:b.jsx("h3",{className:"usa-card__heading",children:h.heading.replace("@state_name",e.stateData.name)})}),b.jsx(ie.CardBody,{dangerouslySetInnerHTML:{__html:p}}),b.jsx(ie.CardFooter,{className:"margin-top-3",children:b.jsxs(ie.Button,{"data-test":"pathBtn",type:"submit",onClick:()=>{e.getRegPath("new"),e.handleNext(),dataLayer.push({NVRF_path:"new_registration_path",NVRF_page_title:v.pathSelectionTitle,event:"NVRF_STEP_SUBMIT"})},children:[b.jsx("span",{children:h.button_label}),b.jsx(ie.Icon.ArrowForward,{"aria-label":a.forwardIcon,style:{margin:"-3px -3px -3px 4px"}})]})})]})]})]})]})}function _W(e){const t={1:`Step one of six: ${e.content.step_label_1}`,2:`Step two of six: ${e.content.step_label_2}`,3:`Step three of six: ${e.content.step_label_3}`,4:`Step four of six: ${e.content.step_label_4}`,5:`Step five of six: ${e.content.step_label_5}`,6:`Step six of six: ${e.content.step_label_6}`};let r=t[e.step];const n=o=>{if(e.step===o)return"current";if(e.step>o)return"complete"},a=e.handleGoBack,i=e.setStep,s=Object.keys(t).length,h=o=>e.stepparseInt(o)).map(o=>b.jsx(ie.StepIndicatorStep,{className:h(o),label:e.content[`step_label_${o}`],"data-analytics":"Step indicator "+e.content[`step_label_${o}`],status:n(o),tabIndex:n(o)==="complete"?0:null,onKeyDown:d=>{d.key==="Enter"&&n(o)==="complete"&&i(o)},onClick:n(o)==="complete"&&e.step!==s?a(e.step-o):null},o))})]})}function BW({inputData:e,saveFieldData:t,fieldData:r}){const n=e.type||"text",a=e.check||"check value exists",i=e.id+"-hint",s=e.id+"_error",[h,o]=at.useState(e.help_text?i:s);return b.jsx(ie.TextInput,{"data-test":e.dataTest,id:e.id,className:"radius-md","aria-describedby":h,name:e.id,type:n,autoComplete:"off",required:parseInt(e.required),minLength:e.minLength,maxLength:e.maxLength,inputMode:e.inputMode,value:r[e.id],onChange:t(e.id),onBlur:d=>ga(d,hc(d,a)),onKeyDown:d=>ff(d,e.inputMode),onInvalid:d=>{d.target.setCustomValidity(" "),o(s)},onInput:d=>{d.target.setCustomValidity(""),o(i)}})}function VW({inputData:e,saveFieldData:t,fieldData:r,stringContent:n}){return b.jsx(ie.Select,{"data-test":e.dataTest,id:e.id,className:"radius-md","aria-describedby":`${e.id}_error`,name:e.id,disabled:e.disabled,required:parseInt(e.required),value:e.value,onChange:t(e.id),autoComplete:"off",onBlur:a=>{ga(a,hc(a,"check value exists"))},onInvalid:a=>a.target.setCustomValidity(" "),onInput:a=>a.target.setCustomValidity(""),children:b.jsxs(ma.Fragment,{children:[b.jsx("option",{value:"",children:n.select}),e.options.map((a,i)=>b.jsx("option",{value:a.value,children:a.key},i))]},".0")})}function Nt({fieldType:e,inputData:t,saveFieldData:r,fieldData:n,stringContent:a}){function i(s){switch(s){case"text":return b.jsx(BW,{inputData:t,saveFieldData:r,fieldData:n});case"select":return b.jsx(VW,{inputData:t,saveFieldData:r,fieldData:n,stringContent:a})}}return b.jsx(b.Fragment,{children:b.jsxs("div",{className:"input-parent",children:[b.jsxs(ie.Label,{className:"text-bold",htmlFor:t.id,children:[t.label,parseInt(t.required)===1&&b.jsx("span",{children:"*"})]}),t.help_text&&b.jsx("span",{className:"usa-hint",id:`${t.id}-hint`,children:t.help_text}),i(e),t.error_msg&&b.jsx("span",{id:`${t.id}_error`,role:"alert",className:"vote-error-text","data-test":"errorText",children:t.error_msg})]})})}function HW(e){const t="b7bdae35-e4be-4827-ae11-75d9c3e33bf0",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"first_name",dataTest:"firstName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function UW(e){const t="eeff4fa1-00f2-474b-a791-1a4146dab11a",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"suffix",dataTest:"select",required:"0",label:r.label,options:r.options,value:e.fieldData.suffix},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function WW(e){const t="b306238a-a0f6-4bb8-b8ea-b3216ca75e0b",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"last_name",dataTest:"lastName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function GW(e){const t="86a544cd-cfe9-456a-b634-176a37a38d6d",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"title",dataTest:"select",required:"0",label:r.label,options:r.options,error_msg:r.error_msg,help_text:r.help_text,value:e.fieldData.title},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function qW(e){const t="38020ec6-1b53-4227-99e5-feea5f60af07",r=Ie(e.fieldContent,t);return Ie(e.stateData.nvrf_fields,r.uuid),b.jsx(Nt,{fieldType:"text",inputData:{id:"middle_name",dataTest:"middleName",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function KW({inputData:e,saveFieldData:t,dateFormat:r,fieldData:n}){const a=(i,s)=>{let h=n.date_of_birth_month,o=n.date_of_birth_day,d=n.date_of_birth_year,p=d.slice(0,2);if(s==="all")return[h.length===2,o.length===2,d.length===4,h<=12,h>=1,o<=31,o>=1,p<=20,p>=19].includes(!1)?(i.target.setCustomValidity(" "),!0):!1;if(s==="month")return h>12||h<1;if(s==="day")return o>31||o<1};return b.jsxs("div",{id:e.id,className:"usa-memorable-date",name:e.id,autoComplete:"off",required:parseInt(e.required),"data-testid":"dateInputGroup",onBlur:i=>{i.currentTarget.contains(i.relatedTarget)||ga(i,a(i,"all"))},children:[b.jsxs("div",{"data-testid":"formGroup",className:"usa-form-group usa-form-group--month",children:[b.jsx("label",{"data-testid":"label",className:"usa-label",htmlFor:`${e.id}_month`,children:e.stringContent.month}),b.jsx("input",{"data-test":`${e.dataTest}Month`,id:`${e.id}_month`,className:"usa-input radius-md","aria-describedby":`${e.id}_error`,name:`${e.id}_month`,label:e.stringContent.month,unit:"month",required:!0,"aria-invalid":!1,type:"text",pattern:"0[1-9]|1[0,1,2]",inputMode:"numeric",maxLength:2,minLength:2,value:n[`${e.id}_month`],onInput:t(`${e.id}_month`),onKeyUp:i=>vE(i,`${e.id}_day`),onKeyDown:i=>{ff(i,"number"),i.target.setCustomValidity("")},onBlur:i=>{r(i,`${e.id}_month`),ga(i,a(i,"month"))},onInvalid:i=>i.target.setCustomValidity(" ")})]}),b.jsxs("div",{"data-testid":"formGroup",className:"usa-form-group usa-form-group--day",children:[b.jsx("label",{"data-testid":"label",className:"usa-label",htmlFor:`${e.id}_day`,children:e.stringContent.day}),b.jsx("input",{"data-test":`${e.dataTest}Day`,id:`${e.id}_day`,className:"usa-input radius-md","aria-describedby":`${e.id}_error`,name:`${e.id}_day`,label:e.stringContent.day,unit:"day",required:!0,"aria-invalid":!1,type:"text",pattern:"0[1-9]|[12][0-9]|3[01]",inputMode:"numeric",minLength:2,maxLength:2,value:n[`${e.id}_day`],onInput:t(`${e.id}_day`),onKeyUp:i=>vE(i,`${e.id}_year`),onKeyDown:i=>{ff(i,"number"),i.target.setCustomValidity("")},onBlur:i=>{r(i,`${e.id}_day`),ga(i,a(i,"day"))},onInvalid:i=>i.target.setCustomValidity(" ")})]}),b.jsxs("div",{"data-testid":"formGroup",className:"usa-form-group usa-form-group--year",children:[b.jsx("label",{"data-testid":"label",className:"usa-label",htmlFor:`${e.id}_year`,children:e.stringContent.year}),b.jsx("input",{"data-test":`${e.dataTest}Year`,id:`${e.id}_year`,className:"usa-input radius-md","aria-describedby":`${e.id}_error`,name:`${e.id}_year`,label:e.stringContent.year,unit:"year",required:!0,"aria-invalid":!1,type:"text",pattern:"19\\d{2}|20\\d{2}",inputMode:"numeric",minLength:4,maxLength:4,value:n[`${e.id}_year`],onInput:t(`${e.id}_year`),onKeyDown:i=>{ff(i,"number"),i.target.setCustomValidity("")},onBlur:i=>ga(i,hc(i,"check value length")),onInvalid:i=>i.target.setCustomValidity(" ")})]})]})}function XW({fieldType:e,inputData:t,saveFieldData:r,dateFormat:n,fieldData:a}){function i(s){switch(s){case"date":return b.jsx(KW,{inputData:t,saveFieldData:r,dateFormat:n,fieldData:a})}}return b.jsx(b.Fragment,{children:b.jsx("div",{className:"input-parent",children:b.jsxs(ie.Fieldset,{className:"fieldset",legend:t.required?[b.jsx("span",{className:"text-bold",children:t.label},0),b.jsx("span",{className:"required-text",children:"*"},1)]:t.stringContent,style:{marginTop:"30px"},children:[b.jsx("span",{className:"usa-hint",id:`${t.id} + '-hint'`,children:t.help_text}),i(e),b.jsx("span",{id:`${t.id}_error`,role:"alert",className:"vote-error-text","data-test":"errorText",children:t.error_msg})]})})})}function ZW(e){const t="d31b2a64-36a9-4bc6-a9d1-e68d2be8c211",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return n&&b.jsx(XW,{fieldType:"date",inputData:{id:"date_of_birth",dataTest:"dob",required:n.required,label:r.label,stringContent:e.stringContent,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,dateFormat:e.dateFormat})}function YW(e){const t="a4919026-91ac-4e05-a75f-e2df479abd76",r=Ie(e.fieldContent,t);return Ie(e.stateData.nvrf_fields,r.uuid),b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_middle_name",dataTest:"prevMiddleName",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function QW(e){const t="f282e541-7ca8-4c22-8d87-d4cff56e22e5",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_first_name",dataTest:"prevFirstName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function JW(e){const t="34d2669a-d30b-4001-b897-280fe71b3cb0",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"prev_title",dataTest:"select",required:"0",label:r.label,options:r.options,error_msg:r.error_msg,help_text:r.help_text,value:e.fieldData.prev_title},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function $W(e){const t="42de34cc-ebf3-4d8e-8873-2571063b62c0",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_last_name",dataTest:"prevLastName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function eG(e){const t="2d61b54a-e568-410f-825a-0ca82dfd3f63",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"phone_number",dataTest:"phoneNumber",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text,type:"tel",maxLength:14,minLength:14,check:"check value length"},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function tG(e){const t="09cb2989-d302-4a01-bb3a-33173adcffb2",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"prev_suffix",dataTest:"select",required:"0",label:r.label,options:r.options,value:e.fieldData.prev_suffix},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function rG(e){const t="2bfff6c6-6782-4b14-ac45-642efd278f6a",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"select",inputData:{id:"race",dataTest:"select",required:n.required,label:r.label,options:r.options,value:e.fieldData.race,error_msg:r.error_msg},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function nG(e){const t=e.headings,r=e.fieldContent,n=e.registrationPath==="update",a=e.stateData.nvrf_fields,i=e.stringContent,s=r.find(S=>S.uuid==="8dda085c-edf3-4678-b30a-0a457699be46"),h=r.find(S=>S.uuid==="af4e6259-5b07-4955-9d28-254504ec9df8"),o=r.find(S=>S.uuid==="b7bdae35-e4be-4827-ae11-75d9c3e33bf0"),d=r.find(S=>S.uuid==="2d61b54a-e568-410f-825a-0ca82dfd3f63"),p=r.find(S=>S.uuid==="2bfff6c6-6782-4b14-ac45-642efd278f6a"),v=nr(s.section_description),m=nr(s.section_alert),g=a.find(S=>S.uuid===o.uuid),w=a.find(S=>S.uuid===d.uuid),O=a.find(S=>S.uuid===p.uuid);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_1}),n&&b.jsx(ie.Checkbox,{id:"prev-name-change","aria-describedby":"prev-name-change_alert",name:"prev-name-change","data-test":"checkBox",checked:e.previousName,onChange:e.onChangePreviousName,label:i.nameChange}),b.jsx("div",{id:"prev-name-change_alert",className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:m}})})}),b.jsx("h3",{className:"margin-top-5",children:s.label}),b.jsx("div",{dangerouslySetInnerHTML:{__html:v}}),g&&b.jsxs(b.Fragment,{children:[b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:2},children:b.jsx(GW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(HW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(qW,{...e})})]}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx(WW,{...e})}),b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx(UW,{...e})})]})]}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(ZW,{...e,dateFormat:e.dateFormat})}),w&&b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(eG,{...e})})]}),b.jsx(ie.Grid,{row:!0,className:"email-address-input",style:{overflow:"hidden",position:"absolute",top:"0",left:"0",height:"0",width:"0",zIndex:"-1"},children:b.jsxs("div",{className:"input-parent",children:[b.jsxs(ie.Label,{className:"text-bold",htmlFor:"voter-contact","aria-hidden":"true",children:["Voter Contact",b.jsx("span",{className:"required-text",children:"*"})]}),b.jsx("span",{className:"usa-hint",children:"Voter Contact"}),b.jsx(ie.TextInput,{"data-test":"email",id:"voter-contact",type:"email",required:!0,"aria-invalid":!1,className:"radius-md",autoComplete:"off",tabIndex:"-1","aria-hidden":"true",value:e.fieldData.email_address,onChange:e.saveFieldData("email_address"),onBlur:S=>ga(S,hc(S,"check value length")),onInvalid:S=>S.target.setCustomValidity(" "),onInput:S=>S.target.setCustomValidity("")})]})}),O&&b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx("div",{className:"input-parent",children:b.jsx(rG,{...e})})})}),e.previousName&&n&&b.jsxs(b.Fragment,{children:[b.jsx("h3",{className:"margin-top-8",children:h.label}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:2},children:b.jsx(JW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(QW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(YW,{...e})})]}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx($W,{...e})}),b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx(tG,{...e})})]})]})]})}function aG(e){const t="fe3a2a1d-34bd-472b-a843-3fa0635c4f40",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid),a=e.statesList.map(i=>({key:i,value:i}));return b.jsx(Nt,{fieldType:"select",inputData:{id:"state",dataTest:"select",required:n.required,label:r.label,disabled:!0,options:a,value:e.stateData.name,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function iG(e){const t="6dcb9e8c-b40a-4cda-ba5c-06b98c3375f4",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"street_address",dataTest:"street",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function oG(e){const t="cdb06542-0cbd-4aa3-897f-83377b8d65e5",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"zip_code",dataTest:"zip",required:n.required,label:r.label,minLength:5,maxLength:5,inputMode:"number",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function sG(e){const t="7e39a528-7518-40cb-b7b6-b635864dc117",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"city",dataTest:"city",required:n.required,label:r.label,inputMode:"letters",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function lG(e){const t="deba9b54-68ad-4ef1-8fb5-ee34e4ab8a49",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"text",inputData:{id:"apt_num",dataTest:"aptNumber",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function uG(e){const t="c4f9c0cb-2a25-4f1d-a93a-b06a19656cfe",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"mail_zip_code",dataTest:"mailZip",required:n.required,label:r.label,minLength:5,maxLength:5,inputType:"number",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function cG(e){const t="49a90983-1925-438f-8271-88f39bf19bf1",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_zip_code",dataTest:"prevZip",required:n.required,label:r.label,minLength:5,maxLength:5,inputType:"number",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function dG(e){const t="44bf0a5c-adba-4b47-bc99-cc46cede5e80",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_city",dataTest:"prevCity",required:n.required,label:r.label,inputMode:"letters",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function fG(e){const t="db9b1f7a-565b-4aad-8d7c-56a553c18326",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"mail_street_address",dataTest:"mailStreet",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function hG(e){const t="b0f80289-6084-4723-8278-110fda210f0d",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid),a=e.statesList.map(i=>({key:i,value:i}));return b.jsx(Nt,{fieldType:"select",inputData:{id:"mail_state",dataTest:"select",required:n.required,label:r.label,options:a,value:e.fieldData.mail_state,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function pG(e){const t="c8e2ff17-fb1f-4971-a664-ffbb557b305a",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_apt_num",dataTest:"prevAptNumber",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function vG(e){const t="c037a3ea-86b7-4661-ad28-c7228f1e682b",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_street_address",dataTest:"prevStreet",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function mG(e){const t="9a5baee7-357b-4e59-b4f2-fe2525c0fd6c",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"mail_city",dataTest:"mailCity",required:n.required,label:r.label,inputType:"letters",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function gG(e){const t="5a8a4b6d-c0f1-42f2-b991-8ea49a32e997",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid),a=e.statesList.map(i=>({key:i,value:i}));return b.jsx(Nt,{fieldType:"select",inputData:{id:"prev_state",dataTest:"select",required:n.required,label:r.label,options:a,value:e.fieldData.prev_state,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function yG(e){const t=e.headings,r=e.fieldContent,n=e.registrationPath==="update"||e.stateData.name=="Maine",a=e.stateData.nvrf_fields;e.stringContent;const i=r.find(y=>y.uuid==="63552bb6-6afb-46e1-8148-860242917a22"),s=r.find(y=>y.uuid==="6dcb9e8c-b40a-4cda-ba5c-06b98c3375f4"),h=r.find(y=>y.uuid==="023fda0f-e8bd-4654-ab5c-46f44a0b7bd6"),o=r.find(y=>y.uuid==="c3011c62-d174-420c-817a-bffbcd45687a"),d=r.find(y=>y.uuid==="1a856408-6fb2-4b09-b05a-8d8ee9eb9bb5"),p=r.find(y=>y.uuid==="35c2b98d-477c-45f3-9f93-f720406080f1"),v=r.find(y=>y.uuid==="e7340274-ee3f-4d73-a967-c9d7c249be7b"),m=r.find(y=>y.uuid==="3724c7cd-5ec7-4e3e-85cd-db0cab63e99b"),g=r.find(y=>y.uuid==="6dd20906-654e-427e-bb82-1e62aee9ed72"),w=a.find(y=>y.uuid===s.uuid),O=nr(m.label),S=nr(g.label);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_2}),w&&b.jsxs(b.Fragment,{children:[!n&&b.jsx("span",{className:"usa-hint",id:"addresses-checkbox-hint",children:O}),n&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"usa-hint",id:"addresses-checkbox-hint",children:S}),b.jsx(ie.Checkbox,{id:"prev-address",name:"prev-address","data-test":"checkBox",checked:e.hasPreviousAddress,onChange:e.onChangePreviousAddressCheckbox,label:o.label})]}),b.jsx(ie.Checkbox,{id:"no-address","aria-describedby":"no-address_alert",className:"margin-bottom-4",name:"no-addr","data-test":"checkBox",checked:e.hasNoAddress,onChange:e.hasNoAddressCheckbox,label:p.label}),!e.hasNoAddress&&b.jsxs(b.Fragment,{children:[i.section_alert&&b.jsx("div",{id:"no-address_alert",className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:i.section_alert}})})}),b.jsx("h3",{className:"margin-top-5",children:i.label}),i.instructions&&b.jsx("div",{dangerouslySetInnerHTML:{__html:i.instructions}}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:12},children:b.jsx(iG,{...e})})}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(lG,{...e})})}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(sG,{...e})}),b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(aG,{...e})}),b.jsx(ie.Grid,{tablet:{col:3},children:b.jsx(oG,{...e})})]}),b.jsx(ie.Checkbox,{"data-test":"checkBox",className:"margin-top-3",id:"alt-mail-addr",name:"alt-mail-addr",checked:e.hasMailAddress,onChange:e.onChangeMailAddressCheckbox,label:v.label})]}),(e.hasMailAddress||e.hasNoAddress)&&b.jsxs(b.Fragment,{children:[e.hasNoAddress&&b.jsx("div",{className:"usa-alert usa-alert--info",role:"alert",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:d.section_alert}})})}),b.jsx("h3",{className:"margin-top-8",children:d.label}),d.section_description&&b.jsx("div",{dangerouslySetInnerHTML:{__html:d.section_description}}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:12},children:b.jsx(fG,{...e})})}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:!0},children:b.jsx(mG,{...e})}),b.jsx(ie.Grid,{tablet:{col:!0},children:b.jsx(hG,{...e})}),b.jsx(ie.Grid,{tablet:{col:!0},children:b.jsx(uG,{...e})})]})]}),e.hasPreviousAddress&&b.jsxs(b.Fragment,{children:[h.section_alert&&b.jsx("div",{className:"usa-alert usa-alert--info",role:"alert",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:h.section_alert}})})}),b.jsx("h3",{className:"margin-top-8",children:h.label}),h.instructions&&b.jsx("div",{dangerouslySetInnerHTML:{__html:h.instructions}}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:12},children:b.jsx(vG,{...e})})}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(pG,{...e})})}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(dG,{...e})}),b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(gG,{...e})}),b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(cG,{...e})})]})]})]})]})}function wG(e){const t="acd7f272-7a37-43f0-b51a-c78daf31e5fd",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"id_number",dataTest:"driverId",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function bG(e){const t="1e030197-52e7-426e-923c-b67ef521ae3b",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"ssn_number",dataTest:"ssn",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text,type:"numeric",inputMode:"number",maxLength:4,minLength:4,check:"check value length"},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function xG(e){const t="fe8cf91e-f872-4ed7-848c-09c99a7d83c8",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"ssn_number",dataTest:"ssn",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text,type:"numeric",inputMode:"number",maxLength:9,minLength:9,check:"check value length"},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function OG(e){const t="e2da00fa-0f1b-4e98-9472-c00649266eb4",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"id_number",dataTest:"stateId",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function EG(e){const t=e.headings,r=e.stateData,n=e.fieldContent,a=e.stringContent,i=e.stateData.nvrf_fields,s=n.find(k=>k.uuid==="27d3a15c-f8c0-4035-9b0a-c2c0f674519c"),h=n.find(k=>k.uuid==="acd7f272-7a37-43f0-b51a-c78daf31e5fd"),o=n.find(k=>k.uuid==="e2da00fa-0f1b-4e98-9472-c00649266eb4"),d=n.find(k=>k.uuid==="1e030197-52e7-426e-923c-b67ef521ae3b"),p=n.find(k=>k.uuid==="fe8cf91e-f872-4ed7-848c-09c99a7d83c8"),v=n.find(k=>k.uuid==="eb0ce8c5-b4f7-4aae-a0b9-84f0434d2edb"),m=nr(s.instructions),g=nr(r.id_inst),w=nr(v.instructions),O=i.find(k=>k.uuid===h.uuid),S=i.find(k=>k.uuid===o.uuid),y=i.find(k=>k.uuid===p.uuid),x=i.find(k=>k.uuid===d.uuid),E=i.find(k=>k.uuid===v.uuid);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_3}),g&&b.jsx("div",{id:"id_alert",className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:g}})})}),r.abbrev==="mo"?b.jsx(b.Fragment,{children:b.jsx(ie.Checkbox,{id:"id-none",name:"id-none",checked:e.hasNoID,onChange:e.onChangeHasNoIdCheckbox,label:v.label})}):b.jsxs(b.Fragment,{children:[b.jsxs("h3",{className:"margin-top-5",children:[s.label,b.jsx("span",{className:"required-text",children:"*"})]}),b.jsx("div",{dangerouslySetInnerHTML:{__html:m}}),b.jsxs("div",{className:"input-parent",children:[b.jsx(ie.Select,{id:"id-selection",name:"id-selection","aria-label":a.idSelectionAriaLabel,"aria-describedby":"id-selection_error","data-test":"dropDown",value:e.idType,required:!0,"aria-invalid":!1,onChange:k=>e.saveIdType(k),onBlur:k=>ga(k,hc(k,"check value exists")),onInvalid:k=>k.target.setCustomValidity(" "),onInput:k=>{k.target.setCustomValidity(""),ga(k,!1)},children:b.jsxs(ma.Fragment,{children:[b.jsx("option",{value:"",children:s.options[0].key},"default"),O&&b.jsx("option",{value:"driver-id-num",children:h.label},"driver-id-num"),S&&b.jsx("option",{value:"state-id-num",children:o.label},"state-id-num"),y&&b.jsx("option",{value:"ssn-full",children:p.label},"ssn-full"),x&&b.jsx("option",{value:"ssn",children:d.label},"ssn"),E&&b.jsx("option",{value:"none",children:v.label},"id-none")]},".0")}),b.jsx("span",{id:"id-selection_error",role:"alert",className:"vote-error-text","data-test":"errorText",children:e.idType===""&&o.error_msg})]})]}),b.jsxs("div",{id:"state-id",className:"input-parent",children:[(e.idType==="driver-id-num"||e.idType==="state-id-num"||r.abbrev==="mo"&&e.idType!="none")&&b.jsxs(b.Fragment,{children:[(e.idType==="driver-id-num"||r.abbrev==="mo")&&b.jsx(b.Fragment,{children:b.jsx(wG,{...e})}),e.idType==="state-id-num"&&b.jsx(b.Fragment,{children:b.jsx(OG,{...e})})]}),(e.idType==="ssn"||r.abbrev==="mo"&&e.idType!="none")&&b.jsx(b.Fragment,{children:b.jsx(bG,{...e})}),e.idType==="ssn-full"&&b.jsx(b.Fragment,{children:b.jsx(xG,{...e})}),e.idType==="none"&&b.jsx("div",{"aria-live":"polite",className:"margin-top-2",dangerouslySetInnerHTML:{__html:w}})]})]})}function SG(e){const t=e.headings,r=e.content,n=e.fieldData,a=e.fieldContent,i=e.stringContent,s=n.street_address+n.apt_num+n.city+n.zip_code,h=n.prev_title+n.prev_first_name+n.prev_middle_name+n.prev_last_name+n.prev_suffix,o=n.prev_street_address+n.prev_apt_num+n.prev_city+n.prev_state+n.prev_zip_code,d=n.mail_street_address+n.mail_apt_num+n.mail_city+n.mail_state+n.mail_zip_code,p=n.race===""?i.notRequired:n.race,v=n.party_choice===""?i.notRequired:n.party_choice,m=e.stateData.name;n.state=m;const g=n.id_number===""&&n.ssn_number===""?"none":n.id_number+" "+n.ssn_number,w=r.find(E=>E.uuid==="560cd01c-42d1-4f58-a702-372c2ff6bbd9"),O=nr(w.body),S=nr(w.instructions),y=E=>a.find(k=>k.uuid===E).label,x=E=>a.find(k=>k.uuid===E).error_msg;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"confirm-info",children:[b.jsx("h1",{children:w.title}),b.jsx("div",{dangerouslySetInnerHTML:{__html:O}}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_1}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(4),title:"Return to Personal information, step one of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.current_name.label})}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("86a544cd-cfe9-456a-b634-176a37a38d6d"),": ",n.title]}),b.jsxs("li",{children:[y("b7bdae35-e4be-4827-ae11-75d9c3e33bf0"),": ",n.first_name]}),b.jsxs("li",{children:[y("38020ec6-1b53-4227-99e5-feea5f60af07"),": ",n.middle_name]}),b.jsxs("li",{children:[y("b306238a-a0f6-4bb8-b8ea-b3216ca75e0b"),": ",n.last_name]}),b.jsxs("li",{children:[y("eeff4fa1-00f2-474b-a791-1a4146dab11a"),": ",n.suffix]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.previous_name.label})}),!h&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.previous_name.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("34d2669a-d30b-4001-b897-280fe71b3cb0"),": ",n.prev_title]}),b.jsxs("li",{children:[y("f282e541-7ca8-4c22-8d87-d4cff56e22e5"),": ",n.prev_first_name]}),b.jsxs("li",{children:[y("a4919026-91ac-4e05-a75f-e2df479abd76"),": ",n.prev_middle_name]}),b.jsxs("li",{children:[y("42de34cc-ebf3-4d8e-8873-2571063b62c0"),": ",n.prev_last_name]}),b.jsxs("li",{children:[y("09cb2989-d302-4a01-bb3a-33173adcffb2"),": ",n.prev_suffix]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.other_info.label})}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("d31b2a64-36a9-4bc6-a9d1-e68d2be8c211"),": ",n.date_of_birth_month,"/",n.date_of_birth_day,"/",n.date_of_birth_year]}),b.jsxs("li",{children:[y("2d61b54a-e568-410f-825a-0ca82dfd3f63"),": ",n.phone_number]}),b.jsxs("li",{children:[y("2bfff6c6-6782-4b14-ac45-642efd278f6a"),": ",p]})]}),b.jsx("hr",{}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_2}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(3),title:"Return to Address and location, step two of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.current_address.label})}),!s&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.current_address.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("6dcb9e8c-b40a-4cda-ba5c-06b98c3375f4"),": ",n.street_address]}),b.jsxs("li",{children:[y("deba9b54-68ad-4ef1-8fb5-ee34e4ab8a49"),": ",n.apt_num]}),b.jsxs("li",{children:[y("7e39a528-7518-40cb-b7b6-b635864dc117"),": ",n.city]}),b.jsxs("li",{children:[y("fe3a2a1d-34bd-472b-a843-3fa0635c4f40"),": ",m]}),b.jsxs("li",{children:[y("cdb06542-0cbd-4aa3-897f-83377b8d65e5"),": ",n.zip_code]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.previous_address.label})}),!o&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.previous_address.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("c037a3ea-86b7-4661-ad28-c7228f1e682b"),": ",n.prev_street_address]}),b.jsxs("li",{children:[y("c8e2ff17-fb1f-4971-a664-ffbb557b305a"),": ",n.prev_apt_num]}),b.jsxs("li",{children:[y("44bf0a5c-adba-4b47-bc99-cc46cede5e80"),": ",n.prev_city]}),b.jsxs("li",{children:[y("5a8a4b6d-c0f1-42f2-b991-8ea49a32e997"),": ",n.prev_state]}),b.jsxs("li",{children:[y("49a90983-1925-438f-8271-88f39bf19bf1"),": ",n.prev_zip_code]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.mailing_address.label})}),!d&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.mailing_address.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("db9b1f7a-565b-4aad-8d7c-56a553c18326"),": ",n.mail_street_address]}),b.jsxs("li",{children:[y("9a5baee7-357b-4e59-b4f2-fe2525c0fd6c"),": ",n.mail_city]}),b.jsxs("li",{children:[y("b0f80289-6084-4723-8278-110fda210f0d"),": ",n.mail_state]}),b.jsxs("li",{children:[y("c4f9c0cb-2a25-4f1d-a93a-b06a19656cfe"),": ",n.mail_zip_code]})]}),b.jsx("hr",{}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_3}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(2),title:"Return to Identification, step three of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("ul",{children:b.jsxs("li",{children:[t.confirmation.id_label.label,": ",g]})}),b.jsx("hr",{}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_4}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(1),title:"Return to Political party, step four of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("ul",{children:b.jsxs("li",{children:[t.confirmation.political_party.label,": ",v]})}),b.jsx("hr",{})]}),S&&b.jsx("div",{id:"acknowledge-check-alert",className:"usa-alert usa-alert--info margin-top-6",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:S}})})}),b.jsxs("div",{className:"input-parent",children:[b.jsx(ie.Checkbox,{"data-test":"confirm",id:"acknowledge-checkbox",name:"acknowledge-check","aria-describedby":"acknowledge-check-alert",required:!0,defaultChecked:e.hasAcknowledged,label:y("73e74065-fd5a-43c0-907c-268120e34bc3"),onChange:E=>e.acknowledgeCheckbox(E.target.checked),onBlur:E=>ga(E,!e.hasAcknowledged),onInvalid:E=>E.target.setCustomValidity(" "),onInput:E=>E.target.setCustomValidity("")}),b.jsx("span",{id:"first-name-error",role:"alert",className:"vote-error-text","data-test":"errorText",children:x("73e74065-fd5a-43c0-907c-268120e34bc3")})]})]})}var lC={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(_S,function(){return function r(n,a,i){var s=window,h="application/octet-stream",o=i||h,d=n,p=!a&&!i&&d,v=document.createElement("a"),m=function(M){return String(M)},g=s.Blob||s.MozBlob||s.WebKitBlob||m,w=a||"download",O,S;if(g=g.call?g.bind(s):Blob,String(this)==="true"&&(d=[d,o],o=d[0],d=d[1]),p&&p.length<2048&&(w=p.split("/").pop().split("?")[0],v.href=p,v.href.indexOf(p)!==-1)){var y=new XMLHttpRequest;return y.open("GET",p,!0),y.responseType="blob",y.onload=function(M){r(M.target.response,w,h)},setTimeout(function(){y.send()},0),y}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==m)d=F(d),o=d.type||h;else return navigator.msSaveBlob?navigator.msSaveBlob(F(d),w):A(d);else if(/([\x80-\xff])/.test(d)){var x=0,E=new Uint8Array(d.length),k=E.length;for(x;x{yr=Dl(yr,Bn," ")}),k&&ft?k.createHTML(yr):yr},t.setConfig=function(){let De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jo(De),Sa=!0},t.clearConfig=function(){hi=null,Sa=!1},t.isValidAttribute=function(De,B,me){hi||Jo({});const Ne=er(De),Dt=er(B);return zc(Ne,Dt,me)},t.addHook=function(De,B){typeof B=="function"&&(_[De]=_[De]||[],zl(_[De],B))},t.removeHook=function(De){if(_[De])return oE(_[De])},t.removeHooks=function(De){_[De]&&(_[De]=[])},t.removeAllHooks=function(){_={}},t}var iC=aC();iC.setConfig({ADD_ATTR:["target"]});const hE=document.documentElement.lang,oC=hE!=="en"?`/${hE}`:"",Sd=async(e,t,r)=>{const n=`${[]}${oC}/nvrf/assets/${e}`,a=await fetch(n).then(i=>i.json()).catch(()=>r(!0));t(a)},pE=async(e,t,r)=>{const n=`${[]}/data${oC}/nvrf/${e}`,a=await fetch(n).then(i=>i.json()).catch(()=>r(!0));t(a)},nr=e=>iC.sanitize(e),sC=e=>{if(!document.getElementById(e).checkValidity()){const t=document.getElementById(e).querySelectorAll(":invalid")[0];let r;r=t.id==="eligibility-checkbox"||t.id==="acknowledge-checkbox"?t.parentNode.parentNode:t.parentNode,r.className="vote-error-container"}},ga=(e,t)=>{let r=e.currentTarget,n=r.id==="date_of_birth_month"||r.id==="date_of_birth_day"||r.id==="date_of_birth_year",a;a=r.id==="eligibility-checkbox"||r.id==="date_of_birth"||r.id==="acknowledge-checkbox"?r.parentNode.parentNode:r.parentNode,a=n?r.parentNode.parentNode.parentNode.parentNode:a,t?a.className="vote-error-container":a.className=""},vE=(e,t)=>{/^[0-9]$/i.test(e.key)&&e.target.value.length==e.target.maxLength&&document.getElementById(t).focus()},ff=(e,t)=>{let r=["Backspace","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Tab"],n=/^[A-Za-z\s]*$/;if(!r.includes(e.key)){if(t==="letters"&&!e.key.match(n)){e.preventDefault();return}else if(t==="number"&&isNaN(e.key)){e.preventDefault();return}}},RW=e=>{e=e.replace(/\D/g,"");var t=e.length;return t>0&&(e="("+e),t>3&&(e=e.slice(0,4)+") "+e.slice(4,11)),t>6&&(e=e.slice(0,9)+"-"+e.slice(9)),e},hc=(e,t)=>{const r=e.target.value,n=e.target.required;if(r||n)switch(t){case"check value exists":return!r;case"check value length":let a=e.target.minLength,i=e.target.maxLength>-1?e.target.maxLength:Number.MAX_SAFE_INTEGER;return e.target.value.length>=a&&e.target.value.length<=i?(e.target.setCustomValidity(""),!1):(e.target.setCustomValidity(" "),!0);case"check state selection":return r==="";default:return}};function LW(e){let t=e.content;const r=e.navContent,n=e.stateData,a=e.stringContent,i=e.fieldContent,s=e.returnPath;t=t.find(g=>g.uuid==="94eab1c9-8343-4747-94b4-08732a175614");const h=i.find(g=>g.uuid==="39fc63ad-ed5a-4ad5-98d3-aa236c96c61c"),d=nr(t.body).split("@reg_confirm_eligibility"),p=nr(h.instructions),v={eligibilityTitle:"Before you get started page"},m=()=>b.jsx("ul",{children:b.jsx("li",{dangerouslySetInnerHTML:{__html:n.postmarked_mail_deadline||n.received_mail_deadline}})});return b.jsxs(b.Fragment,{children:[s&&b.jsx("a",{href:s,className:"usa-button usa-button--outline maxw-mobile-lg width-full tablet:width-auto",children:b.jsx("span",{children:r.back.state_reg_options})}),b.jsxs("div",{className:"margin-top-5 maxw-tablet margin-x-auto",children:[b.jsx("h1",{children:t.title.replace("@state_name",n.name)}),b.jsx("div",{className:"margin-top-5",dangerouslySetInnerHTML:{__html:d[0].replace("@state_name",n.name).replace("@reg_eligibility_desc",n.reg_eligibility_desc)}}),b.jsxs(ie.Form,{id:"eligibility",autoComplete:"off",className:"margin-top-2",style:{maxWidth:"none"},onSubmit:g=>{g.preventDefault(),e.handleNext(),dataLayer.push({NVRF_page_title:v.eligibilityTitle,event:"NVRF_STEP_SUBMIT"})},children:[b.jsxs("div",{className:"input-parent","data-test":"checkBox",children:[b.jsx(ie.Label,{id:"confirm-eligibility",for:"eligibility-checkbox",className:"margin-top-1",children:b.jsx("strong",{children:h.name})}),b.jsx(ie.Checkbox,{id:"eligibility-checkbox",name:"eligibility-checkbox",value:"eligibility-checkbox",label:sH(i,"39fc63ad-ed5a-4ad5-98d3-aa236c96c61c"),"aria-required":"true","aria-labelledby":"confirm-eligibility","aria-describedby":"eligibility-checkbox_error",required:!0,defaultChecked:e.hasConfirmed,onChange:g=>e.confirmCheckbox(g.target.checked),onInvalid:g=>g.target.setCustomValidity(" "),onInput:g=>g.target.setCustomValidity(""),onBlur:g=>ga(g,!e.hasConfirmed)}),b.jsx("span",{id:"eligibility-checkbox_error",role:"alert",className:"vote-error-text","data-test":"errorText",children:lH(i,"39fc63ad-ed5a-4ad5-98d3-aa236c96c61c")})]}),b.jsx("div",{className:"margin-top-2",dangerouslySetInnerHTML:{__html:p}}),b.jsx("div",{className:"margin-top-5",dangerouslySetInnerHTML:{__html:d[1].replace("@state_name",n.name).replace("@mail_deadline",$j(m()))}}),b.jsx(tj,{stringContent:a,type:"submit",onClick:g=>sC("eligibility"),text:r.next.start})]})]})]})}function IW(e){const t=e.content,r=e.cards,n=e.navContent,a=e.stringContent,i=t.find(m=>m.uuid==="b3299979-e26c-4885-a949-e1a2c27de91b"),s=r.find(m=>m.uuid==="0ac52b5d-4381-4b4e-830e-38319f3a3757"),h=r.find(m=>m.uuid==="3abd804c-2787-44f9-a06b-ad6d63ca797f"),o=nr(i.body),d=nr(s.body),p=nr(h.body),v={pathSelectionTitle:"Path Selection page"};return b.jsxs(b.Fragment,{children:[b.jsx(ej,{stringContent:a,type:"button",onClick:e.handlePrev,text:n.back.eligibility_req}),b.jsxs("div",{className:"margin-top-5 maxw-tablet margin-x-auto",children:[b.jsx("h1",{children:i.title.replace("@state_name",e.stateData.name)}),b.jsx("div",{dangerouslySetInnerHTML:{__html:o}}),b.jsxs(ie.CardGroup,{className:"padding-top-4",children:[b.jsxs(ie.Card,{className:"card-info",gridLayout:{tablet:{col:6}},containerProps:{className:"border-1px border-gray-30 radius-md"},children:[b.jsx(ie.CardHeader,{className:"container-test-3",children:b.jsx("h3",{className:"usa-card__heading",children:s.heading.replace("@state_name",e.stateData.name)})}),b.jsx(ie.CardBody,{dangerouslySetInnerHTML:{__html:d}}),b.jsx(ie.CardFooter,{className:"margin-top-3",children:b.jsxs(ie.Button,{"data-test":"pathBtn",type:"submit",onClick:()=>{e.getRegPath("update"),e.handleNext(),dataLayer.push({NVRF_path:"update_registration_path",NVRF_page_title:v.pathSelectionTitle,event:"NVRF_STEP_SUBMIT"})},children:[b.jsx("span",{children:s.button_label}),b.jsx(ie.Icon.ArrowForward,{"aria-label":a.forwardIcon,style:{margin:"-3px -3px -3px 4px"}})]})})]}),b.jsxs(ie.Card,{className:"card-info",gridLayout:{tablet:{col:6}},containerProps:{className:"border-1px border-gray-30 radius-md"},children:[b.jsx(ie.CardHeader,{children:b.jsx("h3",{className:"usa-card__heading",children:h.heading.replace("@state_name",e.stateData.name)})}),b.jsx(ie.CardBody,{dangerouslySetInnerHTML:{__html:p}}),b.jsx(ie.CardFooter,{className:"margin-top-3",children:b.jsxs(ie.Button,{"data-test":"pathBtn",type:"submit",onClick:()=>{e.getRegPath("new"),e.handleNext(),dataLayer.push({NVRF_path:"new_registration_path",NVRF_page_title:v.pathSelectionTitle,event:"NVRF_STEP_SUBMIT"})},children:[b.jsx("span",{children:h.button_label}),b.jsx(ie.Icon.ArrowForward,{"aria-label":a.forwardIcon,style:{margin:"-3px -3px -3px 4px"}})]})})]})]})]})]})}function _W(e){const t={1:`Step one of six: ${e.content.step_label_1}`,2:`Step two of six: ${e.content.step_label_2}`,3:`Step three of six: ${e.content.step_label_3}`,4:`Step four of six: ${e.content.step_label_4}`,5:`Step five of six: ${e.content.step_label_5}`,6:`Step six of six: ${e.content.step_label_6}`};let r=t[e.step];const n=o=>{if(e.step===o)return"current";if(e.step>o)return"complete"},a=e.handleGoBack,i=e.setStep,s=Object.keys(t).length,h=o=>e.stepparseInt(o)).map(o=>b.jsx(ie.StepIndicatorStep,{className:h(o),label:e.content[`step_label_${o}`],"data-analytics":"Step indicator "+e.content[`step_label_${o}`],status:n(o),tabIndex:n(o)==="complete"?0:null,onKeyDown:d=>{d.key==="Enter"&&n(o)==="complete"&&i(o)},onClick:n(o)==="complete"&&e.step!==s?a(e.step-o):null},o))})]})}function BW({inputData:e,saveFieldData:t,fieldData:r}){const n=e.type||"text",a=e.check||"check value exists",i=e.id+"-hint",s=e.id+"_error",[h,o]=at.useState(e.help_text?i:s);return b.jsx(ie.TextInput,{"data-test":e.dataTest,id:e.id,className:"radius-md","aria-describedby":h,name:e.id,type:n,autoComplete:"off",required:parseInt(e.required),minLength:e.minLength,maxLength:e.maxLength,inputMode:e.inputMode,value:r[e.id],onChange:t(e.id),onBlur:d=>ga(d,hc(d,a)),onKeyDown:d=>ff(d,e.inputMode),onInvalid:d=>{d.target.setCustomValidity(" "),o(s)},onInput:d=>{d.target.setCustomValidity(""),o(i)}})}function VW({inputData:e,saveFieldData:t,fieldData:r,stringContent:n}){return b.jsx(ie.Select,{"data-test":e.dataTest,id:e.id,className:"radius-md","aria-describedby":`${e.id}_error`,name:e.id,disabled:e.disabled,required:parseInt(e.required),value:e.value,onChange:t(e.id),autoComplete:"off",onBlur:a=>{ga(a,hc(a,"check value exists"))},onInvalid:a=>a.target.setCustomValidity(" "),onInput:a=>a.target.setCustomValidity(""),children:b.jsxs(ma.Fragment,{children:[b.jsx("option",{value:"",children:n.select}),e.options.map((a,i)=>b.jsx("option",{value:a.value,children:a.key},i))]},".0")})}function Nt({fieldType:e,inputData:t,saveFieldData:r,fieldData:n,stringContent:a}){function i(s){switch(s){case"text":return b.jsx(BW,{inputData:t,saveFieldData:r,fieldData:n});case"select":return b.jsx(VW,{inputData:t,saveFieldData:r,fieldData:n,stringContent:a})}}return b.jsx(b.Fragment,{children:b.jsxs("div",{className:"input-parent",children:[b.jsxs(ie.Label,{className:"text-bold",htmlFor:t.id,children:[t.label,parseInt(t.required)===1&&b.jsx("span",{children:"*"})]}),t.help_text&&b.jsx("span",{className:"usa-hint",id:`${t.id}-hint`,children:t.help_text}),i(e),t.error_msg&&b.jsx("span",{id:`${t.id}_error`,role:"alert",className:"vote-error-text","data-test":"errorText",children:t.error_msg})]})})}function HW(e){const t="b7bdae35-e4be-4827-ae11-75d9c3e33bf0",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"first_name",dataTest:"firstName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function UW(e){const t="eeff4fa1-00f2-474b-a791-1a4146dab11a",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"suffix",dataTest:"select",required:"0",label:r.label,options:r.options,value:e.fieldData.suffix},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function WW(e){const t="b306238a-a0f6-4bb8-b8ea-b3216ca75e0b",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"last_name",dataTest:"lastName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function GW(e){const t="86a544cd-cfe9-456a-b634-176a37a38d6d",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"title",dataTest:"select",required:"0",label:r.label,options:r.options,error_msg:r.error_msg,help_text:r.help_text,value:e.fieldData.title},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function qW(e){const t="38020ec6-1b53-4227-99e5-feea5f60af07",r=Ie(e.fieldContent,t);return Ie(e.stateData.nvrf_fields,r.uuid),b.jsx(Nt,{fieldType:"text",inputData:{id:"middle_name",dataTest:"middleName",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function KW({inputData:e,saveFieldData:t,dateFormat:r,fieldData:n}){const a=(i,s)=>{let h=n.date_of_birth_month,o=n.date_of_birth_day,d=n.date_of_birth_year,p=d.slice(0,2);if(s==="all")return[h.length===2,o.length===2,d.length===4,h<=12,h>=1,o<=31,o>=1,p<=20,p>=19].includes(!1)?(i.target.setCustomValidity(" "),!0):!1;if(s==="month")return h>12||h<1;if(s==="day")return o>31||o<1};return b.jsxs("div",{id:e.id,className:"usa-memorable-date",name:e.id,autoComplete:"off",required:parseInt(e.required),"data-testid":"dateInputGroup",onBlur:i=>{i.currentTarget.contains(i.relatedTarget)||ga(i,a(i,"all"))},children:[b.jsxs("div",{"data-testid":"formGroup",className:"usa-form-group usa-form-group--month",children:[b.jsx("label",{"data-testid":"label",className:"usa-label",htmlFor:`${e.id}_month`,children:e.stringContent.month}),b.jsx("input",{"data-test":`${e.dataTest}Month`,id:`${e.id}_month`,className:"usa-input radius-md","aria-describedby":`${e.id}_error`,name:`${e.id}_month`,label:e.stringContent.month,unit:"month",required:!0,"aria-invalid":!1,type:"text",pattern:"0[1-9]|1[0,1,2]",inputMode:"numeric",maxLength:2,minLength:2,value:n[`${e.id}_month`],onInput:t(`${e.id}_month`),onKeyUp:i=>vE(i,`${e.id}_day`),onKeyDown:i=>{ff(i,"number"),i.target.setCustomValidity("")},onBlur:i=>{r(i,`${e.id}_month`),ga(i,a(i,"month"))},onInvalid:i=>i.target.setCustomValidity(" ")})]}),b.jsxs("div",{"data-testid":"formGroup",className:"usa-form-group usa-form-group--day",children:[b.jsx("label",{"data-testid":"label",className:"usa-label",htmlFor:`${e.id}_day`,children:e.stringContent.day}),b.jsx("input",{"data-test":`${e.dataTest}Day`,id:`${e.id}_day`,className:"usa-input radius-md","aria-describedby":`${e.id}_error`,name:`${e.id}_day`,label:e.stringContent.day,unit:"day",required:!0,"aria-invalid":!1,type:"text",pattern:"0[1-9]|[12][0-9]|3[01]",inputMode:"numeric",minLength:2,maxLength:2,value:n[`${e.id}_day`],onInput:t(`${e.id}_day`),onKeyUp:i=>vE(i,`${e.id}_year`),onKeyDown:i=>{ff(i,"number"),i.target.setCustomValidity("")},onBlur:i=>{r(i,`${e.id}_day`),ga(i,a(i,"day"))},onInvalid:i=>i.target.setCustomValidity(" ")})]}),b.jsxs("div",{"data-testid":"formGroup",className:"usa-form-group usa-form-group--year",children:[b.jsx("label",{"data-testid":"label",className:"usa-label",htmlFor:`${e.id}_year`,children:e.stringContent.year}),b.jsx("input",{"data-test":`${e.dataTest}Year`,id:`${e.id}_year`,className:"usa-input radius-md","aria-describedby":`${e.id}_error`,name:`${e.id}_year`,label:e.stringContent.year,unit:"year",required:!0,"aria-invalid":!1,type:"text",pattern:"19\\d{2}|20\\d{2}",inputMode:"numeric",minLength:4,maxLength:4,value:n[`${e.id}_year`],onInput:t(`${e.id}_year`),onKeyDown:i=>{ff(i,"number"),i.target.setCustomValidity("")},onBlur:i=>ga(i,hc(i,"check value length")),onInvalid:i=>i.target.setCustomValidity(" ")})]})]})}function XW({fieldType:e,inputData:t,saveFieldData:r,dateFormat:n,fieldData:a}){function i(s){switch(s){case"date":return b.jsx(KW,{inputData:t,saveFieldData:r,dateFormat:n,fieldData:a})}}return b.jsx(b.Fragment,{children:b.jsx("div",{className:"input-parent",children:b.jsxs(ie.Fieldset,{className:"fieldset",legend:t.required?[b.jsx("span",{className:"text-bold",children:t.label},0),b.jsx("span",{className:"required-text",children:"*"},1)]:t.stringContent,style:{marginTop:"30px"},children:[b.jsx("span",{className:"usa-hint",id:`${t.id} + '-hint'`,children:t.help_text}),i(e),b.jsx("span",{id:`${t.id}_error`,role:"alert",className:"vote-error-text","data-test":"errorText",children:t.error_msg})]})})})}function ZW(e){const t="d31b2a64-36a9-4bc6-a9d1-e68d2be8c211",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return n&&b.jsx(XW,{fieldType:"date",inputData:{id:"date_of_birth",dataTest:"dob",required:n.required,label:r.label,stringContent:e.stringContent,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,dateFormat:e.dateFormat})}function YW(e){const t="a4919026-91ac-4e05-a75f-e2df479abd76",r=Ie(e.fieldContent,t);return Ie(e.stateData.nvrf_fields,r.uuid),b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_middle_name",dataTest:"prevMiddleName",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function QW(e){const t="f282e541-7ca8-4c22-8d87-d4cff56e22e5",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_first_name",dataTest:"prevFirstName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function JW(e){const t="34d2669a-d30b-4001-b897-280fe71b3cb0",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"prev_title",dataTest:"select",required:"0",label:r.label,options:r.options,error_msg:r.error_msg,help_text:r.help_text,value:e.fieldData.prev_title},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function $W(e){const t="42de34cc-ebf3-4d8e-8873-2571063b62c0",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_last_name",dataTest:"prevLastName",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function eG(e){const t="2d61b54a-e568-410f-825a-0ca82dfd3f63",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"phone_number",dataTest:"phoneNumber",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text,type:"tel",maxLength:14,minLength:14,check:"check value length"},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function tG(e){const t="09cb2989-d302-4a01-bb3a-33173adcffb2",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"select",inputData:{id:"prev_suffix",dataTest:"select",required:"0",label:r.label,options:r.options,value:e.fieldData.prev_suffix},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function rG(e){const t="2bfff6c6-6782-4b14-ac45-642efd278f6a",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"select",inputData:{id:"race",dataTest:"select",required:n.required,label:r.label,options:r.options,value:e.fieldData.race,error_msg:r.error_msg},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function nG(e){const t=e.headings,r=e.fieldContent,n=e.registrationPath==="update",a=e.stateData.nvrf_fields,i=e.stringContent,s=r.find(S=>S.uuid==="8dda085c-edf3-4678-b30a-0a457699be46"),h=r.find(S=>S.uuid==="af4e6259-5b07-4955-9d28-254504ec9df8"),o=r.find(S=>S.uuid==="b7bdae35-e4be-4827-ae11-75d9c3e33bf0"),d=r.find(S=>S.uuid==="2d61b54a-e568-410f-825a-0ca82dfd3f63"),p=r.find(S=>S.uuid==="2bfff6c6-6782-4b14-ac45-642efd278f6a"),v=nr(s.section_description),m=nr(s.section_alert),g=a.find(S=>S.uuid===o.uuid),w=a.find(S=>S.uuid===d.uuid),O=a.find(S=>S.uuid===p.uuid);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_1}),n&&b.jsx(ie.Checkbox,{id:"prev-name-change","aria-describedby":"prev-name-change_alert",name:"prev-name-change","data-test":"checkBox",checked:e.previousName,onChange:e.onChangePreviousName,label:i.nameChange}),b.jsx("div",{id:"prev-name-change_alert",className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:m}})})}),b.jsx("h3",{className:"margin-top-5",children:s.label}),b.jsx("div",{dangerouslySetInnerHTML:{__html:v}}),g&&b.jsxs(b.Fragment,{children:[b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:2},children:b.jsx(GW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(HW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(qW,{...e})})]}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx(WW,{...e})}),b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx(UW,{...e})})]})]}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(ZW,{...e,dateFormat:e.dateFormat})}),w&&b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(eG,{...e})})]}),b.jsx(ie.Grid,{row:!0,className:"email-address-input",style:{overflow:"hidden",position:"absolute",top:"0",left:"0",height:"0",width:"0",zIndex:"-1"},children:b.jsxs("div",{className:"input-parent",children:[b.jsxs(ie.Label,{className:"text-bold",htmlFor:"voter-contact","aria-hidden":"true",children:["Voter Contact",b.jsx("span",{className:"required-text",children:"*"})]}),b.jsx("span",{className:"usa-hint",children:"Voter Contact"}),b.jsx(ie.TextInput,{"data-test":"email",id:"voter-contact",type:"email",required:!0,"aria-invalid":!1,className:"radius-md",autoComplete:"off",tabIndex:"-1","aria-hidden":"true",value:e.fieldData.email_address,onChange:e.saveFieldData("email_address"),onBlur:S=>ga(S,hc(S,"check value length")),onInvalid:S=>S.target.setCustomValidity(" "),onInput:S=>S.target.setCustomValidity("")})]})}),O&&b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx("div",{className:"input-parent",children:b.jsx(rG,{...e})})})}),e.previousName&&n&&b.jsxs(b.Fragment,{children:[b.jsx("h3",{className:"margin-top-8",children:h.label}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:2},children:b.jsx(JW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(QW,{...e})}),b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(YW,{...e})})]}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx($W,{...e})}),b.jsx(ie.Grid,{tablet:{col:6},children:b.jsx(tG,{...e})})]})]})]})}function aG(e){const t="fe3a2a1d-34bd-472b-a843-3fa0635c4f40",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid),a=e.statesList.map(i=>({key:i,value:i}));return b.jsx(Nt,{fieldType:"select",inputData:{id:"state",dataTest:"select",required:n.required,label:r.label,disabled:!0,options:a,value:e.stateData.name,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function iG(e){const t="6dcb9e8c-b40a-4cda-ba5c-06b98c3375f4",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"street_address",dataTest:"street",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function oG(e){const t="cdb06542-0cbd-4aa3-897f-83377b8d65e5",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"zip_code",dataTest:"zip",required:n.required,label:r.label,minLength:5,maxLength:5,inputMode:"number",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function sG(e){const t="7e39a528-7518-40cb-b7b6-b635864dc117",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"city",dataTest:"city",required:n.required,label:r.label,inputMode:"letters",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function lG(e){const t="deba9b54-68ad-4ef1-8fb5-ee34e4ab8a49",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"text",inputData:{id:"apt_num",dataTest:"aptNumber",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function uG(e){const t="c4f9c0cb-2a25-4f1d-a93a-b06a19656cfe",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"mail_zip_code",dataTest:"mailZip",required:n.required,label:r.label,minLength:5,maxLength:5,inputType:"number",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function cG(e){const t="49a90983-1925-438f-8271-88f39bf19bf1",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_zip_code",dataTest:"prevZip",required:n.required,label:r.label,minLength:5,maxLength:5,inputType:"number",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function dG(e){const t="44bf0a5c-adba-4b47-bc99-cc46cede5e80",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_city",dataTest:"prevCity",required:n.required,label:r.label,inputMode:"letters",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function fG(e){const t="db9b1f7a-565b-4aad-8d7c-56a553c18326",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"mail_street_address",dataTest:"mailStreet",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function hG(e){const t="b0f80289-6084-4723-8278-110fda210f0d",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid),a=e.statesList.map(i=>({key:i,value:i}));return b.jsx(Nt,{fieldType:"select",inputData:{id:"mail_state",dataTest:"select",required:n.required,label:r.label,options:a,value:e.fieldData.mail_state,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function pG(e){const t="c8e2ff17-fb1f-4971-a664-ffbb557b305a",r=Ie(e.fieldContent,t);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_apt_num",dataTest:"prevAptNumber",required:"0",label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function vG(e){const t="c037a3ea-86b7-4661-ad28-c7228f1e682b",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"prev_street_address",dataTest:"prevStreet",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function mG(e){const t="9a5baee7-357b-4e59-b4f2-fe2525c0fd6c",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"mail_city",dataTest:"mailCity",required:n.required,label:r.label,inputType:"letters",error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function gG(e){const t="5a8a4b6d-c0f1-42f2-b991-8ea49a32e997",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid),a=e.statesList.map(i=>({key:i,value:i}));return b.jsx(Nt,{fieldType:"select",inputData:{id:"prev_state",dataTest:"select",required:n.required,label:r.label,options:a,value:e.fieldData.prev_state,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData,stringContent:e.stringContent})}function yG(e){const t=e.headings,r=e.fieldContent,n=e.registrationPath==="update"||e.stateData.name=="Maine",a=e.stateData.nvrf_fields;e.stringContent;const i=r.find(y=>y.uuid==="63552bb6-6afb-46e1-8148-860242917a22"),s=r.find(y=>y.uuid==="6dcb9e8c-b40a-4cda-ba5c-06b98c3375f4"),h=r.find(y=>y.uuid==="023fda0f-e8bd-4654-ab5c-46f44a0b7bd6"),o=r.find(y=>y.uuid==="c3011c62-d174-420c-817a-bffbcd45687a"),d=r.find(y=>y.uuid==="1a856408-6fb2-4b09-b05a-8d8ee9eb9bb5"),p=r.find(y=>y.uuid==="35c2b98d-477c-45f3-9f93-f720406080f1"),v=r.find(y=>y.uuid==="e7340274-ee3f-4d73-a967-c9d7c249be7b"),m=r.find(y=>y.uuid==="3724c7cd-5ec7-4e3e-85cd-db0cab63e99b"),g=r.find(y=>y.uuid==="6dd20906-654e-427e-bb82-1e62aee9ed72"),w=a.find(y=>y.uuid===s.uuid),O=nr(m.label),S=nr(g.label);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_2}),w&&b.jsxs(b.Fragment,{children:[!n&&b.jsx("span",{className:"usa-hint",id:"addresses-checkbox-hint",children:O}),n&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"usa-hint",id:"addresses-checkbox-hint",children:S}),b.jsx(ie.Checkbox,{id:"prev-address",name:"prev-address","data-test":"checkBox",checked:e.hasPreviousAddress,onChange:e.onChangePreviousAddressCheckbox,label:o.label})]}),b.jsx(ie.Checkbox,{id:"no-address","aria-describedby":"no-address_alert",className:"margin-bottom-4",name:"no-addr","data-test":"checkBox",checked:e.hasNoAddress,onChange:e.hasNoAddressCheckbox,label:p.label}),!e.hasNoAddress&&b.jsxs(b.Fragment,{children:[i.section_alert&&b.jsx("div",{id:"no-address_alert",className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:i.section_alert}})})}),b.jsx("h3",{className:"margin-top-5",children:i.label}),i.instructions&&b.jsx("div",{dangerouslySetInnerHTML:{__html:i.instructions}}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:12},children:b.jsx(iG,{...e})})}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(lG,{...e})})}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(sG,{...e})}),b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(aG,{...e})}),b.jsx(ie.Grid,{tablet:{col:3},children:b.jsx(oG,{...e})})]}),b.jsx(ie.Checkbox,{"data-test":"checkBox",className:"margin-top-3",id:"alt-mail-addr",name:"alt-mail-addr",checked:e.hasMailAddress,onChange:e.onChangeMailAddressCheckbox,label:v.label})]}),(e.hasMailAddress||e.hasNoAddress)&&b.jsxs(b.Fragment,{children:[e.hasNoAddress&&b.jsx("div",{className:"usa-alert usa-alert--info",role:"alert",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:d.section_alert}})})}),b.jsx("h3",{className:"margin-top-8",children:d.label}),d.section_description&&b.jsx("div",{dangerouslySetInnerHTML:{__html:d.section_description}}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:12},children:b.jsx(fG,{...e})})}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:!0},children:b.jsx(mG,{...e})}),b.jsx(ie.Grid,{tablet:{col:!0},children:b.jsx(hG,{...e})}),b.jsx(ie.Grid,{tablet:{col:!0},children:b.jsx(uG,{...e})})]})]}),e.hasPreviousAddress&&b.jsxs(b.Fragment,{children:[h.section_alert&&b.jsx("div",{className:"usa-alert usa-alert--info",role:"alert",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:h.section_alert}})})}),b.jsx("h3",{className:"margin-top-8",children:h.label}),h.instructions&&b.jsx("div",{dangerouslySetInnerHTML:{__html:h.instructions}}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:12},children:b.jsx(vG,{...e})})}),b.jsx(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:b.jsx(ie.Grid,{tablet:{col:5},children:b.jsx(pG,{...e})})}),b.jsxs(ie.Grid,{row:!0,gap:!0,className:"flex-align-end",children:[b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(dG,{...e})}),b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(gG,{...e})}),b.jsx(ie.Grid,{tablet:{col:4},children:b.jsx(cG,{...e})})]})]})]})]})}function wG(e){const t="acd7f272-7a37-43f0-b51a-c78daf31e5fd",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"id_number",dataTest:"driverId",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function bG(e){const t="1e030197-52e7-426e-923c-b67ef521ae3b",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"ssn_number",dataTest:"ssn",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text,type:"numeric",inputMode:"number",maxLength:4,minLength:4,check:"check value length"},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function xG(e){const t="fe8cf91e-f872-4ed7-848c-09c99a7d83c8",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"ssn_number",dataTest:"ssn",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text,type:"numeric",inputMode:"number",maxLength:9,minLength:9,check:"check value length"},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function OG(e){const t="e2da00fa-0f1b-4e98-9472-c00649266eb4",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"id_number",dataTest:"stateId",label:r.label,required:n.required,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function EG(e){const t=e.headings,r=e.stateData,n=e.fieldContent,a=e.stringContent,i=e.stateData.nvrf_fields,s=n.find(k=>k.uuid==="27d3a15c-f8c0-4035-9b0a-c2c0f674519c"),h=n.find(k=>k.uuid==="acd7f272-7a37-43f0-b51a-c78daf31e5fd"),o=n.find(k=>k.uuid==="e2da00fa-0f1b-4e98-9472-c00649266eb4"),d=n.find(k=>k.uuid==="1e030197-52e7-426e-923c-b67ef521ae3b"),p=n.find(k=>k.uuid==="fe8cf91e-f872-4ed7-848c-09c99a7d83c8"),v=n.find(k=>k.uuid==="eb0ce8c5-b4f7-4aae-a0b9-84f0434d2edb"),m=nr(s.instructions),g=nr(r.id_inst),w=nr(v.instructions),O=i.find(k=>k.uuid===h.uuid),S=i.find(k=>k.uuid===o.uuid),y=i.find(k=>k.uuid===p.uuid),x=i.find(k=>k.uuid===d.uuid),E=i.find(k=>k.uuid===v.uuid);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_3}),g&&b.jsx("div",{id:"id_alert",className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:g}})})}),r.abbrev==="mo"?b.jsx(b.Fragment,{children:b.jsx(ie.Checkbox,{id:"id-none",name:"id-none",checked:e.hasNoID,onChange:e.onChangeHasNoIdCheckbox,label:v.label})}):b.jsxs(b.Fragment,{children:[b.jsxs("h3",{className:"margin-top-5",children:[s.label,b.jsx("span",{className:"required-text",children:"*"})]}),b.jsx("div",{dangerouslySetInnerHTML:{__html:m}}),b.jsxs("div",{className:"input-parent",children:[b.jsx(ie.Select,{id:"id-selection",name:"id-selection","aria-label":a.idSelectionAriaLabel,"aria-describedby":"id-selection_error","data-test":"dropDown",value:e.idType,required:!0,"aria-invalid":!1,onChange:k=>e.saveIdType(k),onBlur:k=>ga(k,hc(k,"check value exists")),onInvalid:k=>k.target.setCustomValidity(" "),onInput:k=>{k.target.setCustomValidity(""),ga(k,!1)},children:b.jsxs(ma.Fragment,{children:[b.jsx("option",{value:"",children:s.options[0].key},"default"),O&&b.jsx("option",{value:"driver-id-num",children:h.label},"driver-id-num"),S&&b.jsx("option",{value:"state-id-num",children:o.label},"state-id-num"),y&&b.jsx("option",{value:"ssn-full",children:p.label},"ssn-full"),x&&b.jsx("option",{value:"ssn",children:d.label},"ssn"),E&&b.jsx("option",{value:"none",children:v.label},"id-none")]},".0")}),b.jsx("span",{id:"id-selection_error",role:"alert",className:"vote-error-text","data-test":"errorText",children:e.idType===""&&o.error_msg})]})]}),b.jsxs("div",{id:"state-id",className:"input-parent",children:[(e.idType==="driver-id-num"||e.idType==="state-id-num"||r.abbrev==="mo"&&e.idType!="none")&&b.jsxs(b.Fragment,{children:[(e.idType==="driver-id-num"||r.abbrev==="mo")&&b.jsx(b.Fragment,{children:b.jsx(wG,{...e})}),e.idType==="state-id-num"&&b.jsx(b.Fragment,{children:b.jsx(OG,{...e})})]}),(e.idType==="ssn"||r.abbrev==="mo"&&e.idType!="none")&&b.jsx(b.Fragment,{children:b.jsx(bG,{...e})}),e.idType==="ssn-full"&&b.jsx(b.Fragment,{children:b.jsx(xG,{...e})}),e.idType==="none"&&b.jsx("div",{"aria-live":"polite",className:"margin-top-2",dangerouslySetInnerHTML:{__html:w}})]})]})}function SG(e){const t=e.headings,r=e.content,n=e.fieldData,a=e.fieldContent,i=e.stringContent,s=n.street_address+n.apt_num+n.city+n.zip_code,h=n.prev_title+n.prev_first_name+n.prev_middle_name+n.prev_last_name+n.prev_suffix,o=n.prev_street_address+n.prev_apt_num+n.prev_city+n.prev_state+n.prev_zip_code,d=n.mail_street_address+n.mail_apt_num+n.mail_city+n.mail_state+n.mail_zip_code,p=n.race===""?i.notRequired:n.race,v=n.party_choice===""?i.notRequired:n.party_choice,m=e.stateData.name;n.state=m;const g=n.id_number===""&&n.ssn_number===""?"none":n.id_number+" "+n.ssn_number,w=r.find(E=>E.uuid==="560cd01c-42d1-4f58-a702-372c2ff6bbd9"),O=nr(w.body),S=nr(w.instructions),y=E=>a.find(k=>k.uuid===E).label,x=E=>a.find(k=>k.uuid===E).error_msg;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"confirm-info",children:[b.jsx("h1",{children:w.title}),b.jsx("div",{dangerouslySetInnerHTML:{__html:O}}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_1}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(4),title:"Return to Personal information, step one of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.current_name.label})}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("86a544cd-cfe9-456a-b634-176a37a38d6d"),": ",n.title]}),b.jsxs("li",{children:[y("b7bdae35-e4be-4827-ae11-75d9c3e33bf0"),": ",n.first_name]}),b.jsxs("li",{children:[y("38020ec6-1b53-4227-99e5-feea5f60af07"),": ",n.middle_name]}),b.jsxs("li",{children:[y("b306238a-a0f6-4bb8-b8ea-b3216ca75e0b"),": ",n.last_name]}),b.jsxs("li",{children:[y("eeff4fa1-00f2-474b-a791-1a4146dab11a"),": ",n.suffix]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.previous_name.label})}),!h&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.previous_name.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("34d2669a-d30b-4001-b897-280fe71b3cb0"),": ",n.prev_title]}),b.jsxs("li",{children:[y("f282e541-7ca8-4c22-8d87-d4cff56e22e5"),": ",n.prev_first_name]}),b.jsxs("li",{children:[y("a4919026-91ac-4e05-a75f-e2df479abd76"),": ",n.prev_middle_name]}),b.jsxs("li",{children:[y("42de34cc-ebf3-4d8e-8873-2571063b62c0"),": ",n.prev_last_name]}),b.jsxs("li",{children:[y("09cb2989-d302-4a01-bb3a-33173adcffb2"),": ",n.prev_suffix]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.other_info.label})}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("d31b2a64-36a9-4bc6-a9d1-e68d2be8c211"),": ",n.date_of_birth_month,"/",n.date_of_birth_day,"/",n.date_of_birth_year]}),b.jsxs("li",{children:[y("2d61b54a-e568-410f-825a-0ca82dfd3f63"),": ",n.phone_number]}),b.jsxs("li",{children:[y("2bfff6c6-6782-4b14-ac45-642efd278f6a"),": ",p]})]}),b.jsx("hr",{}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_2}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(3),title:"Return to Address and location, step two of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.current_address.label})}),!s&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.current_address.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("6dcb9e8c-b40a-4cda-ba5c-06b98c3375f4"),": ",n.street_address]}),b.jsxs("li",{children:[y("deba9b54-68ad-4ef1-8fb5-ee34e4ab8a49"),": ",n.apt_num]}),b.jsxs("li",{children:[y("7e39a528-7518-40cb-b7b6-b635864dc117"),": ",n.city]}),b.jsxs("li",{children:[y("fe3a2a1d-34bd-472b-a843-3fa0635c4f40"),": ",m]}),b.jsxs("li",{children:[y("cdb06542-0cbd-4aa3-897f-83377b8d65e5"),": ",n.zip_code]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.previous_address.label})}),!o&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.previous_address.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("c037a3ea-86b7-4661-ad28-c7228f1e682b"),": ",n.prev_street_address]}),b.jsxs("li",{children:[y("c8e2ff17-fb1f-4971-a664-ffbb557b305a"),": ",n.prev_apt_num]}),b.jsxs("li",{children:[y("44bf0a5c-adba-4b47-bc99-cc46cede5e80"),": ",n.prev_city]}),b.jsxs("li",{children:[y("5a8a4b6d-c0f1-42f2-b991-8ea49a32e997"),": ",n.prev_state]}),b.jsxs("li",{children:[y("49a90983-1925-438f-8271-88f39bf19bf1"),": ",n.prev_zip_code]})]}),b.jsx("p",{children:b.jsx("strong",{children:t.confirmation.mailing_address.label})}),!d&&b.jsx(ie.Alert,{type:"info",headingLevel:"h4",role:"region","aria-live":"polite",noIcon:!0,children:t.confirmation.mailing_address.alert}),b.jsxs("ul",{children:[b.jsxs("li",{children:[y("db9b1f7a-565b-4aad-8d7c-56a553c18326"),": ",n.mail_street_address]}),b.jsxs("li",{children:[y("9a5baee7-357b-4e59-b4f2-fe2525c0fd6c"),": ",n.mail_city]}),b.jsxs("li",{children:[y("b0f80289-6084-4723-8278-110fda210f0d"),": ",n.mail_state]}),b.jsxs("li",{children:[y("c4f9c0cb-2a25-4f1d-a93a-b06a19656cfe"),": ",n.mail_zip_code]})]}),b.jsx("hr",{}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_3}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(2),title:"Return to Identification, step three of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("ul",{children:b.jsxs("li",{children:[t.confirmation.id_label.label,": ",g]})}),b.jsx("hr",{}),b.jsxs(ie.Grid,{row:!0,gap:2,className:"margin-top-3 flex-align-baseline",children:[b.jsx("h2",{className:"margin-0",children:t.step_label_4}),b.jsx("div",{className:"edit-btn",children:b.jsx(ie.Button,{unstyled:!0,"data-test":"editBtn",type:"button",style:{margin:0},onClick:e.handleGoBackSteps(1),title:"Return to Political party, step four of six, to make a change",children:t.confirmation.edit.label})})]}),b.jsx("ul",{children:b.jsxs("li",{children:[t.confirmation.political_party.label,": ",v]})}),b.jsx("hr",{})]}),S&&b.jsx("div",{id:"acknowledge-check-alert",className:"usa-alert usa-alert--info margin-top-6",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:S}})})}),b.jsxs("div",{className:"input-parent",children:[b.jsx(ie.Checkbox,{"data-test":"confirm",id:"acknowledge-checkbox",name:"acknowledge-check","aria-describedby":"acknowledge-check-alert",required:!0,defaultChecked:e.hasAcknowledged,label:y("73e74065-fd5a-43c0-907c-268120e34bc3"),onChange:E=>e.acknowledgeCheckbox(E.target.checked),onBlur:E=>ga(E,!e.hasAcknowledged),onInvalid:E=>E.target.setCustomValidity(" "),onInput:E=>E.target.setCustomValidity("")}),b.jsx("span",{id:"first-name-error",role:"alert",className:"vote-error-text","data-test":"errorText",children:x("73e74065-fd5a-43c0-907c-268120e34bc3")})]})]})}var lC={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(_S,function(){return function r(n,a,i){var s=window,h="application/octet-stream",o=i||h,d=n,p=!a&&!i&&d,v=document.createElement("a"),m=function(M){return String(M)},g=s.Blob||s.MozBlob||s.WebKitBlob||m,w=a||"download",O,S;if(g=g.call?g.bind(s):Blob,String(this)==="true"&&(d=[d,o],o=d[0],d=d[1]),p&&p.length<2048&&(w=p.split("/").pop().split("?")[0],v.href=p,v.href.indexOf(p)!==-1)){var y=new XMLHttpRequest;return y.open("GET",p,!0),y.responseType="blob",y.onload=function(M){r(M.target.response,w,h)},setTimeout(function(){y.send()},0),y}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==m)d=F(d),o=d.type||h;else return navigator.msSaveBlob?navigator.msSaveBlob(F(d),w):A(d);else if(/([\x80-\xff])/.test(d)){var x=0,E=new Uint8Array(d.length),k=E.length;for(x;x"},wf=function(e){return pc(e,4)},qX=function(e){if(KG(e))return wf(e);if(XG(e)){var t=mC(e),r=gC(e);return""+wf(t)+wf(r)}var n=Uh(e),a="0x"+n+" is not a valid UTF-8 or UTF-16 codepoint.";throw new Error(a)},KX=function(e){var t=0,r=function(n){t|=1<=T.Zero&&d<=T.Seven?(n+=o,(n.length===3||!(p>="0"&&p<="7"))&&(i(parseInt(n,8)),n="")):i(d):d===T.BackSlash?a=!0:i(d)}return new Uint8Array(r)},t.prototype.decodeText=function(){var r=this.asBytes();return xC(r)?yC(r):fT(r)},t.prototype.decodeDate=function(){var r=this.decodeText(),n=pC(r);if(!n)throw new hT(r);return n},t.prototype.asString=function(){return this.value},t.prototype.clone=function(){return t.of(this.value)},t.prototype.toString=function(){return"("+this.value+")"},t.prototype.sizeInBytes=function(){return this.value.length+2},t.prototype.copyBytesInto=function(r,n){return r[n++]=T.LeftParen,n+=Tr(this.value,r,n),r[n++]=T.RightParen,this.value.length+2},t.of=function(r){return new t(r)},t.fromDate=function(r){var n=va(String(r.getUTCFullYear()),4,"0"),a=va(String(r.getUTCMonth()+1),2,"0"),i=va(String(r.getUTCDate()),2,"0"),s=va(String(r.getUTCHours()),2,"0"),h=va(String(r.getUTCMinutes()),2,"0"),o=va(String(r.getUTCSeconds()),2,"0");return new t("D:"+n+a+i+s+h+o+"Z")},t}(Yr),Ob=function(){function e(t,r,n,a){var i=this;this.allGlyphsInFontSortedById=function(){for(var s=new Array(i.font.characterSet.length),h=0,o=s.length;h>3)]>>7-((g&7)<<0)&1,_=3*G;h[E]=k[_],h[E+1]=k[_+1],h[E+2]=k[_+2],h[E+3]=G>2)]>>6-((g&3)<<1)&3,_=3*G;h[E]=k[_],h[E+1]=k[_+1],h[E+2]=k[_+2],h[E+3]=G>1)]>>4-((g&1)<<2)&15,_=3*G;h[E]=k[_],h[E+1]=k[_+1],h[E+2]=k[_+2],h[E+3]=G>>3)]>>>7-(ve&7)&1),Q=K==S*255?0:255;o[be+ve]=Q<<24|K<<16|K<<8|K}else if(p==2)for(var ve=0;ve>>2)]>>>6-((ve&3)<<1)&3),Q=K==S*85?0:255;o[be+ve]=Q<<24|K<<16|K<<8|K}else if(p==4)for(var ve=0;ve>>1)]>>>4-((ve&1)<<2)&15),Q=K==S*17?0:255;o[be+ve]=Q<<24|K<<16|K<<8|K}else if(p==8)for(var ve=0;ve>>2<<3));a==0;){if(a=S(t,m,1),i=S(t,m+1,2),m+=3,i==0){m&7&&(m+=8-(m&7));var R=(m>>>3)+4,H=t[R-4]|t[R-3]<<8;M&&(r=e.H.W(r,v+H)),r.set(new n(t.buffer,t.byteOffset+R,H),v),m=R+H<<3,v+=H;continue}if(M&&(r=e.H.W(r,v+(1<<17))),i==1&&(g=A.J,w=A.h,d=512-1,p=32-1),i==2){s=y(t,m,5)+257,h=y(t,m+5,5)+1,o=y(t,m+10,4)+4,m+=14;for(var G=1,_=0;_<38;_+=2)A.Q[_]=0,A.Q[_+1]=0;for(var _=0;_G&&(G=X)}m+=3*o,E(A.Q,G),k(A.Q,G,A.u),g=A.w,w=A.d,m=x(A.u,(1<>>4;if(!(ve>>>8))r[v++]=ve;else{if(ve==256)break;var Q=v+ve-254;if(ve>264){var W=A.q[ve-257];Q=v+(W>>>3)+y(t,m,W&7),m+=W&7}var Y=w[F(t,m)&p];m+=Y&15;var $=Y>>>4,ue=A.c[$],oe=(ue>>>4)+S(t,m,ue&15);for(m+=ue&15;v>>4;if(v<=15)s[d]=v,d++;else{var m=0,g=0;v==16?(g=3+h(a,i,2),i+=2,m=s[d-1]):v==17?(g=3+h(a,i,3),i+=3):v==18&&(g=11+h(a,i,7),i+=7);for(var w=d+g;d>>1;si&&(i=o),s++}for(;s>1,d=t[h+1],p=o<<4|d,v=r-d,m=t[h]<>>15-r;n[w]=p,m++}},e.H.l=function(t,r){for(var n=e.H.m.r,a=15-r,i=0;i>>a}},e.H.M=function(t,r,n){n=n<<(r&7);var a=r>>>3;t[a]|=n,t[a+1]|=n>>>8},e.H.I=function(t,r,n){n=n<<(r&7);var a=r>>>3;t[a]|=n,t[a+1]|=n>>>8,t[a+2]|=n>>>16},e.H.e=function(t,r,n){return(t[r>>>3]|t[(r>>>3)+1]<<8)>>>(r&7)&(1<>>3]|t[(r>>>3)+1]<<8|t[(r>>>3)+2]<<16)>>>(r&7)&(1<>>3]|t[(r>>>3)+1]<<8|t[(r>>>3)+2]<<16)>>>(r&7)},e.H.i=function(t,r){return(t[r>>>3]|t[(r>>>3)+1]<<8|t[(r>>>3)+2]<<16|t[(r>>>3)+3]<<24)>>>(r&7)},e.H.m=function(){var t=Uint16Array,r=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new r(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new r(286),Y:new r(30),a:new r(19),t:new r(15e3),k:new t(65536),g:new t(32768)}}(),function(){for(var t=e.H.m,r=32768,n=0;n>>1|(a&1431655765)<<1,a=(a&3435973836)>>>2|(a&858993459)<<2,a=(a&4042322160)>>>4|(a&252645135)<<4,a=(a&4278255360)>>>8|(a&16711935)<<8,t.r[n]=(a>>>16|a<<16)>>>17}function i(s,h,o){for(;h--!=0;)s.push(0,o)}for(var n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];i(t._,144,8),i(t._,255-143,9),i(t._,279-255,7),i(t._,287-279,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),i(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),i(t.Q,19,0),i(t.C,286,0),i(t.D,30,0),i(t.v,320,0)}(),e.H.N}();re.decode._readInterlace=function(e,t){for(var r=t.width,n=t.height,a=re.decode._getBPP(t),i=a>>3,s=Math.ceil(r*a/8),h=new Uint8Array(n*s),o=0,d=[0,0,4,0,2,0,1],p=[0,4,0,2,0,1,0],v=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1],g=0;g<7;){for(var w=v[g],O=m[g],S=0,y=0,x=d[g];x>3];H=H>>7-(R&7)&1,h[A*s+(M>>3)]|=H<<7-((M&7)<<0)}if(a==2){var H=e[R>>3];H=H>>6-(R&7)&3,h[A*s+(M>>2)]|=H<<6-((M&3)<<1)}if(a==4){var H=e[R>>3];H=H>>4-(R&7)&15,h[A*s+(M>>1)]|=H<<4-((M&1)<<2)}if(a>=8)for(var G=A*s+M*i,_=0;_>3)+_];R+=a,M+=O}F++,A+=w}S*y!=0&&(o+=y*(1+k)),g=g+1}return h};re.decode._getBPP=function(e){var t=[1,null,3,1,2,null,4][e.ctype];return t*e.depth};re.decode._filterZero=function(e,t,r,n,a){var i=re.decode._getBPP(t),s=Math.ceil(n*i/8),h=re.decode._paeth;i=Math.ceil(i/8);var o=0,d=1,p=e[r],v=0;if(p>1&&(e[r]=[0,0,1][p-2]),p==3)for(v=i;v>>1)&255;for(var m=0;m>>1);for(;v>>1)}else{for(;v>8&255,e[t+1]=r&255},readUint:function(e,t){return e[t]*(256*256*256)+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=r&255},readASCII:function(e,t,r){for(var n="",a=0;a=0&&h>=0?(v=g*t+w<<2,m=(h+g)*a+s+w<<2):(v=(-h+g)*t-s+w<<2,m=g*a+w<<2),o==0)n[m]=e[v],n[m+1]=e[v+1],n[m+2]=e[v+2],n[m+3]=e[v+3];else if(o==1){var O=e[v+3]*.00392156862745098,S=e[v]*O,y=e[v+1]*O,x=e[v+2]*O,E=n[m+3]*(1/255),k=n[m]*E,F=n[m+1]*E,A=n[m+2]*E,M=1-O,R=O+E*M,H=R==0?0:1/R;n[m+3]=255*R,n[m+0]=(S+k*M)*H,n[m+1]=(y+F*M)*H,n[m+2]=(x+A*M)*H}else if(o==2){var O=e[v+3],S=e[v],y=e[v+1],x=e[v+2],E=n[m+3],k=n[m],F=n[m+1],A=n[m+2];O==E&&S==k&&y==F&&x==A?(n[m]=0,n[m+1]=0,n[m+2]=0,n[m+3]=0):(n[m]=S,n[m+1]=y,n[m+2]=x,n[m+3]=O)}else if(o==3){var O=e[v+3],S=e[v],y=e[v+1],x=e[v+2],E=n[m+3],k=n[m],F=n[m+1],A=n[m+2];if(O==E&&S==k&&y==F&&x==A)continue;if(O<220&&E>20)return!1}return!0};re.encode=function(e,t,r,n,a,i,s){n==null&&(n=0),s==null&&(s=!1);var h=re.encode.compress(e,t,r,n,[!1,!1,!1,0,s]);return re.encode.compressPNG(h,-1),re.encode._main(h,t,r,a,i)};re.encodeLL=function(e,t,r,n,a,i,s,h){for(var o={ctype:0+(n==1?0:2)+(a==0?0:4),depth:i,frames:[]},d=(n+a)*i,p=d*t,v=0;v1,v=!1,m=8+(16+5+4)+(p?20:0);if(a.sRGB!=null&&(m+=8+1+4),a.pHYs!=null&&(m+=8+9+4),e.ctype==3){for(var g=e.plte.length,w=0;w>>24!=255&&(v=!0);m+=8+g*3+4+(v?8+g*1+4:0)}for(var O=0;O>>8&255,M=k>>>16&255;y[d+E+0]=F,y[d+E+1]=A,y[d+E+2]=M}if(d+=g*3,s(y,d,i(y,d-g*3-4,g*3+4)),d+=4,v){s(y,d,g),d+=4,o(y,d,"tRNS"),d+=4;for(var w=0;w>>24&255;d+=g,s(y,d,i(y,d-g-4,g+4)),d+=4}}for(var R=0,O=0;O>2,X>>2));for(var g=0;gbe&&Q==se[S-be])ve[S]=ve[S-be];else{var W=E[Q];if(W==null&&(E[Q]=W=k.length,k.push(Q),k.length>=300))break;ve[S]=W}}}var Y=k.length;Y<=256&&d==!1&&(Y<=2?v=1:Y<=4?v=2:Y<=16?v=4:v=8,v=Math.max(v,o));for(var g=0;g>1)]|=ke[At+tt]<<4-(tt&1)*4;else if(v==2)for(var tt=0;tt>2)]|=ke[At+tt]<<6-(tt&3)*2;else if(v==1)for(var tt=0;tt>3)]|=ke[At+tt]<<7-(tt&7)*1}ue=_e,p=3,Ae=1}else if(y==!1&&x.length==1){for(var _e=new Uint8Array(be*$*3),Er=be*$,S=0;SM&&(M=G),HR&&(R=H))}M==-1&&(F=A=M=R=0),a&&((F&1)==1&&F--,(A&1)==1&&A--);var X=(M-F+1)*(R-A+1);XS&&(S=k),Fy&&(y=F))}S==-1&&(w=O=S=y=0),s&&((w&1)==1&&w--,(O&1)==1&&O--),i={x:w,y:O,width:S-w+1,height:y-O+1};var R=n[a];R.rect=i,R.blend=1,R.img=new Uint8Array(i.width*i.height*4),n[a-1].dispose==0?(re._copyTile(d,t,r,R.img,i.width,i.height,-i.x,-i.y,0),re.encode._prepareDiff(m,t,r,R.img,i)):re._copyTile(m,t,r,R.img,i.width,i.height,-i.x,-i.y,0)};re.encode._prepareDiff=function(e,t,r,n,a){re._copyTile(e,t,r,n,a.width,a.height,-a.x,-a.y,2)};re.encode._filterZero=function(e,t,r,n,a,i,s){var h=[],o=[0,1,2,3,4];i!=-1?o=[i]:(t*n>5e5||r==1)&&(o=[0]);var d;s&&(d={level:0});for(var p=s&&UZIP!=null?UZIP:Kh,v=0;v>1)+256&255;if(i==4)for(var d=a;d>1)&255;for(var d=a;d>1)&255}if(i==4){for(var d=0;d>>1:r=r>>>1;e[t]=r}return e}(),update:function(e,t,r,n){for(var a=0;a>>8;return e},crc:function(e,t,r){return re.crc.update(4294967295,e,t,r)^4294967295}};re.quantize=function(e,t){var r=new Uint8Array(e),n=r.slice(0),a=new Uint32Array(n.buffer),i=re.quantize.getKDtree(n,t),s=i[0],h=i[1];re.quantize.planeDst;for(var o=r,d=a,p=o.length,v=new Uint8Array(r.length>>2),m=0;m>2]=y.ind,d[m>>2]=y.est.rgba}return{abuf:n.buffer,inds:v,plte:h}};re.quantize.getKDtree=function(e,t,r){r==null&&(r=1e-4);var n=new Uint32Array(e.buffer),a={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};a.bst=re.quantize.stats(e,a.i0,a.i1),a.est=re.quantize.estats(a.bst);for(var i=[a];i.lengths&&(s=i[o].est.L,h=o);if(s=p||d.i1<=p;if(v){d.est.L=0;continue}var m={i0:d.i0,i1:p,bst:null,est:null,tdst:0,left:null,right:null};m.bst=re.quantize.stats(e,m.i0,m.i1),m.est=re.quantize.estats(m.bst);var g={i0:p,i1:d.i1,bst:null,est:null,tdst:0,left:null,right:null};g.bst={R:[],m:[],N:d.bst.N-m.bst.N};for(var o=0;o<16;o++)g.bst.R[o]=d.bst.R[o]-m.bst.R[o];for(var o=0;o<4;o++)g.bst.m[o]=d.bst.m[o]-m.bst.m[o];g.est=re.quantize.estats(g.bst),d.left=m,d.right=g,i[h]=m,i.push(g)}i.sort(function(w,O){return O.bst.N-w.bst.N});for(var o=0;o0&&(s=e.right,h=e.left);var o=re.quantize.getNearest(s,t,r,n,a);if(o.tdst<=i*i)return o;var d=re.quantize.getNearest(h,t,r,n,a);return d.tdsti;)n-=4;if(r>=n)break;var h=t[r>>2];t[r>>2]=t[n>>2],t[n>>2]=h,r+=4,n-=4}for(;s(e,r,a)>i;)r-=4;return r+4};re.quantize.vecDot=function(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]};re.quantize.stats=function(e,t,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=[0,0,0,0],i=r-t>>2,s=t;s>>0}};re.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}};re.encode.concatRGBA=function(e){for(var t=0,r=0;r1)throw new Error("Animated PNGs are not supported");var a=new Uint8Array(n[0]),i=$X(a),s=i.rgbChannel,h=i.alphaChannel;this.rgbChannel=s;var o=h.some(function(d){return d<255});o&&(this.alphaChannel=h),this.type=JX(r.ctype),this.width=r.width,this.height=r.height,this.bitsPerComponent=8}return e.load=function(t){return new e(t)},e}(),wT=function(){function e(t){this.image=t,this.bitsPerComponent=t.bitsPerComponent,this.width=t.width,this.height=t.height,this.colorSpace="DeviceRGB"}return e.for=function(t){return Ye(this,void 0,void 0,function(){var r;return Qe(this,function(n){return r=eZ.load(t),[2,new e(r)]})})},e.prototype.embedIntoContext=function(t,r){return Ye(this,void 0,void 0,function(){var n,a;return Qe(this,function(i){return n=this.embedAlphaChannel(t),a=t.flateStream(this.image.rgbChannel,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:n}),r?(t.assign(r,a),[2,r]):[2,t.register(a)]})})},e.prototype.embedAlphaChannel=function(t){if(this.image.alphaChannel){var r=t.flateStream(this.image.alphaChannel,{Type:"XObject",Subtype:"Image",Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:"DeviceGray",Decode:[0,1]});return t.register(r)}},e}(),bT=function(){function e(t,r,n){this.bytes=t,this.start=r||0,this.pos=this.start,this.end=r&&n?r+n:this.bytes.length}return Object.defineProperty(e.prototype,"length",{get:function(){return this.end-this.start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.length===0},enumerable:!1,configurable:!0}),e.prototype.getByte=function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},e.prototype.getUint16=function(){var t=this.getByte(),r=this.getByte();return t===-1||r===-1?-1:(t<<8)+r},e.prototype.getInt32=function(){var t=this.getByte(),r=this.getByte(),n=this.getByte(),a=this.getByte();return(t<<24)+(r<<16)+(n<<8)+a},e.prototype.getBytes=function(t,r){r===void 0&&(r=!1);var n=this.bytes,a=this.pos,i=this.end;if(t){var h=a+t;h>i&&(h=i),this.pos=h;var s=n.subarray(a,h);return r?new Uint8ClampedArray(s):s}else{var s=n.subarray(a,i);return r?new Uint8ClampedArray(s):s}},e.prototype.peekByte=function(){var t=this.getByte();return this.pos--,t},e.prototype.peekBytes=function(t,r){r===void 0&&(r=!1);var n=this.getBytes(t,r);return this.pos-=n.length,n},e.prototype.skip=function(t){t||(t=1),this.pos+=t},e.prototype.reset=function(){this.pos=this.start},e.prototype.moveStart=function(){this.start=this.pos},e.prototype.makeSubStream=function(t,r){return new e(this.bytes,t,r)},e.prototype.decode=function(){return this.bytes},e}(),tZ=new Uint8Array(0),xc=function(){function e(t){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=tZ,this.minBufferLength=512,t)for(;this.minBufferLengthi&&(n=i)}else{for(;!this.eof;)this.readBlock();n=this.bufferLength}this.pos=n;var s=this.buffer.subarray(a,n);return r&&!(s instanceof Uint8ClampedArray)?new Uint8ClampedArray(s):s},e.prototype.peekByte=function(){var t=this.getByte();return this.pos--,t},e.prototype.peekBytes=function(t,r){r===void 0&&(r=!1);var n=this.getBytes(t,r);return this.pos-=n.length,n},e.prototype.skip=function(t){t||(t=1),this.pos+=t},e.prototype.reset=function(){this.pos=0},e.prototype.makeSubStream=function(t,r){for(var n=t+r;this.bufferLength<=n&&!this.eof;)this.readBlock();return new bT(this.buffer,t,r)},e.prototype.decode=function(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)},e.prototype.readBlock=function(){throw new Xn(this.constructor.name,"readBlock")},e.prototype.ensureBuffer=function(t){var r=this.buffer;if(t<=r.byteLength)return r;for(var n=this.minBufferLength;n=0;--d)o[h+d]=v&255,v>>=8}},t}(xc),nZ=function(e){pe(t,e);function t(r,n){var a=e.call(this,n)||this;return a.stream=r,a.firstDigit=-1,n&&(n=.5*n),a}return t.prototype.readBlock=function(){var r=8e3,n=this.stream.getBytes(r);if(!n.length){this.eof=!0;return}for(var a=n.length+1>>1,i=this.ensureBuffer(this.bufferLength+a),s=this.bufferLength,h=this.firstDigit,o=0,d=n.length;o=48&&p<=57)v=p&15;else if(p>=65&&p<=70||p>=97&&p<=102)v=(p&15)+9;else if(p===62){this.eof=!0;break}else continue;h<0?h=v:(i[s++]=h<<4|v,h=-1)}h>=0&&this.eof&&(i[s++]=h<<4,h=-1),this.firstDigit=h,this.bufferLength=s},t}(xc),OS=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aZ=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),iZ=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),oZ=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],sZ=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],lZ=function(e){pe(t,e);function t(r,n){var a=e.call(this,n)||this;a.stream=r;var i=r.getByte(),s=r.getByte();if(i===-1||s===-1)throw new Error("Invalid header in flate stream: "+i+", "+s);if((i&15)!==8)throw new Error("Unknown compression method in flate stream: "+i+", "+s);if(((i<<8)+s)%31!==0)throw new Error("Bad FCHECK in flate stream: "+i+", "+s);if(s&32)throw new Error("FDICT bit set in flate stream: "+i+", "+s);return a.codeSize=0,a.codeBuf=0,a}return t.prototype.readBlock=function(){var r,n,a=this.stream,i=this.getBits(3);if(i&1&&(this.eof=!0),i>>=1,i===0){var s=void 0;if((s=a.getByte())===-1)throw new Error("Bad block header in flate stream");var h=s;if((s=a.getByte())===-1)throw new Error("Bad block header in flate stream");if(h|=s<<8,(s=a.getByte())===-1)throw new Error("Bad block header in flate stream");var o=s;if((s=a.getByte())===-1)throw new Error("Bad block header in flate stream");if(o|=s<<8,o!==(~h&65535)&&(h!==0||o!==0))throw new Error("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var d=this.bufferLength;r=this.ensureBuffer(d+h);var p=d+h;if(this.bufferLength=p,h===0)a.peekByte()===-1&&(this.eof=!0);else for(var v=d;v0;)F[x++]=R}m=this.generateHuffmanTable(F.subarray(0,w)),g=this.generateHuffmanTable(F.subarray(w,k))}else throw new Error("Unknown block type in flate stream");r=this.buffer;for(var _=r?r.length:0,X=this.bufferLength;;){var K=this.getCode(m);if(K<256){X+1>=_&&(r=this.ensureBuffer(X+1),_=r.length),r[X++]=K;continue}if(K===256){this.bufferLength=X;return}K-=257,K=aZ[K];var se=K>>16;se>0&&(se=this.getBits(se)),n=(K&65535)+se,K=this.getCode(g),K=iZ[K],se=K>>16,se>0&&(se=this.getBits(se));var be=(K&65535)+se;X+n>=_&&(r=this.ensureBuffer(X+n),_=r.length);for(var ve=0;ve>r,this.codeSize=a-=r,s},t.prototype.getCode=function(r){for(var n=this.stream,a=r[0],i=r[1],s=this.codeSize,h=this.codeBuf,o;s>16,v=d&65535;if(p<1||s>p,this.codeSize=s-p,v},t.prototype.generateHuffmanTable=function(r){var n=r.length,a=0,i;for(i=0;ia&&(a=r[i]);for(var s=1<>=1;for(i=m;i0;if(!F||F<256)S[0]=F,y=1;else if(F>=258)if(F=0;s--)S[s]=v[h],h=g[h];else S[y++]=S[0];else if(F===256){w=9,p=258,y=0;continue}else{this.eof=!0,delete this.lzwState;break}if(A&&(g[p]=O,m[p]=m[O]+1,v[p]=S[0],p++,w=p+d&p+d-1?w:Math.min(Math.log(p+d)/.6931471805599453+1,12)|0),O=F,x+=y,n>>n&(1<0){var s=this.stream.getBytes(i);n.set(s,a),a+=i}}else{i=257-i;var h=r[1];n=this.ensureBuffer(a+i+1);for(var o=0;on.size())throw new ch(r,0,n.size());n.remove(r)}else{if(r!==0)throw new ch(r,0,0);this.setKids([])}},t.prototype.normalizedEntries=function(){var r=this.Kids();return r||(r=this.dict.context.obj([this.ref]),this.dict.set(j.of("Kids"),r)),{Kids:r}},t.fromDict=function(r,n){return new t(r,n)},t}(ET),Eb=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.Opt=function(){return this.dict.lookupMaybe(j.of("Opt"),Tt,He,Et)},t.prototype.setOpt=function(r){this.dict.set(j.of("Opt"),this.dict.context.obj(r))},t.prototype.getExportValues=function(){var r=this.Opt();if(r){if(r instanceof Tt||r instanceof He)return[r];for(var n=[],a=0,i=r.size();an.size())throw new ch(r,0,n.size());n.remove(r)}},t.prototype.normalizeExportValues=function(){for(var r,n,a,i,s=(r=this.getExportValues())!==null&&r!==void 0?r:[],h=[],o=this.getWidgets(),d=0,p=o.length;d1){if(!this.hasFlag(Ct.MultiSelect))throw new SX;this.dict.set(j.of("V"),this.dict.context.obj(r))}this.updateSelectedIndices(r)},t.prototype.valuesAreValid=function(r){for(var n=this.getOptions(),a=function(o,d){var p=r[o].decodeText();if(!n.find(function(v){return p===(v.display||v.value).decodeText()}))return{value:!1}},i=0,s=r.length;i1){for(var n=new Array(r.length),a=this.getOptions(),i=function(o,d){var p=r[o].decodeText();n[o]=a.findIndex(function(v){return p===(v.display||v.value).decodeText()})},s=0,h=r.length;s0){var h=s.lookup(0,Tt,He),o=s.lookupMaybe(1,Tt,He);n.push({value:h,display:o||h})}}return n}return[]},t}(ul),Jh=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.fromDict=function(r,n){return new t(r,n)},t.create=function(r){var n=r.obj({FT:"Ch",Ff:Ct.Combo,Kids:[]}),a=r.register(n);return new t(n,a)},t}(ST),hh=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.addField=function(r){var n=this.normalizedEntries().Kids;n==null||n.push(r)},t.prototype.normalizedEntries=function(){var r=this.Kids();return r||(r=this.dict.context.obj([]),this.dict.set(j.of("Kids"),r)),{Kids:r}},t.fromDict=function(r,n){return new t(r,n)},t.create=function(r){var n=r.obj({}),a=r.register(n);return new t(n,a)},t}(ET),Sb=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.fromDict=function(r,n){return new t(r,n)},t}(ul),$h=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.MaxLen=function(){var r=this.dict.lookup(j.of("MaxLen"));if(r instanceof We)return r},t.prototype.Q=function(){var r=this.dict.lookup(j.of("Q"));if(r instanceof We)return r},t.prototype.setMaxLength=function(r){this.dict.set(j.of("MaxLen"),We.of(r))},t.prototype.removeMaxLength=function(){this.dict.delete(j.of("MaxLen"))},t.prototype.getMaxLength=function(){var r;return(r=this.MaxLen())===null||r===void 0?void 0:r.asNumber()},t.prototype.setQuadding=function(r){this.dict.set(j.of("Q"),We.of(r))},t.prototype.getQuadding=function(){var r;return(r=this.Q())===null||r===void 0?void 0:r.asNumber()},t.prototype.setValue=function(r){this.dict.set(j.of("V"),r)},t.prototype.removeValue=function(){this.dict.delete(j.of("V"))},t.prototype.getValue=function(){var r=this.V();if(r instanceof Tt||r instanceof He)return r},t.fromDict=function(r,n){return new t(r,n)},t.create=function(r){var n=r.obj({FT:"Tx",Kids:[]}),a=r.register(n);return new t(n,a)},t}(ul),e0=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.fromDict=function(r,n){return new t(r,n)},t.create=function(r){var n=r.obj({FT:"Btn",Ff:Gn.PushButton,Kids:[]}),a=r.register(n);return new t(n,a)},t}(Eb),t0=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setValue=function(r){var n=this.getOnValues();if(!n.includes(r)&&r!==j.of("Off"))throw new yb;this.dict.set(j.of("V"),r);for(var a=this.getWidgets(),i=0,s=a.length;ii)throw new dS(n,i);for(var s=n,h=0,o=a.size();hs)return p.insertLeafNode(r,s)||d;s-=p.Count().asNumber()}p instanceof $a&&(s-=1)}if(s===0){this.insertLeafKid(a.size(),r);return}throw new fS(n,"insertLeafNode")},t.prototype.removeLeafNode=function(r,n){n===void 0&&(n=!0);var a=this.Kids(),i=this.Count().asNumber();if(r>=i)throw new dS(r,i);for(var s=r,h=0,o=a.size();hs){p.removeLeafNode(s,n),n&&p.Kids().size()===0&&a.remove(h);return}else s-=p.Count().asNumber();if(p instanceof $a)if(s===0){this.removeKid(h);return}else s-=1}throw new fS(r,"removeLeafNode")},t.prototype.ascend=function(r){r(this);var n=this.Parent();n&&n.ascend(r)},t.prototype.traverse=function(r){for(var n=this.Kids(),a=0,i=n.size();aNumber.MAX_SAFE_INTEGER)if(this.capNumbers){var a="Parsed number that is too large for some PDF readers: "+t+", using Number.MAX_SAFE_INTEGER instead.";return console.warn(a),Number.MAX_SAFE_INTEGER}else{var a="Parsed number that is too large for some PDF readers: "+t+", not capping.";console.warn(a)}return n},e.prototype.skipWhitespace=function(){for(;!this.bytes.done()&&li[this.bytes.peek()];)this.bytes.next()},e.prototype.skipLine=function(){for(;!this.bytes.done();){var t=this.bytes.peek();if(t===kS||t===jS)return;this.bytes.next()}},e.prototype.skipComment=function(){if(this.bytes.peek()!==T.Percent)return!1;for(;!this.bytes.done();){var t=this.bytes.peek();if(t===kS||t===jS)return!0;this.bytes.next()}return!0},e.prototype.skipWhitespaceAndComments=function(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()},e.prototype.matchKeyword=function(t){for(var r=this.bytes.offset(),n=0,a=t.length;n=this.length},e.prototype.offset=function(){return this.idx},e.prototype.slice=function(t,r){return this.bytes.slice(t,r)},e.prototype.position=function(){return{line:this.line,column:this.column,offset:this.idx}},e.of=function(t){return new e(t)},e.fromPDFRawStream=function(t){return e.of(xT(t).decode())},e}(),xZ=T.Space,Wl=T.CarriageReturn,Gl=T.Newline,ql=[T.s,T.t,T.r,T.e,T.a,T.m],Rd=[T.e,T.n,T.d,T.s,T.t,T.r,T.e,T.a,T.m],Rt={header:[T.Percent,T.P,T.D,T.F,T.Dash],eof:[T.Percent,T.Percent,T.E,T.O,T.F],obj:[T.o,T.b,T.j],endobj:[T.e,T.n,T.d,T.o,T.b,T.j],xref:[T.x,T.r,T.e,T.f],trailer:[T.t,T.r,T.a,T.i,T.l,T.e,T.r],startxref:[T.s,T.t,T.a,T.r,T.t,T.x,T.r,T.e,T.f],true:[T.t,T.r,T.u,T.e],false:[T.f,T.a,T.l,T.s,T.e],null:[T.n,T.u,T.l,T.l],stream:ql,streamEOF1:yt(ql,[xZ,Wl,Gl]),streamEOF2:yt(ql,[Wl,Gl]),streamEOF3:yt(ql,[Wl]),streamEOF4:yt(ql,[Gl]),endstream:Rd,EOF1endstream:yt([Wl,Gl],Rd),EOF2endstream:yt([Wl],Rd),EOF3endstream:yt([Gl],Rd)},FT=function(e){pe(t,e);function t(r,n,a){a===void 0&&(a=!1);var i=e.call(this,r,a)||this;return i.context=n,i}return t.prototype.parseObject=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(Rt.true))return ac.True;if(this.matchKeyword(Rt.false))return ac.False;if(this.matchKeyword(Rt.null))return cn;var r=this.bytes.peek();if(r===T.LessThan&&this.bytes.peekAhead(1)===T.LessThan)return this.parseDictOrStream();if(r===T.LessThan)return this.parseHexString();if(r===T.LeftParen)return this.parseString();if(r===T.ForwardSlash)return this.parseName();if(r===T.LeftSquareBracket)return this.parseArray();if(Cb[r])return this.parseNumberOrRef();throw new TX(this.bytes.position(),r)},t.prototype.parseNumberOrRef=function(){var r=this.parseRawNumber();this.skipWhitespaceAndComments();var n=this.bytes.offset();if(Br[this.bytes.peek()]){var a=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===T.R)return this.bytes.assertNext(T.R),Ft.of(r,a)}return this.bytes.moveTo(n),We.of(r)},t.prototype.parseHexString=function(){var r="";for(this.bytes.assertNext(T.LessThan);!this.bytes.done()&&this.bytes.peek()!==T.GreaterThan;)r+=Qa(this.bytes.next());return this.bytes.assertNext(T.GreaterThan),He.of(r)},t.prototype.parseString=function(){for(var r=0,n=!1,a="";!this.bytes.done();){var i=this.bytes.next();if(a+=Qa(i),n||(i===T.LeftParen&&(r+=1),i===T.RightParen&&(r-=1)),i===T.BackSlash?n=!n:n&&(n=!1),r===0)return Tt.of(a.substring(1,a.length-1))}throw new NX(this.bytes.position())},t.prototype.parseName=function(){this.bytes.assertNext(T.ForwardSlash);for(var r="";!this.bytes.done();){var n=this.bytes.peek();if(li[n]||ia[n])break;r+=Qa(n),this.bytes.next()}return j.of(r)},t.prototype.parseArray=function(){this.bytes.assertNext(T.LeftSquareBracket),this.skipWhitespaceAndComments();for(var r=Et.withContext(this.context);this.bytes.peek()!==T.RightSquareBracket;){var n=this.parseObject();r.push(n),this.skipWhitespaceAndComments()}return this.bytes.assertNext(T.RightSquareBracket),r},t.prototype.parseDict=function(){this.bytes.assertNext(T.LessThan),this.bytes.assertNext(T.LessThan),this.skipWhitespaceAndComments();for(var r=new Map;!this.bytes.done()&&this.bytes.peek()!==T.GreaterThan&&this.bytes.peekAhead(1)!==T.GreaterThan;){var n=this.parseName(),a=this.parseObject();r.set(n,a),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(T.GreaterThan),this.bytes.assertNext(T.GreaterThan);var i=r.get(j.of("Type"));return i===j.of("Catalog")?CT.fromMapWithContext(r,this.context):i===j.of("Pages")?TT.fromMapWithContext(r,this.context):i===j.of("Page")?$a.fromMapWithContext(r,this.context):Ze.fromMapWithContext(r,this.context)},t.prototype.parseDictOrStream=function(){var r=this.bytes.position(),n=this.parseDict();if(this.skipWhitespaceAndComments(),!this.matchKeyword(Rt.streamEOF1)&&!this.matchKeyword(Rt.streamEOF2)&&!this.matchKeyword(Rt.streamEOF3)&&!this.matchKeyword(Rt.streamEOF4)&&!this.matchKeyword(Rt.stream))return n;var a=this.bytes.offset(),i,s=n.get(j.of("Length"));s instanceof We?(i=a+s.asNumber(),this.bytes.moveTo(i),this.skipWhitespaceAndComments(),this.matchKeyword(Rt.endstream)||(this.bytes.moveTo(a),i=this.findEndOfStreamFallback(r))):i=this.findEndOfStreamFallback(r);var h=this.bytes.slice(a,i);return ic.of(n,h)},t.prototype.findEndOfStreamFallback=function(r){for(var n=1,a=this.bytes.offset();!this.bytes.done()&&(a=this.bytes.offset(),this.matchKeyword(Rt.stream)?n+=1:this.matchKeyword(Rt.EOF1endstream)||this.matchKeyword(Rt.EOF2endstream)||this.matchKeyword(Rt.EOF3endstream)||this.matchKeyword(Rt.endstream)?n-=1:this.bytes.next(),n!==0););if(n!==0)throw new PX(r);return a},t.forBytes=function(r,n,a){return new t(a0.of(r),n,a)},t.forByteStream=function(r,n,a){return a===void 0&&(a=!1),new t(r,n,a)},t}(bZ),OZ=function(e){pe(t,e);function t(r,n){var a=e.call(this,a0.fromPDFRawStream(r),r.dict.context)||this,i=r.dict;return a.alreadyParsed=!1,a.shouldWaitForTick=n||function(){return!1},a.firstOffset=i.lookup(j.of("First"),We).asNumber(),a.objectCount=i.lookup(j.of("N"),We).asNumber(),a}return t.prototype.parseIntoContext=function(){return Ye(this,void 0,void 0,function(){var r,n,a,i,s,h,o,d;return Qe(this,function(p){switch(p.label){case 0:if(this.alreadyParsed)throw new gb("PDFObjectStreamParser","parseIntoContext");this.alreadyParsed=!0,r=this.parseOffsetsAndObjectNumbers(),n=0,a=r.length,p.label=1;case 1:return n=T.Space&&n<=T.Tilde;if(a&&(this.matchKeyword(Rt.xref)||this.matchKeyword(Rt.trailer)||this.matchKeyword(Rt.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(r);break}this.bytes.next()}},t.prototype.skipBinaryHeaderComment=function(){this.skipWhitespaceAndComments();try{var r=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(r)}catch{this.bytes.next(),this.skipWhitespaceAndComments()}},t.forBytesWithOptions=function(r,n,a,i){return new t(r,n,a,i)},t}(FT),Fa=function(e){return 1<0&&(n[n.length]=+a),r[r.length]={cmd:t,args:n},n=[],a="",i=!1),t=d;else if([" ",","].includes(d)||d==="-"&&a.length>0&&a[a.length-1]!=="e"||d==="."&&i){if(a.length===0)continue;n.length===s?(r[r.length]={cmd:t,args:n},n=[+a],t==="M"&&(t="L"),t==="m"&&(t="l")):n[n.length]=+a,i=d===".",a=["-","."].includes(d)?d:""}else a+=d,d==="."&&(i=!0)}return a.length>0&&(n.length===s?(r[r.length]={cmd:t,args:n},n=[+a],t==="M"&&(t="L"),t==="m"&&(t="l")):n[n.length]=+a),r[r.length]={cmd:t,args:n},r},LZ=function(e){Re=Le=pt=vt=ou=su=0;for(var t=[],r=0;r1&&(m=Math.sqrt(m),r*=m,n*=m);var g=v/r,w=p/r,O=-p/n,S=v/n,y=g*h+w*o,x=O*h+S*o,E=g*e+w*t,k=O*e+S*t,F=(E-y)*(E-y)+(k-x)*(k-x),A=1/F-.25;A<0&&(A=0);var M=Math.sqrt(A);i===a&&(M=-M);var R=.5*(y+E)-M*(k-x),H=.5*(x+k)+M*(E-y),G=Math.atan2(x-H,y-R),_=Math.atan2(k-H,E-R),X=_-G;X<0&&i===1?X+=2*Math.PI:X>0&&i===0&&(X-=2*Math.PI);for(var K=Math.ceil(Math.abs(X/(Math.PI*.5+.001))),se=[],be=0;bee.length)return a-1;var S=t.heightAtSize(a),y=S+S*.2,x=y*i;if(x>Math.abs(r.height))return a-1;a+=1}return a},iY=function(e,t,r,n){for(var a=r.width/n,i=r.height,s=KT,h=zG(e);sa*.75;if(v)return s-1}var m=t.heightAtSize(s,{descender:!1});if(m>i)return s-1;s+=1}return s},oY=function(e){for(var t=e.length;t>0;t--)if(/\s/.test(e[t]))return t},sY=function(e,t,r,n){for(var a,i=e.length;i>0;){var s=e.substring(0,i),h=r.encodeText(s),o=r.widthOfTextAtSize(s,n);if(om&&(m=M+F),w+h>g&&(g=w+h),d.push({text:E,encoded:k,width:F,height:h,x:M,y:w}),y=A==null?void 0:A.trim()}return{fontSize:n,lineHeight:o,lines:d,bounds:{x:p,y:v,width:m-p,height:g-v}}},lY=function(e,t){var r=t.fontSize,n=t.font,a=t.bounds,i=t.cellCount,s=fC(vc(e));if(s.length>i)throw new rY(s.length,i);(r===void 0||r===0)&&(r=iY(s,n,a,i));for(var h=a.width/i,o=n.heightAtSize(r,{descender:!1}),d=a.y+(a.height/2-o/2),p=[],v=a.x,m=a.y,g=a.x+a.width,w=a.y+a.height,O=0,S=0;Og&&(g=M+F),d+o>w&&(w=d+o),p.push({text:s,encoded:k,width:F,height:o,x:M,y:d}),O+=1,S+=E}return{fontSize:r,cells:p,bounds:{x:v,y:m,width:g-v,height:w-m}}},wh=function(e,t){var r=t.alignment,n=t.fontSize,a=t.font,i=t.bounds,s=fC(vc(e));(n===void 0||n===0)&&(n=ZT([s],a,i));var h=a.encodeText(s),o=a.widthOfTextAtSize(s,n),d=a.heightAtSize(n,{descender:!1}),p=r===hr.Left?i.x:r===hr.Center?i.x+i.width/2-o/2:r===hr.Right?i.x+i.width-o:i.x,v=i.y+(i.height/2-d/2);return{fontSize:n,line:{text:s,encoded:h,width:o,height:d,x:p,y:v},bounds:{x:p,y:v,width:o,height:d}}},dl=function(e){return"normal"in e?e:{normal:e}},uY=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,$i=function(e){var t,r,n=(t=e.getDefaultAppearance())!==null&&t!==void 0?t:"",a=(r=lb(n,uY).match)!==null&&r!==void 0?r:[],i=Number(a[2]);return isFinite(i)?i:void 0},cY=/(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,na=function(e){var t,r=(t=e.getDefaultAppearance())!==null&&t!==void 0?t:"",n=lb(r,cY).match,a=n??[],i=a[1],s=a[2],h=a[3],o=a[4],d=a[5];if(d==="g"&&i)return HT(Number(i));if(d==="rg"&&i&&s&&h)return Pt(Number(i),Number(s),Number(h));if(d==="k"&&i&&s&&h&&o)return UT(Number(i),Number(s),Number(h),Number(o))},aa=function(e,t,r,n){var a;n===void 0&&(n=0);var i=[Ko(t).toString(),Nb((a=r==null?void 0:r.name)!==null&&a!==void 0?a:"dummy__noop",n).toString()].join(` `);e.setDefaultAppearance(i)},dY=function(e,t){var r,n,a,i=na(t),s=na(e.acroField),h=t.getRectangle(),o=t.getAppearanceCharacteristics(),d=t.getBorderStyle(),p=(r=d==null?void 0:d.getWidth())!==null&&r!==void 0?r:0,v=ui(o==null?void 0:o.getRotation()),m=Go(h,v),g=m.width,w=m.height,O=io(Ke(Ke({},h),{rotation:v})),S=Pt(0,0,0),y=(n=Qr(o==null?void 0:o.getBorderColor()))!==null&&n!==void 0?n:S,x=Qr(o==null?void 0:o.getBackgroundColor()),E=Qr(o==null?void 0:o.getBackgroundColor(),.8),k=(a=i??s)!==null&&a!==void 0?a:S;aa(i?t:e.acroField,k);var F={x:0+p/2,y:0+p/2,width:g-p,height:w-p,thickness:1.5,borderWidth:p,borderColor:y,markColor:k};return{normal:{on:yt(O,_d(Ke(Ke({},F),{color:x,filled:!0}))),off:yt(O,_d(Ke(Ke({},F),{color:x,filled:!1})))},down:{on:yt(O,_d(Ke(Ke({},F),{color:E,filled:!0}))),off:yt(O,_d(Ke(Ke({},F),{color:E,filled:!1})))}}},fY=function(e,t){var r,n,a,i=na(t),s=na(e.acroField),h=t.getRectangle(),o=t.getAppearanceCharacteristics(),d=t.getBorderStyle(),p=(r=d==null?void 0:d.getWidth())!==null&&r!==void 0?r:0,v=ui(o==null?void 0:o.getRotation()),m=Go(h,v),g=m.width,w=m.height,O=io(Ke(Ke({},h),{rotation:v})),S=Pt(0,0,0),y=(n=Qr(o==null?void 0:o.getBorderColor()))!==null&&n!==void 0?n:S,x=Qr(o==null?void 0:o.getBackgroundColor()),E=Qr(o==null?void 0:o.getBackgroundColor(),.8),k=(a=i??s)!==null&&a!==void 0?a:S;aa(i?t:e.acroField,k);var F={x:g/2,y:w/2,width:g-p,height:w-p,borderWidth:p,borderColor:y,dotColor:k};return{normal:{on:yt(O,Bd(Ke(Ke({},F),{color:x,filled:!0}))),off:yt(O,Bd(Ke(Ke({},F),{color:x,filled:!1})))},down:{on:yt(O,Bd(Ke(Ke({},F),{color:E,filled:!0}))),off:yt(O,Bd(Ke(Ke({},F),{color:E,filled:!1})))}}},hY=function(e,t,r){var n,a,i,s,h,o=na(t),d=na(e.acroField),p=$i(t),v=$i(e.acroField),m=t.getRectangle(),g=t.getAppearanceCharacteristics(),w=t.getBorderStyle(),O=g==null?void 0:g.getCaptions(),S=(n=O==null?void 0:O.normal)!==null&&n!==void 0?n:"",y=(i=(a=O==null?void 0:O.down)!==null&&a!==void 0?a:S)!==null&&i!==void 0?i:"",x=(s=w==null?void 0:w.getWidth())!==null&&s!==void 0?s:0,E=ui(g==null?void 0:g.getRotation()),k=Go(m,E),F=k.width,A=k.height,M=io(Ke(Ke({},m),{rotation:E})),R=Pt(0,0,0),H=Qr(g==null?void 0:g.getBorderColor()),G=Qr(g==null?void 0:g.getBackgroundColor()),_=Qr(g==null?void 0:g.getBackgroundColor(),.8),X={x,y:x,width:F-x*2,height:A-x*2},K=wh(S,{alignment:hr.Center,fontSize:p??v,font:r,bounds:X}),se=wh(y,{alignment:hr.Center,fontSize:p??v,font:r,bounds:X}),be=Math.min(K.fontSize,se.fontSize),ve=(h=o??d)!==null&&h!==void 0?h:R;aa(o||p!==void 0?t:e.acroField,ve,r,be);var Q={x:0+x/2,y:0+x/2,width:F-x,height:A-x,borderWidth:x,borderColor:H,textColor:ve,font:r.name,fontSize:be};return{normal:yt(M,MS(Ke(Ke({},Q),{color:G,textLines:[K.line]}))),down:yt(M,MS(Ke(Ke({},Q),{color:_,textLines:[se.line]})))}},pY=function(e,t,r){var n,a,i,s,h=na(t),o=na(e.acroField),d=$i(t),p=$i(e.acroField),v=t.getRectangle(),m=t.getAppearanceCharacteristics(),g=t.getBorderStyle(),w=(n=e.getText())!==null&&n!==void 0?n:"",O=(a=g==null?void 0:g.getWidth())!==null&&a!==void 0?a:0,S=ui(m==null?void 0:m.getRotation()),y=Go(v,S),x=y.width,E=y.height,k=io(Ke(Ke({},v),{rotation:S})),F=Pt(0,0,0),A=Qr(m==null?void 0:m.getBorderColor()),M=Qr(m==null?void 0:m.getBackgroundColor()),R,H,G=e.isCombed()?0:1,_={x:O+G,y:O+G,width:x-(O+G)*2,height:E-(O+G)*2};if(e.isMultiline()){var X=YT(w,{alignment:e.getAlignment(),fontSize:d??p,font:r,bounds:_});R=X.lines,H=X.fontSize}else if(e.isCombed()){var X=lY(w,{fontSize:d??p,font:r,bounds:_,cellCount:(i=e.getMaxLength())!==null&&i!==void 0?i:0});R=X.cells,H=X.fontSize}else{var X=wh(w,{alignment:e.getAlignment(),fontSize:d??p,font:r,bounds:_});R=[X.line],H=X.fontSize}var K=(s=h??o)!==null&&s!==void 0?s:F;aa(h||d!==void 0?t:e.acroField,K,r,H);var se={x:0+O/2,y:0+O/2,width:x-O,height:E-O,borderWidth:O??0,borderColor:A,textColor:K,font:r.name,fontSize:H,color:M,textLines:R,padding:G};return yt(k,GT(se))},vY=function(e,t,r){var n,a,i,s=na(t),h=na(e.acroField),o=$i(t),d=$i(e.acroField),p=t.getRectangle(),v=t.getAppearanceCharacteristics(),m=t.getBorderStyle(),g=(n=e.getSelected()[0])!==null&&n!==void 0?n:"",w=(a=m==null?void 0:m.getWidth())!==null&&a!==void 0?a:0,O=ui(v==null?void 0:v.getRotation()),S=Go(p,O),y=S.width,x=S.height,E=io(Ke(Ke({},p),{rotation:O})),k=Pt(0,0,0),F=Qr(v==null?void 0:v.getBorderColor()),A=Qr(v==null?void 0:v.getBackgroundColor()),M=1,R={x:w+M,y:w+M,width:y-(w+M)*2,height:x-(w+M)*2},H=wh(g,{alignment:hr.Left,fontSize:o??d,font:r,bounds:R}),G=H.line,_=H.fontSize,X=(i=s??h)!==null&&i!==void 0?i:k;aa(s||o!==void 0?t:e.acroField,X,r,_);var K={x:0+w/2,y:0+w/2,width:y-w,height:x-w,borderWidth:w??0,borderColor:F,textColor:X,font:r.name,fontSize:_,color:A,textLines:[G],padding:M};return yt(E,GT(K))},mY=function(e,t,r){var n,a,i=na(t),s=na(e.acroField),h=$i(t),o=$i(e.acroField),d=t.getRectangle(),p=t.getAppearanceCharacteristics(),v=t.getBorderStyle(),m=(n=v==null?void 0:v.getWidth())!==null&&n!==void 0?n:0,g=ui(p==null?void 0:p.getRotation()),w=Go(d,g),O=w.width,S=w.height,y=io(Ke(Ke({},d),{rotation:g})),x=Pt(0,0,0),E=Qr(p==null?void 0:p.getBorderColor()),k=Qr(p==null?void 0:p.getBackgroundColor()),F=e.getOptions(),A=e.getSelected();e.isSorted()&&F.sort();for(var M="",R=0,H=F.length;R1||a.length===1&&n)&&this.enableMultiselect();for(var h=new Array(a.length),o=0,d=a.length;o1||a.length===1&&n)&&this.enableMultiselect();for(var s=new Array(a.length),h=0,o=a.length;hn)throw new nY(r.length,n,this.getName());this.markAsDirty(),this.disableRichFormatting(),r?this.acroField.setValue(He.fromText(r)):this.acroField.removeValue()},t.prototype.getAlignment=function(){var r=this.acroField.getQuadding();return r===0?hr.Left:r===1?hr.Center:r===2?hr.Right:hr.Left},t.prototype.setAlignment=function(r){Li(r,"alignment",hr),this.markAsDirty(),this.acroField.setQuadding(r)},t.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},t.prototype.setMaxLength=function(r){if(ua(r,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),r===void 0)this.acroField.removeMaxLength();else{var n=this.getText();if(n&&n.length>r)throw new aY(n.length,r,this.getName());this.acroField.setMaxLength(r)}},t.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},t.prototype.setImage=function(r){for(var n=this.getAlignment(),a=n===hr.Center?Xi.Center:n===hr.Right?Xi.Right:Xi.Left,i=this.acroField.getWidgets(),s=0,h=i.length;s{const e=document.documentElement.lang,t=e!=="en"?`/${e}`:"",r=`${[]}${t}/nvrf/data/Federal_Voter_Registration_${e}.pdf`,n=await fetch(r).then(s=>s.arrayBuffer()),a=await eo.load(n),i=a.getForm();return{pdfDoc:a,form:i}},SY=async function(e,t,r){const{pdfDoc:n,form:a}=await Lb(),i=a.getRadioGroup("citizen"),s=a.getRadioGroup("eighteen_years"),h=a.getRadioGroup("salutation"),o=a.getTextField("first_name"),d=a.getTextField("middle_names"),p=a.getTextField("last_name"),v=a.getRadioGroup("suffix"),m=a.getRadioGroup("salutation_2"),g=a.getTextField("first_name_2"),w=a.getTextField("middle_names_2"),O=a.getTextField("last_name_2"),S=a.getRadioGroup("suffix_2"),y=a.getTextField("dob_month"),x=a.getTextField("dob_day"),E=a.getTextField("dob_year"),k=a.getTextField("telephone_number"),F=a.getTextField("race_ethnic_group"),A=a.getTextField("home_address"),M=a.getTextField("apt_lot_number"),R=a.getTextField("city"),H=a.getTextField("state"),G=a.getTextField("zip_code"),_=a.getTextField("mail_address"),X=a.getTextField("mail_city"),K=a.getTextField("mail_state"),se=a.getTextField("mail_zip_code"),be=a.getTextField("prev_address"),ve=a.getTextField("prev_apt_lot_number"),Q=a.getTextField("prev_city"),W=a.getTextField("prev_state"),Y=a.getTextField("prev_zip_code"),$=a.getTextField("id_number"),ue=a.getTextField("choice_of_party");i.select("yes"),s.select("yes"),t.title&&h.select(t.title),o.setText(t.first_name),d.setText(t.middle_name),p.setText(t.last_name),t.suffix&&v.select(t.suffix),t.prev_title&&m.select(t.prev_title),g.setText(t.prev_first_name),w.setText(t.prev_middle_name),O.setText(t.prev_last_name),t.prev_suffix&&S.select(t.prev_suffix),y.setText(t.date_of_birth_month),y.setFontSize(12),x.setText(t.date_of_birth_day),x.setFontSize(12),E.setText(t.date_of_birth_year),E.setFontSize(5),k.setText(t.phone_number),F.setText(t.race),t.street_address+t.apt_num+t.city+t.zip_code&&(A.setText(t.street_address),M.setText(t.apt_num),R.setText(t.city),H.setText(t.state),G.setText(t.zip_code)),_.setText(`${t.mail_street_address} ${t.mail_apt_num}`),X.setText(t.mail_city),K.setText(t.mail_state),se.setText(t.mail_zip_code),t.state=="Maine"&&t.prev_street_address==""?be.setText("N/A"):be.setText(t.prev_street_address),ve.setText(t.prev_apt_num),Q.setText(t.prev_city),W.setText(t.prev_state),Y.setText(t.prev_zip_code),t.id_number===""&&t.ssn_number===""?$.setText("None"):t.id_number!=""&&t.ssn_number!=""?$.setText(t.id_number+", "+t.ssn_number):$.setText(t.id_number+t.ssn_number),ue.setText(t.party_choice);let Ae=0;const _e=n.getPageCount();let ke=r.split(",");(!r||r.trim()==="")&&(ke=Array.from({length:_e},(dt,sr)=>sr.toString()));for(let dt=0;dt<_e;dt++)ke.includes(dt.toString())||(n.removePage(dt-Ae),Ae++);const nt=ke.splice(0,2);ke.splice(2,0,nt[0],nt[1]),((dt,sr)=>{const lr=dt.getPages();for(let Qt=0;Qtsr.toString()));for(let dt=0;dt<_e;dt++)ke.includes(dt.toString())||(n.removePage(dt-Ae),Ae++);const nt=ke.splice(0,2);ke.splice(2,0,nt[0],nt[1]),((dt,sr)=>{const lr=dt.getPages();for(let Qt=0;Qtg.uuid==="229f283c-6a70-43f6-a80f-15cfa158f062"),d=nr(h.body.replace("@state_name",e.stateData.name).replace("@mailing_address_inst",r.mailing_address_inst)).split("@download_mail-in_form_button"),p=d[0].split("@print_mail-in_form_button"),v=b.jsxs("svg",{"aria-hidden":"true",focusable:"false",width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M17.3497 23.0564L16.9974 22.7041L16.6439 23.0552L15.2239 24.4652L14.8678 24.8187L15.2226 25.1736L20.8126 30.7636L21.1662 31.1171L21.5197 30.7636L33.5197 18.7636L33.8733 18.41L33.5197 18.0564L32.1097 16.6464L31.7563 16.2931L31.4028 16.6463L21.1663 26.8731L17.3497 23.0564Z",fill:"#5CBF72",stroke:"#5CBF72"}),b.jsx("circle",{cx:"24.5762",cy:"24",r:"22",stroke:"#5CBF72",strokeWidth:"4"})]}),m=()=>b.jsxs("p",{children:[b.jsx("strong",{children:n.mailDeadlineLabel})," ",b.jsx("span",{dangerouslySetInnerHTML:{__html:r.postmarked_mail_deadline||r.received_mail_deadline}})]});return b.jsxs(b.Fragment,{children:[b.jsxs(ie.Grid,{row:!0,children:[b.jsx(ie.Grid,{col:1,children:v}),b.jsx(ie.Grid,{col:11,className:"padding-left-2",children:b.jsx("h1",{style:{fontSize:"2rem"},"data-test":"addressConfirm",children:h.title.replace("@state_name",e.stateData.name)})})]}),b.jsx("div",{className:"margin-top-2",dangerouslySetInnerHTML:{__html:p[0]}}),b.jsx(ie.Button,{"data-test":"pdfBtnNewTab",onClick:()=>{i("newTab",e.fieldData,e.stateData.nvrf_pages_list,e.pdfDoc,e.form),dataLayer.push({NVRF_button_click:s.pdfTabButton,event:"NVRF_PDF_BUTTON_CLICK"})},type:"submit",children:b.jsx("span",{children:n.newTab})}),b.jsx("div",{className:"margin-top-2",dangerouslySetInnerHTML:{__html:p[1]}}),b.jsx(ie.Button,{"data-test":"pdfBtnDownload",onClick:()=>{i("download",e.fieldData,e.stateData.nvrf_pages_list,e.pdfDoc,e.form),dataLayer.push({NVRF_button_click:s.pdfDownloadButton,event:"NVRF_PDF_BUTTON_CLICK"})},type:"submit",children:b.jsx("span",{children:n.download})}),b.jsx("div",{className:"margin-top-6",dangerouslySetInnerHTML:{__html:d[1].replace("@mail_deadline",$j(m()))}})]})}}function CY(e){const t="fd516f06-11bb-4c39-9080-735ed98100cc",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"party_choice",dataTest:"politicalParty",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function TY(e){const t=e.headings,r=e.stateData,n=e.fieldContent,a=e.stateData.nvrf_fields,i=nr(r.political_party_inst),s=n.find(d=>d.uuid==="fd516f06-11bb-4c39-9080-735ed98100cc"),h=nr(s.instructions),o=a.find(d=>d.uuid===s.uuid);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_4}),(i||h)&&b.jsx("div",{className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:i}})})}),o&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"input-parent",children:[b.jsxs(ie.Label,{className:"text-bold",htmlFor:"political-party",children:[s.name,o.required==="1"&&b.jsx("span",{className:"required-text",children:"*"})]}),b.jsx("div",{className:"usa-hint",id:"political-party_hint",dangerouslySetInnerHTML:{__html:h}}),b.jsx(CY,{...e})]})})]})}var FY=typeof Element<"u",PY=typeof Map=="function",NY=typeof Set=="function",AY=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Sf(e[n],t[n]))return!1;return!0}var i;if(PY&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!Sf(n.value[1],t.get(n.value[0])))return!1;return!0}if(NY&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(AY&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;if(FY&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Sf(e[a[n]],t[a[n]]))return!1;return!0}return e!==e&&t!==t}var MY=function(t,r){try{return Sf(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const zY=el(MY);var DY=function(e,t,r,n,a,i,s,h){if(!e){var o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,a,i,s,h],p=0;o=new Error(t.replace(/%s/g,function(){return d[p++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}},RY=DY;const zS=el(RY);var LY=function(t,r,n,a){var i=n?n.call(a,t,r):void 0;if(i!==void 0)return!!i;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var s=Object.keys(t),h=Object.keys(r);if(s.length!==h.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(r),d=0;d(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(JT||{}),gy={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},DS=Object.values(JT),Ib={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},_Y=Object.entries(Ib).reduce((e,[t,r])=>(e[r]=t,e),{}),ya="data-rh",Hs={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Us=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},BY=e=>{let t=Us(e,"title");const r=Us(e,Hs.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Us(e,Hs.DEFAULT_TITLE);return t||n||void 0},VY=e=>Us(e,Hs.ON_CHANGE_CLIENT_STATE)||(()=>{}),yy=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),HY=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let i=0;iconsole&&typeof console.warn=="function"&&console.warn(e),Kl=(e,t,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&UY(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(o=>{let d;const p=Object.keys(o);for(let m=0;ma.push(o));const h=Object.keys(s);for(let o=0;o{if(Array.isArray(e)&&e.length){for(let r=0;r({baseTag:HY(["href"],e),bodyAttributes:yy("bodyAttributes",e),defer:Us(e,Hs.DEFER),encode:Us(e,Hs.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:yy("htmlAttributes",e),linkTags:Kl("link",["rel","href"],e),metaTags:Kl("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Kl("noscript",["innerHTML"],e),onChangeClientState:VY(e),scriptTags:Kl("script",["src","innerHTML"],e),styleTags:Kl("style",["cssText"],e),title:BY(e),titleAttributes:yy("titleAttributes",e),prioritizeSeoTags:WY(e,Hs.PRIORITIZE_SEO_TAGS)}),$T=e=>Array.isArray(e)?e.join(""):e,qY=(e,t)=>{const r=Object.keys(e);for(let n=0;nArray.isArray(e)?e.reduce((r,n)=>(qY(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},RS=(e,t)=>({...e,[t]:void 0}),KY=["noscript","script","style"],qw=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),eF=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),XY=(e,t,r,n)=>{const a=eF(r),i=$T(t);return a?`<${e} ${ya}="true" ${a}>${qw(i,n)}`:`<${e} ${ya}="true">${qw(i,n)}`},ZY=(e,t,r=!0)=>t.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,p)=>{const v=typeof i[p]>"u"?p:`${p}="${qw(i[p],r)}"`;return d?`${d} ${v}`:v},""),h=i.innerHTML||i.cssText||"",o=KY.indexOf(e)===-1;return`${n}<${e} ${ya}="true" ${s}${o?"/>":`>${h}`}`},""),tF=(e,t={})=>Object.keys(e).reduce((r,n)=>{const a=Ib[n];return r[a||n]=e[n],r},t),YY=(e,t,r)=>{const n={key:t,[ya]:!0},a=tF(r,n);return[ma.createElement("title",a,t)]},kf=(e,t)=>t.map((r,n)=>{const a={key:n,[ya]:!0};return Object.keys(r).forEach(i=>{const h=Ib[i]||i;if(h==="innerHTML"||h==="cssText"){const o=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:o}}else a[h]=r[i]}),ma.createElement(e,a)}),Hn=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>YY(e,t.title,t.titleAttributes),toString:()=>XY(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>tF(t),toString:()=>eF(t)};default:return{toComponent:()=>kf(e,t),toString:()=>ZY(e,t,r)}}},QY=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const a=wy(e,gy.meta),i=wy(t,gy.link),s=wy(r,gy.script);return{priorityMethods:{toComponent:()=>[...kf("meta",a.priority),...kf("link",i.priority),...kf("script",s.priority)],toString:()=>`${Hn("meta",a.priority,n)} ${Hn("link",i.priority,n)} ${Hn("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},JY=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:h="",titleAttributes:o,prioritizeSeoTags:d}=e;let{linkTags:p,metaTags:v,scriptTags:m}=e,g={toComponent:()=>{},toString:()=>""};return d&&({priorityMethods:g,linkTags:p,metaTags:v,scriptTags:m}=QY(e)),{priority:g,base:Hn("base",t,n),bodyAttributes:Hn("bodyAttributes",r,n),htmlAttributes:Hn("htmlAttributes",a,n),link:Hn("link",p,n),meta:Hn("meta",v,n),noscript:Hn("noscript",i,n),script:Hn("script",m,n),style:Hn("style",s,n),title:Hn("title",{title:h,titleAttributes:o},n)}},Kw=JY,Vd=[],rF=!!(typeof window<"u"&&window.document&&window.document.createElement),Xw=class{constructor(e,t){N(this,"instances",[]);N(this,"canUseDOM",rF);N(this,"context");N(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Vd:this.instances,add:e=>{(this.canUseDOM?Vd:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Vd:this.instances).indexOf(e);(this.canUseDOM?Vd:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Kw({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},$Y={},nF=ma.createContext($Y),Ws,aF=(Ws=class extends at.Component{constructor(r){super(r);N(this,"helmetData");this.helmetData=new Xw(this.props.context||{},Ws.canUseDOM)}render(){return ma.createElement(nF.Provider,{value:this.helmetData.value},this.props.children)}},N(Ws,"canUseDOM",rF),Ws),vs=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${ya}]`),a=[].slice.call(n),i=[];let s;return t&&t.length&&t.forEach(h=>{const o=document.createElement(e);for(const d in h)if(Object.prototype.hasOwnProperty.call(h,d))if(d==="innerHTML")o.innerHTML=h.innerHTML;else if(d==="cssText")o.styleSheet?o.styleSheet.cssText=h.cssText:o.appendChild(document.createTextNode(h.cssText));else{const p=d,v=typeof h[p]>"u"?"":h[p];o.setAttribute(d,v)}o.setAttribute(ya,"true"),a.some((d,p)=>(s=p,o.isEqualNode(d)))?a.splice(s,1):i.push(o)}),a.forEach(h=>{var o;return(o=h.parentNode)==null?void 0:o.removeChild(h)}),i.forEach(h=>r.appendChild(h)),{oldTags:a,newTags:i}},Zw=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(ya),a=n?n.split(","):[],i=[...a],s=Object.keys(t);for(const h of s){const o=t[h]||"";r.getAttribute(h)!==o&&r.setAttribute(h,o),a.indexOf(h)===-1&&a.push(h);const d=i.indexOf(h);d!==-1&&i.splice(d,1)}for(let h=i.length-1;h>=0;h-=1)r.removeAttribute(i[h]);a.length===i.length?r.removeAttribute(ya):r.getAttribute(ya)!==s.join(",")&&r.setAttribute(ya,s.join(","))},eQ=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=$T(e)),Zw("title",t)},LS=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:h,onChangeClientState:o,scriptTags:d,styleTags:p,title:v,titleAttributes:m}=e;Zw("body",n),Zw("html",a),eQ(v,m);const g={baseTag:vs("base",r),linkTags:vs("link",i),metaTags:vs("meta",s),noscriptTags:vs("noscript",h),scriptTags:vs("script",d),styleTags:vs("style",p)},w={},O={};Object.keys(g).forEach(S=>{const{newTags:y,oldTags:x}=g[S];y.length&&(w[S]=y),x.length&&(O[S]=g[S].oldTags)}),t&&t(),o(e,w,O)},Xl=null,tQ=e=>{Xl&&cancelAnimationFrame(Xl),e.defer?Xl=requestAnimationFrame(()=>{LS(e,()=>{Xl=null})}):(LS(e),Xl=null)},rQ=tQ,IS=class extends at.Component{constructor(){super(...arguments);N(this,"rendered",!1)}shouldComponentUpdate(t){return!IY(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const a=GY(t.get().map(i=>{const s={...i.props};return delete s.context,s}));aF.canUseDOM?rQ(a):Kw&&(n=Kw(a)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},by,nQ=(by=class extends at.Component{shouldComponentUpdate(e){return!zY(RS(this.props,"helmetData"),RS(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return zS(DS.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${DS.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),zS(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return ma.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((o,d)=>(o[_Y[d]||d]=i[d],o),{});let{type:h}=n;switch(typeof h=="symbol"?h=h.toString():this.warnOnInvalidChildren(n,a),h){case"Symbol(react.fragment)":t=this.mapChildrenToProps(a,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,s,a);break;default:t=this.mapObjectTypeChildren(n,t,s,a);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Xw)){const a=n;n=new Xw(a.context,!0),delete r.helmetData}return n?ma.createElement(IS,{...r,context:n.value}):ma.createElement(nF.Consumer,null,a=>ma.createElement(IS,{...r,context:a}))}},N(by,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),by);function aQ(e){const t=e.content,r=e.navContent,n=e.fieldContent,a=e.stringContent,i=t.find(Z=>Z.uuid==="2c597df4-53b6-4ef5-8301-7817b04e1099"),s=nr(i.title),h=nr(i.body),o=document.getElementById("scroll-to-top"),d=document.documentElement.lang,p={stepLabel1:"Personal information page",stepLabel2:"Address and location page",stepLabel3:"Identification page",stepLabel4:"Political party page",stepLabel5:"Confirmation page",stepLabel6:"PDF Delivery page"},[v,m]=at.useState({title:"",first_name:"",middle_name:"",last_name:"",suffix:"",prev_title:"",prev_first_name:"",prev_middle_name:"",prev_last_name:"",prev_suffix:"",date_of_birth_month:"",date_of_birth_day:"",date_of_birth_year:"",phone_number:"",race:"",street_address:"",apt_num:"",city:"",state:"",zip_code:"",prev_street_address:"",prev_apt_num:"",prev_city:"",prev_state:"",prev_zip_code:"",mail_street_address:"",mail_apt_num:"",mail_city:"",mail_state:"",mail_zip_code:"",id_number:"",ssn_number:"",party_choice:"",email_address:""}),[g,w]=at.useState(!1),O=Z=>Me=>{Me.target.value.length>0&&w(!0),m(Z==="phone_number"?{...v,[Z]:RW(Me.target.value)}:{...v,[Z]:Me.target.value})},S=(Z,Me)=>{if(Z.target.value.length===0)m({...v,[Me]:""});else if(Z.target.value.length===1){let ft=0+Z.target.value;m({...v,[Me]:ft}),Z.target.setCustomValidity("")}else Z.target.value.length===2&&m({...v,[Me]:Z.target.value})};at.useEffect(()=>{const Z=Me=>{Me.preventDefault(),Me.returnValue=""};g!==!1?window.addEventListener("beforeunload",Z):window.removeEventListener("beforeunload",Z)},[g]);const[y,x]=at.useState(1),E=()=>{o.focus(),o.scrollIntoView({behavior:"instant"})},k=()=>{y!==6&&x(y+1),y!==6&&E()},F=()=>{y!==1&&x(y-1),E(),y===1&&e.handlePrev()},A=Z=>()=>{y!==1&&x(y-Z),E()},M=Z=>{dataLayer.push({NVRF_page_title:Z,event:"NVRF_STEP_SUBMIT"})},R=Z=>{Z.preventDefault(Z)},[H,G]=at.useState("email"),_=Z=>{Z==="email"?G("email"):Z==="print"&&G("print")},[X,K]=at.useState(!1),se=Z=>{K(Z.target.checked),!Z.target.checked&&m({...v,prev_title:"",prev_first_name:"",prev_middle_name:"",prev_last_name:"",prev_suffix:""})},[be,ve]=at.useState(!1),[Q,W]=at.useState(!1),Y=Z=>{W(Z.target.checked),!Z.target.checked&&m({...v,mail_street_address:"",mail_apt_num:"",mail_city:"",mail_state:"",mail_zip_code:""})},$=Z=>{ve(Z.target.checked),m({...v,street_address:"",apt_num:"",city:"",state:"",zip_code:""}),!Z.target.checked&&document.getElementById("alt-mail-addr")&&(Q||m({...v,mail_street_address:"",mail_apt_num:"",mail_city:"",mail_state:"",mail_zip_code:""}))},[ue,oe]=at.useState(!1),Ae=Z=>{oe(Z.target.checked),!Z.target.checked&&m({...v,prev_street_address:"",prev_apt_num:"",prev_city:"",prev_state:"",prev_zip_code:""})},[_e,ke]=at.useState(""),nt=Z=>{ke(Z.target.value),Z.target.value==="none"?m({...v,id_number:"none",ssn_number:""}):m({...v,id_number:"",ssn_number:""}),document.getElementById("state-id").className="",dataLayer.push({NVRF_id_type:Z.target.value,event:"NVRF_SELECT_ID"})},[At,tt]=at.useState(!1),Er=Z=>{tt(Z.target.checked),m({...v,id_number:"",ssn_number:""}),Z.target.checked?ke("none"):ke("")},[dt,sr]=at.useState(null),lr=Z=>{sr(Z)},Qt=()=>{const Z=document.getElementById("voter-contact");v.email_address?Z.value="":Z.removeAttribute("required")},Vr=()=>{switch(y){case 1:Qt();break}},Sa=Z=>{switch(Z){case 1:return r.back.reg_options;case 2:return r.back.personal_info;case 3:return r.back.address_location;case 4:return r.back.identification;case 5:return r.back.edit_info}},xe=Z=>{switch(Z){case 1:return r.next.address_location;case 2:return r.next.identification;case 3:return r.next.political_party;case 4:return r.next.confirm_info;case 5:return r.next.delivery}};return b.jsxs(b.Fragment,{children:[y!=6&&b.jsx(ej,{stringContent:a,type:"button","data-analytics":"backBtn",onClick:F,text:Sa(y)}),b.jsx(_W,{step:y,content:r,handleGoBack:A,setStep:x}),b.jsxs("div",{className:"margin-top-8 maxw-tablet margin-x-auto",children:[y<5&&b.jsxs(b.Fragment,{children:[b.jsx("h1",{children:s.replace("@state_name",e.stateData.name)}),b.jsx("div",{dangerouslySetInnerHTML:{__html:h}})]}),b.jsxs(ie.Form,{autoComplete:"off",id:"nvrf",className:"margin-top-5",style:{maxWidth:"none"},onSubmit:Z=>{R(Z),k(),M(p["stepLabel"+y])},children:[y===1&&b.jsx(nG,{state:e.state,stateData:e.stateData,fieldData:v,saveFieldData:O,dateFormat:S,registrationPath:e.registrationPath,previousName:X,onChangePreviousName:se,handlePrev:e.handlePrev,headings:r,content:t,fieldContent:n,stringContent:a}),y===2&&b.jsx(yG,{state:e.state,statesList:e.statesList,stateData:e.stateData,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,hasNoAddress:be,hasNoAddressCheckbox:$,hasPreviousAddress:ue,onChangePreviousAddressCheckbox:Ae,hasMailAddress:Q,onChangeMailAddressCheckbox:Y,headings:r,content:t,fieldContent:n,stringContent:a}),y===3&&b.jsx(EG,{state:e.state,stateData:e.stateData,fieldData:v,saveFieldData:O,dateFormat:S,registrationPath:e.registrationPath,handlePrev:F,saveIdType:nt,onChangeHasNoIdCheckbox:Er,hasNoID:At,idType:_e,headings:r,content:t,fieldContent:n,stringContent:a}),y===4&&b.jsx(TY,{state:e.state,stateData:e.stateData,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,headings:r,content:t,fieldContent:n,stringContent:a}),y===5&&b.jsx(SG,{state:e.state,stateData:e.stateData,headings:r,content:e.content,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,handleGoBackSteps:A,hasAcknowledged:dt,acknowledgeCheckbox:lr,fieldContent:n,stringContent:a}),y===6&&b.jsx(jY,{state:e.state,stateData:e.stateData,headings:r,content:e.content,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,deliveryButtonSelected:H,handleClickDeliveryButton:_,stringContent:a,pdfDoc:e.pdfDoc,form:e.form}),y!=6&&b.jsx(tj,{stringContent:a,type:"submit",onClick:()=>{Vr(),sC("nvrf")},text:xe(y)})]}),y===6&&d==="en"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{id:"touchpoints-form-embed",className:"margin-top-6"}),b.jsx(nQ,{children:b.jsx("script",{src:"https://touchpoints.app.cloud.gov/touchpoints/4da46508.js",async:!0})})]})]})]})}const iQ=document.getElementById("root").getAttribute("data-stateId"),oQ=document.getElementById("root").getAttribute("data-returnPath");function sQ(){const[e,t]=at.useState(""),[r,n]=at.useState(""),[a,i]=at.useState(""),[s,h]=at.useState(""),[o,d]=at.useState(""),[p,v]=at.useState(""),[m,g]=at.useState(null),[w,O]=at.useState(null),[S,y]=at.useState(null);at.useEffect(()=>{Lb().then(({pdfDoc:_e,form:ke})=>{O(_e),y(ke)}).catch(()=>g(!0))},[]),at.useEffect(()=>{Sd("states.json",t,g),Sd("pages.json",n,g),Sd("cards.json",h,g),Sd("fields.json",d,g),pE("navigation.json",i,g),pE("strings.json",v,g)},[]);const[x,E]=at.useState(1),[k,F]=at.useState(""),[A,M]=at.useState(""),[R,H]=at.useState(""),[G,_]=at.useState(1),X=nr(A.nvrf_last_updated_date),K=p?p.lastUpdated:null,se=document.getElementById("scroll-to-top"),[be,ve]=at.useState(null),Q=_e=>{ve(_e)},W=()=>{se.focus(),se.scrollIntoView({behavior:"instant"})},Y=()=>{x!=3&&E(x+1),W()},$=()=>{x!=1&&E(x-1),W(),x===2&&ve(null)},ue=_e=>{if(!A&&_e!==""&&e)for(let ke=0;ke{ue(iQ)},[ue,e]);const oe=_e=>{H(_e)},Ae=_e=>{G===4||_(_e+1)};if(m)return b.jsxs("div",{children:[b.jsx(ie.Alert,{type:"error",heading:"Error",headingLevel:"h1",children:b.jsx("p",{children:"The form filler tool failed to load."})}),b.jsx("p",{children:b.jsx("button",{className:"usa-button",onClick:()=>window.location.reload(),children:"Try loading the tool again"})}),b.jsxs("p",{children:["If you were unable to use our form filler tool, ",b.jsx("a",{href:"https://touchpoints.app.cloud.gov/touchpoints/c169d3b2/submit",target:"_blank",children:"submit feedback"}),"."]})]});if(e&&s&&r&&a&&o&&p){const _e=s.find(nt=>nt.uuid==="5922e06c-ac2f-475d-ab10-abfdeb65de43"),ke=[];for(let nt=0;nt=1&&b.jsxs("div",{className:"text-base margin-top-5 maxw-tablet margin-x-auto",children:[b.jsxs("p",{children:[K.replace("@state_name",A.name)," ",b.jsx("span",{dangerouslySetInnerHTML:{__html:X}})]}),_e&&b.jsx("div",{dangerouslySetInnerHTML:{__html:nr(_e.body)}})]})]})})}}xy.createRoot(document.getElementById("root")).render(b.jsx(ma.StrictMode,{children:b.jsx(sQ,{})})); +`+Ko(n).toString();this.acroField.setDefaultAppearance(k)}return O},e.prototype.updateWidgetAppearanceWithFont=function(t,r,n){var a=n.normal,i=n.rollover,s=n.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceStream(t,a,r),rollover:i&&this.createAppearanceStream(t,i,r),down:s&&this.createAppearanceStream(t,s,r)})},e.prototype.updateOnOffWidgetAppearance=function(t,r,n){var a=n.normal,i=n.rollover,s=n.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceDict(t,a,r),rollover:i&&this.createAppearanceDict(t,i,r),down:s&&this.createAppearanceDict(t,s,r)})},e.prototype.updateWidgetAppearances=function(t,r){var n=r.normal,a=r.rollover,i=r.down;t.setNormalAppearance(n),a?t.setRolloverAppearance(a):t.removeRolloverAppearance(),i?t.setDownAppearance(i):t.removeDownAppearance()},e.prototype.createAppearanceStream=function(t,r,n){var a,i=this.acroField.dict.context,s=t.getRectangle(),h=s.width,o=s.height,d=n&&{Font:(a={},a[n.name]=n.ref,a)},p=i.formXObject(r,{Resources:d,BBox:i.obj([0,0,h,o]),Matrix:i.obj([1,0,0,1,0,0])}),v=i.register(p);return v},e.prototype.createImageAppearanceStream=function(t,r,n){var a,i,s=this.acroField.dict.context,h=t.getRectangle(),o=t.getAppearanceCharacteristics(),d=t.getBorderStyle(),p=(i=d==null?void 0:d.getWidth())!==null&&i!==void 0?i:0,v=ui(o==null?void 0:o.getRotation()),m=io(Ke(Ke({},h),{rotation:v})),g=Go(h,v),w=r.scaleToFit(g.width-p*2,g.height-p*2),O={x:p,y:p,width:w.width,height:w.height,rotate:Ue(0),xSkew:Ue(0),ySkew:Ue(0)};n===Xi.Center?(O.x+=(g.width-p*2)/2-w.width/2,O.y+=(g.height-p*2)/2-w.height/2):n===Xi.Right&&(O.x=g.width-p-w.width,O.y=g.height-p-w.height);var S=this.doc.context.addRandomSuffix("Image",10),y=yt(m,WT(S,O)),x={XObject:(a={},a[S]=r.ref,a)},E=s.formXObject(y,{Resources:x,BBox:s.obj([0,0,h.width,h.height]),Matrix:s.obj([1,0,0,1,0,0])});return s.register(E)},e.prototype.createAppearanceDict=function(t,r,n){var a=this.acroField.dict.context,i=this.createAppearanceStream(t,r.on),s=this.createAppearanceStream(t,r.off),h=a.obj({});return h.set(n,i),h.set(j.of("Off"),s),h},e}(),lu=function(e){pe(t,e);function t(r,n,a){var i=e.call(this,r,n,a)||this;return U(r,"acroCheckBox",[[Qh,"PDFAcroCheckBox"]]),i.acroField=r,i}return t.prototype.check=function(){var r,n=(r=this.acroField.getOnValue())!==null&&r!==void 0?r:j.of("Yes");this.markAsDirty(),this.acroField.setValue(n)},t.prototype.uncheck=function(){this.markAsDirty(),this.acroField.setValue(j.of("Off"))},t.prototype.isChecked=function(){var r=this.acroField.getOnValue();return!!r&&r===this.acroField.getValue()},t.prototype.addToPage=function(r,n){var a,i,s,h,o,d;U(r,"page",[[qn,"PDFPage"]]),fl(n),n||(n={}),"textColor"in n||(n.textColor=Pt(0,0,0)),"backgroundColor"in n||(n.backgroundColor=Pt(1,1,1)),"borderColor"in n||(n.borderColor=Pt(0,0,0)),"borderWidth"in n||(n.borderWidth=1);var p=this.createWidget({x:(a=n.x)!==null&&a!==void 0?a:0,y:(i=n.y)!==null&&i!==void 0?i:0,width:(s=n.width)!==null&&s!==void 0?s:50,height:(h=n.height)!==null&&h!==void 0?h:50,textColor:n.textColor,backgroundColor:n.backgroundColor,borderColor:n.borderColor,borderWidth:(o=n.borderWidth)!==null&&o!==void 0?o:0,rotate:(d=n.rotate)!==null&&d!==void 0?d:Ue(0),hidden:n.hidden,page:r.ref}),v=this.doc.context.register(p.dict);this.acroField.addWidget(v),p.setAppearanceState(j.of("Off")),this.updateWidgetAppearance(p,j.of("Yes")),r.node.addAnnot(v)},t.prototype.needsAppearancesUpdate=function(){for(var r,n=this.acroField.getWidgets(),a=0,i=n.length;a1||a.length===1&&n)&&this.enableMultiselect();for(var h=new Array(a.length),o=0,d=a.length;o1||a.length===1&&n)&&this.enableMultiselect();for(var s=new Array(a.length),h=0,o=a.length;hn)throw new nY(r.length,n,this.getName());this.markAsDirty(),this.disableRichFormatting(),r?this.acroField.setValue(He.fromText(r)):this.acroField.removeValue()},t.prototype.getAlignment=function(){var r=this.acroField.getQuadding();return r===0?hr.Left:r===1?hr.Center:r===2?hr.Right:hr.Left},t.prototype.setAlignment=function(r){Li(r,"alignment",hr),this.markAsDirty(),this.acroField.setQuadding(r)},t.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},t.prototype.setMaxLength=function(r){if(ua(r,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),r===void 0)this.acroField.removeMaxLength();else{var n=this.getText();if(n&&n.length>r)throw new aY(n.length,r,this.getName());this.acroField.setMaxLength(r)}},t.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},t.prototype.setImage=function(r){for(var n=this.getAlignment(),a=n===hr.Center?Xi.Center:n===hr.Right?Xi.Right:Xi.Left,i=this.acroField.getWidgets(),s=0,h=i.length;s{const e=document.documentElement.lang,t=e!=="en"?`/${e}`:"",r=`${[]}/data${t}/nvrf/Federal_Voter_Registration_${e}.pdf`,n=await fetch(r).then(s=>s.arrayBuffer()),a=await eo.load(n),i=a.getForm();return{pdfDoc:a,form:i}},SY=async function(e,t,r){const{pdfDoc:n,form:a}=await Lb(),i=a.getRadioGroup("citizen"),s=a.getRadioGroup("eighteen_years"),h=a.getRadioGroup("salutation"),o=a.getTextField("first_name"),d=a.getTextField("middle_names"),p=a.getTextField("last_name"),v=a.getRadioGroup("suffix"),m=a.getRadioGroup("salutation_2"),g=a.getTextField("first_name_2"),w=a.getTextField("middle_names_2"),O=a.getTextField("last_name_2"),S=a.getRadioGroup("suffix_2"),y=a.getTextField("dob_month"),x=a.getTextField("dob_day"),E=a.getTextField("dob_year"),k=a.getTextField("telephone_number"),F=a.getTextField("race_ethnic_group"),A=a.getTextField("home_address"),M=a.getTextField("apt_lot_number"),R=a.getTextField("city"),H=a.getTextField("state"),G=a.getTextField("zip_code"),_=a.getTextField("mail_address"),X=a.getTextField("mail_city"),K=a.getTextField("mail_state"),se=a.getTextField("mail_zip_code"),be=a.getTextField("prev_address"),ve=a.getTextField("prev_apt_lot_number"),Q=a.getTextField("prev_city"),W=a.getTextField("prev_state"),Y=a.getTextField("prev_zip_code"),$=a.getTextField("id_number"),ue=a.getTextField("choice_of_party");i.select("yes"),s.select("yes"),t.title&&h.select(t.title),o.setText(t.first_name),d.setText(t.middle_name),p.setText(t.last_name),t.suffix&&v.select(t.suffix),t.prev_title&&m.select(t.prev_title),g.setText(t.prev_first_name),w.setText(t.prev_middle_name),O.setText(t.prev_last_name),t.prev_suffix&&S.select(t.prev_suffix),y.setText(t.date_of_birth_month),y.setFontSize(12),x.setText(t.date_of_birth_day),x.setFontSize(12),E.setText(t.date_of_birth_year),E.setFontSize(5),k.setText(t.phone_number),F.setText(t.race),t.street_address+t.apt_num+t.city+t.zip_code&&(A.setText(t.street_address),M.setText(t.apt_num),R.setText(t.city),H.setText(t.state),G.setText(t.zip_code)),_.setText(`${t.mail_street_address} ${t.mail_apt_num}`),X.setText(t.mail_city),K.setText(t.mail_state),se.setText(t.mail_zip_code),t.state=="Maine"&&t.prev_street_address==""?be.setText("N/A"):be.setText(t.prev_street_address),ve.setText(t.prev_apt_num),Q.setText(t.prev_city),W.setText(t.prev_state),Y.setText(t.prev_zip_code),t.id_number===""&&t.ssn_number===""?$.setText("None"):t.id_number!=""&&t.ssn_number!=""?$.setText(t.id_number+", "+t.ssn_number):$.setText(t.id_number+t.ssn_number),ue.setText(t.party_choice);let Ae=0;const _e=n.getPageCount();let ke=r.split(",");(!r||r.trim()==="")&&(ke=Array.from({length:_e},(dt,sr)=>sr.toString()));for(let dt=0;dt<_e;dt++)ke.includes(dt.toString())||(n.removePage(dt-Ae),Ae++);const nt=ke.splice(0,2);ke.splice(2,0,nt[0],nt[1]),((dt,sr)=>{const lr=dt.getPages();for(let Qt=0;Qtsr.toString()));for(let dt=0;dt<_e;dt++)ke.includes(dt.toString())||(n.removePage(dt-Ae),Ae++);const nt=ke.splice(0,2);ke.splice(2,0,nt[0],nt[1]),((dt,sr)=>{const lr=dt.getPages();for(let Qt=0;Qtg.uuid==="229f283c-6a70-43f6-a80f-15cfa158f062"),d=nr(h.body.replace("@state_name",e.stateData.name).replace("@mailing_address_inst",r.mailing_address_inst)).split("@download_mail-in_form_button"),p=d[0].split("@print_mail-in_form_button"),v=b.jsxs("svg",{"aria-hidden":"true",focusable:"false",width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M17.3497 23.0564L16.9974 22.7041L16.6439 23.0552L15.2239 24.4652L14.8678 24.8187L15.2226 25.1736L20.8126 30.7636L21.1662 31.1171L21.5197 30.7636L33.5197 18.7636L33.8733 18.41L33.5197 18.0564L32.1097 16.6464L31.7563 16.2931L31.4028 16.6463L21.1663 26.8731L17.3497 23.0564Z",fill:"#5CBF72",stroke:"#5CBF72"}),b.jsx("circle",{cx:"24.5762",cy:"24",r:"22",stroke:"#5CBF72",strokeWidth:"4"})]}),m=()=>b.jsxs("p",{children:[b.jsx("strong",{children:n.mailDeadlineLabel})," ",b.jsx("span",{dangerouslySetInnerHTML:{__html:r.postmarked_mail_deadline||r.received_mail_deadline}})]});return b.jsxs(b.Fragment,{children:[b.jsxs(ie.Grid,{row:!0,children:[b.jsx(ie.Grid,{col:1,children:v}),b.jsx(ie.Grid,{col:11,className:"padding-left-2",children:b.jsx("h1",{style:{fontSize:"2rem"},"data-test":"addressConfirm",children:h.title.replace("@state_name",e.stateData.name)})})]}),b.jsx("div",{className:"margin-top-2",dangerouslySetInnerHTML:{__html:p[0]}}),b.jsx(ie.Button,{"data-test":"pdfBtnNewTab",onClick:()=>{i("newTab",e.fieldData,e.stateData.nvrf_pages_list,e.pdfDoc,e.form),dataLayer.push({NVRF_button_click:s.pdfTabButton,event:"NVRF_PDF_BUTTON_CLICK"})},type:"submit",children:b.jsx("span",{children:n.newTab})}),b.jsx("div",{className:"margin-top-2",dangerouslySetInnerHTML:{__html:p[1]}}),b.jsx(ie.Button,{"data-test":"pdfBtnDownload",onClick:()=>{i("download",e.fieldData,e.stateData.nvrf_pages_list,e.pdfDoc,e.form),dataLayer.push({NVRF_button_click:s.pdfDownloadButton,event:"NVRF_PDF_BUTTON_CLICK"})},type:"submit",children:b.jsx("span",{children:n.download})}),b.jsx("div",{className:"margin-top-6",dangerouslySetInnerHTML:{__html:d[1].replace("@mail_deadline",$j(m()))}})]})}}function CY(e){const t="fd516f06-11bb-4c39-9080-735ed98100cc",r=Ie(e.fieldContent,t),n=Ie(e.stateData.nvrf_fields,r.uuid);return b.jsx(Nt,{fieldType:"text",inputData:{id:"party_choice",dataTest:"politicalParty",required:n.required,label:r.label,error_msg:r.error_msg,help_text:r.help_text},saveFieldData:e.saveFieldData,fieldData:e.fieldData})}function TY(e){const t=e.headings,r=e.stateData,n=e.fieldContent,a=e.stateData.nvrf_fields,i=nr(r.political_party_inst),s=n.find(d=>d.uuid==="fd516f06-11bb-4c39-9080-735ed98100cc"),h=nr(s.instructions),o=a.find(d=>d.uuid===s.uuid);return b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:t.step_label_4}),(i||h)&&b.jsx("div",{className:"usa-alert usa-alert--info",role:"region","aria-live":"polite",children:b.jsx("div",{className:"usa-alert__body",children:b.jsx("div",{className:"usa-alert__text",dangerouslySetInnerHTML:{__html:i}})})}),o&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"input-parent",children:[b.jsxs(ie.Label,{className:"text-bold",htmlFor:"political-party",children:[s.name,o.required==="1"&&b.jsx("span",{className:"required-text",children:"*"})]}),b.jsx("div",{className:"usa-hint",id:"political-party_hint",dangerouslySetInnerHTML:{__html:h}}),b.jsx(CY,{...e})]})})]})}var FY=typeof Element<"u",PY=typeof Map=="function",NY=typeof Set=="function",AY=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Sf(e[n],t[n]))return!1;return!0}var i;if(PY&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!Sf(n.value[1],t.get(n.value[0])))return!1;return!0}if(NY&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(AY&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;if(FY&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Sf(e[a[n]],t[a[n]]))return!1;return!0}return e!==e&&t!==t}var MY=function(t,r){try{return Sf(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const zY=el(MY);var DY=function(e,t,r,n,a,i,s,h){if(!e){var o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,a,i,s,h],p=0;o=new Error(t.replace(/%s/g,function(){return d[p++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}},RY=DY;const zS=el(RY);var LY=function(t,r,n,a){var i=n?n.call(a,t,r):void 0;if(i!==void 0)return!!i;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var s=Object.keys(t),h=Object.keys(r);if(s.length!==h.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(r),d=0;d(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(JT||{}),gy={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},DS=Object.values(JT),Ib={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},_Y=Object.entries(Ib).reduce((e,[t,r])=>(e[r]=t,e),{}),ya="data-rh",Hs={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Us=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},BY=e=>{let t=Us(e,"title");const r=Us(e,Hs.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Us(e,Hs.DEFAULT_TITLE);return t||n||void 0},VY=e=>Us(e,Hs.ON_CHANGE_CLIENT_STATE)||(()=>{}),yy=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),HY=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let i=0;iconsole&&typeof console.warn=="function"&&console.warn(e),Kl=(e,t,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&UY(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(o=>{let d;const p=Object.keys(o);for(let m=0;ma.push(o));const h=Object.keys(s);for(let o=0;o{if(Array.isArray(e)&&e.length){for(let r=0;r({baseTag:HY(["href"],e),bodyAttributes:yy("bodyAttributes",e),defer:Us(e,Hs.DEFER),encode:Us(e,Hs.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:yy("htmlAttributes",e),linkTags:Kl("link",["rel","href"],e),metaTags:Kl("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Kl("noscript",["innerHTML"],e),onChangeClientState:VY(e),scriptTags:Kl("script",["src","innerHTML"],e),styleTags:Kl("style",["cssText"],e),title:BY(e),titleAttributes:yy("titleAttributes",e),prioritizeSeoTags:WY(e,Hs.PRIORITIZE_SEO_TAGS)}),$T=e=>Array.isArray(e)?e.join(""):e,qY=(e,t)=>{const r=Object.keys(e);for(let n=0;nArray.isArray(e)?e.reduce((r,n)=>(qY(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},RS=(e,t)=>({...e,[t]:void 0}),KY=["noscript","script","style"],qw=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),eF=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),XY=(e,t,r,n)=>{const a=eF(r),i=$T(t);return a?`<${e} ${ya}="true" ${a}>${qw(i,n)}`:`<${e} ${ya}="true">${qw(i,n)}`},ZY=(e,t,r=!0)=>t.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,p)=>{const v=typeof i[p]>"u"?p:`${p}="${qw(i[p],r)}"`;return d?`${d} ${v}`:v},""),h=i.innerHTML||i.cssText||"",o=KY.indexOf(e)===-1;return`${n}<${e} ${ya}="true" ${s}${o?"/>":`>${h}`}`},""),tF=(e,t={})=>Object.keys(e).reduce((r,n)=>{const a=Ib[n];return r[a||n]=e[n],r},t),YY=(e,t,r)=>{const n={key:t,[ya]:!0},a=tF(r,n);return[ma.createElement("title",a,t)]},kf=(e,t)=>t.map((r,n)=>{const a={key:n,[ya]:!0};return Object.keys(r).forEach(i=>{const h=Ib[i]||i;if(h==="innerHTML"||h==="cssText"){const o=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:o}}else a[h]=r[i]}),ma.createElement(e,a)}),Hn=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>YY(e,t.title,t.titleAttributes),toString:()=>XY(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>tF(t),toString:()=>eF(t)};default:return{toComponent:()=>kf(e,t),toString:()=>ZY(e,t,r)}}},QY=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const a=wy(e,gy.meta),i=wy(t,gy.link),s=wy(r,gy.script);return{priorityMethods:{toComponent:()=>[...kf("meta",a.priority),...kf("link",i.priority),...kf("script",s.priority)],toString:()=>`${Hn("meta",a.priority,n)} ${Hn("link",i.priority,n)} ${Hn("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},JY=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:h="",titleAttributes:o,prioritizeSeoTags:d}=e;let{linkTags:p,metaTags:v,scriptTags:m}=e,g={toComponent:()=>{},toString:()=>""};return d&&({priorityMethods:g,linkTags:p,metaTags:v,scriptTags:m}=QY(e)),{priority:g,base:Hn("base",t,n),bodyAttributes:Hn("bodyAttributes",r,n),htmlAttributes:Hn("htmlAttributes",a,n),link:Hn("link",p,n),meta:Hn("meta",v,n),noscript:Hn("noscript",i,n),script:Hn("script",m,n),style:Hn("style",s,n),title:Hn("title",{title:h,titleAttributes:o},n)}},Kw=JY,Vd=[],rF=!!(typeof window<"u"&&window.document&&window.document.createElement),Xw=class{constructor(e,t){N(this,"instances",[]);N(this,"canUseDOM",rF);N(this,"context");N(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Vd:this.instances,add:e=>{(this.canUseDOM?Vd:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Vd:this.instances).indexOf(e);(this.canUseDOM?Vd:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Kw({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},$Y={},nF=ma.createContext($Y),Ws,aF=(Ws=class extends at.Component{constructor(r){super(r);N(this,"helmetData");this.helmetData=new Xw(this.props.context||{},Ws.canUseDOM)}render(){return ma.createElement(nF.Provider,{value:this.helmetData.value},this.props.children)}},N(Ws,"canUseDOM",rF),Ws),vs=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${ya}]`),a=[].slice.call(n),i=[];let s;return t&&t.length&&t.forEach(h=>{const o=document.createElement(e);for(const d in h)if(Object.prototype.hasOwnProperty.call(h,d))if(d==="innerHTML")o.innerHTML=h.innerHTML;else if(d==="cssText")o.styleSheet?o.styleSheet.cssText=h.cssText:o.appendChild(document.createTextNode(h.cssText));else{const p=d,v=typeof h[p]>"u"?"":h[p];o.setAttribute(d,v)}o.setAttribute(ya,"true"),a.some((d,p)=>(s=p,o.isEqualNode(d)))?a.splice(s,1):i.push(o)}),a.forEach(h=>{var o;return(o=h.parentNode)==null?void 0:o.removeChild(h)}),i.forEach(h=>r.appendChild(h)),{oldTags:a,newTags:i}},Zw=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(ya),a=n?n.split(","):[],i=[...a],s=Object.keys(t);for(const h of s){const o=t[h]||"";r.getAttribute(h)!==o&&r.setAttribute(h,o),a.indexOf(h)===-1&&a.push(h);const d=i.indexOf(h);d!==-1&&i.splice(d,1)}for(let h=i.length-1;h>=0;h-=1)r.removeAttribute(i[h]);a.length===i.length?r.removeAttribute(ya):r.getAttribute(ya)!==s.join(",")&&r.setAttribute(ya,s.join(","))},eQ=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=$T(e)),Zw("title",t)},LS=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:h,onChangeClientState:o,scriptTags:d,styleTags:p,title:v,titleAttributes:m}=e;Zw("body",n),Zw("html",a),eQ(v,m);const g={baseTag:vs("base",r),linkTags:vs("link",i),metaTags:vs("meta",s),noscriptTags:vs("noscript",h),scriptTags:vs("script",d),styleTags:vs("style",p)},w={},O={};Object.keys(g).forEach(S=>{const{newTags:y,oldTags:x}=g[S];y.length&&(w[S]=y),x.length&&(O[S]=g[S].oldTags)}),t&&t(),o(e,w,O)},Xl=null,tQ=e=>{Xl&&cancelAnimationFrame(Xl),e.defer?Xl=requestAnimationFrame(()=>{LS(e,()=>{Xl=null})}):(LS(e),Xl=null)},rQ=tQ,IS=class extends at.Component{constructor(){super(...arguments);N(this,"rendered",!1)}shouldComponentUpdate(t){return!IY(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const a=GY(t.get().map(i=>{const s={...i.props};return delete s.context,s}));aF.canUseDOM?rQ(a):Kw&&(n=Kw(a)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},by,nQ=(by=class extends at.Component{shouldComponentUpdate(e){return!zY(RS(this.props,"helmetData"),RS(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return zS(DS.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${DS.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),zS(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return ma.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((o,d)=>(o[_Y[d]||d]=i[d],o),{});let{type:h}=n;switch(typeof h=="symbol"?h=h.toString():this.warnOnInvalidChildren(n,a),h){case"Symbol(react.fragment)":t=this.mapChildrenToProps(a,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,s,a);break;default:t=this.mapObjectTypeChildren(n,t,s,a);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Xw)){const a=n;n=new Xw(a.context,!0),delete r.helmetData}return n?ma.createElement(IS,{...r,context:n.value}):ma.createElement(nF.Consumer,null,a=>ma.createElement(IS,{...r,context:a}))}},N(by,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),by);function aQ(e){const t=e.content,r=e.navContent,n=e.fieldContent,a=e.stringContent,i=t.find(Z=>Z.uuid==="2c597df4-53b6-4ef5-8301-7817b04e1099"),s=nr(i.title),h=nr(i.body),o=document.getElementById("scroll-to-top"),d=document.documentElement.lang,p={stepLabel1:"Personal information page",stepLabel2:"Address and location page",stepLabel3:"Identification page",stepLabel4:"Political party page",stepLabel5:"Confirmation page",stepLabel6:"PDF Delivery page"},[v,m]=at.useState({title:"",first_name:"",middle_name:"",last_name:"",suffix:"",prev_title:"",prev_first_name:"",prev_middle_name:"",prev_last_name:"",prev_suffix:"",date_of_birth_month:"",date_of_birth_day:"",date_of_birth_year:"",phone_number:"",race:"",street_address:"",apt_num:"",city:"",state:"",zip_code:"",prev_street_address:"",prev_apt_num:"",prev_city:"",prev_state:"",prev_zip_code:"",mail_street_address:"",mail_apt_num:"",mail_city:"",mail_state:"",mail_zip_code:"",id_number:"",ssn_number:"",party_choice:"",email_address:""}),[g,w]=at.useState(!1),O=Z=>Me=>{Me.target.value.length>0&&w(!0),m(Z==="phone_number"?{...v,[Z]:RW(Me.target.value)}:{...v,[Z]:Me.target.value})},S=(Z,Me)=>{if(Z.target.value.length===0)m({...v,[Me]:""});else if(Z.target.value.length===1){let ft=0+Z.target.value;m({...v,[Me]:ft}),Z.target.setCustomValidity("")}else Z.target.value.length===2&&m({...v,[Me]:Z.target.value})};at.useEffect(()=>{const Z=Me=>{Me.preventDefault(),Me.returnValue=""};g!==!1?window.addEventListener("beforeunload",Z):window.removeEventListener("beforeunload",Z)},[g]);const[y,x]=at.useState(1),E=()=>{o.focus(),o.scrollIntoView({behavior:"instant"})},k=()=>{y!==6&&x(y+1),y!==6&&E()},F=()=>{y!==1&&x(y-1),E(),y===1&&e.handlePrev()},A=Z=>()=>{y!==1&&x(y-Z),E()},M=Z=>{dataLayer.push({NVRF_page_title:Z,event:"NVRF_STEP_SUBMIT"})},R=Z=>{Z.preventDefault(Z)},[H,G]=at.useState("email"),_=Z=>{Z==="email"?G("email"):Z==="print"&&G("print")},[X,K]=at.useState(!1),se=Z=>{K(Z.target.checked),!Z.target.checked&&m({...v,prev_title:"",prev_first_name:"",prev_middle_name:"",prev_last_name:"",prev_suffix:""})},[be,ve]=at.useState(!1),[Q,W]=at.useState(!1),Y=Z=>{W(Z.target.checked),!Z.target.checked&&m({...v,mail_street_address:"",mail_apt_num:"",mail_city:"",mail_state:"",mail_zip_code:""})},$=Z=>{ve(Z.target.checked),m({...v,street_address:"",apt_num:"",city:"",state:"",zip_code:""}),!Z.target.checked&&document.getElementById("alt-mail-addr")&&(Q||m({...v,mail_street_address:"",mail_apt_num:"",mail_city:"",mail_state:"",mail_zip_code:""}))},[ue,oe]=at.useState(!1),Ae=Z=>{oe(Z.target.checked),!Z.target.checked&&m({...v,prev_street_address:"",prev_apt_num:"",prev_city:"",prev_state:"",prev_zip_code:""})},[_e,ke]=at.useState(""),nt=Z=>{ke(Z.target.value),Z.target.value==="none"?m({...v,id_number:"none",ssn_number:""}):m({...v,id_number:"",ssn_number:""}),document.getElementById("state-id").className="",dataLayer.push({NVRF_id_type:Z.target.value,event:"NVRF_SELECT_ID"})},[At,tt]=at.useState(!1),Er=Z=>{tt(Z.target.checked),m({...v,id_number:"",ssn_number:""}),Z.target.checked?ke("none"):ke("")},[dt,sr]=at.useState(null),lr=Z=>{sr(Z)},Qt=()=>{const Z=document.getElementById("voter-contact");v.email_address?Z.value="":Z.removeAttribute("required")},Vr=()=>{switch(y){case 1:Qt();break}},Sa=Z=>{switch(Z){case 1:return r.back.reg_options;case 2:return r.back.personal_info;case 3:return r.back.address_location;case 4:return r.back.identification;case 5:return r.back.edit_info}},xe=Z=>{switch(Z){case 1:return r.next.address_location;case 2:return r.next.identification;case 3:return r.next.political_party;case 4:return r.next.confirm_info;case 5:return r.next.delivery}};return b.jsxs(b.Fragment,{children:[y!=6&&b.jsx(ej,{stringContent:a,type:"button","data-analytics":"backBtn",onClick:F,text:Sa(y)}),b.jsx(_W,{step:y,content:r,handleGoBack:A,setStep:x}),b.jsxs("div",{className:"margin-top-8 maxw-tablet margin-x-auto",children:[y<5&&b.jsxs(b.Fragment,{children:[b.jsx("h1",{children:s.replace("@state_name",e.stateData.name)}),b.jsx("div",{dangerouslySetInnerHTML:{__html:h}})]}),b.jsxs(ie.Form,{autoComplete:"off",id:"nvrf",className:"margin-top-5",style:{maxWidth:"none"},onSubmit:Z=>{R(Z),k(),M(p["stepLabel"+y])},children:[y===1&&b.jsx(nG,{state:e.state,stateData:e.stateData,fieldData:v,saveFieldData:O,dateFormat:S,registrationPath:e.registrationPath,previousName:X,onChangePreviousName:se,handlePrev:e.handlePrev,headings:r,content:t,fieldContent:n,stringContent:a}),y===2&&b.jsx(yG,{state:e.state,statesList:e.statesList,stateData:e.stateData,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,hasNoAddress:be,hasNoAddressCheckbox:$,hasPreviousAddress:ue,onChangePreviousAddressCheckbox:Ae,hasMailAddress:Q,onChangeMailAddressCheckbox:Y,headings:r,content:t,fieldContent:n,stringContent:a}),y===3&&b.jsx(EG,{state:e.state,stateData:e.stateData,fieldData:v,saveFieldData:O,dateFormat:S,registrationPath:e.registrationPath,handlePrev:F,saveIdType:nt,onChangeHasNoIdCheckbox:Er,hasNoID:At,idType:_e,headings:r,content:t,fieldContent:n,stringContent:a}),y===4&&b.jsx(TY,{state:e.state,stateData:e.stateData,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,headings:r,content:t,fieldContent:n,stringContent:a}),y===5&&b.jsx(SG,{state:e.state,stateData:e.stateData,headings:r,content:e.content,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,handleGoBackSteps:A,hasAcknowledged:dt,acknowledgeCheckbox:lr,fieldContent:n,stringContent:a}),y===6&&b.jsx(jY,{state:e.state,stateData:e.stateData,headings:r,content:e.content,fieldData:v,saveFieldData:O,registrationPath:e.registrationPath,handlePrev:F,deliveryButtonSelected:H,handleClickDeliveryButton:_,stringContent:a,pdfDoc:e.pdfDoc,form:e.form}),y!=6&&b.jsx(tj,{stringContent:a,type:"submit",onClick:()=>{Vr(),sC("nvrf")},text:xe(y)})]}),y===6&&d==="en"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{id:"touchpoints-form-embed",className:"margin-top-6"}),b.jsx(nQ,{children:b.jsx("script",{src:"https://touchpoints.app.cloud.gov/touchpoints/4da46508.js",async:!0})})]})]})]})}const iQ=document.getElementById("root").getAttribute("data-stateId"),oQ=document.getElementById("root").getAttribute("data-returnPath");function sQ(){const[e,t]=at.useState(""),[r,n]=at.useState(""),[a,i]=at.useState(""),[s,h]=at.useState(""),[o,d]=at.useState(""),[p,v]=at.useState(""),[m,g]=at.useState(null),[w,O]=at.useState(null),[S,y]=at.useState(null);at.useEffect(()=>{Lb().then(({pdfDoc:_e,form:ke})=>{O(_e),y(ke)}).catch(()=>g(!0))},[]),at.useEffect(()=>{Sd("states.json",t,g),Sd("pages.json",n,g),Sd("cards.json",h,g),Sd("fields.json",d,g),pE("navigation.json",i,g),pE("strings.json",v,g)},[]);const[x,E]=at.useState(1),[k,F]=at.useState(""),[A,M]=at.useState(""),[R,H]=at.useState(""),[G,_]=at.useState(1),X=nr(A.nvrf_last_updated_date),K=p?p.lastUpdated:null,se=document.getElementById("scroll-to-top"),[be,ve]=at.useState(null),Q=_e=>{ve(_e)},W=()=>{se.focus(),se.scrollIntoView({behavior:"instant"})},Y=()=>{x!=3&&E(x+1),W()},$=()=>{x!=1&&E(x-1),W(),x===2&&ve(null)},ue=_e=>{if(!A&&_e!==""&&e)for(let ke=0;ke{ue(iQ)},[ue,e]);const oe=_e=>{H(_e)},Ae=_e=>{G===4||_(_e+1)};if(m)return b.jsxs("div",{children:[b.jsx(ie.Alert,{type:"error",heading:"Error",headingLevel:"h1",children:b.jsx("p",{children:"The form filler tool failed to load."})}),b.jsx("p",{children:b.jsx("button",{className:"usa-button",onClick:()=>window.location.reload(),children:"Try loading the tool again"})}),b.jsxs("p",{children:["If you were unable to use our form filler tool, ",b.jsx("a",{href:"https://touchpoints.app.cloud.gov/touchpoints/c169d3b2/submit",target:"_blank",children:"submit feedback"}),"."]})]});if(e&&s&&r&&a&&o&&p){const _e=s.find(nt=>nt.uuid==="5922e06c-ac2f-475d-ab10-abfdeb65de43"),ke=[];for(let nt=0;nt=1&&b.jsxs("div",{className:"text-base margin-top-5 maxw-tablet margin-x-auto",children:[b.jsxs("p",{children:[K.replace("@state_name",A.name)," ",b.jsx("span",{dangerouslySetInnerHTML:{__html:X}})]}),_e&&b.jsx("div",{dangerouslySetInnerHTML:{__html:nr(_e.body)}})]})]})})}}xy.createRoot(document.getElementById("root")).render(b.jsx(ma.StrictMode,{children:b.jsx(sQ,{})})); diff --git a/web/modules/custom/vote_nvrf/package-lock.json b/web/modules/custom/vote_nvrf/package-lock.json index 94fdf18b7..ccd848d3f 100644 --- a/web/modules/custom/vote_nvrf/package-lock.json +++ b/web/modules/custom/vote_nvrf/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "hasInstallScript": true, "dependencies": { - "vote-gov-nvrf-app": "github:usagov/vote-gov-nvrf-app#v0.18.1" + "vote-gov-nvrf-app": "github:usagov/vote-gov-nvrf-app#v0.18.2" } }, "node_modules/@ampproject/remapping": { @@ -1382,7 +1382,7 @@ }, "node_modules/vote-gov-nvrf-app": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/usagov/vote-gov-nvrf-app.git#15b27c47e3d033326fb4d75c2eceb8815be81700", + "resolved": "git+ssh://git@github.com/usagov/vote-gov-nvrf-app.git#d2bed2c9d08541806036ab03ac239d7701ee12b4", "hasInstallScript": true, "dependencies": { "@trussworks/react-uswds": "^6.2.0", diff --git a/web/modules/custom/vote_nvrf/package.json b/web/modules/custom/vote_nvrf/package.json index 58861a22d..4d9375382 100644 --- a/web/modules/custom/vote_nvrf/package.json +++ b/web/modules/custom/vote_nvrf/package.json @@ -3,14 +3,13 @@ "version": "1.0.0", "scripts": { "postinstall": "npm run build", - "build": "npm run reset-dist && npm run copy-dist:js && npm run copy-dist:css && npm run copy-data && npm run copy-data-es", + "build": "npm run reset-dist && npm run copy-dist:js && npm run copy-dist:css && npm run copy-dist:data", "reset-dist": "mkdir -p ./dist/assets", "copy-dist:js": "cp -r ./node_modules/vote-gov-nvrf-app/dist/assets/index.js ./dist/assets/index.js", "copy-dist:css": "cp -r ./node_modules/vote-gov-nvrf-app/dist/assets/index.css ./dist/assets/index.css", - "copy-data": "mkdir -p ../../../nvrf && rm -rf ../../../nvrf/data && cp -r ./node_modules/vote-gov-nvrf-app/dist/nvrf/data ../../../nvrf/data", - "copy-data-es": "mkdir -p ../../../es/nvrf && rm -rf ../../../es/nvrf/data && cp -r ./node_modules/vote-gov-nvrf-app/dist/es/nvrf/data ../../../es/nvrf/data" + "copy-dist:data": "rm -rf ../../../data && cp -r ./node_modules/vote-gov-nvrf-app/dist/data ../../../data" }, "dependencies": { - "vote-gov-nvrf-app": "github:usagov/vote-gov-nvrf-app#v0.18.1" + "vote-gov-nvrf-app": "github:usagov/vote-gov-nvrf-app#v0.18.2" } }