-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathm-class-list.min.js
2 lines (2 loc) · 2.13 KB
/
m-class-list.min.js
1
2
/*! mClassList v1.1.10 (c) anseki https://github.com/anseki/m-class-list */
var mClassList=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t){return(t+"").trim()}function i(t,e){e.setAttribute("class",t.join(" "))}function u(t,e,n){n.filter((function(e){return!(!(e=r(e))||-1!==t.indexOf(e))&&(t.push(e),!0)})).length&&i(t,e)}function o(t,e,n){n.filter((function(e){var n;return!(!(e=r(e))||-1===(n=t.indexOf(e)))&&(t.splice(n,1),!0)})).length&&i(t,e)}function f(t){return!f.ignoreNative&&t.classList||(e=(t.getAttribute("class")||"").trim().split(/\s+/).filter((function(t){return!!t})),n={length:e.length,item:function(t){return e[t]},contains:function(t){return-1!==e.indexOf(r(t))},add:function(){return u(e,t,Array.prototype.slice.call(arguments)),f.methodChain?n:void 0},remove:function(){return o(e,t,Array.prototype.slice.call(arguments)),f.methodChain?n:void 0},toggle:function(n,u){return function(t,e,n,u){var o=t.indexOf(n=r(n));return-1!==o?!!u||(t.splice(o,1),i(t,e),!1):!1!==u&&(t.push(n),i(t,e),!0)}(e,t,n,u)},replace:function(u,o){return function(t,e,n,u){var o;(n=r(n))&&(u=r(u))&&n!==u&&-1!==(o=t.indexOf(n))&&(t.splice(o,1),-1===t.indexOf(u)&&t.push(u),i(t,e))}(e,t,u,o),f.methodChain?n:void 0}});var e,n}n.r(e),f.methodChain=!0,e.default=f}]).default;