-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
21 lines (21 loc) · 14.5 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
!function(){function r(r,n){var t=new Error('Cannot find module "'+r+'"'+(n?' from "'+n+'"':""));return t.code="MODULE_NOT_FOUND",t}function n(r){this.id=this.filename=r,this.loaded=!1,this.exports=void 0}function t(r,n,t){var i=t&&t.globals;if(O[r]=n,i)for(var e=b||global,o=0;o<i.length;o++){var a=i[o],u=E[r]=d(r);e[a]=u.exports}}function i(r,n){$[r]=n}function e(r,n){j[r]=n}function o(r,n){M[r]=n}function a(r,n,t){I[r+"/"+n]=t}function u(r){var n,t=0,i=r.length;for(n=0;n<i;n++){var e=r[n];"."===e||(".."===e?t--:(r[t]=e,t++))}return 1===t?"/":(t>2&&0===r[t-1].length&&t--,r.length=t,r.join("/"))}function f(r,n){var t=n.split("/");return u(("/"==r?[""]:r.split("/")).concat(t))}function s(r){var n,t=r.lastIndexOf(".");return-1===t||-1!==(n=r.lastIndexOf("/"))&&n>t?null:r.substring(0,t)}function l(r){r=r.substring(1);var n=r.indexOf("/");"@"===r.charAt(1)&&(n=r.indexOf("/",n+1));var t=-1===n?r.length:n;return[r.substring(0,t),r.substring(t)]}function c(r,n){"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1));var t=M[r];if(t)return t;var i,e,o=l(n),a=o[0],u=r.indexOf("/");u<0?(i=r,e=""):("@"===r.charAt(0)&&(u=r.indexOf("/",u+1)),i=r.substring(0,u),e=r.substring(u));var f=I[a+"/"+i];if(f){var s="/"+i+"$"+f;return e&&(s+=e),s}}function v(r,n){var t;if("."===r.charAt(0))t=f(n,r);else if("/"===r.charAt(0))t=u(r.split("/"));else{for(var i=m.length,e=0;e<i;e++){var o=m[e]+r,a=v(o,n);if(a)return a}t=c(r,n)}if(t){var l;void 0!==(l=$[t])&&(l||(l="index"),t=f(t,l));var d=j[t];d&&(t=d);var h=O[t];if(void 0===h){var g;if(null===(g=s(t))||void 0===(h=O[g]))return;t=g}return[t,h]}}function d(t,i){if(!t)throw r("");var e=v(t,i);if(!e)throw r(t,i);var o=e[0],a=y[o];if(void 0!==a)return a;if(E.hasOwnProperty(o))return E[o];var u=e[1];return a=new n(o),y[o]=a,a.load(u),a}function h(r,n){return d(r,n).exports}function g(r,n){if(!(n&&!1===n.wait||_))return A.push([r,n]);h(r,"/")}function p(){_=!0;for(var r;r=A.length;){var n=A;A=[];for(var t=0;t<r;t++){var i=n[t];g(i[0],i[1])}if(!_)break}}function x(r){m.push(r)}var b;if("undefined"!=typeof window){if(b=window,b.$_mod)return;b.global=b}var w,O={},m=[],_=!1,A=[],y={},I={},M={},$={},j={},D={},E={};n.cache=y;var F=n.prototype;F.load=function(n){var t=this.id;if(n&&n.constructor===Function){var i=t.lastIndexOf("/"),e=t.substring(0,i),o=D[e]||(D[e]={}),a=function(r){return(o[r]||(o[r]=d(r,e))).exports};a.resolve=function(n){if(!n)throw r("");var t=v(n,e);if(!t)throw r(n,e);return t[0]},a.cache=y,a.runtime=w,this.exports={},n.call(this,a,this.exports,this,t,e)}else this.exports=n;this.loaded=!0};var N=0,P=function(){--N||p()};F.__runtime=w={def:t,installed:a,run:g,main:i,remap:e,builtin:o,require:h,resolve:v,join:f,ready:p,searchPath:x,loaderMetadata:function(r){F.__loaderMetadata=r},pending:function(){return _=!1,N++,{done:P}}},b?b.$_mod=w:module.exports=w}();
$_mod.installed("undefined$0","makeup-expander","0.7.0");
$_mod.main("/makeup-expander$0.7.0","");
$_mod.installed("makeup-expander$0.7.0","custom-event-polyfill","0.3.0");
$_mod.main("/custom-event-polyfill$0.3.0","custom-event-polyfill");
$_mod.def("/custom-event-polyfill$0.3.0/custom-event-polyfill",function(e,t,n,o,r){try{var l=new window.CustomEvent("test");if(l.preventDefault(),!0!==l.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var u=function(e,t){var n,o;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),o=n.preventDefault,n.preventDefault=function(){o.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};u.prototype=window.Event.prototype,window.CustomEvent=u}});
$_mod.run("/custom-event-polyfill$0.3.0/custom-event-polyfill");
$_mod.installed("makeup-expander$0.7.0","makeup-next-id","0.0.2");
$_mod.main("/makeup-next-id$0.0.2","");
$_mod.def("/makeup-next-id$0.0.2/index",function(i,t,d,e,n){"use strict";var o={};d.exports=function(i){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nid",d=""===t?"nid":t;o[d]=o[d]||0,i.id||i.setAttribute("id",d+"-"+o[d]++)}});
$_mod.installed("makeup-expander$0.7.0","makeup-exit-emitter","0.0.4");
$_mod.main("/makeup-exit-emitter$0.0.4","");
$_mod.installed("makeup-exit-emitter$0.0.4","custom-event-polyfill","0.3.0");
$_mod.installed("makeup-exit-emitter$0.0.4","makeup-next-id","0.0.2");
$_mod.def("/makeup-exit-emitter$0.0.4/index",function(e,n,t,i,o){"use strict";function s(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n,t){e.dispatchEvent(new CustomEvent("focusExit",{detail:{fromElement:n,toElement:t},bubbles:!1}))}function u(e){var n=e.target;!0===this.el.contains(n)?this.currentFocusElement=n:(window.removeEventListener("blur",this.onWindowBlurListener),document.removeEventListener("focusin",this.onDocumentFocusInListener),r(this.el,this.currentFocusElement,n),this.currentFocusElement=null)}function c(){r(this.el,this.currentFocusElement,void 0)}function l(){document.addEventListener("focusin",this.onDocumentFocusInListener),window.addEventListener("blur",this.onWindowBlurListener)}function d(e){var n=null;return h(e),v[e.id]||(n=new f(e),v[e.id]=n),n}function m(e){var n=v[e.id];n&&(n.removeEventListeners(),delete v[e.id])}var a=function(){function e(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(n,t,i){return t&&e(n.prototype,t),i&&e(n,i),n}}(),h=e("/makeup-next-id$0.0.2/index"),v={},f=function(){function e(n){s(this,e),this.el=n,this.currentFocusElement=null,this.onWidgetFocusInListener=l.bind(this),this.onDocumentFocusInListener=u.bind(this),this.onWindowBlurListener=c.bind(this),this.el.addEventListener("focusin",this.onWidgetFocusInListener)}return a(e,[{key:"removeEventListeners",value:function(){window.removeEventListener("blur",this.onWindowBlurListener),document.removeEventListener("focusin",this.onDocumentFocusInListener),this.el.removeEventListener("focusin",this.onWidgetFocusInListener)}}]),e}();t.exports={addFocusExit:d,removeFocusExit:m}});
$_mod.installed("makeup-expander$0.7.0","makeup-focusables","0.0.3");
$_mod.main("/makeup-focusables$0.0.3","");
$_mod.def("/makeup-focusables$0.0.3/index",function(e,t,n,i,r){"use strict";var o=["a[href]","area[href]","button:not([disabled])","embed","iframe","input:not([disabled])","object","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"],a=o.join();n.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Array.prototype.slice.call(e.querySelectorAll(a));return n=n.filter(function(e){return"none"!==window.getComputedStyle(e).display}),!0===t&&(n=n.filter(function(e){return"-1"!==e.getAttribute("tabindex")})),n}});
$_mod.def("/makeup-expander$0.7.0/index",function(e,t,s,i,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){var t=e.keyCode;13!==t&&32!==t||(this.keyDownFlag=!0,32===t&&!0===this.options.simulateSpacebarClick&&this.hostEl.click())}function l(e,t){!1===t.contains(e.target)&&t.dispatchEvent(new CustomEvent("clickOut",{bubbles:!1}))}function h(e){l(e,this.el)}function a(){this.documentClick=!0}function u(){this.documentClick=!1}function r(e){this.documentClick&&(this.documentClick=!1,l(e,this.el))}var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},p=function(){function e(e,t){for(var s=0;s<t.length;s++){var i=t[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,s,i){return s&&e(t.prototype,s),i&&e(t,i),t}}(),v=e("/makeup-next-id$0.0.2/index"),E=e("/makeup-exit-emitter$0.0.4/index"),O=e("/makeup-focusables$0.0.3/index"),x={autoCollapse:!1,collapseOnFocusOut:!1,collapseOnMouseOut:!1,collapseOnClickOut:!1,contentSelector:".expander__content",expandOnClick:!1,expandOnFocus:!1,expandOnHover:!1,focusManagement:null,expandedClass:null,hostSelector:".expander__host",simulateSpacebarClick:!1};s.exports=function(){function e(t,s){o(this,e),this.options=d({},x,s),this.el=t,this.hostEl=t.querySelector(this.options.hostSelector),this.expandeeEl=t.querySelector(this.options.contentSelector),this.documentClick=!1,v(this.el,"expander"),v(this.expandeeEl,this.el.id+"-content"),E.addFocusExit(this.el),this._hostKeyDownListener=c.bind(this),this._documentClickListener=h.bind(this),this._documentTouchStartListener=a.bind(this),this._documentTouchMoveListener=u.bind(this),this._documentTouchEndListener=r.bind(this),this._hostClickListener=this.toggle.bind(this),this._hostFocusListener=this.expand.bind(this),this._hostHoverListener=this.expand.bind(this),this._focusExitListener=this.collapse.bind(this),this._mouseLeaveListener=this.collapse.bind(this),this._clickOutListener=this.collapse.bind(this),null===this.hostEl.getAttribute("aria-expanded")&&this.hostEl.setAttribute("aria-expanded","false"),this.hostEl.setAttribute("aria-controls",this.expandeeEl.id),this.expandOnClick=this.options.expandOnClick,this.expandOnFocus=this.options.expandOnFocus,this.expandOnHover=this.options.expandOnHover,!1===this.options.autoCollapse&&(this.collapseOnClickOut=this.options.collapseOnClickOut,this.collapseOnFocusOut=this.options.collapseOnFocusOut,this.collapseOnMouseOut=this.options.collapseOnMouseOut)}return p(e,[{key:"isExpanded",value:function(){return"true"===this.hostEl.getAttribute("aria-expanded")}},{key:"collapse",value:function(){!0===this.isExpanded()&&(this.hostEl.setAttribute("aria-expanded","false"),this.options.expandedClass&&this.el.classList.remove(this.options.expandedClass),this.el.dispatchEvent(new CustomEvent("expander-collapse",{bubbles:!0,detail:this.expandeeEl})))}},{key:"expand",value:function(e){if(!1===this.isExpanded()){if(this.hostEl.setAttribute("aria-expanded","true"),this.options.expandedClass&&this.el.classList.add(this.options.expandedClass),!0===e){var t=this.options.focusManagement;if("content"===t)this.expandeeEl.setAttribute("tabindex","-1"),this.expandeeEl.focus();else if("focusable"===t)O(this.expandeeEl)[0].focus();else if("interactive"===t)O(this.expandeeEl,!0)[0].focus();else if(null!==t){var s=this.expandeeEl.querySelector("#"+t);s&&s.focus()}}this.el.dispatchEvent(new CustomEvent("expander-expand",{bubbles:!0,detail:this.expandeeEl}))}}},{key:"toggle",value:function(){!0===this.isExpanded()?this.collapse():this.expand(this.keyDownFlag),this.keyDownFlag=!1}},{key:"cancelAsync",value:function(){this.expandOnClick=!1,this.expandOnFocus=!1,this.expandOnHover=!1,this.collapseOnClickOut=!1,this.collapseOnFocusOut=!1,this.collapseOnMouseOut=!1}},{key:"expandOnClick",set:function(e){!0===e?(this.hostEl.addEventListener("keydown",this._hostKeyDownListener),this.hostEl.addEventListener("click",this._hostClickListener),!0===this.options.autoCollapse&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):(this.hostEl.removeEventListener("click",this._hostClickListener),this.hostEl.removeEventListener("keydown",this._hostKeyDownListener))}},{key:"expandOnFocus",set:function(e){!0===e?(this.hostEl.addEventListener("focus",this._hostFocusListener),!0===this.options.autoCollapse&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):this.hostEl.removeEventListener("focus",this._hostFocusListener)}},{key:"expandOnHover",set:function(e){!0===e?(this.hostEl.addEventListener("mouseenter",this._hostHoverListener),!0===this.options.autoCollapse&&(this.collapseOnMouseOut=!0)):this.hostEl.removeEventListener("mouseenter",this._hostHoverListener)}},{key:"collapseOnClickOut",set:function(e){!0===e?(document.addEventListener("click",this._documentClickListener),document.addEventListener("touchstart",this._documentTouchStartListener),document.addEventListener("touchmove",this._documentTouchMoveListener),document.addEventListener("touchend",this._documentTouchEndListener),this.el.addEventListener("clickOut",this._clickOutListener)):(this.el.removeEventListener("clickOut",this._clickOutListener),document.removeEventListener("click",this._documentClickListener),document.removeEventListener("touchstart",this._documentTouchStartListener),document.removeEventListener("touchmove",this._documentTouchMoveListener),document.removeEventListener("touchend",this._documentTouchEndListener))}},{key:"collapseOnFocusOut",set:function(e){!0===e?this.el.addEventListener("focusExit",this._focusExitListener):this.el.removeEventListener("focusExit",this._focusExitListener)}},{key:"collapseOnMouseOut",set:function(e){!0===e?this.el.addEventListener("mouseleave",this._mouseLeaveListener):this.el.removeEventListener("mouseleave",this._mouseLeaveListener)}}]),e}()});
$_mod.def("/undefined$0/main",function(e,n,t,a,r){function o(e){return Array.prototype.slice.call(e)}function i(e,n){return n=n||document,o(n.querySelectorAll(e))}var d=e("/makeup-expander$0.7.0/index");window.onload=function(e){i(".skipto").forEach(function(e,n){e.addEventListener("click",function(){var n=document.querySelector(e.querySelector("a").getAttribute("href"));n.setAttribute("tabindex","-1"),n.focus()})});var n=document.getElementById("page-error");n&&(n.setAttribute("tabindex","-1"),n.focus()),i(".field-validation input").forEach(function(e){var n=document.querySelector("#"+e.getAttribute("aria-describedby")+" span");e.addEventListener("blur",function(e){this.value?n.removeAttribute("hidden"):n.setAttribute("hidden","hidden")})});var t=document.getElementById("reg-form");if(t){var a=document.getElementById("page-error-placeholder");t.addEventListener("submit",function(e){e.preventDefault(),a.innerHTML='<section aria-labelledby="attention-status" class="page-notice page-notice--attention" id="page-error" role="region" tabindex="-1"><h2 class="page-notice__status" id="attention-status"><span aria-label="Attention" role="img"></span></h2><div class="page-notice__content"><p>Please fix the following errors:</p><ul role="list"><li><a href="#fname">First Name: please enter your first name</a></li><li><a href="#lname">Last Name: please enter your last name</a></li></ul></div></section>',a.focus()})}i(".expander--click").forEach(function(e,n){new d(e,{collapseOnClickOut:!0,collapseOnFocusOut:!0,expandedClass:"expander--expanded",expandOnClick:!0,focusManagement:"interactive"})}),i(".expander--hover").forEach(function(e,n){new d(e,{collapseOnMouseOut:!0,expandedClass:"expander--expanded",expandOnHover:!0})}),i(".expander--hover-and-focus").forEach(function(e,n){new d(e,{collapseOnFocusOut:!0,collapseOnMouseOut:!0,expandedClass:"expander--expanded",expandOnFocus:!0,expandOnHover:!0})})}});
$_mod.run("/undefined$0/main");