@madarco/agentbox 0.27.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/_cloud-attach-WDGM6FL5.js +0 -0
  3. package/dist/chunk-26IKZRTT.js +0 -0
  4. package/dist/chunk-G3H2L3O2.js +0 -0
  5. package/dist/chunk-HR7NHH5J.js +0 -0
  6. package/dist/chunk-IDH5A4RR.js +0 -0
  7. package/dist/chunk-JE6UI5YR.js +0 -0
  8. package/dist/chunk-JGZSA5ZI.js +0 -0
  9. package/dist/chunk-KWOEUFVA.js +0 -0
  10. package/dist/chunk-LL7NCMUU.js +0 -0
  11. package/dist/chunk-NEF6MDJO.js +0 -0
  12. package/dist/chunk-SJ75AIA2.js +0 -0
  13. package/dist/chunk-UJEH2NJT.js +0 -0
  14. package/dist/chunk-V5XXJH63.js +0 -0
  15. package/dist/chunk-WJFZJZIM.js +0 -0
  16. package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
  17. package/dist/dist-FTKS2GI4.js +0 -0
  18. package/dist/dist-KQTMCVME.js +0 -0
  19. package/dist/dist-O3LKOIE7.js +0 -0
  20. package/dist/dist-OO52HARR.js +0 -0
  21. package/dist/dist-TSFVB7AI.js +0 -0
  22. package/dist/dist-U2SVLJUQ.js +0 -0
  23. package/dist/dist-WVYAURMF.js +0 -0
  24. package/dist/dist-Z6L5MM5D.js +0 -0
  25. package/dist/index.js +2 -2
  26. package/dist/prepared-state-75DIZ55S-TNJXWMXV.js +0 -0
  27. package/package.json +31 -29
  28. package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
  29. package/runtime/_shared/agentbox-dockerd-start +0 -0
  30. package/runtime/_shared/agentbox-open +0 -0
  31. package/runtime/_shared/agentbox-portless-trust +0 -0
  32. package/runtime/_shared/agentbox-vnc-start +0 -0
  33. package/runtime/_shared/ctl.cjs +0 -0
  34. package/runtime/_shared/gh-shim +0 -0
  35. package/runtime/_shared/git-shim +0 -0
  36. package/runtime/_shared/linear-shim +0 -0
  37. package/runtime/_shared/ntn-shim +0 -0
  38. package/runtime/digitalocean/agentbox-checkpoint-cleanup +0 -0
  39. package/runtime/digitalocean/agentbox-dockerd-start +0 -0
  40. package/runtime/digitalocean/agentbox-open +0 -0
  41. package/runtime/digitalocean/agentbox-portless-trust +0 -0
  42. package/runtime/digitalocean/agentbox-vnc-start +0 -0
  43. package/runtime/digitalocean/ctl.cjs +0 -0
  44. package/runtime/digitalocean/gh-shim +0 -0
  45. package/runtime/digitalocean/git-shim +0 -0
  46. package/runtime/digitalocean/linear-shim +0 -0
  47. package/runtime/digitalocean/ntn-shim +0 -0
  48. package/runtime/digitalocean/scripts/install-box.sh +0 -0
  49. package/runtime/docker/packages/ctl/dist/bin.cjs +0 -0
  50. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
  51. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
  52. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
  53. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
  54. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +0 -0
  55. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
  56. package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
  57. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
  58. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
  59. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
  60. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
  61. package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
  62. package/runtime/e2b/agentbox-dockerd-start +0 -0
  63. package/runtime/e2b/agentbox-open +0 -0
  64. package/runtime/e2b/agentbox-vnc-start +0 -0
  65. package/runtime/e2b/ctl.cjs +0 -0
  66. package/runtime/e2b/gh-shim +0 -0
  67. package/runtime/e2b/git-shim +0 -0
  68. package/runtime/e2b/linear-shim +0 -0
  69. package/runtime/e2b/ntn-shim +0 -0
  70. package/runtime/e2b/scripts/build-template.sh +0 -0
  71. package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
  72. package/runtime/hetzner/agentbox-dockerd-start +0 -0
  73. package/runtime/hetzner/agentbox-open +0 -0
  74. package/runtime/hetzner/agentbox-portless-trust +0 -0
  75. package/runtime/hetzner/agentbox-vnc-start +0 -0
  76. package/runtime/hetzner/ctl.cjs +0 -0
  77. package/runtime/hetzner/gh-shim +0 -0
  78. package/runtime/hetzner/git-shim +0 -0
  79. package/runtime/hetzner/linear-shim +0 -0
  80. package/runtime/hetzner/ntn-shim +0 -0
  81. package/runtime/hetzner/scripts/install-box.sh +0 -0
  82. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  83. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  84. package/runtime/hub/apps/hub/.next/prerender-manifest.json +3 -3
  85. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +1 -1
  86. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
  87. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/server-reference-manifest.json +1 -1
  88. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  89. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/server-reference-manifest.json +12 -12
  90. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  91. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/server-reference-manifest.json +11 -11
  92. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  93. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/server-reference-manifest.json +8 -8
  94. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  95. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  96. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  97. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  98. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  100. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  101. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  102. package/runtime/hub/apps/hub/.next/server/chunks/0zhp_better-auth_dist_adapters_kysely-adapter_index_mjs_1rl4qnh._.js +3 -0
  103. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +5 -5
  104. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-9g0ae._.js +1 -1
  105. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1k8g143._.js → [root-of-the-server]__19pc87s._.js} +2 -2
  106. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +4 -4
  107. package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +1 -1
  108. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_0xy-j7z._.js +1 -1
  109. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_010858m.js +1 -1
  110. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_04zwxnx.js +1 -1
  111. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_06exuc7.js +1 -1
  112. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2ldrt.js +1 -1
  113. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2tzep.js +1 -1
  114. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_116nh32.js +1 -1
  115. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_11dyjcb.js +1 -1
  116. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_1_4knli.js +1 -1
  117. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__08-1wwu._.js +1 -1
  118. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0c9mbcn._.js +1 -1
  119. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0gdfxj4._.js +1 -1
  120. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0kc-hwp._.js +1 -1
  121. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0lu73p6._.js +1 -1
  122. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__10bfmwi._.js +1 -1
  123. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__18qvdzb._.js +1 -1
  124. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1l2urlw._.js +1 -1
  125. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_03s-ah2._.js +1 -1
  126. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0kpdmm-._.js +1 -1
  127. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +1 -1
  128. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r4px38._.js +1 -1
  129. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_18w2zeh._.js +1 -1
  130. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_approvals_page_actions_1mi0bpn.js +1 -1
  131. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +1 -1
  132. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +1 -1
  133. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
  134. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +1 -1
  135. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  136. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  137. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.js +1 -1
  138. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +18 -18
  139. package/runtime/hub/apps/hub/.next/static/chunks/{26rwu1f2gzemi.js → 070w7h5rh5ja6.js} +1 -1
  140. package/runtime/hub/apps/hub/.next/static/chunks/{000a1sa7te1h8.js → 2awpm9w8crker.js} +1 -1
  141. package/runtime/hub/apps/hub/.next/static/chunks/{3-zanu4ioia5i.js → 2gfw8-qyx5xi_.js} +1 -1
  142. package/runtime/hub/apps/hub/.next/static/chunks/{44j61g8lm9nvw.js → 30de2x24ntwkg.js} +1 -1
  143. package/runtime/hub/apps/hub/.next/static/chunks/{3v6kx35_lwjs8.js → 3e5n630psqst8.js} +1 -1
  144. package/runtime/hub/apps/hub/.next/static/chunks/{0xdtiy_m2ygv8.js → 3tqnniym2yvpb.js} +1 -1
  145. package/runtime/relay/bin.cjs +0 -0
  146. package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
  147. package/runtime/vercel/agentbox-dockerd-start +0 -0
  148. package/runtime/vercel/agentbox-open +0 -0
  149. package/runtime/vercel/agentbox-vnc-start +0 -0
  150. package/runtime/vercel/ctl.cjs +0 -0
  151. package/runtime/vercel/gh-shim +0 -0
  152. package/runtime/vercel/git-shim +0 -0
  153. package/runtime/vercel/linear-shim +0 -0
  154. package/runtime/vercel/ntn-shim +0 -0
  155. package/runtime/vercel/scripts/provision.sh +0 -0
  156. package/LICENSE +0 -21
  157. package/runtime/hub/apps/hub/.next/server/chunks/0-fj_better-auth_dist_adapters_kysely-adapter_index_mjs_0btft52._.js +0 -3
  158. /package/runtime/hub/apps/hub/.next/static/{S-yw9-SVffiEHRGm85NzP → PWF2iHQOg9-rRyfqVDLrh}/_buildManifest.js +0 -0
  159. /package/runtime/hub/apps/hub/.next/static/{S-yw9-SVffiEHRGm85NzP → PWF2iHQOg9-rRyfqVDLrh}/_clientMiddlewareManifest.js +0 -0
  160. /package/runtime/hub/apps/hub/.next/static/{S-yw9-SVffiEHRGm85NzP → PWF2iHQOg9-rRyfqVDLrh}/_ssgManifest.js +0 -0
@@ -59,7 +59,7 @@ module.exports=[2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},
59
59
 
