@moonbase.sh/storefront 0.2.35 → 0.2.38

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.
package/dist/moonbase.js CHANGED
@@ -3317,7 +3317,7 @@ var Qt = /* @__PURE__ */ ((e) => (e.Universal = "Universal", e.Windows = "Window
3317
3317
  try {
3318
3318
  return rs.parse(t.data);
3319
3319
  } catch (n) {
3320
- throw console.error("Could not fetch activation request", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be fetched", t.status);
3320
+ throw console.warn("Could not fetch activation request", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be fetched", t.status);
3321
3321
  }
3322
3322
  }
3323
3323
  async isCompleted(e) {
@@ -3329,7 +3329,7 @@ var Qt = /* @__PURE__ */ ((e) => (e.Universal = "Universal", e.Windows = "Window
3329
3329
  try {
3330
3330
  return rs.parse(t.data);
3331
3331
  } catch (n) {
3332
- throw console.error("Could not fulfill license", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be fulfilled", t.status);
3332
+ throw console.warn("Could not fulfill license", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be fulfilled", t.status);
3333
3333
  }
3334
3334
  }
3335
3335
  async fulfillTrial(e) {
@@ -3337,7 +3337,7 @@ var Qt = /* @__PURE__ */ ((e) => (e.Universal = "Universal", e.Windows = "Window
3337
3337
  try {
3338
3338
  return rs.parse(t.data);
3339
3339
  } catch (n) {
3340
- throw console.error("Could not fulfill trial", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be fulfilled", t.status);
3340
+ throw console.warn("Could not fulfill trial", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be fulfilled", t.status);
3341
3341
  }
3342
3342
  }
3343
3343
  async cancel(e) {
@@ -3345,7 +3345,7 @@ var Qt = /* @__PURE__ */ ((e) => (e.Universal = "Universal", e.Windows = "Window
3345
3345
  try {
3346
3346
  return rs.parse(t.data);
3347
3347
  } catch (n) {
3348
- throw console.error("Could not cancel activation request", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be cancelled", t.status);
3348
+ throw console.warn("Could not cancel activation request", { requestId: e, response: t, err: n }), new Ge("Bad response", "Activation request could not be cancelled", t.status);
3349
3349
  }
3350
3350
  }
3351
3351
  }, Bp = v.object({
@@ -3373,7 +3373,7 @@ async function zi(e) {
3373
3373
  const n = await e.json();
3374
3374
  t = Bp.parse(n);
3375
3375
  } catch (n) {
3376
- throw console.error("Could not handle response", n), new Error("An unknown problem occurred");
3376
+ throw console.warn("Could not handle response", { response: e, err: n, content: await e.text() }), new Error("An unknown problem occurred");
3377
3377
  }
3378
3378
  throw new Ge(
3379
3379
  t.title,
@@ -3417,7 +3417,7 @@ var qu = v.object({
3417
3417
  try {
3418
3418
  return Wu.parse(e.data);
3419
3419
  } catch (t) {
3420
- throw console.error("Could not fetch user", { response: e, err: t }), new Ge("Bad response", "Could not fetch user", e.status);
3420
+ throw console.warn("Could not fetch user", { response: e, err: t }), new Ge("Bad response", "Could not fetch user", e.status);
3421
3421
  }
3422
3422
  }
3423
3423
  async signIn(e, t) {
@@ -3437,7 +3437,7 @@ var qu = v.object({
3437
3437
  const r = await n.json(), o = Ki.parse(r);
3438
3438
  return this.tokenStore.setUser(o), o;
3439
3439
  } catch (r) {
3440
- throw console.error("Could not sign in user", { email: e, response: n, err: r }), new Ge("Bad response", "Could not sign in user", n.status);
3440
+ throw console.warn("Could not sign in user", { email: e, response: n, err: r }), new Ge("Bad response", "Could not sign in user", n.status);
3441
3441
  }
3442
3442
  }
3443
3443
  async signUp(e, t, n, r, o, s, i) {
@@ -3453,7 +3453,7 @@ var qu = v.object({
3453
3453
  const l = Ki.parse(a.data);
3454
3454
  return this.tokenStore.setUser(l), l;
3455
3455
  } catch (l) {
3456
- throw console.error("Could not sign up user", { email: t, response: a, err: l }), new Ge("Bad response", "Could not sign up user", a.status);
3456
+ throw console.warn("Could not sign up user", { email: t, response: a, err: l }), new Ge("Bad response", "Could not sign up user", a.status);
3457
3457
  }
3458
3458
  }
3459
3459
  async update(e, t, n, r) {
@@ -3492,7 +3492,7 @@ var qu = v.object({
3492
3492
  try {
3493
3493
  return qp.parse(n.data);
3494
3494
  } catch (r) {
3495
- throw console.error("Could not confirm user account", { email: e, code: t, response: n, err: r }), new Ge("Bad response", "Could not confirm user account", n.status);
3495
+ throw console.warn("Could not confirm user account", { email: e, code: t, response: n, err: r }), new Ge("Bad response", "Could not confirm user account", n.status);
3496
3496
  }
3497
3497
  }
3498
3498
  async confirmEmail(e, t) {
@@ -3615,7 +3615,7 @@ var ao = /* @__PURE__ */ ((e) => (e.Open = "Open", e.PaymentProcessing = "Paymen
3615
3615
  try {
3616
3616
  return xa.parse(o.data);
3617
3617
  } catch (s) {
3618
- throw console.error("Could not fetch order", { orderId: e.id, checkout: t, response: o, err: s }), new Ge("Bad response", "Could not fetch order", o.status);
3618
+ throw console.warn("Could not fetch order", { orderId: e.id, checkout: t, response: o, err: s }), new Ge("Bad response", "Could not fetch order", o.status);
3619
3619
  }
3620
3620
  }
3621
3621
  };
@@ -3641,7 +3641,7 @@ var Yp = class {
3641
3641
  try {
3642
3642
  return Up.parse(n.data);
3643
3643
  } catch (r) {
3644
- throw console.error("Could not fetch storefront", { response: n, err: r }), new Ge("Bad response", "Could not fetch storefront", n.status);
3644
+ throw console.warn("Could not fetch storefront", { response: n, err: r }), new Ge("Bad response", "Could not fetch storefront", n.status);
3645
3645
  }
3646
3646
  }
3647
3647
  }, Xp = class {
@@ -3673,11 +3673,11 @@ var Yp = class {
3673
3673
  try {
3674
3674
  return {
3675
3675
  data: (Number(s.headers.get("Content-Length")) || 0) > 0 ? await s.json() : null,
3676
- headers: s.headers,
3676
+ headers: Object.fromEntries(s.headers.entries()),
3677
3677
  status: s.status
3678
3678
  };
3679
3679
  } catch (i) {
3680
- throw console.error("Could not parse response", {
3680
+ throw console.warn("Could not parse response", {
3681
3681
  status: s.status,
3682
3682
  content: await s.text(),
3683
3683
  contentType: s.headers.get("Content-Type"),
@@ -3781,7 +3781,7 @@ var Qp = tc, Nl = v.object({
3781
3781
  try {
3782
3782
  return Nl.parse(t.data);
3783
3783
  } catch (n) {
3784
- throw console.error("Could not redeem voucher", { response: t, err: n }), new Ge("Bad response", "Could not redeem voucher", t.status);
3784
+ throw console.warn("Could not redeem voucher", { response: t, err: n }), new Ge("Bad response", "Could not redeem voucher", t.status);
3785
3785
  }
3786
3786
  }
3787
3787
  }, nc = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Revoked = "Revoked", e))(nc || {}), rc = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Revoked = "Revoked", e))(rc || {}), ka = /* @__PURE__ */ ((e) => (e.Online = "Online", e.Offline = "Offline", e))(ka || {}), Ca = v.object({
@@ -3807,10 +3807,10 @@ var Qp = tc, Nl = v.object({
3807
3807
  try {
3808
3808
  return {
3809
3809
  license: Ca.parse(n.data),
3810
- url: v.string().parse(n.headers.get("location"))
3810
+ url: v.string().parse(n.headers.location)
3811
3811
  };
3812
3812
  } catch (r) {
3813
- throw console.error("Could not activate product", { deviceToken: e, activationMethod: t, response: n, err: r }), new Ge("Bad response", "Product could not be activated", n.status);
3813
+ throw console.warn("Could not activate product", { deviceToken: e, activationMethod: t, response: n, err: r }), new Ge("Bad response", "Product could not be activated", n.status);
3814
3814
  }
3815
3815
  }
3816
3816
  }, nh = class {
@@ -3822,7 +3822,7 @@ var Qp = tc, Nl = v.object({
3822
3822
  try {
3823
3823
  return po(Ca).parse(t.data);
3824
3824
  } catch (n) {
3825
- throw console.error("Could not fetch licenses", { nextUrl: e, response: t, err: n }), new Ge("Bad response", "Licenses could not be fetched", t.status);
3825
+ throw console.warn("Could not fetch licenses", { nextUrl: e, response: t, err: n }), new Ge("Bad response", "Licenses could not be fetched", t.status);
3826
3826
  }
3827
3827
  }
3828
3828
  async getActivations(e, t) {
@@ -3832,7 +3832,7 @@ var Qp = tc, Nl = v.object({
3832
3832
  try {
3833
3833
  return po(oc).parse(n.data);
3834
3834
  } catch (r) {
3835
- throw console.error("Could not fetch license activations", { nextUrl: t, response: n, err: r }), new Ge("Bad response", "License activations could not be fetched", n.status);
3835
+ throw console.warn("Could not fetch license activations", { nextUrl: t, response: n, err: r }), new Ge("Bad response", "License activations could not be fetched", n.status);
3836
3836
  }
3837
3837
  }
3838
3838
  async revokeActivation(e, t) {
@@ -3847,7 +3847,7 @@ var Qp = tc, Nl = v.object({
3847
3847
  try {
3848
3848
  return Wi.parse(n.data);
3849
3849
  } catch (r) {
3850
- throw console.error("Could not fetch product", { productId: e, version: t, response: n, err: r }), new Ge("Bad response", "Product could not be fetched", n.status);
3850
+ throw console.warn("Could not fetch product", { productId: e, version: t, response: n, err: r }), new Ge("Bad response", "Product could not be fetched", n.status);
3851
3851
  }
3852
3852
  }
3853
3853
  async getOwned(e) {
@@ -3855,7 +3855,7 @@ var Qp = tc, Nl = v.object({
3855
3855
  try {
3856
3856
  return po(Wi).parse(t.data);
3857
3857
  } catch (n) {
3858
- throw console.error("Could not fetch products", { nextUrl: e, response: t, err: n }), new Ge("Bad response", "Products could not be fetched", t.status);
3858
+ throw console.warn("Could not fetch products", { nextUrl: e, response: t, err: n }), new Ge("Bad response", "Products could not be fetched", t.status);
3859
3859
  }
3860
3860
  }
3861
3861
  async getLicenses(e, t) {
@@ -3863,7 +3863,7 @@ var Qp = tc, Nl = v.object({
3863
3863
  try {
3864
3864
  return po(Ca).parse(n.data);
3865
3865
  } catch (r) {
3866
- throw console.error("Could not fetch product licenses", { productId: e, nextUrl: t, response: n, err: r }), new Ge("Bad response", "Product licenses could not be fetched", n.status);
3866
+ throw console.warn("Could not fetch product licenses", { productId: e, nextUrl: t, response: n, err: r }), new Ge("Bad response", "Product licenses could not be fetched", n.status);
3867
3867
  }
3868
3868
  }
3869
3869
  async getActivations(e, t) {
@@ -3871,7 +3871,7 @@ var Qp = tc, Nl = v.object({
3871
3871
  try {
3872
3872
  return po(oc).parse(n.data);
3873
3873
  } catch (r) {
3874
- throw console.error("Could not fetch product activations", { productId: e, nextUrl: t, response: n, err: r }), new Ge("Bad response", "Product activations could not be fetched", n.status);
3874
+ throw console.warn("Could not fetch product activations", { productId: e, nextUrl: t, response: n, err: r }), new Ge("Bad response", "Product activations could not be fetched", n.status);
3875
3875
  }
3876
3876
  }
3877
3877
  async getDownloadUrl(e) {
@@ -1,6 +1,6 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('#moonbase .moonbase\\:toolbar{position:fixed;bottom:32px;border-radius:16px;background-color:#1a1a1a;color:#f9f9f9;display:flex;transition-duration:.1s;transition-property:all;transition-timing-function:ease-out;transform:translateY(8px);opacity:0}#moonbase .moonbase\\:toolbar[data-location=bottom-right]{right:32px}#moonbase .moonbase\\:toolbar[data-location=bottom-left]{left:32px}#moonbase .moonbase\\:toolbar[data-visible=true]{transform:translateY(0);opacity:1;transition-duration:.5s}#moonbase .moonbase\\:toolbar-action{padding:12px 16px;transition:background-color .25s ease-out;cursor:pointer;display:flex;align-items:center}#moonbase .moonbase\\:toolbar-action:nth-child(1){border-top-left-radius:16px;border-bottom-left-radius:16px}#moonbase .moonbase\\:toolbar-action:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}#moonbase .moonbase\\:toolbar-action:hover{background-color:#ffffff1a}#moonbase .moonbase\\:toolbar-action[data-action-width=narrow]{padding:12px}#moonbase .moonbase\\:input label{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:input input{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:calc(var(--moonbase-input-border-radius) * .5);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:.875rem;line-height:1.25rem;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input .moonbase\\:input-hint{margin-top:8px;font-size:14px;line-height:20px}#moonbase .moonbase\\:input .moonbase\\:input-hint[data-type=error]{color:var(--moonbase-input-error-color)}@keyframes moonbase\\:spin-687bcaf0{to{transform:rotate(360deg)}}#moonbase svg[data-v-687bcaf0]{animation:moonbase\\:spin-687bcaf0 1s linear infinite}#moonbase .moonbase\\:submit-button[data-v-1440b0cf]{position:relative;display:flex;justify-content:center;overflow:hidden;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf],#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:hover,#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:focus,#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--moonbase-button-border-radius);border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);padding:var(--moonbase-button-padding);height:unset;width:unset}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-success][data-v-1440b0cf]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-error][data-v-1440b0cf]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf]{margin-left:-12px;margin-right:12px;height:20px;width:0px;opacity:0;transition-property:opacity,width;transition-duration:.2s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf][data-visible][data-v-1440b0cf]{width:20px;opacity:1}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf] svg[data-v-1440b0cf]{height:20px;width:20px}#moonbase .moonbase\\:checkbox{display:flex;align-items:flex-start}#moonbase .moonbase\\:checkbox label{font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-container{display:flex;height:24px;align-items:center}#moonbase .moonbase\\:checkbox input{height:16px;width:16px;border-radius:var(--moonbase-input-border-radius);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:.875rem;line-height:1.25rem;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description{margin-left:12px}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description label{font-size:14px;line-height:24px;font-weight:500;color:hsl(from var(--moonbase-text-color) h s calc(l + 5))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p{font-size:14px;line-height:24px;color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p[data-type=error]{color:var(--moonbase-input-error-color)}#moonbase .moonbase\\:sign-up{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-up>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-up .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-up .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-account{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-account>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-account .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-account .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:reset-password{display:flex;flex-direction:column}#moonbase .moonbase\\:reset-password>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:reset-password .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:reset-password .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-email-change{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-email-change>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:modal-container{display:flex;min-height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px;text-align:center}@media (min-width: 640px){#moonbase .moonbase\\:modal-container{display:block;padding:0}}#moonbase .moonbase\\:modal-center{display:none}@media (min-width: 640px){#moonbase .moonbase\\:modal-center{display:inline-block;height:100svh;vertical-align:middle}}#moonbase .moonbase\\:modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity}#moonbase .moonbase\\:modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-overlay[data-transition~=enter-from],#moonbase .moonbase\\:modal-overlay[data-transition~=leave-to]{opacity:0}#moonbase .moonbase\\:modal-overlay[data-transition~=enter-to],#moonbase .moonbase\\:modal-overlay[data-transition~=leave-from]{opacity:1}#moonbase .moonbase\\:modal-overlay[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:modal-content{position:relative;display:inline-block;margin:80px auto 16px;background-color:var(--moonbase-background-color, white);box-shadow:#64646f33 0 8px 32px;border-radius:calc(var(--moonbase-border-radius, 6px) * 2);vertical-align:bottom;transition-property:all;text-align:left}@media (min-width: 640px){#moonbase .moonbase\\:modal-content{vertical-align:middle}}#moonbase .moonbase\\:modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-content[data-transition~=enter-from]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=enter-from]{transform:scale(.95)}}#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{transform:scale(1)}}#moonbase .moonbase\\:modal-content[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:modal-content[data-transition~=leave-from]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=leave-from]{transform:scale(1)}}#moonbase .moonbase\\:modal-content[data-transition~=leave-to]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=leave-to]{transform:scale(.95)}}#moonbase .moonbase\\:sign-in{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-in>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-in .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-in .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:authentication{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:authentication{width:100vw;max-width:26rem}}#moonbase .moonbase\\:authentication>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:authentication>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:authentication>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:product-cart-item{display:flex;align-items:center}#moonbase .moonbase\\:product-cart-item>:not(:first-child){margin-left:24px}#moonbase .moonbase\\:product-cart-item>img{height:80px;width:80px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-cart-item>.moonbase\\:image-placeholder{height:80px;width:80px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content h3{font-weight:600}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content .moonbase\\:cart-item-discount{color:hsl(from var(--moonbase-success-color, rgb(22 163 74)) h s calc(l - 10))}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total{flex:none;text-align:right;font-weight:500;font-size:16px;line-height:21px}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total>span{display:block;font-size:14px;line-height:20px;opacity:.75}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total>span.moonbase\\:discount{text-decoration:line-through}#moonbase .moonbase\\:bundle-cart-item{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item>:not(:first-child){margin-left:24px}#moonbase .moonbase\\:bundle-cart-item>img{height:80px;width:80px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:image-placeholder{height:80px;width:80px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content h3{font-weight:600}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:cart-item-discount{color:hsl(from var(--moonbase-success-color, rgb(22 163 74)) h s calc(l - 10))}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary{display:flex;align-items:flex-start;flex-direction:column}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary>:not(:first-child){margin-top:2px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button svg{margin-left:4px;margin-top:4px;height:16px;width:16px;transition:transform .2s ease-in-out;transform:rotate(0)}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button svg[data-open]{transform:rotate(180deg)}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total{flex:none;text-align:right;font-weight:500;font-size:16px;line-height:21px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total>span{display:block;font-size:14px;line-height:20px;opacity:.75}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total>span.moonbase\\:discount{text-decoration:line-through}#moonbase .moonbase\\:bundle-cart-item-product-list{overflow:hidden;padding-left:24px;transition-property:height;transition-duration:.3s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:bundle-cart-item-product-list>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:bundle-cart-item-product-list>div{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:bundle-cart-item-product-list>div>:not(:first-child){margin-left:16px}#moonbase .moonbase\\:bundle-cart-item-product-list>div>img{height:64px;width:64px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:bundle-cart-item-product-list>div>.moonbase\\:image-placeholder{height:64px;width:64px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div{display:flex;flex:auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3:not([data-included]){text-decoration:line-through;opacity:.75}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3 svg{margin-right:4px;height:16px;width:16px}#moonbase .moonbase\\:cart-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:cart-modal-container{display:flex;height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-container{display:block;padding:0}}#moonbase .moonbase\\:cart-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter-from],#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave-to]{opacity:0}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter-to],#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave-from]{opacity:1}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:cart-modal-content{position:fixed;top:0;right:0;bottom:0;display:inline-block;background-color:var(--moonbase-background-color, white);box-shadow:#64646f33 0 8px 32px;transition-property:all}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-from]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-from]{transform:translate(48px)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-to]{transform:translate(0)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-from]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-from]{transform:translate(0)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-to]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-to]{transform:translate(48px)}}#moonbase .moonbase\\:button{position:relative;display:flex;justify-content:center;overflow:hidden;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:button[data-variant=secondary]{--moonbase-button-background-color: rgb(107 114 128);--moonbase-button-text-color: white}#moonbase .moonbase\\:button,#moonbase .moonbase\\:button:hover,#moonbase .moonbase\\:button:focus,#moonbase .moonbase\\:button:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--moonbase-button-border-radius);border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);padding:var(--moonbase-button-padding);height:unset;width:unset}#moonbase .moonbase\\:button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:button[data-success]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:button[data-error]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:button div{margin-left:-12px;margin-right:12px;height:20px;width:0px;opacity:0;transition-property:opacity,width;transition-duration:.2s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:button div[data-visible]{width:20px;opacity:1}#moonbase .moonbase\\:button div svg{height:20px;width:20px}#moonbase .moonbase\\:cart{display:inline-block;color:var(--moonbase-text-color, black);padding:32px}@media (min-width: 640px){#moonbase .moonbase\\:cart{width:100vw;max-width:26rem}}#moonbase .moonbase\\:cart>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:cart>.moonbase\\:cart-items{font-size:14px;line-height:20px;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>:not(:first-child){border-top-width:1px;border-color:#00000026}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>li{padding:24px 0}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>li>:not(:first-child){margin-left:16px}#moonbase .moonbase\\:cart>.moonbase\\:cart-empty{padding:32px 0;font-size:1.1rem;line-height:1.3rem;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total{width:100%;margin-top:16px;padding:8px;border-radius:4px;background:#0000001a;display:grid;grid-template-columns:repeat(2,1fr);justify-content:space-between}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>label{font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>span{font-weight:600;text-align:right}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>p{grid-column:-1 / 1;padding-top:8px;text-align:center}#moonbase .moonbase\\:cart>button{--moonbase-button-padding: 12px 32px;margin:32px auto 16px;min-width:164px}#moonbase .moonbase\\:account{padding-bottom:32px}#moonbase .moonbase\\:account>*:not(:last-child){margin-bottom:16px}#moonbase .moonbase\\:account form{margin:auto;max-width:420px}#moonbase .moonbase\\:account form>*:not(:first-child){margin-top:8px}#moonbase .moonbase\\:account form .moonbase\\:error{font-size:14px;line-height:20px;font-weight:600;color:var(--moonbase-error-color)}#moonbase .moonbase\\:account form .moonbase\\:notification{font-size:14px;line-height:20px;font-weight:600}#moonbase .moonbase\\:account>button{margin:32px auto 0}#moonbase .moonbase\\:product-downloads{display:flex;border-radius:var(--moonbase-border-radius);box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button{position:relative;display:inline-flex;align-items:center;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button,#moonbase .moonbase\\:product-downloads button:hover,#moonbase .moonbase\\:product-downloads button:focus,#moonbase .moonbase\\:product-downloads button:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:0;border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);margin:0 -1px;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:inset #fff 0 0 0 2px,inset var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads>button{border-radius:0}#moonbase .moonbase\\:product-downloads>button:first-child{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads>button[data-last]{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group{position:relative;margin:0 -1px;display:block}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group:first-child>button{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group[data-last]>button{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group button>:last-child{margin-left:8px}#moonbase .moonbase\\:product-downloads svg{height:20px;width:20px;color:#fff}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list{position:absolute;display:flex;flex-direction:column;right:0;margin-right:-4px;margin-top:8px;width:128px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list:focus{outline:none}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button{border-radius:0}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:first-child{border-top-right-radius:var(--moonbase-border-radius);border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:last-child{border-bottom-right-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:active{color:var(--moonbase-text-color);background-color:transparent;margin:0;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{background-color:hsl(from var(--moonbase-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{box-shadow:none}#moonbase .moonbase\\:product-activations{position:absolute;right:8px;margin-top:8px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:product-activations>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:product-activations>thead>tr>th:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:8px 12px}#moonbase .moonbase\\:product-activations>thead>tr>th:last-child{text-align:right;padding:8px 16px 8px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:product-activations>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative;font-size:14px;font-weight:600;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:product-activations>tbody>tr>td>button,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:hover,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:focus,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:products{min-width:calc(100% + 128px);margin:0 -64px}#moonbase .moonbase\\:products>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:products>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:products>thead>tr>th:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>thead>tr>th:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:products>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative}#moonbase .moonbase\\:products>tbody>tr>td:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:products>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:products>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:products>tbody>tr>td>button,#moonbase .moonbase\\:products>tbody>tr>td>button:hover,#moonbase .moonbase\\:products>tbody>tr>td>button:focus,#moonbase .moonbase\\:products>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:redeem>form{display:flex;flex-direction:column;max-width:240px;margin:64px auto 32px}#moonbase .moonbase\\:redeem>form>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:redeem>form>button{margin:auto}#moonbase .moonbase\\:redeem>form .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:redeem>form .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher{max-width:320px;margin:16px auto;padding:16px;box-shadow:0 0 0 2px var(--moonbase-button-shadow-color);border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>*:not(:first-child),#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>*:not(:first-child){margin-left:12px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child{flex-shrink:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>img,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>.moonbase\\:image-placeholder,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child{flex:1;min-width:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:first-child{font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:last-child{font-size:14px;line-height:20px;text-overflow:ellipsis}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products{padding-left:32px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:customer{display:inline-block;color:var(--moonbase-text-color);padding:32px 64px 16px}@media (min-width: 640px){#moonbase .moonbase\\:customer{width:100vw;max-width:32rem}}#moonbase .moonbase\\:customer>[role=tablist]{margin:0 -32px 16px;padding:0 32px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(from var(--moonbase-button-background-color) r g b / .25);display:flex}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab]{margin-bottom:-1px;width:33%;padding:8px 4px;text-align:center;font-size:14px;font-weight:500;line-height:20px;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent;color:hsl(from var(--moonbase-text-color) h s calc(l + 15));transition-property:border-bottom-color,color;transition-duration:.25s;transition-timing-function:ease-out}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab]:hover{color:hsl(from var(--moonbase-text-color) h s calc(l + 5));border-bottom-color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab][aria-selected=true]{color:hsl(from var(--moonbase-primary-color) h s calc(l - 15));border-bottom-color:hsl(from var(--moonbase-primary-color) h s calc(l - 10))}#moonbase .moonbase\\:auto-activate .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:auto-activate .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:auto-activate .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:auto-activate .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product{display:flex;align-items:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div{margin-left:8px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content{margin-top:16px;text-align:center;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-trial{margin-top:16px;padding-top:16px;border-top-width:1px;border-color:rgb(from var(--moonbase-text-color) r g b / .2);border-style:solid}#moonbase .moonbase\\:activation{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:activation{width:100vw;max-width:26rem}}#moonbase .moonbase\\:activation>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:download-product .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product{display:flex;align-items:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div{margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2 span{opacity:.75;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content{margin-top:16px;text-align:left;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content>:not(:first-child){margin-top:16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul{border-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul>:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li{position:relative;display:flex;justify-content:space-between;transition:background-color .25s ease-in-out;padding:12px 16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:hover{background-color:#0000001a}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:first-child{border-top-left-radius:6px;border-top-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>:not(:first-child){margin-left:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child{min-width:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-name{font-weight:600;line-height:24px;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description{display:flex;align-items:center;line-height:24px;font-size:14px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description svg{height:16px;width:16px;margin-right:6px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description span{opacity:.5;margin:0 6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child{display:flex;align-items:center;flex-shrink:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child svg{flex:none;height:20px;width:20px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-clicker{position:absolute;top:0;right:0;left:0;padding:-1px 0;bottom:0}#moonbase .moonbase\\:download{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:download{width:100vw;max-width:26rem}}#moonbase .moonbase\\:download>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase,#moonbase *:not(svg,path),#moonbase :before,#moonbase :after{all:revert;box-sizing:border-box;border-width:0;border-style:solid}#moonbase *:not(svg,path){margin:0;padding:0;font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}#moonbase{--moonbase-text-color: rgb(17 24 39);--moonbase-primary-color: rgb(79 70 229);--moonbase-error-color: rgb(167, 33, 33);--moonbase-background-color: white;--moonbase-button-padding: 8px 32px;--moonbase-button-text-color: rgb(255 255 255);--moonbase-button-background-color: var(--moonbase-primary-color);--moonbase-button-shadow-color: rgb(0 0 0 / .05);--moonbase-button-success-color: rgb(22 163 74);--moonbase-button-error-color: rgb(167, 33, 33);--moonbase-button-border-radius: var(--moonbase-border-radius, 6px);--moonbase-input-active-color: var(--moonbase-primary-color, var(--moonbase-primary-color));--moonbase-input-shadow-color: rgb(0 0 0 / .05);--moonbase-input-error-color: rgb(167, 33, 33);--moonbase-input-background-color: transparent;--moonbase-input-text-color:var(--moonbase-text-color);--moonbase-input-border-radius: var(--moonbase-border-radius, 6px);--moonbase-modal-padding: 8px 32px;--moonbase-modal-text-color: var(--moonbase-text-color);--moonbase-modal-background-color: rgb(255 255 255);--moonbase-modal-shadow-color: rgb(0 0 0 / .05);--moonbase-modal-border-radius: var(--moonbase-border-radius, 6px)}#moonbase .moonbase\\:scale-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:scale-enter-from{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:scale-enter-to{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:scale-leave-from{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-to{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:slide-left-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:slide-left-enter-from{opacity:0;transform:translate(1rem)}#moonbase .moonbase\\:slide-left-enter-to{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:slide-left-leave-from{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-to{opacity:0;transform:translate(-1rem)}#moonbase .moonbase\\:sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#moonbase a{color:inherit;text-decoration:inherit}#moonbase input,#moonbase button,#moonbase textarea,#moonbase select{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;background:none;font-size:100%;line-height:1.15;margin:0;padding:0;color:inherit}#moonbase button,#moonbase select{text-transform:none}#moonbase button,#moonbase [role=button]{cursor:pointer}#moonbase button,#moonbase [type=button],#moonbase [type=reset],#moonbase [type=submit]{-webkit-appearance:button}#moonbase h1,#moonbase h2,#moonbase h3,#moonbase h4,#moonbase h5,#moonbase h6{font-size:inherit;font-weight:inherit}#moonbase b,#moonbase strong{font-weight:bolder}#moonbase svg,.moonbase svg *{color:inherit}#moonbase table{text-indent:0;border-color:inherit;border-collapse:collapse}#moonbase img,#moonbase svg,#moonbase video,#moonbase canvas,#moonbase audio,#moonbase iframe,#moonbase embed,#moonbase object{display:block;vertical-align:middle}#moonbase ol,#moonbase ul,#moonbase menu{list-style:none;margin:0;padding:0}#moonbase img,#moonbase video{max-width:100%;height:auto}#moonbase :disabled{cursor:default}#moonbase [hidden]{display:none}#moonbase ::-moz-focus-inner{border-style:none;padding:0}#moonbase :-moz-focusring{outline:none}#moonbase :-moz-ui-invalid{box-shadow:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  (function(Ct,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(Ct=typeof globalThis<"u"?globalThis:Ct||self,be(Ct.Moonbase={}))})(this,function(Ct){"use strict";var Ew=Object.defineProperty;var Ow=(Ct,be,Tn)=>be in Ct?Ew(Ct,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):Ct[be]=Tn;var Tr=(Ct,be,Tn)=>Ow(Ct,typeof be!="symbol"?be+"":be,Tn);var be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Tn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Tn||(Tn={}));const ne=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pn=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},B=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Df=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const Pr=(e,t)=>{let n;switch(e.code){case B.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,be.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:n=`Unrecognized key(s) in object: ${be.joinValues(e.keys,", ")}`;break;case B.invalid_union:n="Invalid input";break;case B.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${be.joinValues(e.options)}`;break;case B.invalid_enum_value:n=`Invalid enum value. Expected ${be.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:n="Invalid function arguments";break;case B.invalid_return_type:n="Invalid function return type";break;case B.invalid_date:n="Invalid date";break;case B.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case B.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case B.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case B.custom:n="Invalid input";break;case B.invalid_intersection_types:n="Intersection results could not be merged";break;case B.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:n="Number must be finite";break;default:n=t.defaultError,be.assertNever(e)}return{message:n}};let vl=Pr;function $f(e){vl=e}function os(){return vl}const ss=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},If=[];function ee(e,t){const n=os(),r=ss({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Pr?void 0:Pr].filter(o=>!!o)});e.common.issues.push(r)}class ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return ct.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),Dr=e=>({status:"dirty",value:e}),gt=e=>({status:"valid",value:e}),_i=e=>e.status==="aborted",wi=e=>e.status==="dirty",Jr=e=>e.status==="valid",Yr=e=>typeof Promise<"u"&&e instanceof Promise;function is(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function gl(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(se||(se={}));var Xr,Qr;class Gt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yl=(e,t)=>{if(Jr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Oe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Pn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Pn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ct,ctx:{common:t.parent.common,data:t.data,parsedType:Pn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Yr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return yl(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Yr(o)?o:Promise.resolve(o));return yl(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:B.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Bt({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yt.create(this,this._def)}nullable(){return An.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ft.create(this,this._def)}promise(){return Vr.create(this,this._def)}or(t){return ro.create([this,t],this._def)}and(t){return oo.create(this,t,this._def)}transform(t){return new Bt({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uo({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ni({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new co({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return fo.create(this,t)}readonly(){return po.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Af=/^c[^\s-]{8,}$/i,Vf=/^[0-9a-z]+$/,Rf=/^[0-9A-HJKMNP-TV-Z]{26}$/,jf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Lf=/^[a-z0-9_-]{21}$/i,Mf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Uf=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ff="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ei;const Bf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Zf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qf=new RegExp(`^${bl}$`);function _l(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Wf(e){return new RegExp(`^${_l(e)}$`)}function wl(e){let t=`${bl}T${_l(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function zf(e,t){return!!((t==="v4"||!t)&&Bf.test(e)||(t==="v6"||!t)&&Hf.test(e))}class Ut extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.string,received:s.parsedType}),ve}const r=new ct;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Ei||(Ei=new RegExp(Ff,"u")),Ei.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")jf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")Lf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"nanoid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Af.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Vf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Rf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:B.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:B.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?wl(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?qf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?Wf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Mf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?zf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Zf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64",code:B.invalid_string,message:s.message}),r.dirty()):be.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:B.invalid_string,...se.errToObj(r)})}_addCheck(t){return new Ut({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...se.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...se.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...se.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...se.errToObj(n)})}nonempty(t){return this.min(1,se.errToObj(t))}trim(){return new Ut({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ut({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ut({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ut.create=e=>{var t;return new Ut({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Kf(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Dn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.number,received:s.parsedType}),ve}let r;const o=new ct;for(const s of this._def.checks)s.kind==="int"?be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Kf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_finite,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Dn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Dn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Dn.create=e=>new Dn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class $n extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.bigint,received:s.parsedType}),ve}let r;const o=new ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new $n({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new $n({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}$n.create=e=>{var t;return new $n({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class eo extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.boolean,received:r.parsedType}),ve}return gt(t.data)}}eo.create=e=>new eo({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class rr extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_date}),ve}const r=new ct;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):be.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}rr.create=e=>new rr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class as extends Oe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.symbol,received:r.parsedType}),ve}return gt(t.data)}}as.create=e=>new as({typeName:pe.ZodSymbol,...Ee(e)});class to extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.undefined,received:r.parsedType}),ve}return gt(t.data)}}to.create=e=>new to({typeName:pe.ZodUndefined,...Ee(e)});class no extends Oe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.null,received:r.parsedType}),ve}return gt(t.data)}}no.create=e=>new no({typeName:pe.ZodNull,...Ee(e)});class $r extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return gt(t.data)}}$r.create=e=>new $r({typeName:pe.ZodAny,...Ee(e)});class or extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return gt(t.data)}}or.create=e=>new or({typeName:pe.ZodUnknown,...Ee(e)});class pn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:ne.never,received:n.parsedType}),ve}}pn.create=e=>new pn({typeName:pe.ZodNever,...Ee(e)});class ls extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.void,received:r.parsedType}),ve}return gt(t.data)}}ls.create=e=>new ls({typeName:pe.ZodVoid,...Ee(e)});class Ft extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return ee(n,{code:B.invalid_type,expected:ne.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?B.too_big:B.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:B.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Gt(n,i,n.path,a)))).then(i=>ct.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Gt(n,i,n.path,a)));return ct.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ft({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ft({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ft({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ft.create=(e,t)=>new Ft({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function Ir(e){if(e instanceof ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Yt.create(Ir(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ft?new Ft({...e._def,type:Ir(e.element)}):e instanceof Yt?Yt.create(Ir(e.unwrap())):e instanceof An?An.create(Ir(e.unwrap())):e instanceof Jt?Jt.create(e.items.map(t=>Ir(t))):e}class ze extends Oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const u=this._getOrReturnCtx(t);return ee(u,{code:B.invalid_type,expected:ne.object,received:u.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof pn&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=s[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Gt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof pn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")a.length>0&&(ee(o,{code:B.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Gt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>ct.mergeObjectSync(r,u)):ct.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return se.errToObj,new ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=se.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ze({...this._def,unknownKeys:"strip"})}passthrough(){return new ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ze({...this._def,catchall:t})}pick(t){const n={};return be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}omit(t){const n={};return be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}deepPartial(){return Ir(this)}partial(t){const n={};return be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ze({...this._def,shape:()=>n})}required(t){const n={};return be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yt;)s=s._def.innerType;n[r]=s}}),new ze({...this._def,shape:()=>n})}keyof(){return El(be.objectKeys(this.shape))}}ze.create=(e,t)=>new ze({shape:()=>e,unknownKeys:"strip",catchall:pn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:pn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:pn.create(),typeName:pe.ZodObject,...Ee(t)});class ro extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Tt(a.ctx.common.issues));return ee(n,{code:B.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Tt(l));return ee(n,{code:B.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}ro.create=(e,t)=>new ro({options:e,typeName:pe.ZodUnion,...Ee(t)});const hn=e=>e instanceof io?hn(e.schema):e instanceof Bt?hn(e.innerType()):e instanceof ao?[e.value]:e instanceof In?e.options:e instanceof lo?be.objectValues(e.enum):e instanceof uo?hn(e._def.innerType):e instanceof to?[void 0]:e instanceof no?[null]:e instanceof Yt?[void 0,...hn(e.unwrap())]:e instanceof An?[null,...hn(e.unwrap())]:e instanceof Ni||e instanceof po?hn(e.unwrap()):e instanceof co?hn(e._def.innerType):[];class us extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return ee(n,{code:B.invalid_type,expected:ne.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=hn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new us({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function Oi(e,t){const n=Pn(e),r=Pn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=be.objectKeys(t),s=be.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Oi(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Oi(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class oo extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(_i(s)||_i(i))return ve;const a=Oi(s.value,i.value);return a.valid?((wi(s)||wi(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:B.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}oo.create=(e,t,n)=>new oo({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Jt extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return ee(r,{code:B.invalid_type,expected:ne.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return ee(r,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Gt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ct.mergeArray(n,i)):ct.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Jt({...this._def,rest:t})}}Jt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jt({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class so extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return ee(r,{code:B.invalid_type,expected:ne.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Gt(r,a,r.path,a)),value:i._parse(new Gt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ct.mergeObjectAsync(n,o):ct.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new so({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new so({keyType:Ut.create(),valueType:t,typeName:pe.ZodRecord,...Ee(n)})}}class cs extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return ee(r,{code:B.invalid_type,expected:ne.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:o._parse(new Gt(r,a,r.path,[u,"key"])),value:s._parse(new Gt(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}cs.create=(e,t,n)=>new cs({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class sr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return ee(r,{code:B.invalid_type,expected:ne.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:B.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const c of l){if(c.status==="aborted")return ve;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new Gt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new sr({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new sr({...this._def,maxSize:{value:t,message:se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}sr.create=(e,t)=>new sr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class Ar extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return ee(n,{code:B.invalid_type,expected:ne.function,received:n.parsedType}),ve;function r(a,l){return ss({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),Pr].filter(u=>!!u),issueData:{code:B.invalid_arguments,argumentsError:l}})}function o(a,l){return ss({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),Pr].filter(u=>!!u),issueData:{code:B.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Vr){const a=this;return gt(async function(...l){const u=new Tt([]),c=await a._def.args.parseAsync(l,s).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw u.addIssue(o(d,m)),u})})}else{const a=this;return gt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Tt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Tt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ar({...this._def,args:Jt.create(t).rest(or.create())})}returns(t){return new Ar({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ar({args:t||Jt.create([]).rest(or.create()),returns:n||or.create(),typeName:pe.ZodFunction,...Ee(r)})}}class io extends Oe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}io.create=(e,t)=>new io({getter:e,typeName:pe.ZodLazy,...Ee(t)});class ao extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:B.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}ao.create=(e,t)=>new ao({value:e,typeName:pe.ZodLiteral,...Ee(t)});function El(e,t){return new In({values:e,typeName:pe.ZodEnum,...Ee(t)})}class In extends Oe{constructor(){super(...arguments),Xr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:be.joinValues(r),received:n.parsedType,code:B.invalid_type}),ve}if(is(this,Xr)||gl(this,Xr,new Set(this._def.values)),!is(this,Xr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:B.invalid_enum_value,options:r}),ve}return gt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return In.create(t,{...this._def,...n})}exclude(t,n=this._def){return In.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Xr=new WeakMap,In.create=El;class lo extends Oe{constructor(){super(...arguments),Qr.set(this,void 0)}_parse(t){const n=be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=be.objectValues(n);return ee(r,{expected:be.joinValues(o),received:r.parsedType,code:B.invalid_type}),ve}if(is(this,Qr)||gl(this,Qr,new Set(be.getValidEnumValues(this._def.values))),!is(this,Qr).has(t.data)){const o=be.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ve}return gt(t.data)}get enum(){return this._def.values}}Qr=new WeakMap,lo.create=(e,t)=>new lo({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class Vr extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return ee(n,{code:B.invalid_type,expected:ne.promise,received:n.parsedType}),ve;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return gt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Vr.create=(e,t)=>new Vr({type:e,typeName:pe.ZodPromise,...Ee(t)});class Bt extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?Dr(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?Dr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Jr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Jr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Bt.create=(e,t,n)=>new Bt({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Bt.createWithPreprocess=(e,t,n)=>new Bt({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Yt extends Oe{_parse(t){return this._getType(t)===ne.undefined?gt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yt.create=(e,t)=>new Yt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class An extends Oe{_parse(t){return this._getType(t)===ne.null?gt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}An.create=(e,t)=>new An({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class uo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uo.create=(e,t)=>new uo({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class co extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Yr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class ds extends Oe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}ds.create=e=>new ds({typeName:pe.ZodNaN,...Ee(e)});const Gf=Symbol("zod_brand");class Ni extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class fo extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),Dr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new fo({in:t,out:n,typeName:pe.ZodPipeline})}}class po extends Oe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Jr(o)&&(o.value=Object.freeze(o.value)),o);return Yr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}po.create=(e,t)=>new po({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});function Ol(e,t={},n){return e?$r.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:l})}}):$r.create()}const Jf={object:ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Yf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Ut.create,Sl=Dn.create,Xf=ds.create,Qf=$n.create,xl=eo.create,ep=rr.create,tp=as.create,np=to.create,rp=no.create,op=$r.create,sp=or.create,ip=pn.create,ap=ls.create,lp=Ft.create,up=ze.create,cp=ze.strictCreate,dp=ro.create,fp=us.create,pp=oo.create,hp=Jt.create,mp=so.create,vp=cs.create,gp=sr.create,yp=Ar.create,bp=io.create,_p=ao.create,wp=In.create,Ep=lo.create,Op=Vr.create,kl=Bt.create,Np=Yt.create,Sp=An.create,xp=Bt.createWithPreprocess,kp=fo.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Pr,setErrorMap:$f,getErrorMap:os,makeIssue:ss,EMPTY_PATH:If,addIssueToContext:ee,ParseStatus:ct,INVALID:ve,DIRTY:Dr,OK:gt,isAborted:_i,isDirty:wi,isValid:Jr,isAsync:Yr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Pn,ZodType:Oe,datetimeRegex:wl,ZodString:Ut,ZodNumber:Dn,ZodBigInt:$n,ZodBoolean:eo,ZodDate:rr,ZodSymbol:as,ZodUndefined:to,ZodNull:no,ZodAny:$r,ZodUnknown:or,ZodNever:pn,ZodVoid:ls,ZodArray:Ft,ZodObject:ze,ZodUnion:ro,ZodDiscriminatedUnion:us,ZodIntersection:oo,ZodTuple:Jt,ZodRecord:so,ZodMap:cs,ZodSet:sr,ZodFunction:Ar,ZodLazy:io,ZodLiteral:ao,ZodEnum:In,ZodNativeEnum:lo,ZodPromise:Vr,ZodEffects:Bt,ZodTransformer:Bt,ZodOptional:Yt,ZodNullable:An,ZodDefault:uo,ZodCatch:co,ZodNaN:ds,BRAND:Gf,ZodBranded:Ni,ZodPipeline:fo,ZodReadonly:po,custom:Ol,Schema:Oe,ZodSchema:Oe,late:Jf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Ut.create({...e,coerce:!0}),number:e=>Dn.create({...e,coerce:!0}),boolean:e=>eo.create({...e,coerce:!0}),bigint:e=>$n.create({...e,coerce:!0}),date:e=>rr.create({...e,coerce:!0})},any:op,array:lp,bigint:Qf,boolean:xl,date:ep,discriminatedUnion:fp,effect:kl,enum:wp,function:yp,instanceof:Yf,intersection:pp,lazy:bp,literal:_p,map:vp,nan:Xf,nativeEnum:Ep,never:ip,null:rp,nullable:Sp,number:Sl,object:up,oboolean:()=>xl().optional(),onumber:()=>Sl().optional(),optional:Np,ostring:()=>Nl().optional(),pipeline:kp,preprocess:xp,promise:Op,record:mp,set:gp,strictObject:cp,string:Nl,symbol:tp,transformer:kl,tuple:hp,undefined:np,union:dp,unknown:sp,void:ap,NEVER:ve,ZodIssueCode:B,quotelessJson:Df,ZodError:Tt}),Cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Si={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Cl<"u"&&Cl,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(E){return E&&DataView.prototype.isPrototypeOf(E)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(E){return E&&c.indexOf(Object.prototype.toString.call(E))>-1};function f(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(E)||E==="")throw new TypeError('Invalid character in header field name: "'+E+'"');return E.toLowerCase()}function m(E){return typeof E!="string"&&(E=String(E)),E}function b(E){var P={next:function(){var Y=E.shift();return{done:Y===void 0,value:Y}}};return l.iterable&&(P[Symbol.iterator]=function(){return P}),P}function O(E){this.map={},E instanceof O?E.forEach(function(P,Y){this.append(Y,P)},this):Array.isArray(E)?E.forEach(function(P){this.append(P[0],P[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(P){this.append(P,E[P])},this)}O.prototype.append=function(E,P){E=f(E),P=m(P);var Y=this.map[E];this.map[E]=Y?Y+", "+P:P},O.prototype.delete=function(E){delete this.map[f(E)]},O.prototype.get=function(E){return E=f(E),this.has(E)?this.map[E]:null},O.prototype.has=function(E){return this.map.hasOwnProperty(f(E))},O.prototype.set=function(E,P){this.map[f(E)]=m(P)},O.prototype.forEach=function(E,P){for(var Y in this.map)this.map.hasOwnProperty(Y)&&E.call(P,this.map[Y],Y,this)},O.prototype.keys=function(){var E=[];return this.forEach(function(P,Y){E.push(Y)}),b(E)},O.prototype.values=function(){var E=[];return this.forEach(function(P){E.push(P)}),b(E)},O.prototype.entries=function(){var E=[];return this.forEach(function(P,Y){E.push([Y,P])}),b(E)},l.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function w(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function $(E){return new Promise(function(P,Y){E.onload=function(){P(E.result)},E.onerror=function(){Y(E.error)}})}function H(E){var P=new FileReader,Y=$(P);return P.readAsArrayBuffer(E),Y}function C(E){var P=new FileReader,Y=$(P);return P.readAsText(E),Y}function te(E){for(var P=new Uint8Array(E),Y=new Array(P.length),re=0;re<P.length;re++)Y[re]=String.fromCharCode(P[re]);return Y.join("")}function S(E){if(E.slice)return E.slice(0);var P=new Uint8Array(E.byteLength);return P.set(new Uint8Array(E)),P.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(E){this.bodyUsed=this.bodyUsed,this._bodyInit=E,E?typeof E=="string"?this._bodyText=E:l.blob&&Blob.prototype.isPrototypeOf(E)?this._bodyBlob=E:l.formData&&FormData.prototype.isPrototypeOf(E)?this._bodyFormData=E:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)?this._bodyText=E.toString():l.arrayBuffer&&l.blob&&u(E)?(this._bodyArrayBuffer=S(E.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(E)||d(E))?this._bodyArrayBuffer=S(E):this._bodyText=E=Object.prototype.toString.call(E):this._bodyText="",this.headers.get("content-type")||(typeof E=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var E=w(this);return E||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(H)}),this.text=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(te(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}var j=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ge(E){var P=E.toUpperCase();return j.indexOf(P)>-1?P:E}function q(E,P){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P=P||{};var Y=P.body;if(E instanceof q){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,P.headers||(this.headers=new O(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!Y&&E._bodyInit!=null&&(Y=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new O(P.headers)),this.method=ge(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Y),(this.method==="GET"||this.method==="HEAD")&&(P.cache==="no-store"||P.cache==="no-cache")){var re=/([?&])_=[^&]*/;if(re.test(this.url))this.url=this.url.replace(re,"$1_="+new Date().getTime());else{var he=/\?/;this.url+=(he.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function A(E){var P=new FormData;return E.trim().split("&").forEach(function(Y){if(Y){var re=Y.split("="),he=re.shift().replace(/\+/g," "),oe=re.join("=").replace(/\+/g," ");P.append(decodeURIComponent(he),decodeURIComponent(oe))}}),P}function V(E){var P=new O,Y=E.replace(/\r?\n[\t ]+/g," ");return Y.split("\r").map(function(re){return re.indexOf(`
3
- `)===0?re.substr(1,re.length):re}).forEach(function(re){var he=re.split(":"),oe=he.shift().trim();if(oe){var Fe=he.join(":").trim();P.append(oe,Fe)}}),P}U.call(q.prototype);function D(E,P){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new O(P.headers),this.url=P.url||"",this._initBody(E)}U.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},D.error=function(){var E=new D(null,{status:0,statusText:""});return E.type="error",E};var ie=[301,302,303,307,308];D.redirect=function(E,P){if(ie.indexOf(P)===-1)throw new RangeError("Invalid status code");return new D(null,{status:P,headers:{location:E}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(P,Y){this.message=P,this.name=Y;var re=Error(P);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(E,P){return new Promise(function(Y,re){var he=new q(E,P);if(he.signal&&he.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:V(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var kt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(kt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function mt(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,mt(he.url),!0),he.credentials==="include"?oe.withCredentials=!0:he.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&he.headers.get("Content-Type")&&he.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof O)?Object.getOwnPropertyNames(P.headers).forEach(function(Be){oe.setRequestHeader(Be,m(P.headers[Be]))}):he.headers.forEach(function(Be,kt){oe.setRequestHeader(kt,Be)}),he.signal&&(he.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&he.signal.removeEventListener("abort",Fe)}),oe.send(typeof he._bodyInit>"u"?null:he._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=q,a.Response=D),i.Headers=O,i.Request=q,i.Response=D,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(Si,Si.exports);var Tp=Si.exports;const fs=Cp(Tp);var Pp=Object.defineProperty,Tl=(e,t)=>{for(var n in t)Pp(e,n,{get:t[n],enumerable:!0})},Dp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},xi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},ir=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},Ge=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},Rr=v.record(v.number()),$p=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Rr.optional(),isExclusive:v.boolean()}),Ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Rr.optional(),isExclusive:v.boolean()}),ki=v.discriminatedUnion("type",[$p,Ip]),jr=v.object({id:v.string(),name:v.string(),originalPrice:Rr,price:Rr,hasDiscount:v.boolean(),discount:ki.optional()});function ho(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Pl(e){return v.object({value:e,quantity:v.number()})}var Xt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Xt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Xt),size:v.number(),path:v.string().nullable()}),Ci=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Dl).optional()}),ps=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Dl.array().optional(),defaultVariation:jr.optional(),variations:jr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),$l=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:ps.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:jr.optional(),variations:jr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Ap=v.object({suggestedCurrency:v.string(),products:ps.array(),bundles:$l.array()}),Qt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Qt||{}),hs=v.object({id:v.string(),status:v.nativeEnum(Qt),product:ps,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Vp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);try{return hs.parse(t.data)}catch(n){throw console.error("Could not fetch activation request",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be fetched",t.status)}}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return v.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");try{return hs.parse(t.data)}catch(n){throw console.error("Could not fulfill license",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be fulfilled",t.status)}}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");try{return hs.parse(t.data)}catch(n){throw console.error("Could not fulfill trial",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be fulfilled",t.status)}}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");try{return hs.parse(t.data)}catch(n){throw console.error("Could not cancel activation request",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be cancelled",t.status)}}},Rp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function jp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function Ti(e){if(e.status===404)throw new ir;if(e.status===401)throw new xi;if(e.status===403)throw new Dp;let t;try{const n=await e.json();t=Rp.parse(n)}catch(n){throw console.error("Could not handle response",n),new Error("An unknown problem occurred")}throw new Ge(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[jp(n),r.join(", ")])):void 0)}var Il=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),Lp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Lp,ownedProducts:v.string().array().optional()}),Pi=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Mp=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Up=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");try{return Al.parse(e.data)}catch(t){throw console.error("Could not fetch user",{response:e,err:t}),new Ge("Bad response","Could not fetch user",e.status)}}async signIn(e,t){const n=await fs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new ir("User not found");n.status>=400&&await Ti(n);try{const r=await n.json(),o=Pi.parse(r);return this.tokenStore.setUser(o),o}catch(r){throw console.error("Could not sign in user",{email:e,response:n,err:r}),new Ge("Bad response","Could not sign in user",n.status)}}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s});try{const l=Pi.parse(a.data);return this.tokenStore.setUser(l),l}catch(l){throw console.error("Could not sign up user",{email:t,response:a,err:l}),new Ge("Bad response","Could not sign up user",a.status)}}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await fs(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await Ti(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");try{return Mp.parse(n.data)}catch(r){throw console.error("Could not confirm user account",{email:e,code:t,response:n,err:r}),new Ge("Bad response","Could not confirm user account",n.status)}}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},Vl={};Tl(Vl,{completedOrderSchema:()=>Ul,openBundleLineItem:()=>Ml,openOrderLineItem:()=>Di,openOrderSchema:()=>$i,openProductLineItem:()=>Ll,orderSchema:()=>Fl});var mo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(mo||{}),Rl=v.object({code:v.string(),name:v.string(),description:v.string()}),jl=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ll=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Rr.optional(),variation:jr.optional(),product:jl.optional(),appliedDiscount:ki.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:jl.and(v.object({included:v.boolean().optional()})).array()}),Ml=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:Rr.optional(),variation:jr.optional(),bundle:Fp.optional(),appliedDiscount:ki.optional()}),Di=v.discriminatedUnion("type",[Ll,Ml]),$i=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Di.array(),couponsApplied:Rl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),vo=v.object({currency:v.string(),amount:v.number()}),Bp=v.object({original:vo,discount:vo,subtotal:vo,taxes:vo,due:vo}),Hp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:Il.nullable()}),Ul=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:Di.array(),couponsApplied:Rl.array()}),Fl=v.discriminatedUnion("status",[$i,Ul]),Zp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return Fl.parse(t.data)}async pushContent(e,t,n){const r={...Bl(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency||void 0,items:e.items});try{return $i.parse(o.data)}catch(s){throw console.error("Could not fetch order",{orderId:e.id,checkout:t,response:o,err:s}),new Ge("Bad response","Could not fetch order",o.status)}}};function Bl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var qp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Bl(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);try{return Ap.parse(n.data)}catch(r){throw console.error("Could not fetch storefront",{response:n,err:r}),new Ge("Bad response","Could not fetch storefront",n.status)}}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new xi;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await fs(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});s.status>=400&&await Ti(s);try{return{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}catch(i){throw console.error("Could not parse response",{status:s.status,content:await s.text(),contentType:s.headers.get("Content-Type"),contentLength:s.headers.get("Content-Length"),userAgent:window&&window.navigator&&window.navigator.userAgent,err:i}),new Ge("Bad response","Could not parse server response",s.status)}}},Hl=class rs{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(rs.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(rs.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(rs.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await fs(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new Ge("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Pi.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case rs.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};Hl.storageKey="moonbase_auth";var zp=Hl,Zl=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Pl(ps).array(),redeemsBundles:Pl($l).array()}),Kp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return Zl.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");try{return Zl.parse(t.data)}catch(n){throw console.error("Could not redeem voucher",{response:t,err:n}),new Ge("Bad response","Could not redeem voucher",t.status)}}},ql=(e=>(e.Active="Active",e.Revoked="Revoked",e))(ql||{}),Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),Ii=(e=>(e.Online="Online",e.Offline="Offline",e))(Ii||{}),Ai=v.object({id:v.string(),status:v.nativeEnum(ql),product:Ci,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),zl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(Wl),activationMethod:v.nativeEnum(Ii),lastValidatedAt:v.coerce.date().nullable()}),Gp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");try{return{license:Ai.parse(n.data),url:v.string().parse(n.headers.get("location"))}}catch(r){throw console.error("Could not activate product",{deviceToken:e,activationMethod:t,response:n,err:r}),new Ge("Bad response","Product could not be activated",n.status)}}},Jp=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");try{return ho(Ai).parse(t.data)}catch(n){throw console.error("Could not fetch licenses",{nextUrl:e,response:t,err:n}),new Ge("Bad response","Licenses could not be fetched",t.status)}}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);try{return ho(zl).parse(n.data)}catch(r){throw console.error("Could not fetch license activations",{nextUrl:t,response:n,err:r}),new Ge("Bad response","License activations could not be fetched",n.status)}}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},Yp=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);try{return Ci.parse(n.data)}catch(r){throw console.error("Could not fetch product",{productId:e,version:t,response:n,err:r}),new Ge("Bad response","Product could not be fetched",n.status)}}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");try{return ho(Ci).parse(t.data)}catch(n){throw console.error("Could not fetch products",{nextUrl:e,response:t,err:n}),new Ge("Bad response","Products could not be fetched",t.status)}}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);try{return ho(Ai).parse(n.data)}catch(r){throw console.error("Could not fetch product licenses",{productId:e,nextUrl:t,response:n,err:r}),new Ge("Bad response","Product licenses could not be fetched",n.status)}}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);try{return ho(zl).parse(n.data)}catch(r){throw console.error("Could not fetch product activations",{productId:e,nextUrl:t,response:n,err:r}),new Ge("Bad response","Product activations could not be fetched",n.status)}}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return v.object({location:v.string()}).parse(n.data).location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Kl={};Tl(Kl,{orders:()=>Vl});var Qp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new zp(e);const t=new Wp(this.configuration.endpoint,this.tokenStore);this.storefront=new qp(t),this.identity=new Up(t,this.tokenStore),this.vouchers=new Kp(t),this.orders=new Zp(t),this.inventory=new Xp(t),this.activationRequests=new Vp(t)}},Gl={};/**
3
+ `)===0?re.substr(1,re.length):re}).forEach(function(re){var he=re.split(":"),oe=he.shift().trim();if(oe){var Fe=he.join(":").trim();P.append(oe,Fe)}}),P}U.call(q.prototype);function D(E,P){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new O(P.headers),this.url=P.url||"",this._initBody(E)}U.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},D.error=function(){var E=new D(null,{status:0,statusText:""});return E.type="error",E};var ie=[301,302,303,307,308];D.redirect=function(E,P){if(ie.indexOf(P)===-1)throw new RangeError("Invalid status code");return new D(null,{status:P,headers:{location:E}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(P,Y){this.message=P,this.name=Y;var re=Error(P);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(E,P){return new Promise(function(Y,re){var he=new q(E,P);if(he.signal&&he.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:V(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var kt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(kt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function mt(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,mt(he.url),!0),he.credentials==="include"?oe.withCredentials=!0:he.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&he.headers.get("Content-Type")&&he.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof O)?Object.getOwnPropertyNames(P.headers).forEach(function(Be){oe.setRequestHeader(Be,m(P.headers[Be]))}):he.headers.forEach(function(Be,kt){oe.setRequestHeader(kt,Be)}),he.signal&&(he.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&he.signal.removeEventListener("abort",Fe)}),oe.send(typeof he._bodyInit>"u"?null:he._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=q,a.Response=D),i.Headers=O,i.Request=q,i.Response=D,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(Si,Si.exports);var Tp=Si.exports;const fs=Cp(Tp);var Pp=Object.defineProperty,Tl=(e,t)=>{for(var n in t)Pp(e,n,{get:t[n],enumerable:!0})},Dp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},xi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},ir=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},Ge=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},Rr=v.record(v.number()),$p=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Rr.optional(),isExclusive:v.boolean()}),Ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Rr.optional(),isExclusive:v.boolean()}),ki=v.discriminatedUnion("type",[$p,Ip]),jr=v.object({id:v.string(),name:v.string(),originalPrice:Rr,price:Rr,hasDiscount:v.boolean(),discount:ki.optional()});function ho(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Pl(e){return v.object({value:e,quantity:v.number()})}var Xt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Xt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Xt),size:v.number(),path:v.string().nullable()}),Ci=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Dl).optional()}),ps=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Dl.array().optional(),defaultVariation:jr.optional(),variations:jr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),$l=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:ps.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:jr.optional(),variations:jr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Ap=v.object({suggestedCurrency:v.string(),products:ps.array(),bundles:$l.array()}),Qt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Qt||{}),hs=v.object({id:v.string(),status:v.nativeEnum(Qt),product:ps,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Vp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);try{return hs.parse(t.data)}catch(n){throw console.warn("Could not fetch activation request",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be fetched",t.status)}}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return v.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");try{return hs.parse(t.data)}catch(n){throw console.warn("Could not fulfill license",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be fulfilled",t.status)}}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");try{return hs.parse(t.data)}catch(n){throw console.warn("Could not fulfill trial",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be fulfilled",t.status)}}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");try{return hs.parse(t.data)}catch(n){throw console.warn("Could not cancel activation request",{requestId:e,response:t,err:n}),new Ge("Bad response","Activation request could not be cancelled",t.status)}}},Rp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function jp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function Ti(e){if(e.status===404)throw new ir;if(e.status===401)throw new xi;if(e.status===403)throw new Dp;let t;try{const n=await e.json();t=Rp.parse(n)}catch(n){throw console.warn("Could not handle response",{response:e,err:n,content:await e.text()}),new Error("An unknown problem occurred")}throw new Ge(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[jp(n),r.join(", ")])):void 0)}var Il=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),Lp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Lp,ownedProducts:v.string().array().optional()}),Pi=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Mp=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Up=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");try{return Al.parse(e.data)}catch(t){throw console.warn("Could not fetch user",{response:e,err:t}),new Ge("Bad response","Could not fetch user",e.status)}}async signIn(e,t){const n=await fs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new ir("User not found");n.status>=400&&await Ti(n);try{const r=await n.json(),o=Pi.parse(r);return this.tokenStore.setUser(o),o}catch(r){throw console.warn("Could not sign in user",{email:e,response:n,err:r}),new Ge("Bad response","Could not sign in user",n.status)}}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s});try{const l=Pi.parse(a.data);return this.tokenStore.setUser(l),l}catch(l){throw console.warn("Could not sign up user",{email:t,response:a,err:l}),new Ge("Bad response","Could not sign up user",a.status)}}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await fs(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await Ti(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");try{return Mp.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new Ge("Bad response","Could not confirm user account",n.status)}}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},Vl={};Tl(Vl,{completedOrderSchema:()=>Ul,openBundleLineItem:()=>Ml,openOrderLineItem:()=>Di,openOrderSchema:()=>$i,openProductLineItem:()=>Ll,orderSchema:()=>Fl});var mo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(mo||{}),Rl=v.object({code:v.string(),name:v.string(),description:v.string()}),jl=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ll=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Rr.optional(),variation:jr.optional(),product:jl.optional(),appliedDiscount:ki.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:jl.and(v.object({included:v.boolean().optional()})).array()}),Ml=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:Rr.optional(),variation:jr.optional(),bundle:Fp.optional(),appliedDiscount:ki.optional()}),Di=v.discriminatedUnion("type",[Ll,Ml]),$i=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Di.array(),couponsApplied:Rl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),vo=v.object({currency:v.string(),amount:v.number()}),Bp=v.object({original:vo,discount:vo,subtotal:vo,taxes:vo,due:vo}),Hp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:Il.nullable()}),Ul=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:Di.array(),couponsApplied:Rl.array()}),Fl=v.discriminatedUnion("status",[$i,Ul]),Zp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return Fl.parse(t.data)}async pushContent(e,t,n){const r={...Bl(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency||void 0,items:e.items});try{return $i.parse(o.data)}catch(s){throw console.warn("Could not fetch order",{orderId:e.id,checkout:t,response:o,err:s}),new Ge("Bad response","Could not fetch order",o.status)}}};function Bl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var qp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Bl(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);try{return Ap.parse(n.data)}catch(r){throw console.warn("Could not fetch storefront",{response:n,err:r}),new Ge("Bad response","Could not fetch storefront",n.status)}}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new xi;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await fs(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});s.status>=400&&await Ti(s);try{return{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:Object.fromEntries(s.headers.entries()),status:s.status}}catch(i){throw console.warn("Could not parse response",{status:s.status,content:await s.text(),contentType:s.headers.get("Content-Type"),contentLength:s.headers.get("Content-Length"),userAgent:window&&window.navigator&&window.navigator.userAgent,err:i}),new Ge("Bad response","Could not parse server response",s.status)}}},Hl=class rs{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(rs.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(rs.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(rs.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await fs(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new Ge("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Pi.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case rs.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};Hl.storageKey="moonbase_auth";var zp=Hl,Zl=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Pl(ps).array(),redeemsBundles:Pl($l).array()}),Kp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return Zl.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");try{return Zl.parse(t.data)}catch(n){throw console.warn("Could not redeem voucher",{response:t,err:n}),new Ge("Bad response","Could not redeem voucher",t.status)}}},ql=(e=>(e.Active="Active",e.Revoked="Revoked",e))(ql||{}),Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),Ii=(e=>(e.Online="Online",e.Offline="Offline",e))(Ii||{}),Ai=v.object({id:v.string(),status:v.nativeEnum(ql),product:Ci,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),zl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(Wl),activationMethod:v.nativeEnum(Ii),lastValidatedAt:v.coerce.date().nullable()}),Gp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");try{return{license:Ai.parse(n.data),url:v.string().parse(n.headers.location)}}catch(r){throw console.warn("Could not activate product",{deviceToken:e,activationMethod:t,response:n,err:r}),new Ge("Bad response","Product could not be activated",n.status)}}},Jp=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");try{return ho(Ai).parse(t.data)}catch(n){throw console.warn("Could not fetch licenses",{nextUrl:e,response:t,err:n}),new Ge("Bad response","Licenses could not be fetched",t.status)}}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);try{return ho(zl).parse(n.data)}catch(r){throw console.warn("Could not fetch license activations",{nextUrl:t,response:n,err:r}),new Ge("Bad response","License activations could not be fetched",n.status)}}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},Yp=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);try{return Ci.parse(n.data)}catch(r){throw console.warn("Could not fetch product",{productId:e,version:t,response:n,err:r}),new Ge("Bad response","Product could not be fetched",n.status)}}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");try{return ho(Ci).parse(t.data)}catch(n){throw console.warn("Could not fetch products",{nextUrl:e,response:t,err:n}),new Ge("Bad response","Products could not be fetched",t.status)}}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);try{return ho(Ai).parse(n.data)}catch(r){throw console.warn("Could not fetch product licenses",{productId:e,nextUrl:t,response:n,err:r}),new Ge("Bad response","Product licenses could not be fetched",n.status)}}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);try{return ho(zl).parse(n.data)}catch(r){throw console.warn("Could not fetch product activations",{productId:e,nextUrl:t,response:n,err:r}),new Ge("Bad response","Product activations could not be fetched",n.status)}}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return v.object({location:v.string()}).parse(n.data).location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Kl={};Tl(Kl,{orders:()=>Vl});var Qp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new zp(e);const t=new Wp(this.configuration.endpoint,this.tokenStore);this.storefront=new qp(t),this.identity=new Up(t,this.tokenStore),this.vouchers=new Kp(t),this.orders=new Zp(t),this.inventory=new Xp(t),this.activationRequests=new Vp(t)}},Gl={};/**
4
4
  * @vue/shared v3.5.3
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
6
  * @license MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/storefront",
3
3
  "type": "module",
4
- "version": "0.2.35",
4
+ "version": "0.2.38",
5
5
  "description": "Package to let you embed Moonbase.sh into your storefront as a payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "pinia": "^2.1.7",
23
23
  "vite-plugin-css-injected-by-js": "^3.5.1",
24
24
  "vue": "^3.5.3",
25
- "@moonbase.sh/vue": "0.2.35"
25
+ "@moonbase.sh/vue": "0.2.38"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^18.19.50",