@department-of-veterans-affairs/component-library 50.2.0 → 50.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2319.app.bundle.js +2 -0
- package/dist/2387.app.bundle.js +1 -1
- package/dist/2654.app.bundle.js +1 -1
- package/dist/2801.app.bundle.js +1 -1
- package/dist/4064.app.bundle.js +1 -1
- package/dist/4117.app.bundle.js +1 -1
- package/dist/4715.app.bundle.js +1 -1
- package/dist/5189.app.bundle.js +1 -1
- package/dist/5533.app.bundle.js +1 -0
- package/dist/5699.app.bundle.js +1 -1
- package/dist/6246.app.bundle.js +1 -1
- package/dist/6349.app.bundle.js +1 -1
- package/dist/641.app.bundle.js +1 -1
- package/dist/6527.app.bundle.js +1 -1
- package/dist/712.app.bundle.js +1 -1
- package/dist/7367.app.bundle.js +1 -1
- package/dist/7531.app.bundle.js +1 -1
- package/dist/7663.app.bundle.js +1 -1
- package/dist/7821.app.bundle.js +1 -1
- package/dist/8175.app.bundle.js +1 -1
- package/dist/82.app.bundle.js +1 -1
- package/dist/8206.app.bundle.js +1 -0
- package/dist/8495.app.bundle.js +1 -1
- package/dist/9288.app.bundle.js +1 -1
- package/dist/9409.app.bundle.js +1 -1
- package/dist/9800.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/types/components.d.ts +85 -0
- package/dist/components/utils.js +1 -1
- package/dist/components/va-accordion-item.js +1 -1
- package/dist/components/va-accordion-item2.js +1 -0
- package/dist/components/va-accordion.js +1 -1
- package/dist/components/va-accordion2.js +1 -0
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-alert-sign-in.js +1 -1
- package/dist/components/va-alert2.js +1 -1
- package/dist/components/va-checkbox-group.js +1 -1
- package/dist/components/va-checkbox-group2.js +1 -0
- package/dist/components/va-checkbox2.js +1 -1
- package/dist/components/va-combo-box.js +1 -1
- package/dist/components/va-critical-action2.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input2.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-memorable-date.js +1 -1
- package/dist/components/va-modal2.js +1 -1
- package/dist/components/va-process-list-item.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-filter.d.ts +11 -0
- package/dist/components/va-search-filter.js +1 -0
- package/dist/components/va-select2.js +1 -1
- package/dist/components/va-service-list-item.js +1 -1
- package/dist/components/va-text-input2.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/dist/main.css +1 -1
- package/dist/react-bindings/index.d.ts +1 -0
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +1 -0
- package/package.json +2 -2
- package/dist/2664.app.bundle.js +0 -2
- package/dist/4033.app.bundle.js +0 -1
- package/dist/4493.app.bundle.js +0 -2
- package/dist/4493.app.bundle.js.LICENSE.txt +0 -5
- package/dist/9157.app.bundle.js +0 -2
- package/dist/9157.app.bundle.js.LICENSE.txt +0 -5
- /package/dist/{2664.app.bundle.js.LICENSE.txt → 2319.app.bundle.js.LICENSE.txt} +0 -0
package/dist/2801.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 2801.app.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[20,2801,4033],{20:function(e,t,o){o.r(t),o.d(t,{c:function(){return i}});var a,r={exports:{}};a=r,function(){var e={}.hasOwnProperty;function t(){for(var o=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var i=typeof r;if("string"===i||"number"===i)o.push(r);else if(Array.isArray(r)){if(r.length){var n=t.apply(null,r);n&&o.push(n)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)e.call(r,s)&&r[s]&&o.push(s);else o.push(r.toString())}}return o.join(" ")}a.exports?(t.default=t,a.exports=t):window.classNames=t}();var i=r.exports},4033:function(e,t,o){function a(e){return!Number.isNaN(parseFloat(e))}function r(e,t,o){void 0===o&&(o="slot");var a=e.shadowRoot.querySelector(o).assignedNodes();return null!==t?Array.from(a).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(a)}function i(e){return 1===e?"":"s"}function n(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(i(t)," allowed");var o;if(e.length<=t){var a=t-e.length;o="".concat(a," character").concat(i(a)," left")}else a=e.length-t,o="".concat(a," character").concat(i(a)," over limit");return o}function s(e,t){return Array.from({length:t-e+1},(function(t,o){return e+o}))}o.r(t),o.d(t,{S:function(){return l},a:function(){return d},b:function(){return a},c:function(){return n},d:function(){return b},g:function(){return r},i:function(){return p},m:function(){return s},s:function(){return u}}),o(3798);var c=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,t){var o=function(e,t){if("string"!=typeof e)return[];if(!t||!c(t))return[];var o=t.shadowRoot.querySelectorAll(e);return Array.from(o)}(e,t);return"string"!=typeof e||c(t)&&t.matches(e)&&o.push(t),o}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var t="",o=0;o<e.length;o++)t+=e[o],o+1<arguments.length&&(t+=String(arguments[o+1]||"").replace(l._entity,l.getEntity));return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function b(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function p(e){return e&&"false"!==e||!1}},2801:function(e,t,o){o.r(t),o.d(t,{va_combo_box:function(){return ke}});var a,r,i,n,s,c,u,l=o(3798),d=o(20),b=(o(2465),o(4033)),p=o(9425),m=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},f={exports:{}};u={exports:{}},function(){var e,t={polyfill:function(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var o=t.keys[this.which||this.keyCode];return Array.isArray(o)&&(o=o[+this.shiftKey]),o}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e},keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(e=1;e<25;e++)t.keys[111+e]="F"+e;var o="";for(e=65;e<91;e++)o=String.fromCharCode(e),t.keys[e]=[o.toLowerCase(),o.toUpperCase()];u.exports=t}();var g={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"};f.exports=function(e){var t=Object.keys(e).some((function(e){return e.indexOf("+")>-1}));return function(o){var a=function(e,t){var o=e.key;if(t)for(var a in g)!0===e[g[a]]&&(o=[a,o].join("+"));return o}(o,t);return[a,a.toLowerCase()].reduce((function(t,r){return r in e&&(t=e[a].call(this,o)),t}),void 0)}},f.exports.MODIFIERS=g;var h=f.exports,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,y=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;var a=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==a.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o,a,r=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var n in o=Object(arguments[i]))x.call(o,n)&&(r[n]=o[n]);if(v){a=v(o);for(var s=0;s<a.length;s++)w.call(o,a[s])&&(r[a[s]]=o[a[s]])}}return r};!function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),a=0;o[a]&&o[a]!==t;)++a;return Boolean(o[a])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype);var _=function(e,t){return function(o){var a=o.target.closest(e);if(a)return t.call(a,o)}},k=_,E=y,A=_,F=function(e){var t=Object.keys(e);if(1===t.length&&"*"===t[0])return e["*"];var o=t.reduce((function(t,o){return t.push(k(o,e[o])),t}),[]);return function(e){return function(t){return e.some((function(e){return!1===e.call(this,t)}),this)}}(o)},D=/^(.+):delegate\((.+)\)$/,C=function(e,t){var o=e[t];return delete e[t],o},S=y,L=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var o=this;void 0===t&&(t=document.body),e.forEach((function(e){"function"==typeof o[e]&&o[e].call(o,t)}))}},z={exports:{}};z.exports=function(){var e={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(t){return e._entities[t]},escapeHTML:function(t){for(var o="",a=0;a<t.length;a++)o+=t[a],a+1<arguments.length&&(o+=String(arguments[a+1]||"").replace(e._entity,e.getEntity));return o},createSafeHTML:function(t){for(var o=arguments.length,a=new Array(o>1?o-1:0),r=1;r<o;r++)a[r-1]=arguments[r];return{__html:e.escapeHTML.apply(e,[t].concat(a)),toString:function(){return"[object WrappedHTMLObject]"},info:"This is a wrapped HTML object. See https://developer.mozilla.org/en-US/Firefox_OS/Security/Security_Automation for more."}},unwrapSafeHTML:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a=t.map((function(e){return e.__html}));return a.join("")}};return e}();var T,B,O=z.exports,j="".concat("usa","-combo-box"),M="".concat(j,"--pristine"),q="".concat(j,"__select"),H="".concat(j,"__input"),N="".concat(j,"__clear-input"),P="".concat(N,"__wrapper"),I="".concat(j,"__input-button-separator"),G="".concat(j,"__toggle-list"),R="".concat(G,"__wrapper"),K="".concat(j,"__list"),U="".concat(j,"__list-option"),V="".concat(U,"--group"),$="".concat(U,"--group-option"),W="".concat(U,"--focused"),X="".concat(U,"--selected"),Z="".concat(j,"__status"),J=".".concat(j),Q=".".concat(q),Y=".".concat(H),ee=".".concat(N),te=".".concat(G),oe=".".concat(K),ae=".".concat(U),re=".".concat(W),ie=".".concat(X),ne=".".concat(Z),se=function(e,t){void 0===t&&(t="");var o=e;o.value=t;var a=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});o.dispatchEvent(a)},ce=function(e){var t=e.closest(J);if(!t)throw new Error("Element is missing outer ".concat(J));var o=t.querySelector(Q),a=t.querySelector(Y),r=t.querySelector(oe),i=t.querySelector(ne),n=t.querySelector(re),s=t.querySelector(ie),c=t.querySelector(te),u=t.querySelector(ee),l=t.classList.contains(M);return{comboBoxEl:t,selectEl:o,inputEl:a,listEl:r,statusEl:i,focusedOptionEl:n,selectedOptionEl:s,toggleListBtnEl:c,clearInputBtnEl:u,isPristine:l,disableFiltering:"true"===t.dataset.disableFiltering}},ue=function(e){var t=ce(e),o=t.inputEl,a=t.toggleListBtnEl,r=t.clearInputBtnEl;r.hidden=!0,r.disabled=!0,a.disabled=!0,o.disabled=!0},le=function(e){var t=e.target;t.selectionStart===t.selectionEnd&&t.select()},de=function(e,t){var o=e.closest(J);if(!o.dataset.enhanced){var a=o.querySelector("select");if(!a)throw new Error("".concat(J," is missing inner select"));var r,i=a.id,n=t,s="".concat(i,"--list"),c="".concat(i,"-label"),u="".concat(i,"--assistiveHint"),l=[],d=o.dataset.defaultValue,b=o.dataset.placeholder;if(b&&l.push({placeholder:b}),d)for(var p=0,f=a.options.length;p<f;p+=1){var g=a.options[p];if(g.value===d){r=g;break}}if(!n||!n.matches('label[for="'.concat(i,'"]')))throw new Error("".concat(J," for ").concat(i,' is either missing a label or a "for" attribute'));n.setAttribute("id",c),n.setAttribute("id",c),a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.classList.add("usa-sr-only",q),a.id="",a.value="",["required","aria-label","aria-labelledby"].forEach((function(e){var t;if(a.hasAttribute(e)){var o=a.getAttribute(e);l.push(((t={})[e]=o,t)),a.removeAttribute(e)}}));var h=document.createElement("input");if(h.setAttribute("id",i),h.setAttribute("aria-owns",s),h.setAttribute("aria-controls",s),h.setAttribute("aria-autocomplete","list"),h.setAttribute("aria-describedby",u),h.setAttribute("aria-expanded","false"),h.setAttribute("autocapitalize","off"),h.setAttribute("autocomplete","off"),h.setAttribute("class",H),h.setAttribute("type","text"),h.setAttribute("role","combobox"),h.onmouseup=le,l.forEach((function(e){return Object.keys(e).forEach((function(t){var o=O.escapeHTML(T||(T=m(["",""],["",""])),e[t]);h.setAttribute(t,o)}))})),"true"===o.dataset.error&&h.classList.add("usa-input--error"),o.insertAdjacentElement("beforeend",h),o.insertAdjacentHTML("beforeend",O.escapeHTML(B||(B=m(['\n <span class="','" tabindex="-1">\n <button type="button" class="','" aria-label="Clear the select contents"> </button>\n </span>\n <span class="','"> </span>\n <span class="','" tabindex="-1">\n <button type="button" tabindex="-1" class="','" aria-label="Toggle the dropdown list"> </button>\n </span>\n <ul\n tabindex="-1"\n id="','"\n class="','"\n role="listbox"\n aria-labelledby="','"\n hidden>\n </ul>\n <div class="',' usa-sr-only" role="status"></div>'],['\n <span class="','" tabindex="-1">\n <button type="button" class="','" aria-label="Clear the select contents"> </button>\n </span>\n <span class="','"> </span>\n <span class="','" tabindex="-1">\n <button type="button" tabindex="-1" class="','" aria-label="Toggle the dropdown list"> </button>\n </span>\n <ul\n tabindex="-1"\n id="','"\n class="','"\n role="listbox"\n aria-labelledby="','"\n hidden>\n </ul>\n <div class="',' usa-sr-only" role="status"></div>'])),P,N,I,R,G,s,K,c,Z)),r){var v=ce(o).inputEl;se(a,r.value),se(v,r.text),o.classList.add(M)}a.disabled&&(ue(o),a.disabled=!1),a.hasAttribute("aria-disabled")&&(function(e){var t=ce(e),o=t.inputEl,a=t.toggleListBtnEl,r=t.clearInputBtnEl;r.hidden=!0,r.setAttribute("aria-disabled",!0),a.setAttribute("aria-disabled",!0),o.setAttribute("aria-disabled",!0)}(o),a.removeAttribute("aria-disabled")),o.dataset.enhanced="true"}},be=function(e,t,o){var a=void 0===o?{}:o,r=a.skipFocus,i=a.preventScroll,n=ce(e),s=n.inputEl,c=n.listEl,u=n.focusedOptionEl;if(u&&(u.classList.remove(W),u.setAttribute("tabIndex","-1")),t){if(s.setAttribute("aria-activedescendant",t.id),t.setAttribute("tabIndex","0"),t.classList.add(W),!i){var l=t.offsetTop+t.offsetHeight;l>c.scrollTop+c.offsetHeight&&(c.scrollTop=l-c.offsetHeight),t.offsetTop<c.scrollTop&&(c.scrollTop=t.offsetTop)}r||t.focus({preventScroll:i})}else s.setAttribute("aria-activedescendant",""),s.focus()},pe=function(e,t,o){void 0===t&&(t=""),void 0===o&&(o={});var a=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},r=e.replace(/{{(.*?)}}/g,(function(e,r){var i=r.trim(),n=o[i];if("query"!==i&&n){var s=new RegExp(n,"i"),c=t.match(s);return c?a(c[1]):""}return a(t)}));return r="^(?:".concat(r,")$"),new RegExp(r,"i")},me=function(e){return"true"===e.getAttribute("data-optgroup")},fe=function(e){for(var t,o,a=ce(e),r=a.comboBoxEl,i=a.selectEl,n=a.inputEl,s=a.listEl,c=a.statusEl,u=a.isPristine,l=a.disableFiltering,d="".concat(s.id,"--option-"),b=(n.value||"").trim().toLowerCase(),p=r.dataset.filter||".*{{query}}.*",m=pe(p,b,r.dataset),f=[],g="",h=0,v=i.options.length;h<v;h+=1){var x=i.options[h],w="".concat(d).concat(f.length);if(x.value&&(l||u||!b||m.test(x.text))){if(i.value&&x.value===i.value&&(t=w),l&&!o&&m.test(x.text)&&(o=w),!b){f.push(x);continue}if(b&&m.test(x.text)&&"true"!==x.getAttribute("data-optgroup")){if("true"===x.getAttribute("data-optgroup-option")&&g!==x.getAttribute("aria-describedby")){g=x.getAttribute("aria-describedby");var y=i.querySelector("#"+g);f.push(y)}f.push(x)}}}var _=f.length,k=!1,E=0,A=0,F=f.filter((function(e){return!me(e)})).length,D=f.map((function(e,o){var a=me(e),r=null!==e.getAttribute("data-optgroup-option");a&&(E+=1),a||(A+=1);var n="".concat(d).concat(o),s=a?[]:[U],c="-1",u="false";i.value&&e.value===i.value&&(s.push(X,W),c="0",u="true"),t||k||a||(s.push(W),c="0",k=!0),a?s.push(V):r&&s.push($);var l=document.createElement("li");return a||(l.setAttribute("aria-setsize",F),l.setAttribute("aria-posinset",A),l.setAttribute("aria-describedby",e.getAttribute("aria-describedby"))),l.setAttribute("aria-selected",u),l.setAttribute("id",a?e.id:n),l.setAttribute("class",s.join(" ")),l.setAttribute("tabindex",c),l.setAttribute("role",a?"group":"option"),l.setAttribute("data-value",e.value),l.textContent=e.text,l})),C=document.createElement("li");C.setAttribute("class","".concat(U,"--no-results")),C.textContent="No results found",s.hidden=!1,_?(s.innerHTML="",D.forEach((function(e){return s.insertAdjacentElement("beforeend",e)}))):(s.innerHTML="",s.insertAdjacentElement("beforeend",C)),n.setAttribute("aria-expanded","true");var S,L=function(e,t,o){return e?"".concat(e," ").concat(e>1?o:t," available."):""},z=L(E,"group","groups"),T=L(A,"result","results");c.textContent=A?"".concat(z," ").concat(T):"No results.",u&&t?S=s.querySelector("#".concat(t)):l&&o&&(S=s.querySelector("#".concat(o))),S&&be(s,S,{skipFocus:!0})},ge=function(e){var t=ce(e),o=t.inputEl,a=t.listEl,r=t.statusEl,i=t.focusedOptionEl;r.innerHTML="",o.setAttribute("aria-expanded","false"),o.setAttribute("aria-activedescendant",""),i&&i.classList.remove(W),a.scrollTop=0,a.hidden=!0},he=function(e){var t=ce(e),o=t.comboBoxEl,a=t.selectEl,r=t.inputEl;se(a,e.dataset.value),se(r,e.textContent),o.classList.add(M),ge(o),r.focus()},ve=function(e){var t=ce(e),o=t.comboBoxEl,a=t.selectEl,r=t.inputEl;t.statusEl.textContent="";var i=(r.value||"").trim().toLowerCase();if(i){var n=Array.from(a.options).find((function(e){return e.text.toLowerCase()===i}));if(n)return se(a,n.value),se(r,n.text),void o.classList.add(M)}se(a,""),o.classList.remove(M)},xe=function(e){var t=ce(e.target),o=t.comboBoxEl,a=t.listEl;a.hidden&&fe(o);var r=a.querySelector(re)||a.querySelector(ae);r&&("group"===r.getAttribute("role")&&(r=r.nextSibling),be(o,r)),e.preventDefault()},we=function(e){var t=e.target,o=t.nextSibling;o&&("group"===o.getAttribute("role")&&(o=o.nextSibling),be(t,o)),e.preventDefault()},ye=function(e){var t=ce(e.target),o=t.comboBoxEl,a=t.listEl,r=t.focusedOptionEl,i=r&&r.previousSibling,n=!a.hidden;i&&("group"===i.getAttribute("role")&&(i=i.previousSibling),be(r,i)),n&&e.preventDefault(),i||ge(o)},_e=function(e,t){return function(e,t){var o=Object.keys(e).reduce((function(t,o){var a=function(e,t){var o,a,r=e.match(D);r&&(e=r[1],o=r[2]),"object"==typeof t&&(a={capture:C(t,"capture"),passive:C(t,"passive")});var i={selector:o,delegate:"object"==typeof t?F(t):o?A(o,t):t,options:a};return e.indexOf(" ")>-1?e.split(" ").map((function(e){return E({type:e},i)})):(i.type=e,[i])}(o,e[o]);return t.concat(a)}),[]);return E({add:function(e){o.forEach((function(t){e.addEventListener(t.type,t.delegate,t.options)}))},remove:function(e){o.forEach((function(t){e.removeEventListener(t.type,t.delegate,t.options)}))}},t)}(e,S({on:L("init","add"),off:L("teardown","remove")},t))}(((a={}).click=((r={})[Y]=function(){this.disabled||function(e){var t=ce(e),o=t.comboBoxEl;t.listEl.hidden&&fe(o)}(this)},r[te]=function(){this.disabled||function(e){var t=ce(e),o=t.comboBoxEl,a=t.listEl,r=t.inputEl;a.hidden?fe(o):ge(o),r.focus()}(this)},r[ae]=function(){this.disabled||he(this)},r[ee]=function(){this.disabled||function(e){var t=ce(e),o=t.comboBoxEl,a=t.listEl,r=t.selectEl,i=t.inputEl,n=!a.hidden;r.value&&se(r),i.value&&se(i),o.classList.remove(M),n&&fe(o),i.focus()}(this)},r),a.focusout=((i={})[J]=function(e){this.contains(e.relatedTarget)||(ve(this),ge(this))},i),a.keydown=((n={})[J]=h({Escape:function(e){var t=ce(e.target),o=t.comboBoxEl,a=t.inputEl;ge(o),ve(o),a.focus()}}),n[Y]=h({Enter:function(e){var t=ce(e.target),o=t.comboBoxEl,a=!t.listEl.hidden;ve(o),a&&ge(o),e.preventDefault()},ArrowDown:xe,Down:xe}),n[ae]=h({ArrowUp:ye,Up:ye,ArrowDown:we,Down:we,Enter:function(e){he(e.target),e.preventDefault()}," ":function(e){he(e.target),e.preventDefault()},"Shift+Tab":function(){}}),n),a.input=((s={})[Y]=function(){this.closest(J).classList.remove(M),fe(this)},s),a.mouseover=((c={})[ae]=function(){!function(e){e.classList.contains(W)||be(e,e,{preventScroll:!0})}(this)},c),a),{init:function(e,t){(function(e,t){var o=function(e,t){if("string"!=typeof e)return[];t&&function(e){return e&&"object"==typeof e&&1===e.nodeType}(t)||(t=window.document);var o=t.querySelectorAll(e);return Array.prototype.slice.call(o)}(e,t);return"string"!=typeof e||function(e){return e&&"object"==typeof e&&1===e.nodeType}(t)&&t.matches(e)&&o.push(t),o})(J,e).forEach((function(e){de(e,t)}))},getComboBoxContext:ce,enhanceComboBox:de,generateDynamicRegExp:pe,disable:ue,enable:function(e){var t=ce(e),o=t.inputEl,a=t.toggleListBtnEl,r=t.clearInputBtnEl;r.hidden=!1,r.disabled=!1,a.disabled=!1,o.disabled=!1},displayList:fe,hideList:ge,COMBO_BOX_CLASS:j}),ke=function(){function e(e){(0,l.r)(this,e),this.vaSelect=(0,l.c)(this,"vaSelect",7),this.options=void 0,this.labelNode=void 0,this.required=!1,this.disabled=!1,this.label=void 0,this.placeholder=void 0,this.name=void 0,this.value=void 0,this.error=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0}return e.prototype.connectedCallback=function(){var e=this;p.i.on("languageChanged",(function(){(0,l.f)(e.el)}))},e.prototype.componentDidLoad=function(){var e=this.el.shadowRoot.querySelector(".usa-combo-box"),t=this.el.shadowRoot.querySelector("label");e&&(_e.init(e,t),_e.on(e));var o=this.el.shadowRoot.querySelector("input");o&&this.error&&o.classList.add("usa-input--error");var a="".concat(this.messageAriaDescribedby?"input-message":""," ").concat(this.error?"input-error-message":""," ").concat(this.hint?"input-hint":""," ").concat(o.getAttribute("aria-describedby")).trim();o.setAttribute("aria-describedby",a)},e.prototype.disconnectedCallback=function(){p.i.off("languageChanged");var e=this.el.shadowRoot.querySelector(".usa-combo-box");e&&_e.off(e)},e.prototype.populateOptions=function(){var e=this.value,t=this.el.querySelectorAll("option, optgroup"),o=Array.from(t);this.options=o.map((function(t,o){return"optgroup"===t.nodeName.toLowerCase()?(0,l.h)(l.F,null,(0,l.h)("option",{"data-optgroup":"true",id:"optgroup-"+o},t.label),Array.from(t.children).map((function(t){return(0,l.h)("option",{value:t.value,selected:e===t.value,"data-optgroup-option":"true","aria-describedby":"optgroup-"+o},t.text)}))):"option"===t.nodeName.toLowerCase()&&"optgroup"!==t.parentElement.nodeName.toLowerCase()?(0,l.h)("option",{value:t.value,selected:e===t.value},t.textContent):void 0}))},e.prototype.handleChange=function(e){var t=e.target;this.value=t.value,this.vaSelect.emit({value:this.value})},e.prototype.render=function(){var e=this,t=this,o=t.error,a=t.value,r=t.disabled,i=t.placeholder,n=t.label,s=t.required,c=t.name,u=t.hint,m=t.messageAriaDescribedby,f=(0,d.c)({"usa-label":!0,"usa-label--error":o});return(0,l.h)(l.H,{key:"dd9301d6d8b9d37801e6cca5d9cebe46a0e0a016"},(0,l.h)("label",{key:"1e06e7fd2a1f3e64914ef1e89d235a2a4425cf25",htmlFor:"options",class:f,id:"options-label"},n,s&&(0,l.h)("span",{key:"659d61aaeb4142924d78edc5296eb29366d27e53",class:"usa-label--required"}," ",p.i.t("required"))),u&&(0,l.h)("span",{key:"3eb59b9e72f58954ea8a2e2fa7e2cacc41bc56bc",class:"usa-hint",id:"input-hint"},u),(0,l.h)("span",{key:"cc2522597365abca27646dc9c1b1ce0d9d78bc81",id:"input-error-message",role:"alert"},o&&(0,l.h)(l.F,{key:"05655f400fc3fa5fa3abadb07e1c385ece3f0d89"},(0,l.h)("span",{key:"bd4a6dc088dc962df9137e02432af8dbcc54bbe4",class:"usa-sr-only"},p.i.t("error")),(0,l.h)("span",{key:"b85987f619f84a60a3ed89b2b389343a8cdfd79c",class:"usa-error-message"},o))),(0,l.h)("slot",{key:"5bb4fefcadf051e0726d81bc184e80a844022d35",onSlotchange:function(){return e.populateOptions()}}),(0,l.h)("div",{key:"cc216edd9eeeaf5f3840eb658688f5a0bcabfc40",class:"usa-combo-box","data-default-value":a,"data-placeholder":i,"data-error":!!o},(0,l.h)("select",{key:"f5ce10bcbdf61f866793fc378658fe5d8fdb0e8b",class:"usa-select",name:c,id:"options",onChange:function(t){return e.handleChange(t)},disabled:r},this.options)),(0,b.i)(m)&&(0,l.h)("span",{key:"c87199e93e54dbcc3e795ceb30e53f716bc0dc65",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},m))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,l.g)(this)},enumerable:!1,configurable:!0}),e}();ke.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}input,select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0.1rem solid var(--vads-color-base-dark);border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--vads-color-base-darkest);display:block;font-size:1.06rem;height:2.625rem;line-height:1.3;margin:0.2em 0;max-width:46rem;padding:1rem 0.7em;width:100%}.usa-hint,.usa-select,.usa-combo-box__input,.usa-combo-box__list,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-select,.usa-combo-box__input,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-combo-box{max-width:30rem;position:relative}.usa-combo-box--pristine .usa-combo-box__input{padding-right:calc(5em + 4px)}.usa-combo-box--pristine .usa-combo-box__input::-ms-clear{display:none}.usa-combo-box--pristine .usa-combo-box__clear-input{display:block}@media (forced-colors: active){.usa-combo-box--pristine .usa-combo-box__clear-input{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1rem 1rem;display:inline-block;height:1rem;width:1rem;height:1.5rem;width:auto;top:0.5rem}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-combo-box--pristine .usa-combo-box__clear-input{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1rem 1rem;mask-size:1rem 1rem}}}.usa-combo-box__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-bottom:0;max-width:none;padding-right:calc(2.5em + 3px)}.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-combo-box__input:disabled:hover,.usa-combo-box__input:disabled:active,.usa-combo-box__input:disabled:focus,.usa-combo-box__input:disabled.usa-focus,.usa-combo-box__input[aria-disabled=true]:hover,.usa-combo-box__input[aria-disabled=true]:active,.usa-combo-box__input[aria-disabled=true]:focus,.usa-combo-box__input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{border:0;color:GrayText}.usa-combo-box__input:disabled:hover,.usa-combo-box__input:disabled:active,.usa-combo-box__input:disabled:focus,.usa-combo-box__input:disabled.usa-focus,.usa-combo-box__input[aria-disabled=true]:hover,.usa-combo-box__input[aria-disabled=true]:active,.usa-combo-box__input[aria-disabled=true]:focus,.usa-combo-box__input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{border:2px solid GrayText}}.usa-combo-box__input:disabled::-webkit-input-placeholder,.usa-combo-box__input[aria-disabled=true]::-webkit-input-placeholder{opacity:1}.usa-combo-box__input:disabled::-moz-placeholder,.usa-combo-box__input[aria-disabled=true]::-moz-placeholder{opacity:1}.usa-combo-box__input:disabled:-ms-input-placeholder,.usa-combo-box__input[aria-disabled=true]:-ms-input-placeholder{opacity:1}.usa-combo-box__input:disabled::-ms-input-placeholder,.usa-combo-box__input[aria-disabled=true]::-ms-input-placeholder{opacity:1}.usa-combo-box__input:disabled::placeholder,.usa-combo-box__input[aria-disabled=true]::placeholder{opacity:1}.usa-combo-box__input:disabled~.usa-combo-box__input-button-separator,.usa-combo-box__input[aria-disabled=true]~.usa-combo-box__input-button-separator{background-color:#454545;cursor:not-allowed}button.usa-combo-box__toggle-list:focus,button.usa-combo-box__clear-input:focus{outline-offset:-4px}button.usa-combo-box__toggle-list:disabled,button.usa-combo-box__toggle-list[aria-disabled=true],button.usa-combo-box__clear-input:disabled,button.usa-combo-box__clear-input[aria-disabled=true]{cursor:not-allowed}.usa-combo-box__toggle-list__wrapper:focus,.usa-combo-box__clear-input__wrapper:focus{outline:0}.usa-combo-box__toggle-list,.usa-combo-box__clear-input{background-color:transparent;background-position:center;background-size:auto 1.5rem;border:0;bottom:1px;cursor:pointer;margin-bottom:0;opacity:0.6;padding-right:2rem;position:absolute;top:1px;z-index:100}.usa-combo-box__clear-input{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;display:none;right:calc(2.5em + 3px)}.usa-combo-box__toggle-list{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:auto 2rem;right:1px}@media (forced-colors: active){.usa-combo-box__toggle-list{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1rem 1rem;display:inline-block;height:1rem;width:1rem;height:auto;width:auto}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-combo-box__toggle-list{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1rem 1rem;mask-size:1rem 1rem}}.usa-combo-box__toggle-list:disabled,.usa-combo-box__toggle-list[aria-disabled=true]{background-color:GrayText}}.usa-combo-box__input-button-separator{background-color:#c6cace;position:absolute;top:1px;height:calc(100% - 1rem);margin-bottom:0.5rem;margin-top:0.5rem;width:1px;right:calc(2.5em + 2px);-webkit-box-sizing:border-box;box-sizing:border-box;z-index:200}@media (forced-colors: active){.usa-combo-box__input-button-separator{background-color:ButtonText}}.usa-combo-box__list{border-width:1px;border-color:#565c65;border-style:solid;background-color:white;border-radius:0;border-top:0;margin:0;max-height:12.1em;overflow-x:hidden;overflow-y:scroll;padding:0;position:absolute;width:100%;z-index:300}.usa-combo-box__list:focus{outline:0}.usa-combo-box__list-option{border-bottom:1px solid #dfe1e2;cursor:pointer;display:block;padding:0.5rem}.usa-combo-box__list-option--focused{outline:2px solid #162e51;outline-offset:-2px;position:relative;z-index:100}.usa-combo-box__list-option--focused:focus{outline-offset:-4px}.usa-combo-box__list-option--selected{background-color:#005ea2;border-color:#005ea2;color:white}.usa-combo-box__list-option--no-results{cursor:not-allowed;display:block;padding:0.5rem}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-icon{display:inline-block;fill:currentColor;height:1em;position:relative;width:1em}.usa-icon--size-3{height:1.5rem;width:1.5rem}.usa-icon--size-4{height:2rem;width:2rem}.usa-icon--size-5{height:2.5rem;width:2.5rem}.usa-icon--size-6{height:3rem;width:3rem}.usa-icon--size-7{height:3.5rem;width:3.5rem}.usa-icon--size-8{height:4rem;width:4rem}.usa-icon--size-9{height:4.5rem;width:4.5rem}.usa-select{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:white;background-position:right 0.5rem center;background-size:1.25rem;padding-right:2rem}.usa-select::-ms-expand{display:none}.usa-select:-webkit-autofill{-webkit-appearance:menulist;appearance:menulist}.usa-select:-moz-focusring{color:transparent;text-shadow:0 0 0 black}.usa-select[multiple]{height:auto;background-image:none;padding-right:0}.usa-select option{overflow:hidden;text-overflow:ellipsis}.usa-select:disabled,.usa-select[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:0;color:GrayText}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:2px solid GrayText}}@media (forced-colors: active){.usa-select{-webkit-appearance:listbox;-moz-appearance:listbox;appearance:listbox;background-image:none;padding-right:0}}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;font-family:var(--font-source-sans);color:var(--vads-color-base);max-width:30rem}:host([inert]) select{border:0;background:none}.usa-select{margin-bottom:0}::slotted(option),::slotted(optgroup){display:none}.usa-combo-box{max-width:auto}.usa-combo-box__list{width:calc(100% - 2px)}.usa-combo-box__list-option--focused{outline:2px solid var(--vads-color-action-border-base-active-on-light)}.usa-combo-box__list-option--focused:focus{outline-offset:-2px}.usa-combo-box__list-option--group{font-weight:bold;background-color:var(--vads-color-base-lightest);cursor:not-allowed;display:block;padding:0.5rem}.usa-combo-box__list-option--group-option{padding-left:24px}.usa-combo-box__clear-input{right:calc(2.5rem + 3px)}.usa-combo-box__input-button-separator{right:calc(2.5rem + 2px)}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[20,2801,5533],{20:function(e,t,o){o.r(t),o.d(t,{c:function(){return i}});var a,r={exports:{}};a=r,function(){var e={}.hasOwnProperty;function t(){for(var o=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var i=typeof r;if("string"===i||"number"===i)o.push(r);else if(Array.isArray(r)){if(r.length){var n=t.apply(null,r);n&&o.push(n)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)e.call(r,s)&&r[s]&&o.push(s);else o.push(r.toString())}}return o.join(" ")}a.exports?(t.default=t,a.exports=t):window.classNames=t}();var i=r.exports},5533:function(e,t,o){function a(e){return!Number.isNaN(parseFloat(e))}function r(e,t,o){void 0===o&&(o="slot");var a=e.shadowRoot.querySelector(o).assignedNodes();return null!==t?Array.from(a).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(a)}function i(e){return 1===e?"":"s"}function n(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(i(t)," allowed");var o;if(e.length<=t){var a=t-e.length;o="".concat(a," character").concat(i(a)," left")}else a=e.length-t,o="".concat(a," character").concat(i(a)," over limit");return o}function s(e,t){return Array.from({length:t-e+1},(function(t,o){return e+o}))}o.r(t),o.d(t,{S:function(){return l},a:function(){return r},b:function(){return a},c:function(){return n},d:function(){return m},e:function(){return b},g:function(){return d},i:function(){return p},m:function(){return s},s:function(){return c}}),o(3798);var u=function(e){return e&&"object"==typeof e&&1===e.nodeType};function c(e,t){var o=function(e,t){if("string"!=typeof e)return[];if(!t||!u(t))return[];var o=t.shadowRoot.querySelectorAll(e);return Array.from(o)}(e,t);return"string"!=typeof e||u(t)&&t.matches(e)&&o.push(t),o}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var t="",o=0;o<e.length;o++)t+=e[o],o+1<arguments.length&&(t+=String(arguments[o+1]||"").replace(l._entity,l.getEntity));return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function b(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function p(e){return e&&"false"!==e||!1}function f(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(f(e)||f(t)){if(!f(e)||!f(t))return!1;var r=Array.prototype.slice;return m(r.call(e),r.call(t),o,a)}if(e.constructor!==t.constructor)return!1;var i=Object.keys(e),n=Object.keys(t);if(0===i.length&&0===n.length)return!0;if(i.length!==n.length)return!1;for(var s=o.length;s--;)if(o[s]===e)return a[s]===t;o.push(e),a.push(t),i.sort(),n.sort();for(var u=i.length-1;u>=0;u--)if(i[u]!==n[u])return!1;for(var c=void 0,l=i.length-1;l>=0;l--)if(!m(e[c=i[l]],t[c],o,a))return!1;return o.pop(),a.pop(),!0}},2801:function(e,t,o){o.r(t),o.d(t,{va_combo_box:function(){return ke}});var a,r,i,n,s,u,c,l=o(3798),d=o(20),b=(o(2465),o(5533)),p=o(9425),f=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},m={exports:{}};c={exports:{}},function(){var e,t={polyfill:function(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var o=t.keys[this.which||this.keyCode];return Array.isArray(o)&&(o=o[+this.shiftKey]),o}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e},keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(e=1;e<25;e++)t.keys[111+e]="F"+e;var o="";for(e=65;e<91;e++)o=String.fromCharCode(e),t.keys[e]=[o.toLowerCase(),o.toUpperCase()];c.exports=t}();var g={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"};m.exports=function(e){var t=Object.keys(e).some((function(e){return e.indexOf("+")>-1}));return function(o){var a=function(e,t){var o=e.key;if(t)for(var a in g)!0===e[g[a]]&&(o=[a,o].join("+"));return o}(o,t);return[a,a.toLowerCase()].reduce((function(t,r){return r in e&&(t=e[a].call(this,o)),t}),void 0)}},m.exports.MODIFIERS=g;var h=m.exports,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,y=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;var a=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==a.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o,a,r=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var n in o=Object(arguments[i]))x.call(o,n)&&(r[n]=o[n]);if(v){a=v(o);for(var s=0;s<a.length;s++)w.call(o,a[s])&&(r[a[s]]=o[a[s]])}}return r};!function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),a=0;o[a]&&o[a]!==t;)++a;return Boolean(o[a])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype);var _=function(e,t){return function(o){var a=o.target.closest(e);if(a)return t.call(a,o)}},k=_,E=y,A=_,F=function(e){var t=Object.keys(e);if(1===t.length&&"*"===t[0])return e["*"];var o=t.reduce((function(t,o){return t.push(k(o,e[o])),t}),[]);return function(e){return function(t){return e.some((function(e){return!1===e.call(this,t)}),this)}}(o)},D=/^(.+):delegate\((.+)\)$/,C=function(e,t){var o=e[t];return delete e[t],o},S=y,L=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var o=this;void 0===t&&(t=document.body),e.forEach((function(e){"function"==typeof o[e]&&o[e].call(o,t)}))}},z={exports:{}};z.exports=function(){var e={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(t){return e._entities[t]},escapeHTML:function(t){for(var o="",a=0;a<t.length;a++)o+=t[a],a+1<arguments.length&&(o+=String(arguments[a+1]||"").replace(e._entity,e.getEntity));return o},createSafeHTML:function(t){for(var o=arguments.length,a=new Array(o>1?o-1:0),r=1;r<o;r++)a[r-1]=arguments[r];return{__html:e.escapeHTML.apply(e,[t].concat(a)),toString:function(){return"[object WrappedHTMLObject]"},info:"This is a wrapped HTML object. See https://developer.mozilla.org/en-US/Firefox_OS/Security/Security_Automation for more."}},unwrapSafeHTML:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a=t.map((function(e){return e.__html}));return a.join("")}};return e}();var T,j,O=z.exports,B="".concat("usa","-combo-box"),M="".concat(B,"--pristine"),q="".concat(B,"__select"),H="".concat(B,"__input"),N="".concat(B,"__clear-input"),P="".concat(N,"__wrapper"),I="".concat(B,"__input-button-separator"),R="".concat(B,"__toggle-list"),G="".concat(R,"__wrapper"),K="".concat(B,"__list"),U="".concat(B,"__list-option"),V="".concat(U,"--group"),$="".concat(U,"--group-option"),W="".concat(U,"--focused"),X="".concat(U,"--selected"),Z="".concat(B,"__status"),J=".".concat(B),Q=".".concat(q),Y=".".concat(H),ee=".".concat(N),te=".".concat(R),oe=".".concat(K),ae=".".concat(U),re=".".concat(W),ie=".".concat(X),ne=".".concat(Z),se=function(e,t){void 0===t&&(t="");var o=e;o.value=t;var a=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});o.dispatchEvent(a)},ue=function(e){var t=e.closest(J);if(!t)throw new Error("Element is missing outer ".concat(J));var o=t.querySelector(Q),a=t.querySelector(Y),r=t.querySelector(oe),i=t.querySelector(ne),n=t.querySelector(re),s=t.querySelector(ie),u=t.querySelector(te),c=t.querySelector(ee),l=t.classList.contains(M);return{comboBoxEl:t,selectEl:o,inputEl:a,listEl:r,statusEl:i,focusedOptionEl:n,selectedOptionEl:s,toggleListBtnEl:u,clearInputBtnEl:c,isPristine:l,disableFiltering:"true"===t.dataset.disableFiltering}},ce=function(e){var t=ue(e),o=t.inputEl,a=t.toggleListBtnEl,r=t.clearInputBtnEl;r.hidden=!0,r.disabled=!0,a.disabled=!0,o.disabled=!0},le=function(e){var t=e.target;t.selectionStart===t.selectionEnd&&t.select()},de=function(e,t){var o=e.closest(J);if(!o.dataset.enhanced){var a=o.querySelector("select");if(!a)throw new Error("".concat(J," is missing inner select"));var r,i=a.id,n=t,s="".concat(i,"--list"),u="".concat(i,"-label"),c="".concat(i,"--assistiveHint"),l=[],d=o.dataset.defaultValue,b=o.dataset.placeholder;if(b&&l.push({placeholder:b}),d)for(var p=0,m=a.options.length;p<m;p+=1){var g=a.options[p];if(g.value===d){r=g;break}}if(!n||!n.matches('label[for="'.concat(i,'"]')))throw new Error("".concat(J," for ").concat(i,' is either missing a label or a "for" attribute'));n.setAttribute("id",u),n.setAttribute("id",u),a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.classList.add("usa-sr-only",q),a.id="",a.value="",["required","aria-label","aria-labelledby"].forEach((function(e){var t;if(a.hasAttribute(e)){var o=a.getAttribute(e);l.push(((t={})[e]=o,t)),a.removeAttribute(e)}}));var h=document.createElement("input");if(h.setAttribute("id",i),h.setAttribute("aria-owns",s),h.setAttribute("aria-controls",s),h.setAttribute("aria-autocomplete","list"),h.setAttribute("aria-describedby",c),h.setAttribute("aria-expanded","false"),h.setAttribute("autocapitalize","off"),h.setAttribute("autocomplete","off"),h.setAttribute("class",H),h.setAttribute("type","text"),h.setAttribute("role","combobox"),h.onmouseup=le,l.forEach((function(e){return Object.keys(e).forEach((function(t){var o=O.escapeHTML(T||(T=f(["",""],["",""])),e[t]);h.setAttribute(t,o)}))})),"true"===o.dataset.error&&h.classList.add("usa-input--error"),o.insertAdjacentElement("beforeend",h),o.insertAdjacentHTML("beforeend",O.escapeHTML(j||(j=f(['\n <span class="','" tabindex="-1">\n <button type="button" class="','" aria-label="Clear the select contents"> </button>\n </span>\n <span class="','"> </span>\n <span class="','" tabindex="-1">\n <button type="button" tabindex="-1" class="','" aria-label="Toggle the dropdown list"> </button>\n </span>\n <ul\n tabindex="-1"\n id="','"\n class="','"\n role="listbox"\n aria-labelledby="','"\n hidden>\n </ul>\n <div class="',' usa-sr-only" role="status"></div>'],['\n <span class="','" tabindex="-1">\n <button type="button" class="','" aria-label="Clear the select contents"> </button>\n </span>\n <span class="','"> </span>\n <span class="','" tabindex="-1">\n <button type="button" tabindex="-1" class="','" aria-label="Toggle the dropdown list"> </button>\n </span>\n <ul\n tabindex="-1"\n id="','"\n class="','"\n role="listbox"\n aria-labelledby="','"\n hidden>\n </ul>\n <div class="',' usa-sr-only" role="status"></div>'])),P,N,I,G,R,s,K,u,Z)),r){var v=ue(o).inputEl;se(a,r.value),se(v,r.text),o.classList.add(M)}a.disabled&&(ce(o),a.disabled=!1),a.hasAttribute("aria-disabled")&&(function(e){var t=ue(e),o=t.inputEl,a=t.toggleListBtnEl,r=t.clearInputBtnEl;r.hidden=!0,r.setAttribute("aria-disabled",!0),a.setAttribute("aria-disabled",!0),o.setAttribute("aria-disabled",!0)}(o),a.removeAttribute("aria-disabled")),o.dataset.enhanced="true"}},be=function(e,t,o){var a=void 0===o?{}:o,r=a.skipFocus,i=a.preventScroll,n=ue(e),s=n.inputEl,u=n.listEl,c=n.focusedOptionEl;if(c&&(c.classList.remove(W),c.setAttribute("tabIndex","-1")),t){if(s.setAttribute("aria-activedescendant",t.id),t.setAttribute("tabIndex","0"),t.classList.add(W),!i){var l=t.offsetTop+t.offsetHeight;l>u.scrollTop+u.offsetHeight&&(u.scrollTop=l-u.offsetHeight),t.offsetTop<u.scrollTop&&(u.scrollTop=t.offsetTop)}r||t.focus({preventScroll:i})}else s.setAttribute("aria-activedescendant",""),s.focus()},pe=function(e,t,o){void 0===t&&(t=""),void 0===o&&(o={});var a=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},r=e.replace(/{{(.*?)}}/g,(function(e,r){var i=r.trim(),n=o[i];if("query"!==i&&n){var s=new RegExp(n,"i"),u=t.match(s);return u?a(u[1]):""}return a(t)}));return r="^(?:".concat(r,")$"),new RegExp(r,"i")},fe=function(e){return"true"===e.getAttribute("data-optgroup")},me=function(e){for(var t,o,a=ue(e),r=a.comboBoxEl,i=a.selectEl,n=a.inputEl,s=a.listEl,u=a.statusEl,c=a.isPristine,l=a.disableFiltering,d="".concat(s.id,"--option-"),b=(n.value||"").trim().toLowerCase(),p=r.dataset.filter||".*{{query}}.*",f=pe(p,b,r.dataset),m=[],g="",h=0,v=i.options.length;h<v;h+=1){var x=i.options[h],w="".concat(d).concat(m.length);if(x.value&&(l||c||!b||f.test(x.text))){if(i.value&&x.value===i.value&&(t=w),l&&!o&&f.test(x.text)&&(o=w),!b){m.push(x);continue}if(b&&f.test(x.text)&&"true"!==x.getAttribute("data-optgroup")){if("true"===x.getAttribute("data-optgroup-option")&&g!==x.getAttribute("aria-describedby")){g=x.getAttribute("aria-describedby");var y=i.querySelector("#"+g);m.push(y)}m.push(x)}}}var _=m.length,k=!1,E=0,A=0,F=m.filter((function(e){return!fe(e)})).length,D=m.map((function(e,o){var a=fe(e),r=null!==e.getAttribute("data-optgroup-option");a&&(E+=1),a||(A+=1);var n="".concat(d).concat(o),s=a?[]:[U],u="-1",c="false";i.value&&e.value===i.value&&(s.push(X,W),u="0",c="true"),t||k||a||(s.push(W),u="0",k=!0),a?s.push(V):r&&s.push($);var l=document.createElement("li");return a||(l.setAttribute("aria-setsize",F),l.setAttribute("aria-posinset",A),l.setAttribute("aria-describedby",e.getAttribute("aria-describedby"))),l.setAttribute("aria-selected",c),l.setAttribute("id",a?e.id:n),l.setAttribute("class",s.join(" ")),l.setAttribute("tabindex",u),l.setAttribute("role",a?"group":"option"),l.setAttribute("data-value",e.value),l.textContent=e.text,l})),C=document.createElement("li");C.setAttribute("class","".concat(U,"--no-results")),C.textContent="No results found",s.hidden=!1,_?(s.innerHTML="",D.forEach((function(e){return s.insertAdjacentElement("beforeend",e)}))):(s.innerHTML="",s.insertAdjacentElement("beforeend",C)),n.setAttribute("aria-expanded","true");var S,L=function(e,t,o){return e?"".concat(e," ").concat(e>1?o:t," available."):""},z=L(E,"group","groups"),T=L(A,"result","results");u.textContent=A?"".concat(z," ").concat(T):"No results.",c&&t?S=s.querySelector("#".concat(t)):l&&o&&(S=s.querySelector("#".concat(o))),S&&be(s,S,{skipFocus:!0})},ge=function(e){var t=ue(e),o=t.inputEl,a=t.listEl,r=t.statusEl,i=t.focusedOptionEl;r.innerHTML="",o.setAttribute("aria-expanded","false"),o.setAttribute("aria-activedescendant",""),i&&i.classList.remove(W),a.scrollTop=0,a.hidden=!0},he=function(e){var t=ue(e),o=t.comboBoxEl,a=t.selectEl,r=t.inputEl;se(a,e.dataset.value),se(r,e.textContent),o.classList.add(M),ge(o),r.focus()},ve=function(e){var t=ue(e),o=t.comboBoxEl,a=t.selectEl,r=t.inputEl;t.statusEl.textContent="";var i=(r.value||"").trim().toLowerCase();if(i){var n=Array.from(a.options).find((function(e){return e.text.toLowerCase()===i}));if(n)return se(a,n.value),se(r,n.text),void o.classList.add(M)}se(a,""),o.classList.remove(M)},xe=function(e){var t=ue(e.target),o=t.comboBoxEl,a=t.listEl;a.hidden&&me(o);var r=a.querySelector(re)||a.querySelector(ae);r&&("group"===r.getAttribute("role")&&(r=r.nextSibling),be(o,r)),e.preventDefault()},we=function(e){var t=e.target,o=t.nextSibling;o&&("group"===o.getAttribute("role")&&(o=o.nextSibling),be(t,o)),e.preventDefault()},ye=function(e){var t=ue(e.target),o=t.comboBoxEl,a=t.listEl,r=t.focusedOptionEl,i=r&&r.previousSibling,n=!a.hidden;i&&("group"===i.getAttribute("role")&&(i=i.previousSibling),be(r,i)),n&&e.preventDefault(),i||ge(o)},_e=function(e,t){return function(e,t){var o=Object.keys(e).reduce((function(t,o){var a=function(e,t){var o,a,r=e.match(D);r&&(e=r[1],o=r[2]),"object"==typeof t&&(a={capture:C(t,"capture"),passive:C(t,"passive")});var i={selector:o,delegate:"object"==typeof t?F(t):o?A(o,t):t,options:a};return e.indexOf(" ")>-1?e.split(" ").map((function(e){return E({type:e},i)})):(i.type=e,[i])}(o,e[o]);return t.concat(a)}),[]);return E({add:function(e){o.forEach((function(t){e.addEventListener(t.type,t.delegate,t.options)}))},remove:function(e){o.forEach((function(t){e.removeEventListener(t.type,t.delegate,t.options)}))}},t)}(e,S({on:L("init","add"),off:L("teardown","remove")},t))}(((a={}).click=((r={})[Y]=function(){this.disabled||function(e){var t=ue(e),o=t.comboBoxEl;t.listEl.hidden&&me(o)}(this)},r[te]=function(){this.disabled||function(e){var t=ue(e),o=t.comboBoxEl,a=t.listEl,r=t.inputEl;a.hidden?me(o):ge(o),r.focus()}(this)},r[ae]=function(){this.disabled||he(this)},r[ee]=function(){this.disabled||function(e){var t=ue(e),o=t.comboBoxEl,a=t.listEl,r=t.selectEl,i=t.inputEl,n=!a.hidden;r.value&&se(r),i.value&&se(i),o.classList.remove(M),n&&me(o),i.focus()}(this)},r),a.focusout=((i={})[J]=function(e){this.contains(e.relatedTarget)||(ve(this),ge(this))},i),a.keydown=((n={})[J]=h({Escape:function(e){var t=ue(e.target),o=t.comboBoxEl,a=t.inputEl;ge(o),ve(o),a.focus()}}),n[Y]=h({Enter:function(e){var t=ue(e.target),o=t.comboBoxEl,a=!t.listEl.hidden;ve(o),a&&ge(o),e.preventDefault()},ArrowDown:xe,Down:xe}),n[ae]=h({ArrowUp:ye,Up:ye,ArrowDown:we,Down:we,Enter:function(e){he(e.target),e.preventDefault()}," ":function(e){he(e.target),e.preventDefault()},"Shift+Tab":function(){}}),n),a.input=((s={})[Y]=function(){this.closest(J).classList.remove(M),me(this)},s),a.mouseover=((u={})[ae]=function(){!function(e){e.classList.contains(W)||be(e,e,{preventScroll:!0})}(this)},u),a),{init:function(e,t){(function(e,t){var o=function(e,t){if("string"!=typeof e)return[];t&&function(e){return e&&"object"==typeof e&&1===e.nodeType}(t)||(t=window.document);var o=t.querySelectorAll(e);return Array.prototype.slice.call(o)}(e,t);return"string"!=typeof e||function(e){return e&&"object"==typeof e&&1===e.nodeType}(t)&&t.matches(e)&&o.push(t),o})(J,e).forEach((function(e){de(e,t)}))},getComboBoxContext:ue,enhanceComboBox:de,generateDynamicRegExp:pe,disable:ce,enable:function(e){var t=ue(e),o=t.inputEl,a=t.toggleListBtnEl,r=t.clearInputBtnEl;r.hidden=!1,r.disabled=!1,a.disabled=!1,o.disabled=!1},displayList:me,hideList:ge,COMBO_BOX_CLASS:B}),ke=function(){function e(e){(0,l.r)(this,e),this.vaSelect=(0,l.c)(this,"vaSelect",7),this.options=void 0,this.labelNode=void 0,this.required=!1,this.disabled=!1,this.label=void 0,this.placeholder=void 0,this.name=void 0,this.value=void 0,this.error=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0}return e.prototype.connectedCallback=function(){var e=this;p.i.on("languageChanged",(function(){(0,l.f)(e.el)}))},e.prototype.componentDidLoad=function(){var e=this.el.shadowRoot.querySelector(".usa-combo-box"),t=this.el.shadowRoot.querySelector("label");e&&(_e.init(e,t),_e.on(e));var o=this.el.shadowRoot.querySelector("input");o&&this.error&&o.classList.add("usa-input--error");var a="".concat(this.messageAriaDescribedby?"input-message":""," ").concat(this.error?"input-error-message":""," ").concat(this.hint?"input-hint":""," ").concat(o.getAttribute("aria-describedby")).trim();o.setAttribute("aria-describedby",a)},e.prototype.disconnectedCallback=function(){p.i.off("languageChanged");var e=this.el.shadowRoot.querySelector(".usa-combo-box");e&&_e.off(e)},e.prototype.populateOptions=function(){var e=this.value,t=this.el.querySelectorAll("option, optgroup"),o=Array.from(t);this.options=o.map((function(t,o){return"optgroup"===t.nodeName.toLowerCase()?(0,l.h)(l.F,null,(0,l.h)("option",{"data-optgroup":"true",id:"optgroup-"+o},t.label),Array.from(t.children).map((function(t){return(0,l.h)("option",{value:t.value,selected:e===t.value,"data-optgroup-option":"true","aria-describedby":"optgroup-"+o},t.text)}))):"option"===t.nodeName.toLowerCase()&&"optgroup"!==t.parentElement.nodeName.toLowerCase()?(0,l.h)("option",{value:t.value,selected:e===t.value},t.textContent):void 0}))},e.prototype.handleChange=function(e){var t=e.target;this.value=t.value,this.vaSelect.emit({value:this.value})},e.prototype.render=function(){var e=this,t=this,o=t.error,a=t.value,r=t.disabled,i=t.placeholder,n=t.label,s=t.required,u=t.name,c=t.hint,f=t.messageAriaDescribedby,m=(0,d.c)({"usa-label":!0,"usa-label--error":o});return(0,l.h)(l.H,{key:"dd9301d6d8b9d37801e6cca5d9cebe46a0e0a016"},(0,l.h)("label",{key:"1e06e7fd2a1f3e64914ef1e89d235a2a4425cf25",htmlFor:"options",class:m,id:"options-label"},n,s&&(0,l.h)("span",{key:"659d61aaeb4142924d78edc5296eb29366d27e53",class:"usa-label--required"}," ",p.i.t("required"))),c&&(0,l.h)("span",{key:"3eb59b9e72f58954ea8a2e2fa7e2cacc41bc56bc",class:"usa-hint",id:"input-hint"},c),(0,l.h)("span",{key:"cc2522597365abca27646dc9c1b1ce0d9d78bc81",id:"input-error-message",role:"alert"},o&&(0,l.h)(l.F,{key:"05655f400fc3fa5fa3abadb07e1c385ece3f0d89"},(0,l.h)("span",{key:"bd4a6dc088dc962df9137e02432af8dbcc54bbe4",class:"usa-sr-only"},p.i.t("error")),(0,l.h)("span",{key:"b85987f619f84a60a3ed89b2b389343a8cdfd79c",class:"usa-error-message"},o))),(0,l.h)("slot",{key:"5bb4fefcadf051e0726d81bc184e80a844022d35",onSlotchange:function(){return e.populateOptions()}}),(0,l.h)("div",{key:"cc216edd9eeeaf5f3840eb658688f5a0bcabfc40",class:"usa-combo-box","data-default-value":a,"data-placeholder":i,"data-error":!!o},(0,l.h)("select",{key:"f5ce10bcbdf61f866793fc378658fe5d8fdb0e8b",class:"usa-select",name:u,id:"options",onChange:function(t){return e.handleChange(t)},disabled:r},this.options)),(0,b.i)(f)&&(0,l.h)("span",{key:"c87199e93e54dbcc3e795ceb30e53f716bc0dc65",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},f))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,l.g)(this)},enumerable:!1,configurable:!0}),e}();ke.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}input,select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0.1rem solid var(--vads-color-base-dark);border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--vads-color-base-darkest);display:block;font-size:1.06rem;height:2.625rem;line-height:1.3;margin:0.2em 0;max-width:46rem;padding:1rem 0.7em;width:100%}.usa-hint,.usa-select,.usa-combo-box__input,.usa-combo-box__list,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-select,.usa-combo-box__input,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-combo-box{max-width:30rem;position:relative}.usa-combo-box--pristine .usa-combo-box__input{padding-right:calc(5em + 4px)}.usa-combo-box--pristine .usa-combo-box__input::-ms-clear{display:none}.usa-combo-box--pristine .usa-combo-box__clear-input{display:block}@media (forced-colors: active){.usa-combo-box--pristine .usa-combo-box__clear-input{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1rem 1rem;display:inline-block;height:1rem;width:1rem;height:1.5rem;width:auto;top:0.5rem}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-combo-box--pristine .usa-combo-box__clear-input{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1rem 1rem;mask-size:1rem 1rem}}}.usa-combo-box__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-bottom:0;max-width:none;padding-right:calc(2.5em + 3px)}.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-combo-box__input:disabled:hover,.usa-combo-box__input:disabled:active,.usa-combo-box__input:disabled:focus,.usa-combo-box__input:disabled.usa-focus,.usa-combo-box__input[aria-disabled=true]:hover,.usa-combo-box__input[aria-disabled=true]:active,.usa-combo-box__input[aria-disabled=true]:focus,.usa-combo-box__input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{border:0;color:GrayText}.usa-combo-box__input:disabled:hover,.usa-combo-box__input:disabled:active,.usa-combo-box__input:disabled:focus,.usa-combo-box__input:disabled.usa-focus,.usa-combo-box__input[aria-disabled=true]:hover,.usa-combo-box__input[aria-disabled=true]:active,.usa-combo-box__input[aria-disabled=true]:focus,.usa-combo-box__input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{border:2px solid GrayText}}.usa-combo-box__input:disabled::-webkit-input-placeholder,.usa-combo-box__input[aria-disabled=true]::-webkit-input-placeholder{opacity:1}.usa-combo-box__input:disabled::-moz-placeholder,.usa-combo-box__input[aria-disabled=true]::-moz-placeholder{opacity:1}.usa-combo-box__input:disabled:-ms-input-placeholder,.usa-combo-box__input[aria-disabled=true]:-ms-input-placeholder{opacity:1}.usa-combo-box__input:disabled::-ms-input-placeholder,.usa-combo-box__input[aria-disabled=true]::-ms-input-placeholder{opacity:1}.usa-combo-box__input:disabled::placeholder,.usa-combo-box__input[aria-disabled=true]::placeholder{opacity:1}.usa-combo-box__input:disabled~.usa-combo-box__input-button-separator,.usa-combo-box__input[aria-disabled=true]~.usa-combo-box__input-button-separator{background-color:#454545;cursor:not-allowed}button.usa-combo-box__toggle-list:focus,button.usa-combo-box__clear-input:focus{outline-offset:-4px}button.usa-combo-box__toggle-list:disabled,button.usa-combo-box__toggle-list[aria-disabled=true],button.usa-combo-box__clear-input:disabled,button.usa-combo-box__clear-input[aria-disabled=true]{cursor:not-allowed}.usa-combo-box__toggle-list__wrapper:focus,.usa-combo-box__clear-input__wrapper:focus{outline:0}.usa-combo-box__toggle-list,.usa-combo-box__clear-input{background-color:transparent;background-position:center;background-size:auto 1.5rem;border:0;bottom:1px;cursor:pointer;margin-bottom:0;opacity:0.6;padding-right:2rem;position:absolute;top:1px;z-index:100}.usa-combo-box__clear-input{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;display:none;right:calc(2.5em + 3px)}.usa-combo-box__toggle-list{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:auto 2rem;right:1px}@media (forced-colors: active){.usa-combo-box__toggle-list{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1rem 1rem;display:inline-block;height:1rem;width:1rem;height:auto;width:auto}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-combo-box__toggle-list{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1rem 1rem;mask-size:1rem 1rem}}.usa-combo-box__toggle-list:disabled,.usa-combo-box__toggle-list[aria-disabled=true]{background-color:GrayText}}.usa-combo-box__input-button-separator{background-color:#c6cace;position:absolute;top:1px;height:calc(100% - 1rem);margin-bottom:0.5rem;margin-top:0.5rem;width:1px;right:calc(2.5em + 2px);-webkit-box-sizing:border-box;box-sizing:border-box;z-index:200}@media (forced-colors: active){.usa-combo-box__input-button-separator{background-color:ButtonText}}.usa-combo-box__list{border-width:1px;border-color:#565c65;border-style:solid;background-color:white;border-radius:0;border-top:0;margin:0;max-height:12.1em;overflow-x:hidden;overflow-y:scroll;padding:0;position:absolute;width:100%;z-index:300}.usa-combo-box__list:focus{outline:0}.usa-combo-box__list-option{border-bottom:1px solid #dfe1e2;cursor:pointer;display:block;padding:0.5rem}.usa-combo-box__list-option--focused{outline:2px solid #162e51;outline-offset:-2px;position:relative;z-index:100}.usa-combo-box__list-option--focused:focus{outline-offset:-4px}.usa-combo-box__list-option--selected{background-color:#005ea2;border-color:#005ea2;color:white}.usa-combo-box__list-option--no-results{cursor:not-allowed;display:block;padding:0.5rem}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-icon{display:inline-block;fill:currentColor;height:1em;position:relative;width:1em}.usa-icon--size-3{height:1.5rem;width:1.5rem}.usa-icon--size-4{height:2rem;width:2rem}.usa-icon--size-5{height:2.5rem;width:2.5rem}.usa-icon--size-6{height:3rem;width:3rem}.usa-icon--size-7{height:3.5rem;width:3.5rem}.usa-icon--size-8{height:4rem;width:4rem}.usa-icon--size-9{height:4.5rem;width:4.5rem}.usa-select{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:white;background-position:right 0.5rem center;background-size:1.25rem;padding-right:2rem}.usa-select::-ms-expand{display:none}.usa-select:-webkit-autofill{-webkit-appearance:menulist;appearance:menulist}.usa-select:-moz-focusring{color:transparent;text-shadow:0 0 0 black}.usa-select[multiple]{height:auto;background-image:none;padding-right:0}.usa-select option{overflow:hidden;text-overflow:ellipsis}.usa-select:disabled,.usa-select[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:0;color:GrayText}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:2px solid GrayText}}@media (forced-colors: active){.usa-select{-webkit-appearance:listbox;-moz-appearance:listbox;appearance:listbox;background-image:none;padding-right:0}}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;font-family:var(--font-source-sans);color:var(--vads-color-base);max-width:30rem}:host([inert]) select{border:0;background:none}.usa-select{margin-bottom:0}::slotted(option),::slotted(optgroup){display:none}.usa-combo-box{max-width:auto}.usa-combo-box__list{width:calc(100% - 2px)}.usa-combo-box__list-option--focused{outline:2px solid var(--vads-color-action-border-base-active-on-light)}.usa-combo-box__list-option--focused:focus{outline-offset:-2px}.usa-combo-box__list-option--group{font-weight:bold;background-color:var(--vads-color-base-lightest);cursor:not-allowed;display:block;padding:0.5rem}.usa-combo-box__list-option--group-option{padding-left:24px}.usa-combo-box__clear-input{right:calc(2.5rem + 3px)}.usa-combo-box__input-button-separator{right:calc(2.5rem + 2px)}.usa-combo-box__clear-input{display:block !important}'}}]);
|
package/dist/4064.app.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4033,4064],{4033:function(e,t,a){function i(e){return!Number.isNaN(parseFloat(e))}function n(e,t,a){void 0===a&&(a="slot");var i=e.shadowRoot.querySelector(a).assignedNodes();return null!==t?Array.from(i).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(i)}function o(e){return 1===e?"":"s"}function r(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(o(t)," allowed");var a;if(e.length<=t){var i=t-e.length;a="".concat(i," character").concat(o(i)," left")}else i=e.length-t,a="".concat(i," character").concat(o(i)," over limit");return a}function s(e,t){return Array.from({length:t-e+1},(function(t,a){return e+a}))}a.r(t),a.d(t,{S:function(){return d},a:function(){return f},b:function(){return i},c:function(){return r},d:function(){return h},g:function(){return n},i:function(){return u},m:function(){return s},s:function(){return c}}),a(3798);var l=function(e){return e&&"object"==typeof e&&1===e.nodeType};function c(e,t){var a=function(e,t){if("string"!=typeof e)return[];if(!t||!l(t))return[];var a=t.shadowRoot.querySelectorAll(e);return Array.from(a)}(e,t);return"string"!=typeof e||l(t)&&t.matches(e)&&a.push(t),a}var d={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return d._entities[e]},escapeHTML:function(e){for(var t="",a=0;a<e.length;a++)t+=e[a],a+1<arguments.length&&(t+=String(arguments[a+1]||"").replace(d._entity,d.getEntity));return t}};function f(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function u(e){return e&&"false"!==e||!1}},4064:function(e,t,a){a.r(t),a.d(t,{va_file_input:function(){return D}});var i=a(3798),n=(a(2465),a(4033)),o=a(9425),r="usa",s="".concat(r,"-file-input"),l=".".concat(s),c="".concat(r,"-file-input__input"),d="".concat(r,"-file-input__target"),f=".".concat(c),h="".concat(r,"-file-input__box"),u="".concat(r,"-file-input__instructions"),p="".concat(r,"-file-input__preview"),m="".concat(r,"-file-input__preview-heading"),b="".concat(r,"-file-input--disabled"),v="".concat(r,"-file-input__choose"),g="".concat(r,"-file-input__accepted-files-message"),y="".concat(r,"-file-input__drag-text"),x="".concat(r,"-file-input--drag"),w="is-loading",k="has-invalid-file",A="".concat(r,"-file-input__preview-image"),S="".concat(A,"--generic"),z="".concat(A,"--pdf"),T="".concat(A,"--word"),L="".concat(A,"--video"),C="".concat(A,"--excel"),M="".concat(r,"-sr-only"),_="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",F=Boolean(!0),E="",q="",H=function(e){var t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"img_".concat(e.toLowerCase()):"__000".concat(t.toString(16).slice(-4))},N=function(e){return e.hasAttribute("multiple")?"files":"file"},B=function(e){var t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),a=function(e){var t=document.createElement("div"),a=document.createElement("div"),i=document.createElement("div");return e.classList.remove(s),e.classList.add(c),t.classList.add(s),i.classList.add(h),a.classList.add(d),a.prepend(i),e.parentNode.insertBefore(a,e),e.parentNode.insertBefore(t,a),a.appendChild(e),t.appendChild(a),a}(e),i=function(e){var t=e.closest(l),a=N(e),i=document.createElement("div"),o="Drag ".concat(a," here or"),r="choose from folder";return E="".concat(o," ").concat(r),i.classList.add(u),i.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",E),i.innerHTML=n.S.escapeHTML('<span class="'.concat(y,'">').concat(o,'</span> <span class="').concat(v,'">').concat(r,"</span>")),e.parentNode.insertBefore(i,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(".".concat(y)).outerHTML=""),i}(e),o=function(e){var t=e.closest(l);if(!t)throw new Error("Element is missing outer ".concat(l));var a=t.querySelector(f);return{dropZoneEl:t,inputEl:a}}(e).dropZoneEl;return t?o.classList.add(b):function(e){var t=document.createElement("div"),a=N(e),i=e.closest(l),n=e.closest(".".concat(d));q="No ".concat(a," selected."),t.classList.add(M),t.setAttribute("aria-live","polite"),t.textContent=q,i.insertBefore(t,n)}(e),{instructions:i,dropTarget:a}},R=function(e,t){var a=e.querySelectorAll(".".concat(p)),i=e.querySelector(".".concat(m)),n=e.querySelector(".".concat(g));i&&(i.outerHTML=""),n&&(n.outerHTML="",e.classList.remove(k)),null!==a&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(a,(function(e){e.parentNode.removeChild(e)})))},O=function(e,t,a,i){!function(e,t,a,i){var n=t.getAttribute("accept");i.classList.remove(k);var o=function(e,t){var a=!1;return e.indexOf(t)>=0&&(a=!0),a};if(n){for(var r=n.split(","),s=document.createElement("div"),l=!0,c=e.target.files||e.dataTransfer.files,d=0;d<c.length;d+=1){var f=c[d];if(!l)break;for(var h=0;h<r.length;h+=1){var u=r[h];if(l=f.name.indexOf(u)>0||o(f.type,u.replace(/\*/g,""))){F=!0;break}}}l||(R(i,a),t.value="",i.insertBefore(s,t),s.textContent=t.dataset.errormessage||"This is not a valid file type.",s.classList.add(g),i.classList.add(k),F=!1,e.preventDefault(),e.stopPropagation())}}(e,t,a,i),!0===F&&function(e,t,a,i){var o=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],r=i.closest(".".concat(s)).querySelector(".".concat(M)),l=[];R(i,a);for(var c=function(e){var t,r=new FileReader,s=o[e].name;l.push(s),r.onloadstart=function(){t=function(e){return"".concat(e,"-").concat(Math.floor(Date.now()/1e3))}(function(e){return e.replace(/[^a-z0-9]/g,H)}(s)),a.insertAdjacentHTML("afterend",n.S.escapeHTML('<div class="'.concat(p,'" aria-hidden="true">\n <img id="').concat(t,'" src="').concat(_,'" alt="" class="').concat(A," ").concat(w,'"/>').concat(s,"\n <div>")))},r.onloadend=function(){var e=i.querySelector("#".concat(t));s.indexOf(".pdf")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(_,'"; this.classList.add("').concat(z,'")')):s.indexOf(".doc")>0||s.indexOf(".pages")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(_,'"; this.classList.add("').concat(T,'")')):s.indexOf(".xls")>0||s.indexOf(".numbers")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(_,'"; this.classList.add("').concat(C,'")')):s.indexOf(".mov")>0||s.indexOf(".mp4")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(_,'"; this.classList.add("').concat(L,'")')):e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(_,'"; this.classList.add("').concat(S,'")')),e.classList.remove(w),e.src=r.result},o[e]&&r.readAsDataURL(o[e])},f=0;f<o.length;f+=1)c(f);0===o.length?t.setAttribute("aria-label",E):function(e,t){var a=document.createElement("div"),i=e.closest(".".concat(d)),o=i.querySelector(".".concat(u)),r="Change file",s="";1===t.length?s=n.S.escapeHTML('Selected file <span class="usa-file-input__choose">'.concat(r,"</span>")):t.length>1&&(r="Change files",s=n.S.escapeHTML("".concat(t.length,' files selected <span class="usa-file-input__choose">').concat(r,"</span>"))),o.setAttribute("hidden","true"),a.classList.add(m),a.innerHTML=s,i.insertBefore(a,o),e.setAttribute("aria-label",r)}(t,o),function(e,t,a){var i=e,n=q;1===t.length?n="You have selected the file: ".concat(a):t.length>1&&(n="You have selected ".concat(t.length," files: ").concat(a.join(", "))),setTimeout((function(){i.textContent=n}),1e3)}(r,o,l)}(e,t,a,i)},j={".txt":"text/plain",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".odt":"application/vnd.oasis.opendocument.text",".rtf":"application/rtf",".csv":"text/csv",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".bmp":"image/bmp",".webp":"image/webp",".tif":"image/tiff",".tiff":"image/tiff",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac",".mp4":"video/mp4",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".webm":"video/webm",".zip":"application/zip",".rar":"application/x-rar-compressed",".7z":"application/x-7z-compressed",".tar":"application/x-tar",".gz":"application/gzip",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript"},D=function(){function e(e){var t=this;(0,i.r)(this,e),this.vaChange=(0,i.c)(this,"vaChange",7),this.componentLibraryAnalytics=(0,i.c)(this,"component-library-analytics",7),this.uploadStatus="idle",this.handleChange=function(e){var a=e.target;a.files&&a.files.length>0&&t.handleFile(a.files[0]),a.value=""},this.handleDrop=function(e){e.preventDefault(),e.stopPropagation();var a=e.dataTransfer.files;a.length>0&&t.handleFile(a[0])},this.handleFile=function(e,a){if(void 0===a&&(a=!0),t.accept){var i=t.normalizeAcceptProp(t.accept);if(!t.isAcceptedFileType(e.type,i))return t.removeFile(!1),void(t.internalError="This is not a valid file type.")}if(e.size>t.maxFileSize)return t.internalError="\n We can't upload your file because it's too big. Files must be less than ".concat(t.formatFileSize(t.maxFileSize),"."),t.fileContents=null,void(t.uploadStatus="idle");t.uploadedFile=null,t.file=e,a&&t.vaChange.emit({files:[t.file]}),t.uploadStatus="success",t.internalError=null,t.generateFileContents(t.file),t.updateStatusMessage("You have selected the file: ".concat(t.file.name)),t.el.focus(),t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:t.label}})},this.removeFile=function(e){void 0===e&&(e=!0),t.closeModal(),t.uploadStatus="idle",t.internalError=null,e&&t.vaChange.emit({files:[]}),t.file=null,t.uploadedFile=null,t.updateStatusMessage("File removed. No file selected."),t.el.focus()},this.openModal=function(){t.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),t.showModal=!0},this.closeModal=function(){t.showModal=!1,setTimeout((function(){t.fileInputRef.focus()}),0)},this.changeFile=function(){t.fileInputRef&&t.fileInputRef.click()},this.formatFileSize=function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";var a=Math.floor(Math.log(e)/Math.log(1024));if(0===a)return"".concat(e," ").concat(t[a]);var i=(e/Math.pow(1024,a)).toFixed(a<2?0:1);return"".concat(i," ").concat(t[a])},this.normalizeAcceptProp=function(e){return e.split(",").map((function(e){return(e=e.trim()).startsWith(".")?j[e]:e}))},this.isAcceptedFileType=function(e,t){for(var a=0,i=t;a<i.length;a++){var n=i[a];if(n===e)return!0;if(n.endsWith("/*")&&e.startsWith(n.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=function(e,t,a){var n=t?(0,i.h)("span",{class:"required"}," ",o.i.t("required")):null;if(a&&a>=1&&a<=6){var r="h".concat(a);return(0,i.h)("div",{class:"label-header"},(0,i.h)(r,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,n))}return(0,i.h)("div",{class:"label-header"},(0,i.h)("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,n))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.showSeparator=!0,this.label=void 0,this.name=void 0,this.buttonText=void 0,this.value=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.statusText=void 0,this.uploadMessage=null,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1,this.readOnly=!1,this.encrypted=!1,this.uploadedFile=void 0,this.maxFileSize=1/0,this.percentUploaded=null}return e.prototype.handleValueChange=function(e){var t=this;setTimeout((function(){t.updateStatusMessage(e)}))},e.prototype.percentHandler=function(e){e>=100&&this.resetState()},e.prototype.resetState=function(){this.fileContents=null,this.uploadStatus="idle",this.percentUploaded=null,(0,i.f)(this.el)},e.prototype.updateStatusMessage=function(e){var t=this;setTimeout((function(){var a=t.el.shadowRoot.querySelector("#statusMessage");a&&(a.textContent=e)}),1e3)},e.prototype.generateFileContents=function(e){var t=this;if(e){var a=new FileReader;this.fileType=e.type,a.onloadend=function(){t.fileContents=a.result},this.fileType&&("application/pdf"===this.fileType||this.fileType.startsWith("image/"))&&a.readAsDataURL(e)}},e.prototype.componentWillRender=function(){var e=!!this.el.querySelector(":scope > *"),t=!(!this.value&&!this.file||this.readOnly);this.showSeparator=e||t},e.prototype.componentDidLoad=function(){!function(e){(0,n.s)(l,e).forEach((function(e){var t=B(e),a=t.instructions,i=t.dropTarget;i.addEventListener("dragover",(function(){this.classList.add(x)}),!1),i.addEventListener("dragleave",(function(){this.classList.remove(x)}),!1),i.addEventListener("drop",(function(t){t.preventDefault(),this.classList.remove(x);var n=t.dataTransfer;if(t.target.files=n.files,!(n.files.length>1)){O(t,e,a,i);var o=new CustomEvent("change",{detail:{files:n.files}});e.dispatchEvent(o)}}),!1),e.addEventListener("input",(function(t){return O(t,e,a,i)}),!1)}))}(this.el)},e.prototype.connectedCallback=function(){this.el.addEventListener("change",this.handleChange)},e.prototype.disconnectedCallback=function(){this.el.removeEventListener("change",this.handleChange)},e.prototype.getDefaultUploadMessage=function(){return(0,i.h)("span",null,"Drag a file here or"," ",(0,i.h)("span",{class:"file-input-choose-text"},"choose from folder"))},e.prototype.render=function(){var e=this,t=this,a=t.label,n=t.name,r=t.required,s=t.accept,l=t.error,c=t.hint,d=t.file,f=t.uploadStatus,h=t.uploadMessage,u=t.headerSize,p=t.fileContents,m=t.fileType,b=t.headless,v=t.value,g=t.readOnly,y=t.encrypted,x=t.statusText,w=t.uploadedFile,k=t.percentUploaded;v&&!this.file&&this.handleFile(v,!1);var A=this.error||this.internalError,S="".concat(c?"input-hint-message":""," ").concat(A?"input-error-message":"").trim()||null,z="file-input-target ".concat(A?"file-input-target-error":"").trim(),T=(0,i.h)("div",{key:"f2aa9667f34dc27a8400680ba84a2947477384da",class:"thumbnail-container"},(0,i.h)("svg",{key:"c15bf233cdc372b848f69ecf45a8adab73f775cb",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},(0,i.h)("path",{key:"498a0e2ca13c9d5ff8052ae12a5edd600e222b65",d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"})));l?T=(0,i.h)("div",{key:"892b897358550397f815b12121b66c7184bc894a",class:"thumbnail-container"},(0,i.h)("va-icon",{key:"0b6c85c957895de6d744a32adcac70998e252d59",icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):p&&(m.startsWith("image/")?T=(0,i.h)("div",{key:"66a755704d84c6372f62cd5080e322f7c87c18b4",class:"thumbnail-container","aria-hidden":"true"},(0,i.h)("img",{key:"2c4a987a2762df03475f0b9b4ea1ee8cc0e354f4",class:"thumbnail-preview",src:p,alt:"image"})):"application/pdf"===m&&(T=(0,i.h)("div",{key:"6071d73ac7a07edaefc4401a34f0a2a861b02f28",class:"thumbnail-container","aria-hidden":"true"},(0,i.h)("object",{key:"b82e1d2b48c6ac7bfffead258cb34e4052f56e82",class:"thumbnail-preview",data:p,type:"application/pdf"}))));var L=b?"headless-selected-files-wrapper":"selected-files-wrapper",C="usa-hint"+(b?" usa-sr-only":""),M=null!==k&&k<100,_="file-status-label";return M&&(_="".concat(_," uploading-status")),(0,i.h)(i.H,{key:"35aba9f37b2e86da1214f2bb04bbeba922599e3d",class:{"has-error":!!A}},!g&&(0,i.h)("span",{key:"8c98d9c5cdc5aacc3f8c2aada1f617f59c662694",class:{"usa-sr-only":!!b}},a&&this.renderLabelOrHeader(a,r,u)),c&&!g&&(0,i.h)("div",{key:"027b25f2c7b25ec4278c756afb32f06598d12e82",class:C,id:"input-hint-message"},c),(0,i.h)("div",{key:"174e0a5c1cf8965058da7ab89dbf0c696aa50427",class:"file-input-wrapper",onDrop:this.handleDrop},(0,i.h)("input",{key:"c8d3987d4bb4566769f9c3c491d921edd01b5baf",id:"fileInputField",class:"file-input",style:{visibility:"success"===this.uploadStatus||w?"hidden":"unset"},type:"file",ref:function(t){return e.fileInputRef=t},name:n,accept:s,"aria-describedby":S,onChange:this.handleChange}),"idle"===f&&!w&&(0,i.h)("div",{key:"93985facc8a04cc4ec6500db93490382a6bd1ea4"},(0,i.h)("span",{key:"c9f54ab9ea168870c16c7ab58f345cb1204c3f7f",id:"file-input-error-alert",role:"alert"},A&&(0,i.h)(i.F,{key:"06bb95205b44db68d9eaceedd094deb9fe6d9915"},(0,i.h)("span",{key:"c730aba68abed931c6c614d27100285921217bfc",class:"usa-sr-only"},o.i.t("error")),(0,i.h)("span",{key:"42c6b81cb13f14abb82dbc00d55b0bd171c07339",class:"usa-error-message"},A))),(0,i.h)("div",{key:"1788d6fa6826df1915f21398bb3db62e7e45725e",class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,i.h)("div",{key:"c8002242778710e2346ba30ff8517db34ffd5c9b",class:z},(0,i.h)("div",{key:"6b71048c179be5832b17e39d624b7350bb8b63cf",class:"file-input-box"}),(0,i.h)("div",{key:"e869b3ee54c67e33788a091c1e3e47dedfecf3d9",class:"file-input-instructions"},h||this.getDefaultUploadMessage()))),("idle"!==f||w)&&(0,i.h)("div",{key:"a6ee95b3c9b418a7f990163fdbf7f1cdbe79b165",class:L},!b&&(0,i.h)("div",{key:"193417a27d8b07d3826929acab25463a7c08bf65",class:"selected-files-label"},g?"Files you uploaded":"Selected files"),(0,i.h)("div",{key:"55722a9e84a247abbd35218c31bdb614101febc2",class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,i.h)("va-card",{key:"5aed8fa2245015a7b7b7d90c435a76cc6e2d1620",class:"va-card"},(0,i.h)("div",{key:"0a3a47ec4c5fb536e7ae6106d42c91ccbe3a8033",class:"file-info-section"},T,(0,i.h)("div",{key:"1dc13e61e198699b763987eda29425f79e674c5f",class:"file-info-group vads-u-line-height--2"},(0,i.h)("span",{key:"b28045fa918b98454272d60c4bb5ab79219aaeec",class:"file-label"},d?d.name:w.name),A&&(0,i.h)("span",{key:"9fd499dcb5845eef8522cb3995a4a73e8ec4d564",id:"input-error-message",role:"alert"},(0,i.h)("span",{key:"b90c3af680b3663410c6654dcd49ecfac2070bc8",class:"usa-sr-only"},o.i.t("error")),(0,i.h)("span",{key:"a06831fe87d88e98d00fb28eafaa5fcac794cc80","aria-live":"polite",class:"usa-error-message"},A)),!M&&(0,i.h)("span",{key:"e1673cdf99d40daf28c433b5ac39a74bfaaef952",class:"file-size-label"},this.formatFileSize(d?d.size:w.size)),(0,i.h)("span",{key:"7b522619a5b76995e6350fbeb08c262fa52a50b8",class:_,"aria-live":"polite"},M?"Uploading...":x))),(d||v||w)&&(0,i.h)("div",{key:"577dfadbefbaf61b3244dbe300480013881b60c5"},this.showSeparator&&(0,i.h)("hr",{key:"ff383df43f73cdcb6a018d57de19329446710059",class:"separator"}),y&&(0,i.h)("va-text-input",{key:"ddcb8995b4a556d1cc49dddb6ccafaa5f89090ec",label:"File password",required:!0}),(0,i.h)("div",{key:"ea133041ac7cabc9f3b8cc9fdbcef115f3a17b18",class:"additional-info-slot"},(0,i.h)("slot",{key:"b8612c4ba2eb48b73e9723d89122351c6907fde3"})),g?null:M?(0,i.h)(i.F,null,(0,i.h)("va-progress-bar",{percent:k}),(0,i.h)("va-button-icon",{buttonType:"cancel",onClick:this.resetState.bind(this)})):(0,i.h)(i.F,null,(0,i.h)("div",{class:"file-button-section"},(0,i.h)("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:"Change file","aria-label":"change file ".concat(d?d.name:w.name)}),(0,i.h)("va-button-icon",{buttonType:"delete",onClick:this.openModal,"aria-label":"delete file ".concat(d?d.name:w.name),label:"Delete"})),(0,i.h)("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, remove this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:function(){return e.removeFile(!0)},onSecondaryButtonClick:this.closeModal},"We'll remove the uploaded document"," ",(0,i.h)("span",{class:"file-label"},d?d.name:w.name))))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,i.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{statusText:["handleValueChange"],percentUploaded:["percentHandler"]}},enumerable:!1,configurable:!0}),e}();D.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}[hidden]{display:none}:host{display:block;font-family:var(--font-source-sans);font-size:16.96px;}:host .label-header{color:var(--vads-color-base);font-weight:var(--font-weight-normal)}:host .label-header-tag{margin:0;display:inline-block}:host .file-input-wrapper{display:block;max-width:30rem;width:100%;position:relative;margin:8px 0}:host .file-input{cursor:pointer;height:100%;width:100%;max-width:none;top:0;left:0;z-index:1;margin:0;position:absolute;text-indent:-999em;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target{border:1px dashed var(--vads-color-action-border-base-active-on-dark);display:block;margin-top:0.3125rem;position:relative;text-align:center;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target.file-input-target-error{border:2px dashed var(--vads-color-secondary-dark)}:host .file-input-box{background:var(--vads-color-white);height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}:host .file-input-instructions{font-size:1.06rem;padding:1.25rem 0.625rem;pointer-events:none;position:relative;z-index:3}:host .file-input-choose-text{color:var(--vads-color-link);text-decoration:underline;font-weight:var(--font-weight-normal)}:host .file-icon{color:var(--vads-color-primary-alt-darkest)}:host .selected-files-wrapper{background-color:var(--vads-color-primary-lighter);border:1px solid var(--vads-color-base-light)}:host .selected-files-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;border-bottom:1px solid var(--vads-color-white);margin-bottom:8px;padding:8px}:host .va-card{margin:8px}:host .file-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;padding:0 8px;display:block;width:100%;word-wrap:break-word;word-break:break-word;overflow:hidden}:host #input-error-message{padding:0 8px;width:100%}:host .file-size-label,:host .file-status-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-status-label{font-style:italic}:host .file-info-section{padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{margin-top:8px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}:host .file-button-section>va-button-icon{font-size:1.06rem}@media screen and (max-width: 320px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .separator{border:0;border-top:1px solid var(--vads-color-base-lighter);margin:0}:host .vads-u-line-height--2{line-height:1.15}:host .thumbnail-container{height:40px;width:40px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .thumbnail-preview{max-width:40px;width:auto;max-height:40px;height:auto}:host .thumbnail-error{color:#b21d38}:host va-progress-bar{font-size:var(--vads-font-size-root);display:block;margin-left:16px}:host .uploading-status{font-style:var(--font-style-italic)}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}h1 .required,h2 .required,h3 .required,h4 .required,h5 .required,h6 .required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}'}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4064,5533],{5533:function(e,t,a){function i(e){return!Number.isNaN(parseFloat(e))}function n(e,t,a){void 0===a&&(a="slot");var i=e.shadowRoot.querySelector(a).assignedNodes();return null!==t?Array.from(i).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(i)}function o(e){return 1===e?"":"s"}function r(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(o(t)," allowed");var a;if(e.length<=t){var i=t-e.length;a="".concat(i," character").concat(o(i)," left")}else i=e.length-t,a="".concat(i," character").concat(o(i)," over limit");return a}function s(e,t){return Array.from({length:t-e+1},(function(t,a){return e+a}))}a.r(t),a.d(t,{S:function(){return d},a:function(){return n},b:function(){return i},c:function(){return r},d:function(){return m},e:function(){return h},g:function(){return f},i:function(){return u},m:function(){return s},s:function(){return c}}),a(3798);var l=function(e){return e&&"object"==typeof e&&1===e.nodeType};function c(e,t){var a=function(e,t){if("string"!=typeof e)return[];if(!t||!l(t))return[];var a=t.shadowRoot.querySelectorAll(e);return Array.from(a)}(e,t);return"string"!=typeof e||l(t)&&t.matches(e)&&a.push(t),a}var d={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return d._entities[e]},escapeHTML:function(e){for(var t="",a=0;a<e.length;a++)t+=e[a],a+1<arguments.length&&(t+=String(arguments[a+1]||"").replace(d._entity,d.getEntity));return t}};function f(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function u(e){return e&&"false"!==e||!1}function p(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(p(e)||p(t)){if(!p(e)||!p(t))return!1;var n=Array.prototype.slice;return m(n.call(e),n.call(t),a,i)}if(e.constructor!==t.constructor)return!1;var o=Object.keys(e),r=Object.keys(t);if(0===o.length&&0===r.length)return!0;if(o.length!==r.length)return!1;for(var s=a.length;s--;)if(a[s]===e)return i[s]===t;a.push(e),i.push(t),o.sort(),r.sort();for(var l=o.length-1;l>=0;l--)if(o[l]!==r[l])return!1;for(var c=void 0,d=o.length-1;d>=0;d--)if(!m(e[c=o[d]],t[c],a,i))return!1;return a.pop(),i.pop(),!0}},4064:function(e,t,a){a.r(t),a.d(t,{va_file_input:function(){return P}});var i=a(3798),n=(a(2465),a(5533)),o=a(9425),r="usa",s="".concat(r,"-file-input"),l=".".concat(s),c="".concat(r,"-file-input__input"),d="".concat(r,"-file-input__target"),f=".".concat(c),h="".concat(r,"-file-input__box"),u="".concat(r,"-file-input__instructions"),p="".concat(r,"-file-input__preview"),m="".concat(r,"-file-input__preview-heading"),b="".concat(r,"-file-input--disabled"),g="".concat(r,"-file-input__choose"),v="".concat(r,"-file-input__accepted-files-message"),y="".concat(r,"-file-input__drag-text"),x="".concat(r,"-file-input--drag"),w="is-loading",k="has-invalid-file",A="".concat(r,"-file-input__preview-image"),S="".concat(A,"--generic"),z="".concat(A,"--pdf"),T="".concat(A,"--word"),C="".concat(A,"--video"),L="".concat(A,"--excel"),F="".concat(r,"-sr-only"),M="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",_=Boolean(!0),E="",q="",H=function(e){var t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"img_".concat(e.toLowerCase()):"__000".concat(t.toString(16).slice(-4))},N=function(e){return e.hasAttribute("multiple")?"files":"file"},B=function(e){var t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),a=function(e){var t=document.createElement("div"),a=document.createElement("div"),i=document.createElement("div");return e.classList.remove(s),e.classList.add(c),t.classList.add(s),i.classList.add(h),a.classList.add(d),a.prepend(i),e.parentNode.insertBefore(a,e),e.parentNode.insertBefore(t,a),a.appendChild(e),t.appendChild(a),a}(e),i=function(e){var t=e.closest(l),a=N(e),i=document.createElement("div"),o="Drag ".concat(a," here or"),r="choose from folder";return E="".concat(o," ").concat(r),i.classList.add(u),i.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",E),i.innerHTML=n.S.escapeHTML('<span class="'.concat(y,'">').concat(o,'</span> <span class="').concat(g,'">').concat(r,"</span>")),e.parentNode.insertBefore(i,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(".".concat(y)).outerHTML=""),i}(e),o=function(e){var t=e.closest(l);if(!t)throw new Error("Element is missing outer ".concat(l));var a=t.querySelector(f);return{dropZoneEl:t,inputEl:a}}(e).dropZoneEl;return t?o.classList.add(b):function(e){var t=document.createElement("div"),a=N(e),i=e.closest(l),n=e.closest(".".concat(d));q="No ".concat(a," selected."),t.classList.add(F),t.setAttribute("aria-live","polite"),t.textContent=q,i.insertBefore(t,n)}(e),{instructions:i,dropTarget:a}},R=function(e,t){var a=e.querySelectorAll(".".concat(p)),i=e.querySelector(".".concat(m)),n=e.querySelector(".".concat(v));i&&(i.outerHTML=""),n&&(n.outerHTML="",e.classList.remove(k)),null!==a&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(a,(function(e){e.parentNode.removeChild(e)})))},j=function(e,t,a,i){!function(e,t,a,i){var n=t.getAttribute("accept");i.classList.remove(k);var o=function(e,t){var a=!1;return e.indexOf(t)>=0&&(a=!0),a};if(n){for(var r=n.split(","),s=document.createElement("div"),l=!0,c=e.target.files||e.dataTransfer.files,d=0;d<c.length;d+=1){var f=c[d];if(!l)break;for(var h=0;h<r.length;h+=1){var u=r[h];if(l=f.name.indexOf(u)>0||o(f.type,u.replace(/\*/g,""))){_=!0;break}}}l||(R(i,a),t.value="",i.insertBefore(s,t),s.textContent=t.dataset.errormessage||"This is not a valid file type.",s.classList.add(v),i.classList.add(k),_=!1,e.preventDefault(),e.stopPropagation())}}(e,t,a,i),!0===_&&function(e,t,a,i){var o=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],r=i.closest(".".concat(s)).querySelector(".".concat(F)),l=[];R(i,a);for(var c=function(e){var t,r=new FileReader,s=o[e].name;l.push(s),r.onloadstart=function(){t=function(e){return"".concat(e,"-").concat(Math.floor(Date.now()/1e3))}(function(e){return e.replace(/[^a-z0-9]/g,H)}(s)),a.insertAdjacentHTML("afterend",n.S.escapeHTML('<div class="'.concat(p,'" aria-hidden="true">\n <img id="').concat(t,'" src="').concat(M,'" alt="" class="').concat(A," ").concat(w,'"/>').concat(s,"\n <div>")))},r.onloadend=function(){var e=i.querySelector("#".concat(t));s.indexOf(".pdf")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(z,'")')):s.indexOf(".doc")>0||s.indexOf(".pages")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(T,'")')):s.indexOf(".xls")>0||s.indexOf(".numbers")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(L,'")')):s.indexOf(".mov")>0||s.indexOf(".mp4")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(C,'")')):e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(S,'")')),e.classList.remove(w),e.src=r.result},o[e]&&r.readAsDataURL(o[e])},f=0;f<o.length;f+=1)c(f);0===o.length?t.setAttribute("aria-label",E):function(e,t){var a=document.createElement("div"),i=e.closest(".".concat(d)),o=i.querySelector(".".concat(u)),r="Change file",s="";1===t.length?s=n.S.escapeHTML('Selected file <span class="usa-file-input__choose">'.concat(r,"</span>")):t.length>1&&(r="Change files",s=n.S.escapeHTML("".concat(t.length,' files selected <span class="usa-file-input__choose">').concat(r,"</span>"))),o.setAttribute("hidden","true"),a.classList.add(m),a.innerHTML=s,i.insertBefore(a,o),e.setAttribute("aria-label",r)}(t,o),function(e,t,a){var i=e,n=q;1===t.length?n="You have selected the file: ".concat(a):t.length>1&&(n="You have selected ".concat(t.length," files: ").concat(a.join(", "))),setTimeout((function(){i.textContent=n}),1e3)}(r,o,l)}(e,t,a,i)},O={".txt":"text/plain",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".odt":"application/vnd.oasis.opendocument.text",".rtf":"application/rtf",".csv":"text/csv",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".bmp":"image/bmp",".webp":"image/webp",".tif":"image/tiff",".tiff":"image/tiff",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac",".mp4":"video/mp4",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".webm":"video/webm",".zip":"application/zip",".rar":"application/x-rar-compressed",".7z":"application/x-7z-compressed",".tar":"application/x-tar",".gz":"application/gzip",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript"},P=function(){function e(e){var t=this;(0,i.r)(this,e),this.vaChange=(0,i.c)(this,"vaChange",7),this.vaPasswordChange=(0,i.c)(this,"vaPasswordChange",7),this.componentLibraryAnalytics=(0,i.c)(this,"component-library-analytics",7),this.uploadStatus="idle",this.chooseFileString="choose from folder",this.dragFileString="Drag a file here or ",this.handleChange=function(e){var a=e.target;a.files&&a.files.length>0&&t.handleFile(a.files[0]),a.value=""},this.handleDrop=function(e){e.preventDefault(),e.stopPropagation();var a=e.dataTransfer.files;a.length>0&&t.handleFile(a[0])},this.handleFile=function(e,a){if(void 0===a&&(a=!0),t.accept){var i=t.normalizeAcceptProp(t.accept);if(!t.isAcceptedFileType(e.type,i))return t.removeFile(!1),void(t.internalError="This is not a valid file type.")}if(e.size>t.maxFileSize)return t.internalError="\n We can't upload your file because it's too big. Files must be less than ".concat(t.formatFileSize(t.maxFileSize),"."),t.fileContents=null,void(t.uploadStatus="idle");t.uploadedFile=null,t.file=e,a&&t.vaChange.emit({files:[t.file]}),t.uploadStatus="success",t.internalError=null,t.generateFileContents(t.file),t.updateStatusMessage("You have selected the file: ".concat(t.file.name)),t.el.focus(),t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:t.label}})},this.removeFile=function(e){void 0===e&&(e=!0),t.closeModal(),t.uploadStatus="idle",t.internalError=null,e&&t.vaChange.emit({files:[]}),t.file=null,t.uploadedFile=null,t.updateStatusMessage("File removed. No file selected."),t.el.focus()},this.openModal=function(){t.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),t.showModal=!0},this.closeModal=function(){t.showModal=!1,setTimeout((function(){t.fileInputRef.focus()}),0)},this.changeFile=function(){t.fileInputRef&&t.fileInputRef.click()},this.formatFileSize=function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";var a=Math.floor(Math.log(e)/Math.log(1024));if(0===a)return"".concat(e," ").concat(t[a]);var i=(e/Math.pow(1024,a)).toFixed(a<2?0:1);return"".concat(i," ").concat(t[a])},this.normalizeAcceptProp=function(e){return e.split(",").map((function(e){return(e=e.trim()).startsWith(".")?O[e]:e}))},this.isAcceptedFileType=function(e,t){for(var a=0,i=t;a<i.length;a++){var n=i[a];if(n===e)return!0;if(n.endsWith("/*")&&e.startsWith(n.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=function(e,t,a){var n=t?(0,i.h)("span",{class:"required"}," ",o.i.t("required")):null;if(a&&a>=1&&a<=6){var r="h".concat(a);return(0,i.h)("div",{class:"label-header"},(0,i.h)(r,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,n))}return(0,i.h)("div",{class:"label-header"},(0,i.h)("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,n))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.showSeparator=!0,this.label=void 0,this.name=void 0,this.buttonText=void 0,this.value=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.statusText=void 0,this.uploadMessage=null,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1,this.readOnly=!1,this.encrypted=!1,this.uploadedFile=void 0,this.maxFileSize=1/0,this.percentUploaded=null}return e.prototype.handleValueChange=function(e){var t=this;setTimeout((function(){t.updateStatusMessage(e)}))},e.prototype.percentHandler=function(e){e>=100&&this.resetState()},e.prototype.resetState=function(){this.fileContents=null,this.uploadStatus="idle",this.percentUploaded=null,(0,i.f)(this.el)},e.prototype.updateStatusMessage=function(e){var t=this;setTimeout((function(){var a=t.el.shadowRoot.querySelector("#statusMessage");a&&(a.textContent=e)}),1e3)},e.prototype.generateFileContents=function(e){var t=this;if(e){var a=new FileReader;this.fileType=e.type,a.onloadend=function(){t.fileContents=a.result},this.fileType&&("application/pdf"===this.fileType||this.fileType.startsWith("image/"))&&a.readAsDataURL(e)}},e.prototype.componentWillRender=function(){var e=!!this.el.querySelector(":scope > *"),t=!(!this.value&&!this.file||this.readOnly);this.showSeparator=e||t},e.prototype.componentDidLoad=function(){!function(e){(0,n.s)(l,e).forEach((function(e){var t=B(e),a=t.instructions,i=t.dropTarget;i.addEventListener("dragover",(function(){this.classList.add(x)}),!1),i.addEventListener("dragleave",(function(){this.classList.remove(x)}),!1),i.addEventListener("drop",(function(t){t.preventDefault(),this.classList.remove(x);var n=t.dataTransfer;if(t.target.files=n.files,!(n.files.length>1)){j(t,e,a,i);var o=new CustomEvent("change",{detail:{files:n.files}});e.dispatchEvent(o)}}),!1),e.addEventListener("input",(function(t){return j(t,e,a,i)}),!1)}))}(this.el)},e.prototype.connectedCallback=function(){this.el.addEventListener("change",this.handleChange)},e.prototype.disconnectedCallback=function(){this.el.removeEventListener("change",this.handleChange)},e.prototype.getDefaultUploadMessage=function(){return(0,i.h)("span",null,this.dragFileString,(0,i.h)("span",{class:"file-input-choose-text"},this.chooseFileString))},e.prototype.handlePasswordChange=function(e){this.vaPasswordChange.emit({password:e.target.value})},e.prototype.render=function(){var e=this,t=this,a=t.label,n=t.name,r=t.required,s=t.accept,l=t.error,c=t.hint,d=t.file,f=t.uploadStatus,h=t.dragFileString,u=t.chooseFileString,p=t.uploadMessage,m=t.headerSize,b=t.fileContents,g=t.fileType,v=t.headless,y=t.value,x=t.readOnly,w=t.encrypted,k=t.statusText,A=t.uploadedFile,S=t.percentUploaded;y&&!this.file&&this.handleFile(y,!1);var z=this.error||this.internalError,T="".concat(c?"input-hint-message":""," ").concat(z?"input-error-message":"").trim()||null,C="file-input-target ".concat(z?"file-input-target-error":"").trim(),L=(0,i.h)("div",{key:"337b425bd91060370c15e9f57a20175eeb198312",class:"thumbnail-container"},(0,i.h)("svg",{key:"96831fd8198e3c52d036a91cfc593ce2fa33aabe",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},(0,i.h)("path",{key:"eaf74a855880e0cd2f16b01233b2a7b9ae70da5d",d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"})));l?L=(0,i.h)("div",{key:"dd586c73f2a756b14d5f824455d46a1d2d52d61d",class:"thumbnail-container"},(0,i.h)("va-icon",{key:"3e3f6da4a9307fefafd45bea2270b73a6c13f84d",icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):b&&(g.startsWith("image/")?L=(0,i.h)("div",{key:"95d804cdd96a6702ce6414efa6195192a691b486",class:"thumbnail-container","aria-hidden":"true"},(0,i.h)("img",{key:"64e1a72f0b8350c4f16674f79d9ea0c23d98dc44",class:"thumbnail-preview",src:b,alt:"image"})):"application/pdf"===g&&(L=(0,i.h)("div",{key:"4781eec8800de7234c9cac060a6d10df4ba162cf",class:"thumbnail-container","aria-hidden":"true"},(0,i.h)("object",{key:"b8cf2d21c1b27e7041361132ad5ac790f689f849",class:"thumbnail-preview",data:b,type:"application/pdf"}))));var F=v?"headless-selected-files-wrapper":"selected-files-wrapper",M="usa-hint"+(v?" usa-sr-only":""),_=null!==S&&S<100,E="file-status-label";return _&&(E="".concat(E," uploading-status")),(0,i.h)(i.H,{key:"016bb5b069cd0886cb57b3a27ddb348d3de192f9",class:{"has-error":!!z}},!x&&(0,i.h)("span",{key:"dcc5c07424fc16d5dd31b2583821b69b11a1df10",class:{"usa-sr-only":!!v}},a&&this.renderLabelOrHeader(a,r,m)),c&&!x&&(0,i.h)("div",{key:"c67eaba61a960f10202f56c43ba2c1b1690618c3",class:M,id:"input-hint-message"},c),(0,i.h)("div",{key:"4bb955f3cef39c2c18b04f2617046f45ded0fc3b",class:"file-input-wrapper",onDrop:this.handleDrop},(0,i.h)("input",{key:"73e27f3d845a7723f5cc4e89bc8cf5c710242adc",id:"fileInputField",class:"file-input","aria-label":"".concat(a).concat(r?" "+o.i.t("required"):"",". ").concat(h).concat(u),style:{visibility:"success"===this.uploadStatus||A?"hidden":"unset"},type:"file",ref:function(t){return e.fileInputRef=t},name:n,accept:s,"aria-describedby":T,onChange:this.handleChange}),"idle"===f&&!A&&(0,i.h)("div",{key:"515bd5d0743d82448a9becfede71e004c739030c"},(0,i.h)("span",{key:"e4bcaf8197e3b3b11cf529bb8e45ed56cd4d37d5",id:"file-input-error-alert",role:"alert"},z&&(0,i.h)(i.F,{key:"50b1db1b603495d1646a22c97479ff40b02ebb42"},(0,i.h)("span",{key:"2031b00832fce3b73e7ea5e62f048d9d4cc00db6",class:"usa-sr-only"},o.i.t("error")),(0,i.h)("span",{key:"51bee39bd0d885d8e845187adee3aaa0b1247006",class:"usa-error-message"},z))),(0,i.h)("div",{key:"bc547bf28de49b843248c9a0f0139ac5e32e7165",class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,i.h)("div",{key:"60e6f55592c07ce6c59c687af6361fa72bc8572c",class:C},(0,i.h)("div",{key:"79b65ab1a27ac98eee82ac2057b2af9d1af2b4a4",class:"file-input-box"}),(0,i.h)("div",{key:"61319c94736485ab878600a5534ad8410ca65713",class:"file-input-instructions"},p||this.getDefaultUploadMessage()))),("idle"!==f||A)&&(0,i.h)("div",{key:"bf271c54f69810d29e8f5c54d99e9312922cd94e",class:F},!v&&(0,i.h)("div",{key:"ac71abfab1a50585747d5ba7649b3b0e70a367f1",class:"selected-files-label"},x?"Files you uploaded":"Selected files"),(0,i.h)("div",{key:"6bea68e4bc02c1caa882ea275e06f6675d7ce753",class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,i.h)("va-card",{key:"56aa2f7e7872365f52e590ea7857057ac67c4331",class:"va-card"},(0,i.h)("div",{key:"e4f49a2ed6d1b4d3da824212e8b8e14c484fc5cb",class:"file-info-section"},L,(0,i.h)("div",{key:"673e512065d7cf58589666b62fbf9cd97cf87581",class:"file-info-group vads-u-line-height--2"},(0,i.h)("span",{key:"b7f87720edf38a64fa0fa06e64f6fc3e8f46acbe",class:"file-label"},d?d.name:A.name),z&&(0,i.h)("span",{key:"6c7627e01436dd7eb11b29aee8abd555eaa74587",id:"input-error-message",role:"alert"},(0,i.h)("span",{key:"524521ef5ab316aebf9f9677a18d80204f970316",class:"usa-sr-only"},o.i.t("error")),(0,i.h)("span",{key:"07ef2ae491a0f37f1c093087587a19e8f5756b3a","aria-live":"polite",class:"usa-error-message"},z)),!_&&(0,i.h)("span",{key:"e054e2f18028cf78291f13125008eae5ae399c82",class:"file-size-label"},this.formatFileSize(d?d.size:A.size)),(0,i.h)("span",{key:"f02c4008193536b59e981369bca8b603df9064d3",class:E,"aria-live":"polite"},_?"Uploading...":k))),(d||y||A)&&(0,i.h)("div",{key:"511671ac033652b487ad942ce95e44181e645f7a"},this.showSeparator&&(0,i.h)("hr",{key:"4372398c861195bc9a383ead3c5df9fdd32df1a2",class:"separator"}),w&&(0,i.h)("va-text-input",{key:"41022d25f4ec729a0f41b486227caf5ab4cb34c2",onInput:function(t){e.handlePasswordChange(t)},label:"File password",required:!0}),(0,i.h)("div",{key:"11658bc79739aa4fac1b2879a4b51c88e9217a1e",class:"additional-info-slot"},(0,i.h)("slot",{key:"8c8e65c8db034304bed123515c137e4e316ee284"})),x?null:_?(0,i.h)(i.F,null,(0,i.h)("va-progress-bar",{percent:S}),(0,i.h)("va-button-icon",{buttonType:"cancel",onClick:this.resetState.bind(this)})):(0,i.h)(i.F,null,(0,i.h)("div",{class:"file-button-section"},(0,i.h)("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:"Change file","aria-label":"change file ".concat(d?d.name:A.name)}),(0,i.h)("va-button-icon",{buttonType:"delete",onClick:this.openModal,"aria-label":"delete file ".concat(d?d.name:A.name),label:"Delete"})),(0,i.h)("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, remove this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:function(){return e.removeFile(!0)},onSecondaryButtonClick:this.closeModal},"We'll remove the uploaded document"," ",(0,i.h)("span",{class:"file-label"},d?d.name:A.name))))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,i.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{statusText:["handleValueChange"],percentUploaded:["percentHandler"]}},enumerable:!1,configurable:!0}),e}();P.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}[hidden]{display:none}:host{display:block;font-family:var(--font-source-sans);font-size:16.96px;}:host .label-header{color:var(--vads-color-base);font-weight:var(--font-weight-normal)}:host .label-header-tag{margin:0;display:inline-block}:host .file-input-wrapper{display:block;max-width:30rem;width:100%;position:relative;margin:8px 0}:host .file-input{cursor:pointer;height:100%;width:100%;max-width:none;top:0;left:0;z-index:1;margin:0;position:absolute;text-indent:-999em;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target{border:1px dashed var(--vads-color-action-border-base-active-on-dark);display:block;margin-top:0.3125rem;position:relative;text-align:center;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target.file-input-target-error{border:2px dashed var(--vads-color-secondary-dark)}:host .file-input-box{background:var(--vads-color-white);height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}:host .file-input-instructions{font-size:1.06rem;padding:1.25rem 0.625rem;pointer-events:none;position:relative;z-index:3}:host .file-input-choose-text{color:var(--vads-color-link);text-decoration:underline;font-weight:var(--font-weight-normal)}:host .file-icon{color:var(--vads-color-primary-alt-darkest)}:host .selected-files-wrapper{background-color:var(--vads-color-primary-lighter);border:1px solid var(--vads-color-base-light)}:host .selected-files-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;border-bottom:1px solid var(--vads-color-white);margin-bottom:8px;padding:8px}:host .va-card{margin:8px}:host .file-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;padding:0 8px;display:block;width:100%;word-wrap:break-word;word-break:break-word;overflow:hidden}:host #input-error-message{padding:0 8px;width:100%}:host .file-size-label,:host .file-status-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-status-label{font-style:italic}:host .file-info-section{padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{margin-top:8px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}:host .file-button-section>va-button-icon{font-size:1.06rem}@media screen and (max-width: 320px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .separator{border:0;border-top:1px solid var(--vads-color-base-lighter);margin:0}:host .vads-u-line-height--2{line-height:1.15}:host .thumbnail-container{height:40px;width:40px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .thumbnail-preview{max-width:40px;width:auto;max-height:40px;height:auto}:host .thumbnail-error{color:#b21d38}:host va-progress-bar{font-size:var(--vads-font-size-root);display:block;margin-left:16px}:host .uploading-status{font-style:var(--font-style-italic)}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}h1 .required,h2 .required,h3 .required,h4 .required,h5 .required,h6 .required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}'}}]);
|
package/dist/4117.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4117.app.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[20,4033,4117],{20:function(e,a,t){t.r(a),t.d(a,{c:function(){return o}});var r,i={exports:{}};r=i,function(){var e={}.hasOwnProperty;function a(){for(var t=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)t.push(i);else if(Array.isArray(i)){if(i.length){var s=a.apply(null,i);s&&t.push(s)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var n in i)e.call(i,n)&&i[n]&&t.push(n);else t.push(i.toString())}}return t.join(" ")}r.exports?(a.default=a,r.exports=a):window.classNames=a}();var o=i.exports},4033:function(e,a,t){function r(e){return!Number.isNaN(parseFloat(e))}function i(e,a,t){void 0===t&&(t="slot");var r=e.shadowRoot.querySelector(t).assignedNodes();return null!==a?Array.from(r).filter((function(e){return e.nodeName.toLowerCase()===a})):Array.from(r)}function o(e){return 1===e?"":"s"}function s(e,a){if(void 0===e||""===e)return"".concat(a," character").concat(o(a)," allowed");var t;if(e.length<=a){var r=a-e.length;t="".concat(r," character").concat(o(r)," left")}else r=e.length-a,t="".concat(r," character").concat(o(r)," over limit");return t}function n(e,a){return Array.from({length:a-e+1},(function(a,t){return e+t}))}t.r(a),t.d(a,{S:function(){return c},a:function(){return d},b:function(){return r},c:function(){return s},d:function(){return h},g:function(){return i},i:function(){return f},m:function(){return n},s:function(){return u}}),t(3798);var l=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,a){var t=function(e,a){if("string"!=typeof e)return[];if(!a||!l(a))return[];var t=a.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,a);return"string"!=typeof e||l(a)&&a.matches(e)&&t.push(a),t}var c={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return c._entities[e]},escapeHTML:function(e){for(var a="",t=0;t<e.length;t++)a+=e[t],t+1<arguments.length&&(a+=String(arguments[t+1]||"").replace(c._entity,c.getEntity));return a}};function d(e){var a;return(a="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&a<=6?"h".concat(a):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function f(e){return e&&"false"!==e||!1}},4117:function(e,a,t){t.r(a),t.d(a,{va_textarea:function(){return n}});var r=t(3798),i=t(20),o=(t(2465),t(4033)),s=t(9425),n=function(){function e(e){var a=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.handleInput=function(e){var t=e.target;a.value=t.value},this.handleBlur=function(){a.enableAnalytics&&a.value&&a.componentLibraryAnalytics.emit({componentName:"va-textarea",action:"blur",details:{label:a.label,value:a.value}})},this.label=void 0,this.error=void 0,this.placeholder=void 0,this.name=void 0,this.required=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.maxlength=void 0,this.value=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1}return e.prototype.connectedCallback=function(){var e=this;s.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){s.i.off("languageChanged")},e.prototype.getMaxlength=function(){if(!(this.maxlength<=0))return this.maxlength},e.prototype.render=function(){var e=this,a=e.label,t=e.error,n=e.placeholder,l=e.name,u=e.required,c=e.value,d=e.hint,h=e.charcount,f=e.messageAriaDescribedby,b=e.useFormsPattern,m=e.formHeadingLevel,p=e.headerAriaDescribedby,g=e.formHeading,y=this.getMaxlength(),v="".concat(t?"input-error-message":""," ").concat(h&&y?"charcount-message":""," ").concat(f?"input-message":"").trim()||null,x="".concat(b&&g?"form-question":""," ").concat(b?"form-description":""," ").concat(b&&a?"input-label":"").trim()||null,w=(0,o.a)(this.labelHeaderLevel),k=p?"header-message":null,_=h&&(null==c?void 0:c.length)>y,T=(0,i.c)({"usa-label":!0,"usa-label--error":t}),z=(0,i.c)({"usa-textarea":!0,"usa-input--error":t}),A=(0,i.c)({"usa-hint":!0,"usa-character-count__status":h,"usa-character-count__status--invalid":h&&y&&(null==c?void 0:c.length)>y}),N=null;if("single"===b||"multiple"===b){var S=(0,o.a)(m);N=(0,r.h)(r.F,{key:"3393d1dfd5a69512980f322cc33ecb79e1ab90b7"},g&&(0,r.h)(S,{key:"9373bc4fea6a75aa7e887633c7a94b14427c94f1",id:"form-question",part:"form-header"},g),(0,r.h)("div",{key:"2a457770e4f5aa45079dbdc3060ffa05f3e2a6b0",id:"form-description"},(0,r.h)("slot",{key:"6b27e76f70625fd78552d159ba6810063fd46674",name:"form-description"})))}var q=(0,r.h)("label",{key:"33a686717b76f50d5375ba1ca298900468f1f25e",htmlFor:"input-type-textarea",id:"input-label",class:T,part:"label"},a,"multiple"===b&&(0,r.h)("span",{key:"aebc39ddd282fe8d7bfd1d681b63f7c5f5c4bb5b",id:"header-message",class:"usa-sr-only"},a),p&&(0,r.h)("span",{key:"7a4ccbae1a9828e9f36f9762b498c3229b16b851",id:"header-message",class:"usa-sr-only"},p),u&&(0,r.h)("span",{key:"ea9a426899f16184ebc32c6e3e5a7036b986721a",class:"usa-label--required"}," ",s.i.t("required")),d&&(0,r.h)("div",{key:"2b47b75cb91ef1e49b44429aae7483f2ad0ba171",class:"usa-hint"},d));return(0,r.h)(r.H,{key:"a50d55eb268f1077174c27898d2a803826473628"},N,(0,r.h)("div",{key:"2d9259e0d3097842bf38f11b0d1b55b06a4a55bc",class:"input-wrap"},a&&w?(0,r.h)(w,{part:"header","aria-describedby":k},q):(0,r.h)(r.F,null,q),(0,r.h)("slot",{key:"a7b22ec3cb59fd487b18b2b518b5957eb16fe8a1"}),(0,r.h)("span",{key:"84f561377c32b64884f8362c31bb9f07d6584899",id:"input-error-message",role:"alert"},t&&(0,r.h)(r.F,{key:"9cddbc713e66a6bcb88d44934b9c27e3505c62ec"},(0,r.h)("span",{key:"326f42e331ba969f6b0bcd5438e1986d7e884f6b",class:"usa-sr-only"},s.i.t("error")),(0,r.h)("span",{key:"9a57cd4067625c0d829ffd6580dca90806d6a9eb",class:"usa-error-message"},t))),(0,r.h)("textarea",{key:"54f4dfb77197b69e064c0fcd7c1870ff04f2346a",class:z,"aria-describedby":v,"aria-invalid":t||_?"true":"false","aria-labelledby":x,onInput:this.handleInput,onBlur:this.handleBlur,id:"input-type-textarea",placeholder:n,name:l,maxLength:h?void 0:y,value:c,part:"input-type-textarea"}),!h&&y&&(null==c?void 0:c.length)>=y&&(0,r.h)("span",{key:"b55c1a4823dbf0c7bc2297d3d643c08a5dd4a9eb",class:A,"aria-live":"polite"},s.i.t("max-chars",{length:y})),h&&y&&(0,r.h)("span",{key:"2a8cb9eb3988e0a93dafe2c09a0ac0d8b4eb6391",id:"charcount-message",class:A,"aria-live":"polite"},(0,o.c)(c,y)),(0,o.i)(f)&&(0,r.h)("span",{key:"4baa2b20f69a4488730f7d74547c7dbe766f5161",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},f)))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();n.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-textarea,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-textarea,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:0;color:GrayText}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:2px solid GrayText}}.usa-textarea{height:10rem}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{color:var(--vads-color-base);display:block;resize:both;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}.usa-hint{display:block}h1 .usa-label,h2 .usa-label,h3 .usa-label,h4 .usa-label,h5 .usa-label,h6 .usa-label{font-family:inherit;font-size:inherit;font-weight:inherit}h1 .usa-label .usa-label--required,h2 .usa-label .usa-label--required,h3 .usa-label .usa-label--required,h4 .usa-label .usa-label--required,h5 .usa-label .usa-label--required,h6 .usa-label .usa-label--required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[20,4117,5533],{20:function(e,a,t){t.r(a),t.d(a,{c:function(){return o}});var r,i={exports:{}};r=i,function(){var e={}.hasOwnProperty;function a(){for(var t=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)t.push(i);else if(Array.isArray(i)){if(i.length){var n=a.apply(null,i);n&&t.push(n)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var s in i)e.call(i,s)&&i[s]&&t.push(s);else t.push(i.toString())}}return t.join(" ")}r.exports?(a.default=a,r.exports=a):window.classNames=a}();var o=i.exports},5533:function(e,a,t){function r(e){return!Number.isNaN(parseFloat(e))}function i(e,a,t){void 0===t&&(t="slot");var r=e.shadowRoot.querySelector(t).assignedNodes();return null!==a?Array.from(r).filter((function(e){return e.nodeName.toLowerCase()===a})):Array.from(r)}function o(e){return 1===e?"":"s"}function n(e,a){if(void 0===e||""===e)return"".concat(a," character").concat(o(a)," allowed");var t;if(e.length<=a){var r=a-e.length;t="".concat(r," character").concat(o(r)," left")}else r=e.length-a,t="".concat(r," character").concat(o(r)," over limit");return t}function s(e,a){return Array.from({length:a-e+1},(function(a,t){return e+t}))}t.r(a),t.d(a,{S:function(){return c},a:function(){return i},b:function(){return r},c:function(){return n},d:function(){return m},e:function(){return h},g:function(){return d},i:function(){return f},m:function(){return s},s:function(){return u}}),t(3798);var l=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,a){var t=function(e,a){if("string"!=typeof e)return[];if(!a||!l(a))return[];var t=a.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,a);return"string"!=typeof e||l(a)&&a.matches(e)&&t.push(a),t}var c={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return c._entities[e]},escapeHTML:function(e){for(var a="",t=0;t<e.length;t++)a+=e[t],t+1<arguments.length&&(a+=String(arguments[t+1]||"").replace(c._entity,c.getEntity));return a}};function d(e){var a;return(a="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&a<=6?"h".concat(a):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function f(e){return e&&"false"!==e||!1}function b(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===a)return!0;if("function"==typeof e||"function"==typeof a)return!0;if("object"!=typeof e||"object"!=typeof a)return!1;if(null===e||null===a)return!1;if(e instanceof Date&&a instanceof Date)return e.getTime()===a.getTime();if(e instanceof RegExp&&a instanceof RegExp)return e.source===a.source&&e.global===a.global&&e.multiline===a.multiline&&e.lastIndex===a.lastIndex&&e.ignoreCase===a.ignoreCase;if(b(e)||b(a)){if(!b(e)||!b(a))return!1;var i=Array.prototype.slice;return m(i.call(e),i.call(a),t,r)}if(e.constructor!==a.constructor)return!1;var o=Object.keys(e),n=Object.keys(a);if(0===o.length&&0===n.length)return!0;if(o.length!==n.length)return!1;for(var s=t.length;s--;)if(t[s]===e)return r[s]===a;t.push(e),r.push(a),o.sort(),n.sort();for(var l=o.length-1;l>=0;l--)if(o[l]!==n[l])return!1;for(var u=void 0,c=o.length-1;c>=0;c--)if(!m(e[u=o[c]],a[u],t,r))return!1;return t.pop(),r.pop(),!0}},4117:function(e,a,t){t.r(a),t.d(a,{va_textarea:function(){return s}});var r=t(3798),i=t(20),o=(t(2465),t(5533)),n=t(9425),s=function(){function e(e){var a=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.handleInput=function(e){var t=e.target;a.value=t.value},this.handleBlur=function(){a.enableAnalytics&&a.value&&a.componentLibraryAnalytics.emit({componentName:"va-textarea",action:"blur",details:{label:a.label,value:a.value}})},this.label=void 0,this.error=void 0,this.placeholder=void 0,this.name=void 0,this.required=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.maxlength=void 0,this.value=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1}return e.prototype.connectedCallback=function(){var e=this;n.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){n.i.off("languageChanged")},e.prototype.getMaxlength=function(){if(!(this.maxlength<=0))return this.maxlength},e.prototype.render=function(){var e=this,a=e.label,t=e.error,s=e.placeholder,l=e.name,u=e.required,c=e.value,d=e.hint,h=e.charcount,f=e.messageAriaDescribedby,b=e.useFormsPattern,m=e.formHeadingLevel,p=e.headerAriaDescribedby,g=e.formHeading,y=this.getMaxlength(),v="".concat(t?"input-error-message":""," ").concat(h&&y?"charcount-message":""," ").concat(f?"input-message":"").trim()||null,x="".concat(b&&g?"form-question":""," ").concat(b?"form-description":""," ").concat(b&&a?"input-label":"").trim()||null,w=(0,o.g)(this.labelHeaderLevel),k=p?"header-message":null,_=h&&(null==c?void 0:c.length)>y,T=(0,i.c)({"usa-label":!0,"usa-label--error":t}),A=(0,i.c)({"usa-textarea":!0,"usa-input--error":t}),z=(0,i.c)({"usa-hint":!0,"usa-character-count__status":h,"usa-character-count__status--invalid":h&&y&&(null==c?void 0:c.length)>y}),S=null;if("single"===b||"multiple"===b){var N=(0,o.g)(m);S=(0,r.h)(r.F,{key:"3393d1dfd5a69512980f322cc33ecb79e1ab90b7"},g&&(0,r.h)(N,{key:"9373bc4fea6a75aa7e887633c7a94b14427c94f1",id:"form-question",part:"form-header"},g),(0,r.h)("div",{key:"2a457770e4f5aa45079dbdc3060ffa05f3e2a6b0",id:"form-description"},(0,r.h)("slot",{key:"6b27e76f70625fd78552d159ba6810063fd46674",name:"form-description"})))}var q=(0,r.h)("label",{key:"33a686717b76f50d5375ba1ca298900468f1f25e",htmlFor:"input-type-textarea",id:"input-label",class:T,part:"label"},a,"multiple"===b&&(0,r.h)("span",{key:"aebc39ddd282fe8d7bfd1d681b63f7c5f5c4bb5b",id:"header-message",class:"usa-sr-only"},a),p&&(0,r.h)("span",{key:"7a4ccbae1a9828e9f36f9762b498c3229b16b851",id:"header-message",class:"usa-sr-only"},p),u&&(0,r.h)("span",{key:"ea9a426899f16184ebc32c6e3e5a7036b986721a",class:"usa-label--required"}," ",n.i.t("required")),d&&(0,r.h)("div",{key:"2b47b75cb91ef1e49b44429aae7483f2ad0ba171",class:"usa-hint"},d));return(0,r.h)(r.H,{key:"a50d55eb268f1077174c27898d2a803826473628"},S,(0,r.h)("div",{key:"2d9259e0d3097842bf38f11b0d1b55b06a4a55bc",class:"input-wrap"},a&&w?(0,r.h)(w,{part:"header","aria-describedby":k},q):(0,r.h)(r.F,null,q),(0,r.h)("slot",{key:"a7b22ec3cb59fd487b18b2b518b5957eb16fe8a1"}),(0,r.h)("span",{key:"84f561377c32b64884f8362c31bb9f07d6584899",id:"input-error-message",role:"alert"},t&&(0,r.h)(r.F,{key:"9cddbc713e66a6bcb88d44934b9c27e3505c62ec"},(0,r.h)("span",{key:"326f42e331ba969f6b0bcd5438e1986d7e884f6b",class:"usa-sr-only"},n.i.t("error")),(0,r.h)("span",{key:"9a57cd4067625c0d829ffd6580dca90806d6a9eb",class:"usa-error-message"},t))),(0,r.h)("textarea",{key:"54f4dfb77197b69e064c0fcd7c1870ff04f2346a",class:A,"aria-describedby":v,"aria-invalid":t||_?"true":"false","aria-labelledby":x,onInput:this.handleInput,onBlur:this.handleBlur,id:"input-type-textarea",placeholder:s,name:l,maxLength:h?void 0:y,value:c,part:"input-type-textarea"}),!h&&y&&(null==c?void 0:c.length)>=y&&(0,r.h)("span",{key:"b55c1a4823dbf0c7bc2297d3d643c08a5dd4a9eb",class:z,"aria-live":"polite"},n.i.t("max-chars",{length:y})),h&&y&&(0,r.h)("span",{key:"2a8cb9eb3988e0a93dafe2c09a0ac0d8b4eb6391",id:"charcount-message",class:z,"aria-live":"polite"},(0,o.c)(c,y)),(0,o.i)(f)&&(0,r.h)("span",{key:"4baa2b20f69a4488730f7d74547c7dbe766f5161",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},f)))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();s.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-textarea,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-textarea,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:0;color:GrayText}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:2px solid GrayText}}.usa-textarea{height:10rem}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{color:var(--vads-color-base);display:block;resize:both;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}.usa-hint{display:block}h1 .usa-label,h2 .usa-label,h3 .usa-label,h4 .usa-label,h5 .usa-label,h6 .usa-label{font-family:inherit;font-size:inherit;font-weight:inherit}h1 .usa-label .usa-label--required,h2 .usa-label .usa-label--required,h3 .usa-label .usa-label--required,h4 .usa-label .usa-label--required,h5 .usa-label .usa-label--required,h6 .usa-label .usa-label--required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}'}}]);
|