use-async-6da85328-1720699367816.js 732 B

1
  1. import{a as r,q as y}from"./index-b48b51d2-1720699367816.js";import{S as s}from"./index-3d012fb0-1720699367816.js";const a=e=>{const t=r(),o=new s(t.path).get(t.path);y(()=>{e(o)})},k=(e,t="current",c)=>{const o=new s(c.path);o.update({[t]:e},void 0,"form"),o.get(c.path)},d=e=>{const t=r();if(!e.current)return;e.key||(e.key="form"),e.saveKey||(e.saveKey=t.path);const c=new s(e.saveKey),o=c.get(e.saveKey),n=e.current,h=o[e.key];for(const i in h)if(Object.prototype.hasOwnProperty.call(n,i)){const u=h[i];n[i]=u}c.update({...n},void 0,e.key),y(()=>{e.callBack&&e.callBack(n)})},l=e=>{if(!e.current||!e.saveKey)return;e.key||(e.key="form"),new s(e.saveKey).update({...e.current},void 0,e.key)};export{k as a,a as g,d as i,l as s};