-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlmnt.min.js
1 lines (1 loc) · 1.14 KB
/
lmnt.min.js
1
window.ELEMENT_NODE=document.ELEMENT_NODE||1,window.lmnt=function(){function a(a){if(a&&a.nextElementSibling)return a.nextElementSibling;if(!a)return null;do a=a.nextSibling;while(a&&a.nodeType!==ELEMENT_NODE);return a}function b(a){if(a&&a.previousElementSibling)return a.previousElementSibling;if(!a)return null;do a=a.previousSibling;while(a&&a.nodeType!==ELEMENT_NODE);return a}function c(b){return b&&b.firstElementChild?b.firstElementChild:(b=b?b.firstChild:null,b&&b.nodeType==ELEMENT_NODE?b:b.nextElementSibling||a(b))}function d(a){return a&&a.lastElementChild?a.lastElementChild:(a=a?a.lastChild:null,a&&a.nodeType==ELEMENT_NODE?a:a.previousElementSibling||b(a))}function e(a){if(a&&a.childElementCount)return a.childElementCount;if(a&&a.children)return a.children.length||0;var b=0;a=a?a.firstChild:null;do a&&a.nodeType==ELEMENT_NODE&&b++,a=a.nextSibling;while(a);return b}function f(a){if(a&&a.children)return a.children;var b=[];a=a?a.firstChild:null;while(a)a&&a.nodeType==ELEMENT_NODE&&b.push(a),a=a.nextSibling;return b}return{nextElementSibling:a,previousElementSibling:b,firstElementChild:c,lastElementChild:d,childElementCount:e,children:f}}()