@moonbase.sh/storefront 0.2.18 → 0.2.21

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,25 +1,25 @@
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\\:input[data-v-65d18d50] label[data-v-65d18d50]{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}.moonbase\\:input[data-v-65d18d50] input[data-v-65d18d50]{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\\:input[data-v-65d18d50] input[data-v-65d18d50][data-v-65d18d50]: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\\:input[data-v-65d18d50] .moonbase\\:input-hint[data-v-65d18d50]{margin-top:8px;font-size:14px;line-height:20px}.moonbase\\:input[data-v-65d18d50] .moonbase\\:input-hint[data-v-65d18d50][data-type=error][data-v-65d18d50]{color:var(--moonbase-input-error-color)}@keyframes moonbase\\:spin-f9a322c4{to{transform:rotate(360deg)}}.moonbase svg[data-v-f9a322c4]{animation:moonbase\\:spin-f9a322c4 1s linear infinite}.moonbase .moonbase\\:submit-button[data-v-052f0f36]{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-052f0f36][data-v-052f0f36],.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]:hover,.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]:focus,.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]: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-052f0f36][data-v-052f0f36]:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]: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-052f0f36][data-success][data-v-052f0f36]{background-color:var(--moonbase-button-success-color)}.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-error][data-v-052f0f36]{background-color:var(--moonbase-button-error-color)}.moonbase .moonbase\\:submit-button[data-v-052f0f36] div[data-v-052f0f36]{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-052f0f36] div[data-v-052f0f36][data-visible][data-v-052f0f36]{width:20px;opacity:1}.moonbase .moonbase\\:submit-button[data-v-052f0f36] div[data-v-052f0f36] svg[data-v-052f0f36]{height:20px;width:20px}.moonbase\\:checkbox[data-v-20c4336e]{display:flex;align-items:flex-start}.moonbase\\:checkbox[data-v-20c4336e] label[data-v-20c4336e]{font-size:14px;font-weight:500;line-height:20px;color:#374151}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-container[data-v-20c4336e]{display:flex;height:24px;align-items:center}.moonbase\\:checkbox[data-v-20c4336e] input[data-v-20c4336e]{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\\:checkbox[data-v-20c4336e] input[data-v-20c4336e][data-v-20c4336e]: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\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e]{margin-left:12px}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e] label[data-v-20c4336e]{font-size:14px;line-height:24px;font-weight:500;color:hsl(from var(--moonbase-text-color) h s calc(l + 5))}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e] p[data-v-20c4336e]{font-size:14px;line-height:24px;color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e] p[data-v-20c4336e][data-type=error][data-v-20c4336e]{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(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- (function(wt,_e){typeof exports=="object"&&typeof module<"u"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(wt=typeof globalThis<"u"?globalThis:wt||self,_e(wt.Moonbase={}))})(this,function(wt){"use strict";var xw=Object.defineProperty;var kw=(wt,_e,wn)=>_e in wt?xw(wt,_e,{enumerable:!0,configurable:!0,writable:!0,value:wn}):wt[_e]=wn;var Nr=(wt,_e,wn)=>kw(wt,typeof _e!="symbol"?_e+"":_e,wn);var _e;(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})(_e||(_e={}));var wn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wn||(wn={}));const ee=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),En=e=>{switch(typeof e){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return isNaN(e)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(e)?ee.array:e===null?ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ee.promise:typeof Map<"u"&&e instanceof Map?ee.map:typeof Set<"u"&&e instanceof Set?ee.set:typeof Date<"u"&&e instanceof Date?ee.date:ee.object;default:return ee.unknown}},H=_e.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"]),Yd=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class It 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,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e.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()}}It.create=e=>new It(e);const Mr=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_e.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${_e.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_e.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${_e.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.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}"`:_e.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.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 H.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 H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,_e.assertNever(e)}return{message:n}};let Ka=Mr;function Xd(e){Ka=e}function Uo(){return Ka}const Fo=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};let a="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)a=l(i,{data:t,defaultError:a}).message;return{...o,path:s,message:o.message||a}},Qd=[];function te(e,t){const n=Fo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Uo(),Mr].filter(r=>!!r)});e.common.issues.push(n)}class ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return be;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)r.push({key:await o.key,value:await o.value});return ct.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return be;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 be=Object.freeze({status:"aborted"}),Ga=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),ii=e=>e.status==="aborted",ai=e=>e.status==="dirty",Ur=e=>e.status==="valid",Bo=e=>typeof Promise<"u"&&e instanceof Promise;var ue;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ue||(ue={}));class Ut{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 Ja=(e,t)=>{if(Ur(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 It(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)=>i.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??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 En(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:En(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ct,ctx:{common:t.parent.common,data:t.data,parsedType:En(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Bo(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:En(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Ja(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:En(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Bo(o)?o:Promise.resolve(o));return Ja(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:H.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!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 Vt({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return nn.create(this,this._def)}nullable(){return Qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return At.create(this,this._def)}promise(){return Cr.create(this,this._def)}or(t){return Zr.create([this,t],this._def)}and(t){return qr.create(this,t,this._def)}transform(t){return new Vt({...Ee(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Jr({...Ee(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Xa({typeName:ve.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ko({...Ee(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Yr.create(this,t)}readonly(){return Jo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ef=/^c[^\s-]{8,}$/i,tf=/^[a-z][a-z0-9]*$/,nf=/^[0-9A-HJKMNP-TV-Z]{26}$/,rf=/^[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,of=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let li;const af=/^(((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}))$/,lf=/^(([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})))$/,cf=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function uf(e,t){return!!((t==="v4"||!t)&&af.test(e)||(t==="v6"||!t)&&lf.test(e))}class Dt extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ee.string){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.string,received:s.parsedType}),be}const r=new ct;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.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),te(o,{code:H.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?te(o,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")of.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")li||(li=new RegExp(sf,"u")),li.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")rf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")ef.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")tf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")nf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:H.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),te(o,{validation:"regex",code:H.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),te(o,{code:H.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),te(o,{code:H.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?cf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?uf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:H.invalid_string,message:s.message}),r.dirty()):_e.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:H.invalid_string,...ue.errToObj(r)})}_addCheck(t){return new Dt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ue.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ue.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ue.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ue.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ue.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ue.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ue.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ue.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!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,...ue.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ue.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ue.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ue.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ue.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ue.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ue.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ue.errToObj(n)})}nonempty(t){return this.min(1,ue.errToObj(t))}trim(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}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 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 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}}Dt.create=e=>{var t;return new Dt({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function df(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 On 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)!==ee.number){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.number,received:s.parsedType}),be}let r;const o=new ct;for(const s of this._def.checks)s.kind==="int"?_e.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.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),te(r,{code:H.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),te(r,{code:H.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?df(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_finite,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ue.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ue.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ue.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ue.toString(n))}setLimit(t,n,r,o){return new On({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ue.toString(o)}]})}_addCheck(t){return new On({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ue.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ue.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ue.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ue.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ue.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ue.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ue.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ue.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ue.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"&&_e.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)}}On.create=e=>new On({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Nn 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)!==ee.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.bigint,received:s.parsedType}),be}let r;const o=new ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.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),te(r,{code:H.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),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ue.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ue.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ue.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ue.toString(n))}setLimit(t,n,r,o){return new Nn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ue.toString(o)}]})}_addCheck(t){return new Nn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ue.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ue.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ue.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ue.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ue.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}}Nn.create=e=>{var t;return new Nn({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class Fr extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ee.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.boolean,received:r.parsedType}),be}return ht(t.data)}}Fr.create=e=>new Fr({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Jn extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ee.date){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_date}),be}const r=new ct;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.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),te(o,{code:H.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):_e.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Jn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ue.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ue.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}}Jn.create=e=>new Jn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Ee(e)});class Ho extends Oe{_parse(t){if(this._getType(t)!==ee.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.symbol,received:r.parsedType}),be}return ht(t.data)}}Ho.create=e=>new Ho({typeName:ve.ZodSymbol,...Ee(e)});class Br extends Oe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.undefined,received:r.parsedType}),be}return ht(t.data)}}Br.create=e=>new Br({typeName:ve.ZodUndefined,...Ee(e)});class Hr extends Oe{_parse(t){if(this._getType(t)!==ee.null){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.null,received:r.parsedType}),be}return ht(t.data)}}Hr.create=e=>new Hr({typeName:ve.ZodNull,...Ee(e)});class Sr extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}}Sr.create=e=>new Sr({typeName:ve.ZodAny,...Ee(e)});class Yn extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}}Yn.create=e=>new Yn({typeName:ve.ZodUnknown,...Ee(e)});class tn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:H.invalid_type,expected:ee.never,received:n.parsedType}),be}}tn.create=e=>new tn({typeName:ve.ZodNever,...Ee(e)});class Zo extends Oe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.void,received:r.parsedType}),be}return ht(t.data)}}Zo.create=e=>new Zo({typeName:ve.ZodVoid,...Ee(e)});class At extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ee.array)return te(n,{code:H.invalid_type,expected:ee.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(te(n,{code:i?H.too_big:H.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&&(te(n,{code:H.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&&(te(n,{code:H.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 Ut(n,i,n.path,a)))).then(i=>ct.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Ut(n,i,n.path,a)));return ct.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new At({...this._def,minLength:{value:t,message:ue.toString(n)}})}max(t,n){return new At({...this._def,maxLength:{value:t,message:ue.toString(n)}})}length(t,n){return new At({...this._def,exactLength:{value:t,message:ue.toString(n)}})}nonempty(t){return this.min(1,t)}}At.create=(e,t)=>new At({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ee(t)});function xr(e){if(e instanceof Ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=nn.create(xr(r))}return new Ze({...e._def,shape:()=>t})}else return e instanceof At?new At({...e._def,type:xr(e.element)}):e instanceof nn?nn.create(xr(e.unwrap())):e instanceof Qn?Qn.create(xr(e.unwrap())):e instanceof Ft?Ft.create(e.items.map(t=>xr(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=_e.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ee.object){const l=this._getOrReturnCtx(t);return te(l,{code:H.invalid_type,expected:ee.object,received:l.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof tn&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||a.push(l);const c=[];for(const l of i){const u=s[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Ut(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof tn){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")a.length>0&&(te(o,{code:H.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Ut(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>ct.mergeObjectSync(r,l)):ct.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ue.errToObj,new Ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const c=(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=ue.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}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:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ze({...this._def,catchall:t})}pick(t){const n={};return _e.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 _e.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return xr(this)}partial(t){const n={};return _e.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 _e.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof nn;)s=s._def.innerType;n[r]=s}}),new Ze({...this._def,shape:()=>n})}keyof(){return Ya(_e.objectKeys(this.shape))}}Ze.create=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strip",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)}),Ze.strictCreate=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strict",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)}),Ze.lazycreate=(e,t)=>new Ze({shape:e,unknownKeys:"strip",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)});class Zr 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 It(a.ctx.common.issues));return te(n,{code:H.invalid_union,unionErrors:i}),be}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 c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(c=>new It(c));return te(n,{code:H.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}Zr.create=(e,t)=>new Zr({options:e,typeName:ve.ZodUnion,...Ee(t)});const qo=e=>e instanceof zr?qo(e.schema):e instanceof Vt?qo(e.innerType()):e instanceof Kr?[e.value]:e instanceof Sn?e.options:e instanceof Gr?Object.keys(e.enum):e instanceof Jr?qo(e._def.innerType):e instanceof Br?[void 0]:e instanceof Hr?[null]:null;class Wo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.object)return te(n,{code:H.invalid_type,expected:ee.object,received:n.parsedType}),be;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}):(te(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}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=qo(s.shape[t]);if(!i)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 Wo({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function ci(e,t){const n=En(e),r=En(t);if(e===t)return{valid:!0,data:e};if(n===ee.object&&r===ee.object){const o=_e.objectKeys(t),s=_e.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const c=ci(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(n===ee.array&&r===ee.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],c=ci(i,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===ee.date&&r===ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class qr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ii(s)||ii(i))return be;const a=ci(s.value,i.value);return a.valid?((ai(s)||ai(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:H.invalid_intersection_types}),be)};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}))}}qr.create=(e,t,n)=>new qr({left:e,right:t,typeName:ve.ZodIntersection,...Ee(n)});class Ft extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.array)return te(r,{code:H.invalid_type,expected:ee.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return te(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new Ut(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ct.mergeArray(n,i)):ct.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Ft({...this._def,rest:t})}}Ft.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ft({items:e,typeName:ve.ZodTuple,rest:null,...Ee(t)})};class Wr 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!==ee.object)return te(r,{code:H.invalid_type,expected:ee.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Ut(r,a,r.path,a)),value:i._parse(new Ut(r,r.data[a],r.path,a))});return r.common.async?ct.mergeObjectAsync(n,o):ct.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new Wr({keyType:t,valueType:n,typeName:ve.ZodRecord,...Ee(r)}):new Wr({keyType:Dt.create(),valueType:t,typeName:ve.ZodRecord,...Ee(n)})}}class zo 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!==ee.map)return te(r,{code:H.invalid_type,expected:ee.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,c],l)=>({key:o._parse(new Ut(r,a,r.path,[l,"key"])),value:s._parse(new Ut(r,c,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return be;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of i){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return be;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}}zo.create=(e,t,n)=>new zo({valueType:t,keyType:e,typeName:ve.ZodMap,...Ee(n)});class Xn extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.set)return te(r,{code:H.invalid_type,expected:ee.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:H.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&&(te(r,{code:H.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(c){const l=new Set;for(const u of c){if(u.status==="aborted")return be;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((c,l)=>s._parse(new Ut(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,n){return new Xn({...this._def,minSize:{value:t,message:ue.toString(n)}})}max(t,n){return new Xn({...this._def,maxSize:{value:t,message:ue.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xn.create=(e,t)=>new Xn({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ee(t)});class kr extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.function)return te(n,{code:H.invalid_type,expected:ee.function,received:n.parsedType}),be;function r(a,c){return Fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uo(),Mr].filter(l=>!!l),issueData:{code:H.invalid_arguments,argumentsError:c}})}function o(a,c){return Fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uo(),Mr].filter(l=>!!l),issueData:{code:H.invalid_return_type,returnTypeError:c}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Cr){const a=this;return ht(async function(...c){const l=new It([]),u=await a._def.args.parseAsync(c,s).catch(m=>{throw l.addIssue(r(c,m)),l}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw l.addIssue(o(d,m)),l})})}else{const a=this;return ht(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new It([r(c,l.error)]);const u=Reflect.apply(i,this,l.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new It([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new kr({...this._def,args:Ft.create(t).rest(Yn.create())})}returns(t){return new kr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new kr({args:t||Ft.create([]).rest(Yn.create()),returns:n||Yn.create(),typeName:ve.ZodFunction,...Ee(r)})}}class zr 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})}}zr.create=(e,t)=>new zr({getter:e,typeName:ve.ZodLazy,...Ee(t)});class Kr extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Kr.create=(e,t)=>new Kr({value:e,typeName:ve.ZodLiteral,...Ee(t)});function Ya(e,t){return new Sn({values:e,typeName:ve.ZodEnum,...Ee(t)})}class Sn extends Oe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:_e.joinValues(r),received:n.parsedType,code:H.invalid_type}),be}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:H.invalid_enum_value,options:r}),be}return ht(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){return Sn.create(t)}exclude(t){return Sn.create(this.options.filter(n=>!t.includes(n)))}}Sn.create=Ya;class Gr extends Oe{_parse(t){const n=_e.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ee.string&&r.parsedType!==ee.number){const o=_e.objectValues(n);return te(r,{expected:_e.joinValues(o),received:r.parsedType,code:H.invalid_type}),be}if(n.indexOf(t.data)===-1){const o=_e.objectValues(n);return te(r,{received:r.data,code:H.invalid_enum_value,options:o}),be}return ht(t.data)}get enum(){return this._def.values}}Gr.create=(e,t)=>new Gr({values:e,typeName:ve.ZodNativeEnum,...Ee(t)});class Cr extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.promise&&n.common.async===!1)return te(n,{code:H.invalid_type,expected:ee.promise,received:n.parsedType}),be;const r=n.parsedType===ee.promise?n.data:Promise.resolve(n.data);return ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Cr.create=(e,t)=>new Cr({type:e,typeName:ve.ZodPromise,...Ee(t)});class Vt extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.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=>{te(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);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(i).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:i,path:r.path,parent:r})}if(o.type==="refinement"){const i=a=>{const c=o.refinement(a,s);if(r.common.async)return Promise.resolve(c);if(c 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"?be:(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"?be:(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(!Ur(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=>Ur(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);_e.assertNever(o)}}Vt.create=(e,t,n)=>new Vt({schema:e,typeName:ve.ZodEffects,effect:t,...Ee(n)}),Vt.createWithPreprocess=(e,t,n)=>new Vt({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Ee(n)});class nn extends Oe{_parse(t){return this._getType(t)===ee.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}nn.create=(e,t)=>new nn({innerType:e,typeName:ve.ZodOptional,...Ee(t)});class Qn extends Oe{_parse(t){return this._getType(t)===ee.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qn.create=(e,t)=>new Qn({innerType:e,typeName:ve.ZodNullable,...Ee(t)});class Jr extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class Ko 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 Bo(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new It(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ko.create=(e,t)=>new Ko({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class Go extends Oe{_parse(t){if(this._getType(t)!==ee.nan){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}Go.create=e=>new Go({typeName:ve.ZodNaN,...Ee(e)});const ff=Symbol("zod_brand");class Xa 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 Yr 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"?be:s.status==="dirty"?(n.dirty(),Ga(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"?be: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 Yr({in:t,out:n,typeName:ve.ZodPipeline})}}class Jo extends Oe{_parse(t){const n=this._def.innerType._parse(t);return Ur(n)&&(n.value=Object.freeze(n.value)),n}}Jo.create=(e,t)=>new Jo({innerType:e,typeName:ve.ZodReadonly,...Ee(t)});const Qa=(e,t={},n)=>e?Sr.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,l=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...l,fatal:c})}}):Sr.create(),pf={object:Ze.lazycreate};var ve;(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"})(ve||(ve={}));const hf=(e,t={message:`Input not instance of ${e.name}`})=>Qa(n=>n instanceof e,t),el=Dt.create,tl=On.create,mf=Go.create,vf=Nn.create,nl=Fr.create,gf=Jn.create,yf=Ho.create,_f=Br.create,bf=Hr.create,wf=Sr.create,Ef=Yn.create,Of=tn.create,Nf=Zo.create,Sf=At.create,xf=Ze.create,kf=Ze.strictCreate,Cf=Zr.create,Tf=Wo.create,Pf=qr.create,$f=Ft.create,If=Wr.create,Df=zo.create,Af=Xn.create,Vf=kr.create,Rf=zr.create,jf=Kr.create,Lf=Sn.create,Mf=Gr.create,Uf=Cr.create,rl=Vt.create,Ff=nn.create,Bf=Qn.create,Hf=Vt.createWithPreprocess,Zf=Yr.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Mr,setErrorMap:Xd,getErrorMap:Uo,makeIssue:Fo,EMPTY_PATH:Qd,addIssueToContext:te,ParseStatus:ct,INVALID:be,DIRTY:Ga,OK:ht,isAborted:ii,isDirty:ai,isValid:Ur,isAsync:Bo,get util(){return _e},get objectUtil(){return wn},ZodParsedType:ee,getParsedType:En,ZodType:Oe,ZodString:Dt,ZodNumber:On,ZodBigInt:Nn,ZodBoolean:Fr,ZodDate:Jn,ZodSymbol:Ho,ZodUndefined:Br,ZodNull:Hr,ZodAny:Sr,ZodUnknown:Yn,ZodNever:tn,ZodVoid:Zo,ZodArray:At,ZodObject:Ze,ZodUnion:Zr,ZodDiscriminatedUnion:Wo,ZodIntersection:qr,ZodTuple:Ft,ZodRecord:Wr,ZodMap:zo,ZodSet:Xn,ZodFunction:kr,ZodLazy:zr,ZodLiteral:Kr,ZodEnum:Sn,ZodNativeEnum:Gr,ZodPromise:Cr,ZodEffects:Vt,ZodTransformer:Vt,ZodOptional:nn,ZodNullable:Qn,ZodDefault:Jr,ZodCatch:Ko,ZodNaN:Go,BRAND:ff,ZodBranded:Xa,ZodPipeline:Yr,ZodReadonly:Jo,custom:Qa,Schema:Oe,ZodSchema:Oe,late:pf,get ZodFirstPartyTypeKind(){return ve},coerce:{string:e=>Dt.create({...e,coerce:!0}),number:e=>On.create({...e,coerce:!0}),boolean:e=>Fr.create({...e,coerce:!0}),bigint:e=>Nn.create({...e,coerce:!0}),date:e=>Jn.create({...e,coerce:!0})},any:wf,array:Sf,bigint:vf,boolean:nl,date:gf,discriminatedUnion:Tf,effect:rl,enum:Lf,function:Vf,instanceof:hf,intersection:Pf,lazy:Rf,literal:jf,map:Df,nan:mf,nativeEnum:Mf,never:Of,null:bf,nullable:Bf,number:tl,object:xf,oboolean:()=>nl().optional(),onumber:()=>tl().optional(),optional:Ff,ostring:()=>el().optional(),pipeline:Zf,preprocess:Hf,promise:Uf,record:If,set:Af,strictObject:kf,string:el,symbol:yf,transformer:rl,tuple:$f,undefined:_f,union:Cf,unknown:Ef,void:Nf,NEVER:be,ZodIssueCode:H,quotelessJson:Yd,ZodError:It}),qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ui={exports:{}};(function(e,t){var n=typeof self<"u"?self:qf,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(w){return w&&DataView.prototype.isPrototypeOf(w)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(w){return w&&l.indexOf(Object.prototype.toString.call(w))>-1};function d(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(w))throw new TypeError("Invalid character in header field name");return w.toLowerCase()}function f(w){return typeof w!="string"&&(w=String(w)),w}function m(w){var I={next:function(){var ne=w.shift();return{done:ne===void 0,value:ne}}};return a.iterable&&(I[Symbol.iterator]=function(){return I}),I}function y(w){this.map={},w instanceof y?w.forEach(function(I,ne){this.append(ne,I)},this):Array.isArray(w)?w.forEach(function(I){this.append(I[0],I[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(I){this.append(I,w[I])},this)}y.prototype.append=function(w,I){w=d(w),I=f(I);var ne=this.map[w];this.map[w]=ne?ne+", "+I:I},y.prototype.delete=function(w){delete this.map[d(w)]},y.prototype.get=function(w){return w=d(w),this.has(w)?this.map[w]:null},y.prototype.has=function(w){return this.map.hasOwnProperty(d(w))},y.prototype.set=function(w,I){this.map[d(w)]=f(I)},y.prototype.forEach=function(w,I){for(var ne in this.map)this.map.hasOwnProperty(ne)&&w.call(I,this.map[ne],ne,this)},y.prototype.keys=function(){var w=[];return this.forEach(function(I,ne){w.push(ne)}),m(w)},y.prototype.values=function(){var w=[];return this.forEach(function(I){w.push(I)}),m(w)},y.prototype.entries=function(){var w=[];return this.forEach(function(I,ne){w.push([ne,I])}),m(w)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function E(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function S(w){return new Promise(function(I,ne){w.onload=function(){I(w.result)},w.onerror=function(){ne(w.error)}})}function A(w){var I=new FileReader,ne=S(I);return I.readAsArrayBuffer(w),ne}function F(w){var I=new FileReader,ne=S(I);return I.readAsText(w),ne}function C(w){for(var I=new Uint8Array(w),ne=new Array(I.length),ae=0;ae<I.length;ae++)ne[ae]=String.fromCharCode(I[ae]);return ne.join("")}function z(w){if(w.slice)return w.slice(0);var I=new Uint8Array(w.byteLength);return I.set(new Uint8Array(w)),I.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(w){this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:a.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:a.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():a.arrayBuffer&&a.blob&&c(w)?(this._bodyArrayBuffer=z(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||u(w))?this._bodyArrayBuffer=z(w):this._bodyText=w=Object.prototype.toString.call(w):this._bodyText="",this.headers.get("content-type")||(typeof w=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var w=E(this);if(w)return w;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(){return this._bodyArrayBuffer?E(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(A)}),this.text=function(){var w=E(this);if(w)return w;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(Y)}),this.json=function(){return this.text().then(JSON.parse)},this}var Z=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(w){var I=w.toUpperCase();return Z.indexOf(I)>-1?I:w}function de(w,I){I=I||{};var ne=I.body;if(w instanceof de){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,I.headers||(this.headers=new y(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!ne&&w._bodyInit!=null&&(ne=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=I.credentials||this.credentials||"same-origin",(I.headers||!this.headers)&&(this.headers=new y(I.headers)),this.method=x(I.method||this.method||"GET"),this.mode=I.mode||this.mode||null,this.signal=I.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ne)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ne)}de.prototype.clone=function(){return new de(this,{body:this._bodyInit})};function Y(w){var I=new FormData;return w.trim().split("&").forEach(function(ne){if(ne){var ae=ne.split("="),re=ae.shift().replace(/\+/g," "),ce=ae.join("=").replace(/\+/g," ");I.append(decodeURIComponent(re),decodeURIComponent(ce))}}),I}function V(w){var I=new y,ne=w.replace(/\r?\n[\t ]+/g," ");return ne.split(/\r?\n/).forEach(function(ae){var re=ae.split(":"),ce=re.shift().trim();if(ce){var Ie=re.join(":").trim();I.append(ce,Ie)}}),I}$.call(de.prototype);function P(w,I){I||(I={}),this.type="default",this.status=I.status===void 0?200:I.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in I?I.statusText:"OK",this.headers=new y(I.headers),this.url=I.url||"",this._initBody(w)}$.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},P.error=function(){var w=new P(null,{status:0,statusText:""});return w.type="error",w};var j=[301,302,303,307,308];P.redirect=function(w,I){if(j.indexOf(I)===-1)throw new RangeError("Invalid status code");return new P(null,{status:I,headers:{location:w}})},i.DOMException=s.DOMException;try{new i.DOMException}catch{i.DOMException=function(I,ne){this.message=I,this.name=ne;var ae=Error(I);this.stack=ae.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function oe(w,I){return new Promise(function(ne,ae){var re=new de(w,I);if(re.signal&&re.signal.aborted)return ae(new i.DOMException("Aborted","AbortError"));var ce=new XMLHttpRequest;function Ie(){ce.abort()}ce.onload=function(){var je={status:ce.status,statusText:ce.statusText,headers:V(ce.getAllResponseHeaders()||"")};je.url="responseURL"in ce?ce.responseURL:je.headers.get("X-Request-URL");var nt="response"in ce?ce.response:ce.responseText;ne(new P(nt,je))},ce.onerror=function(){ae(new TypeError("Network request failed"))},ce.ontimeout=function(){ae(new TypeError("Network request failed"))},ce.onabort=function(){ae(new i.DOMException("Aborted","AbortError"))},ce.open(re.method,re.url,!0),re.credentials==="include"?ce.withCredentials=!0:re.credentials==="omit"&&(ce.withCredentials=!1),"responseType"in ce&&a.blob&&(ce.responseType="blob"),re.headers.forEach(function(je,nt){ce.setRequestHeader(nt,je)}),re.signal&&(re.signal.addEventListener("abort",Ie),ce.onreadystatechange=function(){ce.readyState===4&&re.signal.removeEventListener("abort",Ie)}),ce.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=y,s.Request=de,s.Response=P),i.Headers=y,i.Request=de,i.Response=P,i.fetch=oe,Object.defineProperty(i,"__esModule",{value:!0}),i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=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})(ui,ui.exports);var zf=ui.exports;const Yo=Wf(zf);var xn=v.record(v.number()),Kf=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:xn}),Gf=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:xn}),Jf=v.discriminatedUnion("type",[Kf,Gf]),Tr=v.object({id:v.string(),name:v.string(),originalPrice:xn,price:xn,hasDiscount:v.boolean(),discount:Jf.optional()});function Xr(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function ol(e){return v.object({value:e,quantity:v.number()})}var Bt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Bt||{}),sl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Bt),size:v.number(),path:v.string().nullable()}),di=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(sl).optional()}),Qr=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:sl.array().optional(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),fi=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:Qr.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Yf=v.object({suggestedCurrency:v.string(),products:Qr.array(),bundles:fi.array()}),Ht=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Ht||{}),Xo=v.object({id:v.string(),status:v.nativeEnum(Ht),product:Qr,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()}),Xf=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return Xo.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return v.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return Xo.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return Xo.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return Xo.parse(t.data)}},Qf=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},pi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},Pr=class extends Error{constructor(){super(),this.name="NotFoundError"}},il=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}},ep=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 tp(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 hi(e){if(e.status===404)throw new Pr;if(e.status===401)throw new pi;if(e.status===403)throw new Qf;let t;try{const n=await e.json();t=ep.parse(n)}catch{throw new Error("An unknown problem occurred")}throw new il(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[tp(n),r.join(", ")])):void 0)}var al=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),np=v.object({newsletterOptIn:v.boolean()}),ll=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:al.optional(),communicationPreferences:np,ownedProducts:v.string().array().optional()}),mi=ll.and(v.object({accessToken:v.string(),refreshToken:v.string()})),rp=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),op=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return ll.parse(e.data)}async signIn(e,t){const n=await Yo(`${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});n.status>=400&&await hi(n);const r=await n.json(),o=mi.parse(r);return this.tokenStore.setUser(o),o}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}),c=mi.parse(a.data);return this.tokenStore.setUser(c),c}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await Yo(`${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 hi(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");return rp.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},eo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(eo||{}),cl=v.object({code:v.string(),name:v.string(),description:v.string()}),sp=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:xn.optional(),isExclusive:v.boolean()}),ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:xn.optional(),isExclusive:v.boolean()}),ul=v.discriminatedUnion("type",[sp,ip]),ap=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:xn.optional(),variation:Tr.optional(),product:Qr.optional(),appliedDiscount:ul.optional()}),lp=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:xn.optional(),variation:Tr.optional(),bundle:fi.optional(),appliedDiscount:ul.optional()}),dl=v.discriminatedUnion("type",[ap,lp]),fl=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:dl.array(),couponsApplied:cl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),to=v.object({currency:v.string(),amount:v.number()}),cp=v.object({original:to,discount:to,subtotal:to,taxes:to,due:to}),up=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:al.nullable()}),dp=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:up,total:cp,items:dl.array(),couponsApplied:cl.array()}),fp=v.discriminatedUnion("status",[fl,dp]),pp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return fp.parse(t.data)}async pushContent(e,t,n){const r={...pl(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency,items:e.items});return fl.parse(o.data)}};function pl(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 hp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(pl(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Yf.parse(n.data)}},mp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new pi;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await Yo(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return s.status>=400&&await hi(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},hl=class Mo{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(Mo.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(Mo.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(Mo.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 Yo(`${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 il("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=mi.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case Mo.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};hl.storageKey="moonbase_auth";var vp=hl,ml=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:ol(Qr).array(),redeemsBundles:ol(fi).array()}),gp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return ml.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return ml.parse(t.data)}},vl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(vl||{}),gl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(gl||{}),vi=(e=>(e.Online="Online",e.Offline="Offline",e))(vi||{}),gi=v.object({id:v.string(),status:v.nativeEnum(vl),product:di,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),yl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(gl),activationMethod:v.nativeEnum(vi),lastValidatedAt:v.coerce.date().nullable()}),yp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");return{license:gi.parse(n.data),url:v.string().parse(n.headers.get("location"))}}},_p=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return Xr(gi).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return Xr(yl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},bp=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);return di.parse(n.data)}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return Xr(di).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return Xr(gi).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return Xr(yl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return v.object({location:v.string()}).parse(n.data).location}},wp=class{constructor(e){this.licenses=new _p(e),this.products=new bp(e),this.activation=new yp(e)}},Ep=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new vp(e);const t=new mp(this.configuration.endpoint,this.tokenStore);this.storefront=new hp(t),this.identity=new op(t,this.tokenStore),this.vouchers=new gp(t),this.orders=new pp(t),this.inventory=new wp(t),this.activationRequests=new Xf(t)}},_l={};/**
2
+ (function(Et,_e){typeof exports=="object"&&typeof module<"u"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(Et=typeof globalThis<"u"?globalThis:Et||self,_e(Et.Moonbase={}))})(this,function(Et){"use strict";var xw=Object.defineProperty;var kw=(Et,_e,wn)=>_e in Et?xw(Et,_e,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Et[_e]=wn;var Nr=(Et,_e,wn)=>kw(Et,typeof _e!="symbol"?_e+"":_e,wn);var _e;(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})(_e||(_e={}));var wn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wn||(wn={}));const ee=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),En=e=>{switch(typeof e){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return isNaN(e)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(e)?ee.array:e===null?ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ee.promise:typeof Map<"u"&&e instanceof Map?ee.map:typeof Set<"u"&&e instanceof Set?ee.set:typeof Date<"u"&&e instanceof Date?ee.date:ee.object;default:return ee.unknown}},H=_e.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"]),Yd=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class It 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 c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e.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()}}It.create=e=>new It(e);const Mr=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_e.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${_e.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_e.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${_e.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.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}"`:_e.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.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 H.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 H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,_e.assertNever(e)}return{message:n}};let Ka=Mr;function Xd(e){Ka=e}function Uo(){return Ka}const Fo=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:o.message||a}},Qd=[];function te(e,t){const n=Fo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Uo(),Mr].filter(r=>!!r)});e.common.issues.push(n)}class ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return be;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)r.push({key:await o.key,value:await o.value});return ct.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return be;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 be=Object.freeze({status:"aborted"}),Ga=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),ii=e=>e.status==="aborted",ai=e=>e.status==="dirty",Ur=e=>e.status==="valid",Bo=e=>typeof Promise<"u"&&e instanceof Promise;var ue;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ue||(ue={}));class Ut{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 Ja=(e,t)=>{if(Ur(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 It(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)=>i.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??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 En(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:En(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ct,ctx:{common:t.parent.common,data:t.data,parsedType:En(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Bo(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:En(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Ja(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:En(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Bo(o)?o:Promise.resolve(o));return Ja(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:H.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 Vt({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return nn.create(this,this._def)}nullable(){return Qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return At.create(this,this._def)}promise(){return Cr.create(this,this._def)}or(t){return Zr.create([this,t],this._def)}and(t){return qr.create(this,t,this._def)}transform(t){return new Vt({...Ee(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Jr({...Ee(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Xa({typeName:ve.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ko({...Ee(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Yr.create(this,t)}readonly(){return Jo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ef=/^c[^\s-]{8,}$/i,tf=/^[a-z][a-z0-9]*$/,nf=/^[0-9A-HJKMNP-TV-Z]{26}$/,rf=/^[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,of=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let li;const af=/^(((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}))$/,lf=/^(([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})))$/,cf=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function uf(e,t){return!!((t==="v4"||!t)&&af.test(e)||(t==="v6"||!t)&&lf.test(e))}class Dt extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ee.string){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.string,received:s.parsedType}),be}const r=new ct;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.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),te(o,{code:H.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?te(o,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")of.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")li||(li=new RegExp(sf,"u")),li.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")rf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")ef.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")tf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")nf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:H.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),te(o,{validation:"regex",code:H.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),te(o,{code:H.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),te(o,{code:H.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?cf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?uf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:H.invalid_string,message:s.message}),r.dirty()):_e.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:H.invalid_string,...ue.errToObj(r)})}_addCheck(t){return new Dt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ue.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ue.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ue.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ue.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ue.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ue.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ue.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ue.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!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,...ue.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ue.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ue.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ue.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ue.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ue.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ue.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ue.errToObj(n)})}nonempty(t){return this.min(1,ue.errToObj(t))}trim(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}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 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 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}}Dt.create=e=>{var t;return new Dt({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function df(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 On 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)!==ee.number){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.number,received:s.parsedType}),be}let r;const o=new ct;for(const s of this._def.checks)s.kind==="int"?_e.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.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),te(r,{code:H.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),te(r,{code:H.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?df(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_finite,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ue.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ue.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ue.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ue.toString(n))}setLimit(t,n,r,o){return new On({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ue.toString(o)}]})}_addCheck(t){return new On({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ue.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ue.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ue.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ue.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ue.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ue.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ue.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ue.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ue.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"&&_e.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)}}On.create=e=>new On({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Nn 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)!==ee.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.bigint,received:s.parsedType}),be}let r;const o=new ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.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),te(r,{code:H.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),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ue.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ue.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ue.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ue.toString(n))}setLimit(t,n,r,o){return new Nn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ue.toString(o)}]})}_addCheck(t){return new Nn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ue.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ue.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ue.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ue.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ue.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}}Nn.create=e=>{var t;return new Nn({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class Fr extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ee.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.boolean,received:r.parsedType}),be}return ht(t.data)}}Fr.create=e=>new Fr({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Jn extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ee.date){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_date}),be}const r=new ct;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.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),te(o,{code:H.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):_e.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Jn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ue.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ue.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}}Jn.create=e=>new Jn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Ee(e)});class Ho extends Oe{_parse(t){if(this._getType(t)!==ee.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.symbol,received:r.parsedType}),be}return ht(t.data)}}Ho.create=e=>new Ho({typeName:ve.ZodSymbol,...Ee(e)});class Br extends Oe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.undefined,received:r.parsedType}),be}return ht(t.data)}}Br.create=e=>new Br({typeName:ve.ZodUndefined,...Ee(e)});class Hr extends Oe{_parse(t){if(this._getType(t)!==ee.null){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.null,received:r.parsedType}),be}return ht(t.data)}}Hr.create=e=>new Hr({typeName:ve.ZodNull,...Ee(e)});class Sr extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}}Sr.create=e=>new Sr({typeName:ve.ZodAny,...Ee(e)});class Yn extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}}Yn.create=e=>new Yn({typeName:ve.ZodUnknown,...Ee(e)});class tn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:H.invalid_type,expected:ee.never,received:n.parsedType}),be}}tn.create=e=>new tn({typeName:ve.ZodNever,...Ee(e)});class Zo extends Oe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.void,received:r.parsedType}),be}return ht(t.data)}}Zo.create=e=>new Zo({typeName:ve.ZodVoid,...Ee(e)});class At extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ee.array)return te(n,{code:H.invalid_type,expected:ee.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(te(n,{code:i?H.too_big:H.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&&(te(n,{code:H.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&&(te(n,{code:H.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 Ut(n,i,n.path,a)))).then(i=>ct.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Ut(n,i,n.path,a)));return ct.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new At({...this._def,minLength:{value:t,message:ue.toString(n)}})}max(t,n){return new At({...this._def,maxLength:{value:t,message:ue.toString(n)}})}length(t,n){return new At({...this._def,exactLength:{value:t,message:ue.toString(n)}})}nonempty(t){return this.min(1,t)}}At.create=(e,t)=>new At({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ee(t)});function xr(e){if(e instanceof Ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=nn.create(xr(r))}return new Ze({...e._def,shape:()=>t})}else return e instanceof At?new At({...e._def,type:xr(e.element)}):e instanceof nn?nn.create(xr(e.unwrap())):e instanceof Qn?Qn.create(xr(e.unwrap())):e instanceof Ft?Ft.create(e.items.map(t=>xr(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=_e.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ee.object){const c=this._getOrReturnCtx(t);return te(c,{code:H.invalid_type,expected:ee.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof tn&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ut(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof tn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(te(o,{code:H.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ut(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>ct.mergeObjectSync(r,c)):ct.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ue.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=ue.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:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ze({...this._def,catchall:t})}pick(t){const n={};return _e.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 _e.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return xr(this)}partial(t){const n={};return _e.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 _e.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof nn;)s=s._def.innerType;n[r]=s}}),new Ze({...this._def,shape:()=>n})}keyof(){return Ya(_e.objectKeys(this.shape))}}Ze.create=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strip",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)}),Ze.strictCreate=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strict",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)}),Ze.lazycreate=(e,t)=>new Ze({shape:e,unknownKeys:"strip",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)});class Zr 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 It(a.ctx.common.issues));return te(n,{code:H.invalid_union,unionErrors:i}),be}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 c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new It(l));return te(n,{code:H.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}Zr.create=(e,t)=>new Zr({options:e,typeName:ve.ZodUnion,...Ee(t)});const qo=e=>e instanceof zr?qo(e.schema):e instanceof Vt?qo(e.innerType()):e instanceof Kr?[e.value]:e instanceof Sn?e.options:e instanceof Gr?Object.keys(e.enum):e instanceof Jr?qo(e._def.innerType):e instanceof Br?[void 0]:e instanceof Hr?[null]:null;class Wo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.object)return te(n,{code:H.invalid_type,expected:ee.object,received:n.parsedType}),be;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}):(te(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}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=qo(s.shape[t]);if(!i)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 Wo({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function ci(e,t){const n=En(e),r=En(t);if(e===t)return{valid:!0,data:e};if(n===ee.object&&r===ee.object){const o=_e.objectKeys(t),s=_e.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=ci(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ee.array&&r===ee.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=ci(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ee.date&&r===ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class qr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ii(s)||ii(i))return be;const a=ci(s.value,i.value);return a.valid?((ai(s)||ai(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:H.invalid_intersection_types}),be)};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}))}}qr.create=(e,t,n)=>new qr({left:e,right:t,typeName:ve.ZodIntersection,...Ee(n)});class Ft extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.array)return te(r,{code:H.invalid_type,expected:ee.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return te(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:H.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 Ut(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ct.mergeArray(n,i)):ct.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Ft({...this._def,rest:t})}}Ft.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ft({items:e,typeName:ve.ZodTuple,rest:null,...Ee(t)})};class Wr 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!==ee.object)return te(r,{code:H.invalid_type,expected:ee.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Ut(r,a,r.path,a)),value:i._parse(new Ut(r,r.data[a],r.path,a))});return r.common.async?ct.mergeObjectAsync(n,o):ct.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new Wr({keyType:t,valueType:n,typeName:ve.ZodRecord,...Ee(r)}):new Wr({keyType:Dt.create(),valueType:t,typeName:ve.ZodRecord,...Ee(n)})}}class zo 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!==ee.map)return te(r,{code:H.invalid_type,expected:ee.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Ut(r,a,r.path,[c,"key"])),value:s._parse(new Ut(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}zo.create=(e,t,n)=>new zo({valueType:t,keyType:e,typeName:ve.ZodMap,...Ee(n)});class Xn extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.set)return te(r,{code:H.invalid_type,expected:ee.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:H.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&&(te(r,{code:H.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 c=new Set;for(const u of l){if(u.status==="aborted")return be;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Ut(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Xn({...this._def,minSize:{value:t,message:ue.toString(n)}})}max(t,n){return new Xn({...this._def,maxSize:{value:t,message:ue.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xn.create=(e,t)=>new Xn({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ee(t)});class kr extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.function)return te(n,{code:H.invalid_type,expected:ee.function,received:n.parsedType}),be;function r(a,l){return Fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uo(),Mr].filter(c=>!!c),issueData:{code:H.invalid_arguments,argumentsError:l}})}function o(a,l){return Fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uo(),Mr].filter(c=>!!c),issueData:{code:H.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Cr){const a=this;return ht(async function(...l){const c=new It([]),u=await a._def.args.parseAsync(l,s).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw c.addIssue(o(d,m)),c})})}else{const a=this;return ht(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new It([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new It([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new kr({...this._def,args:Ft.create(t).rest(Yn.create())})}returns(t){return new kr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new kr({args:t||Ft.create([]).rest(Yn.create()),returns:n||Yn.create(),typeName:ve.ZodFunction,...Ee(r)})}}class zr 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})}}zr.create=(e,t)=>new zr({getter:e,typeName:ve.ZodLazy,...Ee(t)});class Kr extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Kr.create=(e,t)=>new Kr({value:e,typeName:ve.ZodLiteral,...Ee(t)});function Ya(e,t){return new Sn({values:e,typeName:ve.ZodEnum,...Ee(t)})}class Sn extends Oe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:_e.joinValues(r),received:n.parsedType,code:H.invalid_type}),be}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:H.invalid_enum_value,options:r}),be}return ht(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){return Sn.create(t)}exclude(t){return Sn.create(this.options.filter(n=>!t.includes(n)))}}Sn.create=Ya;class Gr extends Oe{_parse(t){const n=_e.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ee.string&&r.parsedType!==ee.number){const o=_e.objectValues(n);return te(r,{expected:_e.joinValues(o),received:r.parsedType,code:H.invalid_type}),be}if(n.indexOf(t.data)===-1){const o=_e.objectValues(n);return te(r,{received:r.data,code:H.invalid_enum_value,options:o}),be}return ht(t.data)}get enum(){return this._def.values}}Gr.create=(e,t)=>new Gr({values:e,typeName:ve.ZodNativeEnum,...Ee(t)});class Cr extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.promise&&n.common.async===!1)return te(n,{code:H.invalid_type,expected:ee.promise,received:n.parsedType}),be;const r=n.parsedType===ee.promise?n.data:Promise.resolve(n.data);return ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Cr.create=(e,t)=>new Cr({type:e,typeName:ve.ZodPromise,...Ee(t)});class Vt extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.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=>{te(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);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(i).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:i,path:r.path,parent:r})}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"?be:(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"?be:(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(!Ur(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=>Ur(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);_e.assertNever(o)}}Vt.create=(e,t,n)=>new Vt({schema:e,typeName:ve.ZodEffects,effect:t,...Ee(n)}),Vt.createWithPreprocess=(e,t,n)=>new Vt({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Ee(n)});class nn extends Oe{_parse(t){return this._getType(t)===ee.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}nn.create=(e,t)=>new nn({innerType:e,typeName:ve.ZodOptional,...Ee(t)});class Qn extends Oe{_parse(t){return this._getType(t)===ee.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qn.create=(e,t)=>new Qn({innerType:e,typeName:ve.ZodNullable,...Ee(t)});class Jr extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class Ko 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 Bo(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new It(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ko.create=(e,t)=>new Ko({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class Go extends Oe{_parse(t){if(this._getType(t)!==ee.nan){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}Go.create=e=>new Go({typeName:ve.ZodNaN,...Ee(e)});const ff=Symbol("zod_brand");class Xa 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 Yr 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"?be:s.status==="dirty"?(n.dirty(),Ga(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"?be: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 Yr({in:t,out:n,typeName:ve.ZodPipeline})}}class Jo extends Oe{_parse(t){const n=this._def.innerType._parse(t);return Ur(n)&&(n.value=Object.freeze(n.value)),n}}Jo.create=(e,t)=>new Jo({innerType:e,typeName:ve.ZodReadonly,...Ee(t)});const Qa=(e,t={},n)=>e?Sr.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,c=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...c,fatal:l})}}):Sr.create(),pf={object:Ze.lazycreate};var ve;(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"})(ve||(ve={}));const hf=(e,t={message:`Input not instance of ${e.name}`})=>Qa(n=>n instanceof e,t),el=Dt.create,tl=On.create,mf=Go.create,vf=Nn.create,nl=Fr.create,gf=Jn.create,yf=Ho.create,_f=Br.create,bf=Hr.create,wf=Sr.create,Ef=Yn.create,Of=tn.create,Nf=Zo.create,Sf=At.create,xf=Ze.create,kf=Ze.strictCreate,Cf=Zr.create,Tf=Wo.create,Pf=qr.create,$f=Ft.create,If=Wr.create,Df=zo.create,Af=Xn.create,Vf=kr.create,Rf=zr.create,jf=Kr.create,Lf=Sn.create,Mf=Gr.create,Uf=Cr.create,rl=Vt.create,Ff=nn.create,Bf=Qn.create,Hf=Vt.createWithPreprocess,Zf=Yr.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Mr,setErrorMap:Xd,getErrorMap:Uo,makeIssue:Fo,EMPTY_PATH:Qd,addIssueToContext:te,ParseStatus:ct,INVALID:be,DIRTY:Ga,OK:ht,isAborted:ii,isDirty:ai,isValid:Ur,isAsync:Bo,get util(){return _e},get objectUtil(){return wn},ZodParsedType:ee,getParsedType:En,ZodType:Oe,ZodString:Dt,ZodNumber:On,ZodBigInt:Nn,ZodBoolean:Fr,ZodDate:Jn,ZodSymbol:Ho,ZodUndefined:Br,ZodNull:Hr,ZodAny:Sr,ZodUnknown:Yn,ZodNever:tn,ZodVoid:Zo,ZodArray:At,ZodObject:Ze,ZodUnion:Zr,ZodDiscriminatedUnion:Wo,ZodIntersection:qr,ZodTuple:Ft,ZodRecord:Wr,ZodMap:zo,ZodSet:Xn,ZodFunction:kr,ZodLazy:zr,ZodLiteral:Kr,ZodEnum:Sn,ZodNativeEnum:Gr,ZodPromise:Cr,ZodEffects:Vt,ZodTransformer:Vt,ZodOptional:nn,ZodNullable:Qn,ZodDefault:Jr,ZodCatch:Ko,ZodNaN:Go,BRAND:ff,ZodBranded:Xa,ZodPipeline:Yr,ZodReadonly:Jo,custom:Qa,Schema:Oe,ZodSchema:Oe,late:pf,get ZodFirstPartyTypeKind(){return ve},coerce:{string:e=>Dt.create({...e,coerce:!0}),number:e=>On.create({...e,coerce:!0}),boolean:e=>Fr.create({...e,coerce:!0}),bigint:e=>Nn.create({...e,coerce:!0}),date:e=>Jn.create({...e,coerce:!0})},any:wf,array:Sf,bigint:vf,boolean:nl,date:gf,discriminatedUnion:Tf,effect:rl,enum:Lf,function:Vf,instanceof:hf,intersection:Pf,lazy:Rf,literal:jf,map:Df,nan:mf,nativeEnum:Mf,never:Of,null:bf,nullable:Bf,number:tl,object:xf,oboolean:()=>nl().optional(),onumber:()=>tl().optional(),optional:Ff,ostring:()=>el().optional(),pipeline:Zf,preprocess:Hf,promise:Uf,record:If,set:Af,strictObject:kf,string:el,symbol:yf,transformer:rl,tuple:$f,undefined:_f,union:Cf,unknown:Ef,void:Nf,NEVER:be,ZodIssueCode:H,quotelessJson:Yd,ZodError:It}),qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ui={exports:{}};(function(e,t){var n=typeof self<"u"?self:qf,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(w){return w&&DataView.prototype.isPrototypeOf(w)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(w){return w&&c.indexOf(Object.prototype.toString.call(w))>-1};function d(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(w))throw new TypeError("Invalid character in header field name");return w.toLowerCase()}function f(w){return typeof w!="string"&&(w=String(w)),w}function m(w){var I={next:function(){var ne=w.shift();return{done:ne===void 0,value:ne}}};return a.iterable&&(I[Symbol.iterator]=function(){return I}),I}function y(w){this.map={},w instanceof y?w.forEach(function(I,ne){this.append(ne,I)},this):Array.isArray(w)?w.forEach(function(I){this.append(I[0],I[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(I){this.append(I,w[I])},this)}y.prototype.append=function(w,I){w=d(w),I=f(I);var ne=this.map[w];this.map[w]=ne?ne+", "+I:I},y.prototype.delete=function(w){delete this.map[d(w)]},y.prototype.get=function(w){return w=d(w),this.has(w)?this.map[w]:null},y.prototype.has=function(w){return this.map.hasOwnProperty(d(w))},y.prototype.set=function(w,I){this.map[d(w)]=f(I)},y.prototype.forEach=function(w,I){for(var ne in this.map)this.map.hasOwnProperty(ne)&&w.call(I,this.map[ne],ne,this)},y.prototype.keys=function(){var w=[];return this.forEach(function(I,ne){w.push(ne)}),m(w)},y.prototype.values=function(){var w=[];return this.forEach(function(I){w.push(I)}),m(w)},y.prototype.entries=function(){var w=[];return this.forEach(function(I,ne){w.push([ne,I])}),m(w)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function E(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function S(w){return new Promise(function(I,ne){w.onload=function(){I(w.result)},w.onerror=function(){ne(w.error)}})}function A(w){var I=new FileReader,ne=S(I);return I.readAsArrayBuffer(w),ne}function F(w){var I=new FileReader,ne=S(I);return I.readAsText(w),ne}function C(w){for(var I=new Uint8Array(w),ne=new Array(I.length),ae=0;ae<I.length;ae++)ne[ae]=String.fromCharCode(I[ae]);return ne.join("")}function z(w){if(w.slice)return w.slice(0);var I=new Uint8Array(w.byteLength);return I.set(new Uint8Array(w)),I.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(w){this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:a.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:a.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():a.arrayBuffer&&a.blob&&l(w)?(this._bodyArrayBuffer=z(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||u(w))?this._bodyArrayBuffer=z(w):this._bodyText=w=Object.prototype.toString.call(w):this._bodyText="",this.headers.get("content-type")||(typeof w=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var w=E(this);if(w)return w;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(){return this._bodyArrayBuffer?E(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(A)}),this.text=function(){var w=E(this);if(w)return w;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(Y)}),this.json=function(){return this.text().then(JSON.parse)},this}var Z=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(w){var I=w.toUpperCase();return Z.indexOf(I)>-1?I:w}function fe(w,I){I=I||{};var ne=I.body;if(w instanceof fe){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,I.headers||(this.headers=new y(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!ne&&w._bodyInit!=null&&(ne=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=I.credentials||this.credentials||"same-origin",(I.headers||!this.headers)&&(this.headers=new y(I.headers)),this.method=x(I.method||this.method||"GET"),this.mode=I.mode||this.mode||null,this.signal=I.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ne)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ne)}fe.prototype.clone=function(){return new fe(this,{body:this._bodyInit})};function Y(w){var I=new FormData;return w.trim().split("&").forEach(function(ne){if(ne){var ae=ne.split("="),re=ae.shift().replace(/\+/g," "),ce=ae.join("=").replace(/\+/g," ");I.append(decodeURIComponent(re),decodeURIComponent(ce))}}),I}function V(w){var I=new y,ne=w.replace(/\r?\n[\t ]+/g," ");return ne.split(/\r?\n/).forEach(function(ae){var re=ae.split(":"),ce=re.shift().trim();if(ce){var Ie=re.join(":").trim();I.append(ce,Ie)}}),I}$.call(fe.prototype);function P(w,I){I||(I={}),this.type="default",this.status=I.status===void 0?200:I.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in I?I.statusText:"OK",this.headers=new y(I.headers),this.url=I.url||"",this._initBody(w)}$.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},P.error=function(){var w=new P(null,{status:0,statusText:""});return w.type="error",w};var j=[301,302,303,307,308];P.redirect=function(w,I){if(j.indexOf(I)===-1)throw new RangeError("Invalid status code");return new P(null,{status:I,headers:{location:w}})},i.DOMException=s.DOMException;try{new i.DOMException}catch{i.DOMException=function(I,ne){this.message=I,this.name=ne;var ae=Error(I);this.stack=ae.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function oe(w,I){return new Promise(function(ne,ae){var re=new fe(w,I);if(re.signal&&re.signal.aborted)return ae(new i.DOMException("Aborted","AbortError"));var ce=new XMLHttpRequest;function Ie(){ce.abort()}ce.onload=function(){var je={status:ce.status,statusText:ce.statusText,headers:V(ce.getAllResponseHeaders()||"")};je.url="responseURL"in ce?ce.responseURL:je.headers.get("X-Request-URL");var nt="response"in ce?ce.response:ce.responseText;ne(new P(nt,je))},ce.onerror=function(){ae(new TypeError("Network request failed"))},ce.ontimeout=function(){ae(new TypeError("Network request failed"))},ce.onabort=function(){ae(new i.DOMException("Aborted","AbortError"))},ce.open(re.method,re.url,!0),re.credentials==="include"?ce.withCredentials=!0:re.credentials==="omit"&&(ce.withCredentials=!1),"responseType"in ce&&a.blob&&(ce.responseType="blob"),re.headers.forEach(function(je,nt){ce.setRequestHeader(nt,je)}),re.signal&&(re.signal.addEventListener("abort",Ie),ce.onreadystatechange=function(){ce.readyState===4&&re.signal.removeEventListener("abort",Ie)}),ce.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=y,s.Request=fe,s.Response=P),i.Headers=y,i.Request=fe,i.Response=P,i.fetch=oe,Object.defineProperty(i,"__esModule",{value:!0}),i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=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})(ui,ui.exports);var zf=ui.exports;const Yo=Wf(zf);var xn=v.record(v.number()),Kf=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:xn}),Gf=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:xn}),Jf=v.discriminatedUnion("type",[Kf,Gf]),Tr=v.object({id:v.string(),name:v.string(),originalPrice:xn,price:xn,hasDiscount:v.boolean(),discount:Jf.optional()});function Xr(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function ol(e){return v.object({value:e,quantity:v.number()})}var Bt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Bt||{}),sl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Bt),size:v.number(),path:v.string().nullable()}),di=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(sl).optional()}),Qr=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:sl.array().optional(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),fi=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:Qr.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Yf=v.object({suggestedCurrency:v.string(),products:Qr.array(),bundles:fi.array()}),Ht=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Ht||{}),Xo=v.object({id:v.string(),status:v.nativeEnum(Ht),product:Qr,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()}),Xf=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return Xo.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return v.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return Xo.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return Xo.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return Xo.parse(t.data)}},Qf=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},pi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},Pr=class extends Error{constructor(){super(),this.name="NotFoundError"}},il=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}},ep=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 tp(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 hi(e){if(e.status===404)throw new Pr;if(e.status===401)throw new pi;if(e.status===403)throw new Qf;let t;try{const n=await e.json();t=ep.parse(n)}catch{throw new Error("An unknown problem occurred")}throw new il(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[tp(n),r.join(", ")])):void 0)}var al=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),np=v.object({newsletterOptIn:v.boolean()}),ll=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:al.optional(),communicationPreferences:np,ownedProducts:v.string().array().optional()}),mi=ll.and(v.object({accessToken:v.string(),refreshToken:v.string()})),rp=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),op=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return ll.parse(e.data)}async signIn(e,t){const n=await Yo(`${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});n.status>=400&&await hi(n);const r=await n.json(),o=mi.parse(r);return this.tokenStore.setUser(o),o}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}),l=mi.parse(a.data);return this.tokenStore.setUser(l),l}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await Yo(`${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 hi(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");return rp.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},eo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(eo||{}),cl=v.object({code:v.string(),name:v.string(),description:v.string()}),sp=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:xn.optional(),isExclusive:v.boolean()}),ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:xn.optional(),isExclusive:v.boolean()}),ul=v.discriminatedUnion("type",[sp,ip]),ap=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:xn.optional(),variation:Tr.optional(),product:Qr.optional(),appliedDiscount:ul.optional()}),lp=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:xn.optional(),variation:Tr.optional(),bundle:fi.optional(),appliedDiscount:ul.optional()}),dl=v.discriminatedUnion("type",[ap,lp]),fl=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:dl.array(),couponsApplied:cl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),to=v.object({currency:v.string(),amount:v.number()}),cp=v.object({original:to,discount:to,subtotal:to,taxes:to,due:to}),up=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:al.nullable()}),dp=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:up,total:cp,items:dl.array(),couponsApplied:cl.array()}),fp=v.discriminatedUnion("status",[fl,dp]),pp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return fp.parse(t.data)}async pushContent(e,t,n){const r={...pl(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency,items:e.items});return fl.parse(o.data)}};function pl(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 hp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(pl(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Yf.parse(n.data)}},mp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new pi;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await Yo(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return s.status>=400&&await hi(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},hl=class Mo{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(Mo.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(Mo.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(Mo.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 Yo(`${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 il("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=mi.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case Mo.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};hl.storageKey="moonbase_auth";var vp=hl,ml=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:ol(Qr).array(),redeemsBundles:ol(fi).array()}),gp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return ml.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return ml.parse(t.data)}},vl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(vl||{}),gl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(gl||{}),vi=(e=>(e.Online="Online",e.Offline="Offline",e))(vi||{}),gi=v.object({id:v.string(),status:v.nativeEnum(vl),product:di,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),yl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(gl),activationMethod:v.nativeEnum(vi),lastValidatedAt:v.coerce.date().nullable()}),yp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");return{license:gi.parse(n.data),url:v.string().parse(n.headers.get("location"))}}},_p=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return Xr(gi).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return Xr(yl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},bp=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);return di.parse(n.data)}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return Xr(di).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return Xr(gi).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return Xr(yl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return v.object({location:v.string()}).parse(n.data).location}},wp=class{constructor(e){this.licenses=new _p(e),this.products=new bp(e),this.activation=new yp(e)}},Ep=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new vp(e);const t=new mp(this.configuration.endpoint,this.tokenStore);this.storefront=new hp(t),this.identity=new op(t,this.tokenStore),this.vouchers=new gp(t),this.orders=new pp(t),this.inventory=new wp(t),this.activationRequests=new Xf(t)}},_l={};/**
3
3
  * @vue/shared v3.4.38
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
5
  * @license MIT
6
- **//*! #__NO_SIDE_EFFECTS__ */function rn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const Me=_l.NODE_ENV!=="production"?Object.freeze({}):{},$r=_l.NODE_ENV!=="production"?Object.freeze([]):[],We=()=>{},Op=()=>!1,no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qo=e=>e.startsWith("onUpdate:"),qe=Object.assign,yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Np=Object.prototype.hasOwnProperty,Ne=(e,t)=>Np.call(e,t),ie=Array.isArray,er=e=>es(e)==="[object Map]",bl=e=>es(e)==="[object Set]",fe=e=>typeof e=="function",Be=e=>typeof e=="string",kn=e=>typeof e=="symbol",De=e=>e!==null&&typeof e=="object",_i=e=>(De(e)||fe(e))&&fe(e.then)&&fe(e.catch),wl=Object.prototype.toString,es=e=>wl.call(e),bi=e=>es(e).slice(8,-1),El=e=>es(e)==="[object Object]",wi=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ro=rn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sp=rn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),ts=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},xp=/-(\w)/g,Et=ts(e=>e.replace(xp,(t,n)=>n?n.toUpperCase():"")),kp=/\B([A-Z])/g,on=ts(e=>e.replace(kp,"-$1").toLowerCase()),tr=ts(e=>e.charAt(0).toUpperCase()+e.slice(1)),nr=ts(e=>e?`on${tr(e)}`:""),Cn=(e,t)=>!Object.is(e,t),oo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ns=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Cp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Tp=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Ol;const Ei=()=>Ol||(Ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Oi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Be(r)?Dp(r):Oi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Be(e)||De(e))return e}const Pp=/;(?![^(]*\))/g,$p=/:([^]+)/,Ip=/\/\*[^]*?\*\//g;function Dp(e){const t={};return e.replace(Ip,"").split(Pp).forEach(n=>{if(n){const r=n.split($p);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function rs(e){let t="";if(Be(e))t=e;else if(ie(e))for(let n=0;n<e.length;n++){const r=rs(e[n]);r&&(t+=r+" ")}else if(De(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ap="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",Vp="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",Rp="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",jp=rn(Ap),Lp=rn(Vp),Mp=rn(Rp),Up=rn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Nl(e){return!!e||e===""}const Sl=e=>!!(e&&e.__v_isRef===!0),K=e=>Be(e)?e:e==null?"":ie(e)||De(e)&&(e.toString===wl||!fe(e.toString))?Sl(e)?K(e.value):JSON.stringify(e,xl,2):String(e),xl=(e,t)=>Sl(t)?xl(e,t.value):er(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Ni(r,s)+" =>"]=o,n),{})}:bl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ni(n))}:kn(t)?Ni(t):De(t)&&!ie(t)&&!El(t)?String(t):t,Ni=(e,t="")=>{var n;return kn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var ze={};function Zt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ot;class kl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ot,!t&&Ot&&(this.index=(Ot.scopes||(Ot.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Ot;try{return Ot=this,t()}finally{Ot=n}}else ze.NODE_ENV!=="production"&&Zt("cannot run an inactive effect scope.")}on(){Ot=this}off(){Ot=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 Cl(e){return new kl(e)}function Fp(e,t=Ot){t&&t.active&&t.effects.push(e)}function Tl(){return Ot}function Bp(e){Ot?Ot.cleanups.push(e):ze.NODE_ENV!=="production"&&Zt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let rr;class Si{constructor(t,n,r,o){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Fp(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,sn();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Hp(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),an()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Tn,n=rr;try{return Tn=!0,rr=this,this._runnings++,Pl(this),this.fn()}finally{$l(this),this._runnings--,rr=n,Tn=t}}stop(){this.active&&(Pl(this),$l(this),this.onStop&&this.onStop(),this.active=!1)}}function Hp(e){return e.value}function Pl(e){e._trackId++,e._depsLength=0}function $l(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Il(e.deps[t],e);e.deps.length=e._depsLength}}function Il(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Tn=!0,xi=0;const Dl=[];function sn(){Dl.push(Tn),Tn=!1}function an(){const e=Dl.pop();Tn=e===void 0?!0:e}function ki(){xi++}function Ci(){for(xi--;!xi&&Ti.length;)Ti.shift()()}function Al(e,t,n){var r;if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&Il(o,e),e.deps[e._depsLength++]=t):e._depsLength++,ze.NODE_ENV!=="production"&&((r=e.onTrack)==null||r.call(e,qe({effect:e},n)))}}const Ti=[];function Vl(e,t,n){var r;ki();for(const o of e.keys()){let s;o._dirtyLevel<t&&(s??(s=e.get(o)===o._trackId))&&(o._shouldSchedule||(o._shouldSchedule=o._dirtyLevel===0),o._dirtyLevel=t),o._shouldSchedule&&(s??(s=e.get(o)===o._trackId))&&(ze.NODE_ENV!=="production"&&((r=o.onTrigger)==null||r.call(o,qe({effect:o},n))),o.trigger(),(!o._runnings||o.allowRecurse)&&o._dirtyLevel!==2&&(o._shouldSchedule=!1,o.scheduler&&Ti.push(o.scheduler)))}Ci()}const Rl=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},os=new WeakMap,or=Symbol(ze.NODE_ENV!=="production"?"iterate":""),Pi=Symbol(ze.NODE_ENV!=="production"?"Map key iterate":"");function ot(e,t,n){if(Tn&&rr){let r=os.get(e);r||os.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Rl(()=>r.delete(n))),Al(rr,o,ze.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function qt(e,t,n,r,o,s){const i=os.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&ie(e)){const c=Number(r);i.forEach((l,u)=>{(u==="length"||!kn(u)&&u>=c)&&a.push(l)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":ie(e)?wi(n)&&a.push(i.get("length")):(a.push(i.get(or)),er(e)&&a.push(i.get(Pi)));break;case"delete":ie(e)||(a.push(i.get(or)),er(e)&&a.push(i.get(Pi)));break;case"set":er(e)&&a.push(i.get(or));break}ki();for(const c of a)c&&Vl(c,4,ze.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0);Ci()}function Zp(e,t){const n=os.get(e);return n&&n.get(t)}const qp=rn("__proto__,__v_isRef,__isVue"),jl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kn)),Ll=Wp();function Wp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ge(this);for(let s=0,i=this.length;s<i;s++)ot(r,"get",s+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(ge)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){sn(),ki();const r=ge(this)[t].apply(this,n);return Ci(),an(),r}}),e}function zp(e){kn(e)||(e=String(e));const t=ge(this);return ot(t,"has",e),t.hasOwnProperty(e)}class Ml{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?Jl:Gl:s?Kl:zl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ie(t);if(!o){if(i&&Ne(Ll,n))return Reflect.get(Ll,n,r);if(n==="hasOwnProperty")return zp}const a=Reflect.get(t,n,r);return(kn(n)?jl.has(n):qp(n))||(o||ot(t,"get",n),s)?a:He(a)?i&&wi(n)?a:a.value:De(a)?o?Yl(a):so(a):a}}class Ul extends Ml{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const c=cn(s);if(!un(r)&&!cn(r)&&(s=ge(s),r=ge(r)),!ie(t)&&He(s)&&!He(r))return c?!1:(s.value=r,!0)}const i=ie(t)&&wi(n)?Number(n)<t.length:Ne(t,n),a=Reflect.set(t,n,r,o);return t===ge(o)&&(i?Cn(r,s)&&qt(t,"set",n,r,s):qt(t,"add",n,r)),a}deleteProperty(t,n){const r=Ne(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(!kn(n)||!jl.has(n))&&ot(t,"has",n),r}ownKeys(t){return ot(t,"iterate",ie(t)?"length":or),Reflect.ownKeys(t)}}class Fl extends Ml{constructor(t=!1){super(!0,t)}set(t,n){return ze.NODE_ENV!=="production"&&Zt(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return ze.NODE_ENV!=="production"&&Zt(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Kp=new Ul,Gp=new Fl,Jp=new Ul(!0),Yp=new Fl(!0),$i=e=>e,ss=e=>Reflect.getPrototypeOf(e);function is(e,t,n=!1,r=!1){e=e.__v_raw;const o=ge(e),s=ge(t);n||(Cn(t,s)&&ot(o,"get",t),ot(o,"get",s));const{has:i}=ss(o),a=r?$i:n?Ii:io;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 as(e,t=!1){const n=this.__v_raw,r=ge(n),o=ge(e);return t||(Cn(e,o)&&ot(r,"has",e),ot(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ls(e,t=!1){return e=e.__v_raw,!t&&ot(ge(e),"iterate",or),Reflect.get(e,"size",e)}function Bl(e,t=!1){!t&&!un(e)&&!cn(e)&&(e=ge(e));const n=ge(this);return ss(n).has.call(n,e)||(n.add(e),qt(n,"add",e,e)),this}function Hl(e,t,n=!1){!n&&!un(t)&&!cn(t)&&(t=ge(t));const r=ge(this),{has:o,get:s}=ss(r);let i=o.call(r,e);i?ze.NODE_ENV!=="production"&&Wl(r,o,e):(e=ge(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Cn(t,a)&&qt(r,"set",e,t,a):qt(r,"add",e,t),this}function Zl(e){const t=ge(this),{has:n,get:r}=ss(t);let o=n.call(t,e);o?ze.NODE_ENV!=="production"&&Wl(t,n,e):(e=ge(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 ql(){const e=ge(this),t=e.size!==0,n=ze.NODE_ENV!=="production"?er(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&qt(e,"clear",void 0,void 0,n),r}function cs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ge(i),c=t?$i:e?Ii:io;return!e&&ot(a,"iterate",or),i.forEach((l,u)=>r.call(o,c(l),c(u),s))}}function us(e,t,n){return function(...r){const o=this.__v_raw,s=ge(o),i=er(s),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,l=o[e](...r),u=n?$i:t?Ii:io;return!t&&ot(s,"iterate",c?Pi:or),{next(){const{value:d,done:f}=l.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function Pn(e){return function(...t){if(ze.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Zt(`${tr(e)} operation ${n}failed: target is readonly.`,ge(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Xp(){const e={get(s){return is(this,s)},get size(){return ls(this)},has:as,add:Bl,set:Hl,delete:Zl,clear:ql,forEach:cs(!1,!1)},t={get(s){return is(this,s,!1,!0)},get size(){return ls(this)},has:as,add(s){return Bl.call(this,s,!0)},set(s,i){return Hl.call(this,s,i,!0)},delete:Zl,clear:ql,forEach:cs(!1,!0)},n={get(s){return is(this,s,!0)},get size(){return ls(this,!0)},has(s){return as.call(this,s,!0)},add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear"),forEach:cs(!0,!1)},r={get(s){return is(this,s,!0,!0)},get size(){return ls(this,!0)},has(s){return as.call(this,s,!0)},add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear"),forEach:cs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=us(s,!1,!1),n[s]=us(s,!0,!1),t[s]=us(s,!1,!0),r[s]=us(s,!0,!0)}),[e,n,t,r]}const[Qp,eh,th,nh]=Xp();function ds(e,t){const n=t?e?nh:th:e?eh:Qp;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ne(n,o)&&o in r?n:r,o,s)}const rh={get:ds(!1,!1)},oh={get:ds(!1,!0)},sh={get:ds(!0,!1)},ih={get:ds(!0,!0)};function Wl(e,t,n){const r=ge(n);if(r!==n&&t.call(e,r)){const o=bi(e);Zt(`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 zl=new WeakMap,Kl=new WeakMap,Gl=new WeakMap,Jl=new WeakMap;function ah(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lh(e){return e.__v_skip||!Object.isExtensible(e)?0:ah(bi(e))}function so(e){return cn(e)?e:fs(e,!1,Kp,rh,zl)}function ch(e){return fs(e,!1,Jp,oh,Kl)}function Yl(e){return fs(e,!0,Gp,sh,Gl)}function Wt(e){return fs(e,!0,Yp,ih,Jl)}function fs(e,t,n,r,o){if(!De(e))return ze.NODE_ENV!=="production"&&Zt(`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=lh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function ln(e){return cn(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function un(e){return!!(e&&e.__v_isShallow)}function ps(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function $n(e){return Object.isExtensible(e)&&ns(e,"__v_skip",!0),e}const io=e=>De(e)?so(e):e,Ii=e=>De(e)?Yl(e):e,uh="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class Xl{constructor(t,n,r,o){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Si(()=>t(this._value),()=>hs(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=ge(this);return(!t._cacheable||t.effect.dirty)&&Cn(t._value,t._value=t.effect.run())&&hs(t,4),Ql(t),t.effect._dirtyLevel>=2&&(ze.NODE_ENV!=="production"&&this._warnRecursive&&Zt(uh,`
6
+ **//*! #__NO_SIDE_EFFECTS__ */function rn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const Me=_l.NODE_ENV!=="production"?Object.freeze({}):{},$r=_l.NODE_ENV!=="production"?Object.freeze([]):[],We=()=>{},Op=()=>!1,no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qo=e=>e.startsWith("onUpdate:"),qe=Object.assign,yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Np=Object.prototype.hasOwnProperty,Ne=(e,t)=>Np.call(e,t),ie=Array.isArray,er=e=>es(e)==="[object Map]",bl=e=>es(e)==="[object Set]",pe=e=>typeof e=="function",Be=e=>typeof e=="string",kn=e=>typeof e=="symbol",De=e=>e!==null&&typeof e=="object",_i=e=>(De(e)||pe(e))&&pe(e.then)&&pe(e.catch),wl=Object.prototype.toString,es=e=>wl.call(e),bi=e=>es(e).slice(8,-1),El=e=>es(e)==="[object Object]",wi=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ro=rn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sp=rn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),ts=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},xp=/-(\w)/g,Ot=ts(e=>e.replace(xp,(t,n)=>n?n.toUpperCase():"")),kp=/\B([A-Z])/g,on=ts(e=>e.replace(kp,"-$1").toLowerCase()),tr=ts(e=>e.charAt(0).toUpperCase()+e.slice(1)),nr=ts(e=>e?`on${tr(e)}`:""),Cn=(e,t)=>!Object.is(e,t),oo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ns=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Cp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Tp=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Ol;const Ei=()=>Ol||(Ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Oi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Be(r)?Dp(r):Oi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Be(e)||De(e))return e}const Pp=/;(?![^(]*\))/g,$p=/:([^]+)/,Ip=/\/\*[^]*?\*\//g;function Dp(e){const t={};return e.replace(Ip,"").split(Pp).forEach(n=>{if(n){const r=n.split($p);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function rs(e){let t="";if(Be(e))t=e;else if(ie(e))for(let n=0;n<e.length;n++){const r=rs(e[n]);r&&(t+=r+" ")}else if(De(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ap="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",Vp="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",Rp="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",jp=rn(Ap),Lp=rn(Vp),Mp=rn(Rp),Up=rn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Nl(e){return!!e||e===""}const Sl=e=>!!(e&&e.__v_isRef===!0),K=e=>Be(e)?e:e==null?"":ie(e)||De(e)&&(e.toString===wl||!pe(e.toString))?Sl(e)?K(e.value):JSON.stringify(e,xl,2):String(e),xl=(e,t)=>Sl(t)?xl(e,t.value):er(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Ni(r,s)+" =>"]=o,n),{})}:bl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ni(n))}:kn(t)?Ni(t):De(t)&&!ie(t)&&!El(t)?String(t):t,Ni=(e,t="")=>{var n;return kn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var ze={};function Zt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Nt;class kl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Nt,!t&&Nt&&(this.index=(Nt.scopes||(Nt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Nt;try{return Nt=this,t()}finally{Nt=n}}else ze.NODE_ENV!=="production"&&Zt("cannot run an inactive effect scope.")}on(){Nt=this}off(){Nt=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 Cl(e){return new kl(e)}function Fp(e,t=Nt){t&&t.active&&t.effects.push(e)}function Tl(){return Nt}function Bp(e){Nt?Nt.cleanups.push(e):ze.NODE_ENV!=="production"&&Zt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let rr;class Si{constructor(t,n,r,o){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Fp(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,sn();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Hp(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),an()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Tn,n=rr;try{return Tn=!0,rr=this,this._runnings++,Pl(this),this.fn()}finally{$l(this),this._runnings--,rr=n,Tn=t}}stop(){this.active&&(Pl(this),$l(this),this.onStop&&this.onStop(),this.active=!1)}}function Hp(e){return e.value}function Pl(e){e._trackId++,e._depsLength=0}function $l(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Il(e.deps[t],e);e.deps.length=e._depsLength}}function Il(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Tn=!0,xi=0;const Dl=[];function sn(){Dl.push(Tn),Tn=!1}function an(){const e=Dl.pop();Tn=e===void 0?!0:e}function ki(){xi++}function Ci(){for(xi--;!xi&&Ti.length;)Ti.shift()()}function Al(e,t,n){var r;if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&Il(o,e),e.deps[e._depsLength++]=t):e._depsLength++,ze.NODE_ENV!=="production"&&((r=e.onTrack)==null||r.call(e,qe({effect:e},n)))}}const Ti=[];function Vl(e,t,n){var r;ki();for(const o of e.keys()){let s;o._dirtyLevel<t&&(s??(s=e.get(o)===o._trackId))&&(o._shouldSchedule||(o._shouldSchedule=o._dirtyLevel===0),o._dirtyLevel=t),o._shouldSchedule&&(s??(s=e.get(o)===o._trackId))&&(ze.NODE_ENV!=="production"&&((r=o.onTrigger)==null||r.call(o,qe({effect:o},n))),o.trigger(),(!o._runnings||o.allowRecurse)&&o._dirtyLevel!==2&&(o._shouldSchedule=!1,o.scheduler&&Ti.push(o.scheduler)))}Ci()}const Rl=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},os=new WeakMap,or=Symbol(ze.NODE_ENV!=="production"?"iterate":""),Pi=Symbol(ze.NODE_ENV!=="production"?"Map key iterate":"");function ot(e,t,n){if(Tn&&rr){let r=os.get(e);r||os.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Rl(()=>r.delete(n))),Al(rr,o,ze.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function qt(e,t,n,r,o,s){const i=os.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&ie(e)){const l=Number(r);i.forEach((c,u)=>{(u==="length"||!kn(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":ie(e)?wi(n)&&a.push(i.get("length")):(a.push(i.get(or)),er(e)&&a.push(i.get(Pi)));break;case"delete":ie(e)||(a.push(i.get(or)),er(e)&&a.push(i.get(Pi)));break;case"set":er(e)&&a.push(i.get(or));break}ki();for(const l of a)l&&Vl(l,4,ze.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0);Ci()}function Zp(e,t){const n=os.get(e);return n&&n.get(t)}const qp=rn("__proto__,__v_isRef,__isVue"),jl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kn)),Ll=Wp();function Wp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ge(this);for(let s=0,i=this.length;s<i;s++)ot(r,"get",s+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(ge)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){sn(),ki();const r=ge(this)[t].apply(this,n);return Ci(),an(),r}}),e}function zp(e){kn(e)||(e=String(e));const t=ge(this);return ot(t,"has",e),t.hasOwnProperty(e)}class Ml{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?Jl:Gl:s?Kl:zl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ie(t);if(!o){if(i&&Ne(Ll,n))return Reflect.get(Ll,n,r);if(n==="hasOwnProperty")return zp}const a=Reflect.get(t,n,r);return(kn(n)?jl.has(n):qp(n))||(o||ot(t,"get",n),s)?a:He(a)?i&&wi(n)?a:a.value:De(a)?o?Yl(a):so(a):a}}class Ul extends Ml{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=cn(s);if(!un(r)&&!cn(r)&&(s=ge(s),r=ge(r)),!ie(t)&&He(s)&&!He(r))return l?!1:(s.value=r,!0)}const i=ie(t)&&wi(n)?Number(n)<t.length:Ne(t,n),a=Reflect.set(t,n,r,o);return t===ge(o)&&(i?Cn(r,s)&&qt(t,"set",n,r,s):qt(t,"add",n,r)),a}deleteProperty(t,n){const r=Ne(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(!kn(n)||!jl.has(n))&&ot(t,"has",n),r}ownKeys(t){return ot(t,"iterate",ie(t)?"length":or),Reflect.ownKeys(t)}}class Fl extends Ml{constructor(t=!1){super(!0,t)}set(t,n){return ze.NODE_ENV!=="production"&&Zt(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return ze.NODE_ENV!=="production"&&Zt(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Kp=new Ul,Gp=new Fl,Jp=new Ul(!0),Yp=new Fl(!0),$i=e=>e,ss=e=>Reflect.getPrototypeOf(e);function is(e,t,n=!1,r=!1){e=e.__v_raw;const o=ge(e),s=ge(t);n||(Cn(t,s)&&ot(o,"get",t),ot(o,"get",s));const{has:i}=ss(o),a=r?$i:n?Ii:io;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 as(e,t=!1){const n=this.__v_raw,r=ge(n),o=ge(e);return t||(Cn(e,o)&&ot(r,"has",e),ot(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ls(e,t=!1){return e=e.__v_raw,!t&&ot(ge(e),"iterate",or),Reflect.get(e,"size",e)}function Bl(e,t=!1){!t&&!un(e)&&!cn(e)&&(e=ge(e));const n=ge(this);return ss(n).has.call(n,e)||(n.add(e),qt(n,"add",e,e)),this}function Hl(e,t,n=!1){!n&&!un(t)&&!cn(t)&&(t=ge(t));const r=ge(this),{has:o,get:s}=ss(r);let i=o.call(r,e);i?ze.NODE_ENV!=="production"&&Wl(r,o,e):(e=ge(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Cn(t,a)&&qt(r,"set",e,t,a):qt(r,"add",e,t),this}function Zl(e){const t=ge(this),{has:n,get:r}=ss(t);let o=n.call(t,e);o?ze.NODE_ENV!=="production"&&Wl(t,n,e):(e=ge(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 ql(){const e=ge(this),t=e.size!==0,n=ze.NODE_ENV!=="production"?er(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&qt(e,"clear",void 0,void 0,n),r}function cs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ge(i),l=t?$i:e?Ii:io;return!e&&ot(a,"iterate",or),i.forEach((c,u)=>r.call(o,l(c),l(u),s))}}function us(e,t,n){return function(...r){const o=this.__v_raw,s=ge(o),i=er(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,c=o[e](...r),u=n?$i:t?Ii:io;return!t&&ot(s,"iterate",l?Pi:or),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function Pn(e){return function(...t){if(ze.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Zt(`${tr(e)} operation ${n}failed: target is readonly.`,ge(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Xp(){const e={get(s){return is(this,s)},get size(){return ls(this)},has:as,add:Bl,set:Hl,delete:Zl,clear:ql,forEach:cs(!1,!1)},t={get(s){return is(this,s,!1,!0)},get size(){return ls(this)},has:as,add(s){return Bl.call(this,s,!0)},set(s,i){return Hl.call(this,s,i,!0)},delete:Zl,clear:ql,forEach:cs(!1,!0)},n={get(s){return is(this,s,!0)},get size(){return ls(this,!0)},has(s){return as.call(this,s,!0)},add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear"),forEach:cs(!0,!1)},r={get(s){return is(this,s,!0,!0)},get size(){return ls(this,!0)},has(s){return as.call(this,s,!0)},add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear"),forEach:cs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=us(s,!1,!1),n[s]=us(s,!0,!1),t[s]=us(s,!1,!0),r[s]=us(s,!0,!0)}),[e,n,t,r]}const[Qp,eh,th,nh]=Xp();function ds(e,t){const n=t?e?nh:th:e?eh:Qp;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ne(n,o)&&o in r?n:r,o,s)}const rh={get:ds(!1,!1)},oh={get:ds(!1,!0)},sh={get:ds(!0,!1)},ih={get:ds(!0,!0)};function Wl(e,t,n){const r=ge(n);if(r!==n&&t.call(e,r)){const o=bi(e);Zt(`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 zl=new WeakMap,Kl=new WeakMap,Gl=new WeakMap,Jl=new WeakMap;function ah(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lh(e){return e.__v_skip||!Object.isExtensible(e)?0:ah(bi(e))}function so(e){return cn(e)?e:fs(e,!1,Kp,rh,zl)}function ch(e){return fs(e,!1,Jp,oh,Kl)}function Yl(e){return fs(e,!0,Gp,sh,Gl)}function Wt(e){return fs(e,!0,Yp,ih,Jl)}function fs(e,t,n,r,o){if(!De(e))return ze.NODE_ENV!=="production"&&Zt(`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=lh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function ln(e){return cn(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function un(e){return!!(e&&e.__v_isShallow)}function ps(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function $n(e){return Object.isExtensible(e)&&ns(e,"__v_skip",!0),e}const io=e=>De(e)?so(e):e,Ii=e=>De(e)?Yl(e):e,uh="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class Xl{constructor(t,n,r,o){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Si(()=>t(this._value),()=>hs(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=ge(this);return(!t._cacheable||t.effect.dirty)&&Cn(t._value,t._value=t.effect.run())&&hs(t,4),Ql(t),t.effect._dirtyLevel>=2&&(ze.NODE_ENV!=="production"&&this._warnRecursive&&Zt(uh,`
7
7
 
8
- getter: `,this.getter),hs(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function dh(e,t,n=!1){let r,o;const s=fe(e);s?(r=e,o=ze.NODE_ENV!=="production"?()=>{Zt("Write operation failed: computed value is readonly")}:We):(r=e.get,o=e.set);const i=new Xl(r,o,s||!o,n);return ze.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function Ql(e){var t;Tn&&rr&&(e=ge(e),Al(rr,(t=e.dep)!=null?t:e.dep=Rl(()=>e.dep=void 0,e instanceof Xl?e:void 0),ze.NODE_ENV!=="production"?{target:e,type:"get",key:"value"}:void 0))}function hs(e,t=4,n,r){e=ge(e);const o=e.dep;o&&Vl(o,t,ze.NODE_ENV!=="production"?{target:e,type:"set",key:"value",newValue:n,oldValue:r}:void 0)}function He(e){return!!(e&&e.__v_isRef===!0)}function T(e){return ec(e,!1)}function fh(e){return ec(e,!0)}function ec(e,t){return He(e)?e:new ph(e,t)}class ph{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ge(t),this._value=n?t:io(t)}get value(){return Ql(this),this._value}set value(t){const n=this.__v_isShallow||un(t)||cn(t);if(t=n?t:ge(t),Cn(t,this._rawValue)){const r=this._rawValue;this._rawValue=t,this._value=n?t:io(t),hs(this,4,t,r)}}}function b(e){return He(e)?e.value:e}function hh(e){return fe(e)?e():b(e)}const mh={get:(e,t,n)=>b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return He(o)&&!He(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function tc(e){return ln(e)?e:new Proxy(e,mh)}function nc(e){ze.NODE_ENV!=="production"&&!ps(e)&&Zt("toRefs() expects a reactive object but received a plain one.");const t=ie(e)?new Array(e.length):{};for(const n in e)t[n]=rc(e,n);return t}class vh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Zp(ge(this._object),this._key)}}class gh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Di(e,t,n){return He(e)?e:fe(e)?new gh(e):De(e)&&arguments.length>1?rc(e,t,n):T(e)}function rc(e,t,n){const r=e[t];return He(r)?r:new vh(e,t,n)}var g={};const sr=[];function ms(e){sr.push(e)}function vs(){sr.pop()}let Ai=!1;function U(e,...t){if(Ai)return;Ai=!0,sn();const n=sr.length?sr[sr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=yh();if(r)dn(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 <${Vs(n,s.type)}>`).join(`
8
+ getter: `,this.getter),hs(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function dh(e,t,n=!1){let r,o;const s=pe(e);s?(r=e,o=ze.NODE_ENV!=="production"?()=>{Zt("Write operation failed: computed value is readonly")}:We):(r=e.get,o=e.set);const i=new Xl(r,o,s||!o,n);return ze.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function Ql(e){var t;Tn&&rr&&(e=ge(e),Al(rr,(t=e.dep)!=null?t:e.dep=Rl(()=>e.dep=void 0,e instanceof Xl?e:void 0),ze.NODE_ENV!=="production"?{target:e,type:"get",key:"value"}:void 0))}function hs(e,t=4,n,r){e=ge(e);const o=e.dep;o&&Vl(o,t,ze.NODE_ENV!=="production"?{target:e,type:"set",key:"value",newValue:n,oldValue:r}:void 0)}function He(e){return!!(e&&e.__v_isRef===!0)}function T(e){return ec(e,!1)}function fh(e){return ec(e,!0)}function ec(e,t){return He(e)?e:new ph(e,t)}class ph{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ge(t),this._value=n?t:io(t)}get value(){return Ql(this),this._value}set value(t){const n=this.__v_isShallow||un(t)||cn(t);if(t=n?t:ge(t),Cn(t,this._rawValue)){const r=this._rawValue;this._rawValue=t,this._value=n?t:io(t),hs(this,4,t,r)}}}function b(e){return He(e)?e.value:e}function hh(e){return pe(e)?e():b(e)}const mh={get:(e,t,n)=>b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return He(o)&&!He(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function tc(e){return ln(e)?e:new Proxy(e,mh)}function nc(e){ze.NODE_ENV!=="production"&&!ps(e)&&Zt("toRefs() expects a reactive object but received a plain one.");const t=ie(e)?new Array(e.length):{};for(const n in e)t[n]=rc(e,n);return t}class vh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Zp(ge(this._object),this._key)}}class gh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Di(e,t,n){return He(e)?e:pe(e)?new gh(e):De(e)&&arguments.length>1?rc(e,t,n):T(e)}function rc(e,t,n){const r=e[t];return He(r)?r:new vh(e,t,n)}var g={};const sr=[];function ms(e){sr.push(e)}function vs(){sr.pop()}let Ai=!1;function U(e,...t){if(Ai)return;Ai=!0,sn();const n=sr.length?sr[sr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=yh();if(r)dn(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 <${Vs(n,s.type)}>`).join(`
9
9
  `),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
10
10
  `,..._h(o)),console.warn(...s)}an(),Ai=!1}function yh(){let e=sr[sr.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 _h(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
11
- `],...bh(n))}),t}function bh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Vs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...wh(e.props),s]:[o+s]}function wh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...oc(r,e[r]))}),n.length>3&&t.push(" ..."),t}function oc(e,t,n){return Be(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:He(t)?(t=oc(e,ge(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ge(t),n?t:[`${e}=`,t])}function Eh(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?U(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&U(`${t} is NaN - the duration expression might be incorrect.`))}const Vi={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"};function dn(e,t,n,r){try{return r?e(...r):e()}catch(o){ao(o,t,n)}}function kt(e,t,n,r){if(fe(e)){const o=dn(e,t,n,r);return o&&_i(o)&&o.catch(s=>{ao(s,t,n)}),o}if(ie(e)){const o=[];for(let s=0;s<e.length;s++)o.push(kt(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function ao(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,a=g.NODE_ENV!=="production"?Vi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const l=s.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](e,i,a)===!1)return}s=s.parent}const c=t.appContext.config.errorHandler;if(c){sn(),dn(c,null,10,[e,i,a]),an();return}}Oh(e,n,o,r)}function Oh(e,t,n,r=!0){if(g.NODE_ENV!=="production"){const o=Vi[t];if(n&&ms(n),U(`Unhandled error${o?` during execution of ${o}`:""}`),n&&vs(),r)throw e;console.error(e)}else console.error(e)}let lo=!1,Ri=!1;const ut=[];let zt=0;const Ir=[];let In=null,ir=0;const sc=Promise.resolve();let ji=null;const Nh=100;function co(e){const t=ji||sc;return e?t.then(this?e.bind(this):e):t}function Sh(e){let t=zt+1,n=ut.length;for(;t<n;){const r=t+n>>>1,o=ut[r],s=uo(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}function gs(e){(!ut.length||!ut.includes(e,lo&&e.allowRecurse?zt+1:zt))&&(e.id==null?ut.push(e):ut.splice(Sh(e.id),0,e),ic())}function ic(){!lo&&!Ri&&(Ri=!0,ji=sc.then(uc))}function xh(e){const t=ut.indexOf(e);t>zt&&ut.splice(t,1)}function ac(e){ie(e)?Ir.push(...e):(!In||!In.includes(e,e.allowRecurse?ir+1:ir))&&Ir.push(e),ic()}function lc(e,t,n=lo?zt+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<ut.length;n++){const r=ut[n];if(r&&r.pre){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&Li(t,r))continue;ut.splice(n,1),n--,r()}}}function cc(e){if(Ir.length){const t=[...new Set(Ir)].sort((n,r)=>uo(n)-uo(r));if(Ir.length=0,In){In.push(...t);return}for(In=t,g.NODE_ENV!=="production"&&(e=e||new Map),ir=0;ir<In.length;ir++){const n=In[ir];g.NODE_ENV!=="production"&&Li(e,n)||n.active!==!1&&n()}In=null,ir=0}}const uo=e=>e.id==null?1/0:e.id,kh=(e,t)=>{const n=uo(e)-uo(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function uc(e){Ri=!1,lo=!0,g.NODE_ENV!=="production"&&(e=e||new Map),ut.sort(kh);const t=g.NODE_ENV!=="production"?n=>Li(e,n):We;try{for(zt=0;zt<ut.length;zt++){const n=ut[zt];if(n&&n.active!==!1){if(g.NODE_ENV!=="production"&&t(n))continue;dn(n,n.i,n.i?15:14)}}}finally{zt=0,ut.length=0,cc(e),lo=!1,ji=null,(ut.length||Ir.length)&&uc(e)}}function Li(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>Nh){const r=t.i,o=r&&ma(r.type);return ao(`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 Dn=!1;const ys=new Map;g.NODE_ENV!=="production"&&(Ei().__VUE_HMR_RUNTIME__={createRecord:Mi(dc),rerender:Mi(Ph),reload:Mi($h)});const ar=new Map;function Ch(e){const t=e.type.__hmrId;let n=ar.get(t);n||(dc(t,e.type),n=ar.get(t)),n.instances.add(e)}function Th(e){ar.get(e.type.__hmrId).instances.delete(e)}function dc(e,t){return ar.has(e)?!1:(ar.set(e,{initialDef:_s(t),instances:new Set}),!0)}function _s(e){return pu(e)?e.__vccOpts:e}function Ph(e,t){const n=ar.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,_s(r.type).render=t),r.renderCache=[],Dn=!0,r.effect.dirty=!0,r.update(),Dn=!1}))}function $h(e,t){const n=ar.get(e);if(!n)return;t=_s(t),fc(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=_s(s.type);let a=ys.get(i);a||(i!==n.initialDef&&fc(i,t),ys.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?(s.parent.effect.dirty=!0,gs(()=>{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.")}ac(()=>{ys.clear()})}function fc(e,t){qe(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Mi(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 Kt,fo=[],Ui=!1;function po(e,...t){Kt?Kt.emit(e,...t):Ui||fo.push({event:e,args:t})}function pc(e,t){var n,r;Kt=e,Kt?(Kt.enabled=!0,fo.forEach(({event:o,args:s})=>Kt.emit(o,...s)),fo=[]):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=>{pc(s,t)}),setTimeout(()=>{Kt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ui=!0,fo=[])},3e3)):(Ui=!0,fo=[])}function Ih(e,t){po("app:init",e,t,{Fragment:Ce,Text:_o,Comment:Ke,Static:bo})}function Dh(e){po("app:unmount",e)}const Ah=Fi("component:added"),hc=Fi("component:updated"),Vh=Fi("component:removed"),Rh=e=>{Kt&&typeof Kt.cleanupBuffer=="function"&&!Kt.cleanupBuffer(e)&&Vh(e)};/*! #__NO_SIDE_EFFECTS__ */function Fi(e){return t=>{po(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const jh=mc("perf:start"),Lh=mc("perf:end");function mc(e){return(t,n,r)=>{po(e,t.appContext.app,t.uid,t,n,r)}}function Mh(e,t,n){po("component:emit",e.appContext.app,e,t,n)}let Ye=null,bs=null;function ws(e){const t=Ye;return Ye=e,bs=e&&e.type.__scopeId||null,t}function Uh(e){bs=e}function Fh(){bs=null}function ye(e,t=Ye,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ru(-1);const s=ws(t);let i;try{i=e(...o)}finally{ws(s),r._d&&ru(1)}return g.NODE_ENV!=="production"&&hc(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function vc(e){Sp(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function lr(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 c=a.dir[r];c&&(sn(),kt(c,n,8,[e.el,a,e,t]),an())}}const An=Symbol("_leaveCb"),Es=Symbol("_enterCb");function Bh(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Re(()=>{e.isMounted=!0}),Zi(()=>{e.isUnmounting=!0}),e}const Ct=[Function,Array],gc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ct,onEnter:Ct,onAfterEnter:Ct,onEnterCancelled:Ct,onBeforeLeave:Ct,onLeave:Ct,onAfterLeave:Ct,onLeaveCancelled:Ct,onBeforeAppear:Ct,onAppear:Ct,onAfterAppear:Ct,onAppearCancelled:Ct},yc=e=>{const t=e.subTree;return t.component?yc(t.component):t},Hh={name:"BaseTransition",props:gc,setup(e,{slots:t}){const n=Is(),r=Bh();return()=>{const o=t.default&&wc(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){let f=!1;for(const m of o)if(m.type!==Ke){if(g.NODE_ENV!=="production"&&f){U("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(s=m,f=!0,g.NODE_ENV==="production")break}}const i=ge(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&U(`invalid <transition> mode: ${a}`),r.isLeaving)return Hi(s);const c=bc(s);if(!c)return Hi(s);let l=Bi(c,i,r,n,f=>l=f);Os(c,l);const u=n.subTree,d=u&&bc(u);if(d&&d.type!==Ke&&!hr(c,d)&&yc(n).type!==Ke){const f=Bi(d,i,r,n);if(Os(d,f),a==="out-in"&&c.type!==Ke)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Hi(s);a==="in-out"&&c.type!==Ke&&(f.delayLeave=(m,y,E)=>{const S=_c(r,d);S[String(d.key)]=d,m[An]=()=>{y(),m[An]=void 0,delete l.delayedLeave},l.delayedLeave=E})}return s}}};function _c(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 Bi(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:y,onLeaveCancelled:E,onBeforeAppear:S,onAppear:A,onAfterAppear:F,onAppearCancelled:C}=t,z=String(e.key),$=_c(n,e),Z=(Y,V)=>{Y&&kt(Y,r,9,V)},x=(Y,V)=>{const P=V[1];Z(Y,V),ie(Y)?Y.every(j=>j.length<=1)&&P():Y.length<=1&&P()},de={mode:i,persisted:a,beforeEnter(Y){let V=c;if(!n.isMounted)if(s)V=S||c;else return;Y[An]&&Y[An](!0);const P=$[z];P&&hr(e,P)&&P.el[An]&&P.el[An](),Z(V,[Y])},enter(Y){let V=l,P=u,j=d;if(!n.isMounted)if(s)V=A||l,P=F||u,j=C||d;else return;let oe=!1;const w=Y[Es]=I=>{oe||(oe=!0,I?Z(j,[Y]):Z(P,[Y]),de.delayedLeave&&de.delayedLeave(),Y[Es]=void 0)};V?x(V,[Y,w]):w()},leave(Y,V){const P=String(e.key);if(Y[Es]&&Y[Es](!0),n.isUnmounting)return V();Z(f,[Y]);let j=!1;const oe=Y[An]=w=>{j||(j=!0,V(),w?Z(E,[Y]):Z(y,[Y]),Y[An]=void 0,$[P]===e&&delete $[P])};$[P]=e,m?x(m,[Y,oe]):oe()},clone(Y){const V=Bi(Y,t,n,r,o);return o&&o(V),V}};return de}function Hi(e){if(mo(e))return e=Rt(e),e.children=null,e}function bc(e){if(!mo(e))return 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&&fe(n.default))return n.default()}}function Os(e,t){e.shapeFlag&6&&e.component?Os(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 wc(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===Ce?(i.patchFlag&128&&o++,r=r.concat(wc(i.children,t,a))):(t||i.type!==Ke)&&r.push(a!=null?Rt(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 he(e,t){return fe(e)?qe({name:e.name},t,{setup:e}):e}const ho=e=>!!e.type.__asyncLoader,mo=e=>e.type.__isKeepAlive;function Zh(e,t){Ec(e,"a",t)}function qh(e,t){Ec(e,"da",t)}function Ec(e,t,n=Ge){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ns(t,r,n),n){let o=n.parent;for(;o&&o.parent;)mo(o.parent.vnode)&&Wh(r,t,n,o),o=o.parent}}function Wh(e,t,n,r){const o=Ns(t,e,r,!0);mt(()=>{yi(r[t],o)},n)}function Ns(e,t,n=Ge,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{sn();const a=Oo(n),c=kt(t,n,e,i);return a(),an(),c});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=nr(Vi[e].replace(/ hook$/,""));U(`${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 fn=e=>(t,n=Ge)=>{(!As||e==="sp")&&Ns(e,(...r)=>t(...r),n)},zh=fn("bm"),Re=fn("m"),Kh=fn("bu"),Gh=fn("u"),Zi=fn("bum"),mt=fn("um"),Jh=fn("sp"),Yh=fn("rtg"),Xh=fn("rtc");function Qh(e,t=Ge){Ns("ec",e,t)}const em="components",Oc=Symbol.for("v-ndc");function qi(e){return Be(e)?tm(em,e,!1)||e:e||Oc}function tm(e,t,n=!0,r=!1){const o=Ye||Ge;if(o){const s=o.type;{const a=ma(s,!1);if(a&&(a===t||a===Et(t)||a===tr(Et(t))))return s}const i=Nc(o[e]||s[e],t)||Nc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&U(`Failed to resolve ${e.slice(0,-1)}: ${t}
12
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&U(`resolve${tr(e.slice(0,-1))} can only be used in render() or setup().`)}function Nc(e,t){return e&&(e[t]||e[Et(t)]||e[tr(Et(t))])}function Gt(e,t,n,r){let o;const s=n;if(ie(e)||Be(e)){o=new Array(e.length);for(let i=0,a=e.length;i<a;i++)o[i]=t(e[i],i,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&U(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,s)}else if(De(e))if(e[Symbol.iterator])o=Array.from(e,(i,a)=>t(i,a,void 0,s));else{const i=Object.keys(e);o=new Array(i.length);for(let a=0,c=i.length;a<c;a++){const l=i[a];o[a]=t(e[l],l,a,s)}}else o=[];return o}function Wi(e,t,n={},r,o){if(Ye.isCE||Ye.parent&&ho(Ye.parent)&&Ye.parent.isCE)return B("slot",n,r);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(U("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),_();const i=s&&Sc(s(n)),a=xe(Ce,{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 Sc(e){return e.some(t=>Dr(t)?!(t.type===Ke||t.type===Ce&&!Sc(t.children)):!0)?e:null}const zi=e=>e?cu(e)?ha(e):zi(e.parent):null,cr=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?Wt(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?Wt(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?Wt(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?Wt(e.refs):e.refs,$parent:e=>zi(e.parent),$root:e=>zi(e.root),$emit:e=>e.emit,$options:e=>Yi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,gs(e.update)}),$nextTick:e=>e.n||(e.n=co.bind(e.proxy)),$watch:e=>Lm.bind(e)}),Ki=e=>e==="_"||e==="$",Gi=(e,t)=>e!==Me&&!e.__isScriptSetup&&Ne(e,t),xc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:c}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let l;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(Gi(r,t))return i[t]=1,r[t];if(o!==Me&&Ne(o,t))return i[t]=2,o[t];if((l=e.propsOptions[0])&&Ne(l,t))return i[t]=3,s[t];if(n!==Me&&Ne(n,t))return i[t]=4,n[t];Ji&&(i[t]=0)}}const u=cr[t];let d,f;if(u)return t==="$attrs"?(ot(e.attrs,"get",""),g.NODE_ENV!=="production"&&Ps()):g.NODE_ENV!=="production"&&t==="$slots"&&ot(e,"get",t),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Me&&Ne(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,Ne(f,t))return f[t];g.NODE_ENV!=="production"&&Ye&&(!Be(t)||t.indexOf("__v")!==0)&&(o!==Me&&Ki(t[0])&&Ne(o,t)?U(`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===Ye&&U(`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 Gi(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&Ne(o,t)?(U(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Me&&Ne(r,t)?(r[t]=n,!0):Ne(e.props,t)?(g.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&U(`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!==Me&&Ne(e,i)||Gi(t,i)||(a=s[0])&&Ne(a,i)||Ne(r,i)||Ne(cr,i)||Ne(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(xc.ownKeys=e=>(U("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 nm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(cr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>cr[n](e),set:We})}),t}function rm(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:We})})}function om(e){const{ctx:t,setupState:n}=e;Object.keys(ge(n)).forEach(r=>{if(!n.__isScriptSetup){if(Ki(r[0])){U(`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:We})}})}function kc(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function sm(){const e=Object.create(null);return(t,n)=>{e[n]?U(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Ji=!0;function im(e){const t=Yi(e),n=e.proxy,r=e.ctx;Ji=!1,t.beforeCreate&&Cc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:y,activated:E,deactivated:S,beforeDestroy:A,beforeUnmount:F,destroyed:C,unmounted:z,render:$,renderTracked:Z,renderTriggered:x,errorCaptured:de,serverPrefetch:Y,expose:V,inheritAttrs:P,components:j,directives:oe,filters:w}=t,I=g.NODE_ENV!=="production"?sm():null;if(g.NODE_ENV!=="production"){const[ae]=e.propsOptions;if(ae)for(const re in ae)I("Props",re)}if(l&&am(l,r,I),i)for(const ae in i){const re=i[ae];fe(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,ae,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[ae]=re.bind(n),g.NODE_ENV!=="production"&&I("Methods",ae)):g.NODE_ENV!=="production"&&U(`Method "${ae}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!fe(o)&&U("The data option must be a function. Plain object usage is no longer supported.");const ae=o.call(n,n);if(g.NODE_ENV!=="production"&&_i(ae)&&U("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!De(ae))g.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=so(ae),g.NODE_ENV!=="production")for(const re in ae)I("Data",re),Ki(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>ae[re],set:We})}if(Ji=!0,s)for(const ae in s){const re=s[ae],ce=fe(re)?re.bind(n,n):fe(re.get)?re.get.bind(n,n):We;g.NODE_ENV!=="production"&&ce===We&&U(`Computed property "${ae}" has no getter.`);const Ie=!fe(re)&&fe(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${ae}" is readonly.`)}:We,je=X({get:ce,set:Ie});Object.defineProperty(r,ae,{enumerable:!0,configurable:!0,get:()=>je.value,set:nt=>je.value=nt}),g.NODE_ENV!=="production"&&I("Computed",ae)}if(a)for(const ae in a)Tc(a[ae],r,n,ae);if(c){const ae=fe(c)?c.call(n):c;Reflect.ownKeys(ae).forEach(re=>{dt(re,ae[re])})}u&&Cc(u,e,"c");function ne(ae,re){ie(re)?re.forEach(ce=>ae(ce.bind(n))):re&&ae(re.bind(n))}if(ne(zh,d),ne(Re,f),ne(Kh,m),ne(Gh,y),ne(Zh,E),ne(qh,S),ne(Qh,de),ne(Xh,Z),ne(Yh,x),ne(Zi,F),ne(mt,z),ne(Jh,Y),ie(V))if(V.length){const ae=e.exposed||(e.exposed={});V.forEach(re=>{Object.defineProperty(ae,re,{get:()=>n[re],set:ce=>n[re]=ce})})}else e.exposed||(e.exposed={});$&&e.render===We&&(e.render=$),P!=null&&(e.inheritAttrs=P),j&&(e.components=j),oe&&(e.directives=oe)}function am(e,t,n=We){ie(e)&&(e=Xi(e));for(const r in e){const o=e[r];let s;De(o)?"default"in o?s=$e(o.from||r,o.default,!0):s=$e(o.from||r):s=$e(o),He(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 Cc(e,t,n){kt(ie(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Tc(e,t,n,r){const o=r.includes(".")?Xc(n,r):()=>n[r];if(Be(e)){const s=t[e];fe(s)?Xe(o,s):g.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e}"`,s)}else if(fe(e))Xe(o,e.bind(n));else if(De(e))if(ie(e))e.forEach(s=>Tc(s,t,n,r));else{const s=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(s)?Xe(o,s,e):g.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&U(`Invalid watch option: "${r}"`,e)}function Yi(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let c;return a?c=a:!o.length&&!n&&!r?c=t:(c={},o.length&&o.forEach(l=>Ss(c,l,i,!0)),Ss(c,t,i)),De(t)&&s.set(t,c),c}function Ss(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Ss(e,s,n,!0),o&&o.forEach(i=>Ss(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&U('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=lm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const lm={data:Pc,props:$c,emits:$c,methods:vo,computed:vo,beforeCreate:vt,created:vt,beforeMount:vt,mounted:vt,beforeUpdate:vt,updated:vt,beforeDestroy:vt,beforeUnmount:vt,destroyed:vt,unmounted:vt,activated:vt,deactivated:vt,errorCaptured:vt,serverPrefetch:vt,components:vo,directives:vo,watch:um,provide:Pc,inject:cm};function Pc(e,t){return t?e?function(){return qe(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function cm(e,t){return vo(Xi(e),Xi(t))}function Xi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function vt(e,t){return e?[...new Set([].concat(e,t))]:t}function vo(e,t){return e?qe(Object.create(null),e,t):t}function $c(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:qe(Object.create(null),kc(e),kc(t??{})):t}function um(e,t){if(!e)return t;if(!t)return e;const n=qe(Object.create(null),e);for(const r in t)n[r]=vt(e[r],t[r]);return n}function Ic(){return{app:null,config:{isNativeTag:Op,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 dm=0;function fm(e,t){return function(r,o=null){fe(r)||(r=qe({},r)),o!=null&&!De(o)&&(g.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),o=null);const s=Ic(),i=new WeakSet;let a=!1;const c=s.app={_uid:dm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:hu,get config(){return s.config},set config(l){g.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(l,...u){return i.has(l)?g.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):l&&fe(l.install)?(i.add(l),l.install(c,...u)):fe(l)?(i.add(l),l(c,...u)):g.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),c},mixin(l){return s.mixins.includes(l)?g.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(l.name?`: ${l.name}`:"")):s.mixins.push(l),c},component(l,u){return g.NODE_ENV!=="production"&&fa(l,s.config),u?(g.NODE_ENV!=="production"&&s.components[l]&&U(`Component "${l}" has already been registered in target app.`),s.components[l]=u,c):s.components[l]},directive(l,u){return g.NODE_ENV!=="production"&&vc(l),u?(g.NODE_ENV!=="production"&&s.directives[l]&&U(`Directive "${l}" has already been registered in target app.`),s.directives[l]=u,c):s.directives[l]},mount(l,u,d){if(a)g.NODE_ENV!=="production"&&U("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"&&l.__vue_app__&&U("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 f=B(r,o);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Rt(f),l,d)}),u&&t?t(f,l):e(f,l,d),a=!0,c._container=l,l.__vue_app__=c,g.NODE_ENV!=="production"&&(c._instance=f.component,Ih(c,hu)),ha(f.component)}},unmount(){a?(e(null,c._container),g.NODE_ENV!=="production"&&(c._instance=null,Dh(c)),delete c._container.__vue_app__):g.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(l,u){return g.NODE_ENV!=="production"&&l in s.provides&&U(`App already provides property with key "${String(l)}". It will be overwritten with the new value.`),s.provides[l]=u,c},runWithContext(l){const u=ur;ur=c;try{return l()}finally{ur=u}}};return c}}let ur=null;function dt(e,t){if(!Ge)g.NODE_ENV!=="production"&&U("provide() can only be used inside setup().");else{let n=Ge.provides;const r=Ge.parent&&Ge.parent.provides;r===n&&(n=Ge.provides=Object.create(r)),n[e]=t}}function $e(e,t,n=!1){const r=Ge||Ye;if(r||ur){const o=ur?ur._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&&fe(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&U(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}function pm(){return!!(Ge||Ye||ur)}const Dc={},Ac=()=>Object.create(Dc),Vc=e=>Object.getPrototypeOf(e)===Dc;function hm(e,t,n,r=!1){const o={},s=Ac();e.propsDefaults=Object.create(null),Rc(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Mc(t||{},o,e),n?e.props=r?o:ch(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function mm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ge(o),[c]=e.propsOptions;let l=!1;if(!(g.NODE_ENV!=="production"&&mm(e))&&(r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(Ts(e.emitsOptions,f))continue;const m=t[f];if(c)if(Ne(s,f))m!==s[f]&&(s[f]=m,l=!0);else{const y=Et(f);o[y]=Qi(c,a,y,m,e,!1)}else m!==s[f]&&(s[f]=m,l=!0)}}}else{Rc(e,t,o,s)&&(l=!0);let u;for(const d in a)(!t||!Ne(t,d)&&((u=on(d))===d||!Ne(t,u)))&&(c?n&&(n[d]!==void 0||n[u]!==void 0)&&(o[d]=Qi(c,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Ne(t,d))&&(delete s[d],l=!0)}l&&qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&Mc(t||{},o,e)}function Rc(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(ro(c))continue;const l=t[c];let u;o&&Ne(o,u=Et(c))?!s||!s.includes(u)?n[u]=l:(a||(a={}))[u]=l:Ts(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,i=!0)}if(s){const c=ge(n),l=a||Me;for(let u=0;u<s.length;u++){const d=s[u];n[d]=Qi(o,c,d,l[d],e,!Ne(l,d))}}return i}function Qi(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Ne(i,"default");if(a&&r===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&fe(c)){const{propsDefaults:l}=o;if(n in l)r=l[n];else{const u=Oo(o);r=l[n]=c.call(null,t),u()}}else r=c}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===on(n))&&(r=!0))}return r}const gm=new WeakMap;function jc(e,t,n=!1){const r=n?gm:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let c=!1;if(!fe(e)){const u=d=>{c=!0;const[f,m]=jc(d,t,!0);qe(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!c)return De(e)&&r.set(e,$r),$r;if(ie(s))for(let u=0;u<s.length;u++){g.NODE_ENV!=="production"&&!Be(s[u])&&U("props must be strings when using array syntax.",s[u]);const d=Et(s[u]);Lc(d)&&(i[d]=Me)}else if(s){g.NODE_ENV!=="production"&&!De(s)&&U("invalid props options",s);for(const u in s){const d=Et(u);if(Lc(d)){const f=s[u],m=i[d]=ie(f)||fe(f)?{type:f}:qe({},f),y=m.type;let E=!1,S=!0;if(ie(y))for(let A=0;A<y.length;++A){const F=y[A],C=fe(F)&&F.name;if(C==="Boolean"){E=!0;break}else C==="String"&&(S=!1)}else E=fe(y)&&y.name==="Boolean";m[0]=E,m[1]=S,(E||Ne(m,"default"))&&a.push(d)}}}const l=[i,a];return De(e)&&r.set(e,l),l}function Lc(e){return e[0]!=="$"&&!ro(e)?!0:(g.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function ym(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Mc(e,t,n){const r=ge(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&_m(s,r[s],i,g.NODE_ENV!=="production"?Wt(r):r,!Ne(e,s)&&!Ne(e,on(s)))}}function _m(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:c}=n;if(i&&o){U('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!c){let l=!1;const u=ie(s)?s:[s],d=[];for(let f=0;f<u.length&&!l;f++){const{valid:m,expectedType:y}=wm(t,u[f]);d.push(y||""),l=m}if(!l){U(Em(e,t,d));return}}a&&!a(t,r)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const bm=rn("String,Number,Boolean,Function,Symbol,BigInt");function wm(e,t){let n;const r=ym(t);if(bm(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=De(e):r==="Array"?n=ie(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function Em(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(tr).join(" | ")}`;const o=n[0],s=bi(t),i=Uc(t,o),a=Uc(t,s);return n.length===1&&Fc(o)&&!Om(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Fc(s)&&(r+=`with value ${a}.`),r}function Uc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Fc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Om(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Bc=e=>e[0]==="_"||e==="$stable",ea=e=>ie(e)?e.map(jt):[jt(e)],Nm=(e,t,n)=>{if(t._n)return t;const r=ye((...o)=>(g.NODE_ENV!=="production"&&Ge&&(!n||n.root===Ge.root)&&U(`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},Hc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Bc(o))continue;const s=e[o];if(fe(s))t[o]=Nm(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=ea(s);t[o]=()=>i}}},Zc=(e,t)=>{g.NODE_ENV!=="production"&&!mo(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=ea(t);e.slots.default=()=>n},ta=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Sm=(e,t,n)=>{const r=e.slots=Ac();if(e.vnode.shapeFlag&32){const o=t._;o?(ta(r,t,n),n&&ns(r,"_",o,!0)):Hc(t,r)}else t&&Zc(e,t)},xm=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Me;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Dn?(ta(o,t,n),qt(e,"set","$slots")):n&&a===1?s=!1:ta(o,t,n):(s=!t.$stable,Hc(t,o)),i=t}else t&&(Zc(e,t),i={default:1});if(s)for(const a in o)!Bc(a)&&i[a]==null&&delete o[a]};function na(e,t,n,r,o=!1){if(ie(e)){e.forEach((f,m)=>na(f,t&&(ie(t)?t[m]:t),n,r,o));return}if(ho(r)&&!o)return;const s=r.shapeFlag&4?ha(r.component):r.el,i=o?null:s,{i:a,r:c}=e;if(g.NODE_ENV!=="production"&&!a){U("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const l=t&&t.r,u=a.refs===Me?a.refs={}:a.refs,d=a.setupState;if(l!=null&&l!==c&&(Be(l)?(u[l]=null,Ne(d,l)&&(d[l]=null)):He(l)&&(l.value=null)),fe(c))dn(c,a,12,[i,u]);else{const f=Be(c),m=He(c);if(f||m){const y=()=>{if(e.f){const E=f?Ne(d,c)?d[c]:u[c]:c.value;o?ie(E)&&yi(E,s):ie(E)?E.includes(s)||E.push(s):f?(u[c]=[s],Ne(d,c)&&(d[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else f?(u[c]=i,Ne(d,c)&&(d[c]=i)):m?(c.value=i,e.k&&(u[e.k]=i)):g.NODE_ENV!=="production"&&U("Invalid template ref type:",c,`(${typeof c})`)};i?(y.id=-1,_t(y,n)):y()}else g.NODE_ENV!=="production"&&U("Invalid template ref type:",c,`(${typeof c})`)}}const qc=Symbol("_vte"),km=e=>e.__isTeleport,dr=e=>e&&(e.disabled||e.disabled===""),Wc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,zc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ra=(e,t)=>{const n=e&&e.to;if(Be(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!dr(e)&&U(`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"&&U("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!dr(e)&&U(`Invalid Teleport target: ${n}`),n},Cm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,c,l){const{mc:u,pc:d,pbc:f,o:{insert:m,querySelector:y,createText:E,createComment:S}}=l,A=dr(t.props);let{shapeFlag:F,children:C,dynamicChildren:z}=t;if(g.NODE_ENV!=="production"&&Dn&&(c=!1,z=null),e==null){const $=t.el=g.NODE_ENV!=="production"?S("teleport start"):E(""),Z=t.anchor=g.NODE_ENV!=="production"?S("teleport end"):E("");m($,n,r),m(Z,n,r);const x=t.target=ra(t.props,y),de=Gc(x,t,E,m);x?i==="svg"||Wc(x)?i="svg":(i==="mathml"||zc(x))&&(i="mathml"):g.NODE_ENV!=="production"&&!A&&U("Invalid Teleport target on mount:",x,`(${typeof x})`);const Y=(V,P)=>{F&16&&u(C,V,P,o,s,i,a,c)};A?Y(n,Z):x&&Y(x,de)}else{t.el=e.el,t.targetStart=e.targetStart;const $=t.anchor=e.anchor,Z=t.target=e.target,x=t.targetAnchor=e.targetAnchor,de=dr(e.props),Y=de?n:Z,V=de?$:x;if(i==="svg"||Wc(Z)?i="svg":(i==="mathml"||zc(Z))&&(i="mathml"),z?(f(e.dynamicChildren,z,Y,o,s,i,a),yo(e,t,!0)):c||d(e,t,Y,V,o,s,i,a,!1),A)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):xs(t,n,$,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=t.target=ra(t.props,y);P?xs(t,P,null,l,0):g.NODE_ENV!=="production"&&U("Invalid Teleport target on update:",Z,`(${typeof Z})`)}else de&&xs(t,Z,x,l,1)}Kc(t)},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e;if(d&&(o(l),o(u)),s&&o(c),i&16){const m=s||!dr(f);for(let y=0;y<a.length;y++){const E=a[y];r(E,t,n,m,!!E.dynamicChildren)}}},move:xs,hydrate:Tm};function xs(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:c,children:l,props:u}=e,d=s===2;if(d&&r(i,t,n),(!d||dr(u))&&c&16)for(let f=0;f<l.length;f++)o(l[f],t,n,2);d&&r(a,t,n)}function Tm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:c,insert:l,createText:u}},d){const f=t.target=ra(t.props,c);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(dr(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 y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}t.targetAnchor||Gc(f,t,u,l),d(m&&i(m),t,f,n,r,o,s)}Kc(t)}return t.anchor&&i(t.anchor)}const Pm=Cm;function Kc(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Gc(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[qc]=s,e&&(r(o,e),r(s,e)),s}let go,Vn;function pn(e,t){e.appContext.config.performance&&ks()&&Vn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&jh(e,t,ks()?Vn.now():Date.now())}function hn(e,t){if(e.appContext.config.performance&&ks()){const n=`vue-${t}-${e.uid}`,r=n+":end";Vn.mark(r),Vn.measure(`<${Vs(e,e.type)}> ${t}`,n,r),Vn.clearMarks(n),Vn.clearMarks(r)}g.NODE_ENV!=="production"&&Lh(e,t,ks()?Vn.now():Date.now())}function ks(){return go!==void 0||(typeof window<"u"&&window.performance?(go=!0,Vn=window.performance):go=!1),go}function $m(){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.
11
+ `],...bh(n))}),t}function bh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Vs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...wh(e.props),s]:[o+s]}function wh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...oc(r,e[r]))}),n.length>3&&t.push(" ..."),t}function oc(e,t,n){return Be(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:He(t)?(t=oc(e,ge(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):pe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ge(t),n?t:[`${e}=`,t])}function Eh(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?U(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&U(`${t} is NaN - the duration expression might be incorrect.`))}const Vi={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"};function dn(e,t,n,r){try{return r?e(...r):e()}catch(o){ao(o,t,n)}}function kt(e,t,n,r){if(pe(e)){const o=dn(e,t,n,r);return o&&_i(o)&&o.catch(s=>{ao(s,t,n)}),o}if(ie(e)){const o=[];for(let s=0;s<e.length;s++)o.push(kt(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function ao(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,a=g.NODE_ENV!=="production"?Vi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const c=s.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,i,a)===!1)return}s=s.parent}const l=t.appContext.config.errorHandler;if(l){sn(),dn(l,null,10,[e,i,a]),an();return}}Oh(e,n,o,r)}function Oh(e,t,n,r=!0){if(g.NODE_ENV!=="production"){const o=Vi[t];if(n&&ms(n),U(`Unhandled error${o?` during execution of ${o}`:""}`),n&&vs(),r)throw e;console.error(e)}else console.error(e)}let lo=!1,Ri=!1;const ut=[];let zt=0;const Ir=[];let In=null,ir=0;const sc=Promise.resolve();let ji=null;const Nh=100;function co(e){const t=ji||sc;return e?t.then(this?e.bind(this):e):t}function Sh(e){let t=zt+1,n=ut.length;for(;t<n;){const r=t+n>>>1,o=ut[r],s=uo(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}function gs(e){(!ut.length||!ut.includes(e,lo&&e.allowRecurse?zt+1:zt))&&(e.id==null?ut.push(e):ut.splice(Sh(e.id),0,e),ic())}function ic(){!lo&&!Ri&&(Ri=!0,ji=sc.then(uc))}function xh(e){const t=ut.indexOf(e);t>zt&&ut.splice(t,1)}function ac(e){ie(e)?Ir.push(...e):(!In||!In.includes(e,e.allowRecurse?ir+1:ir))&&Ir.push(e),ic()}function lc(e,t,n=lo?zt+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<ut.length;n++){const r=ut[n];if(r&&r.pre){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&Li(t,r))continue;ut.splice(n,1),n--,r()}}}function cc(e){if(Ir.length){const t=[...new Set(Ir)].sort((n,r)=>uo(n)-uo(r));if(Ir.length=0,In){In.push(...t);return}for(In=t,g.NODE_ENV!=="production"&&(e=e||new Map),ir=0;ir<In.length;ir++){const n=In[ir];g.NODE_ENV!=="production"&&Li(e,n)||n.active!==!1&&n()}In=null,ir=0}}const uo=e=>e.id==null?1/0:e.id,kh=(e,t)=>{const n=uo(e)-uo(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function uc(e){Ri=!1,lo=!0,g.NODE_ENV!=="production"&&(e=e||new Map),ut.sort(kh);const t=g.NODE_ENV!=="production"?n=>Li(e,n):We;try{for(zt=0;zt<ut.length;zt++){const n=ut[zt];if(n&&n.active!==!1){if(g.NODE_ENV!=="production"&&t(n))continue;dn(n,n.i,n.i?15:14)}}}finally{zt=0,ut.length=0,cc(e),lo=!1,ji=null,(ut.length||Ir.length)&&uc(e)}}function Li(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>Nh){const r=t.i,o=r&&ma(r.type);return ao(`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 Dn=!1;const ys=new Map;g.NODE_ENV!=="production"&&(Ei().__VUE_HMR_RUNTIME__={createRecord:Mi(dc),rerender:Mi(Ph),reload:Mi($h)});const ar=new Map;function Ch(e){const t=e.type.__hmrId;let n=ar.get(t);n||(dc(t,e.type),n=ar.get(t)),n.instances.add(e)}function Th(e){ar.get(e.type.__hmrId).instances.delete(e)}function dc(e,t){return ar.has(e)?!1:(ar.set(e,{initialDef:_s(t),instances:new Set}),!0)}function _s(e){return pu(e)?e.__vccOpts:e}function Ph(e,t){const n=ar.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,_s(r.type).render=t),r.renderCache=[],Dn=!0,r.effect.dirty=!0,r.update(),Dn=!1}))}function $h(e,t){const n=ar.get(e);if(!n)return;t=_s(t),fc(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=_s(s.type);let a=ys.get(i);a||(i!==n.initialDef&&fc(i,t),ys.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?(s.parent.effect.dirty=!0,gs(()=>{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.")}ac(()=>{ys.clear()})}function fc(e,t){qe(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Mi(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 Kt,fo=[],Ui=!1;function po(e,...t){Kt?Kt.emit(e,...t):Ui||fo.push({event:e,args:t})}function pc(e,t){var n,r;Kt=e,Kt?(Kt.enabled=!0,fo.forEach(({event:o,args:s})=>Kt.emit(o,...s)),fo=[]):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=>{pc(s,t)}),setTimeout(()=>{Kt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ui=!0,fo=[])},3e3)):(Ui=!0,fo=[])}function Ih(e,t){po("app:init",e,t,{Fragment:Ce,Text:_o,Comment:Ke,Static:bo})}function Dh(e){po("app:unmount",e)}const Ah=Fi("component:added"),hc=Fi("component:updated"),Vh=Fi("component:removed"),Rh=e=>{Kt&&typeof Kt.cleanupBuffer=="function"&&!Kt.cleanupBuffer(e)&&Vh(e)};/*! #__NO_SIDE_EFFECTS__ */function Fi(e){return t=>{po(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const jh=mc("perf:start"),Lh=mc("perf:end");function mc(e){return(t,n,r)=>{po(e,t.appContext.app,t.uid,t,n,r)}}function Mh(e,t,n){po("component:emit",e.appContext.app,e,t,n)}let Ye=null,bs=null;function ws(e){const t=Ye;return Ye=e,bs=e&&e.type.__scopeId||null,t}function Uh(e){bs=e}function Fh(){bs=null}function ye(e,t=Ye,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ru(-1);const s=ws(t);let i;try{i=e(...o)}finally{ws(s),r._d&&ru(1)}return g.NODE_ENV!=="production"&&hc(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function vc(e){Sp(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function lr(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&&(sn(),kt(l,n,8,[e.el,a,e,t]),an())}}const An=Symbol("_leaveCb"),Es=Symbol("_enterCb");function Bh(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Re(()=>{e.isMounted=!0}),Zi(()=>{e.isUnmounting=!0}),e}const Ct=[Function,Array],gc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ct,onEnter:Ct,onAfterEnter:Ct,onEnterCancelled:Ct,onBeforeLeave:Ct,onLeave:Ct,onAfterLeave:Ct,onLeaveCancelled:Ct,onBeforeAppear:Ct,onAppear:Ct,onAfterAppear:Ct,onAppearCancelled:Ct},yc=e=>{const t=e.subTree;return t.component?yc(t.component):t},Hh={name:"BaseTransition",props:gc,setup(e,{slots:t}){const n=Is(),r=Bh();return()=>{const o=t.default&&wc(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){let f=!1;for(const m of o)if(m.type!==Ke){if(g.NODE_ENV!=="production"&&f){U("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(s=m,f=!0,g.NODE_ENV==="production")break}}const i=ge(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&U(`invalid <transition> mode: ${a}`),r.isLeaving)return Hi(s);const l=bc(s);if(!l)return Hi(s);let c=Bi(l,i,r,n,f=>c=f);Os(l,c);const u=n.subTree,d=u&&bc(u);if(d&&d.type!==Ke&&!hr(l,d)&&yc(n).type!==Ke){const f=Bi(d,i,r,n);if(Os(d,f),a==="out-in"&&l.type!==Ke)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Hi(s);a==="in-out"&&l.type!==Ke&&(f.delayLeave=(m,y,E)=>{const S=_c(r,d);S[String(d.key)]=d,m[An]=()=>{y(),m[An]=void 0,delete c.delayedLeave},c.delayedLeave=E})}return s}}};function _c(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 Bi(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:y,onLeaveCancelled:E,onBeforeAppear:S,onAppear:A,onAfterAppear:F,onAppearCancelled:C}=t,z=String(e.key),$=_c(n,e),Z=(Y,V)=>{Y&&kt(Y,r,9,V)},x=(Y,V)=>{const P=V[1];Z(Y,V),ie(Y)?Y.every(j=>j.length<=1)&&P():Y.length<=1&&P()},fe={mode:i,persisted:a,beforeEnter(Y){let V=l;if(!n.isMounted)if(s)V=S||l;else return;Y[An]&&Y[An](!0);const P=$[z];P&&hr(e,P)&&P.el[An]&&P.el[An](),Z(V,[Y])},enter(Y){let V=c,P=u,j=d;if(!n.isMounted)if(s)V=A||c,P=F||u,j=C||d;else return;let oe=!1;const w=Y[Es]=I=>{oe||(oe=!0,I?Z(j,[Y]):Z(P,[Y]),fe.delayedLeave&&fe.delayedLeave(),Y[Es]=void 0)};V?x(V,[Y,w]):w()},leave(Y,V){const P=String(e.key);if(Y[Es]&&Y[Es](!0),n.isUnmounting)return V();Z(f,[Y]);let j=!1;const oe=Y[An]=w=>{j||(j=!0,V(),w?Z(E,[Y]):Z(y,[Y]),Y[An]=void 0,$[P]===e&&delete $[P])};$[P]=e,m?x(m,[Y,oe]):oe()},clone(Y){const V=Bi(Y,t,n,r,o);return o&&o(V),V}};return fe}function Hi(e){if(mo(e))return e=Rt(e),e.children=null,e}function bc(e){if(!mo(e))return 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&&pe(n.default))return n.default()}}function Os(e,t){e.shapeFlag&6&&e.component?Os(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 wc(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===Ce?(i.patchFlag&128&&o++,r=r.concat(wc(i.children,t,a))):(t||i.type!==Ke)&&r.push(a!=null?Rt(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 he(e,t){return pe(e)?qe({name:e.name},t,{setup:e}):e}const ho=e=>!!e.type.__asyncLoader,mo=e=>e.type.__isKeepAlive;function Zh(e,t){Ec(e,"a",t)}function qh(e,t){Ec(e,"da",t)}function Ec(e,t,n=Ge){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ns(t,r,n),n){let o=n.parent;for(;o&&o.parent;)mo(o.parent.vnode)&&Wh(r,t,n,o),o=o.parent}}function Wh(e,t,n,r){const o=Ns(t,e,r,!0);mt(()=>{yi(r[t],o)},n)}function Ns(e,t,n=Ge,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{sn();const a=Oo(n),l=kt(t,n,e,i);return a(),an(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=nr(Vi[e].replace(/ hook$/,""));U(`${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 fn=e=>(t,n=Ge)=>{(!As||e==="sp")&&Ns(e,(...r)=>t(...r),n)},zh=fn("bm"),Re=fn("m"),Kh=fn("bu"),Gh=fn("u"),Zi=fn("bum"),mt=fn("um"),Jh=fn("sp"),Yh=fn("rtg"),Xh=fn("rtc");function Qh(e,t=Ge){Ns("ec",e,t)}const em="components",Oc=Symbol.for("v-ndc");function qi(e){return Be(e)?tm(em,e,!1)||e:e||Oc}function tm(e,t,n=!0,r=!1){const o=Ye||Ge;if(o){const s=o.type;{const a=ma(s,!1);if(a&&(a===t||a===Ot(t)||a===tr(Ot(t))))return s}const i=Nc(o[e]||s[e],t)||Nc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&U(`Failed to resolve ${e.slice(0,-1)}: ${t}
12
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&U(`resolve${tr(e.slice(0,-1))} can only be used in render() or setup().`)}function Nc(e,t){return e&&(e[t]||e[Ot(t)]||e[tr(Ot(t))])}function Gt(e,t,n,r){let o;const s=n;if(ie(e)||Be(e)){o=new Array(e.length);for(let i=0,a=e.length;i<a;i++)o[i]=t(e[i],i,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&U(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,s)}else if(De(e))if(e[Symbol.iterator])o=Array.from(e,(i,a)=>t(i,a,void 0,s));else{const i=Object.keys(e);o=new Array(i.length);for(let a=0,l=i.length;a<l;a++){const c=i[a];o[a]=t(e[c],c,a,s)}}else o=[];return o}function Wi(e,t,n={},r,o){if(Ye.isCE||Ye.parent&&ho(Ye.parent)&&Ye.parent.isCE)return B("slot",n,r);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(U("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),_();const i=s&&Sc(s(n)),a=ke(Ce,{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 Sc(e){return e.some(t=>Dr(t)?!(t.type===Ke||t.type===Ce&&!Sc(t.children)):!0)?e:null}const zi=e=>e?cu(e)?ha(e):zi(e.parent):null,cr=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?Wt(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?Wt(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?Wt(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?Wt(e.refs):e.refs,$parent:e=>zi(e.parent),$root:e=>zi(e.root),$emit:e=>e.emit,$options:e=>Yi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,gs(e.update)}),$nextTick:e=>e.n||(e.n=co.bind(e.proxy)),$watch:e=>Lm.bind(e)}),Ki=e=>e==="_"||e==="$",Gi=(e,t)=>e!==Me&&!e.__isScriptSetup&&Ne(e,t),xc={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 c;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(Gi(r,t))return i[t]=1,r[t];if(o!==Me&&Ne(o,t))return i[t]=2,o[t];if((c=e.propsOptions[0])&&Ne(c,t))return i[t]=3,s[t];if(n!==Me&&Ne(n,t))return i[t]=4,n[t];Ji&&(i[t]=0)}}const u=cr[t];let d,f;if(u)return t==="$attrs"?(ot(e.attrs,"get",""),g.NODE_ENV!=="production"&&Ps()):g.NODE_ENV!=="production"&&t==="$slots"&&ot(e,"get",t),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Me&&Ne(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Ne(f,t))return f[t];g.NODE_ENV!=="production"&&Ye&&(!Be(t)||t.indexOf("__v")!==0)&&(o!==Me&&Ki(t[0])&&Ne(o,t)?U(`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===Ye&&U(`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 Gi(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&Ne(o,t)?(U(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Me&&Ne(r,t)?(r[t]=n,!0):Ne(e.props,t)?(g.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&U(`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!==Me&&Ne(e,i)||Gi(t,i)||(a=s[0])&&Ne(a,i)||Ne(r,i)||Ne(cr,i)||Ne(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(xc.ownKeys=e=>(U("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 nm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(cr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>cr[n](e),set:We})}),t}function rm(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:We})})}function om(e){const{ctx:t,setupState:n}=e;Object.keys(ge(n)).forEach(r=>{if(!n.__isScriptSetup){if(Ki(r[0])){U(`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:We})}})}function kc(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function sm(){const e=Object.create(null);return(t,n)=>{e[n]?U(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Ji=!0;function im(e){const t=Yi(e),n=e.proxy,r=e.ctx;Ji=!1,t.beforeCreate&&Cc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:y,activated:E,deactivated:S,beforeDestroy:A,beforeUnmount:F,destroyed:C,unmounted:z,render:$,renderTracked:Z,renderTriggered:x,errorCaptured:fe,serverPrefetch:Y,expose:V,inheritAttrs:P,components:j,directives:oe,filters:w}=t,I=g.NODE_ENV!=="production"?sm():null;if(g.NODE_ENV!=="production"){const[ae]=e.propsOptions;if(ae)for(const re in ae)I("Props",re)}if(c&&am(c,r,I),i)for(const ae in i){const re=i[ae];pe(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,ae,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[ae]=re.bind(n),g.NODE_ENV!=="production"&&I("Methods",ae)):g.NODE_ENV!=="production"&&U(`Method "${ae}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!pe(o)&&U("The data option must be a function. Plain object usage is no longer supported.");const ae=o.call(n,n);if(g.NODE_ENV!=="production"&&_i(ae)&&U("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!De(ae))g.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=so(ae),g.NODE_ENV!=="production")for(const re in ae)I("Data",re),Ki(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>ae[re],set:We})}if(Ji=!0,s)for(const ae in s){const re=s[ae],ce=pe(re)?re.bind(n,n):pe(re.get)?re.get.bind(n,n):We;g.NODE_ENV!=="production"&&ce===We&&U(`Computed property "${ae}" has no getter.`);const Ie=!pe(re)&&pe(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${ae}" is readonly.`)}:We,je=X({get:ce,set:Ie});Object.defineProperty(r,ae,{enumerable:!0,configurable:!0,get:()=>je.value,set:nt=>je.value=nt}),g.NODE_ENV!=="production"&&I("Computed",ae)}if(a)for(const ae in a)Tc(a[ae],r,n,ae);if(l){const ae=pe(l)?l.call(n):l;Reflect.ownKeys(ae).forEach(re=>{dt(re,ae[re])})}u&&Cc(u,e,"c");function ne(ae,re){ie(re)?re.forEach(ce=>ae(ce.bind(n))):re&&ae(re.bind(n))}if(ne(zh,d),ne(Re,f),ne(Kh,m),ne(Gh,y),ne(Zh,E),ne(qh,S),ne(Qh,fe),ne(Xh,Z),ne(Yh,x),ne(Zi,F),ne(mt,z),ne(Jh,Y),ie(V))if(V.length){const ae=e.exposed||(e.exposed={});V.forEach(re=>{Object.defineProperty(ae,re,{get:()=>n[re],set:ce=>n[re]=ce})})}else e.exposed||(e.exposed={});$&&e.render===We&&(e.render=$),P!=null&&(e.inheritAttrs=P),j&&(e.components=j),oe&&(e.directives=oe)}function am(e,t,n=We){ie(e)&&(e=Xi(e));for(const r in e){const o=e[r];let s;De(o)?"default"in o?s=$e(o.from||r,o.default,!0):s=$e(o.from||r):s=$e(o),He(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 Cc(e,t,n){kt(ie(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Tc(e,t,n,r){const o=r.includes(".")?Xc(n,r):()=>n[r];if(Be(e)){const s=t[e];pe(s)?Xe(o,s):g.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e}"`,s)}else if(pe(e))Xe(o,e.bind(n));else if(De(e))if(ie(e))e.forEach(s=>Tc(s,t,n,r));else{const s=pe(e.handler)?e.handler.bind(n):t[e.handler];pe(s)?Xe(o,s,e):g.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&U(`Invalid watch option: "${r}"`,e)}function Yi(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(c=>Ss(l,c,i,!0)),Ss(l,t,i)),De(t)&&s.set(t,l),l}function Ss(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Ss(e,s,n,!0),o&&o.forEach(i=>Ss(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&U('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=lm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const lm={data:Pc,props:$c,emits:$c,methods:vo,computed:vo,beforeCreate:vt,created:vt,beforeMount:vt,mounted:vt,beforeUpdate:vt,updated:vt,beforeDestroy:vt,beforeUnmount:vt,destroyed:vt,unmounted:vt,activated:vt,deactivated:vt,errorCaptured:vt,serverPrefetch:vt,components:vo,directives:vo,watch:um,provide:Pc,inject:cm};function Pc(e,t){return t?e?function(){return qe(pe(e)?e.call(this,this):e,pe(t)?t.call(this,this):t)}:t:e}function cm(e,t){return vo(Xi(e),Xi(t))}function Xi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function vt(e,t){return e?[...new Set([].concat(e,t))]:t}function vo(e,t){return e?qe(Object.create(null),e,t):t}function $c(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:qe(Object.create(null),kc(e),kc(t??{})):t}function um(e,t){if(!e)return t;if(!t)return e;const n=qe(Object.create(null),e);for(const r in t)n[r]=vt(e[r],t[r]);return n}function Ic(){return{app:null,config:{isNativeTag:Op,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 dm=0;function fm(e,t){return function(r,o=null){pe(r)||(r=qe({},r)),o!=null&&!De(o)&&(g.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),o=null);const s=Ic(),i=new WeakSet;let a=!1;const l=s.app={_uid:dm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:hu,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(c,...u){return i.has(c)?g.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):c&&pe(c.install)?(i.add(c),c.install(l,...u)):pe(c)?(i.add(c),c(l,...u)):g.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),l},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),l},component(c,u){return g.NODE_ENV!=="production"&&fa(c,s.config),u?(g.NODE_ENV!=="production"&&s.components[c]&&U(`Component "${c}" has already been registered in target app.`),s.components[c]=u,l):s.components[c]},directive(c,u){return g.NODE_ENV!=="production"&&vc(c),u?(g.NODE_ENV!=="production"&&s.directives[c]&&U(`Directive "${c}" has already been registered in target app.`),s.directives[c]=u,l):s.directives[c]},mount(c,u,d){if(a)g.NODE_ENV!=="production"&&U("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__&&U("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 f=B(r,o);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Rt(f),c,d)}),u&&t?t(f,c):e(f,c,d),a=!0,l._container=c,c.__vue_app__=l,g.NODE_ENV!=="production"&&(l._instance=f.component,Ih(l,hu)),ha(f.component)}},unmount(){a?(e(null,l._container),g.NODE_ENV!=="production"&&(l._instance=null,Dh(l)),delete l._container.__vue_app__):g.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(c,u){return g.NODE_ENV!=="production"&&c in s.provides&&U(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=u,l},runWithContext(c){const u=ur;ur=l;try{return c()}finally{ur=u}}};return l}}let ur=null;function dt(e,t){if(!Ge)g.NODE_ENV!=="production"&&U("provide() can only be used inside setup().");else{let n=Ge.provides;const r=Ge.parent&&Ge.parent.provides;r===n&&(n=Ge.provides=Object.create(r)),n[e]=t}}function $e(e,t,n=!1){const r=Ge||Ye;if(r||ur){const o=ur?ur._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&&pe(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&U(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}function pm(){return!!(Ge||Ye||ur)}const Dc={},Ac=()=>Object.create(Dc),Vc=e=>Object.getPrototypeOf(e)===Dc;function hm(e,t,n,r=!1){const o={},s=Ac();e.propsDefaults=Object.create(null),Rc(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Mc(t||{},o,e),n?e.props=r?o:ch(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function mm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ge(o),[l]=e.propsOptions;let c=!1;if(!(g.NODE_ENV!=="production"&&mm(e))&&(r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(Ts(e.emitsOptions,f))continue;const m=t[f];if(l)if(Ne(s,f))m!==s[f]&&(s[f]=m,c=!0);else{const y=Ot(f);o[y]=Qi(l,a,y,m,e,!1)}else m!==s[f]&&(s[f]=m,c=!0)}}}else{Rc(e,t,o,s)&&(c=!0);let u;for(const d in a)(!t||!Ne(t,d)&&((u=on(d))===d||!Ne(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(o[d]=Qi(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Ne(t,d))&&(delete s[d],c=!0)}c&&qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&Mc(t||{},o,e)}function Rc(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(ro(l))continue;const c=t[l];let u;o&&Ne(o,u=Ot(l))?!s||!s.includes(u)?n[u]=c:(a||(a={}))[u]=c:Ts(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,i=!0)}if(s){const l=ge(n),c=a||Me;for(let u=0;u<s.length;u++){const d=s[u];n[d]=Qi(o,l,d,c[d],e,!Ne(c,d))}}return i}function Qi(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Ne(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&pe(l)){const{propsDefaults:c}=o;if(n in c)r=c[n];else{const u=Oo(o);r=c[n]=l.call(null,t),u()}}else r=l}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===on(n))&&(r=!0))}return r}const gm=new WeakMap;function jc(e,t,n=!1){const r=n?gm:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!pe(e)){const u=d=>{l=!0;const[f,m]=jc(d,t,!0);qe(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!l)return De(e)&&r.set(e,$r),$r;if(ie(s))for(let u=0;u<s.length;u++){g.NODE_ENV!=="production"&&!Be(s[u])&&U("props must be strings when using array syntax.",s[u]);const d=Ot(s[u]);Lc(d)&&(i[d]=Me)}else if(s){g.NODE_ENV!=="production"&&!De(s)&&U("invalid props options",s);for(const u in s){const d=Ot(u);if(Lc(d)){const f=s[u],m=i[d]=ie(f)||pe(f)?{type:f}:qe({},f),y=m.type;let E=!1,S=!0;if(ie(y))for(let A=0;A<y.length;++A){const F=y[A],C=pe(F)&&F.name;if(C==="Boolean"){E=!0;break}else C==="String"&&(S=!1)}else E=pe(y)&&y.name==="Boolean";m[0]=E,m[1]=S,(E||Ne(m,"default"))&&a.push(d)}}}const c=[i,a];return De(e)&&r.set(e,c),c}function Lc(e){return e[0]!=="$"&&!ro(e)?!0:(g.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function ym(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Mc(e,t,n){const r=ge(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&_m(s,r[s],i,g.NODE_ENV!=="production"?Wt(r):r,!Ne(e,s)&&!Ne(e,on(s)))}}function _m(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){U('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let c=!1;const u=ie(s)?s:[s],d=[];for(let f=0;f<u.length&&!c;f++){const{valid:m,expectedType:y}=wm(t,u[f]);d.push(y||""),c=m}if(!c){U(Em(e,t,d));return}}a&&!a(t,r)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const bm=rn("String,Number,Boolean,Function,Symbol,BigInt");function wm(e,t){let n;const r=ym(t);if(bm(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=De(e):r==="Array"?n=ie(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function Em(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(tr).join(" | ")}`;const o=n[0],s=bi(t),i=Uc(t,o),a=Uc(t,s);return n.length===1&&Fc(o)&&!Om(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Fc(s)&&(r+=`with value ${a}.`),r}function Uc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Fc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Om(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Bc=e=>e[0]==="_"||e==="$stable",ea=e=>ie(e)?e.map(jt):[jt(e)],Nm=(e,t,n)=>{if(t._n)return t;const r=ye((...o)=>(g.NODE_ENV!=="production"&&Ge&&(!n||n.root===Ge.root)&&U(`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},Hc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Bc(o))continue;const s=e[o];if(pe(s))t[o]=Nm(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=ea(s);t[o]=()=>i}}},Zc=(e,t)=>{g.NODE_ENV!=="production"&&!mo(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=ea(t);e.slots.default=()=>n},ta=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Sm=(e,t,n)=>{const r=e.slots=Ac();if(e.vnode.shapeFlag&32){const o=t._;o?(ta(r,t,n),n&&ns(r,"_",o,!0)):Hc(t,r)}else t&&Zc(e,t)},xm=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Me;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Dn?(ta(o,t,n),qt(e,"set","$slots")):n&&a===1?s=!1:ta(o,t,n):(s=!t.$stable,Hc(t,o)),i=t}else t&&(Zc(e,t),i={default:1});if(s)for(const a in o)!Bc(a)&&i[a]==null&&delete o[a]};function na(e,t,n,r,o=!1){if(ie(e)){e.forEach((f,m)=>na(f,t&&(ie(t)?t[m]:t),n,r,o));return}if(ho(r)&&!o)return;const s=r.shapeFlag&4?ha(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){U("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,u=a.refs===Me?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(Be(c)?(u[c]=null,Ne(d,c)&&(d[c]=null)):He(c)&&(c.value=null)),pe(l))dn(l,a,12,[i,u]);else{const f=Be(l),m=He(l);if(f||m){const y=()=>{if(e.f){const E=f?Ne(d,l)?d[l]:u[l]:l.value;o?ie(E)&&yi(E,s):ie(E)?E.includes(s)||E.push(s):f?(u[l]=[s],Ne(d,l)&&(d[l]=u[l])):(l.value=[s],e.k&&(u[e.k]=l.value))}else f?(u[l]=i,Ne(d,l)&&(d[l]=i)):m?(l.value=i,e.k&&(u[e.k]=i)):g.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)};i?(y.id=-1,_t(y,n)):y()}else g.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)}}const qc=Symbol("_vte"),km=e=>e.__isTeleport,dr=e=>e&&(e.disabled||e.disabled===""),Wc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,zc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ra=(e,t)=>{const n=e&&e.to;if(Be(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!dr(e)&&U(`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"&&U("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!dr(e)&&U(`Invalid Teleport target: ${n}`),n},Cm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:m,querySelector:y,createText:E,createComment:S}}=c,A=dr(t.props);let{shapeFlag:F,children:C,dynamicChildren:z}=t;if(g.NODE_ENV!=="production"&&Dn&&(l=!1,z=null),e==null){const $=t.el=g.NODE_ENV!=="production"?S("teleport start"):E(""),Z=t.anchor=g.NODE_ENV!=="production"?S("teleport end"):E("");m($,n,r),m(Z,n,r);const x=t.target=ra(t.props,y),fe=Gc(x,t,E,m);x?i==="svg"||Wc(x)?i="svg":(i==="mathml"||zc(x))&&(i="mathml"):g.NODE_ENV!=="production"&&!A&&U("Invalid Teleport target on mount:",x,`(${typeof x})`);const Y=(V,P)=>{F&16&&u(C,V,P,o,s,i,a,l)};A?Y(n,Z):x&&Y(x,fe)}else{t.el=e.el,t.targetStart=e.targetStart;const $=t.anchor=e.anchor,Z=t.target=e.target,x=t.targetAnchor=e.targetAnchor,fe=dr(e.props),Y=fe?n:Z,V=fe?$:x;if(i==="svg"||Wc(Z)?i="svg":(i==="mathml"||zc(Z))&&(i="mathml"),z?(f(e.dynamicChildren,z,Y,o,s,i,a),yo(e,t,!0)):l||d(e,t,Y,V,o,s,i,a,!1),A)fe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):xs(t,n,$,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=t.target=ra(t.props,y);P?xs(t,P,null,c,0):g.NODE_ENV!=="production"&&U("Invalid Teleport target on update:",Z,`(${typeof Z})`)}else fe&&xs(t,Z,x,c,1)}Kc(t)},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=e;if(d&&(o(c),o(u)),s&&o(l),i&16){const m=s||!dr(f);for(let y=0;y<a.length;y++){const E=a[y];r(E,t,n,m,!!E.dynamicChildren)}}},move:xs,hydrate:Tm};function xs(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:c,props:u}=e,d=s===2;if(d&&r(i,t,n),(!d||dr(u))&&l&16)for(let f=0;f<c.length;f++)o(c[f],t,n,2);d&&r(a,t,n)}function Tm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:c,createText:u}},d){const f=t.target=ra(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(dr(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 y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}t.targetAnchor||Gc(f,t,u,c),d(m&&i(m),t,f,n,r,o,s)}Kc(t)}return t.anchor&&i(t.anchor)}const Pm=Cm;function Kc(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Gc(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[qc]=s,e&&(r(o,e),r(s,e)),s}let go,Vn;function pn(e,t){e.appContext.config.performance&&ks()&&Vn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&jh(e,t,ks()?Vn.now():Date.now())}function hn(e,t){if(e.appContext.config.performance&&ks()){const n=`vue-${t}-${e.uid}`,r=n+":end";Vn.mark(r),Vn.measure(`<${Vs(e,e.type)}> ${t}`,n,r),Vn.clearMarks(n),Vn.clearMarks(r)}g.NODE_ENV!=="production"&&Lh(e,t,ks()?Vn.now():Date.now())}function ks(){return go!==void 0||(typeof window<"u"&&window.performance?(go=!0,Vn=window.performance):go=!1),go}function $m(){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.
13
13
 
14
- For more details, see https://link.vuejs.org/feature-flags.`)}}const _t=Wm;function Im(e){return Dm(e)}function Dm(e,t){$m();const n=Ei();n.__VUE__=!0,g.NODE_ENV!=="production"&&pc(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:m=We,insertStaticContent:y}=e,E=(p,h,k,L=null,D=null,M=null,J=void 0,q=null,W=g.NODE_ENV!=="production"&&Dn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!hr(p,h)&&(L=si(p),bt(p,D,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:R,ref:Q,shapeFlag:le}=h;switch(R){case _o:S(p,h,k,L);break;case Ke:A(p,h,k,L);break;case bo:p==null?F(h,k,L,J):g.NODE_ENV!=="production"&&C(p,h,k,J);break;case Ce:oe(p,h,k,L,D,M,J,q,W);break;default:le&1?Z(p,h,k,L,D,M,J,q,W):le&6?w(p,h,k,L,D,M,J,q,W):le&64||le&128?R.process(p,h,k,L,D,M,J,q,W,jo):g.NODE_ENV!=="production"&&U("Invalid VNode type:",R,`(${typeof R})`)}Q!=null&&D&&na(Q,p&&p.ref,M,h||p,!h)},S=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const D=h.el=p.el;h.children!==p.children&&l(D,h.children)}},A=(p,h,k,L)=>{p==null?r(h.el=c(h.children||""),k,L):h.el=p.el},F=(p,h,k,L)=>{[p.el,p.anchor]=y(p.children,h,k,L,p.el,p.anchor)},C=(p,h,k,L)=>{if(h.children!==p.children){const D=f(p.anchor);$(p),[h.el,h.anchor]=y(h.children,k,D,L)}else h.el=p.el,h.anchor=p.anchor},z=({el:p,anchor:h},k,L)=>{let D;for(;p&&p!==h;)D=f(p),r(p,k,L),p=D;r(h,k,L)},$=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},Z=(p,h,k,L,D,M,J,q,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?x(h,k,L,D,M,J,q,W):V(p,h,D,M,J,q,W)},x=(p,h,k,L,D,M,J,q)=>{let W,R;const{props:Q,shapeFlag:le,transition:se,dirs:we}=p;if(W=p.el=i(p.type,M,Q&&Q.is,Q),le&8?u(W,p.children):le&16&&Y(p.children,W,null,L,D,oa(p,M),J,q),we&&lr(p,null,L,"created"),de(W,p,p.scopeId,J,L),Q){for(const Fe in Q)Fe!=="value"&&!ro(Fe)&&s(W,Fe,null,Q[Fe],M,L);"value"in Q&&s(W,"value",null,Q.value,M),(R=Q.onVnodeBeforeMount)&&Jt(R,L,p)}g.NODE_ENV!=="production"&&(ns(W,"__vnode",p,!0),ns(W,"__vueParentComponent",L,!0)),we&&lr(p,null,L,"beforeMount");const Se=Am(D,se);Se&&se.beforeEnter(W),r(W,h,k),((R=Q&&Q.onVnodeMounted)||Se||we)&&_t(()=>{R&&Jt(R,L,p),Se&&se.enter(W),we&&lr(p,null,L,"mounted")},D)},de=(p,h,k,L,D)=>{if(k&&m(p,k),L)for(let M=0;M<L.length;M++)m(p,L[M]);if(D){let M=D.subTree;if(g.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=la(M.children)||M),h===M){const J=D.vnode;de(p,J,J.scopeId,J.slotScopeIds,D.parent)}}},Y=(p,h,k,L,D,M,J,q,W=0)=>{for(let R=W;R<p.length;R++){const Q=p[R]=q?Rn(p[R]):jt(p[R]);E(null,Q,h,k,L,D,M,J,q)}},V=(p,h,k,L,D,M,J)=>{const q=h.el=p.el;g.NODE_ENV!=="production"&&(q.__vnode=h);let{patchFlag:W,dynamicChildren:R,dirs:Q}=h;W|=p.patchFlag&16;const le=p.props||Me,se=h.props||Me;let we;if(k&&fr(k,!1),(we=se.onVnodeBeforeUpdate)&&Jt(we,k,h,p),Q&&lr(h,p,k,"beforeUpdate"),k&&fr(k,!0),g.NODE_ENV!=="production"&&Dn&&(W=0,J=!1,R=null),(le.innerHTML&&se.innerHTML==null||le.textContent&&se.textContent==null)&&u(q,""),R?(P(p.dynamicChildren,R,q,k,L,oa(h,D),M),g.NODE_ENV!=="production"&&yo(p,h)):J||ce(p,h,q,null,k,L,oa(h,D),M,!1),W>0){if(W&16)j(q,le,se,k,D);else if(W&2&&le.class!==se.class&&s(q,"class",null,se.class,D),W&4&&s(q,"style",le.style,se.style,D),W&8){const Se=h.dynamicProps;for(let Fe=0;Fe<Se.length;Fe++){const Ve=Se[Fe],rt=le[Ve],Mt=se[Ve];(Mt!==rt||Ve==="value")&&s(q,Ve,rt,Mt,D,k)}}W&1&&p.children!==h.children&&u(q,h.children)}else!J&&R==null&&j(q,le,se,k,D);((we=se.onVnodeUpdated)||Q)&&_t(()=>{we&&Jt(we,k,h,p),Q&&lr(h,p,k,"updated")},L)},P=(p,h,k,L,D,M,J)=>{for(let q=0;q<h.length;q++){const W=p[q],R=h[q],Q=W.el&&(W.type===Ce||!hr(W,R)||W.shapeFlag&70)?d(W.el):k;E(W,R,Q,null,L,D,M,J,!0)}},j=(p,h,k,L,D)=>{if(h!==k){if(h!==Me)for(const M in h)!ro(M)&&!(M in k)&&s(p,M,h[M],null,D,L);for(const M in k){if(ro(M))continue;const J=k[M],q=h[M];J!==q&&M!=="value"&&s(p,M,q,J,D,L)}"value"in k&&s(p,"value",h.value,k.value,D)}},oe=(p,h,k,L,D,M,J,q,W)=>{const R=h.el=p?p.el:a(""),Q=h.anchor=p?p.anchor:a("");let{patchFlag:le,dynamicChildren:se,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Dn||le&2048)&&(le=0,W=!1,se=null),we&&(q=q?q.concat(we):we),p==null?(r(R,k,L),r(Q,k,L),Y(h.children||[],k,Q,D,M,J,q,W)):le>0&&le&64&&se&&p.dynamicChildren?(P(p.dynamicChildren,se,k,D,M,J,q),g.NODE_ENV!=="production"?yo(p,h):(h.key!=null||D&&h===D.subTree)&&yo(p,h,!0)):ce(p,h,k,Q,D,M,J,q,W)},w=(p,h,k,L,D,M,J,q,W)=>{h.slotScopeIds=q,p==null?h.shapeFlag&512?D.ctx.activate(h,k,L,J,W):I(h,k,L,D,M,J,W):ne(p,h,W)},I=(p,h,k,L,D,M,J)=>{const q=p.component=Qm(p,L,D);if(g.NODE_ENV!=="production"&&q.type.__hmrId&&Ch(q),g.NODE_ENV!=="production"&&(ms(p),pn(q,"mount")),mo(p)&&(q.ctx.renderer=jo),g.NODE_ENV!=="production"&&pn(q,"init"),tv(q,!1,J),g.NODE_ENV!=="production"&&hn(q,"init"),q.asyncDep){if(D&&D.registerDep(q,ae,J),!p.el){const W=q.subTree=B(Ke);A(null,W,h,k)}}else ae(q,p,h,k,D,M,J);g.NODE_ENV!=="production"&&(vs(),hn(q,"mount"))},ne=(p,h,k)=>{const L=h.component=p.component;if(Hm(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&ms(h),re(L,h,k),g.NODE_ENV!=="production"&&vs();return}else L.next=h,xh(L.update),L.effect.dirty=!0,L.update();else h.el=p.el,L.vnode=h},ae=(p,h,k,L,D,M,J)=>{const q=()=>{if(p.isMounted){let{next:Q,bu:le,u:se,parent:we,vnode:Se}=p;{const Lr=Jc(p);if(Lr){Q&&(Q.el=Se.el,re(p,Q,J)),Lr.asyncDep.then(()=>{p.isUnmounted||q()});return}}let Fe=Q,Ve;g.NODE_ENV!=="production"&&ms(Q||p.vnode),fr(p,!1),Q?(Q.el=Se.el,re(p,Q,J)):Q=Se,le&&oo(le),(Ve=Q.props&&Q.props.onVnodeBeforeUpdate)&&Jt(Ve,we,Q,Se),fr(p,!0),g.NODE_ENV!=="production"&&pn(p,"render");const rt=aa(p);g.NODE_ENV!=="production"&&hn(p,"render");const Mt=p.subTree;p.subTree=rt,g.NODE_ENV!=="production"&&pn(p,"patch"),E(Mt,rt,d(Mt.el),si(Mt),p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),Q.el=rt.el,Fe===null&&Zm(p,rt.el),se&&_t(se,D),(Ve=Q.props&&Q.props.onVnodeUpdated)&&_t(()=>Jt(Ve,we,Q,Se),D),g.NODE_ENV!=="production"&&hc(p),g.NODE_ENV!=="production"&&vs()}else{let Q;const{el:le,props:se}=h,{bm:we,m:Se,parent:Fe}=p,Ve=ho(h);if(fr(p,!1),we&&oo(we),!Ve&&(Q=se&&se.onVnodeBeforeMount)&&Jt(Q,Fe,h),fr(p,!0),le&&zd){const rt=()=>{g.NODE_ENV!=="production"&&pn(p,"render"),p.subTree=aa(p),g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"hydrate"),zd(le,p.subTree,p,D,null),g.NODE_ENV!=="production"&&hn(p,"hydrate")};Ve?h.type.__asyncLoader().then(()=>!p.isUnmounted&&rt()):rt()}else{g.NODE_ENV!=="production"&&pn(p,"render");const rt=p.subTree=aa(p);g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"patch"),E(null,rt,k,L,p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),h.el=rt.el}if(Se&&_t(Se,D),!Ve&&(Q=se&&se.onVnodeMounted)){const rt=h;_t(()=>Jt(Q,Fe,rt),D)}(h.shapeFlag&256||Fe&&ho(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&p.a&&_t(p.a,D),p.isMounted=!0,g.NODE_ENV!=="production"&&Ah(p),h=k=L=null}},W=p.effect=new Si(q,We,()=>gs(R),p.scope),R=p.update=()=>{W.dirty&&W.run()};R.i=p,R.id=p.uid,fr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?Q=>oo(p.rtc,Q):void 0,W.onTrigger=p.rtg?Q=>oo(p.rtg,Q):void 0),R()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,vm(p,h.props,L,k),xm(p,h.children,k),sn(),lc(p),an()},ce=(p,h,k,L,D,M,J,q,W=!1)=>{const R=p&&p.children,Q=p?p.shapeFlag:0,le=h.children,{patchFlag:se,shapeFlag:we}=h;if(se>0){if(se&128){je(R,le,k,L,D,M,J,q,W);return}else if(se&256){Ie(R,le,k,L,D,M,J,q,W);return}}we&8?(Q&16&&Ro(R,D,M),le!==R&&u(k,le)):Q&16?we&16?je(R,le,k,L,D,M,J,q,W):Ro(R,D,M,!0):(Q&8&&u(k,""),we&16&&Y(le,k,L,D,M,J,q,W))},Ie=(p,h,k,L,D,M,J,q,W)=>{p=p||$r,h=h||$r;const R=p.length,Q=h.length,le=Math.min(R,Q);let se;for(se=0;se<le;se++){const we=h[se]=W?Rn(h[se]):jt(h[se]);E(p[se],we,k,null,D,M,J,q,W)}R>Q?Ro(p,D,M,!0,!1,le):Y(h,k,L,D,M,J,q,W,le)},je=(p,h,k,L,D,M,J,q,W)=>{let R=0;const Q=h.length;let le=p.length-1,se=Q-1;for(;R<=le&&R<=se;){const we=p[R],Se=h[R]=W?Rn(h[R]):jt(h[R]);if(hr(we,Se))E(we,Se,k,null,D,M,J,q,W);else break;R++}for(;R<=le&&R<=se;){const we=p[le],Se=h[se]=W?Rn(h[se]):jt(h[se]);if(hr(we,Se))E(we,Se,k,null,D,M,J,q,W);else break;le--,se--}if(R>le){if(R<=se){const we=se+1,Se=we<Q?h[we].el:L;for(;R<=se;)E(null,h[R]=W?Rn(h[R]):jt(h[R]),k,Se,D,M,J,q,W),R++}}else if(R>se)for(;R<=le;)bt(p[R],D,M,!0),R++;else{const we=R,Se=R,Fe=new Map;for(R=Se;R<=se;R++){const yt=h[R]=W?Rn(h[R]):jt(h[R]);yt.key!=null&&(g.NODE_ENV!=="production"&&Fe.has(yt.key)&&U("Duplicate keys found during update:",JSON.stringify(yt.key),"Make sure keys are unique."),Fe.set(yt.key,R))}let Ve,rt=0;const Mt=se-Se+1;let Lr=!1,Kd=0;const Lo=new Array(Mt);for(R=0;R<Mt;R++)Lo[R]=0;for(R=we;R<=le;R++){const yt=p[R];if(rt>=Mt){bt(yt,D,M,!0);continue}let en;if(yt.key!=null)en=Fe.get(yt.key);else for(Ve=Se;Ve<=se;Ve++)if(Lo[Ve-Se]===0&&hr(yt,h[Ve])){en=Ve;break}en===void 0?bt(yt,D,M,!0):(Lo[en-Se]=R+1,en>=Kd?Kd=en:Lr=!0,E(yt,h[en],k,null,D,M,J,q,W),rt++)}const Gd=Lr?Vm(Lo):$r;for(Ve=Gd.length-1,R=Mt-1;R>=0;R--){const yt=Se+R,en=h[yt],Jd=yt+1<Q?h[yt+1].el:L;Lo[R]===0?E(null,en,k,Jd,D,M,J,q,W):Lr&&(Ve<0||R!==Gd[Ve]?nt(en,k,Jd,2):Ve--)}}},nt=(p,h,k,L,D=null)=>{const{el:M,type:J,transition:q,children:W,shapeFlag:R}=p;if(R&6){nt(p.component.subTree,h,k,L);return}if(R&128){p.suspense.move(h,k,L);return}if(R&64){J.move(p,h,k,jo);return}if(J===Ce){r(M,h,k);for(let le=0;le<W.length;le++)nt(W[le],h,k,L);r(p.anchor,h,k);return}if(J===bo){z(p,h,k);return}if(L!==2&&R&1&&q)if(L===0)q.beforeEnter(M),r(M,h,k),_t(()=>q.enter(M),D);else{const{leave:le,delayLeave:se,afterLeave:we}=q,Se=()=>r(M,h,k),Fe=()=>{le(M,()=>{Se(),we&&we()})};se?se(M,Se,Fe):Fe()}else r(M,h,k)},bt=(p,h,k,L=!1,D=!1)=>{const{type:M,props:J,ref:q,children:W,dynamicChildren:R,shapeFlag:Q,patchFlag:le,dirs:se,cacheIndex:we}=p;if(le===-2&&(D=!1),q!=null&&na(q,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),Q&256){h.ctx.deactivate(p);return}const Se=Q&1&&se,Fe=!ho(p);let Ve;if(Fe&&(Ve=J&&J.onVnodeBeforeUnmount)&&Jt(Ve,h,p),Q&6)Sw(p.component,k,L);else{if(Q&128){p.suspense.unmount(k,L);return}Se&&lr(p,null,h,"beforeUnmount"),Q&64?p.type.remove(p,h,k,jo,L):R&&!R.hasOnce&&(M!==Ce||le>0&&le&64)?Ro(R,h,k,!1,!0):(M===Ce&&le&384||!D&&Q&16)&&Ro(W,h,k),L&&bn(p)}(Fe&&(Ve=J&&J.onVnodeUnmounted)||Se)&&_t(()=>{Ve&&Jt(Ve,h,p),Se&&lr(p,null,h,"unmounted")},k)},bn=p=>{const{type:h,el:k,anchor:L,transition:D}=p;if(h===Ce){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&D&&!D.persisted?p.children.forEach(J=>{J.type===Ke?o(J.el):bn(J)}):Gn(k,L);return}if(h===bo){$(p);return}const M=()=>{o(k),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(p.shapeFlag&1&&D&&!D.persisted){const{leave:J,delayLeave:q}=D,W=()=>J(k,M);q?q(p.el,M,W):W()}else M()},Gn=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Sw=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&Th(p);const{bum:L,scope:D,update:M,subTree:J,um:q,m:W,a:R}=p;Yc(W),Yc(R),L&&oo(L),D.stop(),M&&(M.active=!1,bt(J,p,h,k)),q&&_t(q,h),_t(()=>{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"&&Rh(p)},Ro=(p,h,k,L=!1,D=!1,M=0)=>{for(let J=M;J<p.length;J++)bt(p[J],h,k,L,D)},si=p=>{if(p.shapeFlag&6)return si(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[qc];return k?f(k):h};let za=!1;const qd=(p,h,k)=>{p==null?h._vnode&&bt(h._vnode,null,null,!0):E(h._vnode||null,p,h,null,null,null,k),h._vnode=p,za||(za=!0,lc(),cc(),za=!1)},jo={p:E,um:bt,m:nt,r:bn,mt:I,mc:Y,pc:ce,pbc:P,n:si,o:e};let Wd,zd;return{render:qd,hydrate:Wd,createApp:fm(qd,Wd)}}function oa({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 fr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Am(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yo(e,t,n=!1){const r=e.children,o=t.children;if(ie(r)&&ie(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]=Rn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&yo(i,a)),a.type===_o&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ke&&!a.el&&(a.el=i.el)}}function Vm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const c=e.length;for(r=0;r<c;r++){const l=e[r];if(l!==0){if(o=n[n.length-1],e[o]<l){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<l?s=a+1:i=a;l<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 Jc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Jc(t)}function Yc(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const Rm=Symbol.for("v-scx"),jm=()=>{{const e=$e(Rm);return e||g.NODE_ENV!=="production"&&U("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)}const Cs={};function Xe(e,t,n){return g.NODE_ENV!=="production"&&!fe(t)&&U("`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,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=Me){if(t&&s){const x=t;t=(...de)=>{x(...de),Z()}}g.NODE_ENV!=="production"&&r!==void 0&&typeof r=="number"&&U('watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.'),g.NODE_ENV!=="production"&&!t&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const c=x=>{U("Invalid watch source: ",x,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=Ge,u=x=>r===!0?x:pr(x,r===!1?1:void 0);let d,f=!1,m=!1;if(He(e)?(d=()=>e.value,f=un(e)):ln(e)?(d=()=>u(e),f=!0):ie(e)?(m=!0,f=e.some(x=>ln(x)||un(x)),d=()=>e.map(x=>{if(He(x))return x.value;if(ln(x))return u(x);if(fe(x))return dn(x,l,2);g.NODE_ENV!=="production"&&c(x)})):fe(e)?t?d=()=>dn(e,l,2):d=()=>(y&&y(),kt(e,l,3,[E])):(d=We,g.NODE_ENV!=="production"&&c(e)),t&&r){const x=d;d=()=>pr(x())}let y,E=x=>{y=z.onStop=()=>{dn(x,l,4),y=z.onStop=void 0}},S;if(As)if(E=We,t?n&&kt(t,l,3,[d(),m?[]:void 0,E]):d(),o==="sync"){const x=jm();S=x.__watcherHandles||(x.__watcherHandles=[])}else return We;let A=m?new Array(e.length).fill(Cs):Cs;const F=()=>{if(!(!z.active||!z.dirty))if(t){const x=z.run();(r||f||(m?x.some((de,Y)=>Cn(de,A[Y])):Cn(x,A)))&&(y&&y(),kt(t,l,3,[x,A===Cs?void 0:m&&A[0]===Cs?[]:A,E]),A=x)}else z.run()};F.allowRecurse=!!t;let C;o==="sync"?C=F:o==="post"?C=()=>_t(F,l&&l.suspense):(F.pre=!0,l&&(F.id=l.uid),C=()=>gs(F));const z=new Si(d,We,C),$=Tl(),Z=()=>{z.stop(),$&&yi($.effects,z)};return g.NODE_ENV!=="production"&&(z.onTrack=i,z.onTrigger=a),t?n?F():A=z.run():o==="post"?_t(z.run.bind(z),l&&l.suspense):z.run(),S&&S.push(Z),Z}function Lm(e,t,n){const r=this.proxy,o=Be(e)?e.includes(".")?Xc(r,e):()=>r[e]:e.bind(r,r);let s;fe(t)?s=t:(s=t.handler,n=t);const i=Oo(this),a=sa(o,s.bind(r),n);return i(),a}function Xc(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}}function pr(e,t=1/0,n){if(t<=0||!De(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,He(e))pr(e.value,t,n);else if(ie(e))for(let r=0;r<e.length;r++)pr(e[r],t,n);else if(bl(e)||er(e))e.forEach(r=>{pr(r,t,n)});else if(El(e)){for(const r in e)pr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&pr(e[r],t,n)}return e}const Mm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Et(t)}Modifiers`]||e[`${on(t)}Modifiers`];function Um(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Me;if(g.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=e;if(u)if(!(t in u))(!d||!(nr(Et(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${nr(Et(t))}" prop.`);else{const f=u[t];fe(f)&&(f(...n)||U(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&Mm(r,t.slice(7));if(i&&(i.trim&&(o=n.map(u=>Be(u)?u.trim():u)),i.number&&(o=n.map(Cp))),g.NODE_ENV!=="production"&&Mh(e,t,o),g.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&r[nr(u)]&&U(`Event "${u}" is emitted in component ${Vs(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 "${on(t)}" instead of "${t}".`)}let a,c=r[a=nr(t)]||r[a=nr(Et(t))];!c&&s&&(c=r[a=nr(on(t))]),c&&kt(c,e,6,o);const l=r[a+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,kt(l,e,6,o)}}function Qc(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(!fe(e)){const c=l=>{const u=Qc(l,t,!0);u&&(a=!0,qe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!a?(De(e)&&r.set(e,null),null):(ie(s)?s.forEach(c=>i[c]=null):qe(i,s),De(e)&&r.set(e,i),i)}function Ts(e,t){return!e||!no(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,on(t))||Ne(e,t))}let ia=!1;function Ps(){ia=!0}function aa(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:c,render:l,renderCache:u,props:d,data:f,setupState:m,ctx:y,inheritAttrs:E}=e,S=ws(e);let A,F;g.NODE_ENV!=="production"&&(ia=!1);try{if(n.shapeFlag&4){const $=o||r,Z=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy($,{get(x,de,Y){return U(`Property '${String(de)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(x,de,Y)}}):$;A=jt(l.call(Z,$,u,g.NODE_ENV!=="production"?Wt(d):d,m,f,y)),F=a}else{const $=t;g.NODE_ENV!=="production"&&a===d&&Ps(),A=jt($.length>1?$(g.NODE_ENV!=="production"?Wt(d):d,g.NODE_ENV!=="production"?{get attrs(){return Ps(),Wt(a)},slots:i,emit:c}:{attrs:a,slots:i,emit:c}):$(g.NODE_ENV!=="production"?Wt(d):d,null)),F=t.props?a:Fm(a)}}catch($){wo.length=0,ao($,e,1),A=B(Ke)}let C=A,z;if(g.NODE_ENV!=="production"&&A.patchFlag>0&&A.patchFlag&2048&&([C,z]=eu(A)),F&&E!==!1){const $=Object.keys(F),{shapeFlag:Z}=C;if($.length){if(Z&7)s&&$.some(Qo)&&(F=Bm(F,s)),C=Rt(C,F,!1,!0);else if(g.NODE_ENV!=="production"&&!ia&&C.type!==Ke){const x=Object.keys(a),de=[],Y=[];for(let V=0,P=x.length;V<P;V++){const j=x[V];no(j)?Qo(j)||de.push(j[2].toLowerCase()+j.slice(3)):Y.push(j)}Y.length&&U(`Extraneous non-props attributes (${Y.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),de.length&&U(`Extraneous non-emits event listeners (${de.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"&&!tu(C)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Rt(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!tu(C)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),C.transition=n.transition),g.NODE_ENV!=="production"&&z?z(C):A=C,ws(S),A}const eu=e=>{const t=e.children,n=e.dynamicChildren,r=la(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return eu(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[jt(r),i]};function la(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Dr(o)){if(o.type!==Ke||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return la(n.children)}}else return}return n}const Fm=e=>{let t;for(const n in e)(n==="class"||n==="style"||no(n))&&((t||(t={}))[n]=e[n]);return t},Bm=(e,t)=>{const n={};for(const r in e)(!Qo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},tu=e=>e.shapeFlag&7||e.type===Ke;function Hm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:c}=t,l=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Dn||t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?nu(r,i,l):!!i;if(c&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(i[f]!==r[f]&&!Ts(l,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?nu(r,i,l):!0:!!i;return!1}function nu(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]&&!Ts(n,s))return!0}return!1}function Zm({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 qm=e=>e.__isSuspense;function Wm(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):ac(e)}const Ce=Symbol.for("v-fgt"),_o=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),bo=Symbol.for("v-stc"),wo=[];let Nt=null;function _(e=!1){wo.push(Nt=e?null:[])}function zm(){wo.pop(),Nt=wo[wo.length-1]||null}let Eo=1;function ru(e){Eo+=e,e<0&&Nt&&(Nt.hasOnce=!0)}function ou(e){return e.dynamicChildren=Eo>0?Nt||$r:null,zm(),Eo>0&&Nt&&Nt.push(e),e}function N(e,t,n,r,o,s){return ou(O(e,t,n,r,o,s,!0))}function xe(e,t,n,r,o){return ou(B(e,t,n,r,o,!0))}function Dr(e){return e?e.__v_isVNode===!0:!1}function hr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ys.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 Km=(...e)=>iu(...e),su=({key:e})=>e??null,$s=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||He(e)||fe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function O(e,t=null,n=null,r=0,o=null,s=e===Ce?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&su(t),ref:t&&$s(t),scopeId:bs,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:Ye};return a?(ca(c,n),s&128&&e.normalize(c)):n&&(c.shapeFlag|=Be(n)?8:16),g.NODE_ENV!=="production"&&c.key!==c.key&&U("VNode created with invalid key (NaN). VNode type:",c.type),Eo>0&&!i&&Nt&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&Nt.push(c),c}const B=g.NODE_ENV!=="production"?Km:iu;function iu(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Oc)&&(g.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Ke),Dr(e)){const a=Rt(e,t,!0);return n&&ca(a,n),Eo>0&&!s&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(pu(e)&&(e=e.__vccOpts),t){t=Gm(t);let{class:a,style:c}=t;a&&!Be(a)&&(t.class=rs(a)),De(c)&&(ps(c)&&!ie(c)&&(c=qe({},c)),t.style=Oi(c))}const i=Be(e)?1:qm(e)?128:km(e)?64:De(e)?4:fe(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&ps(e)&&(e=ge(e),U("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`.",`
15
- Component that was made reactive: `,e)),O(e,t,n,r,o,i,s,!0)}function Gm(e){return e?ps(e)||Vc(e)?qe({},e):e:null}function Rt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:c}=e,l=t?ua(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&su(l),ref:t&&t.ref?n&&s?ie(s)?s.concat($s(t)):[s,$s(t)]:$s(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ie(a)?a.map(au):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Rt(e.ssContent),ssFallback:e.ssFallback&&Rt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Os(u,c.clone(u)),u}function au(e){const t=Rt(e);return ie(e.children)&&(t.children=e.children.map(au)),t}function Te(e=" ",t=0){return B(_o,null,e,t)}function Jm(e,t){const n=B(bo,null,e);return n.staticCount=t,n}function me(e="",t=!1){return t?(_(),xe(Ke,null,e)):B(Ke,null,e)}function jt(e){return e==null||typeof e=="boolean"?B(Ke):ie(e)?B(Ce,null,e.slice()):typeof e=="object"?Rn(e):B(_o,null,String(e))}function Rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rt(e)}function ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ie(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&&!Vc(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:Ye},n=32):(t=String(t),r&64?(n=16,t=[Te(t)]):n=8);e.children=t,e.shapeFlag|=n}function ua(...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=rs([t.class,r.class]));else if(o==="style")t.style=Oi([t.style,r.style]);else if(no(o)){const s=t[o],i=r[o];i&&s!==i&&!(ie(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Jt(e,t,n,r=null){kt(e,t,7,[n,r])}const Ym=Ic();let Xm=0;function Qm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Ym,s={uid:Xm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new kl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jc(r,o),emitsOptions:Qc(r,o),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:r.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,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=nm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Um.bind(null,s),e.ce&&e.ce(s),s}let Ge=null;const Is=()=>Ge||Ye;let Ds,da;{const e=Ei(),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)}};Ds=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),da=t("__VUE_SSR_SETTERS__",n=>As=n)}const Oo=e=>{const t=Ge;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},lu=()=>{Ge&&Ge.scope.off(),Ds(null)},ev=rn("slot,component");function fa(e,{isNativeTag:t}){(ev(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function cu(e){return e.vnode.shapeFlag&4}let As=!1;function tv(e,t=!1,n=!1){t&&da(t);const{props:r,children:o}=e.vnode,s=cu(e);hm(e,r,s,t),Sm(e,o,n);const i=s?nv(e,t):void 0;return t&&da(!1),i}function nv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&fa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)fa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)vc(s[i])}r.compilerOptions&&rv()&&U('"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,xc),g.NODE_ENV!=="production"&&rm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?sv(e):null,i=Oo(e);sn();const a=dn(o,e,0,[g.NODE_ENV!=="production"?Wt(e.props):e.props,s]);if(an(),i(),_i(a)){if(a.then(lu,lu),t)return a.then(c=>{uu(e,c,t)}).catch(c=>{ao(c,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const c=(n=r.name)!=null?n:"Anonymous";U(`Component <${c}>: 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 uu(e,a,t)}else du(e,t)}function uu(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:De(t)?(g.NODE_ENV!=="production"&&Dr(t)&&U("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=tc(t),g.NODE_ENV!=="production"&&om(e)):g.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),du(e,n)}let pa;const rv=()=>!pa;function du(e,t,n){const r=e.type;if(!e.render){if(!t&&pa&&!r.render){const o=r.template||Yi(e).template;if(o){g.NODE_ENV!=="production"&&pn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:c}=r,l=qe(qe({isCustomElement:s,delimiters:a},i),c);r.render=pa(o,l),g.NODE_ENV!=="production"&&hn(e,"compile")}}e.render=r.render||We}{const o=Oo(e);sn();try{im(e)}finally{an(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===We&&!t&&(r.template?U('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".'):U("Component is missing template or render function: ",r))}const fu=g.NODE_ENV!=="production"?{get(e,t){return Ps(),ot(e,"get",""),e[t]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(e,t){return ot(e,"get",""),e[t]}};function ov(e){return new Proxy(e.slots,{get(t,n){return ot(e,"get","$slots"),t[n]}})}function sv(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&U("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ie(n)?r="array":He(n)&&(r="ref")),r!=="object"&&U(`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,fu))},get slots(){return r||(r=ov(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,fu),slots:e.slots,emit:e.emit,expose:t}}function ha(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tc($n(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cr)return cr[n](e)},has(t,n){return n in t||n in cr}})):e.proxy}const iv=/(?:^|[-_])(\w)/g,av=e=>e.replace(iv,t=>t.toUpperCase()).replace(/[-_]/g,"");function ma(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Vs(e,t,n=!1){let r=ma(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?av(r):n?"App":"Anonymous"}function pu(e){return fe(e)&&"__vccOpts"in e}const X=(e,t)=>{const n=dh(e,t,As);if(g.NODE_ENV!=="production"){const r=Is();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Le(e,t,n){const r=arguments.length;return r===2?De(t)&&!ie(t)?Dr(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Dr(n)&&(n=[n]),B(e,t,n))}function lv(){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 De(d)?d.__isVue?["div",e,"VueInstance"]:He(d)?["div",{},["span",e,u(d)],"<",a(d.value),">"]:ln(d)?["div",{},["span",e,un(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${cn(d)?" (readonly)":""}`]:cn(d)?["div",{},["span",e,un(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",ge(d.props))),d.setupState!==Me&&f.push(i("setup",d.setupState)),d.data!==Me&&f.push(i("data",ge(d.data)));const m=c(d,"computed");m&&f.push(i("computed",m));const y=c(d,"inject");return y&&f.push(i("injected",y)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=qe({},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]:De(d)?["object",{object:f?ge(d):d}]:["span",n,String(d)]}function c(d,f){const m=d.type;if(fe(m))return;const y={};for(const E in d.ctx)l(m,E,f)&&(y[E]=d.ctx[E]);return y}function l(d,f,m){const y=d[m];if(ie(y)&&y.includes(f)||De(y)&&f in y||d.extends&&l(d.extends,f,m)||d.mixins&&d.mixins.some(E=>l(E,f,m)))return!0}function u(d){return un(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const hu="3.4.38",jn=g.NODE_ENV!=="production"?U:We;var mn={};const cv="http://www.w3.org/2000/svg",uv="http://www.w3.org/1998/Math/MathML",vn=typeof document<"u"?document:null,mu=vn&&vn.createElement("template"),dv={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"?vn.createElementNS(cv,e):t==="mathml"?vn.createElementNS(uv,e):n?vn.createElement(e,{is:n}):vn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>vn.createTextNode(e),createComment:e=>vn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vn.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{mu.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=mu.content;if(r==="svg"||r==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ln="transition",No="animation",So=Symbol("_vtc"),xo=(e,{slots:t})=>Le(Hh,fv(e),t);xo.displayName="Transition";const vu={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};xo.props=qe({},gc,vu);const mr=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},gu=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function fv(e){const t={};for(const j in e)j in vu||(t[j]=e[j]);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:c=s,appearActiveClass:l=i,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,y=pv(o),E=y&&y[0],S=y&&y[1],{onBeforeEnter:A,onEnter:F,onEnterCancelled:C,onLeave:z,onLeaveCancelled:$,onBeforeAppear:Z=A,onAppear:x=F,onAppearCancelled:de=C}=t,Y=(j,oe,w)=>{vr(j,oe?u:a),vr(j,oe?l:i),w&&w()},V=(j,oe)=>{j._isLeaving=!1,vr(j,d),vr(j,m),vr(j,f),oe&&oe()},P=j=>(oe,w)=>{const I=j?x:F,ne=()=>Y(oe,j,w);mr(I,[oe,ne]),yu(()=>{vr(oe,j?c:s),Mn(oe,j?u:a),gu(I)||_u(oe,r,E,ne)})};return qe(t,{onBeforeEnter(j){mr(A,[j]),Mn(j,s),Mn(j,i)},onBeforeAppear(j){mr(Z,[j]),Mn(j,c),Mn(j,l)},onEnter:P(!1),onAppear:P(!0),onLeave(j,oe){j._isLeaving=!0;const w=()=>V(j,oe);Mn(j,d),Mn(j,f),vv(),yu(()=>{j._isLeaving&&(vr(j,d),Mn(j,m),gu(z)||_u(j,r,S,w))}),mr(z,[j,w])},onEnterCancelled(j){Y(j,!1),mr(C,[j])},onAppearCancelled(j){Y(j,!0),mr(de,[j])},onLeaveCancelled(j){V(j),mr($,[j])}})}function pv(e){if(e==null)return null;if(De(e))return[va(e.enter),va(e.leave)];{const t=va(e);return[t,t]}}function va(e){const t=Tp(e);return mn.NODE_ENV!=="production"&&Eh(t,"<transition> explicit duration"),t}function Mn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[So]||(e[So]=new Set)).add(t)}function vr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[So];n&&(n.delete(t),n.size||(e[So]=void 0))}function yu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hv=0;function _u(e,t,n,r){const o=e._endId=++hv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:c}=mv(e,t);if(!i)return r();const l=i+"end";let u=0;const d=()=>{e.removeEventListener(l,f),s()},f=m=>{m.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},a+1),e.addEventListener(l,f)}function mv(e,t){const n=window.getComputedStyle(e),r=y=>(n[y]||"").split(", "),o=r(`${Ln}Delay`),s=r(`${Ln}Duration`),i=bu(o,s),a=r(`${No}Delay`),c=r(`${No}Duration`),l=bu(a,c);let u=null,d=0,f=0;t===Ln?i>0&&(u=Ln,d=i,f=s.length):t===No?l>0&&(u=No,d=l,f=c.length):(d=Math.max(i,l),u=d>0?i>l?Ln:No:null,f=u?u===Ln?s.length:c.length:0);const m=u===Ln&&/\b(transform|all)(,|$)/.test(r(`${Ln}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:m}}function bu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>wu(n)+wu(e[r])))}function wu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vv(){return document.body.offsetHeight}function gv(e,t,n){const r=e[So];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Eu=Symbol("_vod"),yv=Symbol("_vsh"),_v=Symbol(mn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),bv=/(^|;)\s*display\s*:/;function wv(e,t,n){const r=e.style,o=Be(n);let s=!1;if(n&&!o){if(t)if(Be(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Rs(r,a,"")}else for(const i in t)n[i]==null&&Rs(r,i,"");for(const i in n)i==="display"&&(s=!0),Rs(r,i,n[i])}else if(o){if(t!==n){const i=r[_v];i&&(n+=";"+i),r.cssText=n,s=bv.test(n)}}else t&&e.removeAttribute("style");Eu in e&&(e[Eu]=s?r.display:"",e[yv]&&(r.display="none"))}const Ev=/[^\\];\s*$/,Ou=/\s*!important$/;function Rs(e,t,n){if(ie(n))n.forEach(r=>Rs(e,t,r));else if(n==null&&(n=""),mn.NODE_ENV!=="production"&&Ev.test(n)&&jn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Ov(e,t);Ou.test(n)?e.setProperty(on(r),n.replace(Ou,""),"important"):e[r]=n}}const Nu=["Webkit","Moz","ms"],ga={};function Ov(e,t){const n=ga[t];if(n)return n;let r=Et(t);if(r!=="filter"&&r in e)return ga[t]=r;r=tr(r);for(let o=0;o<Nu.length;o++){const s=Nu[o]+r;if(s in e)return ga[t]=s}return t}const Su="http://www.w3.org/1999/xlink";function xu(e,t,n,r,o,s=Up(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Su,t.slice(6,t.length)):e.setAttributeNS(Su,t,n):n==null||s&&!Nl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":kn(n)?String(n):n)}function Nv(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=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?"":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=Nl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){mn.NODE_ENV!=="production"&&!s&&jn(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function Sv(e,t,n,r){e.addEventListener(t,n,r)}function xv(e,t,n,r){e.removeEventListener(t,n,r)}const ku=Symbol("_vei");function kv(e,t,n,r,o=null){const s=e[ku]||(e[ku]={}),i=s[t];if(r&&i)i.value=mn.NODE_ENV!=="production"?Tu(r,t):r;else{const[a,c]=Cv(t);if(r){const l=s[t]=$v(mn.NODE_ENV!=="production"?Tu(r,t):r,o);Sv(e,a,l,c)}else i&&(xv(e,a,i,c),s[t]=void 0)}}const Cu=/(?:Once|Passive|Capture)$/;function Cv(e){let t;if(Cu.test(e)){t={};let r;for(;r=e.match(Cu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):on(e.slice(2)),t]}let ya=0;const Tv=Promise.resolve(),Pv=()=>ya||(Tv.then(()=>ya=0),ya=Date.now());function $v(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;kt(Iv(r,n.value),t,5,[r])};return n.value=e,n.attached=Pv(),n}function Tu(e,t){return fe(e)||ie(e)?e:(jn(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
16
- Expected function or array of functions, received type ${typeof e}.`),We)}function Iv(e,t){if(ie(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 Pu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?gv(e,r,i):t==="style"?wv(e,n,r):no(t)?Qo(t)||kv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Av(e,t,r,i))?(Nv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),xu(e,t,r,i))};function Av(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&fe(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 Pu(t)&&Be(n)?!1:t in e}const Vv=["ctrl","shift","alt","meta"],Rv={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)=>Vv.some(n=>e[`${n}Key`]&&!t.includes(n))},jv=(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=Rv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Lv=qe({patchProp:Dv},dv);let $u;function Mv(){return $u||($u=Im(Lv))}const Uv=(...e)=>{const t=Mv().createApp(...e);mn.NODE_ENV!=="production"&&(Bv(t),Hv(t));const{mount:n}=t;return t.mount=r=>{const o=Zv(r);if(!o)return;const s=t._component;!fe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,Fv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Fv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>jp(t)||Lp(t)||Mp(t),writable:!1})}function Hv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){jn("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 jn(r),n},set(){jn(r)}})}}function Zv(e){if(Be(e)){const t=document.querySelector(e);return mn.NODE_ENV!=="production"&&!t&&jn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return mn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&jn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var qv={};function Wv(){lv()}qv.NODE_ENV!=="production"&&Wv();let js;const zv=new Uint8Array(16);function Kv(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(zv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Gv(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 Iu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _a(e,t,n){if(Iu.randomUUID&&!t&&!e)return Iu.randomUUID();e=e||{};const r=e.random||(e.rng||Kv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Gv(r)}var Un=Symbol("storefront");function Jv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Yv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),next:v.string().optional()}),Xv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed")}),Qv=v.discriminatedUnion("event",[Yv,Xv]);function Du(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.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.height="100%",t.width="100%",document.body.append(t),window.onmessage=function(n){var r;try{const o=Qv.parse(n.data);o.event==="close"&&(document.body.contains(t)&&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 Ls=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=X(()=>!!this.utm.value&&Object.values(this.utm.value).some(c=>!!c)),this.currentUser=T(null),this.loadedUser=T(!1),this.debouncedPushOrderContent=Jv(c=>this.client.orders.pushContent(c,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=T({id:_a(),status:eo.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",c=>this.handleStorageUpdate(c));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=T(JSON.parse(i)),this.refreshOrder()):this.currentOrder=T({id:_a(),status:eo.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 c=new URLSearchParams(window.location.search),l=c.get("mb_intent"),u=c.get("mb_endpoint");if(l==="checkout"&&c.get("mb_complete")&&u){const d=Object.fromEntries([...c.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(u));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);Du(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Xe(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Xe(this.loadedUser,n=>{n&&t()},{immediate:!0})})}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",()=>t())}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.next))}install(t){t.provide(Un,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 pi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);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))}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!==eo.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:_a(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:eo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Ls.userKey="moonbase_user",Ls.sessionKey="moonbase_session",Ls.storefrontKey="moonbase_storefront";var eg=Ls;function Au(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function Vu(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Ms(e){const t=$e(Un);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 tg(e,t){const n=$e(Un),r=hh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),c=n.stateFactory(`activation-request-${r}-completing`,!1),l=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ht.Completed,c.value=!1):l.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ht.Fulfilled&&(c.value=!0,u()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Zi(()=>{l.value&&clearTimeout(l.value)}),Xe(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Ht.Fulfilled&&(c.value=!0,u())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:c,error:s,isInstalled:X(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ht.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,c.value=!0,u()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,c.value=!0,u()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ht.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ng(e){const t=$e(Un);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 Pr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}}}}function ba(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{items:X(()=>t.currentOrder.value.items.map(n=>{if(n.type==="Product"){const r=t.storefront.value.products.find(i=>i.id===n.productId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,product:r,variation:s,price:s==null?void 0:s.price}}else{const r=t.storefront.value.bundles.find(i=>i.id===n.bundleId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,bundle:r,variation:s,price:s==null?void 0:s.price}}})),currency:X(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:X(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,c,l,u,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(S=>S.id===s.productId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(c=(a=E==null?void 0:E.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?c:0}else{const m=t.storefront.value.bundles.find(S=>S.id===s.bundleId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(d=(u=E==null?void 0:E.price[n])!=null?u:(l=m==null?void 0:m.defaultVariation)==null?void 0:l.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=b(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},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},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,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{Du(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(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??$e(Un);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,c)=>{const l=await t.client.identity.signUp(n,r,o,s,i,a,c);return t.currentUser.value=l,t.updateStorefront(),l},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),t.updateUser()}}}function rg(e,t){const n={endpoint:e};return new eg(n,new Ep(n),(r,o)=>T(o))}var Ru=!1;function Us(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 wa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function og(){return ju().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ju(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const sg=typeof Proxy=="function",ig="devtools-plugin:setup",ag="plugin:settings:set";let Ar,Ea;function lg(){var e;return Ar!==void 0||(typeof window<"u"&&window.performance?(Ar=!0,Ea=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ar=!0,Ea=globalThis.perf_hooks.performance):Ar=!1),Ar}function cg(){return lg()?Ea.now():Date.now()}class ug{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 cg()}},n&&n.on(ag,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(l=>{this.targetQueue.push({method:a,args:c,resolve:l})})})}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 Lu(e,t){const n=e,r=ju(),o=og(),s=sg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ig,e,t);else{const i=s?new ug(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Pe={};let ko;const Co=e=>ko=e,Mu=Pe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function gr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yt||(Yt={}));const yr=typeof window<"u",Uu=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 dg(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 Oa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Hu(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Fu(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Fs(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 Bs=typeof navigator=="object"?navigator:{userAgent:""},Bu=/Macintosh/.test(Bs.userAgent)&&/AppleWebKit/.test(Bs.userAgent)&&!/Safari/.test(Bs.userAgent),Hu=yr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Bu?fg:"msSaveOrOpenBlob"in Bs?pg:hg:()=>{};function fg(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?Fu(r.href)?Oa(e,t,n):(r.target="_blank",Fs(r)):Fs(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Fs(r)},0))}function pg(e,t="download",n){if(typeof e=="string")if(Fu(e))Oa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Fs(r)})}else navigator.msSaveOrOpenBlob(dg(e,n),t)}function hg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Oa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Uu.HTMLElement))||"safari"in Uu,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Bu)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let c=a.result;if(typeof c!="string")throw r=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=c:location.assign(c),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 tt(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 Na(e){return"_a"in e&&"install"in e}function Zu(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function qu(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(tt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function mg(e){if(!Zu())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(qu(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vg(e){if(!Zu())try{Wu(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(qu(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function gg(e){try{Hu(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){tt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let gn;function yg(){gn||(gn=document.createElement("input"),gn.type="file",gn.accept=".json");function e(){return new Promise((t,n)=>{gn.onchange=async()=>{const r=gn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},gn.oncancel=()=>t(null),gn.onerror=n,gn.click()})}return e}async function _g(e){try{const n=await yg()();if(!n)return;const{text:r,file:o}=n;Wu(e,JSON.parse(r)),tt(`Global state imported from "${o.name}".`)}catch(t){tt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Wu(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 Lt(e){return{_custom:{display:e}}}const zu="🍍 Pinia (root)",Hs="_root";function bg(e){return Na(e)?{id:Hs,label:zu}:{id:e.$id,label:e.$id}}function wg(e){if(Na(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,c)=>(a[c]=i[c],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 Eg(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:Lt(e.type),key:Lt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Og(e){switch(e){case Yt.direct:return"mutation";case Yt.patchFunction:return"$patch";case Yt.patchObject:return"$patch";default:return"unknown"}}let Vr=!0;const Zs=[],_r="pinia:mutations",pt="pinia",{assign:Ng}=Object,qs=e=>"🍍 "+e;function Sg(e,t){Lu({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,app:e},n=>{typeof n.now!="function"&&tt("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:_r,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{mg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{gg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await _g(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"?tt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),tt(`Store "${r}" reset.`)):tt(`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:qs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ge(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((c,l)=>(c[l]=a.$state[l],c),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:qs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((c,l)=>{try{c[l]=a[l]}catch(u){c[l]=u}return c},{})})})}}),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()):zu.toLowerCase().includes(r.filter.toLowerCase())):o).map(bg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Hs&&(globalThis.$store=ge(o)),r.state=wg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Na(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Vr=!1,r.set(s,i,r.state.value),Vr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return tt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return tt(`Invalid path for store "${o}":
14
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const _t=Wm;function Im(e){return Dm(e)}function Dm(e,t){$m();const n=Ei();n.__VUE__=!0,g.NODE_ENV!=="production"&&pc(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:m=We,insertStaticContent:y}=e,E=(p,h,k,L=null,D=null,M=null,J=void 0,q=null,W=g.NODE_ENV!=="production"&&Dn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!hr(p,h)&&(L=si(p),wt(p,D,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:R,ref:Q,shapeFlag:le}=h;switch(R){case _o:S(p,h,k,L);break;case Ke:A(p,h,k,L);break;case bo:p==null?F(h,k,L,J):g.NODE_ENV!=="production"&&C(p,h,k,J);break;case Ce:oe(p,h,k,L,D,M,J,q,W);break;default:le&1?Z(p,h,k,L,D,M,J,q,W):le&6?w(p,h,k,L,D,M,J,q,W):le&64||le&128?R.process(p,h,k,L,D,M,J,q,W,jo):g.NODE_ENV!=="production"&&U("Invalid VNode type:",R,`(${typeof R})`)}Q!=null&&D&&na(Q,p&&p.ref,M,h||p,!h)},S=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const D=h.el=p.el;h.children!==p.children&&c(D,h.children)}},A=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},F=(p,h,k,L)=>{[p.el,p.anchor]=y(p.children,h,k,L,p.el,p.anchor)},C=(p,h,k,L)=>{if(h.children!==p.children){const D=f(p.anchor);$(p),[h.el,h.anchor]=y(h.children,k,D,L)}else h.el=p.el,h.anchor=p.anchor},z=({el:p,anchor:h},k,L)=>{let D;for(;p&&p!==h;)D=f(p),r(p,k,L),p=D;r(h,k,L)},$=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},Z=(p,h,k,L,D,M,J,q,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?x(h,k,L,D,M,J,q,W):V(p,h,D,M,J,q,W)},x=(p,h,k,L,D,M,J,q)=>{let W,R;const{props:Q,shapeFlag:le,transition:se,dirs:we}=p;if(W=p.el=i(p.type,M,Q&&Q.is,Q),le&8?u(W,p.children):le&16&&Y(p.children,W,null,L,D,oa(p,M),J,q),we&&lr(p,null,L,"created"),fe(W,p,p.scopeId,J,L),Q){for(const Fe in Q)Fe!=="value"&&!ro(Fe)&&s(W,Fe,null,Q[Fe],M,L);"value"in Q&&s(W,"value",null,Q.value,M),(R=Q.onVnodeBeforeMount)&&Jt(R,L,p)}g.NODE_ENV!=="production"&&(ns(W,"__vnode",p,!0),ns(W,"__vueParentComponent",L,!0)),we&&lr(p,null,L,"beforeMount");const xe=Am(D,se);xe&&se.beforeEnter(W),r(W,h,k),((R=Q&&Q.onVnodeMounted)||xe||we)&&_t(()=>{R&&Jt(R,L,p),xe&&se.enter(W),we&&lr(p,null,L,"mounted")},D)},fe=(p,h,k,L,D)=>{if(k&&m(p,k),L)for(let M=0;M<L.length;M++)m(p,L[M]);if(D){let M=D.subTree;if(g.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=la(M.children)||M),h===M){const J=D.vnode;fe(p,J,J.scopeId,J.slotScopeIds,D.parent)}}},Y=(p,h,k,L,D,M,J,q,W=0)=>{for(let R=W;R<p.length;R++){const Q=p[R]=q?Rn(p[R]):jt(p[R]);E(null,Q,h,k,L,D,M,J,q)}},V=(p,h,k,L,D,M,J)=>{const q=h.el=p.el;g.NODE_ENV!=="production"&&(q.__vnode=h);let{patchFlag:W,dynamicChildren:R,dirs:Q}=h;W|=p.patchFlag&16;const le=p.props||Me,se=h.props||Me;let we;if(k&&fr(k,!1),(we=se.onVnodeBeforeUpdate)&&Jt(we,k,h,p),Q&&lr(h,p,k,"beforeUpdate"),k&&fr(k,!0),g.NODE_ENV!=="production"&&Dn&&(W=0,J=!1,R=null),(le.innerHTML&&se.innerHTML==null||le.textContent&&se.textContent==null)&&u(q,""),R?(P(p.dynamicChildren,R,q,k,L,oa(h,D),M),g.NODE_ENV!=="production"&&yo(p,h)):J||ce(p,h,q,null,k,L,oa(h,D),M,!1),W>0){if(W&16)j(q,le,se,k,D);else if(W&2&&le.class!==se.class&&s(q,"class",null,se.class,D),W&4&&s(q,"style",le.style,se.style,D),W&8){const xe=h.dynamicProps;for(let Fe=0;Fe<xe.length;Fe++){const Ve=xe[Fe],rt=le[Ve],Mt=se[Ve];(Mt!==rt||Ve==="value")&&s(q,Ve,rt,Mt,D,k)}}W&1&&p.children!==h.children&&u(q,h.children)}else!J&&R==null&&j(q,le,se,k,D);((we=se.onVnodeUpdated)||Q)&&_t(()=>{we&&Jt(we,k,h,p),Q&&lr(h,p,k,"updated")},L)},P=(p,h,k,L,D,M,J)=>{for(let q=0;q<h.length;q++){const W=p[q],R=h[q],Q=W.el&&(W.type===Ce||!hr(W,R)||W.shapeFlag&70)?d(W.el):k;E(W,R,Q,null,L,D,M,J,!0)}},j=(p,h,k,L,D)=>{if(h!==k){if(h!==Me)for(const M in h)!ro(M)&&!(M in k)&&s(p,M,h[M],null,D,L);for(const M in k){if(ro(M))continue;const J=k[M],q=h[M];J!==q&&M!=="value"&&s(p,M,q,J,D,L)}"value"in k&&s(p,"value",h.value,k.value,D)}},oe=(p,h,k,L,D,M,J,q,W)=>{const R=h.el=p?p.el:a(""),Q=h.anchor=p?p.anchor:a("");let{patchFlag:le,dynamicChildren:se,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Dn||le&2048)&&(le=0,W=!1,se=null),we&&(q=q?q.concat(we):we),p==null?(r(R,k,L),r(Q,k,L),Y(h.children||[],k,Q,D,M,J,q,W)):le>0&&le&64&&se&&p.dynamicChildren?(P(p.dynamicChildren,se,k,D,M,J,q),g.NODE_ENV!=="production"?yo(p,h):(h.key!=null||D&&h===D.subTree)&&yo(p,h,!0)):ce(p,h,k,Q,D,M,J,q,W)},w=(p,h,k,L,D,M,J,q,W)=>{h.slotScopeIds=q,p==null?h.shapeFlag&512?D.ctx.activate(h,k,L,J,W):I(h,k,L,D,M,J,W):ne(p,h,W)},I=(p,h,k,L,D,M,J)=>{const q=p.component=Qm(p,L,D);if(g.NODE_ENV!=="production"&&q.type.__hmrId&&Ch(q),g.NODE_ENV!=="production"&&(ms(p),pn(q,"mount")),mo(p)&&(q.ctx.renderer=jo),g.NODE_ENV!=="production"&&pn(q,"init"),tv(q,!1,J),g.NODE_ENV!=="production"&&hn(q,"init"),q.asyncDep){if(D&&D.registerDep(q,ae,J),!p.el){const W=q.subTree=B(Ke);A(null,W,h,k)}}else ae(q,p,h,k,D,M,J);g.NODE_ENV!=="production"&&(vs(),hn(q,"mount"))},ne=(p,h,k)=>{const L=h.component=p.component;if(Hm(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&ms(h),re(L,h,k),g.NODE_ENV!=="production"&&vs();return}else L.next=h,xh(L.update),L.effect.dirty=!0,L.update();else h.el=p.el,L.vnode=h},ae=(p,h,k,L,D,M,J)=>{const q=()=>{if(p.isMounted){let{next:Q,bu:le,u:se,parent:we,vnode:xe}=p;{const Lr=Jc(p);if(Lr){Q&&(Q.el=xe.el,re(p,Q,J)),Lr.asyncDep.then(()=>{p.isUnmounted||q()});return}}let Fe=Q,Ve;g.NODE_ENV!=="production"&&ms(Q||p.vnode),fr(p,!1),Q?(Q.el=xe.el,re(p,Q,J)):Q=xe,le&&oo(le),(Ve=Q.props&&Q.props.onVnodeBeforeUpdate)&&Jt(Ve,we,Q,xe),fr(p,!0),g.NODE_ENV!=="production"&&pn(p,"render");const rt=aa(p);g.NODE_ENV!=="production"&&hn(p,"render");const Mt=p.subTree;p.subTree=rt,g.NODE_ENV!=="production"&&pn(p,"patch"),E(Mt,rt,d(Mt.el),si(Mt),p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),Q.el=rt.el,Fe===null&&Zm(p,rt.el),se&&_t(se,D),(Ve=Q.props&&Q.props.onVnodeUpdated)&&_t(()=>Jt(Ve,we,Q,xe),D),g.NODE_ENV!=="production"&&hc(p),g.NODE_ENV!=="production"&&vs()}else{let Q;const{el:le,props:se}=h,{bm:we,m:xe,parent:Fe}=p,Ve=ho(h);if(fr(p,!1),we&&oo(we),!Ve&&(Q=se&&se.onVnodeBeforeMount)&&Jt(Q,Fe,h),fr(p,!0),le&&zd){const rt=()=>{g.NODE_ENV!=="production"&&pn(p,"render"),p.subTree=aa(p),g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"hydrate"),zd(le,p.subTree,p,D,null),g.NODE_ENV!=="production"&&hn(p,"hydrate")};Ve?h.type.__asyncLoader().then(()=>!p.isUnmounted&&rt()):rt()}else{g.NODE_ENV!=="production"&&pn(p,"render");const rt=p.subTree=aa(p);g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"patch"),E(null,rt,k,L,p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),h.el=rt.el}if(xe&&_t(xe,D),!Ve&&(Q=se&&se.onVnodeMounted)){const rt=h;_t(()=>Jt(Q,Fe,rt),D)}(h.shapeFlag&256||Fe&&ho(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&p.a&&_t(p.a,D),p.isMounted=!0,g.NODE_ENV!=="production"&&Ah(p),h=k=L=null}},W=p.effect=new Si(q,We,()=>gs(R),p.scope),R=p.update=()=>{W.dirty&&W.run()};R.i=p,R.id=p.uid,fr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?Q=>oo(p.rtc,Q):void 0,W.onTrigger=p.rtg?Q=>oo(p.rtg,Q):void 0),R()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,vm(p,h.props,L,k),xm(p,h.children,k),sn(),lc(p),an()},ce=(p,h,k,L,D,M,J,q,W=!1)=>{const R=p&&p.children,Q=p?p.shapeFlag:0,le=h.children,{patchFlag:se,shapeFlag:we}=h;if(se>0){if(se&128){je(R,le,k,L,D,M,J,q,W);return}else if(se&256){Ie(R,le,k,L,D,M,J,q,W);return}}we&8?(Q&16&&Ro(R,D,M),le!==R&&u(k,le)):Q&16?we&16?je(R,le,k,L,D,M,J,q,W):Ro(R,D,M,!0):(Q&8&&u(k,""),we&16&&Y(le,k,L,D,M,J,q,W))},Ie=(p,h,k,L,D,M,J,q,W)=>{p=p||$r,h=h||$r;const R=p.length,Q=h.length,le=Math.min(R,Q);let se;for(se=0;se<le;se++){const we=h[se]=W?Rn(h[se]):jt(h[se]);E(p[se],we,k,null,D,M,J,q,W)}R>Q?Ro(p,D,M,!0,!1,le):Y(h,k,L,D,M,J,q,W,le)},je=(p,h,k,L,D,M,J,q,W)=>{let R=0;const Q=h.length;let le=p.length-1,se=Q-1;for(;R<=le&&R<=se;){const we=p[R],xe=h[R]=W?Rn(h[R]):jt(h[R]);if(hr(we,xe))E(we,xe,k,null,D,M,J,q,W);else break;R++}for(;R<=le&&R<=se;){const we=p[le],xe=h[se]=W?Rn(h[se]):jt(h[se]);if(hr(we,xe))E(we,xe,k,null,D,M,J,q,W);else break;le--,se--}if(R>le){if(R<=se){const we=se+1,xe=we<Q?h[we].el:L;for(;R<=se;)E(null,h[R]=W?Rn(h[R]):jt(h[R]),k,xe,D,M,J,q,W),R++}}else if(R>se)for(;R<=le;)wt(p[R],D,M,!0),R++;else{const we=R,xe=R,Fe=new Map;for(R=xe;R<=se;R++){const yt=h[R]=W?Rn(h[R]):jt(h[R]);yt.key!=null&&(g.NODE_ENV!=="production"&&Fe.has(yt.key)&&U("Duplicate keys found during update:",JSON.stringify(yt.key),"Make sure keys are unique."),Fe.set(yt.key,R))}let Ve,rt=0;const Mt=se-xe+1;let Lr=!1,Kd=0;const Lo=new Array(Mt);for(R=0;R<Mt;R++)Lo[R]=0;for(R=we;R<=le;R++){const yt=p[R];if(rt>=Mt){wt(yt,D,M,!0);continue}let en;if(yt.key!=null)en=Fe.get(yt.key);else for(Ve=xe;Ve<=se;Ve++)if(Lo[Ve-xe]===0&&hr(yt,h[Ve])){en=Ve;break}en===void 0?wt(yt,D,M,!0):(Lo[en-xe]=R+1,en>=Kd?Kd=en:Lr=!0,E(yt,h[en],k,null,D,M,J,q,W),rt++)}const Gd=Lr?Vm(Lo):$r;for(Ve=Gd.length-1,R=Mt-1;R>=0;R--){const yt=xe+R,en=h[yt],Jd=yt+1<Q?h[yt+1].el:L;Lo[R]===0?E(null,en,k,Jd,D,M,J,q,W):Lr&&(Ve<0||R!==Gd[Ve]?nt(en,k,Jd,2):Ve--)}}},nt=(p,h,k,L,D=null)=>{const{el:M,type:J,transition:q,children:W,shapeFlag:R}=p;if(R&6){nt(p.component.subTree,h,k,L);return}if(R&128){p.suspense.move(h,k,L);return}if(R&64){J.move(p,h,k,jo);return}if(J===Ce){r(M,h,k);for(let le=0;le<W.length;le++)nt(W[le],h,k,L);r(p.anchor,h,k);return}if(J===bo){z(p,h,k);return}if(L!==2&&R&1&&q)if(L===0)q.beforeEnter(M),r(M,h,k),_t(()=>q.enter(M),D);else{const{leave:le,delayLeave:se,afterLeave:we}=q,xe=()=>r(M,h,k),Fe=()=>{le(M,()=>{xe(),we&&we()})};se?se(M,xe,Fe):Fe()}else r(M,h,k)},wt=(p,h,k,L=!1,D=!1)=>{const{type:M,props:J,ref:q,children:W,dynamicChildren:R,shapeFlag:Q,patchFlag:le,dirs:se,cacheIndex:we}=p;if(le===-2&&(D=!1),q!=null&&na(q,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),Q&256){h.ctx.deactivate(p);return}const xe=Q&1&&se,Fe=!ho(p);let Ve;if(Fe&&(Ve=J&&J.onVnodeBeforeUnmount)&&Jt(Ve,h,p),Q&6)Sw(p.component,k,L);else{if(Q&128){p.suspense.unmount(k,L);return}xe&&lr(p,null,h,"beforeUnmount"),Q&64?p.type.remove(p,h,k,jo,L):R&&!R.hasOnce&&(M!==Ce||le>0&&le&64)?Ro(R,h,k,!1,!0):(M===Ce&&le&384||!D&&Q&16)&&Ro(W,h,k),L&&bn(p)}(Fe&&(Ve=J&&J.onVnodeUnmounted)||xe)&&_t(()=>{Ve&&Jt(Ve,h,p),xe&&lr(p,null,h,"unmounted")},k)},bn=p=>{const{type:h,el:k,anchor:L,transition:D}=p;if(h===Ce){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&D&&!D.persisted?p.children.forEach(J=>{J.type===Ke?o(J.el):bn(J)}):Gn(k,L);return}if(h===bo){$(p);return}const M=()=>{o(k),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(p.shapeFlag&1&&D&&!D.persisted){const{leave:J,delayLeave:q}=D,W=()=>J(k,M);q?q(p.el,M,W):W()}else M()},Gn=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Sw=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&Th(p);const{bum:L,scope:D,update:M,subTree:J,um:q,m:W,a:R}=p;Yc(W),Yc(R),L&&oo(L),D.stop(),M&&(M.active=!1,wt(J,p,h,k)),q&&_t(q,h),_t(()=>{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"&&Rh(p)},Ro=(p,h,k,L=!1,D=!1,M=0)=>{for(let J=M;J<p.length;J++)wt(p[J],h,k,L,D)},si=p=>{if(p.shapeFlag&6)return si(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[qc];return k?f(k):h};let za=!1;const qd=(p,h,k)=>{p==null?h._vnode&&wt(h._vnode,null,null,!0):E(h._vnode||null,p,h,null,null,null,k),h._vnode=p,za||(za=!0,lc(),cc(),za=!1)},jo={p:E,um:wt,m:nt,r:bn,mt:I,mc:Y,pc:ce,pbc:P,n:si,o:e};let Wd,zd;return{render:qd,hydrate:Wd,createApp:fm(qd,Wd)}}function oa({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 fr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Am(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yo(e,t,n=!1){const r=e.children,o=t.children;if(ie(r)&&ie(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]=Rn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&yo(i,a)),a.type===_o&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ke&&!a.el&&(a.el=i.el)}}function Vm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(o=n[n.length-1],e[o]<c){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<c?s=a+1:i=a;c<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 Jc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Jc(t)}function Yc(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const Rm=Symbol.for("v-scx"),jm=()=>{{const e=$e(Rm);return e||g.NODE_ENV!=="production"&&U("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)}const Cs={};function Xe(e,t,n){return g.NODE_ENV!=="production"&&!pe(t)&&U("`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,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=Me){if(t&&s){const x=t;t=(...fe)=>{x(...fe),Z()}}g.NODE_ENV!=="production"&&r!==void 0&&typeof r=="number"&&U('watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.'),g.NODE_ENV!=="production"&&!t&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const l=x=>{U("Invalid watch source: ",x,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=Ge,u=x=>r===!0?x:pr(x,r===!1?1:void 0);let d,f=!1,m=!1;if(He(e)?(d=()=>e.value,f=un(e)):ln(e)?(d=()=>u(e),f=!0):ie(e)?(m=!0,f=e.some(x=>ln(x)||un(x)),d=()=>e.map(x=>{if(He(x))return x.value;if(ln(x))return u(x);if(pe(x))return dn(x,c,2);g.NODE_ENV!=="production"&&l(x)})):pe(e)?t?d=()=>dn(e,c,2):d=()=>(y&&y(),kt(e,c,3,[E])):(d=We,g.NODE_ENV!=="production"&&l(e)),t&&r){const x=d;d=()=>pr(x())}let y,E=x=>{y=z.onStop=()=>{dn(x,c,4),y=z.onStop=void 0}},S;if(As)if(E=We,t?n&&kt(t,c,3,[d(),m?[]:void 0,E]):d(),o==="sync"){const x=jm();S=x.__watcherHandles||(x.__watcherHandles=[])}else return We;let A=m?new Array(e.length).fill(Cs):Cs;const F=()=>{if(!(!z.active||!z.dirty))if(t){const x=z.run();(r||f||(m?x.some((fe,Y)=>Cn(fe,A[Y])):Cn(x,A)))&&(y&&y(),kt(t,c,3,[x,A===Cs?void 0:m&&A[0]===Cs?[]:A,E]),A=x)}else z.run()};F.allowRecurse=!!t;let C;o==="sync"?C=F:o==="post"?C=()=>_t(F,c&&c.suspense):(F.pre=!0,c&&(F.id=c.uid),C=()=>gs(F));const z=new Si(d,We,C),$=Tl(),Z=()=>{z.stop(),$&&yi($.effects,z)};return g.NODE_ENV!=="production"&&(z.onTrack=i,z.onTrigger=a),t?n?F():A=z.run():o==="post"?_t(z.run.bind(z),c&&c.suspense):z.run(),S&&S.push(Z),Z}function Lm(e,t,n){const r=this.proxy,o=Be(e)?e.includes(".")?Xc(r,e):()=>r[e]:e.bind(r,r);let s;pe(t)?s=t:(s=t.handler,n=t);const i=Oo(this),a=sa(o,s.bind(r),n);return i(),a}function Xc(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}}function pr(e,t=1/0,n){if(t<=0||!De(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,He(e))pr(e.value,t,n);else if(ie(e))for(let r=0;r<e.length;r++)pr(e[r],t,n);else if(bl(e)||er(e))e.forEach(r=>{pr(r,t,n)});else if(El(e)){for(const r in e)pr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&pr(e[r],t,n)}return e}const Mm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ot(t)}Modifiers`]||e[`${on(t)}Modifiers`];function Um(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Me;if(g.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=e;if(u)if(!(t in u))(!d||!(nr(Ot(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${nr(Ot(t))}" prop.`);else{const f=u[t];pe(f)&&(f(...n)||U(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&Mm(r,t.slice(7));if(i&&(i.trim&&(o=n.map(u=>Be(u)?u.trim():u)),i.number&&(o=n.map(Cp))),g.NODE_ENV!=="production"&&Mh(e,t,o),g.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&r[nr(u)]&&U(`Event "${u}" is emitted in component ${Vs(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 "${on(t)}" instead of "${t}".`)}let a,l=r[a=nr(t)]||r[a=nr(Ot(t))];!l&&s&&(l=r[a=nr(on(t))]),l&&kt(l,e,6,o);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,kt(c,e,6,o)}}function Qc(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(!pe(e)){const l=c=>{const u=Qc(c,t,!0);u&&(a=!0,qe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(De(e)&&r.set(e,null),null):(ie(s)?s.forEach(l=>i[l]=null):qe(i,s),De(e)&&r.set(e,i),i)}function Ts(e,t){return!e||!no(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,on(t))||Ne(e,t))}let ia=!1;function Ps(){ia=!0}function aa(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:m,ctx:y,inheritAttrs:E}=e,S=ws(e);let A,F;g.NODE_ENV!=="production"&&(ia=!1);try{if(n.shapeFlag&4){const $=o||r,Z=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy($,{get(x,fe,Y){return U(`Property '${String(fe)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(x,fe,Y)}}):$;A=jt(c.call(Z,$,u,g.NODE_ENV!=="production"?Wt(d):d,m,f,y)),F=a}else{const $=t;g.NODE_ENV!=="production"&&a===d&&Ps(),A=jt($.length>1?$(g.NODE_ENV!=="production"?Wt(d):d,g.NODE_ENV!=="production"?{get attrs(){return Ps(),Wt(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):$(g.NODE_ENV!=="production"?Wt(d):d,null)),F=t.props?a:Fm(a)}}catch($){wo.length=0,ao($,e,1),A=B(Ke)}let C=A,z;if(g.NODE_ENV!=="production"&&A.patchFlag>0&&A.patchFlag&2048&&([C,z]=eu(A)),F&&E!==!1){const $=Object.keys(F),{shapeFlag:Z}=C;if($.length){if(Z&7)s&&$.some(Qo)&&(F=Bm(F,s)),C=Rt(C,F,!1,!0);else if(g.NODE_ENV!=="production"&&!ia&&C.type!==Ke){const x=Object.keys(a),fe=[],Y=[];for(let V=0,P=x.length;V<P;V++){const j=x[V];no(j)?Qo(j)||fe.push(j[2].toLowerCase()+j.slice(3)):Y.push(j)}Y.length&&U(`Extraneous non-props attributes (${Y.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),fe.length&&U(`Extraneous non-emits event listeners (${fe.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"&&!tu(C)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Rt(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!tu(C)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),C.transition=n.transition),g.NODE_ENV!=="production"&&z?z(C):A=C,ws(S),A}const eu=e=>{const t=e.children,n=e.dynamicChildren,r=la(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return eu(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[jt(r),i]};function la(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Dr(o)){if(o.type!==Ke||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return la(n.children)}}else return}return n}const Fm=e=>{let t;for(const n in e)(n==="class"||n==="style"||no(n))&&((t||(t={}))[n]=e[n]);return t},Bm=(e,t)=>{const n={};for(const r in e)(!Qo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},tu=e=>e.shapeFlag&7||e.type===Ke;function Hm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,c=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Dn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?nu(r,i,c):!!i;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(i[f]!==r[f]&&!Ts(c,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?nu(r,i,c):!0:!!i;return!1}function nu(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]&&!Ts(n,s))return!0}return!1}function Zm({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 qm=e=>e.__isSuspense;function Wm(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):ac(e)}const Ce=Symbol.for("v-fgt"),_o=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),bo=Symbol.for("v-stc"),wo=[];let St=null;function _(e=!1){wo.push(St=e?null:[])}function zm(){wo.pop(),St=wo[wo.length-1]||null}let Eo=1;function ru(e){Eo+=e,e<0&&St&&(St.hasOnce=!0)}function ou(e){return e.dynamicChildren=Eo>0?St||$r:null,zm(),Eo>0&&St&&St.push(e),e}function N(e,t,n,r,o,s){return ou(O(e,t,n,r,o,s,!0))}function ke(e,t,n,r,o){return ou(B(e,t,n,r,o,!0))}function Dr(e){return e?e.__v_isVNode===!0:!1}function hr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ys.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 Km=(...e)=>iu(...e),su=({key:e})=>e??null,$s=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||He(e)||pe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function O(e,t=null,n=null,r=0,o=null,s=e===Ce?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&su(t),ref:t&&$s(t),scopeId:bs,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:Ye};return a?(ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Be(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&U("VNode created with invalid key (NaN). VNode type:",l.type),Eo>0&&!i&&St&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&St.push(l),l}const B=g.NODE_ENV!=="production"?Km:iu;function iu(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Oc)&&(g.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Ke),Dr(e)){const a=Rt(e,t,!0);return n&&ca(a,n),Eo>0&&!s&&St&&(a.shapeFlag&6?St[St.indexOf(e)]=a:St.push(a)),a.patchFlag=-2,a}if(pu(e)&&(e=e.__vccOpts),t){t=Gm(t);let{class:a,style:l}=t;a&&!Be(a)&&(t.class=rs(a)),De(l)&&(ps(l)&&!ie(l)&&(l=qe({},l)),t.style=Oi(l))}const i=Be(e)?1:qm(e)?128:km(e)?64:De(e)?4:pe(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&ps(e)&&(e=ge(e),U("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`.",`
15
+ Component that was made reactive: `,e)),O(e,t,n,r,o,i,s,!0)}function Gm(e){return e?ps(e)||Vc(e)?qe({},e):e:null}function Rt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,c=t?ua(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&su(c),ref:t&&t.ref?n&&s?ie(s)?s.concat($s(t)):[s,$s(t)]:$s(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ie(a)?a.map(au):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?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&&Rt(e.ssContent),ssFallback:e.ssFallback&&Rt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Os(u,l.clone(u)),u}function au(e){const t=Rt(e);return ie(e.children)&&(t.children=e.children.map(au)),t}function Te(e=" ",t=0){return B(_o,null,e,t)}function Jm(e,t){const n=B(bo,null,e);return n.staticCount=t,n}function me(e="",t=!1){return t?(_(),ke(Ke,null,e)):B(Ke,null,e)}function jt(e){return e==null||typeof e=="boolean"?B(Ke):ie(e)?B(Ce,null,e.slice()):typeof e=="object"?Rn(e):B(_o,null,String(e))}function Rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rt(e)}function ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ie(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&&!Vc(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else pe(t)?(t={default:t,_ctx:Ye},n=32):(t=String(t),r&64?(n=16,t=[Te(t)]):n=8);e.children=t,e.shapeFlag|=n}function ua(...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=rs([t.class,r.class]));else if(o==="style")t.style=Oi([t.style,r.style]);else if(no(o)){const s=t[o],i=r[o];i&&s!==i&&!(ie(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Jt(e,t,n,r=null){kt(e,t,7,[n,r])}const Ym=Ic();let Xm=0;function Qm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Ym,s={uid:Xm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new kl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jc(r,o),emitsOptions:Qc(r,o),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:r.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,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=nm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Um.bind(null,s),e.ce&&e.ce(s),s}let Ge=null;const Is=()=>Ge||Ye;let Ds,da;{const e=Ei(),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)}};Ds=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),da=t("__VUE_SSR_SETTERS__",n=>As=n)}const Oo=e=>{const t=Ge;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},lu=()=>{Ge&&Ge.scope.off(),Ds(null)},ev=rn("slot,component");function fa(e,{isNativeTag:t}){(ev(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function cu(e){return e.vnode.shapeFlag&4}let As=!1;function tv(e,t=!1,n=!1){t&&da(t);const{props:r,children:o}=e.vnode,s=cu(e);hm(e,r,s,t),Sm(e,o,n);const i=s?nv(e,t):void 0;return t&&da(!1),i}function nv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&fa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)fa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)vc(s[i])}r.compilerOptions&&rv()&&U('"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,xc),g.NODE_ENV!=="production"&&rm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?sv(e):null,i=Oo(e);sn();const a=dn(o,e,0,[g.NODE_ENV!=="production"?Wt(e.props):e.props,s]);if(an(),i(),_i(a)){if(a.then(lu,lu),t)return a.then(l=>{uu(e,l,t)}).catch(l=>{ao(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";U(`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 uu(e,a,t)}else du(e,t)}function uu(e,t,n){pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:De(t)?(g.NODE_ENV!=="production"&&Dr(t)&&U("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=tc(t),g.NODE_ENV!=="production"&&om(e)):g.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),du(e,n)}let pa;const rv=()=>!pa;function du(e,t,n){const r=e.type;if(!e.render){if(!t&&pa&&!r.render){const o=r.template||Yi(e).template;if(o){g.NODE_ENV!=="production"&&pn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,c=qe(qe({isCustomElement:s,delimiters:a},i),l);r.render=pa(o,c),g.NODE_ENV!=="production"&&hn(e,"compile")}}e.render=r.render||We}{const o=Oo(e);sn();try{im(e)}finally{an(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===We&&!t&&(r.template?U('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".'):U("Component is missing template or render function: ",r))}const fu=g.NODE_ENV!=="production"?{get(e,t){return Ps(),ot(e,"get",""),e[t]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(e,t){return ot(e,"get",""),e[t]}};function ov(e){return new Proxy(e.slots,{get(t,n){return ot(e,"get","$slots"),t[n]}})}function sv(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&U("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ie(n)?r="array":He(n)&&(r="ref")),r!=="object"&&U(`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,fu))},get slots(){return r||(r=ov(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,fu),slots:e.slots,emit:e.emit,expose:t}}function ha(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tc($n(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cr)return cr[n](e)},has(t,n){return n in t||n in cr}})):e.proxy}const iv=/(?:^|[-_])(\w)/g,av=e=>e.replace(iv,t=>t.toUpperCase()).replace(/[-_]/g,"");function ma(e,t=!0){return pe(e)?e.displayName||e.name:e.name||t&&e.__name}function Vs(e,t,n=!1){let r=ma(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?av(r):n?"App":"Anonymous"}function pu(e){return pe(e)&&"__vccOpts"in e}const X=(e,t)=>{const n=dh(e,t,As);if(g.NODE_ENV!=="production"){const r=Is();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Le(e,t,n){const r=arguments.length;return r===2?De(t)&&!ie(t)?Dr(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Dr(n)&&(n=[n]),B(e,t,n))}function lv(){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 De(d)?d.__isVue?["div",e,"VueInstance"]:He(d)?["div",{},["span",e,u(d)],"<",a(d.value),">"]:ln(d)?["div",{},["span",e,un(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${cn(d)?" (readonly)":""}`]:cn(d)?["div",{},["span",e,un(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",ge(d.props))),d.setupState!==Me&&f.push(i("setup",d.setupState)),d.data!==Me&&f.push(i("data",ge(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const y=l(d,"inject");return y&&f.push(i("injected",y)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=qe({},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]:De(d)?["object",{object:f?ge(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(pe(m))return;const y={};for(const E in d.ctx)c(m,E,f)&&(y[E]=d.ctx[E]);return y}function c(d,f,m){const y=d[m];if(ie(y)&&y.includes(f)||De(y)&&f in y||d.extends&&c(d.extends,f,m)||d.mixins&&d.mixins.some(E=>c(E,f,m)))return!0}function u(d){return un(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const hu="3.4.38",jn=g.NODE_ENV!=="production"?U:We;var mn={};const cv="http://www.w3.org/2000/svg",uv="http://www.w3.org/1998/Math/MathML",vn=typeof document<"u"?document:null,mu=vn&&vn.createElement("template"),dv={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"?vn.createElementNS(cv,e):t==="mathml"?vn.createElementNS(uv,e):n?vn.createElement(e,{is:n}):vn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>vn.createTextNode(e),createComment:e=>vn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vn.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{mu.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=mu.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]}},Ln="transition",No="animation",So=Symbol("_vtc"),xo=(e,{slots:t})=>Le(Hh,fv(e),t);xo.displayName="Transition";const vu={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};xo.props=qe({},gc,vu);const mr=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},gu=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function fv(e){const t={};for(const j in e)j in vu||(t[j]=e[j]);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:c=i,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,y=pv(o),E=y&&y[0],S=y&&y[1],{onBeforeEnter:A,onEnter:F,onEnterCancelled:C,onLeave:z,onLeaveCancelled:$,onBeforeAppear:Z=A,onAppear:x=F,onAppearCancelled:fe=C}=t,Y=(j,oe,w)=>{vr(j,oe?u:a),vr(j,oe?c:i),w&&w()},V=(j,oe)=>{j._isLeaving=!1,vr(j,d),vr(j,m),vr(j,f),oe&&oe()},P=j=>(oe,w)=>{const I=j?x:F,ne=()=>Y(oe,j,w);mr(I,[oe,ne]),yu(()=>{vr(oe,j?l:s),Mn(oe,j?u:a),gu(I)||_u(oe,r,E,ne)})};return qe(t,{onBeforeEnter(j){mr(A,[j]),Mn(j,s),Mn(j,i)},onBeforeAppear(j){mr(Z,[j]),Mn(j,l),Mn(j,c)},onEnter:P(!1),onAppear:P(!0),onLeave(j,oe){j._isLeaving=!0;const w=()=>V(j,oe);Mn(j,d),Mn(j,f),vv(),yu(()=>{j._isLeaving&&(vr(j,d),Mn(j,m),gu(z)||_u(j,r,S,w))}),mr(z,[j,w])},onEnterCancelled(j){Y(j,!1),mr(C,[j])},onAppearCancelled(j){Y(j,!0),mr(fe,[j])},onLeaveCancelled(j){V(j),mr($,[j])}})}function pv(e){if(e==null)return null;if(De(e))return[va(e.enter),va(e.leave)];{const t=va(e);return[t,t]}}function va(e){const t=Tp(e);return mn.NODE_ENV!=="production"&&Eh(t,"<transition> explicit duration"),t}function Mn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[So]||(e[So]=new Set)).add(t)}function vr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[So];n&&(n.delete(t),n.size||(e[So]=void 0))}function yu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hv=0;function _u(e,t,n,r){const o=e._endId=++hv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=mv(e,t);if(!i)return r();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,f),s()},f=m=>{m.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,f)}function mv(e,t){const n=window.getComputedStyle(e),r=y=>(n[y]||"").split(", "),o=r(`${Ln}Delay`),s=r(`${Ln}Duration`),i=bu(o,s),a=r(`${No}Delay`),l=r(`${No}Duration`),c=bu(a,l);let u=null,d=0,f=0;t===Ln?i>0&&(u=Ln,d=i,f=s.length):t===No?c>0&&(u=No,d=c,f=l.length):(d=Math.max(i,c),u=d>0?i>c?Ln:No:null,f=u?u===Ln?s.length:l.length:0);const m=u===Ln&&/\b(transform|all)(,|$)/.test(r(`${Ln}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:m}}function bu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>wu(n)+wu(e[r])))}function wu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vv(){return document.body.offsetHeight}function gv(e,t,n){const r=e[So];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Eu=Symbol("_vod"),yv=Symbol("_vsh"),_v=Symbol(mn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),bv=/(^|;)\s*display\s*:/;function wv(e,t,n){const r=e.style,o=Be(n);let s=!1;if(n&&!o){if(t)if(Be(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Rs(r,a,"")}else for(const i in t)n[i]==null&&Rs(r,i,"");for(const i in n)i==="display"&&(s=!0),Rs(r,i,n[i])}else if(o){if(t!==n){const i=r[_v];i&&(n+=";"+i),r.cssText=n,s=bv.test(n)}}else t&&e.removeAttribute("style");Eu in e&&(e[Eu]=s?r.display:"",e[yv]&&(r.display="none"))}const Ev=/[^\\];\s*$/,Ou=/\s*!important$/;function Rs(e,t,n){if(ie(n))n.forEach(r=>Rs(e,t,r));else if(n==null&&(n=""),mn.NODE_ENV!=="production"&&Ev.test(n)&&jn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Ov(e,t);Ou.test(n)?e.setProperty(on(r),n.replace(Ou,""),"important"):e[r]=n}}const Nu=["Webkit","Moz","ms"],ga={};function Ov(e,t){const n=ga[t];if(n)return n;let r=Ot(t);if(r!=="filter"&&r in e)return ga[t]=r;r=tr(r);for(let o=0;o<Nu.length;o++){const s=Nu[o]+r;if(s in e)return ga[t]=s}return t}const Su="http://www.w3.org/1999/xlink";function xu(e,t,n,r,o,s=Up(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Su,t.slice(6,t.length)):e.setAttributeNS(Su,t,n):n==null||s&&!Nl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":kn(n)?String(n):n)}function Nv(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=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?"":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=Nl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){mn.NODE_ENV!=="production"&&!s&&jn(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function Sv(e,t,n,r){e.addEventListener(t,n,r)}function xv(e,t,n,r){e.removeEventListener(t,n,r)}const ku=Symbol("_vei");function kv(e,t,n,r,o=null){const s=e[ku]||(e[ku]={}),i=s[t];if(r&&i)i.value=mn.NODE_ENV!=="production"?Tu(r,t):r;else{const[a,l]=Cv(t);if(r){const c=s[t]=$v(mn.NODE_ENV!=="production"?Tu(r,t):r,o);Sv(e,a,c,l)}else i&&(xv(e,a,i,l),s[t]=void 0)}}const Cu=/(?:Once|Passive|Capture)$/;function Cv(e){let t;if(Cu.test(e)){t={};let r;for(;r=e.match(Cu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):on(e.slice(2)),t]}let ya=0;const Tv=Promise.resolve(),Pv=()=>ya||(Tv.then(()=>ya=0),ya=Date.now());function $v(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;kt(Iv(r,n.value),t,5,[r])};return n.value=e,n.attached=Pv(),n}function Tu(e,t){return pe(e)||ie(e)?e:(jn(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
16
+ Expected function or array of functions, received type ${typeof e}.`),We)}function Iv(e,t){if(ie(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 Pu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?gv(e,r,i):t==="style"?wv(e,n,r):no(t)?Qo(t)||kv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Av(e,t,r,i))?(Nv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),xu(e,t,r,i))};function Av(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&pe(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 Pu(t)&&Be(n)?!1:t in e}const Vv=["ctrl","shift","alt","meta"],Rv={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)=>Vv.some(n=>e[`${n}Key`]&&!t.includes(n))},jv=(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=Rv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Lv=qe({patchProp:Dv},dv);let $u;function Mv(){return $u||($u=Im(Lv))}const Uv=(...e)=>{const t=Mv().createApp(...e);mn.NODE_ENV!=="production"&&(Bv(t),Hv(t));const{mount:n}=t;return t.mount=r=>{const o=Zv(r);if(!o)return;const s=t._component;!pe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,Fv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Fv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>jp(t)||Lp(t)||Mp(t),writable:!1})}function Hv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){jn("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 jn(r),n},set(){jn(r)}})}}function Zv(e){if(Be(e)){const t=document.querySelector(e);return mn.NODE_ENV!=="production"&&!t&&jn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return mn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&jn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var qv={};function Wv(){lv()}qv.NODE_ENV!=="production"&&Wv();let js;const zv=new Uint8Array(16);function Kv(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(zv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Gv(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 Iu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _a(e,t,n){if(Iu.randomUUID&&!t&&!e)return Iu.randomUUID();e=e||{};const r=e.random||(e.rng||Kv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Gv(r)}var Un=Symbol("storefront");function Jv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Yv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Xv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed")}),Qv=v.discriminatedUnion("event",[Yv,Xv]);function Du(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.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Qv.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 Ls=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=X(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=T(null),this.loadedUser=T(!1),this.debouncedPushOrderContent=Jv(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=T({id:_a(),status:eo.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=T(JSON.parse(i)),this.refreshOrder()):this.currentOrder=T({id:_a(),status:eo.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),c=l.get("mb_intent"),u=l.get("mb_endpoint");if(c==="checkout"&&l.get("mb_complete")&&u){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(u));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);Du(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Xe(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Xe(this.loadedUser,n=>{n&&t()},{immediate:!0})})}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",()=>t())}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Un,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 pi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);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))}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!==eo.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:_a(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:eo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Ls.userKey="moonbase_user",Ls.sessionKey="moonbase_session",Ls.storefrontKey="moonbase_storefront";var eg=Ls;function Au(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function Vu(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Ms(e){const t=$e(Un);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 tg(e,t){const n=$e(Un),r=hh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),l=n.stateFactory(`activation-request-${r}-completing`,!1),c=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ht.Completed,l.value=!1):c.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ht.Fulfilled&&(l.value=!0,u()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Zi(()=>{c.value&&clearTimeout(c.value)}),Xe(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Ht.Fulfilled&&(l.value=!0,u())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:l,error:s,isInstalled:X(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ht.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,l.value=!0,u()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,l.value=!0,u()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ht.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ng(e){const t=$e(Un);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 Pr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}}}}function ba(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{items:X(()=>t.currentOrder.value.items.map(n=>{if(n.type==="Product"){const r=t.storefront.value.products.find(i=>i.id===n.productId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,product:r,variation:s,price:s==null?void 0:s.price}}else{const r=t.storefront.value.bundles.find(i=>i.id===n.bundleId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,bundle:r,variation:s,price:s==null?void 0:s.price}}})),currency:X(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:X(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,c,u,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(S=>S.id===s.productId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(l=(a=E==null?void 0:E.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(S=>S.id===s.bundleId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(d=(u=E==null?void 0:E.price[n])!=null?u:(c=m==null?void 0:m.defaultVariation)==null?void 0:c.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=b(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},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},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,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{Du(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function bt(e){const t=e??$e(Un);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 c=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=c,t.updateStorefront(),c},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),t.updateUser()}}}function rg(e,t){const n={endpoint:e};return new eg(n,new Ep(n),(r,o)=>T(o))}var Ru=!1;function Us(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 wa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function og(){return ju().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ju(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const sg=typeof Proxy=="function",ig="devtools-plugin:setup",ag="plugin:settings:set";let Ar,Ea;function lg(){var e;return Ar!==void 0||(typeof window<"u"&&window.performance?(Ar=!0,Ea=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ar=!0,Ea=globalThis.perf_hooks.performance):Ar=!1),Ar}function cg(){return lg()?Ea.now():Date.now()}class ug{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 cg()}},n&&n.on(ag,(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(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}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 Lu(e,t){const n=e,r=ju(),o=og(),s=sg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ig,e,t);else{const i=s?new ug(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Pe={};let ko;const Co=e=>ko=e,Mu=Pe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function gr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yt||(Yt={}));const yr=typeof window<"u",Uu=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 dg(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 Oa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Hu(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Fu(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Fs(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 Bs=typeof navigator=="object"?navigator:{userAgent:""},Bu=/Macintosh/.test(Bs.userAgent)&&/AppleWebKit/.test(Bs.userAgent)&&!/Safari/.test(Bs.userAgent),Hu=yr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Bu?fg:"msSaveOrOpenBlob"in Bs?pg:hg:()=>{};function fg(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?Fu(r.href)?Oa(e,t,n):(r.target="_blank",Fs(r)):Fs(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Fs(r)},0))}function pg(e,t="download",n){if(typeof e=="string")if(Fu(e))Oa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Fs(r)})}else navigator.msSaveOrOpenBlob(dg(e,n),t)}function hg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Oa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Uu.HTMLElement))||"safari"in Uu,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Bu)&&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 tt(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 Na(e){return"_a"in e&&"install"in e}function Zu(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function qu(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(tt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function mg(e){if(!Zu())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(qu(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vg(e){if(!Zu())try{Wu(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(qu(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function gg(e){try{Hu(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){tt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let gn;function yg(){gn||(gn=document.createElement("input"),gn.type="file",gn.accept=".json");function e(){return new Promise((t,n)=>{gn.onchange=async()=>{const r=gn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},gn.oncancel=()=>t(null),gn.onerror=n,gn.click()})}return e}async function _g(e){try{const n=await yg()();if(!n)return;const{text:r,file:o}=n;Wu(e,JSON.parse(r)),tt(`Global state imported from "${o.name}".`)}catch(t){tt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Wu(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 Lt(e){return{_custom:{display:e}}}const zu="🍍 Pinia (root)",Hs="_root";function bg(e){return Na(e)?{id:Hs,label:zu}:{id:e.$id,label:e.$id}}function wg(e){if(Na(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 Eg(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:Lt(e.type),key:Lt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Og(e){switch(e){case Yt.direct:return"mutation";case Yt.patchFunction:return"$patch";case Yt.patchObject:return"$patch";default:return"unknown"}}let Vr=!0;const Zs=[],_r="pinia:mutations",pt="pinia",{assign:Ng}=Object,qs=e=>"🍍 "+e;function Sg(e,t){Lu({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,app:e},n=>{typeof n.now!="function"&&tt("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:_r,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{mg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{gg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await _g(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"?tt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),tt(`Store "${r}" reset.`)):tt(`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:qs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ge(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,c)=>(l[c]=a.$state[c],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:qs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,c)=>{try{l[c]=a[c]}catch(u){l[c]=u}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()):zu.toLowerCase().includes(r.filter.toLowerCase())):o).map(bg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Hs&&(globalThis.$store=ge(o)),r.state=wg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Na(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Vr=!1,r.set(s,i,r.state.value),Vr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return tt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return tt(`Invalid path for store "${o}":
17
17
  ${i}
18
- Only state can be modified.`);i[0]="$state",Vr=!1,r.set(s,i,r.state.value),Vr=!0}})})}function xg(e,t){Zs.includes(qs(t.$id))||Zs.push(qs(t.$id)),Lu({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,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:c,args:l})=>{const u=Ku++;n.addTimelineEvent({layerId:_r,event:{time:r(),title:"🛫 "+c,subtitle:"start",data:{store:Lt(t.$id),action:Lt(c),args:l},groupId:u}}),i(d=>{Fn=void 0,n.addTimelineEvent({layerId:_r,event:{time:r(),title:"🛬 "+c,subtitle:"end",data:{store:Lt(t.$id),action:Lt(c),args:l,result:d},groupId:u}})}),a(d=>{Fn=void 0,n.addTimelineEvent({layerId:_r,event:{time:r(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:Lt(t.$id),action:Lt(c),args:l,error:d},groupId:u}})})},!0),t._customProperties.forEach(i=>{Xe(()=>b(t[i]),(a,c)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Vr&&n.addTimelineEvent({layerId:_r,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:c},groupId:Fn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},c)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Vr)return;const l={time:r(),title:Og(a),data:Ng({store:Lt(t.$id)},Eg(i)),groupId:Fn};a===Yt.patchFunction?l.subtitle="⤵️":a===Yt.patchObject?l.subtitle="🧩":i&&!Array.isArray(i)&&(l.subtitle=i.type),i&&(l.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:_r,event:l})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=$n(i=>{o(i),n.addTimelineEvent({layerId:_r,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Lt(t.$id),info:Lt("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&&tt(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&tt(`"${t.$id}" store installed 🆕`)})}let Ku=0,Fn;function Gu(e,t,n){const r=t.reduce((o,s)=>(o[s]=ge(e)[s],o),{});for(const o in r)e[o]=function(){const s=Ku,i=n?new Proxy(e,{get(...c){return Fn=s,Reflect.get(...c)},set(...c){return Fn=s,Reflect.set(...c)}}):e;Fn=s;const a=r[o].apply(i,arguments);return Fn=void 0,a}}function kg({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Gu(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ge(t)._hotUpdate=function(o){r.apply(this,arguments),Gu(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}xg(e,t)}}function Cg(){const e=Cl(!0),t=e.run(()=>T({}));let n=[],r=[];const o=$n({install(s){Co(o),o._a=s,s.provide(Mu,o),s.config.globalProperties.$pinia=o,Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr&&Sg(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Ru?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(kg),o}function Ju(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];gr(o)&&gr(r)&&!He(r)&&!ln(r)?e[n]=Ju(o,r):e[n]=r}return e}const Yu=()=>{};function Xu(e,t,n,r=Yu){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Tl()&&Bp(o),o}function Rr(e,...t){e.slice().forEach(n=>{n(...t)})}const Tg=e=>e(),Qu=Symbol(),Sa=Symbol();function xa(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];gr(o)&&gr(r)&&e.hasOwnProperty(n)&&!He(r)&&!ln(r)?e[n]=xa(o,r):e[n]=r}return e}const Pg=Pe.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function $g(e){return!gr(e)||!e.hasOwnProperty(Pg)}const{assign:Tt}=Object;function ed(e){return!!(He(e)&&e.effect)}function td(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let c;function l(){!a&&(Pe.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const u=Pe.NODE_ENV!=="production"&&r?nc(T(o?o():{}).value):nc(n.state.value[e]);return Tt(u,s,Object.keys(i||{}).reduce((d,f)=>(Pe.NODE_ENV!=="production"&&f in u&&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]=$n(X(()=>{Co(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return c=ka(e,l,t,n,r,!0),c}function ka(e,t,n={},r,o,s){let i;const a=Tt({actions:{}},n);if(Pe.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const c={deep:!0};Pe.NODE_ENV!=="production"&&!Ru&&(c.onTrigger=V=>{l?m=V:l==!1&&!x._hotUpdating&&(Array.isArray(m)?m.push(V):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,u,d=[],f=[],m;const y=r.state.value[e];!s&&!y&&(Pe.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const E=T({});let S;function A(V){let P;l=u=!1,Pe.NODE_ENV!=="production"&&(m=[]),typeof V=="function"?(V(r.state.value[e]),P={type:Yt.patchFunction,storeId:e,events:m}):(xa(r.state.value[e],V),P={type:Yt.patchObject,payload:V,storeId:e,events:m});const j=S=Symbol();co().then(()=>{S===j&&(l=!0)}),u=!0,Rr(d,P,r.state.value[e])}const F=s?function(){const{state:P}=n,j=P?P():{};this.$patch(oe=>{Tt(oe,j)})}:Pe.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Yu;function C(){i.stop(),d=[],f=[],r._s.delete(e)}const z=(V,P="")=>{if(Qu in V)return V[Sa]=P,V;const j=function(){Co(r);const oe=Array.from(arguments),w=[],I=[];function ne(ce){w.push(ce)}function ae(ce){I.push(ce)}Rr(f,{args:oe,name:j[Sa],store:x,after:ne,onError:ae});let re;try{re=V.apply(this&&this.$id===e?this:x,oe)}catch(ce){throw Rr(I,ce),ce}return re instanceof Promise?re.then(ce=>(Rr(w,ce),ce)).catch(ce=>(Rr(I,ce),Promise.reject(ce))):(Rr(w,re),re)};return j[Qu]=!0,j[Sa]=P,j},$=$n({actions:{},getters:{},state:[],hotState:E}),Z={_p:r,$id:e,$onAction:Xu.bind(null,f),$patch:A,$reset:F,$subscribe(V,P={}){const j=Xu(d,V,P.detached,()=>oe()),oe=i.run(()=>Xe(()=>r.state.value[e],w=>{(P.flush==="sync"?u:l)&&V({storeId:e,type:Yt.direct,events:m},w)},Tt({},c,P)));return j},$dispose:C},x=so(Pe.NODE_ENV!=="production"||Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr?Tt({_hmrPayload:$,_customProperties:$n(new Set)},Z):Z);r._s.set(e,x);const Y=(r._a&&r._a.runWithContext||Tg)(()=>r._e.run(()=>(i=Cl()).run(()=>t({action:z}))));for(const V in Y){const P=Y[V];if(He(P)&&!ed(P)||ln(P))Pe.NODE_ENV!=="production"&&o?Us(E.value,V,Di(Y,V)):s||(y&&$g(P)&&(He(P)?P.value=y[V]:xa(P,y[V])),r.state.value[e][V]=P),Pe.NODE_ENV!=="production"&&$.state.push(V);else if(typeof P=="function"){const j=Pe.NODE_ENV!=="production"&&o?P:z(P,V);Y[V]=j,Pe.NODE_ENV!=="production"&&($.actions[V]=P),a.actions[V]=P}else Pe.NODE_ENV!=="production"&&ed(P)&&($.getters[V]=s?n.getters[V]:P,yr&&(Y._getters||(Y._getters=$n([]))).push(V))}if(Tt(x,Y),Tt(ge(x),Y),Object.defineProperty(x,"$state",{get:()=>Pe.NODE_ENV!=="production"&&o?E.value:r.state.value[e],set:V=>{if(Pe.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");A(P=>{Tt(P,V)})}}),Pe.NODE_ENV!=="production"&&(x._hotUpdate=$n(V=>{x._hotUpdating=!0,V._hmrPayload.state.forEach(P=>{if(P in x.$state){const j=V.$state[P],oe=x.$state[P];typeof j=="object"&&gr(j)&&gr(oe)?Ju(j,oe):V.$state[P]=oe}Us(x,P,Di(V.$state,P))}),Object.keys(x.$state).forEach(P=>{P in V.$state||wa(x,P)}),l=!1,u=!1,r.state.value[e]=Di(V._hmrPayload,"hotState"),u=!0,co().then(()=>{l=!0});for(const P in V._hmrPayload.actions){const j=V[P];Us(x,P,z(j,P))}for(const P in V._hmrPayload.getters){const j=V._hmrPayload.getters[P],oe=s?X(()=>(Co(r),j.call(x,x))):j;Us(x,P,oe)}Object.keys(x._hmrPayload.getters).forEach(P=>{P in V._hmrPayload.getters||wa(x,P)}),Object.keys(x._hmrPayload.actions).forEach(P=>{P in V._hmrPayload.actions||wa(x,P)}),x._hmrPayload=V._hmrPayload,x._getters=V._getters,x._hotUpdating=!1})),Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr){const V={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(P=>{Object.defineProperty(x,P,Tt({value:x[P]},V))})}return r._p.forEach(V=>{if(Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr){const P=i.run(()=>V({store:x,app:r._a,pinia:r,options:a}));Object.keys(P||{}).forEach(j=>x._customProperties.add(j)),Tt(x,P)}else Tt(x,i.run(()=>V({store:x,app:r._a,pinia:r,options:a})))}),Pe.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
18
+ Only state can be modified.`);i[0]="$state",Vr=!1,r.set(s,i,r.state.value),Vr=!0}})})}function xg(e,t){Zs.includes(qs(t.$id))||Zs.push(qs(t.$id)),Lu({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,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:c})=>{const u=Ku++;n.addTimelineEvent({layerId:_r,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Lt(t.$id),action:Lt(l),args:c},groupId:u}}),i(d=>{Fn=void 0,n.addTimelineEvent({layerId:_r,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Lt(t.$id),action:Lt(l),args:c,result:d},groupId:u}})}),a(d=>{Fn=void 0,n.addTimelineEvent({layerId:_r,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Lt(t.$id),action:Lt(l),args:c,error:d},groupId:u}})})},!0),t._customProperties.forEach(i=>{Xe(()=>b(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Vr&&n.addTimelineEvent({layerId:_r,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Fn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Vr)return;const c={time:r(),title:Og(a),data:Ng({store:Lt(t.$id)},Eg(i)),groupId:Fn};a===Yt.patchFunction?c.subtitle="⤵️":a===Yt.patchObject?c.subtitle="🧩":i&&!Array.isArray(i)&&(c.subtitle=i.type),i&&(c.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:_r,event:c})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=$n(i=>{o(i),n.addTimelineEvent({layerId:_r,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Lt(t.$id),info:Lt("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&&tt(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&tt(`"${t.$id}" store installed 🆕`)})}let Ku=0,Fn;function Gu(e,t,n){const r=t.reduce((o,s)=>(o[s]=ge(e)[s],o),{});for(const o in r)e[o]=function(){const s=Ku,i=n?new Proxy(e,{get(...l){return Fn=s,Reflect.get(...l)},set(...l){return Fn=s,Reflect.set(...l)}}):e;Fn=s;const a=r[o].apply(i,arguments);return Fn=void 0,a}}function kg({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Gu(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ge(t)._hotUpdate=function(o){r.apply(this,arguments),Gu(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}xg(e,t)}}function Cg(){const e=Cl(!0),t=e.run(()=>T({}));let n=[],r=[];const o=$n({install(s){Co(o),o._a=s,s.provide(Mu,o),s.config.globalProperties.$pinia=o,Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr&&Sg(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Ru?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(kg),o}function Ju(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];gr(o)&&gr(r)&&!He(r)&&!ln(r)?e[n]=Ju(o,r):e[n]=r}return e}const Yu=()=>{};function Xu(e,t,n,r=Yu){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Tl()&&Bp(o),o}function Rr(e,...t){e.slice().forEach(n=>{n(...t)})}const Tg=e=>e(),Qu=Symbol(),Sa=Symbol();function xa(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];gr(o)&&gr(r)&&e.hasOwnProperty(n)&&!He(r)&&!ln(r)?e[n]=xa(o,r):e[n]=r}return e}const Pg=Pe.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function $g(e){return!gr(e)||!e.hasOwnProperty(Pg)}const{assign:Tt}=Object;function ed(e){return!!(He(e)&&e.effect)}function td(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function c(){!a&&(Pe.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const u=Pe.NODE_ENV!=="production"&&r?nc(T(o?o():{}).value):nc(n.state.value[e]);return Tt(u,s,Object.keys(i||{}).reduce((d,f)=>(Pe.NODE_ENV!=="production"&&f in u&&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]=$n(X(()=>{Co(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=ka(e,c,t,n,r,!0),l}function ka(e,t,n={},r,o,s){let i;const a=Tt({actions:{}},n);if(Pe.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Pe.NODE_ENV!=="production"&&!Ru&&(l.onTrigger=V=>{c?m=V:c==!1&&!x._hotUpdating&&(Array.isArray(m)?m.push(V):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let c,u,d=[],f=[],m;const y=r.state.value[e];!s&&!y&&(Pe.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const E=T({});let S;function A(V){let P;c=u=!1,Pe.NODE_ENV!=="production"&&(m=[]),typeof V=="function"?(V(r.state.value[e]),P={type:Yt.patchFunction,storeId:e,events:m}):(xa(r.state.value[e],V),P={type:Yt.patchObject,payload:V,storeId:e,events:m});const j=S=Symbol();co().then(()=>{S===j&&(c=!0)}),u=!0,Rr(d,P,r.state.value[e])}const F=s?function(){const{state:P}=n,j=P?P():{};this.$patch(oe=>{Tt(oe,j)})}:Pe.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Yu;function C(){i.stop(),d=[],f=[],r._s.delete(e)}const z=(V,P="")=>{if(Qu in V)return V[Sa]=P,V;const j=function(){Co(r);const oe=Array.from(arguments),w=[],I=[];function ne(ce){w.push(ce)}function ae(ce){I.push(ce)}Rr(f,{args:oe,name:j[Sa],store:x,after:ne,onError:ae});let re;try{re=V.apply(this&&this.$id===e?this:x,oe)}catch(ce){throw Rr(I,ce),ce}return re instanceof Promise?re.then(ce=>(Rr(w,ce),ce)).catch(ce=>(Rr(I,ce),Promise.reject(ce))):(Rr(w,re),re)};return j[Qu]=!0,j[Sa]=P,j},$=$n({actions:{},getters:{},state:[],hotState:E}),Z={_p:r,$id:e,$onAction:Xu.bind(null,f),$patch:A,$reset:F,$subscribe(V,P={}){const j=Xu(d,V,P.detached,()=>oe()),oe=i.run(()=>Xe(()=>r.state.value[e],w=>{(P.flush==="sync"?u:c)&&V({storeId:e,type:Yt.direct,events:m},w)},Tt({},l,P)));return j},$dispose:C},x=so(Pe.NODE_ENV!=="production"||Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr?Tt({_hmrPayload:$,_customProperties:$n(new Set)},Z):Z);r._s.set(e,x);const Y=(r._a&&r._a.runWithContext||Tg)(()=>r._e.run(()=>(i=Cl()).run(()=>t({action:z}))));for(const V in Y){const P=Y[V];if(He(P)&&!ed(P)||ln(P))Pe.NODE_ENV!=="production"&&o?Us(E.value,V,Di(Y,V)):s||(y&&$g(P)&&(He(P)?P.value=y[V]:xa(P,y[V])),r.state.value[e][V]=P),Pe.NODE_ENV!=="production"&&$.state.push(V);else if(typeof P=="function"){const j=Pe.NODE_ENV!=="production"&&o?P:z(P,V);Y[V]=j,Pe.NODE_ENV!=="production"&&($.actions[V]=P),a.actions[V]=P}else Pe.NODE_ENV!=="production"&&ed(P)&&($.getters[V]=s?n.getters[V]:P,yr&&(Y._getters||(Y._getters=$n([]))).push(V))}if(Tt(x,Y),Tt(ge(x),Y),Object.defineProperty(x,"$state",{get:()=>Pe.NODE_ENV!=="production"&&o?E.value:r.state.value[e],set:V=>{if(Pe.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");A(P=>{Tt(P,V)})}}),Pe.NODE_ENV!=="production"&&(x._hotUpdate=$n(V=>{x._hotUpdating=!0,V._hmrPayload.state.forEach(P=>{if(P in x.$state){const j=V.$state[P],oe=x.$state[P];typeof j=="object"&&gr(j)&&gr(oe)?Ju(j,oe):V.$state[P]=oe}Us(x,P,Di(V.$state,P))}),Object.keys(x.$state).forEach(P=>{P in V.$state||wa(x,P)}),c=!1,u=!1,r.state.value[e]=Di(V._hmrPayload,"hotState"),u=!0,co().then(()=>{c=!0});for(const P in V._hmrPayload.actions){const j=V[P];Us(x,P,z(j,P))}for(const P in V._hmrPayload.getters){const j=V._hmrPayload.getters[P],oe=s?X(()=>(Co(r),j.call(x,x))):j;Us(x,P,oe)}Object.keys(x._hmrPayload.getters).forEach(P=>{P in V._hmrPayload.getters||wa(x,P)}),Object.keys(x._hmrPayload.actions).forEach(P=>{P in V._hmrPayload.actions||wa(x,P)}),x._hmrPayload=V._hmrPayload,x._getters=V._getters,x._hotUpdating=!1})),Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr){const V={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(P=>{Object.defineProperty(x,P,Tt({value:x[P]},V))})}return r._p.forEach(V=>{if(Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr){const P=i.run(()=>V({store:x,app:r._a,pinia:r,options:a}));Object.keys(P||{}).forEach(j=>x._customProperties.add(j)),Tt(x,P)}else Tt(x,i.run(()=>V({store:x,app:r._a,pinia:r,options:a})))}),Pe.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
19
19
  state: () => new MyClass()
20
- Found in store "${x.$id}".`),y&&s&&n.hydrate&&n.hydrate(x.$state,y),l=!0,u=!0,x}function Ig(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,c){const l=pm();if(a=(Pe.NODE_ENV==="test"&&ko&&ko._testing?null:a)||(l?$e(Mu,null):null),a&&Co(a),Pe.NODE_ENV!=="production"&&!ko)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
+ Found in store "${x.$id}".`),y&&s&&n.hydrate&&n.hydrate(x.$state,y),c=!0,u=!0,x}function Ig(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const c=pm();if(a=(Pe.NODE_ENV==="test"&&ko&&ko._testing?null:a)||(c?$e(Mu,null):null),a&&Co(a),Pe.NODE_ENV!=="production"&&!ko)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
21
21
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
22
- This will fail in production.`);a=ko,a._s.has(r)||(s?ka(r,t,o,a):td(r,o,a),Pe.NODE_ENV!=="production"&&(i._pinia=a));const u=a._s.get(r);if(Pe.NODE_ENV!=="production"&&c){const d="__hot:"+r,f=s?ka(d,t,o,a,!0):td(d,Tt({},o),a,!0);c._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Pe.NODE_ENV!=="production"&&yr){const d=Is();if(d&&d.proxy&&!c){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=u}}return u}return i.$id=r,i}var pe=(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))(pe||{});const Dg={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}}},Ws=Symbol("options");var ke=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(ke||{});const Ae=Ig("ui",()=>{const e=T("None"),t=T(null),n=T(null),r=T(null);function o(l,u,d){n.value=d??null,t.value=u,e.value=l}function s(l,u,d){r.value=[l,u,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const l=r.value;i(),co(()=>{if(l){const[u,d,f]=l;n.value=f??null,t.value=d,e.value=u}})}function c(l){return n.value===null||!n.value[l]?null:n.value[l]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:c}}),Xt=e=>new Promise(t=>setTimeout(t,e)),Ag=["data-visible","data-location"],Vg={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},Rg=[Jm('<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)],jg=["disabled"],Lg=he({__name:"Toolbar",setup(e){const t=T(!1),n=Ae(),r=St(),o=$e(Ws);return Re(()=>{Xt(100).then(()=>t.value=!0)}),(s,i)=>{var a,c,l,u,d;return _(),N("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(ke).None?"true":"false","data-location":b(o).toolbar.location},[(a=b(o))!=null&&a.toolbar.show.moonbase?(_(),N("a",Vg,Rg)):me("",!0),(c=b(o))!=null&&c.toolbar.show.cart?(_(),N("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>b(n).show(b(ke).Cart,b(pe).AddToCart))}," Cart ")):me("",!0),(l=b(o))!=null&&l.toolbar.show.account&&!b(r).user.value?(_(),N("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:i[1]||(i[1]=f=>b(n).show(b(ke).Authentication,b(pe).SignIn))}," Log in ",8,jg)):(u=b(o))!=null&&u.toolbar.show.account?(_(),N("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>b(n).show(b(ke).Customer,b(pe).ViewAccount))},K((d=b(r).user.value)==null?void 0:d.name),1)):me("",!0)],8,Ag)}}}),Mg=["hidden"],Ug=["for"],Fg=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],Bg=["id"],Hg=["id"],Zg=he({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)=>(_(),N("div",{class:"moonbase:input",hidden:t.hidden||void 0},[O("label",{for:`mb-${t.name}`},K(t.label),9,Ug),O("input",ua({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,Fg),t.error?(_(),N("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,Bg)):t.hint?(_(),N("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,Hg)):me("",!0)],8,Mg))}}),Bn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},gt=Bn(Zg,[["__scopeId","data-v-65d18d50"]]),qg={},nd=e=>(Uh("data-v-f9a322c4"),e=e(),Fh(),e),Wg={fill:"none",viewBox:"0 0 24 24"},zg=[nd(()=>O("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),nd(()=>O("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))];function Kg(e,t){return _(),N("svg",Wg,zg)}const Pt=Bn(qg,[["render",Kg],["__scopeId","data-v-f9a322c4"]]),Gg=["disabled"],rd=Symbol("form-state"),Hn=he({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=T(!1),r=T(!1),o=T(!1);dt(rd,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await Xt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await Xt(2500),o.value=!1}}return(i,a)=>(_(),N("form",{disabled:n.value||r.value,onSubmit:jv(s,["prevent"])},[Wi(i.$slots,"default")],40,Gg))}}),Jg=["disabled","data-success","data-error","data-working"],Yg=["data-visible"],Zn=Bn(he({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=$e(rd),s=X(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(_(),N("button",{class:"moonbase:submit-button",type:"submit",disabled:b(r)||b(o)||b(n),"data-success":b(r)||void 0,"data-error":b(o)||void 0,"data-working":b(n)||void 0},[O("div",{"data-visible":b(n)||void 0,"aria-hidden":"true"},[b(n)?(_(),xe(Pt,{key:0})):me("",!0)],8,Yg),Te(" "+K(s.value),1)],8,Jg))}}),[["__scopeId","data-v-052f0f36"]]),Xg={class:"moonbase:checkbox"},Qg={class:"moonbase:checkbox-container"},ey=["id","name","value","disabled","aria-invalid","aria-describedby"],ty={class:"moonbase:checkbox-description"},ny=["for"],ry=["id"],oy=["id"],od=Bn(he({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(_(),N("div",Xg,[O("div",Qg,[O("input",ua({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,ey)]),O("div",ty,[O("label",{for:`mb-${t.name}`},K(t.label),9,ny),t.error?(_(),N("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,ry)):t.hint?(_(),N("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,oy)):me("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),sy=["data-visible"],iy=he({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ae(),o=St(),s=T(""),i=T(r.getParameter("email")??""),a=T(""),c=T(!1),l=T(null);async function u(){l.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,c.value);Xt(1500).then(()=>n("signedUp",d))}catch(d){throw l.value=d.message,d}}return(d,f)=>(_(),xe(Hn,{handler:u,class:"moonbase:sign-up"},{default:ye(()=>[B(gt,{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"]),B(gt,{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"]),B(gt,{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"]),B(od,{modelValue:c.value,"onUpdate:modelValue":f[3]||(f[3]=m=>c.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),B(Zn,{success:"Signed up",label:"Sign up",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,sy),O("button",{type:"button",onClick:f[4]||(f[4]=m=>b(r).show(b(ke).Authentication,b(pe).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),ay={key:0,class:"moonbase:loader"},ly={key:1,class:"moonbase:error","data-visible":""},cy=O("p",null," Please create a new password for your account: ",-1),uy=["data-visible"],dy=he({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ae(),o=St(),s=T(!0),i=T(null),a=T(""),c=T(null);Re(async()=>{try{const u=r.getParameter("email"),d=r.getParameter("code");if(!u||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(u,d)}catch(u){u instanceof Pr?c.value="Could not find a user to confirm":c.value=u.message}s.value=!1});async function l(){var u,d;if(c.value=null,!!((u=i.value)!=null&&u.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);Xt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw c.value=f.message,f}}return(u,d)=>(_(),xe(Hn,{handler:l,class:"moonbase:confirm-account"},{default:ye(()=>[s.value?(_(),N("div",ay,[B(Pt)])):i.value?(_(),N(Ce,{key:2},[O("h3",null," Hi "+K(i.value.name)+", ",1),cy,B(gt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),B(gt,{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"]),B(Zn,{success:"Password saved",label:"Save password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!c.value||void 0},K(c.value),9,uy)],64)):(_(),N("div",ly,K(c.value),1))]),_:1}))}}),fy=O("h3",null," Forgot your password? ",-1),py=O("p",null," Please enter your email for a reset link: ",-1),hy=["data-visible"],my=he({__name:"ForgotPassword",setup(e){const t=Ae(),n=St(),r=T(t.getParameter("email")??""),o=T(null),s=T(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Xt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Pr?o.value="User not found":o.value=a.message,a}}return(a,c)=>(_(),xe(Hn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:ye(()=>[fy,py,B(gt,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=l=>r.value=l),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),B(Zn,{success:"Email sent",label:"Reset password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,hy)]),_:1}))}}),vy=O("p",null," Please create a new password for your account: ",-1),gy=["data-visible"],yy=he({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ae(),o=St(),s=X(()=>r.getParameter("email")),i=T(""),a=T(null);Re(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function c(){a.value=null;const l=r.getParameter("code");if(l)try{await o.resetPassword(s.value,i.value,l);const u=await o.signIn(s.value,i.value);Xt(1500).then(()=>n("passwordReset",u))}catch(u){throw a.value=u.message,u}}return(l,u)=>(_(),xe(Hn,{handler:c,class:"moonbase:reset-password"},{default:ye(()=>[O("h3",null," Hi "+K(s.value)+", ",1),vy,B(gt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),B(gt,{modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{success:"Password saved",label:"Save password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,gy)]),_:1}))}}),_y={class:"moonbase:confirm-email-change"},by={key:0,class:"moonbase:loader"},wy={key:1,class:"moonbase:error","data-visible":""},Ey=O("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1),Oy=he({__name:"ConfirmEmailChange",setup(e){const t=Ae(),{user:n,confirmEmailChange:r}=St(),o=T(!0),s=T(null);return Re(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 c;return _(),N("div",_y,[o.value?(_(),N("div",by,[B(Pt)])):s.value?(_(),N("div",wy,K(s.value),1)):(_(),N(Ce,{key:2},[O("h3",null," Hi "+K((c=b(n))==null?void 0:c.name)+", ",1),Ey],64))])}}});class Ny{constructor(){Nr(this,"current",this.detect());Nr(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 To=new Ny;function Ca(e,t,n,r){To.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function sd(e,t,n,r){To.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var xt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(xt||{});function Ta(){let e=T(0),t=T(!0);return sd(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Je(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,Je),r}var qn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qn||{}),Wn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wn||{});function Qe({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=ad(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return zs(i);if(t&1){const a=s.unmount??!0?0:1;return Je(a,{0(){return null},1(){return zs({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return zs(i)}function zs({props:e,attrs:t,slots:n,slot:r,name:o}){var l;const{as:s,...i}=Pa(e,["unmount","static"]);let a=(l=n.default)==null?void 0:l.call(n,r);const c={};if(r){let u=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(u=!0),m===!0&&d.push(f);u&&(c["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=id(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[u,...d]=a??[];if(!Sy(u)||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(y=>y.trim()).filter((y,E,S)=>S.indexOf(y)===E).sort((y,E)=>y.localeCompare(E)).map(y=>` - ${y}`).join(`
22
+ This will fail in production.`);a=ko,a._s.has(r)||(s?ka(r,t,o,a):td(r,o,a),Pe.NODE_ENV!=="production"&&(i._pinia=a));const u=a._s.get(r);if(Pe.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?ka(d,t,o,a,!0):td(d,Tt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Pe.NODE_ENV!=="production"&&yr){const d=Is();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=u}}return u}return i.$id=r,i}var de=(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))(de||{});const Dg={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}}},Ws=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 Ae=Ig("ui",()=>{const e=T("None"),t=T(null),n=T(null),r=T(null);function o(c,u,d){n.value=d??null,t.value=u,e.value=c}function s(c,u,d){r.value=[c,u,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const c=r.value;i(),co(()=>{if(c){const[u,d,f]=c;n.value=f??null,t.value=d,e.value=u}})}function l(c){return n.value===null||!n.value[c]?null:n.value[c]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),Xt=e=>new Promise(t=>setTimeout(t,e)),Ag=["data-visible","data-location"],Vg={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},Rg=[Jm('<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)],jg=["disabled"],Lg=he({__name:"Toolbar",setup(e){const t=T(!1),n=Ae(),r=bt(),o=$e(Ws);return Re(()=>{Xt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,c,u,d;return _(),N("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(Se).None?"true":"false","data-location":b(o).toolbar.location},[(a=b(o))!=null&&a.toolbar.show.moonbase?(_(),N("a",Vg,Rg)):me("",!0),(l=b(o))!=null&&l.toolbar.show.cart?(_(),N("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>b(n).show(b(Se).Cart,b(de).AddToCart))}," Cart ")):me("",!0),(c=b(o))!=null&&c.toolbar.show.account&&!b(r).user.value?(_(),N("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:i[1]||(i[1]=f=>b(n).show(b(Se).Authentication,b(de).SignIn))}," Log in ",8,jg)):(u=b(o))!=null&&u.toolbar.show.account?(_(),N("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>b(n).show(b(Se).Customer,b(de).ViewAccount))},K((d=b(r).user.value)==null?void 0:d.name),1)):me("",!0)],8,Ag)}}}),Mg=["hidden"],Ug=["for"],Fg=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],Bg=["id"],Hg=["id"],Zg=he({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)=>(_(),N("div",{class:"moonbase:input",hidden:t.hidden||void 0},[O("label",{for:`mb-${t.name}`},K(t.label),9,Ug),O("input",ua({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,Fg),t.error?(_(),N("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,Bg)):t.hint?(_(),N("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,Hg)):me("",!0)],8,Mg))}}),Bn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},gt=Bn(Zg,[["__scopeId","data-v-65d18d50"]]),qg={},nd=e=>(Uh("data-v-f9a322c4"),e=e(),Fh(),e),Wg={fill:"none",viewBox:"0 0 24 24"},zg=[nd(()=>O("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),nd(()=>O("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))];function Kg(e,t){return _(),N("svg",Wg,zg)}const Pt=Bn(qg,[["render",Kg],["__scopeId","data-v-f9a322c4"]]),Gg=["disabled"],rd=Symbol("form-state"),Hn=he({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=T(!1),r=T(!1),o=T(!1);dt(rd,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await Xt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await Xt(2500),o.value=!1}}return(i,a)=>(_(),N("form",{disabled:n.value||r.value,onSubmit:jv(s,["prevent"])},[Wi(i.$slots,"default")],40,Gg))}}),Jg=["disabled","data-success","data-error","data-working"],Yg=["data-visible"],Zn=Bn(he({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=$e(rd),s=X(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(_(),N("button",{class:"moonbase:submit-button",type:"submit",disabled:b(r)||b(o)||b(n),"data-success":b(r)||void 0,"data-error":b(o)||void 0,"data-working":b(n)||void 0},[O("div",{"data-visible":b(n)||void 0,"aria-hidden":"true"},[b(n)?(_(),ke(Pt,{key:0})):me("",!0)],8,Yg),Te(" "+K(s.value),1)],8,Jg))}}),[["__scopeId","data-v-052f0f36"]]),Xg={class:"moonbase:checkbox"},Qg={class:"moonbase:checkbox-container"},ey=["id","name","value","disabled","aria-invalid","aria-describedby"],ty={class:"moonbase:checkbox-description"},ny=["for"],ry=["id"],oy=["id"],od=Bn(he({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(_(),N("div",Xg,[O("div",Qg,[O("input",ua({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,ey)]),O("div",ty,[O("label",{for:`mb-${t.name}`},K(t.label),9,ny),t.error?(_(),N("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,ry)):t.hint?(_(),N("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,oy)):me("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),sy=["data-visible"],iy=he({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=T(""),i=T(r.getParameter("email")??""),a=T(""),l=T(!1),c=T(null);async function u(){c.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);Xt(1500).then(()=>n("signedUp",d))}catch(d){throw c.value=d.message,d}}return(d,f)=>(_(),ke(Hn,{handler:u,class:"moonbase:sign-up"},{default:ye(()=>[B(gt,{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"]),B(gt,{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"]),B(gt,{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"]),B(od,{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"]),B(Zn,{success:"Signed up",label:"Sign up",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!c.value||void 0},K(c.value),9,sy),O("button",{type:"button",onClick:f[4]||(f[4]=m=>b(r).show(b(Se).Authentication,b(de).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),ay={key:0,class:"moonbase:loader"},ly={key:1,class:"moonbase:error","data-visible":""},cy=O("p",null," Please create a new password for your account: ",-1),uy=["data-visible"],dy=he({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=T(!0),i=T(null),a=T(""),l=T(null);Re(async()=>{try{const u=r.getParameter("email"),d=r.getParameter("code");if(!u||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(u,d)}catch(u){u instanceof Pr?l.value="Could not find a user to confirm":l.value=u.message}s.value=!1});async function c(){var u,d;if(l.value=null,!!((u=i.value)!=null&&u.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);Xt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(u,d)=>(_(),ke(Hn,{handler:c,class:"moonbase:confirm-account"},{default:ye(()=>[s.value?(_(),N("div",ay,[B(Pt)])):i.value?(_(),N(Ce,{key:2},[O("h3",null," Hi "+K(i.value.name)+", ",1),cy,B(gt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),B(gt,{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"]),B(Zn,{success:"Password saved",label:"Save password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,uy)],64)):(_(),N("div",ly,K(l.value),1))]),_:1}))}}),fy=O("h3",null," Forgot your password? ",-1),py=O("p",null," Please enter your email for a reset link: ",-1),hy=["data-visible"],my=he({__name:"ForgotPassword",setup(e){const t=Ae(),n=bt(),r=T(t.getParameter("email")??""),o=T(null),s=T(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Xt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Pr?o.value="User not found":o.value=a.message,a}}return(a,l)=>(_(),ke(Hn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:ye(()=>[fy,py,B(gt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),B(Zn,{success:"Email sent",label:"Reset password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,hy)]),_:1}))}}),vy=O("p",null," Please create a new password for your account: ",-1),gy=["data-visible"],yy=he({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=X(()=>r.getParameter("email")),i=T(""),a=T(null);Re(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const c=r.getParameter("code");if(c)try{await o.resetPassword(s.value,i.value,c);const u=await o.signIn(s.value,i.value);Xt(1500).then(()=>n("passwordReset",u))}catch(u){throw a.value=u.message,u}}return(c,u)=>(_(),ke(Hn,{handler:l,class:"moonbase:reset-password"},{default:ye(()=>[O("h3",null," Hi "+K(s.value)+", ",1),vy,B(gt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),B(gt,{modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{success:"Password saved",label:"Save password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,gy)]),_:1}))}}),_y={class:"moonbase:confirm-email-change"},by={key:0,class:"moonbase:loader"},wy={key:1,class:"moonbase:error","data-visible":""},Ey=O("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1),Oy=he({__name:"ConfirmEmailChange",setup(e){const t=Ae(),{user:n,confirmEmailChange:r}=bt(),o=T(!0),s=T(null);return Re(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 _(),N("div",_y,[o.value?(_(),N("div",by,[B(Pt)])):s.value?(_(),N("div",wy,K(s.value),1)):(_(),N(Ce,{key:2},[O("h3",null," Hi "+K((l=b(n))==null?void 0:l.name)+", ",1),Ey],64))])}}});class Ny{constructor(){Nr(this,"current",this.detect());Nr(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 To=new Ny;function Ca(e,t,n,r){To.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function sd(e,t,n,r){To.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var xt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(xt||{});function Ta(){let e=T(0),t=T(!0);return sd(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Je(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,Je),r}var qn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qn||{}),Wn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wn||{});function Qe({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=ad(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return zs(i);if(t&1){const a=s.unmount??!0?0:1;return Je(a,{0(){return null},1(){return zs({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return zs(i)}function zs({props:e,attrs:t,slots:n,slot:r,name:o}){var c;const{as:s,...i}=Pa(e,["unmount","static"]);let a=(c=n.default)==null?void 0:c.call(n,r);const l={};if(r){let u=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(u=!0),m===!0&&d.push(f);u&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=id(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[u,...d]=a??[];if(!Sy(u)||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(y=>y.trim()).filter((y,E,S)=>S.indexOf(y)===E).sort((y,E)=>y.localeCompare(E)).map(y=>` - ${y}`).join(`
23
23
  `),"","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(y=>` - ${y}`).join(`
24
24
  `)].join(`
25
- `));const f=ad(u.props??{},i,c),m=Rt(u,f,!0);for(const y in f)y.startsWith("on")&&(m.props||(m.props={}),m.props[y]=f[y]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Le(s,Object.assign({},i,c),{default:()=>a})}function id(e){return e.flatMap(t=>t.type===Ce?id(t.children):[t])}function ad(...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 Pa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Sy(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var zn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(zn||{});let Kn=he({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 Qe({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function xy(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 Qt(e){if(To.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 Ks=["[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 Ue=(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))(Ue||{}),yn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(yn||{});function Gs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ks)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var $a=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($a||{});function ld(e,t=0){var n;return e===((n=Qt(e))==null?void 0:n.body)?!1:Je(t,{0(){return e.matches(Ks)},1(){let r=e;for(;r!==null;){if(r.matches(Ks))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 br(e){e==null||e.focus({preventScroll:!0})}const ky=["textarea","input"].join(",");function Cy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,ky))??!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:Gs(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")})(),c=(()=>{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")})(),l=t&32?{preventScroll:!0}:{};let u=0;const d=i.length;let f;do{if(u>=d||u+d<=0)return 0;let m=c+u;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(l),u+=a}while(f!==s.activeElement);return t&6&&Cy(f)&&f.select(),2}let wr=[];xy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||wr[0]===t.target)return;let n=t.target;n=n.closest(Ks),wr.unshift(n??t.target),wr=wr.filter(r=>r!=null&&r.isConnected),wr.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 Js(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function cd(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 ud=(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))(ud||{});const Po=Object.assign(he({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:T(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=T(null);r({el:o,$el:o});const s=X(()=>Qt(o)),i=T(!1);Re(()=>i.value=!0),mt(()=>i.value=!1),Py({ownerDocument:s},X(()=>i.value&&!!(e.features&16)));const a=$y({ownerDocument:s,container:o,initialFocus:X(()=>e.initialFocus)},X(()=>i.value&&!!(e.features&2)));Iy({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},X(()=>i.value&&!!(e.features&8)));const c=Ta();function l(m){const y=G(o);if(!y)return;(S=>S())(()=>{Je(c.value,{[xt.Forwards]:()=>{it(y,Ue.First,{skipElements:[m.relatedTarget]})},[xt.Backwards]:()=>{it(y,Ue.Last,{skipElements:[m.relatedTarget]})}})})}const u=T(!1);function d(m){m.key==="Tab"&&(u.value=!0,requestAnimationFrame(()=>{u.value=!1}))}function f(m){if(!i.value)return;const y=cd(e.containers);G(o)instanceof HTMLElement&&y.add(G(o));const E=m.relatedTarget;E instanceof HTMLElement&&E.dataset.moonbaseFocusGuard!=="true"&&(dd(y,E)||(u.value?it(G(o),Je(c.value,{[xt.Forwards]:()=>Ue.Next,[xt.Backwards]:()=>Ue.Previous})|Ue.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&br(m.target)))}return()=>{const m={},y={ref:o,onKeydown:d,onFocusout:f},{features:E,initialFocus:S,containers:A,...F}=e;return Le(Ce,[!!(E&4)&&Le(Kn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:l,features:zn.Focusable}),Qe({ourProps:y,theirProps:{...t,...F},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(E&4)&&Le(Kn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:l,features:zn.Focusable})])}}}),{features:ud});function Ty(e){const t=T(wr.slice());return Xe([e],([n],[r])=>{r===!0&&n===!1?Js(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=wr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Py({ownerDocument:e},t){const n=Ty(t);Re(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&br(n())},{flush:"post"})}),mt(()=>{t.value&&br(n())})}function $y({ownerDocument:e,container:t,initialFocus:n},r){const o=T(null),s=T(!1);return Re(()=>s.value=!0),mt(()=>s.value=!1),Re(()=>{Xe([t,n,r],(i,a)=>{if(i.every((l,u)=>(a==null?void 0:a[u])===l)||!r.value)return;const c=G(t);c&&Js(()=>{var d,f;if(!s.value)return;const l=G(n),u=(d=e.value)==null?void 0:d.activeElement;if(l){if(l===u){o.value=u;return}}else if(c.contains(u)){o.value=u;return}l?br(l):it(c,Ue.First|Ue.NoScroll)===yn.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 Iy({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ca((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=cd(n);G(t)instanceof HTMLElement&&a.add(G(t));const c=r.value;if(!c)return;const l=i.target;l&&l instanceof HTMLElement?dd(a,l)?(r.value=l,br(l)):(i.preventDefault(),i.stopPropagation(),br(c)):br(r.value)},!0)}function dd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function Dy(e){let t=fh(e.getSnapshot());return mt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function $o(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Js(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=$o();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ay(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 Vy(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function fd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ry(){return/Android/gi.test(window.navigator.userAgent)}function jy(){return fd()||Ry()}function Ly(){return fd()?{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=$o();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:c}=new URL(a.href),l=e.querySelector(c);l&&!r(l)&&(s=l)}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 My(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Uy(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Er=Ay(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:$o(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Uy(n)},o=[Ly(),Vy(),My()];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)}});Er.subscribe(()=>{let e=Er.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Er.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Er.dispatch("TEARDOWN",n)}});function Fy(e,t,n){let r=Dy(Er),o=X(()=>{let s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Xe([e,t],([s,i],[a],c)=>{if(!s||!i)return;Er.dispatch("PUSH",s,n);let l=!1;c(()=>{l||(Er.dispatch("POP",a??s,n),l=!0)})},{immediate:!0}),o}let By=0;function Hy(){return++By}function $t(){return Hy()}let Ia=new Map,Io=new Map;function pd(e,t=T(!0)){ft(n=>{if(!t.value)return;let r=G(e);if(!r)return;n(function(){if(!r)return;let i=Io.get(r)??1;if(i===1?Io.delete(r):Io.set(r,i-1),i!==1)return;let a=Ia.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Ia.delete(r))});let o=Io.get(r)??0;Io.set(r,o+1),o===0&&(Ia.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Do(e,t,n,r){To.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const hd=30;function md(e,t,n=X(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const c=a(i);if(c===null||!c.getRootNode().contains(c))return;const l=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const u of l){if(u===null)continue;const d=u instanceof HTMLElement?u:G(u);if(d!=null&&d.contains(c)||i.composed&&i.composedPath().includes(d))return}return!ld(c,$a.Loose)&&c.tabIndex!==-1&&i.preventDefault(),t(i,c)}const o=T(null);Do(n,"pointerdown",i=>{var a,c;o.value=((c=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:c[0])||i.target},!0),Do(n,"mousedown",i=>{var a,c;o.value=((c=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:c[0])||i.target},!0),Do(n,"click",i=>{jy()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Do(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Do(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=hd||Math.abs(a.y-s.y)>=hd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),sd(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function vd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=T(null),o=Qt(r);function s(){var a,c;const i=[];for(const l of e)l!==null&&(l instanceof HTMLElement?i.push(l):"value"in l&&l.value instanceof HTMLElement&&i.push(l.value));if(t!=null&&t.value)for(const l of t.value)i.push(l);for(const l of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="moonbase"&&(l.contains(G(r))||l.contains((c=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:c.host)||i.some(u=>l.contains(u))||i.push(l));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Le(Kn,{features:zn.Hidden,ref:r})}}}let gd=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 Zy(){return Ys()!==null}function Ys(){return $e(gd,null)}function yd(e){dt(gd,e)}const _d=Symbol("ForcePortalRootContext");function qy(){return $e(_d,!1)}const bd=he({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(_d,e.force),()=>{const{force:r,...o}=e;return Qe({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let wd=Symbol("StackContext");var Da=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Da||{});function Wy(){return $e(wd,()=>{})}function zy({type:e,enabled:t,element:n,onUpdate:r}){let o=Wy();function s(...i){r==null||r(...i),o(...i)}Re(()=>{Xe(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),mt(()=>{t.value&&s(1,e,n)}),dt(wd,s)}var et=(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))(et||{});let Ky=Symbol("DescriptionContext");function Gy({slot:e=T({}),name:t="Description",props:n={}}={}){let r=T([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Ky,{register:o,slot:e,name:t,props:n}),X(()=>r.value.length>0?r.value.join(" "):void 0)}function Ed(e){const t=Qt(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 Jy=he({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=T(null);X(()=>Qt(r));const o=qy(),s=$e(Nd,null),i=T(o===!0||s==null?Ed(r.value):s.resolveTarget()),a=T(!1);Re(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const c=$e(Aa,null);let l=!1;const u=Is();return Xe(r,()=>{if(l||!c)return;const d=G(r);d&&(mt(c.register(d),u),l=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Le(Pm,{to:i.value},Qe({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let Aa=Symbol("PortalParentContext");function Od(){const e=$e(Aa,null),t=T([]);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,he({name:"PortalWrapper",setup(s,{slots:i}){return dt(Aa,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let Nd=Symbol("PortalGroupContext");const Yy=he({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=so({resolveTarget(){return e.target}});return dt(Nd,r),()=>{const{target:o,...s}=e;return Qe({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Va=Symbol("DialogContext");function Xs(e){const t=$e(Va,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xs),n}return t}const Qs="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Sd=he({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:Qs},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${$t()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var ce;const s=T(!1);Re(()=>{s.value=!0});let i=!1;const a=X(()=>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")),c=T(0),l=Ys(),u=X(()=>e.open===Qs&&l!==null?(l.value&at.Open)===at.Open:e.open),d=T(null),f=X(()=>Qt(d));if(o({el:d,$el:d}),!(e.open!==Qs||l!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof u.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value===Qs?void 0:e.open}`);const y=X(()=>s.value&&u.value?0:1),E=X(()=>y.value===0),S=T(null),A={titleId:S,panelRef:T(null),dialogState:y,setTitleId(Ie){S.value!==Ie&&(S.value=Ie)},close(){t("close",!1)}},F=X(()=>c.value>1),C=$e(Va,null)!==null,[z,$]=Od(),{resolveContainers:Z,mainTreeNodeRef:x,MainTreeNode:de}=vd({portals:z,defaultContainers:[X(()=>A.panelRef.value??d.value)]}),Y=X(()=>F.value?"parent":"leaf"),V=X(()=>l!==null?(l.value&at.Closing)===at.Closing:!1),P=X(()=>C||V.value?!1:E.value),j=X(()=>{var Ie;return Array.from(((Ie=f.value)==null?void 0:Ie.querySelectorAll("body > *"))??[]).find(je=>je.id==="moonbase"?!1:je.contains(G(x))&&je instanceof HTMLElement)??null});pd(j,P);const oe=X(()=>F.value?!0:E.value),w=X(()=>{var Ie;return Array.from(((Ie=f.value)==null?void 0:Ie.querySelectorAll("[data-moonbase-portal]"))??[]).find(je=>je.contains(G(x))&&je instanceof HTMLElement)??null});pd(w,oe),zy({type:"Dialog",enabled:X(()=>y.value===0),element:d,onUpdate:(Ie,je)=>{if(je==="Dialog")return Je(Ie,{[Da.Add]:()=>c.value+=1,[Da.Remove]:()=>c.value-=1})}});const I=Gy({name:"DialogDescription",slot:X(()=>({open:u.value}))});dt(Va,A);const ne=X(()=>!(!E.value||F.value));md(Z,(Ie,je)=>{Ie.preventDefault(),A.close(),co(()=>je==null?void 0:je.focus())},ne);const ae=X(()=>!(F.value||y.value!==0));Ca((ce=f.value)==null?void 0:ce.defaultView,"keydown",Ie=>{ae.value&&(Ie.defaultPrevented||Ie.key===et.Escape&&(Ie.preventDefault(),Ie.stopPropagation(),A.close()))});const re=X(()=>!(V.value||y.value!==0||C));return Fy(f,re,Ie=>({containers:[...Ie.containers??[],Z]})),ft(Ie=>{if(y.value!==0)return;const je=G(d);if(!je)return;const nt=new ResizeObserver(bt=>{for(const bn of bt){const Gn=bn.target.getBoundingClientRect();Gn.x===0&&Gn.y===0&&Gn.width===0&&Gn.height===0&&A.close()}});nt.observe(je),Ie(()=>nt.disconnect())}),()=>{const{id:Ie,open:je,initialFocus:nt,...bt}=e,bn={...n,ref:d,id:Ie,role:a.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":S.value,"aria-describedby":I.value},Gn={open:y.value===0};return Le(bd,{force:!0},()=>[Le(Jy,()=>Le(Yy,{target:d.value},()=>Le(bd,{force:!1},()=>Le(Po,{initialFocus:nt,containers:Z,features:E.value?Je(Y.value,{parent:Po.features.RestoreFocus,leaf:Po.features.All&~Po.features.FocusLock}):Po.features.None},()=>Le($,{},()=>Qe({ourProps:bn,theirProps:{...bt,...n},slot:Gn,attrs:n,slots:r,visible:y.value===0,features:qn.RenderStrategy|qn.Static,name:"Dialog"})))))),Le(de)])}}}),xd=he({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${$t()}`}},setup(e,{attrs:t,slots:n}){const r=Xs("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Qe({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),kd=he({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${$t()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xs("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,c={id:i,ref:o.panelRef,onClick:s};return Qe({ourProps:c,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),ei=he({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${$t()}`}},setup(e,{attrs:t,slots:n}){const r=Xs("DialogTitle");return Re(()=>{r.setTitleId(e.id),mt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Qe({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Cd(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Td(e,t){let n=T(Cd(e.value.type,e.value.as));return Re(()=>{n.value=Cd(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 Pd=Symbol("PopoverContext");function Ra(e){const t=$e(Pd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${ja.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ra),n}return t}const Xy=Symbol("PopoverGroupContext");function $d(){return $e(Xy,null)}const Id=Symbol("PopoverPanelContext");function Qy(){return $e(Id,null)}let ja=he({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var z;const o=T(null);r({el:o,$el:o});const s=T(1),i=T(null),a=T(null),c=T(null),l=T(null),u=X(()=>Qt(o)),d=X(()=>{var P,j;if(!G(i)||!G(l))return!1;for(const oe of document.querySelectorAll("body > *"))if(Number(oe==null?void 0:oe.contains(G(i)))^Number(oe==null?void 0:oe.contains(G(l))))return!0;const $=Gs(),Z=$.indexOf(G(i)),x=(Z+$.length-1)%$.length,de=(Z+1)%$.length,Y=$[x],V=$[de];return!((P=G(l))!=null&&P.contains(Y))&&!((j=G(l))!=null&&j.contains(V))}),f={popoverState:s,buttonId:T(null),panelId:T(null),panel:l,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:c,togglePopover(){s.value=Je(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close($){f.closePopover();const Z=$?$ instanceof HTMLElement?$:$.value instanceof HTMLElement?G($):G(f.button):G(f.button);Z==null||Z.focus()}};dt(Pd,f),yd(X(()=>Je(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},y=$d(),E=y==null?void 0:y.registerPopover,[S,A]=Od(),F=vd({mainTreeNodeRef:y==null?void 0:y.mainTreeNodeRef,portals:S,defaultContainers:[i,l]});function C(){var $,Z,x;return(y==null?void 0:y.isFocusWithinPopoverGroup())??((($=u.value)==null?void 0:$.activeElement)&&(((Z=G(i))==null?void 0:Z.contains(u.value.activeElement))||((x=G(l))==null?void 0:x.contains(u.value.activeElement))))}return ft(()=>E==null?void 0:E(m)),Ca((z=u.value)==null?void 0:z.defaultView,"focus",$=>{var Z,x;$.target!==window&&$.target instanceof HTMLElement&&s.value===0&&(C()||i&&l&&(F.contains($.target)||(Z=G(f.beforePanelSentinel))!=null&&Z.contains($.target)||(x=G(f.afterPanelSentinel))!=null&&x.contains($.target)||f.closePopover()))},!0),md(F.resolveContainers,($,Z)=>{var x;f.closePopover(),ld(Z,$a.Loose)||($.preventDefault(),(x=G(i))==null||x.focus())},X(()=>s.value===0)),()=>{const $={open:s.value===0,close:f.close};return Le(Ce,[Le(A,{},()=>Qe({theirProps:{...e,...n},ourProps:{ref:o},slot:$,slots:t,attrs:n,name:"Popover"})),Le(F.MainTreeNode)])}}});const Dd=he({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${$t()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=Ra("PopoverButton"),s=X(()=>Qt(o.button));r({el:o.button,$el:o.button}),Re(()=>{o.buttonId.value=e.id}),mt(()=>{o.buttonId.value=null});const i=$d(),a=i==null?void 0:i.closeOthers,c=Qy(),l=X(()=>c===null?!1:c.value===o.panelId.value),u=T(null),d=`moonbase-focus-sentinel-${$t()}`;l.value||ft(()=>{o.button.value=G(u)});const f=Td(X(()=>({as:e.as,type:t.type})),u);function m(C){var z,$,Z,x,de;if(l.value){if(o.popoverState.value===1)return;switch(C.key){case et.Space:case et.Enter:C.preventDefault(),($=(z=C.target).click)==null||$.call(z),o.closePopover(),(Z=G(o.button))==null||Z.focus();break}}else switch(C.key){case et.Space:case et.Enter:C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case et.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(x=s.value)!=null&&x.activeElement&&!((de=G(o.button))!=null&&de.contains(s.value.activeElement)))return;C.preventDefault(),C.stopPropagation(),o.closePopover();break}}function y(C){l.value||C.key===et.Space&&C.preventDefault()}function E(C){var z,$;e.disabled||(l.value?(o.closePopover(),(z=G(o.button))==null||z.focus()):(C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),($=G(o.button))==null||$.focus()))}function S(C){C.preventDefault(),C.stopPropagation()}const A=Ta();function F(){const C=G(o.panel);if(!C)return;function z(){Je(A.value,{[xt.Forwards]:()=>it(C,Ue.First),[xt.Backwards]:()=>it(C,Ue.Last)})===yn.Error&&it(Gs().filter(Z=>Z.dataset.moonbaseFocusGuard!=="true"),Je(A.value,{[xt.Forwards]:Ue.Next,[xt.Backwards]:Ue.Previous}),{relativeTo:G(o.button)})}z()}return()=>{const C=o.popoverState.value===0,z={open:C},{id:$,...Z}=e,x=l.value?{ref:u,type:f.value,onKeydown:m,onClick:E}:{ref:u,id:$,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:y,onClick:E,onMousedown:S};return Le(Ce,[Qe({ourProps:x,theirProps:{...t,...Z},slot:z,attrs:t,slots:n,name:"PopoverButton"}),C&&!l.value&&o.isPortalled.value&&Le(Kn,{id:d,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:F})])}}}),Ad=he({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-${$t()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=Ra("PopoverPanel"),i=X(()=>Qt(s.panel)),a=`moonbase-focus-sentinel-before-${$t()}`,c=`moonbase-focus-sentinel-after-${$t()}`;r({el:s.panel,$el:s.panel}),Re(()=>{s.panelId.value=e.id}),mt(()=>{s.panelId.value=null}),dt(Id,s.panelId),ft(()=>{var A,F;if(!o||s.popoverState.value!==0||!s.panel)return;const S=(A=i.value)==null?void 0:A.activeElement;(F=G(s.panel))!=null&&F.contains(S)||it(G(s.panel),Ue.First)});const l=Ys(),u=X(()=>l!==null?(l.value&at.Open)===at.Open:s.popoverState.value===0);function d(S){var A,F;switch(S.key){case et.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!((A=G(s.panel))!=null&&A.contains(i.value.activeElement)))return;S.preventDefault(),S.stopPropagation(),s.closePopover(),(F=G(s.button))==null||F.focus();break}}function f(S){var F,C,z,$,Z;const A=S.relatedTarget;A&&G(s.panel)&&((F=G(s.panel))!=null&&F.contains(A)||(s.closePopover(),((z=(C=G(s.beforePanelSentinel))==null?void 0:C.contains)!=null&&z.call(C,A)||(Z=($=G(s.afterPanelSentinel))==null?void 0:$.contains)!=null&&Z.call($,A))&&A.focus({preventScroll:!0})))}const m=Ta();function y(){const S=G(s.panel);if(!S)return;function A(){Je(m.value,{[xt.Forwards]:()=>{var C;it(S,Ue.First)===yn.Error&&((C=G(s.afterPanelSentinel))==null||C.focus())},[xt.Backwards]:()=>{var F;(F=G(s.button))==null||F.focus({preventScroll:!0})}})}A()}function E(){const S=G(s.panel);if(!S)return;function A(){Je(m.value,{[xt.Forwards]:()=>{const F=G(s.button),C=G(s.panel);if(!F)return;const z=Gs(),$=z.indexOf(F),Z=z.slice(0,$+1),de=[...z.slice($+1),...Z];for(const Y of de.slice())if(Y.dataset.moonbaseFocusGuard==="true"||C!=null&&C.contains(Y)){const V=de.indexOf(Y);V!==-1&&de.splice(V,1)}it(de,Ue.First,{sorted:!1})},[xt.Backwards]:()=>{var C;it(S,Ue.Previous)===yn.Error&&((C=G(s.button))==null||C.focus())}})}A()}return()=>{const S={open:s.popoverState.value===0,close:s.close},{id:A,focus:F,...C}=e,z={ref:s.panel,id:A,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return Qe({ourProps:z,theirProps:{...t,...C},attrs:t,slot:S,slots:{...n,default:(...$)=>{var Z;return[Le(Ce,[u.value&&s.isPortalled.value&&Le(Kn,{id:a,ref:s.beforePanelSentinel,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:y}),(Z=n.default)==null?void 0:Z.call(n,...$),u.value&&s.isPortalled.value&&Le(Kn,{id:c,ref:s.afterPanelSentinel,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:E})])]}},features:qn.RenderStrategy|qn.Static,visible:u.value,name:"PopoverPanel"})}}});let e_=he({props:{onFocus:{type:Function,required:!0}},setup(e){let t=T(!0);return()=>t.value?Le(Kn,{as:"button",type:"button",features:zn.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 Vd=Symbol("TabsContext");function Ao(e){const t=$e(Vd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ao),n}return t}const La=Symbol("TabsSSRContext"),t_=he({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=T(e.selectedIndex??e.defaultIndex),s=T([]),i=T([]),a=X(()=>e.selectedIndex!==null),c=X(()=>a.value?e.selectedIndex:o.value);function l(y){const E=jr(u.tabs.value,G),S=jr(u.panels.value,G),A=E.filter(F=>{var C;return!((C=G(F))!=null&&C.hasAttribute("disabled"))});if(y<0||y>E.length-1){const F=Je(o.value===null?0:Math.sign(y-o.value),{[-1]:()=>1,0:()=>Je(Math.sign(y),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),C=Je(F,{0:()=>E.indexOf(A[0]),1:()=>E.indexOf(A[A.length-1])});C!==-1&&(o.value=C),u.tabs.value=E,u.panels.value=S}else{const F=E.slice(0,y),z=[...E.slice(y),...F].find(Z=>A.includes(Z));if(!z)return;let $=E.indexOf(z)??u.selectedIndex.value;$===-1&&($=u.selectedIndex.value),o.value=$,u.tabs.value=E,u.panels.value=S}}let u={selectedIndex:X(()=>o.value??e.defaultIndex??null),orientation:X(()=>e.vertical?"vertical":"horizontal"),activation:X(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(y){c.value!==y&&r("change",y),a.value||l(y)},registerTab(y){if(s.value.includes(y))return;const E=s.value[o.value];if(s.value.push(y),s.value=jr(s.value,G),!a.value){const S=s.value.indexOf(E)??o.value;S!==-1&&(o.value=S)}},unregisterTab(y){const E=s.value.indexOf(y);E!==-1&&s.value.splice(E,1)},registerPanel(y){i.value.includes(y)||(i.value.push(y),i.value=jr(i.value,G))},unregisterPanel(y){const E=i.value.indexOf(y);E!==-1&&i.value.splice(E,1)}};dt(Vd,u);const d=T({tabs:[],panels:[]}),f=T(!1);Re(()=>{f.value=!0}),dt(La,X(()=>f.value?null:d.value));const m=X(()=>e.selectedIndex);return Re(()=>{Xe([m],()=>l(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||c.value==null||u.tabs.value.length<=0)return;const y=jr(u.tabs.value,G);y.some((S,A)=>G(u.tabs.value[A])!==G(S))&&u.setSelectedIndex(y.findIndex(S=>G(S)===G(u.tabs.value[c.value])))}),()=>{const y={selectedIndex:o.value};return Le(Ce,[s.value.length<=0&&Le(e_,{onFocus:()=>{for(const E of s.value){const S=G(E);if((S==null?void 0:S.tabIndex)===0)return S.focus(),!0}return!1}}),Qe({theirProps:{...n,...Pa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:y,slots:t,attrs:n,name:"TabGroup"})])}}}),n_=he({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Ao("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Qe({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),Ma=he({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${$t()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ao("Tab"),s=T(null);r({el:s,$el:s}),Re(()=>o.registerTab(s)),mt(()=>o.unregisterTab(s));const i=$e(La),a=X(()=>{if(i.value){const S=i.value.tabs.indexOf(e.id);return S===-1?i.value.tabs.push(e.id)-1:S}return-1}),c=X(()=>{const S=o.tabs.value.indexOf(s);return S===-1?a.value:S}),l=X(()=>c.value===o.selectedIndex.value);function u(S){var F;const A=S();if(A===yn.Success&&o.activation.value==="auto"){const C=(F=Qt(s))==null?void 0:F.activeElement,z=o.tabs.value.findIndex($=>G($)===C);z!==-1&&o.setSelectedIndex(z)}return A}function d(S){const A=o.tabs.value.map(C=>G(C)).filter(Boolean);if(S.key===et.Space||S.key===et.Enter){S.preventDefault(),S.stopPropagation(),o.setSelectedIndex(c.value);return}switch(S.key){case et.Home:case et.PageUp:return S.preventDefault(),S.stopPropagation(),u(()=>it(A,Ue.First));case et.End:case et.PageDown:return S.preventDefault(),S.stopPropagation(),u(()=>it(A,Ue.Last))}if(u(()=>Je(o.orientation.value,{vertical(){return S.key===et.ArrowUp?it(A,Ue.Previous|Ue.WrapAround):S.key===et.ArrowDown?it(A,Ue.Next|Ue.WrapAround):yn.Error},horizontal(){return S.key===et.ArrowLeft?it(A,Ue.Previous|Ue.WrapAround):S.key===et.ArrowRight?it(A,Ue.Next|Ue.WrapAround):yn.Error}}))===yn.Success)return S.preventDefault()}const f=T(!1);function m(){var S;f.value||(f.value=!0,!e.disabled&&((S=G(s))==null||S.focus({preventScroll:!0}),o.setSelectedIndex(c.value),Js(()=>{f.value=!1})))}function y(S){S.preventDefault()}const E=Td(X(()=>({as:e.as,type:t.type})),s);return()=>{var z;const S={selected:l.value,disabled:e.disabled??!1},{id:A,...F}=e,C={ref:s,onKeydown:d,onMousedown:y,onClick:m,id:A,role:"tab",type:E.value,"aria-controls":(z=G(o.panels.value[c.value]))==null?void 0:z.id,"aria-selected":l.value,tabIndex:l.value?0:-1,disabled:e.disabled?!0:void 0};return Qe({ourProps:C,theirProps:F,slot:S,attrs:t,slots:n,name:"Tab"})}}}),r_=he({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Ao("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Qe({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Ua=he({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-${$t()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ao("TabPanel"),s=T(null);r({el:s,$el:s}),Re(()=>o.registerPanel(s)),mt(()=>o.unregisterPanel(s));const i=$e(La),a=X(()=>{if(i.value){const u=i.value.panels.indexOf(e.id);return u===-1?i.value.panels.push(e.id)-1:u}return-1}),c=X(()=>{const u=o.panels.value.indexOf(s);return u===-1?a.value:u}),l=X(()=>c.value===o.selectedIndex.value);return()=>{var E;const u={selected:l.value},{id:d,tabIndex:f,...m}=e,y={ref:s,id:d,role:"tabpanel","aria-labelledby":(E=G(o.tabs.value[c.value]))==null?void 0:E.id,tabIndex:l.value?f:-1};return!l.value&&e.unmount&&!e.static?Le(Kn,{as:"span","aria-hidden":!0,...y}):Qe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:n,features:qn.Static|qn.RenderStrategy,visible:l.value,name:"TabPanel"})}}});function o_(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Fa(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 ti(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var Ba=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ba||{});function s_(e,t){const n=$o();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[c=0]=a.split(",").filter(Boolean).map(l=>l.includes("ms")?Number.parseFloat(l):Number.parseFloat(l)*1e3).sort((l,u)=>u-l);return c});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Rd(e,t,n,r,o,s){const i=$o(),a=s!==void 0?o_(s):()=>{};return ti(e,...o),Fa(e,...t,...n),i.nextFrame(()=>{ti(e,...n),Fa(e,...r),i.add(s_(e,c=>(ti(e,...r,...t),Fa(e,...o),a(c))))}),i.add(()=>ti(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function Or(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Ha=Symbol("TransitionContext");function i_(){return $e(Ha,null)!==null}function a_(){const e=$e(Ha,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Za=Symbol("NestingContext");function l_(){const e=$e(Za,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function ni(e){return"children"in e?ni(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function jd(e){const t=T([]),n=T(!1);Re(()=>n.value=!0),mt(()=>n.value=!1);function r(s,i=Wn.Hidden){const a=t.value.findIndex(({id:c})=>c===s);a!==-1&&(Je(i,{[Wn.Unmount](){t.value.splice(a,1)},[Wn.Hidden](){t.value[a].state="hidden"}}),!ni(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,Wn.Unmount)}return{children:t,register:o,unregister:r}}const Ld=qn.RenderStrategy,Vo=he({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=T(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function c(){s.value|=at.Closing,t("beforeLeave")}function l(){s.value&=~at.Closing,t("afterLeave")}if(!i_()&&Zy())return()=>Le(qa,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:c,onAfterLeave:l},r);const u=T(null),d=X(()=>e.unmount?Wn.Unmount:Wn.Hidden);o({el:u,$el:u});const{show:f,appear:m}=a_(),{register:y,unregister:E}=l_(),S=T(f.value?"visible":"hidden"),A={value:!0},F=$t(),C={value:!1},z=jd(()=>{!C.value&&S.value!=="hidden"&&(S.value="hidden",E(F),l())});Re(()=>{const oe=y(F);mt(oe)}),ft(()=>{if(d.value===Wn.Hidden&&F){if(f.value&&S.value!=="visible"){S.value="visible";return}Je(S.value,{hidden:()=>E(F),visible:()=>y(F)})}});const $=Or(e.enter),Z=Or(e.enterFrom),x=Or(e.enterTo),de=Or(e.entered),Y=Or(e.leave),V=Or(e.leaveFrom),P=Or(e.leaveTo);Re(()=>{ft(()=>{if(S.value==="visible"){const oe=G(u);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function j(oe){const w=A.value&&!m.value,I=G(u);!I||!(I instanceof HTMLElement)||w||(C.value=!0,f.value&&i(),f.value||c(),oe(f.value?Rd(I,$,Z,x,de,ne=>{C.value=!1,ne===Ba.Finished&&a()}):Rd(I,Y,V,P,de,ne=>{C.value=!1,ne===Ba.Finished&&(ni(z)||(S.value="hidden",E(F),l()))})))}return Re(()=>{Xe([f],(oe,w,I)=>{j(I),A.value=!1},{immediate:!0})}),dt(Za,z),yd(X(()=>Je(S.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:oe,show:w,enter:I,enterFrom:ne,enterTo:ae,entered:re,leave:ce,leaveFrom:Ie,leaveTo:je,...nt}=e,bt={ref:u},bn={...nt,...m.value&&f.value&&To.isServer?{class:rs([n.class,nt.class,...$,...Z])}:{}};return Qe({theirProps:bn,ourProps:bt,slot:{},slots:r,attrs:n,features:Ld,visible:S.value==="visible",name:"TransitionChild"})}}}),c_=Vo,qa=he({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=Ys(),s=X(()=>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=T(s.value?"visible":"hidden"),a=jd(()=>{i.value="hidden"}),c=T(!0),l={show:s,appear:X(()=>e.appear||!c.value)};return Re(()=>{ft(()=>{c.value=!1,s.value?i.value="visible":ni(a)||(i.value="hidden")})}),dt(Za,a),dt(Ha,l),()=>{const u=Pa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Qe({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Le(c_,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...u},r.default)]},attrs:{},features:Ld,visible:i.value==="visible",name:"Transition"})}}}),u_={class:"moonbase:modal-container"},ri=he({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),xe(b(qa),{as:"template",show:t.open},{default:ye(()=>[B(b(Sd),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:ye(()=>[O("div",u_,[B(b(Vo),{as:"template"},{default:ye(()=>[B(b(xd),{class:"moonbase:modal-overlay"})]),_:1}),B(b(Vo),{as:"template"},{default:ye(()=>[B(b(kd),{class:"moonbase:modal-content"},{default:ye(()=>[Wi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),d_=["data-visible"],f_=he({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ae(),o=St(),s=$e(Ws),i=T(r.getParameter("email")??""),a=T(""),c=T(null);async function l(){c.value=null;try{const u=await o.signIn(i.value,a.value);Xt(1500).then(()=>n("signedIn",u))}catch(u){throw u instanceof Pr?c.value="User not found":c.value=u.message,u}}return(u,d)=>(_(),xe(Hn,{handler:l,class:"moonbase:sign-in"},{default:ye(()=>{var f;return[B(gt,{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"]),B(gt,{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"]),B(Zn,{success:"Signed in",label:"Sign in",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!c.value||void 0},K(c.value),9,d_),(f=b(s))!=null&&f.auth.enable.signUp?(_(),N("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>b(r).show(b(ke).Authentication,b(pe).SignUp,{email:i.value}))}," Create account ")):me("",!0),O("button",{type:"button",onClick:d[3]||(d[3]=m=>b(r).show(b(ke).Authentication,b(pe).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),p_={class:"moonbase:authentication"},h_={key:0,class:"moonbase:loader"},m_=he({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Ae(),{loaded:o,user:s}=St();Xe(s,a=>{a&&r.intent===pe.SignIn&&(n("authenticated",a),r.dequeue())});const i=X(()=>{switch(r.intent){case pe.SignIn:return"Sign in";case pe.SignUp:return"Sign up";case pe.ConfirmAccount:return"Confirm account";case pe.ConfirmEmailChange:return"Confirm email change";case pe.ForgotPassword:return"Forgot password";case pe.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,c)=>(_(),xe(ri,{open:a.open,onClose:c[3]||(c[3]=l=>b(r).reset())},{default:ye(()=>[O("div",p_,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(K(i.value),1)]),_:1}),b(o)?b(r).intent===b(pe).SignIn?(_(),xe(f_,{key:1})):b(r).intent===b(pe).SignUp?(_(),xe(iy,{key:2,onSignedUp:c[0]||(c[0]=l=>b(r).dequeue())})):b(r).intent===b(pe).ConfirmAccount?(_(),xe(dy,{key:3,onConfirmedAccount:c[1]||(c[1]=l=>b(r).dequeue())})):b(r).intent===b(pe).ConfirmEmailChange?(_(),xe(Oy,{key:4})):b(r).intent===b(pe).ForgotPassword?(_(),xe(my,{key:5})):b(r).intent===b(pe).ResetPassword?(_(),xe(yy,{key:6,onPasswordReset:c[2]||(c[2]=l=>b(r).dequeue())})):me("",!0):(_(),N("div",h_,[B(Pt)]))])]),_:1},8,["open"]))}});function _n(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const v_={class:"moonbase:product-cart-item"},g_=["src"],y_={key:1,class:"moonbase:image-placeholder"},__={class:"moonbase:product-cart-item-content"},b_={key:0,class:"moonbase:cart-item-discount"},w_={class:"font-semibold"},E_={key:0,class:"ml-0.5"},O_={key:2,class:"moonbase:product-cart-item-total"},N_={key:0,class:"moonbase:discount"},S_={key:1},x_=he({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return _(),N("div",v_,[(r=t.lineItem.product)!=null&&r.iconUrl?(_(),N("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,g_)):(_(),N("div",y_)),O("div",__,[O("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),O("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(_(),N("p",b_,[Te(" Discount applied: "),O("span",w_,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(_(),N("span",E_," (-"+K(b(_n)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):me("",!0)])):me("",!0),O("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(_(),N("div",O_,[t.lineItem.variation.hasDiscount?(_(),N("span",N_,K(b(_n)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):me("",!0),t.lineItem.quantity!==1?(_(),N("span",S_,K(t.lineItem.quantity)+" x "+K(b(_n)(t.lineItem.variation.price[t.currency],t.currency)),1)):me("",!0),Te(" "+K(b(_n)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):me("",!0)])}}}),k_={class:"moonbase:bundle-cart-item"},C_=["src"],T_={key:1,class:"moonbase:image-placeholder"},P_={class:"moonbase:bundle-cart-item-content"},$_={key:0,class:"moonbase:cart-item-discount"},I_={class:"font-semibold"},D_={key:0,class:"ml-0.5"},A_={class:"moonbase:bundle-cart-item-summary"},V_=["data-open"],R_=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],j_={key:2,class:"moonbase:product-cart-item-total"},L_={key:0,class:"moonbase:discount"},M_={key:1},U_=["src"],F_={key:1,class:"moonbase:image-placeholder"},B_=["data-included"],H_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Z_=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],q_={key:0,class:"truncate italic"},W_={key:1,class:"truncate"},z_=he({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=T(!1),n=T(null);return Xe(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,c,l,u,d;return _(),N("div",null,[O("div",k_,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(_(),N("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,C_)):(_(),N("div",T_)),O("div",P_,[O("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),O("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(_(),N("p",$_,[Te(" Discount applied: "),O("span",I_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(_(),N("span",D_," (-"+K(b(_n)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):me("",!0)])):me("",!0),O("div",A_,[O("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(_(),N("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[O("span",null,[Te(" Including "+K((c=r.lineItem.bundle)==null?void 0:c.products.filter(f=>f.included).length)+" ",1),(l=r.lineItem.bundle)!=null&&l.products.some(f=>!f.included)?(_(),N(Ce,{key:0},[Te("of "+K((u=r.lineItem.bundle)==null?void 0:u.products.length),1)],64)):me("",!0),Te(" products ")]),(_(),N("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},R_,8,V_))])):me("",!0)])]),r.lineItem.variation?(_(),N("div",j_,[r.lineItem.variation.hasDiscount?(_(),N("span",L_,K(b(_n)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):me("",!0),r.lineItem.quantity!==1?(_(),N("span",M_,K(r.lineItem.quantity)+" x "+K(b(_n)(r.lineItem.variation.price[r.currency],r.currency)),1)):me("",!0),Te(" "+K(b(_n)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):me("",!0)]),O("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(_(!0),N(Ce,null,Gt(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(_(),N("div",{key:f.id},[f!=null&&f.iconUrl?(_(),N("img",{key:0,src:f.iconUrl,alt:""},null,8,U_)):(_(),N("div",F_)),O("div",null,[O("h3",{"data-included":f.included||void 0},[f.included?(_(),N("svg",H_,Z_)):me("",!0),Te(" "+K(f==null?void 0:f.name),1)],8,B_),f.included?f!=null&&f.tagline?(_(),N("p",W_,K(f.tagline),1)):me("",!0):(_(),N("p",q_," You already own this "))])]))),128))],512)])}}}),K_={class:"moonbase:cart-modal-container"},G_=he({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),xe(b(qa),{as:"template",show:t.open},{default:ye(()=>[B(b(Sd),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:ye(()=>[O("div",K_,[B(b(Vo),{as:"template"},{default:ye(()=>[B(b(xd),{class:"moonbase:cart-modal-overlay"})]),_:1}),B(b(Vo),{as:"template"},{default:ye(()=>[B(b(kd),{class:"moonbase:cart-modal-content"},{default:ye(()=>[Wi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),J_=["disabled","data-success","data-error","data-working","data-variant"],Y_=["data-visible"],Md=he({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=T(!1),r=T(!1),o=T(!1),s=X(()=>r.value?t.success:o.value?t.error:t.label);async function i(){try{const a=t.handler();a instanceof Promise&&(n.value=!0,await a,n.value=!1,r.value=!0,await Xt(2500),t.noReset||(r.value=!1))}catch{n.value=!1,o.value=!0,await Xt(2500),o.value=!1}}return(a,c)=>(_(),N("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[O("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(_(),xe(Pt,{key:0})):me("",!0)],8,Y_),Te(" "+K(s.value),1)],8,J_))}}),X_={class:"moonbase:cart"},Q_={key:0,role:"list",class:"moonbase:cart-items"},eb={key:1,class:"moonbase:cart-empty"},tb={key:2,class:"moonbase:cart-total"},nb=O("label",null," Total ",-1),rb=O("p",null," Sales tax to be calculated at checkout ",-1),ob=he({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Ae(),{items:n,total:r,currency:o,checkout:s}=ba();async function i(){if(!await s(`${window.location.pathname}?mb_intent=view_products`))throw new Error("Cancelled checkout")}return(a,c)=>(_(),xe(G_,{open:a.open,onClose:c[0]||(c[0]=l=>b(t).reset())},{default:ye(()=>[O("div",X_,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Cart ")]),_:1}),b(n).length>0?(_(),N("ul",Q_,[(_(!0),N(Ce,null,Gt(b(n),l=>(_(),N("li",{key:l.id},[l.type==="Product"?(_(),xe(x_,{key:0,"line-item":l,currency:b(o)},null,8,["line-item","currency"])):l.type==="Bundle"?(_(),xe(z_,{key:1,"line-item":l,currency:b(o)},null,8,["line-item","currency"])):me("",!0)]))),128))])):(_(),N("div",eb," Your cart is empty! ")),b(n).length>0?(_(),N("div",tb,[nb,O("span",null,K(b(_n)(b(r).amount,b(r).currency)),1),rb])):me("",!0),b(n).length>0?(_(),xe(Md,{key:3,handler:i,"no-reset":!0,label:"Checkout",success:"Done",error:"Cancelled"})):me("",!0)])]),_:1},8,["open"]))}}),sb={class:"moonbase:account"},ib={key:0,class:"moonbase:error"},ab={key:1,class:"moonbase:notification"},lb={key:0,class:"moonbase:error"},cb=he({__name:"Account",setup(e){var F,C,z;const t=Ae(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=T(((F=n.value)==null?void 0:F.name)??""),a=T(((C=n.value)==null?void 0:C.email)??""),c=T(((z=n.value)==null?void 0:z.communicationPreferences)??{newsletterOptIn:!1}),l=T(null),u=T(!1),d=T(""),f=T(""),m=T(null),y=T(!1);async function E(){l.value=null,u.value=!1;try{(await r(i.value,a.value,void 0,c.value)).needsEmailConfirmationToken&&(u.value=!0)}catch($){throw l.value=$,$}}async function S(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch($){throw m.value=$,$}}async function A(){y.value=!0,await s(),t.reset()}return($,Z)=>(_(),N("div",sb,[B(Hn,{handler:E},{default:ye(()=>[B(gt,{modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=x=>i.value=x),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),B(gt,{modelValue:a.value,"onUpdate:modelValue":Z[1]||(Z[1]=x=>a.value=x),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),B(od,{modelValue:c.value.newsletterOptIn,"onUpdate:modelValue":Z[2]||(Z[2]=x=>c.value.newsletterOptIn=x),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),B(Zn,{label:"Save",error:"Error",success:"Saved"}),l.value?(_(),N("p",ib,K(l.value.message),1)):u.value?(_(),N("p",ab," You need to confirm your new email address, please check your inbox ")):me("",!0)]),_:1}),B(Hn,{handler:S},{default:ye(()=>[B(gt,{modelValue:d.value,"onUpdate:modelValue":Z[3]||(Z[3]=x=>d.value=x),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),B(gt,{modelValue:f.value,"onUpdate:modelValue":Z[4]||(Z[4]=x=>f.value=x),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{label:"Save",error:"Error",success:"Saved"}),m.value?(_(),N("p",lb,K(m.value.message),1)):me("",!0)]),_:1}),B(Md,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:A})]))}}),ub={},db={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},fb=[O("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)];function pb(e,t){return _(),N("svg",db,fb)}const Ud=Bn(ub,[["render",pb]]),hb={},mb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},vb=[O("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function gb(e,t){return _(),N("svg",mb,vb)}const Fd=Bn(hb,[["render",gb]]),yb={},_b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bb=[O("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)];function wb(e,t){return _(),N("svg",_b,bb)}const Bd=Bn(yb,[["render",wb]]),Eb={},Ob={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Nb=[O("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),O("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)];function Sb(e,t){return _(),N("svg",Ob,Nb)}const Hd=Bn(Eb,[["render",Sb]]),xb={class:"moonbase:product-downloads"},kb=["data-last","onClick"],Cb={class:"moonbase:sr-only"},Tb={class:"moonbase:sr-only"},Pb=O("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),$b=["onClick"],Ib=he({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Bt.Universal]:()=>Ud,[Bt.Windows]:()=>Fd,[Bt.Linux]:()=>Bd,[Bt.Mac]:()=>Hd},{downloadProduct:r}=Ms(),o=X(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(_(),N("span",xb,[(_(!0),N(Ce,null,Gt(o.value,(a,c,l)=>(_(),N(Ce,{key:c},[a.length===1?(_(),N("button",{key:0,type:"button",role:"button","data-last":l===Object.keys(o.value).length-1||void 0,onClick:u=>b(r)(a[0])},[O("span",Cb,K(c.toString()),1),(_(),xe(qi(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,kb)):(_(),xe(b(ja),{key:1,as:"div","data-last":l===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:ye(()=>[B(b(Dd),null,{default:ye(()=>[O("span",Tb,K(c.toString()),1),(_(),xe(qi(a[0].icon()),{"aria-hidden":"true"})),Pb]),_:2},1024),B(xo,{name:"moonbase:scale"},{default:ye(()=>[B(b(Ad),{class:"moonbase:product-downloads-list"},{default:ye(()=>[(_(!0),N(Ce,null,Gt(a,u=>(_(),N("button",{key:u.key,type:"button",role:"button",onClick:d=>b(r)(u)},K(u.name),9,$b))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),Db={class:"moonbase:product-activations"},Ab=O("th",{scope:"col"}," Device ",-1),Vb=O("th",{scope:"col"}," Activation Method ",-1),Rb=O("th",{scope:"col"}," Last Online ",-1),jb={key:0,scope:"col"},Lb=[O("span",{class:"sr-only"},"Actions",-1)],Mb={key:0},Ub={colspan:"3"},Fb=O("td",null,null,-1),Bb={key:1},Hb=[O("td",{colspan:"3"}," No activations found ",-1)],Zb={key:0},qb=["onClick"],Wb=he({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=Ms(),i=T(null);Re(async()=>{let l=await o(n.productId);for(i.value=l.items.map(u=>({...u,revoking:!1}));l.hasMore&&l.next;)l=await o(n.productId,l.next),i.value.push(...l.items.map(u=>({...u,revoking:!1})))});const a=X(()=>i.value&&i.value.some(l=>l.activationMethod===vi.Online));async function c(l){l.revoking=!0,await s(l),r("revoked",l),i.value&&i.value.splice(i.value.indexOf(l),1)}return(l,u)=>(_(),N("table",Db,[O("thead",null,[O("tr",null,[Ab,Vb,Rb,a.value?(_(),N("th",jb,Lb)):me("",!0)])]),O("tbody",null,[i.value?i.value.length===0?(_(),N("tr",Bb,Hb)):me("",!0):(_(),N("tr",Mb,[O("td",Ub,[B(Pt),Te(" Loading activations.. ")]),Fb])),(_(!0),N(Ce,null,Gt(i.value,d=>{var f;return _(),N("tr",{key:d.id},[O("td",null,K(d.name),1),O("td",null,K(d.activationMethod),1),O("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(_(),N("td",Zb,[O("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>c(d)},[d.revoking?(_(),xe(Pt,{key:0})):me("",!0),Te(" Revoke ")],8,qb)])):me("",!0)])}),128))])]))}}),zb={class:"moonbase:products"},Kb=O("th",{scope:"col"}," Product ",-1),Gb=O("th",{scope:"col"}," Activations ",-1),Jb={key:0,scope:"col"},Yb={key:0},Xb=O("td",null,null,-1),Qb={key:1},e1=[O("td",{colspan:"3"}," No products found ",-1)],t1=["src"],n1={key:1,class:"moonbase:image-placeholder"},r1=O("span",{class:"moonbase:sr-only"},"View activations",-1),o1={key:0},s1={key:0},i1=he({__name:"Products",setup(e){const{getProducts:t}=Ms(),n=T(null);Re(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=X(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(_(),N("table",zb,[O("thead",null,[O("tr",null,[Kb,Gb,r.value?(_(),N("th",Jb," Downloads ")):me("",!0)])]),O("tbody",null,[n.value?n.value.length===0?(_(),N("tr",Qb,e1)):me("",!0):(_(),N("tr",Yb,[O("td",null,[B(Pt),Te(" Loading products.. ")]),Xb])),(_(!0),N(Ce,null,Gt(n.value||[],i=>(_(),N("tr",{key:i.id},[O("td",null,[O("div",null,[i.iconUrl?(_(),N("img",{key:0,src:i.iconUrl,alt:""},null,8,t1)):(_(),N("div",n1)),O("span",null,K(i.name),1)])]),B(b(ja),{as:"td"},{default:ye(()=>[B(b(Dd),{class:"moonbase:button","data-variant":"secondary"},{default:ye(()=>[r1,Te(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),B(xo,{name:"moonbase:scale"},{default:ye(()=>[B(b(Ad),null,{default:ye(()=>[B(Wb,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(_(),N("td",o1,[i.currentVersion!=null?(_(),N("div",s1,[i.downloads?(_(),xe(Ib,{key:0,downloads:i.downloads},null,8,["downloads"])):me("",!0)])):me("",!0)])):me("",!0)]))),128))])]))}}),a1={class:"moonbase:redeem"},l1=["data-visible"],c1={key:1,class:"moonbase:redeem-voucher"},u1={key:0},d1={key:1},f1=O("span",null," Contains: ",-1),p1={class:"moonbase:redeem-voucher-products"},h1=["src"],m1={key:1,class:"moonbase:image-placeholder"},v1={key:0},g1={class:"moonbase:redeem-voucher-bundle"},y1=["src"],_1={key:1,class:"moonbase:image-placeholder"},b1={key:0},w1={class:"moonbase:redeem-voucher-bundle-products"},E1={class:"shrink-0"},O1=["src"],N1={key:1,class:"moonbase:image-placeholder"},S1=he({__name:"Redeem",setup(e){const{redeem:t}=ng(),n=T(!1),r=T(null),o=T(null),s=T("");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,c)=>(_(),N("div",a1,[B(xo,{mode:"out-in",name:"moonbase:slide-left"},{default:ye(()=>[r.value?(_(),N("div",c1,[O("h3",null,[Te(" You got: "),O("strong",null,K(r.value.name),1)]),r.value.description?(_(),N("h4",u1,K(r.value.description),1)):me("",!0),O("h4",null,[Te(" Code: "),O("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(_(),N("div",d1,[f1,O("div",p1,[(_(!0),N(Ce,null,Gt(r.value.redeemsProducts,({value:l,quantity:u})=>(_(),N("div",{key:l.id,class:"moonbase:redeem-voucher-product"},[O("div",null,[l.iconUrl?(_(),N("img",{key:0,src:l.iconUrl,alt:""},null,8,h1)):(_(),N("div",m1))]),O("div",null,[O("p",null,[Te(K(l.name)+" ",1),u!==1?(_(),N("span",v1,"x "+K(u),1)):me("",!0)]),O("p",null,K(l.tagline),1)])]))),128)),(_(!0),N(Ce,null,Gt(r.value.redeemsBundles,({value:l,quantity:u})=>(_(),N("div",{key:l.id},[O("div",g1,[O("div",null,[l.iconUrl?(_(),N("img",{key:0,src:l.iconUrl,alt:""},null,8,y1)):(_(),N("div",_1))]),O("div",null,[O("p",null,[Te(K(l.name)+" ",1),u!==1?(_(),N("span",b1,"x "+K(u),1)):me("",!0)]),O("p",null,K(l.tagline),1)])]),O("div",w1,[(_(!0),N(Ce,null,Gt(l.products,d=>(_(),N("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[O("div",E1,[d.iconUrl?(_(),N("img",{key:0,src:d.iconUrl,alt:""},null,8,O1)):(_(),N("div",N1))]),O("div",null,[O("p",null,K(d.name),1),O("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):me("",!0)])):(_(),xe(Hn,{key:0,handler:i},{default:ye(()=>{var l;return[B(gt,{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),B(Zn,{label:"Redeem",success:"Redeem",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((l=o.value)==null?void 0:l.message),9,l1)]}),_:1}))]),_:1})]))}}),x1={class:"moonbase:customer"},k1=he({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Ae();function n(s){switch(s){case pe.ViewAccount:return 0;case pe.ViewProducts:return 1;case pe.RedeemVoucher:return 2}return 0}const r=T(n(t.intent));Xe(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(_(),xe(ri,{open:s.open,onClose:i[0]||(i[0]=a=>b(t).reset())},{default:ye(()=>[O("div",x1,[B(b(t_),{"selected-index":r.value,onChange:o},{default:ye(()=>[B(b(n_),null,{default:ye(()=>[B(b(Ma),null,{default:ye(()=>[Te("Account")]),_:1}),B(b(Ma),null,{default:ye(()=>[Te(" Products ")]),_:1}),B(b(Ma),null,{default:ye(()=>[Te("Redeem")]),_:1})]),_:1}),B(b(r_),null,{default:ye(()=>[B(b(Ua),null,{default:ye(()=>[B(cb)]),_:1}),B(b(Ua),null,{default:ye(()=>[B(i1)]),_:1}),B(b(Ua),null,{default:ye(()=>[B(S1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),C1={class:"moonbase:auto-activate"},T1={key:0,class:"moonbase:loader"},P1={key:1,class:"moonbase:loader"},$1={key:2,class:"moonbase:loader"},I1={key:3},D1={key:0,class:"moonbase:auto-activate-product"},A1=["src"],V1={key:1,class:"moonbase:image-placeholder"},R1={key:1,class:"moonbase:loader"},j1=[O("h3",null," Uh oh ",-1),O("p",null," This activation request was cancelled, open your app to try again. ",-1)],L1={key:2,class:"moonbase:loader"},M1={key:3,class:"moonbase:loader"},U1=[O("h3",null," Done! ",-1),O("p",null," Your product is activated. ",-1)],F1={key:4,class:"moonbase:auto-activate-content"},B1={key:0},H1={key:1},Z1=O("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),q1={class:"moonbase:auto-activate-cta"},W1=["href"],z1={key:2,class:"moonbase:auto-activate-trial"},K1={class:"moonbase:auto-activate-cta"},G1=he({__name:"AutoActivate",setup(e){const t=Ae(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:c,error:l,fulfillLicense:u,fulfillTrial:d,cancel:f}=tg(o);Xe(s,E=>{var S;!a.value&&!c.value&&(E==null?void 0:E.status)===Ht.Requested&&((S=E==null?void 0:E.licenseEligibility)!=null&&S.eligible)&&u()});function m(){f(),t.show(ke.Customer,pe.ViewProducts)}function y(){t.enqueue(ke.Activation,pe.ActivateProduct,t.parameters??void 0),t.show(ke.Authentication,pe.SignIn)}return(E,S)=>{var A,F,C,z;return _(),N("div",C1,[b(i)||!b(r)?(_(),N("div",T1,[B(Pt)])):b(l)?(_(),N("div",P1,K(b(l)),1)):b(s)?(_(),N("div",I1,[b(s).product?(_(),N("div",D1,[b(s).product.iconUrl?(_(),N("img",{key:0,src:b(s).product.iconUrl,alt:""},null,8,A1)):(_(),N("div",V1)),O("div",null,[O("h2",null,K(b(s).product.name),1),O("h3",null,K(b(s).product.tagline),1)])])):me("",!0),((A=b(s))==null?void 0:A.status)===b(Ht).Cancelled?(_(),N("div",R1,j1)):b(a)||b(c)?(_(),N("div",L1,[B(Pt),O("p",null,"Activating "+K(b(s).product.name)+"...",1)])):((F=b(s))==null?void 0:F.status)===b(Ht).Completed?(_(),N("div",M1,U1)):(_(),N("div",F1,[b(n)?(C=b(n).ownedProducts)!=null&&C.includes(b(s).product.id)?(_(),N("div",H1,[Z1,O("span",q1,[O("button",{role:"button",class:"moonbase:button",onClick:S[0]||(S[0]=$=>m())}," Licenses "),b(s).product&&b(s).product.website?(_(),N("a",{key:0,href:b(s).product.website,class:"moonbase:button"}," Purchase ",8,W1)):me("",!0)])])):me("",!0):(_(),N("div",B1,[Te(" Please sign in to use a license "),O("span",{class:"moonbase:auto-activate-cta"},[O("button",{role:"button",class:"moonbase:button",onClick:y}," Sign in ")])])),(z=b(s).trialEligibility)!=null&&z.eligible?(_(),N("div",z1,[Te(" You are eligible for a "+K(b(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),b(s).trialEligibility.existing?(_(),N(Ce,{key:0},[Te(" of which you have "+K(b(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):me("",!0),Te(". "),O("span",K1,[O("button",{role:"button",class:"moonbase:button",onClick:S[1]||(S[1]=$=>b(d)())}," Start trial ")])])):me("",!0)]))])):(_(),N("div",$1," Could not find activation request "))])}}}),J1={class:"moonbase:activation"},Y1=he({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Ae();return(n,r)=>(_(),xe(ri,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:ye(()=>[O("div",J1,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Activate product ")]),_:1}),n.open&&b(t).intent===b(pe).ActivateProduct?(_(),xe(G1,{key:0})):me("",!0)])]),_:1},8,["open"]))}});function X1(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 Q1={class:"moonbase:download-product"},ew={key:0,class:"moonbase:loader"},tw={key:1,class:"moonbase:loader"},nw={key:2,class:"moonbase:loader"},rw={key:3},ow={class:"moonbase:download-product-product"},sw=["src"],iw={key:1,class:"moonbase:image-placeholder"},aw={key:0},lw={key:0,class:"moonbase:download-product-content"},cw={key:1,class:"moonbase:download-product-content"},uw={key:2,class:"moonbase:download-product-content"},dw={key:0,role:"list"},fw={class:"moonbase:download-product-download-name"},pw=["onClick"],hw=O("span",{class:"moonbase:download-product-clicker"},null,-1),mw={class:"moonbase:download-product-download-description"},vw=O("span",null," |",-1),gw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},yw=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)],_w={key:1,class:"moonbase:loader"},bw=he({__name:"DownloadProduct",setup(e){const t=Ae(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=Ms(),i={[Bt.Universal]:()=>Ud,[Bt.Windows]:()=>Fd,[Bt.Linux]:()=>Bd,[Bt.Mac]:()=>Hd},a=T(null),c=T([]),l=T(null),u=T(!0),d=X(()=>t.getParameter("key")),f=X(()=>{var E,S;return(S=(E=a.value)==null?void 0:E.downloads)==null?void 0:S.filter(A=>!d.value||A.key===d.value)});Re(async()=>{const E=t.getParameter("product_id"),S=t.getParameter("version");if(!E){l.value="Link is broken";return}try{a.value=await o(E,S||void 0)}catch(A){l.value=A.message}u.value=!1});function m(){t.enqueue(ke.Download,pe.DownloadProduct,t.parameters??void 0),t.show(ke.Authentication,pe.SignIn)}async function y(E){c.value.push(E.key),await s(E),c.value=c.value.filter(S=>S!==E.key)}return(E,S)=>{var A,F;return _(),N("div",Q1,[u.value||!b(r)?(_(),N("div",ew,[B(Pt)])):l.value?(_(),N("div",tw,K(l.value),1)):a.value?(_(),N("div",rw,[O("div",ow,[a.value.iconUrl?(_(),N("img",{key:0,src:a.value.iconUrl,alt:""},null,8,sw)):(_(),N("div",iw)),O("div",null,[O("h2",null,[Te(K(a.value.name)+" ",1),O("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(_(),N("span",aw," (pre-release)")):me("",!0)]),O("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!b(n)?(_(),N("div",lw,[Te(" Please sign in to download product "),O("span",{class:"moonbase:download-product-cta"},[O("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((A=b(n).ownedProducts)!=null&&A.includes(a.value.id))?(_(),N("div",cw," This product requires ownership to download ")):(_(),N("div",uw,[(F=a.value)!=null&&F.downloads&&a.value.downloads.length>0?(_(),N("ul",dw,[(_(!0),N(Ce,null,Gt(f.value,C=>(_(),N("li",{key:C.key},[O("div",null,[O("p",fw,[O("button",{onClick:z=>y(C)},[hw,Te(" "+K(C.name),1)],8,pw)]),O("p",mw,[(_(),xe(qi(i[C.platform]()),{"aria-hidden":"true"})),Te(" "+K(C.platform)+" ",1),vw,Te(" "+K(b(X1)(C.size)),1)])]),O("div",null,[c.value.includes(C.key)?(_(),xe(Pt,{key:0})):(_(),N("svg",gw,yw))])]))),128))])):(_(),N("div",_w," No downloadable files found "))]))])):(_(),N("div",nw," Could not find product "))])}}}),ww={class:"moonbase:download"},Ew=he({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Ae();return(n,r)=>(_(),xe(ri,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:ye(()=>[O("div",ww,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Download product ")]),_:1}),n.open&&b(t).intent===b(pe).DownloadProduct?(_(),xe(bw,{key:0})):me("",!0)])]),_:1},8,["open"]))}}),Ow=he({__name:"App",setup(e){const t=$e(Ws),n=Ae();return(r,o)=>{var s;return _(),N(Ce,null,[(s=b(t))!=null&&s.toolbar.enabled?(_(),xe(Lg,{key:0})):me("",!0),B(ob,{open:b(n).active===b(ke).Cart},null,8,["open"]),B(m_,{open:b(n).active===b(ke).Authentication},null,8,["open"]),B(Y1,{open:b(n).active===b(ke).Activation},null,8,["open"]),B(Ew,{open:b(n).active===b(ke).Download},null,8,["open"]),B(k1,{open:b(n).active===b(ke).Customer},null,8,["open"])],64)}}});function oi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Wa(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(oi(e)&&oi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];oi(o)&&oi(e[r])?e[r]=Wa(e[r],o):o!==void 0&&(e[r]=o)}}return Wa(e,...t)}class Nw{constructor(){Nr(this,"initialized",!1);Nr(this,"pinia");Nr(this,"storefront");Nr(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=Wa(Dg,n),this.storefront=rg(t),this.pinia=Cg(),Uv(Ow).use(this.storefront).use(this.pinia).provide(Ws,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const s=new URLSearchParams(window.location.search),i=s.get("mb_intent");if(i&&Object.values(pe).includes(i)){const a=Object.fromEntries([...s.entries()].filter(([l])=>l.startsWith("mb_")).map(([l,u])=>[l.substring(3),u]));if(i===pe.Checkout&&a.complete)return;this[i](a);for(const l of Object.keys(a))s.delete(`mb_${l}`);const c=s.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(c?`?${c}`:""))}}const o=Ae(this.pinia);this.storefront.onCheckoutClosed(s=>{s==="view_products"&&o.show(ke.Customer,pe.ViewProducts)})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Authentication,pe.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");Ae(this.pinia).show(ke.Authentication,pe.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Authentication,pe.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Authentication,pe.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Authentication,pe.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);St(this.storefront).user.value?n.show(ke.Authentication,pe.ConfirmEmailChange,t):(n.show(ke.Authentication,pe.SignIn),n.enqueue(ke.Authentication,pe.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ae(this.pinia);St(this.storefront).user.value?t.show(ke.Customer,pe.ViewAccount):(t.show(ke.Authentication,pe.SignIn),t.enqueue(ke.Customer,pe.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Cart,pe.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Cart,pe.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Download,pe.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");Ae(this.pinia).show(ke.Activation,pe.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ke.Cart,pe.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 c=Vu(t.product_id,this.storefront);if(c.value)n.addToCart(c.value,(o=c.value.variations)==null?void 0:o.find(l=>l.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const l=Vu(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(s=l.value.variations)==null?void 0:s.find(u=>u.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const c=Au(t.bundle_id,this.storefront);if(c.value)n.addToCart(c.value,(i=c.value.variations)==null?void 0:i.find(l=>l.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const l=Au(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(a=l.value.variations)==null?void 0:a.find(u=>u.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Ae(this.pinia).show(ke.Cart,pe.AddToCart)}checkout(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;ba(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Zd=new Nw;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Zd),wt.MoonbaseIntent=pe,wt.default=Zd,Object.defineProperties(wt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
25
+ `));const f=ad(u.props??{},i,l),m=Rt(u,f,!0);for(const y in f)y.startsWith("on")&&(m.props||(m.props={}),m.props[y]=f[y]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Le(s,Object.assign({},i,l),{default:()=>a})}function id(e){return e.flatMap(t=>t.type===Ce?id(t.children):[t])}function ad(...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 Pa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Sy(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var zn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(zn||{});let Kn=he({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 Qe({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function xy(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 Qt(e){if(To.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 Ks=["[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 Ue=(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))(Ue||{}),yn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(yn||{});function Gs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ks)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var $a=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($a||{});function ld(e,t=0){var n;return e===((n=Qt(e))==null?void 0:n.body)?!1:Je(t,{0(){return e.matches(Ks)},1(){let r=e;for(;r!==null;){if(r.matches(Ks))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 br(e){e==null||e.focus({preventScroll:!0})}const ky=["textarea","input"].join(",");function Cy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,ky))??!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:Gs(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")})(),c=t&32?{preventScroll:!0}:{};let u=0;const d=i.length;let f;do{if(u>=d||u+d<=0)return 0;let m=l+u;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(c),u+=a}while(f!==s.activeElement);return t&6&&Cy(f)&&f.select(),2}let wr=[];xy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||wr[0]===t.target)return;let n=t.target;n=n.closest(Ks),wr.unshift(n??t.target),wr=wr.filter(r=>r!=null&&r.isConnected),wr.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 Js(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function cd(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 ud=(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))(ud||{});const Po=Object.assign(he({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:T(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=T(null);r({el:o,$el:o});const s=X(()=>Qt(o)),i=T(!1);Re(()=>i.value=!0),mt(()=>i.value=!1),Py({ownerDocument:s},X(()=>i.value&&!!(e.features&16)));const a=$y({ownerDocument:s,container:o,initialFocus:X(()=>e.initialFocus)},X(()=>i.value&&!!(e.features&2)));Iy({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},X(()=>i.value&&!!(e.features&8)));const l=Ta();function c(m){const y=G(o);if(!y)return;(S=>S())(()=>{Je(l.value,{[xt.Forwards]:()=>{it(y,Ue.First,{skipElements:[m.relatedTarget]})},[xt.Backwards]:()=>{it(y,Ue.Last,{skipElements:[m.relatedTarget]})}})})}const u=T(!1);function d(m){m.key==="Tab"&&(u.value=!0,requestAnimationFrame(()=>{u.value=!1}))}function f(m){if(!i.value)return;const y=cd(e.containers);G(o)instanceof HTMLElement&&y.add(G(o));const E=m.relatedTarget;E instanceof HTMLElement&&E.dataset.moonbaseFocusGuard!=="true"&&(dd(y,E)||(u.value?it(G(o),Je(l.value,{[xt.Forwards]:()=>Ue.Next,[xt.Backwards]:()=>Ue.Previous})|Ue.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&br(m.target)))}return()=>{const m={},y={ref:o,onKeydown:d,onFocusout:f},{features:E,initialFocus:S,containers:A,...F}=e;return Le(Ce,[!!(E&4)&&Le(Kn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:c,features:zn.Focusable}),Qe({ourProps:y,theirProps:{...t,...F},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(E&4)&&Le(Kn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:c,features:zn.Focusable})])}}}),{features:ud});function Ty(e){const t=T(wr.slice());return Xe([e],([n],[r])=>{r===!0&&n===!1?Js(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=wr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Py({ownerDocument:e},t){const n=Ty(t);Re(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&br(n())},{flush:"post"})}),mt(()=>{t.value&&br(n())})}function $y({ownerDocument:e,container:t,initialFocus:n},r){const o=T(null),s=T(!1);return Re(()=>s.value=!0),mt(()=>s.value=!1),Re(()=>{Xe([t,n,r],(i,a)=>{if(i.every((c,u)=>(a==null?void 0:a[u])===c)||!r.value)return;const l=G(t);l&&Js(()=>{var d,f;if(!s.value)return;const c=G(n),u=(d=e.value)==null?void 0:d.activeElement;if(c){if(c===u){o.value=u;return}}else if(l.contains(u)){o.value=u;return}c?br(c):it(l,Ue.First|Ue.NoScroll)===yn.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 Iy({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ca((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=cd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const c=i.target;c&&c instanceof HTMLElement?dd(a,c)?(r.value=c,br(c)):(i.preventDefault(),i.stopPropagation(),br(l)):br(r.value)},!0)}function dd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function Dy(e){let t=fh(e.getSnapshot());return mt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function $o(){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 Js(()=>{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=$o();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 Ay(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 Vy(){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 fd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ry(){return/Android/gi.test(window.navigator.userAgent)}function jy(){return fd()||Ry()}function Ly(){return fd()?{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=$o();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),c=e.querySelector(l);c&&!r(c)&&(s=c)}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 My(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Uy(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const Er=Ay(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:$o(),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:Uy(n)},o=[Ly(),Vy(),My()];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)}});Er.subscribe(()=>{const e=Er.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)&&Er.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Er.dispatch("TEARDOWN",n)}});function Fy(e,t,n){const r=Dy(Er),o=X(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Xe([e,t],([s,i],[a],l)=>{if(!s||!i)return;Er.dispatch("PUSH",s,n);let c=!1;l(()=>{c||(Er.dispatch("POP",a??s,n),c=!0)})},{immediate:!0}),o}let By=0;function Hy(){return++By}function $t(){return Hy()}const Ia=new Map,Io=new Map;function pd(e,t=T(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Io.get(r)??1;if(s===1?Io.delete(r):Io.set(r,s-1),s!==1)return;const i=Ia.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,Ia.delete(r))});const o=Io.get(r)??0;Io.set(r,o+1),o===0&&(Ia.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Do(e,t,n,r){To.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const hd=30;function md(e,t,n=X(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const c=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const u of c){if(u===null)continue;const d=u instanceof HTMLElement?u:G(u);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!ld(l,$a.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=T(null);Do(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),Do(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),Do(n,"click",i=>{jy()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Do(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Do(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=hd||Math.abs(a.y-s.y)>=hd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),sd(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function vd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=T(null),o=Qt(r);function s(){var a,l;const i=[];for(const c of e)c!==null&&(c instanceof HTMLElement?i.push(c):"value"in c&&c.value instanceof HTMLElement&&i.push(c.value));if(t!=null&&t.value)for(const c of t.value)i.push(c);for(const c of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c.id!=="moonbase"&&(c.contains(G(r))||c.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(u=>c.contains(u))||i.push(c));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Le(Kn,{features:zn.Hidden,ref:r})}}}let gd=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 Zy(){return Ys()!==null}function Ys(){return $e(gd,null)}function yd(e){dt(gd,e)}const _d=Symbol("ForcePortalRootContext");function qy(){return $e(_d,!1)}const bd=he({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(_d,e.force),()=>{const{force:r,...o}=e;return Qe({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let wd=Symbol("StackContext");var Da=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Da||{});function Wy(){return $e(wd,()=>{})}function zy({type:e,enabled:t,element:n,onUpdate:r}){let o=Wy();function s(...i){r==null||r(...i),o(...i)}Re(()=>{Xe(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),mt(()=>{t.value&&s(1,e,n)}),dt(wd,s)}var et=(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))(et||{});let Ky=Symbol("DescriptionContext");function Gy({slot:e=T({}),name:t="Description",props:n={}}={}){let r=T([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Ky,{register:o,slot:e,name:t,props:n}),X(()=>r.value.length>0?r.value.join(" "):void 0)}function Ed(e){const t=Qt(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 Jy=he({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=T(null);X(()=>Qt(r));const o=qy(),s=$e(Nd,null),i=T(o===!0||s==null?Ed(r.value):s.resolveTarget()),a=T(!1);Re(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=$e(Aa,null);let c=!1;const u=Is();return Xe(r,()=>{if(c||!l)return;const d=G(r);d&&(mt(l.register(d),u),c=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Le(Pm,{to:i.value},Qe({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let Aa=Symbol("PortalParentContext");function Od(){const e=$e(Aa,null),t=T([]);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,he({name:"PortalWrapper",setup(s,{slots:i}){return dt(Aa,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let Nd=Symbol("PortalGroupContext");const Yy=he({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=so({resolveTarget(){return e.target}});return dt(Nd,r),()=>{const{target:o,...s}=e;return Qe({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Va=Symbol("DialogContext");function Xs(e){const t=$e(Va,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xs),n}return t}const Qs="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Sd=he({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:Qs},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${$t()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var ce;const s=T(!1);Re(()=>{s.value=!0});let i=!1;const a=X(()=>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=T(0),c=Ys(),u=X(()=>e.open===Qs&&c!==null?(c.value&at.Open)===at.Open:e.open),d=T(null),f=X(()=>Qt(d));if(o({el:d,$el:d}),!(e.open!==Qs||c!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof u.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value===Qs?void 0:e.open}`);const y=X(()=>s.value&&u.value?0:1),E=X(()=>y.value===0),S=T(null),A={titleId:S,panelRef:T(null),dialogState:y,setTitleId(Ie){S.value!==Ie&&(S.value=Ie)},close(){t("close",!1)}},F=X(()=>l.value>1),C=$e(Va,null)!==null,[z,$]=Od(),{resolveContainers:Z,mainTreeNodeRef:x,MainTreeNode:fe}=vd({portals:z,defaultContainers:[X(()=>A.panelRef.value??d.value)]}),Y=X(()=>F.value?"parent":"leaf"),V=X(()=>c!==null?(c.value&at.Closing)===at.Closing:!1),P=X(()=>C||V.value?!1:E.value),j=X(()=>{var Ie;return Array.from(((Ie=f.value)==null?void 0:Ie.querySelectorAll("body > *"))??[]).find(je=>je.id==="moonbase"?!1:je.contains(G(x))&&je instanceof HTMLElement)??null});pd(j,P);const oe=X(()=>F.value?!0:E.value),w=X(()=>{var Ie;return Array.from(((Ie=f.value)==null?void 0:Ie.querySelectorAll("[data-moonbase-portal]"))??[]).find(je=>je.contains(G(x))&&je instanceof HTMLElement)??null});pd(w,oe),zy({type:"Dialog",enabled:X(()=>y.value===0),element:d,onUpdate:(Ie,je)=>{if(je==="Dialog")return Je(Ie,{[Da.Add]:()=>l.value+=1,[Da.Remove]:()=>l.value-=1})}});const I=Gy({name:"DialogDescription",slot:X(()=>({open:u.value}))});dt(Va,A);const ne=X(()=>!(!E.value||F.value));md(Z,(Ie,je)=>{Ie.preventDefault(),A.close(),co(()=>je==null?void 0:je.focus())},ne);const ae=X(()=>!(F.value||y.value!==0));Ca((ce=f.value)==null?void 0:ce.defaultView,"keydown",Ie=>{ae.value&&(Ie.defaultPrevented||Ie.key===et.Escape&&(Ie.preventDefault(),Ie.stopPropagation(),A.close()))});const re=X(()=>!(V.value||y.value!==0||C));return Fy(f,re,Ie=>({containers:[...Ie.containers??[],Z]})),ft(Ie=>{if(y.value!==0)return;const je=G(d);if(!je)return;const nt=new ResizeObserver(wt=>{for(const bn of wt){const Gn=bn.target.getBoundingClientRect();Gn.x===0&&Gn.y===0&&Gn.width===0&&Gn.height===0&&A.close()}});nt.observe(je),Ie(()=>nt.disconnect())}),()=>{const{id:Ie,open:je,initialFocus:nt,...wt}=e,bn={...n,ref:d,id:Ie,role:a.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":S.value,"aria-describedby":I.value},Gn={open:y.value===0};return Le(bd,{force:!0},()=>[Le(Jy,()=>Le(Yy,{target:d.value},()=>Le(bd,{force:!1},()=>Le(Po,{initialFocus:nt,containers:Z,features:E.value?Je(Y.value,{parent:Po.features.RestoreFocus,leaf:Po.features.All&~Po.features.FocusLock}):Po.features.None},()=>Le($,{},()=>Qe({ourProps:bn,theirProps:{...wt,...n},slot:Gn,attrs:n,slots:r,visible:y.value===0,features:qn.RenderStrategy|qn.Static,name:"Dialog"})))))),Le(fe)])}}}),xd=he({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${$t()}`}},setup(e,{attrs:t,slots:n}){const r=Xs("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Qe({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),kd=he({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${$t()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xs("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 Qe({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),ei=he({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${$t()}`}},setup(e,{attrs:t,slots:n}){const r=Xs("DialogTitle");return Re(()=>{r.setTitleId(e.id),mt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Qe({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Cd(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Td(e,t){let n=T(Cd(e.value.type,e.value.as));return Re(()=>{n.value=Cd(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 Pd=Symbol("PopoverContext");function Ra(e){const t=$e(Pd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${ja.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ra),n}return t}const Xy=Symbol("PopoverGroupContext");function $d(){return $e(Xy,null)}const Id=Symbol("PopoverPanelContext");function Qy(){return $e(Id,null)}let ja=he({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var z;const o=T(null);r({el:o,$el:o});const s=T(1),i=T(null),a=T(null),l=T(null),c=T(null),u=X(()=>Qt(o)),d=X(()=>{var P,j;if(!G(i)||!G(c))return!1;for(const oe of document.querySelectorAll("body > *"))if(Number(oe==null?void 0:oe.contains(G(i)))^Number(oe==null?void 0:oe.contains(G(c))))return!0;const $=Gs(),Z=$.indexOf(G(i)),x=(Z+$.length-1)%$.length,fe=(Z+1)%$.length,Y=$[x],V=$[fe];return!((P=G(c))!=null&&P.contains(Y))&&!((j=G(c))!=null&&j.contains(V))}),f={popoverState:s,buttonId:T(null),panelId:T(null),panel:c,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Je(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close($){f.closePopover();const Z=$?$ instanceof HTMLElement?$:$.value instanceof HTMLElement?G($):G(f.button):G(f.button);Z==null||Z.focus()}};dt(Pd,f),yd(X(()=>Je(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},y=$d(),E=y==null?void 0:y.registerPopover,[S,A]=Od(),F=vd({mainTreeNodeRef:y==null?void 0:y.mainTreeNodeRef,portals:S,defaultContainers:[i,c]});function C(){var $,Z,x;return(y==null?void 0:y.isFocusWithinPopoverGroup())??((($=u.value)==null?void 0:$.activeElement)&&(((Z=G(i))==null?void 0:Z.contains(u.value.activeElement))||((x=G(c))==null?void 0:x.contains(u.value.activeElement))))}return ft(()=>E==null?void 0:E(m)),Ca((z=u.value)==null?void 0:z.defaultView,"focus",$=>{var Z,x;$.target!==window&&$.target instanceof HTMLElement&&s.value===0&&(C()||i&&c&&(F.contains($.target)||(Z=G(f.beforePanelSentinel))!=null&&Z.contains($.target)||(x=G(f.afterPanelSentinel))!=null&&x.contains($.target)||f.closePopover()))},!0),md(F.resolveContainers,($,Z)=>{var x;f.closePopover(),ld(Z,$a.Loose)||($.preventDefault(),(x=G(i))==null||x.focus())},X(()=>s.value===0)),()=>{const $={open:s.value===0,close:f.close};return Le(Ce,[Le(A,{},()=>Qe({theirProps:{...e,...n},ourProps:{ref:o},slot:$,slots:t,attrs:n,name:"Popover"})),Le(F.MainTreeNode)])}}});const Dd=he({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${$t()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=Ra("PopoverButton"),s=X(()=>Qt(o.button));r({el:o.button,$el:o.button}),Re(()=>{o.buttonId.value=e.id}),mt(()=>{o.buttonId.value=null});const i=$d(),a=i==null?void 0:i.closeOthers,l=Qy(),c=X(()=>l===null?!1:l.value===o.panelId.value),u=T(null),d=`moonbase-focus-sentinel-${$t()}`;c.value||ft(()=>{o.button.value=G(u)});const f=Td(X(()=>({as:e.as,type:t.type})),u);function m(C){var z,$,Z,x,fe;if(c.value){if(o.popoverState.value===1)return;switch(C.key){case et.Space:case et.Enter:C.preventDefault(),($=(z=C.target).click)==null||$.call(z),o.closePopover(),(Z=G(o.button))==null||Z.focus();break}}else switch(C.key){case et.Space:case et.Enter:C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case et.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(x=s.value)!=null&&x.activeElement&&!((fe=G(o.button))!=null&&fe.contains(s.value.activeElement)))return;C.preventDefault(),C.stopPropagation(),o.closePopover();break}}function y(C){c.value||C.key===et.Space&&C.preventDefault()}function E(C){var z,$;e.disabled||(c.value?(o.closePopover(),(z=G(o.button))==null||z.focus()):(C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),($=G(o.button))==null||$.focus()))}function S(C){C.preventDefault(),C.stopPropagation()}const A=Ta();function F(){const C=G(o.panel);if(!C)return;function z(){Je(A.value,{[xt.Forwards]:()=>it(C,Ue.First),[xt.Backwards]:()=>it(C,Ue.Last)})===yn.Error&&it(Gs().filter(Z=>Z.dataset.moonbaseFocusGuard!=="true"),Je(A.value,{[xt.Forwards]:Ue.Next,[xt.Backwards]:Ue.Previous}),{relativeTo:G(o.button)})}z()}return()=>{const C=o.popoverState.value===0,z={open:C},{id:$,...Z}=e,x=c.value?{ref:u,type:f.value,onKeydown:m,onClick:E}:{ref:u,id:$,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:y,onClick:E,onMousedown:S};return Le(Ce,[Qe({ourProps:x,theirProps:{...t,...Z},slot:z,attrs:t,slots:n,name:"PopoverButton"}),C&&!c.value&&o.isPortalled.value&&Le(Kn,{id:d,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:F})])}}}),Ad=he({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-${$t()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=Ra("PopoverPanel"),i=X(()=>Qt(s.panel)),a=`moonbase-focus-sentinel-before-${$t()}`,l=`moonbase-focus-sentinel-after-${$t()}`;r({el:s.panel,$el:s.panel}),Re(()=>{s.panelId.value=e.id}),mt(()=>{s.panelId.value=null}),dt(Id,s.panelId),ft(()=>{var A,F;if(!o||s.popoverState.value!==0||!s.panel)return;const S=(A=i.value)==null?void 0:A.activeElement;(F=G(s.panel))!=null&&F.contains(S)||it(G(s.panel),Ue.First)});const c=Ys(),u=X(()=>c!==null?(c.value&at.Open)===at.Open:s.popoverState.value===0);function d(S){var A,F;switch(S.key){case et.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!((A=G(s.panel))!=null&&A.contains(i.value.activeElement)))return;S.preventDefault(),S.stopPropagation(),s.closePopover(),(F=G(s.button))==null||F.focus();break}}function f(S){var F,C,z,$,Z;const A=S.relatedTarget;A&&G(s.panel)&&((F=G(s.panel))!=null&&F.contains(A)||(s.closePopover(),((z=(C=G(s.beforePanelSentinel))==null?void 0:C.contains)!=null&&z.call(C,A)||(Z=($=G(s.afterPanelSentinel))==null?void 0:$.contains)!=null&&Z.call($,A))&&A.focus({preventScroll:!0})))}const m=Ta();function y(){const S=G(s.panel);if(!S)return;function A(){Je(m.value,{[xt.Forwards]:()=>{var C;it(S,Ue.First)===yn.Error&&((C=G(s.afterPanelSentinel))==null||C.focus())},[xt.Backwards]:()=>{var F;(F=G(s.button))==null||F.focus({preventScroll:!0})}})}A()}function E(){const S=G(s.panel);if(!S)return;function A(){Je(m.value,{[xt.Forwards]:()=>{const F=G(s.button),C=G(s.panel);if(!F)return;const z=Gs(),$=z.indexOf(F),Z=z.slice(0,$+1),fe=[...z.slice($+1),...Z];for(const Y of fe.slice())if(Y.dataset.moonbaseFocusGuard==="true"||C!=null&&C.contains(Y)){const V=fe.indexOf(Y);V!==-1&&fe.splice(V,1)}it(fe,Ue.First,{sorted:!1})},[xt.Backwards]:()=>{var C;it(S,Ue.Previous)===yn.Error&&((C=G(s.button))==null||C.focus())}})}A()}return()=>{const S={open:s.popoverState.value===0,close:s.close},{id:A,focus:F,...C}=e,z={ref:s.panel,id:A,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return Qe({ourProps:z,theirProps:{...t,...C},attrs:t,slot:S,slots:{...n,default:(...$)=>{var Z;return[Le(Ce,[u.value&&s.isPortalled.value&&Le(Kn,{id:a,ref:s.beforePanelSentinel,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:y}),(Z=n.default)==null?void 0:Z.call(n,...$),u.value&&s.isPortalled.value&&Le(Kn,{id:l,ref:s.afterPanelSentinel,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:E})])]}},features:qn.RenderStrategy|qn.Static,visible:u.value,name:"PopoverPanel"})}}});let e_=he({props:{onFocus:{type:Function,required:!0}},setup(e){let t=T(!0);return()=>t.value?Le(Kn,{as:"button",type:"button",features:zn.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 Vd=Symbol("TabsContext");function Ao(e){const t=$e(Vd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ao),n}return t}const La=Symbol("TabsSSRContext"),t_=he({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=T(e.selectedIndex??e.defaultIndex),s=T([]),i=T([]),a=X(()=>e.selectedIndex!==null),l=X(()=>a.value?e.selectedIndex:o.value);function c(y){const E=jr(u.tabs.value,G),S=jr(u.panels.value,G),A=E.filter(F=>{var C;return!((C=G(F))!=null&&C.hasAttribute("disabled"))});if(y<0||y>E.length-1){const F=Je(o.value===null?0:Math.sign(y-o.value),{[-1]:()=>1,0:()=>Je(Math.sign(y),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),C=Je(F,{0:()=>E.indexOf(A[0]),1:()=>E.indexOf(A[A.length-1])});C!==-1&&(o.value=C),u.tabs.value=E,u.panels.value=S}else{const F=E.slice(0,y),z=[...E.slice(y),...F].find(Z=>A.includes(Z));if(!z)return;let $=E.indexOf(z)??u.selectedIndex.value;$===-1&&($=u.selectedIndex.value),o.value=$,u.tabs.value=E,u.panels.value=S}}let u={selectedIndex:X(()=>o.value??e.defaultIndex??null),orientation:X(()=>e.vertical?"vertical":"horizontal"),activation:X(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(y){l.value!==y&&r("change",y),a.value||c(y)},registerTab(y){if(s.value.includes(y))return;const E=s.value[o.value];if(s.value.push(y),s.value=jr(s.value,G),!a.value){const S=s.value.indexOf(E)??o.value;S!==-1&&(o.value=S)}},unregisterTab(y){const E=s.value.indexOf(y);E!==-1&&s.value.splice(E,1)},registerPanel(y){i.value.includes(y)||(i.value.push(y),i.value=jr(i.value,G))},unregisterPanel(y){const E=i.value.indexOf(y);E!==-1&&i.value.splice(E,1)}};dt(Vd,u);const d=T({tabs:[],panels:[]}),f=T(!1);Re(()=>{f.value=!0}),dt(La,X(()=>f.value?null:d.value));const m=X(()=>e.selectedIndex);return Re(()=>{Xe([m],()=>c(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const y=jr(u.tabs.value,G);y.some((S,A)=>G(u.tabs.value[A])!==G(S))&&u.setSelectedIndex(y.findIndex(S=>G(S)===G(u.tabs.value[l.value])))}),()=>{const y={selectedIndex:o.value};return Le(Ce,[s.value.length<=0&&Le(e_,{onFocus:()=>{for(const E of s.value){const S=G(E);if((S==null?void 0:S.tabIndex)===0)return S.focus(),!0}return!1}}),Qe({theirProps:{...n,...Pa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:y,slots:t,attrs:n,name:"TabGroup"})])}}}),n_=he({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Ao("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Qe({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),Ma=he({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${$t()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ao("Tab"),s=T(null);r({el:s,$el:s}),Re(()=>o.registerTab(s)),mt(()=>o.unregisterTab(s));const i=$e(La),a=X(()=>{if(i.value){const S=i.value.tabs.indexOf(e.id);return S===-1?i.value.tabs.push(e.id)-1:S}return-1}),l=X(()=>{const S=o.tabs.value.indexOf(s);return S===-1?a.value:S}),c=X(()=>l.value===o.selectedIndex.value);function u(S){var F;const A=S();if(A===yn.Success&&o.activation.value==="auto"){const C=(F=Qt(s))==null?void 0:F.activeElement,z=o.tabs.value.findIndex($=>G($)===C);z!==-1&&o.setSelectedIndex(z)}return A}function d(S){const A=o.tabs.value.map(C=>G(C)).filter(Boolean);if(S.key===et.Space||S.key===et.Enter){S.preventDefault(),S.stopPropagation(),o.setSelectedIndex(l.value);return}switch(S.key){case et.Home:case et.PageUp:return S.preventDefault(),S.stopPropagation(),u(()=>it(A,Ue.First));case et.End:case et.PageDown:return S.preventDefault(),S.stopPropagation(),u(()=>it(A,Ue.Last))}if(u(()=>Je(o.orientation.value,{vertical(){return S.key===et.ArrowUp?it(A,Ue.Previous|Ue.WrapAround):S.key===et.ArrowDown?it(A,Ue.Next|Ue.WrapAround):yn.Error},horizontal(){return S.key===et.ArrowLeft?it(A,Ue.Previous|Ue.WrapAround):S.key===et.ArrowRight?it(A,Ue.Next|Ue.WrapAround):yn.Error}}))===yn.Success)return S.preventDefault()}const f=T(!1);function m(){var S;f.value||(f.value=!0,!e.disabled&&((S=G(s))==null||S.focus({preventScroll:!0}),o.setSelectedIndex(l.value),Js(()=>{f.value=!1})))}function y(S){S.preventDefault()}const E=Td(X(()=>({as:e.as,type:t.type})),s);return()=>{var z;const S={selected:c.value,disabled:e.disabled??!1},{id:A,...F}=e,C={ref:s,onKeydown:d,onMousedown:y,onClick:m,id:A,role:"tab",type:E.value,"aria-controls":(z=G(o.panels.value[l.value]))==null?void 0:z.id,"aria-selected":c.value,tabIndex:c.value?0:-1,disabled:e.disabled?!0:void 0};return Qe({ourProps:C,theirProps:F,slot:S,attrs:t,slots:n,name:"Tab"})}}}),r_=he({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Ao("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Qe({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Ua=he({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-${$t()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ao("TabPanel"),s=T(null);r({el:s,$el:s}),Re(()=>o.registerPanel(s)),mt(()=>o.unregisterPanel(s));const i=$e(La),a=X(()=>{if(i.value){const u=i.value.panels.indexOf(e.id);return u===-1?i.value.panels.push(e.id)-1:u}return-1}),l=X(()=>{const u=o.panels.value.indexOf(s);return u===-1?a.value:u}),c=X(()=>l.value===o.selectedIndex.value);return()=>{var E;const u={selected:c.value},{id:d,tabIndex:f,...m}=e,y={ref:s,id:d,role:"tabpanel","aria-labelledby":(E=G(o.tabs.value[l.value]))==null?void 0:E.id,tabIndex:c.value?f:-1};return!c.value&&e.unmount&&!e.static?Le(Kn,{as:"span","aria-hidden":!0,...y}):Qe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:n,features:qn.Static|qn.RenderStrategy,visible:c.value,name:"TabPanel"})}}});function o_(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Fa(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 ti(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var Ba=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ba||{});function s_(e,t){const n=$o();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(c=>c.includes("ms")?Number.parseFloat(c):Number.parseFloat(c)*1e3).sort((c,u)=>u-c);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Rd(e,t,n,r,o,s){const i=$o(),a=s!==void 0?o_(s):()=>{};return ti(e,...o),Fa(e,...t,...n),i.nextFrame(()=>{ti(e,...n),Fa(e,...r),i.add(s_(e,l=>(ti(e,...r,...t),Fa(e,...o),a(l))))}),i.add(()=>ti(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function Or(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Ha=Symbol("TransitionContext");function i_(){return $e(Ha,null)!==null}function a_(){const e=$e(Ha,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Za=Symbol("NestingContext");function l_(){const e=$e(Za,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function ni(e){return"children"in e?ni(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function jd(e){const t=T([]),n=T(!1);Re(()=>n.value=!0),mt(()=>n.value=!1);function r(s,i=Wn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Je(i,{[Wn.Unmount](){t.value.splice(a,1)},[Wn.Hidden](){t.value[a].state="hidden"}}),!ni(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,Wn.Unmount)}return{children:t,register:o,unregister:r}}const Ld=qn.RenderStrategy,Vo=he({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=T(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 c(){s.value&=~at.Closing,t("afterLeave")}if(!i_()&&Zy())return()=>Le(qa,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:c},r);const u=T(null),d=X(()=>e.unmount?Wn.Unmount:Wn.Hidden);o({el:u,$el:u});const{show:f,appear:m}=a_(),{register:y,unregister:E}=l_(),S=T(f.value?"visible":"hidden"),A={value:!0},F=$t(),C={value:!1},z=jd(()=>{!C.value&&S.value!=="hidden"&&(S.value="hidden",E(F),c())});Re(()=>{const oe=y(F);mt(oe)}),ft(()=>{if(d.value===Wn.Hidden&&F){if(f.value&&S.value!=="visible"){S.value="visible";return}Je(S.value,{hidden:()=>E(F),visible:()=>y(F)})}});const $=Or(e.enter),Z=Or(e.enterFrom),x=Or(e.enterTo),fe=Or(e.entered),Y=Or(e.leave),V=Or(e.leaveFrom),P=Or(e.leaveTo);Re(()=>{ft(()=>{if(S.value==="visible"){const oe=G(u);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function j(oe){const w=A.value&&!m.value,I=G(u);!I||!(I instanceof HTMLElement)||w||(C.value=!0,f.value&&i(),f.value||l(),oe(f.value?Rd(I,$,Z,x,fe,ne=>{C.value=!1,ne===Ba.Finished&&a()}):Rd(I,Y,V,P,fe,ne=>{C.value=!1,ne===Ba.Finished&&(ni(z)||(S.value="hidden",E(F),c()))})))}return Re(()=>{Xe([f],(oe,w,I)=>{j(I),A.value=!1},{immediate:!0})}),dt(Za,z),yd(X(()=>Je(S.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:oe,show:w,enter:I,enterFrom:ne,enterTo:ae,entered:re,leave:ce,leaveFrom:Ie,leaveTo:je,...nt}=e,wt={ref:u},bn={...nt,...m.value&&f.value&&To.isServer?{class:rs([n.class,nt.class,...$,...Z])}:{}};return Qe({theirProps:bn,ourProps:wt,slot:{},slots:r,attrs:n,features:Ld,visible:S.value==="visible",name:"TransitionChild"})}}}),c_=Vo,qa=he({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=Ys(),s=X(()=>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=T(s.value?"visible":"hidden"),a=jd(()=>{i.value="hidden"}),l=T(!0),c={show:s,appear:X(()=>e.appear||!l.value)};return Re(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":ni(a)||(i.value="hidden")})}),dt(Za,a),dt(Ha,c),()=>{const u=Pa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Qe({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Le(c_,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...u},r.default)]},attrs:{},features:Ld,visible:i.value==="visible",name:"Transition"})}}}),u_={class:"moonbase:modal-container"},ri=he({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),ke(b(qa),{as:"template",show:t.open},{default:ye(()=>[B(b(Sd),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:ye(()=>[O("div",u_,[B(b(Vo),{as:"template"},{default:ye(()=>[B(b(xd),{class:"moonbase:modal-overlay"})]),_:1}),B(b(Vo),{as:"template"},{default:ye(()=>[B(b(kd),{class:"moonbase:modal-content"},{default:ye(()=>[Wi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),d_=["data-visible"],f_=he({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=$e(Ws),i=T(r.getParameter("email")??""),a=T(""),l=T(null);async function c(){l.value=null;try{const u=await o.signIn(i.value,a.value);Xt(1500).then(()=>n("signedIn",u))}catch(u){throw u instanceof Pr?l.value="User not found":l.value=u.message,u}}return(u,d)=>(_(),ke(Hn,{handler:c,class:"moonbase:sign-in"},{default:ye(()=>{var f;return[B(gt,{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"]),B(gt,{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"]),B(Zn,{success:"Signed in",label:"Sign in",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,d_),(f=b(s))!=null&&f.auth.enable.signUp?(_(),N("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>b(r).show(b(Se).Authentication,b(de).SignUp,{email:i.value}))}," Create account ")):me("",!0),O("button",{type:"button",onClick:d[3]||(d[3]=m=>b(r).show(b(Se).Authentication,b(de).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),p_={class:"moonbase:authentication"},h_={key:0,class:"moonbase:loader"},m_=he({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Ae(),{loaded:o,user:s}=bt();Xe(s,a=>{a&&r.intent===de.SignIn&&(n("authenticated",a),r.dequeue())});const i=X(()=>{switch(r.intent){case de.SignIn:return"Sign in";case de.SignUp:return"Sign up";case de.ConfirmAccount:return"Confirm account";case de.ConfirmEmailChange:return"Confirm email change";case de.ForgotPassword:return"Forgot password";case de.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(_(),ke(ri,{open:a.open,onClose:l[3]||(l[3]=c=>b(r).reset())},{default:ye(()=>[O("div",p_,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(K(i.value),1)]),_:1}),b(o)?b(r).intent===b(de).SignIn?(_(),ke(f_,{key:1})):b(r).intent===b(de).SignUp?(_(),ke(iy,{key:2,onSignedUp:l[0]||(l[0]=c=>b(r).dequeue())})):b(r).intent===b(de).ConfirmAccount?(_(),ke(dy,{key:3,onConfirmedAccount:l[1]||(l[1]=c=>b(r).dequeue())})):b(r).intent===b(de).ConfirmEmailChange?(_(),ke(Oy,{key:4})):b(r).intent===b(de).ForgotPassword?(_(),ke(my,{key:5})):b(r).intent===b(de).ResetPassword?(_(),ke(yy,{key:6,onPasswordReset:l[2]||(l[2]=c=>b(r).dequeue())})):me("",!0):(_(),N("div",h_,[B(Pt)]))])]),_:1},8,["open"]))}});function _n(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const v_={class:"moonbase:product-cart-item"},g_=["src"],y_={key:1,class:"moonbase:image-placeholder"},__={class:"moonbase:product-cart-item-content"},b_={key:0,class:"moonbase:cart-item-discount"},w_={class:"font-semibold"},E_={key:0,class:"ml-0.5"},O_={key:2,class:"moonbase:product-cart-item-total"},N_={key:0,class:"moonbase:discount"},S_={key:1},x_=he({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return _(),N("div",v_,[(r=t.lineItem.product)!=null&&r.iconUrl?(_(),N("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,g_)):(_(),N("div",y_)),O("div",__,[O("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),O("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(_(),N("p",b_,[Te(" Discount applied: "),O("span",w_,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(_(),N("span",E_," (-"+K(b(_n)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):me("",!0)])):me("",!0),O("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(_(),N("div",O_,[t.lineItem.variation.hasDiscount?(_(),N("span",N_,K(b(_n)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):me("",!0),t.lineItem.quantity!==1?(_(),N("span",S_,K(t.lineItem.quantity)+" x "+K(b(_n)(t.lineItem.variation.price[t.currency],t.currency)),1)):me("",!0),Te(" "+K(b(_n)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):me("",!0)])}}}),k_={class:"moonbase:bundle-cart-item"},C_=["src"],T_={key:1,class:"moonbase:image-placeholder"},P_={class:"moonbase:bundle-cart-item-content"},$_={key:0,class:"moonbase:cart-item-discount"},I_={class:"font-semibold"},D_={key:0,class:"ml-0.5"},A_={class:"moonbase:bundle-cart-item-summary"},V_=["data-open"],R_=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],j_={key:2,class:"moonbase:product-cart-item-total"},L_={key:0,class:"moonbase:discount"},M_={key:1},U_=["src"],F_={key:1,class:"moonbase:image-placeholder"},B_=["data-included"],H_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Z_=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],q_={key:0,class:"truncate italic"},W_={key:1,class:"truncate"},z_=he({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=T(!1),n=T(null);return Xe(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,c,u,d;return _(),N("div",null,[O("div",k_,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(_(),N("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,C_)):(_(),N("div",T_)),O("div",P_,[O("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),O("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(_(),N("p",$_,[Te(" Discount applied: "),O("span",I_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(_(),N("span",D_," (-"+K(b(_n)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):me("",!0)])):me("",!0),O("div",A_,[O("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(_(),N("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[O("span",null,[Te(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(c=r.lineItem.bundle)!=null&&c.products.some(f=>!f.included)?(_(),N(Ce,{key:0},[Te("of "+K((u=r.lineItem.bundle)==null?void 0:u.products.length),1)],64)):me("",!0),Te(" products ")]),(_(),N("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},R_,8,V_))])):me("",!0)])]),r.lineItem.variation?(_(),N("div",j_,[r.lineItem.variation.hasDiscount?(_(),N("span",L_,K(b(_n)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):me("",!0),r.lineItem.quantity!==1?(_(),N("span",M_,K(r.lineItem.quantity)+" x "+K(b(_n)(r.lineItem.variation.price[r.currency],r.currency)),1)):me("",!0),Te(" "+K(b(_n)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):me("",!0)]),O("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(_(!0),N(Ce,null,Gt(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(_(),N("div",{key:f.id},[f!=null&&f.iconUrl?(_(),N("img",{key:0,src:f.iconUrl,alt:""},null,8,U_)):(_(),N("div",F_)),O("div",null,[O("h3",{"data-included":f.included||void 0},[f.included?(_(),N("svg",H_,Z_)):me("",!0),Te(" "+K(f==null?void 0:f.name),1)],8,B_),f.included?f!=null&&f.tagline?(_(),N("p",W_,K(f.tagline),1)):me("",!0):(_(),N("p",q_," You already own this "))])]))),128))],512)])}}}),K_={class:"moonbase:cart-modal-container"},G_=he({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),ke(b(qa),{as:"template",show:t.open},{default:ye(()=>[B(b(Sd),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:ye(()=>[O("div",K_,[B(b(Vo),{as:"template"},{default:ye(()=>[B(b(xd),{class:"moonbase:cart-modal-overlay"})]),_:1}),B(b(Vo),{as:"template"},{default:ye(()=>[B(b(kd),{class:"moonbase:cart-modal-content"},{default:ye(()=>[Wi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),J_=["disabled","data-success","data-error","data-working","data-variant"],Y_=["data-visible"],Md=he({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=T(!1),r=T(!1),o=T(!1),s=X(()=>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 Xt(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await Xt(2500),o.value=!1}}return(a,l)=>(_(),N("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},[O("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(_(),ke(Pt,{key:0})):me("",!0)],8,Y_),Te(" "+K(s.value),1)],8,J_))}}),X_={class:"moonbase:cart"},Q_={key:0,role:"list",class:"moonbase:cart-items"},eb={key:1,class:"moonbase:cart-empty"},tb={key:2,class:"moonbase:cart-total"},nb=O("label",null," Total ",-1),rb=O("p",null," Sales tax to be calculated at checkout ",-1),ob=he({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Ae(),{items:n,total:r,currency:o,checkout:s}=ba();async function i(){if(!await s(`${window.location.pathname}?mb_intent=view_products`))throw new Error("Cancelled checkout")}return(a,l)=>(_(),ke(G_,{open:a.open,onClose:l[0]||(l[0]=c=>b(t).reset())},{default:ye(()=>[O("div",X_,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Cart ")]),_:1}),b(n).length>0?(_(),N("ul",Q_,[(_(!0),N(Ce,null,Gt(b(n),c=>(_(),N("li",{key:c.id},[c.type==="Product"?(_(),ke(x_,{key:0,"line-item":c,currency:b(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(_(),ke(z_,{key:1,"line-item":c,currency:b(o)},null,8,["line-item","currency"])):me("",!0)]))),128))])):(_(),N("div",eb," Your cart is empty! ")),b(n).length>0?(_(),N("div",tb,[nb,O("span",null,K(b(_n)(b(r).amount,b(r).currency)),1),rb])):me("",!0),b(n).length>0?(_(),ke(Md,{key:3,handler:i,label:"Checkout",error:"Cancelled"})):me("",!0)])]),_:1},8,["open"]))}}),sb={class:"moonbase:account"},ib={key:0,class:"moonbase:error"},ab={key:1,class:"moonbase:notification"},lb={key:0,class:"moonbase:error"},cb=he({__name:"Account",setup(e){var F,C,z;const t=Ae(),{user:n,update:r,setPassword:o,signOut:s}=bt(),i=T(((F=n.value)==null?void 0:F.name)??""),a=T(((C=n.value)==null?void 0:C.email)??""),l=T(((z=n.value)==null?void 0:z.communicationPreferences)??{newsletterOptIn:!1}),c=T(null),u=T(!1),d=T(""),f=T(""),m=T(null),y=T(!1);async function E(){c.value=null,u.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(u.value=!0)}catch($){throw c.value=$,$}}async function S(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch($){throw m.value=$,$}}async function A(){y.value=!0,await s(),t.reset()}return($,Z)=>(_(),N("div",sb,[B(Hn,{handler:E},{default:ye(()=>[B(gt,{modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=x=>i.value=x),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),B(gt,{modelValue:a.value,"onUpdate:modelValue":Z[1]||(Z[1]=x=>a.value=x),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),B(od,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":Z[2]||(Z[2]=x=>l.value.newsletterOptIn=x),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),B(Zn,{label:"Save",error:"Error",success:"Saved"}),c.value?(_(),N("p",ib,K(c.value.message),1)):u.value?(_(),N("p",ab," You need to confirm your new email address, please check your inbox ")):me("",!0)]),_:1}),B(Hn,{handler:S},{default:ye(()=>[B(gt,{modelValue:d.value,"onUpdate:modelValue":Z[3]||(Z[3]=x=>d.value=x),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),B(gt,{modelValue:f.value,"onUpdate:modelValue":Z[4]||(Z[4]=x=>f.value=x),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{label:"Save",error:"Error",success:"Saved"}),m.value?(_(),N("p",lb,K(m.value.message),1)):me("",!0)]),_:1}),B(Md,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:A})]))}}),ub={},db={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},fb=[O("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)];function pb(e,t){return _(),N("svg",db,fb)}const Ud=Bn(ub,[["render",pb]]),hb={},mb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},vb=[O("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function gb(e,t){return _(),N("svg",mb,vb)}const Fd=Bn(hb,[["render",gb]]),yb={},_b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bb=[O("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)];function wb(e,t){return _(),N("svg",_b,bb)}const Bd=Bn(yb,[["render",wb]]),Eb={},Ob={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Nb=[O("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),O("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)];function Sb(e,t){return _(),N("svg",Ob,Nb)}const Hd=Bn(Eb,[["render",Sb]]),xb={class:"moonbase:product-downloads"},kb=["data-last","onClick"],Cb={class:"moonbase:sr-only"},Tb={class:"moonbase:sr-only"},Pb=O("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),$b=["onClick"],Ib=he({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Bt.Universal]:()=>Ud,[Bt.Windows]:()=>Fd,[Bt.Linux]:()=>Bd,[Bt.Mac]:()=>Hd},{downloadProduct:r}=Ms(),o=X(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(_(),N("span",xb,[(_(!0),N(Ce,null,Gt(o.value,(a,l,c)=>(_(),N(Ce,{key:l},[a.length===1?(_(),N("button",{key:0,type:"button",role:"button","data-last":c===Object.keys(o.value).length-1||void 0,onClick:u=>b(r)(a[0])},[O("span",Cb,K(l.toString()),1),(_(),ke(qi(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,kb)):(_(),ke(b(ja),{key:1,as:"div","data-last":c===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:ye(()=>[B(b(Dd),null,{default:ye(()=>[O("span",Tb,K(l.toString()),1),(_(),ke(qi(a[0].icon()),{"aria-hidden":"true"})),Pb]),_:2},1024),B(xo,{name:"moonbase:scale"},{default:ye(()=>[B(b(Ad),{class:"moonbase:product-downloads-list"},{default:ye(()=>[(_(!0),N(Ce,null,Gt(a,u=>(_(),N("button",{key:u.key,type:"button",role:"button",onClick:d=>b(r)(u)},K(u.name),9,$b))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),Db={class:"moonbase:product-activations"},Ab=O("th",{scope:"col"}," Device ",-1),Vb=O("th",{scope:"col"}," Activation Method ",-1),Rb=O("th",{scope:"col"}," Last Online ",-1),jb={key:0,scope:"col"},Lb=[O("span",{class:"sr-only"},"Actions",-1)],Mb={key:0},Ub={colspan:"3"},Fb=O("td",null,null,-1),Bb={key:1},Hb=[O("td",{colspan:"3"}," No activations found ",-1)],Zb={key:0},qb=["onClick"],Wb=he({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=Ms(),i=T(null);Re(async()=>{let c=await o(n.productId);for(i.value=c.items.map(u=>({...u,revoking:!1}));c.hasMore&&c.next;)c=await o(n.productId,c.next),i.value.push(...c.items.map(u=>({...u,revoking:!1})))});const a=X(()=>i.value&&i.value.some(c=>c.activationMethod===vi.Online));async function l(c){c.revoking=!0,await s(c),r("revoked",c),i.value&&i.value.splice(i.value.indexOf(c),1)}return(c,u)=>(_(),N("table",Db,[O("thead",null,[O("tr",null,[Ab,Vb,Rb,a.value?(_(),N("th",jb,Lb)):me("",!0)])]),O("tbody",null,[i.value?i.value.length===0?(_(),N("tr",Bb,Hb)):me("",!0):(_(),N("tr",Mb,[O("td",Ub,[B(Pt),Te(" Loading activations.. ")]),Fb])),(_(!0),N(Ce,null,Gt(i.value,d=>{var f;return _(),N("tr",{key:d.id},[O("td",null,K(d.name),1),O("td",null,K(d.activationMethod),1),O("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(_(),N("td",Zb,[O("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(_(),ke(Pt,{key:0})):me("",!0),Te(" Revoke ")],8,qb)])):me("",!0)])}),128))])]))}}),zb={class:"moonbase:products"},Kb=O("th",{scope:"col"}," Product ",-1),Gb=O("th",{scope:"col"}," Activations ",-1),Jb={key:0,scope:"col"},Yb={key:0},Xb=O("td",null,null,-1),Qb={key:1},e1=[O("td",{colspan:"3"}," No products found ",-1)],t1=["src"],n1={key:1,class:"moonbase:image-placeholder"},r1=O("span",{class:"moonbase:sr-only"},"View activations",-1),o1={key:0},s1={key:0},i1=he({__name:"Products",setup(e){const{getProducts:t}=Ms(),n=T(null);Re(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=X(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(_(),N("table",zb,[O("thead",null,[O("tr",null,[Kb,Gb,r.value?(_(),N("th",Jb," Downloads ")):me("",!0)])]),O("tbody",null,[n.value?n.value.length===0?(_(),N("tr",Qb,e1)):me("",!0):(_(),N("tr",Yb,[O("td",null,[B(Pt),Te(" Loading products.. ")]),Xb])),(_(!0),N(Ce,null,Gt(n.value||[],i=>(_(),N("tr",{key:i.id},[O("td",null,[O("div",null,[i.iconUrl?(_(),N("img",{key:0,src:i.iconUrl,alt:""},null,8,t1)):(_(),N("div",n1)),O("span",null,K(i.name),1)])]),B(b(ja),{as:"td"},{default:ye(()=>[B(b(Dd),{class:"moonbase:button","data-variant":"secondary"},{default:ye(()=>[r1,Te(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),B(xo,{name:"moonbase:scale"},{default:ye(()=>[B(b(Ad),null,{default:ye(()=>[B(Wb,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(_(),N("td",o1,[i.currentVersion!=null?(_(),N("div",s1,[i.downloads?(_(),ke(Ib,{key:0,downloads:i.downloads},null,8,["downloads"])):me("",!0)])):me("",!0)])):me("",!0)]))),128))])]))}}),a1={class:"moonbase:redeem"},l1=["data-visible"],c1={key:1,class:"moonbase:redeem-voucher"},u1={key:0},d1={key:1},f1=O("span",null," Contains: ",-1),p1={class:"moonbase:redeem-voucher-products"},h1=["src"],m1={key:1,class:"moonbase:image-placeholder"},v1={key:0},g1={class:"moonbase:redeem-voucher-bundle"},y1=["src"],_1={key:1,class:"moonbase:image-placeholder"},b1={key:0},w1={class:"moonbase:redeem-voucher-bundle-products"},E1={class:"shrink-0"},O1=["src"],N1={key:1,class:"moonbase:image-placeholder"},S1=he({__name:"Redeem",setup(e){const{redeem:t}=ng(),n=T(!1),r=T(null),o=T(null),s=T("");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)=>(_(),N("div",a1,[B(xo,{mode:"out-in",name:"moonbase:slide-left"},{default:ye(()=>[r.value?(_(),N("div",c1,[O("h3",null,[Te(" You got: "),O("strong",null,K(r.value.name),1)]),r.value.description?(_(),N("h4",u1,K(r.value.description),1)):me("",!0),O("h4",null,[Te(" Code: "),O("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(_(),N("div",d1,[f1,O("div",p1,[(_(!0),N(Ce,null,Gt(r.value.redeemsProducts,({value:c,quantity:u})=>(_(),N("div",{key:c.id,class:"moonbase:redeem-voucher-product"},[O("div",null,[c.iconUrl?(_(),N("img",{key:0,src:c.iconUrl,alt:""},null,8,h1)):(_(),N("div",m1))]),O("div",null,[O("p",null,[Te(K(c.name)+" ",1),u!==1?(_(),N("span",v1,"x "+K(u),1)):me("",!0)]),O("p",null,K(c.tagline),1)])]))),128)),(_(!0),N(Ce,null,Gt(r.value.redeemsBundles,({value:c,quantity:u})=>(_(),N("div",{key:c.id},[O("div",g1,[O("div",null,[c.iconUrl?(_(),N("img",{key:0,src:c.iconUrl,alt:""},null,8,y1)):(_(),N("div",_1))]),O("div",null,[O("p",null,[Te(K(c.name)+" ",1),u!==1?(_(),N("span",b1,"x "+K(u),1)):me("",!0)]),O("p",null,K(c.tagline),1)])]),O("div",w1,[(_(!0),N(Ce,null,Gt(c.products,d=>(_(),N("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[O("div",E1,[d.iconUrl?(_(),N("img",{key:0,src:d.iconUrl,alt:""},null,8,O1)):(_(),N("div",N1))]),O("div",null,[O("p",null,K(d.name),1),O("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):me("",!0)])):(_(),ke(Hn,{key:0,handler:i},{default:ye(()=>{var c;return[B(gt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),B(Zn,{label:"Redeem",success:"Redeem",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((c=o.value)==null?void 0:c.message),9,l1)]}),_:1}))]),_:1})]))}}),x1={class:"moonbase:customer"},k1=he({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Ae();function n(s){switch(s){case de.ViewAccount:return 0;case de.ViewProducts:return 1;case de.RedeemVoucher:return 2}return 0}const r=T(n(t.intent));Xe(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(_(),ke(ri,{open:s.open,onClose:i[0]||(i[0]=a=>b(t).reset())},{default:ye(()=>[O("div",x1,[B(b(t_),{"selected-index":r.value,onChange:o},{default:ye(()=>[B(b(n_),null,{default:ye(()=>[B(b(Ma),null,{default:ye(()=>[Te("Account")]),_:1}),B(b(Ma),null,{default:ye(()=>[Te(" Products ")]),_:1}),B(b(Ma),null,{default:ye(()=>[Te("Redeem")]),_:1})]),_:1}),B(b(r_),null,{default:ye(()=>[B(b(Ua),null,{default:ye(()=>[B(cb)]),_:1}),B(b(Ua),null,{default:ye(()=>[B(i1)]),_:1}),B(b(Ua),null,{default:ye(()=>[B(S1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),C1={class:"moonbase:auto-activate"},T1={key:0,class:"moonbase:loader"},P1={key:1,class:"moonbase:loader"},$1={key:2,class:"moonbase:loader"},I1={key:3},D1={key:0,class:"moonbase:auto-activate-product"},A1=["src"],V1={key:1,class:"moonbase:image-placeholder"},R1={key:1,class:"moonbase:loader"},j1=[O("h3",null," Uh oh ",-1),O("p",null," This activation request was cancelled, open your app to try again. ",-1)],L1={key:2,class:"moonbase:loader"},M1={key:3,class:"moonbase:loader"},U1=[O("h3",null," Done! ",-1),O("p",null," Your product is activated. ",-1)],F1={key:4,class:"moonbase:auto-activate-content"},B1={key:0},H1={key:1},Z1=O("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),q1={class:"moonbase:auto-activate-cta"},W1=["href"],z1={key:2,class:"moonbase:auto-activate-trial"},K1={class:"moonbase:auto-activate-cta"},G1=he({__name:"AutoActivate",setup(e){const t=Ae(),{user:n,loaded:r}=bt(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:c,fulfillLicense:u,fulfillTrial:d,cancel:f}=tg(o);Xe(s,E=>{var S;!a.value&&!l.value&&(E==null?void 0:E.status)===Ht.Requested&&((S=E==null?void 0:E.licenseEligibility)!=null&&S.eligible)&&u()});function m(){f(),t.show(Se.Customer,de.ViewProducts)}function y(){t.enqueue(Se.Activation,de.ActivateProduct,t.parameters??void 0),t.show(Se.Authentication,de.SignIn)}return(E,S)=>{var A,F,C,z;return _(),N("div",C1,[b(i)||!b(r)?(_(),N("div",T1,[B(Pt)])):b(c)?(_(),N("div",P1,K(b(c)),1)):b(s)?(_(),N("div",I1,[b(s).product?(_(),N("div",D1,[b(s).product.iconUrl?(_(),N("img",{key:0,src:b(s).product.iconUrl,alt:""},null,8,A1)):(_(),N("div",V1)),O("div",null,[O("h2",null,K(b(s).product.name),1),O("h3",null,K(b(s).product.tagline),1)])])):me("",!0),((A=b(s))==null?void 0:A.status)===b(Ht).Cancelled?(_(),N("div",R1,j1)):b(a)||b(l)?(_(),N("div",L1,[B(Pt),O("p",null,"Activating "+K(b(s).product.name)+"...",1)])):((F=b(s))==null?void 0:F.status)===b(Ht).Completed?(_(),N("div",M1,U1)):(_(),N("div",F1,[b(n)?(C=b(n).ownedProducts)!=null&&C.includes(b(s).product.id)?(_(),N("div",H1,[Z1,O("span",q1,[O("button",{role:"button",class:"moonbase:button",onClick:S[0]||(S[0]=$=>m())}," Licenses "),b(s).product&&b(s).product.website?(_(),N("a",{key:0,href:b(s).product.website,class:"moonbase:button"}," Purchase ",8,W1)):me("",!0)])])):me("",!0):(_(),N("div",B1,[Te(" Please sign in to use a license "),O("span",{class:"moonbase:auto-activate-cta"},[O("button",{role:"button",class:"moonbase:button",onClick:y}," Sign in ")])])),(z=b(s).trialEligibility)!=null&&z.eligible?(_(),N("div",z1,[Te(" You are eligible for a "+K(b(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),b(s).trialEligibility.existing?(_(),N(Ce,{key:0},[Te(" of which you have "+K(b(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):me("",!0),Te(". "),O("span",K1,[O("button",{role:"button",class:"moonbase:button",onClick:S[1]||(S[1]=$=>b(d)())}," Start trial ")])])):me("",!0)]))])):(_(),N("div",$1," Could not find activation request "))])}}}),J1={class:"moonbase:activation"},Y1=he({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Ae();return(n,r)=>(_(),ke(ri,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:ye(()=>[O("div",J1,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Activate product ")]),_:1}),n.open&&b(t).intent===b(de).ActivateProduct?(_(),ke(G1,{key:0})):me("",!0)])]),_:1},8,["open"]))}});function X1(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 Q1={class:"moonbase:download-product"},ew={key:0,class:"moonbase:loader"},tw={key:1,class:"moonbase:loader"},nw={key:2,class:"moonbase:loader"},rw={key:3},ow={class:"moonbase:download-product-product"},sw=["src"],iw={key:1,class:"moonbase:image-placeholder"},aw={key:0},lw={key:0,class:"moonbase:download-product-content"},cw={key:1,class:"moonbase:download-product-content"},uw={key:2,class:"moonbase:download-product-content"},dw={key:0,role:"list"},fw={class:"moonbase:download-product-download-name"},pw=["onClick"],hw=O("span",{class:"moonbase:download-product-clicker"},null,-1),mw={class:"moonbase:download-product-download-description"},vw=O("span",null," |",-1),gw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},yw=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)],_w={key:1,class:"moonbase:loader"},bw=he({__name:"DownloadProduct",setup(e){const t=Ae(),{user:n,loaded:r}=bt(),{getProduct:o,downloadProduct:s}=Ms(),i={[Bt.Universal]:()=>Ud,[Bt.Windows]:()=>Fd,[Bt.Linux]:()=>Bd,[Bt.Mac]:()=>Hd},a=T(null),l=T([]),c=T(null),u=T(!0),d=X(()=>t.getParameter("key")),f=X(()=>{var E,S;return(S=(E=a.value)==null?void 0:E.downloads)==null?void 0:S.filter(A=>!d.value||A.key===d.value)});Re(async()=>{const E=t.getParameter("product_id"),S=t.getParameter("version");if(!E){c.value="Link is broken";return}try{a.value=await o(E,S||void 0)}catch(A){c.value=A.message}u.value=!1});function m(){t.enqueue(Se.Download,de.DownloadProduct,t.parameters??void 0),t.show(Se.Authentication,de.SignIn)}async function y(E){l.value.push(E.key),await s(E),l.value=l.value.filter(S=>S!==E.key)}return(E,S)=>{var A,F;return _(),N("div",Q1,[u.value||!b(r)?(_(),N("div",ew,[B(Pt)])):c.value?(_(),N("div",tw,K(c.value),1)):a.value?(_(),N("div",rw,[O("div",ow,[a.value.iconUrl?(_(),N("img",{key:0,src:a.value.iconUrl,alt:""},null,8,sw)):(_(),N("div",iw)),O("div",null,[O("h2",null,[Te(K(a.value.name)+" ",1),O("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(_(),N("span",aw," (pre-release)")):me("",!0)]),O("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!b(n)?(_(),N("div",lw,[Te(" Please sign in to download product "),O("span",{class:"moonbase:download-product-cta"},[O("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((A=b(n).ownedProducts)!=null&&A.includes(a.value.id))?(_(),N("div",cw," This product requires ownership to download ")):(_(),N("div",uw,[(F=a.value)!=null&&F.downloads&&a.value.downloads.length>0?(_(),N("ul",dw,[(_(!0),N(Ce,null,Gt(f.value,C=>(_(),N("li",{key:C.key},[O("div",null,[O("p",fw,[O("button",{onClick:z=>y(C)},[hw,Te(" "+K(C.name),1)],8,pw)]),O("p",mw,[(_(),ke(qi(i[C.platform]()),{"aria-hidden":"true"})),Te(" "+K(C.platform)+" ",1),vw,Te(" "+K(b(X1)(C.size)),1)])]),O("div",null,[l.value.includes(C.key)?(_(),ke(Pt,{key:0})):(_(),N("svg",gw,yw))])]))),128))])):(_(),N("div",_w," No downloadable files found "))]))])):(_(),N("div",nw," Could not find product "))])}}}),ww={class:"moonbase:download"},Ew=he({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Ae();return(n,r)=>(_(),ke(ri,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:ye(()=>[O("div",ww,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Download product ")]),_:1}),n.open&&b(t).intent===b(de).DownloadProduct?(_(),ke(bw,{key:0})):me("",!0)])]),_:1},8,["open"]))}}),Ow=he({__name:"App",setup(e){const t=$e(Ws),n=Ae();return(r,o)=>{var s;return _(),N(Ce,null,[(s=b(t))!=null&&s.toolbar.enabled?(_(),ke(Lg,{key:0})):me("",!0),B(ob,{open:b(n).active===b(Se).Cart},null,8,["open"]),B(m_,{open:b(n).active===b(Se).Authentication},null,8,["open"]),B(Y1,{open:b(n).active===b(Se).Activation},null,8,["open"]),B(Ew,{open:b(n).active===b(Se).Download},null,8,["open"]),B(k1,{open:b(n).active===b(Se).Customer},null,8,["open"])],64)}}});function oi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Wa(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(oi(e)&&oi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];oi(o)&&oi(e[r])?e[r]=Wa(e[r],o):o!==void 0&&(e[r]=o)}}return Wa(e,...t)}class Nw{constructor(){Nr(this,"initialized",!1);Nr(this,"pinia");Nr(this,"storefront");Nr(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=Wa(Dg,n),this.storefront=rg(t),this.pinia=Cg(),Uv(Ow).use(this.storefront).use(this.pinia).provide(Ws,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(de).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,d])=>[u.substring(3),d]));if(a===de.Checkout&&l.complete)return;this[a](l);for(const u of Object.keys(l))i.delete(`mb_${u}`);const c=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(c?`?${c}`:""))}}const o=Ae(this.pinia),s=bt(this.storefront);this.storefront.onCheckoutClosed(i=>{i===de.ViewProducts&&(s.user?o.show(Se.Customer,de.ViewProducts):o.show(Se.Cart,de.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.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");Ae(this.pinia).show(Se.Authentication,de.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);bt(this.storefront).user.value?n.show(Se.Authentication,de.ConfirmEmailChange,t):(n.show(Se.Authentication,de.SignIn),n.enqueue(Se.Authentication,de.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ae(this.pinia);bt(this.storefront).user.value?t.show(Se.Customer,de.ViewAccount):(t.show(Se.Authentication,de.SignIn),t.enqueue(Se.Customer,de.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Cart,de.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Cart,de.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Download,de.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");Ae(this.pinia).show(Se.Activation,de.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Cart,de.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=Vu(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(c=>c.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const c=Vu(t.product_id,this.storefront);if(c.value)n.addToCart(c.value,(s=c.value.variations)==null?void 0:s.find(u=>u.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=Au(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(c=>c.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const c=Au(t.bundle_id,this.storefront);if(c.value)n.addToCart(c.value,(a=c.value.variations)==null?void 0:a.find(u=>u.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Ae(this.pinia).show(Se.Cart,de.AddToCart)}checkout(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;ba(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Zd=new Nw;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Zd),Et.MoonbaseIntent=de,Et.default=Zd,Object.defineProperties(Et,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});