{"version":3,"file":"helpers.js","names":[],"sources":["esm/helpers.js"],"sourcesContent":["import { simpleHash } from \"@tamagui/simple-hash\";\nfunction getStoreUid(Constructor, props) {\n  return simpleHash(\n    `${Constructor}${!props ? \"\" : typeof props === \"string\" ? props : JSON.stringify(props)}`,\n    \"strict\"\n  );\n}\nconst UNWRAP_STORE_INFO = /* @__PURE__ */ Symbol(\"UNWRAP_STORE_INFO\");\nconst cache = /* @__PURE__ */ new Map();\nfunction getStoreDescriptors(storeInstance) {\n  const proto = Object.getPrototypeOf(storeInstance);\n  const instanceDescriptors = Object.getOwnPropertyDescriptors(storeInstance);\n  const protoDescriptors = Object.getOwnPropertyDescriptors(proto);\n  const descriptors = {\n    ...protoDescriptors,\n    ...instanceDescriptors\n  };\n  delete descriptors.constructor;\n  return descriptors;\n}\nfunction get(_, b) {\n  return _;\n}\nfunction simpleStr(arg) {\n  if (process.env.NODE_ENV === \"development\") {\n    return typeof arg === \"function\" ? \"fn\" : typeof arg === \"string\" ? `\"${arg}\"` : !arg ? arg : typeof arg !== \"object\" ? arg : Array.isArray(arg) ? \"[...]\" : `{...}`;\n  }\n  return arg;\n}\nfunction getStoreDebugInfo(store) {\n  return store[UNWRAP_STORE_INFO] ?? cache.get(getStoreUid(store.constructor, store.props));\n}\nexport {\n  UNWRAP_STORE_INFO,\n  cache,\n  get,\n  getStoreDebugInfo,\n  getStoreDescriptors,\n  getStoreUid,\n  simpleStr\n};\n//# sourceMappingURL=helpers.js.map\n"],"mappings":";;;AACA,SAAS,YAAY,aAAa,OAAO;CACvC,OAAO,WACL,GAAG,cAAc,CAAC,QAAQ,KAAK,OAAO,UAAU,WAAW,QAAQ,KAAK,UAAU,KAAK,KACvF,QACF;AACF;AACA,MAAM,oBAAoC,uBAAO,mBAAmB;AACpE,MAAM,wBAAwB,IAAI,IAAI;AACtC,SAAS,oBAAoB,eAAe;CAC1C,MAAM,QAAQ,OAAO,eAAe,aAAa;CACjD,MAAM,sBAAsB,OAAO,0BAA0B,aAAa;CAC1E,MAAM,mBAAmB,OAAO,0BAA0B,KAAK;CAC/D,MAAM,cAAc;EAClB,GAAG;EACH,GAAG;CACL;CACA,OAAO,YAAY;CACnB,OAAO;AACT;AACA,SAAS,IAAI,GAAG,GAAG;CACjB,OAAO;AACT;AACA,SAAS,UAAU,KAAK;CACtB,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC1C,OAAO,OAAO,QAAQ,aAAa,OAAO,OAAO,QAAQ,WAAW,IAAI,IAAI,KAAK,CAAC,MAAM,MAAM,OAAO,QAAQ,WAAW,MAAM,MAAM,QAAQ,GAAG,IAAI,UAAU;CAC/J;CACA,OAAO;AACT;AACA,SAAS,kBAAkB,OAAO;CAChC,OAAO,MAAM,sBAAsB,MAAM,IAAI,YAAY,MAAM,aAAa,MAAM,KAAK,CAAC;AAC1F"}