@moonbase.sh/storefront 0.2.39 → 0.2.41

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.
@@ -1,24 +1,24 @@
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
- (function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var Ew=Object.defineProperty;var Ow=(kt,be,Tn)=>be in kt?Ew(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var Tr=(kt,be,Tn)=>Ow(kt,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"]),Cn=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"]),$f=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 Cr=(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=Cr;function If(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}},Af=[];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===Cr?void 0:Cr].filter(o=>!!o)});e.common.issues.push(r)}class ut{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 ut.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"}),Pr=e=>({status:"dirty",value:e}),vt=e=>({status:"valid",value:e}),_i=e=>e.status==="aborted",wi=e=>e.status==="dirty",Yr=e=>e.status==="valid",Xr=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 Qr,eo;class Kt{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(Yr(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 Cn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Xr(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:Cn(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:Cn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Xr(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 Ft({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jt.create(this,this._def)}nullable(){return In.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.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 Ft({...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 Vf=/^c[^\s-]{8,}$/i,Rf=/^[0-9a-z]+$/,jf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lf=/^[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,Mf=/^[a-z0-9_-]{21}$/i,Uf=/^[-+]?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)?)??$/,Ff=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ei;const Hf=/^(?:(?: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])$/,Zf=/^(([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})))$/,qf=/^([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])))",Wf=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 zf(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 Kf(e,t){return!!((t==="v4"||!t)&&Hf.test(e)||(t==="v6"||!t)&&Zf.test(e))}class Mt 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 ut;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")Ff.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(Bf,"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")Lf.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")Mf.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")Vf.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")Rf.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")jf.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"?Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?zf(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"?Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Kf(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"?qf.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 Mt({...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 Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...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}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Gf(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 Pn 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 ut;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"?Gf(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 Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Pn({...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)}}Pn.create=e=>new Pn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Dn 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 ut;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 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]})}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}}Dn.create=e=>{var t;return new Dn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class to 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 vt(t.data)}}to.create=e=>new to({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class nr 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 ut;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 nr({...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}}nr.create=e=>new nr({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 vt(t.data)}}as.create=e=>new as({typeName:pe.ZodSymbol,...Ee(e)});class no 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 vt(t.data)}}no.create=e=>new no({typeName:pe.ZodUndefined,...Ee(e)});class Dr 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 vt(t.data)}}Dr.create=e=>new Dr({typeName:pe.ZodNull,...Ee(e)});class $r extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return vt(t.data)}}$r.create=e=>new $r({typeName:pe.ZodAny,...Ee(e)});class rr extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vt(t.data)}}rr.create=e=>new rr({typeName:pe.ZodUnknown,...Ee(e)});class fn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:ne.never,received:n.parsedType}),ve}}fn.create=e=>new fn({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 vt(t.data)}}ls.create=e=>new ls({typeName:pe.ZodVoid,...Ee(e)});class Ut 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 Kt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Kt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({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]=Jt.create(Ir(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:Ir(e.element)}):e instanceof Jt?Jt.create(Ir(e.unwrap())):e instanceof In?In.create(Ir(e.unwrap())):e instanceof Gt?Gt.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 fn&&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 Kt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof fn){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 Kt(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=>ut.mergeObjectSync(r,u)):ut.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 Jt;)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:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:fn.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 pn=e=>e instanceof io?pn(e.schema):e instanceof Ft?pn(e.innerType()):e instanceof ao?[e.value]:e instanceof $n?e.options:e instanceof lo?be.objectValues(e.enum):e instanceof uo?pn(e._def.innerType):e instanceof no?[void 0]:e instanceof Dr?[null]:e instanceof Jt?[void 0,...pn(e.unwrap())]:e instanceof In?[null,...pn(e.unwrap())]:e instanceof Ni||e instanceof po?pn(e.unwrap()):e instanceof co?pn(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=pn(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=Cn(e),r=Cn(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 Gt 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 Kt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Gt({...this._def,rest:t})}}Gt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt({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 Kt(r,a,r.path,a)),value:i._parse(new Kt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.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:Mt.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 Kt(r,a,r.path,[u,"key"])),value:s._parse(new Kt(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 or 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 Kt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new or({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new or({...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)}}or.create=(e,t)=>new or({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(),Cr].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(),Cr].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 vt(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 vt(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:Gt.create(t).rest(rr.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||Gt.create([]).rest(rr.create()),returns:n||rr.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 $n({values:e,typeName:pe.ZodEnum,...Ee(t)})}class $n extends Oe{constructor(){super(...arguments),Qr.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,Qr)||gl(this,Qr,new Set(this._def.values)),!is(this,Qr).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 vt(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 $n.create(t,{...this._def,...n})}exclude(t,n=this._def){return $n.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Qr=new WeakMap,$n.create=El;class lo extends Oe{constructor(){super(...arguments),eo.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,eo)||gl(this,eo,new Set(be.getValidEnumValues(this._def.values))),!is(this,eo).has(t.data)){const o=be.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ve}return vt(t.data)}get enum(){return this._def.values}}eo=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 vt(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 Ft 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"?Pr(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"?Pr(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(!Yr(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=>Yr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Jt extends Oe{_parse(t){return this._getType(t)===ne.undefined?vt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jt.create=(e,t)=>new Jt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class In extends Oe{_parse(t){return this._getType(t)===ne.null?vt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}In.create=(e,t)=>new In({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 Xr(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 Jf=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(),Pr(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=>(Yr(o)&&(o.value=Object.freeze(o.value)),o);return Xr(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 Yf={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 Xf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Mt.create,Sl=Pn.create,Qf=ds.create,ep=Dn.create,xl=to.create,tp=nr.create,np=as.create,rp=no.create,op=Dr.create,sp=$r.create,ip=rr.create,ap=fn.create,lp=ls.create,up=Ut.create,cp=ze.create,dp=ze.strictCreate,fp=ro.create,pp=us.create,hp=oo.create,mp=Gt.create,vp=so.create,gp=cs.create,yp=or.create,bp=Ar.create,_p=io.create,wp=ao.create,Ep=$n.create,Op=lo.create,Np=Vr.create,kl=Ft.create,Sp=Jt.create,xp=In.create,kp=Ft.createWithPreprocess,Tp=fo.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Cr,setErrorMap:If,getErrorMap:os,makeIssue:ss,EMPTY_PATH:Af,addIssueToContext:ee,ParseStatus:ut,INVALID:ve,DIRTY:Pr,OK:vt,isAborted:_i,isDirty:wi,isValid:Yr,isAsync:Xr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Cn,ZodType:Oe,datetimeRegex:wl,ZodString:Mt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:to,ZodDate:nr,ZodSymbol:as,ZodUndefined:no,ZodNull:Dr,ZodAny:$r,ZodUnknown:rr,ZodNever:fn,ZodVoid:ls,ZodArray:Ut,ZodObject:ze,ZodUnion:ro,ZodDiscriminatedUnion:us,ZodIntersection:oo,ZodTuple:Gt,ZodRecord:so,ZodMap:cs,ZodSet:or,ZodFunction:Ar,ZodLazy:io,ZodLiteral:ao,ZodEnum:$n,ZodNativeEnum:lo,ZodPromise:Vr,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Jt,ZodNullable:In,ZodDefault:uo,ZodCatch:co,ZodNaN:ds,BRAND:Jf,ZodBranded:Ni,ZodPipeline:fo,ZodReadonly:po,custom:Ol,Schema:Oe,ZodSchema:Oe,late:Yf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Pn.create({...e,coerce:!0}),boolean:e=>to.create({...e,coerce:!0}),bigint:e=>Dn.create({...e,coerce:!0}),date:e=>nr.create({...e,coerce:!0})},any:sp,array:up,bigint:ep,boolean:xl,date:tp,discriminatedUnion:pp,effect:kl,enum:Ep,function:bp,instanceof:Xf,intersection:hp,lazy:_p,literal:wp,map:gp,nan:Qf,nativeEnum:Op,never:ap,null:op,nullable:xp,number:Sl,object:cp,oboolean:()=>xl().optional(),onumber:()=>Sl().optional(),optional:Sp,ostring:()=>Nl().optional(),pipeline:Tp,preprocess:kp,promise:Np,record:vp,set:yp,strictObject:dp,string:Nl,symbol:np,transformer:kl,tuple:mp,undefined:rp,union:fp,unknown:ip,void:lp,NEVER:ve,ZodIssueCode:B,quotelessJson:$f,ZodError:Tt}),Tl=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 Tl<"u"&&Tl,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 T(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 T(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 xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(xt,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 ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,ht(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,xt){oe.setRequestHeader(xt,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 Pp=Si.exports;const fs=Cp(Pp);var Dp=Object.defineProperty,Cl=(e,t)=>{for(var n in t)Dp(e,n,{get:t[n],enumerable:!0})},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()}),xi=v.discriminatedUnion("type",[$p,Ip]),jr=v.object({id:v.string(),name:v.string(),originalPrice:Rr,price:Rr,hasDiscount:v.boolean(),discount:xi.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 Yt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Yt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Yt),size:v.number(),path:v.string().nullable()}),ki=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()}),Xt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Xt||{}),hs=v.object({id:v.string(),status:v.nativeEnum(Xt),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){return(await this.api.fetch(`/api/customer/activations/${e}`,hs)).data}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`,v.boolean());return v.boolean().parse(t.data)}async fulfillLicense(e){return(await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,hs,{method:"POST"})).data}async fulfillTrial(e){return(await this.api.fetch(`/api/customer/activations/${e}/trial`,hs,{method:"POST"})).data}async cancel(e){return(await this.api.fetch(`/api/customer/activations/${e}/cancel`,hs,{method:"POST"})).data}},Rp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},Ti=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},sr=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},Lr=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}},jp=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 Lp(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 Ci(e){if(e.status===404)throw new sr;if(e.status===401)throw new Ti;if(e.status===403)throw new Rp;let t;try{const n=await e.json();t=jp.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 Lr(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Lp(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()}),Mp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Mp,ownedProducts:v.string().array().optional()}),Pi=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Vl=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(){return(await this.api.authenticatedFetch("/api/customer/meta/user",Al)).data}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 sr("User not found");n.status>=400&&await Ci(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 Lr("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"}`,Pi,{method:"POST",body:{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}});return this.tokenStore.setUser(a.data),a.data}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity",v.null(),{method:"PATCH",body:{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r}})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password",v.null(),{method:"POST",body:{currentPassword:e,newPassword:t}})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,v.null(),{method:"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 Ci(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,Vl,{method:"POST"});try{return Vl.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new Lr("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(" ","+"))}`,v.null(),{method:"POST"})}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,v.null(),{method:"POST"})}},Rl={};Cl(Rl,{completedOrderSchema:()=>Fl,openBundleLineItem:()=>Ul,openOrderLineItem:()=>Di,openOrderSchema:()=>$i,openProductLineItem:()=>Ml,orderSchema:()=>Bl});var mo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(mo||{}),jl=v.object({code:v.string(),name:v.string(),description:v.string()}),Ll=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ml=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:Ll.optional(),appliedDiscount:xi.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:Ll.and(v.object({included:v.boolean().optional()})).array()}),Ul=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:xi.optional()}),Di=v.discriminatedUnion("type",[Ml,Ul]),$i=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Di.array(),couponsApplied:jl.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()}),Fl=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:Di.array(),couponsApplied:jl.array()}),Bl=v.discriminatedUnion("status",[$i,Fl]),Zp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/orders/${e}`,Bl)).data}async pushContent(e,t,n){const r={...Hl(n)};return t&&(r.checkout="true",r.returnUrl=t.returnUrl),(await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,$i,{method:"PATCH",body:{currency:e.currency||void 0,items:e.items}})).data}};function Hl(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(Hl(e));return(await this.api.fetch(`/api/customer/storefront?${t.toString()}`,Ap)).data}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n){if(!this.tokenStore.hasAccessToken)throw new Ti;return await this.fetch(e,t,n)}async fetch(e,t,n){var r;const o=await this.tokenStore.getAccessToken(),s=(r=n==null?void 0:n.contentType)!=null?r:"application/json",i=await fs(this.baseUrl+e,{method:(n==null?void 0:n.method)||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":s,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n!=null&&n.body?s!=="application/json"?n.body:JSON.stringify(n.body):void 0});i.status>=400&&await Ci(i);try{return{data:t instanceof Dr?null:t.parse(await i.json()),headers:Object.fromEntries(i.headers.entries()),status:i.status}}catch(a){throw console.warn("Could not parse response",{status:i.status,content:await i.text(),headers:Object.fromEntries(i.headers.entries()),userAgent:window&&window.navigator&&window.navigator.userAgent,err:a}),new Lr("Bad response","Could not parse server response",i.status)}}},Zl=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 Lr("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}}};Zl.storageKey="moonbase_auth";var zp=Zl,ql=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){return(await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`,ql)).data}async redeem(e){return(await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,ql,{method:"POST"})).data}},Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(zl||{}),Ii=(e=>(e.Online="Online",e.Offline="Offline",e))(Ii||{}),Ai=v.object({id:v.string(),status:v.nativeEnum(Wl),product:ki,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Kl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(zl),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}`,Ai,{method:"POST",body:e,contentType:"text/plain"});return{license:n.data,url:v.string().parse(n.headers.location)}}},Jp=class{constructor(e){this.api=e}async get(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses",ho(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`,ho(Kl))).data}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,v.null(),{method:"POST"})}},Yp=class{constructor(e){this.api=e}async get(e,t){return(await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`,ki)).data}async getOwned(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/products",ho(ki))).data}async getLicenses(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`,ho(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`,ho(Kl))).data}async getDownloadUrl(e){const t=new URL(e);return t.searchParams.append("redirect","false"),(await this.api.fetch(t.pathname+t.search,v.object({location:v.string()}))).data.location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Gl={};Cl(Gl,{orders:()=>Rl});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)}},Jl={};/**
2
+ (function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var Ew=Object.defineProperty;var Ow=(kt,be,Tn)=>be in kt?Ew(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var Tr=(kt,be,Tn)=>Ow(kt,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"]),Cn=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"]),$f=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 Cr=(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=Cr;function If(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}},Af=[];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===Cr?void 0:Cr].filter(o=>!!o)});e.common.issues.push(r)}class ut{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 ut.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"}),Pr=e=>({status:"dirty",value:e}),vt=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 Kt{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 Cn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Cn(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:Cn(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:Cn(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 Ft({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jt.create(this,this._def)}nullable(){return In.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return Vr.create(this,this._def)}or(t){return no.create([this,t],this._def)}and(t){return ro.create(this,t,this._def)}transform(t){return new Ft({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new lo({...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 uo({...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 co.create(this,t)}readonly(){return fo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Vf=/^c[^\s-]{8,}$/i,Rf=/^[0-9a-z]+$/,jf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lf=/^[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,Mf=/^[a-z0-9_-]{21}$/i,Uf=/^[-+]?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)?)??$/,Ff=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ei;const Hf=/^(?:(?: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])$/,Zf=/^(([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})))$/,qf=/^([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])))",Wf=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 zf(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 Kf(e,t){return!!((t==="v4"||!t)&&Hf.test(e)||(t==="v6"||!t)&&Zf.test(e))}class Mt 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 ut;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")Ff.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(Bf,"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")Lf.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")Mf.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")Vf.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")Rf.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")jf.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"?Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?zf(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"?Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Kf(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"?qf.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 Mt({...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 Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...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}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Gf(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 Pn 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 ut;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"?Gf(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 Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Pn({...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)}}Pn.create=e=>new Pn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Dn 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 ut;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 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]})}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}}Dn.create=e=>{var t;return new Dn({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 vt(t.data)}}eo.create=e=>new eo({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class nr 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 ut;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 nr({...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}}nr.create=e=>new nr({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 vt(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 vt(t.data)}}to.create=e=>new to({typeName:pe.ZodUndefined,...Ee(e)});class Dr 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 vt(t.data)}}Dr.create=e=>new Dr({typeName:pe.ZodNull,...Ee(e)});class $r extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return vt(t.data)}}$r.create=e=>new $r({typeName:pe.ZodAny,...Ee(e)});class rr extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vt(t.data)}}rr.create=e=>new rr({typeName:pe.ZodUnknown,...Ee(e)});class fn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:ne.never,received:n.parsedType}),ve}}fn.create=e=>new fn({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 vt(t.data)}}ls.create=e=>new ls({typeName:pe.ZodVoid,...Ee(e)});class Ut 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 Kt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Kt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({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]=Jt.create(Ir(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:Ir(e.element)}):e instanceof Jt?Jt.create(Ir(e.unwrap())):e instanceof In?In.create(Ir(e.unwrap())):e instanceof Gt?Gt.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 fn&&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 Kt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof fn){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 Kt(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=>ut.mergeObjectSync(r,u)):ut.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 Jt;)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:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)});class no 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}}no.create=(e,t)=>new no({options:e,typeName:pe.ZodUnion,...Ee(t)});const pn=e=>e instanceof so?pn(e.schema):e instanceof Ft?pn(e.innerType()):e instanceof io?[e.value]:e instanceof $n?e.options:e instanceof ao?be.objectValues(e.enum):e instanceof lo?pn(e._def.innerType):e instanceof to?[void 0]:e instanceof Dr?[null]:e instanceof Jt?[void 0,...pn(e.unwrap())]:e instanceof In?[null,...pn(e.unwrap())]:e instanceof Ni||e instanceof fo?pn(e.unwrap()):e instanceof uo?pn(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=pn(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=Cn(e),r=Cn(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 ro 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}))}}ro.create=(e,t,n)=>new ro({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Gt 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 Kt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Gt({...this._def,rest:t})}}Gt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class oo 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 Kt(r,a,r.path,a)),value:i._parse(new Kt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new oo({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new oo({keyType:Mt.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 Kt(r,a,r.path,[u,"key"])),value:s._parse(new Kt(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 or 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 Kt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new or({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new or({...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)}}or.create=(e,t)=>new or({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(),Cr].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(),Cr].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 vt(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 vt(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:Gt.create(t).rest(rr.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||Gt.create([]).rest(rr.create()),returns:n||rr.create(),typeName:pe.ZodFunction,...Ee(r)})}}class so 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})}}so.create=(e,t)=>new so({getter:e,typeName:pe.ZodLazy,...Ee(t)});class io 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}}io.create=(e,t)=>new io({value:e,typeName:pe.ZodLiteral,...Ee(t)});function El(e,t){return new $n({values:e,typeName:pe.ZodEnum,...Ee(t)})}class $n 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 vt(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 $n.create(t,{...this._def,...n})}exclude(t,n=this._def){return $n.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Xr=new WeakMap,$n.create=El;class ao 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 vt(t.data)}get enum(){return this._def.values}}Qr=new WeakMap,ao.create=(e,t)=>new ao({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 vt(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 Ft 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"?Pr(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"?Pr(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)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Jt extends Oe{_parse(t){return this._getType(t)===ne.undefined?vt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jt.create=(e,t)=>new Jt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class In extends Oe{_parse(t){return this._getType(t)===ne.null?vt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}In.create=(e,t)=>new In({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class lo 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}}lo.create=(e,t)=>new lo({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class uo 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}}uo.create=(e,t)=>new uo({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 Jf=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 co 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(),Pr(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 co({in:t,out:n,typeName:pe.ZodPipeline})}}class fo 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}}fo.create=(e,t)=>new fo({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 Yf={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 Xf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Mt.create,Sl=Pn.create,Qf=ds.create,ep=Dn.create,xl=eo.create,tp=nr.create,np=as.create,rp=to.create,op=Dr.create,sp=$r.create,ip=rr.create,ap=fn.create,lp=ls.create,up=Ut.create,cp=ze.create,dp=ze.strictCreate,fp=no.create,pp=us.create,hp=ro.create,mp=Gt.create,vp=oo.create,gp=cs.create,yp=or.create,bp=Ar.create,_p=so.create,wp=io.create,Ep=$n.create,Op=ao.create,Np=Vr.create,kl=Ft.create,Sp=Jt.create,xp=In.create,kp=Ft.createWithPreprocess,Tp=co.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Cr,setErrorMap:If,getErrorMap:os,makeIssue:ss,EMPTY_PATH:Af,addIssueToContext:ee,ParseStatus:ut,INVALID:ve,DIRTY:Pr,OK:vt,isAborted:_i,isDirty:wi,isValid:Jr,isAsync:Yr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Cn,ZodType:Oe,datetimeRegex:wl,ZodString:Mt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:eo,ZodDate:nr,ZodSymbol:as,ZodUndefined:to,ZodNull:Dr,ZodAny:$r,ZodUnknown:rr,ZodNever:fn,ZodVoid:ls,ZodArray:Ut,ZodObject:ze,ZodUnion:no,ZodDiscriminatedUnion:us,ZodIntersection:ro,ZodTuple:Gt,ZodRecord:oo,ZodMap:cs,ZodSet:or,ZodFunction:Ar,ZodLazy:so,ZodLiteral:io,ZodEnum:$n,ZodNativeEnum:ao,ZodPromise:Vr,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Jt,ZodNullable:In,ZodDefault:lo,ZodCatch:uo,ZodNaN:ds,BRAND:Jf,ZodBranded:Ni,ZodPipeline:co,ZodReadonly:fo,custom:Ol,Schema:Oe,ZodSchema:Oe,late:Yf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Pn.create({...e,coerce:!0}),boolean:e=>eo.create({...e,coerce:!0}),bigint:e=>Dn.create({...e,coerce:!0}),date:e=>nr.create({...e,coerce:!0})},any:sp,array:up,bigint:ep,boolean:xl,date:tp,discriminatedUnion:pp,effect:kl,enum:Ep,function:bp,instanceof:Xf,intersection:hp,lazy:_p,literal:wp,map:gp,nan:Qf,nativeEnum:Op,never:ap,null:op,nullable:xp,number:Sl,object:cp,oboolean:()=>xl().optional(),onumber:()=>Sl().optional(),optional:Sp,ostring:()=>Nl().optional(),pipeline:Tp,preprocess:kp,promise:Np,record:vp,set:yp,strictObject:dp,string:Nl,symbol:np,transformer:kl,tuple:mp,undefined:rp,union:fp,unknown:ip,void:lp,NEVER:ve,ZodIssueCode:B,quotelessJson:$f,ZodError:Tt}),Tl=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 Tl<"u"&&Tl,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 T(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 T(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 xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(xt,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 ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,ht(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,xt){oe.setRequestHeader(xt,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 Pp=Si.exports;const fs=Cp(Pp);var Dp=Object.defineProperty,Cl=(e,t)=>{for(var n in t)Dp(e,n,{get:t[n],enumerable:!0})},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()}),xi=v.discriminatedUnion("type",[$p,Ip]),jr=v.object({id:v.string(),name:v.string(),originalPrice:Rr,price:Rr,hasDiscount:v.boolean(),discount:xi.optional()});function po(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 Yt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Yt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Yt),size:v.number(),path:v.string().nullable()}),ki=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()}),Xt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Xt||{}),hs=v.object({id:v.string(),status:v.nativeEnum(Xt),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){return(await this.api.fetch(`/api/customer/activations/${e}`,hs)).data}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`,v.boolean());return v.boolean().parse(t.data)}async fulfillLicense(e){return(await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,hs,{method:"POST"})).data}async fulfillTrial(e){return(await this.api.fetch(`/api/customer/activations/${e}/trial`,hs,{method:"POST"})).data}async cancel(e){return(await this.api.fetch(`/api/customer/activations/${e}/cancel`,hs,{method:"POST"})).data}},Rp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},Ti=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},sr=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},ho=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}},jp=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 Lp(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 Ci(e){if(e.status===404)throw new sr;if(e.status===401)throw new Ti;if(e.status===403)throw new Rp;let t;try{const n=await e.json();t=jp.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 ho(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Lp(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()}),Mp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Mp,ownedProducts:v.string().array().optional()}),Pi=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Vl=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(){return(await this.api.authenticatedFetch("/api/customer/meta/user",Al)).data}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 sr("User not found");n.status>=400&&await Ci(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 ho("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"}`,Pi,{method:"POST",body:{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}});return this.tokenStore.setUser(a.data),a.data}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity",v.null(),{method:"PATCH",body:{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r}})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password",v.null(),{method:"POST",body:{currentPassword:e,newPassword:t}})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,v.null(),{method:"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 Ci(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,Vl,{method:"POST"});try{return Vl.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new ho("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(" ","+"))}`,v.null(),{method:"POST"})}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,v.null(),{method:"POST"})}},Rl={};Cl(Rl,{completedOrderSchema:()=>Fl,openBundleLineItem:()=>Ul,openOrderLineItem:()=>Di,openOrderSchema:()=>$i,openProductLineItem:()=>Ml,orderSchema:()=>Bl});var mo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(mo||{}),jl=v.object({code:v.string(),name:v.string(),description:v.string()}),Ll=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ml=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:Ll.optional(),appliedDiscount:xi.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:Ll.and(v.object({included:v.boolean().optional()})).array()}),Ul=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:xi.optional()}),Di=v.discriminatedUnion("type",[Ml,Ul]),$i=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Di.array(),couponsApplied:jl.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()}),Fl=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:Di.array(),couponsApplied:jl.array()}),Bl=v.discriminatedUnion("status",[$i,Fl]),Zp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/orders/${e}`,Bl)).data}async pushContent(e,t,n){const r={...Hl(n)};return t&&(r.checkout="true",r.returnUrl=t.returnUrl),(await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,$i,{method:"PATCH",body:{currency:e.currency||void 0,items:e.items}})).data}};function Hl(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(Hl(e));return(await this.api.fetch(`/api/customer/storefront?${t.toString()}`,Ap)).data}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n){if(!this.tokenStore.hasAccessToken)throw new Ti;return await this.fetch(e,t,n)}async fetch(e,t,n){var r;const o=await this.tokenStore.getAccessToken(),s=(r=n==null?void 0:n.contentType)!=null?r:"application/json",i=await fs(this.baseUrl+e,{method:(n==null?void 0:n.method)||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":s,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n!=null&&n.body?s!=="application/json"?n.body:JSON.stringify(n.body):void 0});i.status>=400&&await Ci(i);let a;try{return a=await i.json(),{data:t instanceof Dr?null:t.parse(a),headers:Object.fromEntries(i.headers.entries()),status:i.status}}catch(l){throw console.warn("Could not parse response",{status:i.status,content:a||(i.bodyUsed?"unknown":await i.text()),headers:Object.fromEntries(i.headers.entries()),userAgent:window&&window.navigator&&window.navigator.userAgent,err:l}),new ho("Bad response","Could not parse server response",i.status)}}},Zl=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 ho("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}}};Zl.storageKey="moonbase_auth";var zp=Zl,ql=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){return(await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`,ql)).data}async redeem(e){return(await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,ql,{method:"POST"})).data}},Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(zl||{}),Ii=(e=>(e.Online="Online",e.Offline="Offline",e))(Ii||{}),Ai=v.object({id:v.string(),status:v.nativeEnum(Wl),product:ki,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Kl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(zl),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}`,Ai,{method:"POST",body:e,contentType:"text/plain"});return{license:n.data,url:v.string().parse(n.headers.location)}}},Jp=class{constructor(e){this.api=e}async get(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses",po(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`,po(Kl))).data}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,v.null(),{method:"POST"})}},Yp=class{constructor(e){this.api=e}async get(e,t){return(await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`,ki)).data}async getOwned(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/products",po(ki))).data}async getLicenses(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`,po(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`,po(Kl))).data}async getDownloadUrl(e){const t=new URL(e);return t.searchParams.append("redirect","false"),(await this.api.fetch(t.pathname+t.search,v.object({location:v.string()}))).data.location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Gl={};Cl(Gl,{orders:()=>Rl});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)}},Jl={};/**
4
4
  * @vue/shared v3.5.3
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
6
  * @license MIT
7
- **//*! #__NO_SIDE_EFFECTS__ */function hn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const je=Jl.NODE_ENV!=="production"?Object.freeze({}):{},Mr=Jl.NODE_ENV!=="production"?Object.freeze([]):[],Qe=()=>{},eh=()=>!1,go=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ms=e=>e.startsWith("onUpdate:"),Ke=Object.assign,Vi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},th=Object.prototype.hasOwnProperty,De=(e,t)=>th.call(e,t),le=Array.isArray,ir=e=>vs(e)==="[object Map]",Yl=e=>vs(e)==="[object Set]",ce=e=>typeof e=="function",Ze=e=>typeof e=="string",An=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Ri=e=>(Ie(e)||ce(e))&&ce(e.then)&&ce(e.catch),Xl=Object.prototype.toString,vs=e=>Xl.call(e),ji=e=>vs(e).slice(8,-1),Ql=e=>vs(e)==="[object Object]",Li=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nh=hn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),gs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},rh=/-(\w)/g,Ct=gs(e=>e.replace(rh,(t,n)=>n?n.toUpperCase():"")),oh=/\B([A-Z])/g,mn=gs(e=>e.replace(oh,"-$1").toLowerCase()),ar=gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),lr=gs(e=>e?`on${ar(e)}`:""),Vn=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ys=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},sh=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ih=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let eu;const Mi=()=>eu||(eu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ui(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?ch(r):Ui(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const ah=/;(?![^(]*\))/g,lh=/:([^]+)/,uh=/\/\*[^]*?\*\//g;function ch(e){const t={};return e.replace(uh,"").split(ah).forEach(n=>{if(n){const r=n.split(lh);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function bs(e){let t="";if(Ze(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const r=bs(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const dh="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",fh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",ph="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",hh=hn(dh),mh=hn(fh),vh=hn(ph),gh=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tu(e){return!!e||e===""}const nu=e=>!!(e&&e.__v_isRef===!0),K=e=>Ze(e)?e:e==null?"":le(e)||Ie(e)&&(e.toString===Xl||!ce(e.toString))?nu(e)?K(e.value):JSON.stringify(e,ru,2):String(e),ru=(e,t)=>nu(t)?ru(e,t.value):ir(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Fi(r,s)+" =>"]=o,n),{})}:Yl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Fi(n))}:An(t)?Fi(t):Ie(t)&&!le(t)&&!Ql(t)?String(t):t,Fi=(e,t="")=>{var n;return An(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let gt;class ou{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&&gt&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=gt;try{return gt=this,t()}finally{gt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){gt=this}off(){gt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function su(e){return new ou(e)}function iu(){return gt}function yh(e,t=!1){gt?gt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Bi=new WeakSet;class au{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,gt&&gt.active&&gt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Bi.has(this)&&(Bi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=_o,_o=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pu(this),uu(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),cu(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Wi(t);this.deps=this.depsTail=void 0,pu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Bi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){qi(this)&&this.run()}get dirty(){return qi(this)}}let lu=0,_o;function Hi(){lu++}function Zi(){if(--lu>0)return;let e;for(;_o;){let t=_o;for(_o=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function uu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),Wi(r),bh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function qi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&du(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function du(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wo))return;e.globalVersion=wo;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!qi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{uu(e);const o=e.fn(e._value);(t.version===0||Vn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,cu(e),e.flags&=-3}}function Wi(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Wi(o)}}function bh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const fu=[];function vn(){fu.push(Bt),Bt=!1}function gn(){const e=fu.pop();Bt=e===void 0?!0:e}function pu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let wo=0;class zi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&hu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,wo++,this.notify(t)}notify(t){Hi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{Zi()}}}function hu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const _s=new WeakMap,ur=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Ki=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),Eo=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function et(e,t,n){if(Bt&&Ae){let r=_s.get(e);r||_s.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new zi),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function Qt(e,t,n,r,o,s){const i=_s.get(e);if(!i){wo++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=le(e),u=l&&Li(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Eo||!An(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(Eo)),t){case"add":l?u&&c(i.get("length")):(c(i.get(ur)),ir(e)&&c(i.get(Ki)));break;case"delete":l||(c(i.get(ur)),ir(e)&&c(i.get(Ki)));break;case"set":ir(e)&&c(i.get(ur));break}}}Hi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();Zi()}function _h(e,t){var n;return(n=_s.get(e))==null?void 0:n.get(t)}function Ur(e){const t=ye(e);return t===e?t:(et(t,"iterate",Eo),Ot(e)?t:t.map(ct))}function ws(e){return et(e=ye(e),"iterate",Eo),e}const wh={__proto__:null,[Symbol.iterator](){return Gi(this,Symbol.iterator,ct)},concat(...e){return Ur(this).concat(...e.map(t=>le(t)?Ur(t):t))},entries(){return Gi(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return yn(this,"find",e,t,ct,arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ji(this,"includes",e)},indexOf(...e){return Ji(this,"indexOf",e)},join(e){return Ur(this).join(e)},lastIndexOf(...e){return Ji(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return Oo(this,"pop")},push(...e){return Oo(this,"push",e)},reduce(e,...t){return mu(this,"reduce",e,t)},reduceRight(e,...t){return mu(this,"reduceRight",e,t)},shift(){return Oo(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return Oo(this,"splice",e)},toReversed(){return Ur(this).toReversed()},toSorted(e){return Ur(this).toSorted(e)},toSpliced(...e){return Ur(this).toSpliced(...e)},unshift(...e){return Oo(this,"unshift",e)},values(){return Gi(this,"values",ct)}};function Gi(e,t,n){const r=ws(e),o=r[t]();return r!==e&&!Ot(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Eh=Array.prototype;function yn(e,t,n,r,o,s){const i=ws(e),a=i!==e&&!Ot(e),l=i[t];if(l!==Eh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function mu(e,t,n,r){const o=ws(e);let s=n;return o!==e&&(Ot(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Ji(e,t,n){const r=ye(e);et(r,"iterate",Eo);const o=r[t](...n);return(o===-1||o===!1)&&So(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function Oo(e,t,n=[]){vn(),Hi();const r=ye(e)[t].apply(e,n);return Zi(),gn(),r}const Oh=hn("__proto__,__v_isRef,__isVue"),vu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(An));function Nh(e){An(e)||(e=String(e));const t=ye(this);return et(t,"has",e),t.hasOwnProperty(e)}class gu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Tu:ku:s?xu:Su).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=le(t);if(!o){let l;if(i&&(l=wh[n]))return l;if(n==="hasOwnProperty")return Nh}const a=Reflect.get(t,n,qe(t)?t:r);return(An(n)?vu.has(n):Oh(n))||(o||et(t,"get",n),s)?a:qe(a)?i&&Li(n)?a:a.value:Ie(a)?o?Cu(a):No(a):a}}class yu extends gu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=bn(s);if(!Ot(r)&&!bn(r)&&(s=ye(s),r=ye(r)),!le(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=le(t)&&Li(n)?Number(n)<t.length:De(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?Vn(r,s)&&Qt(t,"set",n,r,s):Qt(t,"add",n,r)),a}deleteProperty(t,n){const r=De(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Qt(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!An(n)||!vu.has(n))&&et(t,"has",n),r}ownKeys(t){return et(t,"iterate",le(t)?"length":ur),Reflect.ownKeys(t)}}class bu extends gu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Sh=new yu,xh=new bu,kh=new yu(!0),Th=new bu(!0),Yi=e=>e,Es=e=>Reflect.getPrototypeOf(e);function Os(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(Vn(t,s)&&et(o,"get",t),et(o,"get",s));const{has:i}=Es(o),a=r?Yi:n?Xi:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function Ns(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(Vn(e,o)&&et(r,"has",e),et(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ss(e,t=!1){return e=e.__v_raw,!t&&et(ye(e),"iterate",ur),Reflect.get(e,"size",e)}function _u(e,t=!1){!t&&!Ot(e)&&!bn(e)&&(e=ye(e));const n=ye(this);return Es(n).has.call(n,e)||(n.add(e),Qt(n,"add",e,e)),this}function wu(e,t,n=!1){!n&&!Ot(t)&&!bn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=Es(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&Nu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Vn(t,a)&&Qt(r,"set",e,t,a):Qt(r,"add",e,t),this}function Eu(e){const t=ye(this),{has:n,get:r}=Es(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&Nu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Qt(t,"delete",e,void 0,s),i}function Ou(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?ir(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Qt(e,"clear",void 0,void 0,n),r}function xs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Yi:e?Xi:ct;return!e&&et(a,"iterate",ur),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function ks(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=ir(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Yi:t?Xi:ct;return!t&&et(s,"iterate",l?Ki:ur),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Rn(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${ar(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ch(){const e={get(s){return Os(this,s)},get size(){return Ss(this)},has:Ns,add:_u,set:wu,delete:Eu,clear:Ou,forEach:xs(!1,!1)},t={get(s){return Os(this,s,!1,!0)},get size(){return Ss(this)},has:Ns,add(s){return _u.call(this,s,!0)},set(s,i){return wu.call(this,s,i,!0)},delete:Eu,clear:Ou,forEach:xs(!1,!0)},n={get(s){return Os(this,s,!0)},get size(){return Ss(this,!0)},has(s){return Ns.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:xs(!0,!1)},r={get(s){return Os(this,s,!0,!0)},get size(){return Ss(this,!0)},has(s){return Ns.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:xs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=ks(s,!1,!1),n[s]=ks(s,!0,!1),t[s]=ks(s,!1,!0),r[s]=ks(s,!0,!0)}),[e,n,t,r]}const[Ph,Dh,$h,Ih]=Ch();function Ts(e,t){const n=t?e?Ih:$h:e?Dh:Ph;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(De(n,o)&&o in r?n:r,o,s)}const Ah={get:Ts(!1,!1)},Vh={get:Ts(!1,!0)},Rh={get:Ts(!0,!1)},jh={get:Ts(!0,!0)};function Nu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=ji(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Su=new WeakMap,xu=new WeakMap,ku=new WeakMap,Tu=new WeakMap;function Lh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mh(e){return e.__v_skip||!Object.isExtensible(e)?0:Lh(ji(e))}function No(e){return bn(e)?e:Cs(e,!1,Sh,Ah,Su)}function Uh(e){return Cs(e,!1,kh,Vh,xu)}function Cu(e){return Cs(e,!0,xh,Rh,ku)}function en(e){return Cs(e,!0,Th,jh,Tu)}function Cs(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Mh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function tn(e){return bn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function So(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function jn(e){return Object.isExtensible(e)&&ys(e,"__v_skip",!0),e}const ct=e=>Ie(e)?No(e):e,Xi=e=>Ie(e)?Cu(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function C(e){return Pu(e,!1)}function Fh(e){return Pu(e,!0)}function Pu(e,t){return qe(e)?e:new Bh(e,t)}class Bh{constructor(t,n){this.dep=new zi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ot(t)||bn(t);t=r?t:ye(t),Vn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function _(e){return qe(e)?e.value:e}function Ln(e){return ce(e)?e():_(e)}const Hh={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Du(e){return tn(e)?e:new Proxy(e,Hh)}function $u(e){Ve.NODE_ENV!=="production"&&!So(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=le(e)?new Array(e.length):{};for(const n in e)t[n]=Iu(e,n);return t}class Zh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return _h(ye(this._object),this._key)}}class qh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qi(e,t,n){return qe(e)?e:ce(e)?new qh(e):Ie(e)&&arguments.length>1?Iu(e,t,n):C(e)}function Iu(e,t,n){const r=e[t];return qe(r)?r:new Zh(e,t,n)}class Wh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return du(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function zh(e,t,n=!1){let r,o;ce(e)?r=e:(r=e.get,o=e.set);const s=new Wh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const Ps={},Ds=new WeakMap;let cr;function Kh(e,t=!1,n=cr){if(n){let r=Ds.get(n);r||Ds.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gh(e,t,n=je){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=S=>{(n.onWarn||At)("Invalid watch source: ",S,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=S=>o?S:Ot(S)||o===!1||o===0?Mn(S,1):Mn(S);let d,f,m,b,O=!1,w=!1;if(qe(e)?(f=()=>e.value,O=Ot(e)):tn(e)?(f=()=>c(e),O=!0):le(e)?(w=!0,O=e.some(S=>tn(S)||Ot(S)),f=()=>e.map(S=>{if(qe(S))return S.value;if(tn(S))return c(S);if(ce(S))return l?l(S,2):S();Ve.NODE_ENV!=="production"&&u(S)})):ce(e)?t?f=l?()=>l(e,2):e:f=()=>{if(m){vn();try{m()}finally{gn()}}const S=cr;cr=d;try{return l?l(e,3,[b]):e(b)}finally{cr=S}}:(f=Qe,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const S=f,U=o===!0?1/0:o;f=()=>Mn(S(),U)}const $=iu(),H=()=>{d.stop(),$&&Vi($.effects,d)};if(s)if(t){const S=t;t=(...U)=>{S(...U),H()}}else{const S=f;f=()=>{S(),H()}}let T=w?new Array(e.length).fill(Ps):Ps;const te=S=>{if(!(!(d.flags&1)||!d.dirty&&!S))if(t){const U=d.run();if(o||O||(w?U.some((j,ge)=>Vn(j,T[ge])):Vn(U,T))){m&&m();const j=cr;cr=d;try{const ge=[U,T===Ps?void 0:w&&T[0]===Ps?[]:T,b];l?l(t,3,ge):t(...ge),T=U}finally{cr=j}}}else d.run()};return a&&a(te),d=new au(f),d.scheduler=i?()=>i(te,!1):te,b=S=>Kh(S,!1,d),m=d.onStop=()=>{const S=Ds.get(d);if(S){if(l)l(S,4);else for(const U of S)U();Ds.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?te(!0):T=d.run():i?i(te.bind(null,!0),!0):d.run(),H.pause=d.pause.bind(d),H.resume=d.resume.bind(d),H.stop=H,H}function Mn(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Mn(e.value,t,n);else if(le(e))for(let r=0;r<e.length;r++)Mn(e[r],t,n);else if(Yl(e)||ir(e))e.forEach(r=>{Mn(r,t,n)});else if(Ql(e)){for(const r in e)Mn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Mn(e[r],t,n)}return e}var g={};const dr=[];function $s(e){dr.push(e)}function Is(){dr.pop()}let ea=!1;function F(e,...t){if(ea)return;ea=!0,vn();const n=dr.length?dr[dr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Jh();if(r)Fr(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Js(n,s.type)}>`).join(`
7
+ **//*! #__NO_SIDE_EFFECTS__ */function hn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const je=Jl.NODE_ENV!=="production"?Object.freeze({}):{},Lr=Jl.NODE_ENV!=="production"?Object.freeze([]):[],Qe=()=>{},eh=()=>!1,go=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ms=e=>e.startsWith("onUpdate:"),Ke=Object.assign,Vi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},th=Object.prototype.hasOwnProperty,De=(e,t)=>th.call(e,t),le=Array.isArray,ir=e=>vs(e)==="[object Map]",Yl=e=>vs(e)==="[object Set]",ce=e=>typeof e=="function",Ze=e=>typeof e=="string",An=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Ri=e=>(Ie(e)||ce(e))&&ce(e.then)&&ce(e.catch),Xl=Object.prototype.toString,vs=e=>Xl.call(e),ji=e=>vs(e).slice(8,-1),Ql=e=>vs(e)==="[object Object]",Li=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nh=hn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),gs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},rh=/-(\w)/g,Ct=gs(e=>e.replace(rh,(t,n)=>n?n.toUpperCase():"")),oh=/\B([A-Z])/g,mn=gs(e=>e.replace(oh,"-$1").toLowerCase()),ar=gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),lr=gs(e=>e?`on${ar(e)}`:""),Vn=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ys=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},sh=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ih=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let eu;const Mi=()=>eu||(eu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ui(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?ch(r):Ui(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const ah=/;(?![^(]*\))/g,lh=/:([^]+)/,uh=/\/\*[^]*?\*\//g;function ch(e){const t={};return e.replace(uh,"").split(ah).forEach(n=>{if(n){const r=n.split(lh);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function bs(e){let t="";if(Ze(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const r=bs(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const dh="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",fh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",ph="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",hh=hn(dh),mh=hn(fh),vh=hn(ph),gh=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tu(e){return!!e||e===""}const nu=e=>!!(e&&e.__v_isRef===!0),K=e=>Ze(e)?e:e==null?"":le(e)||Ie(e)&&(e.toString===Xl||!ce(e.toString))?nu(e)?K(e.value):JSON.stringify(e,ru,2):String(e),ru=(e,t)=>nu(t)?ru(e,t.value):ir(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Fi(r,s)+" =>"]=o,n),{})}:Yl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Fi(n))}:An(t)?Fi(t):Ie(t)&&!le(t)&&!Ql(t)?String(t):t,Fi=(e,t="")=>{var n;return An(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let gt;class ou{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&&gt&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=gt;try{return gt=this,t()}finally{gt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){gt=this}off(){gt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function su(e){return new ou(e)}function iu(){return gt}function yh(e,t=!1){gt?gt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Bi=new WeakSet;class au{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,gt&&gt.active&&gt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Bi.has(this)&&(Bi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=_o,_o=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pu(this),uu(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),cu(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Wi(t);this.deps=this.depsTail=void 0,pu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Bi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){qi(this)&&this.run()}get dirty(){return qi(this)}}let lu=0,_o;function Hi(){lu++}function Zi(){if(--lu>0)return;let e;for(;_o;){let t=_o;for(_o=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function uu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),Wi(r),bh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function qi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&du(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function du(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wo))return;e.globalVersion=wo;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!qi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{uu(e);const o=e.fn(e._value);(t.version===0||Vn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,cu(e),e.flags&=-3}}function Wi(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Wi(o)}}function bh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const fu=[];function vn(){fu.push(Bt),Bt=!1}function gn(){const e=fu.pop();Bt=e===void 0?!0:e}function pu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let wo=0;class zi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&hu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,wo++,this.notify(t)}notify(t){Hi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{Zi()}}}function hu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const _s=new WeakMap,ur=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Ki=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),Eo=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function et(e,t,n){if(Bt&&Ae){let r=_s.get(e);r||_s.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new zi),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function Qt(e,t,n,r,o,s){const i=_s.get(e);if(!i){wo++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=le(e),u=l&&Li(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Eo||!An(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(Eo)),t){case"add":l?u&&c(i.get("length")):(c(i.get(ur)),ir(e)&&c(i.get(Ki)));break;case"delete":l||(c(i.get(ur)),ir(e)&&c(i.get(Ki)));break;case"set":ir(e)&&c(i.get(ur));break}}}Hi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();Zi()}function _h(e,t){var n;return(n=_s.get(e))==null?void 0:n.get(t)}function Mr(e){const t=ye(e);return t===e?t:(et(t,"iterate",Eo),Ot(e)?t:t.map(ct))}function ws(e){return et(e=ye(e),"iterate",Eo),e}const wh={__proto__:null,[Symbol.iterator](){return Gi(this,Symbol.iterator,ct)},concat(...e){return Mr(this).concat(...e.map(t=>le(t)?Mr(t):t))},entries(){return Gi(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return yn(this,"find",e,t,ct,arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ji(this,"includes",e)},indexOf(...e){return Ji(this,"indexOf",e)},join(e){return Mr(this).join(e)},lastIndexOf(...e){return Ji(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return Oo(this,"pop")},push(...e){return Oo(this,"push",e)},reduce(e,...t){return mu(this,"reduce",e,t)},reduceRight(e,...t){return mu(this,"reduceRight",e,t)},shift(){return Oo(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return Oo(this,"splice",e)},toReversed(){return Mr(this).toReversed()},toSorted(e){return Mr(this).toSorted(e)},toSpliced(...e){return Mr(this).toSpliced(...e)},unshift(...e){return Oo(this,"unshift",e)},values(){return Gi(this,"values",ct)}};function Gi(e,t,n){const r=ws(e),o=r[t]();return r!==e&&!Ot(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Eh=Array.prototype;function yn(e,t,n,r,o,s){const i=ws(e),a=i!==e&&!Ot(e),l=i[t];if(l!==Eh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function mu(e,t,n,r){const o=ws(e);let s=n;return o!==e&&(Ot(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Ji(e,t,n){const r=ye(e);et(r,"iterate",Eo);const o=r[t](...n);return(o===-1||o===!1)&&So(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function Oo(e,t,n=[]){vn(),Hi();const r=ye(e)[t].apply(e,n);return Zi(),gn(),r}const Oh=hn("__proto__,__v_isRef,__isVue"),vu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(An));function Nh(e){An(e)||(e=String(e));const t=ye(this);return et(t,"has",e),t.hasOwnProperty(e)}class gu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Tu:ku:s?xu:Su).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=le(t);if(!o){let l;if(i&&(l=wh[n]))return l;if(n==="hasOwnProperty")return Nh}const a=Reflect.get(t,n,qe(t)?t:r);return(An(n)?vu.has(n):Oh(n))||(o||et(t,"get",n),s)?a:qe(a)?i&&Li(n)?a:a.value:Ie(a)?o?Cu(a):No(a):a}}class yu extends gu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=bn(s);if(!Ot(r)&&!bn(r)&&(s=ye(s),r=ye(r)),!le(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=le(t)&&Li(n)?Number(n)<t.length:De(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?Vn(r,s)&&Qt(t,"set",n,r,s):Qt(t,"add",n,r)),a}deleteProperty(t,n){const r=De(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Qt(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!An(n)||!vu.has(n))&&et(t,"has",n),r}ownKeys(t){return et(t,"iterate",le(t)?"length":ur),Reflect.ownKeys(t)}}class bu extends gu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Sh=new yu,xh=new bu,kh=new yu(!0),Th=new bu(!0),Yi=e=>e,Es=e=>Reflect.getPrototypeOf(e);function Os(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(Vn(t,s)&&et(o,"get",t),et(o,"get",s));const{has:i}=Es(o),a=r?Yi:n?Xi:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function Ns(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(Vn(e,o)&&et(r,"has",e),et(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ss(e,t=!1){return e=e.__v_raw,!t&&et(ye(e),"iterate",ur),Reflect.get(e,"size",e)}function _u(e,t=!1){!t&&!Ot(e)&&!bn(e)&&(e=ye(e));const n=ye(this);return Es(n).has.call(n,e)||(n.add(e),Qt(n,"add",e,e)),this}function wu(e,t,n=!1){!n&&!Ot(t)&&!bn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=Es(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&Nu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Vn(t,a)&&Qt(r,"set",e,t,a):Qt(r,"add",e,t),this}function Eu(e){const t=ye(this),{has:n,get:r}=Es(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&Nu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Qt(t,"delete",e,void 0,s),i}function Ou(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?ir(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Qt(e,"clear",void 0,void 0,n),r}function xs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Yi:e?Xi:ct;return!e&&et(a,"iterate",ur),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function ks(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=ir(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Yi:t?Xi:ct;return!t&&et(s,"iterate",l?Ki:ur),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Rn(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${ar(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ch(){const e={get(s){return Os(this,s)},get size(){return Ss(this)},has:Ns,add:_u,set:wu,delete:Eu,clear:Ou,forEach:xs(!1,!1)},t={get(s){return Os(this,s,!1,!0)},get size(){return Ss(this)},has:Ns,add(s){return _u.call(this,s,!0)},set(s,i){return wu.call(this,s,i,!0)},delete:Eu,clear:Ou,forEach:xs(!1,!0)},n={get(s){return Os(this,s,!0)},get size(){return Ss(this,!0)},has(s){return Ns.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:xs(!0,!1)},r={get(s){return Os(this,s,!0,!0)},get size(){return Ss(this,!0)},has(s){return Ns.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:xs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=ks(s,!1,!1),n[s]=ks(s,!0,!1),t[s]=ks(s,!1,!0),r[s]=ks(s,!0,!0)}),[e,n,t,r]}const[Ph,Dh,$h,Ih]=Ch();function Ts(e,t){const n=t?e?Ih:$h:e?Dh:Ph;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(De(n,o)&&o in r?n:r,o,s)}const Ah={get:Ts(!1,!1)},Vh={get:Ts(!1,!0)},Rh={get:Ts(!0,!1)},jh={get:Ts(!0,!0)};function Nu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=ji(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Su=new WeakMap,xu=new WeakMap,ku=new WeakMap,Tu=new WeakMap;function Lh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mh(e){return e.__v_skip||!Object.isExtensible(e)?0:Lh(ji(e))}function No(e){return bn(e)?e:Cs(e,!1,Sh,Ah,Su)}function Uh(e){return Cs(e,!1,kh,Vh,xu)}function Cu(e){return Cs(e,!0,xh,Rh,ku)}function en(e){return Cs(e,!0,Th,jh,Tu)}function Cs(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Mh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function tn(e){return bn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function So(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function jn(e){return Object.isExtensible(e)&&ys(e,"__v_skip",!0),e}const ct=e=>Ie(e)?No(e):e,Xi=e=>Ie(e)?Cu(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function C(e){return Pu(e,!1)}function Fh(e){return Pu(e,!0)}function Pu(e,t){return qe(e)?e:new Bh(e,t)}class Bh{constructor(t,n){this.dep=new zi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ot(t)||bn(t);t=r?t:ye(t),Vn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function _(e){return qe(e)?e.value:e}function Ln(e){return ce(e)?e():_(e)}const Hh={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Du(e){return tn(e)?e:new Proxy(e,Hh)}function $u(e){Ve.NODE_ENV!=="production"&&!So(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=le(e)?new Array(e.length):{};for(const n in e)t[n]=Iu(e,n);return t}class Zh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return _h(ye(this._object),this._key)}}class qh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qi(e,t,n){return qe(e)?e:ce(e)?new qh(e):Ie(e)&&arguments.length>1?Iu(e,t,n):C(e)}function Iu(e,t,n){const r=e[t];return qe(r)?r:new Zh(e,t,n)}class Wh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return du(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function zh(e,t,n=!1){let r,o;ce(e)?r=e:(r=e.get,o=e.set);const s=new Wh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const Ps={},Ds=new WeakMap;let cr;function Kh(e,t=!1,n=cr){if(n){let r=Ds.get(n);r||Ds.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gh(e,t,n=je){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=S=>{(n.onWarn||At)("Invalid watch source: ",S,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=S=>o?S:Ot(S)||o===!1||o===0?Mn(S,1):Mn(S);let d,f,m,b,O=!1,w=!1;if(qe(e)?(f=()=>e.value,O=Ot(e)):tn(e)?(f=()=>c(e),O=!0):le(e)?(w=!0,O=e.some(S=>tn(S)||Ot(S)),f=()=>e.map(S=>{if(qe(S))return S.value;if(tn(S))return c(S);if(ce(S))return l?l(S,2):S();Ve.NODE_ENV!=="production"&&u(S)})):ce(e)?t?f=l?()=>l(e,2):e:f=()=>{if(m){vn();try{m()}finally{gn()}}const S=cr;cr=d;try{return l?l(e,3,[b]):e(b)}finally{cr=S}}:(f=Qe,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const S=f,U=o===!0?1/0:o;f=()=>Mn(S(),U)}const $=iu(),H=()=>{d.stop(),$&&Vi($.effects,d)};if(s)if(t){const S=t;t=(...U)=>{S(...U),H()}}else{const S=f;f=()=>{S(),H()}}let T=w?new Array(e.length).fill(Ps):Ps;const te=S=>{if(!(!(d.flags&1)||!d.dirty&&!S))if(t){const U=d.run();if(o||O||(w?U.some((j,ge)=>Vn(j,T[ge])):Vn(U,T))){m&&m();const j=cr;cr=d;try{const ge=[U,T===Ps?void 0:w&&T[0]===Ps?[]:T,b];l?l(t,3,ge):t(...ge),T=U}finally{cr=j}}}else d.run()};return a&&a(te),d=new au(f),d.scheduler=i?()=>i(te,!1):te,b=S=>Kh(S,!1,d),m=d.onStop=()=>{const S=Ds.get(d);if(S){if(l)l(S,4);else for(const U of S)U();Ds.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?te(!0):T=d.run():i?i(te.bind(null,!0),!0):d.run(),H.pause=d.pause.bind(d),H.resume=d.resume.bind(d),H.stop=H,H}function Mn(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Mn(e.value,t,n);else if(le(e))for(let r=0;r<e.length;r++)Mn(e[r],t,n);else if(Yl(e)||ir(e))e.forEach(r=>{Mn(r,t,n)});else if(Ql(e)){for(const r in e)Mn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Mn(e[r],t,n)}return e}var g={};const dr=[];function $s(e){dr.push(e)}function Is(){dr.pop()}let ea=!1;function F(e,...t){if(ea)return;ea=!0,vn();const n=dr.length?dr[dr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Jh();if(r)Ur(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Js(n,s.type)}>`).join(`
8
8
  `),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
9
9
  `,...Yh(o)),console.warn(...s)}gn(),ea=!1}function Jh(){let e=dr[dr.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function Yh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
10
- `],...Xh(n))}),t}function Xh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Js(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Qh(e.props),s]:[o+s]}function Qh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Au(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Au(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Au(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ce(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function em(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?F(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&F(`${t} is NaN - the duration expression might be incorrect.`))}const ta={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Fr(e,t,n,r){try{return r?e(...r):e()}catch(o){xo(o,t,n)}}function Ht(e,t,n,r){if(ce(e)){const o=Fr(e,t,n,r);return o&&Ri(o)&&o.catch(s=>{xo(s,t,n)}),o}if(le(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&F(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function xo(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?ta[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Fr(s,null,10,[e,l,u]),gn();return}}tm(e,n,o,r,i)}function tm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=ta[t];if(n&&$s(n),F(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Is(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let ko=!1,na=!1;const yt=[];let nn=0;const Br=[];let Un=null,Hr=0;const Vu=Promise.resolve();let ra=null;const nm=100;function To(e){const t=ra||Vu;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=ko?nn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=Co(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function As(e){if(!(e.flags&1)){const t=Co(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=Co(n)?yt.push(e):yt.splice(rm(t),0,e),e.flags|=1,Ru()}}function Ru(){!ko&&!na&&(na=!0,ra=Vu.then(Uu))}function ju(e){le(e)?Br.push(...e):Un&&e.id===-1?Un.splice(Hr+1,0,e):e.flags&1||(Br.push(e),e.flags|=1),Ru()}function Lu(e,t,n=ko?nn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&oa(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Mu(e){if(Br.length){const t=[...new Set(Br)].sort((n,r)=>Co(n)-Co(r));if(Br.length=0,Un){Un.push(...t);return}for(Un=t,g.NODE_ENV!=="production"&&(e=e||new Map),Hr=0;Hr<Un.length;Hr++){const n=Un[Hr];g.NODE_ENV!=="production"&&oa(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Un=null,Hr=0}}const Co=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uu(e){na=!1,ko=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>oa(e,n):Qe;try{for(nn=0;nn<yt.length;nn++){const n=yt[nn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Fr(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;nn<yt.length;nn++){const n=yt[nn];n&&(n.flags&=-2)}nn=0,yt.length=0,Mu(e),ko=!1,ra=null,(yt.length||Br.length)&&Uu(e)}}function oa(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>nm){const r=t.i,o=r&&Va(r.type);return xo(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Fn=!1;const Vs=new Map;g.NODE_ENV!=="production"&&(Mi().__VUE_HMR_RUNTIME__={createRecord:sa(Fu),rerender:sa(im),reload:sa(am)});const fr=new Map;function om(e){const t=e.type.__hmrId;let n=fr.get(t);n||(Fu(t,e.type),n=fr.get(t)),n.instances.add(e)}function sm(e){fr.get(e.type.__hmrId).instances.delete(e)}function Fu(e,t){return fr.has(e)?!1:(fr.set(e,{initialDef:Rs(t),instances:new Set}),!0)}function Rs(e){return zc(e)?e.__vccOpts:e}function im(e,t){const n=fr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Rs(r.type).render=t),r.renderCache=[],Fn=!0,r.update(),Fn=!1}))}function am(e,t){const n=fr.get(e);if(!n)return;t=Rs(t),Bu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Rs(s.type);let a=Vs.get(i);a||(i!==n.initialDef&&Bu(i,t),Vs.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?As(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}ju(()=>{Vs.clear()})}function Bu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function sa(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let rn,Po=[],ia=!1;function Do(e,...t){rn?rn.emit(e,...t):ia||Po.push({event:e,args:t})}function Hu(e,t){var n,r;rn=e,rn?(rn.enabled=!0,Po.forEach(({event:o,args:s})=>rn.emit(o,...s)),Po=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Hu(s,t)}),setTimeout(()=>{rn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ia=!0,Po=[])},3e3)):(ia=!0,Po=[])}function lm(e,t){Do("app:init",e,t,{Fragment:xe,Text:jo,Comment:Ge,Static:Lo})}function um(e){Do("app:unmount",e)}const cm=aa("component:added"),Zu=aa("component:updated"),dm=aa("component:removed"),fm=e=>{rn&&typeof rn.cleanupBuffer=="function"&&!rn.cleanupBuffer(e)&&dm(e)};/*! #__NO_SIDE_EFFECTS__ */function aa(e){return t=>{Do(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const pm=qu("perf:start"),hm=qu("perf:end");function qu(e){return(t,n,r)=>{Do(e,t.appContext.app,t.uid,t,n,r)}}function mm(e,t,n){Do("component:emit",e.appContext.app,e,t,n)}let tt=null,Wu=null;function js(e){const t=tt;return tt=e,Wu=e&&e.type.__scopeId||null,t}function _e(e,t=tt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&jc(-1);const s=js(t);let i;try{i=e(...o)}finally{js(s),r._d&&jc(1)}return g.NODE_ENV!=="production"&&Zu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function zu(e){nh(e)&&F("Do not use built-in directive ids as custom directive id: "+e)}function pr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Ku=Symbol("_vte"),Gu=e=>e.__isTeleport,hr=e=>e&&(e.disabled||e.disabled===""),vm=e=>e&&(e.defer||e.defer===""),Ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,la=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!hr(e)&&F(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&F("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!hr(e)&&F(`Invalid Teleport target: ${n}`),n},gm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:b,createText:O,createComment:w}}=u,$=hr(t.props);let{shapeFlag:H,children:T,dynamicChildren:te}=t;if(g.NODE_ENV!=="production"&&Fn&&(l=!1,te=null),e==null){const S=t.el=g.NODE_ENV!=="production"?w("teleport start"):O(""),U=t.anchor=g.NODE_ENV!=="production"?w("teleport end"):O("");m(S,n,r),m(U,n,r);const j=(q,A)=>{H&16&&c(T,q,A,o,s,i,a,l)},ge=()=>{const q=t.target=la(t.props,b),A=Xu(q,t,O,m);q?(i!=="svg"&&Ju(q)?i="svg":i!=="mathml"&&Yu(q)&&(i="mathml"),$||(j(q,A),Ms(t))):g.NODE_ENV!=="production"&&!$&&F("Invalid Teleport target on mount:",q,`(${typeof q})`)};$&&(j(n,U),Ms(t)),vm(t.props)?Nt(ge,s):ge()}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ge=hr(e.props),q=ge?n:U,A=ge?S:j;if(i==="svg"||Ju(U)?i="svg":(i==="mathml"||Yu(U))&&(i="mathml"),te?(f(e.dynamicChildren,te,q,o,s,i,a),Ro(e,t,!0)):l||d(e,t,q,A,o,s,i,a,!1),$)ge?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ls(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=la(t.props,b);V?Ls(t,V,null,u,0):g.NODE_ENV!=="production"&&F("Invalid Teleport target on update:",U,`(${typeof U})`)}else ge&&Ls(t,U,j,u,1);Ms(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!hr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,m,!!O.dynamicChildren)}}},move:Ls,hydrate:ym};function Ls(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||hr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ym(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=la(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(hr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||Xu(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}Ms(t)}return t.anchor&&i(t.anchor)}const bm=gm;function Ms(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Xu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Ku]=s,e&&(r(o,e),r(s,e)),s}const Bn=Symbol("_leaveCb"),Us=Symbol("_enterCb");function _m(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),fa(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Qu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},ec=e=>{const t=e.subTree;return t.component?ec(t.component):t},wm={name:"BaseTransition",props:Qu,setup(e,{slots:t}){const n=zs(),r=_m();return()=>{const o=t.default&&oc(t.default(),!0);if(!o||!o.length)return;const s=tc(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&F(`invalid <transition> mode: ${a}`),r.isLeaving)return ca(s);const l=rc(s);if(!l)return ca(s);let u=ua(l,i,r,n,f=>u=f);l.type!==Ge&&$o(l,u);const c=n.subTree,d=c&&rc(c);if(d&&d.type!==Ge&&!yr(l,d)&&ec(n).type!==Ge){const f=ua(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Ge)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},ca(s);a==="in-out"&&l.type!==Ge&&(f.delayLeave=(m,b,O)=>{const w=nc(r,d);w[String(d.key)]=d,m[Bn]=()=>{b(),m[Bn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function tc(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ge){if(g.NODE_ENV!=="production"&&n){F("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Em=wm;function nc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ua(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:w,onAppear:$,onAfterAppear:H,onAppearCancelled:T}=t,te=String(e.key),S=nc(n,e),U=(q,A)=>{q&&Ht(q,r,9,A)},j=(q,A)=>{const V=A[1];U(q,A),le(q)?q.every(D=>D.length<=1)&&V():q.length<=1&&V()},ge={mode:i,persisted:a,beforeEnter(q){let A=l;if(!n.isMounted)if(s)A=w||l;else return;q[Bn]&&q[Bn](!0);const V=S[te];V&&yr(e,V)&&V.el[Bn]&&V.el[Bn](),U(A,[q])},enter(q){let A=u,V=c,D=d;if(!n.isMounted)if(s)A=$||u,V=H||c,D=T||d;else return;let ie=!1;const $e=q[Us]=E=>{ie||(ie=!0,E?U(D,[q]):U(V,[q]),ge.delayedLeave&&ge.delayedLeave(),q[Us]=void 0)};A?j(A,[q,$e]):$e()},leave(q,A){const V=String(e.key);if(q[Us]&&q[Us](!0),n.isUnmounting)return A();U(f,[q]);let D=!1;const ie=q[Bn]=$e=>{D||(D=!0,A(),$e?U(O,[q]):U(b,[q]),q[Bn]=void 0,S[V]===e&&delete S[V])};S[V]=e,m?j(m,[q,ie]):ie()},clone(q){const A=ua(q,t,n,r,o);return o&&o(A),A}};return ge}function ca(e){if(Io(e))return e=Zt(e),e.children=null,e}function rc(e){if(!Io(e))return Gu(e.type)&&e.children?tc(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ce(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(oc(i.children,t,a))):(t||i.type!==Ge)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function de(e,t){return ce(e)?Ke({name:e.name},t,{setup:e}):e}function sc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Om=new WeakSet;function da(e,t,n,r,o=!1){if(le(e)){e.forEach((b,O)=>da(b,t&&(le(t)?t[O]:t),n,r,o));return}if(Zr(r)&&!o)return;const s=r.shapeFlag&4?Aa(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){F("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),m=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Om.has(f[b])?!1:De(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,m(u)&&(d[u]=null)):qe(u)&&(u.value=null)),ce(l))Fr(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const w=()=>{if(e.f){const $=b?m(l)?d[l]:c[l]:l.value;o?le($)&&Vi($,s):le($)?$.includes(s)||$.push(s):b?(c[l]=[s],m(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,m(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)};i?(w.id=-1,Nt(w,n)):w()}else g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)}}const Zr=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function Nm(e,t){ic(e,"a",t)}function Sm(e,t){ic(e,"da",t)}function ic(e,t,n=Ye){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Fs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Io(o.parent.vnode)&&xm(r,t,n,o),o=o.parent}}function xm(e,t,n,r){const o=Fs(t,e,r,!0);bt(()=>{Vi(r[t],o)},n)}function Fs(e,t,n=Ye,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Fo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=lr(ta[e].replace(/ hook$/,""));F(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Ye)=>{(!Gs||e==="sp")&&Fs(e,(...r)=>t(...r),n)},km=_n("bm"),Le=_n("m"),Tm=_n("bu"),Cm=_n("u"),fa=_n("bum"),bt=_n("um"),Pm=_n("sp"),Dm=_n("rtg"),$m=_n("rtc");function Im(e,t=Ye){Fs("ec",e,t)}const Am="components",ac=Symbol.for("v-ndc");function pa(e){return Ze(e)?Vm(Am,e,!1)||e:e||ac}function Vm(e,t,n=!0,r=!1){const o=tt||Ye;if(o){const s=o.type;{const a=Va(s,!1);if(a&&(a===t||a===Ct(t)||a===ar(Ct(t))))return s}const i=lc(o[e]||s[e],t)||lc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&F(`Failed to resolve ${e.slice(0,-1)}: ${t}
11
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&F(`resolve${ar(e.slice(0,-1))} can only be used in render() or setup().`)}function lc(e,t){return e&&(e[t]||e[Ct(t)]||e[ar(Ct(t))])}function on(e,t,n,r){let o;const s=n,i=le(e);if(i||Ze(e)){const a=i&&tn(e);a&&(e=ws(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&F(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function ha(e,t,n={},r,o){if(tt.ce||tt.parent&&Zr(tt.parent)&&tt.parent.ce)return y(),Ne(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(F("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&uc(s(n)),a=Ne(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function uc(e){return e.some(t=>qr(t)?!(t.type===Ge||t.type===xe&&!uc(t.children)):!0)?e:null}const ma=e=>e?Hc(e)?Aa(e):ma(e.parent):null,mr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?en(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?en(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?en(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?en(e.refs):e.refs,$parent:e=>ma(e.parent),$root:e=>ma(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ba(e),$forceUpdate:e=>e.f||(e.f=()=>{As(e.update)}),$nextTick:e=>e.n||(e.n=To.bind(e.proxy)),$watch:e=>hv.bind(e)}),va=e=>e==="_"||e==="$",ga=(e,t)=>e!==je&&!e.__isScriptSetup&&De(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ga(r,t))return i[t]=1,r[t];if(o!==je&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==je&&De(n,t))return i[t]=4,n[t];ya&&(i[t]=0)}}const c=mr[t];let d,f;if(c)return t==="$attrs"?(et(e.attrs,"get",""),g.NODE_ENV!=="production"&&qs()):g.NODE_ENV!=="production"&&t==="$slots"&&et(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&tt&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&va(t[0])&&De(o,t)?F(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===tt&&F(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return ga(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(F(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&F(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&F(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&De(e,i)||ga(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(mr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(cc.ownKeys=e=>(F("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Rm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(mr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>mr[n](e),set:Qe})}),t}function jm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:Qe})})}function Lm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(va(r[0])){F(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:Qe})}})}function dc(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Mm(){const e=Object.create(null);return(t,n)=>{e[n]?F(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let ya=!0;function Um(e){const t=ba(e),n=e.proxy,r=e.ctx;ya=!1,t.beforeCreate&&fc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:b,activated:O,deactivated:w,beforeDestroy:$,beforeUnmount:H,destroyed:T,unmounted:te,render:S,renderTracked:U,renderTriggered:j,errorCaptured:ge,serverPrefetch:q,expose:A,inheritAttrs:V,components:D,directives:ie,filters:$e}=t,E=g.NODE_ENV!=="production"?Mm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)E("Props",re)}if(u&&Fm(u,r,E),i)for(const Y in i){const re=i[Y];ce(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&E("Methods",Y)):g.NODE_ENV!=="production"&&F(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!ce(o)&&F("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&Ri(Y)&&F("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&F("data() should return an object.");else if(e.data=No(Y),g.NODE_ENV!=="production")for(const re in Y)E("Data",re),va(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:Qe})}if(ya=!0,s)for(const Y in s){const re=s[Y],he=ce(re)?re.bind(n,n):ce(re.get)?re.get.bind(n,n):Qe;g.NODE_ENV!=="production"&&he===Qe&&F(`Computed property "${Y}" has no getter.`);const oe=!ce(re)&&ce(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{F(`Write operation failed: computed property "${Y}" is readonly.`)}:Qe,Fe=Q({get:he,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&E("Computed",Y)}if(a)for(const Y in a)pc(a[Y],r,n,Y);if(l){const Y=ce(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&fc(c,e,"c");function P(Y,re){le(re)?re.forEach(he=>Y(he.bind(n))):re&&Y(re.bind(n))}if(P(km,d),P(Le,f),P(Tm,m),P(Cm,b),P(Nm,O),P(Sm,w),P(Im,ge),P($m,U),P(Dm,j),P(fa,H),P(bt,te),P(Pm,q),le(A))if(A.length){const Y=e.exposed||(e.exposed={});A.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:he=>n[re]=he})})}else e.exposed||(e.exposed={});S&&e.render===Qe&&(e.render=S),V!=null&&(e.inheritAttrs=V),D&&(e.components=D),ie&&(e.directives=ie),q&&sc(e)}function Fm(e,t,n=Qe){le(e)&&(e=_a(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function fc(e,t,n){Ht(le(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function pc(e,t,n,r){let o=r.includes(".")?Dc(n,r):()=>n[r];if(Ze(e)){const s=t[e];ce(s)?Je(o,s):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e}"`,s)}else if(ce(e))Je(o,e.bind(n));else if(Ie(e))if(le(e))e.forEach(s=>pc(s,t,n,r));else{const s=ce(e.handler)?e.handler.bind(n):t[e.handler];ce(s)?Je(o,s,e):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&F(`Invalid watch option: "${r}"`,e)}function ba(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Bs(l,u,i,!0)),Bs(l,t,i)),Ie(t)&&s.set(t,l),l}function Bs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Bs(e,s,n,!0),o&&o.forEach(i=>Bs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&F('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Bm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Bm={data:hc,props:mc,emits:mc,methods:Ao,computed:Ao,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Ao,directives:Ao,watch:Zm,provide:hc,inject:Hm};function hc(e,t){return t?e?function(){return Ke(ce(e)?e.call(this,this):e,ce(t)?t.call(this,this):t)}:t:e}function Hm(e,t){return Ao(_a(e),_a(t))}function _a(e){if(le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Ao(e,t){return e?Ke(Object.create(null),e,t):t}function mc(e,t){return e?le(e)&&le(t)?[...new Set([...e,...t])]:Ke(Object.create(null),dc(e),dc(t??{})):t}function Zm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function vc(){return{app:null,config:{isNativeTag:eh,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qm=0;function Wm(e,t){return function(r,o=null){ce(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&F("root props passed to app.mount() must be an object."),o=null);const s=vc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:qm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Kc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&F("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&F("Plugin has already been applied to target app."):c&&ce(c.install)?(i.add(c),c.install(u,...d)):ce(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&F('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&F("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&$a(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&F(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&zu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&F(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&F("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&F("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const m=u._ceVNode||Z(r,o);return m.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(m),c,f)}),d&&t?t(m,c):e(m,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=m.component,lm(u,Kc)),Aa(m.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&F(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,um(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&F("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&F(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=vr;vr=u;try{return c()}finally{vr=d}}};return u}}let vr=null;function dt(e,t){if(!Ye)g.NODE_ENV!=="production"&&F("provide() can only be used inside setup().");else{let n=Ye.provides;const r=Ye.parent&&Ye.parent.provides;r===n&&(n=Ye.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Ye||tt;if(r||vr){const o=vr?vr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&ce(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&F(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&F("inject() can only be used inside setup() or functional components.")}function zm(){return!!(Ye||tt||vr)}const gc={},yc=()=>Object.create(gc),bc=e=>Object.getPrototypeOf(e)===gc;function Km(e,t,n,r=!1){const o={},s=yc();e.propsDefaults=Object.create(null),_c(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Oc(t||{},o,e),n?e.props=r?o:Uh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Gm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Jm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Gm(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Zs(e.emitsOptions,f))continue;const m=t[f];if(l)if(De(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const b=Ct(f);o[b]=wa(l,a,b,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{_c(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=mn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=wa(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&Qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&Oc(t||{},o,e)}function _c(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(yo(l))continue;const u=t[l];let c;o&&De(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Zs(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=wa(o,l,d,u[d],e,!De(u,d))}}return i}function wa(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&ce(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Fo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const Ym=new WeakMap;function wc(e,t,n=!1){const r=n?Ym:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!ce(e)){const c=d=>{l=!0;const[f,m]=wc(d,t,!0);Ke(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Mr),Mr;if(le(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&F("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);Ec(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&F("invalid props options",s);for(const c in s){const d=Ct(c);if(Ec(d)){const f=s[c],m=i[d]=le(f)||ce(f)?{type:f}:Ke({},f),b=m.type;let O=!1,w=!0;if(le(b))for(let $=0;$<b.length;++$){const H=b[$],T=ce(H)&&H.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(w=!1)}else O=ce(b)&&b.name==="Boolean";m[0]=O,m[1]=w,(O||De(m,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function Ec(e){return e[0]!=="$"&&!yo(e)?!0:(g.NODE_ENV!=="production"&&F(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Xm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Oc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&Qm(s,r[s],i,g.NODE_ENV!=="production"?en(r):r,!De(e,s)&&!De(e,mn(s)))}}function Qm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){F('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=le(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:b}=tv(t,c[f]);d.push(b||""),u=m}if(!u){F(nv(e,t,d));return}}a&&!a(t,r)&&F('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ev=hn("String,Number,Boolean,Function,Symbol,BigInt");function tv(e,t){let n;const r=Xm(t);if(r==="null")n=e===null;else if(ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=le(e):n=e instanceof t;return{valid:n,expectedType:r}}function nv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ar).join(" | ")}`;const o=n[0],s=ji(t),i=Nc(t,o),a=Nc(t,s);return n.length===1&&Sc(o)&&!rv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Sc(s)&&(r+=`with value ${a}.`),r}function Nc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Sc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function rv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const xc=e=>e[0]==="_"||e==="$stable",Ea=e=>le(e)?e.map(qt):[qt(e)],ov=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Ye&&(!n||n.root===Ye.root)&&F(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ea(t(...o))),n);return r._c=!1,r},kc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(xc(o))continue;const s=e[o];if(ce(s))t[o]=ov(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&F(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Ea(s);t[o]=()=>i}}},Tc=(e,t)=>{g.NODE_ENV!=="production"&&!Io(e.vnode)&&F("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Ea(t);e.slots.default=()=>n},Oa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},sv=(e,t,n)=>{const r=e.slots=yc();if(e.vnode.shapeFlag&32){const o=t._;o?(Oa(r,t,n),n&&ys(r,"_",o,!0)):kc(t,r)}else t&&Tc(e,t)},iv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Fn?(Oa(o,t,n),Qt(e,"set","$slots")):n&&a===1?s=!1:Oa(o,t,n):(s=!t.$stable,kc(t,o)),i=t}else t&&(Tc(e,t),i={default:1});if(s)for(const a in o)!xc(a)&&i[a]==null&&delete o[a]};let Vo,Hn;function wn(e,t){e.appContext.config.performance&&Hs()&&Hn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&pm(e,t,Hs()?Hn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&Hs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Hn.mark(r),Hn.measure(`<${Js(e,e.type)}> ${t}`,n,r),Hn.clearMarks(n),Hn.clearMarks(r)}g.NODE_ENV!=="production"&&hm(e,t,Hs()?Hn.now():Date.now())}function Hs(){return Vo!==void 0||(typeof window<"u"&&window.performance?(Vo=!0,Hn=window.performance):Vo=!1),Vo}function av(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
10
+ `],...Xh(n))}),t}function Xh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Js(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Qh(e.props),s]:[o+s]}function Qh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Au(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Au(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Au(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ce(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function em(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?F(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&F(`${t} is NaN - the duration expression might be incorrect.`))}const ta={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ur(e,t,n,r){try{return r?e(...r):e()}catch(o){xo(o,t,n)}}function Ht(e,t,n,r){if(ce(e)){const o=Ur(e,t,n,r);return o&&Ri(o)&&o.catch(s=>{xo(s,t,n)}),o}if(le(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&F(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function xo(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?ta[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Ur(s,null,10,[e,l,u]),gn();return}}tm(e,n,o,r,i)}function tm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=ta[t];if(n&&$s(n),F(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Is(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let ko=!1,na=!1;const yt=[];let nn=0;const Fr=[];let Un=null,Br=0;const Vu=Promise.resolve();let ra=null;const nm=100;function To(e){const t=ra||Vu;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=ko?nn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=Co(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function As(e){if(!(e.flags&1)){const t=Co(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=Co(n)?yt.push(e):yt.splice(rm(t),0,e),e.flags|=1,Ru()}}function Ru(){!ko&&!na&&(na=!0,ra=Vu.then(Uu))}function ju(e){le(e)?Fr.push(...e):Un&&e.id===-1?Un.splice(Br+1,0,e):e.flags&1||(Fr.push(e),e.flags|=1),Ru()}function Lu(e,t,n=ko?nn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&oa(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Mu(e){if(Fr.length){const t=[...new Set(Fr)].sort((n,r)=>Co(n)-Co(r));if(Fr.length=0,Un){Un.push(...t);return}for(Un=t,g.NODE_ENV!=="production"&&(e=e||new Map),Br=0;Br<Un.length;Br++){const n=Un[Br];g.NODE_ENV!=="production"&&oa(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Un=null,Br=0}}const Co=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uu(e){na=!1,ko=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>oa(e,n):Qe;try{for(nn=0;nn<yt.length;nn++){const n=yt[nn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ur(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;nn<yt.length;nn++){const n=yt[nn];n&&(n.flags&=-2)}nn=0,yt.length=0,Mu(e),ko=!1,ra=null,(yt.length||Fr.length)&&Uu(e)}}function oa(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>nm){const r=t.i,o=r&&Va(r.type);return xo(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Fn=!1;const Vs=new Map;g.NODE_ENV!=="production"&&(Mi().__VUE_HMR_RUNTIME__={createRecord:sa(Fu),rerender:sa(im),reload:sa(am)});const fr=new Map;function om(e){const t=e.type.__hmrId;let n=fr.get(t);n||(Fu(t,e.type),n=fr.get(t)),n.instances.add(e)}function sm(e){fr.get(e.type.__hmrId).instances.delete(e)}function Fu(e,t){return fr.has(e)?!1:(fr.set(e,{initialDef:Rs(t),instances:new Set}),!0)}function Rs(e){return zc(e)?e.__vccOpts:e}function im(e,t){const n=fr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Rs(r.type).render=t),r.renderCache=[],Fn=!0,r.update(),Fn=!1}))}function am(e,t){const n=fr.get(e);if(!n)return;t=Rs(t),Bu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Rs(s.type);let a=Vs.get(i);a||(i!==n.initialDef&&Bu(i,t),Vs.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?As(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}ju(()=>{Vs.clear()})}function Bu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function sa(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let rn,Po=[],ia=!1;function Do(e,...t){rn?rn.emit(e,...t):ia||Po.push({event:e,args:t})}function Hu(e,t){var n,r;rn=e,rn?(rn.enabled=!0,Po.forEach(({event:o,args:s})=>rn.emit(o,...s)),Po=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Hu(s,t)}),setTimeout(()=>{rn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ia=!0,Po=[])},3e3)):(ia=!0,Po=[])}function lm(e,t){Do("app:init",e,t,{Fragment:xe,Text:jo,Comment:Ge,Static:Lo})}function um(e){Do("app:unmount",e)}const cm=aa("component:added"),Zu=aa("component:updated"),dm=aa("component:removed"),fm=e=>{rn&&typeof rn.cleanupBuffer=="function"&&!rn.cleanupBuffer(e)&&dm(e)};/*! #__NO_SIDE_EFFECTS__ */function aa(e){return t=>{Do(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const pm=qu("perf:start"),hm=qu("perf:end");function qu(e){return(t,n,r)=>{Do(e,t.appContext.app,t.uid,t,n,r)}}function mm(e,t,n){Do("component:emit",e.appContext.app,e,t,n)}let tt=null,Wu=null;function js(e){const t=tt;return tt=e,Wu=e&&e.type.__scopeId||null,t}function _e(e,t=tt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&jc(-1);const s=js(t);let i;try{i=e(...o)}finally{js(s),r._d&&jc(1)}return g.NODE_ENV!=="production"&&Zu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function zu(e){nh(e)&&F("Do not use built-in directive ids as custom directive id: "+e)}function pr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Ku=Symbol("_vte"),Gu=e=>e.__isTeleport,hr=e=>e&&(e.disabled||e.disabled===""),vm=e=>e&&(e.defer||e.defer===""),Ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,la=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!hr(e)&&F(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&F("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!hr(e)&&F(`Invalid Teleport target: ${n}`),n},gm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:b,createText:O,createComment:w}}=u,$=hr(t.props);let{shapeFlag:H,children:T,dynamicChildren:te}=t;if(g.NODE_ENV!=="production"&&Fn&&(l=!1,te=null),e==null){const S=t.el=g.NODE_ENV!=="production"?w("teleport start"):O(""),U=t.anchor=g.NODE_ENV!=="production"?w("teleport end"):O("");m(S,n,r),m(U,n,r);const j=(q,A)=>{H&16&&c(T,q,A,o,s,i,a,l)},ge=()=>{const q=t.target=la(t.props,b),A=Xu(q,t,O,m);q?(i!=="svg"&&Ju(q)?i="svg":i!=="mathml"&&Yu(q)&&(i="mathml"),$||(j(q,A),Ms(t))):g.NODE_ENV!=="production"&&!$&&F("Invalid Teleport target on mount:",q,`(${typeof q})`)};$&&(j(n,U),Ms(t)),vm(t.props)?Nt(ge,s):ge()}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ge=hr(e.props),q=ge?n:U,A=ge?S:j;if(i==="svg"||Ju(U)?i="svg":(i==="mathml"||Yu(U))&&(i="mathml"),te?(f(e.dynamicChildren,te,q,o,s,i,a),Ro(e,t,!0)):l||d(e,t,q,A,o,s,i,a,!1),$)ge?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ls(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=la(t.props,b);V?Ls(t,V,null,u,0):g.NODE_ENV!=="production"&&F("Invalid Teleport target on update:",U,`(${typeof U})`)}else ge&&Ls(t,U,j,u,1);Ms(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!hr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,m,!!O.dynamicChildren)}}},move:Ls,hydrate:ym};function Ls(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||hr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ym(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=la(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(hr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||Xu(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}Ms(t)}return t.anchor&&i(t.anchor)}const bm=gm;function Ms(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Xu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Ku]=s,e&&(r(o,e),r(s,e)),s}const Bn=Symbol("_leaveCb"),Us=Symbol("_enterCb");function _m(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),fa(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Qu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},ec=e=>{const t=e.subTree;return t.component?ec(t.component):t},wm={name:"BaseTransition",props:Qu,setup(e,{slots:t}){const n=zs(),r=_m();return()=>{const o=t.default&&oc(t.default(),!0);if(!o||!o.length)return;const s=tc(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&F(`invalid <transition> mode: ${a}`),r.isLeaving)return ca(s);const l=rc(s);if(!l)return ca(s);let u=ua(l,i,r,n,f=>u=f);l.type!==Ge&&$o(l,u);const c=n.subTree,d=c&&rc(c);if(d&&d.type!==Ge&&!yr(l,d)&&ec(n).type!==Ge){const f=ua(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Ge)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},ca(s);a==="in-out"&&l.type!==Ge&&(f.delayLeave=(m,b,O)=>{const w=nc(r,d);w[String(d.key)]=d,m[Bn]=()=>{b(),m[Bn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function tc(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ge){if(g.NODE_ENV!=="production"&&n){F("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Em=wm;function nc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ua(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:w,onAppear:$,onAfterAppear:H,onAppearCancelled:T}=t,te=String(e.key),S=nc(n,e),U=(q,A)=>{q&&Ht(q,r,9,A)},j=(q,A)=>{const V=A[1];U(q,A),le(q)?q.every(D=>D.length<=1)&&V():q.length<=1&&V()},ge={mode:i,persisted:a,beforeEnter(q){let A=l;if(!n.isMounted)if(s)A=w||l;else return;q[Bn]&&q[Bn](!0);const V=S[te];V&&yr(e,V)&&V.el[Bn]&&V.el[Bn](),U(A,[q])},enter(q){let A=u,V=c,D=d;if(!n.isMounted)if(s)A=$||u,V=H||c,D=T||d;else return;let ie=!1;const $e=q[Us]=E=>{ie||(ie=!0,E?U(D,[q]):U(V,[q]),ge.delayedLeave&&ge.delayedLeave(),q[Us]=void 0)};A?j(A,[q,$e]):$e()},leave(q,A){const V=String(e.key);if(q[Us]&&q[Us](!0),n.isUnmounting)return A();U(f,[q]);let D=!1;const ie=q[Bn]=$e=>{D||(D=!0,A(),$e?U(O,[q]):U(b,[q]),q[Bn]=void 0,S[V]===e&&delete S[V])};S[V]=e,m?j(m,[q,ie]):ie()},clone(q){const A=ua(q,t,n,r,o);return o&&o(A),A}};return ge}function ca(e){if(Io(e))return e=Zt(e),e.children=null,e}function rc(e){if(!Io(e))return Gu(e.type)&&e.children?tc(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ce(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(oc(i.children,t,a))):(t||i.type!==Ge)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function de(e,t){return ce(e)?Ke({name:e.name},t,{setup:e}):e}function sc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Om=new WeakSet;function da(e,t,n,r,o=!1){if(le(e)){e.forEach((b,O)=>da(b,t&&(le(t)?t[O]:t),n,r,o));return}if(Hr(r)&&!o)return;const s=r.shapeFlag&4?Aa(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){F("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),m=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Om.has(f[b])?!1:De(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,m(u)&&(d[u]=null)):qe(u)&&(u.value=null)),ce(l))Ur(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const w=()=>{if(e.f){const $=b?m(l)?d[l]:c[l]:l.value;o?le($)&&Vi($,s):le($)?$.includes(s)||$.push(s):b?(c[l]=[s],m(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,m(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)};i?(w.id=-1,Nt(w,n)):w()}else g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)}}const Hr=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function Nm(e,t){ic(e,"a",t)}function Sm(e,t){ic(e,"da",t)}function ic(e,t,n=Ye){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Fs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Io(o.parent.vnode)&&xm(r,t,n,o),o=o.parent}}function xm(e,t,n,r){const o=Fs(t,e,r,!0);bt(()=>{Vi(r[t],o)},n)}function Fs(e,t,n=Ye,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Fo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=lr(ta[e].replace(/ hook$/,""));F(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Ye)=>{(!Gs||e==="sp")&&Fs(e,(...r)=>t(...r),n)},km=_n("bm"),Le=_n("m"),Tm=_n("bu"),Cm=_n("u"),fa=_n("bum"),bt=_n("um"),Pm=_n("sp"),Dm=_n("rtg"),$m=_n("rtc");function Im(e,t=Ye){Fs("ec",e,t)}const Am="components",ac=Symbol.for("v-ndc");function pa(e){return Ze(e)?Vm(Am,e,!1)||e:e||ac}function Vm(e,t,n=!0,r=!1){const o=tt||Ye;if(o){const s=o.type;{const a=Va(s,!1);if(a&&(a===t||a===Ct(t)||a===ar(Ct(t))))return s}const i=lc(o[e]||s[e],t)||lc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&F(`Failed to resolve ${e.slice(0,-1)}: ${t}
11
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&F(`resolve${ar(e.slice(0,-1))} can only be used in render() or setup().`)}function lc(e,t){return e&&(e[t]||e[Ct(t)]||e[ar(Ct(t))])}function on(e,t,n,r){let o;const s=n,i=le(e);if(i||Ze(e)){const a=i&&tn(e);a&&(e=ws(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&F(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function ha(e,t,n={},r,o){if(tt.ce||tt.parent&&Hr(tt.parent)&&tt.parent.ce)return y(),Ne(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(F("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&uc(s(n)),a=Ne(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function uc(e){return e.some(t=>Zr(t)?!(t.type===Ge||t.type===xe&&!uc(t.children)):!0)?e:null}const ma=e=>e?Hc(e)?Aa(e):ma(e.parent):null,mr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?en(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?en(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?en(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?en(e.refs):e.refs,$parent:e=>ma(e.parent),$root:e=>ma(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ba(e),$forceUpdate:e=>e.f||(e.f=()=>{As(e.update)}),$nextTick:e=>e.n||(e.n=To.bind(e.proxy)),$watch:e=>hv.bind(e)}),va=e=>e==="_"||e==="$",ga=(e,t)=>e!==je&&!e.__isScriptSetup&&De(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ga(r,t))return i[t]=1,r[t];if(o!==je&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==je&&De(n,t))return i[t]=4,n[t];ya&&(i[t]=0)}}const c=mr[t];let d,f;if(c)return t==="$attrs"?(et(e.attrs,"get",""),g.NODE_ENV!=="production"&&qs()):g.NODE_ENV!=="production"&&t==="$slots"&&et(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&tt&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&va(t[0])&&De(o,t)?F(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===tt&&F(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return ga(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(F(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&F(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&F(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&De(e,i)||ga(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(mr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(cc.ownKeys=e=>(F("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Rm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(mr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>mr[n](e),set:Qe})}),t}function jm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:Qe})})}function Lm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(va(r[0])){F(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:Qe})}})}function dc(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Mm(){const e=Object.create(null);return(t,n)=>{e[n]?F(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let ya=!0;function Um(e){const t=ba(e),n=e.proxy,r=e.ctx;ya=!1,t.beforeCreate&&fc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:b,activated:O,deactivated:w,beforeDestroy:$,beforeUnmount:H,destroyed:T,unmounted:te,render:S,renderTracked:U,renderTriggered:j,errorCaptured:ge,serverPrefetch:q,expose:A,inheritAttrs:V,components:D,directives:ie,filters:$e}=t,E=g.NODE_ENV!=="production"?Mm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)E("Props",re)}if(u&&Fm(u,r,E),i)for(const Y in i){const re=i[Y];ce(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&E("Methods",Y)):g.NODE_ENV!=="production"&&F(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!ce(o)&&F("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&Ri(Y)&&F("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&F("data() should return an object.");else if(e.data=No(Y),g.NODE_ENV!=="production")for(const re in Y)E("Data",re),va(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:Qe})}if(ya=!0,s)for(const Y in s){const re=s[Y],he=ce(re)?re.bind(n,n):ce(re.get)?re.get.bind(n,n):Qe;g.NODE_ENV!=="production"&&he===Qe&&F(`Computed property "${Y}" has no getter.`);const oe=!ce(re)&&ce(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{F(`Write operation failed: computed property "${Y}" is readonly.`)}:Qe,Fe=Q({get:he,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&E("Computed",Y)}if(a)for(const Y in a)pc(a[Y],r,n,Y);if(l){const Y=ce(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&fc(c,e,"c");function P(Y,re){le(re)?re.forEach(he=>Y(he.bind(n))):re&&Y(re.bind(n))}if(P(km,d),P(Le,f),P(Tm,m),P(Cm,b),P(Nm,O),P(Sm,w),P(Im,ge),P($m,U),P(Dm,j),P(fa,H),P(bt,te),P(Pm,q),le(A))if(A.length){const Y=e.exposed||(e.exposed={});A.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:he=>n[re]=he})})}else e.exposed||(e.exposed={});S&&e.render===Qe&&(e.render=S),V!=null&&(e.inheritAttrs=V),D&&(e.components=D),ie&&(e.directives=ie),q&&sc(e)}function Fm(e,t,n=Qe){le(e)&&(e=_a(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function fc(e,t,n){Ht(le(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function pc(e,t,n,r){let o=r.includes(".")?Dc(n,r):()=>n[r];if(Ze(e)){const s=t[e];ce(s)?Je(o,s):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e}"`,s)}else if(ce(e))Je(o,e.bind(n));else if(Ie(e))if(le(e))e.forEach(s=>pc(s,t,n,r));else{const s=ce(e.handler)?e.handler.bind(n):t[e.handler];ce(s)?Je(o,s,e):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&F(`Invalid watch option: "${r}"`,e)}function ba(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Bs(l,u,i,!0)),Bs(l,t,i)),Ie(t)&&s.set(t,l),l}function Bs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Bs(e,s,n,!0),o&&o.forEach(i=>Bs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&F('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Bm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Bm={data:hc,props:mc,emits:mc,methods:Ao,computed:Ao,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Ao,directives:Ao,watch:Zm,provide:hc,inject:Hm};function hc(e,t){return t?e?function(){return Ke(ce(e)?e.call(this,this):e,ce(t)?t.call(this,this):t)}:t:e}function Hm(e,t){return Ao(_a(e),_a(t))}function _a(e){if(le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Ao(e,t){return e?Ke(Object.create(null),e,t):t}function mc(e,t){return e?le(e)&&le(t)?[...new Set([...e,...t])]:Ke(Object.create(null),dc(e),dc(t??{})):t}function Zm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function vc(){return{app:null,config:{isNativeTag:eh,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qm=0;function Wm(e,t){return function(r,o=null){ce(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&F("root props passed to app.mount() must be an object."),o=null);const s=vc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:qm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Kc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&F("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&F("Plugin has already been applied to target app."):c&&ce(c.install)?(i.add(c),c.install(u,...d)):ce(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&F('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&F("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&$a(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&F(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&zu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&F(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&F("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&F("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const m=u._ceVNode||Z(r,o);return m.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(m),c,f)}),d&&t?t(m,c):e(m,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=m.component,lm(u,Kc)),Aa(m.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&F(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,um(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&F("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&F(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=vr;vr=u;try{return c()}finally{vr=d}}};return u}}let vr=null;function dt(e,t){if(!Ye)g.NODE_ENV!=="production"&&F("provide() can only be used inside setup().");else{let n=Ye.provides;const r=Ye.parent&&Ye.parent.provides;r===n&&(n=Ye.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Ye||tt;if(r||vr){const o=vr?vr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&ce(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&F(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&F("inject() can only be used inside setup() or functional components.")}function zm(){return!!(Ye||tt||vr)}const gc={},yc=()=>Object.create(gc),bc=e=>Object.getPrototypeOf(e)===gc;function Km(e,t,n,r=!1){const o={},s=yc();e.propsDefaults=Object.create(null),_c(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Oc(t||{},o,e),n?e.props=r?o:Uh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Gm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Jm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Gm(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Zs(e.emitsOptions,f))continue;const m=t[f];if(l)if(De(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const b=Ct(f);o[b]=wa(l,a,b,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{_c(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=mn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=wa(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&Qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&Oc(t||{},o,e)}function _c(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(yo(l))continue;const u=t[l];let c;o&&De(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Zs(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=wa(o,l,d,u[d],e,!De(u,d))}}return i}function wa(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&ce(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Fo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const Ym=new WeakMap;function wc(e,t,n=!1){const r=n?Ym:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!ce(e)){const c=d=>{l=!0;const[f,m]=wc(d,t,!0);Ke(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Lr),Lr;if(le(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&F("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);Ec(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&F("invalid props options",s);for(const c in s){const d=Ct(c);if(Ec(d)){const f=s[c],m=i[d]=le(f)||ce(f)?{type:f}:Ke({},f),b=m.type;let O=!1,w=!0;if(le(b))for(let $=0;$<b.length;++$){const H=b[$],T=ce(H)&&H.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(w=!1)}else O=ce(b)&&b.name==="Boolean";m[0]=O,m[1]=w,(O||De(m,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function Ec(e){return e[0]!=="$"&&!yo(e)?!0:(g.NODE_ENV!=="production"&&F(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Xm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Oc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&Qm(s,r[s],i,g.NODE_ENV!=="production"?en(r):r,!De(e,s)&&!De(e,mn(s)))}}function Qm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){F('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=le(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:b}=tv(t,c[f]);d.push(b||""),u=m}if(!u){F(nv(e,t,d));return}}a&&!a(t,r)&&F('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ev=hn("String,Number,Boolean,Function,Symbol,BigInt");function tv(e,t){let n;const r=Xm(t);if(r==="null")n=e===null;else if(ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=le(e):n=e instanceof t;return{valid:n,expectedType:r}}function nv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ar).join(" | ")}`;const o=n[0],s=ji(t),i=Nc(t,o),a=Nc(t,s);return n.length===1&&Sc(o)&&!rv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Sc(s)&&(r+=`with value ${a}.`),r}function Nc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Sc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function rv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const xc=e=>e[0]==="_"||e==="$stable",Ea=e=>le(e)?e.map(qt):[qt(e)],ov=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Ye&&(!n||n.root===Ye.root)&&F(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ea(t(...o))),n);return r._c=!1,r},kc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(xc(o))continue;const s=e[o];if(ce(s))t[o]=ov(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&F(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Ea(s);t[o]=()=>i}}},Tc=(e,t)=>{g.NODE_ENV!=="production"&&!Io(e.vnode)&&F("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Ea(t);e.slots.default=()=>n},Oa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},sv=(e,t,n)=>{const r=e.slots=yc();if(e.vnode.shapeFlag&32){const o=t._;o?(Oa(r,t,n),n&&ys(r,"_",o,!0)):kc(t,r)}else t&&Tc(e,t)},iv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Fn?(Oa(o,t,n),Qt(e,"set","$slots")):n&&a===1?s=!1:Oa(o,t,n):(s=!t.$stable,kc(t,o)),i=t}else t&&(Tc(e,t),i={default:1});if(s)for(const a in o)!xc(a)&&i[a]==null&&delete o[a]};let Vo,Hn;function wn(e,t){e.appContext.config.performance&&Hs()&&Hn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&pm(e,t,Hs()?Hn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&Hs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Hn.mark(r),Hn.measure(`<${Js(e,e.type)}> ${t}`,n,r),Hn.clearMarks(n),Hn.clearMarks(r)}g.NODE_ENV!=="production"&&hm(e,t,Hs()?Hn.now():Date.now())}function Hs(){return Vo!==void 0||(typeof window<"u"&&window.performance?(Vo=!0,Hn=window.performance):Vo=!1),Vo}function av(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
12
12
 
13
- For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=Mi();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=Qe,insertStaticContent:b}=e,O=(p,h,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Fn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!yr(p,h)&&(L=bi(p),Be(p,I,R,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=h;switch(M){case jo:w(p,h,k,L);break;case Ge:$(p,h,k,L);break;case Lo:p==null?H(h,k,L,J):g.NODE_ENV!=="production"&&T(p,h,k,J);break;case xe:ie(p,h,k,L,I,R,J,z,W);break;default:X&1?U(p,h,k,L,I,R,J,z,W):X&6?$e(p,h,k,L,I,R,J,z,W):X&64||X&128?M.process(p,h,k,L,I,R,J,z,W,ts):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&da(me,p&&p.ref,R,h||p,!h)},w=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const I=h.el=p.el;h.children!==p.children&&u(I,h.children)}},$=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},H=(p,h,k,L)=>{[p.el,p.anchor]=b(p.children,h,k,L,p.el,p.anchor)},T=(p,h,k,L)=>{if(h.children!==p.children){const I=f(p.anchor);S(p),[h.el,h.anchor]=b(h.children,k,I,L)}else h.el=p.el,h.anchor=p.anchor},te=({el:p,anchor:h},k,L)=>{let I;for(;p&&p!==h;)I=f(p),r(p,k,L),p=I;r(h,k,L)},S=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},U=(p,h,k,L,I,R,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?j(h,k,L,I,R,J,z,W):A(p,h,I,R,J,z,W)},j=(p,h,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:ae,dirs:we}=p;if(W=p.el=i(p.type,R,me&&me.is,me),X&8?c(W,p.children):X&16&&q(p.children,W,null,L,I,Na(p,R),J,z),we&&pr(p,null,L,"created"),ge(W,p,p.scopeId,J,L),me){for(const He in me)He!=="value"&&!yo(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&sn(M,L,p)}g.NODE_ENV!=="production"&&(ys(W,"__vnode",p,!0),ys(W,"__vueParentComponent",L,!0)),we&&pr(p,null,L,"beforeMount");const Pe=cv(I,ae);Pe&&ae.beforeEnter(W),r(W,h,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&sn(M,L,p),Pe&&ae.enter(W),we&&pr(p,null,L,"mounted")},I)},ge=(p,h,k,L,I)=>{if(k&&m(p,k),L)for(let R=0;R<L.length;R++)m(p,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=Ta(R.children)||R),h===R||Rc(R.type)&&(R.ssContent===h||R.ssFallback===h)){const J=I.vnode;ge(p,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(p,h,k,L,I,R,J,z,W=0)=>{for(let M=W;M<p.length;M++){const me=p[M]=z?Zn(p[M]):qt(p[M]);O(null,me,h,k,L,I,R,J,z)}},A=(p,h,k,L,I,R,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:M,dirs:me}=h;W|=p.patchFlag&16;const X=p.props||je,ae=h.props||je;let we;if(k&&gr(k,!1),(we=ae.onVnodeBeforeUpdate)&&sn(we,k,h,p),me&&pr(h,p,k,"beforeUpdate"),k&&gr(k,!0),g.NODE_ENV!=="production"&&Fn&&(W=0,J=!1,M=null),(X.innerHTML&&ae.innerHTML==null||X.textContent&&ae.textContent==null)&&c(z,""),M?(V(p.dynamicChildren,M,z,k,L,Na(h,I),R),g.NODE_ENV!=="production"&&Ro(p,h)):J||he(p,h,z,null,k,L,Na(h,I),R,!1),W>0){if(W&16)D(z,X,ae,k,I);else if(W&2&&X.class!==ae.class&&s(z,"class",null,ae.class,I),W&4&&s(z,"style",X.style,ae.style,I),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=ae[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,I,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&M==null&&D(z,X,ae,k,I);((we=ae.onVnodeUpdated)||me)&&Nt(()=>{we&&sn(we,k,h,p),me&&pr(h,p,k,"updated")},L)},V=(p,h,k,L,I,R,J)=>{for(let z=0;z<h.length;z++){const W=p[z],M=h[z],me=W.el&&(W.type===xe||!yr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},D=(p,h,k,L,I)=>{if(h!==k){if(h!==je)for(const R in h)!yo(R)&&!(R in k)&&s(p,R,h[R],null,I,L);for(const R in k){if(yo(R))continue;const J=k[R],z=h[R];J!==z&&R!=="value"&&s(p,R,z,J,I,L)}"value"in k&&s(p,"value",h.value,k.value,I)}},ie=(p,h,k,L,I,R,J,z,W)=>{const M=h.el=p?p.el:a(""),me=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:ae,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Fn||X&2048)&&(X=0,W=!1,ae=null),we&&(z=z?z.concat(we):we),p==null?(r(M,k,L),r(me,k,L),q(h.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&ae&&p.dynamicChildren?(V(p.dynamicChildren,ae,k,I,R,J,z),g.NODE_ENV!=="production"?Ro(p,h):(h.key!=null||I&&h===I.subTree)&&Ro(p,h,!0)):he(p,h,k,me,I,R,J,z,W)},$e=(p,h,k,L,I,R,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?I.ctx.activate(h,k,L,J,W):E(h,k,L,I,R,J,W):P(p,h,W)},E=(p,h,k,L,I,R,J)=>{const z=p.component=Tv(p,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&($s(p),wn(z,"mount")),Io(p)&&(z.ctx.renderer=ts),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Ge);$(null,W,h,k)}}else Y(z,p,h,k,I,R,J);g.NODE_ENV!=="production"&&(Is(),En(z,"mount"))},P=(p,h,k)=>{const L=h.component=p.component;if(bv(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&$s(h),re(L,h,k),g.NODE_ENV!=="production"&&Is();return}else L.next=h,L.update();else h.el=p.el,L.vnode=h},Y=(p,h,k,L,I,R,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:ae,u:we,parent:Pe,vnode:He}=p;{const It=Cc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&$s(X||p.vnode),gr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,ae&&bo(ae),($t=X.props&&X.props.onVnodeBeforeUpdate)&&sn($t,Pe,X,He),gr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=ka(p);g.NODE_ENV!=="production"&&En(p,"render");const zt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(zt,mt,d(zt.el),bi(zt),p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,I),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>sn($t,Pe,X,He),I),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&Is()}else{let X;const{el:ae,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,zt=Zr(h);if(gr(p,!1),Pe&&bo(Pe),!zt&&(X=we&&we.onVnodeBeforeMount)&&sn(X,Me,h),gr(p,!0),ae&&Cf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=ka(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),Cf(ae,p.subTree,p,I,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};zt&&mt.__asyncHydrate?mt.__asyncHydrate(ae,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=ka(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,L,p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,I),!zt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>sn(X,Me,It),I)}(h.shapeFlag&256||Me&&Zr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,I),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=L=null}};p.scope.on();const W=p.effect=new au(z);p.scope.off();const M=p.update=W.run.bind(W),me=p.job=W.runIfDirty.bind(W);me.i=p,me.id=p.uid,W.scheduler=()=>As(me),gr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>bo(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>bo(p.rtg,X):void 0),M()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,L,k),iv(p,h.children,k),vn(),Lu(p),gn()},he=(p,h,k,L,I,R,J,z,W=!1)=>{const M=p&&p.children,me=p?p.shapeFlag:0,X=h.children,{patchFlag:ae,shapeFlag:we}=h;if(ae>0){if(ae&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(ae&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&es(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):es(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(p,h,k,L,I,R,J,z,W)=>{p=p||Mr,h=h||Mr;const M=p.length,me=h.length,X=Math.min(M,me);let ae;for(ae=0;ae<X;ae++){const we=h[ae]=W?Zn(h[ae]):qt(h[ae]);O(p[ae],we,k,null,I,R,J,z,W)}M>me?es(p,I,R,!0,!1,X):q(h,k,L,I,R,J,z,W,X)},Fe=(p,h,k,L,I,R,J,z,W)=>{let M=0;const me=h.length;let X=p.length-1,ae=me-1;for(;M<=X&&M<=ae;){const we=p[M],Pe=h[M]=W?Zn(h[M]):qt(h[M]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=ae;){const we=p[X],Pe=h[ae]=W?Zn(h[ae]):qt(h[ae]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,ae--}if(M>X){if(M<=ae){const we=ae+1,Pe=we<me?h[we].el:L;for(;M<=ae;)O(null,h[M]=W?Zn(h[M]):qt(h[M]),k,Pe,I,R,J,z,W),M++}}else if(M>ae)for(;M<=X;)Be(p[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=ae;M++){const Et=h[M]=W?Zn(h[M]):qt(h[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,$t=0;const mt=ae-Pe+1;let zt=!1,It=0;const ns=new Array(mt);for(M=0;M<mt;M++)ns[M]=0;for(M=we;M<=X;M++){const Et=p[M];if($t>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=ae;Me++)if(ns[Me-Pe]===0&&yr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(ns[dn-Pe]=M+1,dn>=It?It=dn:zt=!0,O(Et,h[dn],k,null,I,R,J,z,W),$t++)}const Pf=zt?dv(ns):Mr;for(Me=Pf.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=h[Et],Df=Et+1<me?h[Et+1].el:L;ns[M]===0?O(null,dn,k,Df,I,R,J,z,W):zt&&(Me<0||M!==Pf[Me]?ht(dn,k,Df,2):Me--)}}},ht=(p,h,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=p;if(M&6){ht(p.component.subTree,h,k,L);return}if(M&128){p.suspense.move(h,k,L);return}if(M&64){J.move(p,h,k,ts);return}if(J===xe){r(R,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,L);r(p.anchor,h,k);return}if(J===Lo){te(p,h,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,h,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:ae,afterLeave:we}=z,Pe=()=>r(R,h,k),He=()=>{X(R,()=>{Pe(),we&&we()})};ae?ae(R,Pe,He):He()}else r(R,h,k)},Be=(p,h,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:ae,cacheIndex:we}=p;if(X===-2&&(I=!1),z!=null&&da(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),me&256){h.ctx.deactivate(p);return}const Pe=me&1&&ae,He=!Zr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&sn(Me,h,p),me&6)ww(p.component,k,L);else{if(me&128){p.suspense.unmount(k,L);return}Pe&&pr(p,null,h,"beforeUnmount"),me&64?p.type.remove(p,h,k,ts,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?es(M,h,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&es(W,h,k),L&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&sn(Me,h,p),Pe&&pr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:L,transition:I}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&I&&!I.persisted?p.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):tr(k,L);return}if(h===Lo){S(p);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(p.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(p.el,R,W):W()}else R()},tr=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},ww=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=p;Pc(W),Pc(M),L&&bo(L),I.stop(),R&&(R.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&fm(p)},es=(p,h,k,L=!1,I=!1,R=0)=>{for(let J=R;J<p.length;J++)Be(p[J],h,k,L,I)},bi=p=>{if(p.shapeFlag&6)return bi(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Ku];return k?f(k):h};let ml=!1;const kf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ts={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:bi,o:e};let Tf,Cf;return{render:kf,hydrate:Tf,createApp:Wm(kf,Tf)}}function Na({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(le(r)&&le(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Zn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&F("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return Sa(e,null,t)}function Je(e,t,n){return g.NODE_ENV!=="production"&&!ce(t)&&F("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Sa(e,t,n)}function Sa(e,t,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(Gs)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:Qe,resume:Qe,pause:Qe};const u=Ye;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():As(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;ce(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=Sa(o,s.bind(r),n);return i(),a}function Dc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Ct(t))}" prop.`);else{const f=c[t];ce(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(sh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&F(`Event "${c}" is emitted in component ${Js(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Ct(t))];!l&&s&&(l=r[a=lr(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!ce(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(le(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Zs(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let xa=!1;function qs(){xa=!0}function ka(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:b,inheritAttrs:O}=e,w=js(e);let $,H;g.NODE_ENV!=="production"&&(xa=!1);try{if(n.shapeFlag&4){const S=o||r,U=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(S,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):S;$=qt(u.call(U,S,c,g.NODE_ENV!=="production"?en(d):d,m,f,b)),H=a}else{const S=t;g.NODE_ENV!=="production"&&a===d&&qs(),$=qt(S.length>1?S(g.NODE_ENV!=="production"?en(d):d,g.NODE_ENV!=="production"?{get attrs(){return qs(),en(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):S(g.NODE_ENV!=="production"?en(d):d,null)),H=t.props?a:gv(a)}}catch(S){Mo.length=0,xo(S,e,1),$=Z(Ge)}let T=$,te;if(g.NODE_ENV!=="production"&&$.patchFlag>0&&$.patchFlag&2048&&([T,te]=Ic($)),H&&O!==!1){const S=Object.keys(H),{shapeFlag:U}=T;if(S.length){if(U&7)s&&S.some(ms)&&(H=yv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!xa&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const D=j[A];go(D)?ms(D)||ge.push(D[2].toLowerCase()+D.slice(3)):q.push(D)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):$=T,js(w),$}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Ta(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function Ta(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(qr(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ta(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!ms(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Ge;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Fn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Zs(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Zs(n,s))return!0}return!1}function _v({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Rc=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const xe=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function y(e=!1){Mo.push(Pt=e?null:[])}function Ev(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Mr:null,Ev(),Uo>0&&Pt&&Pt.push(e),e}function x(e,t,n,r,o,s){return Lc(N(e,t,n,r,o,s,!0))}function Ne(e,t,n,r,o){return Lc(Z(e,t,n,r,o,!0))}function qr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Vs.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ov=(...e)=>Uc(...e),Mc=({key:e})=>e??null,Ws=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||ce(e)?{i:tt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Ws(t),scopeId:Wu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:tt};return a?(Ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),qr(e)){const a=Zt(e,t,!0);return n&&Ca(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=bs(a)),Ie(l)&&(So(l)&&!le(l)&&(l=Ke({},l)),t.style=Ui(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:ce(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&So(e)&&(e=ye(e),F("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
14
- Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?So(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Pa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?le(s)?s.concat(Ws(t)):[s,Ws(t)]:Ws(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&le(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return le(e.children)&&(t.children=e.children.map(Fc)),t}function ke(e=" ",t=0){return Z(jo,null,e,t)}function Sv(e,t){const n=Z(Lo,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(y(),Ne(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):le(e)?Z(xe,null,e.slice()):typeof e=="object"?Zn(e):Z(jo,null,String(e))}function Zn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Ca(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!bc(t)?t._ctx=tt:o===3&&tt&&(tt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:tt},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Pa(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=bs([t.class,r.class]));else if(o==="style")t.style=Ui([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(le(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function sn(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=vc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Ye=null;const zs=()=>Ye||tt;let Ks,Da;{const e=Mi(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Ks=t("__VUE_INSTANCE_SETTERS__",n=>Ye=n),Da=t("__VUE_SSR_SETTERS__",n=>Gs=n)}const Fo=e=>{const t=Ye;return Ks(e),e.scope.on(),()=>{e.scope.off(),Ks(t)}},Bc=()=>{Ye&&Ye.scope.off(),Ks(null)},Cv=hn("slot,component");function $a(e,{isNativeTag:t}){(Cv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Gs=!1;function Pv(e,t=!1,n=!1){t&&Da(t);const{props:r,children:o}=e.vnode,s=Hc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&Da(!1),i}function Dv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&$a(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)$a(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)zu(s[i])}r.compilerOptions&&$v()&&F('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Fo(e);vn();const a=Fr(o,e,0,[g.NODE_ENV!=="production"?en(e.props):e.props,s]);if(gn(),i(),Ri(a)){if(Zr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(e,l,t)}).catch(l=>{xo(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&qr(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Ia;const $v=()=>!Ia;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Ia&&!r.render){const o=r.template||ba(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Ia(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||Qe}{const o=Fo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===Qe&&!t&&(r.template?F('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):F("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return qs(),et(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return et(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return et(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(le(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Wc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Aa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(jn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Va(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function Js(e,t,n=!1){let r=Va(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Rv(r):n?"App":"Anonymous"}function zc(e){return ce(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,Gs);if(g.NODE_ENV!=="production"){const r=zs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!le(t)?qr(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&qr(n)&&(n=[n]),Z(e,t,n))}function jv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:tn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(ce(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(le(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",On=g.NODE_ENV!=="production"?F:Qe;var an={};let Ra;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{Ra=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){an.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Jc=Ra?e=>Ra.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Yc=Nn&&Nn.createElement("template"),Uv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},qn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fv=Ke({},Qu,Xc),ja=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),br=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const D in e)D in Xc||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:$,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:S,onBeforeAppear:U=$,onAppear:j=H,onAppearCancelled:ge=T}=t,q=(D,ie,$e)=>{_r(D,ie?c:a),_r(D,ie?u:i),$e&&$e()},A=(D,ie)=>{D._isLeaving=!1,_r(D,d),_r(D,m),_r(D,f),ie&&ie()},V=D=>(ie,$e)=>{const E=D?j:H,P=()=>q(ie,D,$e);br(E,[ie,P]),ed(()=>{_r(ie,D?l:s),Wn(ie,D?c:a),Qc(E)||td(ie,r,O,P)})};return Ke(t,{onBeforeEnter(D){br($,[D]),Wn(D,s),Wn(D,i)},onBeforeAppear(D){br(U,[D]),Wn(D,l),Wn(D,u)},onEnter:V(!1),onAppear:V(!0),onLeave(D,ie){D._isLeaving=!0;const $e=()=>A(D,ie);Wn(D,d),Wn(D,f),Wv(),ed(()=>{D._isLeaving&&(_r(D,d),Wn(D,m),Qc(te)||td(D,r,w,$e))}),br(te,[D,$e])},onEnterCancelled(D){q(D,!1),br(T,[D])},onAppearCancelled(D){q(D,!0),br(ge,[D])},onLeaveCancelled(D){A(D),br(S,[D])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){const t=ih(e);return an.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function Wn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function td(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${qn}Delay`),s=r(`${qn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===qn?i>0&&(c=qn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?qn:Bo:null,f=c?c===qn?s.length:l.length:0);const m=c===qn&&/\b(transform|all)(,|$)/.test(r(`${qn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(an.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Ys(r,a,"")}else for(const i in t)n[i]==null&&Ys(r,i,"");for(const i in n)i==="display"&&(s=!0),Ys(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,sd=/\s*!important$/;function Ys(e,t,n){if(le(n))n.forEach(r=>Ys(e,t,r));else if(n==null&&(n=""),an.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);sd.test(n)?e.setProperty(mn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Ma={};function Qv(e,t){const n=Ma[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return Ma[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Ma[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=gh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":An(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){an.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=an.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(an.NODE_ENV!=="production"?dd(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function og(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Ua=0;const sg=Promise.resolve(),ig=()=>Ua||(sg.then(()=>Ua=0),Ua=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function dd(e,t){return ce(e)||le(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
15
- Expected function or array of functions, received type ${typeof e}.`),Qe)}function lg(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?ms(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);an.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!ce(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return an.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return an.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let Xs;const Og=new Uint8Array(16);function Ng(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Og)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Sg(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fa(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var zn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Qs=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Q(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Je(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Je(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(zn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof Ti||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==mo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:mo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Qs.userKey="moonbase_user",Qs.sessionKey="moonbase_session",Qs.storefrontKey="moonbase_storefront";var Dg=Qs;function vd(e,t){const n=t??Ce(zn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(zn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ei(e){const t=Ce(zn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function $g(e,t){const n=Ce(zn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Ln(e)}`,null),o=n.stateFactory(`activation-request-${Ln(e)}-error`,null),s=n.stateFactory(`activation-request-${Ln(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Ln(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Ln(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Ln(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Xt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Je(()=>Ln(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Xt.Fulfilled&&(a.value=!0,u()),s.value=!1):(o.value=new Lr("Invalid input","Missing request id",-1),s.value=!1)}catch(d){o.value=d,s.value=!1}},{immediate:!0}),fa(()=>{l.value&&clearTimeout(l.value)}),Je(n.currentUser,async()=>{var c,d;const f=Ln(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Xt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Xt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Xt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(zn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof sr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof sr?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(zn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n.returnUrl,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(!n.redirect&&o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{md(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(n.redirect&&o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(zn);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>(await t.client.identity.confirmEmailChange(n,r),await t.updateUser())}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Qp(n),(r,o)=>C(o))}var yd=!1;function ti(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let Wr,Za;function Mg(){var e;return Wr!==void 0||(typeof window<"u"&&window.performance?(Wr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Wr=!0,Za=globalThis.perf_hooks.performance):Wr=!1),Wr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let Zo;const qo=e=>Zo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));const Er=typeof window<"u",Ed=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Bg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ni(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const ri=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(ri.userAgent)&&/AppleWebKit/.test(ri.userAgent)&&!/Safari/.test(ri.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in ri?Zg:qg:()=>{};function Hg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Od(r.href)?qa(e,t,n):(r.target="_blank",ni(r)):ni(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ni(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ni(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function ot(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return ot("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(ot('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),ot("Global state copied to clipboard.")}catch(t){if(kd(t))return;ot("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),ot("Global state pasted from clipboard.")}catch(t){if(kd(t))return;ot("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){ot("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),ot(`Global state imported from "${o.name}".`)}catch(t){ot("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",oi="_root";function Yg(e){return Wa(e)?{id:oi,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Qg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case ln.direct:return"mutation";case ln.patchFunction:return"$patch";case ln.patchObject:return"$patch";default:return"unknown"}}let zr=!0;const si=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,ii=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:si,app:e},n=>{typeof n.now!="function"&&ot("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?ot(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),ot(`Store "${r}" reset.`)):ot(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:ii(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ii(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===oi?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==oi&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===oi?t:t._s.get(r.nodeId);if(!s)return ot(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),zr=!1,r.set(s,i,r.state.value),zr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return ot(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return ot(`Invalid path for store "${o}":
13
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=Mi();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=Qe,insertStaticContent:b}=e,O=(p,h,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Fn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!yr(p,h)&&(L=bi(p),Be(p,I,R,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=h;switch(M){case jo:w(p,h,k,L);break;case Ge:$(p,h,k,L);break;case Lo:p==null?H(h,k,L,J):g.NODE_ENV!=="production"&&T(p,h,k,J);break;case xe:ie(p,h,k,L,I,R,J,z,W);break;default:X&1?U(p,h,k,L,I,R,J,z,W):X&6?$e(p,h,k,L,I,R,J,z,W):X&64||X&128?M.process(p,h,k,L,I,R,J,z,W,ts):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&da(me,p&&p.ref,R,h||p,!h)},w=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const I=h.el=p.el;h.children!==p.children&&u(I,h.children)}},$=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},H=(p,h,k,L)=>{[p.el,p.anchor]=b(p.children,h,k,L,p.el,p.anchor)},T=(p,h,k,L)=>{if(h.children!==p.children){const I=f(p.anchor);S(p),[h.el,h.anchor]=b(h.children,k,I,L)}else h.el=p.el,h.anchor=p.anchor},te=({el:p,anchor:h},k,L)=>{let I;for(;p&&p!==h;)I=f(p),r(p,k,L),p=I;r(h,k,L)},S=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},U=(p,h,k,L,I,R,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?j(h,k,L,I,R,J,z,W):A(p,h,I,R,J,z,W)},j=(p,h,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:ae,dirs:we}=p;if(W=p.el=i(p.type,R,me&&me.is,me),X&8?c(W,p.children):X&16&&q(p.children,W,null,L,I,Na(p,R),J,z),we&&pr(p,null,L,"created"),ge(W,p,p.scopeId,J,L),me){for(const He in me)He!=="value"&&!yo(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&sn(M,L,p)}g.NODE_ENV!=="production"&&(ys(W,"__vnode",p,!0),ys(W,"__vueParentComponent",L,!0)),we&&pr(p,null,L,"beforeMount");const Pe=cv(I,ae);Pe&&ae.beforeEnter(W),r(W,h,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&sn(M,L,p),Pe&&ae.enter(W),we&&pr(p,null,L,"mounted")},I)},ge=(p,h,k,L,I)=>{if(k&&m(p,k),L)for(let R=0;R<L.length;R++)m(p,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=Ta(R.children)||R),h===R||Rc(R.type)&&(R.ssContent===h||R.ssFallback===h)){const J=I.vnode;ge(p,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(p,h,k,L,I,R,J,z,W=0)=>{for(let M=W;M<p.length;M++){const me=p[M]=z?Zn(p[M]):qt(p[M]);O(null,me,h,k,L,I,R,J,z)}},A=(p,h,k,L,I,R,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:M,dirs:me}=h;W|=p.patchFlag&16;const X=p.props||je,ae=h.props||je;let we;if(k&&gr(k,!1),(we=ae.onVnodeBeforeUpdate)&&sn(we,k,h,p),me&&pr(h,p,k,"beforeUpdate"),k&&gr(k,!0),g.NODE_ENV!=="production"&&Fn&&(W=0,J=!1,M=null),(X.innerHTML&&ae.innerHTML==null||X.textContent&&ae.textContent==null)&&c(z,""),M?(V(p.dynamicChildren,M,z,k,L,Na(h,I),R),g.NODE_ENV!=="production"&&Ro(p,h)):J||he(p,h,z,null,k,L,Na(h,I),R,!1),W>0){if(W&16)D(z,X,ae,k,I);else if(W&2&&X.class!==ae.class&&s(z,"class",null,ae.class,I),W&4&&s(z,"style",X.style,ae.style,I),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=ae[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,I,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&M==null&&D(z,X,ae,k,I);((we=ae.onVnodeUpdated)||me)&&Nt(()=>{we&&sn(we,k,h,p),me&&pr(h,p,k,"updated")},L)},V=(p,h,k,L,I,R,J)=>{for(let z=0;z<h.length;z++){const W=p[z],M=h[z],me=W.el&&(W.type===xe||!yr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},D=(p,h,k,L,I)=>{if(h!==k){if(h!==je)for(const R in h)!yo(R)&&!(R in k)&&s(p,R,h[R],null,I,L);for(const R in k){if(yo(R))continue;const J=k[R],z=h[R];J!==z&&R!=="value"&&s(p,R,z,J,I,L)}"value"in k&&s(p,"value",h.value,k.value,I)}},ie=(p,h,k,L,I,R,J,z,W)=>{const M=h.el=p?p.el:a(""),me=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:ae,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Fn||X&2048)&&(X=0,W=!1,ae=null),we&&(z=z?z.concat(we):we),p==null?(r(M,k,L),r(me,k,L),q(h.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&ae&&p.dynamicChildren?(V(p.dynamicChildren,ae,k,I,R,J,z),g.NODE_ENV!=="production"?Ro(p,h):(h.key!=null||I&&h===I.subTree)&&Ro(p,h,!0)):he(p,h,k,me,I,R,J,z,W)},$e=(p,h,k,L,I,R,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?I.ctx.activate(h,k,L,J,W):E(h,k,L,I,R,J,W):P(p,h,W)},E=(p,h,k,L,I,R,J)=>{const z=p.component=Tv(p,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&($s(p),wn(z,"mount")),Io(p)&&(z.ctx.renderer=ts),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Ge);$(null,W,h,k)}}else Y(z,p,h,k,I,R,J);g.NODE_ENV!=="production"&&(Is(),En(z,"mount"))},P=(p,h,k)=>{const L=h.component=p.component;if(bv(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&$s(h),re(L,h,k),g.NODE_ENV!=="production"&&Is();return}else L.next=h,L.update();else h.el=p.el,L.vnode=h},Y=(p,h,k,L,I,R,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:ae,u:we,parent:Pe,vnode:He}=p;{const It=Cc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&$s(X||p.vnode),gr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,ae&&bo(ae),($t=X.props&&X.props.onVnodeBeforeUpdate)&&sn($t,Pe,X,He),gr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=ka(p);g.NODE_ENV!=="production"&&En(p,"render");const zt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(zt,mt,d(zt.el),bi(zt),p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,I),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>sn($t,Pe,X,He),I),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&Is()}else{let X;const{el:ae,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,zt=Hr(h);if(gr(p,!1),Pe&&bo(Pe),!zt&&(X=we&&we.onVnodeBeforeMount)&&sn(X,Me,h),gr(p,!0),ae&&Cf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=ka(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),Cf(ae,p.subTree,p,I,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};zt&&mt.__asyncHydrate?mt.__asyncHydrate(ae,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=ka(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,L,p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,I),!zt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>sn(X,Me,It),I)}(h.shapeFlag&256||Me&&Hr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,I),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=L=null}};p.scope.on();const W=p.effect=new au(z);p.scope.off();const M=p.update=W.run.bind(W),me=p.job=W.runIfDirty.bind(W);me.i=p,me.id=p.uid,W.scheduler=()=>As(me),gr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>bo(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>bo(p.rtg,X):void 0),M()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,L,k),iv(p,h.children,k),vn(),Lu(p),gn()},he=(p,h,k,L,I,R,J,z,W=!1)=>{const M=p&&p.children,me=p?p.shapeFlag:0,X=h.children,{patchFlag:ae,shapeFlag:we}=h;if(ae>0){if(ae&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(ae&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&es(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):es(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(p,h,k,L,I,R,J,z,W)=>{p=p||Lr,h=h||Lr;const M=p.length,me=h.length,X=Math.min(M,me);let ae;for(ae=0;ae<X;ae++){const we=h[ae]=W?Zn(h[ae]):qt(h[ae]);O(p[ae],we,k,null,I,R,J,z,W)}M>me?es(p,I,R,!0,!1,X):q(h,k,L,I,R,J,z,W,X)},Fe=(p,h,k,L,I,R,J,z,W)=>{let M=0;const me=h.length;let X=p.length-1,ae=me-1;for(;M<=X&&M<=ae;){const we=p[M],Pe=h[M]=W?Zn(h[M]):qt(h[M]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=ae;){const we=p[X],Pe=h[ae]=W?Zn(h[ae]):qt(h[ae]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,ae--}if(M>X){if(M<=ae){const we=ae+1,Pe=we<me?h[we].el:L;for(;M<=ae;)O(null,h[M]=W?Zn(h[M]):qt(h[M]),k,Pe,I,R,J,z,W),M++}}else if(M>ae)for(;M<=X;)Be(p[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=ae;M++){const Et=h[M]=W?Zn(h[M]):qt(h[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,$t=0;const mt=ae-Pe+1;let zt=!1,It=0;const ns=new Array(mt);for(M=0;M<mt;M++)ns[M]=0;for(M=we;M<=X;M++){const Et=p[M];if($t>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=ae;Me++)if(ns[Me-Pe]===0&&yr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(ns[dn-Pe]=M+1,dn>=It?It=dn:zt=!0,O(Et,h[dn],k,null,I,R,J,z,W),$t++)}const Pf=zt?dv(ns):Lr;for(Me=Pf.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=h[Et],Df=Et+1<me?h[Et+1].el:L;ns[M]===0?O(null,dn,k,Df,I,R,J,z,W):zt&&(Me<0||M!==Pf[Me]?ht(dn,k,Df,2):Me--)}}},ht=(p,h,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=p;if(M&6){ht(p.component.subTree,h,k,L);return}if(M&128){p.suspense.move(h,k,L);return}if(M&64){J.move(p,h,k,ts);return}if(J===xe){r(R,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,L);r(p.anchor,h,k);return}if(J===Lo){te(p,h,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,h,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:ae,afterLeave:we}=z,Pe=()=>r(R,h,k),He=()=>{X(R,()=>{Pe(),we&&we()})};ae?ae(R,Pe,He):He()}else r(R,h,k)},Be=(p,h,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:ae,cacheIndex:we}=p;if(X===-2&&(I=!1),z!=null&&da(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),me&256){h.ctx.deactivate(p);return}const Pe=me&1&&ae,He=!Hr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&sn(Me,h,p),me&6)ww(p.component,k,L);else{if(me&128){p.suspense.unmount(k,L);return}Pe&&pr(p,null,h,"beforeUnmount"),me&64?p.type.remove(p,h,k,ts,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?es(M,h,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&es(W,h,k),L&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&sn(Me,h,p),Pe&&pr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:L,transition:I}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&I&&!I.persisted?p.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):tr(k,L);return}if(h===Lo){S(p);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(p.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(p.el,R,W):W()}else R()},tr=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},ww=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=p;Pc(W),Pc(M),L&&bo(L),I.stop(),R&&(R.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&fm(p)},es=(p,h,k,L=!1,I=!1,R=0)=>{for(let J=R;J<p.length;J++)Be(p[J],h,k,L,I)},bi=p=>{if(p.shapeFlag&6)return bi(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Ku];return k?f(k):h};let ml=!1;const kf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ts={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:bi,o:e};let Tf,Cf;return{render:kf,hydrate:Tf,createApp:Wm(kf,Tf)}}function Na({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(le(r)&&le(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Zn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&F("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return Sa(e,null,t)}function Je(e,t,n){return g.NODE_ENV!=="production"&&!ce(t)&&F("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Sa(e,t,n)}function Sa(e,t,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(Gs)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:Qe,resume:Qe,pause:Qe};const u=Ye;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():As(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;ce(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=Sa(o,s.bind(r),n);return i(),a}function Dc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Ct(t))}" prop.`);else{const f=c[t];ce(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(sh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&F(`Event "${c}" is emitted in component ${Js(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Ct(t))];!l&&s&&(l=r[a=lr(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!ce(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(le(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Zs(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let xa=!1;function qs(){xa=!0}function ka(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:b,inheritAttrs:O}=e,w=js(e);let $,H;g.NODE_ENV!=="production"&&(xa=!1);try{if(n.shapeFlag&4){const S=o||r,U=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(S,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):S;$=qt(u.call(U,S,c,g.NODE_ENV!=="production"?en(d):d,m,f,b)),H=a}else{const S=t;g.NODE_ENV!=="production"&&a===d&&qs(),$=qt(S.length>1?S(g.NODE_ENV!=="production"?en(d):d,g.NODE_ENV!=="production"?{get attrs(){return qs(),en(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):S(g.NODE_ENV!=="production"?en(d):d,null)),H=t.props?a:gv(a)}}catch(S){Mo.length=0,xo(S,e,1),$=Z(Ge)}let T=$,te;if(g.NODE_ENV!=="production"&&$.patchFlag>0&&$.patchFlag&2048&&([T,te]=Ic($)),H&&O!==!1){const S=Object.keys(H),{shapeFlag:U}=T;if(S.length){if(U&7)s&&S.some(ms)&&(H=yv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!xa&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const D=j[A];go(D)?ms(D)||ge.push(D[2].toLowerCase()+D.slice(3)):q.push(D)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):$=T,js(w),$}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Ta(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function Ta(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Zr(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ta(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!ms(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Ge;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Fn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Zs(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Zs(n,s))return!0}return!1}function _v({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Rc=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const xe=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function y(e=!1){Mo.push(Pt=e?null:[])}function Ev(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Lr:null,Ev(),Uo>0&&Pt&&Pt.push(e),e}function x(e,t,n,r,o,s){return Lc(N(e,t,n,r,o,s,!0))}function Ne(e,t,n,r,o){return Lc(Z(e,t,n,r,o,!0))}function Zr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Vs.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ov=(...e)=>Uc(...e),Mc=({key:e})=>e??null,Ws=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||ce(e)?{i:tt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Ws(t),scopeId:Wu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:tt};return a?(Ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),Zr(e)){const a=Zt(e,t,!0);return n&&Ca(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=bs(a)),Ie(l)&&(So(l)&&!le(l)&&(l=Ke({},l)),t.style=Ui(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:ce(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&So(e)&&(e=ye(e),F("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
14
+ Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?So(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Pa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?le(s)?s.concat(Ws(t)):[s,Ws(t)]:Ws(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&le(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return le(e.children)&&(t.children=e.children.map(Fc)),t}function ke(e=" ",t=0){return Z(jo,null,e,t)}function Sv(e,t){const n=Z(Lo,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(y(),Ne(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):le(e)?Z(xe,null,e.slice()):typeof e=="object"?Zn(e):Z(jo,null,String(e))}function Zn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Ca(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!bc(t)?t._ctx=tt:o===3&&tt&&(tt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:tt},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Pa(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=bs([t.class,r.class]));else if(o==="style")t.style=Ui([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(le(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function sn(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=vc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Ye=null;const zs=()=>Ye||tt;let Ks,Da;{const e=Mi(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Ks=t("__VUE_INSTANCE_SETTERS__",n=>Ye=n),Da=t("__VUE_SSR_SETTERS__",n=>Gs=n)}const Fo=e=>{const t=Ye;return Ks(e),e.scope.on(),()=>{e.scope.off(),Ks(t)}},Bc=()=>{Ye&&Ye.scope.off(),Ks(null)},Cv=hn("slot,component");function $a(e,{isNativeTag:t}){(Cv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Gs=!1;function Pv(e,t=!1,n=!1){t&&Da(t);const{props:r,children:o}=e.vnode,s=Hc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&Da(!1),i}function Dv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&$a(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)$a(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)zu(s[i])}r.compilerOptions&&$v()&&F('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Fo(e);vn();const a=Ur(o,e,0,[g.NODE_ENV!=="production"?en(e.props):e.props,s]);if(gn(),i(),Ri(a)){if(Hr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(e,l,t)}).catch(l=>{xo(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&Zr(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Ia;const $v=()=>!Ia;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Ia&&!r.render){const o=r.template||ba(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Ia(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||Qe}{const o=Fo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===Qe&&!t&&(r.template?F('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):F("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return qs(),et(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return et(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return et(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(le(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Wc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Aa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(jn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Va(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function Js(e,t,n=!1){let r=Va(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Rv(r):n?"App":"Anonymous"}function zc(e){return ce(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,Gs);if(g.NODE_ENV!=="production"){const r=zs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!le(t)?Zr(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Zr(n)&&(n=[n]),Z(e,t,n))}function jv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:tn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(ce(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(le(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",On=g.NODE_ENV!=="production"?F:Qe;var an={};let Ra;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{Ra=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){an.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Jc=Ra?e=>Ra.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Yc=Nn&&Nn.createElement("template"),Uv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},qn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fv=Ke({},Qu,Xc),ja=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),br=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const D in e)D in Xc||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:$,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:S,onBeforeAppear:U=$,onAppear:j=H,onAppearCancelled:ge=T}=t,q=(D,ie,$e)=>{_r(D,ie?c:a),_r(D,ie?u:i),$e&&$e()},A=(D,ie)=>{D._isLeaving=!1,_r(D,d),_r(D,m),_r(D,f),ie&&ie()},V=D=>(ie,$e)=>{const E=D?j:H,P=()=>q(ie,D,$e);br(E,[ie,P]),ed(()=>{_r(ie,D?l:s),Wn(ie,D?c:a),Qc(E)||td(ie,r,O,P)})};return Ke(t,{onBeforeEnter(D){br($,[D]),Wn(D,s),Wn(D,i)},onBeforeAppear(D){br(U,[D]),Wn(D,l),Wn(D,u)},onEnter:V(!1),onAppear:V(!0),onLeave(D,ie){D._isLeaving=!0;const $e=()=>A(D,ie);Wn(D,d),Wn(D,f),Wv(),ed(()=>{D._isLeaving&&(_r(D,d),Wn(D,m),Qc(te)||td(D,r,w,$e))}),br(te,[D,$e])},onEnterCancelled(D){q(D,!1),br(T,[D])},onAppearCancelled(D){q(D,!0),br(ge,[D])},onLeaveCancelled(D){A(D),br(S,[D])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){const t=ih(e);return an.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function Wn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function td(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${qn}Delay`),s=r(`${qn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===qn?i>0&&(c=qn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?qn:Bo:null,f=c?c===qn?s.length:l.length:0);const m=c===qn&&/\b(transform|all)(,|$)/.test(r(`${qn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(an.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Ys(r,a,"")}else for(const i in t)n[i]==null&&Ys(r,i,"");for(const i in n)i==="display"&&(s=!0),Ys(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,sd=/\s*!important$/;function Ys(e,t,n){if(le(n))n.forEach(r=>Ys(e,t,r));else if(n==null&&(n=""),an.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);sd.test(n)?e.setProperty(mn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Ma={};function Qv(e,t){const n=Ma[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return Ma[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Ma[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=gh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":An(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){an.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=an.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(an.NODE_ENV!=="production"?dd(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function og(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Ua=0;const sg=Promise.resolve(),ig=()=>Ua||(sg.then(()=>Ua=0),Ua=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function dd(e,t){return ce(e)||le(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
15
+ Expected function or array of functions, received type ${typeof e}.`),Qe)}function lg(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?ms(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);an.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!ce(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return an.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return an.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let Xs;const Og=new Uint8Array(16);function Ng(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Og)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Sg(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fa(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var zn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Qs=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Q(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Je(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Je(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(zn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof Ti||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==mo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:mo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Qs.userKey="moonbase_user",Qs.sessionKey="moonbase_session",Qs.storefrontKey="moonbase_storefront";var Dg=Qs;function vd(e,t){const n=t??Ce(zn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(zn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ei(e){const t=Ce(zn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function $g(e,t){const n=Ce(zn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Ln(e)}`,null),o=n.stateFactory(`activation-request-${Ln(e)}-error`,null),s=n.stateFactory(`activation-request-${Ln(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Ln(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Ln(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Ln(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Xt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Je(()=>Ln(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Xt.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),fa(()=>{l.value&&clearTimeout(l.value)}),Je(n.currentUser,async()=>{var c,d;const f=Ln(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Xt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Xt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Xt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(zn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof sr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof sr?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(zn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n.returnUrl,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(!n.redirect&&o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{md(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(n.redirect&&o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(zn);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>(await t.client.identity.confirmEmailChange(n,r),await t.updateUser())}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Qp(n),(r,o)=>C(o))}var yd=!1;function ti(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let qr,Za;function Mg(){var e;return qr!==void 0||(typeof window<"u"&&window.performance?(qr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(qr=!0,Za=globalThis.perf_hooks.performance):qr=!1),qr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let Zo;const qo=e=>Zo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));const Er=typeof window<"u",Ed=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Bg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ni(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const ri=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(ri.userAgent)&&/AppleWebKit/.test(ri.userAgent)&&!/Safari/.test(ri.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in ri?Zg:qg:()=>{};function Hg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Od(r.href)?qa(e,t,n):(r.target="_blank",ni(r)):ni(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ni(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ni(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function ot(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return ot("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(ot('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),ot("Global state copied to clipboard.")}catch(t){if(kd(t))return;ot("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),ot("Global state pasted from clipboard.")}catch(t){if(kd(t))return;ot("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){ot("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),ot(`Global state imported from "${o.name}".`)}catch(t){ot("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",oi="_root";function Yg(e){return Wa(e)?{id:oi,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Qg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case ln.direct:return"mutation";case ln.patchFunction:return"$patch";case ln.patchObject:return"$patch";default:return"unknown"}}let Wr=!0;const si=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,ii=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:si,app:e},n=>{typeof n.now!="function"&&ot("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?ot(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),ot(`Store "${r}" reset.`)):ot(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:ii(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ii(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===oi?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==oi&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===oi?t:t._s.get(r.nodeId);if(!s)return ot(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wr=!1,r.set(s,i,r.state.value),Wr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return ot(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return ot(`Invalid path for store "${o}":
16
16
  ${i}
17
- Only state can be modified.`);i[0]="$state",zr=!1,r.set(s,i,r.state.value),zr=!0}})})}function ry(e,t){si.includes(ii(t.$id))||si.push(ii(t.$id)),_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:si,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=Pd++;n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{Kn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{Kn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Je(()=>_(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),zr&&n.addTimelineEvent({layerId:Or,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Kn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!zr)return;const u={time:r(),title:ey(a),data:ty({store:Wt(t.$id)},Qg(i)),groupId:Kn};a===ln.patchFunction?u.subtitle="⤵️":a===ln.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Or,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=jn(i=>{o(i),n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`"${t.$id}" store installed 🆕`)})}let Pd=0,Kn;function Dd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=Pd,i=n?new Proxy(e,{get(...l){return Kn=s,Reflect.get(...l)},set(...l){return Kn=s,Reflect.set(...l)}}):e;Kn=s;const a=r[o].apply(i,arguments);return Kn=void 0,a}}function oy({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Dd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Dd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}ry(e,t)}}function sy(){const e=su(!0),t=e.run(()=>C({}));let n=[],r=[];const o=jn({install(s){qo(o),o._a=s,s.provide(wd,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er&&ny(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!yd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(oy),o}function $d(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];wr(o)&&wr(r)&&!qe(r)&&!tn(r)?e[n]=$d(o,r):e[n]=r}return e}const Id=()=>{};function Ad(e,t,n,r=Id){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&iu()&&yh(o),o}function Kr(e,...t){e.slice().forEach(n=>{n(...t)})}const iy=e=>e(),Vd=Symbol(),za=Symbol();function Ka(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];wr(o)&&wr(r)&&e.hasOwnProperty(n)&&!qe(r)&&!tn(r)?e[n]=Ka(o,r):e[n]=r}return e}const ay=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function ly(e){return!wr(e)||!e.hasOwnProperty(ay)}const{assign:Rt}=Object;function Rd(e){return!!(qe(e)&&e.effect)}function jd(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?$u(C(o?o():{}).value):$u(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=jn(Q(()=>{qo(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=Ga(e,u,t,n,r,!0),l}function Ga(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!yd&&(l.onTrigger=A=>{u?m=A:u==!1&&!j._hotUpdating&&(Array.isArray(m)?m.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],m;const b=r.state.value[e];!s&&!b&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=C({});let w;function $(A){let V;u=c=!1,Te.NODE_ENV!=="production"&&(m=[]),typeof A=="function"?(A(r.state.value[e]),V={type:ln.patchFunction,storeId:e,events:m}):(Ka(r.state.value[e],A),V={type:ln.patchObject,payload:A,storeId:e,events:m});const D=w=Symbol();To().then(()=>{w===D&&(u=!0)}),c=!0,Kr(d,V,r.state.value[e])}const H=s?function(){const{state:V}=n,D=V?V():{};this.$patch(ie=>{Rt(ie,D)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Id;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const te=(A,V="")=>{if(Vd in A)return A[za]=V,A;const D=function(){qo(r);const ie=Array.from(arguments),$e=[],E=[];function P(he){$e.push(he)}function Y(he){E.push(he)}Kr(f,{args:ie,name:D[za],store:j,after:P,onError:Y});let re;try{re=A.apply(this&&this.$id===e?this:j,ie)}catch(he){throw Kr(E,he),he}return re instanceof Promise?re.then(he=>(Kr($e,he),he)).catch(he=>(Kr(E,he),Promise.reject(he))):(Kr($e,re),re)};return D[Vd]=!0,D[za]=V,D},S=jn({actions:{},getters:{},state:[],hotState:O}),U={_p:r,$id:e,$onAction:Ad.bind(null,f),$patch:$,$reset:H,$subscribe(A,V={}){const D=Ad(d,A,V.detached,()=>ie()),ie=i.run(()=>Je(()=>r.state.value[e],$e=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:ln.direct,events:m},$e)},Rt({},l,V)));return D},$dispose:T},j=No(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er?Rt({_hmrPayload:S,_customProperties:jn(new Set)},U):U);r._s.set(e,j);const q=(r._a&&r._a.runWithContext||iy)(()=>r._e.run(()=>(i=su()).run(()=>t({action:te}))));for(const A in q){const V=q[A];if(qe(V)&&!Rd(V)||tn(V))Te.NODE_ENV!=="production"&&o?ti(O.value,A,Qi(q,A)):s||(b&&ly(V)&&(qe(V)?V.value=b[A]:Ka(V,b[A])),r.state.value[e][A]=V),Te.NODE_ENV!=="production"&&S.state.push(A);else if(typeof V=="function"){const D=Te.NODE_ENV!=="production"&&o?V:te(V,A);q[A]=D,Te.NODE_ENV!=="production"&&(S.actions[A]=V),a.actions[A]=V}else Te.NODE_ENV!=="production"&&Rd(V)&&(S.getters[A]=s?n.getters[A]:V,Er&&(q._getters||(q._getters=jn([]))).push(A))}if(Rt(j,q),Rt(ye(j),q),Object.defineProperty(j,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:A=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");$(V=>{Rt(V,A)})}}),Te.NODE_ENV!=="production"&&(j._hotUpdate=jn(A=>{j._hotUpdating=!0,A._hmrPayload.state.forEach(V=>{if(V in j.$state){const D=A.$state[V],ie=j.$state[V];typeof D=="object"&&wr(D)&&wr(ie)?$d(D,ie):A.$state[V]=ie}ti(j,V,Qi(A.$state,V))}),Object.keys(j.$state).forEach(V=>{V in A.$state||Ha(j,V)}),u=!1,c=!1,r.state.value[e]=Qi(A._hmrPayload,"hotState"),c=!0,To().then(()=>{u=!0});for(const V in A._hmrPayload.actions){const D=A[V];ti(j,V,te(D,V))}for(const V in A._hmrPayload.getters){const D=A._hmrPayload.getters[V],ie=s?Q(()=>(qo(r),D.call(j,j))):D;ti(j,V,ie)}Object.keys(j._hmrPayload.getters).forEach(V=>{V in A._hmrPayload.getters||Ha(j,V)}),Object.keys(j._hmrPayload.actions).forEach(V=>{V in A._hmrPayload.actions||Ha(j,V)}),j._hmrPayload=A._hmrPayload,j._getters=A._getters,j._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(j,V,Rt({value:j[V]},A))})}return r._p.forEach(A=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const V=i.run(()=>A({store:j,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach(D=>j._customProperties.add(D)),Rt(j,V)}else Rt(j,i.run(()=>A({store:j,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&j.$state&&typeof j.$state=="object"&&typeof j.$state.constructor=="function"&&!j.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
17
+ Only state can be modified.`);i[0]="$state",Wr=!1,r.set(s,i,r.state.value),Wr=!0}})})}function ry(e,t){si.includes(ii(t.$id))||si.push(ii(t.$id)),_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:si,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=Pd++;n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{Kn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{Kn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Je(()=>_(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Wr&&n.addTimelineEvent({layerId:Or,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Kn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Wr)return;const u={time:r(),title:ey(a),data:ty({store:Wt(t.$id)},Qg(i)),groupId:Kn};a===ln.patchFunction?u.subtitle="⤵️":a===ln.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Or,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=jn(i=>{o(i),n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`"${t.$id}" store installed 🆕`)})}let Pd=0,Kn;function Dd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=Pd,i=n?new Proxy(e,{get(...l){return Kn=s,Reflect.get(...l)},set(...l){return Kn=s,Reflect.set(...l)}}):e;Kn=s;const a=r[o].apply(i,arguments);return Kn=void 0,a}}function oy({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Dd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Dd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}ry(e,t)}}function sy(){const e=su(!0),t=e.run(()=>C({}));let n=[],r=[];const o=jn({install(s){qo(o),o._a=s,s.provide(wd,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er&&ny(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!yd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(oy),o}function $d(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];wr(o)&&wr(r)&&!qe(r)&&!tn(r)?e[n]=$d(o,r):e[n]=r}return e}const Id=()=>{};function Ad(e,t,n,r=Id){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&iu()&&yh(o),o}function zr(e,...t){e.slice().forEach(n=>{n(...t)})}const iy=e=>e(),Vd=Symbol(),za=Symbol();function Ka(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];wr(o)&&wr(r)&&e.hasOwnProperty(n)&&!qe(r)&&!tn(r)?e[n]=Ka(o,r):e[n]=r}return e}const ay=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function ly(e){return!wr(e)||!e.hasOwnProperty(ay)}const{assign:Rt}=Object;function Rd(e){return!!(qe(e)&&e.effect)}function jd(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?$u(C(o?o():{}).value):$u(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=jn(Q(()=>{qo(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=Ga(e,u,t,n,r,!0),l}function Ga(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!yd&&(l.onTrigger=A=>{u?m=A:u==!1&&!j._hotUpdating&&(Array.isArray(m)?m.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],m;const b=r.state.value[e];!s&&!b&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=C({});let w;function $(A){let V;u=c=!1,Te.NODE_ENV!=="production"&&(m=[]),typeof A=="function"?(A(r.state.value[e]),V={type:ln.patchFunction,storeId:e,events:m}):(Ka(r.state.value[e],A),V={type:ln.patchObject,payload:A,storeId:e,events:m});const D=w=Symbol();To().then(()=>{w===D&&(u=!0)}),c=!0,zr(d,V,r.state.value[e])}const H=s?function(){const{state:V}=n,D=V?V():{};this.$patch(ie=>{Rt(ie,D)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Id;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const te=(A,V="")=>{if(Vd in A)return A[za]=V,A;const D=function(){qo(r);const ie=Array.from(arguments),$e=[],E=[];function P(he){$e.push(he)}function Y(he){E.push(he)}zr(f,{args:ie,name:D[za],store:j,after:P,onError:Y});let re;try{re=A.apply(this&&this.$id===e?this:j,ie)}catch(he){throw zr(E,he),he}return re instanceof Promise?re.then(he=>(zr($e,he),he)).catch(he=>(zr(E,he),Promise.reject(he))):(zr($e,re),re)};return D[Vd]=!0,D[za]=V,D},S=jn({actions:{},getters:{},state:[],hotState:O}),U={_p:r,$id:e,$onAction:Ad.bind(null,f),$patch:$,$reset:H,$subscribe(A,V={}){const D=Ad(d,A,V.detached,()=>ie()),ie=i.run(()=>Je(()=>r.state.value[e],$e=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:ln.direct,events:m},$e)},Rt({},l,V)));return D},$dispose:T},j=No(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er?Rt({_hmrPayload:S,_customProperties:jn(new Set)},U):U);r._s.set(e,j);const q=(r._a&&r._a.runWithContext||iy)(()=>r._e.run(()=>(i=su()).run(()=>t({action:te}))));for(const A in q){const V=q[A];if(qe(V)&&!Rd(V)||tn(V))Te.NODE_ENV!=="production"&&o?ti(O.value,A,Qi(q,A)):s||(b&&ly(V)&&(qe(V)?V.value=b[A]:Ka(V,b[A])),r.state.value[e][A]=V),Te.NODE_ENV!=="production"&&S.state.push(A);else if(typeof V=="function"){const D=Te.NODE_ENV!=="production"&&o?V:te(V,A);q[A]=D,Te.NODE_ENV!=="production"&&(S.actions[A]=V),a.actions[A]=V}else Te.NODE_ENV!=="production"&&Rd(V)&&(S.getters[A]=s?n.getters[A]:V,Er&&(q._getters||(q._getters=jn([]))).push(A))}if(Rt(j,q),Rt(ye(j),q),Object.defineProperty(j,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:A=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");$(V=>{Rt(V,A)})}}),Te.NODE_ENV!=="production"&&(j._hotUpdate=jn(A=>{j._hotUpdating=!0,A._hmrPayload.state.forEach(V=>{if(V in j.$state){const D=A.$state[V],ie=j.$state[V];typeof D=="object"&&wr(D)&&wr(ie)?$d(D,ie):A.$state[V]=ie}ti(j,V,Qi(A.$state,V))}),Object.keys(j.$state).forEach(V=>{V in A.$state||Ha(j,V)}),u=!1,c=!1,r.state.value[e]=Qi(A._hmrPayload,"hotState"),c=!0,To().then(()=>{u=!0});for(const V in A._hmrPayload.actions){const D=A[V];ti(j,V,te(D,V))}for(const V in A._hmrPayload.getters){const D=A._hmrPayload.getters[V],ie=s?Q(()=>(qo(r),D.call(j,j))):D;ti(j,V,ie)}Object.keys(j._hmrPayload.getters).forEach(V=>{V in A._hmrPayload.getters||Ha(j,V)}),Object.keys(j._hmrPayload.actions).forEach(V=>{V in A._hmrPayload.actions||Ha(j,V)}),j._hmrPayload=A._hmrPayload,j._getters=A._getters,j._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(j,V,Rt({value:j[V]},A))})}return r._p.forEach(A=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const V=i.run(()=>A({store:j,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach(D=>j._customProperties.add(D)),Rt(j,V)}else Rt(j,i.run(()=>A({store:j,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&j.$state&&typeof j.$state=="object"&&typeof j.$state.constructor=="function"&&!j.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
18
18
  state: () => new MyClass()
19
19
  Found in store "${j.$id}".`),b&&s&&n.hydrate&&n.hydrate(j.$state,b),u=!0,c=!0,j}function uy(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=zm();if(a=(Te.NODE_ENV==="test"&&Zo&&Zo._testing?null:a)||(u?Ce(wd,null):null),a&&qo(a),Te.NODE_ENV!=="production"&&!Zo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
20
20
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
21
- This will fail in production.`);a=Zo,a._s.has(r)||(s?Ga(r,t,o,a):jd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):jd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&Er){const d=zs();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=c}}return c}return i.$id=r,i}var ue=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ue||{});const cy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},Wo=Symbol("options");var Se=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Se||{});const Re=uy("ui",()=>{const e=C("None"),t=C(null),n=C(null),r=C(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),To(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),un=e=>new Promise(t=>setTimeout(t,e)),dy=["data-visible","data-location"],fy={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},py=["disabled"],hy=de({__name:"Toolbar",setup(e){const t=C(!1),n=Re(),r=St(),o=Ce(Wo);return Le(()=>{un(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),x("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Se).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),x("a",fy,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):fe("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),x("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Se).Cart,_(ue).AddToCart))}," Cart ")):fe("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),x("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Se).Authentication,_(ue).SignIn))}," Log in ",8,py)):(c=_(o))!=null&&c.toolbar.show.account?(y(),x("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Se).Customer,_(ue).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):fe("",!0)],8,dy)}}}),my=["hidden"],vy=["for"],gy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],yy=["id"],by=["id"],wt=de({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,vy),N("input",Pa({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,gy),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,yy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,by)):fe("",!0)],8,my))}}),Gr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_y={},wy={fill:"none",viewBox:"0 0 24 24"};function Ey(e,t){return y(),x("svg",wy,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Gr(_y,[["render",Ey],["__scopeId","data-v-687bcaf0"]]),Oy=["disabled"],Ld=Symbol("form-state"),Gn=de({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1);dt(Ld,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await un(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(i,a)=>(y(),x("form",{disabled:n.value||r.value,onSubmit:pg(s,["prevent"])},[ha(i.$slots,"default")],40,Oy))}}),Ny=["disabled","data-success","data-error","data-working"],Sy=["data-visible"],Jn=Gr(de({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Ld),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),x("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Ne(jt,{key:0})):fe("",!0)],8,Sy),ke(" "+K(s.value),1)],8,Ny))}}),[["__scopeId","data-v-1440b0cf"]]),xy={class:"moonbase:checkbox"},ky={class:"moonbase:checkbox-container"},Ty=["id","name","value","disabled","aria-invalid","aria-describedby"],Cy={class:"moonbase:checkbox-description"},Py=["for"],Dy=["id"],$y=["id"],Md=de({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",xy,[N("div",ky,[N("input",Pa({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Ty)]),N("div",Cy,[N("label",{for:`mb-${t.name}`},K(t.label),9,Py),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Dy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,$y)):fe("",!0)])]))}}),Iy=["data-visible"],Ay=de({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),u=C(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);un(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Ne(Gn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Jn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Iy),N("button",{type:"button",onClick:f[4]||(f[4]=m=>_(r).show(_(Se).Authentication,_(ue).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Vy={key:0,class:"moonbase:loader"},Ry={key:1,class:"moonbase:error","data-visible":""},jy=["data-visible"],Ly=de({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(!0),i=C(null),a=C(""),l=C(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof sr?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);un(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Ne(Gn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),x("div",Vy,[Z(jt)])):i.value?(y(),x(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Jn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,jy)],64)):(y(),x("div",Ry,K(l.value),1))]),_:1}))}}),My=["data-visible"],Uy=de({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=C(t.getParameter("email")??""),o=C(null),s=C(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),un(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof sr?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Ne(Gn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(()=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Jn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,My)]),_:1}))}}),Fy=["data-visible"],By=de({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=C(""),a=C(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);un(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Ne(Gn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Jn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,Fy)]),_:1}))}}),Hy={class:"moonbase:confirm-email-change"},Zy={key:0,class:"moonbase:loader"},qy={key:1,class:"moonbase:error","data-visible":""},Wy=de({__name:"ConfirmEmailChange",setup(e){const t=Re(),{user:n,confirmEmailChange:r}=St(),o=C(!0),s=C(null);return Le(async()=>{try{const i=t.getParameter("email"),a=t.getParameter("code");if(!i||!a)throw new Error("Link is broken");await r(i,a)}catch(i){s.value=i.message}o.value=!1}),(i,a)=>{var l;return y(),x("div",Hy,[o.value?(y(),x("div",Zy,[Z(jt)])):s.value?(y(),x("div",qy,K(s.value),1)):(y(),x(xe,{key:2},[N("h3",null," Hi "+K((l=_(n))==null?void 0:l.name)+", ",1),a[0]||(a[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class zy{constructor(){Tr(this,"current",this.detect());Tr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let zo=new zy;function Ja(e,t,n,r){zo.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ud(e,t,n,r){zo.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ya(){let e=C(0),t=C(!0);return Ud(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Xe(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xe),r}var Yn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Yn||{}),Xn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Xn||{});function nt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Bd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return ai(i);if(t&1){const a=s.unmount??!0?0:1;return Xe(a,{0(){return null},1(){return ai({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return ai(i)}function ai({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Fd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Ky(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,w)=>w.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
21
+ This will fail in production.`);a=Zo,a._s.has(r)||(s?Ga(r,t,o,a):jd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):jd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&Er){const d=zs();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=c}}return c}return i.$id=r,i}var ue=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ue||{});const cy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},Wo=Symbol("options");var Se=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Se||{});const Re=uy("ui",()=>{const e=C("None"),t=C(null),n=C(null),r=C(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),To(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),un=e=>new Promise(t=>setTimeout(t,e)),dy=["data-visible","data-location"],fy={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},py=["disabled"],hy=de({__name:"Toolbar",setup(e){const t=C(!1),n=Re(),r=St(),o=Ce(Wo);return Le(()=>{un(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),x("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Se).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),x("a",fy,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):fe("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),x("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Se).Cart,_(ue).AddToCart))}," Cart ")):fe("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),x("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Se).Authentication,_(ue).SignIn))}," Log in ",8,py)):(c=_(o))!=null&&c.toolbar.show.account?(y(),x("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Se).Customer,_(ue).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):fe("",!0)],8,dy)}}}),my=["hidden"],vy=["for"],gy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],yy=["id"],by=["id"],wt=de({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,vy),N("input",Pa({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,gy),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,yy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,by)):fe("",!0)],8,my))}}),Kr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_y={},wy={fill:"none",viewBox:"0 0 24 24"};function Ey(e,t){return y(),x("svg",wy,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Kr(_y,[["render",Ey],["__scopeId","data-v-687bcaf0"]]),Oy=["disabled"],Ld=Symbol("form-state"),Gn=de({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1);dt(Ld,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await un(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(i,a)=>(y(),x("form",{disabled:n.value||r.value,onSubmit:pg(s,["prevent"])},[ha(i.$slots,"default")],40,Oy))}}),Ny=["disabled","data-success","data-error","data-working"],Sy=["data-visible"],Jn=Kr(de({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Ld),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),x("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Ne(jt,{key:0})):fe("",!0)],8,Sy),ke(" "+K(s.value),1)],8,Ny))}}),[["__scopeId","data-v-1440b0cf"]]),xy={class:"moonbase:checkbox"},ky={class:"moonbase:checkbox-container"},Ty=["id","name","value","disabled","aria-invalid","aria-describedby"],Cy={class:"moonbase:checkbox-description"},Py=["for"],Dy=["id"],$y=["id"],Md=de({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",xy,[N("div",ky,[N("input",Pa({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Ty)]),N("div",Cy,[N("label",{for:`mb-${t.name}`},K(t.label),9,Py),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Dy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,$y)):fe("",!0)])]))}}),Iy=["data-visible"],Ay=de({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),u=C(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);un(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Ne(Gn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Jn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Iy),N("button",{type:"button",onClick:f[4]||(f[4]=m=>_(r).show(_(Se).Authentication,_(ue).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Vy={key:0,class:"moonbase:loader"},Ry={key:1,class:"moonbase:error","data-visible":""},jy=["data-visible"],Ly=de({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(!0),i=C(null),a=C(""),l=C(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof sr?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);un(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Ne(Gn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),x("div",Vy,[Z(jt)])):i.value?(y(),x(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Jn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,jy)],64)):(y(),x("div",Ry,K(l.value),1))]),_:1}))}}),My=["data-visible"],Uy=de({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=C(t.getParameter("email")??""),o=C(null),s=C(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),un(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof sr?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Ne(Gn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(()=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Jn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,My)]),_:1}))}}),Fy=["data-visible"],By=de({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=C(""),a=C(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);un(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Ne(Gn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Jn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,Fy)]),_:1}))}}),Hy={class:"moonbase:confirm-email-change"},Zy={key:0,class:"moonbase:loader"},qy={key:1,class:"moonbase:error","data-visible":""},Wy=de({__name:"ConfirmEmailChange",setup(e){const t=Re(),{user:n,confirmEmailChange:r}=St(),o=C(!0),s=C(null);return Le(async()=>{try{const i=t.getParameter("email"),a=t.getParameter("code");if(!i||!a)throw new Error("Link is broken");await r(i,a)}catch(i){s.value=i.message}o.value=!1}),(i,a)=>{var l;return y(),x("div",Hy,[o.value?(y(),x("div",Zy,[Z(jt)])):s.value?(y(),x("div",qy,K(s.value),1)):(y(),x(xe,{key:2},[N("h3",null," Hi "+K((l=_(n))==null?void 0:l.name)+", ",1),a[0]||(a[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class zy{constructor(){Tr(this,"current",this.detect());Tr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let zo=new zy;function Ja(e,t,n,r){zo.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ud(e,t,n,r){zo.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ya(){let e=C(0),t=C(!0);return Ud(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Xe(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xe),r}var Yn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Yn||{}),Xn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Xn||{});function nt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Bd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return ai(i);if(t&1){const a=s.unmount??!0?0:1;return Xe(a,{0(){return null},1(){return ai({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return ai(i)}function ai({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Fd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Ky(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,w)=>w.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
22
22
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
23
23
  `)].join(`
24
- `));const f=Bd(c.props??{},i,l),m=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(m.props||(m.props={}),m.props[b]=f[b]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Fd(e){return e.flatMap(t=>t.type===xe?Fd(t.children):[t])}function Bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ky(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Qn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Qn||{});let er=de({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return nt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(zo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const li=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function ui(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(li)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Hd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Xe(t,{0(){return e.matches(li)},1(){let r=e;for(;r!==null;){if(r.matches(li))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Nr(e){e==null||e.focus({preventScroll:!0})}const Jy=["textarea","input"].join(",");function Yy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Jy))??!1}function Jr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function it(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Jr(e):e:ui(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&Yy(f)&&f.select(),2}let Sr=[];Gy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Sr[0]===t.target)return;let n=t.target;n=n.closest(li),Sr.unshift(n??t.target),Sr=Sr.filter(r=>r!=null&&r.isConnected),Sr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ci(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var qd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qd||{});const Ko=Object.assign(de({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=C(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=C(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),Qy({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=eb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));tb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ya();function u(m){const b=G(o);if(!b)return;(w=>w())(()=>{Xe(l.value,{[Dt.Forwards]:()=>{it(b,We.First,{skipElements:[m.relatedTarget]})},[Dt.Backwards]:()=>{it(b,We.Last,{skipElements:[m.relatedTarget]})}})})}const c=C(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const b=Zd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=m.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Wd(b,O)||(c.value?it(G(o),Xe(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Nr(m.target)))}return()=>{const m={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:w,containers:$,...H}=e;return Ue(xe,[!!(O&4)&&Ue(er,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Qn.Focusable}),nt({ourProps:b,theirProps:{...t,...H},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(er,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Qn.Focusable})])}}}),{features:qd});function Xy(e){const t=C(Sr.slice());return Je([e],([n],[r])=>{r===!0&&n===!1?ci(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Sr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Qy({ownerDocument:e},t){const n=Xy(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Nr(n())},{flush:"post"})}),bt(()=>{t.value&&Nr(n())})}function eb({ownerDocument:e,container:t,initialFocus:n},r){const o=C(null),s=C(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{Je([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&ci(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Nr(u):it(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function tb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Zd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Wd(a,u)?(r.value=u,Nr(u)):(i.preventDefault(),i.stopPropagation(),Nr(l)):Nr(r.value)},!0)}function Wd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function nb(e){let t=Fh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Go(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return ci(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Go();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function rb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ob(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return/Android/gi.test(window.navigator.userAgent)}function ib(){return zd()||sb()}function ab(){return zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Go();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function lb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ub(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const xr=rb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Go(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:ub(n)},o=[ab(),ob(),lb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});xr.subscribe(()=>{const e=xr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&xr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&xr.dispatch("TEARDOWN",n)}});function cb(e,t,n){const r=nb(xr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Je([e,t],([s,i],[a],l)=>{if(!s||!i)return;xr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(xr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let db=0;function fb(){return++db}function Lt(){return fb()}const el=new Map,Jo=new Map;function Kd(e,t=C(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Jo.get(r)??1;if(s===1?Jo.delete(r):Jo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Jo.get(r)??0;Jo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Yo(e,t,n,r){zo.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Gd=30;function Jd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=C(null);Yo(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Yo(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Yo(n,"click",i=>{ib()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Yo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Yo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Gd||Math.abs(a.y-s.y)>=Gd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ud(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Yd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=C(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(er,{features:Qn.Hidden,ref:r})}}}let Xd=Symbol("Context");var at=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(at||{});function pb(){return di()!==null}function di(){return Ce(Xd,null)}function Qd(e){dt(Xd,e)}const ef=Symbol("ForcePortalRootContext");function hb(){return Ce(ef,!1)}const tf=de({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(ef,e.force),()=>{const{force:r,...o}=e;return nt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let nf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function mb(){return Ce(nf,()=>{})}function vb({type:e,enabled:t,element:n,onUpdate:r}){let o=mb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{Je(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(nf,s)}var rt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(rt||{});let gb=Symbol("DescriptionContext");function yb({slot:e=C({}),name:t="Description",props:n={}}={}){let r=C([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(gb,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function rf(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const bb=de({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=C(null);Q(()=>cn(r));const o=hb(),s=Ce(sf,null),i=C(o===!0||s==null?rf(r.value):s.resolveTarget()),a=C(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(nl,null);let u=!1;const c=zs();return Je(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(bm,{to:i.value},nt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function of(){const e=Ce(nl,null),t=C([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,de({name:"PortalWrapper",setup(s,{slots:i}){return dt(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let sf=Symbol("PortalGroupContext");const _b=de({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=No({resolveTarget(){return e.target}});return dt(sf,r),()=>{const{target:o,...s}=e;return nt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function fi(e){const t=Ce(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,fi),n}return t}const pi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",af=de({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:pi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var he;const s=C(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),u=di(),c=Q(()=>e.open===pi&&u!==null?(u.value&at.Open)===at.Open:e.open),d=C(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==pi||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===pi?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),w=C(null),$={titleId:w,panelRef:C(null),dialogState:b,setTitleId(oe){w.value!==oe&&(w.value=oe)},close(){t("close",!1)}},H=Q(()=>l.value>1),T=Ce(rl,null)!==null,[te,S]=of(),{resolveContainers:U,mainTreeNodeRef:j,MainTreeNode:ge}=Yd({portals:te,defaultContainers:[Q(()=>$.panelRef.value??d.value)]}),q=Q(()=>H.value?"parent":"leaf"),A=Q(()=>u!==null?(u.value&at.Closing)===at.Closing:!1),V=Q(()=>T||A.value?!1:O.value),D=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd(D,V);const ie=Q(()=>H.value?!0:O.value),$e=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd($e,ie),vb({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Xe(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const E=yb({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(rl,$);const P=Q(()=>!(!O.value||H.value));Jd(U,(oe,Fe)=>{oe.preventDefault(),$.close(),To(()=>Fe==null?void 0:Fe.focus())},P);const Y=Q(()=>!(H.value||b.value!==0));Ja((he=f.value)==null?void 0:he.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===rt.Escape&&(oe.preventDefault(),oe.stopPropagation(),$.close()))});const re=Q(()=>!(A.value||b.value!==0||T));return cb(f,re,oe=>({containers:[...oe.containers??[],U]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const tr=xt.target.getBoundingClientRect();tr.x===0&&tr.y===0&&tr.width===0&&tr.height===0&&$.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":w.value,"aria-describedby":E.value},tr={open:b.value===0};return Ue(tf,{force:!0},()=>[Ue(bb,()=>Ue(_b,{target:d.value},()=>Ue(tf,{force:!1},()=>Ue(Ko,{initialFocus:ht,containers:U,features:O.value?Xe(q.value,{parent:Ko.features.RestoreFocus,leaf:Ko.features.All&~Ko.features.FocusLock}):Ko.features.None},()=>Ue(S,{},()=>nt({ourProps:xt,theirProps:{...Be,...n},slot:tr,attrs:n,slots:r,visible:b.value===0,features:Yn.RenderStrategy|Yn.Static,name:"Dialog"})))))),Ue(ge)])}}}),lf=de({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=fi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return nt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),uf=de({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=fi("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return nt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),hi=de({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=fi("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return nt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function cf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function df(e,t){let n=C(cf(e.value.type,e.value.as));return Le(()=>{n.value=cf(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const ff=Symbol("PopoverContext");function ol(e){const t=Ce(ff,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const wb=Symbol("PopoverGroupContext");function pf(){return Ce(wb,null)}const hf=Symbol("PopoverPanelContext");function Eb(){return Ce(hf,null)}let sl=de({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var te;const o=C(null);r({el:o,$el:o});const s=C(1),i=C(null),a=C(null),l=C(null),u=C(null),c=Q(()=>cn(o)),d=Q(()=>{var V,D;if(!G(i)||!G(u))return!1;for(const ie of document.querySelectorAll("body > *"))if(Number(ie==null?void 0:ie.contains(G(i)))^Number(ie==null?void 0:ie.contains(G(u))))return!0;const S=ui(),U=S.indexOf(G(i)),j=(U+S.length-1)%S.length,ge=(U+1)%S.length,q=S[j],A=S[ge];return!((V=G(u))!=null&&V.contains(q))&&!((D=G(u))!=null&&D.contains(A))}),f={popoverState:s,buttonId:C(null),panelId:C(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Xe(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(S){f.closePopover();const U=S?S instanceof HTMLElement?S:S.value instanceof HTMLElement?G(S):G(f.button):G(f.button);U==null||U.focus()}};dt(ff,f),Qd(Q(()=>Xe(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=pf(),O=b==null?void 0:b.registerPopover,[w,$]=of(),H=Yd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:w,defaultContainers:[i,u]});function T(){var S,U,j;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((S=c.value)==null?void 0:S.activeElement)&&(((U=G(i))==null?void 0:U.contains(c.value.activeElement))||((j=G(u))==null?void 0:j.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(m)),Ja((te=c.value)==null?void 0:te.defaultView,"focus",S=>{var U,j;S.target!==window&&S.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(H.contains(S.target)||(U=G(f.beforePanelSentinel))!=null&&U.contains(S.target)||(j=G(f.afterPanelSentinel))!=null&&j.contains(S.target)||f.closePopover()))},!0),Jd(H.resolveContainers,(S,U)=>{var j;f.closePopover(),Hd(U,Qa.Loose)||(S.preventDefault(),(j=G(i))==null||j.focus())},Q(()=>s.value===0)),()=>{const S={open:s.value===0,close:f.close};return Ue(xe,[Ue($,{},()=>nt({theirProps:{...e,...n},ourProps:{ref:o},slot:S,slots:t,attrs:n,name:"Popover"})),Ue(H.MainTreeNode)])}}});const mf=de({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=pf(),a=i==null?void 0:i.closeOthers,l=Eb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=C(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=df(Q(()=>({as:e.as,type:t.type})),c);function m(T){var te,S,U,j,ge;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),(S=(te=T.target).click)==null||S.call(te),o.closePopover(),(U=G(o.button))==null||U.focus();break}}else switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case rt.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(j=s.value)!=null&&j.activeElement&&!((ge=G(o.button))!=null&&ge.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function b(T){u.value||T.key===rt.Space&&T.preventDefault()}function O(T){var te,S;e.disabled||(u.value?(o.closePopover(),(te=G(o.button))==null||te.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(S=G(o.button))==null||S.focus()))}function w(T){T.preventDefault(),T.stopPropagation()}const $=Ya();function H(){const T=G(o.panel);if(!T)return;function te(){Xe($.value,{[Dt.Forwards]:()=>it(T,We.First),[Dt.Backwards]:()=>it(T,We.Last)})===xn.Error&&it(ui().filter(U=>U.dataset.moonbaseFocusGuard!=="true"),Xe($.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:G(o.button)})}te()}return()=>{const T=o.popoverState.value===0,te={open:T},{id:S,...U}=e,j=u.value?{ref:c,type:f.value,onKeydown:m,onClick:O}:{ref:c,id:S,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:b,onClick:O,onMousedown:w};return Ue(xe,[nt({ourProps:j,theirProps:{...t,...U},slot:te,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(er,{id:d,features:Qn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:H})])}}}),vf=de({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(hf,s.panelId),ft(()=>{var $,H;if(!o||s.popoverState.value!==0||!s.panel)return;const w=($=i.value)==null?void 0:$.activeElement;(H=G(s.panel))!=null&&H.contains(w)||it(G(s.panel),We.First)});const u=di(),c=Q(()=>u!==null?(u.value&at.Open)===at.Open:s.popoverState.value===0);function d(w){var $,H;switch(w.key){case rt.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!(($=G(s.panel))!=null&&$.contains(i.value.activeElement)))return;w.preventDefault(),w.stopPropagation(),s.closePopover(),(H=G(s.button))==null||H.focus();break}}function f(w){var H,T,te,S,U;const $=w.relatedTarget;$&&G(s.panel)&&((H=G(s.panel))!=null&&H.contains($)||(s.closePopover(),((te=(T=G(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&te.call(T,$)||(U=(S=G(s.afterPanelSentinel))==null?void 0:S.contains)!=null&&U.call(S,$))&&$.focus({preventScroll:!0})))}const m=Ya();function b(){const w=G(s.panel);if(!w)return;function $(){Xe(m.value,{[Dt.Forwards]:()=>{var T;it(w,We.First)===xn.Error&&((T=G(s.afterPanelSentinel))==null||T.focus())},[Dt.Backwards]:()=>{var H;(H=G(s.button))==null||H.focus({preventScroll:!0})}})}$()}function O(){const w=G(s.panel);if(!w)return;function $(){Xe(m.value,{[Dt.Forwards]:()=>{const H=G(s.button),T=G(s.panel);if(!H)return;const te=ui(),S=te.indexOf(H),U=te.slice(0,S+1),ge=[...te.slice(S+1),...U];for(const q of ge.slice())if(q.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(q)){const A=ge.indexOf(q);A!==-1&&ge.splice(A,1)}it(ge,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var T;it(w,We.Previous)===xn.Error&&((T=G(s.button))==null||T.focus())}})}$()}return()=>{const w={open:s.popoverState.value===0,close:s.close},{id:$,focus:H,...T}=e,te={ref:s.panel,id:$,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return nt({ourProps:te,theirProps:{...t,...T},attrs:t,slot:w,slots:{...n,default:(...S)=>{var U;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(er,{id:a,ref:s.beforePanelSentinel,features:Qn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(U=n.default)==null?void 0:U.call(n,...S),c.value&&s.isPortalled.value&&Ue(er,{id:l,ref:s.afterPanelSentinel,features:Qn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Yn.RenderStrategy|Yn.Static,visible:c.value,name:"PopoverPanel"})}}});let Ob=de({props:{onFocus:{type:Function,required:!0}},setup(e){let t=C(!0);return()=>t.value?Ue(er,{as:"button",type:"button",features:Qn.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const gf=Symbol("TabsContext");function Xo(e){const t=Ce(gf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xo),n}return t}const il=Symbol("TabsSSRContext"),Nb=de({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=C(e.selectedIndex??e.defaultIndex),s=C([]),i=C([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=Jr(c.tabs.value,G),w=Jr(c.panels.value,G),$=O.filter(H=>{var T;return!((T=G(H))!=null&&T.hasAttribute("disabled"))});if(b<0||b>O.length-1){const H=Xe(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Xe(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Xe(H,{0:()=>O.indexOf($[0]),1:()=>O.indexOf($[$.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=w}else{const H=O.slice(0,b),te=[...O.slice(b),...H].find(U=>$.includes(U));if(!te)return;let S=O.indexOf(te)??c.selectedIndex.value;S===-1&&(S=c.selectedIndex.value),o.value=S,c.tabs.value=O,c.panels.value=w}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=Jr(s.value,G),!a.value){const w=s.value.indexOf(O)??o.value;w!==-1&&(o.value=w)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=Jr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(gf,c);const d=C({tabs:[],panels:[]}),f=C(!1);Le(()=>{f.value=!0}),dt(il,Q(()=>f.value?null:d.value));const m=Q(()=>e.selectedIndex);return Le(()=>{Je([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=Jr(c.tabs.value,G);b.some((w,$)=>G(c.tabs.value[$])!==G(w))&&c.setSelectedIndex(b.findIndex(w=>G(w)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Ob,{onFocus:()=>{for(const O of s.value){const w=G(O);if((w==null?void 0:w.tabIndex)===0)return w.focus(),!0}return!1}}),nt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Sb=de({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Xo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return nt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=de({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xo("Tab"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(il),a=Q(()=>{if(i.value){const w=i.value.tabs.indexOf(e.id);return w===-1?i.value.tabs.push(e.id)-1:w}return-1}),l=Q(()=>{const w=o.tabs.value.indexOf(s);return w===-1?a.value:w}),u=Q(()=>l.value===o.selectedIndex.value);function c(w){var H;const $=w();if($===xn.Success&&o.activation.value==="auto"){const T=(H=cn(s))==null?void 0:H.activeElement,te=o.tabs.value.findIndex(S=>G(S)===T);te!==-1&&o.setSelectedIndex(te)}return $}function d(w){const $=o.tabs.value.map(T=>G(T)).filter(Boolean);if(w.key===rt.Space||w.key===rt.Enter){w.preventDefault(),w.stopPropagation(),o.setSelectedIndex(l.value);return}switch(w.key){case rt.Home:case rt.PageUp:return w.preventDefault(),w.stopPropagation(),c(()=>it($,We.First));case rt.End:case rt.PageDown:return w.preventDefault(),w.stopPropagation(),c(()=>it($,We.Last))}if(c(()=>Xe(o.orientation.value,{vertical(){return w.key===rt.ArrowUp?it($,We.Previous|We.WrapAround):w.key===rt.ArrowDown?it($,We.Next|We.WrapAround):xn.Error},horizontal(){return w.key===rt.ArrowLeft?it($,We.Previous|We.WrapAround):w.key===rt.ArrowRight?it($,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return w.preventDefault()}const f=C(!1);function m(){var w;f.value||(f.value=!0,!e.disabled&&((w=G(s))==null||w.focus({preventScroll:!0}),o.setSelectedIndex(l.value),ci(()=>{f.value=!1})))}function b(w){w.preventDefault()}const O=df(Q(()=>({as:e.as,type:t.type})),s);return()=>{var te;const w={selected:u.value,disabled:e.disabled??!1},{id:$,...H}=e,T={ref:s,onKeydown:d,onMousedown:b,onClick:m,id:$,role:"tab",type:O.value,"aria-controls":(te=G(o.panels.value[l.value]))==null?void 0:te.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return nt({ourProps:T,theirProps:H,slot:w,attrs:t,slots:n,name:"Tab"})}}}),xb=de({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Xo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return nt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=de({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xo("TabPanel"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(il),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(er,{as:"span","aria-hidden":!0,...b}):nt({ourProps:b,theirProps:m,slot:c,attrs:t,slots:n,features:Yn.Static|Yn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function kb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function mi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Tb(e,t){const n=Go();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function yf(e,t,n,r,o,s){const i=Go(),a=s!==void 0?kb(s):()=>{};return mi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{mi(e,...n),ul(e,...r),i.add(Tb(e,l=>(mi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>mi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function kr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function Cb(){return Ce(dl,null)!==null}function Pb(){const e=Ce(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Db(){const e=Ce(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function vi(e){return"children"in e?vi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bf(e){const t=C([]),n=C(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Xn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Xe(i,{[Xn.Unmount](){t.value.splice(a,1)},[Xn.Hidden](){t.value[a].state="hidden"}}),!vi(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Xn.Unmount)}return{children:t,register:o,unregister:r}}const _f=Yn.RenderStrategy,Qo=de({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=C(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function l(){s.value|=at.Closing,t("beforeLeave")}function u(){s.value&=~at.Closing,t("afterLeave")}if(!Cb()&&pb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=C(null),d=Q(()=>e.unmount?Xn.Unmount:Xn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Pb(),{register:b,unregister:O}=Db(),w=C(f.value?"visible":"hidden"),$={value:!0},H=Lt(),T={value:!1},te=bf(()=>{!T.value&&w.value!=="hidden"&&(w.value="hidden",O(H),u())});Le(()=>{const ie=b(H);bt(ie)}),ft(()=>{if(d.value===Xn.Hidden&&H){if(f.value&&w.value!=="visible"){w.value="visible";return}Xe(w.value,{hidden:()=>O(H),visible:()=>b(H)})}});const S=kr(e.enter),U=kr(e.enterFrom),j=kr(e.enterTo),ge=kr(e.entered),q=kr(e.leave),A=kr(e.leaveFrom),V=kr(e.leaveTo);Le(()=>{ft(()=>{if(w.value==="visible"){const ie=G(c);if(ie instanceof Comment&&ie.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function D(ie){const $e=$.value&&!m.value,E=G(c);!E||!(E instanceof HTMLElement)||$e||(T.value=!0,f.value&&i(),f.value||l(),ie(f.value?yf(E,S,U,j,ge,P=>{T.value=!1,P===cl.Finished&&a()}):yf(E,q,A,V,ge,P=>{T.value=!1,P===cl.Finished&&(vi(te)||(w.value="hidden",O(H),u()))})))}return Le(()=>{Je([f],(ie,$e,E)=>{D(E),$.value=!1},{immediate:!0})}),dt(fl,te),Qd(Q(()=>Xe(w.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:ie,show:$e,enter:E,enterFrom:P,enterTo:Y,entered:re,leave:he,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...m.value&&f.value&&zo.isServer?{class:bs([n.class,ht.class,...S,...U])}:{}};return nt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:_f,visible:w.value==="visible",name:"TransitionChild"})}}}),$b=Qo,pl=de({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=di(),s=Q(()=>e.show===null&&o!==null?(o.value&at.Open)===at.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(s.value?"visible":"hidden"),a=bf(()=>{i.value="hidden"}),l=C(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":vi(a)||(i.value="hidden")})}),dt(fl,a),dt(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return nt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue($b,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:_f,visible:i.value==="visible",name:"Transition"})}}}),Ib={class:"moonbase:modal-container"},gi=de({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Ib,[Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Ab=["data-visible"],Vb=de({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(Wo),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);un(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof sr?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Ne(Gn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Jn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Ab),(f=_(s))!=null&&f.auth.enable.signUp?(y(),x("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>_(r).show(_(Se).Authentication,_(ue).SignUp,{email:i.value}))}," Create account ")):fe("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=m=>_(r).show(_(Se).Authentication,_(ue).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Rb={class:"moonbase:authentication"},jb={key:0,class:"moonbase:loader"},Lb=de({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Re(),{loaded:o,user:s}=St();Je(s,a=>{a&&r.intent===ue.SignIn&&(n("authenticated",a),r.dequeue())});const i=Q(()=>{switch(r.intent){case ue.SignIn:return"Sign in";case ue.SignUp:return"Sign up";case ue.ConfirmAccount:return"Confirm account";case ue.ConfirmEmailChange:return"Confirm email change";case ue.ForgotPassword:return"Forgot password";case ue.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(y(),Ne(gi,{open:a.open,onClose:l[3]||(l[3]=u=>_(r).reset())},{default:_e(()=>[N("div",Rb,[Z(_(hi),{as:"h3"},{default:_e(()=>[ke(K(i.value),1)]),_:1}),_(o)?_(r).intent===_(ue).SignIn?(y(),Ne(Vb,{key:1})):_(r).intent===_(ue).SignUp?(y(),Ne(Ay,{key:2,onSignedUp:l[0]||(l[0]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmAccount?(y(),Ne(Ly,{key:3,onConfirmedAccount:l[1]||(l[1]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmEmailChange?(y(),Ne(Wy,{key:4})):_(r).intent===_(ue).ForgotPassword?(y(),Ne(Uy,{key:5})):_(r).intent===_(ue).ResetPassword?(y(),Ne(By,{key:6,onPasswordReset:l[2]||(l[2]=u=>_(r).dequeue())})):fe("",!0):(y(),x("div",jb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Mb={class:"moonbase:product-cart-item"},Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb={class:"moonbase:product-cart-item-content"},Hb={key:0,class:"moonbase:cart-item-discount"},Zb={class:"font-semibold"},qb={key:0,class:"ml-0.5"},Wb={key:2,class:"moonbase:product-cart-item-total"},zb={key:0,class:"moonbase:discount"},Kb={key:1},Gb=de({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),x("div",Mb,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),x("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Ub)):(y(),x("div",Fb)),N("div",Bb,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),x("p",Hb,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",Zb,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),x("span",qb," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):fe("",!0)])):fe("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),x("div",Wb,[t.lineItem.variation.hasDiscount?(y(),x("span",zb,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):fe("",!0),t.lineItem.quantity!==1?(y(),x("span",Kb,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):fe("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):fe("",!0)])}}}),Jb={class:"moonbase:bundle-cart-item"},Yb=["src"],Xb={key:1,class:"moonbase:image-placeholder"},Qb={class:"moonbase:bundle-cart-item-content"},e_={key:0,class:"moonbase:cart-item-discount"},t_={class:"font-semibold"},n_={key:0,class:"ml-0.5"},r_={class:"moonbase:bundle-cart-item-summary"},o_=["data-open"],s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=["src"],u_={key:1,class:"moonbase:image-placeholder"},c_=["data-included"],d_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},f_={key:0,class:"truncate italic"},p_={key:1,class:"truncate"},h_=de({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=C(!1),n=C(null);return Je(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),x("div",null,[N("div",Jb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),x("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Yb)):(y(),x("div",Xb)),N("div",Qb,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),x("p",e_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",t_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),x("span",n_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):fe("",!0)])):fe("",!0),N("div",r_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),x("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),x(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):fe("",!0),o[2]||(o[2]=ke(" products "))]),(y(),x("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,o_))])):fe("",!0)])]),r.lineItem.variation?(y(),x("div",s_,[r.lineItem.variation.hasDiscount?(y(),x("span",i_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):fe("",!0),r.lineItem.quantity!==1?(y(),x("span",a_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):fe("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):fe("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),x(xe,null,on(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),x("div",{key:f.id},[f!=null&&f.iconUrl?(y(),x("img",{key:0,src:f.iconUrl,alt:""},null,8,l_)):(y(),x("div",u_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),x("svg",d_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):fe("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,c_),f.included?f!=null&&f.tagline?(y(),x("p",p_,K(f.tagline),1)):fe("",!0):(y(),x("p",f_," You already own this "))])]))),128))],512)])}}}),m_={class:"moonbase:cart-modal-container"},v_=de({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",m_,[Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),g_=["disabled","data-success","data-error","data-working","data-variant"],y_=["data-visible"],wf=de({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await un(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(a,l)=>(y(),x("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Ne(jt,{key:0})):fe("",!0)],8,y_),ke(" "+K(s.value),1)],8,g_))}}),b_={class:"moonbase:cart"},__={key:0,role:"list",class:"moonbase:cart-items"},w_={key:1,class:"moonbase:cart-empty"},E_={key:2,class:"moonbase:cart-total"},O_=de({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Re(),{items:n,total:r,currency:o,checkout:s}=Ba(),i=Ce(Wo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(y(),Ne(v_,{open:l.open,onClose:u[0]||(u[0]=c=>_(t).reset())},{default:_e(()=>[N("div",b_,[Z(_(hi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[ke(" Cart ")])),_:1}),_(n).length>0?(y(),x("ul",__,[(y(!0),x(xe,null,on(_(n),c=>(y(),x("li",{key:c.id},[c.type==="Product"?(y(),Ne(Gb,{key:0,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Ne(h_,{key:1,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):fe("",!0)]))),128))])):(y(),x("div",w_," Your cart is empty! ")),_(n).length>0?(y(),x("div",E_,[u[2]||(u[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(r).amount,_(r).currency)),1),u[3]||(u[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):fe("",!0),_(n).length>0?(y(),Ne(wf,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):fe("",!0)])]),_:1},8,["open"]))}}),N_={class:"moonbase:account"},S_={key:0,class:"moonbase:error"},x_={key:1,class:"moonbase:notification"},k_={key:0,class:"moonbase:error"},T_=de({__name:"Account",setup(e){var H,T,te;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=C(((H=n.value)==null?void 0:H.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((te=n.value)==null?void 0:te.communicationPreferences)??{newsletterOptIn:!1}),u=C(null),c=C(!1),d=C(""),f=C(""),m=C(null),b=C(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(S){throw u.value=S,S}}async function w(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(S){throw m.value=S,S}}async function $(){b.value=!0,await s(),t.reset()}return(S,U)=>(y(),x("div",N_,[Z(Gn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":U[0]||(U[0]=j=>i.value=j),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":U[1]||(U[1]=j=>a.value=j),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":U[2]||(U[2]=j=>l.value.newsletterOptIn=j),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Jn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),x("p",S_,K(u.value.message),1)):c.value?(y(),x("p",x_," You need to confirm your new email address, please check your inbox ")):fe("",!0)]),_:1}),Z(Gn,{handler:w},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":U[3]||(U[3]=j=>d.value=j),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":U[4]||(U[4]=j=>f.value=j),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Jn,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),x("p",k_,K(m.value.message),1)):fe("",!0)]),_:1}),Z(wf,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:$})]))}}),C_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function D_(e,t){return y(),x("svg",P_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Ef=Gr(C_,[["render",D_]]),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return y(),x("svg",I_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Of=Gr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return y(),x("svg",R_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Nf=Gr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return y(),x("svg",M_,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Sf=Gr(L_,[["render",U_]]),F_={class:"moonbase:product-downloads"},B_=["data-last","onClick"],H_={class:"moonbase:sr-only"},Z_={class:"moonbase:sr-only"},q_=["onClick"],W_=de({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Yt.Universal]:()=>Ef,[Yt.Windows]:()=>Of,[Yt.Linux]:()=>Nf,[Yt.Mac]:()=>Sf},{downloadProduct:r}=ei(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),x("span",F_,[(y(!0),x(xe,null,on(o.value,(a,l,u)=>(y(),x(xe,{key:l},[a.length===1?(y(),x("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",H_,K(l.toString()),1),(y(),Ne(pa(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,B_)):(y(),Ne(_(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(mf),null,{default:_e(()=>[N("span",Z_,K(l.toString()),1),(y(),Ne(pa(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),x(xe,null,on(a,c=>(y(),x("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},K(c.name),9,q_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),z_={class:"moonbase:product-activations"},K_={key:0,scope:"col"},G_={key:0},J_={colspan:"3"},Y_={key:1},X_={key:0},Q_=["onClick"],e1=de({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ei(),i=C(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===Ii.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),x("table",z_,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),x("th",K_,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):fe("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),x("tr",Y_,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):fe("",!0):(y(),x("tr",G_,[N("td",J_,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(i.value,d=>{var f;return y(),x("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),x("td",X_,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Ne(jt,{key:0})):fe("",!0),c[7]||(c[7]=ke(" Revoke "))],8,Q_)])):fe("",!0)])}),128))])]))}}),t1={class:"moonbase:products"},n1={key:0,scope:"col"},r1={key:0},o1={key:1},s1=["src"],i1={key:1,class:"moonbase:image-placeholder"},a1={key:0},l1={key:0},u1=de({__name:"Products",setup(e){const{getProducts:t}=ei(),n=C(null);Le(async()=>{let o=await t();for(n.value=o.items;o.hasMore&&o.next;)o=await t(o.next),n.value.push(...o.items)});const r=Q(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(y(),x("table",t1,[N("thead",null,[N("tr",null,[s[0]||(s[0]=N("th",{scope:"col"}," Product ",-1)),s[1]||(s[1]=N("th",{scope:"col"}," Activations ",-1)),r.value?(y(),x("th",n1," Downloads ")):fe("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),x("tr",o1,s[4]||(s[4]=[N("td",{colspan:"3"}," No products found ",-1)]))):fe("",!0):(y(),x("tr",r1,[N("td",null,[Z(jt),s[2]||(s[2]=ke(" Loading products.. "))]),s[3]||(s[3]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(n.value||[],i=>(y(),x("tr",{key:i.id},[N("td",null,[N("div",null,[i.iconUrl?(y(),x("img",{key:0,src:i.iconUrl,alt:""},null,8,s1)):(y(),x("div",i1)),N("span",null,K(i.name),1)])]),Z(_(sl),{as:"td"},{default:_e(()=>[Z(_(mf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[s[5]||(s[5]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),null,{default:_e(()=>[Z(e1,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(y(),x("td",a1,[i.currentVersion!=null?(y(),x("div",l1,[i.downloads?(y(),Ne(W_,{key:0,downloads:i.downloads},null,8,["downloads"])):fe("",!0)])):fe("",!0)])):fe("",!0)]))),128))])]))}}),c1={class:"moonbase:redeem"},d1=["data-visible"],f1={key:1,class:"moonbase:redeem-voucher"},p1={key:0},h1={key:1},m1={class:"moonbase:redeem-voucher-products"},v1=["src"],g1={key:1,class:"moonbase:image-placeholder"},y1={key:0},b1={class:"moonbase:redeem-voucher-bundle"},_1=["src"],w1={key:1,class:"moonbase:image-placeholder"},E1={key:0},O1={class:"moonbase:redeem-voucher-bundle-products"},N1={class:"shrink-0"},S1=["src"],x1={key:1,class:"moonbase:image-placeholder"},k1=de({__name:"Redeem",setup(e){const{redeem:t}=Ig(),n=C(!1),r=C(null),o=C(null),s=C("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),x("div",c1,[Z(ja,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),x("div",f1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),x("h4",p1,K(r.value.description),1)):fe("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),x("div",h1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",m1,[(y(!0),x(xe,null,on(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),x("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,v1)):(y(),x("div",g1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",y1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),x(xe,null,on(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),x("div",{key:u.id},[N("div",b1,[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,_1)):(y(),x("div",w1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",E1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",O1,[(y(!0),x(xe,null,on(u.products,d=>(y(),x("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",N1,[d.iconUrl?(y(),x("img",{key:0,src:d.iconUrl,alt:""},null,8,S1)):(y(),x("div",x1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):fe("",!0)])):(y(),Ne(Gn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Jn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,d1)]}),_:1}))]),_:1})]))}}),T1={class:"moonbase:customer"},C1=de({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ue.ViewAccount:return 0;case ue.ViewProducts:return 1;case ue.RedeemVoucher:return 2}return 0}const r=C(n(t.intent));Je(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Ne(gi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",T1,[Z(_(Nb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Sb),null,{default:_e(()=>[Z(_(al),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(al),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(al),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(xb),null,{default:_e(()=>[Z(_(ll),null,{default:_e(()=>[Z(T_)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(u1)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(k1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),P1={class:"moonbase:auto-activate"},D1={key:0,class:"moonbase:loader"},$1={key:1,class:"moonbase:loader"},I1={key:2,class:"moonbase:loader"},A1={key:3},V1={key:0,class:"moonbase:auto-activate-product"},R1=["src"],j1={key:1,class:"moonbase:image-placeholder"},L1={key:1,class:"moonbase:loader"},M1={key:2,class:"moonbase:loader"},U1={key:3,class:"moonbase:loader"},F1={key:4,class:"moonbase:auto-activate-content"},B1={key:0},H1={key:1},Z1={class:"moonbase:auto-activate-cta"},q1=["href"],W1={key:2,class:"moonbase:auto-activate-trial"},z1={class:"moonbase:auto-activate-cta"},K1=de({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=$g(o);Je(s,O=>{var w;!a.value&&!l.value&&(O==null?void 0:O.status)===Xt.Requested&&((w=O==null?void 0:O.licenseEligibility)!=null&&w.eligible)&&c()});function m(){f(),t.show(Se.Customer,ue.ViewProducts)}function b(){t.enqueue(Se.Activation,ue.ActivateProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}return(O,w)=>{var $,H,T,te;return y(),x("div",P1,[_(i)||!_(r)?(y(),x("div",D1,[Z(jt)])):_(u)?(y(),x("div",$1,K(_(u)),1)):_(s)?(y(),x("div",A1,[_(s).product?(y(),x("div",V1,[_(s).product.iconUrl?(y(),x("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,R1)):(y(),x("div",j1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):fe("",!0),(($=_(s))==null?void 0:$.status)===_(Xt).Cancelled?(y(),x("div",L1,w[2]||(w[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),x("div",M1,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((H=_(s))==null?void 0:H.status)===_(Xt).Completed?(y(),x("div",U1,w[3]||(w[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),x("div",F1,[_(n)?(T=_(n).ownedProducts)!=null&&T.includes(_(s).product.id)?(y(),x("div",H1,[w[5]||(w[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",Z1,[N("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=S=>m())}," Licenses "),_(s).product&&_(s).product.website?(y(),x("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,q1)):fe("",!0)])])):fe("",!0):(y(),x("div",B1,[w[4]||(w[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(te=_(s).trialEligibility)!=null&&te.eligible?(y(),x("div",W1,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),x(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):fe("",!0),w[6]||(w[6]=ke(". ")),N("span",z1,[N("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=S=>_(d)())}," Start trial ")])])):fe("",!0)]))])):(y(),x("div",I1," Could not find activation request "))])}}}),G1={class:"moonbase:activation"},J1=de({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(gi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",G1,[Z(_(hi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ue).ActivateProduct?(y(),Ne(K1,{key:0})):fe("",!0)])]),_:1},8,["open"]))}});function Y1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const X1={class:"moonbase:download-product"},Q1={key:0,class:"moonbase:loader"},ew={key:1,class:"moonbase:loader"},tw={key:2,class:"moonbase:loader"},nw={key:3},rw={class:"moonbase:download-product-product"},ow=["src"],sw={key:1,class:"moonbase:image-placeholder"},iw={key:0},aw={key:0,class:"moonbase:download-product-content"},lw={key:1,class:"moonbase:download-product-content"},uw={key:2,class:"moonbase:download-product-content"},cw={key:0,role:"list"},dw={class:"moonbase:download-product-download-name"},fw=["onClick"],pw={class:"moonbase:download-product-download-description"},hw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},mw={key:1,class:"moonbase:loader"},vw=de({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=ei(),i={[Yt.Universal]:()=>Ef,[Yt.Windows]:()=>Of,[Yt.Linux]:()=>Nf,[Yt.Mac]:()=>Sf},a=C(null),l=C([]),u=C(null),c=C(!0),d=Q(()=>t.getParameter("key")),f=Q(()=>{var O,w;return(w=(O=a.value)==null?void 0:O.downloads)==null?void 0:w.filter($=>!d.value||$.key===d.value)});Le(async()=>{const O=t.getParameter("product_id"),w=t.getParameter("version");if(!O){u.value="Link is broken";return}try{a.value=await o(O,w||void 0)}catch($){u.value=$.message}c.value=!1});function m(){t.enqueue(Se.Download,ue.DownloadProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}async function b(O){l.value.push(O.key),await s(O),l.value=l.value.filter(w=>w!==O.key)}return(O,w)=>{var $,H;return y(),x("div",X1,[c.value||!_(r)?(y(),x("div",Q1,[Z(jt)])):u.value?(y(),x("div",ew,K(u.value),1)):a.value?(y(),x("div",nw,[N("div",rw,[a.value.iconUrl?(y(),x("img",{key:0,src:a.value.iconUrl,alt:""},null,8,ow)):(y(),x("div",sw)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),x("span",iw," (pre-release)")):fe("",!0)]),N("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!_(n)?(y(),x("div",aw,[w[0]||(w[0]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!(($=_(n).ownedProducts)!=null&&$.includes(a.value.id))?(y(),x("div",lw," This product requires ownership to download ")):(y(),x("div",uw,[(H=a.value)!=null&&H.downloads&&a.value.downloads.length>0?(y(),x("ul",cw,[(y(!0),x(xe,null,on(f.value,T=>(y(),x("li",{key:T.key},[N("div",null,[N("p",dw,[N("button",{onClick:te=>b(T)},[w[1]||(w[1]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(T.name),1)],8,fw)]),N("p",pw,[(y(),Ne(pa(i[T.platform]()),{"aria-hidden":"true"})),ke(" "+K(T.platform)+" ",1),w[2]||(w[2]=N("span",null," |",-1)),ke(" "+K(_(Y1)(T.size)),1)])]),N("div",null,[l.value.includes(T.key)?(y(),Ne(jt,{key:0})):(y(),x("svg",hw,w[3]||(w[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),x("div",mw," No downloadable files found "))]))])):(y(),x("div",tw," Could not find product "))])}}}),gw={class:"moonbase:download"},yw=de({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(gi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",gw,[Z(_(hi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ue).DownloadProduct?(y(),Ne(vw,{key:0})):fe("",!0)])]),_:1},8,["open"]))}}),bw=de({__name:"App",setup(e){const t=Ce(Wo),n=Re();return(r,o)=>{var s;return y(),x(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Ne(hy,{key:0})):fe("",!0),Z(O_,{open:_(n).active===_(Se).Cart},null,8,["open"]),Z(Lb,{open:_(n).active===_(Se).Authentication},null,8,["open"]),Z(J1,{open:_(n).active===_(Se).Activation},null,8,["open"]),Z(yw,{open:_(n).active===_(Se).Download},null,8,["open"]),Z(C1,{open:_(n).active===_(Se).Customer},null,8,["open"])],64)}}});function yi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(yi(e)&&yi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];yi(o)&&yi(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class _w{constructor(){Tr(this,"initialized",!1);Tr(this,"pinia");Tr(this,"storefront");Tr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(cy,n),this.storefront=Ag(t),this.pinia=sy(),vg(bw).use(this.storefront).use(this.pinia).provide(Wo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ue).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ue.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ue.ViewProducts&&(s.user?o.show(Se.Customer,ue.ViewProducts):o.show(Se.Cart,ue.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Se.Authentication,ue.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Se.Authentication,ue.ConfirmEmailChange,t):(n.show(Se.Authentication,ue.SignIn),n.enqueue(Se.Authentication,ue.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Se.Customer,ue.ViewAccount):(t.show(Se.Authentication,ue.SignIn),t.enqueue(Se.Customer,ue.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Download,ue.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Se.Activation,ue.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ba(this.storefront);if(t!=null&&t.product_id){const l=gd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=vd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=vd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Se.Cart,ue.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ba(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const xf=new _w;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=xf),kt.MoonbaseIntent=ue,kt.default=xf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
24
+ `));const f=Bd(c.props??{},i,l),m=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(m.props||(m.props={}),m.props[b]=f[b]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Fd(e){return e.flatMap(t=>t.type===xe?Fd(t.children):[t])}function Bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ky(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Qn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Qn||{});let er=de({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return nt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(zo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const li=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function ui(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(li)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Hd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Xe(t,{0(){return e.matches(li)},1(){let r=e;for(;r!==null;){if(r.matches(li))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Nr(e){e==null||e.focus({preventScroll:!0})}const Jy=["textarea","input"].join(",");function Yy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Jy))??!1}function Gr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function it(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Gr(e):e:ui(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&Yy(f)&&f.select(),2}let Sr=[];Gy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Sr[0]===t.target)return;let n=t.target;n=n.closest(li),Sr.unshift(n??t.target),Sr=Sr.filter(r=>r!=null&&r.isConnected),Sr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ci(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var qd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qd||{});const Ko=Object.assign(de({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=C(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=C(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),Qy({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=eb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));tb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ya();function u(m){const b=G(o);if(!b)return;(w=>w())(()=>{Xe(l.value,{[Dt.Forwards]:()=>{it(b,We.First,{skipElements:[m.relatedTarget]})},[Dt.Backwards]:()=>{it(b,We.Last,{skipElements:[m.relatedTarget]})}})})}const c=C(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const b=Zd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=m.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Wd(b,O)||(c.value?it(G(o),Xe(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Nr(m.target)))}return()=>{const m={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:w,containers:$,...H}=e;return Ue(xe,[!!(O&4)&&Ue(er,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Qn.Focusable}),nt({ourProps:b,theirProps:{...t,...H},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(er,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Qn.Focusable})])}}}),{features:qd});function Xy(e){const t=C(Sr.slice());return Je([e],([n],[r])=>{r===!0&&n===!1?ci(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Sr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Qy({ownerDocument:e},t){const n=Xy(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Nr(n())},{flush:"post"})}),bt(()=>{t.value&&Nr(n())})}function eb({ownerDocument:e,container:t,initialFocus:n},r){const o=C(null),s=C(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{Je([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&ci(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Nr(u):it(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function tb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Zd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Wd(a,u)?(r.value=u,Nr(u)):(i.preventDefault(),i.stopPropagation(),Nr(l)):Nr(r.value)},!0)}function Wd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function nb(e){let t=Fh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Go(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return ci(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Go();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function rb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ob(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return/Android/gi.test(window.navigator.userAgent)}function ib(){return zd()||sb()}function ab(){return zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Go();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function lb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ub(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const xr=rb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Go(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:ub(n)},o=[ab(),ob(),lb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});xr.subscribe(()=>{const e=xr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&xr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&xr.dispatch("TEARDOWN",n)}});function cb(e,t,n){const r=nb(xr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Je([e,t],([s,i],[a],l)=>{if(!s||!i)return;xr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(xr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let db=0;function fb(){return++db}function Lt(){return fb()}const el=new Map,Jo=new Map;function Kd(e,t=C(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Jo.get(r)??1;if(s===1?Jo.delete(r):Jo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Jo.get(r)??0;Jo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Yo(e,t,n,r){zo.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Gd=30;function Jd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=C(null);Yo(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Yo(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Yo(n,"click",i=>{ib()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Yo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Yo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Gd||Math.abs(a.y-s.y)>=Gd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ud(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Yd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=C(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(er,{features:Qn.Hidden,ref:r})}}}let Xd=Symbol("Context");var at=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(at||{});function pb(){return di()!==null}function di(){return Ce(Xd,null)}function Qd(e){dt(Xd,e)}const ef=Symbol("ForcePortalRootContext");function hb(){return Ce(ef,!1)}const tf=de({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(ef,e.force),()=>{const{force:r,...o}=e;return nt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let nf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function mb(){return Ce(nf,()=>{})}function vb({type:e,enabled:t,element:n,onUpdate:r}){let o=mb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{Je(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(nf,s)}var rt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(rt||{});let gb=Symbol("DescriptionContext");function yb({slot:e=C({}),name:t="Description",props:n={}}={}){let r=C([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(gb,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function rf(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const bb=de({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=C(null);Q(()=>cn(r));const o=hb(),s=Ce(sf,null),i=C(o===!0||s==null?rf(r.value):s.resolveTarget()),a=C(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(nl,null);let u=!1;const c=zs();return Je(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(bm,{to:i.value},nt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function of(){const e=Ce(nl,null),t=C([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,de({name:"PortalWrapper",setup(s,{slots:i}){return dt(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let sf=Symbol("PortalGroupContext");const _b=de({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=No({resolveTarget(){return e.target}});return dt(sf,r),()=>{const{target:o,...s}=e;return nt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function fi(e){const t=Ce(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,fi),n}return t}const pi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",af=de({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:pi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var he;const s=C(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),u=di(),c=Q(()=>e.open===pi&&u!==null?(u.value&at.Open)===at.Open:e.open),d=C(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==pi||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===pi?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),w=C(null),$={titleId:w,panelRef:C(null),dialogState:b,setTitleId(oe){w.value!==oe&&(w.value=oe)},close(){t("close",!1)}},H=Q(()=>l.value>1),T=Ce(rl,null)!==null,[te,S]=of(),{resolveContainers:U,mainTreeNodeRef:j,MainTreeNode:ge}=Yd({portals:te,defaultContainers:[Q(()=>$.panelRef.value??d.value)]}),q=Q(()=>H.value?"parent":"leaf"),A=Q(()=>u!==null?(u.value&at.Closing)===at.Closing:!1),V=Q(()=>T||A.value?!1:O.value),D=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd(D,V);const ie=Q(()=>H.value?!0:O.value),$e=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd($e,ie),vb({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Xe(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const E=yb({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(rl,$);const P=Q(()=>!(!O.value||H.value));Jd(U,(oe,Fe)=>{oe.preventDefault(),$.close(),To(()=>Fe==null?void 0:Fe.focus())},P);const Y=Q(()=>!(H.value||b.value!==0));Ja((he=f.value)==null?void 0:he.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===rt.Escape&&(oe.preventDefault(),oe.stopPropagation(),$.close()))});const re=Q(()=>!(A.value||b.value!==0||T));return cb(f,re,oe=>({containers:[...oe.containers??[],U]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const tr=xt.target.getBoundingClientRect();tr.x===0&&tr.y===0&&tr.width===0&&tr.height===0&&$.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":w.value,"aria-describedby":E.value},tr={open:b.value===0};return Ue(tf,{force:!0},()=>[Ue(bb,()=>Ue(_b,{target:d.value},()=>Ue(tf,{force:!1},()=>Ue(Ko,{initialFocus:ht,containers:U,features:O.value?Xe(q.value,{parent:Ko.features.RestoreFocus,leaf:Ko.features.All&~Ko.features.FocusLock}):Ko.features.None},()=>Ue(S,{},()=>nt({ourProps:xt,theirProps:{...Be,...n},slot:tr,attrs:n,slots:r,visible:b.value===0,features:Yn.RenderStrategy|Yn.Static,name:"Dialog"})))))),Ue(ge)])}}}),lf=de({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=fi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return nt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),uf=de({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=fi("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return nt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),hi=de({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=fi("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return nt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function cf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function df(e,t){let n=C(cf(e.value.type,e.value.as));return Le(()=>{n.value=cf(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const ff=Symbol("PopoverContext");function ol(e){const t=Ce(ff,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const wb=Symbol("PopoverGroupContext");function pf(){return Ce(wb,null)}const hf=Symbol("PopoverPanelContext");function Eb(){return Ce(hf,null)}let sl=de({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var te;const o=C(null);r({el:o,$el:o});const s=C(1),i=C(null),a=C(null),l=C(null),u=C(null),c=Q(()=>cn(o)),d=Q(()=>{var V,D;if(!G(i)||!G(u))return!1;for(const ie of document.querySelectorAll("body > *"))if(Number(ie==null?void 0:ie.contains(G(i)))^Number(ie==null?void 0:ie.contains(G(u))))return!0;const S=ui(),U=S.indexOf(G(i)),j=(U+S.length-1)%S.length,ge=(U+1)%S.length,q=S[j],A=S[ge];return!((V=G(u))!=null&&V.contains(q))&&!((D=G(u))!=null&&D.contains(A))}),f={popoverState:s,buttonId:C(null),panelId:C(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Xe(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(S){f.closePopover();const U=S?S instanceof HTMLElement?S:S.value instanceof HTMLElement?G(S):G(f.button):G(f.button);U==null||U.focus()}};dt(ff,f),Qd(Q(()=>Xe(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=pf(),O=b==null?void 0:b.registerPopover,[w,$]=of(),H=Yd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:w,defaultContainers:[i,u]});function T(){var S,U,j;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((S=c.value)==null?void 0:S.activeElement)&&(((U=G(i))==null?void 0:U.contains(c.value.activeElement))||((j=G(u))==null?void 0:j.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(m)),Ja((te=c.value)==null?void 0:te.defaultView,"focus",S=>{var U,j;S.target!==window&&S.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(H.contains(S.target)||(U=G(f.beforePanelSentinel))!=null&&U.contains(S.target)||(j=G(f.afterPanelSentinel))!=null&&j.contains(S.target)||f.closePopover()))},!0),Jd(H.resolveContainers,(S,U)=>{var j;f.closePopover(),Hd(U,Qa.Loose)||(S.preventDefault(),(j=G(i))==null||j.focus())},Q(()=>s.value===0)),()=>{const S={open:s.value===0,close:f.close};return Ue(xe,[Ue($,{},()=>nt({theirProps:{...e,...n},ourProps:{ref:o},slot:S,slots:t,attrs:n,name:"Popover"})),Ue(H.MainTreeNode)])}}});const mf=de({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=pf(),a=i==null?void 0:i.closeOthers,l=Eb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=C(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=df(Q(()=>({as:e.as,type:t.type})),c);function m(T){var te,S,U,j,ge;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),(S=(te=T.target).click)==null||S.call(te),o.closePopover(),(U=G(o.button))==null||U.focus();break}}else switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case rt.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(j=s.value)!=null&&j.activeElement&&!((ge=G(o.button))!=null&&ge.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function b(T){u.value||T.key===rt.Space&&T.preventDefault()}function O(T){var te,S;e.disabled||(u.value?(o.closePopover(),(te=G(o.button))==null||te.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(S=G(o.button))==null||S.focus()))}function w(T){T.preventDefault(),T.stopPropagation()}const $=Ya();function H(){const T=G(o.panel);if(!T)return;function te(){Xe($.value,{[Dt.Forwards]:()=>it(T,We.First),[Dt.Backwards]:()=>it(T,We.Last)})===xn.Error&&it(ui().filter(U=>U.dataset.moonbaseFocusGuard!=="true"),Xe($.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:G(o.button)})}te()}return()=>{const T=o.popoverState.value===0,te={open:T},{id:S,...U}=e,j=u.value?{ref:c,type:f.value,onKeydown:m,onClick:O}:{ref:c,id:S,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:b,onClick:O,onMousedown:w};return Ue(xe,[nt({ourProps:j,theirProps:{...t,...U},slot:te,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(er,{id:d,features:Qn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:H})])}}}),vf=de({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(hf,s.panelId),ft(()=>{var $,H;if(!o||s.popoverState.value!==0||!s.panel)return;const w=($=i.value)==null?void 0:$.activeElement;(H=G(s.panel))!=null&&H.contains(w)||it(G(s.panel),We.First)});const u=di(),c=Q(()=>u!==null?(u.value&at.Open)===at.Open:s.popoverState.value===0);function d(w){var $,H;switch(w.key){case rt.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!(($=G(s.panel))!=null&&$.contains(i.value.activeElement)))return;w.preventDefault(),w.stopPropagation(),s.closePopover(),(H=G(s.button))==null||H.focus();break}}function f(w){var H,T,te,S,U;const $=w.relatedTarget;$&&G(s.panel)&&((H=G(s.panel))!=null&&H.contains($)||(s.closePopover(),((te=(T=G(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&te.call(T,$)||(U=(S=G(s.afterPanelSentinel))==null?void 0:S.contains)!=null&&U.call(S,$))&&$.focus({preventScroll:!0})))}const m=Ya();function b(){const w=G(s.panel);if(!w)return;function $(){Xe(m.value,{[Dt.Forwards]:()=>{var T;it(w,We.First)===xn.Error&&((T=G(s.afterPanelSentinel))==null||T.focus())},[Dt.Backwards]:()=>{var H;(H=G(s.button))==null||H.focus({preventScroll:!0})}})}$()}function O(){const w=G(s.panel);if(!w)return;function $(){Xe(m.value,{[Dt.Forwards]:()=>{const H=G(s.button),T=G(s.panel);if(!H)return;const te=ui(),S=te.indexOf(H),U=te.slice(0,S+1),ge=[...te.slice(S+1),...U];for(const q of ge.slice())if(q.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(q)){const A=ge.indexOf(q);A!==-1&&ge.splice(A,1)}it(ge,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var T;it(w,We.Previous)===xn.Error&&((T=G(s.button))==null||T.focus())}})}$()}return()=>{const w={open:s.popoverState.value===0,close:s.close},{id:$,focus:H,...T}=e,te={ref:s.panel,id:$,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return nt({ourProps:te,theirProps:{...t,...T},attrs:t,slot:w,slots:{...n,default:(...S)=>{var U;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(er,{id:a,ref:s.beforePanelSentinel,features:Qn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(U=n.default)==null?void 0:U.call(n,...S),c.value&&s.isPortalled.value&&Ue(er,{id:l,ref:s.afterPanelSentinel,features:Qn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Yn.RenderStrategy|Yn.Static,visible:c.value,name:"PopoverPanel"})}}});let Ob=de({props:{onFocus:{type:Function,required:!0}},setup(e){let t=C(!0);return()=>t.value?Ue(er,{as:"button",type:"button",features:Qn.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const gf=Symbol("TabsContext");function Xo(e){const t=Ce(gf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xo),n}return t}const il=Symbol("TabsSSRContext"),Nb=de({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=C(e.selectedIndex??e.defaultIndex),s=C([]),i=C([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=Gr(c.tabs.value,G),w=Gr(c.panels.value,G),$=O.filter(H=>{var T;return!((T=G(H))!=null&&T.hasAttribute("disabled"))});if(b<0||b>O.length-1){const H=Xe(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Xe(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Xe(H,{0:()=>O.indexOf($[0]),1:()=>O.indexOf($[$.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=w}else{const H=O.slice(0,b),te=[...O.slice(b),...H].find(U=>$.includes(U));if(!te)return;let S=O.indexOf(te)??c.selectedIndex.value;S===-1&&(S=c.selectedIndex.value),o.value=S,c.tabs.value=O,c.panels.value=w}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=Gr(s.value,G),!a.value){const w=s.value.indexOf(O)??o.value;w!==-1&&(o.value=w)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=Gr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(gf,c);const d=C({tabs:[],panels:[]}),f=C(!1);Le(()=>{f.value=!0}),dt(il,Q(()=>f.value?null:d.value));const m=Q(()=>e.selectedIndex);return Le(()=>{Je([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=Gr(c.tabs.value,G);b.some((w,$)=>G(c.tabs.value[$])!==G(w))&&c.setSelectedIndex(b.findIndex(w=>G(w)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Ob,{onFocus:()=>{for(const O of s.value){const w=G(O);if((w==null?void 0:w.tabIndex)===0)return w.focus(),!0}return!1}}),nt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Sb=de({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Xo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return nt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=de({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xo("Tab"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(il),a=Q(()=>{if(i.value){const w=i.value.tabs.indexOf(e.id);return w===-1?i.value.tabs.push(e.id)-1:w}return-1}),l=Q(()=>{const w=o.tabs.value.indexOf(s);return w===-1?a.value:w}),u=Q(()=>l.value===o.selectedIndex.value);function c(w){var H;const $=w();if($===xn.Success&&o.activation.value==="auto"){const T=(H=cn(s))==null?void 0:H.activeElement,te=o.tabs.value.findIndex(S=>G(S)===T);te!==-1&&o.setSelectedIndex(te)}return $}function d(w){const $=o.tabs.value.map(T=>G(T)).filter(Boolean);if(w.key===rt.Space||w.key===rt.Enter){w.preventDefault(),w.stopPropagation(),o.setSelectedIndex(l.value);return}switch(w.key){case rt.Home:case rt.PageUp:return w.preventDefault(),w.stopPropagation(),c(()=>it($,We.First));case rt.End:case rt.PageDown:return w.preventDefault(),w.stopPropagation(),c(()=>it($,We.Last))}if(c(()=>Xe(o.orientation.value,{vertical(){return w.key===rt.ArrowUp?it($,We.Previous|We.WrapAround):w.key===rt.ArrowDown?it($,We.Next|We.WrapAround):xn.Error},horizontal(){return w.key===rt.ArrowLeft?it($,We.Previous|We.WrapAround):w.key===rt.ArrowRight?it($,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return w.preventDefault()}const f=C(!1);function m(){var w;f.value||(f.value=!0,!e.disabled&&((w=G(s))==null||w.focus({preventScroll:!0}),o.setSelectedIndex(l.value),ci(()=>{f.value=!1})))}function b(w){w.preventDefault()}const O=df(Q(()=>({as:e.as,type:t.type})),s);return()=>{var te;const w={selected:u.value,disabled:e.disabled??!1},{id:$,...H}=e,T={ref:s,onKeydown:d,onMousedown:b,onClick:m,id:$,role:"tab",type:O.value,"aria-controls":(te=G(o.panels.value[l.value]))==null?void 0:te.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return nt({ourProps:T,theirProps:H,slot:w,attrs:t,slots:n,name:"Tab"})}}}),xb=de({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Xo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return nt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=de({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xo("TabPanel"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(il),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(er,{as:"span","aria-hidden":!0,...b}):nt({ourProps:b,theirProps:m,slot:c,attrs:t,slots:n,features:Yn.Static|Yn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function kb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function mi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Tb(e,t){const n=Go();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function yf(e,t,n,r,o,s){const i=Go(),a=s!==void 0?kb(s):()=>{};return mi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{mi(e,...n),ul(e,...r),i.add(Tb(e,l=>(mi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>mi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function kr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function Cb(){return Ce(dl,null)!==null}function Pb(){const e=Ce(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Db(){const e=Ce(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function vi(e){return"children"in e?vi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bf(e){const t=C([]),n=C(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Xn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Xe(i,{[Xn.Unmount](){t.value.splice(a,1)},[Xn.Hidden](){t.value[a].state="hidden"}}),!vi(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Xn.Unmount)}return{children:t,register:o,unregister:r}}const _f=Yn.RenderStrategy,Qo=de({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=C(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function l(){s.value|=at.Closing,t("beforeLeave")}function u(){s.value&=~at.Closing,t("afterLeave")}if(!Cb()&&pb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=C(null),d=Q(()=>e.unmount?Xn.Unmount:Xn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Pb(),{register:b,unregister:O}=Db(),w=C(f.value?"visible":"hidden"),$={value:!0},H=Lt(),T={value:!1},te=bf(()=>{!T.value&&w.value!=="hidden"&&(w.value="hidden",O(H),u())});Le(()=>{const ie=b(H);bt(ie)}),ft(()=>{if(d.value===Xn.Hidden&&H){if(f.value&&w.value!=="visible"){w.value="visible";return}Xe(w.value,{hidden:()=>O(H),visible:()=>b(H)})}});const S=kr(e.enter),U=kr(e.enterFrom),j=kr(e.enterTo),ge=kr(e.entered),q=kr(e.leave),A=kr(e.leaveFrom),V=kr(e.leaveTo);Le(()=>{ft(()=>{if(w.value==="visible"){const ie=G(c);if(ie instanceof Comment&&ie.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function D(ie){const $e=$.value&&!m.value,E=G(c);!E||!(E instanceof HTMLElement)||$e||(T.value=!0,f.value&&i(),f.value||l(),ie(f.value?yf(E,S,U,j,ge,P=>{T.value=!1,P===cl.Finished&&a()}):yf(E,q,A,V,ge,P=>{T.value=!1,P===cl.Finished&&(vi(te)||(w.value="hidden",O(H),u()))})))}return Le(()=>{Je([f],(ie,$e,E)=>{D(E),$.value=!1},{immediate:!0})}),dt(fl,te),Qd(Q(()=>Xe(w.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:ie,show:$e,enter:E,enterFrom:P,enterTo:Y,entered:re,leave:he,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...m.value&&f.value&&zo.isServer?{class:bs([n.class,ht.class,...S,...U])}:{}};return nt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:_f,visible:w.value==="visible",name:"TransitionChild"})}}}),$b=Qo,pl=de({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=di(),s=Q(()=>e.show===null&&o!==null?(o.value&at.Open)===at.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(s.value?"visible":"hidden"),a=bf(()=>{i.value="hidden"}),l=C(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":vi(a)||(i.value="hidden")})}),dt(fl,a),dt(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return nt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue($b,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:_f,visible:i.value==="visible",name:"Transition"})}}}),Ib={class:"moonbase:modal-container"},gi=de({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Ib,[Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Ab=["data-visible"],Vb=de({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(Wo),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);un(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof sr?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Ne(Gn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Jn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Ab),(f=_(s))!=null&&f.auth.enable.signUp?(y(),x("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>_(r).show(_(Se).Authentication,_(ue).SignUp,{email:i.value}))}," Create account ")):fe("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=m=>_(r).show(_(Se).Authentication,_(ue).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Rb={class:"moonbase:authentication"},jb={key:0,class:"moonbase:loader"},Lb=de({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Re(),{loaded:o,user:s}=St();Je(s,a=>{a&&r.intent===ue.SignIn&&(n("authenticated",a),r.dequeue())});const i=Q(()=>{switch(r.intent){case ue.SignIn:return"Sign in";case ue.SignUp:return"Sign up";case ue.ConfirmAccount:return"Confirm account";case ue.ConfirmEmailChange:return"Confirm email change";case ue.ForgotPassword:return"Forgot password";case ue.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(y(),Ne(gi,{open:a.open,onClose:l[3]||(l[3]=u=>_(r).reset())},{default:_e(()=>[N("div",Rb,[Z(_(hi),{as:"h3"},{default:_e(()=>[ke(K(i.value),1)]),_:1}),_(o)?_(r).intent===_(ue).SignIn?(y(),Ne(Vb,{key:1})):_(r).intent===_(ue).SignUp?(y(),Ne(Ay,{key:2,onSignedUp:l[0]||(l[0]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmAccount?(y(),Ne(Ly,{key:3,onConfirmedAccount:l[1]||(l[1]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmEmailChange?(y(),Ne(Wy,{key:4})):_(r).intent===_(ue).ForgotPassword?(y(),Ne(Uy,{key:5})):_(r).intent===_(ue).ResetPassword?(y(),Ne(By,{key:6,onPasswordReset:l[2]||(l[2]=u=>_(r).dequeue())})):fe("",!0):(y(),x("div",jb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Mb={class:"moonbase:product-cart-item"},Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb={class:"moonbase:product-cart-item-content"},Hb={key:0,class:"moonbase:cart-item-discount"},Zb={class:"font-semibold"},qb={key:0,class:"ml-0.5"},Wb={key:2,class:"moonbase:product-cart-item-total"},zb={key:0,class:"moonbase:discount"},Kb={key:1},Gb=de({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),x("div",Mb,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),x("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Ub)):(y(),x("div",Fb)),N("div",Bb,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),x("p",Hb,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",Zb,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),x("span",qb," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):fe("",!0)])):fe("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),x("div",Wb,[t.lineItem.variation.hasDiscount?(y(),x("span",zb,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):fe("",!0),t.lineItem.quantity!==1?(y(),x("span",Kb,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):fe("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):fe("",!0)])}}}),Jb={class:"moonbase:bundle-cart-item"},Yb=["src"],Xb={key:1,class:"moonbase:image-placeholder"},Qb={class:"moonbase:bundle-cart-item-content"},e_={key:0,class:"moonbase:cart-item-discount"},t_={class:"font-semibold"},n_={key:0,class:"ml-0.5"},r_={class:"moonbase:bundle-cart-item-summary"},o_=["data-open"],s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=["src"],u_={key:1,class:"moonbase:image-placeholder"},c_=["data-included"],d_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},f_={key:0,class:"truncate italic"},p_={key:1,class:"truncate"},h_=de({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=C(!1),n=C(null);return Je(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),x("div",null,[N("div",Jb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),x("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Yb)):(y(),x("div",Xb)),N("div",Qb,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),x("p",e_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",t_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),x("span",n_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):fe("",!0)])):fe("",!0),N("div",r_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),x("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),x(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):fe("",!0),o[2]||(o[2]=ke(" products "))]),(y(),x("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,o_))])):fe("",!0)])]),r.lineItem.variation?(y(),x("div",s_,[r.lineItem.variation.hasDiscount?(y(),x("span",i_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):fe("",!0),r.lineItem.quantity!==1?(y(),x("span",a_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):fe("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):fe("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),x(xe,null,on(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),x("div",{key:f.id},[f!=null&&f.iconUrl?(y(),x("img",{key:0,src:f.iconUrl,alt:""},null,8,l_)):(y(),x("div",u_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),x("svg",d_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):fe("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,c_),f.included?f!=null&&f.tagline?(y(),x("p",p_,K(f.tagline),1)):fe("",!0):(y(),x("p",f_," You already own this "))])]))),128))],512)])}}}),m_={class:"moonbase:cart-modal-container"},v_=de({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",m_,[Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),g_=["disabled","data-success","data-error","data-working","data-variant"],y_=["data-visible"],wf=de({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await un(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(a,l)=>(y(),x("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Ne(jt,{key:0})):fe("",!0)],8,y_),ke(" "+K(s.value),1)],8,g_))}}),b_={class:"moonbase:cart"},__={key:0,role:"list",class:"moonbase:cart-items"},w_={key:1,class:"moonbase:cart-empty"},E_={key:2,class:"moonbase:cart-total"},O_=de({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Re(),{items:n,total:r,currency:o,checkout:s}=Ba(),i=Ce(Wo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(y(),Ne(v_,{open:l.open,onClose:u[0]||(u[0]=c=>_(t).reset())},{default:_e(()=>[N("div",b_,[Z(_(hi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[ke(" Cart ")])),_:1}),_(n).length>0?(y(),x("ul",__,[(y(!0),x(xe,null,on(_(n),c=>(y(),x("li",{key:c.id},[c.type==="Product"?(y(),Ne(Gb,{key:0,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Ne(h_,{key:1,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):fe("",!0)]))),128))])):(y(),x("div",w_," Your cart is empty! ")),_(n).length>0?(y(),x("div",E_,[u[2]||(u[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(r).amount,_(r).currency)),1),u[3]||(u[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):fe("",!0),_(n).length>0?(y(),Ne(wf,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):fe("",!0)])]),_:1},8,["open"]))}}),N_={class:"moonbase:account"},S_={key:0,class:"moonbase:error"},x_={key:1,class:"moonbase:notification"},k_={key:0,class:"moonbase:error"},T_=de({__name:"Account",setup(e){var H,T,te;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=C(((H=n.value)==null?void 0:H.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((te=n.value)==null?void 0:te.communicationPreferences)??{newsletterOptIn:!1}),u=C(null),c=C(!1),d=C(""),f=C(""),m=C(null),b=C(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(S){throw u.value=S,S}}async function w(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(S){throw m.value=S,S}}async function $(){b.value=!0,await s(),t.reset()}return(S,U)=>(y(),x("div",N_,[Z(Gn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":U[0]||(U[0]=j=>i.value=j),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":U[1]||(U[1]=j=>a.value=j),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":U[2]||(U[2]=j=>l.value.newsletterOptIn=j),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Jn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),x("p",S_,K(u.value.message),1)):c.value?(y(),x("p",x_," You need to confirm your new email address, please check your inbox ")):fe("",!0)]),_:1}),Z(Gn,{handler:w},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":U[3]||(U[3]=j=>d.value=j),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":U[4]||(U[4]=j=>f.value=j),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Jn,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),x("p",k_,K(m.value.message),1)):fe("",!0)]),_:1}),Z(wf,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:$})]))}}),C_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function D_(e,t){return y(),x("svg",P_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Ef=Kr(C_,[["render",D_]]),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return y(),x("svg",I_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Of=Kr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return y(),x("svg",R_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Nf=Kr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return y(),x("svg",M_,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Sf=Kr(L_,[["render",U_]]),F_={class:"moonbase:product-downloads"},B_=["data-last","onClick"],H_={class:"moonbase:sr-only"},Z_={class:"moonbase:sr-only"},q_=["onClick"],W_=de({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Yt.Universal]:()=>Ef,[Yt.Windows]:()=>Of,[Yt.Linux]:()=>Nf,[Yt.Mac]:()=>Sf},{downloadProduct:r}=ei(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),x("span",F_,[(y(!0),x(xe,null,on(o.value,(a,l,u)=>(y(),x(xe,{key:l},[a.length===1?(y(),x("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",H_,K(l.toString()),1),(y(),Ne(pa(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,B_)):(y(),Ne(_(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(mf),null,{default:_e(()=>[N("span",Z_,K(l.toString()),1),(y(),Ne(pa(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),x(xe,null,on(a,c=>(y(),x("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},K(c.name),9,q_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),z_={class:"moonbase:product-activations"},K_={key:0,scope:"col"},G_={key:0},J_={colspan:"3"},Y_={key:1},X_={key:0},Q_=["onClick"],e1=de({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ei(),i=C(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===Ii.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),x("table",z_,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),x("th",K_,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):fe("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),x("tr",Y_,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):fe("",!0):(y(),x("tr",G_,[N("td",J_,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(i.value,d=>{var f;return y(),x("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),x("td",X_,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Ne(jt,{key:0})):fe("",!0),c[7]||(c[7]=ke(" Revoke "))],8,Q_)])):fe("",!0)])}),128))])]))}}),t1={class:"moonbase:products"},n1={key:0,scope:"col"},r1={key:0},o1={key:1},s1=["src"],i1={key:1,class:"moonbase:image-placeholder"},a1={key:0},l1={key:0},u1=de({__name:"Products",setup(e){const{getProducts:t}=ei(),n=C(null);Le(async()=>{let o=await t();for(n.value=o.items;o.hasMore&&o.next;)o=await t(o.next),n.value.push(...o.items)});const r=Q(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(y(),x("table",t1,[N("thead",null,[N("tr",null,[s[0]||(s[0]=N("th",{scope:"col"}," Product ",-1)),s[1]||(s[1]=N("th",{scope:"col"}," Activations ",-1)),r.value?(y(),x("th",n1," Downloads ")):fe("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),x("tr",o1,s[4]||(s[4]=[N("td",{colspan:"3"}," No products found ",-1)]))):fe("",!0):(y(),x("tr",r1,[N("td",null,[Z(jt),s[2]||(s[2]=ke(" Loading products.. "))]),s[3]||(s[3]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(n.value||[],i=>(y(),x("tr",{key:i.id},[N("td",null,[N("div",null,[i.iconUrl?(y(),x("img",{key:0,src:i.iconUrl,alt:""},null,8,s1)):(y(),x("div",i1)),N("span",null,K(i.name),1)])]),Z(_(sl),{as:"td"},{default:_e(()=>[Z(_(mf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[s[5]||(s[5]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),null,{default:_e(()=>[Z(e1,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(y(),x("td",a1,[i.currentVersion!=null?(y(),x("div",l1,[i.downloads?(y(),Ne(W_,{key:0,downloads:i.downloads},null,8,["downloads"])):fe("",!0)])):fe("",!0)])):fe("",!0)]))),128))])]))}}),c1={class:"moonbase:redeem"},d1=["data-visible"],f1={key:1,class:"moonbase:redeem-voucher"},p1={key:0},h1={key:1},m1={class:"moonbase:redeem-voucher-products"},v1=["src"],g1={key:1,class:"moonbase:image-placeholder"},y1={key:0},b1={class:"moonbase:redeem-voucher-bundle"},_1=["src"],w1={key:1,class:"moonbase:image-placeholder"},E1={key:0},O1={class:"moonbase:redeem-voucher-bundle-products"},N1={class:"shrink-0"},S1=["src"],x1={key:1,class:"moonbase:image-placeholder"},k1=de({__name:"Redeem",setup(e){const{redeem:t}=Ig(),n=C(!1),r=C(null),o=C(null),s=C("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),x("div",c1,[Z(ja,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),x("div",f1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),x("h4",p1,K(r.value.description),1)):fe("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),x("div",h1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",m1,[(y(!0),x(xe,null,on(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),x("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,v1)):(y(),x("div",g1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",y1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),x(xe,null,on(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),x("div",{key:u.id},[N("div",b1,[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,_1)):(y(),x("div",w1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",E1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",O1,[(y(!0),x(xe,null,on(u.products,d=>(y(),x("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",N1,[d.iconUrl?(y(),x("img",{key:0,src:d.iconUrl,alt:""},null,8,S1)):(y(),x("div",x1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):fe("",!0)])):(y(),Ne(Gn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Jn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,d1)]}),_:1}))]),_:1})]))}}),T1={class:"moonbase:customer"},C1=de({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ue.ViewAccount:return 0;case ue.ViewProducts:return 1;case ue.RedeemVoucher:return 2}return 0}const r=C(n(t.intent));Je(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Ne(gi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",T1,[Z(_(Nb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Sb),null,{default:_e(()=>[Z(_(al),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(al),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(al),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(xb),null,{default:_e(()=>[Z(_(ll),null,{default:_e(()=>[Z(T_)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(u1)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(k1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),P1={class:"moonbase:auto-activate"},D1={key:0,class:"moonbase:loader"},$1={key:1,class:"moonbase:loader"},I1={key:2,class:"moonbase:loader"},A1={key:3},V1={key:0,class:"moonbase:auto-activate-product"},R1=["src"],j1={key:1,class:"moonbase:image-placeholder"},L1={key:1,class:"moonbase:loader"},M1={key:2,class:"moonbase:loader"},U1={key:3,class:"moonbase:loader"},F1={key:4,class:"moonbase:auto-activate-content"},B1={key:0},H1={key:1},Z1={class:"moonbase:auto-activate-cta"},q1=["href"],W1={key:2,class:"moonbase:auto-activate-trial"},z1={class:"moonbase:auto-activate-cta"},K1=de({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=$g(o);Je(s,O=>{var w;!a.value&&!l.value&&(O==null?void 0:O.status)===Xt.Requested&&((w=O==null?void 0:O.licenseEligibility)!=null&&w.eligible)&&c()});function m(){f(),t.show(Se.Customer,ue.ViewProducts)}function b(){t.enqueue(Se.Activation,ue.ActivateProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}return(O,w)=>{var $,H,T,te;return y(),x("div",P1,[_(i)||!_(r)?(y(),x("div",D1,[Z(jt)])):_(u)?(y(),x("div",$1,K(_(u)),1)):_(s)?(y(),x("div",A1,[_(s).product?(y(),x("div",V1,[_(s).product.iconUrl?(y(),x("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,R1)):(y(),x("div",j1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):fe("",!0),(($=_(s))==null?void 0:$.status)===_(Xt).Cancelled?(y(),x("div",L1,w[2]||(w[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),x("div",M1,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((H=_(s))==null?void 0:H.status)===_(Xt).Completed?(y(),x("div",U1,w[3]||(w[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),x("div",F1,[_(n)?(T=_(n).ownedProducts)!=null&&T.includes(_(s).product.id)?(y(),x("div",H1,[w[5]||(w[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",Z1,[N("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=S=>m())}," Licenses "),_(s).product&&_(s).product.website?(y(),x("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,q1)):fe("",!0)])])):fe("",!0):(y(),x("div",B1,[w[4]||(w[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(te=_(s).trialEligibility)!=null&&te.eligible?(y(),x("div",W1,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),x(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):fe("",!0),w[6]||(w[6]=ke(". ")),N("span",z1,[N("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=S=>_(d)())}," Start trial ")])])):fe("",!0)]))])):(y(),x("div",I1," Could not find activation request "))])}}}),G1={class:"moonbase:activation"},J1=de({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(gi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",G1,[Z(_(hi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ue).ActivateProduct?(y(),Ne(K1,{key:0})):fe("",!0)])]),_:1},8,["open"]))}});function Y1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const X1={class:"moonbase:download-product"},Q1={key:0,class:"moonbase:loader"},ew={key:1,class:"moonbase:loader"},tw={key:2,class:"moonbase:loader"},nw={key:3},rw={class:"moonbase:download-product-product"},ow=["src"],sw={key:1,class:"moonbase:image-placeholder"},iw={key:0},aw={key:0,class:"moonbase:download-product-content"},lw={key:1,class:"moonbase:download-product-content"},uw={key:2,class:"moonbase:download-product-content"},cw={key:0,role:"list"},dw={class:"moonbase:download-product-download-name"},fw=["onClick"],pw={class:"moonbase:download-product-download-description"},hw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},mw={key:1,class:"moonbase:loader"},vw=de({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=ei(),i={[Yt.Universal]:()=>Ef,[Yt.Windows]:()=>Of,[Yt.Linux]:()=>Nf,[Yt.Mac]:()=>Sf},a=C(null),l=C([]),u=C(null),c=C(!0),d=Q(()=>t.getParameter("key")),f=Q(()=>{var O,w;return(w=(O=a.value)==null?void 0:O.downloads)==null?void 0:w.filter($=>!d.value||$.key===d.value)});Le(async()=>{const O=t.getParameter("product_id"),w=t.getParameter("version");if(!O){u.value="Link is broken";return}try{a.value=await o(O,w||void 0)}catch($){u.value=$.message}c.value=!1});function m(){t.enqueue(Se.Download,ue.DownloadProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}async function b(O){l.value.push(O.key),await s(O),l.value=l.value.filter(w=>w!==O.key)}return(O,w)=>{var $,H;return y(),x("div",X1,[c.value||!_(r)?(y(),x("div",Q1,[Z(jt)])):u.value?(y(),x("div",ew,K(u.value),1)):a.value?(y(),x("div",nw,[N("div",rw,[a.value.iconUrl?(y(),x("img",{key:0,src:a.value.iconUrl,alt:""},null,8,ow)):(y(),x("div",sw)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),x("span",iw," (pre-release)")):fe("",!0)]),N("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!_(n)?(y(),x("div",aw,[w[0]||(w[0]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!(($=_(n).ownedProducts)!=null&&$.includes(a.value.id))?(y(),x("div",lw," This product requires ownership to download ")):(y(),x("div",uw,[(H=a.value)!=null&&H.downloads&&a.value.downloads.length>0?(y(),x("ul",cw,[(y(!0),x(xe,null,on(f.value,T=>(y(),x("li",{key:T.key},[N("div",null,[N("p",dw,[N("button",{onClick:te=>b(T)},[w[1]||(w[1]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(T.name),1)],8,fw)]),N("p",pw,[(y(),Ne(pa(i[T.platform]()),{"aria-hidden":"true"})),ke(" "+K(T.platform)+" ",1),w[2]||(w[2]=N("span",null," |",-1)),ke(" "+K(_(Y1)(T.size)),1)])]),N("div",null,[l.value.includes(T.key)?(y(),Ne(jt,{key:0})):(y(),x("svg",hw,w[3]||(w[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),x("div",mw," No downloadable files found "))]))])):(y(),x("div",tw," Could not find product "))])}}}),gw={class:"moonbase:download"},yw=de({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(gi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",gw,[Z(_(hi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ue).DownloadProduct?(y(),Ne(vw,{key:0})):fe("",!0)])]),_:1},8,["open"]))}}),bw=de({__name:"App",setup(e){const t=Ce(Wo),n=Re();return(r,o)=>{var s;return y(),x(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Ne(hy,{key:0})):fe("",!0),Z(O_,{open:_(n).active===_(Se).Cart},null,8,["open"]),Z(Lb,{open:_(n).active===_(Se).Authentication},null,8,["open"]),Z(J1,{open:_(n).active===_(Se).Activation},null,8,["open"]),Z(yw,{open:_(n).active===_(Se).Download},null,8,["open"]),Z(C1,{open:_(n).active===_(Se).Customer},null,8,["open"])],64)}}});function yi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(yi(e)&&yi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];yi(o)&&yi(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class _w{constructor(){Tr(this,"initialized",!1);Tr(this,"pinia");Tr(this,"storefront");Tr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(cy,n),this.storefront=Ag(t),this.pinia=sy(),vg(bw).use(this.storefront).use(this.pinia).provide(Wo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ue).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ue.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ue.ViewProducts&&(s.user?o.show(Se.Customer,ue.ViewProducts):o.show(Se.Cart,ue.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Se.Authentication,ue.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Se.Authentication,ue.ConfirmEmailChange,t):(n.show(Se.Authentication,ue.SignIn),n.enqueue(Se.Authentication,ue.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Se.Customer,ue.ViewAccount):(t.show(Se.Authentication,ue.SignIn),t.enqueue(Se.Customer,ue.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Download,ue.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Se.Activation,ue.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ba(this.storefront);if(t!=null&&t.product_id){const l=gd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=vd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=vd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Se.Cart,ue.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ba(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const xf=new _w;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=xf),kt.MoonbaseIntent=ue,kt.default=xf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});