{"version":3,"file":"device.js","names":["isTouchDevice","window","DocumentTouch","document","a","isFiresTouchEvents","event","sourceCapabilities","firesTouchEvents","setters","execute"],"sources":["toolbox/device.js"],"sourcesContent":["/**\n * Check touch devices\n *\n * Indicates if the browser supports the W3C Touch Events API.\n * This *does not* necessarily reflect a touchscreen device:\n * Older touchscreen devices only emulate mouse events\n * Modern IE touch devices implement the Pointer Events API instead: use `Modernizr.pointerevents` to detect support for that\n * Future browsers may implement other event models for touch interactions\n * See this article: [You Can't Detect A Touchscreen](http://www.stucox.com/blog/you-cant-detect-a-touchscreen/).\n * It's recommended to bind both mouse and touch/pointer events simultaneously – see [this HTML5 Rocks tutorial](https://www.html5rocks.com/en/mobile/touchandmouse/).\n * This test will also return `true` for Firefox 4 Multitouch support.\n *\n * @returns {Boolean} Result\n */\nexport function isTouchDevice() {\n return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch; // eslint-disable-line\n}\n\n/**\n * Check is the input device fires touch events\n *\n * Fallback for touch devices and screen readers, intercepting ENTER and SPACE keys, but triggering 'click' instead.\n * The UIEvent.sourceCapabilities read-only property returns an instance of the InputDeviceCapabilities interface\n * which provides information about the physical device responsible for generating a touch event.\n * If no input device was responsible for the event (such as artificially triggered click event by the screen reader),\n * it returns null\n * The firesTouchEvents read-only property returns a boolean value whether the device dispatches touch events\n *\n * @param {Event} event - Event object\n * @returns {Boolean} Result\n */\nexport function isFiresTouchEvents(event) {\n // event.sourceCapabilities is not compatible with Safari on iOS, so the condition is inversed - see NGLORA-13683\n return !(event.sourceCapabilities && !event.sourceCapabilities.firesTouchEvents);\n}\n"],"mappings":"yDAcO,QAAS,CAAAA,aAAaA,CAAA,CAAG,CAC5B,MAAQ,cAAc,EAAI,CAAAC,MAAM,EAAKA,MAAM,CAACC,aAAa,EAAIC,QAAQ,WAAY,CAAAD,aACrF,CAAC,OAAAE,CAAA,EAAAJ,aAAA,CAFeA,aAAa,CAAAK,kBAAA,CAiBtB,QAAAA,CAA4BC,CAAK,CAAE,CAEtC,MAAS,CAAAA,CAAK,CAACC,kBAAkB,EAAKD,CAAK,CAACC,kBAAkB,CAACC,gBACnE,CAAC,IAAAC,OAAA,IAAAC,OAAA,SAAAA,CAAA","ignoreList":[]}