!function(e){var i="a11y",t=e.Core.newType("hafasModule"),n=e.Core.newType("hafasVersion",0,1);function a(e){this.init(e)}a.prototype={init:function(e){}},e.Core.registerType(i,"hafasa11y",a),t.getVersion=function(){return n};var r="loading";t.getState=function(){return r},t.Announce=function(){var i,t="div",n={classNames:["lyr_srOnly","lyr_ariaLiveRegion"],"aria-atomic":!1,"aria-relevant":"additions"},a=!1,r={},o=300,s=[];function l(t,n){if(a){e.logger.info("a11y.announce","a11y.Announce."+t+": "+n);var o=r[t]||r.polite;if("assertive"===t){o.removeAttribute("aria-hidden");var l=Date.now(),v=e.Util.dom.createElement("div",{text:n,"data-timestamp":l});o.appendChild(v),s.push({timestamp:l,instance:v}),setTimeout(d,i+1)}else setTimeout((function(){o.removeAttribute("aria-hidden");var t=Date.now(),a=e.Util.dom.createElement("div",{text:n,"data-timestamp":t});o.appendChild(a),s.push({timestamp:t,instance:a}),setTimeout(d,i+1)}),250)}}function d(){if(a){var e=s.length;if(0!==e)for(var t=Date.now();--e>-1;){var n=s[e];if(t-n.timestamp>i){var r=n.instance;r.parentElement.removeChild(r),s.splice(e,1)}}}}return{init:function(s,l){a||(n["aria-live"]="polite",n.id="HFS_LiveRegion_Polite",r.polite=e.Util.dom.createElement(t,n),n.id="HFS_LiveRegion_Assertive",n["aria-live"]="assertive",r.assertive=e.Util.dom.createElement(t,n));var d=e.Util.dom.createElement("div",{classNames:"lyr_srOnly",appendTo:e(s)});d.appendChild(r.polite),d.appendChild(r.assertive),i=l||o,a=!0},announce:l,assertive:function(e){l("assertive",e)},polite:function(e){l("polite",e)}}}(),t.init=function(e,i){r="ready",i&&i()},e.Core.registerModule(i,t)}(window.Hafas=window.Hafas||{});