All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.bb8c8232-3142.e8fbd9db4faf506084f5.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-3142"],{r0DwUTl9:()=>{var g=function(){function u(d,l){for(var f=0;f"u")return;var u=Array.prototype.slice,d=Element.prototype.matches||Element.prototype.msMatchesSelector,l=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),f=function(){function a(t,e){y(this,a),this._inertManager=e,this._rootElement=t,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return g(a,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(e){this._unmanageNode(e.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var n=this;c(e,function(s){return n._visitNode(s)});var i=document.activeElement;if(!document.body.contains(e)){for(var r=e,o=void 0;r;){if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){o=r;break}r=r.parentNode}o&&(i=o.activeElement)}e.contains(i)&&(i.blur(),i===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n!==this._rootElement&&n.hasAttribute("inert")&&this._adoptInertRoot(n),(d.call(n,l)||n.hasAttribute("tabindex"))&&this._manageNode(n)}}},{key:"_manageNode",value:function(e){var n=this._inertManager.register(e,this);this._managedNodes.add(n)}},{key:"_unmanageNode",value:function(e){var n=this._inertManager.deregister(e,this);n&&this._managedNodes.delete(n)}},{key:"_unmanageSubtree",value:function(e){var n=this;c(e,function(i){return n._unmanageNode(i)})}},{key:"_adoptInertRoot",value:function(e){var n=this._inertManager.getInertRoot(e);n||(this._inertManager.setInert(e,!0),n=this._inertManager.getInertRoot(e)),n.managedNodes.forEach(function(i){this._manageNode(i.node)},this)}},{key:"_onMutation",value:function(e,n){e.forEach(function(i){var r=i.target;if(i.type==="childList")u.call(i.addedNodes).forEach(function(s){this._makeSubtreeUnfocusable(s)},this),u.call(i.removedNodes).forEach(function(s){this._unmanageSubtree(s)},this);else if(i.type==="attributes"){if(i.attributeName==="tabindex")this._manageNode(r);else if(r!==this._rootElement&&i.attributeName==="inert"&&r.hasAttribute("inert")){this._adoptInertRoot(r);var o=this._inertManager.getInertRoot(r);this._managedNodes.forEach(function(s){r.contains(s.node)&&o._manageNode(s.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),a}(),h=function(){function a(t,e){y(this,a),this._node=t,this._overrodeFocusMethod=!1,this._inertRoots=new Set([e]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return g(a,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var e=this._node;this._savedTabIndex!==null?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var e=this.node;if(d.call(e,l)){if(e.tabIndex===-1&&this.hasSavedTabIndex)return;e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)}else e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),a}(),N=function(){function a(t){if(y(this,a),!t)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=t,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),E(t.head||t.body||t.documentElement),t.readyState==="loading"?t.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return g(a,[{key:"setInert",value:function(e,n){if(n){if(this._inertRoots.has(e))return;var i=new f(e,this);if(e.setAttribute("inert",""),this._inertRoots.set(e,i),!this._document.body.contains(e))for(var r=e.parentNode;r;)r.nodeType===11&&E(r),r=r.parentNode}else{if(!this._inertRoots.has(e))return;var o=this._inertRoots.get(e);o.destructor(),this._inertRoots.delete(e),e.removeAttribute("inert")}}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,n){var i=this._managedNodes.get(e);return i!==void 0?i.addInertRoot(n):i=new h(e,n),this._managedNodes.set(e,i),i}},{key:"deregister",value:function(e,n){var i=this._managedNodes.get(e);return i?(i.removeInertRoot(n),i.destroyed&&this._managedNodes.delete(e),i):null}},{key:"_onDocumentLoaded",value:function(){var e=u.call(this._document.querySelectorAll("[inert]"));e.forEach(function(n){this.setInert(n,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(e,n){var i=this;e.forEach(function(r){switch(r.type){case"childList":u.call(r.addedNodes).forEach(function(_){if(_.nodeType===Node.ELEMENT_NODE){var v=u.call(_.querySelectorAll("[inert]"));d.call(_,"[inert]")&&v.unshift(_),v.forEach(function(b){this.setInert(b,!0)},i)}},i);break;case"attributes":if(r.attributeName!=="inert")return;var o=r.target,s=o.hasAttribute("inert");i.setInert(o,s);break}},this)}}]),a}();function c(a,t,e){if(a.nodeType==Node.ELEMENT_NODE){var n=a;t&&t(n);var i=n.shadowRoot;if(i){c(i,t,i);return}if(n.localName=="content"){for(var r=n,o=r.getDistributedNodes?r.getDistributedNodes():[],s=0;s




© 2015 - 2024 Weber Informatics LLC | Privacy Policy