60
60
  `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,r)=>s(e,t,r)})(t.shape)),l=r(l,d),c)?r4([],u,l,d,n,e):l:i(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l)}});function r9(e,t,r,n){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let i=e.filter(e=>!e0(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>e6(e,n,eT())))}),t)}let r7=e_("$ZodUnion",(e,t)=>{rA.init(e,t),e$(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),e$(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),e$(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),e$(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>eC(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(0===t.issues.length)return t;o.push(t)}}return a?Promise.all(o).then(t=>r9(t,n,e,i)):r9(o,n,e,i)}});function ne(e,t,r,n){let i=e.filter(e=>0===e.issues.length);return 1===i.length?t.value=i[0].value:0===i.length?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>e6(e,n,eT())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t}(e,t)=>{r7.init(e,t),t.inclusive=!1;let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>ne(t,n,e,i)):ne(o,n,e,i)}},(e,t)=>{t.inclusive=!1,r7.init(e,t);let r=e._zod.parse;e$(e._zod,"propValues",()=>{let e={};for(let r of t.options){let n=r._zod.propValues;if(!n||0===Object.keys(n).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(n))for(let n of(e[t]||(e[t]=new Set),r))e[t].add(n)}return e});let n=eO(()=>{let e=t.options,r=new Map;for(let n of e){let e=n._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,n)}}return r});e._zod.parse=(i,a)=>{let o=i.value;if(!eq(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;let s=n.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||"backward"===a.direction?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}};let nt=e_("$ZodIntersection",(e,t)=>{rA.init(e,t),e._zod.parse=(e,r)=>{let n=e.value,i=t.left._zod.run({value:n,issues:[]},r),a=t.right._zod.run({value:n,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,r])=>nr(e,t,r)):nr(e,i,a)}});function nr(e,t,r){let n,i=new Map;for(let r of t.issues)if("unrecognized_keys"===r.code)for(let e of(n??(n=r),r.keys))i.has(e)||i.set(e,{}),i.get(e).l=!0;else e.issues.push(r);for(let t of r.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);let a=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&n&&e.issues.push({...n,keys:a}),e0(e))return e;let o=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(eV(t)&&eV(r)){let n=Object.keys(r),i=Object.keys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};a[n]=i.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}let nn=e_("$ZodTuple",(e,t)=>{rA.init(e,t);let r=t.items;e._zod.parse=(n,i)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let o=[],s=ni(r,"optin"),c=ni(r,"optout");if(!t.rest){if(a.length<s)return n.issues.push({code:"too_small",minimum:s,inclusive:!0,input:a,inst:e,origin:"array"}),n;a.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let l=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=r.length-1;for(let s of a.slice(r.length)){e++;let r=t.rest._zod.run({value:s,issues:[]},i);r instanceof Promise?o.push(r.then(t=>na(t,n,e))):na(r,n,e)}}return o.length?Promise.all(o).then(()=>no(l,n,r,a,c)):no(l,n,r,a,c)}});function ni(e,t){for(let r=e.length-1;r>=0;r--)if("optional"!==e[r]._zod[t])return r+1;return 0}function na(e,t,r){e.issues.length&&t.issues.push(...e2(r,e.issues)),t.value[r]=e.value}function no(e,t,r,n,i){for(let a=0;a<r.length;a++){let r=e[a],o=a<n.length;if(r.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...e2(a,r.issues))}t.value[a]=r.value}for(let e=t.value.length-1;e>=n.length;e--)if("optional"===r[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let ns=e_("$ZodRecord",(e,t)=>{rA.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!eV(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let a=[],o=t.keyType._zod.values;if(o){let s;r.value={};let c=new Set;for(let s of o)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){c.add("number"==typeof s?s.toString():s);let o=t.keyType._zod.run({value:s,issues:[]},n);if(o instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(o.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:o.issues.map(e=>e6(e,n,eT())),input:s,path:[s],inst:e});continue}let l=o.value,d=t.valueType._zod.run({value:i[s],issues:[]},n);d instanceof Promise?a.push(d.then(e=>{e.issues.length&&r.issues.push(...e2(s,e.issues)),r.value[l]=e.value})):(d.issues.length&&r.issues.push(...e2(s,d.issues)),r.value[l]=d.value)}for(let e in i)c.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:s})}else for(let o of(r.value={},Reflect.ownKeys(i))){if("__proto__"===o||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},n);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof o&&tP.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},n);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?r.value[o]=i[o]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e6(e,n,eT())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},n);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&r.issues.push(...e2(o,e.issues)),r.value[s.value]=e.value})):(c.issues.length&&r.issues.push(...e2(o,c.issues)),r.value[s.value]=c.value)}return a.length?Promise.all(a).then(()=>r):r}});function nc(e,t,r,n,i,a,o){e.issues.length&&(eK.has(typeof n)?r.issues.push(...e2(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:e.issues.map(e=>e6(e,o,eT()))})),t.issues.length&&(eK.has(typeof n)?r.issues.push(...e2(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:t.issues.map(e=>e6(e,o,eT()))})),r.value.set(e.value,t.value)}function nl(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}(e,t)=>{rA.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let a=[];for(let[o,s]of(r.value=new Map,i)){let c=t.keyType._zod.run({value:o,issues:[]},n),l=t.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{nc(t,a,r,o,i,e,n)})):nc(c,l,r,o,i,e,n)}return a.length?Promise.all(a).then(()=>r):r}},(e,t)=>{rA.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];for(let e of(r.value=new Set,i)){let i=t.valueType._zod.run({value:e,issues:[]},n);i instanceof Promise?a.push(i.then(e=>nl(e,r))):nl(i,r)}return a.length?Promise.all(a).then(()=>r):r}};let nd=e_("$ZodEnum",(e,t)=>{rA.init(e,t);let r=eI(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=RegExp(`^(${r.filter(e=>eK.has(typeof e)).map(e=>"string"==typeof e?eF(e):e.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let a=t.value;return n.has(a)||t.issues.push({code:"invalid_value",values:r,input:a,inst:e}),t}}),nu=((e,t)=>{if(rA.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?eF(e):e?eF(e.toString()):String(e)).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}},e_("$ZodTransform",(e,t)=>{rA.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new ex(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(r.value=e,r.fallback=!0,r));if(i instanceof Promise)throw new eS;return r.value=i,r.fallback=!0,r}}));function np(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let nf=e_("$ZodOptional",(e,t)=>{rA.init(e,t),e._zod.optin="optional",e._zod.optout="optional",e$(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),e$(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${eC(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){let n=e.value,i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>np(e,n)):np(i,n)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),nh=e_("$ZodExactOptional",(e,t)=>{nf.init(e,t),e$(e._zod,"values",()=>t.innerType._zod.values),e$(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),nm=e_("$ZodNullable",(e,t)=>{rA.init(e,t),e$(e._zod,"optin",()=>t.innerType._zod.optin),e$(e._zod,"optout",()=>t.innerType._zod.optout),e$(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${eC(e.source)}|null)$`):void 0}),e$(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),ny=e_("$ZodDefault",(e,t)=>{rA.init(e,t),e._zod.optin="optional",e$(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>ng(e,t)):ng(n,t)}});function ng(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let nw=e_("$ZodPrefault",(e,t)=>{rA.init(e,t),e._zod.optin="optional",e$(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),nb=e_("$ZodNonOptional",(e,t)=>{rA.init(e,t),e$(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(t=>nA(t,e)):nA(i,e)}});function nA(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}(e,t)=>{rA.init(e,t),e._zod.parse=(e,r)=>{if("backward"===r.direction)throw new ex("ZodSuccess");let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===n.issues.length,e)}};let nE=e_("$ZodCatch",(e,t)=>{rA.init(e,t),e._zod.optin="optional",e$(e._zod,"optout",()=>t.innerType._zod.optout),e$(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(n=>(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>e6(e,r,eT()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>e6(e,r,eT()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),nv=((e,t)=>{rA.init(e,t),e._zod.parse=(t,r)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)},e_("$ZodPipe",(e,t)=>{rA.init(e,t),e$(e._zod,"values",()=>t.in._zod.values),e$(e._zod,"optin",()=>t.in._zod.optin),e$(e._zod,"optout",()=>t.out._zod.optout),e$(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let n=t.out._zod.run(e,r);return n instanceof Promise?n.then(e=>nk(e,t.in,r)):nk(n,t.in,r)}let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>nk(e,t.out,r)):nk(n,t.out,r)}}));function nk(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function n_(e,t,r){if(e.issues.length)return e.aborted=!0,e;if("forward"===(r.direction||"forward")){let n=t.transform(e.value,e);return n instanceof Promise?n.then(n=>nS(e,n,t.out,r)):nS(e,n,t.out,r)}{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(n=>nS(e,n,t.in,r)):nS(e,n,t.in,r)}}function nS(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}(e,t)=>{rA.init(e,t),e$(e._zod,"values",()=>t.in._zod.values),e$(e._zod,"optin",()=>t.in._zod.optin),e$(e._zod,"optout",()=>t.out._zod.optout),e$(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("forward"===(r.direction||"forward")){let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>n_(e,t,r)):n_(n,t,r)}{let n=t.out._zod.run(e,r);return n instanceof Promise?n.then(e=>n_(e,t,r)):n_(n,t,r)}}},(e,t)=>{nv.init(e,t)};let nx=e_("$ZodReadonly",(e,t)=>{rA.init(e,t),e$(e._zod,"propValues",()=>t.innerType._zod.propValues),e$(e._zod,"values",()=>t.innerType._zod.values),e$(e._zod,"optin",()=>t.innerType?._zod?.optin),e$(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(nR):nR(n)}});function nR(e){return e.value=Object.freeze(e.value),e}(e,t)=>{rA.init(e,t);let r=[];for(let e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let n=+!!t.startsWith("^"),i=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(n,i))}else if(null===e||eW.has(typeof e))r.push(eF(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${r.join("")}$`),e._zod.parse=(r,n)=>("string"!=typeof r.value?r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),r)},(e,t)=>{rA.init(e,t),e$(e._zod,"innerType",()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner)),e$(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),e$(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),e$(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),e$(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)};let nT=e_("$ZodCustom",(e,t)=>{tG.init(e,t),rA.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(t=>nI(t,r,n,e));nI(i,r,n,e)}});function nI(e,t,r,n){if(!e){let e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(e3(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(m=globalThis).__zod_globalRegistry??(m.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let nU=globalThis.__zod_globalRegistry;function nO(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...eZ(t)})}function nP(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...eZ(t)})}function nC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...eZ(t)})}function nD(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...eZ(t)})}function nL(e,t){return new tY({check:"less_than",...eZ(t),value:e,inclusive:!1})}function n$(e,t){return new tY({check:"less_than",...eZ(t),value:e,inclusive:!0})}function nz(e,t){return new tX({check:"greater_than",...eZ(t),value:e,inclusive:!1})}function nN(e,t){return new tX({check:"greater_than",...eZ(t),value:e,inclusive:!0})}function nj(e,t){return new t0({check:"multiple_of",...eZ(t),value:e})}function nH(e,t){return new t8({check:"max_length",...eZ(t),maximum:e})}function nB(e,t){return new t3({check:"min_length",...eZ(t),minimum:e})}function nq(e,t){return new t9({check:"length_equals",...eZ(t),length:e})}function nM(e){return new ro({check:"overwrite",tx:e})}e.i(10107);var nV=e.i(2721),nV=nV;function nK(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??nU,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function nW(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let n={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,n);else{let r=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,r,n)}let a=e._zod.parent;a&&(o.ref||(o.ref=a),nW(a,t,n),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),"input"===t.io&&function e(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,n);if("set"===i.type)return e(i.valueType,n);if("lazy"===i.type)return e(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return e(i.innerType,n);if("intersection"===i.type)return e(i.left,n)||e(i.right,n);if("record"===i.type||"map"===i.type)return e(i.keyType,n)||e(i.valueType,n);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,n)||e(i.out,n);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],n))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,n))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,n))return!0;if(i.rest&&e(i.rest,n))return!0}return!1}(e)&&(delete o.schema.examples,delete o.schema.default),"input"===t.io&&"_prefault"in o.schema&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function nF(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=n.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(r,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let n=t[1],{ref:i,defId:a}=(t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(r)return{ref:i(r)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i("__shared")}#/${n}/${a}`}}if(t[1]===r)return{ref:"#"};let i=`#/${n}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}})(t);n.def={...n.schema},a&&(n.defId=a);let o=n.schema;for(let e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
61
61
 
62
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle||n.count>1&&"ref"===e.reused){i(r);continue}}}function nJ(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let r=e.seen.get(t);if(null===r.ref)return;let i=r.def??r.schema,a={...i},o=r.ref;if(r.ref=null,o){n(o);let r=e.seen.get(o),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in a||delete i[e]);if(s.$ref&&r.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(i[e])===JSON.stringify(r.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())n(t[0]);let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(r)}Object.assign(i,r.def??r.schema);let a=e.metadataRegistry.get(t)?.id;void 0!==a&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?i.$defs=o:i.definitions=o);try{let r=JSON.parse(JSON.stringify(i));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:nZ(t,"input",e.processors),output:nZ(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let nZ=(e,t,r={})=>n=>{let{libraryOptions:i,target:a}=n??{},o=nK({...i??{},target:a,io:t,processors:r});return nW(e,o),nF(o,e),nJ(o,e)},nG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nQ=(e,t,r,n)=>{let i=e._zod.def;nW(i.innerType,t,n),t.seen.get(e).ref=i.innerType},nY=e_("ZodISODateTime",(e,t)=>{rD.init(e,t),ip.init(e,t)}),nX=e_("ZodISODate",(e,t)=>{rL.init(e,t),ip.init(e,t)}),n0=e_("ZodISOTime",(e,t)=>{r$.init(e,t),ip.init(e,t)}),n1=e_("ZodISODuration",(e,t)=>{rz.init(e,t),ip.init(e,t)}),n2=e_("ZodError",(e,t)=>{rl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let r={_errors:[]},n=(e,i=[])=>{for(let a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>n({issues:e},[...i,...a.path]));else if("invalid_key"===a.code)n({issues:a.issues},[...i,...a.path]);else if("invalid_element"===a.code)n({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(0===e.length)r._errors.push(t(a));else{let n=r,i=0;for(;i<e.length;){let r=e[i];i===e.length-1?(n[r]=n[r]||{_errors:[]},n[r]._errors.push(t(a))):n[r]=n[r]||{_errors:[]},n=n[r],i++}}}};return n(e),r})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,eU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,eU,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),n5=ru(n2),n6=rf(n2),n4=rm(n2),n8=rg(n2),n3=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return ru(n2)(e,t,n)},n9=(e,t,r)=>ru(n2)(e,t,r),n7=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rf(n2)(e,t,n)},ie=async(e,t,r)=>rf(n2)(e,t,r),it=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rm(n2)(e,t,n)},ir=(e,t,r)=>rm(n2)(e,t,r),ii=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rg(n2)(e,t,n)},ia=async(e,t,r)=>rg(n2)(e,t,r),io=new WeakMap;function is(e,t,r){let n=Object.getPrototypeOf(e),i=io.get(n);if(i||(i=new Set,io.set(n,i)),!i.has(t))for(let e in i.add(t),r){let t=r[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,get(){let r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let ic=e_("ZodType",(e,t)=>(rA.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nZ(e,"input"),output:nZ(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{let n=nK({...r,processors:t});return nW(e,n),nF(n,e),nJ(n,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>n5(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>n4(e,t,r),e.parseAsync=async(t,r)=>n6(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>n8(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>n3(e,t,r),e.decode=(t,r)=>n9(e,t,r),e.encodeAsync=async(t,r)=>n7(e,t,r),e.decodeAsync=async(t,r)=>ie(e,t,r),e.safeEncode=(t,r)=>it(e,t,r),e.safeDecode=(t,r)=>ir(e,t,r),e.safeEncodeAsync=async(t,r)=>ii(e,t,r),e.safeDecodeAsync=async(t,r)=>ia(e,t,r),is(e,"ZodType",{check(...e){let t=this.def;return this.clone(nV.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eJ(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new aa({type:"custom",check:"custom",fn:e,...eZ(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let n,i;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(e3(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(e3(e)))},e(t.value,t)),(i=new tG({check:"custom",...eZ(t)}))._zod.check=r,n=i}(e,t))},overwrite(e){return this.check(nM(e))},optional(){return i6(this)},exactOptional(){var e;return e=this,new i4({type:"optional",innerType:e})},nullable(){return i3(this)},nullish(){return i6(i3(this))},nonoptional(e){var t,r;return t=this,r=e,new ae({type:"nonoptional",innerType:t,...nV.normalizeParams(r)})},array(){return iF(this)},or(e){return new iG({type:"union",options:[this,e],...nV.normalizeParams(void 0)})},and(e){var t;return t=this,new iQ({type:"intersection",left:t,right:e})},transform(e){return an(this,new i2({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new i9({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():nV.shallowClone(r)}})},prefault(e){var t,r;return t=this,r=e,new i7({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():nV.shallowClone(r)}})},catch(e){var t,r;return t=this,new at({type:"catch",innerType:t,catchValue:"function"==typeof(r=e)?r:()=>r})},pipe(e){return an(this,e)},readonly(){var e;return e=this,new ai({type:"readonly",innerType:e})},describe(e){let t=this.clone();return nU.add(t,{description:e}),t},meta(...e){if(0===e.length)return nU.get(this);let t=this.clone();return nU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>nU.get(e)?.description,configurable:!0}),e)),il=e_("_ZodString",(e,t)=>{rE.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{r.type="string";let{minimum:i,maximum:a,format:o,patterns:s,contentEncoding:c}=e._zod.bag;if("number"==typeof i&&(r.minLength=i),"number"==typeof a&&(r.maxLength=a),o&&(r.format=nG[o]??o,""===r.format&&delete r.format,"time"===o&&delete r.format),c&&(r.contentEncoding=c),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r,0);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,is(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new re({check:"string_format",format:"regex",...eZ(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new rn({check:"string_format",format:"includes",...eZ(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new ri({check:"string_format",format:"starts_with",...eZ(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new ra({check:"string_format",format:"ends_with",...eZ(t),suffix:e})}(...e))},min(...e){return this.check(nB(...e))},max(...e){return this.check(nH(...e))},length(...e){return this.check(nq(...e))},nonempty(...e){return this.check(nB(1,...e))},lowercase(e){return this.check(new rt({check:"string_format",format:"lowercase",...eZ(e)}))},uppercase(e){return this.check(new rr({check:"string_format",format:"uppercase",...eZ(e)}))},trim(){return this.check(nM(e=>e.trim()))},normalize(...e){return this.check(function(e){return nM(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(nM(e=>e.toLowerCase()))},toUpperCase(){return this.check(nM(e=>e.toUpperCase()))},slugify(){return this.check(nM(e=>eH(e)))}})}),id=e_("ZodString",(e,t)=>{rE.init(e,t),il.init(e,t),e.email=t=>e.check(nO(ih,t)),e.url=t=>e.check(new ig({type:"string",format:"url",check:"string_format",abort:!1,...eZ(t)})),e.jwt=t=>e.check(new iP({type:"string",format:"jwt",check:"string_format",abort:!1,...eZ(t)})),e.emoji=t=>e.check(new iw({type:"string",format:"emoji",check:"string_format",abort:!1,...eZ(t)})),e.guid=t=>e.check(nP(im,t)),e.uuid=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,...eZ(t)})),e.uuidv4=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eZ(t)})),e.uuidv6=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eZ(t)})),e.uuidv7=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eZ(t)})),e.nanoid=t=>e.check(new ib({type:"string",format:"nanoid",check:"string_format",abort:!1,...eZ(t)})),e.guid=t=>e.check(nP(im,t)),e.cuid=t=>e.check(new iA({type:"string",format:"cuid",check:"string_format",abort:!1,...eZ(t)})),e.cuid2=t=>e.check(new iE({type:"string",format:"cuid2",check:"string_format",abort:!1,...eZ(t)})),e.ulid=t=>e.check(new iv({type:"string",format:"ulid",check:"string_format",abort:!1,...eZ(t)})),e.base64=t=>e.check(new iI({type:"string",format:"base64",check:"string_format",abort:!1,...eZ(t)})),e.base64url=t=>e.check(new iU({type:"string",format:"base64url",check:"string_format",abort:!1,...eZ(t)})),e.xid=t=>e.check(new ik({type:"string",format:"xid",check:"string_format",abort:!1,...eZ(t)})),e.ksuid=t=>e.check(new i_({type:"string",format:"ksuid",check:"string_format",abort:!1,...eZ(t)})),e.ipv4=t=>e.check(nC(iS,t)),e.ipv6=t=>e.check(nD(ix,t)),e.cidrv4=t=>e.check(new iR({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eZ(t)})),e.cidrv6=t=>e.check(new iT({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eZ(t)})),e.e164=t=>e.check(new iO({type:"string",format:"e164",check:"string_format",abort:!1,...eZ(t)})),e.datetime=t=>e.check(new nY({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eZ(t)})),e.date=t=>e.check(new nX({type:"string",format:"date",check:"string_format",...eZ(t)})),e.time=t=>e.check(new n0({type:"string",format:"time",check:"string_format",precision:null,...eZ(t)})),e.duration=t=>e.check(new n1({type:"string",format:"duration",check:"string_format",...eZ(t)}))});function iu(e){return new id({type:"string",...eZ(e)})}let ip=e_("ZodStringFormat",(e,t)=>{rv.init(e,t),il.init(e,t)}),ih=e_("ZodEmail",(e,t)=>{rS.init(e,t),ip.init(e,t)}),im=e_("ZodGUID",(e,t)=>{rk.init(e,t),ip.init(e,t)}),iy=e_("ZodUUID",(e,t)=>{r_.init(e,t),ip.init(e,t)}),ig=e_("ZodURL",(e,t)=>{rx.init(e,t),ip.init(e,t)}),iw=e_("ZodEmoji",(e,t)=>{rR.init(e,t),ip.init(e,t)}),ib=e_("ZodNanoID",(e,t)=>{rT.init(e,t),ip.init(e,t)}),iA=e_("ZodCUID",(e,t)=>{rI.init(e,t),ip.init(e,t)}),iE=e_("ZodCUID2",(e,t)=>{rU.init(e,t),ip.init(e,t)}),iv=e_("ZodULID",(e,t)=>{rO.init(e,t),ip.init(e,t)}),ik=e_("ZodXID",(e,t)=>{rP.init(e,t),ip.init(e,t)}),i_=e_("ZodKSUID",(e,t)=>{rC.init(e,t),ip.init(e,t)}),iS=e_("ZodIPv4",(e,t)=>{rN.init(e,t),ip.init(e,t)}),ix=e_("ZodIPv6",(e,t)=>{rj.init(e,t),ip.init(e,t)}),iR=e_("ZodCIDRv4",(e,t)=>{rH.init(e,t),ip.init(e,t)}),iT=e_("ZodCIDRv6",(e,t)=>{rB.init(e,t),ip.init(e,t)}),iI=e_("ZodBase64",(e,t)=>{rM.init(e,t),ip.init(e,t)}),iU=e_("ZodBase64URL",(e,t)=>{rV.init(e,t),ip.init(e,t)}),iO=e_("ZodE164",(e,t)=>{rK.init(e,t),ip.init(e,t)}),iP=e_("ZodJWT",(e,t)=>{rW.init(e,t),ip.init(e,t)}),iC=e_("ZodNumber",(e,t)=>{rF.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let{minimum:i,maximum:a,format:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;"string"==typeof o&&o.includes("int")?r.type="integer":r.type="number";let d="number"==typeof l&&l>=(i??-1/0),u="number"==typeof c&&c<=(a??1/0),p="draft-04"===t.target||"openapi-3.0"===t.target;d?p?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof i&&(r.minimum=i),u?p?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:"number"==typeof a&&(r.maximum=a),"number"==typeof s&&(r.multipleOf=s)})(e,t,r,0),is(e,"ZodNumber",{gt(e,t){return this.check(nz(e,t))},gte(e,t){return this.check(nN(e,t))},min(e,t){return this.check(nN(e,t))},lt(e,t){return this.check(nL(e,t))},lte(e,t){return this.check(n$(e,t))},max(e,t){return this.check(n$(e,t))},int(e){return this.check(i$(e))},safe(e){return this.check(i$(e))},positive(e){return this.check(nz(0,e))},nonnegative(e){return this.check(nN(0,e))},negative(e){return this.check(nL(0,e))},nonpositive(e){return this.check(n$(0,e))},multipleOf(e,t){return this.check(nj(e,t))},step(e,t){return this.check(nj(e,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function iD(e){return new iC({type:"number",checks:[],...eZ(e)})}let iL=e_("ZodNumberFormat",(e,t)=>{rJ.init(e,t),iC.init(e,t)});function i$(e){return new iL({type:"number",check:"number_format",abort:!1,format:"safeint",...eZ(e)})}let iz=e_("ZodBoolean",(e,t)=>{rZ.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.type="boolean"}});function iN(e){return new iz({type:"boolean",...eZ(e)})}let ij=e_("ZodBigInt",(e,t)=>{rG.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")})(0,e,0,0),e.gte=(t,r)=>e.check(nN(t,r)),e.min=(t,r)=>e.check(nN(t,r)),e.gt=(t,r)=>e.check(nz(t,r)),e.gte=(t,r)=>e.check(nN(t,r)),e.min=(t,r)=>e.check(nN(t,r)),e.lt=(t,r)=>e.check(nL(t,r)),e.lte=(t,r)=>e.check(n$(t,r)),e.max=(t,r)=>e.check(n$(t,r)),e.positive=t=>e.check(nz(BigInt(0),t)),e.negative=t=>e.check(nL(BigInt(0),t)),e.nonpositive=t=>e.check(n$(BigInt(0),t)),e.nonnegative=t=>e.check(nN(BigInt(0),t)),e.multipleOf=(t,r)=>e.check(nj(t,r));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null}),iH=e_("ZodAny",(e,t)=>{rQ.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{}});function iB(){return new iH({type:"any"})}let iq=e_("ZodUnknown",(e,t)=>{rY.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{}});function iM(){return new iq({type:"unknown"})}let iV=e_("ZodNever",(e,t)=>{rX.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.not={}}}),iK=e_("ZodDate",(e,t)=>{r0.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,e,0,0),e.min=(t,r)=>e.check(nN(t,r)),e.max=(t,r)=>e.check(n$(t,r));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null}),iW=e_("ZodArray",(e,t)=>{r2.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof o&&(r.maxItems=o),r.type="array",r.items=nW(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element,is(e,"ZodArray",{min(e,t){return this.check(nB(e,t))},nonempty(e){return this.check(nB(1,e))},max(e,t){return this.check(nH(e,t))},length(e,t){return this.check(nq(e,t))},unwrap(){return this.element}})});function iF(e,t){return new iW({type:"array",element:e,...eZ(t)})}let iJ=e_("ZodObject",(e,t)=>{r3.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let e in a)r.properties[e]=nW(a[e],t,{...n,path:[...n.path,"properties",e]});let o=new Set([...new Set(Object.keys(a))].filter(e=>{let r=i.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));o.size>0&&(r.required=Array.from(o)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=nW(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,r,n),nV.defineLazy(e,"shape",()=>t.shape),is(e,"ZodObject",{keyof(){return i1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:iM()})},loose(){return this.clone({...this._zod.def,catchall:iM()})},strict(){return this.clone({...this._zod.def,catchall:new iV({type:"never",...eZ(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return nV.extend(this,e)},safeExtend(e){return nV.safeExtend(this,e)},merge(e){return nV.merge(this,e)},pick(e){return nV.pick(this,e)},omit(e){return nV.omit(this,e)},partial(...e){return nV.partial(i5,this,e[0])},required(...e){return nV.required(ae,this,e[0])}})});function iZ(e,t){return new iJ({type:"object",shape:e??{},...nV.normalizeParams(t)})}let iG=e_("ZodUnion",(e,t)=>{r7.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{var i,a,o,s;let c,l,d;return i=e,a=t,o=r,s=n,l=!1===(c=i._zod.def).inclusive,d=c.options.map((e,t)=>nW(e,a,{...s,path:[...s.path,l?"oneOf":"anyOf",t]})),void(l?o.oneOf=d:o.anyOf=d)},e.options=t.options}),iQ=e_("ZodIntersection",(e,t)=>{nt.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,a,o,s;return a=nW((i=e._zod.def).left,t,{...n,path:[...n.path,"allOf",0]}),o=nW(i.right,t,{...n,path:[...n.path,"allOf",1]}),void(r.allOf=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(a)?a.allOf:[a],...s(o)?o.allOf:[o]])}}),iY=e_("ZodRecord",(e,t)=>{ns.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object";let a=i.keyType,o=a._zod.bag,s=o?.patterns;if("loose"===i.mode&&s&&s.size>0){let e=nW(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=nW(i.keyType,t,{...n,path:[...n.path,"propertyNames"]})),r.additionalProperties=nW(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let c=a._zod.values;if(c){let e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}})(e,t,r,n),e.keyType=t.keyType,e.valueType=t.valueType});function iX(e,t,r){return new iY(t&&t._zod?{type:"record",keyType:e,valueType:t,...nV.normalizeParams(r)}:{type:"record",keyType:iu(),valueType:e,...nV.normalizeParams(t)})}let i0=e_("ZodEnum",(e,t)=>{nd.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;(i=eI(e._zod.def.entries)).every(e=>"number"==typeof e)&&(r.type="number"),i.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=i},e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new i0({...t,checks:[],...nV.normalizeParams(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new i0({...t,checks:[],...nV.normalizeParams(n),entries:i})}});function i1(e,t){return new i0({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...nV.normalizeParams(t)})}let i2=e_("ZodTransform",(e,t)=>{nu.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e,0,0),e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new ex(e.constructor.name);r.addIssue=n=>{"string"==typeof n?r.issues.push(nV.issue(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),r.issues.push(nV.issue(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}}),i5=e_("ZodOptional",(e,t)=>{nf.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nQ(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function i6(e){return new i5({type:"optional",innerType:e})}let i4=e_("ZodExactOptional",(e,t)=>{nh.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nQ(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),i8=e_("ZodNullable",(e,t)=>{nm.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,a,o;return a=nW((i=e._zod.def).innerType,t,n),o=t.seen.get(e),void("openapi-3.0"===t.target?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function i3(e){return new i8({type:"nullable",innerType:e})}let i9=e_("ZodDefault",(e,t)=>{ny.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),i7=e_("ZodPrefault",(e,t)=>{nw.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},e.unwrap=()=>e._zod.def.innerType}),ae=e_("ZodNonOptional",(e,t)=>{nb.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),at=e_("ZodCatch",(e,t)=>{nE.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i,a=e._zod.def;nW(a.innerType,t,n),t.seen.get(e).ref=a.innerType;try{i=a.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),ar=e_("ZodPipe",(e,t)=>{nv.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,a,o;return a=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(nW(o="input"===t.io?a?i.out:i.in:i.out,t,n),t.seen.get(e).ref=o)},e.in=t.in,e.out=t.out});function an(e,t){return new ar({type:"pipe",in:e,out:t})}let ai=e_("ZodReadonly",(e,t)=>{nx.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),aa=e_("ZodCustom",(e,t)=>{nT.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e,0,0)}),ao={};function as(e){switch(e.constructor.name){case"ZodString":default:return"string";case"ZodNumber":return"number";case"ZodBoolean":return"boolean";case"ZodObject":return"object";case"ZodArray":return"array"}}function ac(e){let t=[];return e.metadata?.openapi?.parameters?t.push(...e.metadata.openapi.parameters):e.query instanceof iJ&&Object.entries(e.query.shape).forEach(([e,r])=>{r instanceof iJ&&t.push({name:e,in:"query",schema:{type:as(r),..."minLength"in r&&r.minLength?{minLength:r.minLength}:{},description:r.description}})}),t}function al(e){return{400:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}},required:["message"]}}},description:"Bad Request. Usually due to missing parameters, or invalid parameters."},401:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}},required:["message"]}}},description:"Unauthorized. Due to missing or invalid authentication."},403:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Forbidden. You do not have permission to access this resource or to perform this action."},404:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Not Found. The requested resource was not found."},429:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Too Many Requests. You have exceeded the rate limit. Try again later."},500:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Internal Server Error. This is a problem with the server that you cannot fix."},...e}}async function ad(e,t){return Object.entries(e).forEach(([e,t])=>{let r=t.options;if(!(!t.path||r.metadata?.SERVER_ONLY)&&("GET"===r.method&&(ao[t.path]={get:{tags:["Default",...r.metadata?.openapi?.tags||[]],description:r.metadata?.openapi?.description,operationId:r.metadata?.openapi?.operationId,security:[{bearerAuth:[]}],parameters:ac(r),responses:al(r.metadata?.openapi?.responses)}}),"POST"===r.method)){let e=function(e){if(e.metadata?.openapi?.requestBody)return e.metadata.openapi.requestBody;if(e.body&&(e.body instanceof iJ||e.body instanceof i5)){let t=e.body.shape;if(!t)return;let r={},n=[];return Object.entries(t).forEach(([e,t])=>{t instanceof iJ&&(r[e]={type:as(t),description:t.description},t instanceof i5||n.push(e))}),{required:!(e.body instanceof i5)&&!!e.body,content:{"application/json":{schema:{type:"object",properties:r,required:n}}}}}}(r);ao[t.path]={post:{tags:["Default",...r.metadata?.openapi?.tags||[]],description:r.metadata?.openapi?.description,operationId:r.metadata?.openapi?.operationId,security:[{bearerAuth:[]}],parameters:ac(r),...e?{requestBody:e}:{requestBody:{content:{"application/json":{schema:{type:"object",properties:{}}}}}},responses:al(r.metadata?.openapi?.responses)}}}}),{openapi:"3.1.1",info:{title:"Better Auth",description:"API Reference for your Better Auth Instance",version:"1.1.0"},components:{schemas:{}},security:[{apiKeyCookie:[]}],servers:[{url:t?.url}],tags:[{name:"Default",description:"Default endpoints that are included with Better Auth by default. These endpoints are not part of any plugin."}],paths:ao}}let au=((o=function(){}).prototype=Object.create(null),Object.freeze(o.prototype),o);function ap(){return{root:{key:""},static:new au}}function af(e){let[t,...r]=e.split("/");return""===r[r.length-1]?r.slice(0,-1):r}function ah(e,t){let r=new au;for(let[n,i]of t){let t=n<0?e.slice(-(n+1)).join("/"):e[n];if("string"==typeof i)r[i]=t;else{let e=t.match(i);if(e)for(let t in e.groups)r[t]=e.groups[t]}}return r}function am(e,t="",r,n){t=t.toUpperCase(),47!==r.charCodeAt(0)&&(r=`/${r}`);let i=af(r=r.replace(/\\:/g,"%3A")),a=e.root,o=0,s=[],c=[];for(let e=0;e<i.length;e++){let t=i[e];if(t.startsWith("**")){a.wildcard||(a.wildcard={key:"**"}),a=a.wildcard,s.push([-(e+1),t.split(":")[1]||"_",2===t.length]);break}if("*"===t||t.includes(":")){if(a.param||(a.param={key:"*"}),a=a.param,"*"===t)s.push([e,`_${o++}`,!0]);else if(t.includes(":",1)){let r=function(e){let t=e.replace(/:(\w+)/g,(e,t)=>`(?<${t}>[^/]+)`).replace(/\./g,"\\.");return RegExp(`^${t}$`)}(t);c[e]=r,a.hasRegexParam=!0,s.push([e,r,!1])}else s.push([e,t.slice(1),!1]);continue}"\\*"===t?t=i[e]="*":"\\*\\*"===t&&(t=i[e]="**");let r=a.static?.[t];if(r)a=r;else{let e={key:t};a.static||(a.static=new au),a.static[t]=e,a=e}}let l=s.length>0;a.methods||(a.methods=new au),a.methods[t]??=[],a.methods[t].push({data:n||null,paramsRegexp:c,paramsMap:l?s:void 0}),l||(e.static["/"+i.join("/")]=a)}function ay(e){return e instanceof X.APIError||e instanceof Y.APIError||e?.name==="APIError"}let ag=ek(async()=>({})),aw=ek.create({use:[ag,ek(async()=>({}))]}),ab=[ag];function aA(e,t,r){let n="string"==typeof e?e:void 0,i="object"==typeof t?t:e,a="function"==typeof t?t:r,o=async e=>{try{return await Q(e,()=>a(e))}catch(r){var t;throw t=e.responseHeaders,ay(r)&&t&&Object.defineProperty(r,X.kAPIErrorHeaderSymbol,{enumerable:!1,configurable:!0,value:t,writable:!1}),r}};return n?ev(n,{...i,use:[...i?.use||[],...ab]},o):ev({...i,use:[...i?.use||[],...ab]},o)}aA.serverOnly=(e,t)=>aA({...e,metadata:{...e.metadata,SERVER_ONLY:!0}},t);var aE=e.i(89551),av=e.i(12714),ak=e.i(50227),a_=e.i(43651),aS=e.i(80527);async function ax(t,r){let n;if(t.database)n="function"==typeof t.database?t.database(t):await r(t);else{let r=Object.keys((0,a_.getAuthTables)(t)).reduce((e,t)=>(e[t]=[],e),{}),{memoryAdapter:i}=await e.A(16432);n=i(r)(t)}return n.transaction||(aS.logger.warn("Adapter does not correctly implement transaction function, patching it automatically. Please update your adapter implementation."),n.transaction=async e=>e(n)),n}async function aR(t){return ax(t,async t=>{let{createKyselyAdapter:r}=await e.A(92291),{kysely:n,databaseType:i,transaction:a}=await r(t);if(!n)throw new Y.BetterAuthError("Failed to initialize database adapter");let{kyselyAdapter:o}=await e.A(92291);return o(n,{type:i||"sqlite",debugLogs:!!t.database&&"debugLogs"in t.database&&t.database.debugLogs,transaction:a})(t)})}var aT=e.i(13906),aI=e.i(15272),aU=e.i(97495),aO=e.i(29401);let aP={postgres:{string:["character varying","varchar","text","uuid"],number:["int4","integer","bigint","smallint","numeric","real","double precision"],boolean:["bool","boolean"],date:["timestamptz","timestamp","date"],json:["json","jsonb"]},mysql:{string:["varchar","text","uuid"],number:["integer","int","bigint","smallint","decimal","float","double"],boolean:["boolean","tinyint"],date:["timestamp","datetime","date"],json:["json"]},sqlite:{string:["TEXT"],number:["INTEGER","REAL"],boolean:["INTEGER","BOOLEAN"],date:["DATE","INTEGER"],json:["TEXT"]},mssql:{string:["varchar","nvarchar","uniqueidentifier"],number:["int","bigint","smallint","decimal","float","double"],boolean:["bit","smallint"],date:["datetime2","date","datetime"],json:["varchar","nvarchar"]}};async function aC(e){try{let t=await aO.sql`SHOW search_path`.execute(e),r=t.rows[0]?.search_path??t.rows[0]?.searchPath;if(r)return r.split(",").map(e=>e.trim()).map(e=>e.replace(/^["']|["']$/g,"")).filter(e=>!e.startsWith("$")&&!e.startsWith("\\$"))[0]||"public"}catch{}return"public"}async function aD(e){let t=function(e){let t=(0,a_.getAuthTables)(e),r={};for(let e in t){let n=t[e],i=n.fields,a={};if(Object.entries(i).forEach(([e,r])=>{if(a[r.fieldName||e]=r,r.references){let n=t[r.references.model];n&&(a[r.fieldName||e].references={...r.references,model:n.modelName,field:r.references.field})}}),r[n.modelName]){r[n.modelName].fields={...r[n.modelName].fields,...a},n.disableMigrations&&(r[n.modelName].disableMigrations=!0);continue}r[n.modelName]={fields:a,order:n.order||1/0,disableMigrations:n.disableMigrations}}return r}(e),r=(0,aS.createLogger)(e.logger),{kysely:n,databaseType:i}=await (0,aT.createKyselyAdapter)(e);i||(r.warn("Could not determine database type, defaulting to sqlite. Please provide a type in the database options to avoid this."),i="sqlite"),n||(r.error("Only kysely adapter is supported for migrations. You can use `generate` command to generate the schema, if you're using a different adapter."),process.exit(1));let a="public";if("postgres"===i){a=await aC(n),r.debug(`PostgreSQL migration: Using schema '${a}' (from search_path)`);try{let e=await aO.sql`
62
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle||n.count>1&&"ref"===e.reused){i(r);continue}}}function nJ(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let r=e.seen.get(t);if(null===r.ref)return;let i=r.def??r.schema,a={...i},o=r.ref;if(r.ref=null,o){n(o);let r=e.seen.get(o),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in a||delete i[e]);if(s.$ref&&r.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(i[e])===JSON.stringify(r.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())n(t[0]);let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(r)}Object.assign(i,r.def??r.schema);let a=e.metadataRegistry.get(t)?.id;void 0!==a&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?i.$defs=o:i.definitions=o);try{let r=JSON.parse(JSON.stringify(i));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:nZ(t,"input",e.processors),output:nZ(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let nZ=(e,t,r={})=>n=>{let{libraryOptions:i,target:a}=n??{},o=nK({...i??{},target:a,io:t,processors:r});return nW(e,o),nF(o,e),nJ(o,e)},nG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nQ=(e,t,r,n)=>{let i=e._zod.def;nW(i.innerType,t,n),t.seen.get(e).ref=i.innerType},nY=e_("ZodISODateTime",(e,t)=>{rD.init(e,t),ip.init(e,t)}),nX=e_("ZodISODate",(e,t)=>{rL.init(e,t),ip.init(e,t)}),n0=e_("ZodISOTime",(e,t)=>{r$.init(e,t),ip.init(e,t)}),n1=e_("ZodISODuration",(e,t)=>{rz.init(e,t),ip.init(e,t)}),n2=e_("ZodError",(e,t)=>{rl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let r={_errors:[]},n=(e,i=[])=>{for(let a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>n({issues:e},[...i,...a.path]));else if("invalid_key"===a.code)n({issues:a.issues},[...i,...a.path]);else if("invalid_element"===a.code)n({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(0===e.length)r._errors.push(t(a));else{let n=r,i=0;for(;i<e.length;){let r=e[i];i===e.length-1?(n[r]=n[r]||{_errors:[]},n[r]._errors.push(t(a))):n[r]=n[r]||{_errors:[]},n=n[r],i++}}}};return n(e),r})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,eU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,eU,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),n5=ru(n2),n6=rf(n2),n4=rm(n2),n8=rg(n2),n3=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return ru(n2)(e,t,n)},n9=(e,t,r)=>ru(n2)(e,t,r),n7=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rf(n2)(e,t,n)},ie=async(e,t,r)=>rf(n2)(e,t,r),it=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rm(n2)(e,t,n)},ir=(e,t,r)=>rm(n2)(e,t,r),ii=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rg(n2)(e,t,n)},ia=async(e,t,r)=>rg(n2)(e,t,r),io=new WeakMap;function is(e,t,r){let n=Object.getPrototypeOf(e),i=io.get(n);if(i||(i=new Set,io.set(n,i)),!i.has(t))for(let e in i.add(t),r){let t=r[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,get(){let r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let ic=e_("ZodType",(e,t)=>(rA.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nZ(e,"input"),output:nZ(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{let n=nK({...r,processors:t});return nW(e,n),nF(n,e),nJ(n,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>n5(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>n4(e,t,r),e.parseAsync=async(t,r)=>n6(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>n8(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>n3(e,t,r),e.decode=(t,r)=>n9(e,t,r),e.encodeAsync=async(t,r)=>n7(e,t,r),e.decodeAsync=async(t,r)=>ie(e,t,r),e.safeEncode=(t,r)=>it(e,t,r),e.safeDecode=(t,r)=>ir(e,t,r),e.safeEncodeAsync=async(t,r)=>ii(e,t,r),e.safeDecodeAsync=async(t,r)=>ia(e,t,r),is(e,"ZodType",{check(...e){let t=this.def;return this.clone(nV.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eJ(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new aa({type:"custom",check:"custom",fn:e,...eZ(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let n,i;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(e3(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(e3(e)))},e(t.value,t)),(i=new tG({check:"custom",...eZ(t)}))._zod.check=r,n=i}(e,t))},overwrite(e){return this.check(nM(e))},optional(){return i6(this)},exactOptional(){var e;return e=this,new i4({type:"optional",innerType:e})},nullable(){return i3(this)},nullish(){return i6(i3(this))},nonoptional(e){var t,r;return t=this,r=e,new ae({type:"nonoptional",innerType:t,...nV.normalizeParams(r)})},array(){return iF(this)},or(e){return new iG({type:"union",options:[this,e],...nV.normalizeParams(void 0)})},and(e){var t;return t=this,new iQ({type:"intersection",left:t,right:e})},transform(e){return an(this,new i2({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new i9({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():nV.shallowClone(r)}})},prefault(e){var t,r;return t=this,r=e,new i7({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():nV.shallowClone(r)}})},catch(e){var t,r;return t=this,new at({type:"catch",innerType:t,catchValue:"function"==typeof(r=e)?r:()=>r})},pipe(e){return an(this,e)},readonly(){var e;return e=this,new ai({type:"readonly",innerType:e})},describe(e){let t=this.clone();return nU.add(t,{description:e}),t},meta(...e){if(0===e.length)return nU.get(this);let t=this.clone();return nU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>nU.get(e)?.description,configurable:!0}),e)),il=e_("_ZodString",(e,t)=>{rE.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{r.type="string";let{minimum:i,maximum:a,format:o,patterns:s,contentEncoding:c}=e._zod.bag;if("number"==typeof i&&(r.minLength=i),"number"==typeof a&&(r.maxLength=a),o&&(r.format=nG[o]??o,""===r.format&&delete r.format,"time"===o&&delete r.format),c&&(r.contentEncoding=c),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r,0);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,is(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new re({check:"string_format",format:"regex",...eZ(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new rn({check:"string_format",format:"includes",...eZ(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new ri({check:"string_format",format:"starts_with",...eZ(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new ra({check:"string_format",format:"ends_with",...eZ(t),suffix:e})}(...e))},min(...e){return this.check(nB(...e))},max(...e){return this.check(nH(...e))},length(...e){return this.check(nq(...e))},nonempty(...e){return this.check(nB(1,...e))},lowercase(e){return this.check(new rt({check:"string_format",format:"lowercase",...eZ(e)}))},uppercase(e){return this.check(new rr({check:"string_format",format:"uppercase",...eZ(e)}))},trim(){return this.check(nM(e=>e.trim()))},normalize(...e){return this.check(function(e){return nM(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(nM(e=>e.toLowerCase()))},toUpperCase(){return this.check(nM(e=>e.toUpperCase()))},slugify(){return this.check(nM(e=>eH(e)))}})}),id=e_("ZodString",(e,t)=>{rE.init(e,t),il.init(e,t),e.email=t=>e.check(nO(ih,t)),e.url=t=>e.check(new ig({type:"string",format:"url",check:"string_format",abort:!1,...eZ(t)})),e.jwt=t=>e.check(new iP({type:"string",format:"jwt",check:"string_format",abort:!1,...eZ(t)})),e.emoji=t=>e.check(new iw({type:"string",format:"emoji",check:"string_format",abort:!1,...eZ(t)})),e.guid=t=>e.check(nP(im,t)),e.uuid=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,...eZ(t)})),e.uuidv4=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eZ(t)})),e.uuidv6=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eZ(t)})),e.uuidv7=t=>e.check(new iy({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eZ(t)})),e.nanoid=t=>e.check(new ib({type:"string",format:"nanoid",check:"string_format",abort:!1,...eZ(t)})),e.guid=t=>e.check(nP(im,t)),e.cuid=t=>e.check(new iA({type:"string",format:"cuid",check:"string_format",abort:!1,...eZ(t)})),e.cuid2=t=>e.check(new iE({type:"string",format:"cuid2",check:"string_format",abort:!1,...eZ(t)})),e.ulid=t=>e.check(new iv({type:"string",format:"ulid",check:"string_format",abort:!1,...eZ(t)})),e.base64=t=>e.check(new iI({type:"string",format:"base64",check:"string_format",abort:!1,...eZ(t)})),e.base64url=t=>e.check(new iU({type:"string",format:"base64url",check:"string_format",abort:!1,...eZ(t)})),e.xid=t=>e.check(new ik({type:"string",format:"xid",check:"string_format",abort:!1,...eZ(t)})),e.ksuid=t=>e.check(new i_({type:"string",format:"ksuid",check:"string_format",abort:!1,...eZ(t)})),e.ipv4=t=>e.check(nC(iS,t)),e.ipv6=t=>e.check(nD(ix,t)),e.cidrv4=t=>e.check(new iR({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eZ(t)})),e.cidrv6=t=>e.check(new iT({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eZ(t)})),e.e164=t=>e.check(new iO({type:"string",format:"e164",check:"string_format",abort:!1,...eZ(t)})),e.datetime=t=>e.check(new nY({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eZ(t)})),e.date=t=>e.check(new nX({type:"string",format:"date",check:"string_format",...eZ(t)})),e.time=t=>e.check(new n0({type:"string",format:"time",check:"string_format",precision:null,...eZ(t)})),e.duration=t=>e.check(new n1({type:"string",format:"duration",check:"string_format",...eZ(t)}))});function iu(e){return new id({type:"string",...eZ(e)})}let ip=e_("ZodStringFormat",(e,t)=>{rv.init(e,t),il.init(e,t)}),ih=e_("ZodEmail",(e,t)=>{rS.init(e,t),ip.init(e,t)}),im=e_("ZodGUID",(e,t)=>{rk.init(e,t),ip.init(e,t)}),iy=e_("ZodUUID",(e,t)=>{r_.init(e,t),ip.init(e,t)}),ig=e_("ZodURL",(e,t)=>{rx.init(e,t),ip.init(e,t)}),iw=e_("ZodEmoji",(e,t)=>{rR.init(e,t),ip.init(e,t)}),ib=e_("ZodNanoID",(e,t)=>{rT.init(e,t),ip.init(e,t)}),iA=e_("ZodCUID",(e,t)=>{rI.init(e,t),ip.init(e,t)}),iE=e_("ZodCUID2",(e,t)=>{rU.init(e,t),ip.init(e,t)}),iv=e_("ZodULID",(e,t)=>{rO.init(e,t),ip.init(e,t)}),ik=e_("ZodXID",(e,t)=>{rP.init(e,t),ip.init(e,t)}),i_=e_("ZodKSUID",(e,t)=>{rC.init(e,t),ip.init(e,t)}),iS=e_("ZodIPv4",(e,t)=>{rN.init(e,t),ip.init(e,t)}),ix=e_("ZodIPv6",(e,t)=>{rj.init(e,t),ip.init(e,t)}),iR=e_("ZodCIDRv4",(e,t)=>{rH.init(e,t),ip.init(e,t)}),iT=e_("ZodCIDRv6",(e,t)=>{rB.init(e,t),ip.init(e,t)}),iI=e_("ZodBase64",(e,t)=>{rM.init(e,t),ip.init(e,t)}),iU=e_("ZodBase64URL",(e,t)=>{rV.init(e,t),ip.init(e,t)}),iO=e_("ZodE164",(e,t)=>{rK.init(e,t),ip.init(e,t)}),iP=e_("ZodJWT",(e,t)=>{rW.init(e,t),ip.init(e,t)}),iC=e_("ZodNumber",(e,t)=>{rF.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let{minimum:i,maximum:a,format:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;"string"==typeof o&&o.includes("int")?r.type="integer":r.type="number";let d="number"==typeof l&&l>=(i??-1/0),u="number"==typeof c&&c<=(a??1/0),p="draft-04"===t.target||"openapi-3.0"===t.target;d?p?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof i&&(r.minimum=i),u?p?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:"number"==typeof a&&(r.maximum=a),"number"==typeof s&&(r.multipleOf=s)})(e,t,r,0),is(e,"ZodNumber",{gt(e,t){return this.check(nz(e,t))},gte(e,t){return this.check(nN(e,t))},min(e,t){return this.check(nN(e,t))},lt(e,t){return this.check(nL(e,t))},lte(e,t){return this.check(n$(e,t))},max(e,t){return this.check(n$(e,t))},int(e){return this.check(i$(e))},safe(e){return this.check(i$(e))},positive(e){return this.check(nz(0,e))},nonnegative(e){return this.check(nN(0,e))},negative(e){return this.check(nL(0,e))},nonpositive(e){return this.check(n$(0,e))},multipleOf(e,t){return this.check(nj(e,t))},step(e,t){return this.check(nj(e,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function iD(e){return new iC({type:"number",checks:[],...eZ(e)})}let iL=e_("ZodNumberFormat",(e,t)=>{rJ.init(e,t),iC.init(e,t)});function i$(e){return new iL({type:"number",check:"number_format",abort:!1,format:"safeint",...eZ(e)})}let iz=e_("ZodBoolean",(e,t)=>{rZ.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.type="boolean"}});function iN(e){return new iz({type:"boolean",...eZ(e)})}let ij=e_("ZodBigInt",(e,t)=>{rG.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")})(0,e,0,0),e.gte=(t,r)=>e.check(nN(t,r)),e.min=(t,r)=>e.check(nN(t,r)),e.gt=(t,r)=>e.check(nz(t,r)),e.gte=(t,r)=>e.check(nN(t,r)),e.min=(t,r)=>e.check(nN(t,r)),e.lt=(t,r)=>e.check(nL(t,r)),e.lte=(t,r)=>e.check(n$(t,r)),e.max=(t,r)=>e.check(n$(t,r)),e.positive=t=>e.check(nz(BigInt(0),t)),e.negative=t=>e.check(nL(BigInt(0),t)),e.nonpositive=t=>e.check(n$(BigInt(0),t)),e.nonnegative=t=>e.check(nN(BigInt(0),t)),e.multipleOf=(t,r)=>e.check(nj(t,r));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null}),iH=e_("ZodAny",(e,t)=>{rQ.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{}});function iB(){return new iH({type:"any"})}let iq=e_("ZodUnknown",(e,t)=>{rY.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{}});function iM(){return new iq({type:"unknown"})}let iV=e_("ZodNever",(e,t)=>{rX.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.not={}}}),iK=e_("ZodDate",(e,t)=>{r0.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,e,0,0),e.min=(t,r)=>e.check(nN(t,r)),e.max=(t,r)=>e.check(n$(t,r));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null}),iW=e_("ZodArray",(e,t)=>{r2.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof o&&(r.maxItems=o),r.type="array",r.items=nW(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element,is(e,"ZodArray",{min(e,t){return this.check(nB(e,t))},nonempty(e){return this.check(nB(1,e))},max(e,t){return this.check(nH(e,t))},length(e,t){return this.check(nq(e,t))},unwrap(){return this.element}})});function iF(e,t){return new iW({type:"array",element:e,...eZ(t)})}let iJ=e_("ZodObject",(e,t)=>{r3.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let e in a)r.properties[e]=nW(a[e],t,{...n,path:[...n.path,"properties",e]});let o=new Set([...new Set(Object.keys(a))].filter(e=>{let r=i.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));o.size>0&&(r.required=Array.from(o)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=nW(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,r,n),nV.defineLazy(e,"shape",()=>t.shape),is(e,"ZodObject",{keyof(){return i1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:iM()})},loose(){return this.clone({...this._zod.def,catchall:iM()})},strict(){return this.clone({...this._zod.def,catchall:new iV({type:"never",...eZ(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return nV.extend(this,e)},safeExtend(e){return nV.safeExtend(this,e)},merge(e){return nV.merge(this,e)},pick(e){return nV.pick(this,e)},omit(e){return nV.omit(this,e)},partial(...e){return nV.partial(i5,this,e[0])},required(...e){return nV.required(ae,this,e[0])}})});function iZ(e,t){return new iJ({type:"object",shape:e??{},...nV.normalizeParams(t)})}let iG=e_("ZodUnion",(e,t)=>{r7.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{var i,a,o,s;let c,l,d;return i=e,a=t,o=r,s=n,l=!1===(c=i._zod.def).inclusive,d=c.options.map((e,t)=>nW(e,a,{...s,path:[...s.path,l?"oneOf":"anyOf",t]})),void(l?o.oneOf=d:o.anyOf=d)},e.options=t.options}),iQ=e_("ZodIntersection",(e,t)=>{nt.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,a,o,s;return a=nW((i=e._zod.def).left,t,{...n,path:[...n.path,"allOf",0]}),o=nW(i.right,t,{...n,path:[...n.path,"allOf",1]}),void(r.allOf=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(a)?a.allOf:[a],...s(o)?o.allOf:[o]])}}),iY=e_("ZodRecord",(e,t)=>{ns.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object";let a=i.keyType,o=a._zod.bag,s=o?.patterns;if("loose"===i.mode&&s&&s.size>0){let e=nW(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=nW(i.keyType,t,{...n,path:[...n.path,"propertyNames"]})),r.additionalProperties=nW(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let c=a._zod.values;if(c){let e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}})(e,t,r,n),e.keyType=t.keyType,e.valueType=t.valueType});function iX(e,t,r){return new iY(t&&t._zod?{type:"record",keyType:e,valueType:t,...nV.normalizeParams(r)}:{type:"record",keyType:iu(),valueType:e,...nV.normalizeParams(t)})}let i0=e_("ZodEnum",(e,t)=>{nd.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;(i=eI(e._zod.def.entries)).every(e=>"number"==typeof e)&&(r.type="number"),i.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=i},e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new i0({...t,checks:[],...nV.normalizeParams(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new i0({...t,checks:[],...nV.normalizeParams(n),entries:i})}});function i1(e,t){return new i0({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...nV.normalizeParams(t)})}let i2=e_("ZodTransform",(e,t)=>{nu.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e,0,0),e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new ex(e.constructor.name);r.addIssue=n=>{"string"==typeof n?r.issues.push(nV.issue(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),r.issues.push(nV.issue(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}}),i5=e_("ZodOptional",(e,t)=>{nf.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nQ(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function i6(e){return new i5({type:"optional",innerType:e})}let i4=e_("ZodExactOptional",(e,t)=>{nh.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nQ(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),i8=e_("ZodNullable",(e,t)=>{nm.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,a,o;return a=nW((i=e._zod.def).innerType,t,n),o=t.seen.get(e),void("openapi-3.0"===t.target?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function i3(e){return new i8({type:"nullable",innerType:e})}let i9=e_("ZodDefault",(e,t)=>{ny.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),i7=e_("ZodPrefault",(e,t)=>{nw.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},e.unwrap=()=>e._zod.def.innerType}),ae=e_("ZodNonOptional",(e,t)=>{nb.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),at=e_("ZodCatch",(e,t)=>{nE.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i,a=e._zod.def;nW(a.innerType,t,n),t.seen.get(e).ref=a.innerType;try{i=a.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),ar=e_("ZodPipe",(e,t)=>{nv.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,a,o;return a=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(nW(o="input"===t.io?a?i.out:i.in:i.out,t,n),t.seen.get(e).ref=o)},e.in=t.in,e.out=t.out});function an(e,t){return new ar({type:"pipe",in:e,out:t})}let ai=e_("ZodReadonly",(e,t)=>{nx.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;nW((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),aa=e_("ZodCustom",(e,t)=>{nT.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r,n)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e,0,0)}),ao={};function as(e){switch(e.constructor.name){case"ZodString":default:return"string";case"ZodNumber":return"number";case"ZodBoolean":return"boolean";case"ZodObject":return"object";case"ZodArray":return"array"}}function ac(e){let t=[];return e.metadata?.openapi?.parameters?t.push(...e.metadata.openapi.parameters):e.query instanceof iJ&&Object.entries(e.query.shape).forEach(([e,r])=>{r instanceof iJ&&t.push({name:e,in:"query",schema:{type:as(r),..."minLength"in r&&r.minLength?{minLength:r.minLength}:{},description:r.description}})}),t}function al(e){return{400:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}},required:["message"]}}},description:"Bad Request. Usually due to missing parameters, or invalid parameters."},401:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}},required:["message"]}}},description:"Unauthorized. Due to missing or invalid authentication."},403:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Forbidden. You do not have permission to access this resource or to perform this action."},404:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Not Found. The requested resource was not found."},429:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Too Many Requests. You have exceeded the rate limit. Try again later."},500:{content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}},description:"Internal Server Error. This is a problem with the server that you cannot fix."},...e}}async function ad(e,t){return Object.entries(e).forEach(([e,t])=>{let r=t.options;if(!(!t.path||r.metadata?.SERVER_ONLY)&&("GET"===r.method&&(ao[t.path]={get:{tags:["Default",...r.metadata?.openapi?.tags||[]],description:r.metadata?.openapi?.description,operationId:r.metadata?.openapi?.operationId,security:[{bearerAuth:[]}],parameters:ac(r),responses:al(r.metadata?.openapi?.responses)}}),"POST"===r.method)){let e=function(e){if(e.metadata?.openapi?.requestBody)return e.metadata.openapi.requestBody;if(e.body&&(e.body instanceof iJ||e.body instanceof i5)){let t=e.body.shape;if(!t)return;let r={},n=[];return Object.entries(t).forEach(([e,t])=>{t instanceof iJ&&(r[e]={type:as(t),description:t.description},t instanceof i5||n.push(e))}),{required:!(e.body instanceof i5)&&!!e.body,content:{"application/json":{schema:{type:"object",properties:r,required:n}}}}}}(r);ao[t.path]={post:{tags:["Default",...r.metadata?.openapi?.tags||[]],description:r.metadata?.openapi?.description,operationId:r.metadata?.openapi?.operationId,security:[{bearerAuth:[]}],parameters:ac(r),...e?{requestBody:e}:{requestBody:{content:{"application/json":{schema:{type:"object",properties:{}}}}}},responses:al(r.metadata?.openapi?.responses)}}}}),{openapi:"3.1.1",info:{title:"Better Auth",description:"API Reference for your Better Auth Instance",version:"1.1.0"},components:{schemas:{}},security:[{apiKeyCookie:[]}],servers:[{url:t?.url}],tags:[{name:"Default",description:"Default endpoints that are included with Better Auth by default. These endpoints are not part of any plugin."}],paths:ao}}let au=((o=function(){}).prototype=Object.create(null),Object.freeze(o.prototype),o);function ap(){return{root:{key:""},static:new au}}function af(e){let[t,...r]=e.split("/");return""===r[r.length-1]?r.slice(0,-1):r}function ah(e,t){let r=new au;for(let[n,i]of t){let t=n<0?e.slice(-(n+1)).join("/"):e[n];if("string"==typeof i)r[i]=t;else{let e=t.match(i);if(e)for(let t in e.groups)r[t]=e.groups[t]}}return r}function am(e,t="",r,n){t=t.toUpperCase(),47!==r.charCodeAt(0)&&(r=`/${r}`);let i=af(r=r.replace(/\\:/g,"%3A")),a=e.root,o=0,s=[],c=[];for(let e=0;e<i.length;e++){let t=i[e];if(t.startsWith("**")){a.wildcard||(a.wildcard={key:"**"}),a=a.wildcard,s.push([-(e+1),t.split(":")[1]||"_",2===t.length]);break}if("*"===t||t.includes(":")){if(a.param||(a.param={key:"*"}),a=a.param,"*"===t)s.push([e,`_${o++}`,!0]);else if(t.includes(":",1)){let r=function(e){let t=e.replace(/:(\w+)/g,(e,t)=>`(?<${t}>[^/]+)`).replace(/\./g,"\\.");return RegExp(`^${t}$`)}(t);c[e]=r,a.hasRegexParam=!0,s.push([e,r,!1])}else s.push([e,t.slice(1),!1]);continue}"\\*"===t?t=i[e]="*":"\\*\\*"===t&&(t=i[e]="**");let r=a.static?.[t];if(r)a=r;else{let e={key:t};a.static||(a.static=new au),a.static[t]=e,a=e}}let l=s.length>0;a.methods||(a.methods=new au),a.methods[t]??=[],a.methods[t].push({data:n||null,paramsRegexp:c,paramsMap:l?s:void 0}),l||(e.static["/"+i.join("/")]=a)}function ay(e){return e instanceof X.APIError||e instanceof Y.APIError||e?.name==="APIError"}let ag=ek(async()=>({})),aw=ek.create({use:[ag,ek(async()=>({}))]}),ab=[ag];function aA(e,t,r){let n="string"==typeof e?e:void 0,i="object"==typeof t?t:e,a="function"==typeof t?t:r,o=async e=>{try{return await Q(e,()=>a(e))}catch(r){var t;throw t=e.responseHeaders,ay(r)&&t&&Object.defineProperty(r,X.kAPIErrorHeaderSymbol,{enumerable:!1,configurable:!0,value:t,writable:!1}),r}};return n?ev(n,{...i,use:[...i?.use||[],...ab]},o):ev({...i,use:[...i?.use||[],...ab]},o)}aA.serverOnly=(e,t)=>aA({...e,metadata:{...e.metadata,SERVER_ONLY:!0}},t);var aE=e.i(89551),av=e.i(12714),ak=e.i(50227),a_=e.i(43651),aS=e.i(80527);async function ax(t,r){let n;if(t.database)n="function"==typeof t.database?t.database(t):await r(t);else{let r=Object.keys((0,a_.getAuthTables)(t)).reduce((e,t)=>(e[t]=[],e),{}),{memoryAdapter:i}=await e.A(16432);n=i(r)(t)}return n.transaction||(aS.logger.warn("Adapter does not correctly implement transaction function, patching it automatically. Please update your adapter implementation."),n.transaction=async e=>e(n)),n}async function aR(t){return ax(t,async t=>{let{createKyselyAdapter:r}=await e.A(19783),{kysely:n,databaseType:i,transaction:a}=await r(t);if(!n)throw new Y.BetterAuthError("Failed to initialize database adapter");let{kyselyAdapter:o}=await e.A(19783);return o(n,{type:i||"sqlite",debugLogs:!!t.database&&"debugLogs"in t.database&&t.database.debugLogs,transaction:a})(t)})}var aT=e.i(13906),aI=e.i(15272),aU=e.i(97495),aO=e.i(29401);let aP={postgres:{string:["character varying","varchar","text","uuid"],number:["int4","integer","bigint","smallint","numeric","real","double precision"],boolean:["bool","boolean"],date:["timestamptz","timestamp","date"],json:["json","jsonb"]},mysql:{string:["varchar","text","uuid"],number:["integer","int","bigint","smallint","decimal","float","double"],boolean:["boolean","tinyint"],date:["timestamp","datetime","date"],json:["json"]},sqlite:{string:["TEXT"],number:["INTEGER","REAL"],boolean:["INTEGER","BOOLEAN"],date:["DATE","INTEGER"],json:["TEXT"]},mssql:{string:["varchar","nvarchar","uniqueidentifier"],number:["int","bigint","smallint","decimal","float","double"],boolean:["bit","smallint"],date:["datetime2","date","datetime"],json:["varchar","nvarchar"]}};async function aC(e){try{let t=await aO.sql`SHOW search_path`.execute(e),r=t.rows[0]?.search_path??t.rows[0]?.searchPath;if(r)return r.split(",").map(e=>e.trim()).map(e=>e.replace(/^["']|["']$/g,"")).filter(e=>!e.startsWith("$")&&!e.startsWith("\\$"))[0]||"public"}catch{}return"public"}async function aD(e){let t=function(e){let t=(0,a_.getAuthTables)(e),r={};for(let e in t){let n=t[e],i=n.fields,a={};if(Object.entries(i).forEach(([e,r])=>{if(a[r.fieldName||e]=r,r.references){let n=t[r.references.model];n&&(a[r.fieldName||e].references={...r.references,model:n.modelName,field:r.references.field})}}),r[n.modelName]){r[n.modelName].fields={...r[n.modelName].fields,...a},n.disableMigrations&&(r[n.modelName].disableMigrations=!0);continue}r[n.modelName]={fields:a,order:n.order||1/0,disableMigrations:n.disableMigrations}}return r}(e),r=(0,aS.createLogger)(e.logger),{kysely:n,databaseType:i}=await (0,aT.createKyselyAdapter)(e);i||(r.warn("Could not determine database type, defaulting to sqlite. Please provide a type in the database options to avoid this."),i="sqlite"),n||(r.error("Only kysely adapter is supported for migrations. You can use `generate` command to generate the schema, if you're using a different adapter."),process.exit(1));let a="public";if("postgres"===i){a=await aC(n),r.debug(`PostgreSQL migration: Using schema '${a}' (from search_path)`);try{let e=await aO.sql`
63
63
  SELECT schema_name
64
64
  FROM information_schema.schemata
65
65
  WHERE schema_name = ${a}
@@ -1,3 +1,3 @@
1
- module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o={},p={RequestCookies:()=>f,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>u};for(var l in p)s(o,l,{get:p[l],enumerable:!0});function u(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...s]=d(e),{domain:n,expires:i,httponly:a,maxage:o,path:p,samesite:l,secure:u,partitioned:c,priority:f}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,x,_={name:t,value:decodeURIComponent(r),domain:n,...i&&{expires:new Date(i)},...a&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:p,...l&&{sameSite:h.includes(g=(g=l).toLowerCase())?g:void 0},...u&&{secure:!0},...f&&{priority:m.includes(x=(x=f).toLowerCase())?x:void 0},...c&&{partitioned:!0}};let e={};for(let t in _)_[t]&&(e[t]=_[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of i(t))a.call(e,o)||void 0===o||s(e,o,{get:()=>t[o],enumerable:!(r=n(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>u(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>u(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,i,a=[],o=0;function p(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,i=!1;p();)if(","===(r=e.charAt(o))){for(s=o,o+=1,p(),n=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(i=!0,o=n,a.push(e.substring(t,s)),t=o):o=s+1}else o+=1;(!i||o>=e.length)&&a.push(e.substring(t,e.length))}return a}(n)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=u(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(u).join("; ")}}},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},5086,e=>{"use strict";e.s(["DialectAdapterBase",0,class{get supportsCreateIfNotExists(){return!0}get supportsMultipleConnections(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}])},2350,e=>{"use strict";var t=e.i(44700);let r=/"/g,s=/[\\'"]/g;class n extends t.DefaultQueryCompiler{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}sanitizeJSONPathMemberValue(e){return e.replace(s,e=>"\\"===e?"\\\\":"'"===e?"''":'\\"')}visitDefaultInsertValue(e){this.append("null")}}e.s(["SqliteQueryCompiler",0,n])},39844,e=>{"use strict";var t=e.i(5086);class r extends t.DialectAdapterBase{get supportsMultipleConnections(){return!1}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}e.s(["SqliteAdapter",0,r])},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},19741,e=>{e.v(t=>Promise.all(["server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js","server/chunks/09xn_next_0tn6frk._.js"].map(t=>e.l(t))).then(()=>t(41422)))},16432,e=>{e.v(t=>Promise.all(["server/chunks/09mp_@better-auth_memory-adapter_dist_index_mjs_0ti_30h._.js"].map(t=>e.l(t))).then(()=>t(71100)))},92291,e=>{e.v(t=>Promise.all(["server/chunks/0-fj_better-auth_dist_adapters_kysely-adapter_index_mjs_0btft52._.js"].map(t=>e.l(t))).then(()=>t(83844)))},46358,e=>{e.v(e=>Promise.resolve().then(()=>e(57762)))},16909,e=>{e.v(t=>Promise.all(["server/chunks/01te_@better-auth_kysely-adapter_dist_0z6cvsk._.js"].map(t=>e.l(t))).then(()=>t(94336)))},12008,e=>{e.v(t=>Promise.all(["server/chunks/01te_@better-auth_kysely-adapter_dist_0jw_ngm._.js"].map(t=>e.l(t))).then(()=>t(88543)))},33387,e=>{e.v(t=>Promise.all(["server/chunks/01te_@better-auth_kysely-adapter_dist_210bxd8._.js"].map(t=>e.l(t))).then(()=>t(400)))},6194,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_pg_15jfwkh._.js"].map(t=>e.l(t))).then(()=>t(8844)))}];
1
+ module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o={},p={RequestCookies:()=>f,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>u};for(var l in p)s(o,l,{get:p[l],enumerable:!0});function u(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...s]=d(e),{domain:n,expires:i,httponly:a,maxage:o,path:p,samesite:l,secure:u,partitioned:c,priority:f}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,x,_={name:t,value:decodeURIComponent(r),domain:n,...i&&{expires:new Date(i)},...a&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:p,...l&&{sameSite:h.includes(g=(g=l).toLowerCase())?g:void 0},...u&&{secure:!0},...f&&{priority:m.includes(x=(x=f).toLowerCase())?x:void 0},...c&&{partitioned:!0}};let e={};for(let t in _)_[t]&&(e[t]=_[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of i(t))a.call(e,o)||void 0===o||s(e,o,{get:()=>t[o],enumerable:!(r=n(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>u(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>u(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,i,a=[],o=0;function p(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,i=!1;p();)if(","===(r=e.charAt(o))){for(s=o,o+=1,p(),n=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(i=!0,o=n,a.push(e.substring(t,s)),t=o):o=s+1}else o+=1;(!i||o>=e.length)&&a.push(e.substring(t,e.length))}return a}(n)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=u(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(u).join("; ")}}},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},5086,e=>{"use strict";e.s(["DialectAdapterBase",0,class{get supportsCreateIfNotExists(){return!0}get supportsMultipleConnections(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}])},2350,e=>{"use strict";var t=e.i(44700);let r=/"/g,s=/[\\'"]/g;class n extends t.DefaultQueryCompiler{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}sanitizeJSONPathMemberValue(e){return e.replace(s,e=>"\\"===e?"\\\\":"'"===e?"''":'\\"')}visitDefaultInsertValue(e){this.append("null")}}e.s(["SqliteQueryCompiler",0,n])},39844,e=>{"use strict";var t=e.i(5086);class r extends t.DialectAdapterBase{get supportsMultipleConnections(){return!1}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}e.s(["SqliteAdapter",0,r])},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},19741,e=>{e.v(t=>Promise.all(["server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js","server/chunks/09xn_next_0tn6frk._.js"].map(t=>e.l(t))).then(()=>t(41422)))},16432,e=>{e.v(t=>Promise.all(["server/chunks/09mp_@better-auth_memory-adapter_dist_index_mjs_0ti_30h._.js"].map(t=>e.l(t))).then(()=>t(71100)))},19783,e=>{e.v(t=>Promise.all(["server/chunks/0zhp_better-auth_dist_adapters_kysely-adapter_index_mjs_1rl4qnh._.js"].map(t=>e.l(t))).then(()=>t(49457)))},46358,e=>{e.v(e=>Promise.resolve().then(()=>e(57762)))},16909,e=>{e.v(t=>Promise.all(["server/chunks/01te_@better-auth_kysely-adapter_dist_0z6cvsk._.js"].map(t=>e.l(t))).then(()=>t(94336)))},12008,e=>{e.v(t=>Promise.all(["server/chunks/01te_@better-auth_kysely-adapter_dist_0jw_ngm._.js"].map(t=>e.l(t))).then(()=>t(88543)))},33387,e=>{e.v(t=>Promise.all(["server/chunks/01te_@better-auth_kysely-adapter_dist_210bxd8._.js"].map(t=>e.l(t))).then(()=>t(400)))},6194,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_pg_15jfwkh._.js"].map(t=>e.l(t))).then(()=>t(8844)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1k8g143._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__19pc87s._.js.map