| 1 {"version":3,"sources":["element-closest.js"],"names":["ElementProto","matches",
"msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","selector","ele
ment","this","elements","document","ownerDocument","querySelectorAll","index","B
oolean","closest","nodeType","parentNode","window","Element","prototype"],"mappi
ngs":";CAEA,SAAWA,GAC0B,kBAAzBA,GAAaC,UACvBD,EAAaC,QAAUD,EAAaE,mBAAqBF,EAAaG,oBA
AsBH,EAAaI,uBAAyB,SAAiBC,GAKlJ,IAJA,GAAIC,GAAUC,KACVC,GAAYF,EAAQG,UAAYH,EAAQI,eA
AeC,iBAAiBN,GACxEO,EAAQ,EAELJ,EAASI,IAAUJ,EAASI,KAAWN,KAC3CM,CAGH,OAAOC,SAAQL,EA
ASI,MAIU,kBAAzBZ,GAAac,UACvBd,EAAac,QAAU,SAAiBT,GAGvC,IAFA,GAAIC,GAAUC,KAEPD,GAA
gC,IAArBA,EAAQS,UAAgB,CACzC,GAAIT,EAAQL,QAAQI,GACnB,MAAOC,EAGRA,GAAUA,EAAQU,WAGn
B,MAAO,SAGPC,OAAOC,QAAQC","file":"element-closest.min.js","sourcesContent":["/*!
@source https://github.com/jonathantneal/closest/blob/master/element-closest.js
*/\n\n(function (ElementProto) {\n\tif (typeof ElementProto.matches !== 'functi
on') {\n\t\tElementProto.matches = ElementProto.msMatchesSelector || ElementProt
o.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(s
elector) {\n\t\t\tvar element = this;\n\t\t\tvar elements = (element.document ||
element.ownerDocument).querySelectorAll(selector);\n\t\t\tvar index = 0;\n\n\t\
t\twhile (elements[index] && elements[index] !== element) {\n\t\t\t\t++index;\n\
t\t\t}\n\n\t\t\treturn Boolean(elements[index]);\n\t\t};\n\t}\n\n\tif (typeof El
ementProto.closest !== 'function') {\n\t\tElementProto.closest = function closes
t(selector) {\n\t\t\tvar element = this;\n\n\t\t\twhile (element && element.node
Type === 1) {\n\t\t\t\tif (element.matches(selector)) {\n\t\t\t\t\treturn elemen
t;\n\t\t\t\t}\n\n\t\t\t\telement = element.parentNode;\n\t\t\t}\n\n\t\t\treturn
null;\n\t\t};\n\t}\n})(window.Element.prototype);"]} |