import{d as l,ka as u,ma as v,na as y,r as i}from"./chunk-JSJB5BKT.js";import{e as h}from"./chunk-SZAW6ZBW.js";function A(o=6e4){return function(x,p,t){let s=t.value;return t.value=function(...c){let n=`${p}-${JSON.stringify(c)}`,a=r.get(n);if(a&&a.expireAt>Date.now())return a.value;let e=s.apply(this,c);return e instanceof l?e.pipe(u(f=>{r.set(n,{value:i(f),expireAt:Date.now()+o})})):(r.set(n,{value:e,expireAt:Date.now()+o}),e)},t}}var r,C=h(()=>{v();y();r=new Map});export{A as a,C as b};
