{"version":3,"file":"useSetTimeout.mjs","sources":["../../../../../../../packages/components/captcha/src/hooks/useSetTimeout.ts"],"sourcesContent":["import { onScopeDispose } from 'vue'\n\n/**\n * 获取用于记录 `setTimeout` 返回值的对象，记录的定时器会在作用域消除时自动清理\n */\nexport function useSetTimeout() {\n  const timer: Record<string, any> = {}\n\n  onScopeDispose(() => {\n    Object.keys(timer).forEach((key) => {\n      clearTimeout(timer[key])\n    })\n  })\n\n  return { timer }\n}\n"],"names":[],"mappings":";;AACO,SAAS,aAAa,GAAG;AAChC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,cAAc,CAAC,MAAM;AACvB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AACxC,MAAM,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/B,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACnB;;;;"}