@moonbase.sh/storefront 0.2.7 → 0.2.8

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-a86f8cb7] label[data-v-a86f8cb7]{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}.moonbase\\:input[data-v-a86f8cb7] input[data-v-a86f8cb7]{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;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\\:input[data-v-a86f8cb7] input[data-v-a86f8cb7][data-v-a86f8cb7]: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-a86f8cb7] .moonbase\\:input-hint[data-v-a86f8cb7]{margin-top:8px;font-size:14px;line-height:20px}.moonbase\\:input[data-v-a86f8cb7] .moonbase\\:input-hint[data-v-a86f8cb7][data-type=error][data-v-a86f8cb7]{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\\: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\\: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\\: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>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: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);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: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:first-child{border-bottom-right-radius:0;border-bottom-left-radius:0;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-top-right-radius:0;border-top-left-radius:0;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\\: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 *: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-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\\:sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.moonbase a{color:inherit;text-decoration:inherit}.moonbase input,.moonbase button,.moonbase textarea,.moonbase select{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;background:none;font-size:100%;line-height:1.15;margin:0;padding:0;color:inherit}.moonbase button,.moonbase select{text-transform:none}.moonbase button,.moonbase [role=button]{cursor:pointer}.moonbase button,.moonbase [type=button],.moonbase [type=reset],.moonbase [type=submit]{-webkit-appearance:button}.moonbase h1,.moonbase h2,.moonbase h3,.moonbase h4,.moonbase h5,.moonbase h6{font-size:inherit;font-weight:inherit}.moonbase b,.moonbase strong{font-weight:bolder}.moonbase svg,.moonbase svg *{color:inherit}.moonbase table{text-indent:0;border-color:inherit;border-collapse:collapse}.moonbase img,.moonbase svg,.moonbase video,.moonbase canvas,.moonbase audio,.moonbase iframe,.moonbase embed,.moonbase object{display:block;vertical-align:middle}.moonbase ol,.moonbase ul,.moonbase menu{list-style:none;margin:0;padding:0}.moonbase img,.moonbase video{max-width:100%;height:auto}.moonbase :disabled{cursor:default}.moonbase [hidden]{display:none}.moonbase ::-moz-focus-inner{border-style:none;padding:0}.moonbase :-moz-focusring{outline:none}.moonbase :-moz-ui-invalid{box-shadow:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (function(wt,ve){typeof exports=="object"&&typeof module<"u"?ve(exports):typeof define=="function"&&define.amd?define(["exports"],ve):(wt=typeof globalThis<"u"?globalThis:wt||self,ve(wt.Moonbase={}))})(this,function(wt){"use strict";var w1=Object.defineProperty;var E1=(wt,ve,yn)=>ve in wt?w1(wt,ve,{enumerable:!0,configurable:!0,writable:!0,value:yn}):wt[ve]=yn;var jr=(wt,ve,yn)=>E1(wt,typeof ve!="symbol"?ve+"":ve,yn);var ve;(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})(ve||(ve={}));var yn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(yn||(yn={}));const Q=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_n=e=>{switch(typeof e){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return isNaN(e)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":return Array.isArray(e)?Q.array:e===null?Q.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Q.promise:typeof Map<"u"&&e instanceof Map?Q.map:typeof Set<"u"&&e instanceof Set?Q.set:typeof Date<"u"&&e instanceof Date?Q.date:Q.object;default:return Q.unknown}},B=ve.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"]),Hd=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Pt 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,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(i))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.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()}}Pt.create=e=>new Pt(e);const Lr=(e,t)=>{let n;switch(e.code){case B.invalid_type:e.received===Q.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ve.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:n=`Unrecognized key(s) in object: ${ve.joinValues(e.keys,", ")}`;break;case B.invalid_union:n="Invalid input";break;case B.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ve.joinValues(e.options)}`;break;case B.invalid_enum_value:n=`Invalid enum value. Expected ${ve.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:n="Invalid function arguments";break;case B.invalid_return_type:n="Invalid function return type";break;case B.invalid_date:n="Invalid date";break;case B.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ve.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case B.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case B.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case B.custom:n="Invalid input";break;case B.invalid_intersection_types:n="Intersection results could not be merged";break;case B.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:n="Number must be finite";break;default:n=t.defaultError,ve.assertNever(e)}return{message:n}};let qa=Lr;function Zd(e){qa=e}function jo(){return qa}const Lo=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};let a="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)a=l(i,{data:t,defaultError:a}).message;return{...o,path:s,message:o.message||a}},qd=[];function ee(e,t){const n=Lo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,jo(),Lr].filter(r=>!!r)});e.common.issues.push(n)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ge;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 ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ge;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 ge=Object.freeze({status:"aborted"}),Wa=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),ei=e=>e.status==="aborted",ti=e=>e.status==="dirty",Mr=e=>e.status==="valid",Mo=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class Mt{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 za=(e,t)=>{if(Mr(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 Pt(e.common.issues);return this._error=n,this._error}}};function _e(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 Ee{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 _n(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:_n(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:_n(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Mo(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:_n(t)},s=this._parseSync({data:t,path:o.path,parent:o});return za(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:_n(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Mo(o)?o:Promise.resolve(o));return za(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:B.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!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 Dt({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Qt.create(this,this._def)}nullable(){return Kn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return It.create(this,this._def)}promise(){return Sr.create(this,this._def)}or(t){return Hr.create([this,t],this._def)}and(t){return Zr.create(this,t,this._def)}transform(t){return new Dt({..._e(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gr({..._e(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ga({typeName:pe.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new qo({..._e(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Jr.create(this,t)}readonly(){return zo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wd=/^c[^\s-]{8,}$/i,zd=/^[a-z][a-z0-9]*$/,Kd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Gd=/^[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,Jd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ni;const Xd=/^(((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}))$/,Qd=/^(([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})))$/,ef=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 tf(e,t){return!!((t==="v4"||!t)&&Xd.test(e)||(t==="v6"||!t)&&Qd.test(e))}class $t extends Ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Q.string){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.string,received:s.parsedType}),ge}const r=new ut;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Jd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")ni||(ni=new RegExp(Yd,"u")),ni.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Gd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Wd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")zd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Kd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:B.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:B.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?ef(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?tf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:B.invalid_string,message:s.message}),r.dirty()):ve.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:B.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new $t({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.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,...ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new $t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $t({...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}}$t.create=e=>{var t;return new $t({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function nf(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 bn extends Ee{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)!==Q.number){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.number,received:s.parsedType}),ge}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?ve.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?nf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_finite,message:s.message}),o.dirty()):ve.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,o){return new bn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(o)}]})}_addCheck(t){return new bn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.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"&&ve.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)}}bn.create=e=>new bn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class wn extends Ee{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)!==Q.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.bigint,received:s.parsedType}),ge}let r;const o=new ut;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):ve.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,o){return new wn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(o)}]})}_addCheck(t){return new wn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.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}}wn.create=e=>{var t;return new wn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class Ur extends Ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Q.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.boolean,received:r.parsedType}),ge}return ht(t.data)}}Ur.create=e=>new Ur({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class qn extends Ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Q.date){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.date,received:s.parsedType}),ge}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_date}),ge}const r=new ut;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ve.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.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}}qn.create=e=>new qn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,..._e(e)});class Uo extends Ee{_parse(t){if(this._getType(t)!==Q.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.symbol,received:r.parsedType}),ge}return ht(t.data)}}Uo.create=e=>new Uo({typeName:pe.ZodSymbol,..._e(e)});class Fr extends Ee{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.undefined,received:r.parsedType}),ge}return ht(t.data)}}Fr.create=e=>new Fr({typeName:pe.ZodUndefined,..._e(e)});class Br extends Ee{_parse(t){if(this._getType(t)!==Q.null){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.null,received:r.parsedType}),ge}return ht(t.data)}}Br.create=e=>new Br({typeName:pe.ZodNull,..._e(e)});class Er extends Ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}}Er.create=e=>new Er({typeName:pe.ZodAny,..._e(e)});class Wn extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}}Wn.create=e=>new Wn({typeName:pe.ZodUnknown,..._e(e)});class Xt extends Ee{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:Q.never,received:n.parsedType}),ge}}Xt.create=e=>new Xt({typeName:pe.ZodNever,..._e(e)});class Fo extends Ee{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.void,received:r.parsedType}),ge}return ht(t.data)}}Fo.create=e=>new Fo({typeName:pe.ZodVoid,..._e(e)});class It extends Ee{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Q.array)return ee(n,{code:B.invalid_type,expected:Q.array,received:n.parsedType}),ge;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?B.too_big:B.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:B.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Mt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Mt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new It({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new It({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new It({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}It.create=(e,t)=>new It({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,..._e(t)});function Or(e){if(e instanceof Ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Qt.create(Or(r))}return new Ze({...e._def,shape:()=>t})}else return e instanceof It?new It({...e._def,type:Or(e.element)}):e instanceof Qt?Qt.create(Or(e.unwrap())):e instanceof Kn?Kn.create(Or(e.unwrap())):e instanceof Ut?Ut.create(e.items.map(t=>Or(t))):e}class Ze extends Ee{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=ve.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Q.object){const l=this._getOrReturnCtx(t);return ee(l,{code:B.invalid_type,expected:Q.object,received:l.parsedType}),ge}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xt&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||a.push(l);const u=[];for(const l of i){const c=s[l],d=o.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Mt(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Xt){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(l==="strict")a.length>0&&(ee(o,{code:B.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 c of a){const d=o.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Mt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const d=await c.key;l.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>ut.mergeObjectSync(r,l)):ut.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new Ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const u=(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=ce.errToObj(t).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new Ze({...this._def,unknownKeys:"strip"})}passthrough(){return new Ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ze({...this._def,catchall:t})}pick(t){const n={};return ve.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 ve.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return Or(this)}partial(t){const n={};return ve.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 ve.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Qt;)s=s._def.innerType;n[r]=s}}),new Ze({...this._def,shape:()=>n})}keyof(){return Ka(ve.objectKeys(this.shape))}}Ze.create=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strip",catchall:Xt.create(),typeName:pe.ZodObject,..._e(t)}),Ze.strictCreate=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strict",catchall:Xt.create(),typeName:pe.ZodObject,..._e(t)}),Ze.lazycreate=(e,t)=>new Ze({shape:e,unknownKeys:"strip",catchall:Xt.create(),typeName:pe.ZodObject,..._e(t)});class Hr extends Ee{_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 Pt(a.ctx.common.issues));return ee(n,{code:B.invalid_union,unionErrors:i}),ge}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 u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,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(u=>new Pt(u));return ee(n,{code:B.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}}Hr.create=(e,t)=>new Hr({options:e,typeName:pe.ZodUnion,..._e(t)});const Bo=e=>e instanceof Wr?Bo(e.schema):e instanceof Dt?Bo(e.innerType()):e instanceof zr?[e.value]:e instanceof En?e.options:e instanceof Kr?Object.keys(e.enum):e instanceof Gr?Bo(e._def.innerType):e instanceof Fr?[void 0]:e instanceof Br?[null]:null;class Ho extends Ee{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.object)return ee(n,{code:B.invalid_type,expected:Q.object,received:n.parsedType}),ge;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ge)}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=Bo(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 Ho({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function ri(e,t){const n=_n(e),r=_n(t);if(e===t)return{valid:!0,data:e};if(n===Q.object&&r===Q.object){const o=ve.objectKeys(t),s=ve.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const u=ri(e[a],t[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(n===Q.array&&r===Q.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],u=ri(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return n===Q.date&&r===Q.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Zr extends Ee{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ei(s)||ei(i))return ge;const a=ri(s.value,i.value);return a.valid?((ti(s)||ti(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:B.invalid_intersection_types}),ge)};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}))}}Zr.create=(e,t,n)=>new Zr({left:e,right:t,typeName:pe.ZodIntersection,..._e(n)});class Ut extends Ee{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.array)return ee(r,{code:B.invalid_type,expected:Q.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return ee(r,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const u=this._def.items[a]||this._def.rest;return u?u._parse(new Mt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Ut({...this._def,rest:t})}}Ut.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ut({items:e,typeName:pe.ZodTuple,rest:null,..._e(t)})};class qr extends Ee{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!==Q.object)return ee(r,{code:B.invalid_type,expected:Q.object,received:r.parsedType}),ge;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Mt(r,a,r.path,a)),value:i._parse(new Mt(r,r.data[a],r.path,a))});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ee?new qr({keyType:t,valueType:n,typeName:pe.ZodRecord,..._e(r)}):new qr({keyType:$t.create(),valueType:t,typeName:pe.ZodRecord,..._e(n)})}}class Zo extends Ee{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!==Q.map)return ee(r,{code:B.invalid_type,expected:Q.map,received:r.parsedType}),ge;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,u],l)=>({key:o._parse(new Mt(r,a,r.path,[l,"key"])),value:s._parse(new Mt(r,u,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const u of i){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return ge;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(l.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const u of i){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return ge;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(l.value,c.value)}return{status:n.value,value:a}}}}Zo.create=(e,t,n)=>new Zo({valueType:t,keyType:e,typeName:pe.ZodMap,..._e(n)});class zn extends Ee{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.set)return ee(r,{code:B.invalid_type,expected:Q.set,received:r.parsedType}),ge;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:B.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(u){const l=new Set;for(const c of u){if(c.status==="aborted")return ge;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((u,l)=>s._parse(new Mt(r,u,r.path,l)));return r.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(t,n){return new zn({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new zn({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zn.create=(e,t)=>new zn({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,..._e(t)});class Nr extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.function)return ee(n,{code:B.invalid_type,expected:Q.function,received:n.parsedType}),ge;function r(a,u){return Lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jo(),Lr].filter(l=>!!l),issueData:{code:B.invalid_arguments,argumentsError:u}})}function o(a,u){return Lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jo(),Lr].filter(l=>!!l),issueData:{code:B.invalid_return_type,returnTypeError:u}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Sr){const a=this;return ht(async function(...u){const l=new Pt([]),c=await a._def.args.parseAsync(u,s).catch(g=>{throw l.addIssue(r(u,g)),l}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(g=>{throw l.addIssue(o(d,g)),l})})}else{const a=this;return ht(function(...u){const l=a._def.args.safeParse(u,s);if(!l.success)throw new Pt([r(u,l.error)]);const c=Reflect.apply(i,this,l.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Pt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Nr({...this._def,args:Ut.create(t).rest(Wn.create())})}returns(t){return new Nr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Nr({args:t||Ut.create([]).rest(Wn.create()),returns:n||Wn.create(),typeName:pe.ZodFunction,..._e(r)})}}class Wr extends Ee{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})}}Wr.create=(e,t)=>new Wr({getter:e,typeName:pe.ZodLazy,..._e(t)});class zr extends Ee{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:B.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}zr.create=(e,t)=>new zr({value:e,typeName:pe.ZodLiteral,..._e(t)});function Ka(e,t){return new En({values:e,typeName:pe.ZodEnum,..._e(t)})}class En extends Ee{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:ve.joinValues(r),received:n.parsedType,code:B.invalid_type}),ge}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:B.invalid_enum_value,options:r}),ge}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 En.create(t)}exclude(t){return En.create(this.options.filter(n=>!t.includes(n)))}}En.create=Ka;class Kr extends Ee{_parse(t){const n=ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Q.string&&r.parsedType!==Q.number){const o=ve.objectValues(n);return ee(r,{expected:ve.joinValues(o),received:r.parsedType,code:B.invalid_type}),ge}if(n.indexOf(t.data)===-1){const o=ve.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ge}return ht(t.data)}get enum(){return this._def.values}}Kr.create=(e,t)=>new Kr({values:e,typeName:pe.ZodNativeEnum,..._e(t)});class Sr extends Ee{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.promise&&n.common.async===!1)return ee(n,{code:B.invalid_type,expected:Q.promise,received:n.parsedType}),ge;const r=n.parsedType===Q.promise?n.data:Promise.resolve(n.data);return ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Sr.create=(e,t)=>new Sr({type:e,typeName:pe.ZodPromise,..._e(t)});class Dt extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);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 u=o.refinement(a,s);if(r.common.async)return Promise.resolve(u);if(u 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"?ge:(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"?ge:(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(!Mr(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=>Mr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);ve.assertNever(o)}}Dt.create=(e,t,n)=>new Dt({schema:e,typeName:pe.ZodEffects,effect:t,..._e(n)}),Dt.createWithPreprocess=(e,t,n)=>new Dt({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,..._e(n)});class Qt extends Ee{_parse(t){return this._getType(t)===Q.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qt.create=(e,t)=>new Qt({innerType:e,typeName:pe.ZodOptional,..._e(t)});class Kn extends Ee{_parse(t){return this._getType(t)===Q.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kn.create=(e,t)=>new Kn({innerType:e,typeName:pe.ZodNullable,..._e(t)});class Gr extends Ee{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gr.create=(e,t)=>new Gr({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class qo extends Ee{_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 Mo(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Pt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Pt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}qo.create=(e,t)=>new qo({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class Wo extends Ee{_parse(t){if(this._getType(t)!==Q.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}Wo.create=e=>new Wo({typeName:pe.ZodNaN,..._e(e)});const rf=Symbol("zod_brand");class Ga extends Ee{_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 Jr extends Ee{_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"?ge:s.status==="dirty"?(n.dirty(),Wa(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"?ge: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 Jr({in:t,out:n,typeName:pe.ZodPipeline})}}class zo extends Ee{_parse(t){const n=this._def.innerType._parse(t);return Mr(n)&&(n.value=Object.freeze(n.value)),n}}zo.create=(e,t)=>new zo({innerType:e,typeName:pe.ZodReadonly,..._e(t)});const Ja=(e,t={},n)=>e?Er.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(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:u})}}):Er.create(),of={object:Ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const sf=(e,t={message:`Input not instance of ${e.name}`})=>Ja(n=>n instanceof e,t),Ya=$t.create,Xa=bn.create,af=Wo.create,lf=wn.create,Qa=Ur.create,uf=qn.create,cf=Uo.create,df=Fr.create,ff=Br.create,pf=Er.create,hf=Wn.create,mf=Xt.create,vf=Fo.create,gf=It.create,yf=Ze.create,_f=Ze.strictCreate,bf=Hr.create,wf=Ho.create,Ef=Zr.create,Of=Ut.create,Nf=qr.create,Sf=Zo.create,xf=zn.create,Tf=Nr.create,Cf=Wr.create,kf=zr.create,Pf=En.create,$f=Kr.create,If=Sr.create,el=Dt.create,Df=Qt.create,Af=Kn.create,Vf=Dt.createWithPreprocess,Rf=Jr.create;var y=Object.freeze({__proto__:null,defaultErrorMap:Lr,setErrorMap:Zd,getErrorMap:jo,makeIssue:Lo,EMPTY_PATH:qd,addIssueToContext:ee,ParseStatus:ut,INVALID:ge,DIRTY:Wa,OK:ht,isAborted:ei,isDirty:ti,isValid:Mr,isAsync:Mo,get util(){return ve},get objectUtil(){return yn},ZodParsedType:Q,getParsedType:_n,ZodType:Ee,ZodString:$t,ZodNumber:bn,ZodBigInt:wn,ZodBoolean:Ur,ZodDate:qn,ZodSymbol:Uo,ZodUndefined:Fr,ZodNull:Br,ZodAny:Er,ZodUnknown:Wn,ZodNever:Xt,ZodVoid:Fo,ZodArray:It,ZodObject:Ze,ZodUnion:Hr,ZodDiscriminatedUnion:Ho,ZodIntersection:Zr,ZodTuple:Ut,ZodRecord:qr,ZodMap:Zo,ZodSet:zn,ZodFunction:Nr,ZodLazy:Wr,ZodLiteral:zr,ZodEnum:En,ZodNativeEnum:Kr,ZodPromise:Sr,ZodEffects:Dt,ZodTransformer:Dt,ZodOptional:Qt,ZodNullable:Kn,ZodDefault:Gr,ZodCatch:qo,ZodNaN:Wo,BRAND:rf,ZodBranded:Ga,ZodPipeline:Jr,ZodReadonly:zo,custom:Ja,Schema:Ee,ZodSchema:Ee,late:of,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>$t.create({...e,coerce:!0}),number:e=>bn.create({...e,coerce:!0}),boolean:e=>Ur.create({...e,coerce:!0}),bigint:e=>wn.create({...e,coerce:!0}),date:e=>qn.create({...e,coerce:!0})},any:pf,array:gf,bigint:lf,boolean:Qa,date:uf,discriminatedUnion:wf,effect:el,enum:Pf,function:Tf,instanceof:sf,intersection:Ef,lazy:Cf,literal:kf,map:Sf,nan:af,nativeEnum:$f,never:mf,null:ff,nullable:Af,number:Xa,object:yf,oboolean:()=>Qa().optional(),onumber:()=>Xa().optional(),optional:Df,ostring:()=>Ya().optional(),pipeline:Rf,preprocess:Vf,promise:If,record:Nf,set:xf,strictObject:_f,string:Ya,symbol:cf,transformer:el,tuple:Of,undefined:df,union:bf,unknown:hf,void:vf,NEVER:ge,ZodIssueCode:B,quotelessJson:Hd,ZodError:Pt}),jf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oi={exports:{}};(function(e,t){var n=typeof self<"u"?self:jf,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 u(_){return _&&DataView.prototype.isPrototypeOf(_)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(_){return _&&l.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function f(_){return typeof _!="string"&&(_=String(_)),_}function g(_){var k={next:function(){var te=_.shift();return{done:te===void 0,value:te}}};return a.iterable&&(k[Symbol.iterator]=function(){return k}),k}function m(_){this.map={},_ instanceof m?_.forEach(function(k,te){this.append(te,k)},this):Array.isArray(_)?_.forEach(function(k){this.append(k[0],k[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(k){this.append(k,_[k])},this)}m.prototype.append=function(_,k){_=d(_),k=f(k);var te=this.map[_];this.map[_]=te?te+", "+k:k},m.prototype.delete=function(_){delete this.map[d(_)]},m.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},m.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},m.prototype.set=function(_,k){this.map[d(_)]=f(k)},m.prototype.forEach=function(_,k){for(var te in this.map)this.map.hasOwnProperty(te)&&_.call(k,this.map[te],te,this)},m.prototype.keys=function(){var _=[];return this.forEach(function(k,te){_.push(te)}),g(_)},m.prototype.values=function(){var _=[];return this.forEach(function(k){_.push(k)}),g(_)},m.prototype.entries=function(){var _=[];return this.forEach(function(k,te){_.push([te,k])}),g(_)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function w(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function S(_){return new Promise(function(k,te){_.onload=function(){k(_.result)},_.onerror=function(){te(_.error)}})}function L(_){var k=new FileReader,te=S(k);return k.readAsArrayBuffer(_),te}function F(_){var k=new FileReader,te=S(k);return k.readAsText(_),te}function T(_){for(var k=new Uint8Array(_),te=new Array(k.length),ae=0;ae<k.length;ae++)te[ae]=String.fromCharCode(k[ae]);return te.join("")}function K(_){if(_.slice)return _.slice(0);var k=new Uint8Array(_.byteLength);return k.set(new Uint8Array(_)),k.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(_){this._bodyInit=_,_?typeof _=="string"?this._bodyText=_:a.blob&&Blob.prototype.isPrototypeOf(_)?this._bodyBlob=_:a.formData&&FormData.prototype.isPrototypeOf(_)?this._bodyFormData=_:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(_)?this._bodyText=_.toString():a.arrayBuffer&&a.blob&&u(_)?(this._bodyArrayBuffer=K(_.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(_)||c(_))?this._bodyArrayBuffer=K(_):this._bodyText=_=Object.prototype.toString.call(_):this._bodyText="",this.headers.get("content-type")||(typeof _=="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(_)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var _=w(this);if(_)return _;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?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(L)}),this.text=function(){var _=w(this);if(_)return _;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(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(J)}),this.json=function(){return this.text().then(JSON.parse)},this}var H=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(_){var k=_.toUpperCase();return H.indexOf(k)>-1?k:_}function de(_,k){k=k||{};var te=k.body;if(_ instanceof de){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,k.headers||(this.headers=new m(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!te&&_._bodyInit!=null&&(te=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=k.credentials||this.credentials||"same-origin",(k.headers||!this.headers)&&(this.headers=new m(k.headers)),this.method=E(k.method||this.method||"GET"),this.mode=k.mode||this.mode||null,this.signal=k.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&te)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(te)}de.prototype.clone=function(){return new de(this,{body:this._bodyInit})};function J(_){var k=new FormData;return _.trim().split("&").forEach(function(te){if(te){var ae=te.split("="),ne=ae.shift().replace(/\+/g," "),ue=ae.join("=").replace(/\+/g," ");k.append(decodeURIComponent(ne),decodeURIComponent(ue))}}),k}function D(_){var k=new m,te=_.replace(/\r?\n[\t ]+/g," ");return te.split(/\r?\n/).forEach(function(ae){var ne=ae.split(":"),ue=ne.shift().trim();if(ue){var Te=ne.join(":").trim();k.append(ue,Te)}}),k}C.call(de.prototype);function x(_,k){k||(k={}),this.type="default",this.status=k.status===void 0?200:k.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in k?k.statusText:"OK",this.headers=new m(k.headers),this.url=k.url||"",this._initBody(_)}C.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},x.error=function(){var _=new x(null,{status:0,statusText:""});return _.type="error",_};var R=[301,302,303,307,308];x.redirect=function(_,k){if(R.indexOf(k)===-1)throw new RangeError("Invalid status code");return new x(null,{status:k,headers:{location:_}})},i.DOMException=s.DOMException;try{new i.DOMException}catch{i.DOMException=function(k,te){this.message=k,this.name=te;var ae=Error(k);this.stack=ae.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function oe(_,k){return new Promise(function(te,ae){var ne=new de(_,k);if(ne.signal&&ne.signal.aborted)return ae(new i.DOMException("Aborted","AbortError"));var ue=new XMLHttpRequest;function Te(){ue.abort()}ue.onload=function(){var De={status:ue.status,statusText:ue.statusText,headers:D(ue.getAllResponseHeaders()||"")};De.url="responseURL"in ue?ue.responseURL:De.headers.get("X-Request-URL");var nt="response"in ue?ue.response:ue.responseText;te(new x(nt,De))},ue.onerror=function(){ae(new TypeError("Network request failed"))},ue.ontimeout=function(){ae(new TypeError("Network request failed"))},ue.onabort=function(){ae(new i.DOMException("Aborted","AbortError"))},ue.open(ne.method,ne.url,!0),ne.credentials==="include"?ue.withCredentials=!0:ne.credentials==="omit"&&(ue.withCredentials=!1),"responseType"in ue&&a.blob&&(ue.responseType="blob"),ne.headers.forEach(function(De,nt){ue.setRequestHeader(nt,De)}),ne.signal&&(ne.signal.addEventListener("abort",Te),ue.onreadystatechange=function(){ue.readyState===4&&ne.signal.removeEventListener("abort",Te)}),ue.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=m,s.Request=de,s.Response=x),i.Headers=m,i.Request=de,i.Response=x,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})(oi,oi.exports);var Mf=oi.exports;const Ko=Lf(Mf);var On=y.record(y.number()),Uf=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:On}),Ff=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:On}),Bf=y.discriminatedUnion("type",[Uf,Ff]),xr=y.object({id:y.string(),name:y.string(),originalPrice:On,price:On,hasDiscount:y.boolean(),discount:Bf.optional()});function Yr(e){return y.object({items:y.array(e),hasMore:y.boolean(),next:y.string().nullable()})}function tl(e){return y.object({value:e,quantity:y.number()})}var Tr=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Tr||{}),nl=y.object({name:y.string(),key:y.string(),platform:y.nativeEnum(Tr),size:y.number(),path:y.string().nullable()}),rl=y.object({id:y.string(),name:y.string(),tagline:y.string(),website:y.string().optional(),iconUrl:y.string().optional(),numberOfLicenses:y.number().optional(),numberOfTrials:y.number().optional(),currentActivations:y.number().optional(),maxActivations:y.number().optional(),currentVersion:y.string().nullable(),downloadsNeedsUser:y.boolean(),downloadsNeedsOwnership:y.boolean(),downloads:y.array(nl).optional()}),Xr=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),website:y.string().nullish(),owned:y.boolean(),currentVersion:y.string().optional(),downloads:nl.array().optional(),defaultVariation:xr.optional(),variations:xr.array().optional(),type:y.void().transform(()=>"product").pipe(y.literal("product"))}),si=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),owned:y.boolean(),partial:y.boolean(),products:Xr.and(y.object({included:y.boolean().optional()})).array(),defaultVariation:xr.optional(),variations:xr.array().optional(),type:y.void().transform(()=>"bundle").pipe(y.literal("bundle"))}),Hf=y.object({suggestedCurrency:y.string(),products:Xr.array(),bundles:si.array()}),Ft=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Ft||{}),Go=y.object({id:y.string(),status:y.nativeEnum(Ft),product:Xr,trialEligibility:y.object({eligible:y.boolean(),existing:y.boolean(),requiresAccount:y.boolean(),numberOfDaysPerProduct:y.number(),numberOfDaysRemaining:y.number()}).optional(),licenseEligibility:y.object({eligible:y.boolean()}).optional()}),Zf=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return Go.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return y.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return Go.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return Go.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return Go.parse(t.data)}},qf=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},ii=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},ai=class extends Error{constructor(){super(),this.name="NotFoundError"}},Wf=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}},zf=y.object({type:y.string(),title:y.string(),detail:y.string().optional(),status:y.number(),errors:y.record(y.string(),y.string().array()).optional()});function Kf(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 li(e){if(e.status===404)throw new ai;if(e.status===401)throw new ii;if(e.status===403)throw new qf;let t;try{const n=await e.json();t=zf.parse(n)}catch{throw new Error("An unknown problem occurred")}throw new Wf(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Kf(n),r.join(", ")])):void 0)}var Gf=y.object({countryCode:y.string(),streetAddress1:y.string(),streetAddress2:y.string().nullable(),locality:y.string().nullable(),region:y.string().nullable(),postCode:y.string()}),Jf=y.object({newsletterOptIn:y.boolean()}),ol=y.object({id:y.string(),email:y.string(),name:y.string(),tenantId:y.string(),address:Gf.optional(),communicationPreferences:Jf,ownedProducts:y.string().array().optional()}),ui=ol.and(y.object({accessToken:y.string(),refreshToken:y.string()})),Yf=y.object({id:y.string(),name:y.string(),email:y.string(),resetPasswordToken:y.string().nullable()}),Xf=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return ol.parse(e.data)}async signIn(e,t){const n=await Ko(`${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 li(n);const r=await n.json(),o=ui.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}),u=ui.parse(a.data);return this.tokenStore.setUser(u),u}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 Ko(`${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 li(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 Yf.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},Qr=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(Qr||{}),Qf=y.object({code:y.string(),name:y.string(),description:y.string()}),ep=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:On.optional(),isExclusive:y.boolean()}),tp=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:On.optional(),isExclusive:y.boolean()}),sl=y.discriminatedUnion("type",[ep,tp]),np=y.object({id:y.string(),type:y.literal("Product"),productId:y.string(),quantity:y.number(),variationId:y.string(),price:On.optional(),variation:xr.optional(),product:Xr.optional(),appliedDiscount:sl.optional()}),rp=y.object({id:y.string(),type:y.literal("Bundle"),bundleId:y.string(),quantity:y.number(),variationId:y.string(),price:On.optional(),variation:xr.optional(),bundle:si.optional(),appliedDiscount:sl.optional()}),op=y.discriminatedUnion("type",[np,rp]),il=y.object({id:y.string(),status:y.literal("Open"),currency:y.string(),items:op.array(),couponsApplied:Qf.array(),checkoutUrl:y.string().optional()}),sp=y.discriminatedUnion("status",[il]),ip=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return sp.parse(t.data)}async pushContent(e,t,n){const r={...al(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 il.parse(o.data)}};function al(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 ap=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(al(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Hf.parse(n.data)}},lp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new ii;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 Ko(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 li(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},ll=class Ro{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(Ro.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(Ro.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(Ro.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 Ko(`${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 Error(`Could not refresh access token, status code ${t.status}`)}const n=ui.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case Ro.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}}};ll.storageKey="moonbase_auth";var up=ll,ul=y.object({id:y.string(),name:y.string(),description:y.string(),code:y.string(),redeemed:y.boolean(),redeemsProducts:tl(Xr).array(),redeemsBundles:tl(si).array()}),cp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return ul.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return ul.parse(t.data)}},cl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(cl||{}),dl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(dl||{}),ci=(e=>(e.Online="Online",e.Offline="Offline",e))(ci||{}),di=y.object({id:y.string(),status:y.nativeEnum(cl),product:rl,activeNumberOfActivations:y.number(),maxNumberOfActivations:y.number(),createdAt:y.coerce.date()}),fl=y.object({id:y.string(),licenseId:y.string(),name:y.string(),status:y.nativeEnum(dl),activationMethod:y.nativeEnum(ci),lastValidatedAt:y.coerce.date().nullable()}),dp=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:di.parse(n.data),url:y.string().parse(n.headers.get("location"))}}},fp=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return Yr(di).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return Yr(fl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},pp=class{constructor(e){this.api=e}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return Yr(rl).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return Yr(di).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return Yr(fl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.authenticatedFetch(t.pathname+t.search);return y.object({location:y.string()}).parse(n.data).location}},hp=class{constructor(e){this.licenses=new fp(e),this.products=new pp(e),this.activation=new dp(e)}},mp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new up(e);const t=new lp(this.configuration.endpoint,this.tokenStore);this.storefront=new ap(t),this.identity=new Xf(t,this.tokenStore),this.vouchers=new cp(t),this.orders=new ip(t),this.inventory=new hp(t),this.activationRequests=new Zf(t)}},pl={};/**
2
+ (function(wt,ve){typeof exports=="object"&&typeof module<"u"?ve(exports):typeof define=="function"&&define.amd?define(["exports"],ve):(wt=typeof globalThis<"u"?globalThis:wt||self,ve(wt.Moonbase={}))})(this,function(wt){"use strict";var w1=Object.defineProperty;var E1=(wt,ve,yn)=>ve in wt?w1(wt,ve,{enumerable:!0,configurable:!0,writable:!0,value:yn}):wt[ve]=yn;var Er=(wt,ve,yn)=>E1(wt,typeof ve!="symbol"?ve+"":ve,yn);var ve;(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})(ve||(ve={}));var yn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(yn||(yn={}));const Q=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_n=e=>{switch(typeof e){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return isNaN(e)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":return Array.isArray(e)?Q.array:e===null?Q.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Q.promise:typeof Map<"u"&&e instanceof Map?Q.map:typeof Set<"u"&&e instanceof Set?Q.set:typeof Date<"u"&&e instanceof Date?Q.date:Q.object;default:return Q.unknown}},B=ve.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"]),Hd=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Pt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.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()}}Pt.create=e=>new Pt(e);const Lr=(e,t)=>{let n;switch(e.code){case B.invalid_type:e.received===Q.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ve.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:n=`Unrecognized key(s) in object: ${ve.joinValues(e.keys,", ")}`;break;case B.invalid_union:n="Invalid input";break;case B.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ve.joinValues(e.options)}`;break;case B.invalid_enum_value:n=`Invalid enum value. Expected ${ve.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:n="Invalid function arguments";break;case B.invalid_return_type:n="Invalid function return type";break;case B.invalid_date:n="Invalid date";break;case B.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ve.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case B.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case B.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case B.custom:n="Invalid input";break;case B.invalid_intersection_types:n="Intersection results could not be merged";break;case B.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:n="Number must be finite";break;default:n=t.defaultError,ve.assertNever(e)}return{message:n}};let qa=Lr;function Zd(e){qa=e}function jo(){return qa}const Lo=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(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:o.message||a}},qd=[];function ee(e,t){const n=Lo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,jo(),Lr].filter(r=>!!r)});e.common.issues.push(n)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ge;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 ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ge;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 ge=Object.freeze({status:"aborted"}),Wa=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),ti=e=>e.status==="aborted",ni=e=>e.status==="dirty",Mr=e=>e.status==="valid",Mo=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class Mt{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 za=(e,t)=>{if(Mr(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 Pt(e.common.issues);return this._error=n,this._error}}};function be(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 Ee{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 _n(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:_n(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:_n(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Mo(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:_n(t)},s=this._parseSync({data:t,path:o.path,parent:o});return za(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:_n(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Mo(o)?o:Promise.resolve(o));return za(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:B.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Dt({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Qt.create(this,this._def)}nullable(){return Kn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return It.create(this,this._def)}promise(){return xr.create(this,this._def)}or(t){return Hr.create([this,t],this._def)}and(t){return Zr.create(this,t,this._def)}transform(t){return new Dt({...be(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gr({...be(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ga({typeName:pe.ZodBranded,type:this,...be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new qo({...be(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Jr.create(this,t)}readonly(){return zo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wd=/^c[^\s-]{8,}$/i,zd=/^[a-z][a-z0-9]*$/,Kd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Gd=/^[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,Jd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ri;const Xd=/^(((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}))$/,Qd=/^(([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})))$/,ef=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 tf(e,t){return!!((t==="v4"||!t)&&Xd.test(e)||(t==="v6"||!t)&&Qd.test(e))}class $t extends Ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Q.string){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.string,received:s.parsedType}),ge}const r=new ut;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Jd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")ri||(ri=new RegExp(Yd,"u")),ri.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Gd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Wd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")zd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Kd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:B.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:B.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?ef(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?tf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:B.invalid_string,message:s.message}),r.dirty()):ve.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:B.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new $t({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.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,...ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new $t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $t({...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}}$t.create=e=>{var t;return new $t({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...be(e)})};function nf(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 bn extends Ee{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)!==Q.number){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.number,received:s.parsedType}),ge}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?ve.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?nf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_finite,message:s.message}),o.dirty()):ve.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,o){return new bn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(o)}]})}_addCheck(t){return new bn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.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"&&ve.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)}}bn.create=e=>new bn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...be(e)});class wn extends Ee{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)!==Q.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.bigint,received:s.parsedType}),ge}let r;const o=new ut;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):ve.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,o){return new wn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(o)}]})}_addCheck(t){return new wn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.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}}wn.create=e=>{var t;return new wn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...be(e)})};class Ur extends Ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Q.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.boolean,received:r.parsedType}),ge}return ht(t.data)}}Ur.create=e=>new Ur({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...be(e)});class qn extends Ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Q.date){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:Q.date,received:s.parsedType}),ge}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_date}),ge}const r=new ut;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ve.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.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}}qn.create=e=>new qn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...be(e)});class Uo extends Ee{_parse(t){if(this._getType(t)!==Q.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.symbol,received:r.parsedType}),ge}return ht(t.data)}}Uo.create=e=>new Uo({typeName:pe.ZodSymbol,...be(e)});class Fr extends Ee{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.undefined,received:r.parsedType}),ge}return ht(t.data)}}Fr.create=e=>new Fr({typeName:pe.ZodUndefined,...be(e)});class Br extends Ee{_parse(t){if(this._getType(t)!==Q.null){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.null,received:r.parsedType}),ge}return ht(t.data)}}Br.create=e=>new Br({typeName:pe.ZodNull,...be(e)});class Or extends Ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}}Or.create=e=>new Or({typeName:pe.ZodAny,...be(e)});class Wn extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}}Wn.create=e=>new Wn({typeName:pe.ZodUnknown,...be(e)});class Xt extends Ee{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:Q.never,received:n.parsedType}),ge}}Xt.create=e=>new Xt({typeName:pe.ZodNever,...be(e)});class Fo extends Ee{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.void,received:r.parsedType}),ge}return ht(t.data)}}Fo.create=e=>new Fo({typeName:pe.ZodVoid,...be(e)});class It extends Ee{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Q.array)return ee(n,{code:B.invalid_type,expected:Q.array,received:n.parsedType}),ge;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?B.too_big:B.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:B.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Mt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Mt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new It({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new It({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new It({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}It.create=(e,t)=>new It({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...be(t)});function Nr(e){if(e instanceof Ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Qt.create(Nr(r))}return new Ze({...e._def,shape:()=>t})}else return e instanceof It?new It({...e._def,type:Nr(e.element)}):e instanceof Qt?Qt.create(Nr(e.unwrap())):e instanceof Kn?Kn.create(Nr(e.unwrap())):e instanceof Ut?Ut.create(e.items.map(t=>Nr(t))):e}class Ze extends Ee{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=ve.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Q.object){const u=this._getOrReturnCtx(t);return ee(u,{code:B.invalid_type,expected:Q.object,received:u.parsedType}),ge}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xt&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=s[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Mt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Xt){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")a.length>0&&(ee(o,{code:B.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Mt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>ut.mergeObjectSync(r,u)):ut.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ce.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=ce.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ze({...this._def,unknownKeys:"strip"})}passthrough(){return new Ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ze({...this._def,catchall:t})}pick(t){const n={};return ve.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 ve.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return Nr(this)}partial(t){const n={};return ve.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 ve.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Qt;)s=s._def.innerType;n[r]=s}}),new Ze({...this._def,shape:()=>n})}keyof(){return Ka(ve.objectKeys(this.shape))}}Ze.create=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strip",catchall:Xt.create(),typeName:pe.ZodObject,...be(t)}),Ze.strictCreate=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strict",catchall:Xt.create(),typeName:pe.ZodObject,...be(t)}),Ze.lazycreate=(e,t)=>new Ze({shape:e,unknownKeys:"strip",catchall:Xt.create(),typeName:pe.ZodObject,...be(t)});class Hr extends Ee{_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 Pt(a.ctx.common.issues));return ee(n,{code:B.invalid_union,unionErrors:i}),ge}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Pt(l));return ee(n,{code:B.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}}Hr.create=(e,t)=>new Hr({options:e,typeName:pe.ZodUnion,...be(t)});const Bo=e=>e instanceof Wr?Bo(e.schema):e instanceof Dt?Bo(e.innerType()):e instanceof zr?[e.value]:e instanceof En?e.options:e instanceof Kr?Object.keys(e.enum):e instanceof Gr?Bo(e._def.innerType):e instanceof Fr?[void 0]:e instanceof Br?[null]:null;class Ho extends Ee{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.object)return ee(n,{code:B.invalid_type,expected:Q.object,received:n.parsedType}),ge;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ge)}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=Bo(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 Ho({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...be(r)})}}function oi(e,t){const n=_n(e),r=_n(t);if(e===t)return{valid:!0,data:e};if(n===Q.object&&r===Q.object){const o=ve.objectKeys(t),s=ve.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=oi(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===Q.array&&r===Q.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=oi(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Q.date&&r===Q.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Zr extends Ee{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ti(s)||ti(i))return ge;const a=oi(s.value,i.value);return a.valid?((ni(s)||ni(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:B.invalid_intersection_types}),ge)};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}))}}Zr.create=(e,t,n)=>new Zr({left:e,right:t,typeName:pe.ZodIntersection,...be(n)});class Ut extends Ee{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.array)return ee(r,{code:B.invalid_type,expected:Q.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return ee(r,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Mt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Ut({...this._def,rest:t})}}Ut.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ut({items:e,typeName:pe.ZodTuple,rest:null,...be(t)})};class qr extends Ee{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!==Q.object)return ee(r,{code:B.invalid_type,expected:Q.object,received:r.parsedType}),ge;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Mt(r,a,r.path,a)),value:i._parse(new Mt(r,r.data[a],r.path,a))});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ee?new qr({keyType:t,valueType:n,typeName:pe.ZodRecord,...be(r)}):new qr({keyType:$t.create(),valueType:t,typeName:pe.ZodRecord,...be(n)})}}class Zo extends Ee{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!==Q.map)return ee(r,{code:B.invalid_type,expected:Q.map,received:r.parsedType}),ge;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:o._parse(new Mt(r,a,r.path,[u,"key"])),value:s._parse(new Mt(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}Zo.create=(e,t,n)=>new Zo({valueType:t,keyType:e,typeName:pe.ZodMap,...be(n)});class zn extends Ee{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.set)return ee(r,{code:B.invalid_type,expected:Q.set,received:r.parsedType}),ge;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:B.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const c of l){if(c.status==="aborted")return ge;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new Mt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new zn({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new zn({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zn.create=(e,t)=>new zn({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...be(t)});class Sr extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.function)return ee(n,{code:B.invalid_type,expected:Q.function,received:n.parsedType}),ge;function r(a,l){return Lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jo(),Lr].filter(u=>!!u),issueData:{code:B.invalid_arguments,argumentsError:l}})}function o(a,l){return Lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jo(),Lr].filter(u=>!!u),issueData:{code:B.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof xr){const a=this;return ht(async function(...l){const u=new Pt([]),c=await a._def.args.parseAsync(l,s).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw u.addIssue(o(d,m)),u})})}else{const a=this;return ht(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Pt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Pt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Sr({...this._def,args:Ut.create(t).rest(Wn.create())})}returns(t){return new Sr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Sr({args:t||Ut.create([]).rest(Wn.create()),returns:n||Wn.create(),typeName:pe.ZodFunction,...be(r)})}}class Wr extends Ee{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})}}Wr.create=(e,t)=>new Wr({getter:e,typeName:pe.ZodLazy,...be(t)});class zr extends Ee{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:B.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}zr.create=(e,t)=>new zr({value:e,typeName:pe.ZodLiteral,...be(t)});function Ka(e,t){return new En({values:e,typeName:pe.ZodEnum,...be(t)})}class En extends Ee{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:ve.joinValues(r),received:n.parsedType,code:B.invalid_type}),ge}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:B.invalid_enum_value,options:r}),ge}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 En.create(t)}exclude(t){return En.create(this.options.filter(n=>!t.includes(n)))}}En.create=Ka;class Kr extends Ee{_parse(t){const n=ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Q.string&&r.parsedType!==Q.number){const o=ve.objectValues(n);return ee(r,{expected:ve.joinValues(o),received:r.parsedType,code:B.invalid_type}),ge}if(n.indexOf(t.data)===-1){const o=ve.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ge}return ht(t.data)}get enum(){return this._def.values}}Kr.create=(e,t)=>new Kr({values:e,typeName:pe.ZodNativeEnum,...be(t)});class xr extends Ee{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.promise&&n.common.async===!1)return ee(n,{code:B.invalid_type,expected:Q.promise,received:n.parsedType}),ge;const r=n.parsedType===Q.promise?n.data:Promise.resolve(n.data);return ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}xr.create=(e,t)=>new xr({type:e,typeName:pe.ZodPromise,...be(t)});class Dt extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);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"?ge:(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"?ge:(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(!Mr(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=>Mr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);ve.assertNever(o)}}Dt.create=(e,t,n)=>new Dt({schema:e,typeName:pe.ZodEffects,effect:t,...be(n)}),Dt.createWithPreprocess=(e,t,n)=>new Dt({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...be(n)});class Qt extends Ee{_parse(t){return this._getType(t)===Q.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qt.create=(e,t)=>new Qt({innerType:e,typeName:pe.ZodOptional,...be(t)});class Kn extends Ee{_parse(t){return this._getType(t)===Q.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kn.create=(e,t)=>new Kn({innerType:e,typeName:pe.ZodNullable,...be(t)});class Gr extends Ee{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gr.create=(e,t)=>new Gr({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...be(t)});class qo extends Ee{_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 Mo(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Pt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Pt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}qo.create=(e,t)=>new qo({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...be(t)});class Wo extends Ee{_parse(t){if(this._getType(t)!==Q.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:Q.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}Wo.create=e=>new Wo({typeName:pe.ZodNaN,...be(e)});const rf=Symbol("zod_brand");class Ga extends Ee{_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 Jr extends Ee{_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"?ge:s.status==="dirty"?(n.dirty(),Wa(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"?ge: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 Jr({in:t,out:n,typeName:pe.ZodPipeline})}}class zo extends Ee{_parse(t){const n=this._def.innerType._parse(t);return Mr(n)&&(n.value=Object.freeze(n.value)),n}}zo.create=(e,t)=>new zo({innerType:e,typeName:pe.ZodReadonly,...be(t)});const Ja=(e,t={},n)=>e?Or.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:l})}}):Or.create(),of={object:Ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const sf=(e,t={message:`Input not instance of ${e.name}`})=>Ja(n=>n instanceof e,t),Ya=$t.create,Xa=bn.create,af=Wo.create,lf=wn.create,Qa=Ur.create,uf=qn.create,cf=Uo.create,df=Fr.create,ff=Br.create,pf=Or.create,hf=Wn.create,mf=Xt.create,vf=Fo.create,gf=It.create,yf=Ze.create,_f=Ze.strictCreate,bf=Hr.create,wf=Ho.create,Ef=Zr.create,Of=Ut.create,Nf=qr.create,Sf=Zo.create,xf=zn.create,Tf=Sr.create,Cf=Wr.create,kf=zr.create,Pf=En.create,$f=Kr.create,If=xr.create,el=Dt.create,Df=Qt.create,Af=Kn.create,Vf=Dt.createWithPreprocess,Rf=Jr.create;var y=Object.freeze({__proto__:null,defaultErrorMap:Lr,setErrorMap:Zd,getErrorMap:jo,makeIssue:Lo,EMPTY_PATH:qd,addIssueToContext:ee,ParseStatus:ut,INVALID:ge,DIRTY:Wa,OK:ht,isAborted:ti,isDirty:ni,isValid:Mr,isAsync:Mo,get util(){return ve},get objectUtil(){return yn},ZodParsedType:Q,getParsedType:_n,ZodType:Ee,ZodString:$t,ZodNumber:bn,ZodBigInt:wn,ZodBoolean:Ur,ZodDate:qn,ZodSymbol:Uo,ZodUndefined:Fr,ZodNull:Br,ZodAny:Or,ZodUnknown:Wn,ZodNever:Xt,ZodVoid:Fo,ZodArray:It,ZodObject:Ze,ZodUnion:Hr,ZodDiscriminatedUnion:Ho,ZodIntersection:Zr,ZodTuple:Ut,ZodRecord:qr,ZodMap:Zo,ZodSet:zn,ZodFunction:Sr,ZodLazy:Wr,ZodLiteral:zr,ZodEnum:En,ZodNativeEnum:Kr,ZodPromise:xr,ZodEffects:Dt,ZodTransformer:Dt,ZodOptional:Qt,ZodNullable:Kn,ZodDefault:Gr,ZodCatch:qo,ZodNaN:Wo,BRAND:rf,ZodBranded:Ga,ZodPipeline:Jr,ZodReadonly:zo,custom:Ja,Schema:Ee,ZodSchema:Ee,late:of,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>$t.create({...e,coerce:!0}),number:e=>bn.create({...e,coerce:!0}),boolean:e=>Ur.create({...e,coerce:!0}),bigint:e=>wn.create({...e,coerce:!0}),date:e=>qn.create({...e,coerce:!0})},any:pf,array:gf,bigint:lf,boolean:Qa,date:uf,discriminatedUnion:wf,effect:el,enum:Pf,function:Tf,instanceof:sf,intersection:Ef,lazy:Cf,literal:kf,map:Sf,nan:af,nativeEnum:$f,never:mf,null:ff,nullable:Af,number:Xa,object:yf,oboolean:()=>Qa().optional(),onumber:()=>Xa().optional(),optional:Df,ostring:()=>Ya().optional(),pipeline:Rf,preprocess:Vf,promise:If,record:Nf,set:xf,strictObject:_f,string:Ya,symbol:cf,transformer:el,tuple:Of,undefined:df,union:bf,unknown:hf,void:vf,NEVER:ge,ZodIssueCode:B,quotelessJson:Hd,ZodError:Pt}),jf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var si={exports:{}};(function(e,t){var n=typeof self<"u"?self:jf,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(_){return _&&DataView.prototype.isPrototypeOf(_)}if(a.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(_){return _&&u.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function f(_){return typeof _!="string"&&(_=String(_)),_}function m(_){var k={next:function(){var te=_.shift();return{done:te===void 0,value:te}}};return a.iterable&&(k[Symbol.iterator]=function(){return k}),k}function v(_){this.map={},_ instanceof v?_.forEach(function(k,te){this.append(te,k)},this):Array.isArray(_)?_.forEach(function(k){this.append(k[0],k[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(k){this.append(k,_[k])},this)}v.prototype.append=function(_,k){_=d(_),k=f(k);var te=this.map[_];this.map[_]=te?te+", "+k:k},v.prototype.delete=function(_){delete this.map[d(_)]},v.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},v.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},v.prototype.set=function(_,k){this.map[d(_)]=f(k)},v.prototype.forEach=function(_,k){for(var te in this.map)this.map.hasOwnProperty(te)&&_.call(k,this.map[te],te,this)},v.prototype.keys=function(){var _=[];return this.forEach(function(k,te){_.push(te)}),m(_)},v.prototype.values=function(){var _=[];return this.forEach(function(k){_.push(k)}),m(_)},v.prototype.entries=function(){var _=[];return this.forEach(function(k,te){_.push([te,k])}),m(_)},a.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function w(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function S(_){return new Promise(function(k,te){_.onload=function(){k(_.result)},_.onerror=function(){te(_.error)}})}function L(_){var k=new FileReader,te=S(k);return k.readAsArrayBuffer(_),te}function F(_){var k=new FileReader,te=S(k);return k.readAsText(_),te}function T(_){for(var k=new Uint8Array(_),te=new Array(k.length),ae=0;ae<k.length;ae++)te[ae]=String.fromCharCode(k[ae]);return te.join("")}function K(_){if(_.slice)return _.slice(0);var k=new Uint8Array(_.byteLength);return k.set(new Uint8Array(_)),k.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(_){this._bodyInit=_,_?typeof _=="string"?this._bodyText=_:a.blob&&Blob.prototype.isPrototypeOf(_)?this._bodyBlob=_:a.formData&&FormData.prototype.isPrototypeOf(_)?this._bodyFormData=_:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(_)?this._bodyText=_.toString():a.arrayBuffer&&a.blob&&l(_)?(this._bodyArrayBuffer=K(_.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(_)||c(_))?this._bodyArrayBuffer=K(_):this._bodyText=_=Object.prototype.toString.call(_):this._bodyText="",this.headers.get("content-type")||(typeof _=="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(_)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var _=w(this);if(_)return _;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?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(L)}),this.text=function(){var _=w(this);if(_)return _;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(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(J)}),this.json=function(){return this.text().then(JSON.parse)},this}var H=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(_){var k=_.toUpperCase();return H.indexOf(k)>-1?k:_}function de(_,k){k=k||{};var te=k.body;if(_ instanceof de){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,k.headers||(this.headers=new v(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!te&&_._bodyInit!=null&&(te=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=k.credentials||this.credentials||"same-origin",(k.headers||!this.headers)&&(this.headers=new v(k.headers)),this.method=E(k.method||this.method||"GET"),this.mode=k.mode||this.mode||null,this.signal=k.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&te)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(te)}de.prototype.clone=function(){return new de(this,{body:this._bodyInit})};function J(_){var k=new FormData;return _.trim().split("&").forEach(function(te){if(te){var ae=te.split("="),ne=ae.shift().replace(/\+/g," "),ue=ae.join("=").replace(/\+/g," ");k.append(decodeURIComponent(ne),decodeURIComponent(ue))}}),k}function D(_){var k=new v,te=_.replace(/\r?\n[\t ]+/g," ");return te.split(/\r?\n/).forEach(function(ae){var ne=ae.split(":"),ue=ne.shift().trim();if(ue){var Te=ne.join(":").trim();k.append(ue,Te)}}),k}C.call(de.prototype);function x(_,k){k||(k={}),this.type="default",this.status=k.status===void 0?200:k.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in k?k.statusText:"OK",this.headers=new v(k.headers),this.url=k.url||"",this._initBody(_)}C.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},x.error=function(){var _=new x(null,{status:0,statusText:""});return _.type="error",_};var R=[301,302,303,307,308];x.redirect=function(_,k){if(R.indexOf(k)===-1)throw new RangeError("Invalid status code");return new x(null,{status:k,headers:{location:_}})},i.DOMException=s.DOMException;try{new i.DOMException}catch{i.DOMException=function(k,te){this.message=k,this.name=te;var ae=Error(k);this.stack=ae.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function oe(_,k){return new Promise(function(te,ae){var ne=new de(_,k);if(ne.signal&&ne.signal.aborted)return ae(new i.DOMException("Aborted","AbortError"));var ue=new XMLHttpRequest;function Te(){ue.abort()}ue.onload=function(){var De={status:ue.status,statusText:ue.statusText,headers:D(ue.getAllResponseHeaders()||"")};De.url="responseURL"in ue?ue.responseURL:De.headers.get("X-Request-URL");var nt="response"in ue?ue.response:ue.responseText;te(new x(nt,De))},ue.onerror=function(){ae(new TypeError("Network request failed"))},ue.ontimeout=function(){ae(new TypeError("Network request failed"))},ue.onabort=function(){ae(new i.DOMException("Aborted","AbortError"))},ue.open(ne.method,ne.url,!0),ne.credentials==="include"?ue.withCredentials=!0:ne.credentials==="omit"&&(ue.withCredentials=!1),"responseType"in ue&&a.blob&&(ue.responseType="blob"),ne.headers.forEach(function(De,nt){ue.setRequestHeader(nt,De)}),ne.signal&&(ne.signal.addEventListener("abort",Te),ue.onreadystatechange=function(){ue.readyState===4&&ne.signal.removeEventListener("abort",Te)}),ue.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=v,s.Request=de,s.Response=x),i.Headers=v,i.Request=de,i.Response=x,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})(si,si.exports);var Mf=si.exports;const Ko=Lf(Mf);var On=y.record(y.number()),Uf=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:On}),Ff=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:On}),Bf=y.discriminatedUnion("type",[Uf,Ff]),Tr=y.object({id:y.string(),name:y.string(),originalPrice:On,price:On,hasDiscount:y.boolean(),discount:Bf.optional()});function Yr(e){return y.object({items:y.array(e),hasMore:y.boolean(),next:y.string().nullable()})}function tl(e){return y.object({value:e,quantity:y.number()})}var Cr=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Cr||{}),nl=y.object({name:y.string(),key:y.string(),platform:y.nativeEnum(Cr),size:y.number(),path:y.string().nullable()}),rl=y.object({id:y.string(),name:y.string(),tagline:y.string(),website:y.string().optional(),iconUrl:y.string().optional(),numberOfLicenses:y.number().optional(),numberOfTrials:y.number().optional(),currentActivations:y.number().optional(),maxActivations:y.number().optional(),currentVersion:y.string().nullable(),downloadsNeedsUser:y.boolean(),downloadsNeedsOwnership:y.boolean(),downloads:y.array(nl).optional()}),Xr=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),website:y.string().nullish(),owned:y.boolean(),currentVersion:y.string().optional(),downloads:nl.array().optional(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:y.void().transform(()=>"product").pipe(y.literal("product"))}),ii=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),owned:y.boolean(),partial:y.boolean(),products:Xr.and(y.object({included:y.boolean().optional()})).array(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:y.void().transform(()=>"bundle").pipe(y.literal("bundle"))}),Hf=y.object({suggestedCurrency:y.string(),products:Xr.array(),bundles:ii.array()}),Ft=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Ft||{}),Go=y.object({id:y.string(),status:y.nativeEnum(Ft),product:Xr,trialEligibility:y.object({eligible:y.boolean(),existing:y.boolean(),requiresAccount:y.boolean(),numberOfDaysPerProduct:y.number(),numberOfDaysRemaining:y.number()}).optional(),licenseEligibility:y.object({eligible:y.boolean()}).optional()}),Zf=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return Go.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return y.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return Go.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return Go.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return Go.parse(t.data)}},qf=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},ai=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},li=class extends Error{constructor(){super(),this.name="NotFoundError"}},Wf=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}},zf=y.object({type:y.string(),title:y.string(),detail:y.string().optional(),status:y.number(),errors:y.record(y.string(),y.string().array()).optional()});function Kf(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 ui(e){if(e.status===404)throw new li;if(e.status===401)throw new ai;if(e.status===403)throw new qf;let t;try{const n=await e.json();t=zf.parse(n)}catch{throw new Error("An unknown problem occurred")}throw new Wf(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Kf(n),r.join(", ")])):void 0)}var Gf=y.object({countryCode:y.string(),streetAddress1:y.string(),streetAddress2:y.string().nullable(),locality:y.string().nullable(),region:y.string().nullable(),postCode:y.string()}),Jf=y.object({newsletterOptIn:y.boolean()}),ol=y.object({id:y.string(),email:y.string(),name:y.string(),tenantId:y.string(),address:Gf.optional(),communicationPreferences:Jf,ownedProducts:y.string().array().optional()}),ci=ol.and(y.object({accessToken:y.string(),refreshToken:y.string()})),Yf=y.object({id:y.string(),name:y.string(),email:y.string(),resetPasswordToken:y.string().nullable()}),Xf=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return ol.parse(e.data)}async signIn(e,t){const n=await Ko(`${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 ui(n);const r=await n.json(),o=ci.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=ci.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 Ko(`${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 ui(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 Yf.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},Qr=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(Qr||{}),Qf=y.object({code:y.string(),name:y.string(),description:y.string()}),ep=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:On.optional(),isExclusive:y.boolean()}),tp=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:On.optional(),isExclusive:y.boolean()}),sl=y.discriminatedUnion("type",[ep,tp]),np=y.object({id:y.string(),type:y.literal("Product"),productId:y.string(),quantity:y.number(),variationId:y.string(),price:On.optional(),variation:Tr.optional(),product:Xr.optional(),appliedDiscount:sl.optional()}),rp=y.object({id:y.string(),type:y.literal("Bundle"),bundleId:y.string(),quantity:y.number(),variationId:y.string(),price:On.optional(),variation:Tr.optional(),bundle:ii.optional(),appliedDiscount:sl.optional()}),op=y.discriminatedUnion("type",[np,rp]),il=y.object({id:y.string(),status:y.literal("Open"),currency:y.string(),items:op.array(),couponsApplied:Qf.array(),checkoutUrl:y.string().optional()}),sp=y.discriminatedUnion("status",[il]),ip=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return sp.parse(t.data)}async pushContent(e,t,n){const r={...al(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 il.parse(o.data)}};function al(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 ap=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(al(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Hf.parse(n.data)}},lp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new ai;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 Ko(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 ui(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},ll=class Ro{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(Ro.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(Ro.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(Ro.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 Ko(`${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 Error(`Could not refresh access token, status code ${t.status}`)}const n=ci.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case Ro.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}}};ll.storageKey="moonbase_auth";var up=ll,ul=y.object({id:y.string(),name:y.string(),description:y.string(),code:y.string(),redeemed:y.boolean(),redeemsProducts:tl(Xr).array(),redeemsBundles:tl(ii).array()}),cp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return ul.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return ul.parse(t.data)}},cl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(cl||{}),dl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(dl||{}),di=(e=>(e.Online="Online",e.Offline="Offline",e))(di||{}),fi=y.object({id:y.string(),status:y.nativeEnum(cl),product:rl,activeNumberOfActivations:y.number(),maxNumberOfActivations:y.number(),createdAt:y.coerce.date()}),fl=y.object({id:y.string(),licenseId:y.string(),name:y.string(),status:y.nativeEnum(dl),activationMethod:y.nativeEnum(di),lastValidatedAt:y.coerce.date().nullable()}),dp=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:fi.parse(n.data),url:y.string().parse(n.headers.get("location"))}}},fp=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return Yr(fi).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return Yr(fl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},pp=class{constructor(e){this.api=e}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return Yr(rl).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return Yr(fi).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return Yr(fl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.authenticatedFetch(t.pathname+t.search);return y.object({location:y.string()}).parse(n.data).location}},hp=class{constructor(e){this.licenses=new fp(e),this.products=new pp(e),this.activation=new dp(e)}},mp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new up(e);const t=new lp(this.configuration.endpoint,this.tokenStore);this.storefront=new ap(t),this.identity=new Xf(t,this.tokenStore),this.vouchers=new cp(t),this.orders=new ip(t),this.inventory=new hp(t),this.activationRequests=new Zf(t)}},pl={};/**
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 en(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const Re=pl.NODE_ENV!=="production"?Object.freeze({}):{},Cr=pl.NODE_ENV!=="production"?Object.freeze([]):[],We=()=>{},vp=()=>!1,eo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Jo=e=>e.startsWith("onUpdate:"),qe=Object.assign,fi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},gp=Object.prototype.hasOwnProperty,Ne=(e,t)=>gp.call(e,t),ie=Array.isArray,Gn=e=>Yo(e)==="[object Map]",hl=e=>Yo(e)==="[object Set]",fe=e=>typeof e=="function",Ue=e=>typeof e=="string",Nn=e=>typeof e=="symbol",Ce=e=>e!==null&&typeof e=="object",pi=e=>(Ce(e)||fe(e))&&fe(e.then)&&fe(e.catch),ml=Object.prototype.toString,Yo=e=>ml.call(e),hi=e=>Yo(e).slice(8,-1),vl=e=>Yo(e)==="[object Object]",mi=e=>Ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,to=en(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yp=en("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Xo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},_p=/-(\w)/g,Et=Xo(e=>e.replace(_p,(t,n)=>n?n.toUpperCase():"")),bp=/\B([A-Z])/g,tn=Xo(e=>e.replace(bp,"-$1").toLowerCase()),Jn=Xo(e=>e.charAt(0).toUpperCase()+e.slice(1)),Yn=Xo(e=>e?`on${Jn(e)}`:""),Sn=(e,t)=>!Object.is(e,t),no=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qo=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},wp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ep=e=>{const t=Ue(e)?Number(e):NaN;return isNaN(t)?e:t};let gl;const vi=()=>gl||(gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ue(r)?xp(r):gi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ue(e)||Ce(e))return e}const Op=/;(?![^(]*\))/g,Np=/:([^]+)/,Sp=/\/\*[^]*?\*\//g;function xp(e){const t={};return e.replace(Sp,"").split(Op).forEach(n=>{if(n){const r=n.split(Np);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function es(e){let t="";if(Ue(e))t=e;else if(ie(e))for(let n=0;n<e.length;n++){const r=es(e[n]);r&&(t+=r+" ")}else if(Ce(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Tp="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",Cp="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",kp="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",Pp=en(Tp),$p=en(Cp),Ip=en(kp),Dp=en("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function yl(e){return!!e||e===""}const _l=e=>!!(e&&e.__v_isRef===!0),re=e=>Ue(e)?e:e==null?"":ie(e)||Ce(e)&&(e.toString===ml||!fe(e.toString))?_l(e)?re(e.value):JSON.stringify(e,bl,2):String(e),bl=(e,t)=>_l(t)?bl(e,t.value):Gn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[yi(r,s)+" =>"]=o,n),{})}:hl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>yi(n))}:Nn(t)?yi(t):Ce(t)&&!ie(t)&&!vl(t)?String(t):t,yi=(e,t="")=>{var n;return Nn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var ze={};function Bt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ot;class wl{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"&&Bt("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 El(e){return new wl(e)}function Ap(e,t=Ot){t&&t.active&&t.effects.push(e)}function Ol(){return Ot}function Vp(e){Ot?Ot.cleanups.push(e):ze.NODE_ENV!=="production"&&Bt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Xn;class _i{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,Ap(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,nn();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Rp(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),rn()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=xn,n=Xn;try{return xn=!0,Xn=this,this._runnings++,Nl(this),this.fn()}finally{Sl(this),this._runnings--,Xn=n,xn=t}}stop(){this.active&&(Nl(this),Sl(this),this.onStop&&this.onStop(),this.active=!1)}}function Rp(e){return e.value}function Nl(e){e._trackId++,e._depsLength=0}function Sl(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)xl(e.deps[t],e);e.deps.length=e._depsLength}}function xl(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let xn=!0,bi=0;const Tl=[];function nn(){Tl.push(xn),xn=!1}function rn(){const e=Tl.pop();xn=e===void 0?!0:e}function wi(){bi++}function Ei(){for(bi--;!bi&&Oi.length;)Oi.shift()()}function Cl(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&&xl(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 Oi=[];function kl(e,t,n){var r;wi();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&&Oi.push(o.scheduler)))}Ei()}const Pl=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},ts=new WeakMap,Qn=Symbol(ze.NODE_ENV!=="production"?"iterate":""),Ni=Symbol(ze.NODE_ENV!=="production"?"Map key iterate":"");function ot(e,t,n){if(xn&&Xn){let r=ts.get(e);r||ts.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Pl(()=>r.delete(n))),Cl(Xn,o,ze.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function Ht(e,t,n,r,o,s){const i=ts.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&ie(e)){const u=Number(r);i.forEach((l,c)=>{(c==="length"||!Nn(c)&&c>=u)&&a.push(l)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":ie(e)?mi(n)&&a.push(i.get("length")):(a.push(i.get(Qn)),Gn(e)&&a.push(i.get(Ni)));break;case"delete":ie(e)||(a.push(i.get(Qn)),Gn(e)&&a.push(i.get(Ni)));break;case"set":Gn(e)&&a.push(i.get(Qn));break}wi();for(const u of a)u&&kl(u,4,ze.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0);Ei()}function jp(e,t){const n=ts.get(e);return n&&n.get(t)}const Lp=en("__proto__,__v_isRef,__isVue"),$l=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Nn)),Il=Mp();function Mp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=he(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(he)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){nn(),wi();const r=he(this)[t].apply(this,n);return Ei(),rn(),r}}),e}function Up(e){Nn(e)||(e=String(e));const t=he(this);return ot(t,"has",e),t.hasOwnProperty(e)}class Dl{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?Zl:Hl:s?Bl:Fl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ie(t);if(!o){if(i&&Ne(Il,n))return Reflect.get(Il,n,r);if(n==="hasOwnProperty")return Up}const a=Reflect.get(t,n,r);return(Nn(n)?$l.has(n):Lp(n))||(o||ot(t,"get",n),s)?a:Be(a)?i&&mi(n)?a:a.value:Ce(a)?o?ql(a):ro(a):a}}class Al extends Dl{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const u=sn(s);if(!an(r)&&!sn(r)&&(s=he(s),r=he(r)),!ie(t)&&Be(s)&&!Be(r))return u?!1:(s.value=r,!0)}const i=ie(t)&&mi(n)?Number(n)<t.length:Ne(t,n),a=Reflect.set(t,n,r,o);return t===he(o)&&(i?Sn(r,s)&&Ht(t,"set",n,r,s):Ht(t,"add",n,r)),a}deleteProperty(t,n){const r=Ne(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Ht(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Nn(n)||!$l.has(n))&&ot(t,"has",n),r}ownKeys(t){return ot(t,"iterate",ie(t)?"length":Qn),Reflect.ownKeys(t)}}class Vl extends Dl{constructor(t=!1){super(!0,t)}set(t,n){return ze.NODE_ENV!=="production"&&Bt(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return ze.NODE_ENV!=="production"&&Bt(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Fp=new Al,Bp=new Vl,Hp=new Al(!0),Zp=new Vl(!0),Si=e=>e,ns=e=>Reflect.getPrototypeOf(e);function rs(e,t,n=!1,r=!1){e=e.__v_raw;const o=he(e),s=he(t);n||(Sn(t,s)&&ot(o,"get",t),ot(o,"get",s));const{has:i}=ns(o),a=r?Si:n?xi:oo;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 os(e,t=!1){const n=this.__v_raw,r=he(n),o=he(e);return t||(Sn(e,o)&&ot(r,"has",e),ot(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ss(e,t=!1){return e=e.__v_raw,!t&&ot(he(e),"iterate",Qn),Reflect.get(e,"size",e)}function Rl(e,t=!1){!t&&!an(e)&&!sn(e)&&(e=he(e));const n=he(this);return ns(n).has.call(n,e)||(n.add(e),Ht(n,"add",e,e)),this}function jl(e,t,n=!1){!n&&!an(t)&&!sn(t)&&(t=he(t));const r=he(this),{has:o,get:s}=ns(r);let i=o.call(r,e);i?ze.NODE_ENV!=="production"&&Ul(r,o,e):(e=he(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Sn(t,a)&&Ht(r,"set",e,t,a):Ht(r,"add",e,t),this}function Ll(e){const t=he(this),{has:n,get:r}=ns(t);let o=n.call(t,e);o?ze.NODE_ENV!=="production"&&Ul(t,n,e):(e=he(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Ht(t,"delete",e,void 0,s),i}function Ml(){const e=he(this),t=e.size!==0,n=ze.NODE_ENV!=="production"?Gn(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Ht(e,"clear",void 0,void 0,n),r}function is(e,t){return function(r,o){const s=this,i=s.__v_raw,a=he(i),u=t?Si:e?xi:oo;return!e&&ot(a,"iterate",Qn),i.forEach((l,c)=>r.call(o,u(l),u(c),s))}}function as(e,t,n){return function(...r){const o=this.__v_raw,s=he(o),i=Gn(s),a=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,l=o[e](...r),c=n?Si:t?xi:oo;return!t&&ot(s,"iterate",u?Ni:Qn),{next(){const{value:d,done:f}=l.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Tn(e){return function(...t){if(ze.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Bt(`${Jn(e)} operation ${n}failed: target is readonly.`,he(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function qp(){const e={get(s){return rs(this,s)},get size(){return ss(this)},has:os,add:Rl,set:jl,delete:Ll,clear:Ml,forEach:is(!1,!1)},t={get(s){return rs(this,s,!1,!0)},get size(){return ss(this)},has:os,add(s){return Rl.call(this,s,!0)},set(s,i){return jl.call(this,s,i,!0)},delete:Ll,clear:Ml,forEach:is(!1,!0)},n={get(s){return rs(this,s,!0)},get size(){return ss(this,!0)},has(s){return os.call(this,s,!0)},add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear"),forEach:is(!0,!1)},r={get(s){return rs(this,s,!0,!0)},get size(){return ss(this,!0)},has(s){return os.call(this,s,!0)},add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear"),forEach:is(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=as(s,!1,!1),n[s]=as(s,!0,!1),t[s]=as(s,!1,!0),r[s]=as(s,!0,!0)}),[e,n,t,r]}const[Wp,zp,Kp,Gp]=qp();function ls(e,t){const n=t?e?Gp:Kp:e?zp:Wp;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 Jp={get:ls(!1,!1)},Yp={get:ls(!1,!0)},Xp={get:ls(!0,!1)},Qp={get:ls(!0,!0)};function Ul(e,t,n){const r=he(n);if(r!==n&&t.call(e,r)){const o=hi(e);Bt(`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 Fl=new WeakMap,Bl=new WeakMap,Hl=new WeakMap,Zl=new WeakMap;function eh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function th(e){return e.__v_skip||!Object.isExtensible(e)?0:eh(hi(e))}function ro(e){return sn(e)?e:us(e,!1,Fp,Jp,Fl)}function nh(e){return us(e,!1,Hp,Yp,Bl)}function ql(e){return us(e,!0,Bp,Xp,Hl)}function Zt(e){return us(e,!0,Zp,Qp,Zl)}function us(e,t,n,r,o){if(!Ce(e))return ze.NODE_ENV!=="production"&&Bt(`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=th(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function on(e){return sn(e)?on(e.__v_raw):!!(e&&e.__v_isReactive)}function sn(e){return!!(e&&e.__v_isReadonly)}function an(e){return!!(e&&e.__v_isShallow)}function cs(e){return e?!!e.__v_raw:!1}function he(e){const t=e&&e.__v_raw;return t?he(t):e}function Cn(e){return Object.isExtensible(e)&&Qo(e,"__v_skip",!0),e}const oo=e=>Ce(e)?ro(e):e,xi=e=>Ce(e)?ql(e):e,rh="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 Wl{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 _i(()=>t(this._value),()=>ds(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=he(this);return(!t._cacheable||t.effect.dirty)&&Sn(t._value,t._value=t.effect.run())&&ds(t,4),zl(t),t.effect._dirtyLevel>=2&&(ze.NODE_ENV!=="production"&&this._warnRecursive&&Bt(rh,`
6
+ **//*! #__NO_SIDE_EFFECTS__ */function en(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const Re=pl.NODE_ENV!=="production"?Object.freeze({}):{},kr=pl.NODE_ENV!=="production"?Object.freeze([]):[],We=()=>{},vp=()=>!1,eo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Jo=e=>e.startsWith("onUpdate:"),qe=Object.assign,pi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},gp=Object.prototype.hasOwnProperty,Ne=(e,t)=>gp.call(e,t),ie=Array.isArray,Gn=e=>Yo(e)==="[object Map]",hl=e=>Yo(e)==="[object Set]",fe=e=>typeof e=="function",Ue=e=>typeof e=="string",Nn=e=>typeof e=="symbol",ke=e=>e!==null&&typeof e=="object",hi=e=>(ke(e)||fe(e))&&fe(e.then)&&fe(e.catch),ml=Object.prototype.toString,Yo=e=>ml.call(e),mi=e=>Yo(e).slice(8,-1),vl=e=>Yo(e)==="[object Object]",vi=e=>Ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,to=en(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yp=en("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Xo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},_p=/-(\w)/g,Et=Xo(e=>e.replace(_p,(t,n)=>n?n.toUpperCase():"")),bp=/\B([A-Z])/g,tn=Xo(e=>e.replace(bp,"-$1").toLowerCase()),Jn=Xo(e=>e.charAt(0).toUpperCase()+e.slice(1)),Yn=Xo(e=>e?`on${Jn(e)}`:""),Sn=(e,t)=>!Object.is(e,t),no=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qo=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},wp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ep=e=>{const t=Ue(e)?Number(e):NaN;return isNaN(t)?e:t};let gl;const gi=()=>gl||(gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ue(r)?xp(r):yi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ue(e)||ke(e))return e}const Op=/;(?![^(]*\))/g,Np=/:([^]+)/,Sp=/\/\*[^]*?\*\//g;function xp(e){const t={};return e.replace(Sp,"").split(Op).forEach(n=>{if(n){const r=n.split(Np);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function es(e){let t="";if(Ue(e))t=e;else if(ie(e))for(let n=0;n<e.length;n++){const r=es(e[n]);r&&(t+=r+" ")}else if(ke(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Tp="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",Cp="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",kp="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",Pp=en(Tp),$p=en(Cp),Ip=en(kp),Dp=en("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function yl(e){return!!e||e===""}const _l=e=>!!(e&&e.__v_isRef===!0),re=e=>Ue(e)?e:e==null?"":ie(e)||ke(e)&&(e.toString===ml||!fe(e.toString))?_l(e)?re(e.value):JSON.stringify(e,bl,2):String(e),bl=(e,t)=>_l(t)?bl(e,t.value):Gn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[_i(r,s)+" =>"]=o,n),{})}:hl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>_i(n))}:Nn(t)?_i(t):ke(t)&&!ie(t)&&!vl(t)?String(t):t,_i=(e,t="")=>{var n;return Nn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var ze={};function Bt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ot;class wl{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"&&Bt("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 El(e){return new wl(e)}function Ap(e,t=Ot){t&&t.active&&t.effects.push(e)}function Ol(){return Ot}function Vp(e){Ot?Ot.cleanups.push(e):ze.NODE_ENV!=="production"&&Bt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Xn;class bi{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,Ap(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,nn();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Rp(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),rn()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=xn,n=Xn;try{return xn=!0,Xn=this,this._runnings++,Nl(this),this.fn()}finally{Sl(this),this._runnings--,Xn=n,xn=t}}stop(){this.active&&(Nl(this),Sl(this),this.onStop&&this.onStop(),this.active=!1)}}function Rp(e){return e.value}function Nl(e){e._trackId++,e._depsLength=0}function Sl(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)xl(e.deps[t],e);e.deps.length=e._depsLength}}function xl(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let xn=!0,wi=0;const Tl=[];function nn(){Tl.push(xn),xn=!1}function rn(){const e=Tl.pop();xn=e===void 0?!0:e}function Ei(){wi++}function Oi(){for(wi--;!wi&&Ni.length;)Ni.shift()()}function Cl(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&&xl(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 Ni=[];function kl(e,t,n){var r;Ei();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&&Ni.push(o.scheduler)))}Oi()}const Pl=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},ts=new WeakMap,Qn=Symbol(ze.NODE_ENV!=="production"?"iterate":""),Si=Symbol(ze.NODE_ENV!=="production"?"Map key iterate":"");function ot(e,t,n){if(xn&&Xn){let r=ts.get(e);r||ts.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Pl(()=>r.delete(n))),Cl(Xn,o,ze.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function Ht(e,t,n,r,o,s){const i=ts.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((u,c)=>{(c==="length"||!Nn(c)&&c>=l)&&a.push(u)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":ie(e)?vi(n)&&a.push(i.get("length")):(a.push(i.get(Qn)),Gn(e)&&a.push(i.get(Si)));break;case"delete":ie(e)||(a.push(i.get(Qn)),Gn(e)&&a.push(i.get(Si)));break;case"set":Gn(e)&&a.push(i.get(Qn));break}Ei();for(const l of a)l&&kl(l,4,ze.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0);Oi()}function jp(e,t){const n=ts.get(e);return n&&n.get(t)}const Lp=en("__proto__,__v_isRef,__isVue"),$l=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Nn)),Il=Mp();function Mp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=he(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(he)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){nn(),Ei();const r=he(this)[t].apply(this,n);return Oi(),rn(),r}}),e}function Up(e){Nn(e)||(e=String(e));const t=he(this);return ot(t,"has",e),t.hasOwnProperty(e)}class Dl{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?Zl:Hl:s?Bl:Fl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ie(t);if(!o){if(i&&Ne(Il,n))return Reflect.get(Il,n,r);if(n==="hasOwnProperty")return Up}const a=Reflect.get(t,n,r);return(Nn(n)?$l.has(n):Lp(n))||(o||ot(t,"get",n),s)?a:Be(a)?i&&vi(n)?a:a.value:ke(a)?o?ql(a):ro(a):a}}class Al extends Dl{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=sn(s);if(!an(r)&&!sn(r)&&(s=he(s),r=he(r)),!ie(t)&&Be(s)&&!Be(r))return l?!1:(s.value=r,!0)}const i=ie(t)&&vi(n)?Number(n)<t.length:Ne(t,n),a=Reflect.set(t,n,r,o);return t===he(o)&&(i?Sn(r,s)&&Ht(t,"set",n,r,s):Ht(t,"add",n,r)),a}deleteProperty(t,n){const r=Ne(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Ht(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Nn(n)||!$l.has(n))&&ot(t,"has",n),r}ownKeys(t){return ot(t,"iterate",ie(t)?"length":Qn),Reflect.ownKeys(t)}}class Vl extends Dl{constructor(t=!1){super(!0,t)}set(t,n){return ze.NODE_ENV!=="production"&&Bt(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return ze.NODE_ENV!=="production"&&Bt(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Fp=new Al,Bp=new Vl,Hp=new Al(!0),Zp=new Vl(!0),xi=e=>e,ns=e=>Reflect.getPrototypeOf(e);function rs(e,t,n=!1,r=!1){e=e.__v_raw;const o=he(e),s=he(t);n||(Sn(t,s)&&ot(o,"get",t),ot(o,"get",s));const{has:i}=ns(o),a=r?xi:n?Ti:oo;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 os(e,t=!1){const n=this.__v_raw,r=he(n),o=he(e);return t||(Sn(e,o)&&ot(r,"has",e),ot(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ss(e,t=!1){return e=e.__v_raw,!t&&ot(he(e),"iterate",Qn),Reflect.get(e,"size",e)}function Rl(e,t=!1){!t&&!an(e)&&!sn(e)&&(e=he(e));const n=he(this);return ns(n).has.call(n,e)||(n.add(e),Ht(n,"add",e,e)),this}function jl(e,t,n=!1){!n&&!an(t)&&!sn(t)&&(t=he(t));const r=he(this),{has:o,get:s}=ns(r);let i=o.call(r,e);i?ze.NODE_ENV!=="production"&&Ul(r,o,e):(e=he(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Sn(t,a)&&Ht(r,"set",e,t,a):Ht(r,"add",e,t),this}function Ll(e){const t=he(this),{has:n,get:r}=ns(t);let o=n.call(t,e);o?ze.NODE_ENV!=="production"&&Ul(t,n,e):(e=he(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Ht(t,"delete",e,void 0,s),i}function Ml(){const e=he(this),t=e.size!==0,n=ze.NODE_ENV!=="production"?Gn(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Ht(e,"clear",void 0,void 0,n),r}function is(e,t){return function(r,o){const s=this,i=s.__v_raw,a=he(i),l=t?xi:e?Ti:oo;return!e&&ot(a,"iterate",Qn),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function as(e,t,n){return function(...r){const o=this.__v_raw,s=he(o),i=Gn(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?xi:t?Ti:oo;return!t&&ot(s,"iterate",l?Si:Qn),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Tn(e){return function(...t){if(ze.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Bt(`${Jn(e)} operation ${n}failed: target is readonly.`,he(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function qp(){const e={get(s){return rs(this,s)},get size(){return ss(this)},has:os,add:Rl,set:jl,delete:Ll,clear:Ml,forEach:is(!1,!1)},t={get(s){return rs(this,s,!1,!0)},get size(){return ss(this)},has:os,add(s){return Rl.call(this,s,!0)},set(s,i){return jl.call(this,s,i,!0)},delete:Ll,clear:Ml,forEach:is(!1,!0)},n={get(s){return rs(this,s,!0)},get size(){return ss(this,!0)},has(s){return os.call(this,s,!0)},add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear"),forEach:is(!0,!1)},r={get(s){return rs(this,s,!0,!0)},get size(){return ss(this,!0)},has(s){return os.call(this,s,!0)},add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear"),forEach:is(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=as(s,!1,!1),n[s]=as(s,!0,!1),t[s]=as(s,!1,!0),r[s]=as(s,!0,!0)}),[e,n,t,r]}const[Wp,zp,Kp,Gp]=qp();function ls(e,t){const n=t?e?Gp:Kp:e?zp:Wp;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 Jp={get:ls(!1,!1)},Yp={get:ls(!1,!0)},Xp={get:ls(!0,!1)},Qp={get:ls(!0,!0)};function Ul(e,t,n){const r=he(n);if(r!==n&&t.call(e,r)){const o=mi(e);Bt(`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 Fl=new WeakMap,Bl=new WeakMap,Hl=new WeakMap,Zl=new WeakMap;function eh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function th(e){return e.__v_skip||!Object.isExtensible(e)?0:eh(mi(e))}function ro(e){return sn(e)?e:us(e,!1,Fp,Jp,Fl)}function nh(e){return us(e,!1,Hp,Yp,Bl)}function ql(e){return us(e,!0,Bp,Xp,Hl)}function Zt(e){return us(e,!0,Zp,Qp,Zl)}function us(e,t,n,r,o){if(!ke(e))return ze.NODE_ENV!=="production"&&Bt(`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=th(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function on(e){return sn(e)?on(e.__v_raw):!!(e&&e.__v_isReactive)}function sn(e){return!!(e&&e.__v_isReadonly)}function an(e){return!!(e&&e.__v_isShallow)}function cs(e){return e?!!e.__v_raw:!1}function he(e){const t=e&&e.__v_raw;return t?he(t):e}function Cn(e){return Object.isExtensible(e)&&Qo(e,"__v_skip",!0),e}const oo=e=>ke(e)?ro(e):e,Ti=e=>ke(e)?ql(e):e,rh="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 Wl{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 bi(()=>t(this._value),()=>ds(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=he(this);return(!t._cacheable||t.effect.dirty)&&Sn(t._value,t._value=t.effect.run())&&ds(t,4),zl(t),t.effect._dirtyLevel>=2&&(ze.NODE_ENV!=="production"&&this._warnRecursive&&Bt(rh,`
7
7
 
8
- getter: `,this.getter),ds(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function oh(e,t,n=!1){let r,o;const s=fe(e);s?(r=e,o=ze.NODE_ENV!=="production"?()=>{Bt("Write operation failed: computed value is readonly")}:We):(r=e.get,o=e.set);const i=new Wl(r,o,s||!o,n);return ze.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function zl(e){var t;xn&&Xn&&(e=he(e),Cl(Xn,(t=e.dep)!=null?t:e.dep=Pl(()=>e.dep=void 0,e instanceof Wl?e:void 0),ze.NODE_ENV!=="production"?{target:e,type:"get",key:"value"}:void 0))}function ds(e,t=4,n,r){e=he(e);const o=e.dep;o&&kl(o,t,ze.NODE_ENV!=="production"?{target:e,type:"set",key:"value",newValue:n,oldValue:r}:void 0)}function Be(e){return!!(e&&e.__v_isRef===!0)}function $(e){return Kl(e,!1)}function sh(e){return Kl(e,!0)}function Kl(e,t){return Be(e)?e:new ih(e,t)}class ih{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:he(t),this._value=n?t:oo(t)}get value(){return zl(this),this._value}set value(t){const n=this.__v_isShallow||an(t)||sn(t);if(t=n?t:he(t),Sn(t,this._rawValue)){const r=this._rawValue;this._rawValue=t,this._value=n?t:oo(t),ds(this,4,t,r)}}}function b(e){return Be(e)?e.value:e}function ah(e){return fe(e)?e():b(e)}const lh={get:(e,t,n)=>b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Be(o)&&!Be(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Gl(e){return on(e)?e:new Proxy(e,lh)}function Jl(e){ze.NODE_ENV!=="production"&&!cs(e)&&Bt("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]=Yl(e,n);return t}class uh{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 jp(he(this._object),this._key)}}class ch{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ti(e,t,n){return Be(e)?e:fe(e)?new ch(e):Ce(e)&&arguments.length>1?Yl(e,t,n):$(e)}function Yl(e,t,n){const r=e[t];return Be(r)?r:new uh(e,t,n)}var v={};const er=[];function fs(e){er.push(e)}function ps(){er.pop()}let Ci=!1;function U(e,...t){if(Ci)return;Ci=!0,nn();const n=er.length?er[er.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=dh();if(r)ln(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 <${Is(n,s.type)}>`).join(`
8
+ getter: `,this.getter),ds(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function oh(e,t,n=!1){let r,o;const s=fe(e);s?(r=e,o=ze.NODE_ENV!=="production"?()=>{Bt("Write operation failed: computed value is readonly")}:We):(r=e.get,o=e.set);const i=new Wl(r,o,s||!o,n);return ze.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function zl(e){var t;xn&&Xn&&(e=he(e),Cl(Xn,(t=e.dep)!=null?t:e.dep=Pl(()=>e.dep=void 0,e instanceof Wl?e:void 0),ze.NODE_ENV!=="production"?{target:e,type:"get",key:"value"}:void 0))}function ds(e,t=4,n,r){e=he(e);const o=e.dep;o&&kl(o,t,ze.NODE_ENV!=="production"?{target:e,type:"set",key:"value",newValue:n,oldValue:r}:void 0)}function Be(e){return!!(e&&e.__v_isRef===!0)}function $(e){return Kl(e,!1)}function sh(e){return Kl(e,!0)}function Kl(e,t){return Be(e)?e:new ih(e,t)}class ih{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:he(t),this._value=n?t:oo(t)}get value(){return zl(this),this._value}set value(t){const n=this.__v_isShallow||an(t)||sn(t);if(t=n?t:he(t),Sn(t,this._rawValue)){const r=this._rawValue;this._rawValue=t,this._value=n?t:oo(t),ds(this,4,t,r)}}}function b(e){return Be(e)?e.value:e}function ah(e){return fe(e)?e():b(e)}const lh={get:(e,t,n)=>b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Be(o)&&!Be(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Gl(e){return on(e)?e:new Proxy(e,lh)}function Jl(e){ze.NODE_ENV!=="production"&&!cs(e)&&Bt("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]=Yl(e,n);return t}class uh{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 jp(he(this._object),this._key)}}class ch{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ci(e,t,n){return Be(e)?e:fe(e)?new ch(e):ke(e)&&arguments.length>1?Yl(e,t,n):$(e)}function Yl(e,t,n){const r=e[t];return Be(r)?r:new uh(e,t,n)}var g={};const er=[];function fs(e){er.push(e)}function ps(){er.pop()}let ki=!1;function U(e,...t){if(ki)return;ki=!0,nn();const n=er.length?er[er.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=dh();if(r)ln(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 <${Is(n,s.type)}>`).join(`
9
9
  `),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
10
- `,...fh(o)),console.warn(...s)}rn(),Ci=!1}function dh(){let e=er[er.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 fh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
11
- `],...ph(n))}),t}function ph({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Is(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...hh(e.props),s]:[o+s]}function hh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Xl(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Xl(e,t,n){return Ue(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Be(t)?(t=Xl(e,he(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=he(t),n?t:[`${e}=`,t])}function mh(e,t){v.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 ki={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 ln(e,t,n,r){try{return r?e(...r):e()}catch(o){so(o,t,n)}}function xt(e,t,n,r){if(fe(e)){const o=ln(e,t,n,r);return o&&pi(o)&&o.catch(s=>{so(s,t,n)}),o}if(ie(e)){const o=[];for(let s=0;s<e.length;s++)o.push(xt(e[s],t,n,r));return o}else v.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function so(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,a=v.NODE_ENV!=="production"?ki[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const l=s.ec;if(l){for(let c=0;c<l.length;c++)if(l[c](e,i,a)===!1)return}s=s.parent}const u=t.appContext.config.errorHandler;if(u){nn(),ln(u,null,10,[e,i,a]),rn();return}}vh(e,n,o,r)}function vh(e,t,n,r=!0){if(v.NODE_ENV!=="production"){const o=ki[t];if(n&&fs(n),U(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ps(),r)throw e;console.error(e)}else console.error(e)}let io=!1,Pi=!1;const ct=[];let qt=0;const kr=[];let kn=null,tr=0;const Ql=Promise.resolve();let $i=null;const gh=100;function ao(e){const t=$i||Ql;return e?t.then(this?e.bind(this):e):t}function yh(e){let t=qt+1,n=ct.length;for(;t<n;){const r=t+n>>>1,o=ct[r],s=lo(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}function hs(e){(!ct.length||!ct.includes(e,io&&e.allowRecurse?qt+1:qt))&&(e.id==null?ct.push(e):ct.splice(yh(e.id),0,e),eu())}function eu(){!io&&!Pi&&(Pi=!0,$i=Ql.then(ou))}function _h(e){const t=ct.indexOf(e);t>qt&&ct.splice(t,1)}function tu(e){ie(e)?kr.push(...e):(!kn||!kn.includes(e,e.allowRecurse?tr+1:tr))&&kr.push(e),eu()}function nu(e,t,n=io?qt+1:0){for(v.NODE_ENV!=="production"&&(t=t||new Map);n<ct.length;n++){const r=ct[n];if(r&&r.pre){if(e&&r.id!==e.uid||v.NODE_ENV!=="production"&&Ii(t,r))continue;ct.splice(n,1),n--,r()}}}function ru(e){if(kr.length){const t=[...new Set(kr)].sort((n,r)=>lo(n)-lo(r));if(kr.length=0,kn){kn.push(...t);return}for(kn=t,v.NODE_ENV!=="production"&&(e=e||new Map),tr=0;tr<kn.length;tr++){const n=kn[tr];v.NODE_ENV!=="production"&&Ii(e,n)||n.active!==!1&&n()}kn=null,tr=0}}const lo=e=>e.id==null?1/0:e.id,bh=(e,t)=>{const n=lo(e)-lo(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ou(e){Pi=!1,io=!0,v.NODE_ENV!=="production"&&(e=e||new Map),ct.sort(bh);const t=v.NODE_ENV!=="production"?n=>Ii(e,n):We;try{for(qt=0;qt<ct.length;qt++){const n=ct[qt];if(n&&n.active!==!1){if(v.NODE_ENV!=="production"&&t(n))continue;ln(n,n.i,n.i?15:14)}}}finally{qt=0,ct.length=0,ru(e),io=!1,$i=null,(ct.length||kr.length)&&ou(e)}}function Ii(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>gh){const r=t.i,o=r&&la(r.type);return so(`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 Pn=!1;const ms=new Map;v.NODE_ENV!=="production"&&(vi().__VUE_HMR_RUNTIME__={createRecord:Di(su),rerender:Di(Oh),reload:Di(Nh)});const nr=new Map;function wh(e){const t=e.type.__hmrId;let n=nr.get(t);n||(su(t,e.type),n=nr.get(t)),n.instances.add(e)}function Eh(e){nr.get(e.type.__hmrId).instances.delete(e)}function su(e,t){return nr.has(e)?!1:(nr.set(e,{initialDef:vs(t),instances:new Set}),!0)}function vs(e){return cc(e)?e.__vccOpts:e}function Oh(e,t){const n=nr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,vs(r.type).render=t),r.renderCache=[],Pn=!0,r.effect.dirty=!0,r.update(),Pn=!1}))}function Nh(e,t){const n=nr.get(e);if(!n)return;t=vs(t),iu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=vs(s.type);let a=ms.get(i);a||(i!==n.initialDef&&iu(i,t),ms.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,hs(()=>{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.")}tu(()=>{ms.clear()})}function iu(e,t){qe(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Di(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 Wt,uo=[],Ai=!1;function co(e,...t){Wt?Wt.emit(e,...t):Ai||uo.push({event:e,args:t})}function au(e,t){var n,r;Wt=e,Wt?(Wt.enabled=!0,uo.forEach(({event:o,args:s})=>Wt.emit(o,...s)),uo=[]):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=>{au(s,t)}),setTimeout(()=>{Wt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ai=!0,uo=[])},3e3)):(Ai=!0,uo=[])}function Sh(e,t){co("app:init",e,t,{Fragment:Pe,Text:go,Comment:Ke,Static:yo})}function xh(e){co("app:unmount",e)}const Th=Vi("component:added"),lu=Vi("component:updated"),Ch=Vi("component:removed"),kh=e=>{Wt&&typeof Wt.cleanupBuffer=="function"&&!Wt.cleanupBuffer(e)&&Ch(e)};/*! #__NO_SIDE_EFFECTS__ */function Vi(e){return t=>{co(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Ph=uu("perf:start"),$h=uu("perf:end");function uu(e){return(t,n,r)=>{co(e,t.appContext.app,t.uid,t,n,r)}}function Ih(e,t,n){co("component:emit",e.appContext.app,e,t,n)}let Ye=null,gs=null;function ys(e){const t=Ye;return Ye=e,gs=e&&e.type.__scopeId||null,t}function Dh(e){gs=e}function Ah(){gs=null}function be(e,t=Ye,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ec(-1);const s=ys(t);let i;try{i=e(...o)}finally{ys(s),r._d&&ec(1)}return v.NODE_ENV!=="production"&&lu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function cu(e){yp(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function rr(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 u=a.dir[r];u&&(nn(),xt(u,n,8,[e.el,a,e,t]),rn())}}const $n=Symbol("_leaveCb"),_s=Symbol("_enterCb");function Vh(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ve(()=>{e.isMounted=!0}),Li(()=>{e.isUnmounting=!0}),e}const Tt=[Function,Array],du={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Tt,onEnter:Tt,onAfterEnter:Tt,onEnterCancelled:Tt,onBeforeLeave:Tt,onLeave:Tt,onAfterLeave:Tt,onLeaveCancelled:Tt,onBeforeAppear:Tt,onAppear:Tt,onAfterAppear:Tt,onAppearCancelled:Tt},fu=e=>{const t=e.subTree;return t.component?fu(t.component):t},Rh={name:"BaseTransition",props:du,setup(e,{slots:t}){const n=ks(),r=Vh();return()=>{const o=t.default&&mu(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){let f=!1;for(const g of o)if(g.type!==Ke){if(v.NODE_ENV!=="production"&&f){U("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(s=g,f=!0,v.NODE_ENV==="production")break}}const i=he(e),{mode:a}=i;if(v.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&U(`invalid <transition> mode: ${a}`),r.isLeaving)return ji(s);const u=hu(s);if(!u)return ji(s);let l=Ri(u,i,r,n,f=>l=f);bs(u,l);const c=n.subTree,d=c&&hu(c);if(d&&d.type!==Ke&&!ur(u,d)&&fu(n).type!==Ke){const f=Ri(d,i,r,n);if(bs(d,f),a==="out-in"&&u.type!==Ke)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ji(s);a==="in-out"&&u.type!==Ke&&(f.delayLeave=(g,m,w)=>{const S=pu(r,d);S[String(d.key)]=d,g[$n]=()=>{m(),g[$n]=void 0,delete l.delayedLeave},l.delayedLeave=w})}return s}}};function pu(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 Ri(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:u,onEnter:l,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:g,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:S,onAppear:L,onAfterAppear:F,onAppearCancelled:T}=t,K=String(e.key),C=pu(n,e),H=(J,D)=>{J&&xt(J,r,9,D)},E=(J,D)=>{const x=D[1];H(J,D),ie(J)?J.every(R=>R.length<=1)&&x():J.length<=1&&x()},de={mode:i,persisted:a,beforeEnter(J){let D=u;if(!n.isMounted)if(s)D=S||u;else return;J[$n]&&J[$n](!0);const x=C[K];x&&ur(e,x)&&x.el[$n]&&x.el[$n](),H(D,[J])},enter(J){let D=l,x=c,R=d;if(!n.isMounted)if(s)D=L||l,x=F||c,R=T||d;else return;let oe=!1;const _=J[_s]=k=>{oe||(oe=!0,k?H(R,[J]):H(x,[J]),de.delayedLeave&&de.delayedLeave(),J[_s]=void 0)};D?E(D,[J,_]):_()},leave(J,D){const x=String(e.key);if(J[_s]&&J[_s](!0),n.isUnmounting)return D();H(f,[J]);let R=!1;const oe=J[$n]=_=>{R||(R=!0,D(),_?H(w,[J]):H(m,[J]),J[$n]=void 0,C[x]===e&&delete C[x])};C[x]=e,g?E(g,[J,oe]):oe()},clone(J){const D=Ri(J,t,n,r,o);return o&&o(D),D}};return de}function ji(e){if(po(e))return e=At(e),e.children=null,e}function hu(e){if(!po(e))return e;if(v.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 bs(e,t){e.shapeFlag&6&&e.component?bs(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 mu(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===Pe?(i.patchFlag&128&&o++,r=r.concat(mu(i.children,t,a))):(t||i.type!==Ke)&&r.push(a!=null?At(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 me(e,t){return fe(e)?qe({name:e.name},t,{setup:e}):e}const fo=e=>!!e.type.__asyncLoader,po=e=>e.type.__isKeepAlive;function jh(e,t){vu(e,"a",t)}function Lh(e,t){vu(e,"da",t)}function vu(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(ws(t,r,n),n){let o=n.parent;for(;o&&o.parent;)po(o.parent.vnode)&&Mh(r,t,n,o),o=o.parent}}function Mh(e,t,n,r){const o=ws(t,e,r,!0);mt(()=>{fi(r[t],o)},n)}function ws(e,t,n=Ge,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{nn();const a=wo(n),u=xt(t,n,e,i);return a(),rn(),u});return r?o.unshift(s):o.push(s),s}else if(v.NODE_ENV!=="production"){const o=Yn(ki[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 un=e=>(t,n=Ge)=>{(!$s||e==="sp")&&ws(e,(...r)=>t(...r),n)},Uh=un("bm"),Ve=un("m"),Fh=un("bu"),Bh=un("u"),Li=un("bum"),mt=un("um"),Hh=un("sp"),Zh=un("rtg"),qh=un("rtc");function Wh(e,t=Ge){ws("ec",e,t)}const gu="components";function zh(e,t){return bu(gu,e,!0,t)||e}const yu=Symbol.for("v-ndc");function _u(e){return Ue(e)?bu(gu,e,!1)||e:e||yu}function bu(e,t,n=!0,r=!1){const o=Ye||Ge;if(o){const s=o.type;{const a=la(s,!1);if(a&&(a===t||a===Et(t)||a===Jn(Et(t))))return s}const i=wu(o[e]||s[e],t)||wu(o.appContext[e],t);return!i&&r?s:(v.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 v.NODE_ENV!=="production"&&U(`resolve${Jn(e.slice(0,-1))} can only be used in render() or setup().`)}function wu(e,t){return e&&(e[t]||e[Et(t)]||e[Jn(Et(t))])}function Pr(e,t,n,r){let o;const s=n;if(ie(e)||Ue(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"){v.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(Ce(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,u=i.length;a<u;a++){const l=i[a];o[a]=t(e[l],l,a,s)}}else o=[];return o}function Mi(e,t,n={},r,o){if(Ye.isCE||Ye.parent&&fo(Ye.parent)&&Ye.parent.isCE)return q("slot",n,r);let s=e[t];v.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),N();const i=s&&Eu(s(n)),a=$e(Pe,{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 Eu(e){return e.some(t=>$r(t)?!(t.type===Ke||t.type===Pe&&!Eu(t.children)):!0)?e:null}const Ui=e=>e?ic(e)?aa(e):Ui(e.parent):null,or=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>v.NODE_ENV!=="production"?Zt(e.props):e.props,$attrs:e=>v.NODE_ENV!=="production"?Zt(e.attrs):e.attrs,$slots:e=>v.NODE_ENV!=="production"?Zt(e.slots):e.slots,$refs:e=>v.NODE_ENV!=="production"?Zt(e.refs):e.refs,$parent:e=>Ui(e.parent),$root:e=>Ui(e.root),$emit:e=>e.emit,$options:e=>Zi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,hs(e.update)}),$nextTick:e=>e.n||(e.n=ao.bind(e.proxy)),$watch:e=>Pm.bind(e)}),Fi=e=>e==="_"||e==="$",Bi=(e,t)=>e!==Re&&!e.__isScriptSetup&&Ne(e,t),Ou={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:u}=e;if(v.NODE_ENV!=="production"&&t==="__isVue")return!0;let l;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(Bi(r,t))return i[t]=1,r[t];if(o!==Re&&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!==Re&&Ne(n,t))return i[t]=4,n[t];Hi&&(i[t]=0)}}const c=or[t];let d,f;if(c)return t==="$attrs"?(ot(e.attrs,"get",""),v.NODE_ENV!=="production"&&Ts()):v.NODE_ENV!=="production"&&t==="$slots"&&ot(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Re&&Ne(n,t))return i[t]=4,n[t];if(f=u.config.globalProperties,Ne(f,t))return f[t];v.NODE_ENV!=="production"&&Ye&&(!Ue(t)||t.indexOf("__v")!==0)&&(o!==Re&&Fi(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 Bi(o,t)?(o[t]=n,!0):v.NODE_ENV!=="production"&&o.__isScriptSetup&&Ne(o,t)?(U(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Re&&Ne(r,t)?(r[t]=n,!0):Ne(e.props,t)?(v.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(v.NODE_ENV!=="production"&&U(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(v.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!==Re&&Ne(e,i)||Bi(t,i)||(a=s[0])&&Ne(a,i)||Ne(r,i)||Ne(or,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)}};v.NODE_ENV!=="production"&&(Ou.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 Kh(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(or).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>or[n](e),set:We})}),t}function Gh(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 Jh(e){const{ctx:t,setupState:n}=e;Object.keys(he(n)).forEach(r=>{if(!n.__isScriptSetup){if(Fi(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 Nu(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Yh(){const e=Object.create(null);return(t,n)=>{e[n]?U(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Hi=!0;function Xh(e){const t=Zi(e),n=e.proxy,r=e.ctx;Hi=!1,t.beforeCreate&&Su(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:u,inject:l,created:c,beforeMount:d,mounted:f,beforeUpdate:g,updated:m,activated:w,deactivated:S,beforeDestroy:L,beforeUnmount:F,destroyed:T,unmounted:K,render:C,renderTracked:H,renderTriggered:E,errorCaptured:de,serverPrefetch:J,expose:D,inheritAttrs:x,components:R,directives:oe,filters:_}=t,k=v.NODE_ENV!=="production"?Yh():null;if(v.NODE_ENV!=="production"){const[ae]=e.propsOptions;if(ae)for(const ne in ae)k("Props",ne)}if(l&&Qh(l,r,k),i)for(const ae in i){const ne=i[ae];fe(ne)?(v.NODE_ENV!=="production"?Object.defineProperty(r,ae,{value:ne.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[ae]=ne.bind(n),v.NODE_ENV!=="production"&&k("Methods",ae)):v.NODE_ENV!=="production"&&U(`Method "${ae}" has type "${typeof ne}" in the component definition. Did you reference the function correctly?`)}if(o){v.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(v.NODE_ENV!=="production"&&pi(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>."),!Ce(ae))v.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=ro(ae),v.NODE_ENV!=="production")for(const ne in ae)k("Data",ne),Fi(ne[0])||Object.defineProperty(r,ne,{configurable:!0,enumerable:!0,get:()=>ae[ne],set:We})}if(Hi=!0,s)for(const ae in s){const ne=s[ae],ue=fe(ne)?ne.bind(n,n):fe(ne.get)?ne.get.bind(n,n):We;v.NODE_ENV!=="production"&&ue===We&&U(`Computed property "${ae}" has no getter.`);const Te=!fe(ne)&&fe(ne.set)?ne.set.bind(n):v.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${ae}" is readonly.`)}:We,De=Y({get:ue,set:Te});Object.defineProperty(r,ae,{enumerable:!0,configurable:!0,get:()=>De.value,set:nt=>De.value=nt}),v.NODE_ENV!=="production"&&k("Computed",ae)}if(a)for(const ae in a)xu(a[ae],r,n,ae);if(u){const ae=fe(u)?u.call(n):u;Reflect.ownKeys(ae).forEach(ne=>{dt(ne,ae[ne])})}c&&Su(c,e,"c");function te(ae,ne){ie(ne)?ne.forEach(ue=>ae(ue.bind(n))):ne&&ae(ne.bind(n))}if(te(Uh,d),te(Ve,f),te(Fh,g),te(Bh,m),te(jh,w),te(Lh,S),te(Wh,de),te(qh,H),te(Zh,E),te(Li,F),te(mt,K),te(Hh,J),ie(D))if(D.length){const ae=e.exposed||(e.exposed={});D.forEach(ne=>{Object.defineProperty(ae,ne,{get:()=>n[ne],set:ue=>n[ne]=ue})})}else e.exposed||(e.exposed={});C&&e.render===We&&(e.render=C),x!=null&&(e.inheritAttrs=x),R&&(e.components=R),oe&&(e.directives=oe)}function Qh(e,t,n=We){ie(e)&&(e=qi(e));for(const r in e){const o=e[r];let s;Ce(o)?"default"in o?s=ke(o.from||r,o.default,!0):s=ke(o.from||r):s=ke(o),Be(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,v.NODE_ENV!=="production"&&n("Inject",r)}}function Su(e,t,n){xt(ie(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function xu(e,t,n,r){const o=r.includes(".")?Gu(n,r):()=>n[r];if(Ue(e)){const s=t[e];fe(s)?Xe(o,s):v.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e}"`,s)}else if(fe(e))Xe(o,e.bind(n));else if(Ce(e))if(ie(e))e.forEach(s=>xu(s,t,n,r));else{const s=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(s)?Xe(o,s,e):v.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e.handler}"`,s)}else v.NODE_ENV!=="production"&&U(`Invalid watch option: "${r}"`,e)}function Zi(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let u;return a?u=a:!o.length&&!n&&!r?u=t:(u={},o.length&&o.forEach(l=>Es(u,l,i,!0)),Es(u,t,i)),Ce(t)&&s.set(t,u),u}function Es(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Es(e,s,n,!0),o&&o.forEach(i=>Es(e,i,n,!0));for(const i in t)if(r&&i==="expose")v.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=em[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const em={data:Tu,props:Cu,emits:Cu,methods:ho,computed:ho,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:ho,directives:ho,watch:nm,provide:Tu,inject:tm};function Tu(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 tm(e,t){return ho(qi(e),qi(t))}function qi(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 ho(e,t){return e?qe(Object.create(null),e,t):t}function Cu(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:qe(Object.create(null),Nu(e),Nu(t??{})):t}function nm(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 ku(){return{app:null,config:{isNativeTag:vp,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 rm=0;function om(e,t){return function(r,o=null){fe(r)||(r=qe({},r)),o!=null&&!Ce(o)&&(v.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),o=null);const s=ku(),i=new WeakSet;let a=!1;const u=s.app={_uid:rm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:dc,get config(){return s.config},set config(l){v.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(l,...c){return i.has(l)?v.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):l&&fe(l.install)?(i.add(l),l.install(u,...c)):fe(l)?(i.add(l),l(u,...c)):v.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),u},mixin(l){return s.mixins.includes(l)?v.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(l.name?`: ${l.name}`:"")):s.mixins.push(l),u},component(l,c){return v.NODE_ENV!=="production"&&sa(l,s.config),c?(v.NODE_ENV!=="production"&&s.components[l]&&U(`Component "${l}" has already been registered in target app.`),s.components[l]=c,u):s.components[l]},directive(l,c){return v.NODE_ENV!=="production"&&cu(l),c?(v.NODE_ENV!=="production"&&s.directives[l]&&U(`Directive "${l}" has already been registered in target app.`),s.directives[l]=c,u):s.directives[l]},mount(l,c,d){if(a)v.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{v.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=q(r,o);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),v.NODE_ENV!=="production"&&(s.reload=()=>{e(At(f),l,d)}),c&&t?t(f,l):e(f,l,d),a=!0,u._container=l,l.__vue_app__=u,v.NODE_ENV!=="production"&&(u._instance=f.component,Sh(u,dc)),aa(f.component)}},unmount(){a?(e(null,u._container),v.NODE_ENV!=="production"&&(u._instance=null,xh(u)),delete u._container.__vue_app__):v.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(l,c){return v.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]=c,u},runWithContext(l){const c=sr;sr=u;try{return l()}finally{sr=c}}};return u}}let sr=null;function dt(e,t){if(!Ge)v.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 ke(e,t,n=!1){const r=Ge||Ye;if(r||sr){const o=sr?sr._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;v.NODE_ENV!=="production"&&U(`injection "${String(e)}" not found.`)}else v.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}function sm(){return!!(Ge||Ye||sr)}const Pu={},$u=()=>Object.create(Pu),Iu=e=>Object.getPrototypeOf(e)===Pu;function im(e,t,n,r=!1){const o={},s=$u();e.propsDefaults=Object.create(null),Du(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);v.NODE_ENV!=="production"&&Ru(t||{},o,e),n?e.props=r?o:nh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function am(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function lm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=he(o),[u]=e.propsOptions;let l=!1;if(!(v.NODE_ENV!=="production"&&am(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(xs(e.emitsOptions,f))continue;const g=t[f];if(u)if(Ne(s,f))g!==s[f]&&(s[f]=g,l=!0);else{const m=Et(f);o[m]=Wi(u,a,m,g,e,!1)}else g!==s[f]&&(s[f]=g,l=!0)}}}else{Du(e,t,o,s)&&(l=!0);let c;for(const d in a)(!t||!Ne(t,d)&&((c=tn(d))===d||!Ne(t,c)))&&(u?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=Wi(u,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&&Ht(e.attrs,"set",""),v.NODE_ENV!=="production"&&Ru(t||{},o,e)}function Du(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let u in t){if(to(u))continue;const l=t[u];let c;o&&Ne(o,c=Et(u))?!s||!s.includes(c)?n[c]=l:(a||(a={}))[c]=l:xs(e.emitsOptions,u)||(!(u in r)||l!==r[u])&&(r[u]=l,i=!0)}if(s){const u=he(n),l=a||Re;for(let c=0;c<s.length;c++){const d=s[c];n[d]=Wi(o,u,d,l[d],e,!Ne(l,d))}}return i}function Wi(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Ne(i,"default");if(a&&r===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&fe(u)){const{propsDefaults:l}=o;if(n in l)r=l[n];else{const c=wo(o);r=l[n]=u.call(null,t),c()}}else r=u}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===tn(n))&&(r=!0))}return r}const um=new WeakMap;function Au(e,t,n=!1){const r=n?um:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let u=!1;if(!fe(e)){const c=d=>{u=!0;const[f,g]=Au(d,t,!0);qe(i,f),g&&a.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!u)return Ce(e)&&r.set(e,Cr),Cr;if(ie(s))for(let c=0;c<s.length;c++){v.NODE_ENV!=="production"&&!Ue(s[c])&&U("props must be strings when using array syntax.",s[c]);const d=Et(s[c]);Vu(d)&&(i[d]=Re)}else if(s){v.NODE_ENV!=="production"&&!Ce(s)&&U("invalid props options",s);for(const c in s){const d=Et(c);if(Vu(d)){const f=s[c],g=i[d]=ie(f)||fe(f)?{type:f}:qe({},f),m=g.type;let w=!1,S=!0;if(ie(m))for(let L=0;L<m.length;++L){const F=m[L],T=fe(F)&&F.name;if(T==="Boolean"){w=!0;break}else T==="String"&&(S=!1)}else w=fe(m)&&m.name==="Boolean";g[0]=w,g[1]=S,(w||Ne(g,"default"))&&a.push(d)}}}const l=[i,a];return Ce(e)&&r.set(e,l),l}function Vu(e){return e[0]!=="$"&&!to(e)?!0:(v.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function cm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Ru(e,t,n){const r=he(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&dm(s,r[s],i,v.NODE_ENV!=="production"?Zt(r):r,!Ne(e,s)&&!Ne(e,tn(s)))}}function dm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:u}=n;if(i&&o){U('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!u){let l=!1;const c=ie(s)?s:[s],d=[];for(let f=0;f<c.length&&!l;f++){const{valid:g,expectedType:m}=pm(t,c[f]);d.push(m||""),l=g}if(!l){U(hm(e,t,d));return}}a&&!a(t,r)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const fm=en("String,Number,Boolean,Function,Symbol,BigInt");function pm(e,t){let n;const r=cm(t);if(fm(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ce(e):r==="Array"?n=ie(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function hm(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(Jn).join(" | ")}`;const o=n[0],s=hi(t),i=ju(t,o),a=ju(t,s);return n.length===1&&Lu(o)&&!mm(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Lu(s)&&(r+=`with value ${a}.`),r}function ju(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Lu(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function mm(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Mu=e=>e[0]==="_"||e==="$stable",zi=e=>ie(e)?e.map(Vt):[Vt(e)],vm=(e,t,n)=>{if(t._n)return t;const r=be((...o)=>(v.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.`),zi(t(...o))),n);return r._c=!1,r},Uu=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Mu(o))continue;const s=e[o];if(fe(s))t[o]=vm(o,s,r);else if(s!=null){v.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=zi(s);t[o]=()=>i}}},Fu=(e,t)=>{v.NODE_ENV!=="production"&&!po(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=zi(t);e.slots.default=()=>n},Ki=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},gm=(e,t,n)=>{const r=e.slots=$u();if(e.vnode.shapeFlag&32){const o=t._;o?(Ki(r,t,n),n&&Qo(r,"_",o,!0)):Uu(t,r)}else t&&Fu(e,t)},ym=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Re;if(r.shapeFlag&32){const a=t._;a?v.NODE_ENV!=="production"&&Pn?(Ki(o,t,n),Ht(e,"set","$slots")):n&&a===1?s=!1:Ki(o,t,n):(s=!t.$stable,Uu(t,o)),i=t}else t&&(Fu(e,t),i={default:1});if(s)for(const a in o)!Mu(a)&&i[a]==null&&delete o[a]};function Gi(e,t,n,r,o=!1){if(ie(e)){e.forEach((f,g)=>Gi(f,t&&(ie(t)?t[g]:t),n,r,o));return}if(fo(r)&&!o)return;const s=r.shapeFlag&4?aa(r.component):r.el,i=o?null:s,{i:a,r:u}=e;if(v.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,c=a.refs===Re?a.refs={}:a.refs,d=a.setupState;if(l!=null&&l!==u&&(Ue(l)?(c[l]=null,Ne(d,l)&&(d[l]=null)):Be(l)&&(l.value=null)),fe(u))ln(u,a,12,[i,c]);else{const f=Ue(u),g=Be(u);if(f||g){const m=()=>{if(e.f){const w=f?Ne(d,u)?d[u]:c[u]:u.value;o?ie(w)&&fi(w,s):ie(w)?w.includes(s)||w.push(s):f?(c[u]=[s],Ne(d,u)&&(d[u]=c[u])):(u.value=[s],e.k&&(c[e.k]=u.value))}else f?(c[u]=i,Ne(d,u)&&(d[u]=i)):g?(u.value=i,e.k&&(c[e.k]=i)):v.NODE_ENV!=="production"&&U("Invalid template ref type:",u,`(${typeof u})`)};i?(m.id=-1,yt(m,n)):m()}else v.NODE_ENV!=="production"&&U("Invalid template ref type:",u,`(${typeof u})`)}}const Bu=Symbol("_vte"),_m=e=>e.__isTeleport,ir=e=>e&&(e.disabled||e.disabled===""),Hu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Zu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ji=(e,t)=>{const n=e&&e.to;if(Ue(n))if(t){const r=t(n);return v.NODE_ENV!=="production"&&!r&&!ir(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 v.NODE_ENV!=="production"&&U("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return v.NODE_ENV!=="production"&&!n&&!ir(e)&&U(`Invalid Teleport target: ${n}`),n},bm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,u,l){const{mc:c,pc:d,pbc:f,o:{insert:g,querySelector:m,createText:w,createComment:S}}=l,L=ir(t.props);let{shapeFlag:F,children:T,dynamicChildren:K}=t;if(v.NODE_ENV!=="production"&&Pn&&(u=!1,K=null),e==null){const C=t.el=v.NODE_ENV!=="production"?S("teleport start"):w(""),H=t.anchor=v.NODE_ENV!=="production"?S("teleport end"):w("");g(C,n,r),g(H,n,r);const E=t.target=Ji(t.props,m),de=Wu(E,t,w,g);E?i==="svg"||Hu(E)?i="svg":(i==="mathml"||Zu(E))&&(i="mathml"):v.NODE_ENV!=="production"&&!L&&U("Invalid Teleport target on mount:",E,`(${typeof E})`);const J=(D,x)=>{F&16&&c(T,D,x,o,s,i,a,u)};L?J(n,H):E&&J(E,de)}else{t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,H=t.target=e.target,E=t.targetAnchor=e.targetAnchor,de=ir(e.props),J=de?n:H,D=de?C:E;if(i==="svg"||Hu(H)?i="svg":(i==="mathml"||Zu(H))&&(i="mathml"),K?(f(e.dynamicChildren,K,J,o,s,i,a),vo(e,t,!0)):u||d(e,t,J,D,o,s,i,a,!1),L)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Os(t,n,C,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const x=t.target=Ji(t.props,m);x?Os(t,x,null,l,0):v.NODE_ENV!=="production"&&U("Invalid Teleport target on update:",H,`(${typeof H})`)}else de&&Os(t,H,E,l,1)}qu(t)},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:u,targetStart:l,targetAnchor:c,target:d,props:f}=e;if(d&&(o(l),o(c)),s&&o(u),i&16){const g=s||!ir(f);for(let m=0;m<a.length;m++){const w=a[m];r(w,t,n,g,!!w.dynamicChildren)}}},move:Os,hydrate:wm};function Os(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:u,children:l,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||ir(c))&&u&16)for(let f=0;f<l.length;f++)o(l[f],t,n,2);d&&r(a,t,n)}function wm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:u,insert:l,createText:c}},d){const f=t.target=Ji(t.props,u);if(f){const g=f._lpa||f.firstChild;if(t.shapeFlag&16)if(ir(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=g,t.targetAnchor=g&&i(g);else{t.anchor=i(e);let m=g;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}m=i(m)}t.targetAnchor||Wu(f,t,c,l),d(g&&i(g),t,f,n,r,o,s)}qu(t)}return t.anchor&&i(t.anchor)}const Em=bm;function qu(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 Wu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Bu]=s,e&&(r(o,e),r(s,e)),s}let mo,In;function cn(e,t){e.appContext.config.performance&&Ns()&&In.mark(`vue-${t}-${e.uid}`),v.NODE_ENV!=="production"&&Ph(e,t,Ns()?In.now():Date.now())}function dn(e,t){if(e.appContext.config.performance&&Ns()){const n=`vue-${t}-${e.uid}`,r=n+":end";In.mark(r),In.measure(`<${Is(e,e.type)}> ${t}`,n,r),In.clearMarks(n),In.clearMarks(r)}v.NODE_ENV!=="production"&&$h(e,t,Ns()?In.now():Date.now())}function Ns(){return mo!==void 0||(typeof window<"u"&&window.performance?(mo=!0,In=window.performance):mo=!1),mo}function Om(){const e=[];if(v.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
10
+ `,...fh(o)),console.warn(...s)}rn(),ki=!1}function dh(){let e=er[er.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 fh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
11
+ `],...ph(n))}),t}function ph({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Is(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...hh(e.props),s]:[o+s]}function hh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Xl(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Xl(e,t,n){return Ue(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Be(t)?(t=Xl(e,he(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=he(t),n?t:[`${e}=`,t])}function mh(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 Pi={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 ln(e,t,n,r){try{return r?e(...r):e()}catch(o){so(o,t,n)}}function xt(e,t,n,r){if(fe(e)){const o=ln(e,t,n,r);return o&&hi(o)&&o.catch(s=>{so(s,t,n)}),o}if(ie(e)){const o=[];for(let s=0;s<e.length;s++)o.push(xt(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function so(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"?Pi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const u=s.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,i,a)===!1)return}s=s.parent}const l=t.appContext.config.errorHandler;if(l){nn(),ln(l,null,10,[e,i,a]),rn();return}}vh(e,n,o,r)}function vh(e,t,n,r=!0){if(g.NODE_ENV!=="production"){const o=Pi[t];if(n&&fs(n),U(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ps(),r)throw e;console.error(e)}else console.error(e)}let io=!1,$i=!1;const ct=[];let qt=0;const Pr=[];let kn=null,tr=0;const Ql=Promise.resolve();let Ii=null;const gh=100;function ao(e){const t=Ii||Ql;return e?t.then(this?e.bind(this):e):t}function yh(e){let t=qt+1,n=ct.length;for(;t<n;){const r=t+n>>>1,o=ct[r],s=lo(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}function hs(e){(!ct.length||!ct.includes(e,io&&e.allowRecurse?qt+1:qt))&&(e.id==null?ct.push(e):ct.splice(yh(e.id),0,e),eu())}function eu(){!io&&!$i&&($i=!0,Ii=Ql.then(ou))}function _h(e){const t=ct.indexOf(e);t>qt&&ct.splice(t,1)}function tu(e){ie(e)?Pr.push(...e):(!kn||!kn.includes(e,e.allowRecurse?tr+1:tr))&&Pr.push(e),eu()}function nu(e,t,n=io?qt+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<ct.length;n++){const r=ct[n];if(r&&r.pre){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&Di(t,r))continue;ct.splice(n,1),n--,r()}}}function ru(e){if(Pr.length){const t=[...new Set(Pr)].sort((n,r)=>lo(n)-lo(r));if(Pr.length=0,kn){kn.push(...t);return}for(kn=t,g.NODE_ENV!=="production"&&(e=e||new Map),tr=0;tr<kn.length;tr++){const n=kn[tr];g.NODE_ENV!=="production"&&Di(e,n)||n.active!==!1&&n()}kn=null,tr=0}}const lo=e=>e.id==null?1/0:e.id,bh=(e,t)=>{const n=lo(e)-lo(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ou(e){$i=!1,io=!0,g.NODE_ENV!=="production"&&(e=e||new Map),ct.sort(bh);const t=g.NODE_ENV!=="production"?n=>Di(e,n):We;try{for(qt=0;qt<ct.length;qt++){const n=ct[qt];if(n&&n.active!==!1){if(g.NODE_ENV!=="production"&&t(n))continue;ln(n,n.i,n.i?15:14)}}}finally{qt=0,ct.length=0,ru(e),io=!1,Ii=null,(ct.length||Pr.length)&&ou(e)}}function Di(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>gh){const r=t.i,o=r&&ua(r.type);return so(`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 Pn=!1;const ms=new Map;g.NODE_ENV!=="production"&&(gi().__VUE_HMR_RUNTIME__={createRecord:Ai(su),rerender:Ai(Oh),reload:Ai(Nh)});const nr=new Map;function wh(e){const t=e.type.__hmrId;let n=nr.get(t);n||(su(t,e.type),n=nr.get(t)),n.instances.add(e)}function Eh(e){nr.get(e.type.__hmrId).instances.delete(e)}function su(e,t){return nr.has(e)?!1:(nr.set(e,{initialDef:vs(t),instances:new Set}),!0)}function vs(e){return cc(e)?e.__vccOpts:e}function Oh(e,t){const n=nr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,vs(r.type).render=t),r.renderCache=[],Pn=!0,r.effect.dirty=!0,r.update(),Pn=!1}))}function Nh(e,t){const n=nr.get(e);if(!n)return;t=vs(t),iu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=vs(s.type);let a=ms.get(i);a||(i!==n.initialDef&&iu(i,t),ms.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,hs(()=>{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.")}tu(()=>{ms.clear()})}function iu(e,t){qe(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Ai(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 Wt,uo=[],Vi=!1;function co(e,...t){Wt?Wt.emit(e,...t):Vi||uo.push({event:e,args:t})}function au(e,t){var n,r;Wt=e,Wt?(Wt.enabled=!0,uo.forEach(({event:o,args:s})=>Wt.emit(o,...s)),uo=[]):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=>{au(s,t)}),setTimeout(()=>{Wt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Vi=!0,uo=[])},3e3)):(Vi=!0,uo=[])}function Sh(e,t){co("app:init",e,t,{Fragment:Pe,Text:go,Comment:Ke,Static:yo})}function xh(e){co("app:unmount",e)}const Th=Ri("component:added"),lu=Ri("component:updated"),Ch=Ri("component:removed"),kh=e=>{Wt&&typeof Wt.cleanupBuffer=="function"&&!Wt.cleanupBuffer(e)&&Ch(e)};/*! #__NO_SIDE_EFFECTS__ */function Ri(e){return t=>{co(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Ph=uu("perf:start"),$h=uu("perf:end");function uu(e){return(t,n,r)=>{co(e,t.appContext.app,t.uid,t,n,r)}}function Ih(e,t,n){co("component:emit",e.appContext.app,e,t,n)}let Ye=null,gs=null;function ys(e){const t=Ye;return Ye=e,gs=e&&e.type.__scopeId||null,t}function Dh(e){gs=e}function Ah(){gs=null}function we(e,t=Ye,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ec(-1);const s=ys(t);let i;try{i=e(...o)}finally{ys(s),r._d&&ec(1)}return g.NODE_ENV!=="production"&&lu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function cu(e){yp(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function rr(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&&(nn(),xt(l,n,8,[e.el,a,e,t]),rn())}}const $n=Symbol("_leaveCb"),_s=Symbol("_enterCb");function Vh(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ve(()=>{e.isMounted=!0}),Mi(()=>{e.isUnmounting=!0}),e}const Tt=[Function,Array],du={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Tt,onEnter:Tt,onAfterEnter:Tt,onEnterCancelled:Tt,onBeforeLeave:Tt,onLeave:Tt,onAfterLeave:Tt,onLeaveCancelled:Tt,onBeforeAppear:Tt,onAppear:Tt,onAfterAppear:Tt,onAppearCancelled:Tt},fu=e=>{const t=e.subTree;return t.component?fu(t.component):t},Rh={name:"BaseTransition",props:du,setup(e,{slots:t}){const n=ks(),r=Vh();return()=>{const o=t.default&&mu(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=he(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 Li(s);const l=hu(s);if(!l)return Li(s);let u=ji(l,i,r,n,f=>u=f);bs(l,u);const c=n.subTree,d=c&&hu(c);if(d&&d.type!==Ke&&!ur(l,d)&&fu(n).type!==Ke){const f=ji(d,i,r,n);if(bs(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())},Li(s);a==="in-out"&&l.type!==Ke&&(f.delayLeave=(m,v,w)=>{const S=pu(r,d);S[String(d.key)]=d,m[$n]=()=>{v(),m[$n]=void 0,delete u.delayedLeave},u.delayedLeave=w})}return s}}};function pu(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 ji(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:v,onLeaveCancelled:w,onBeforeAppear:S,onAppear:L,onAfterAppear:F,onAppearCancelled:T}=t,K=String(e.key),C=pu(n,e),H=(J,D)=>{J&&xt(J,r,9,D)},E=(J,D)=>{const x=D[1];H(J,D),ie(J)?J.every(R=>R.length<=1)&&x():J.length<=1&&x()},de={mode:i,persisted:a,beforeEnter(J){let D=l;if(!n.isMounted)if(s)D=S||l;else return;J[$n]&&J[$n](!0);const x=C[K];x&&ur(e,x)&&x.el[$n]&&x.el[$n](),H(D,[J])},enter(J){let D=u,x=c,R=d;if(!n.isMounted)if(s)D=L||u,x=F||c,R=T||d;else return;let oe=!1;const _=J[_s]=k=>{oe||(oe=!0,k?H(R,[J]):H(x,[J]),de.delayedLeave&&de.delayedLeave(),J[_s]=void 0)};D?E(D,[J,_]):_()},leave(J,D){const x=String(e.key);if(J[_s]&&J[_s](!0),n.isUnmounting)return D();H(f,[J]);let R=!1;const oe=J[$n]=_=>{R||(R=!0,D(),_?H(w,[J]):H(v,[J]),J[$n]=void 0,C[x]===e&&delete C[x])};C[x]=e,m?E(m,[J,oe]):oe()},clone(J){const D=ji(J,t,n,r,o);return o&&o(D),D}};return de}function Li(e){if(po(e))return e=At(e),e.children=null,e}function hu(e){if(!po(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 bs(e,t){e.shapeFlag&6&&e.component?bs(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 mu(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===Pe?(i.patchFlag&128&&o++,r=r.concat(mu(i.children,t,a))):(t||i.type!==Ke)&&r.push(a!=null?At(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 me(e,t){return fe(e)?qe({name:e.name},t,{setup:e}):e}const fo=e=>!!e.type.__asyncLoader,po=e=>e.type.__isKeepAlive;function jh(e,t){vu(e,"a",t)}function Lh(e,t){vu(e,"da",t)}function vu(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(ws(t,r,n),n){let o=n.parent;for(;o&&o.parent;)po(o.parent.vnode)&&Mh(r,t,n,o),o=o.parent}}function Mh(e,t,n,r){const o=ws(t,e,r,!0);mt(()=>{pi(r[t],o)},n)}function ws(e,t,n=Ge,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{nn();const a=wo(n),l=xt(t,n,e,i);return a(),rn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=Yn(Pi[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 un=e=>(t,n=Ge)=>{(!$s||e==="sp")&&ws(e,(...r)=>t(...r),n)},Uh=un("bm"),Ve=un("m"),Fh=un("bu"),Bh=un("u"),Mi=un("bum"),mt=un("um"),Hh=un("sp"),Zh=un("rtg"),qh=un("rtc");function Wh(e,t=Ge){ws("ec",e,t)}const gu="components";function zh(e,t){return bu(gu,e,!0,t)||e}const yu=Symbol.for("v-ndc");function _u(e){return Ue(e)?bu(gu,e,!1)||e:e||yu}function bu(e,t,n=!0,r=!1){const o=Ye||Ge;if(o){const s=o.type;{const a=ua(s,!1);if(a&&(a===t||a===Et(t)||a===Jn(Et(t))))return s}const i=wu(o[e]||s[e],t)||wu(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${Jn(e.slice(0,-1))} can only be used in render() or setup().`)}function wu(e,t){return e&&(e[t]||e[Et(t)]||e[Jn(Et(t))])}function $r(e,t,n,r){let o;const s=n;if(ie(e)||Ue(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(ke(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 u=i[a];o[a]=t(e[u],u,a,s)}}else o=[];return o}function Ui(e,t,n={},r,o){if(Ye.isCE||Ye.parent&&fo(Ye.parent)&&Ye.parent.isCE)return q("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),O();const i=s&&Eu(s(n)),a=$e(Pe,{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 Eu(e){return e.some(t=>Ir(t)?!(t.type===Ke||t.type===Pe&&!Eu(t.children)):!0)?e:null}const Fi=e=>e?ic(e)?la(e):Fi(e.parent):null,or=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?Zt(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?Zt(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?Zt(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?Zt(e.refs):e.refs,$parent:e=>Fi(e.parent),$root:e=>Fi(e.root),$emit:e=>e.emit,$options:e=>qi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,hs(e.update)}),$nextTick:e=>e.n||(e.n=ao.bind(e.proxy)),$watch:e=>Pm.bind(e)}),Bi=e=>e==="_"||e==="$",Hi=(e,t)=>e!==Re&&!e.__isScriptSetup&&Ne(e,t),Ou={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(Hi(r,t))return i[t]=1,r[t];if(o!==Re&&Ne(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&Ne(u,t))return i[t]=3,s[t];if(n!==Re&&Ne(n,t))return i[t]=4,n[t];Zi&&(i[t]=0)}}const c=or[t];let d,f;if(c)return t==="$attrs"?(ot(e.attrs,"get",""),g.NODE_ENV!=="production"&&Ts()):g.NODE_ENV!=="production"&&t==="$slots"&&ot(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Re&&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&&(!Ue(t)||t.indexOf("__v")!==0)&&(o!==Re&&Bi(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 Hi(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!==Re&&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!==Re&&Ne(e,i)||Hi(t,i)||(a=s[0])&&Ne(a,i)||Ne(r,i)||Ne(or,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"&&(Ou.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 Kh(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(or).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>or[n](e),set:We})}),t}function Gh(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 Jh(e){const{ctx:t,setupState:n}=e;Object.keys(he(n)).forEach(r=>{if(!n.__isScriptSetup){if(Bi(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 Nu(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Yh(){const e=Object.create(null);return(t,n)=>{e[n]?U(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Zi=!0;function Xh(e){const t=qi(e),n=e.proxy,r=e.ctx;Zi=!1,t.beforeCreate&&Su(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:v,activated:w,deactivated:S,beforeDestroy:L,beforeUnmount:F,destroyed:T,unmounted:K,render:C,renderTracked:H,renderTriggered:E,errorCaptured:de,serverPrefetch:J,expose:D,inheritAttrs:x,components:R,directives:oe,filters:_}=t,k=g.NODE_ENV!=="production"?Yh():null;if(g.NODE_ENV!=="production"){const[ae]=e.propsOptions;if(ae)for(const ne in ae)k("Props",ne)}if(u&&Qh(u,r,k),i)for(const ae in i){const ne=i[ae];fe(ne)?(g.NODE_ENV!=="production"?Object.defineProperty(r,ae,{value:ne.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[ae]=ne.bind(n),g.NODE_ENV!=="production"&&k("Methods",ae)):g.NODE_ENV!=="production"&&U(`Method "${ae}" has type "${typeof ne}" 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"&&hi(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>."),!ke(ae))g.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=ro(ae),g.NODE_ENV!=="production")for(const ne in ae)k("Data",ne),Bi(ne[0])||Object.defineProperty(r,ne,{configurable:!0,enumerable:!0,get:()=>ae[ne],set:We})}if(Zi=!0,s)for(const ae in s){const ne=s[ae],ue=fe(ne)?ne.bind(n,n):fe(ne.get)?ne.get.bind(n,n):We;g.NODE_ENV!=="production"&&ue===We&&U(`Computed property "${ae}" has no getter.`);const Te=!fe(ne)&&fe(ne.set)?ne.set.bind(n):g.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${ae}" is readonly.`)}:We,De=Y({get:ue,set:Te});Object.defineProperty(r,ae,{enumerable:!0,configurable:!0,get:()=>De.value,set:nt=>De.value=nt}),g.NODE_ENV!=="production"&&k("Computed",ae)}if(a)for(const ae in a)xu(a[ae],r,n,ae);if(l){const ae=fe(l)?l.call(n):l;Reflect.ownKeys(ae).forEach(ne=>{dt(ne,ae[ne])})}c&&Su(c,e,"c");function te(ae,ne){ie(ne)?ne.forEach(ue=>ae(ue.bind(n))):ne&&ae(ne.bind(n))}if(te(Uh,d),te(Ve,f),te(Fh,m),te(Bh,v),te(jh,w),te(Lh,S),te(Wh,de),te(qh,H),te(Zh,E),te(Mi,F),te(mt,K),te(Hh,J),ie(D))if(D.length){const ae=e.exposed||(e.exposed={});D.forEach(ne=>{Object.defineProperty(ae,ne,{get:()=>n[ne],set:ue=>n[ne]=ue})})}else e.exposed||(e.exposed={});C&&e.render===We&&(e.render=C),x!=null&&(e.inheritAttrs=x),R&&(e.components=R),oe&&(e.directives=oe)}function Qh(e,t,n=We){ie(e)&&(e=Wi(e));for(const r in e){const o=e[r];let s;ke(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),Be(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 Su(e,t,n){xt(ie(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function xu(e,t,n,r){const o=r.includes(".")?Gu(n,r):()=>n[r];if(Ue(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(ke(e))if(ie(e))e.forEach(s=>xu(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 qi(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Es(l,u,i,!0)),Es(l,t,i)),ke(t)&&s.set(t,l),l}function Es(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Es(e,s,n,!0),o&&o.forEach(i=>Es(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=em[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const em={data:Tu,props:Cu,emits:Cu,methods:ho,computed:ho,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:ho,directives:ho,watch:nm,provide:Tu,inject:tm};function Tu(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 tm(e,t){return ho(Wi(e),Wi(t))}function Wi(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 ho(e,t){return e?qe(Object.create(null),e,t):t}function Cu(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:qe(Object.create(null),Nu(e),Nu(t??{})):t}function nm(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 ku(){return{app:null,config:{isNativeTag:vp,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 rm=0;function om(e,t){return function(r,o=null){fe(r)||(r=qe({},r)),o!=null&&!ke(o)&&(g.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),o=null);const s=ku(),i=new WeakSet;let a=!1;const l=s.app={_uid:rm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:dc,get config(){return s.config},set config(u){g.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(u,...c){return i.has(u)?g.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):u&&fe(u.install)?(i.add(u),u.install(l,...c)):fe(u)?(i.add(u),u(l,...c)):g.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),l},mixin(u){return s.mixins.includes(u)?g.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(u.name?`: ${u.name}`:"")):s.mixins.push(u),l},component(u,c){return g.NODE_ENV!=="production"&&ia(u,s.config),c?(g.NODE_ENV!=="production"&&s.components[u]&&U(`Component "${u}" has already been registered in target app.`),s.components[u]=c,l):s.components[u]},directive(u,c){return g.NODE_ENV!=="production"&&cu(u),c?(g.NODE_ENV!=="production"&&s.directives[u]&&U(`Directive "${u}" has already been registered in target app.`),s.directives[u]=c,l):s.directives[u]},mount(u,c,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"&&u.__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=q(r,o);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(At(f),u,d)}),c&&t?t(f,u):e(f,u,d),a=!0,l._container=u,u.__vue_app__=l,g.NODE_ENV!=="production"&&(l._instance=f.component,Sh(l,dc)),la(f.component)}},unmount(){a?(e(null,l._container),g.NODE_ENV!=="production"&&(l._instance=null,xh(l)),delete l._container.__vue_app__):g.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(u,c){return g.NODE_ENV!=="production"&&u in s.provides&&U(`App already provides property with key "${String(u)}". It will be overwritten with the new value.`),s.provides[u]=c,l},runWithContext(u){const c=sr;sr=l;try{return u()}finally{sr=c}}};return l}}let sr=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 Ce(e,t,n=!1){const r=Ge||Ye;if(r||sr){const o=sr?sr._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 sm(){return!!(Ge||Ye||sr)}const Pu={},$u=()=>Object.create(Pu),Iu=e=>Object.getPrototypeOf(e)===Pu;function im(e,t,n,r=!1){const o={},s=$u();e.propsDefaults=Object.create(null),Du(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Ru(t||{},o,e),n?e.props=r?o:nh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function am(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function lm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=he(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&am(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(xs(e.emitsOptions,f))continue;const m=t[f];if(l)if(Ne(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const v=Et(f);o[v]=zi(l,a,v,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{Du(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!Ne(t,d)&&((c=tn(d))===d||!Ne(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=zi(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],u=!0)}u&&Ht(e.attrs,"set",""),g.NODE_ENV!=="production"&&Ru(t||{},o,e)}function Du(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(to(l))continue;const u=t[l];let c;o&&Ne(o,c=Et(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:xs(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=he(n),u=a||Re;for(let c=0;c<s.length;c++){const d=s[c];n[d]=zi(o,l,d,u[d],e,!Ne(u,d))}}return i}function zi(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&&fe(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=wo(o);r=u[n]=l.call(null,t),c()}}else r=l}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===tn(n))&&(r=!0))}return r}const um=new WeakMap;function Au(e,t,n=!1){const r=n?um:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!fe(e)){const c=d=>{l=!0;const[f,m]=Au(d,t,!0);qe(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return ke(e)&&r.set(e,kr),kr;if(ie(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ue(s[c])&&U("props must be strings when using array syntax.",s[c]);const d=Et(s[c]);Vu(d)&&(i[d]=Re)}else if(s){g.NODE_ENV!=="production"&&!ke(s)&&U("invalid props options",s);for(const c in s){const d=Et(c);if(Vu(d)){const f=s[c],m=i[d]=ie(f)||fe(f)?{type:f}:qe({},f),v=m.type;let w=!1,S=!0;if(ie(v))for(let L=0;L<v.length;++L){const F=v[L],T=fe(F)&&F.name;if(T==="Boolean"){w=!0;break}else T==="String"&&(S=!1)}else w=fe(v)&&v.name==="Boolean";m[0]=w,m[1]=S,(w||Ne(m,"default"))&&a.push(d)}}}const u=[i,a];return ke(e)&&r.set(e,u),u}function Vu(e){return e[0]!=="$"&&!to(e)?!0:(g.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function cm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Ru(e,t,n){const r=he(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&dm(s,r[s],i,g.NODE_ENV!=="production"?Zt(r):r,!Ne(e,s)&&!Ne(e,tn(s)))}}function dm(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 u=!1;const c=ie(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:v}=pm(t,c[f]);d.push(v||""),u=m}if(!u){U(hm(e,t,d));return}}a&&!a(t,r)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const fm=en("String,Number,Boolean,Function,Symbol,BigInt");function pm(e,t){let n;const r=cm(t);if(fm(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=ke(e):r==="Array"?n=ie(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function hm(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(Jn).join(" | ")}`;const o=n[0],s=mi(t),i=ju(t,o),a=ju(t,s);return n.length===1&&Lu(o)&&!mm(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Lu(s)&&(r+=`with value ${a}.`),r}function ju(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Lu(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function mm(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Mu=e=>e[0]==="_"||e==="$stable",Ki=e=>ie(e)?e.map(Vt):[Vt(e)],vm=(e,t,n)=>{if(t._n)return t;const r=we((...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.`),Ki(t(...o))),n);return r._c=!1,r},Uu=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Mu(o))continue;const s=e[o];if(fe(s))t[o]=vm(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=Ki(s);t[o]=()=>i}}},Fu=(e,t)=>{g.NODE_ENV!=="production"&&!po(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Ki(t);e.slots.default=()=>n},Gi=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},gm=(e,t,n)=>{const r=e.slots=$u();if(e.vnode.shapeFlag&32){const o=t._;o?(Gi(r,t,n),n&&Qo(r,"_",o,!0)):Uu(t,r)}else t&&Fu(e,t)},ym=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Re;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Pn?(Gi(o,t,n),Ht(e,"set","$slots")):n&&a===1?s=!1:Gi(o,t,n):(s=!t.$stable,Uu(t,o)),i=t}else t&&(Fu(e,t),i={default:1});if(s)for(const a in o)!Mu(a)&&i[a]==null&&delete o[a]};function Ji(e,t,n,r,o=!1){if(ie(e)){e.forEach((f,m)=>Ji(f,t&&(ie(t)?t[m]:t),n,r,o));return}if(fo(r)&&!o)return;const s=r.shapeFlag&4?la(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 u=t&&t.r,c=a.refs===Re?a.refs={}:a.refs,d=a.setupState;if(u!=null&&u!==l&&(Ue(u)?(c[u]=null,Ne(d,u)&&(d[u]=null)):Be(u)&&(u.value=null)),fe(l))ln(l,a,12,[i,c]);else{const f=Ue(l),m=Be(l);if(f||m){const v=()=>{if(e.f){const w=f?Ne(d,l)?d[l]:c[l]:l.value;o?ie(w)&&pi(w,s):ie(w)?w.includes(s)||w.push(s):f?(c[l]=[s],Ne(d,l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else f?(c[l]=i,Ne(d,l)&&(d[l]=i)):m?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)};i?(v.id=-1,yt(v,n)):v()}else g.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)}}const Bu=Symbol("_vte"),_m=e=>e.__isTeleport,ir=e=>e&&(e.disabled||e.disabled===""),Hu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Zu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Yi=(e,t)=>{const n=e&&e.to;if(Ue(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!ir(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&&!ir(e)&&U(`Invalid Teleport target: ${n}`),n},bm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:v,createText:w,createComment:S}}=u,L=ir(t.props);let{shapeFlag:F,children:T,dynamicChildren:K}=t;if(g.NODE_ENV!=="production"&&Pn&&(l=!1,K=null),e==null){const C=t.el=g.NODE_ENV!=="production"?S("teleport start"):w(""),H=t.anchor=g.NODE_ENV!=="production"?S("teleport end"):w("");m(C,n,r),m(H,n,r);const E=t.target=Yi(t.props,v),de=Wu(E,t,w,m);E?i==="svg"||Hu(E)?i="svg":(i==="mathml"||Zu(E))&&(i="mathml"):g.NODE_ENV!=="production"&&!L&&U("Invalid Teleport target on mount:",E,`(${typeof E})`);const J=(D,x)=>{F&16&&c(T,D,x,o,s,i,a,l)};L?J(n,H):E&&J(E,de)}else{t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,H=t.target=e.target,E=t.targetAnchor=e.targetAnchor,de=ir(e.props),J=de?n:H,D=de?C:E;if(i==="svg"||Hu(H)?i="svg":(i==="mathml"||Zu(H))&&(i="mathml"),K?(f(e.dynamicChildren,K,J,o,s,i,a),vo(e,t,!0)):l||d(e,t,J,D,o,s,i,a,!1),L)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Os(t,n,C,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const x=t.target=Yi(t.props,v);x?Os(t,x,null,u,0):g.NODE_ENV!=="production"&&U("Invalid Teleport target on update:",H,`(${typeof H})`)}else de&&Os(t,H,E,u,1)}qu(t)},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!ir(f);for(let v=0;v<a.length;v++){const w=a[v];r(w,t,n,m,!!w.dynamicChildren)}}},move:Os,hydrate:wm};function Os(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||ir(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function wm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=Yi(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(ir(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 v=m;for(;v;){if(v&&v.nodeType===8){if(v.data==="teleport start anchor")t.targetStart=v;else if(v.data==="teleport anchor"){t.targetAnchor=v,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}v=i(v)}t.targetAnchor||Wu(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}qu(t)}return t.anchor&&i(t.anchor)}const Em=bm;function qu(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 Wu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Bu]=s,e&&(r(o,e),r(s,e)),s}let mo,In;function cn(e,t){e.appContext.config.performance&&Ns()&&In.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&Ph(e,t,Ns()?In.now():Date.now())}function dn(e,t){if(e.appContext.config.performance&&Ns()){const n=`vue-${t}-${e.uid}`,r=n+":end";In.mark(r),In.measure(`<${Is(e,e.type)}> ${t}`,n,r),In.clearMarks(n),In.clearMarks(r)}g.NODE_ENV!=="production"&&$h(e,t,Ns()?In.now():Date.now())}function Ns(){return mo!==void 0||(typeof window<"u"&&window.performance?(mo=!0,In=window.performance):mo=!1),mo}function Om(){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 yt=Lm;function Nm(e){return Sm(e)}function Sm(e,t){Om();const n=vi();n.__VUE__=!0,v.NODE_ENV!=="production"&&au(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:u,setText:l,setElementText:c,parentNode:d,nextSibling:f,setScopeId:g=We,insertStaticContent:m}=e,w=(p,h,O,j=null,P=null,M=null,G=void 0,Z=null,W=v.NODE_ENV!=="production"&&Pn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!ur(p,h)&&(j=Qs(p),bt(p,P,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:A,ref:X,shapeFlag:le}=h;switch(A){case go:S(p,h,O,j);break;case Ke:L(p,h,O,j);break;case yo:p==null?F(h,O,j,G):v.NODE_ENV!=="production"&&T(p,h,O,G);break;case Pe:oe(p,h,O,j,P,M,G,Z,W);break;default:le&1?H(p,h,O,j,P,M,G,Z,W):le&6?_(p,h,O,j,P,M,G,Z,W):le&64||le&128?A.process(p,h,O,j,P,M,G,Z,W,Ao):v.NODE_ENV!=="production"&&U("Invalid VNode type:",A,`(${typeof A})`)}X!=null&&P&&Gi(X,p&&p.ref,M,h||p,!h)},S=(p,h,O,j)=>{if(p==null)r(h.el=a(h.children),O,j);else{const P=h.el=p.el;h.children!==p.children&&l(P,h.children)}},L=(p,h,O,j)=>{p==null?r(h.el=u(h.children||""),O,j):h.el=p.el},F=(p,h,O,j)=>{[p.el,p.anchor]=m(p.children,h,O,j,p.el,p.anchor)},T=(p,h,O,j)=>{if(h.children!==p.children){const P=f(p.anchor);C(p),[h.el,h.anchor]=m(h.children,O,P,j)}else h.el=p.el,h.anchor=p.anchor},K=({el:p,anchor:h},O,j)=>{let P;for(;p&&p!==h;)P=f(p),r(p,O,j),p=P;r(h,O,j)},C=({el:p,anchor:h})=>{let O;for(;p&&p!==h;)O=f(p),o(p),p=O;o(h)},H=(p,h,O,j,P,M,G,Z,W)=>{h.type==="svg"?G="svg":h.type==="math"&&(G="mathml"),p==null?E(h,O,j,P,M,G,Z,W):D(p,h,P,M,G,Z,W)},E=(p,h,O,j,P,M,G,Z)=>{let W,A;const{props:X,shapeFlag:le,transition:se,dirs:ye}=p;if(W=p.el=i(p.type,M,X&&X.is,X),le&8?c(W,p.children):le&16&&J(p.children,W,null,j,P,Yi(p,M),G,Z),ye&&rr(p,null,j,"created"),de(W,p,p.scopeId,G,j),X){for(const Me in X)Me!=="value"&&!to(Me)&&s(W,Me,null,X[Me],M,j);"value"in X&&s(W,"value",null,X.value,M),(A=X.onVnodeBeforeMount)&&zt(A,j,p)}v.NODE_ENV!=="production"&&(Qo(W,"__vnode",p,!0),Qo(W,"__vueParentComponent",j,!0)),ye&&rr(p,null,j,"beforeMount");const Se=xm(P,se);Se&&se.beforeEnter(W),r(W,h,O),((A=X&&X.onVnodeMounted)||Se||ye)&&yt(()=>{A&&zt(A,j,p),Se&&se.enter(W),ye&&rr(p,null,j,"mounted")},P)},de=(p,h,O,j,P)=>{if(O&&g(p,O),j)for(let M=0;M<j.length;M++)g(p,j[M]);if(P){let M=P.subTree;if(v.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=ta(M.children)||M),h===M){const G=P.vnode;de(p,G,G.scopeId,G.slotScopeIds,P.parent)}}},J=(p,h,O,j,P,M,G,Z,W=0)=>{for(let A=W;A<p.length;A++){const X=p[A]=Z?Dn(p[A]):Vt(p[A]);w(null,X,h,O,j,P,M,G,Z)}},D=(p,h,O,j,P,M,G)=>{const Z=h.el=p.el;v.NODE_ENV!=="production"&&(Z.__vnode=h);let{patchFlag:W,dynamicChildren:A,dirs:X}=h;W|=p.patchFlag&16;const le=p.props||Re,se=h.props||Re;let ye;if(O&&ar(O,!1),(ye=se.onVnodeBeforeUpdate)&&zt(ye,O,h,p),X&&rr(h,p,O,"beforeUpdate"),O&&ar(O,!0),v.NODE_ENV!=="production"&&Pn&&(W=0,G=!1,A=null),(le.innerHTML&&se.innerHTML==null||le.textContent&&se.textContent==null)&&c(Z,""),A?(x(p.dynamicChildren,A,Z,O,j,Yi(h,P),M),v.NODE_ENV!=="production"&&vo(p,h)):G||ue(p,h,Z,null,O,j,Yi(h,P),M,!1),W>0){if(W&16)R(Z,le,se,O,P);else if(W&2&&le.class!==se.class&&s(Z,"class",null,se.class,P),W&4&&s(Z,"style",le.style,se.style,P),W&8){const Se=h.dynamicProps;for(let Me=0;Me<Se.length;Me++){const Ie=Se[Me],rt=le[Ie],Lt=se[Ie];(Lt!==rt||Ie==="value")&&s(Z,Ie,rt,Lt,P,O)}}W&1&&p.children!==h.children&&c(Z,h.children)}else!G&&A==null&&R(Z,le,se,O,P);((ye=se.onVnodeUpdated)||X)&&yt(()=>{ye&&zt(ye,O,h,p),X&&rr(h,p,O,"updated")},j)},x=(p,h,O,j,P,M,G)=>{for(let Z=0;Z<h.length;Z++){const W=p[Z],A=h[Z],X=W.el&&(W.type===Pe||!ur(W,A)||W.shapeFlag&70)?d(W.el):O;w(W,A,X,null,j,P,M,G,!0)}},R=(p,h,O,j,P)=>{if(h!==O){if(h!==Re)for(const M in h)!to(M)&&!(M in O)&&s(p,M,h[M],null,P,j);for(const M in O){if(to(M))continue;const G=O[M],Z=h[M];G!==Z&&M!=="value"&&s(p,M,Z,G,P,j)}"value"in O&&s(p,"value",h.value,O.value,P)}},oe=(p,h,O,j,P,M,G,Z,W)=>{const A=h.el=p?p.el:a(""),X=h.anchor=p?p.anchor:a("");let{patchFlag:le,dynamicChildren:se,slotScopeIds:ye}=h;v.NODE_ENV!=="production"&&(Pn||le&2048)&&(le=0,W=!1,se=null),ye&&(Z=Z?Z.concat(ye):ye),p==null?(r(A,O,j),r(X,O,j),J(h.children||[],O,X,P,M,G,Z,W)):le>0&&le&64&&se&&p.dynamicChildren?(x(p.dynamicChildren,se,O,P,M,G,Z),v.NODE_ENV!=="production"?vo(p,h):(h.key!=null||P&&h===P.subTree)&&vo(p,h,!0)):ue(p,h,O,X,P,M,G,Z,W)},_=(p,h,O,j,P,M,G,Z,W)=>{h.slotScopeIds=Z,p==null?h.shapeFlag&512?P.ctx.activate(h,O,j,G,W):k(h,O,j,P,M,G,W):te(p,h,W)},k=(p,h,O,j,P,M,G)=>{const Z=p.component=qm(p,j,P);if(v.NODE_ENV!=="production"&&Z.type.__hmrId&&wh(Z),v.NODE_ENV!=="production"&&(fs(p),cn(Z,"mount")),po(p)&&(Z.ctx.renderer=Ao),v.NODE_ENV!=="production"&&cn(Z,"init"),zm(Z,!1,G),v.NODE_ENV!=="production"&&dn(Z,"init"),Z.asyncDep){if(P&&P.registerDep(Z,ae,G),!p.el){const W=Z.subTree=q(Ke);L(null,W,h,O)}}else ae(Z,p,h,O,P,M,G);v.NODE_ENV!=="production"&&(ps(),dn(Z,"mount"))},te=(p,h,O)=>{const j=h.component=p.component;if(Vm(p,h,O))if(j.asyncDep&&!j.asyncResolved){v.NODE_ENV!=="production"&&fs(h),ne(j,h,O),v.NODE_ENV!=="production"&&ps();return}else j.next=h,_h(j.update),j.effect.dirty=!0,j.update();else h.el=p.el,j.vnode=h},ae=(p,h,O,j,P,M,G)=>{const Z=()=>{if(p.isMounted){let{next:X,bu:le,u:se,parent:ye,vnode:Se}=p;{const Rr=zu(p);if(Rr){X&&(X.el=Se.el,ne(p,X,G)),Rr.asyncDep.then(()=>{p.isUnmounted||Z()});return}}let Me=X,Ie;v.NODE_ENV!=="production"&&fs(X||p.vnode),ar(p,!1),X?(X.el=Se.el,ne(p,X,G)):X=Se,le&&no(le),(Ie=X.props&&X.props.onVnodeBeforeUpdate)&&zt(Ie,ye,X,Se),ar(p,!0),v.NODE_ENV!=="production"&&cn(p,"render");const rt=ea(p);v.NODE_ENV!=="production"&&dn(p,"render");const Lt=p.subTree;p.subTree=rt,v.NODE_ENV!=="production"&&cn(p,"patch"),w(Lt,rt,d(Lt.el),Qs(Lt),p,P,M),v.NODE_ENV!=="production"&&dn(p,"patch"),X.el=rt.el,Me===null&&Rm(p,rt.el),se&&yt(se,P),(Ie=X.props&&X.props.onVnodeUpdated)&&yt(()=>zt(Ie,ye,X,Se),P),v.NODE_ENV!=="production"&&lu(p),v.NODE_ENV!=="production"&&ps()}else{let X;const{el:le,props:se}=h,{bm:ye,m:Se,parent:Me}=p,Ie=fo(h);if(ar(p,!1),ye&&no(ye),!Ie&&(X=se&&se.onVnodeBeforeMount)&&zt(X,Me,h),ar(p,!0),le&&Md){const rt=()=>{v.NODE_ENV!=="production"&&cn(p,"render"),p.subTree=ea(p),v.NODE_ENV!=="production"&&dn(p,"render"),v.NODE_ENV!=="production"&&cn(p,"hydrate"),Md(le,p.subTree,p,P,null),v.NODE_ENV!=="production"&&dn(p,"hydrate")};Ie?h.type.__asyncLoader().then(()=>!p.isUnmounted&&rt()):rt()}else{v.NODE_ENV!=="production"&&cn(p,"render");const rt=p.subTree=ea(p);v.NODE_ENV!=="production"&&dn(p,"render"),v.NODE_ENV!=="production"&&cn(p,"patch"),w(null,rt,O,j,p,P,M),v.NODE_ENV!=="production"&&dn(p,"patch"),h.el=rt.el}if(Se&&yt(Se,P),!Ie&&(X=se&&se.onVnodeMounted)){const rt=h;yt(()=>zt(X,Me,rt),P)}(h.shapeFlag&256||Me&&fo(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&yt(p.a,P),p.isMounted=!0,v.NODE_ENV!=="production"&&Th(p),h=O=j=null}},W=p.effect=new _i(Z,We,()=>hs(A),p.scope),A=p.update=()=>{W.dirty&&W.run()};A.i=p,A.id=p.uid,ar(p,!0),v.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>no(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>no(p.rtg,X):void 0),A()},ne=(p,h,O)=>{h.component=p;const j=p.vnode.props;p.vnode=h,p.next=null,lm(p,h.props,j,O),ym(p,h.children,O),nn(),nu(p),rn()},ue=(p,h,O,j,P,M,G,Z,W=!1)=>{const A=p&&p.children,X=p?p.shapeFlag:0,le=h.children,{patchFlag:se,shapeFlag:ye}=h;if(se>0){if(se&128){De(A,le,O,j,P,M,G,Z,W);return}else if(se&256){Te(A,le,O,j,P,M,G,Z,W);return}}ye&8?(X&16&&Do(A,P,M),le!==A&&c(O,le)):X&16?ye&16?De(A,le,O,j,P,M,G,Z,W):Do(A,P,M,!0):(X&8&&c(O,""),ye&16&&J(le,O,j,P,M,G,Z,W))},Te=(p,h,O,j,P,M,G,Z,W)=>{p=p||Cr,h=h||Cr;const A=p.length,X=h.length,le=Math.min(A,X);let se;for(se=0;se<le;se++){const ye=h[se]=W?Dn(h[se]):Vt(h[se]);w(p[se],ye,O,null,P,M,G,Z,W)}A>X?Do(p,P,M,!0,!1,le):J(h,O,j,P,M,G,Z,W,le)},De=(p,h,O,j,P,M,G,Z,W)=>{let A=0;const X=h.length;let le=p.length-1,se=X-1;for(;A<=le&&A<=se;){const ye=p[A],Se=h[A]=W?Dn(h[A]):Vt(h[A]);if(ur(ye,Se))w(ye,Se,O,null,P,M,G,Z,W);else break;A++}for(;A<=le&&A<=se;){const ye=p[le],Se=h[se]=W?Dn(h[se]):Vt(h[se]);if(ur(ye,Se))w(ye,Se,O,null,P,M,G,Z,W);else break;le--,se--}if(A>le){if(A<=se){const ye=se+1,Se=ye<X?h[ye].el:j;for(;A<=se;)w(null,h[A]=W?Dn(h[A]):Vt(h[A]),O,Se,P,M,G,Z,W),A++}}else if(A>se)for(;A<=le;)bt(p[A],P,M,!0),A++;else{const ye=A,Se=A,Me=new Map;for(A=Se;A<=se;A++){const gt=h[A]=W?Dn(h[A]):Vt(h[A]);gt.key!=null&&(v.NODE_ENV!=="production"&&Me.has(gt.key)&&U("Duplicate keys found during update:",JSON.stringify(gt.key),"Make sure keys are unique."),Me.set(gt.key,A))}let Ie,rt=0;const Lt=se-Se+1;let Rr=!1,Ud=0;const Vo=new Array(Lt);for(A=0;A<Lt;A++)Vo[A]=0;for(A=ye;A<=le;A++){const gt=p[A];if(rt>=Lt){bt(gt,P,M,!0);continue}let Yt;if(gt.key!=null)Yt=Me.get(gt.key);else for(Ie=Se;Ie<=se;Ie++)if(Vo[Ie-Se]===0&&ur(gt,h[Ie])){Yt=Ie;break}Yt===void 0?bt(gt,P,M,!0):(Vo[Yt-Se]=A+1,Yt>=Ud?Ud=Yt:Rr=!0,w(gt,h[Yt],O,null,P,M,G,Z,W),rt++)}const Fd=Rr?Tm(Vo):Cr;for(Ie=Fd.length-1,A=Lt-1;A>=0;A--){const gt=Se+A,Yt=h[gt],Bd=gt+1<X?h[gt+1].el:j;Vo[A]===0?w(null,Yt,O,Bd,P,M,G,Z,W):Rr&&(Ie<0||A!==Fd[Ie]?nt(Yt,O,Bd,2):Ie--)}}},nt=(p,h,O,j,P=null)=>{const{el:M,type:G,transition:Z,children:W,shapeFlag:A}=p;if(A&6){nt(p.component.subTree,h,O,j);return}if(A&128){p.suspense.move(h,O,j);return}if(A&64){G.move(p,h,O,Ao);return}if(G===Pe){r(M,h,O);for(let le=0;le<W.length;le++)nt(W[le],h,O,j);r(p.anchor,h,O);return}if(G===yo){K(p,h,O);return}if(j!==2&&A&1&&Z)if(j===0)Z.beforeEnter(M),r(M,h,O),yt(()=>Z.enter(M),P);else{const{leave:le,delayLeave:se,afterLeave:ye}=Z,Se=()=>r(M,h,O),Me=()=>{le(M,()=>{Se(),ye&&ye()})};se?se(M,Se,Me):Me()}else r(M,h,O)},bt=(p,h,O,j=!1,P=!1)=>{const{type:M,props:G,ref:Z,children:W,dynamicChildren:A,shapeFlag:X,patchFlag:le,dirs:se,cacheIndex:ye}=p;if(le===-2&&(P=!1),Z!=null&&Gi(Z,null,O,p,!0),ye!=null&&(h.renderCache[ye]=void 0),X&256){h.ctx.deactivate(p);return}const Se=X&1&&se,Me=!fo(p);let Ie;if(Me&&(Ie=G&&G.onVnodeBeforeUnmount)&&zt(Ie,h,p),X&6)b1(p.component,O,j);else{if(X&128){p.suspense.unmount(O,j);return}Se&&rr(p,null,h,"beforeUnmount"),X&64?p.type.remove(p,h,O,Ao,j):A&&!A.hasOnce&&(M!==Pe||le>0&&le&64)?Do(A,h,O,!1,!0):(M===Pe&&le&384||!P&&X&16)&&Do(W,h,O),j&&gn(p)}(Me&&(Ie=G&&G.onVnodeUnmounted)||Se)&&yt(()=>{Ie&&zt(Ie,h,p),Se&&rr(p,null,h,"unmounted")},O)},gn=p=>{const{type:h,el:O,anchor:j,transition:P}=p;if(h===Pe){v.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&P&&!P.persisted?p.children.forEach(G=>{G.type===Ke?o(G.el):gn(G)}):Zn(O,j);return}if(h===yo){C(p);return}const M=()=>{o(O),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(p.shapeFlag&1&&P&&!P.persisted){const{leave:G,delayLeave:Z}=P,W=()=>G(O,M);Z?Z(p.el,M,W):W()}else M()},Zn=(p,h)=>{let O;for(;p!==h;)O=f(p),o(p),p=O;o(h)},b1=(p,h,O)=>{v.NODE_ENV!=="production"&&p.type.__hmrId&&Eh(p);const{bum:j,scope:P,update:M,subTree:G,um:Z,m:W,a:A}=p;Ku(W),Ku(A),j&&no(j),P.stop(),M&&(M.active=!1,bt(G,p,h,O)),Z&&yt(Z,h),yt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),v.NODE_ENV!=="production"&&kh(p)},Do=(p,h,O,j=!1,P=!1,M=0)=>{for(let G=M;G<p.length;G++)bt(p[G],h,O,j,P)},Qs=p=>{if(p.shapeFlag&6)return Qs(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),O=h&&h[Bu];return O?f(O):h};let Za=!1;const jd=(p,h,O)=>{p==null?h._vnode&&bt(h._vnode,null,null,!0):w(h._vnode||null,p,h,null,null,null,O),h._vnode=p,Za||(Za=!0,nu(),ru(),Za=!1)},Ao={p:w,um:bt,m:nt,r:gn,mt:k,mc:J,pc:ue,pbc:x,n:Qs,o:e};let Ld,Md;return{render:jd,hydrate:Ld,createApp:om(jd,Ld)}}function Yi({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 ar({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function xm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vo(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]=Dn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&vo(i,a)),a.type===go&&(a.el=i.el),v.NODE_ENV!=="production"&&a.type===Ke&&!a.el&&(a.el=i.el)}}function Tm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const u=e.length;for(r=0;r<u;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 zu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zu(t)}function Ku(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const Cm=Symbol.for("v-scx"),km=()=>{{const e=ke(Cm);return e||v.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 Xi(e,null,t)}const Ss={};function Xe(e,t,n){return v.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."),Xi(e,t,n)}function Xi(e,t,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=Re){if(t&&s){const E=t;t=(...de)=>{E(...de),H()}}v.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.'),v.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 u=E=>{U("Invalid watch source: ",E,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=Ge,c=E=>r===!0?E:lr(E,r===!1?1:void 0);let d,f=!1,g=!1;if(Be(e)?(d=()=>e.value,f=an(e)):on(e)?(d=()=>c(e),f=!0):ie(e)?(g=!0,f=e.some(E=>on(E)||an(E)),d=()=>e.map(E=>{if(Be(E))return E.value;if(on(E))return c(E);if(fe(E))return ln(E,l,2);v.NODE_ENV!=="production"&&u(E)})):fe(e)?t?d=()=>ln(e,l,2):d=()=>(m&&m(),xt(e,l,3,[w])):(d=We,v.NODE_ENV!=="production"&&u(e)),t&&r){const E=d;d=()=>lr(E())}let m,w=E=>{m=K.onStop=()=>{ln(E,l,4),m=K.onStop=void 0}},S;if($s)if(w=We,t?n&&xt(t,l,3,[d(),g?[]:void 0,w]):d(),o==="sync"){const E=km();S=E.__watcherHandles||(E.__watcherHandles=[])}else return We;let L=g?new Array(e.length).fill(Ss):Ss;const F=()=>{if(!(!K.active||!K.dirty))if(t){const E=K.run();(r||f||(g?E.some((de,J)=>Sn(de,L[J])):Sn(E,L)))&&(m&&m(),xt(t,l,3,[E,L===Ss?void 0:g&&L[0]===Ss?[]:L,w]),L=E)}else K.run()};F.allowRecurse=!!t;let T;o==="sync"?T=F:o==="post"?T=()=>yt(F,l&&l.suspense):(F.pre=!0,l&&(F.id=l.uid),T=()=>hs(F));const K=new _i(d,We,T),C=Ol(),H=()=>{K.stop(),C&&fi(C.effects,K)};return v.NODE_ENV!=="production"&&(K.onTrack=i,K.onTrigger=a),t?n?F():L=K.run():o==="post"?yt(K.run.bind(K),l&&l.suspense):K.run(),S&&S.push(H),H}function Pm(e,t,n){const r=this.proxy,o=Ue(e)?e.includes(".")?Gu(r,e):()=>r[e]:e.bind(r,r);let s;fe(t)?s=t:(s=t.handler,n=t);const i=wo(this),a=Xi(o,s.bind(r),n);return i(),a}function Gu(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 lr(e,t=1/0,n){if(t<=0||!Ce(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Be(e))lr(e.value,t,n);else if(ie(e))for(let r=0;r<e.length;r++)lr(e[r],t,n);else if(hl(e)||Gn(e))e.forEach(r=>{lr(r,t,n)});else if(vl(e)){for(const r in e)lr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&lr(e[r],t,n)}return e}const $m=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Et(t)}Modifiers`]||e[`${tn(t)}Modifiers`];function Im(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Re;if(v.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Yn(Et(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Yn(Et(t))}" prop.`);else{const f=c[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&&$m(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ue(c)?c.trim():c)),i.number&&(o=n.map(wp))),v.NODE_ENV!=="production"&&Ih(e,t,o),v.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[Yn(c)]&&U(`Event "${c}" is emitted in component ${Is(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 "${tn(t)}" instead of "${t}".`)}let a,u=r[a=Yn(t)]||r[a=Yn(Et(t))];!u&&s&&(u=r[a=Yn(tn(t))]),u&&xt(u,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,xt(l,e,6,o)}}function Ju(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 u=l=>{const c=Ju(l,t,!0);c&&(a=!0,qe(i,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!s&&!a?(Ce(e)&&r.set(e,null),null):(ie(s)?s.forEach(u=>i[u]=null):qe(i,s),Ce(e)&&r.set(e,i),i)}function xs(e,t){return!e||!eo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,tn(t))||Ne(e,t))}let Qi=!1;function Ts(){Qi=!0}function ea(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:u,render:l,renderCache:c,props:d,data:f,setupState:g,ctx:m,inheritAttrs:w}=e,S=ys(e);let L,F;v.NODE_ENV!=="production"&&(Qi=!1);try{if(n.shapeFlag&4){const C=o||r,H=v.NODE_ENV!=="production"&&g.__isScriptSetup?new Proxy(C,{get(E,de,J){return U(`Property '${String(de)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(E,de,J)}}):C;L=Vt(l.call(H,C,c,v.NODE_ENV!=="production"?Zt(d):d,g,f,m)),F=a}else{const C=t;v.NODE_ENV!=="production"&&a===d&&Ts(),L=Vt(C.length>1?C(v.NODE_ENV!=="production"?Zt(d):d,v.NODE_ENV!=="production"?{get attrs(){return Ts(),Zt(a)},slots:i,emit:u}:{attrs:a,slots:i,emit:u}):C(v.NODE_ENV!=="production"?Zt(d):d,null)),F=t.props?a:Dm(a)}}catch(C){_o.length=0,so(C,e,1),L=q(Ke)}let T=L,K;if(v.NODE_ENV!=="production"&&L.patchFlag>0&&L.patchFlag&2048&&([T,K]=Yu(L)),F&&w!==!1){const C=Object.keys(F),{shapeFlag:H}=T;if(C.length){if(H&7)s&&C.some(Jo)&&(F=Am(F,s)),T=At(T,F,!1,!0);else if(v.NODE_ENV!=="production"&&!Qi&&T.type!==Ke){const E=Object.keys(a),de=[],J=[];for(let D=0,x=E.length;D<x;D++){const R=E[D];eo(R)?Jo(R)||de.push(R[2].toLowerCase()+R.slice(3)):J.push(R)}J.length&&U(`Extraneous non-props attributes (${J.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&&(v.NODE_ENV!=="production"&&!Xu(T)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=At(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(v.NODE_ENV!=="production"&&!Xu(T)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),T.transition=n.transition),v.NODE_ENV!=="production"&&K?K(T):L=T,ys(S),L}const Yu=e=>{const t=e.children,n=e.dynamicChildren,r=ta(t,!1);if(r){if(v.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Yu(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[Vt(r),i]};function ta(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if($r(o)){if(o.type!==Ke||o.children==="v-if"){if(n)return;if(n=o,v.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return ta(n.children)}}else return}return n}const Dm=e=>{let t;for(const n in e)(n==="class"||n==="style"||eo(n))&&((t||(t={}))[n]=e[n]);return t},Am=(e,t)=>{const n={};for(const r in e)(!Jo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Xu=e=>e.shapeFlag&7||e.type===Ke;function Vm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:u}=t,l=s.emitsOptions;if(v.NODE_ENV!=="production"&&(o||a)&&Pn||t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return r?Qu(r,i,l):!!i;if(u&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!xs(l,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Qu(r,i,l):!0:!!i;return!1}function Qu(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]&&!xs(n,s))return!0}return!1}function Rm({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 jm=e=>e.__isSuspense;function Lm(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):tu(e)}const Pe=Symbol.for("v-fgt"),go=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),yo=Symbol.for("v-stc"),_o=[];let Nt=null;function N(e=!1){_o.push(Nt=e?null:[])}function Mm(){_o.pop(),Nt=_o[_o.length-1]||null}let bo=1;function ec(e){bo+=e,e<0&&Nt&&(Nt.hasOnce=!0)}function tc(e){return e.dynamicChildren=bo>0?Nt||Cr:null,Mm(),bo>0&&Nt&&Nt.push(e),e}function V(e,t,n,r,o,s){return tc(I(e,t,n,r,o,s,!0))}function $e(e,t,n,r,o){return tc(q(e,t,n,r,o,!0))}function $r(e){return e?e.__v_isVNode===!0:!1}function ur(e,t){if(v.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ms.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 Um=(...e)=>rc(...e),nc=({key:e})=>e??null,Cs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ue(e)||Be(e)||fe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function I(e,t=null,n=null,r=0,o=null,s=e===Pe?0:1,i=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nc(t),ref:t&&Cs(t),scopeId:gs,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?(na(u,n),s&128&&e.normalize(u)):n&&(u.shapeFlag|=Ue(n)?8:16),v.NODE_ENV!=="production"&&u.key!==u.key&&U("VNode created with invalid key (NaN). VNode type:",u.type),bo>0&&!i&&Nt&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&Nt.push(u),u}const q=v.NODE_ENV!=="production"?Um:rc;function rc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===yu)&&(v.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Ke),$r(e)){const a=At(e,t,!0);return n&&na(a,n),bo>0&&!s&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(cc(e)&&(e=e.__vccOpts),t){t=Fm(t);let{class:a,style:u}=t;a&&!Ue(a)&&(t.class=es(a)),Ce(u)&&(cs(u)&&!ie(u)&&(u=qe({},u)),t.style=gi(u))}const i=Ue(e)?1:jm(e)?128:_m(e)?64:Ce(e)?4:fe(e)?2:0;return v.NODE_ENV!=="production"&&i&4&&cs(e)&&(e=he(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)),I(e,t,n,r,o,i,s,!0)}function Fm(e){return e?cs(e)||Iu(e)?qe({},e):e:null}function At(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:u}=e,l=t?ra(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&nc(l),ref:t&&t.ref?n&&s?ie(s)?s.concat(Cs(t)):[s,Cs(t)]:Cs(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:v.NODE_ENV!=="production"&&i===-1&&ie(a)?a.map(oc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&At(e.ssContent),ssFallback:e.ssFallback&&At(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&r&&bs(c,u.clone(c)),c}function oc(e){const t=At(e);return ie(e.children)&&(t.children=e.children.map(oc)),t}function Fe(e=" ",t=0){return q(go,null,e,t)}function Bm(e,t){const n=q(yo,null,e);return n.staticCount=t,n}function we(e="",t=!1){return t?(N(),$e(Ke,null,e)):q(Ke,null,e)}function Vt(e){return e==null||typeof e=="boolean"?q(Ke):ie(e)?q(Pe,null,e.slice()):typeof e=="object"?Dn(e):q(go,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:At(e)}function na(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),na(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Iu(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=[Fe(t)]):n=8);e.children=t,e.shapeFlag|=n}function ra(...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=es([t.class,r.class]));else if(o==="style")t.style=gi([t.style,r.style]);else if(eo(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 zt(e,t,n,r=null){xt(e,t,7,[n,r])}const Hm=ku();let Zm=0;function qm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Hm,s={uid:Zm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new wl(!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:Au(r,o),emitsOptions:Ju(r,o),emit:null,emitted:null,propsDefaults:Re,inheritAttrs:r.inheritAttrs,ctx:Re,data:Re,props:Re,attrs:Re,slots:Re,refs:Re,setupState:Re,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 v.NODE_ENV!=="production"?s.ctx=Kh(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Im.bind(null,s),e.ce&&e.ce(s),s}let Ge=null;const ks=()=>Ge||Ye;let Ps,oa;{const e=vi(),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)}};Ps=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),oa=t("__VUE_SSR_SETTERS__",n=>$s=n)}const wo=e=>{const t=Ge;return Ps(e),e.scope.on(),()=>{e.scope.off(),Ps(t)}},sc=()=>{Ge&&Ge.scope.off(),Ps(null)},Wm=en("slot,component");function sa(e,{isNativeTag:t}){(Wm(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function ic(e){return e.vnode.shapeFlag&4}let $s=!1;function zm(e,t=!1,n=!1){t&&oa(t);const{props:r,children:o}=e.vnode,s=ic(e);im(e,r,s,t),gm(e,o,n);const i=s?Km(e,t):void 0;return t&&oa(!1),i}function Km(e,t){var n;const r=e.type;if(v.NODE_ENV!=="production"){if(r.name&&sa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)sa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)cu(s[i])}r.compilerOptions&&Gm()&&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,Ou),v.NODE_ENV!=="production"&&Gh(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Ym(e):null,i=wo(e);nn();const a=ln(o,e,0,[v.NODE_ENV!=="production"?Zt(e.props):e.props,s]);if(rn(),i(),pi(a)){if(a.then(sc,sc),t)return a.then(u=>{ac(e,u,t)}).catch(u=>{so(u,e,0)});if(e.asyncDep=a,v.NODE_ENV!=="production"&&!e.suspense){const u=(n=r.name)!=null?n:"Anonymous";U(`Component <${u}>: 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 ac(e,a,t)}else lc(e,t)}function ac(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)?(v.NODE_ENV!=="production"&&$r(t)&&U("setup() should not return VNodes directly - return a render function instead."),v.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Gl(t),v.NODE_ENV!=="production"&&Jh(e)):v.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),lc(e,n)}let ia;const Gm=()=>!ia;function lc(e,t,n){const r=e.type;if(!e.render){if(!t&&ia&&!r.render){const o=r.template||Zi(e).template;if(o){v.NODE_ENV!=="production"&&cn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:u}=r,l=qe(qe({isCustomElement:s,delimiters:a},i),u);r.render=ia(o,l),v.NODE_ENV!=="production"&&dn(e,"compile")}}e.render=r.render||We}{const o=wo(e);nn();try{Xh(e)}finally{rn(),o()}}v.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 uc=v.NODE_ENV!=="production"?{get(e,t){return Ts(),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 Jm(e){return new Proxy(e.slots,{get(t,n){return ot(e,"get","$slots"),t[n]}})}function Ym(e){const t=n=>{if(v.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":Be(n)&&(r="ref")),r!=="object"&&U(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(v.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,uc))},get slots(){return r||(r=Jm(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,uc),slots:e.slots,emit:e.emit,expose:t}}function aa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Gl(Cn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in or)return or[n](e)},has(t,n){return n in t||n in or}})):e.proxy}const Xm=/(?:^|[-_])(\w)/g,Qm=e=>e.replace(Xm,t=>t.toUpperCase()).replace(/[-_]/g,"");function la(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Is(e,t,n=!1){let r=la(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?Qm(r):n?"App":"Anonymous"}function cc(e){return fe(e)&&"__vccOpts"in e}const Y=(e,t)=>{const n=oh(e,t,$s);if(v.NODE_ENV!=="production"){const r=ks();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ae(e,t,n){const r=arguments.length;return r===2?Ce(t)&&!ie(t)?$r(t)?q(e,null,[t]):q(e,t):q(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&$r(n)&&(n=[n]),q(e,t,n))}function ev(){if(v.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 Ce(d)?d.__isVue?["div",e,"VueInstance"]:Be(d)?["div",{},["span",e,c(d)],"<",a(d.value),">"]:on(d)?["div",{},["span",e,an(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${sn(d)?" (readonly)":""}`]:sn(d)?["div",{},["span",e,an(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",he(d.props))),d.setupState!==Re&&f.push(i("setup",d.setupState)),d.data!==Re&&f.push(i("data",he(d.data)));const g=u(d,"computed");g&&f.push(i("computed",g));const m=u(d,"inject");return m&&f.push(i("injected",m)),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(g=>["div",{},["span",r,g+": "],a(f[g],!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]:Ce(d)?["object",{object:f?he(d):d}]:["span",n,String(d)]}function u(d,f){const g=d.type;if(fe(g))return;const m={};for(const w in d.ctx)l(g,w,f)&&(m[w]=d.ctx[w]);return m}function l(d,f,g){const m=d[g];if(ie(m)&&m.includes(f)||Ce(m)&&f in m||d.extends&&l(d.extends,f,g)||d.mixins&&d.mixins.some(w=>l(w,f,g)))return!0}function c(d){return an(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const dc="3.4.38",An=v.NODE_ENV!=="production"?U:We;var fn={};const tv="http://www.w3.org/2000/svg",nv="http://www.w3.org/1998/Math/MathML",pn=typeof document<"u"?document:null,fc=pn&&pn.createElement("template"),rv={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"?pn.createElementNS(tv,e):t==="mathml"?pn.createElementNS(nv,e):n?pn.createElement(e,{is:n}):pn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>pn.createTextNode(e),createComment:e=>pn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pn.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{fc.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=fc.content;if(r==="svg"||r==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Vn="transition",Eo="animation",Oo=Symbol("_vtc"),Ds=(e,{slots:t})=>Ae(Rh,ov(e),t);Ds.displayName="Transition";const pc={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};Ds.props=qe({},du,pc);const cr=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},hc=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function ov(e){const t={};for(const R in e)R in pc||(t[R]=e[R]);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:u=s,appearActiveClass:l=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,m=sv(o),w=m&&m[0],S=m&&m[1],{onBeforeEnter:L,onEnter:F,onEnterCancelled:T,onLeave:K,onLeaveCancelled:C,onBeforeAppear:H=L,onAppear:E=F,onAppearCancelled:de=T}=t,J=(R,oe,_)=>{dr(R,oe?c:a),dr(R,oe?l:i),_&&_()},D=(R,oe)=>{R._isLeaving=!1,dr(R,d),dr(R,g),dr(R,f),oe&&oe()},x=R=>(oe,_)=>{const k=R?E:F,te=()=>J(oe,R,_);cr(k,[oe,te]),mc(()=>{dr(oe,R?u:s),Rn(oe,R?c:a),hc(k)||vc(oe,r,w,te)})};return qe(t,{onBeforeEnter(R){cr(L,[R]),Rn(R,s),Rn(R,i)},onBeforeAppear(R){cr(H,[R]),Rn(R,u),Rn(R,l)},onEnter:x(!1),onAppear:x(!0),onLeave(R,oe){R._isLeaving=!0;const _=()=>D(R,oe);Rn(R,d),Rn(R,f),lv(),mc(()=>{R._isLeaving&&(dr(R,d),Rn(R,g),hc(K)||vc(R,r,S,_))}),cr(K,[R,_])},onEnterCancelled(R){J(R,!1),cr(T,[R])},onAppearCancelled(R){J(R,!0),cr(de,[R])},onLeaveCancelled(R){D(R),cr(C,[R])}})}function sv(e){if(e==null)return null;if(Ce(e))return[ua(e.enter),ua(e.leave)];{const t=ua(e);return[t,t]}}function ua(e){const t=Ep(e);return fn.NODE_ENV!=="production"&&mh(t,"<transition> explicit duration"),t}function Rn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Oo]||(e[Oo]=new Set)).add(t)}function dr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Oo];n&&(n.delete(t),n.size||(e[Oo]=void 0))}function mc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let iv=0;function vc(e,t,n,r){const o=e._endId=++iv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:u}=av(e,t);if(!i)return r();const l=i+"end";let c=0;const d=()=>{e.removeEventListener(l,f),s()},f=g=>{g.target===e&&++c>=u&&d()};setTimeout(()=>{c<u&&d()},a+1),e.addEventListener(l,f)}function av(e,t){const n=window.getComputedStyle(e),r=m=>(n[m]||"").split(", "),o=r(`${Vn}Delay`),s=r(`${Vn}Duration`),i=gc(o,s),a=r(`${Eo}Delay`),u=r(`${Eo}Duration`),l=gc(a,u);let c=null,d=0,f=0;t===Vn?i>0&&(c=Vn,d=i,f=s.length):t===Eo?l>0&&(c=Eo,d=l,f=u.length):(d=Math.max(i,l),c=d>0?i>l?Vn:Eo:null,f=c?c===Vn?s.length:u.length:0);const g=c===Vn&&/\b(transform|all)(,|$)/.test(r(`${Vn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:g}}function gc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>yc(n)+yc(e[r])))}function yc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function lv(){return document.body.offsetHeight}function uv(e,t,n){const r=e[Oo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _c=Symbol("_vod"),cv=Symbol("_vsh"),dv=Symbol(fn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),fv=/(^|;)\s*display\s*:/;function pv(e,t,n){const r=e.style,o=Ue(n);let s=!1;if(n&&!o){if(t)if(Ue(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&As(r,a,"")}else for(const i in t)n[i]==null&&As(r,i,"");for(const i in n)i==="display"&&(s=!0),As(r,i,n[i])}else if(o){if(t!==n){const i=r[dv];i&&(n+=";"+i),r.cssText=n,s=fv.test(n)}}else t&&e.removeAttribute("style");_c in e&&(e[_c]=s?r.display:"",e[cv]&&(r.display="none"))}const hv=/[^\\];\s*$/,bc=/\s*!important$/;function As(e,t,n){if(ie(n))n.forEach(r=>As(e,t,r));else if(n==null&&(n=""),fn.NODE_ENV!=="production"&&hv.test(n)&&An(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=mv(e,t);bc.test(n)?e.setProperty(tn(r),n.replace(bc,""),"important"):e[r]=n}}const wc=["Webkit","Moz","ms"],ca={};function mv(e,t){const n=ca[t];if(n)return n;let r=Et(t);if(r!=="filter"&&r in e)return ca[t]=r;r=Jn(r);for(let o=0;o<wc.length;o++){const s=wc[o]+r;if(s in e)return ca[t]=s}return t}const Ec="http://www.w3.org/1999/xlink";function Oc(e,t,n,r,o,s=Dp(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ec,t.slice(6,t.length)):e.setAttributeNS(Ec,t,n):n==null||s&&!yl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Nn(n)?String(n):n)}function vv(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=yl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){fn.NODE_ENV!=="production"&&!s&&An(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function gv(e,t,n,r){e.addEventListener(t,n,r)}function yv(e,t,n,r){e.removeEventListener(t,n,r)}const Nc=Symbol("_vei");function _v(e,t,n,r,o=null){const s=e[Nc]||(e[Nc]={}),i=s[t];if(r&&i)i.value=fn.NODE_ENV!=="production"?xc(r,t):r;else{const[a,u]=bv(t);if(r){const l=s[t]=Ov(fn.NODE_ENV!=="production"?xc(r,t):r,o);gv(e,a,l,u)}else i&&(yv(e,a,i,u),s[t]=void 0)}}const Sc=/(?:Once|Passive|Capture)$/;function bv(e){let t;if(Sc.test(e)){t={};let r;for(;r=e.match(Sc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):tn(e.slice(2)),t]}let da=0;const wv=Promise.resolve(),Ev=()=>da||(wv.then(()=>da=0),da=Date.now());function Ov(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;xt(Nv(r,n.value),t,5,[r])};return n.value=e,n.attached=Ev(),n}function xc(e,t){return fe(e)||ie(e)?e:(An(`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 Nv(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 Tc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Sv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?uv(e,r,i):t==="style"?pv(e,n,r):eo(t)?Jo(t)||_v(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):xv(e,t,r,i))?(vv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Oc(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Oc(e,t,r,i))};function xv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Tc(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 Tc(t)&&Ue(n)?!1:t in e}const Tv=["ctrl","shift","alt","meta"],Cv={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)=>Tv.some(n=>e[`${n}Key`]&&!t.includes(n))},kv=(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=Cv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Pv=qe({patchProp:Sv},rv);let Cc;function $v(){return Cc||(Cc=Nm(Pv))}const Iv=(...e)=>{const t=$v().createApp(...e);fn.NODE_ENV!=="production"&&(Av(t),Vv(t));const{mount:n}=t;return t.mount=r=>{const o=Rv(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,Dv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Dv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Av(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Pp(t)||$p(t)||Ip(t),writable:!1})}function Vv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){An("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 An(r),n},set(){An(r)}})}}function Rv(e){if(Ue(e)){const t=document.querySelector(e);return fn.NODE_ENV!=="production"&&!t&&An(`Failed to mount app: mount target selector "${e}" returned null.`),t}return fn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&An('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var jv={};function Lv(){ev()}jv.NODE_ENV!=="production"&&Lv();let Vs;const Mv=new Uint8Array(16);function Uv(){if(!Vs&&(Vs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vs(Mv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Fv(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 kc={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function fa(e,t,n){if(kc.randomUUID&&!t&&!e)return kc.randomUUID();e=e||{};const r=e.random||(e.rng||Uv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Fv(r)}var fr=Symbol("storefront");function Bv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Rs=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Y(()=>!!this.utm.value&&Object.values(this.utm.value).some(u=>!!u)),this.currentUser=$(null),this.loadedUser=$(!1),this.debouncedPushOrderContent=Bv(u=>this.client.orders.pushContent(u,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=$({id:fa(),status:Qr.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",u=>this.handleStorageUpdate(u));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=$(JSON.parse(i)),this.refreshOrder()):this.currentOrder=$({id:fa(),status:Qr.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);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.updateStorefront(),this.updateUser()}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})})}install(t){t.provide(fr,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 ii||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!==Qr.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Qr.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Rs.userKey="moonbase_user",Rs.sessionKey="moonbase_session",Rs.storefrontKey="moonbase_storefront";var Hv=Rs;function Pc(e,t){const n=t??ke(fr);if(!n)throw new Error("No storefront configured");return Y(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function $c(e,t){const n=t??ke(fr);if(!n)throw new Error("No storefront configured");return Y(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function pa(e){const t=ke(fr);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),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 Zv(e,t){const n=ke(fr),r=ah(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),u=n.stateFactory(`activation-request-${r}-completing`,!1),l=n.stateFactory(`activation-request-${r}-completion-timeout`,null),c=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ft.Completed,u.value=!1):l.value=setTimeout(c,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ft.Fulfilled&&(u.value=!0,c()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Li(()=>{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===Ft.Fulfilled&&(u.value=!0,c())}catch(g){s.value=g}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:u,error:s,isInstalled:Y(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ft.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,u.value=!0,c()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,u.value=!0,c()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ft.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ha(e){const t=e??ke(fr);if(!t)throw new Error("No storefront configured");return{items:Y(()=>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:Y(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Y(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,u,l,c,d;let f;if(s.type==="Product"){const g=t.storefront.value.products.find(S=>S.id===s.productId),w=((g==null?void 0:g.variations)||[]).find(S=>S.id===s.variationId);f=(u=(a=w==null?void 0:w.price[n])!=null?a:(i=g==null?void 0:g.defaultVariation)==null?void 0:i.price[n])!=null?u:0}else{const g=t.storefront.value.bundles.find(S=>S.id===s.bundleId),w=((g==null?void 0:g.variations)||[]).find(S=>S.id===s.variationId);f=(d=(c=w==null?void 0:w.price[n])!=null?c:(l=g==null?void 0:g.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(t.currentOrder.value=o,o.checkoutUrl&&typeof window<"u")window.location.href=o.checkoutUrl;else throw new Error("No checkout URL found")}}}function Kt(e){const t=e??ke(fr);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,u)=>{const l=await t.client.identity.signUp(n,r,o,s,i,a,u);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)}}function qv(e,t){const n={endpoint:e};return new Hv(n,new mp(n),(r,o)=>$(o))}var Ic=!1;function js(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 ma(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Wv(){return Dc().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Dc(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const zv=typeof Proxy=="function",Kv="devtools-plugin:setup",Gv="plugin:settings:set";let Ir,va;function Jv(){var e;return Ir!==void 0||(typeof window<"u"&&window.performance?(Ir=!0,va=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ir=!0,va=globalThis.perf_hooks.performance):Ir=!1),Ir}function Yv(){return Jv()?va.now():Date.now()}class Xv{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 Yv()}},n&&n.on(Gv,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...u)=>{this.onQueue.push({method:a,args:u})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...u)=>(this.targetQueue.push({method:a,args:u,resolve:()=>{}}),this.fallbacks[a](...u)):(...u)=>new Promise(l=>{this.targetQueue.push({method:a,args:u,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 Ac(e,t){const n=e,r=Dc(),o=Wv(),s=zv&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Kv,e,t);else{const i=s?new Xv(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var xe={};let No;const So=e=>No=e,Vc=xe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function pr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Gt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Gt||(Gt={}));const hr=typeof window<"u",Rc=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 Qv(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 ga(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Mc(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function jc(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ls(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 Ms=typeof navigator=="object"?navigator:{userAgent:""},Lc=/Macintosh/.test(Ms.userAgent)&&/AppleWebKit/.test(Ms.userAgent)&&!/Safari/.test(Ms.userAgent),Mc=hr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Lc?eg:"msSaveOrOpenBlob"in Ms?tg:ng:()=>{};function eg(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?jc(r.href)?ga(e,t,n):(r.target="_blank",Ls(r)):Ls(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ls(r)},0))}function tg(e,t="download",n){if(typeof e=="string")if(jc(e))ga(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Ls(r)})}else navigator.msSaveOrOpenBlob(Qv(e,n),t)}function ng(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return ga(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Rc.HTMLElement))||"safari"in Rc,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Lc)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let u=a.result;if(typeof u!="string")throw r=null,new Error("Wrong reader.result type");u=i?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=u:location.assign(u),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 ya(e){return"_a"in e&&"install"in e}function Uc(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function Fc(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 rg(e){if(!Uc())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(Fc(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function og(e){if(!Uc())try{Bc(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(Fc(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function sg(e){try{Mc(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 hn;function ig(){hn||(hn=document.createElement("input"),hn.type="file",hn.accept=".json");function e(){return new Promise((t,n)=>{hn.onchange=async()=>{const r=hn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},hn.oncancel=()=>t(null),hn.onerror=n,hn.click()})}return e}async function ag(e){try{const n=await ig()();if(!n)return;const{text:r,file:o}=n;Bc(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 Bc(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 Rt(e){return{_custom:{display:e}}}const Hc="🍍 Pinia (root)",Us="_root";function lg(e){return ya(e)?{id:Us,label:Hc}:{id:e.$id,label:e.$id}}function ug(e){if(ya(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,u)=>(a[u]=i[u],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 cg(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:Rt(e.type),key:Rt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function dg(e){switch(e){case Gt.direct:return"mutation";case Gt.patchFunction:return"$patch";case Gt.patchObject:return"$patch";default:return"unknown"}}let Dr=!0;const Fs=[],mr="pinia:mutations",pt="pinia",{assign:fg}=Object,Bs=e=>"🍍 "+e;function pg(e,t){Ac({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Fs,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:mr,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{rg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await og(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{sg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await ag(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:Bs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:he(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((u,l)=>(u[l]=a.$state[l],u),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:Bs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((u,l)=>{try{u[l]=a[l]}catch(c){u[l]=c}return u},{})})})}}),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()):Hc.toLowerCase().includes(r.filter.toLowerCase())):o).map(lg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Us?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Us&&(globalThis.$store=he(o)),r.state=ug(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Us?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;ya(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Dr=!1,r.set(s,i,r.state.value),Dr=!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 yt=Lm;function Nm(e){return Sm(e)}function Sm(e,t){Om();const n=gi();n.__VUE__=!0,g.NODE_ENV!=="production"&&au(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=We,insertStaticContent:v}=e,w=(p,h,N,j=null,P=null,M=null,G=void 0,Z=null,W=g.NODE_ENV!=="production"&&Pn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!ur(p,h)&&(j=ei(p),bt(p,P,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:V,ref:X,shapeFlag:le}=h;switch(V){case go:S(p,h,N,j);break;case Ke:L(p,h,N,j);break;case yo:p==null?F(h,N,j,G):g.NODE_ENV!=="production"&&T(p,h,N,G);break;case Pe:oe(p,h,N,j,P,M,G,Z,W);break;default:le&1?H(p,h,N,j,P,M,G,Z,W):le&6?_(p,h,N,j,P,M,G,Z,W):le&64||le&128?V.process(p,h,N,j,P,M,G,Z,W,Ao):g.NODE_ENV!=="production"&&U("Invalid VNode type:",V,`(${typeof V})`)}X!=null&&P&&Ji(X,p&&p.ref,M,h||p,!h)},S=(p,h,N,j)=>{if(p==null)r(h.el=a(h.children),N,j);else{const P=h.el=p.el;h.children!==p.children&&u(P,h.children)}},L=(p,h,N,j)=>{p==null?r(h.el=l(h.children||""),N,j):h.el=p.el},F=(p,h,N,j)=>{[p.el,p.anchor]=v(p.children,h,N,j,p.el,p.anchor)},T=(p,h,N,j)=>{if(h.children!==p.children){const P=f(p.anchor);C(p),[h.el,h.anchor]=v(h.children,N,P,j)}else h.el=p.el,h.anchor=p.anchor},K=({el:p,anchor:h},N,j)=>{let P;for(;p&&p!==h;)P=f(p),r(p,N,j),p=P;r(h,N,j)},C=({el:p,anchor:h})=>{let N;for(;p&&p!==h;)N=f(p),o(p),p=N;o(h)},H=(p,h,N,j,P,M,G,Z,W)=>{h.type==="svg"?G="svg":h.type==="math"&&(G="mathml"),p==null?E(h,N,j,P,M,G,Z,W):D(p,h,P,M,G,Z,W)},E=(p,h,N,j,P,M,G,Z)=>{let W,V;const{props:X,shapeFlag:le,transition:se,dirs:_e}=p;if(W=p.el=i(p.type,M,X&&X.is,X),le&8?c(W,p.children):le&16&&J(p.children,W,null,j,P,Xi(p,M),G,Z),_e&&rr(p,null,j,"created"),de(W,p,p.scopeId,G,j),X){for(const Me in X)Me!=="value"&&!to(Me)&&s(W,Me,null,X[Me],M,j);"value"in X&&s(W,"value",null,X.value,M),(V=X.onVnodeBeforeMount)&&zt(V,j,p)}g.NODE_ENV!=="production"&&(Qo(W,"__vnode",p,!0),Qo(W,"__vueParentComponent",j,!0)),_e&&rr(p,null,j,"beforeMount");const Se=xm(P,se);Se&&se.beforeEnter(W),r(W,h,N),((V=X&&X.onVnodeMounted)||Se||_e)&&yt(()=>{V&&zt(V,j,p),Se&&se.enter(W),_e&&rr(p,null,j,"mounted")},P)},de=(p,h,N,j,P)=>{if(N&&m(p,N),j)for(let M=0;M<j.length;M++)m(p,j[M]);if(P){let M=P.subTree;if(g.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=na(M.children)||M),h===M){const G=P.vnode;de(p,G,G.scopeId,G.slotScopeIds,P.parent)}}},J=(p,h,N,j,P,M,G,Z,W=0)=>{for(let V=W;V<p.length;V++){const X=p[V]=Z?Dn(p[V]):Vt(p[V]);w(null,X,h,N,j,P,M,G,Z)}},D=(p,h,N,j,P,M,G)=>{const Z=h.el=p.el;g.NODE_ENV!=="production"&&(Z.__vnode=h);let{patchFlag:W,dynamicChildren:V,dirs:X}=h;W|=p.patchFlag&16;const le=p.props||Re,se=h.props||Re;let _e;if(N&&ar(N,!1),(_e=se.onVnodeBeforeUpdate)&&zt(_e,N,h,p),X&&rr(h,p,N,"beforeUpdate"),N&&ar(N,!0),g.NODE_ENV!=="production"&&Pn&&(W=0,G=!1,V=null),(le.innerHTML&&se.innerHTML==null||le.textContent&&se.textContent==null)&&c(Z,""),V?(x(p.dynamicChildren,V,Z,N,j,Xi(h,P),M),g.NODE_ENV!=="production"&&vo(p,h)):G||ue(p,h,Z,null,N,j,Xi(h,P),M,!1),W>0){if(W&16)R(Z,le,se,N,P);else if(W&2&&le.class!==se.class&&s(Z,"class",null,se.class,P),W&4&&s(Z,"style",le.style,se.style,P),W&8){const Se=h.dynamicProps;for(let Me=0;Me<Se.length;Me++){const Ie=Se[Me],rt=le[Ie],Lt=se[Ie];(Lt!==rt||Ie==="value")&&s(Z,Ie,rt,Lt,P,N)}}W&1&&p.children!==h.children&&c(Z,h.children)}else!G&&V==null&&R(Z,le,se,N,P);((_e=se.onVnodeUpdated)||X)&&yt(()=>{_e&&zt(_e,N,h,p),X&&rr(h,p,N,"updated")},j)},x=(p,h,N,j,P,M,G)=>{for(let Z=0;Z<h.length;Z++){const W=p[Z],V=h[Z],X=W.el&&(W.type===Pe||!ur(W,V)||W.shapeFlag&70)?d(W.el):N;w(W,V,X,null,j,P,M,G,!0)}},R=(p,h,N,j,P)=>{if(h!==N){if(h!==Re)for(const M in h)!to(M)&&!(M in N)&&s(p,M,h[M],null,P,j);for(const M in N){if(to(M))continue;const G=N[M],Z=h[M];G!==Z&&M!=="value"&&s(p,M,Z,G,P,j)}"value"in N&&s(p,"value",h.value,N.value,P)}},oe=(p,h,N,j,P,M,G,Z,W)=>{const V=h.el=p?p.el:a(""),X=h.anchor=p?p.anchor:a("");let{patchFlag:le,dynamicChildren:se,slotScopeIds:_e}=h;g.NODE_ENV!=="production"&&(Pn||le&2048)&&(le=0,W=!1,se=null),_e&&(Z=Z?Z.concat(_e):_e),p==null?(r(V,N,j),r(X,N,j),J(h.children||[],N,X,P,M,G,Z,W)):le>0&&le&64&&se&&p.dynamicChildren?(x(p.dynamicChildren,se,N,P,M,G,Z),g.NODE_ENV!=="production"?vo(p,h):(h.key!=null||P&&h===P.subTree)&&vo(p,h,!0)):ue(p,h,N,X,P,M,G,Z,W)},_=(p,h,N,j,P,M,G,Z,W)=>{h.slotScopeIds=Z,p==null?h.shapeFlag&512?P.ctx.activate(h,N,j,G,W):k(h,N,j,P,M,G,W):te(p,h,W)},k=(p,h,N,j,P,M,G)=>{const Z=p.component=qm(p,j,P);if(g.NODE_ENV!=="production"&&Z.type.__hmrId&&wh(Z),g.NODE_ENV!=="production"&&(fs(p),cn(Z,"mount")),po(p)&&(Z.ctx.renderer=Ao),g.NODE_ENV!=="production"&&cn(Z,"init"),zm(Z,!1,G),g.NODE_ENV!=="production"&&dn(Z,"init"),Z.asyncDep){if(P&&P.registerDep(Z,ae,G),!p.el){const W=Z.subTree=q(Ke);L(null,W,h,N)}}else ae(Z,p,h,N,P,M,G);g.NODE_ENV!=="production"&&(ps(),dn(Z,"mount"))},te=(p,h,N)=>{const j=h.component=p.component;if(Vm(p,h,N))if(j.asyncDep&&!j.asyncResolved){g.NODE_ENV!=="production"&&fs(h),ne(j,h,N),g.NODE_ENV!=="production"&&ps();return}else j.next=h,_h(j.update),j.effect.dirty=!0,j.update();else h.el=p.el,j.vnode=h},ae=(p,h,N,j,P,M,G)=>{const Z=()=>{if(p.isMounted){let{next:X,bu:le,u:se,parent:_e,vnode:Se}=p;{const jr=zu(p);if(jr){X&&(X.el=Se.el,ne(p,X,G)),jr.asyncDep.then(()=>{p.isUnmounted||Z()});return}}let Me=X,Ie;g.NODE_ENV!=="production"&&fs(X||p.vnode),ar(p,!1),X?(X.el=Se.el,ne(p,X,G)):X=Se,le&&no(le),(Ie=X.props&&X.props.onVnodeBeforeUpdate)&&zt(Ie,_e,X,Se),ar(p,!0),g.NODE_ENV!=="production"&&cn(p,"render");const rt=ta(p);g.NODE_ENV!=="production"&&dn(p,"render");const Lt=p.subTree;p.subTree=rt,g.NODE_ENV!=="production"&&cn(p,"patch"),w(Lt,rt,d(Lt.el),ei(Lt),p,P,M),g.NODE_ENV!=="production"&&dn(p,"patch"),X.el=rt.el,Me===null&&Rm(p,rt.el),se&&yt(se,P),(Ie=X.props&&X.props.onVnodeUpdated)&&yt(()=>zt(Ie,_e,X,Se),P),g.NODE_ENV!=="production"&&lu(p),g.NODE_ENV!=="production"&&ps()}else{let X;const{el:le,props:se}=h,{bm:_e,m:Se,parent:Me}=p,Ie=fo(h);if(ar(p,!1),_e&&no(_e),!Ie&&(X=se&&se.onVnodeBeforeMount)&&zt(X,Me,h),ar(p,!0),le&&Md){const rt=()=>{g.NODE_ENV!=="production"&&cn(p,"render"),p.subTree=ta(p),g.NODE_ENV!=="production"&&dn(p,"render"),g.NODE_ENV!=="production"&&cn(p,"hydrate"),Md(le,p.subTree,p,P,null),g.NODE_ENV!=="production"&&dn(p,"hydrate")};Ie?h.type.__asyncLoader().then(()=>!p.isUnmounted&&rt()):rt()}else{g.NODE_ENV!=="production"&&cn(p,"render");const rt=p.subTree=ta(p);g.NODE_ENV!=="production"&&dn(p,"render"),g.NODE_ENV!=="production"&&cn(p,"patch"),w(null,rt,N,j,p,P,M),g.NODE_ENV!=="production"&&dn(p,"patch"),h.el=rt.el}if(Se&&yt(Se,P),!Ie&&(X=se&&se.onVnodeMounted)){const rt=h;yt(()=>zt(X,Me,rt),P)}(h.shapeFlag&256||Me&&fo(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&yt(p.a,P),p.isMounted=!0,g.NODE_ENV!=="production"&&Th(p),h=N=j=null}},W=p.effect=new bi(Z,We,()=>hs(V),p.scope),V=p.update=()=>{W.dirty&&W.run()};V.i=p,V.id=p.uid,ar(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>no(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>no(p.rtg,X):void 0),V()},ne=(p,h,N)=>{h.component=p;const j=p.vnode.props;p.vnode=h,p.next=null,lm(p,h.props,j,N),ym(p,h.children,N),nn(),nu(p),rn()},ue=(p,h,N,j,P,M,G,Z,W=!1)=>{const V=p&&p.children,X=p?p.shapeFlag:0,le=h.children,{patchFlag:se,shapeFlag:_e}=h;if(se>0){if(se&128){De(V,le,N,j,P,M,G,Z,W);return}else if(se&256){Te(V,le,N,j,P,M,G,Z,W);return}}_e&8?(X&16&&Do(V,P,M),le!==V&&c(N,le)):X&16?_e&16?De(V,le,N,j,P,M,G,Z,W):Do(V,P,M,!0):(X&8&&c(N,""),_e&16&&J(le,N,j,P,M,G,Z,W))},Te=(p,h,N,j,P,M,G,Z,W)=>{p=p||kr,h=h||kr;const V=p.length,X=h.length,le=Math.min(V,X);let se;for(se=0;se<le;se++){const _e=h[se]=W?Dn(h[se]):Vt(h[se]);w(p[se],_e,N,null,P,M,G,Z,W)}V>X?Do(p,P,M,!0,!1,le):J(h,N,j,P,M,G,Z,W,le)},De=(p,h,N,j,P,M,G,Z,W)=>{let V=0;const X=h.length;let le=p.length-1,se=X-1;for(;V<=le&&V<=se;){const _e=p[V],Se=h[V]=W?Dn(h[V]):Vt(h[V]);if(ur(_e,Se))w(_e,Se,N,null,P,M,G,Z,W);else break;V++}for(;V<=le&&V<=se;){const _e=p[le],Se=h[se]=W?Dn(h[se]):Vt(h[se]);if(ur(_e,Se))w(_e,Se,N,null,P,M,G,Z,W);else break;le--,se--}if(V>le){if(V<=se){const _e=se+1,Se=_e<X?h[_e].el:j;for(;V<=se;)w(null,h[V]=W?Dn(h[V]):Vt(h[V]),N,Se,P,M,G,Z,W),V++}}else if(V>se)for(;V<=le;)bt(p[V],P,M,!0),V++;else{const _e=V,Se=V,Me=new Map;for(V=Se;V<=se;V++){const gt=h[V]=W?Dn(h[V]):Vt(h[V]);gt.key!=null&&(g.NODE_ENV!=="production"&&Me.has(gt.key)&&U("Duplicate keys found during update:",JSON.stringify(gt.key),"Make sure keys are unique."),Me.set(gt.key,V))}let Ie,rt=0;const Lt=se-Se+1;let jr=!1,Ud=0;const Vo=new Array(Lt);for(V=0;V<Lt;V++)Vo[V]=0;for(V=_e;V<=le;V++){const gt=p[V];if(rt>=Lt){bt(gt,P,M,!0);continue}let Yt;if(gt.key!=null)Yt=Me.get(gt.key);else for(Ie=Se;Ie<=se;Ie++)if(Vo[Ie-Se]===0&&ur(gt,h[Ie])){Yt=Ie;break}Yt===void 0?bt(gt,P,M,!0):(Vo[Yt-Se]=V+1,Yt>=Ud?Ud=Yt:jr=!0,w(gt,h[Yt],N,null,P,M,G,Z,W),rt++)}const Fd=jr?Tm(Vo):kr;for(Ie=Fd.length-1,V=Lt-1;V>=0;V--){const gt=Se+V,Yt=h[gt],Bd=gt+1<X?h[gt+1].el:j;Vo[V]===0?w(null,Yt,N,Bd,P,M,G,Z,W):jr&&(Ie<0||V!==Fd[Ie]?nt(Yt,N,Bd,2):Ie--)}}},nt=(p,h,N,j,P=null)=>{const{el:M,type:G,transition:Z,children:W,shapeFlag:V}=p;if(V&6){nt(p.component.subTree,h,N,j);return}if(V&128){p.suspense.move(h,N,j);return}if(V&64){G.move(p,h,N,Ao);return}if(G===Pe){r(M,h,N);for(let le=0;le<W.length;le++)nt(W[le],h,N,j);r(p.anchor,h,N);return}if(G===yo){K(p,h,N);return}if(j!==2&&V&1&&Z)if(j===0)Z.beforeEnter(M),r(M,h,N),yt(()=>Z.enter(M),P);else{const{leave:le,delayLeave:se,afterLeave:_e}=Z,Se=()=>r(M,h,N),Me=()=>{le(M,()=>{Se(),_e&&_e()})};se?se(M,Se,Me):Me()}else r(M,h,N)},bt=(p,h,N,j=!1,P=!1)=>{const{type:M,props:G,ref:Z,children:W,dynamicChildren:V,shapeFlag:X,patchFlag:le,dirs:se,cacheIndex:_e}=p;if(le===-2&&(P=!1),Z!=null&&Ji(Z,null,N,p,!0),_e!=null&&(h.renderCache[_e]=void 0),X&256){h.ctx.deactivate(p);return}const Se=X&1&&se,Me=!fo(p);let Ie;if(Me&&(Ie=G&&G.onVnodeBeforeUnmount)&&zt(Ie,h,p),X&6)b1(p.component,N,j);else{if(X&128){p.suspense.unmount(N,j);return}Se&&rr(p,null,h,"beforeUnmount"),X&64?p.type.remove(p,h,N,Ao,j):V&&!V.hasOnce&&(M!==Pe||le>0&&le&64)?Do(V,h,N,!1,!0):(M===Pe&&le&384||!P&&X&16)&&Do(W,h,N),j&&gn(p)}(Me&&(Ie=G&&G.onVnodeUnmounted)||Se)&&yt(()=>{Ie&&zt(Ie,h,p),Se&&rr(p,null,h,"unmounted")},N)},gn=p=>{const{type:h,el:N,anchor:j,transition:P}=p;if(h===Pe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&P&&!P.persisted?p.children.forEach(G=>{G.type===Ke?o(G.el):gn(G)}):Zn(N,j);return}if(h===yo){C(p);return}const M=()=>{o(N),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(p.shapeFlag&1&&P&&!P.persisted){const{leave:G,delayLeave:Z}=P,W=()=>G(N,M);Z?Z(p.el,M,W):W()}else M()},Zn=(p,h)=>{let N;for(;p!==h;)N=f(p),o(p),p=N;o(h)},b1=(p,h,N)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&Eh(p);const{bum:j,scope:P,update:M,subTree:G,um:Z,m:W,a:V}=p;Ku(W),Ku(V),j&&no(j),P.stop(),M&&(M.active=!1,bt(G,p,h,N)),Z&&yt(Z,h),yt(()=>{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"&&kh(p)},Do=(p,h,N,j=!1,P=!1,M=0)=>{for(let G=M;G<p.length;G++)bt(p[G],h,N,j,P)},ei=p=>{if(p.shapeFlag&6)return ei(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),N=h&&h[Bu];return N?f(N):h};let Za=!1;const jd=(p,h,N)=>{p==null?h._vnode&&bt(h._vnode,null,null,!0):w(h._vnode||null,p,h,null,null,null,N),h._vnode=p,Za||(Za=!0,nu(),ru(),Za=!1)},Ao={p:w,um:bt,m:nt,r:gn,mt:k,mc:J,pc:ue,pbc:x,n:ei,o:e};let Ld,Md;return{render:jd,hydrate:Ld,createApp:om(jd,Ld)}}function Xi({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 ar({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function xm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vo(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]=Dn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&vo(i,a)),a.type===go&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ke&&!a.el&&(a.el=i.el)}}function Tm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function zu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zu(t)}function Ku(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const Cm=Symbol.for("v-scx"),km=()=>{{const e=Ce(Cm);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 Qi(e,null,t)}const Ss={};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."),Qi(e,t,n)}function Qi(e,t,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=Re){if(t&&s){const E=t;t=(...de)=>{E(...de),H()}}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=E=>{U("Invalid watch source: ",E,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=Ge,c=E=>r===!0?E:lr(E,r===!1?1:void 0);let d,f=!1,m=!1;if(Be(e)?(d=()=>e.value,f=an(e)):on(e)?(d=()=>c(e),f=!0):ie(e)?(m=!0,f=e.some(E=>on(E)||an(E)),d=()=>e.map(E=>{if(Be(E))return E.value;if(on(E))return c(E);if(fe(E))return ln(E,u,2);g.NODE_ENV!=="production"&&l(E)})):fe(e)?t?d=()=>ln(e,u,2):d=()=>(v&&v(),xt(e,u,3,[w])):(d=We,g.NODE_ENV!=="production"&&l(e)),t&&r){const E=d;d=()=>lr(E())}let v,w=E=>{v=K.onStop=()=>{ln(E,u,4),v=K.onStop=void 0}},S;if($s)if(w=We,t?n&&xt(t,u,3,[d(),m?[]:void 0,w]):d(),o==="sync"){const E=km();S=E.__watcherHandles||(E.__watcherHandles=[])}else return We;let L=m?new Array(e.length).fill(Ss):Ss;const F=()=>{if(!(!K.active||!K.dirty))if(t){const E=K.run();(r||f||(m?E.some((de,J)=>Sn(de,L[J])):Sn(E,L)))&&(v&&v(),xt(t,u,3,[E,L===Ss?void 0:m&&L[0]===Ss?[]:L,w]),L=E)}else K.run()};F.allowRecurse=!!t;let T;o==="sync"?T=F:o==="post"?T=()=>yt(F,u&&u.suspense):(F.pre=!0,u&&(F.id=u.uid),T=()=>hs(F));const K=new bi(d,We,T),C=Ol(),H=()=>{K.stop(),C&&pi(C.effects,K)};return g.NODE_ENV!=="production"&&(K.onTrack=i,K.onTrigger=a),t?n?F():L=K.run():o==="post"?yt(K.run.bind(K),u&&u.suspense):K.run(),S&&S.push(H),H}function Pm(e,t,n){const r=this.proxy,o=Ue(e)?e.includes(".")?Gu(r,e):()=>r[e]:e.bind(r,r);let s;fe(t)?s=t:(s=t.handler,n=t);const i=wo(this),a=Qi(o,s.bind(r),n);return i(),a}function Gu(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 lr(e,t=1/0,n){if(t<=0||!ke(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Be(e))lr(e.value,t,n);else if(ie(e))for(let r=0;r<e.length;r++)lr(e[r],t,n);else if(hl(e)||Gn(e))e.forEach(r=>{lr(r,t,n)});else if(vl(e)){for(const r in e)lr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&lr(e[r],t,n)}return e}const $m=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Et(t)}Modifiers`]||e[`${tn(t)}Modifiers`];function Im(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Re;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Yn(Et(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Yn(Et(t))}" prop.`);else{const f=c[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&&$m(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ue(c)?c.trim():c)),i.number&&(o=n.map(wp))),g.NODE_ENV!=="production"&&Ih(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[Yn(c)]&&U(`Event "${c}" is emitted in component ${Is(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 "${tn(t)}" instead of "${t}".`)}let a,l=r[a=Yn(t)]||r[a=Yn(Et(t))];!l&&s&&(l=r[a=Yn(tn(t))]),l&&xt(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,xt(u,e,6,o)}}function Ju(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 l=u=>{const c=Ju(u,t,!0);c&&(a=!0,qe(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(ke(e)&&r.set(e,null),null):(ie(s)?s.forEach(l=>i[l]=null):qe(i,s),ke(e)&&r.set(e,i),i)}function xs(e,t){return!e||!eo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,tn(t))||Ne(e,t))}let ea=!1;function Ts(){ea=!0}function ta(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:v,inheritAttrs:w}=e,S=ys(e);let L,F;g.NODE_ENV!=="production"&&(ea=!1);try{if(n.shapeFlag&4){const C=o||r,H=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(C,{get(E,de,J){return U(`Property '${String(de)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(E,de,J)}}):C;L=Vt(u.call(H,C,c,g.NODE_ENV!=="production"?Zt(d):d,m,f,v)),F=a}else{const C=t;g.NODE_ENV!=="production"&&a===d&&Ts(),L=Vt(C.length>1?C(g.NODE_ENV!=="production"?Zt(d):d,g.NODE_ENV!=="production"?{get attrs(){return Ts(),Zt(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):C(g.NODE_ENV!=="production"?Zt(d):d,null)),F=t.props?a:Dm(a)}}catch(C){_o.length=0,so(C,e,1),L=q(Ke)}let T=L,K;if(g.NODE_ENV!=="production"&&L.patchFlag>0&&L.patchFlag&2048&&([T,K]=Yu(L)),F&&w!==!1){const C=Object.keys(F),{shapeFlag:H}=T;if(C.length){if(H&7)s&&C.some(Jo)&&(F=Am(F,s)),T=At(T,F,!1,!0);else if(g.NODE_ENV!=="production"&&!ea&&T.type!==Ke){const E=Object.keys(a),de=[],J=[];for(let D=0,x=E.length;D<x;D++){const R=E[D];eo(R)?Jo(R)||de.push(R[2].toLowerCase()+R.slice(3)):J.push(R)}J.length&&U(`Extraneous non-props attributes (${J.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"&&!Xu(T)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=At(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Xu(T)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),T.transition=n.transition),g.NODE_ENV!=="production"&&K?K(T):L=T,ys(S),L}const Yu=e=>{const t=e.children,n=e.dynamicChildren,r=na(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Yu(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[Vt(r),i]};function na(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Ir(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 na(n.children)}}else return}return n}const Dm=e=>{let t;for(const n in e)(n==="class"||n==="style"||eo(n))&&((t||(t={}))[n]=e[n]);return t},Am=(e,t)=>{const n={};for(const r in e)(!Jo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Xu=e=>e.shapeFlag&7||e.type===Ke;function Vm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Pn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Qu(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!xs(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Qu(r,i,u):!0:!!i;return!1}function Qu(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]&&!xs(n,s))return!0}return!1}function Rm({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 jm=e=>e.__isSuspense;function Lm(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):tu(e)}const Pe=Symbol.for("v-fgt"),go=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),yo=Symbol.for("v-stc"),_o=[];let Nt=null;function O(e=!1){_o.push(Nt=e?null:[])}function Mm(){_o.pop(),Nt=_o[_o.length-1]||null}let bo=1;function ec(e){bo+=e,e<0&&Nt&&(Nt.hasOnce=!0)}function tc(e){return e.dynamicChildren=bo>0?Nt||kr:null,Mm(),bo>0&&Nt&&Nt.push(e),e}function A(e,t,n,r,o,s){return tc(I(e,t,n,r,o,s,!0))}function $e(e,t,n,r,o){return tc(q(e,t,n,r,o,!0))}function Ir(e){return e?e.__v_isVNode===!0:!1}function ur(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ms.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 Um=(...e)=>rc(...e),nc=({key:e})=>e??null,Cs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ue(e)||Be(e)||fe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function I(e,t=null,n=null,r=0,o=null,s=e===Pe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nc(t),ref:t&&Cs(t),scopeId:gs,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?(ra(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ue(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&U("VNode created with invalid key (NaN). VNode type:",l.type),bo>0&&!i&&Nt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Nt.push(l),l}const q=g.NODE_ENV!=="production"?Um:rc;function rc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===yu)&&(g.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Ke),Ir(e)){const a=At(e,t,!0);return n&&ra(a,n),bo>0&&!s&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(cc(e)&&(e=e.__vccOpts),t){t=Fm(t);let{class:a,style:l}=t;a&&!Ue(a)&&(t.class=es(a)),ke(l)&&(cs(l)&&!ie(l)&&(l=qe({},l)),t.style=yi(l))}const i=Ue(e)?1:jm(e)?128:_m(e)?64:ke(e)?4:fe(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&cs(e)&&(e=he(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)),I(e,t,n,r,o,i,s,!0)}function Fm(e){return e?cs(e)||Iu(e)?qe({},e):e:null}function At(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?oa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&nc(u),ref:t&&t.ref?n&&s?ie(s)?s.concat(Cs(t)):[s,Cs(t)]:Cs(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ie(a)?a.map(oc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?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&&At(e.ssContent),ssFallback:e.ssFallback&&At(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&bs(c,l.clone(c)),c}function oc(e){const t=At(e);return ie(e.children)&&(t.children=e.children.map(oc)),t}function Fe(e=" ",t=0){return q(go,null,e,t)}function Bm(e,t){const n=q(yo,null,e);return n.staticCount=t,n}function ye(e="",t=!1){return t?(O(),$e(Ke,null,e)):q(Ke,null,e)}function Vt(e){return e==null||typeof e=="boolean"?q(Ke):ie(e)?q(Pe,null,e.slice()):typeof e=="object"?Dn(e):q(go,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:At(e)}function ra(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),ra(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Iu(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=[Fe(t)]):n=8);e.children=t,e.shapeFlag|=n}function oa(...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=es([t.class,r.class]));else if(o==="style")t.style=yi([t.style,r.style]);else if(eo(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 zt(e,t,n,r=null){xt(e,t,7,[n,r])}const Hm=ku();let Zm=0;function qm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Hm,s={uid:Zm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new wl(!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:Au(r,o),emitsOptions:Ju(r,o),emit:null,emitted:null,propsDefaults:Re,inheritAttrs:r.inheritAttrs,ctx:Re,data:Re,props:Re,attrs:Re,slots:Re,refs:Re,setupState:Re,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=Kh(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Im.bind(null,s),e.ce&&e.ce(s),s}let Ge=null;const ks=()=>Ge||Ye;let Ps,sa;{const e=gi(),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)}};Ps=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),sa=t("__VUE_SSR_SETTERS__",n=>$s=n)}const wo=e=>{const t=Ge;return Ps(e),e.scope.on(),()=>{e.scope.off(),Ps(t)}},sc=()=>{Ge&&Ge.scope.off(),Ps(null)},Wm=en("slot,component");function ia(e,{isNativeTag:t}){(Wm(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function ic(e){return e.vnode.shapeFlag&4}let $s=!1;function zm(e,t=!1,n=!1){t&&sa(t);const{props:r,children:o}=e.vnode,s=ic(e);im(e,r,s,t),gm(e,o,n);const i=s?Km(e,t):void 0;return t&&sa(!1),i}function Km(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&ia(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)ia(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)cu(s[i])}r.compilerOptions&&Gm()&&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,Ou),g.NODE_ENV!=="production"&&Gh(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Ym(e):null,i=wo(e);nn();const a=ln(o,e,0,[g.NODE_ENV!=="production"?Zt(e.props):e.props,s]);if(rn(),i(),hi(a)){if(a.then(sc,sc),t)return a.then(l=>{ac(e,l,t)}).catch(l=>{so(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 ac(e,a,t)}else lc(e,t)}function ac(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ke(t)?(g.NODE_ENV!=="production"&&Ir(t)&&U("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Gl(t),g.NODE_ENV!=="production"&&Jh(e)):g.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),lc(e,n)}let aa;const Gm=()=>!aa;function lc(e,t,n){const r=e.type;if(!e.render){if(!t&&aa&&!r.render){const o=r.template||qi(e).template;if(o){g.NODE_ENV!=="production"&&cn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=qe(qe({isCustomElement:s,delimiters:a},i),l);r.render=aa(o,u),g.NODE_ENV!=="production"&&dn(e,"compile")}}e.render=r.render||We}{const o=wo(e);nn();try{Xh(e)}finally{rn(),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 uc=g.NODE_ENV!=="production"?{get(e,t){return Ts(),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 Jm(e){return new Proxy(e.slots,{get(t,n){return ot(e,"get","$slots"),t[n]}})}function Ym(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":Be(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,uc))},get slots(){return r||(r=Jm(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,uc),slots:e.slots,emit:e.emit,expose:t}}function la(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Gl(Cn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in or)return or[n](e)},has(t,n){return n in t||n in or}})):e.proxy}const Xm=/(?:^|[-_])(\w)/g,Qm=e=>e.replace(Xm,t=>t.toUpperCase()).replace(/[-_]/g,"");function ua(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Is(e,t,n=!1){let r=ua(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?Qm(r):n?"App":"Anonymous"}function cc(e){return fe(e)&&"__vccOpts"in e}const Y=(e,t)=>{const n=oh(e,t,$s);if(g.NODE_ENV!=="production"){const r=ks();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ae(e,t,n){const r=arguments.length;return r===2?ke(t)&&!ie(t)?Ir(t)?q(e,null,[t]):q(e,t):q(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ir(n)&&(n=[n]),q(e,t,n))}function ev(){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 ke(d)?d.__isVue?["div",e,"VueInstance"]:Be(d)?["div",{},["span",e,c(d)],"<",a(d.value),">"]:on(d)?["div",{},["span",e,an(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${sn(d)?" (readonly)":""}`]:sn(d)?["div",{},["span",e,an(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",he(d.props))),d.setupState!==Re&&f.push(i("setup",d.setupState)),d.data!==Re&&f.push(i("data",he(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const v=l(d,"inject");return v&&f.push(i("injected",v)),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]:ke(d)?["object",{object:f?he(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(fe(m))return;const v={};for(const w in d.ctx)u(m,w,f)&&(v[w]=d.ctx[w]);return v}function u(d,f,m){const v=d[m];if(ie(v)&&v.includes(f)||ke(v)&&f in v||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(w=>u(w,f,m)))return!0}function c(d){return an(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const dc="3.4.38",An=g.NODE_ENV!=="production"?U:We;var fn={};const tv="http://www.w3.org/2000/svg",nv="http://www.w3.org/1998/Math/MathML",pn=typeof document<"u"?document:null,fc=pn&&pn.createElement("template"),rv={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"?pn.createElementNS(tv,e):t==="mathml"?pn.createElementNS(nv,e):n?pn.createElement(e,{is:n}):pn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>pn.createTextNode(e),createComment:e=>pn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pn.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{fc.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=fc.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]}},Vn="transition",Eo="animation",Oo=Symbol("_vtc"),Ds=(e,{slots:t})=>Ae(Rh,ov(e),t);Ds.displayName="Transition";const pc={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};Ds.props=qe({},du,pc);const cr=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},hc=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function ov(e){const t={};for(const R in e)R in pc||(t[R]=e[R]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,v=sv(o),w=v&&v[0],S=v&&v[1],{onBeforeEnter:L,onEnter:F,onEnterCancelled:T,onLeave:K,onLeaveCancelled:C,onBeforeAppear:H=L,onAppear:E=F,onAppearCancelled:de=T}=t,J=(R,oe,_)=>{dr(R,oe?c:a),dr(R,oe?u:i),_&&_()},D=(R,oe)=>{R._isLeaving=!1,dr(R,d),dr(R,m),dr(R,f),oe&&oe()},x=R=>(oe,_)=>{const k=R?E:F,te=()=>J(oe,R,_);cr(k,[oe,te]),mc(()=>{dr(oe,R?l:s),Rn(oe,R?c:a),hc(k)||vc(oe,r,w,te)})};return qe(t,{onBeforeEnter(R){cr(L,[R]),Rn(R,s),Rn(R,i)},onBeforeAppear(R){cr(H,[R]),Rn(R,l),Rn(R,u)},onEnter:x(!1),onAppear:x(!0),onLeave(R,oe){R._isLeaving=!0;const _=()=>D(R,oe);Rn(R,d),Rn(R,f),lv(),mc(()=>{R._isLeaving&&(dr(R,d),Rn(R,m),hc(K)||vc(R,r,S,_))}),cr(K,[R,_])},onEnterCancelled(R){J(R,!1),cr(T,[R])},onAppearCancelled(R){J(R,!0),cr(de,[R])},onLeaveCancelled(R){D(R),cr(C,[R])}})}function sv(e){if(e==null)return null;if(ke(e))return[ca(e.enter),ca(e.leave)];{const t=ca(e);return[t,t]}}function ca(e){const t=Ep(e);return fn.NODE_ENV!=="production"&&mh(t,"<transition> explicit duration"),t}function Rn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Oo]||(e[Oo]=new Set)).add(t)}function dr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Oo];n&&(n.delete(t),n.size||(e[Oo]=void 0))}function mc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let iv=0;function vc(e,t,n,r){const o=e._endId=++iv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=av(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function av(e,t){const n=window.getComputedStyle(e),r=v=>(n[v]||"").split(", "),o=r(`${Vn}Delay`),s=r(`${Vn}Duration`),i=gc(o,s),a=r(`${Eo}Delay`),l=r(`${Eo}Duration`),u=gc(a,l);let c=null,d=0,f=0;t===Vn?i>0&&(c=Vn,d=i,f=s.length):t===Eo?u>0&&(c=Eo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Vn:Eo:null,f=c?c===Vn?s.length:l.length:0);const m=c===Vn&&/\b(transform|all)(,|$)/.test(r(`${Vn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function gc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>yc(n)+yc(e[r])))}function yc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function lv(){return document.body.offsetHeight}function uv(e,t,n){const r=e[Oo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _c=Symbol("_vod"),cv=Symbol("_vsh"),dv=Symbol(fn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),fv=/(^|;)\s*display\s*:/;function pv(e,t,n){const r=e.style,o=Ue(n);let s=!1;if(n&&!o){if(t)if(Ue(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&As(r,a,"")}else for(const i in t)n[i]==null&&As(r,i,"");for(const i in n)i==="display"&&(s=!0),As(r,i,n[i])}else if(o){if(t!==n){const i=r[dv];i&&(n+=";"+i),r.cssText=n,s=fv.test(n)}}else t&&e.removeAttribute("style");_c in e&&(e[_c]=s?r.display:"",e[cv]&&(r.display="none"))}const hv=/[^\\];\s*$/,bc=/\s*!important$/;function As(e,t,n){if(ie(n))n.forEach(r=>As(e,t,r));else if(n==null&&(n=""),fn.NODE_ENV!=="production"&&hv.test(n)&&An(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=mv(e,t);bc.test(n)?e.setProperty(tn(r),n.replace(bc,""),"important"):e[r]=n}}const wc=["Webkit","Moz","ms"],da={};function mv(e,t){const n=da[t];if(n)return n;let r=Et(t);if(r!=="filter"&&r in e)return da[t]=r;r=Jn(r);for(let o=0;o<wc.length;o++){const s=wc[o]+r;if(s in e)return da[t]=s}return t}const Ec="http://www.w3.org/1999/xlink";function Oc(e,t,n,r,o,s=Dp(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ec,t.slice(6,t.length)):e.setAttributeNS(Ec,t,n):n==null||s&&!yl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Nn(n)?String(n):n)}function vv(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=yl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){fn.NODE_ENV!=="production"&&!s&&An(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function gv(e,t,n,r){e.addEventListener(t,n,r)}function yv(e,t,n,r){e.removeEventListener(t,n,r)}const Nc=Symbol("_vei");function _v(e,t,n,r,o=null){const s=e[Nc]||(e[Nc]={}),i=s[t];if(r&&i)i.value=fn.NODE_ENV!=="production"?xc(r,t):r;else{const[a,l]=bv(t);if(r){const u=s[t]=Ov(fn.NODE_ENV!=="production"?xc(r,t):r,o);gv(e,a,u,l)}else i&&(yv(e,a,i,l),s[t]=void 0)}}const Sc=/(?:Once|Passive|Capture)$/;function bv(e){let t;if(Sc.test(e)){t={};let r;for(;r=e.match(Sc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):tn(e.slice(2)),t]}let fa=0;const wv=Promise.resolve(),Ev=()=>fa||(wv.then(()=>fa=0),fa=Date.now());function Ov(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;xt(Nv(r,n.value),t,5,[r])};return n.value=e,n.attached=Ev(),n}function xc(e,t){return fe(e)||ie(e)?e:(An(`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 Nv(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 Tc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Sv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?uv(e,r,i):t==="style"?pv(e,n,r):eo(t)?Jo(t)||_v(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):xv(e,t,r,i))?(vv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Oc(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Oc(e,t,r,i))};function xv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Tc(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 Tc(t)&&Ue(n)?!1:t in e}const Tv=["ctrl","shift","alt","meta"],Cv={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)=>Tv.some(n=>e[`${n}Key`]&&!t.includes(n))},kv=(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=Cv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Pv=qe({patchProp:Sv},rv);let Cc;function $v(){return Cc||(Cc=Nm(Pv))}const Iv=(...e)=>{const t=$v().createApp(...e);fn.NODE_ENV!=="production"&&(Av(t),Vv(t));const{mount:n}=t;return t.mount=r=>{const o=Rv(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,Dv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Dv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Av(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Pp(t)||$p(t)||Ip(t),writable:!1})}function Vv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){An("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 An(r),n},set(){An(r)}})}}function Rv(e){if(Ue(e)){const t=document.querySelector(e);return fn.NODE_ENV!=="production"&&!t&&An(`Failed to mount app: mount target selector "${e}" returned null.`),t}return fn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&An('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var jv={};function Lv(){ev()}jv.NODE_ENV!=="production"&&Lv();let Vs;const Mv=new Uint8Array(16);function Uv(){if(!Vs&&(Vs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vs(Mv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Fv(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 kc={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pa(e,t,n){if(kc.randomUUID&&!t&&!e)return kc.randomUUID();e=e||{};const r=e.random||(e.rng||Uv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Fv(r)}var fr=Symbol("storefront");function Bv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Rs=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Y(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=$(null),this.loadedUser=$(!1),this.debouncedPushOrderContent=Bv(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=$({id:pa(),status:Qr.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=$(JSON.parse(i)),this.refreshOrder()):this.currentOrder=$({id:pa(),status:Qr.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);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.updateStorefront(),this.updateUser()}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})})}install(t){t.provide(fr,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 ai||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!==Qr.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:pa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Qr.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Rs.userKey="moonbase_user",Rs.sessionKey="moonbase_session",Rs.storefrontKey="moonbase_storefront";var Hv=Rs;function Pc(e,t){const n=t??Ce(fr);if(!n)throw new Error("No storefront configured");return Y(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function $c(e,t){const n=t??Ce(fr);if(!n)throw new Error("No storefront configured");return Y(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ha(e){const t=Ce(fr);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),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 Zv(e,t){const n=Ce(fr),r=ah(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),u=n.stateFactory(`activation-request-${r}-completion-timeout`,null),c=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ft.Completed,l.value=!1):u.value=setTimeout(c,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ft.Fulfilled&&(l.value=!0,c()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Mi(()=>{u.value&&clearTimeout(u.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===Ft.Fulfilled&&(l.value=!0,c())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:l,error:s,isInstalled:Y(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ft.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,l.value=!0,c()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,l.value=!0,c()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ft.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ma(e){const t=e??Ce(fr);if(!t)throw new Error("No storefront configured");return{items:Y(()=>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:Y(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Y(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(S=>S.id===s.productId),w=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(l=(a=w==null?void 0:w.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),w=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(d=(c=w==null?void 0:w.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=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(t.currentOrder.value=o,o.checkoutUrl&&typeof window<"u")window.location.href=o.checkoutUrl;else throw new Error("No checkout URL found")}}}function Kt(e){const t=e??Ce(fr);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>await t.client.identity.confirmEmailChange(n,r)}}function qv(e,t){const n={endpoint:e};return new Hv(n,new mp(n),(r,o)=>$(o))}var Ic=!1;function js(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 va(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Wv(){return Dc().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Dc(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const zv=typeof Proxy=="function",Kv="devtools-plugin:setup",Gv="plugin:settings:set";let Dr,ga;function Jv(){var e;return Dr!==void 0||(typeof window<"u"&&window.performance?(Dr=!0,ga=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Dr=!0,ga=globalThis.perf_hooks.performance):Dr=!1),Dr}function Yv(){return Jv()?ga.now():Date.now()}class Xv{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 Yv()}},n&&n.on(Gv,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Ac(e,t){const n=e,r=Dc(),o=Wv(),s=zv&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Kv,e,t);else{const i=s?new Xv(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var xe={};let No;const So=e=>No=e,Vc=xe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function pr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Gt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Gt||(Gt={}));const hr=typeof window<"u",Rc=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 Qv(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 ya(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Mc(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function jc(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ls(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 Ms=typeof navigator=="object"?navigator:{userAgent:""},Lc=/Macintosh/.test(Ms.userAgent)&&/AppleWebKit/.test(Ms.userAgent)&&!/Safari/.test(Ms.userAgent),Mc=hr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Lc?eg:"msSaveOrOpenBlob"in Ms?tg:ng:()=>{};function eg(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?jc(r.href)?ya(e,t,n):(r.target="_blank",Ls(r)):Ls(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ls(r)},0))}function tg(e,t="download",n){if(typeof e=="string")if(jc(e))ya(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Ls(r)})}else navigator.msSaveOrOpenBlob(Qv(e,n),t)}function ng(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return ya(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Rc.HTMLElement))||"safari"in Rc,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Lc)&&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 _a(e){return"_a"in e&&"install"in e}function Uc(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function Fc(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 rg(e){if(!Uc())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(Fc(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function og(e){if(!Uc())try{Bc(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(Fc(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function sg(e){try{Mc(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 hn;function ig(){hn||(hn=document.createElement("input"),hn.type="file",hn.accept=".json");function e(){return new Promise((t,n)=>{hn.onchange=async()=>{const r=hn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},hn.oncancel=()=>t(null),hn.onerror=n,hn.click()})}return e}async function ag(e){try{const n=await ig()();if(!n)return;const{text:r,file:o}=n;Bc(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 Bc(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 Rt(e){return{_custom:{display:e}}}const Hc="🍍 Pinia (root)",Us="_root";function lg(e){return _a(e)?{id:Us,label:Hc}:{id:e.$id,label:e.$id}}function ug(e){if(_a(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 cg(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:Rt(e.type),key:Rt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function dg(e){switch(e){case Gt.direct:return"mutation";case Gt.patchFunction:return"$patch";case Gt.patchObject:return"$patch";default:return"unknown"}}let Ar=!0;const Fs=[],mr="pinia:mutations",pt="pinia",{assign:fg}=Object,Bs=e=>"🍍 "+e;function pg(e,t){Ac({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Fs,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:mr,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{rg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await og(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{sg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await ag(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:Bs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:he(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:Bs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Hc.toLowerCase().includes(r.filter.toLowerCase())):o).map(lg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Us?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Us&&(globalThis.$store=he(o)),r.state=ug(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Us?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;_a(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Ar=!1,r.set(s,i,r.state.value),Ar=!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",Dr=!1,r.set(s,i,r.state.value),Dr=!0}})})}function hg(e,t){Fs.includes(Bs(t.$id))||Fs.push(Bs(t.$id)),Ac({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Fs,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:u,args:l})=>{const c=Zc++;n.addTimelineEvent({layerId:mr,event:{time:r(),title:"🛫 "+u,subtitle:"start",data:{store:Rt(t.$id),action:Rt(u),args:l},groupId:c}}),i(d=>{jn=void 0,n.addTimelineEvent({layerId:mr,event:{time:r(),title:"🛬 "+u,subtitle:"end",data:{store:Rt(t.$id),action:Rt(u),args:l,result:d},groupId:c}})}),a(d=>{jn=void 0,n.addTimelineEvent({layerId:mr,event:{time:r(),logType:"error",title:"💥 "+u,subtitle:"end",data:{store:Rt(t.$id),action:Rt(u),args:l,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Xe(()=>b(t[i]),(a,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Dr&&n.addTimelineEvent({layerId:mr,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:u},groupId:jn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Dr)return;const l={time:r(),title:dg(a),data:fg({store:Rt(t.$id)},cg(i)),groupId:jn};a===Gt.patchFunction?l.subtitle="⤵️":a===Gt.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:mr,event:l})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Cn(i=>{o(i),n.addTimelineEvent({layerId:mr,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Rt(t.$id),info:Rt("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 Zc=0,jn;function qc(e,t,n){const r=t.reduce((o,s)=>(o[s]=he(e)[s],o),{});for(const o in r)e[o]=function(){const s=Zc,i=n?new Proxy(e,{get(...u){return jn=s,Reflect.get(...u)},set(...u){return jn=s,Reflect.set(...u)}}):e;jn=s;const a=r[o].apply(i,arguments);return jn=void 0,a}}function mg({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){qc(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;he(t)._hotUpdate=function(o){r.apply(this,arguments),qc(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}hg(e,t)}}function vg(){const e=El(!0),t=e.run(()=>$({}));let n=[],r=[];const o=Cn({install(s){So(o),o._a=s,s.provide(Vc,o),s.config.globalProperties.$pinia=o,xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr&&pg(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Ic?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(mg),o}function Wc(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];pr(o)&&pr(r)&&!Be(r)&&!on(r)?e[n]=Wc(o,r):e[n]=r}return e}const zc=()=>{};function Kc(e,t,n,r=zc){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Ol()&&Vp(o),o}function Ar(e,...t){e.slice().forEach(n=>{n(...t)})}const gg=e=>e(),Gc=Symbol(),_a=Symbol();function ba(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];pr(o)&&pr(r)&&e.hasOwnProperty(n)&&!Be(r)&&!on(r)?e[n]=ba(o,r):e[n]=r}return e}const yg=xe.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function _g(e){return!pr(e)||!e.hasOwnProperty(yg)}const{assign:Ct}=Object;function Jc(e){return!!(Be(e)&&e.effect)}function Yc(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let u;function l(){!a&&(xe.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=xe.NODE_ENV!=="production"&&r?Jl($(o?o():{}).value):Jl(n.state.value[e]);return Ct(c,s,Object.keys(i||{}).reduce((d,f)=>(xe.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=Cn(Y(()=>{So(n);const g=n._s.get(e);return i[f].call(g,g)})),d),{}))}return u=wa(e,l,t,n,r,!0),u}function wa(e,t,n={},r,o,s){let i;const a=Ct({actions:{}},n);if(xe.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const u={deep:!0};xe.NODE_ENV!=="production"&&!Ic&&(u.onTrigger=D=>{l?g=D:l==!1&&!E._hotUpdating&&(Array.isArray(g)?g.push(D):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,c,d=[],f=[],g;const m=r.state.value[e];!s&&!m&&(xe.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const w=$({});let S;function L(D){let x;l=c=!1,xe.NODE_ENV!=="production"&&(g=[]),typeof D=="function"?(D(r.state.value[e]),x={type:Gt.patchFunction,storeId:e,events:g}):(ba(r.state.value[e],D),x={type:Gt.patchObject,payload:D,storeId:e,events:g});const R=S=Symbol();ao().then(()=>{S===R&&(l=!0)}),c=!0,Ar(d,x,r.state.value[e])}const F=s?function(){const{state:x}=n,R=x?x():{};this.$patch(oe=>{Ct(oe,R)})}:xe.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:zc;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const K=(D,x="")=>{if(Gc in D)return D[_a]=x,D;const R=function(){So(r);const oe=Array.from(arguments),_=[],k=[];function te(ue){_.push(ue)}function ae(ue){k.push(ue)}Ar(f,{args:oe,name:R[_a],store:E,after:te,onError:ae});let ne;try{ne=D.apply(this&&this.$id===e?this:E,oe)}catch(ue){throw Ar(k,ue),ue}return ne instanceof Promise?ne.then(ue=>(Ar(_,ue),ue)).catch(ue=>(Ar(k,ue),Promise.reject(ue))):(Ar(_,ne),ne)};return R[Gc]=!0,R[_a]=x,R},C=Cn({actions:{},getters:{},state:[],hotState:w}),H={_p:r,$id:e,$onAction:Kc.bind(null,f),$patch:L,$reset:F,$subscribe(D,x={}){const R=Kc(d,D,x.detached,()=>oe()),oe=i.run(()=>Xe(()=>r.state.value[e],_=>{(x.flush==="sync"?c:l)&&D({storeId:e,type:Gt.direct,events:g},_)},Ct({},u,x)));return R},$dispose:T},E=ro(xe.NODE_ENV!=="production"||xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr?Ct({_hmrPayload:C,_customProperties:Cn(new Set)},H):H);r._s.set(e,E);const J=(r._a&&r._a.runWithContext||gg)(()=>r._e.run(()=>(i=El()).run(()=>t({action:K}))));for(const D in J){const x=J[D];if(Be(x)&&!Jc(x)||on(x))xe.NODE_ENV!=="production"&&o?js(w.value,D,Ti(J,D)):s||(m&&_g(x)&&(Be(x)?x.value=m[D]:ba(x,m[D])),r.state.value[e][D]=x),xe.NODE_ENV!=="production"&&C.state.push(D);else if(typeof x=="function"){const R=xe.NODE_ENV!=="production"&&o?x:K(x,D);J[D]=R,xe.NODE_ENV!=="production"&&(C.actions[D]=x),a.actions[D]=x}else xe.NODE_ENV!=="production"&&Jc(x)&&(C.getters[D]=s?n.getters[D]:x,hr&&(J._getters||(J._getters=Cn([]))).push(D))}if(Ct(E,J),Ct(he(E),J),Object.defineProperty(E,"$state",{get:()=>xe.NODE_ENV!=="production"&&o?w.value:r.state.value[e],set:D=>{if(xe.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");L(x=>{Ct(x,D)})}}),xe.NODE_ENV!=="production"&&(E._hotUpdate=Cn(D=>{E._hotUpdating=!0,D._hmrPayload.state.forEach(x=>{if(x in E.$state){const R=D.$state[x],oe=E.$state[x];typeof R=="object"&&pr(R)&&pr(oe)?Wc(R,oe):D.$state[x]=oe}js(E,x,Ti(D.$state,x))}),Object.keys(E.$state).forEach(x=>{x in D.$state||ma(E,x)}),l=!1,c=!1,r.state.value[e]=Ti(D._hmrPayload,"hotState"),c=!0,ao().then(()=>{l=!0});for(const x in D._hmrPayload.actions){const R=D[x];js(E,x,K(R,x))}for(const x in D._hmrPayload.getters){const R=D._hmrPayload.getters[x],oe=s?Y(()=>(So(r),R.call(E,E))):R;js(E,x,oe)}Object.keys(E._hmrPayload.getters).forEach(x=>{x in D._hmrPayload.getters||ma(E,x)}),Object.keys(E._hmrPayload.actions).forEach(x=>{x in D._hmrPayload.actions||ma(E,x)}),E._hmrPayload=D._hmrPayload,E._getters=D._getters,E._hotUpdating=!1})),xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr){const D={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(x=>{Object.defineProperty(E,x,Ct({value:E[x]},D))})}return r._p.forEach(D=>{if(xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr){const x=i.run(()=>D({store:E,app:r._a,pinia:r,options:a}));Object.keys(x||{}).forEach(R=>E._customProperties.add(R)),Ct(E,x)}else Ct(E,i.run(()=>D({store:E,app:r._a,pinia:r,options:a})))}),xe.NODE_ENV!=="production"&&E.$state&&typeof E.$state=="object"&&typeof E.$state.constructor=="function"&&!E.$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",Ar=!1,r.set(s,i,r.state.value),Ar=!0}})})}function hg(e,t){Fs.includes(Bs(t.$id))||Fs.push(Bs(t.$id)),Ac({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Fs,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=Zc++;n.addTimelineEvent({layerId:mr,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Rt(t.$id),action:Rt(l),args:u},groupId:c}}),i(d=>{jn=void 0,n.addTimelineEvent({layerId:mr,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Rt(t.$id),action:Rt(l),args:u,result:d},groupId:c}})}),a(d=>{jn=void 0,n.addTimelineEvent({layerId:mr,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Rt(t.$id),action:Rt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Xe(()=>b(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Ar&&n.addTimelineEvent({layerId:mr,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:jn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Ar)return;const u={time:r(),title:dg(a),data:fg({store:Rt(t.$id)},cg(i)),groupId:jn};a===Gt.patchFunction?u.subtitle="⤵️":a===Gt.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:mr,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Cn(i=>{o(i),n.addTimelineEvent({layerId:mr,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Rt(t.$id),info:Rt("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 Zc=0,jn;function qc(e,t,n){const r=t.reduce((o,s)=>(o[s]=he(e)[s],o),{});for(const o in r)e[o]=function(){const s=Zc,i=n?new Proxy(e,{get(...l){return jn=s,Reflect.get(...l)},set(...l){return jn=s,Reflect.set(...l)}}):e;jn=s;const a=r[o].apply(i,arguments);return jn=void 0,a}}function mg({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){qc(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;he(t)._hotUpdate=function(o){r.apply(this,arguments),qc(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}hg(e,t)}}function vg(){const e=El(!0),t=e.run(()=>$({}));let n=[],r=[];const o=Cn({install(s){So(o),o._a=s,s.provide(Vc,o),s.config.globalProperties.$pinia=o,xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr&&pg(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Ic?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(mg),o}function Wc(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];pr(o)&&pr(r)&&!Be(r)&&!on(r)?e[n]=Wc(o,r):e[n]=r}return e}const zc=()=>{};function Kc(e,t,n,r=zc){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Ol()&&Vp(o),o}function Vr(e,...t){e.slice().forEach(n=>{n(...t)})}const gg=e=>e(),Gc=Symbol(),ba=Symbol();function wa(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];pr(o)&&pr(r)&&e.hasOwnProperty(n)&&!Be(r)&&!on(r)?e[n]=wa(o,r):e[n]=r}return e}const yg=xe.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function _g(e){return!pr(e)||!e.hasOwnProperty(yg)}const{assign:Ct}=Object;function Jc(e){return!!(Be(e)&&e.effect)}function Yc(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(xe.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=xe.NODE_ENV!=="production"&&r?Jl($(o?o():{}).value):Jl(n.state.value[e]);return Ct(c,s,Object.keys(i||{}).reduce((d,f)=>(xe.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=Cn(Y(()=>{So(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=Ea(e,u,t,n,r,!0),l}function Ea(e,t,n={},r,o,s){let i;const a=Ct({actions:{}},n);if(xe.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};xe.NODE_ENV!=="production"&&!Ic&&(l.onTrigger=D=>{u?m=D:u==!1&&!E._hotUpdating&&(Array.isArray(m)?m.push(D):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],m;const v=r.state.value[e];!s&&!v&&(xe.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const w=$({});let S;function L(D){let x;u=c=!1,xe.NODE_ENV!=="production"&&(m=[]),typeof D=="function"?(D(r.state.value[e]),x={type:Gt.patchFunction,storeId:e,events:m}):(wa(r.state.value[e],D),x={type:Gt.patchObject,payload:D,storeId:e,events:m});const R=S=Symbol();ao().then(()=>{S===R&&(u=!0)}),c=!0,Vr(d,x,r.state.value[e])}const F=s?function(){const{state:x}=n,R=x?x():{};this.$patch(oe=>{Ct(oe,R)})}:xe.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:zc;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const K=(D,x="")=>{if(Gc in D)return D[ba]=x,D;const R=function(){So(r);const oe=Array.from(arguments),_=[],k=[];function te(ue){_.push(ue)}function ae(ue){k.push(ue)}Vr(f,{args:oe,name:R[ba],store:E,after:te,onError:ae});let ne;try{ne=D.apply(this&&this.$id===e?this:E,oe)}catch(ue){throw Vr(k,ue),ue}return ne instanceof Promise?ne.then(ue=>(Vr(_,ue),ue)).catch(ue=>(Vr(k,ue),Promise.reject(ue))):(Vr(_,ne),ne)};return R[Gc]=!0,R[ba]=x,R},C=Cn({actions:{},getters:{},state:[],hotState:w}),H={_p:r,$id:e,$onAction:Kc.bind(null,f),$patch:L,$reset:F,$subscribe(D,x={}){const R=Kc(d,D,x.detached,()=>oe()),oe=i.run(()=>Xe(()=>r.state.value[e],_=>{(x.flush==="sync"?c:u)&&D({storeId:e,type:Gt.direct,events:m},_)},Ct({},l,x)));return R},$dispose:T},E=ro(xe.NODE_ENV!=="production"||xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr?Ct({_hmrPayload:C,_customProperties:Cn(new Set)},H):H);r._s.set(e,E);const J=(r._a&&r._a.runWithContext||gg)(()=>r._e.run(()=>(i=El()).run(()=>t({action:K}))));for(const D in J){const x=J[D];if(Be(x)&&!Jc(x)||on(x))xe.NODE_ENV!=="production"&&o?js(w.value,D,Ci(J,D)):s||(v&&_g(x)&&(Be(x)?x.value=v[D]:wa(x,v[D])),r.state.value[e][D]=x),xe.NODE_ENV!=="production"&&C.state.push(D);else if(typeof x=="function"){const R=xe.NODE_ENV!=="production"&&o?x:K(x,D);J[D]=R,xe.NODE_ENV!=="production"&&(C.actions[D]=x),a.actions[D]=x}else xe.NODE_ENV!=="production"&&Jc(x)&&(C.getters[D]=s?n.getters[D]:x,hr&&(J._getters||(J._getters=Cn([]))).push(D))}if(Ct(E,J),Ct(he(E),J),Object.defineProperty(E,"$state",{get:()=>xe.NODE_ENV!=="production"&&o?w.value:r.state.value[e],set:D=>{if(xe.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");L(x=>{Ct(x,D)})}}),xe.NODE_ENV!=="production"&&(E._hotUpdate=Cn(D=>{E._hotUpdating=!0,D._hmrPayload.state.forEach(x=>{if(x in E.$state){const R=D.$state[x],oe=E.$state[x];typeof R=="object"&&pr(R)&&pr(oe)?Wc(R,oe):D.$state[x]=oe}js(E,x,Ci(D.$state,x))}),Object.keys(E.$state).forEach(x=>{x in D.$state||va(E,x)}),u=!1,c=!1,r.state.value[e]=Ci(D._hmrPayload,"hotState"),c=!0,ao().then(()=>{u=!0});for(const x in D._hmrPayload.actions){const R=D[x];js(E,x,K(R,x))}for(const x in D._hmrPayload.getters){const R=D._hmrPayload.getters[x],oe=s?Y(()=>(So(r),R.call(E,E))):R;js(E,x,oe)}Object.keys(E._hmrPayload.getters).forEach(x=>{x in D._hmrPayload.getters||va(E,x)}),Object.keys(E._hmrPayload.actions).forEach(x=>{x in D._hmrPayload.actions||va(E,x)}),E._hmrPayload=D._hmrPayload,E._getters=D._getters,E._hotUpdating=!1})),xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr){const D={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(x=>{Object.defineProperty(E,x,Ct({value:E[x]},D))})}return r._p.forEach(D=>{if(xe.NODE_ENV!=="production"&&xe.NODE_ENV!=="test"&&hr){const x=i.run(()=>D({store:E,app:r._a,pinia:r,options:a}));Object.keys(x||{}).forEach(R=>E._customProperties.add(R)),Ct(E,x)}else Ct(E,i.run(()=>D({store:E,app:r._a,pinia:r,options:a})))}),xe.NODE_ENV!=="production"&&E.$state&&typeof E.$state=="object"&&typeof E.$state.constructor=="function"&&!E.$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 "${E.$id}".`),m&&s&&n.hydrate&&n.hydrate(E.$state,m),l=!0,c=!0,E}function bg(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,u){const l=sm();if(a=(xe.NODE_ENV==="test"&&No&&No._testing?null:a)||(l?ke(Vc,null):null),a&&So(a),xe.NODE_ENV!=="production"&&!No)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 "${E.$id}".`),v&&s&&n.hydrate&&n.hydrate(E.$state,v),u=!0,c=!0,E}function bg(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=sm();if(a=(xe.NODE_ENV==="test"&&No&&No._testing?null:a)||(u?Ce(Vc,null):null),a&&So(a),xe.NODE_ENV!=="production"&&!No)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=No,a._s.has(r)||(s?wa(r,t,o,a):Yc(r,o,a),xe.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(xe.NODE_ENV!=="production"&&u){const d="__hot:"+r,f=s?wa(d,t,o,a,!0):Yc(d,Ct({},o),a,!0);u._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(xe.NODE_ENV!=="production"&&hr){const d=ks();if(d&&d.proxy&&!u){const f=d.proxy,g="_pStores"in f?f._pStores:f._pStores={};g[r]=c}}return c}return i.$id=r,i}var Oe=(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))(Oe||{});const wg={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0}}},Ea=Symbol("options");var je=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(je||{});const He=bg("ui",()=>{const e=$("None"),t=$(null),n=$(null),r=$(null);function o(l,c,d){n.value=d??null,t.value=c,e.value=l}function s(l,c,d){r.value=[l,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const l=r.value;i(),ao(()=>{if(l){const[c,d,f]=l;n.value=f??null,t.value=d,e.value=c}})}function u(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:u}}),jt=e=>new Promise(t=>setTimeout(t,e)),Eg=["data-visible","data-location"],Og=Bm('<a href="https://moonbase.sh" target="_blank" class="moonbase:toolbar-action" data-action-width="narrow"><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></a>',1),Ng=["disabled"],Sg=me({__name:"Toolbar",setup(e){const t=$(!1),n=He(),r=Kt(),o=ke(Ea);return Ve(()=>{jt(100).then(()=>t.value=!0)}),(s,i)=>{var a,u,l,c;return N(),V("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(je).None?"true":"false","data-location":b(o).toolbar.location},[Og,(a=b(o))!=null&&a.toolbar.show.cart?(N(),V("button",{key:0,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=d=>b(n).show(b(je).Cart,b(Oe).AddToCart))}," Cart ")):we("",!0),(u=b(o))!=null&&u.toolbar.show.account&&!b(r).user.value?(N(),V("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:i[1]||(i[1]=d=>b(n).show(b(je).Authentication,b(Oe).SignIn))}," Log in ",8,Ng)):(l=b(o))!=null&&l.toolbar.show.account?(N(),V("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=d=>b(n).show(b(je).Customer,b(Oe).ViewAccount))},re((c=b(r).user.value)==null?void 0:c.name),1)):we("",!0)],8,Eg)}}}),xg=["hidden"],Tg=["for"],Cg=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],kg=["id"],Pg=["id"],$g=me({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(),V("div",{class:"moonbase:input",hidden:t.hidden||void 0},[I("label",{for:`mb_${t.name}`},re(t.label),9,Tg),I("input",ra({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,Cg),t.error?(N(),V("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},re(t.error),9,kg)):t.hint?(N(),V("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},re(t.hint),9,Pg)):we("",!0)],8,xg))}}),Ln=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_t=Ln($g,[["__scopeId","data-v-a86f8cb7"]]),Ig={},Xc=e=>(Dh("data-v-f9a322c4"),e=e(),Ah(),e),Dg={fill:"none",viewBox:"0 0 24 24"},Ag=[Xc(()=>I("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),Xc(()=>I("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 Vg(e,t){return N(),V("svg",Dg,Ag)}const Mn=Ln(Ig,[["render",Vg],["__scopeId","data-v-f9a322c4"]]),Rg=["disabled"],Qc=Symbol("form-state"),vr=me({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=$(!1),r=$(!1),o=$(!1);dt(Qc,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await jt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await jt(2500),o.value=!1}}return(i,a)=>(N(),V("form",{disabled:n.value||r.value,onSubmit:kv(s,["prevent"])},[Mi(i.$slots,"default")],40,Rg))}}),jg=["disabled","data-success","data-error","data-working"],Lg=["data-visible"],gr=Ln(me({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=ke(Qc),s=Y(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(N(),V("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},[I("div",{"data-visible":b(n)||void 0,"aria-hidden":"true"},[b(n)?(N(),$e(Mn,{key:0})):we("",!0)],8,Lg),Fe(" "+re(s.value),1)],8,jg))}}),[["__scopeId","data-v-052f0f36"]]),Mg={class:"moonbase:checkbox"},Ug={class:"moonbase:checkbox-container"},Fg=["id","name","value","disabled","aria-invalid","aria-describedby"],Bg={class:"moonbase:checkbox-description"},Hg=["for"],Zg=["id"],qg=["id"],ed=Ln(me({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(N(),V("div",Mg,[I("div",Ug,[I("input",ra({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,Fg)]),I("div",Bg,[I("label",{for:`mb-${t.name}`},re(t.label),9,Hg),t.error?(N(),V("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},re(t.error),9,Zg)):t.hint?(N(),V("p",{key:1,id:`mb-${t.name}-hint`},re(t.hint),9,qg)):we("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),Wg=["data-visible"],zg=me({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=$(""),i=$(r.getParameter("email")??""),a=$(""),u=$(!1),l=$(null);async function c(){l.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,u.value);jt(1500).then(()=>n("signedUp",d))}catch(d){throw l.value=d.message,d}}return(d,f)=>(N(),$e(vr,{handler:c,class:"moonbase:sign-up"},{default:be(()=>[q(_t,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value=g),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),q(_t,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=g=>i.value=g),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),q(_t,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=g=>a.value=g),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(ed,{modelValue:u.value,"onUpdate:modelValue":f[3]||(f[3]=g=>u.value=g),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),q(gr,{success:"Signed up",label:"Sign up",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!l.value||void 0},re(l.value),9,Wg),I("button",{type:"button",onClick:f[4]||(f[4]=g=>b(r).show(b(je).Authentication,b(Oe).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Kg={key:0,class:"moonbase:loader"},Gg={key:1,class:"moonbase:error"},Jg=I("p",null," Please create a new password for your account: ",-1),Yg=["data-visible"],Xg=me({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=$(!0),i=$(null),a=$(""),u=$(null);Ve(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){u.value=c.message}s.value=!1});async function l(){var c,d;if(u.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const g=await o.signIn(f,a.value);jt(1500).then(()=>n("confirmedAccount",g))}catch(f){throw u.value=f.message,f}}return(c,d)=>{const f=zh("Spinner");return N(),$e(vr,{handler:l,class:"moonbase:confirm-account"},{default:be(()=>[s.value?(N(),V("div",Kg,[q(f)])):i.value?(N(),V(Pe,{key:2},[I("h3",null," Hi "+re(i.value.name)+", ",1),Jg,q(_t,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),q(_t,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=g=>a.value=g),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(gr,{success:"Password saved",label:"Save password",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!u.value||void 0},re(u.value),9,Yg)],64)):(N(),V("div",Gg,re(u.value),1))]),_:1})}}}),Qg=I("h3",null," Forgot your password? ",-1),ey=I("p",null," Please enter your email for a reset link: ",-1),ty=["data-visible"],ny=me({__name:"ForgotPassword",setup(e){const t=He(),n=Kt(),r=$(t.getParameter("email")??""),o=$(null),s=$(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),jt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof ai?o.value="User not found":o.value=a.message,a}}return(a,u)=>(N(),$e(vr,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:be(()=>[Qg,ey,q(_t,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),q(gr,{success:"Email sent",label:"Reset password",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!o.value||void 0},re(o.value),9,ty)]),_:1}))}}),ry=I("p",null," Please create a new password for your account: ",-1),oy=["data-visible"],sy=me({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=Y(()=>r.getParameter("email")),i=$(""),a=$(null);Ve(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function u(){a.value=null;const l=r.getParameter("code");if(l)try{await o.resetPassword(s.value,i.value,l);const c=await o.signIn(s.value,i.value);jt(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(l,c)=>(N(),$e(vr,{handler:u,class:"moonbase:reset-password"},{default:be(()=>[I("h3",null," Hi "+re(s.value)+", ",1),ry,q(_t,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),q(_t,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(gr,{success:"Password saved",label:"Save password",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!a.value||void 0},re(a.value),9,oy)]),_:1}))}});class iy{constructor(){jr(this,"current",this.detect());jr(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 xo=new iy;function Oa(e,t,n,r){xo.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function td(e,t,n,r){xo.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var St=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(St||{});function Na(){let e=$(0),t=$(!0);return td(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 Un=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Un||{}),Fn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Fn||{});function Qe({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=rd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return Hs(i);if(t&1){const a=s.unmount??!0?0:1;return Je(a,{0(){return null},1(){return Hs({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Hs(i)}function Hs({props:e,attrs:t,slots:n,slot:r,name:o}){var l;const{as:s,...i}=Sa(e,["unmount","static"]);let a=(l=n.default)==null?void 0:l.call(n,r);const u={};if(r){let c=!1;const d=[];for(const[f,g]of Object.entries(r))typeof g=="boolean"&&(c=!0),g===!0&&d.push(f);c&&(u["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=nd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!ay(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(m=>m.trim()).filter((m,w,S)=>S.indexOf(m)===w).sort((m,w)=>m.localeCompare(w)).map(m=>` - ${m}`).join(`
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(m=>` - ${m}`).join(`
22
+ This will fail in production.`);a=No,a._s.has(r)||(s?Ea(r,t,o,a):Yc(r,o,a),xe.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(xe.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ea(d,t,o,a,!0):Yc(d,Ct({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(xe.NODE_ENV!=="production"&&hr){const d=ks();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=c}}return c}return i.$id=r,i}var Oe=(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))(Oe||{});const wg={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0}},auth:{enable:{signUp:!0}}},Hs=Symbol("options");var je=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(je||{});const He=bg("ui",()=>{const e=$("None"),t=$(null),n=$(null),r=$(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),ao(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),jt=e=>new Promise(t=>setTimeout(t,e)),Eg=["data-visible","data-location"],Og=Bm('<a href="https://moonbase.sh" target="_blank" class="moonbase:toolbar-action" data-action-width="narrow"><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></a>',1),Ng=["disabled"],Sg=me({__name:"Toolbar",setup(e){const t=$(!1),n=He(),r=Kt(),o=Ce(Hs);return Ve(()=>{jt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c;return O(),A("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(je).None?"true":"false","data-location":b(o).toolbar.location},[Og,(a=b(o))!=null&&a.toolbar.show.cart?(O(),A("button",{key:0,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=d=>b(n).show(b(je).Cart,b(Oe).AddToCart))}," Cart ")):ye("",!0),(l=b(o))!=null&&l.toolbar.show.account&&!b(r).user.value?(O(),A("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:i[1]||(i[1]=d=>b(n).show(b(je).Authentication,b(Oe).SignIn))}," Log in ",8,Ng)):(u=b(o))!=null&&u.toolbar.show.account?(O(),A("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=d=>b(n).show(b(je).Customer,b(Oe).ViewAccount))},re((c=b(r).user.value)==null?void 0:c.name),1)):ye("",!0)],8,Eg)}}}),xg=["hidden"],Tg=["for"],Cg=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],kg=["id"],Pg=["id"],$g=me({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)=>(O(),A("div",{class:"moonbase:input",hidden:t.hidden||void 0},[I("label",{for:`mb_${t.name}`},re(t.label),9,Tg),I("input",oa({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,Cg),t.error?(O(),A("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},re(t.error),9,kg)):t.hint?(O(),A("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},re(t.hint),9,Pg)):ye("",!0)],8,xg))}}),Ln=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_t=Ln($g,[["__scopeId","data-v-a86f8cb7"]]),Ig={},Xc=e=>(Dh("data-v-f9a322c4"),e=e(),Ah(),e),Dg={fill:"none",viewBox:"0 0 24 24"},Ag=[Xc(()=>I("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),Xc(()=>I("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 Vg(e,t){return O(),A("svg",Dg,Ag)}const Mn=Ln(Ig,[["render",Vg],["__scopeId","data-v-f9a322c4"]]),Rg=["disabled"],Qc=Symbol("form-state"),vr=me({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=$(!1),r=$(!1),o=$(!1);dt(Qc,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await jt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await jt(2500),o.value=!1}}return(i,a)=>(O(),A("form",{disabled:n.value||r.value,onSubmit:kv(s,["prevent"])},[Ui(i.$slots,"default")],40,Rg))}}),jg=["disabled","data-success","data-error","data-working"],Lg=["data-visible"],gr=Ln(me({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Qc),s=Y(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(O(),A("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},[I("div",{"data-visible":b(n)||void 0,"aria-hidden":"true"},[b(n)?(O(),$e(Mn,{key:0})):ye("",!0)],8,Lg),Fe(" "+re(s.value),1)],8,jg))}}),[["__scopeId","data-v-052f0f36"]]),Mg={class:"moonbase:checkbox"},Ug={class:"moonbase:checkbox-container"},Fg=["id","name","value","disabled","aria-invalid","aria-describedby"],Bg={class:"moonbase:checkbox-description"},Hg=["for"],Zg=["id"],qg=["id"],ed=Ln(me({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(O(),A("div",Mg,[I("div",Ug,[I("input",oa({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,Fg)]),I("div",Bg,[I("label",{for:`mb-${t.name}`},re(t.label),9,Hg),t.error?(O(),A("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},re(t.error),9,Zg)):t.hint?(O(),A("p",{key:1,id:`mb-${t.name}-hint`},re(t.hint),9,qg)):ye("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),Wg=["data-visible"],zg=me({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=$(""),i=$(r.getParameter("email")??""),a=$(""),l=$(!1),u=$(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);jt(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(O(),$e(vr,{handler:c,class:"moonbase:sign-up"},{default:we(()=>[q(_t,{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"]),q(_t,{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"]),q(_t,{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"]),q(ed,{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"]),q(gr,{success:"Signed up",label:"Sign up",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!u.value||void 0},re(u.value),9,Wg),I("button",{type:"button",onClick:f[4]||(f[4]=m=>b(r).show(b(je).Authentication,b(Oe).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Kg={key:0,class:"moonbase:loader"},Gg={key:1,class:"moonbase:error"},Jg=I("p",null," Please create a new password for your account: ",-1),Yg=["data-visible"],Xg=me({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=$(!0),i=$(null),a=$(""),l=$(null);Ve(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);jt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>{const f=zh("Spinner");return O(),$e(vr,{handler:u,class:"moonbase:confirm-account"},{default:we(()=>[s.value?(O(),A("div",Kg,[q(f)])):i.value?(O(),A(Pe,{key:2},[I("h3",null," Hi "+re(i.value.name)+", ",1),Jg,q(_t,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),q(_t,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(gr,{success:"Password saved",label:"Save password",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!l.value||void 0},re(l.value),9,Yg)],64)):(O(),A("div",Gg,re(l.value),1))]),_:1})}}}),Qg=I("h3",null," Forgot your password? ",-1),ey=I("p",null," Please enter your email for a reset link: ",-1),ty=["data-visible"],ny=me({__name:"ForgotPassword",setup(e){const t=He(),n=Kt(),r=$(t.getParameter("email")??""),o=$(null),s=$(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),jt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof li?o.value="User not found":o.value=a.message,a}}return(a,l)=>(O(),$e(vr,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:we(()=>[Qg,ey,q(_t,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),q(gr,{success:"Email sent",label:"Reset password",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!o.value||void 0},re(o.value),9,ty)]),_:1}))}}),ry=I("p",null," Please create a new password for your account: ",-1),oy=["data-visible"],sy=me({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=Y(()=>r.getParameter("email")),i=$(""),a=$(null);Ve(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);jt(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(O(),$e(vr,{handler:l,class:"moonbase:reset-password"},{default:we(()=>[I("h3",null," Hi "+re(s.value)+", ",1),ry,q(_t,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),q(_t,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(gr,{success:"Password saved",label:"Save password",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!a.value||void 0},re(a.value),9,oy)]),_:1}))}});class iy{constructor(){Er(this,"current",this.detect());Er(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 xo=new iy;function Oa(e,t,n,r){xo.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function td(e,t,n,r){xo.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var St=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(St||{});function Na(){let e=$(0),t=$(!0);return td(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 Un=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Un||{}),Fn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Fn||{});function Qe({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=rd(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 u;const{as:s,...i}=Sa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=nd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!ay(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(v=>v.trim()).filter((v,w,S)=>S.indexOf(v)===w).sort((v,w)=>v.localeCompare(w)).map(v=>` - ${v}`).join(`
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(v=>` - ${v}`).join(`
24
24
  `)].join(`
25
- `));const f=rd(c.props??{},i,u),g=At(c,f,!0);for(const m in f)m.startsWith("on")&&(g.props||(g.props={}),g.props[m]=f[m]);return g}return Array.isArray(a)&&a.length===1?a[0]:a}return Ae(s,Object.assign({},i,u),{default:()=>a})}function nd(e){return e.flatMap(t=>t.type===Pe?nd(t.children):[t])}function rd(...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 Sa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ay(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Bn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Bn||{});let Hn=me({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 ly(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function z(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Jt(e){if(xo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=z(e);if(t)return t.ownerDocument}return document}const Zs=["[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 Le=(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))(Le||{}),mn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(mn||{});function qs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Zs)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var xa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(xa||{});function od(e,t=0){var n;return e===((n=Jt(e))==null?void 0:n.body)?!1:Je(t,{0(){return e.matches(Zs)},1(){let r=e;for(;r!==null;){if(r.matches(Zs))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 yr(e){e==null||e.focus({preventScroll:!0})}const uy=["textarea","input"].join(",");function cy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,uy))??!1}function Vr(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?Vr(e):e:qs(e);o.length>0&&i.length>1&&(i=i.filter(g=>!o.includes(g))),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")})(),u=(()=>{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 c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let g=u+c;if(t&16)g=(g+d)%d;else{if(g<0)return 3;if(g>=d)return 1}f=i[g],f==null||f.focus(l),c+=a}while(f!==s.activeElement);return t&6&&cy(f)&&f.select(),2}let _r=[];ly(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||_r[0]===t.target)return;let n=t.target;n=n.closest(Zs),_r.unshift(n??t.target),_r=_r.filter(r=>r!=null&&r.isConnected),_r.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 Ws(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function sd(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=z(n);r instanceof HTMLElement&&t.add(r)}return t}var id=(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))(id||{});const To=Object.assign(me({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:$(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=$(null);r({el:o,$el:o});const s=Y(()=>Jt(o)),i=$(!1);Ve(()=>i.value=!0),mt(()=>i.value=!1),fy({ownerDocument:s},Y(()=>i.value&&!!(e.features&16)));const a=py({ownerDocument:s,container:o,initialFocus:Y(()=>e.initialFocus)},Y(()=>i.value&&!!(e.features&2)));hy({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Y(()=>i.value&&!!(e.features&8)));const u=Na();function l(g){const m=z(o);if(!m)return;(S=>S())(()=>{Je(u.value,{[St.Forwards]:()=>{it(m,Le.First,{skipElements:[g.relatedTarget]})},[St.Backwards]:()=>{it(m,Le.Last,{skipElements:[g.relatedTarget]})}})})}const c=$(!1);function d(g){g.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(g){if(!i.value)return;const m=sd(e.containers);z(o)instanceof HTMLElement&&m.add(z(o));const w=g.relatedTarget;w instanceof HTMLElement&&w.dataset.moonbaseFocusGuard!=="true"&&(ad(m,w)||(c.value?it(z(o),Je(u.value,{[St.Forwards]:()=>Le.Next,[St.Backwards]:()=>Le.Previous})|Le.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&yr(g.target)))}return()=>{const g={},m={ref:o,onKeydown:d,onFocusout:f},{features:w,initialFocus:S,containers:L,...F}=e;return Ae(Pe,[!!(w&4)&&Ae(Hn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:l,features:Bn.Focusable}),Qe({ourProps:m,theirProps:{...t,...F},slot:g,attrs:t,slots:n,name:"FocusTrap"}),!!(w&4)&&Ae(Hn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:l,features:Bn.Focusable})])}}}),{features:id});function dy(e){const t=$(_r.slice());return Xe([e],([n],[r])=>{r===!0&&n===!1?Ws(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=_r.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function fy({ownerDocument:e},t){const n=dy(t);Ve(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&yr(n())},{flush:"post"})}),mt(()=>{t.value&&yr(n())})}function py({ownerDocument:e,container:t,initialFocus:n},r){const o=$(null),s=$(!1);return Ve(()=>s.value=!0),mt(()=>s.value=!1),Ve(()=>{Xe([t,n,r],(i,a)=>{if(i.every((l,c)=>(a==null?void 0:a[c])===l)||!r.value)return;const u=z(t);u&&Ws(()=>{var d,f;if(!s.value)return;const l=z(n),c=(d=e.value)==null?void 0:d.activeElement;if(l){if(l===c){o.value=c;return}}else if(u.contains(c)){o.value=c;return}l?yr(l):it(u,Le.First|Le.NoScroll)===mn.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 hy({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Oa((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=sd(n);z(t)instanceof HTMLElement&&a.add(z(t));const u=r.value;if(!u)return;const l=i.target;l&&l instanceof HTMLElement?ad(a,l)?(r.value=l,yr(l)):(i.preventDefault(),i.stopPropagation(),yr(u)):yr(r.value)},!0)}function ad(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function my(e){let t=sh(e.getSnapshot());return mt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Co(){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 Ws(()=>{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=Co();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 vy(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 gy(){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 ld(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yy(){return/Android/gi.test(window.navigator.userAgent)}function _y(){return ld()||yy()}function by(){return ld()?{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=Co();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:u}=new URL(a.href),l=e.querySelector(u);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 wy(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Ey(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let br=vy(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:Co(),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:Ey(n)},o=[by(),gy(),wy()];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)}});br.subscribe(()=>{let e=br.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)&&br.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&br.dispatch("TEARDOWN",n)}});function Oy(e,t,n){let r=my(br),o=Y(()=>{let s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Xe([e,t],([s,i],[a],u)=>{if(!s||!i)return;br.dispatch("PUSH",s,n);let l=!1;u(()=>{l||(br.dispatch("POP",a??s,n),l=!0)})},{immediate:!0}),o}let Ny=0;function Sy(){return++Ny}function kt(){return Sy()}let Ta=new Map,ko=new Map;function ud(e,t=$(!0)){ft(n=>{if(!t.value)return;let r=z(e);if(!r)return;n(function(){if(!r)return;let i=ko.get(r)??1;if(i===1?ko.delete(r):ko.set(r,i-1),i!==1)return;let a=Ta.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Ta.delete(r))});let o=ko.get(r)??0;ko.set(r,o+1),o===0&&(Ta.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Po(e,t,n,r){xo.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const cd=30;function dd(e,t,n=Y(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const u=a(i);if(u===null||!u.getRootNode().contains(u))return;const l=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of l){if(c===null)continue;const d=c instanceof HTMLElement?c:z(c);if(d!=null&&d.contains(u)||i.composed&&i.composedPath().includes(d))return}return!od(u,xa.Loose)&&u.tabIndex!==-1&&i.preventDefault(),t(i,u)}const o=$(null);Po(n,"pointerdown",i=>{var a,u;o.value=((u=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:u[0])||i.target},!0),Po(n,"mousedown",i=>{var a,u;o.value=((u=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:u[0])||i.target},!0),Po(n,"click",i=>{_y()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Po(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Po(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=cd||Math.abs(a.y-s.y)>=cd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),td(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function fd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=$(null),o=Jt(r);function s(){var a,u;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(z(r))||l.contains((u=(a=z(r))==null?void 0:a.getRootNode())==null?void 0:u.host)||i.some(c=>l.contains(c))||i.push(l));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ae(Hn,{features:Bn.Hidden,ref:r})}}}let pd=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 xy(){return zs()!==null}function zs(){return ke(pd,null)}function hd(e){dt(pd,e)}const md=Symbol("ForcePortalRootContext");function Ty(){return ke(md,!1)}const vd=me({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(md,e.force),()=>{const{force:r,...o}=e;return Qe({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let gd=Symbol("StackContext");var Ca=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Ca||{});function Cy(){return ke(gd,()=>{})}function ky({type:e,enabled:t,element:n,onUpdate:r}){let o=Cy();function s(...i){r==null||r(...i),o(...i)}Ve(()=>{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(gd,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 Py=Symbol("DescriptionContext");function $y({slot:e=$({}),name:t="Description",props:n={}}={}){let r=$([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Py,{register:o,slot:e,name:t,props:n}),Y(()=>r.value.length>0?r.value.join(" "):void 0)}function yd(e){const t=Jt(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 Iy=me({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$(null);Y(()=>Jt(r));const o=Ty(),s=ke(bd,null),i=$(o===!0||s==null?yd(r.value):s.resolveTarget()),a=$(!1);Ve(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const u=ke(ka,null);let l=!1;const c=ks();return Xe(r,()=>{if(l||!u)return;const d=z(r);d&&(mt(u.register(d),c),l=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ae(Em,{to:i.value},Qe({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let ka=Symbol("PortalParentContext");function _d(){const e=ke(ka,null),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,me({name:"PortalWrapper",setup(s,{slots:i}){return dt(ka,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let bd=Symbol("PortalGroupContext");const Dy=me({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=ro({resolveTarget(){return e.target}});return dt(bd,r),()=>{const{target:o,...s}=e;return Qe({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Pa=Symbol("DialogContext");function Ks(e){const t=ke(Pa,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ks),n}return t}const Gs="DC8F892D-2EBD-447C-A4C8-A03058436FF4",wd=me({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:Gs},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${kt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var ue;const s=$(!1);Ve(()=>{s.value=!0});let i=!1;const a=Y(()=>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")),u=$(0),l=zs(),c=Y(()=>e.open===Gs&&l!==null?(l.value&at.Open)===at.Open:e.open),d=$(null),f=Y(()=>Jt(d));if(o({el:d,$el:d}),!(e.open!==Gs||l!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===Gs?void 0:e.open}`);const m=Y(()=>s.value&&c.value?0:1),w=Y(()=>m.value===0),S=$(null),L={titleId:S,panelRef:$(null),dialogState:m,setTitleId(Te){S.value!==Te&&(S.value=Te)},close(){t("close",!1)}},F=Y(()=>u.value>1),T=ke(Pa,null)!==null,[K,C]=_d(),{resolveContainers:H,mainTreeNodeRef:E,MainTreeNode:de}=fd({portals:K,defaultContainers:[Y(()=>L.panelRef.value??d.value)]}),J=Y(()=>F.value?"parent":"leaf"),D=Y(()=>l!==null?(l.value&at.Closing)===at.Closing:!1),x=Y(()=>T||D.value?!1:w.value),R=Y(()=>{var Te;return Array.from(((Te=f.value)==null?void 0:Te.querySelectorAll("body > *"))??[]).find(De=>De.id==="moonbase"?!1:De.contains(z(E))&&De instanceof HTMLElement)??null});ud(R,x);const oe=Y(()=>F.value?!0:w.value),_=Y(()=>{var Te;return Array.from(((Te=f.value)==null?void 0:Te.querySelectorAll("[data-moonbase-portal]"))??[]).find(De=>De.contains(z(E))&&De instanceof HTMLElement)??null});ud(_,oe),ky({type:"Dialog",enabled:Y(()=>m.value===0),element:d,onUpdate:(Te,De)=>{if(De==="Dialog")return Je(Te,{[Ca.Add]:()=>u.value+=1,[Ca.Remove]:()=>u.value-=1})}});const k=$y({name:"DialogDescription",slot:Y(()=>({open:c.value}))});dt(Pa,L);const te=Y(()=>!(!w.value||F.value));dd(H,(Te,De)=>{Te.preventDefault(),L.close(),ao(()=>De==null?void 0:De.focus())},te);const ae=Y(()=>!(F.value||m.value!==0));Oa((ue=f.value)==null?void 0:ue.defaultView,"keydown",Te=>{ae.value&&(Te.defaultPrevented||Te.key===et.Escape&&(Te.preventDefault(),Te.stopPropagation(),L.close()))});const ne=Y(()=>!(D.value||m.value!==0||T));return Oy(f,ne,Te=>({containers:[...Te.containers??[],H]})),ft(Te=>{if(m.value!==0)return;const De=z(d);if(!De)return;const nt=new ResizeObserver(bt=>{for(const gn of bt){const Zn=gn.target.getBoundingClientRect();Zn.x===0&&Zn.y===0&&Zn.width===0&&Zn.height===0&&L.close()}});nt.observe(De),Te(()=>nt.disconnect())}),()=>{const{id:Te,open:De,initialFocus:nt,...bt}=e,gn={...n,ref:d,id:Te,role:a.value,"aria-modal":m.value===0?!0:void 0,"aria-labelledby":S.value,"aria-describedby":k.value},Zn={open:m.value===0};return Ae(vd,{force:!0},()=>[Ae(Iy,()=>Ae(Dy,{target:d.value},()=>Ae(vd,{force:!1},()=>Ae(To,{initialFocus:nt,containers:H,features:w.value?Je(J.value,{parent:To.features.RestoreFocus,leaf:To.features.All&~To.features.FocusLock}):To.features.None},()=>Ae(C,{},()=>Qe({ourProps:gn,theirProps:{...bt,...n},slot:Zn,attrs:n,slots:r,visible:m.value===0,features:Un.RenderStrategy|Un.Static,name:"Dialog"})))))),Ae(de)])}}}),Ed=me({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${kt()}`}},setup(e,{attrs:t,slots:n}){const r=Ks("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"})}}}),Od=me({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${kt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ks("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,u={id:i,ref:o.panelRef,onClick:s};return Qe({ourProps:u,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),$a=me({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${kt()}`}},setup(e,{attrs:t,slots:n}){const r=Ks("DialogTitle");return Ve(()=>{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 Nd(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Sd(e,t){let n=$(Nd(e.value.type,e.value.as));return Ve(()=>{n.value=Nd(e.value.type,e.value.as)}),ft(()=>{var r;n.value||z(t)&&z(t)instanceof HTMLButtonElement&&!((r=z(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const xd=Symbol("PopoverContext");function Ia(e){const t=ke(xd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${Da.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ia),n}return t}const Ay=Symbol("PopoverGroupContext");function Td(){return ke(Ay,null)}const Cd=Symbol("PopoverPanelContext");function Vy(){return ke(Cd,null)}let Da=me({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var K;const o=$(null);r({el:o,$el:o});const s=$(1),i=$(null),a=$(null),u=$(null),l=$(null),c=Y(()=>Jt(o)),d=Y(()=>{var x,R;if(!z(i)||!z(l))return!1;for(const oe of document.querySelectorAll("body > *"))if(Number(oe==null?void 0:oe.contains(z(i)))^Number(oe==null?void 0:oe.contains(z(l))))return!0;const C=qs(),H=C.indexOf(z(i)),E=(H+C.length-1)%C.length,de=(H+1)%C.length,J=C[E],D=C[de];return!((x=z(l))!=null&&x.contains(J))&&!((R=z(l))!=null&&R.contains(D))}),f={popoverState:s,buttonId:$(null),panelId:$(null),panel:l,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:u,togglePopover(){s.value=Je(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(C){f.closePopover();const H=C?C instanceof HTMLElement?C:C.value instanceof HTMLElement?z(C):z(f.button):z(f.button);H==null||H.focus()}};dt(xd,f),hd(Y(()=>Je(s.value,{0:at.Open,1:at.Closed})));const g={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},m=Td(),w=m==null?void 0:m.registerPopover,[S,L]=_d(),F=fd({mainTreeNodeRef:m==null?void 0:m.mainTreeNodeRef,portals:S,defaultContainers:[i,l]});function T(){var C,H,E;return(m==null?void 0:m.isFocusWithinPopoverGroup())??(((C=c.value)==null?void 0:C.activeElement)&&(((H=z(i))==null?void 0:H.contains(c.value.activeElement))||((E=z(l))==null?void 0:E.contains(c.value.activeElement))))}return ft(()=>w==null?void 0:w(g)),Oa((K=c.value)==null?void 0:K.defaultView,"focus",C=>{var H,E;C.target!==window&&C.target instanceof HTMLElement&&s.value===0&&(T()||i&&l&&(F.contains(C.target)||(H=z(f.beforePanelSentinel))!=null&&H.contains(C.target)||(E=z(f.afterPanelSentinel))!=null&&E.contains(C.target)||f.closePopover()))},!0),dd(F.resolveContainers,(C,H)=>{var E;f.closePopover(),od(H,xa.Loose)||(C.preventDefault(),(E=z(i))==null||E.focus())},Y(()=>s.value===0)),()=>{const C={open:s.value===0,close:f.close};return Ae(Pe,[Ae(L,{},()=>Qe({theirProps:{...e,...n},ourProps:{ref:o},slot:C,slots:t,attrs:n,name:"Popover"})),Ae(F.MainTreeNode)])}}});const kd=me({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${kt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=Ia("PopoverButton"),s=Y(()=>Jt(o.button));r({el:o.button,$el:o.button}),Ve(()=>{o.buttonId.value=e.id}),mt(()=>{o.buttonId.value=null});const i=Td(),a=i==null?void 0:i.closeOthers,u=Vy(),l=Y(()=>u===null?!1:u.value===o.panelId.value),c=$(null),d=`moonbase-focus-sentinel-${kt()}`;l.value||ft(()=>{o.button.value=z(c)});const f=Sd(Y(()=>({as:e.as,type:t.type})),c);function g(T){var K,C,H,E,de;if(l.value){if(o.popoverState.value===1)return;switch(T.key){case et.Space:case et.Enter:T.preventDefault(),(C=(K=T.target).click)==null||C.call(K),o.closePopover(),(H=z(o.button))==null||H.focus();break}}else switch(T.key){case et.Space:case et.Enter:T.preventDefault(),T.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(!z(o.button)||(E=s.value)!=null&&E.activeElement&&!((de=z(o.button))!=null&&de.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function m(T){l.value||T.key===et.Space&&T.preventDefault()}function w(T){var K,C;e.disabled||(l.value?(o.closePopover(),(K=z(o.button))==null||K.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(C=z(o.button))==null||C.focus()))}function S(T){T.preventDefault(),T.stopPropagation()}const L=Na();function F(){const T=z(o.panel);if(!T)return;function K(){Je(L.value,{[St.Forwards]:()=>it(T,Le.First),[St.Backwards]:()=>it(T,Le.Last)})===mn.Error&&it(qs().filter(H=>H.dataset.moonbaseFocusGuard!=="true"),Je(L.value,{[St.Forwards]:Le.Next,[St.Backwards]:Le.Previous}),{relativeTo:z(o.button)})}K()}return()=>{const T=o.popoverState.value===0,K={open:T},{id:C,...H}=e,E=l.value?{ref:c,type:f.value,onKeydown:g,onClick:w}:{ref:c,id:C,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":z(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:g,onKeyup:m,onClick:w,onMousedown:S};return Ae(Pe,[Qe({ourProps:E,theirProps:{...t,...H},slot:K,attrs:t,slots:n,name:"PopoverButton"}),T&&!l.value&&o.isPortalled.value&&Ae(Hn,{id:d,features:Bn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:F})])}}}),Pd=me({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-${kt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=Ia("PopoverPanel"),i=Y(()=>Jt(s.panel)),a=`moonbase-focus-sentinel-before-${kt()}`,u=`moonbase-focus-sentinel-after-${kt()}`;r({el:s.panel,$el:s.panel}),Ve(()=>{s.panelId.value=e.id}),mt(()=>{s.panelId.value=null}),dt(Cd,s.panelId),ft(()=>{var L,F;if(!o||s.popoverState.value!==0||!s.panel)return;const S=(L=i.value)==null?void 0:L.activeElement;(F=z(s.panel))!=null&&F.contains(S)||it(z(s.panel),Le.First)});const l=zs(),c=Y(()=>l!==null?(l.value&at.Open)===at.Open:s.popoverState.value===0);function d(S){var L,F;switch(S.key){case et.Escape:if(s.popoverState.value!==0||!z(s.panel)||i.value&&!((L=z(s.panel))!=null&&L.contains(i.value.activeElement)))return;S.preventDefault(),S.stopPropagation(),s.closePopover(),(F=z(s.button))==null||F.focus();break}}function f(S){var F,T,K,C,H;const L=S.relatedTarget;L&&z(s.panel)&&((F=z(s.panel))!=null&&F.contains(L)||(s.closePopover(),((K=(T=z(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&K.call(T,L)||(H=(C=z(s.afterPanelSentinel))==null?void 0:C.contains)!=null&&H.call(C,L))&&L.focus({preventScroll:!0})))}const g=Na();function m(){const S=z(s.panel);if(!S)return;function L(){Je(g.value,{[St.Forwards]:()=>{var T;it(S,Le.First)===mn.Error&&((T=z(s.afterPanelSentinel))==null||T.focus())},[St.Backwards]:()=>{var F;(F=z(s.button))==null||F.focus({preventScroll:!0})}})}L()}function w(){const S=z(s.panel);if(!S)return;function L(){Je(g.value,{[St.Forwards]:()=>{const F=z(s.button),T=z(s.panel);if(!F)return;const K=qs(),C=K.indexOf(F),H=K.slice(0,C+1),de=[...K.slice(C+1),...H];for(const J of de.slice())if(J.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(J)){const D=de.indexOf(J);D!==-1&&de.splice(D,1)}it(de,Le.First,{sorted:!1})},[St.Backwards]:()=>{var T;it(S,Le.Previous)===mn.Error&&((T=z(s.button))==null||T.focus())}})}L()}return()=>{const S={open:s.popoverState.value===0,close:s.close},{id:L,focus:F,...T}=e,K={ref:s.panel,id:L,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return Qe({ourProps:K,theirProps:{...t,...T},attrs:t,slot:S,slots:{...n,default:(...C)=>{var H;return[Ae(Pe,[c.value&&s.isPortalled.value&&Ae(Hn,{id:a,ref:s.beforePanelSentinel,features:Bn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:m}),(H=n.default)==null?void 0:H.call(n,...C),c.value&&s.isPortalled.value&&Ae(Hn,{id:u,ref:s.afterPanelSentinel,features:Bn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:w})])]}},features:Un.RenderStrategy|Un.Static,visible:c.value,name:"PopoverPanel"})}}});let Ry=me({props:{onFocus:{type:Function,required:!0}},setup(e){let t=$(!0);return()=>t.value?Ae(Hn,{as:"button",type:"button",features:Bn.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 $d=Symbol("TabsContext");function $o(e){const t=ke($d,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$o),n}return t}const Aa=Symbol("TabsSSRContext"),jy=me({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=$(e.selectedIndex??e.defaultIndex),s=$([]),i=$([]),a=Y(()=>e.selectedIndex!==null),u=Y(()=>a.value?e.selectedIndex:o.value);function l(m){const w=Vr(c.tabs.value,z),S=Vr(c.panels.value,z),L=w.filter(F=>{var T;return!((T=z(F))!=null&&T.hasAttribute("disabled"))});if(m<0||m>w.length-1){const F=Je(o.value===null?0:Math.sign(m-o.value),{[-1]:()=>1,0:()=>Je(Math.sign(m),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Je(F,{0:()=>w.indexOf(L[0]),1:()=>w.indexOf(L[L.length-1])});T!==-1&&(o.value=T),c.tabs.value=w,c.panels.value=S}else{const F=w.slice(0,m),K=[...w.slice(m),...F].find(H=>L.includes(H));if(!K)return;let C=w.indexOf(K)??c.selectedIndex.value;C===-1&&(C=c.selectedIndex.value),o.value=C,c.tabs.value=w,c.panels.value=S}}let c={selectedIndex:Y(()=>o.value??e.defaultIndex??null),orientation:Y(()=>e.vertical?"vertical":"horizontal"),activation:Y(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(m){u.value!==m&&r("change",m),a.value||l(m)},registerTab(m){if(s.value.includes(m))return;const w=s.value[o.value];if(s.value.push(m),s.value=Vr(s.value,z),!a.value){const S=s.value.indexOf(w)??o.value;S!==-1&&(o.value=S)}},unregisterTab(m){const w=s.value.indexOf(m);w!==-1&&s.value.splice(w,1)},registerPanel(m){i.value.includes(m)||(i.value.push(m),i.value=Vr(i.value,z))},unregisterPanel(m){const w=i.value.indexOf(m);w!==-1&&i.value.splice(w,1)}};dt($d,c);const d=$({tabs:[],panels:[]}),f=$(!1);Ve(()=>{f.value=!0}),dt(Aa,Y(()=>f.value?null:d.value));const g=Y(()=>e.selectedIndex);return Ve(()=>{Xe([g],()=>l(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||u.value==null||c.tabs.value.length<=0)return;const m=Vr(c.tabs.value,z);m.some((S,L)=>z(c.tabs.value[L])!==z(S))&&c.setSelectedIndex(m.findIndex(S=>z(S)===z(c.tabs.value[u.value])))}),()=>{const m={selectedIndex:o.value};return Ae(Pe,[s.value.length<=0&&Ae(Ry,{onFocus:()=>{for(const w of s.value){const S=z(w);if((S==null?void 0:S.tabIndex)===0)return S.focus(),!0}return!1}}),Qe({theirProps:{...n,...Sa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:m,slots:t,attrs:n,name:"TabGroup"})])}}}),Ly=me({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=$o("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"})}}}),Va=me({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${kt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=$o("Tab"),s=$(null);r({el:s,$el:s}),Ve(()=>o.registerTab(s)),mt(()=>o.unregisterTab(s));const i=ke(Aa),a=Y(()=>{if(i.value){const S=i.value.tabs.indexOf(e.id);return S===-1?i.value.tabs.push(e.id)-1:S}return-1}),u=Y(()=>{const S=o.tabs.value.indexOf(s);return S===-1?a.value:S}),l=Y(()=>u.value===o.selectedIndex.value);function c(S){var F;const L=S();if(L===mn.Success&&o.activation.value==="auto"){const T=(F=Jt(s))==null?void 0:F.activeElement,K=o.tabs.value.findIndex(C=>z(C)===T);K!==-1&&o.setSelectedIndex(K)}return L}function d(S){const L=o.tabs.value.map(T=>z(T)).filter(Boolean);if(S.key===et.Space||S.key===et.Enter){S.preventDefault(),S.stopPropagation(),o.setSelectedIndex(u.value);return}switch(S.key){case et.Home:case et.PageUp:return S.preventDefault(),S.stopPropagation(),c(()=>it(L,Le.First));case et.End:case et.PageDown:return S.preventDefault(),S.stopPropagation(),c(()=>it(L,Le.Last))}if(c(()=>Je(o.orientation.value,{vertical(){return S.key===et.ArrowUp?it(L,Le.Previous|Le.WrapAround):S.key===et.ArrowDown?it(L,Le.Next|Le.WrapAround):mn.Error},horizontal(){return S.key===et.ArrowLeft?it(L,Le.Previous|Le.WrapAround):S.key===et.ArrowRight?it(L,Le.Next|Le.WrapAround):mn.Error}}))===mn.Success)return S.preventDefault()}const f=$(!1);function g(){var S;f.value||(f.value=!0,!e.disabled&&((S=z(s))==null||S.focus({preventScroll:!0}),o.setSelectedIndex(u.value),Ws(()=>{f.value=!1})))}function m(S){S.preventDefault()}const w=Sd(Y(()=>({as:e.as,type:t.type})),s);return()=>{var K;const S={selected:l.value,disabled:e.disabled??!1},{id:L,...F}=e,T={ref:s,onKeydown:d,onMousedown:m,onClick:g,id:L,role:"tab",type:w.value,"aria-controls":(K=z(o.panels.value[u.value]))==null?void 0:K.id,"aria-selected":l.value,tabIndex:l.value?0:-1,disabled:e.disabled?!0:void 0};return Qe({ourProps:T,theirProps:F,slot:S,attrs:t,slots:n,name:"Tab"})}}}),My=me({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$o("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Qe({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Ra=me({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-${kt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=$o("TabPanel"),s=$(null);r({el:s,$el:s}),Ve(()=>o.registerPanel(s)),mt(()=>o.unregisterPanel(s));const i=ke(Aa),a=Y(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),u=Y(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),l=Y(()=>u.value===o.selectedIndex.value);return()=>{var w;const c={selected:l.value},{id:d,tabIndex:f,...g}=e,m={ref:s,id:d,role:"tabpanel","aria-labelledby":(w=z(o.tabs.value[u.value]))==null?void 0:w.id,tabIndex:l.value?f:-1};return!l.value&&e.unmount&&!e.static?Ae(Hn,{as:"span","aria-hidden":!0,...m}):Qe({ourProps:m,theirProps:g,slot:c,attrs:t,slots:n,features:Un.Static|Un.RenderStrategy,visible:l.value,name:"TabPanel"})}}});function Uy(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ja(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 Js(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var La=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(La||{});function Fy(e,t){const n=Co();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[u=0]=a.split(",").filter(Boolean).map(l=>l.includes("ms")?Number.parseFloat(l):Number.parseFloat(l)*1e3).sort((l,c)=>c-l);return u});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Id(e,t,n,r,o,s){const i=Co(),a=s!==void 0?Uy(s):()=>{};return Js(e,...o),ja(e,...t,...n),i.nextFrame(()=>{Js(e,...n),ja(e,...r),i.add(Fy(e,u=>(Js(e,...r,...t),ja(e,...o),a(u))))}),i.add(()=>Js(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function wr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Ma=Symbol("TransitionContext");function By(){return ke(Ma,null)!==null}function Hy(){const e=ke(Ma,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Ua=Symbol("NestingContext");function Zy(){const e=ke(Ua,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Ys(e){return"children"in e?Ys(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Dd(e){const t=$([]),n=$(!1);Ve(()=>n.value=!0),mt(()=>n.value=!1);function r(s,i=Fn.Hidden){const a=t.value.findIndex(({id:u})=>u===s);a!==-1&&(Je(i,{[Fn.Unmount](){t.value.splice(a,1)},[Fn.Hidden](){t.value[a].state="hidden"}}),!Ys(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,Fn.Unmount)}return{children:t,register:o,unregister:r}}const Ad=Un.RenderStrategy,Io=me({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=$(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function u(){s.value|=at.Closing,t("beforeLeave")}function l(){s.value&=~at.Closing,t("afterLeave")}if(!By()&&xy())return()=>Ae(Fa,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:u,onAfterLeave:l},r);const c=$(null),d=Y(()=>e.unmount?Fn.Unmount:Fn.Hidden);o({el:c,$el:c});const{show:f,appear:g}=Hy(),{register:m,unregister:w}=Zy(),S=$(f.value?"visible":"hidden"),L={value:!0},F=kt(),T={value:!1},K=Dd(()=>{!T.value&&S.value!=="hidden"&&(S.value="hidden",w(F),l())});Ve(()=>{const oe=m(F);mt(oe)}),ft(()=>{if(d.value===Fn.Hidden&&F){if(f.value&&S.value!=="visible"){S.value="visible";return}Je(S.value,{hidden:()=>w(F),visible:()=>m(F)})}});const C=wr(e.enter),H=wr(e.enterFrom),E=wr(e.enterTo),de=wr(e.entered),J=wr(e.leave),D=wr(e.leaveFrom),x=wr(e.leaveTo);Ve(()=>{ft(()=>{if(S.value==="visible"){const oe=z(c);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function R(oe){const _=L.value&&!g.value,k=z(c);!k||!(k instanceof HTMLElement)||_||(T.value=!0,f.value&&i(),f.value||u(),oe(f.value?Id(k,C,H,E,de,te=>{T.value=!1,te===La.Finished&&a()}):Id(k,J,D,x,de,te=>{T.value=!1,te===La.Finished&&(Ys(K)||(S.value="hidden",w(F),l()))})))}return Ve(()=>{Xe([f],(oe,_,k)=>{R(k),L.value=!1},{immediate:!0})}),dt(Ua,K),hd(Y(()=>Je(S.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:oe,show:_,enter:k,enterFrom:te,enterTo:ae,entered:ne,leave:ue,leaveFrom:Te,leaveTo:De,...nt}=e,bt={ref:c},gn={...nt,...g.value&&f.value&&xo.isServer?{class:es([n.class,nt.class,...C,...H])}:{}};return Qe({theirProps:gn,ourProps:bt,slot:{},slots:r,attrs:n,features:Ad,visible:S.value==="visible",name:"TransitionChild"})}}}),qy=Io,Fa=me({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=zs(),s=Y(()=>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=$(s.value?"visible":"hidden"),a=Dd(()=>{i.value="hidden"}),u=$(!0),l={show:s,appear:Y(()=>e.appear||!u.value)};return Ve(()=>{ft(()=>{u.value=!1,s.value?i.value="visible":Ys(a)||(i.value="hidden")})}),dt(Ua,a),dt(Ma,l),()=>{const c=Sa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Qe({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ae(qy,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:Ad,visible:i.value==="visible",name:"Transition"})}}}),Wy={class:"moonbase:modal-container"},Ba=me({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(N(),$e(b(Fa),{as:"template",show:t.open},{default:be(()=>[q(b(wd),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:be(()=>[I("div",Wy,[q(b(Io),{as:"template"},{default:be(()=>[q(b(Ed),{class:"moonbase:modal-overlay"})]),_:1}),q(b(Io),{as:"template"},{default:be(()=>[q(b(Od),{class:"moonbase:modal-content"},{default:be(()=>[Mi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),zy=["data-visible"],Ky=me({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=$(r.getParameter("email")??""),i=$(""),a=$(null);async function u(){a.value=null;try{const l=await o.signIn(s.value,i.value);jt(1500).then(()=>n("signedIn",l))}catch(l){throw l instanceof ai?a.value="User not found":a.value=l.message,l}}return(l,c)=>(N(),$e(vr,{handler:u,class:"moonbase:sign-in"},{default:be(()=>[q(_t,{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),q(_t,{modelValue:i.value,"onUpdate:modelValue":c[1]||(c[1]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(gr,{success:"Signed in",label:"Sign in",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!a.value||void 0},re(a.value),9,zy),I("button",{type:"button",onClick:c[2]||(c[2]=d=>b(r).show(b(je).Authentication,b(Oe).SignUp,{email:s.value}))}," Create account "),I("button",{type:"button",onClick:c[3]||(c[3]=d=>b(r).show(b(je).Authentication,b(Oe).ForgotPassword,{email:s.value}))}," Forgot password ")]),_:1}))}}),Gy={class:"moonbase:authentication"},Jy={key:0,class:"moonbase:loader"},Yy=me({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=He(),{loaded:o,user:s}=Kt();Xe(s,a=>{a&&r.intent===Oe.SignIn&&(n("authenticated",a),r.dequeue())});const i=Y(()=>{switch(r.intent){case Oe.SignIn:return"Sign in";case Oe.SignUp:return"Sign up";case Oe.ConfirmAccount:return"Confirm account";case Oe.ForgotPassword:return"Forgot password";case Oe.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,u)=>(N(),$e(Ba,{open:a.open,onClose:u[3]||(u[3]=l=>b(r).reset())},{default:be(()=>[I("div",Gy,[q(b($a),{as:"h3"},{default:be(()=>[Fe(re(i.value),1)]),_:1}),b(o)?b(r).intent===b(Oe).SignIn?(N(),$e(Ky,{key:1})):b(r).intent===b(Oe).SignUp?(N(),$e(zg,{key:2,onSignedUp:u[0]||(u[0]=l=>b(r).dequeue())})):b(r).intent===b(Oe).ConfirmAccount?(N(),$e(Xg,{key:3,onConfirmedAccount:u[1]||(u[1]=l=>b(r).dequeue())})):b(r).intent===b(Oe).ForgotPassword?(N(),$e(ny,{key:4})):b(r).intent===b(Oe).ResetPassword?(N(),$e(sy,{key:5,onPasswordReset:u[2]||(u[2]=l=>b(r).dequeue())})):we("",!0):(N(),V("div",Jy,[q(Mn)]))])]),_:1},8,["open"]))}});function vn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Xy={class:"moonbase:product-cart-item"},Qy=["src"],e_={key:1,class:"moonbase:image-placeholder"},t_={class:"moonbase:product-cart-item-content"},n_={key:0,class:"moonbase:cart-item-discount"},r_={class:"font-semibold"},o_={key:0,class:"ml-0.5"},s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=me({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return N(),V("div",Xy,[(r=t.lineItem.product)!=null&&r.iconUrl?(N(),V("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Qy)):(N(),V("div",e_)),I("div",t_,[I("h3",null,re((o=t.lineItem.product)==null?void 0:o.name),1),I("p",null,re((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(N(),V("p",n_,[Fe(" Discount applied: "),I("span",r_,re(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(N(),V("span",o_," (-"+re(b(vn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):we("",!0)])):we("",!0),I("p",null,re(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(N(),V("div",s_,[t.lineItem.variation.hasDiscount?(N(),V("span",i_,re(b(vn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):we("",!0),t.lineItem.quantity!==1?(N(),V("span",a_,re(t.lineItem.quantity)+" x "+re(b(vn)(t.lineItem.variation.price[t.currency],t.currency)),1)):we("",!0),Fe(" "+re(b(vn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):we("",!0)])}}}),u_={class:"moonbase:bundle-cart-item"},c_=["src"],d_={key:1,class:"moonbase:image-placeholder"},f_={class:"moonbase:bundle-cart-item-content"},p_={key:0,class:"moonbase:cart-item-discount"},h_={class:"font-semibold"},m_={key:0,class:"ml-0.5"},v_={class:"moonbase:bundle-cart-item-summary"},g_=["data-open"],y_=[I("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],__={key:2,class:"moonbase:product-cart-item-total"},b_={key:0,class:"moonbase:discount"},w_={key:1},E_=["src"],O_={key:1,class:"moonbase:image-placeholder"},N_=["data-included"],S_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},x_=[I("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],T_={key:0,class:"truncate italic"},C_={key:1,class:"truncate"},k_=me({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=$(!1),n=$(null);return Xe(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,u,l,c,d;return N(),V("div",null,[I("div",u_,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(N(),V("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,c_)):(N(),V("div",d_)),I("div",f_,[I("h3",null,re((i=r.lineItem.bundle)==null?void 0:i.name),1),I("p",null,re((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(N(),V("p",p_,[Fe(" Discount applied: "),I("span",h_,re(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(N(),V("span",m_," (-"+re(b(vn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):we("",!0)])):we("",!0),I("div",v_,[I("span",null,re(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(N(),V("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[I("span",null,[Fe(" Including "+re((u=r.lineItem.bundle)==null?void 0:u.products.filter(f=>f.included).length)+" ",1),(l=r.lineItem.bundle)!=null&&l.products.some(f=>!f.included)?(N(),V(Pe,{key:0},[Fe("of "+re((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):we("",!0),Fe(" products ")]),(N(),V("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},y_,8,g_))])):we("",!0)])]),r.lineItem.variation?(N(),V("div",__,[r.lineItem.variation.hasDiscount?(N(),V("span",b_,re(b(vn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):we("",!0),r.lineItem.quantity!==1?(N(),V("span",w_,re(r.lineItem.quantity)+" x "+re(b(vn)(r.lineItem.variation.price[r.currency],r.currency)),1)):we("",!0),Fe(" "+re(b(vn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):we("",!0)]),I("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(N(!0),V(Pe,null,Pr(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(N(),V("div",{key:f.id},[f!=null&&f.iconUrl?(N(),V("img",{key:0,src:f.iconUrl,alt:""},null,8,E_)):(N(),V("div",O_)),I("div",null,[I("h3",{"data-included":f.included||void 0},[f.included?(N(),V("svg",S_,x_)):we("",!0),Fe(" "+re(f==null?void 0:f.name),1)],8,N_),f.included?f!=null&&f.tagline?(N(),V("p",C_,re(f.tagline),1)):we("",!0):(N(),V("p",T_," You already own this "))])]))),128))],512)])}}}),P_={class:"moonbase:cart-modal-container"},$_=me({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(N(),$e(b(Fa),{as:"template",show:t.open},{default:be(()=>[q(b(wd),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:be(()=>[I("div",P_,[q(b(Io),{as:"template"},{default:be(()=>[q(b(Ed),{class:"moonbase:cart-modal-overlay"})]),_:1}),q(b(Io),{as:"template"},{default:be(()=>[q(b(Od),{class:"moonbase:cart-modal-content"},{default:be(()=>[Mi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),I_=["disabled","data-success","data-error","data-working","data-variant"],D_=["data-visible"],Vd=me({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=$(!1),r=$(!1),o=$(!1),s=Y(()=>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 jt(2500),t.noReset||(r.value=!1))}catch{n.value=!1,o.value=!0,await jt(2500),o.value=!1}}return(a,u)=>(N(),V("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},[I("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(N(),$e(Mn,{key:0})):we("",!0)],8,D_),Fe(" "+re(s.value),1)],8,I_))}}),A_={class:"moonbase:cart"},V_={key:0,role:"list",class:"moonbase:cart-items"},R_={key:1,class:"moonbase:cart-empty"},j_={key:2,class:"moonbase:cart-total"},L_=I("label",null," Total ",-1),M_=I("p",null," Sales tax to be calculated at checkout ",-1),U_=me({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=He(),{items:n,total:r,currency:o,checkout:s}=ha();async function i(){s(`${window.location.pathname}?mb_intent=view_products`),await jt(2500)}return(a,u)=>(N(),$e($_,{open:a.open,onClose:u[0]||(u[0]=l=>b(t).reset())},{default:be(()=>[I("div",A_,[q(b($a),{as:"h3"},{default:be(()=>[Fe(" Cart ")]),_:1}),b(n).length>0?(N(),V("ul",V_,[(N(!0),V(Pe,null,Pr(b(n),l=>(N(),V("li",{key:l.id},[l.type==="Product"?(N(),$e(l_,{key:0,"line-item":l,currency:b(o)},null,8,["line-item","currency"])):l.type==="Bundle"?(N(),$e(k_,{key:1,"line-item":l,currency:b(o)},null,8,["line-item","currency"])):we("",!0)]))),128))])):(N(),V("div",R_," Your cart is empty! ")),b(n).length>0?(N(),V("div",j_,[L_,I("span",null,re(b(vn)(b(r).amount,b(r).currency)),1),M_])):we("",!0),b(n).length>0?(N(),$e(Vd,{key:3,handler:i,"no-reset":!0,label:"Checkout",success:"Redirecting..",error:"Error"})):we("",!0)])]),_:1},8,["open"]))}}),F_={class:"moonbase:account"},B_={key:0,class:"moonbase:error"},H_={key:0,class:"moonbase:error"},Z_=me({__name:"Account",setup(e){var F,T,K;const t=He(),{user:n,update:r,setPassword:o,signOut:s}=Kt(),i=$(((F=n.value)==null?void 0:F.name)??""),a=$(((T=n.value)==null?void 0:T.email)??""),u=$(((K=n.value)==null?void 0:K.communicationPreferences)??{newsletterOptIn:!1}),l=$(null),c=$(!1),d=$(""),f=$(""),g=$(null),m=$(!1);async function w(){l.value=null;try{(await r(i.value,a.value,void 0,u.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(C){throw l.value=C,C}}async function S(){g.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(C){throw g.value=C,C}}async function L(){m.value=!0,await s(),t.reset()}return(C,H)=>(N(),V("div",F_,[q(vr,{handler:w},{default:be(()=>[q(_t,{modelValue:i.value,"onUpdate:modelValue":H[0]||(H[0]=E=>i.value=E),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),q(_t,{modelValue:a.value,"onUpdate:modelValue":H[1]||(H[1]=E=>a.value=E),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),q(ed,{modelValue:u.value.newsletterOptIn,"onUpdate:modelValue":H[2]||(H[2]=E=>u.value.newsletterOptIn=E),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),q(gr,{label:"Save",error:"Error",success:"Saved"}),l.value?(N(),V("p",B_,re(l.value.message),1)):we("",!0)]),_:1}),q(vr,{handler:S},{default:be(()=>[q(_t,{modelValue:d.value,"onUpdate:modelValue":H[3]||(H[3]=E=>d.value=E),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(_t,{modelValue:f.value,"onUpdate:modelValue":H[4]||(H[4]=E=>f.value=E),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(gr,{label:"Save",error:"Error",success:"Saved"}),g.value?(N(),V("p",H_,re(g.value.message),1)):we("",!0)]),_:1}),q(Vd,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:L})]))}}),q_={},W_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},z_=[I("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 K_(e,t){return N(),V("svg",W_,z_)}const G_=Ln(q_,[["render",K_]]),J_={},Y_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},X_=[I("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function Q_(e,t){return N(),V("svg",Y_,X_)}const eb=Ln(J_,[["render",Q_]]),tb={},nb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},rb=[I("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 ob(e,t){return N(),V("svg",nb,rb)}const sb=Ln(tb,[["render",ob]]),ib={},ab={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},lb=[I("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),I("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 ub(e,t){return N(),V("svg",ab,lb)}const cb=Ln(ib,[["render",ub]]),db={class:"moonbase:product-downloads"},fb=["data-last","onClick"],pb={class:"moonbase:sr-only"},hb={class:"moonbase:sr-only"},mb=I("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[I("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),vb=["onClick"],gb=me({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Tr.Universal]:()=>G_,[Tr.Windows]:()=>eb,[Tr.Linux]:()=>sb,[Tr.Mac]:()=>cb},{downloadProduct:r}=pa(),o=Y(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(N(),V("span",db,[(N(!0),V(Pe,null,Pr(o.value,(a,u,l)=>(N(),V(Pe,{key:u},[a.length===1?(N(),V("button",{key:0,type:"button",role:"button","data-last":l===Object.keys(o.value).length-1||void 0,onClick:c=>b(r)(a[0])},[I("span",pb,re(u.toString()),1),(N(),$e(_u(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,fb)):(N(),$e(b(Da),{key:1,as:"div","data-last":l===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:be(()=>[q(b(kd),null,{default:be(()=>[I("span",hb,re(u.toString()),1),(N(),$e(_u(a[0].icon()),{"aria-hidden":"true"})),mb]),_:2},1024),q(Ds,{name:"moonbase:scale"},{default:be(()=>[q(b(Pd),{class:"moonbase:product-downloads-list"},{default:be(()=>[(N(!0),V(Pe,null,Pr(a,c=>(N(),V("button",{key:c.key,type:"button",role:"button",onClick:d=>b(r)(c)},re(c.name),9,vb))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),yb={class:"moonbase:product-activations"},_b=I("th",{scope:"col"}," Device ",-1),bb=I("th",{scope:"col"}," Activation Method ",-1),wb=I("th",{scope:"col"}," Last Online ",-1),Eb={key:0,scope:"col"},Ob=[I("span",{class:"sr-only"},"Actions",-1)],Nb={key:0},Sb={colspan:"3"},xb=I("td",null,null,-1),Tb={key:1},Cb=[I("td",{colspan:"3"}," No activations found ",-1)],kb={key:0},Pb=["onClick"],$b=me({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=pa(),i=$(null);Ve(async()=>{let l=await o(n.productId);for(i.value=l.items.map(c=>({...c,revoking:!1}));l.hasMore&&l.next;)l=await o(n.productId,l.next),i.value.push(...l.items.map(c=>({...c,revoking:!1})))});const a=Y(()=>i.value&&i.value.some(l=>l.activationMethod===ci.Online));async function u(l){l.revoking=!0,await s(l),r("revoked",l),i.value&&i.value.splice(i.value.indexOf(l),1)}return(l,c)=>(N(),V("table",yb,[I("thead",null,[I("tr",null,[_b,bb,wb,a.value?(N(),V("th",Eb,Ob)):we("",!0)])]),I("tbody",null,[i.value?i.value.length===0?(N(),V("tr",Tb,Cb)):we("",!0):(N(),V("tr",Nb,[I("td",Sb,[q(Mn),Fe(" Loading activations.. ")]),xb])),(N(!0),V(Pe,null,Pr(i.value,d=>{var f;return N(),V("tr",{key:d.id},[I("td",null,re(d.name),1),I("td",null,re(d.activationMethod),1),I("td",null,re((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(N(),V("td",kb,[I("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:g=>u(d)},[d.revoking?(N(),$e(Mn,{key:0})):we("",!0),Fe(" Revoke ")],8,Pb)])):we("",!0)])}),128))])]))}}),Ib={class:"moonbase:products"},Db=I("th",{scope:"col"}," Product ",-1),Ab=I("th",{scope:"col"}," Activations ",-1),Vb={key:0,scope:"col"},Rb={key:0},jb=I("td",null,null,-1),Lb={key:1},Mb=[I("td",{colspan:"3"}," No products found ",-1)],Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb=I("span",{class:"moonbase:sr-only"},"View activations",-1),Hb={key:0},Zb={key:0},qb=me({__name:"Products",setup(e){const{getProducts:t}=pa(),n=$(null);Ve(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=Y(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(N(),V("table",Ib,[I("thead",null,[I("tr",null,[Db,Ab,r.value?(N(),V("th",Vb," Downloads ")):we("",!0)])]),I("tbody",null,[n.value?n.value.length===0?(N(),V("tr",Lb,Mb)):we("",!0):(N(),V("tr",Rb,[I("td",null,[q(Mn),Fe(" Loading products.. ")]),jb])),(N(!0),V(Pe,null,Pr(n.value||[],i=>(N(),V("tr",{key:i.id},[I("td",null,[I("div",null,[i.iconUrl?(N(),V("img",{key:0,src:i.iconUrl,alt:""},null,8,Ub)):(N(),V("div",Fb)),I("span",null,re(i.name),1)])]),q(b(Da),{as:"td"},{default:be(()=>[q(b(kd),{class:"moonbase:button","data-variant":"secondary"},{default:be(()=>[Bb,Fe(" "+re(i.currentActivations)+" / "+re(i.maxActivations),1)]),_:2},1024),q(Ds,{name:"moonbase:scale"},{default:be(()=>[q(b(Pd),null,{default:be(()=>[q($b,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(N(),V("td",Hb,[i.currentVersion!=null?(N(),V("div",Zb,[i.downloads?(N(),$e(gb,{key:0,downloads:i.downloads},null,8,["downloads"])):we("",!0)])):we("",!0)])):we("",!0)]))),128))])]))}}),Wb={class:"moonbase:customer"},zb=me({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=He();function n(s){switch(s){case Oe.ViewAccount:return 0;case Oe.ViewProducts:return 1;case Oe.RedeemVoucher:return 2}return 0}const r=$(n(t.intent));Xe(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(N(),$e(Ba,{open:s.open,onClose:i[0]||(i[0]=a=>b(t).reset())},{default:be(()=>[I("div",Wb,[q(b(jy),{"selected-index":r.value,onChange:o},{default:be(()=>[q(b(Ly),null,{default:be(()=>[q(b(Va),null,{default:be(()=>[Fe("Account")]),_:1}),q(b(Va),null,{default:be(()=>[Fe(" Products ")]),_:1}),q(b(Va),null,{default:be(()=>[Fe("Redeem")]),_:1})]),_:1}),q(b(My),null,{default:be(()=>[q(b(Ra),null,{default:be(()=>[q(Z_)]),_:1}),q(b(Ra),null,{default:be(()=>[q(qb)]),_:1}),q(b(Ra),null,{default:be(()=>[Fe(" Redeem ")]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),Kb={class:"moonbase:auto-activate"},Gb={key:0,class:"moonbase:loader"},Jb={key:1,class:"moonbase:loader"},Yb={key:2,class:"moonbase:loader"},Xb={key:3},Qb={key:0,class:"moonbase:auto-activate-product"},e1=["src"],t1={key:1,class:"moonbase:image-placeholder"},n1={key:1,class:"moonbase:loader"},r1=[I("h3",null," Uh oh ",-1),I("p",null," This activation request was cancelled, open your app to try again. ",-1)],o1={key:2,class:"moonbase:loader"},s1={key:3,class:"moonbase:loader"},i1=[I("h3",null," Done! ",-1),I("p",null," Your product is activated. ",-1)],a1={key:4,class:"moonbase:auto-activate-content"},l1={key:0},u1={key:1},c1=I("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),d1={class:"moonbase:auto-activate-cta"},f1=["href"],p1={key:2,class:"moonbase:auto-activate-trial"},h1={class:"moonbase:auto-activate-cta"},m1=me({__name:"AutoActivate",setup(e){const t=He(),{user:n,loaded:r}=Kt(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:u,error:l,fulfillLicense:c,fulfillTrial:d,cancel:f}=Zv(o);Xe(s,m=>{var w;!a.value&&!u.value&&(m==null?void 0:m.status)===Ft.Requested&&((w=m==null?void 0:m.licenseEligibility)!=null&&w.eligible)&&c()});function g(){f(),t.show(je.Customer,Oe.ViewProducts)}return(m,w)=>{var S,L,F,T;return N(),V("div",Kb,[b(i)||!b(r)?(N(),V("div",Gb,[q(Mn)])):b(l)?(N(),V("div",Jb,re(b(l)),1)):b(s)?(N(),V("div",Xb,[b(s).product?(N(),V("div",Qb,[b(s).product.iconUrl?(N(),V("img",{key:0,src:b(s).product.iconUrl,alt:""},null,8,e1)):(N(),V("div",t1)),I("div",null,[I("h2",null,re(b(s).product.name),1),I("h3",null,re(b(s).product.tagline),1)])])):we("",!0),((S=b(s))==null?void 0:S.status)===b(Ft).Cancelled?(N(),V("div",n1,r1)):b(a)||b(u)?(N(),V("div",o1,[q(Mn),I("p",null,"Activating "+re(b(s).product.name)+"...",1)])):((L=b(s))==null?void 0:L.status)===b(Ft).Completed?(N(),V("div",s1,i1)):(N(),V("div",a1,[b(n)?(F=b(n).ownedProducts)!=null&&F.includes(b(s).product.id)?(N(),V("div",u1,[c1,I("span",d1,[I("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=K=>g())}," Licenses "),b(s).product&&b(s).product.website?(N(),V("a",{key:0,href:b(s).product.website,class:"moonbase:button"}," Purchase ",8,f1)):we("",!0)])])):we("",!0):(N(),V("div",l1," Please sign in ")),(T=b(s).trialEligibility)!=null&&T.eligible?(N(),V("div",p1,[Fe(" You are eligible for a "+re(b(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),b(s).trialEligibility.existing?(N(),V(Pe,{key:0},[Fe(" of which you have "+re(b(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):we("",!0),Fe(". "),I("span",h1,[I("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=K=>b(d)())}," Start trial ")])])):we("",!0)]))])):(N(),V("div",Yb," Could not find activation request "))])}}}),v1={class:"moonbase:activation"},g1=me({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=He();return(n,r)=>(N(),$e(Ba,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:be(()=>[I("div",v1,[q(b($a),{as:"h3"},{default:be(()=>[Fe(" Activate product ")]),_:1}),n.open&&b(t).intent===b(Oe).ActivateProduct?(N(),$e(m1,{key:0})):we("",!0)])]),_:1},8,["open"]))}}),y1=me({__name:"App",setup(e){const t=ke(Ea),n=He();return(r,o)=>{var s;return N(),V(Pe,null,[(s=b(t))!=null&&s.toolbar.enabled?(N(),$e(Sg,{key:0})):we("",!0),q(U_,{open:b(n).active===b(je).Cart},null,8,["open"]),q(Yy,{open:b(n).active===b(je).Authentication},null,8,["open"]),q(g1,{open:b(n).active===b(je).Activation},null,8,["open"]),q(zb,{open:b(n).active===b(je).Customer},null,8,["open"])],64)}}});function Xs(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ha(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(Xs(e)&&Xs(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];Xs(o)&&Xs(e[r])?e[r]=Ha(e[r],o):o!==void 0&&(e[r]=o)}}return Ha(e,...t)}class _1{constructor(){jr(this,"initialized",!1);jr(this,"pinia");jr(this,"storefront")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");r.id="moonbase",r.classList.add("moonbase"),document.body.append(r);const o=Ha(wg,n);if(this.storefront=qv(t),this.pinia=vg(),Iv(y1).use(this.storefront).use(this.pinia).provide(Ea,o).mount("#moonbase"),this.initialized=!0,window&&window.location){const s=new URLSearchParams(window.location.search),i=s.get("mb_intent");if(i&&Object.values(Oe).includes(i)){const a=Object.fromEntries([...s.entries()].filter(([l])=>l.startsWith("mb_")).map(([l,c])=>[l.substring(3),c]));this[i](a);for(const l of Object.keys(a))s.delete(`mb_${l}`);const u=s.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.SignIn,t)}sign_up(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.ConfirmAccount,t)}confirm_email(){}confirm_email_change(){}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=He(this.pinia);Kt(this.storefront).user.value?t.show(je.Customer,Oe.ViewAccount):(t.show(je.Authentication,Oe.SignIn),t.enqueue(je.Customer,Oe.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Cart,Oe.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Cart,Oe.ViewCart,t)}download_product(){}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");He(this.pinia).show(je.Activation,Oe.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Cart,Oe.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=ha(this.storefront);if(t!=null&&t.product_id){const u=$c(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(o=u.value.variations)==null?void 0:o.find(l=>l.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const l=$c(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(s=l.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const u=Pc(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(i=u.value.variations)==null?void 0:i.find(l=>l.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const l=Pc(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(a=l.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}He(this.pinia).show(je.Cart,Oe.AddToCart)}checkout(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");ha(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Rd=new _1;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Rd),wt.MoonbaseIntent=Oe,wt.default=Rd,Object.defineProperties(wt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
25
+ `));const f=rd(c.props??{},i,l),m=At(c,f,!0);for(const v in f)v.startsWith("on")&&(m.props||(m.props={}),m.props[v]=f[v]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ae(s,Object.assign({},i,l),{default:()=>a})}function nd(e){return e.flatMap(t=>t.type===Pe?nd(t.children):[t])}function rd(...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 Sa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ay(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Bn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Bn||{});let Hn=me({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 ly(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function z(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Jt(e){if(xo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=z(e);if(t)return t.ownerDocument}return document}const qs=["[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 Le=(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))(Le||{}),mn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(mn||{});function Ws(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(qs)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var xa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(xa||{});function od(e,t=0){var n;return e===((n=Jt(e))==null?void 0:n.body)?!1:Je(t,{0(){return e.matches(qs)},1(){let r=e;for(;r!==null;){if(r.matches(qs))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 yr(e){e==null||e.focus({preventScroll:!0})}const uy=["textarea","input"].join(",");function cy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,uy))??!1}function Rr(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?Rr(e):e:Ws(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&cy(f)&&f.select(),2}let _r=[];ly(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||_r[0]===t.target)return;let n=t.target;n=n.closest(qs),_r.unshift(n??t.target),_r=_r.filter(r=>r!=null&&r.isConnected),_r.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 zs(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function sd(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=z(n);r instanceof HTMLElement&&t.add(r)}return t}var id=(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))(id||{});const To=Object.assign(me({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:$(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=$(null);r({el:o,$el:o});const s=Y(()=>Jt(o)),i=$(!1);Ve(()=>i.value=!0),mt(()=>i.value=!1),fy({ownerDocument:s},Y(()=>i.value&&!!(e.features&16)));const a=py({ownerDocument:s,container:o,initialFocus:Y(()=>e.initialFocus)},Y(()=>i.value&&!!(e.features&2)));hy({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Y(()=>i.value&&!!(e.features&8)));const l=Na();function u(m){const v=z(o);if(!v)return;(S=>S())(()=>{Je(l.value,{[St.Forwards]:()=>{it(v,Le.First,{skipElements:[m.relatedTarget]})},[St.Backwards]:()=>{it(v,Le.Last,{skipElements:[m.relatedTarget]})}})})}const c=$(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const v=sd(e.containers);z(o)instanceof HTMLElement&&v.add(z(o));const w=m.relatedTarget;w instanceof HTMLElement&&w.dataset.moonbaseFocusGuard!=="true"&&(ad(v,w)||(c.value?it(z(o),Je(l.value,{[St.Forwards]:()=>Le.Next,[St.Backwards]:()=>Le.Previous})|Le.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&yr(m.target)))}return()=>{const m={},v={ref:o,onKeydown:d,onFocusout:f},{features:w,initialFocus:S,containers:L,...F}=e;return Ae(Pe,[!!(w&4)&&Ae(Hn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Bn.Focusable}),Qe({ourProps:v,theirProps:{...t,...F},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(w&4)&&Ae(Hn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Bn.Focusable})])}}}),{features:id});function dy(e){const t=$(_r.slice());return Xe([e],([n],[r])=>{r===!0&&n===!1?zs(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=_r.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function fy({ownerDocument:e},t){const n=dy(t);Ve(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&yr(n())},{flush:"post"})}),mt(()=>{t.value&&yr(n())})}function py({ownerDocument:e,container:t,initialFocus:n},r){const o=$(null),s=$(!1);return Ve(()=>s.value=!0),mt(()=>s.value=!1),Ve(()=>{Xe([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=z(t);l&&zs(()=>{var d,f;if(!s.value)return;const u=z(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?yr(u):it(l,Le.First|Le.NoScroll)===mn.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 hy({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Oa((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=sd(n);z(t)instanceof HTMLElement&&a.add(z(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?ad(a,u)?(r.value=u,yr(u)):(i.preventDefault(),i.stopPropagation(),yr(l)):yr(r.value)},!0)}function ad(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function my(e){let t=sh(e.getSnapshot());return mt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Co(){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 zs(()=>{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=Co();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 vy(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 gy(){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 ld(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yy(){return/Android/gi.test(window.navigator.userAgent)}function _y(){return ld()||yy()}function by(){return ld()?{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=Co();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function wy(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Ey(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let br=vy(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:Co(),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:Ey(n)},o=[by(),gy(),wy()];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)}});br.subscribe(()=>{let e=br.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)&&br.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&br.dispatch("TEARDOWN",n)}});function Oy(e,t,n){let r=my(br),o=Y(()=>{let 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;br.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(br.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let Ny=0;function Sy(){return++Ny}function kt(){return Sy()}let Ta=new Map,ko=new Map;function ud(e,t=$(!0)){ft(n=>{if(!t.value)return;let r=z(e);if(!r)return;n(function(){if(!r)return;let i=ko.get(r)??1;if(i===1?ko.delete(r):ko.set(r,i-1),i!==1)return;let a=Ta.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Ta.delete(r))});let o=ko.get(r)??0;ko.set(r,o+1),o===0&&(Ta.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Po(e,t,n,r){xo.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const cd=30;function dd(e,t,n=Y(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:z(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!od(l,xa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=$(null);Po(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),Po(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),Po(n,"click",i=>{_y()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Po(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Po(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=cd||Math.abs(a.y-s.y)>=cd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),td(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function fd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=$(null),o=Jt(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(z(r))||u.contains((l=(a=z(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ae(Hn,{features:Bn.Hidden,ref:r})}}}let pd=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 xy(){return Ks()!==null}function Ks(){return Ce(pd,null)}function hd(e){dt(pd,e)}const md=Symbol("ForcePortalRootContext");function Ty(){return Ce(md,!1)}const vd=me({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(md,e.force),()=>{const{force:r,...o}=e;return Qe({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let gd=Symbol("StackContext");var Ca=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Ca||{});function Cy(){return Ce(gd,()=>{})}function ky({type:e,enabled:t,element:n,onUpdate:r}){let o=Cy();function s(...i){r==null||r(...i),o(...i)}Ve(()=>{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(gd,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 Py=Symbol("DescriptionContext");function $y({slot:e=$({}),name:t="Description",props:n={}}={}){let r=$([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Py,{register:o,slot:e,name:t,props:n}),Y(()=>r.value.length>0?r.value.join(" "):void 0)}function yd(e){const t=Jt(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 Iy=me({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$(null);Y(()=>Jt(r));const o=Ty(),s=Ce(bd,null),i=$(o===!0||s==null?yd(r.value):s.resolveTarget()),a=$(!1);Ve(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(ka,null);let u=!1;const c=ks();return Xe(r,()=>{if(u||!l)return;const d=z(r);d&&(mt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ae(Em,{to:i.value},Qe({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let ka=Symbol("PortalParentContext");function _d(){const e=Ce(ka,null),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,me({name:"PortalWrapper",setup(s,{slots:i}){return dt(ka,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let bd=Symbol("PortalGroupContext");const Dy=me({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=ro({resolveTarget(){return e.target}});return dt(bd,r),()=>{const{target:o,...s}=e;return Qe({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Pa=Symbol("DialogContext");function Gs(e){const t=Ce(Pa,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Gs),n}return t}const Js="DC8F892D-2EBD-447C-A4C8-A03058436FF4",wd=me({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:Js},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${kt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var ue;const s=$(!1);Ve(()=>{s.value=!0});let i=!1;const a=Y(()=>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=$(0),u=Ks(),c=Y(()=>e.open===Js&&u!==null?(u.value&at.Open)===at.Open:e.open),d=$(null),f=Y(()=>Jt(d));if(o({el:d,$el:d}),!(e.open!==Js||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===Js?void 0:e.open}`);const v=Y(()=>s.value&&c.value?0:1),w=Y(()=>v.value===0),S=$(null),L={titleId:S,panelRef:$(null),dialogState:v,setTitleId(Te){S.value!==Te&&(S.value=Te)},close(){t("close",!1)}},F=Y(()=>l.value>1),T=Ce(Pa,null)!==null,[K,C]=_d(),{resolveContainers:H,mainTreeNodeRef:E,MainTreeNode:de}=fd({portals:K,defaultContainers:[Y(()=>L.panelRef.value??d.value)]}),J=Y(()=>F.value?"parent":"leaf"),D=Y(()=>u!==null?(u.value&at.Closing)===at.Closing:!1),x=Y(()=>T||D.value?!1:w.value),R=Y(()=>{var Te;return Array.from(((Te=f.value)==null?void 0:Te.querySelectorAll("body > *"))??[]).find(De=>De.id==="moonbase"?!1:De.contains(z(E))&&De instanceof HTMLElement)??null});ud(R,x);const oe=Y(()=>F.value?!0:w.value),_=Y(()=>{var Te;return Array.from(((Te=f.value)==null?void 0:Te.querySelectorAll("[data-moonbase-portal]"))??[]).find(De=>De.contains(z(E))&&De instanceof HTMLElement)??null});ud(_,oe),ky({type:"Dialog",enabled:Y(()=>v.value===0),element:d,onUpdate:(Te,De)=>{if(De==="Dialog")return Je(Te,{[Ca.Add]:()=>l.value+=1,[Ca.Remove]:()=>l.value-=1})}});const k=$y({name:"DialogDescription",slot:Y(()=>({open:c.value}))});dt(Pa,L);const te=Y(()=>!(!w.value||F.value));dd(H,(Te,De)=>{Te.preventDefault(),L.close(),ao(()=>De==null?void 0:De.focus())},te);const ae=Y(()=>!(F.value||v.value!==0));Oa((ue=f.value)==null?void 0:ue.defaultView,"keydown",Te=>{ae.value&&(Te.defaultPrevented||Te.key===et.Escape&&(Te.preventDefault(),Te.stopPropagation(),L.close()))});const ne=Y(()=>!(D.value||v.value!==0||T));return Oy(f,ne,Te=>({containers:[...Te.containers??[],H]})),ft(Te=>{if(v.value!==0)return;const De=z(d);if(!De)return;const nt=new ResizeObserver(bt=>{for(const gn of bt){const Zn=gn.target.getBoundingClientRect();Zn.x===0&&Zn.y===0&&Zn.width===0&&Zn.height===0&&L.close()}});nt.observe(De),Te(()=>nt.disconnect())}),()=>{const{id:Te,open:De,initialFocus:nt,...bt}=e,gn={...n,ref:d,id:Te,role:a.value,"aria-modal":v.value===0?!0:void 0,"aria-labelledby":S.value,"aria-describedby":k.value},Zn={open:v.value===0};return Ae(vd,{force:!0},()=>[Ae(Iy,()=>Ae(Dy,{target:d.value},()=>Ae(vd,{force:!1},()=>Ae(To,{initialFocus:nt,containers:H,features:w.value?Je(J.value,{parent:To.features.RestoreFocus,leaf:To.features.All&~To.features.FocusLock}):To.features.None},()=>Ae(C,{},()=>Qe({ourProps:gn,theirProps:{...bt,...n},slot:Zn,attrs:n,slots:r,visible:v.value===0,features:Un.RenderStrategy|Un.Static,name:"Dialog"})))))),Ae(de)])}}}),Ed=me({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${kt()}`}},setup(e,{attrs:t,slots:n}){const r=Gs("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"})}}}),Od=me({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${kt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Gs("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"})}}}),$a=me({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${kt()}`}},setup(e,{attrs:t,slots:n}){const r=Gs("DialogTitle");return Ve(()=>{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 Nd(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Sd(e,t){let n=$(Nd(e.value.type,e.value.as));return Ve(()=>{n.value=Nd(e.value.type,e.value.as)}),ft(()=>{var r;n.value||z(t)&&z(t)instanceof HTMLButtonElement&&!((r=z(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const xd=Symbol("PopoverContext");function Ia(e){const t=Ce(xd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${Da.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ia),n}return t}const Ay=Symbol("PopoverGroupContext");function Td(){return Ce(Ay,null)}const Cd=Symbol("PopoverPanelContext");function Vy(){return Ce(Cd,null)}let Da=me({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var K;const o=$(null);r({el:o,$el:o});const s=$(1),i=$(null),a=$(null),l=$(null),u=$(null),c=Y(()=>Jt(o)),d=Y(()=>{var x,R;if(!z(i)||!z(u))return!1;for(const oe of document.querySelectorAll("body > *"))if(Number(oe==null?void 0:oe.contains(z(i)))^Number(oe==null?void 0:oe.contains(z(u))))return!0;const C=Ws(),H=C.indexOf(z(i)),E=(H+C.length-1)%C.length,de=(H+1)%C.length,J=C[E],D=C[de];return!((x=z(u))!=null&&x.contains(J))&&!((R=z(u))!=null&&R.contains(D))}),f={popoverState:s,buttonId:$(null),panelId:$(null),panel:u,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(C){f.closePopover();const H=C?C instanceof HTMLElement?C:C.value instanceof HTMLElement?z(C):z(f.button):z(f.button);H==null||H.focus()}};dt(xd,f),hd(Y(()=>Je(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},v=Td(),w=v==null?void 0:v.registerPopover,[S,L]=_d(),F=fd({mainTreeNodeRef:v==null?void 0:v.mainTreeNodeRef,portals:S,defaultContainers:[i,u]});function T(){var C,H,E;return(v==null?void 0:v.isFocusWithinPopoverGroup())??(((C=c.value)==null?void 0:C.activeElement)&&(((H=z(i))==null?void 0:H.contains(c.value.activeElement))||((E=z(u))==null?void 0:E.contains(c.value.activeElement))))}return ft(()=>w==null?void 0:w(m)),Oa((K=c.value)==null?void 0:K.defaultView,"focus",C=>{var H,E;C.target!==window&&C.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(F.contains(C.target)||(H=z(f.beforePanelSentinel))!=null&&H.contains(C.target)||(E=z(f.afterPanelSentinel))!=null&&E.contains(C.target)||f.closePopover()))},!0),dd(F.resolveContainers,(C,H)=>{var E;f.closePopover(),od(H,xa.Loose)||(C.preventDefault(),(E=z(i))==null||E.focus())},Y(()=>s.value===0)),()=>{const C={open:s.value===0,close:f.close};return Ae(Pe,[Ae(L,{},()=>Qe({theirProps:{...e,...n},ourProps:{ref:o},slot:C,slots:t,attrs:n,name:"Popover"})),Ae(F.MainTreeNode)])}}});const kd=me({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${kt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=Ia("PopoverButton"),s=Y(()=>Jt(o.button));r({el:o.button,$el:o.button}),Ve(()=>{o.buttonId.value=e.id}),mt(()=>{o.buttonId.value=null});const i=Td(),a=i==null?void 0:i.closeOthers,l=Vy(),u=Y(()=>l===null?!1:l.value===o.panelId.value),c=$(null),d=`moonbase-focus-sentinel-${kt()}`;u.value||ft(()=>{o.button.value=z(c)});const f=Sd(Y(()=>({as:e.as,type:t.type})),c);function m(T){var K,C,H,E,de;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case et.Space:case et.Enter:T.preventDefault(),(C=(K=T.target).click)==null||C.call(K),o.closePopover(),(H=z(o.button))==null||H.focus();break}}else switch(T.key){case et.Space:case et.Enter:T.preventDefault(),T.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(!z(o.button)||(E=s.value)!=null&&E.activeElement&&!((de=z(o.button))!=null&&de.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function v(T){u.value||T.key===et.Space&&T.preventDefault()}function w(T){var K,C;e.disabled||(u.value?(o.closePopover(),(K=z(o.button))==null||K.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(C=z(o.button))==null||C.focus()))}function S(T){T.preventDefault(),T.stopPropagation()}const L=Na();function F(){const T=z(o.panel);if(!T)return;function K(){Je(L.value,{[St.Forwards]:()=>it(T,Le.First),[St.Backwards]:()=>it(T,Le.Last)})===mn.Error&&it(Ws().filter(H=>H.dataset.moonbaseFocusGuard!=="true"),Je(L.value,{[St.Forwards]:Le.Next,[St.Backwards]:Le.Previous}),{relativeTo:z(o.button)})}K()}return()=>{const T=o.popoverState.value===0,K={open:T},{id:C,...H}=e,E=u.value?{ref:c,type:f.value,onKeydown:m,onClick:w}:{ref:c,id:C,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":z(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:v,onClick:w,onMousedown:S};return Ae(Pe,[Qe({ourProps:E,theirProps:{...t,...H},slot:K,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ae(Hn,{id:d,features:Bn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:F})])}}}),Pd=me({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-${kt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=Ia("PopoverPanel"),i=Y(()=>Jt(s.panel)),a=`moonbase-focus-sentinel-before-${kt()}`,l=`moonbase-focus-sentinel-after-${kt()}`;r({el:s.panel,$el:s.panel}),Ve(()=>{s.panelId.value=e.id}),mt(()=>{s.panelId.value=null}),dt(Cd,s.panelId),ft(()=>{var L,F;if(!o||s.popoverState.value!==0||!s.panel)return;const S=(L=i.value)==null?void 0:L.activeElement;(F=z(s.panel))!=null&&F.contains(S)||it(z(s.panel),Le.First)});const u=Ks(),c=Y(()=>u!==null?(u.value&at.Open)===at.Open:s.popoverState.value===0);function d(S){var L,F;switch(S.key){case et.Escape:if(s.popoverState.value!==0||!z(s.panel)||i.value&&!((L=z(s.panel))!=null&&L.contains(i.value.activeElement)))return;S.preventDefault(),S.stopPropagation(),s.closePopover(),(F=z(s.button))==null||F.focus();break}}function f(S){var F,T,K,C,H;const L=S.relatedTarget;L&&z(s.panel)&&((F=z(s.panel))!=null&&F.contains(L)||(s.closePopover(),((K=(T=z(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&K.call(T,L)||(H=(C=z(s.afterPanelSentinel))==null?void 0:C.contains)!=null&&H.call(C,L))&&L.focus({preventScroll:!0})))}const m=Na();function v(){const S=z(s.panel);if(!S)return;function L(){Je(m.value,{[St.Forwards]:()=>{var T;it(S,Le.First)===mn.Error&&((T=z(s.afterPanelSentinel))==null||T.focus())},[St.Backwards]:()=>{var F;(F=z(s.button))==null||F.focus({preventScroll:!0})}})}L()}function w(){const S=z(s.panel);if(!S)return;function L(){Je(m.value,{[St.Forwards]:()=>{const F=z(s.button),T=z(s.panel);if(!F)return;const K=Ws(),C=K.indexOf(F),H=K.slice(0,C+1),de=[...K.slice(C+1),...H];for(const J of de.slice())if(J.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(J)){const D=de.indexOf(J);D!==-1&&de.splice(D,1)}it(de,Le.First,{sorted:!1})},[St.Backwards]:()=>{var T;it(S,Le.Previous)===mn.Error&&((T=z(s.button))==null||T.focus())}})}L()}return()=>{const S={open:s.popoverState.value===0,close:s.close},{id:L,focus:F,...T}=e,K={ref:s.panel,id:L,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return Qe({ourProps:K,theirProps:{...t,...T},attrs:t,slot:S,slots:{...n,default:(...C)=>{var H;return[Ae(Pe,[c.value&&s.isPortalled.value&&Ae(Hn,{id:a,ref:s.beforePanelSentinel,features:Bn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:v}),(H=n.default)==null?void 0:H.call(n,...C),c.value&&s.isPortalled.value&&Ae(Hn,{id:l,ref:s.afterPanelSentinel,features:Bn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:w})])]}},features:Un.RenderStrategy|Un.Static,visible:c.value,name:"PopoverPanel"})}}});let Ry=me({props:{onFocus:{type:Function,required:!0}},setup(e){let t=$(!0);return()=>t.value?Ae(Hn,{as:"button",type:"button",features:Bn.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 $d=Symbol("TabsContext");function $o(e){const t=Ce($d,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$o),n}return t}const Aa=Symbol("TabsSSRContext"),jy=me({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=$(e.selectedIndex??e.defaultIndex),s=$([]),i=$([]),a=Y(()=>e.selectedIndex!==null),l=Y(()=>a.value?e.selectedIndex:o.value);function u(v){const w=Rr(c.tabs.value,z),S=Rr(c.panels.value,z),L=w.filter(F=>{var T;return!((T=z(F))!=null&&T.hasAttribute("disabled"))});if(v<0||v>w.length-1){const F=Je(o.value===null?0:Math.sign(v-o.value),{[-1]:()=>1,0:()=>Je(Math.sign(v),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Je(F,{0:()=>w.indexOf(L[0]),1:()=>w.indexOf(L[L.length-1])});T!==-1&&(o.value=T),c.tabs.value=w,c.panels.value=S}else{const F=w.slice(0,v),K=[...w.slice(v),...F].find(H=>L.includes(H));if(!K)return;let C=w.indexOf(K)??c.selectedIndex.value;C===-1&&(C=c.selectedIndex.value),o.value=C,c.tabs.value=w,c.panels.value=S}}let c={selectedIndex:Y(()=>o.value??e.defaultIndex??null),orientation:Y(()=>e.vertical?"vertical":"horizontal"),activation:Y(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(v){l.value!==v&&r("change",v),a.value||u(v)},registerTab(v){if(s.value.includes(v))return;const w=s.value[o.value];if(s.value.push(v),s.value=Rr(s.value,z),!a.value){const S=s.value.indexOf(w)??o.value;S!==-1&&(o.value=S)}},unregisterTab(v){const w=s.value.indexOf(v);w!==-1&&s.value.splice(w,1)},registerPanel(v){i.value.includes(v)||(i.value.push(v),i.value=Rr(i.value,z))},unregisterPanel(v){const w=i.value.indexOf(v);w!==-1&&i.value.splice(w,1)}};dt($d,c);const d=$({tabs:[],panels:[]}),f=$(!1);Ve(()=>{f.value=!0}),dt(Aa,Y(()=>f.value?null:d.value));const m=Y(()=>e.selectedIndex);return Ve(()=>{Xe([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const v=Rr(c.tabs.value,z);v.some((S,L)=>z(c.tabs.value[L])!==z(S))&&c.setSelectedIndex(v.findIndex(S=>z(S)===z(c.tabs.value[l.value])))}),()=>{const v={selectedIndex:o.value};return Ae(Pe,[s.value.length<=0&&Ae(Ry,{onFocus:()=>{for(const w of s.value){const S=z(w);if((S==null?void 0:S.tabIndex)===0)return S.focus(),!0}return!1}}),Qe({theirProps:{...n,...Sa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:v,slots:t,attrs:n,name:"TabGroup"})])}}}),Ly=me({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=$o("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"})}}}),Va=me({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${kt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=$o("Tab"),s=$(null);r({el:s,$el:s}),Ve(()=>o.registerTab(s)),mt(()=>o.unregisterTab(s));const i=Ce(Aa),a=Y(()=>{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=Y(()=>{const S=o.tabs.value.indexOf(s);return S===-1?a.value:S}),u=Y(()=>l.value===o.selectedIndex.value);function c(S){var F;const L=S();if(L===mn.Success&&o.activation.value==="auto"){const T=(F=Jt(s))==null?void 0:F.activeElement,K=o.tabs.value.findIndex(C=>z(C)===T);K!==-1&&o.setSelectedIndex(K)}return L}function d(S){const L=o.tabs.value.map(T=>z(T)).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(),c(()=>it(L,Le.First));case et.End:case et.PageDown:return S.preventDefault(),S.stopPropagation(),c(()=>it(L,Le.Last))}if(c(()=>Je(o.orientation.value,{vertical(){return S.key===et.ArrowUp?it(L,Le.Previous|Le.WrapAround):S.key===et.ArrowDown?it(L,Le.Next|Le.WrapAround):mn.Error},horizontal(){return S.key===et.ArrowLeft?it(L,Le.Previous|Le.WrapAround):S.key===et.ArrowRight?it(L,Le.Next|Le.WrapAround):mn.Error}}))===mn.Success)return S.preventDefault()}const f=$(!1);function m(){var S;f.value||(f.value=!0,!e.disabled&&((S=z(s))==null||S.focus({preventScroll:!0}),o.setSelectedIndex(l.value),zs(()=>{f.value=!1})))}function v(S){S.preventDefault()}const w=Sd(Y(()=>({as:e.as,type:t.type})),s);return()=>{var K;const S={selected:u.value,disabled:e.disabled??!1},{id:L,...F}=e,T={ref:s,onKeydown:d,onMousedown:v,onClick:m,id:L,role:"tab",type:w.value,"aria-controls":(K=z(o.panels.value[l.value]))==null?void 0:K.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return Qe({ourProps:T,theirProps:F,slot:S,attrs:t,slots:n,name:"Tab"})}}}),My=me({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$o("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Qe({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Ra=me({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-${kt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=$o("TabPanel"),s=$(null);r({el:s,$el:s}),Ve(()=>o.registerPanel(s)),mt(()=>o.unregisterPanel(s));const i=Ce(Aa),a=Y(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Y(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Y(()=>l.value===o.selectedIndex.value);return()=>{var w;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,v={ref:s,id:d,role:"tabpanel","aria-labelledby":(w=z(o.tabs.value[l.value]))==null?void 0:w.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ae(Hn,{as:"span","aria-hidden":!0,...v}):Qe({ourProps:v,theirProps:m,slot:c,attrs:t,slots:n,features:Un.Static|Un.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function Uy(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ja(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 Ys(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var La=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(La||{});function Fy(e,t){const n=Co();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Id(e,t,n,r,o,s){const i=Co(),a=s!==void 0?Uy(s):()=>{};return Ys(e,...o),ja(e,...t,...n),i.nextFrame(()=>{Ys(e,...n),ja(e,...r),i.add(Fy(e,l=>(Ys(e,...r,...t),ja(e,...o),a(l))))}),i.add(()=>Ys(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function wr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Ma=Symbol("TransitionContext");function By(){return Ce(Ma,null)!==null}function Hy(){const e=Ce(Ma,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Ua=Symbol("NestingContext");function Zy(){const e=Ce(Ua,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Xs(e){return"children"in e?Xs(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Dd(e){const t=$([]),n=$(!1);Ve(()=>n.value=!0),mt(()=>n.value=!1);function r(s,i=Fn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Je(i,{[Fn.Unmount](){t.value.splice(a,1)},[Fn.Hidden](){t.value[a].state="hidden"}}),!Xs(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,Fn.Unmount)}return{children:t,register:o,unregister:r}}const Ad=Un.RenderStrategy,Io=me({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=$(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function l(){s.value|=at.Closing,t("beforeLeave")}function u(){s.value&=~at.Closing,t("afterLeave")}if(!By()&&xy())return()=>Ae(Fa,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=$(null),d=Y(()=>e.unmount?Fn.Unmount:Fn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Hy(),{register:v,unregister:w}=Zy(),S=$(f.value?"visible":"hidden"),L={value:!0},F=kt(),T={value:!1},K=Dd(()=>{!T.value&&S.value!=="hidden"&&(S.value="hidden",w(F),u())});Ve(()=>{const oe=v(F);mt(oe)}),ft(()=>{if(d.value===Fn.Hidden&&F){if(f.value&&S.value!=="visible"){S.value="visible";return}Je(S.value,{hidden:()=>w(F),visible:()=>v(F)})}});const C=wr(e.enter),H=wr(e.enterFrom),E=wr(e.enterTo),de=wr(e.entered),J=wr(e.leave),D=wr(e.leaveFrom),x=wr(e.leaveTo);Ve(()=>{ft(()=>{if(S.value==="visible"){const oe=z(c);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function R(oe){const _=L.value&&!m.value,k=z(c);!k||!(k instanceof HTMLElement)||_||(T.value=!0,f.value&&i(),f.value||l(),oe(f.value?Id(k,C,H,E,de,te=>{T.value=!1,te===La.Finished&&a()}):Id(k,J,D,x,de,te=>{T.value=!1,te===La.Finished&&(Xs(K)||(S.value="hidden",w(F),u()))})))}return Ve(()=>{Xe([f],(oe,_,k)=>{R(k),L.value=!1},{immediate:!0})}),dt(Ua,K),hd(Y(()=>Je(S.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:oe,show:_,enter:k,enterFrom:te,enterTo:ae,entered:ne,leave:ue,leaveFrom:Te,leaveTo:De,...nt}=e,bt={ref:c},gn={...nt,...m.value&&f.value&&xo.isServer?{class:es([n.class,nt.class,...C,...H])}:{}};return Qe({theirProps:gn,ourProps:bt,slot:{},slots:r,attrs:n,features:Ad,visible:S.value==="visible",name:"TransitionChild"})}}}),qy=Io,Fa=me({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=Ks(),s=Y(()=>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=$(s.value?"visible":"hidden"),a=Dd(()=>{i.value="hidden"}),l=$(!0),u={show:s,appear:Y(()=>e.appear||!l.value)};return Ve(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":Xs(a)||(i.value="hidden")})}),dt(Ua,a),dt(Ma,u),()=>{const c=Sa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Qe({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ae(qy,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:Ad,visible:i.value==="visible",name:"Transition"})}}}),Wy={class:"moonbase:modal-container"},Ba=me({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(O(),$e(b(Fa),{as:"template",show:t.open},{default:we(()=>[q(b(wd),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:we(()=>[I("div",Wy,[q(b(Io),{as:"template"},{default:we(()=>[q(b(Ed),{class:"moonbase:modal-overlay"})]),_:1}),q(b(Io),{as:"template"},{default:we(()=>[q(b(Od),{class:"moonbase:modal-content"},{default:we(()=>[Ui(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),zy=["data-visible"],Ky=me({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=He(),o=Kt(),s=Ce(Hs),i=$(r.getParameter("email")??""),a=$(""),l=$(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);jt(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof li?l.value="User not found":l.value=c.message,c}}return(c,d)=>(O(),$e(vr,{handler:u,class:"moonbase:sign-in"},{default:we(()=>{var f;return[q(_t,{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"]),q(_t,{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"]),q(gr,{success:"Signed in",label:"Sign in",error:"Error"}),I("span",{class:"moonbase:error","data-visible":!!l.value||void 0},re(l.value),9,zy),(f=b(s))!=null&&f.auth.enable.signUp?(O(),A("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>b(r).show(b(je).Authentication,b(Oe).SignUp,{email:i.value}))}," Create account ")):ye("",!0),I("button",{type:"button",onClick:d[3]||(d[3]=m=>b(r).show(b(je).Authentication,b(Oe).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Gy={class:"moonbase:authentication"},Jy={key:0,class:"moonbase:loader"},Yy=me({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=He(),{loaded:o,user:s}=Kt();Xe(s,a=>{a&&r.intent===Oe.SignIn&&(n("authenticated",a),r.dequeue())});const i=Y(()=>{switch(r.intent){case Oe.SignIn:return"Sign in";case Oe.SignUp:return"Sign up";case Oe.ConfirmAccount:return"Confirm account";case Oe.ForgotPassword:return"Forgot password";case Oe.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(O(),$e(Ba,{open:a.open,onClose:l[3]||(l[3]=u=>b(r).reset())},{default:we(()=>[I("div",Gy,[q(b($a),{as:"h3"},{default:we(()=>[Fe(re(i.value),1)]),_:1}),b(o)?b(r).intent===b(Oe).SignIn?(O(),$e(Ky,{key:1})):b(r).intent===b(Oe).SignUp?(O(),$e(zg,{key:2,onSignedUp:l[0]||(l[0]=u=>b(r).dequeue())})):b(r).intent===b(Oe).ConfirmAccount?(O(),$e(Xg,{key:3,onConfirmedAccount:l[1]||(l[1]=u=>b(r).dequeue())})):b(r).intent===b(Oe).ForgotPassword?(O(),$e(ny,{key:4})):b(r).intent===b(Oe).ResetPassword?(O(),$e(sy,{key:5,onPasswordReset:l[2]||(l[2]=u=>b(r).dequeue())})):ye("",!0):(O(),A("div",Jy,[q(Mn)]))])]),_:1},8,["open"]))}});function vn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Xy={class:"moonbase:product-cart-item"},Qy=["src"],e_={key:1,class:"moonbase:image-placeholder"},t_={class:"moonbase:product-cart-item-content"},n_={key:0,class:"moonbase:cart-item-discount"},r_={class:"font-semibold"},o_={key:0,class:"ml-0.5"},s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=me({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return O(),A("div",Xy,[(r=t.lineItem.product)!=null&&r.iconUrl?(O(),A("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Qy)):(O(),A("div",e_)),I("div",t_,[I("h3",null,re((o=t.lineItem.product)==null?void 0:o.name),1),I("p",null,re((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(O(),A("p",n_,[Fe(" Discount applied: "),I("span",r_,re(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(O(),A("span",o_," (-"+re(b(vn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):ye("",!0)])):ye("",!0),I("p",null,re(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(O(),A("div",s_,[t.lineItem.variation.hasDiscount?(O(),A("span",i_,re(b(vn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):ye("",!0),t.lineItem.quantity!==1?(O(),A("span",a_,re(t.lineItem.quantity)+" x "+re(b(vn)(t.lineItem.variation.price[t.currency],t.currency)),1)):ye("",!0),Fe(" "+re(b(vn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):ye("",!0)])}}}),u_={class:"moonbase:bundle-cart-item"},c_=["src"],d_={key:1,class:"moonbase:image-placeholder"},f_={class:"moonbase:bundle-cart-item-content"},p_={key:0,class:"moonbase:cart-item-discount"},h_={class:"font-semibold"},m_={key:0,class:"ml-0.5"},v_={class:"moonbase:bundle-cart-item-summary"},g_=["data-open"],y_=[I("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],__={key:2,class:"moonbase:product-cart-item-total"},b_={key:0,class:"moonbase:discount"},w_={key:1},E_=["src"],O_={key:1,class:"moonbase:image-placeholder"},N_=["data-included"],S_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},x_=[I("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],T_={key:0,class:"truncate italic"},C_={key:1,class:"truncate"},k_=me({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=$(!1),n=$(null);return Xe(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return O(),A("div",null,[I("div",u_,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(O(),A("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,c_)):(O(),A("div",d_)),I("div",f_,[I("h3",null,re((i=r.lineItem.bundle)==null?void 0:i.name),1),I("p",null,re((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(O(),A("p",p_,[Fe(" Discount applied: "),I("span",h_,re(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(O(),A("span",m_," (-"+re(b(vn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):ye("",!0)])):ye("",!0),I("div",v_,[I("span",null,re(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(O(),A("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[I("span",null,[Fe(" Including "+re((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(O(),A(Pe,{key:0},[Fe("of "+re((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):ye("",!0),Fe(" products ")]),(O(),A("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},y_,8,g_))])):ye("",!0)])]),r.lineItem.variation?(O(),A("div",__,[r.lineItem.variation.hasDiscount?(O(),A("span",b_,re(b(vn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):ye("",!0),r.lineItem.quantity!==1?(O(),A("span",w_,re(r.lineItem.quantity)+" x "+re(b(vn)(r.lineItem.variation.price[r.currency],r.currency)),1)):ye("",!0),Fe(" "+re(b(vn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):ye("",!0)]),I("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(O(!0),A(Pe,null,$r(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(O(),A("div",{key:f.id},[f!=null&&f.iconUrl?(O(),A("img",{key:0,src:f.iconUrl,alt:""},null,8,E_)):(O(),A("div",O_)),I("div",null,[I("h3",{"data-included":f.included||void 0},[f.included?(O(),A("svg",S_,x_)):ye("",!0),Fe(" "+re(f==null?void 0:f.name),1)],8,N_),f.included?f!=null&&f.tagline?(O(),A("p",C_,re(f.tagline),1)):ye("",!0):(O(),A("p",T_," You already own this "))])]))),128))],512)])}}}),P_={class:"moonbase:cart-modal-container"},$_=me({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(O(),$e(b(Fa),{as:"template",show:t.open},{default:we(()=>[q(b(wd),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:we(()=>[I("div",P_,[q(b(Io),{as:"template"},{default:we(()=>[q(b(Ed),{class:"moonbase:cart-modal-overlay"})]),_:1}),q(b(Io),{as:"template"},{default:we(()=>[q(b(Od),{class:"moonbase:cart-modal-content"},{default:we(()=>[Ui(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),I_=["disabled","data-success","data-error","data-working","data-variant"],D_=["data-visible"],Vd=me({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=$(!1),r=$(!1),o=$(!1),s=Y(()=>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 jt(2500),t.noReset||(r.value=!1))}catch{n.value=!1,o.value=!0,await jt(2500),o.value=!1}}return(a,l)=>(O(),A("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},[I("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(O(),$e(Mn,{key:0})):ye("",!0)],8,D_),Fe(" "+re(s.value),1)],8,I_))}}),A_={class:"moonbase:cart"},V_={key:0,role:"list",class:"moonbase:cart-items"},R_={key:1,class:"moonbase:cart-empty"},j_={key:2,class:"moonbase:cart-total"},L_=I("label",null," Total ",-1),M_=I("p",null," Sales tax to be calculated at checkout ",-1),U_=me({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=He(),{items:n,total:r,currency:o,checkout:s}=ma();async function i(){s(`${window.location.pathname}?mb_intent=view_products`),await jt(2500)}return(a,l)=>(O(),$e($_,{open:a.open,onClose:l[0]||(l[0]=u=>b(t).reset())},{default:we(()=>[I("div",A_,[q(b($a),{as:"h3"},{default:we(()=>[Fe(" Cart ")]),_:1}),b(n).length>0?(O(),A("ul",V_,[(O(!0),A(Pe,null,$r(b(n),u=>(O(),A("li",{key:u.id},[u.type==="Product"?(O(),$e(l_,{key:0,"line-item":u,currency:b(o)},null,8,["line-item","currency"])):u.type==="Bundle"?(O(),$e(k_,{key:1,"line-item":u,currency:b(o)},null,8,["line-item","currency"])):ye("",!0)]))),128))])):(O(),A("div",R_," Your cart is empty! ")),b(n).length>0?(O(),A("div",j_,[L_,I("span",null,re(b(vn)(b(r).amount,b(r).currency)),1),M_])):ye("",!0),b(n).length>0?(O(),$e(Vd,{key:3,handler:i,"no-reset":!0,label:"Checkout",success:"Redirecting..",error:"Error"})):ye("",!0)])]),_:1},8,["open"]))}}),F_={class:"moonbase:account"},B_={key:0,class:"moonbase:error"},H_={key:0,class:"moonbase:error"},Z_=me({__name:"Account",setup(e){var F,T,K;const t=He(),{user:n,update:r,setPassword:o,signOut:s}=Kt(),i=$(((F=n.value)==null?void 0:F.name)??""),a=$(((T=n.value)==null?void 0:T.email)??""),l=$(((K=n.value)==null?void 0:K.communicationPreferences)??{newsletterOptIn:!1}),u=$(null),c=$(!1),d=$(""),f=$(""),m=$(null),v=$(!1);async function w(){u.value=null;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(C){throw u.value=C,C}}async function S(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(C){throw m.value=C,C}}async function L(){v.value=!0,await s(),t.reset()}return(C,H)=>(O(),A("div",F_,[q(vr,{handler:w},{default:we(()=>[q(_t,{modelValue:i.value,"onUpdate:modelValue":H[0]||(H[0]=E=>i.value=E),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),q(_t,{modelValue:a.value,"onUpdate:modelValue":H[1]||(H[1]=E=>a.value=E),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),q(ed,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":H[2]||(H[2]=E=>l.value.newsletterOptIn=E),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),q(gr,{label:"Save",error:"Error",success:"Saved"}),u.value?(O(),A("p",B_,re(u.value.message),1)):ye("",!0)]),_:1}),q(vr,{handler:S},{default:we(()=>[q(_t,{modelValue:d.value,"onUpdate:modelValue":H[3]||(H[3]=E=>d.value=E),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(_t,{modelValue:f.value,"onUpdate:modelValue":H[4]||(H[4]=E=>f.value=E),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(gr,{label:"Save",error:"Error",success:"Saved"}),m.value?(O(),A("p",H_,re(m.value.message),1)):ye("",!0)]),_:1}),q(Vd,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:L})]))}}),q_={},W_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},z_=[I("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 K_(e,t){return O(),A("svg",W_,z_)}const G_=Ln(q_,[["render",K_]]),J_={},Y_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},X_=[I("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function Q_(e,t){return O(),A("svg",Y_,X_)}const eb=Ln(J_,[["render",Q_]]),tb={},nb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},rb=[I("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 ob(e,t){return O(),A("svg",nb,rb)}const sb=Ln(tb,[["render",ob]]),ib={},ab={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},lb=[I("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),I("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 ub(e,t){return O(),A("svg",ab,lb)}const cb=Ln(ib,[["render",ub]]),db={class:"moonbase:product-downloads"},fb=["data-last","onClick"],pb={class:"moonbase:sr-only"},hb={class:"moonbase:sr-only"},mb=I("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[I("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),vb=["onClick"],gb=me({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Cr.Universal]:()=>G_,[Cr.Windows]:()=>eb,[Cr.Linux]:()=>sb,[Cr.Mac]:()=>cb},{downloadProduct:r}=ha(),o=Y(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(O(),A("span",db,[(O(!0),A(Pe,null,$r(o.value,(a,l,u)=>(O(),A(Pe,{key:l},[a.length===1?(O(),A("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>b(r)(a[0])},[I("span",pb,re(l.toString()),1),(O(),$e(_u(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,fb)):(O(),$e(b(Da),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:we(()=>[q(b(kd),null,{default:we(()=>[I("span",hb,re(l.toString()),1),(O(),$e(_u(a[0].icon()),{"aria-hidden":"true"})),mb]),_:2},1024),q(Ds,{name:"moonbase:scale"},{default:we(()=>[q(b(Pd),{class:"moonbase:product-downloads-list"},{default:we(()=>[(O(!0),A(Pe,null,$r(a,c=>(O(),A("button",{key:c.key,type:"button",role:"button",onClick:d=>b(r)(c)},re(c.name),9,vb))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),yb={class:"moonbase:product-activations"},_b=I("th",{scope:"col"}," Device ",-1),bb=I("th",{scope:"col"}," Activation Method ",-1),wb=I("th",{scope:"col"}," Last Online ",-1),Eb={key:0,scope:"col"},Ob=[I("span",{class:"sr-only"},"Actions",-1)],Nb={key:0},Sb={colspan:"3"},xb=I("td",null,null,-1),Tb={key:1},Cb=[I("td",{colspan:"3"}," No activations found ",-1)],kb={key:0},Pb=["onClick"],$b=me({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ha(),i=$(null);Ve(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Y(()=>i.value&&i.value.some(u=>u.activationMethod===di.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(O(),A("table",yb,[I("thead",null,[I("tr",null,[_b,bb,wb,a.value?(O(),A("th",Eb,Ob)):ye("",!0)])]),I("tbody",null,[i.value?i.value.length===0?(O(),A("tr",Tb,Cb)):ye("",!0):(O(),A("tr",Nb,[I("td",Sb,[q(Mn),Fe(" Loading activations.. ")]),xb])),(O(!0),A(Pe,null,$r(i.value,d=>{var f;return O(),A("tr",{key:d.id},[I("td",null,re(d.name),1),I("td",null,re(d.activationMethod),1),I("td",null,re((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(O(),A("td",kb,[I("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(O(),$e(Mn,{key:0})):ye("",!0),Fe(" Revoke ")],8,Pb)])):ye("",!0)])}),128))])]))}}),Ib={class:"moonbase:products"},Db=I("th",{scope:"col"}," Product ",-1),Ab=I("th",{scope:"col"}," Activations ",-1),Vb={key:0,scope:"col"},Rb={key:0},jb=I("td",null,null,-1),Lb={key:1},Mb=[I("td",{colspan:"3"}," No products found ",-1)],Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb=I("span",{class:"moonbase:sr-only"},"View activations",-1),Hb={key:0},Zb={key:0},qb=me({__name:"Products",setup(e){const{getProducts:t}=ha(),n=$(null);Ve(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=Y(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(O(),A("table",Ib,[I("thead",null,[I("tr",null,[Db,Ab,r.value?(O(),A("th",Vb," Downloads ")):ye("",!0)])]),I("tbody",null,[n.value?n.value.length===0?(O(),A("tr",Lb,Mb)):ye("",!0):(O(),A("tr",Rb,[I("td",null,[q(Mn),Fe(" Loading products.. ")]),jb])),(O(!0),A(Pe,null,$r(n.value||[],i=>(O(),A("tr",{key:i.id},[I("td",null,[I("div",null,[i.iconUrl?(O(),A("img",{key:0,src:i.iconUrl,alt:""},null,8,Ub)):(O(),A("div",Fb)),I("span",null,re(i.name),1)])]),q(b(Da),{as:"td"},{default:we(()=>[q(b(kd),{class:"moonbase:button","data-variant":"secondary"},{default:we(()=>[Bb,Fe(" "+re(i.currentActivations)+" / "+re(i.maxActivations),1)]),_:2},1024),q(Ds,{name:"moonbase:scale"},{default:we(()=>[q(b(Pd),null,{default:we(()=>[q($b,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(O(),A("td",Hb,[i.currentVersion!=null?(O(),A("div",Zb,[i.downloads?(O(),$e(gb,{key:0,downloads:i.downloads},null,8,["downloads"])):ye("",!0)])):ye("",!0)])):ye("",!0)]))),128))])]))}}),Wb={class:"moonbase:customer"},zb=me({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=He();function n(s){switch(s){case Oe.ViewAccount:return 0;case Oe.ViewProducts:return 1;case Oe.RedeemVoucher:return 2}return 0}const r=$(n(t.intent));Xe(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(O(),$e(Ba,{open:s.open,onClose:i[0]||(i[0]=a=>b(t).reset())},{default:we(()=>[I("div",Wb,[q(b(jy),{"selected-index":r.value,onChange:o},{default:we(()=>[q(b(Ly),null,{default:we(()=>[q(b(Va),null,{default:we(()=>[Fe("Account")]),_:1}),q(b(Va),null,{default:we(()=>[Fe(" Products ")]),_:1}),q(b(Va),null,{default:we(()=>[Fe("Redeem")]),_:1})]),_:1}),q(b(My),null,{default:we(()=>[q(b(Ra),null,{default:we(()=>[q(Z_)]),_:1}),q(b(Ra),null,{default:we(()=>[q(qb)]),_:1}),q(b(Ra),null,{default:we(()=>[Fe(" Redeem ")]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),Kb={class:"moonbase:auto-activate"},Gb={key:0,class:"moonbase:loader"},Jb={key:1,class:"moonbase:loader"},Yb={key:2,class:"moonbase:loader"},Xb={key:3},Qb={key:0,class:"moonbase:auto-activate-product"},e1=["src"],t1={key:1,class:"moonbase:image-placeholder"},n1={key:1,class:"moonbase:loader"},r1=[I("h3",null," Uh oh ",-1),I("p",null," This activation request was cancelled, open your app to try again. ",-1)],o1={key:2,class:"moonbase:loader"},s1={key:3,class:"moonbase:loader"},i1=[I("h3",null," Done! ",-1),I("p",null," Your product is activated. ",-1)],a1={key:4,class:"moonbase:auto-activate-content"},l1={key:0},u1={key:1},c1=I("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),d1={class:"moonbase:auto-activate-cta"},f1=["href"],p1={key:2,class:"moonbase:auto-activate-trial"},h1={class:"moonbase:auto-activate-cta"},m1=me({__name:"AutoActivate",setup(e){const t=He(),{user:n,loaded:r}=Kt(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=Zv(o);Xe(s,v=>{var w;!a.value&&!l.value&&(v==null?void 0:v.status)===Ft.Requested&&((w=v==null?void 0:v.licenseEligibility)!=null&&w.eligible)&&c()});function m(){f(),t.show(je.Customer,Oe.ViewProducts)}return(v,w)=>{var S,L,F,T;return O(),A("div",Kb,[b(i)||!b(r)?(O(),A("div",Gb,[q(Mn)])):b(u)?(O(),A("div",Jb,re(b(u)),1)):b(s)?(O(),A("div",Xb,[b(s).product?(O(),A("div",Qb,[b(s).product.iconUrl?(O(),A("img",{key:0,src:b(s).product.iconUrl,alt:""},null,8,e1)):(O(),A("div",t1)),I("div",null,[I("h2",null,re(b(s).product.name),1),I("h3",null,re(b(s).product.tagline),1)])])):ye("",!0),((S=b(s))==null?void 0:S.status)===b(Ft).Cancelled?(O(),A("div",n1,r1)):b(a)||b(l)?(O(),A("div",o1,[q(Mn),I("p",null,"Activating "+re(b(s).product.name)+"...",1)])):((L=b(s))==null?void 0:L.status)===b(Ft).Completed?(O(),A("div",s1,i1)):(O(),A("div",a1,[b(n)?(F=b(n).ownedProducts)!=null&&F.includes(b(s).product.id)?(O(),A("div",u1,[c1,I("span",d1,[I("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=K=>m())}," Licenses "),b(s).product&&b(s).product.website?(O(),A("a",{key:0,href:b(s).product.website,class:"moonbase:button"}," Purchase ",8,f1)):ye("",!0)])])):ye("",!0):(O(),A("div",l1," Please sign in ")),(T=b(s).trialEligibility)!=null&&T.eligible?(O(),A("div",p1,[Fe(" You are eligible for a "+re(b(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),b(s).trialEligibility.existing?(O(),A(Pe,{key:0},[Fe(" of which you have "+re(b(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):ye("",!0),Fe(". "),I("span",h1,[I("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=K=>b(d)())}," Start trial ")])])):ye("",!0)]))])):(O(),A("div",Yb," Could not find activation request "))])}}}),v1={class:"moonbase:activation"},g1=me({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=He();return(n,r)=>(O(),$e(Ba,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:we(()=>[I("div",v1,[q(b($a),{as:"h3"},{default:we(()=>[Fe(" Activate product ")]),_:1}),n.open&&b(t).intent===b(Oe).ActivateProduct?(O(),$e(m1,{key:0})):ye("",!0)])]),_:1},8,["open"]))}}),y1=me({__name:"App",setup(e){const t=Ce(Hs),n=He();return(r,o)=>{var s;return O(),A(Pe,null,[(s=b(t))!=null&&s.toolbar.enabled?(O(),$e(Sg,{key:0})):ye("",!0),q(U_,{open:b(n).active===b(je).Cart},null,8,["open"]),q(Yy,{open:b(n).active===b(je).Authentication},null,8,["open"]),q(g1,{open:b(n).active===b(je).Activation},null,8,["open"]),q(zb,{open:b(n).active===b(je).Customer},null,8,["open"])],64)}}});function Qs(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ha(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(Qs(e)&&Qs(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];Qs(o)&&Qs(e[r])?e[r]=Ha(e[r],o):o!==void 0&&(e[r]=o)}}return Ha(e,...t)}class _1{constructor(){Er(this,"initialized",!1);Er(this,"pinia");Er(this,"storefront");Er(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=Ha(wg,n),this.storefront=qv(t),this.pinia=vg(),Iv(y1).use(this.storefront).use(this.pinia).provide(Hs,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const o=new URLSearchParams(window.location.search),s=o.get("mb_intent");if(s&&Object.values(Oe).includes(s)){const i=Object.fromEntries([...o.entries()].filter(([l])=>l.startsWith("mb_")).map(([l,u])=>[l.substring(3),u]));this[s](i);for(const l of Object.keys(i))o.delete(`mb_${l}`);const a=o.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(a?`?${a}`:""))}}}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.SignIn,t)}sign_up(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!this.options.auth.enable.signUp)throw new Error("Sign ups are not enabled");He(this.pinia).show(je.Authentication,Oe.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Authentication,Oe.ConfirmAccount,t)}confirm_email(){}confirm_email_change(){}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=He(this.pinia);Kt(this.storefront).user.value?t.show(je.Customer,Oe.ViewAccount):(t.show(je.Authentication,Oe.SignIn),t.enqueue(je.Customer,Oe.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Cart,Oe.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Cart,Oe.ViewCart,t)}download_product(){}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");He(this.pinia).show(je.Activation,Oe.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");He(this.pinia).show(je.Cart,Oe.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=ma(this.storefront);if(t!=null&&t.product_id){const l=$c(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=$c(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=Pc(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=Pc(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}He(this.pinia).show(je.Cart,Oe.AddToCart)}checkout(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");ma(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Rd=new _1;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Rd),wt.MoonbaseIntent=Oe,wt.default=Rd,Object.defineProperties(wt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});