{"version":3,"file":"isMobile.mjs","sources":["../../../src/utils/browser/isMobile.ts"],"sourcesContent":["import isMobileJs from 'ismobilejs';\n\n// ismobilejs have different import behavior for CJS and ESM, so here is the hack\ntype isMobileJsType = typeof isMobileJs & { default?: typeof isMobileJs };\nconst isMobileCall = (isMobileJs as isMobileJsType).default ?? isMobileJs;\n\n/**\n * The result of the {@link utils.isMobile} function.\n * @ignore\n * @memberof utils\n */\nexport type isMobileResult = {\n    /**\n     * Whether the device is an Apple device.\n     * @memberof utils.isMobile\n     */\n    apple: {\n        phone: boolean;\n        ipod: boolean;\n        tablet: boolean;\n        universal: boolean;\n        device: boolean;\n    };\n    /**\n     * Whether the device is an Amazon device.\n     * @memberof utils.isMobile\n     */\n    amazon: {\n        phone: boolean;\n        tablet: boolean;\n        device: boolean;\n    };\n    /**\n     * Whether the device is an Android device.\n     * @memberof utils.isMobile\n     */\n    android: {\n        phone: boolean;\n        tablet: boolean;\n        device: boolean;\n    };\n    /**\n     * Whether the device is a Windows device.\n     * @memberof utils.isMobile\n     */\n    windows: {\n        phone: boolean;\n        tablet: boolean;\n        device: boolean;\n    };\n    /**\n     * Whether the device is a specific device.\n     * @memberof utils.isMobile\n     */\n    other: {\n        blackberry: boolean;\n        blackberry10: boolean;\n        opera: boolean;\n        firefox: boolean;\n        chrome: boolean;\n        device: boolean;\n    };\n    /**\n     * Whether the device is a phone device.\n     * @memberof utils.isMobile\n     */\n    phone: boolean;\n    /**\n     * Whether the device is a tablet device.\n     * @memberof utils.isMobile\n     */\n    tablet: boolean;\n    /**\n     * Whether the device is any kind of device.\n     * @memberof utils.isMobile\n     */\n    any: boolean;\n};\n\n/**\n * Detects whether the device is mobile and what type of mobile device it is.\n * ```js\n * import { isMobile } from 'pixi.js';\n *\n * if (isMobile.apple.tablet) {\n *    // The device is an Apple tablet device.\n * }\n * ```\n * @memberof utils\n */\nexport const isMobile: isMobileResult = isMobileCall(globalThis.navigator);\n"],"names":[],"mappings":";;;AAIA,MAAM,YAAA,GAAgB,WAA8B,OAAW,IAAA,UAAA,CAAA;AAsFlD,MAAA,QAAA,GAA2B,YAAa,CAAA,UAAA,CAAW,SAAS;;;;"}