{"version":3,"file":"index.mjs","sources":["../../../../../src/render/utils/reduced-motion/index.ts"],"sourcesContent":["import { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\nconst isBrowser = typeof window !== \"undefined\"\n\nexport function initPrefersReducedMotion() {\n hasReducedMotionListener.current = true\n if (!isBrowser) return\n\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\")\n\n const setReducedMotionPreferences = () =>\n (prefersReducedMotion.current = motionMediaQuery.matches)\n\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences)\n\n setReducedMotionPreferences()\n } else {\n prefersReducedMotion.current = false\n }\n}\n\nexport { prefersReducedMotion, hasReducedMotionListener }\n"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAA;SAE/B,wBAAwB,GAAA;AACpC,IAAA,wBAAwB,CAAC,OAAO,GAAG,IAAI,CAAA;AACvC,IAAA,IAAI,CAAC,SAAS;QAAE,OAAM;AAEtB,IAAA,IAAI,MAAM,CAAC,UAAU,EAAE;QACnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAA;AAEtE,QAAA,MAAM,2BAA2B,GAAG,OAC/B,oBAAoB,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAE7D,QAAA,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAA;AAExE,QAAA,2BAA2B,EAAE,CAAA;KAChC;SAAM;AACH,QAAA,oBAAoB,CAAC,OAAO,GAAG,KAAK,CAAA;KACvC;AACL;;;;"}