/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{shallowRef as e,shallowReadonly as t,getCurrentScope as n,onScopeDispose as o,toValue as i,watch as r}from"vue";function u(e,t){return!!n()&&(o(e,t),!0)}const c="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const a=Object.prototype.toString,f=e=>"[object Object]"===a.call(e);function l(e,t=!1,n="Timeout"){return new Promise((o,i)=>{t?setTimeout(()=>i(n),e):setTimeout(o,e)})}function d(e){return e}function m(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const e=t;t=void 0,e&&await e},n}function s(e){return Array.isArray(e)?e:[e]}function p(n,o,r={}){const{immediate:a=!0,immediateCallback:f=!1}=r,l=e(!1);let d;function m(){d&&(clearTimeout(d),d=void 0)}function s(){l.value=!1,m()}function p(...e){f&&n(),m(),l.value=!0,d=setTimeout(()=>{l.value=!1,d=void 0,n(...e)},i(o))}return a&&(l.value=!0,c&&p()),u(s),{isPending:t(l),start:p,stop:s}}function v(e,t,n){return r(e,t,{...n,immediate:!0})}export{m as createSingletonPromise,d as identity,c as isClient,f as isObject,l as promiseTimeout,s as toArray,u as tryOnScopeDispose,p as useTimeoutFn,v as watchImmediate};