18F/18f.gsa.gov

View on GitHub
assets/js/lib/uswds.min.js

Summary

Maintainability
A
0 mins
Test Coverage
!function i(c,u,a){function s(e,t){if(!u[e]){if(!c[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(f)return f(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};c[e][0].call(o.exports,function(t){return s(c[e][1][t]||t)},o,o.exports,i,c,u,a)}return u[e].exports}for(var f="function"==typeof require&&require,t=0;t<a.length;t++)s(a[t]);return s}({1:[function(t,e,n){"use strict";"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(t){if("Element"in t){var e="classList",n="prototype",r=t.Element[n],o=Object,i=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},u=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new u("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new u("INVALID_CHARACTER_ERR","String contains an invalid character");return c.call(t,e)},s=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],r=0,o=n.length;r<o;r++)this.push(n[r]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},f=s[n]=[],l=function(){return new s(this)};if(u[n]=Error[n],f.item=function(t){return this[t]||null},f.contains=function(t){return-1!==a(this,t+="")},f.add=function(){for(var t,e=arguments,n=0,r=e.length,o=!1;-1===a(this,t=e[n]+"")&&(this.push(t),o=!0),++n<r;);o&&this._updateClassName()},f.remove=function(){var t,e,n=arguments,r=0,o=n.length,i=!1;do{for(e=a(this,t=n[r]+"");-1!==e;)this.splice(e,1),i=!0,e=a(this,t)}while(++r<o);i&&this._updateClassName()},f.toggle=function(t,e){t+="";var n=this.contains(t),r=n?!0!==e&&"remove":!1!==e&&"add";return r&&this[r](t),!0===e||!1===e?e:!n},f.toString=function(){return this.join(" ")},o.defineProperty){var d={get:l,enumerable:!0,configurable:!0};try{o.defineProperty(r,e,d)}catch(t){void 0!==t.number&&-2146823252!==t.number||(d.enumerable=!1,o.defineProperty(r,e,d))}}else o[n].__defineGetter__&&r.__defineGetter__(e,l)}}(window.self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var r=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var e,n=arguments.length;for(e=0;e<n;e++)t=arguments[e],r.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}())},{}],2:[function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){void 0!==n?n.exports=e():"function"==typeof define&&"object"==r(define.amd)?define(e):this.domready=e()}(0,function(){var t,e=[],n=document,r=n.documentElement.doScroll,o="DOMContentLoaded",i=(r?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return i||n.addEventListener(o,t=function(){for(n.removeEventListener(o,t),i=1;t=e.shift();)t()}),function(t){i?setTimeout(t,0):e.push(t)}})},{}],3:[function(t,e,n){"use strict";var r;e.exports=((r=document.createElement("div")).setAttribute("data-a-b","c"),Boolean(r.dataset&&"c"===r.dataset.aB)?function(t){return t.dataset}:function(t){var e={},n=t.attributes;function r(){return this.value}function o(t,e){void 0===e?this.removeAttribute(t):this.setAttribute(t,e)}for(var i=0,c=n.length;i<c;i++){var u=n[i];if(u){var a=u.name;if(0===a.indexOf("data-")){var s=a.slice(5).replace(/-./g,function(t){return t.charAt(1).toUpperCase()}),f=u.value;Object.defineProperty(e,s,{enumerable:!0,get:r.bind({value:f||""}),set:o.bind(t,a)})}}}return e})},{}],4:[function(t,e,n){"use strict";var r;"function"!=typeof(r=window.Element.prototype).matches&&(r.matches=r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=0;e[n]&&e[n]!==this;)++n;return Boolean(e[n])}),"function"!=typeof r.closest&&(r.closest=function(t){for(var e=this;e&&1===e.nodeType;){if(e.matches(t))return e;e=e.parentNode}return null})},{}],5:[function(t,r,o){"use strict";!function(){var t,e={polyfill:function(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var t={get:function(){var t=e.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",t),t},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(t=1;t<25;t++)e.keys[111+t]="F"+t;var n="";for(t=65;t<91;t++)n=String.fromCharCode(t),e.keys[t]=[n.toLowerCase(),n.toUpperCase()];"function"==typeof define&&define.amd?define("keyboardevent-key-polyfill",e):void 0!==o&&void 0!==r?r.exports=e:window&&(window.keyboardeventKeyPolyfill=e)}()},{}],6:[function(t,v,e){(function(t){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(){return l.Date.now()}var r=NaN,e="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,a=parseInt,s="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t,f="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,l=s||f||Function("return this")(),d=Object.prototype.toString,m=Math.max,w=Math.min;function E(t){var e=n(t);return!!t&&("object"==e||"function"==e)}function p(t){return"symbol"==n(t)||function(t){return!!t&&"object"==n(t)}(t)&&d.call(t)==e}function x(t){if("number"==typeof t)return t;if(p(t))return r;if(E(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=E(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=c.test(t);return n||u.test(t)?a(t.slice(2),n?2:8):i.test(t)?r:+t}v.exports=function(r,n,t){var o,i,c,u,a,s,f=0,l=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function p(t){var e=o,n=i;return o=i=void 0,f=t,u=r.apply(n,e)}function v(t){var e=t-s;return void 0===s||n<=e||e<0||d&&c<=t-f}function b(){var t=g();if(v(t))return h(t);a=setTimeout(b,function(t){var e=n-(t-s);return d?w(e,c-(t-f)):e}(t))}function h(t){return a=void 0,e&&o?p(t):(o=i=void 0,u)}function y(){var t=g(),e=v(t);if(o=arguments,i=this,s=t,e){if(void 0===a)return function(t){return f=t,a=setTimeout(b,n),l?p(t):u}(s);if(d)return a=setTimeout(b,n),p(s)}return void 0===a&&(a=setTimeout(b,n)),u}return n=x(n)||0,E(t)&&(l=!!t.leading,c=(d="maxWait"in t)?m(x(t.maxWait)||0,n):c,e="trailing"in t?!!t.trailing:e),y.cancel=function(){void 0!==a&&clearTimeout(a),o=s=i=a=void(f=0)},y.flush=function(){return void 0===a?u:h(g())},y}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(t,e,n){"use strict";var a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,o=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i<arguments.length;i++){for(var c in n=Object(arguments[i]))s.call(n,c)&&(o[c]=n[c]);if(a){r=a(n);for(var u=0;u<r.length;u++)f.call(n,r[u])&&(o[r[u]]=n[r[u]])}}return o}},{}],8:[function(t,e,n){"use strict";function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u=t("object-assign"),a=t("../delegate"),s=t("../delegateAll"),f=/^(.+):delegate\((.+)\)$/,l=function(t,e){var n=t[e];return delete t[e],n};e.exports=function(r,t){var n=Object.keys(r).reduce(function(t,e){var n=function(t,e){var n,r,o=t.match(f);o&&(t=o[1],n=o[2]),"object"===c(e)&&(r={capture:l(e,"capture"),passive:l(e,"passive")});var i={selector:n,delegate:"object"===c(e)?s(e):n?a(n,e):e,options:r};return-1<t.indexOf(" ")?t.split(" ").map(function(t){return u({type:t},i)}):(i.type=t,[i])}(e,r[e]);return t.concat(n)},[]);return u({add:function(e){n.forEach(function(t){e.addEventListener(t.type,t.delegate,t.options)})},remove:function(e){n.forEach(function(t){e.removeEventListener(t.type,t.delegate,t.options)})}},t)}},{"../delegate":10,"../delegateAll":11,"object-assign":7}],9:[function(t,e,n){"use strict";e.exports=function(t){return function(e){return t.some(function(t){return!1===t.call(this,e)},this)}}},{}],10:[function(t,e,n){"use strict";t("element-closest"),e.exports=function(n,r){return function(t){var e=t.target.closest(n);if(e)return r.call(e,t)}}},{"element-closest":4}],11:[function(t,e,n){"use strict";var r=t("../delegate"),o=t("../compose");e.exports=function(n){var t=Object.keys(n);if(1===t.length&&"*"===t[0])return n["*"];var e=t.reduce(function(t,e){return t.push(r(e,n[e])),t},[]);return o(e)}},{"../compose":9,"../delegate":10}],12:[function(t,e,n){"use strict";e.exports=function(e,n){return function(t){if(e!==t.target&&!e.contains(t.target))return n.call(this,t)}}},{}],13:[function(t,e,n){"use strict";e.exports={behavior:t("./behavior"),delegate:t("./delegate"),delegateAll:t("./delegateAll"),ignore:t("./ignore"),keymap:t("./keymap")}},{"./behavior":8,"./delegate":10,"./delegateAll":11,"./ignore":12,"./keymap":14}],14:[function(t,e,n){"use strict";t("keyboardevent-key-polyfill");var i={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"};e.exports=function(o){var t=Object.keys(o).some(function(t){return-1<t.indexOf("+")});return function(n){var r=function(t,e){var n=t.key;if(e)for(var r in i)!0===t[i[r]]&&(n=[r,n].join("+"));return n}(n,t);return[r,r.toLowerCase()].reduce(function(t,e){return e in o&&(t=o[r].call(this,n)),t},void 0)}},e.exports.MODIFIERS=i},{"keyboardevent-key-polyfill":5}],15:[function(t,e,n){"use strict";e.exports=function(e,n){var r=function(t){return t.currentTarget.removeEventListener(t.type,r,n),e.call(this,t)};return r}},{}],16:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=/(^\s+)|(\s+$)/g,i=/\s+/,c=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(o,"")};e.exports=function(t,e){if("string"!=typeof t)throw new Error("Expected a string but got "+r(t));var n=(e=e||window.document).getElementById?e.getElementById.bind(e):function(t){return this.querySelector('[id="'+t.replace(/"/g,'\\"')+'"]')}.bind(e);return 1===(t=c(t).split(i)).length&&""===t[0]?[]:t.map(function(t){var e=n(t);if(!e)throw new Error('no element with id: "'+t+'"');return e})}},{}],17:[function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(e){return c(p,e).filter(function(t){return t.closest(d)===e})}function o(e,t){var n,r=e.closest(d);if(!r)throw new Error("".concat(p," is missing outer ").concat(d));n=a(e,t);var o="true"===r.getAttribute("aria-multiselectable");n&&!o&&i(r).forEach(function(t){t!==e&&a(t,!1)})}var c=t("../utils/select"),u=t("../utils/behavior"),a=t("../utils/toggle"),s=t("../utils/is-in-viewport"),f=t("../events").CLICK,l=t("../config").prefix,d=".".concat(l,"-accordion, .").concat(l,"-accordion--bordered"),p=".".concat(l,"-accordion__button[aria-controls]"),v="aria-expanded",b=u(r({},f,r({},p,function(t){t.preventDefault(),o(this),"true"===this.getAttribute(v)&&(s(this)||this.scrollIntoView())})),{init:function(t){c(p,t).forEach(function(t){var e="true"===t.getAttribute(v);o(t,e)})},ACCORDION:d,BUTTON:p,show:function(t){return o(t,!0)},hide:function(t){return o(t,!1)},toggle:o,getButtons:i});e.exports=b},{"../config":26,"../events":27,"../utils/behavior":32,"../utils/is-in-viewport":34,"../utils/select":35,"../utils/toggle":38}],18:[function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=t("../utils/behavior"),i=t("../events").CLICK,c=t("../config").prefix,u=".".concat(c,"-banner__header"),a="".concat(c,"-banner__header--expanded");e.exports=o(r({},i,r({},"".concat(u," [aria-controls]"),function(t){t.preventDefault(),this.closest(u).classList.toggle(a)})))},{"../config":26,"../events":27,"../utils/behavior":32}],19:[function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o,i=t("lodash.debounce"),c=t("../utils/behavior"),u=t("../utils/select"),a=t("../events").CLICK,s=t("../config").prefix,f="hidden",l=".".concat(s,"-footer--big"),d="".concat(l," nav"),p="".concat(d," .").concat(s,"-footer__primary-link"),v=".".concat(s,"-footer__primary-content--collapsible");var b=i(function(){if(o!==window.innerWidth){o=window.innerWidth;var e=window.innerWidth<480;u(v).forEach(function(t){return t.classList.toggle(f,e)})}},180);e.exports=c(r({},a,r({},p,function(){if(window.innerWidth<480){var e=this.closest(v);e.classList.toggle(f),u(v,e.closest(d)).forEach(function(t){t!==e&&t.classList.add(f)})}})),{HIDE_MAX_WIDTH:480,DEBOUNCE_RATE:180,init:function(){b(),window.addEventListener("resize",b)},teardown:function(){window.removeEventListener("resize",b)}})},{"../config":26,"../events":27,"../utils/behavior":32,"../utils/select":35,"lodash.debounce":6}],20:[function(t,e,n){"use strict";var r=t("./accordion"),o=t("./banner"),i=t("./footer"),c=t("./navigation"),u=t("./password"),a=t("./search"),s=t("./skipnav"),f=t("./validator");e.exports={accordion:r,banner:o,footer:i,navigation:c,password:u,search:a,skipnav:s,validator:f}},{"./accordion":17,"./banner":18,"./footer":19,"./navigation":21,"./password":22,"./search":23,"./skipnav":24,"./validator":25}],21:[function(t,e,n){"use strict";var r;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return document.body.classList.contains(C)}function c(t){var e=document.body,n="boolean"==typeof t?t:!i();e.classList.toggle(C,n),p(j).forEach(function(t){return t.classList.toggle("is-visible",n)}),f.focusTrap.update(n);var r=e.querySelector(S),o=e.querySelector(x);return n&&r?r.focus():!n&&document.activeElement===r&&o&&o.focus(),n}function u(){var t=document.body.querySelector(S);i()&&t&&0===t.getBoundingClientRect().width&&f.toggleNav.call(t,!1)}function a(){return f.toggleNav.call(f,!1)}function s(){v(l,!1),l=null}var f,l,d=t("../utils/behavior"),p=t("../utils/select"),v=t("../utils/toggle"),b=t("../utils/focus-trap"),h=t("./accordion"),y=t("../events").CLICK,g=t("../config").prefix,m=".".concat(g,"-nav"),w="".concat(m," a"),E="button.".concat(g,"-nav__link"),x=".".concat(g,"-menu-btn"),S=".".concat(g,"-nav__close"),A=".".concat(g,"-overlay"),O="".concat(S,", .").concat(g,"-overlay"),j=[m,A].join(", "),C="usa-js-mobile-nav--active";f=d(o({},y,(o(r={},E,function(){return l&&l!==this&&s(),l?s():v(l=this,!0),!1}),o(r,"body",function(){l&&s()}),o(r,x,c),o(r,O,c),o(r,w,function(){var t=this.closest(h.ACCORDION);t&&h.getButtons(t).forEach(function(t){return h.hide(t)}),i()&&f.toggleNav.call(f,!1)}),r)),{init:function(t){var e=t.querySelector(m);e&&(f.focusTrap=b(e,{Escape:a})),u(),window.addEventListener("resize",u,!1)},teardown:function(){window.removeEventListener("resize",u,!1),l=!1},focusTrap:null,toggleNav:c}),e.exports=f},{"../config":26,"../events":27,"../utils/behavior":32,"../utils/focus-trap":33,"../utils/select":35,"../utils/toggle":38,"./accordion":17}],22:[function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=t("../utils/behavior"),i=t("../utils/toggle-form-input"),c=t("../events").CLICK,u=t("../config").prefix,a=".".concat(u,"-show-password, .").concat(u,"-show-multipassword");e.exports=o(r({},c,r({},a,function(t){t.preventDefault(),i(this)})))},{"../config":26,"../events":27,"../utils/behavior":32,"../utils/toggle-form-input":37}],23:[function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i,c=t("receptor/ignore"),o=t("../utils/behavior"),u=t("../utils/select"),a=t("../events").CLICK,s=".js-search-button",f=".js-search-form",l=function(t,e){var n=function(t){var e=t.closest("header");return e?e.querySelector(f):document.querySelector(f)}(t);if(!n)throw new Error("No ".concat(f," found for search toggle in ").concat("header","!"));if(t.hidden=e,n.hidden=!e,e){var r=n.querySelector("[type=search]");r&&r.focus();var o=c(n,function(){i&&function(){l(this,!1),i=void 0}.call(i),document.body.removeEventListener(a,o)});setTimeout(function(){document.body.addEventListener(a,o)},0)}};var d=o(r({},a,r({},s,function(){l(this,!0),i=this})),{init:function(t){u(s,t).forEach(function(t){l(t,!1)})},teardown:function(){i=void 0}});e.exports=d},{"../events":27,"../utils/behavior":32,"../utils/select":35,"receptor/ignore":12}],24:[function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=t("receptor/once"),i=t("../utils/behavior"),c=t("../events").CLICK,u=t("../config").prefix,a=".".concat(u,'-skipnav[href^="#"], .').concat(u,'-footer__return-to-top [href^="#"]');e.exports=i(r({},c,r({},a,function(){var t=this.getAttribute("href"),e=document.getElementById("#"===t?"main-content":t.slice(1));e&&(e.style.outline="0",e.setAttribute("tabindex",0),e.focus(),e.addEventListener("blur",o(function(){e.setAttribute("tabindex",-1)})))})))},{"../config":26,"../events":27,"../utils/behavior":32,"receptor/once":15}],25:[function(t,e,n){"use strict";var r=t("../utils/behavior"),o=t("../utils/validate-input");var i=r({"keyup change":{"input[data-validation-element]":function(){o(this)}}});e.exports=i},{"../utils/behavior":32,"../utils/validate-input":39}],26:[function(t,e,n){"use strict";e.exports={prefix:"usa"}},{}],27:[function(t,e,n){"use strict";e.exports={CLICK:"click"}},{}],28:[function(t,e,n){"use strict";var r=window.HTMLElement.prototype,o="hidden";o in r||Object.defineProperty(r,o,{get:function(){return this.hasAttribute(o)},set:function(t){t?this.setAttribute(o,""):this.removeAttribute(o)}})},{}],29:[function(t,e,n){"use strict";t("classlist-polyfill"),t("./element-hidden")},{"./element-hidden":28,"classlist-polyfill":1}],30:[function(t,e,n){"use strict";var r=t("domready");t("./polyfills");var o=t("./config"),i=t("./components");o.components=i,r(function(){var e=document.body;Object.keys(i).forEach(function(t){i[t].on(e)})}),e.exports=o},{"./components":20,"./config":26,"./polyfills":29,domready:2}],31:[function(t,e,n){"use strict";e.exports=function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:document).activeElement}},{}],32:[function(t,e,n){"use strict";function r(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];return function(t){var e=this,n=0<arguments.length&&void 0!==t?t:document.body;r.forEach(function(t){"function"==typeof e[t]&&e[t].call(e,n)})}}var o=t("object-assign"),i=t("receptor/behavior");e.exports=function(t,e){return i(t,o({on:r("init","add"),off:r("teardown","remove")},e))}},{"object-assign":7,"receptor/behavior":8}],33:[function(t,e,n){"use strict";function o(t){var e=a('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]',t),n=e[0],r=e[e.length-1];return{firstTabStop:n,lastTabStop:r,tabAhead:function(t){s()===r&&(t.preventDefault(),n.focus())},tabBack:function(t){s()===n&&(t.preventDefault(),r.focus())}}}var i=t("object-assign"),c=t("receptor").keymap,u=t("./behavior"),a=t("./select"),s=t("./active-element");e.exports=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=o(t),r=c(i({Tab:n.tabAhead,"Shift+Tab":n.tabBack},e));return u({keydown:r},{init:function(){n.firstTabStop.focus()},update:function(t){t?this.on():this.off()}})}},{"./active-element":31,"./behavior":32,"./select":35,"object-assign":7,receptor:13}],34:[function(t,e,n){"use strict";e.exports=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:document.documentElement,r=t.getBoundingClientRect();return 0<=r.top&&0<=r.left&&r.bottom<=(e.innerHeight||n.clientHeight)&&r.right<=(e.innerWidth||n.clientWidth)}},{}],35:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.exports=function(t,e){if("string"!=typeof t)return[];e&&function(t){return t&&"object"===r(t)&&1===t.nodeType}(e)||(e=window.document);var n=e.querySelectorAll(t);return Array.prototype.slice.call(n)}},{}],36:[function(t,e,n){"use strict";e.exports=function(t,e){t.setAttribute("autocapitalize","off"),t.setAttribute("autocorrect","off"),t.setAttribute("type",e?"password":"text")}},{}],37:[function(t,e,n){"use strict";var o=t("resolve-id-refs"),i=t("./toggle-field-mask"),c="aria-pressed",u="data-show-text";e.exports=function(t){var e=t.hasAttribute(c)&&"true"!==t.getAttribute(c);o(t.getAttribute("aria-controls")).forEach(function(t){return i(t,e)}),t.hasAttribute(u)||t.setAttribute(u,t.textContent);var n=t.getAttribute(u),r=t.getAttribute("data-hide-text")||function(t){return t.replace(/\bShow\b/i,function(t){return"".concat("S"===t[0]?"H":"h","ide")})}(n);return t.textContent=e?n:r,t.setAttribute(c,e),e}},{"./toggle-field-mask":36,"resolve-id-refs":16}],38:[function(t,e,n){"use strict";var i="aria-expanded";e.exports=function(t,e){var n=e;"boolean"!=typeof n&&(n="false"===t.getAttribute(i)),t.setAttribute(i,n);var r=t.getAttribute("aria-controls"),o=document.getElementById(r);if(!o)throw new Error('No toggle target found with id: "'.concat(r,'"'));return n?o.removeAttribute("hidden"):o.setAttribute("hidden",""),n}},{}],39:[function(t,e,n){"use strict";function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,u=t[Symbol.iterator]();!(r=(c=u.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var r=t("elem-dataset"),o=t("../config").prefix,d="".concat(o,"-checklist__item--checked");e.exports=function(s){var t=r(s),e=t.validationElement,f="#"===e.charAt(0)?document.querySelector(e):document.getElementById(e);if(!f)throw new Error('No validation element found with id: "'.concat(e,'"'));Object.entries(t).forEach(function(t){var e=l(t,2),n=e[0],r=e[1];if(n.startsWith("validate")){var o=n.substr("validate".length).toLowerCase(),i=new RegExp(r),c='[data-validator="'.concat(o,'"]'),u=f.querySelector(c);if(!u)throw new Error('No validator checkbox found for: "'.concat(o,'"'));var a=i.test(s.value);u.classList.toggle(d,a),u.setAttribute("aria-checked",a)}})}},{"../config":26,"elem-dataset":3}]},{},[30]);
//# sourceMappingURL=uswds.min.js.map