{"version":3,"file":"is-node-or-child.mjs","sources":["../../../../src/gestures/utils/is-node-or-child.ts"],"sourcesContent":["/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nexport const isNodeOrChild = (\n    parent: Element | null,\n    child?: Element | null\n): boolean => {\n    if (!child) {\n        return false\n    } else if (parent === child) {\n        return true\n    } else {\n        return isNodeOrChild(parent, child.parentElement)\n    }\n}\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;MACU,aAAa,GAAG,CACzB,MAAsB,EACtB,KAAsB,KACb;IACT,IAAI,CAAC,KAAK,EAAE;AACR,QAAA,OAAO,KAAK;IAChB;AAAO,SAAA,IAAI,MAAM,KAAK,KAAK,EAAE;AACzB,QAAA,OAAO,IAAI;IACf;SAAO;QACH,OAAO,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC;IACrD;AACJ;;;;"}