@moonbase.sh/storefront 0.2.63 → 0.2.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/moonbase.js +4233 -4127
- package/dist/moonbase.umd.cjs +14 -14
- package/package.json +2 -2
package/dist/moonbase.umd.cjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('#moonbase .moonbase\\:toolbar{position:fixed;bottom:32px;border-radius:16px;background-color:#1a1a1a;color:#f9f9f9;display:flex;transition-duration:.1s;transition-property:all;transition-timing-function:ease-out;transform:translateY(8px);opacity:0}#moonbase .moonbase\\:toolbar[data-location=bottom-right]{right:32px}#moonbase .moonbase\\:toolbar[data-location=bottom-left]{left:32px}#moonbase .moonbase\\:toolbar[data-visible=true]{transform:translateY(0);opacity:1;transition-duration:.5s}#moonbase .moonbase\\:toolbar-action{padding:12px 16px;transition:background-color .25s ease-out;cursor:pointer;display:flex;align-items:center}#moonbase .moonbase\\:toolbar-action:nth-child(1){border-top-left-radius:16px;border-bottom-left-radius:16px}#moonbase .moonbase\\:toolbar-action:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}#moonbase .moonbase\\:toolbar-action:hover{background-color:#ffffff1a}#moonbase .moonbase\\:toolbar-action[data-action-width=narrow]{padding:12px}#moonbase .moonbase\\:input label{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:input input{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:calc(var(--moonbase-input-border-radius) * .5);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:14px;line-height:20px;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color);transition:all .25s ease-in-out}#moonbase .moonbase\\:input input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input input:disabled{opacity:.75}#moonbase .moonbase\\:input .moonbase\\:input-hint{margin-top:8px;font-size:14px;line-height:20px}#moonbase .moonbase\\:input .moonbase\\:input-hint[data-type=error]{color:var(--moonbase-input-error-color)}@keyframes moonbase\\:spin-687bcaf0{to{transform:rotate(360deg)}}#moonbase svg[data-v-687bcaf0]{animation:moonbase\\:spin-687bcaf0 1s linear infinite}#moonbase .moonbase\\:submit-button[data-v-ba1085a0]{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-ba1085a0][data-v-ba1085a0],#moonbase .moonbase\\:submit-button[data-v-ba1085a0][data-v-ba1085a0]:hover,#moonbase .moonbase\\:submit-button[data-v-ba1085a0][data-v-ba1085a0]:focus,#moonbase .moonbase\\:submit-button[data-v-ba1085a0][data-v-ba1085a0]:active{font-size:14px;font-weight:500;line-height:20px;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-ba1085a0][data-v-ba1085a0]:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:submit-button[data-v-ba1085a0][data-v-ba1085a0]: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-ba1085a0][data-success][data-v-ba1085a0]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:submit-button[data-v-ba1085a0][data-error][data-v-ba1085a0]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:submit-button[data-v-ba1085a0] div[data-v-ba1085a0]{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-ba1085a0] div[data-v-ba1085a0][data-visible][data-v-ba1085a0]{width:20px;opacity:1}#moonbase .moonbase\\:submit-button[data-v-ba1085a0] div[data-v-ba1085a0] svg[data-v-ba1085a0]{height:20px;width:20px}#moonbase .moonbase\\:checkbox{display:flex;align-items:flex-start}#moonbase .moonbase\\:checkbox label{font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-container{display:flex;height:24px;align-items:center}#moonbase .moonbase\\:checkbox input{height:16px;width:16px;border-radius:var(--moonbase-input-border-radius);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:14px;line-height:20px;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description{margin-left:12px}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description label{font-size:14px;line-height:24px;font-weight:500;color:hsl(from var(--moonbase-text-color) h s calc(l + 5))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p{font-size:14px;line-height:24px;color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p[data-type=error]{color:var(--moonbase-input-error-color)}#moonbase .moonbase\\:sign-up{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-up>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-up .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-up .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-account{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-account>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-account .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-account .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:reset-password{display:flex;flex-direction:column}#moonbase .moonbase\\:reset-password>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:reset-password .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:reset-password .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-email-change{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-email-change>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:modal-container{display:flex;min-height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px;text-align:center}@media (min-width: 640px){#moonbase .moonbase\\:modal-container{display:block;padding:0}}#moonbase .moonbase\\:modal-center{display:none}@media (min-width: 640px){#moonbase .moonbase\\:modal-center{display:inline-block;height:100svh;vertical-align:middle}}#moonbase .moonbase\\:modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity;opacity:0}#moonbase .moonbase\\:modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-overlay[data-transition~=entered],#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;opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content{transform:scale(.95)}}@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~=entered],#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=entered],#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\\: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:416px}}#moonbase .moonbase\\:authentication>h3{font-size:18px;line-height:24px;font-weight:500;text-align:center;margin-bottom:24px}#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;opacity:0}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=entered],#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:opacity transform;opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content{transform:translate(48px)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=entered],#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~=entered],#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:.2s}#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\\: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:14px;font-weight:500;line-height:20px;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:416px}}#moonbase .moonbase\\:cart>h3{font-size:18px;line-height:24px;font-weight:500;text-align:center;margin-bottom:24px}#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:18px;line-height:22px;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total{width:100%;margin-top:16px;padding:8px;border-radius:4px;background:#0000001a;display:grid;grid-template-columns:repeat(2,1fr);justify-content:space-between}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>label{font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>span{font-weight:600;text-align:right}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>p{grid-column:-1 / 1;padding-top:8px;text-align:center}#moonbase .moonbase\\:cart>button{--moonbase-button-padding: 12px 32px;margin:32px auto 16px;min-width:164px}#moonbase .moonbase\\:account{padding-bottom:32px}#moonbase .moonbase\\:account>*:not(:last-child){margin-bottom:16px}#moonbase .moonbase\\:account form{margin:auto;max-width:420px}#moonbase .moonbase\\:account form>*:not(:first-child){margin-top:8px}#moonbase .moonbase\\:account form .moonbase\\:error{font-size:14px;line-height:20px;font-weight:600;color:var(--moonbase-error-color)}#moonbase .moonbase\\:account form .moonbase\\:notification{font-size:14px;line-height:20px;font-weight:600}#moonbase .moonbase\\:account>button{margin:32px auto 0}#moonbase .moonbase\\:product-downloads{display:flex;border-radius:var(--moonbase-border-radius);box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button{position:relative;display:inline-flex;align-items:center;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button,#moonbase .moonbase\\:product-downloads button:hover,#moonbase .moonbase\\:product-downloads button:focus,#moonbase .moonbase\\:product-downloads button:active{font-size:14px;font-weight:500;line-height:20px;border-radius:0;border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);margin:0 -1px;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:inset #fff 0 0 0 2px,inset var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads>button{border-radius:0}#moonbase .moonbase\\:product-downloads>button:first-child{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads>button[data-last]{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group{position:relative;margin:0 -1px;display:block}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group:first-child>button{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group[data-last]>button{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group button>:last-child{margin-left:8px}#moonbase .moonbase\\:product-downloads svg{height:20px;width:20px;color:#fff}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list{position:absolute;display:flex;flex-direction:column;right:0;margin-right:-4px;margin-top:8px;max-width:256px;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);overflow:hidden}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list:focus{outline:none}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button{border-radius:0}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;display:block;margin:0!important}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:first-child{border-top-right-radius:var(--moonbase-border-radius);border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:last-child{border-bottom-right-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:active{color:var(--moonbase-text-color);background-color:transparent;margin:0;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{background-color:hsl(from var(--moonbase-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{box-shadow:none}#moonbase .moonbase\\:product-activations{position:absolute;right:8px;margin-top:8px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:product-activations>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:product-activations>thead>tr>th:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:8px 12px}#moonbase .moonbase\\:product-activations>thead>tr>th:last-child{text-align:right;padding:8px 16px 8px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:product-activations>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative;font-size:14px;font-weight:600;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:product-activations>tbody>tr>td>button,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:hover,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:focus,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:products{min-width:calc(100% + 128px);margin:0 -64px}#moonbase .moonbase\\:products>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:products>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:products>thead>tr>th:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>thead>tr>th:first-child{text-align:left;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>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:products>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative}#moonbase .moonbase\\:products>tbody>tr>td:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:products>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:products>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:products>tbody>tr>td>button,#moonbase .moonbase\\:products>tbody>tr>td>button:hover,#moonbase .moonbase\\:products>tbody>tr>td>button:focus,#moonbase .moonbase\\:products>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:redeem>form{display:flex;flex-direction:column;max-width:240px;margin:64px auto 32px}#moonbase .moonbase\\:redeem>form>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:redeem>form>button{margin:auto}#moonbase .moonbase\\:redeem>form .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:redeem>form .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher{max-width:320px;margin:16px auto;padding:16px;box-shadow:0 0 0 2px var(--moonbase-button-shadow-color);border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>*:not(:first-child),#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>*:not(:first-child){margin-left:12px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child{flex-shrink:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>img,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>.moonbase\\:image-placeholder,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child{flex:1;min-width:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:first-child{font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:last-child{font-size:14px;line-height:20px;text-overflow:ellipsis}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products{padding-left:32px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:customer{display:inline-block;color:var(--moonbase-text-color);padding:32px 64px 16px}@media (min-width: 640px){#moonbase .moonbase\\:customer{width:100vw;max-width:512px}}#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:416px}}#moonbase .moonbase\\:activation>h3{font-size:18px;line-height:24px;font-weight:500;text-align:center;margin-bottom:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product{display:flex;align-items:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div{margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2 span{opacity:.75;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div:last-of-type{flex-grow:1}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>button{padding:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>button>svg{height:16px;width:16px;display:block;margin:auto;color:var(--moonbase-text-color);transition:transform .25s ease-in-out;transform:rotate(90deg)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>button>span{display:block;font-size:12px;font-weight:500;line-height:14px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 25))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>button[data-open]>svg{transform:rotate(90deg) rotateY(180deg)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content{margin-top:16px;text-align:left;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content>:not(:last-child){margin-bottom:16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul{border-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul>:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li{position:relative;display:flex;justify-content:space-between;transition:background-color .25s ease-in-out;padding:12px 16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:hover{background-color:#0000001a}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:first-child{border-top-left-radius:6px;border-top-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>:not(:first-child){margin-left:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child{min-width:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-name{font-weight:600;line-height:24px;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description{display:flex;align-items:center;line-height:24px;font-size:14px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description svg{height:16px;width:16px;margin-right:6px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description span{opacity:.5;margin:0 6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child{display:flex;align-items:center;flex-shrink:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child svg{flex:none;height:20px;width:20px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-release-description{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s ease-in-out}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-release-description>div{min-height:0;overflow:hidden;visibility:hidden;transition:visibility .5s ease-in-out}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-release-description[data-open]{grid-template-rows:1fr}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-release-description[data-open]>div{visibility:visible}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-release-description h3{color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:600;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-release-description p{margin-top:4px;font-size:14px;line-height:18px;padding:4px;border:1px rgb(from var(--moonbase-text-color) r g b / .25) solid;border-radius:var(--moonbase-border-radius);white-space:pre-line;max-height:128px;overflow-y:auto}#moonbase .moonbase\\:download-product .moonbase\\:download-product-clicker{position:absolute;top:0;right:0;left:0;padding:-1px 0;bottom:0}#moonbase .moonbase\\:download{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:download{width:100vw;max-width:440px}}#moonbase .moonbase\\:download>h3{font-size:18px;line-height:24px;font-weight:500;text-align:center;margin-bottom:24px}#moonbase,#moonbase *:not(svg,path),#moonbase :before,#moonbase :after{all:revert;box-sizing:border-box;border-width:0;border-style:solid}#moonbase *:not(svg,path){margin:0;padding:0;font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}#moonbase{--moonbase-text-color: rgb(17 24 39);--moonbase-primary-color: rgb(79 70 229);--moonbase-error-color: rgb(167, 33, 33);--moonbase-background-color: white;--moonbase-button-padding: 8px 32px;--moonbase-button-text-color: rgb(255 255 255);--moonbase-button-background-color: var(--moonbase-primary-color);--moonbase-button-shadow-color: rgb(0 0 0 / .05);--moonbase-button-success-color: rgb(22 163 74);--moonbase-button-error-color: rgb(167, 33, 33);--moonbase-button-border-radius: var(--moonbase-border-radius, 6px);--moonbase-input-active-color: var(--moonbase-primary-color);--moonbase-input-shadow-color: rgb(0 0 0 / .05);--moonbase-input-error-color: rgb(167, 33, 33);--moonbase-input-background-color: transparent;--moonbase-input-text-color:var(--moonbase-text-color);--moonbase-input-border-radius: var(--moonbase-border-radius, 6px);--moonbase-modal-padding: 8px 32px;--moonbase-modal-text-color: var(--moonbase-text-color);--moonbase-modal-background-color: rgb(255 255 255);--moonbase-modal-shadow-color: rgb(0 0 0 / .05);--moonbase-modal-border-radius: var(--moonbase-border-radius, 6px)}#moonbase .moonbase\\:scale-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:scale-enter-from{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:scale-enter-to{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:scale-leave-from{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-to{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:slide-left-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:slide-left-enter-from{opacity:0;transform:translate(16px)}#moonbase .moonbase\\:slide-left-enter-to{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:slide-left-leave-from{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-to{opacity:0;transform:translate(-16px)}#moonbase .moonbase\\:sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#moonbase a{color:inherit;text-decoration:inherit}#moonbase input,#moonbase button,#moonbase textarea,#moonbase select{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;background:none;font-size:100%;line-height:1.15;margin:0;padding:0;color:inherit}#moonbase button,#moonbase select{text-transform:none}#moonbase button,#moonbase [role=button]{cursor:pointer}#moonbase button,#moonbase [type=button],#moonbase [type=reset],#moonbase [type=submit]{-webkit-appearance:button}#moonbase h1,#moonbase h2,#moonbase h3,#moonbase h4,#moonbase h5,#moonbase h6{font-size:inherit;font-weight:inherit}#moonbase b,#moonbase strong{font-weight:bolder}#moonbase svg,.moonbase svg *{color:inherit}#moonbase table{text-indent:0;border-color:inherit;border-collapse:collapse}#moonbase img,#moonbase svg,#moonbase video,#moonbase canvas,#moonbase audio,#moonbase iframe,#moonbase embed,#moonbase object{display:block;vertical-align:middle}#moonbase ol,#moonbase ul,#moonbase menu{list-style:none;margin:0;padding:0}#moonbase img,#moonbase video{max-width:100%;height:auto}#moonbase :disabled{cursor:default}#moonbase [hidden]{display:none}#moonbase ::-moz-focus-inner{border-style:none;padding:0}#moonbase :-moz-focusring{outline:none}#moonbase :-moz-ui-invalid{box-shadow:none}')),document.head.appendChild(o)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
(function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var xw=Object.defineProperty;var kw=(kt,be,Tn)=>be in kt?xw(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var Tr=(kt,be,Tn)=>kw(kt,typeof be!="symbol"?be+"":be,Tn);var be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Tn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Tn||(Tn={}));const ne=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cn=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},H=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$f=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const Cr=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,be.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${be.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${be.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${be.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,be.assertNever(e)}return{message:n}};let vl=Cr;function If(e){vl=e}function ss(){return vl}const is=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},Af=[];function te(e,t){const n=ss(),r=is({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Cr?void 0:Cr].filter(o=>!!o)});e.common.issues.push(r)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return 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){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return 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"}),Pr=e=>({status:"dirty",value:e}),vt=e=>({status:"valid",value:e}),Ei=e=>e.status==="aborted",Oi=e=>e.status==="dirty",Yr=e=>e.status==="valid",Xr=e=>typeof Promise<"u"&&e instanceof Promise;function as(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function gl(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(se||(se={}));var Qr,eo;class Gt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yl=(e,t)=>{if(Yr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Ne{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Cn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Xr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return yl(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Xr(o)?o:Promise.resolve(o));return yl(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:H.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ft({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yt.create(this,this._def)}nullable(){return In.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return Ar.create(this,this._def)}or(t){return oo.create([this,t],this._def)}and(t){return so.create(this,t,this._def)}transform(t){return new Ft({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new co({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new xi({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fo({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return po.create(this,t)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Vf=/^c[^\s-]{8,}$/i,Rf=/^[0-9a-z]+$/,jf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Mf=/^[a-z0-9_-]{21}$/i,Uf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ff=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ni;const Hf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Wf=new RegExp(`^${bl}$`);function _l(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function zf(e){return new RegExp(`^${_l(e)}$`)}function wl(e){let t=`${bl}T${_l(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Kf(e,t){return!!((t==="v4"||!t)&&Hf.test(e)||(t==="v6"||!t)&&Zf.test(e))}class Mt extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ne.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),te(o,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?te(o,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Ff.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Ni||(Ni=new RegExp(Bf,"u")),Ni.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Lf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")Mf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Vf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Rf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")jf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:H.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:H.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?wl(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?zf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Kf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?qf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:H.invalid_string,message:s.message}),r.dirty()):be.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:H.invalid_string,...se.errToObj(r)})}_addCheck(t){return new Mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...se.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...se.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...se.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...se.errToObj(n)})}nonempty(t){return this.min(1,se.errToObj(t))}trim(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Gf(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Pn extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ne.number,received:s.parsedType}),ge}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Gf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_finite,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Pn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Pn.create=e=>new Pn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Dn extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ne.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),te(r,{code:H.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Dn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Dn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dn.create=e=>{var t;return new Dn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class to extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ne.boolean,received:r.parsedType}),ge}return vt(t.data)}}to.create=e=>new to({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class rr extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ne.date,received:s.parsedType}),ge}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:H.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),te(o,{code:H.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):be.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}rr.create=e=>new rr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class ls extends Ne{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ne.symbol,received:r.parsedType}),ge}return vt(t.data)}}ls.create=e=>new ls({typeName:pe.ZodSymbol,...Ee(e)});class no extends Ne{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ne.undefined,received:r.parsedType}),ge}return vt(t.data)}}no.create=e=>new no({typeName:pe.ZodUndefined,...Ee(e)});class ro extends Ne{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ne.null,received:r.parsedType}),ge}return vt(t.data)}}ro.create=e=>new ro({typeName:pe.ZodNull,...Ee(e)});class Dr extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return vt(t.data)}}Dr.create=e=>new Dr({typeName:pe.ZodAny,...Ee(e)});class or extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vt(t.data)}}or.create=e=>new or({typeName:pe.ZodUnknown,...Ee(e)});class fn extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:H.invalid_type,expected:ne.never,received:n.parsedType}),ge}}fn.create=e=>new fn({typeName:pe.ZodNever,...Ee(e)});class us extends Ne{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ne.void,received:r.parsedType}),ge}return vt(t.data)}}us.create=e=>new us({typeName:pe.ZodVoid,...Ee(e)});class Ut extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return te(n,{code:H.invalid_type,expected:ne.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)&&(te(n,{code:i?H.too_big:H.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:H.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(te(n,{code:H.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Gt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Gt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function $r(e){if(e instanceof ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Yt.create($r(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:$r(e.element)}):e instanceof Yt?Yt.create($r(e.unwrap())):e instanceof In?In.create($r(e.unwrap())):e instanceof Jt?Jt.create(e.items.map(t=>$r(t))):e}class ze extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const u=this._getOrReturnCtx(t);return te(u,{code:H.invalid_type,expected:ne.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 fn&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=s[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Gt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof fn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")a.length>0&&(te(o,{code:H.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Gt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>ut.mergeObjectSync(r,u)):ut.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return se.errToObj,new ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=se.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ze({...this._def,unknownKeys:"strip"})}passthrough(){return new ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ze({...this._def,catchall:t})}pick(t){const n={};return be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}omit(t){const n={};return be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}deepPartial(){return $r(this)}partial(t){const n={};return be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ze({...this._def,shape:()=>n})}required(t){const n={};return be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yt;)s=s._def.innerType;n[r]=s}}),new ze({...this._def,shape:()=>n})}keyof(){return El(be.objectKeys(this.shape))}}ze.create=(e,t)=>new ze({shape:()=>e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)});class oo extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Tt(a.ctx.common.issues));return te(n,{code:H.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 Tt(l));return te(n,{code:H.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}}oo.create=(e,t)=>new oo({options:e,typeName:pe.ZodUnion,...Ee(t)});const pn=e=>e instanceof ao?pn(e.schema):e instanceof Ft?pn(e.innerType()):e instanceof lo?[e.value]:e instanceof $n?e.options:e instanceof uo?be.objectValues(e.enum):e instanceof co?pn(e._def.innerType):e instanceof no?[void 0]:e instanceof ro?[null]:e instanceof Yt?[void 0,...pn(e.unwrap())]:e instanceof In?[null,...pn(e.unwrap())]:e instanceof xi||e instanceof ho?pn(e.unwrap()):e instanceof fo?pn(e._def.innerType):[];class cs extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return te(n,{code:H.invalid_type,expected:ne.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}):(te(n,{code:H.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=pn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new cs({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function Si(e,t){const n=Cn(e),r=Cn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=be.objectKeys(t),s=be.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Si(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Si(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class so extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Ei(s)||Ei(i))return ge;const a=Si(s.value,i.value);return a.valid?((Oi(s)||Oi(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:H.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}))}}so.create=(e,t,n)=>new so({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Jt extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return te(r,{code:H.invalid_type,expected:ne.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return te(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Gt(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 Jt({...this._def,rest:t})}}Jt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jt({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class io extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return te(r,{code:H.invalid_type,expected:ne.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 Gt(r,a,r.path,a)),value:i._parse(new Gt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new io({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new io({keyType:Mt.create(),valueType:t,typeName:pe.ZodRecord,...Ee(n)})}}class ds extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return te(r,{code:H.invalid_type,expected:ne.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 Gt(r,a,r.path,[u,"key"])),value:s._parse(new Gt(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return 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}}}}ds.create=(e,t,n)=>new ds({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class sr extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return te(r,{code:H.invalid_type,expected:ne.set,received:r.parsedType}),ge;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:H.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(te(r,{code:H.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const 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 Gt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new sr({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new sr({...this._def,maxSize:{value:t,message:se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}sr.create=(e,t)=>new sr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class Ir extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return te(n,{code:H.invalid_type,expected:ne.function,received:n.parsedType}),ge;function r(a,l){return is({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),Cr].filter(u=>!!u),issueData:{code:H.invalid_arguments,argumentsError:l}})}function o(a,l){return is({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),Cr].filter(u=>!!u),issueData:{code:H.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ar){const a=this;return vt(async function(...l){const u=new Tt([]),c=await a._def.args.parseAsync(l,s).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw u.addIssue(o(d,m)),u})})}else{const a=this;return vt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Tt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Tt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ir({...this._def,args:Jt.create(t).rest(or.create())})}returns(t){return new Ir({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ir({args:t||Jt.create([]).rest(or.create()),returns:n||or.create(),typeName:pe.ZodFunction,...Ee(r)})}}class ao extends Ne{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})}}ao.create=(e,t)=>new ao({getter:e,typeName:pe.ZodLazy,...Ee(t)});class lo extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}lo.create=(e,t)=>new lo({value:e,typeName:pe.ZodLiteral,...Ee(t)});function El(e,t){return new $n({values:e,typeName:pe.ZodEnum,...Ee(t)})}class $n extends Ne{constructor(){super(...arguments),Qr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:be.joinValues(r),received:n.parsedType,code:H.invalid_type}),ge}if(as(this,Qr)||gl(this,Qr,new Set(this._def.values)),!as(this,Qr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:H.invalid_enum_value,options:r}),ge}return vt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return $n.create(t,{...this._def,...n})}exclude(t,n=this._def){return $n.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Qr=new WeakMap,$n.create=El;class uo extends Ne{constructor(){super(...arguments),eo.set(this,void 0)}_parse(t){const n=be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=be.objectValues(n);return te(r,{expected:be.joinValues(o),received:r.parsedType,code:H.invalid_type}),ge}if(as(this,eo)||gl(this,eo,new Set(be.getValidEnumValues(this._def.values))),!as(this,eo).has(t.data)){const o=be.objectValues(n);return te(r,{received:r.data,code:H.invalid_enum_value,options:o}),ge}return vt(t.data)}get enum(){return this._def.values}}eo=new WeakMap,uo.create=(e,t)=>new uo({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class Ar extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return te(n,{code:H.invalid_type,expected:ne.promise,received:n.parsedType}),ge;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return vt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ar.create=(e,t)=>new Ar({type:e,typeName:pe.ZodPromise,...Ee(t)});class Ft extends Ne{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=>{te(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ge;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ge:l.status==="dirty"||n.value==="dirty"?Pr(l.value):l});{if(n.value==="aborted")return ge;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ge:a.status==="dirty"||n.value==="dirty"?Pr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?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(!Yr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Yr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Yt extends Ne{_parse(t){return this._getType(t)===ne.undefined?vt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yt.create=(e,t)=>new Yt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class In extends Ne{_parse(t){return this._getType(t)===ne.null?vt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}In.create=(e,t)=>new In({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class co extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class fo extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Xr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fo.create=(e,t)=>new fo({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class fs extends Ne{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ne.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}fs.create=e=>new fs({typeName:pe.ZodNaN,...Ee(e)});const Jf=Symbol("zod_brand");class xi extends Ne{_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 po extends Ne{_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(),Pr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?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 po({in:t,out:n,typeName:pe.ZodPipeline})}}class ho extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Yr(o)&&(o.value=Object.freeze(o.value)),o);return Xr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}ho.create=(e,t)=>new ho({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});function Ol(e,t={},n){return e?Dr.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})}}):Dr.create()}const Yf={object:ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Xf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Mt.create,Sl=Pn.create,Qf=fs.create,ep=Dn.create,xl=to.create,tp=rr.create,np=ls.create,rp=no.create,op=ro.create,sp=Dr.create,ip=or.create,ap=fn.create,lp=us.create,up=Ut.create,cp=ze.create,dp=ze.strictCreate,fp=oo.create,pp=cs.create,hp=so.create,mp=Jt.create,vp=io.create,gp=ds.create,yp=sr.create,bp=Ir.create,_p=ao.create,wp=lo.create,Ep=$n.create,Op=uo.create,Np=Ar.create,kl=Ft.create,Sp=Yt.create,xp=In.create,kp=Ft.createWithPreprocess,Tp=po.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Cr,setErrorMap:If,getErrorMap:ss,makeIssue:is,EMPTY_PATH:Af,addIssueToContext:te,ParseStatus:ut,INVALID:ge,DIRTY:Pr,OK:vt,isAborted:Ei,isDirty:Oi,isValid:Yr,isAsync:Xr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Cn,ZodType:Ne,datetimeRegex:wl,ZodString:Mt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:to,ZodDate:rr,ZodSymbol:ls,ZodUndefined:no,ZodNull:ro,ZodAny:Dr,ZodUnknown:or,ZodNever:fn,ZodVoid:us,ZodArray:Ut,ZodObject:ze,ZodUnion:oo,ZodDiscriminatedUnion:cs,ZodIntersection:so,ZodTuple:Jt,ZodRecord:io,ZodMap:ds,ZodSet:sr,ZodFunction:Ir,ZodLazy:ao,ZodLiteral:lo,ZodEnum:$n,ZodNativeEnum:uo,ZodPromise:Ar,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Yt,ZodNullable:In,ZodDefault:co,ZodCatch:fo,ZodNaN:fs,BRAND:Jf,ZodBranded:xi,ZodPipeline:po,ZodReadonly:ho,custom:Ol,Schema:Ne,ZodSchema:Ne,late:Yf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Pn.create({...e,coerce:!0}),boolean:e=>to.create({...e,coerce:!0}),bigint:e=>Dn.create({...e,coerce:!0}),date:e=>rr.create({...e,coerce:!0})},any:sp,array:up,bigint:ep,boolean:xl,date:tp,discriminatedUnion:pp,effect:kl,enum:Ep,function:bp,instanceof:Xf,intersection:hp,lazy:_p,literal:wp,map:gp,nan:Qf,nativeEnum:Op,never:ap,null:op,nullable:xp,number:Sl,object:cp,oboolean:()=>xl().optional(),onumber:()=>Sl().optional(),optional:Sp,ostring:()=>Nl().optional(),pipeline:Tp,preprocess:kp,promise:Np,record:vp,set:yp,strictObject:dp,string:Nl,symbol:np,transformer:kl,tuple:mp,undefined:rp,union:fp,unknown:ip,void:lp,NEVER:ge,ZodIssueCode:H,quotelessJson:$f,ZodError:Tt}),Tl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ki={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Tl<"u"&&Tl,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(w){return w&&DataView.prototype.isPrototypeOf(w)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(w){return w&&c.indexOf(Object.prototype.toString.call(w))>-1};function f(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(w)||w==="")throw new TypeError('Invalid character in header field name: "'+w+'"');return w.toLowerCase()}function m(w){return typeof w!="string"&&(w=String(w)),w}function b(w){var D={next:function(){var Y=w.shift();return{done:Y===void 0,value:Y}}};return l.iterable&&(D[Symbol.iterator]=function(){return D}),D}function O(w){this.map={},w instanceof O?w.forEach(function(D,Y){this.append(Y,D)},this):Array.isArray(w)?w.forEach(function(D){this.append(D[0],D[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(D){this.append(D,w[D])},this)}O.prototype.append=function(w,D){w=f(w),D=m(D);var Y=this.map[w];this.map[w]=Y?Y+", "+D:D},O.prototype.delete=function(w){delete this.map[f(w)]},O.prototype.get=function(w){return w=f(w),this.has(w)?this.map[w]:null},O.prototype.has=function(w){return this.map.hasOwnProperty(f(w))},O.prototype.set=function(w,D){this.map[f(w)]=m(D)},O.prototype.forEach=function(w,D){for(var Y in this.map)this.map.hasOwnProperty(Y)&&w.call(D,this.map[Y],Y,this)},O.prototype.keys=function(){var w=[];return this.forEach(function(D,Y){w.push(Y)}),b(w)},O.prototype.values=function(){var w=[];return this.forEach(function(D){w.push(D)}),b(w)},O.prototype.entries=function(){var w=[];return this.forEach(function(D,Y){w.push([Y,D])}),b(w)},l.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function E(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function T(w){return new Promise(function(D,Y){w.onload=function(){D(w.result)},w.onerror=function(){Y(w.error)}})}function M(w){var D=new FileReader,Y=T(D);return D.readAsArrayBuffer(w),Y}function C(w){var D=new FileReader,Y=T(D);return D.readAsText(w),Y}function ee(w){for(var D=new Uint8Array(w),Y=new Array(D.length),re=0;re<D.length;re++)Y[re]=String.fromCharCode(D[re]);return Y.join("")}function x(w){if(w.slice)return w.slice(0);var D=new Uint8Array(w.byteLength);return D.set(new Uint8Array(w)),D.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(w){this.bodyUsed=this.bodyUsed,this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:l.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:l.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():l.arrayBuffer&&l.blob&&u(w)?(this._bodyArrayBuffer=x(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||d(w))?this._bodyArrayBuffer=x(w):this._bodyText=w=Object.prototype.toString.call(w):this._bodyText="",this.headers.get("content-type")||(typeof w=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var w=E(this);if(w)return w;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var w=E(this);return w||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(M)}),this.text=function(){var w=E(this);if(w)return w;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(ee(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(V)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function he(w){var D=w.toUpperCase();return I.indexOf(D)>-1?D:w}function q(w,D){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D=D||{};var Y=D.body;if(w instanceof q){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,D.headers||(this.headers=new O(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!Y&&w._bodyInit!=null&&(Y=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=D.credentials||this.credentials||"same-origin",(D.headers||!this.headers)&&(this.headers=new O(D.headers)),this.method=he(D.method||this.method||"GET"),this.mode=D.mode||this.mode||null,this.signal=D.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Y),(this.method==="GET"||this.method==="HEAD")&&(D.cache==="no-store"||D.cache==="no-cache")){var re=/([?&])_=[^&]*/;if(re.test(this.url))this.url=this.url.replace(re,"$1_="+new Date().getTime());else{var me=/\?/;this.url+=(me.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function V(w){var D=new FormData;return w.trim().split("&").forEach(function(Y){if(Y){var re=Y.split("="),me=re.shift().replace(/\+/g," "),oe=re.join("=").replace(/\+/g," ");D.append(decodeURIComponent(me),decodeURIComponent(oe))}}),D}function R(w){var D=new O,Y=w.replace(/\r?\n[\t ]+/g," ");return Y.split("\r").map(function(re){return re.indexOf(`
|
|
3
|
-
`)===0?re.substr(1,re.length):re}).forEach(function(re){var me=re.split(":"),oe=me.shift().trim();if(oe){var Fe=me.join(":").trim();D.append(oe,Fe)}}),D}L.call(q.prototype);function $(w,D){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D||(D={}),this.type="default",this.status=D.status===void 0?200:D.status,this.ok=this.status>=200&&this.status<300,this.statusText=D.statusText===void 0?"":""+D.statusText,this.headers=new O(D.headers),this.url=D.url||"",this._initBody(w)}L.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},$.error=function(){var w=new $(null,{status:0,statusText:""});return w.type="error",w};var ae=[301,302,303,307,308];$.redirect=function(w,D){if(ae.indexOf(D)===-1)throw new RangeError("Invalid status code");return new $(null,{status:D,headers:{location:w}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(D,Y){this.message=D,this.name=Y;var re=Error(D);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(w,D){return new Promise(function(Y,re){var me=new q(w,D);if(me.signal&&me.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:R(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new $(xt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(me.method,ht(me.url),!0),me.credentials==="include"?oe.withCredentials=!0:me.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&me.headers.get("Content-Type")&&me.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),D&&typeof D.headers=="object"&&!(D.headers instanceof O)?Object.getOwnPropertyNames(D.headers).forEach(function(Be){oe.setRequestHeader(Be,m(D.headers[Be]))}):me.headers.forEach(function(Be,xt){oe.setRequestHeader(xt,Be)}),me.signal&&(me.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&me.signal.removeEventListener("abort",Fe)}),oe.send(typeof me._bodyInit>"u"?null:me._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=q,a.Response=$),i.Headers=O,i.Request=q,i.Response=$,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(ki,ki.exports);var Pp=ki.exports;const ps=Cp(Pp);var Dp=Object.defineProperty,Cl=(e,t)=>{for(var n in t)Dp(e,n,{get:t[n],enumerable:!0})},Vr=v.record(v.number()),$p=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Vr.optional(),isExclusive:v.boolean()}),Ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Vr.optional(),isExclusive:v.boolean()}),Ti=v.discriminatedUnion("type",[$p,Ip]),Rr=v.object({id:v.string(),name:v.string(),originalPrice:Vr,price:Vr,hasDiscount:v.boolean(),discount:Ti.optional()});function mo(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Pl(e){return v.object({value:e,quantity:v.number()})}var Xt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Xt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Xt),size:v.number(),path:v.string().nullable()}),Ci=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),releaseDescription:v.string().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Dl).optional()}),hs=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Dl.array().optional(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),$l=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:hs.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Ap=v.object({suggestedCurrency:v.string(),products:hs.array(),bundles:$l.array()}),Qt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Qt||{}),ms=v.object({id:v.string(),status:v.nativeEnum(Qt),product:hs,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Vp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/activations/${e}`,ms)).data}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`,v.boolean());return v.boolean().parse(t.data)}async fulfillLicense(e){return(await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,ms,{method:"POST"})).data}async fulfillTrial(e){return(await this.api.fetch(`/api/customer/activations/${e}/trial`,ms,{method:"POST"})).data}async cancel(e){return(await this.api.fetch(`/api/customer/activations/${e}/cancel`,ms,{method:"POST"})).data}},Rp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},Pi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},An=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},jr=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},jp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function Lp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function Di(e){if(e.status===404)throw new An;if(e.status===401)throw new Pi;if(e.status===403)throw new Rp;let t;try{const n=await e.json();t=jp.parse(n)}catch(n){throw console.warn("Could not handle response",{response:e,err:n,content:await e.text()}),new Error("An unknown problem occurred")}throw new jr(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Lp(n),r.join(", ")])):void 0)}var Il=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),Mp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Mp,ownedProducts:v.string().array().optional()}),$i=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Vl=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Up=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){return(await this.api.authenticatedFetch("/api/customer/meta/user",Al)).data}async signIn(e,t){const n=await ps(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${encodeURIComponent(e)}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new An("User not found");n.status>=400&&await Di(n);try{const r=await n.json(),o=$i.parse(r);return this.tokenStore.setUser(o),o}catch(r){throw console.warn("Could not sign in user",{email:e,response:n,err:r}),new jr("Bad response","Could not sign in user",n.status)}}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,$i,{method:"POST",body:{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}});return this.tokenStore.setUser(a.data),a.data}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity",null,{method:"PATCH",body:{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r}})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password",null,{method:"POST",body:{currentPassword:e,newPassword:t}})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,null,{method:"POST"})}async resetPassword(e,t,n){const r=await ps(`${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 Di(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,Vl,{method:"POST"});try{return Vl.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new jr("Bad response","Could not confirm user account",n.status)}}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}},Rl={};Cl(Rl,{completedOrderSchema:()=>Fl,openBundleLineItem:()=>Ul,openOrderLineItem:()=>Ii,openOrderSchema:()=>vs,openProductLineItem:()=>Ml,orderSchema:()=>Bl});var Lr=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(Lr||{}),jl=v.object({code:v.string(),name:v.string(),description:v.string()}),Ll=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ml=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Vr.optional(),variation:Rr.optional(),product:Ll.optional(),appliedDiscount:Ti.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),products:Ll.and(v.object({included:v.boolean().optional()})).array()}),Ul=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),partial:v.boolean().optional(),price:Vr.optional(),variation:Rr.optional(),bundle:Fp.optional(),appliedDiscount:Ti.optional()}),Ii=v.discriminatedUnion("type",[Ml,Ul]),vs=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Ii.array(),couponsApplied:jl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),vo=v.object({currency:v.string(),amount:v.number()}),Bp=v.object({original:vo,discount:vo,subtotal:vo,taxes:vo,due:vo}),Hp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:Il.nullable()}),Fl=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:Ii.array(),couponsApplied:jl.array()}),Bl=v.discriminatedUnion("status",[vs,Fl]),Zp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/orders/${e}`,Bl)).data}async pushContent(e,t,n){const r={...Hl(n)};return t&&(r.checkout="true",r.returnUrl=t.returnUrl),(await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,vs,{method:"PATCH",body:{currency:e.currency||void 0,items:e.items}})).data}async removeBillingDetails(e){return(await this.api.fetch(`/api/customer/orders/${e}/billing-details`,vs,{method:"DELETE"})).data}};function Hl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var qp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Hl(e));return(await this.api.fetch(`/api/customer/storefront?${t.toString()}`,Ap)).data}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n){if(!this.tokenStore.hasAccessToken)throw new Pi;return await this.fetch(e,t,n)}async fetch(e,t,n){var r;const o=await this.tokenStore.getAccessToken(),s=(r=n==null?void 0:n.contentType)!=null?r:"application/json",i=await ps(this.baseUrl+e,{method:(n==null?void 0:n.method)||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":s,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n!=null&&n.body?s!=="application/json"?n.body:JSON.stringify(n.body):void 0});i.status>=400&&await Di(i);let a;try{return a=t?await i.json():null,{data:t?t.parse(a):null,headers:Object.fromEntries(i.headers.entries()),status:i.status}}catch(l){throw console.warn("Could not parse response",{status:i.status,path:e,content:a||(i.bodyUsed?"unknown":await i.text()),headers:Object.fromEntries(i.headers.entries()),userAgent:window&&window.navigator&&window.navigator.userAgent,err:l}),new jr("Bad response","Could not parse server response",i.status)}}},Zl=class os{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(os.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(os.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(os.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 ps(`${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 jr("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=$i.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case os.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));break}}};Zl.storageKey="moonbase_auth";var zp=Zl,ql=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Pl(hs).array(),redeemsBundles:Pl($l).array()}),Kp=class{constructor(e){this.api=e}async peek(e){return(await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`,ql)).data}async redeem(e){return(await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,ql,{method:"POST"})).data}},Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(zl||{}),Ai=(e=>(e.Online="Online",e.Offline="Offline",e))(Ai||{}),Vi=v.object({id:v.string(),status:v.nativeEnum(Wl),product:Ci,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Kl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(zl),activationMethod:v.nativeEnum(Ai),lastValidatedAt:v.coerce.date().nullable()}),Gp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,Vi,{method:"POST",body:e,contentType:"text/plain"});return{license:n.data,url:v.string().parse(n.headers.location)}}},Jp=class{constructor(e){this.api=e}async get(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses",mo(Vi))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`,mo(Kl))).data}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,null,{method:"POST"})}},Yp=class{constructor(e){this.api=e}async get(e,t){return(await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`,Ci)).data}async getOwned(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/products",mo(Ci))).data}async getLicenses(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`,mo(Vi))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`,mo(Kl))).data}async getDownloadUrl(e){const t=new URL(e);return t.searchParams.append("redirect","false"),(await this.api.fetch(t.pathname+t.search,v.object({location:v.string()}))).data.location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Gl={};Cl(Gl,{orders:()=>Rl});var Qp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new zp(e);const t=new Wp(this.configuration.endpoint,this.tokenStore);this.storefront=new qp(t),this.identity=new Up(t,this.tokenStore),this.vouchers=new Kp(t),this.orders=new Zp(t),this.inventory=new Xp(t),this.activationRequests=new Vp(t)}},Jl={};/**
|
|
2
|
+
(function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var Pw=Object.defineProperty;var Dw=(kt,be,Tn)=>be in kt?Pw(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var Cr=(kt,be,Tn)=>Dw(kt,typeof be!="symbol"?be+"":be,Tn);var be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Tn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Tn||(Tn={}));const ne=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pn=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},Z=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),If=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ct extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Ct))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ct.create=e=>new Ct(e);const Tr=(e,t)=>{let n;switch(e.code){case Z.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,be.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${be.joinValues(e.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${be.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${be.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Z.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 Z.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 Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,be.assertNever(e)}return{message:n}};let vl=Tr;function Af(e){vl=e}function ss(){return vl}const is=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},Vf=[];function te(e,t){const n=ss(),r=is({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Tr?void 0:Tr].filter(o=>!!o)});e.common.issues.push(r)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return 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){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return 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"}),Pr=e=>({status:"dirty",value:e}),gt=e=>({status:"valid",value:e}),Oi=e=>e.status==="aborted",Ni=e=>e.status==="dirty",Yr=e=>e.status==="valid",Xr=e=>typeof Promise<"u"&&e instanceof Promise;function as(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function gl(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(se||(se={}));var Qr,eo;class Jt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yl=(e,t)=>{if(Yr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ct(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Ne{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Pn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Pn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Pn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Xr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return yl(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Xr(o)?o:Promise.resolve(o));return yl(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:Z.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ft({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Xt.create(this,this._def)}nullable(){return An.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return Ar.create(this,this._def)}or(t){return oo.create([this,t],this._def)}and(t){return so.create(this,t,this._def)}transform(t){return new Ft({...Ee(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new co({...Ee(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new ki({typeName:he.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fo({...Ee(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return po.create(this,t)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Rf=/^c[^\s-]{8,}$/i,jf=/^[0-9a-z]+$/,Lf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Mf=/^[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,Uf=/^[a-z0-9_-]{21}$/i,Ff=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Bf=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xi;const Zf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qf=/^(([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})))$/,Wf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",zf=new RegExp(`^${bl}$`);function _l(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Kf(e){return new RegExp(`^${_l(e)}$`)}function wl(e){let t=`${bl}T${_l(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Gf(e,t){return!!((t==="v4"||!t)&&Zf.test(e)||(t==="v6"||!t)&&qf.test(e))}class Mt extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return te(s,{code:Z.invalid_type,expected:ne.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),te(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?te(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Bf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")xi||(xi=new RegExp(Hf,"u")),xi.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Mf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Rf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")jf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Lf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:Z.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:Z.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:Z.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:Z.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:Z.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?wl(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:Z.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?zf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:Z.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?Kf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:Z.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Ff.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Gf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:Z.invalid_string,message:s.message}),r.dirty()):be.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:Z.invalid_string,...se.errToObj(r)})}_addCheck(t){return new Mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...se.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...se.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...se.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...se.errToObj(n)})}nonempty(t){return this.min(1,se.errToObj(t))}trim(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Jf(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Dn extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return te(s,{code:Z.invalid_type,expected:ne.number,received:s.parsedType}),ge}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:Z.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Z.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Z.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Jf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:Z.not_finite,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Dn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Dn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Dn.create=e=>new Dn({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class $n extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:Z.invalid_type,expected:ne.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),te(r,{code:Z.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Z.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new $n({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new $n({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}$n.create=e=>{var t;return new $n({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class to extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:Z.invalid_type,expected:ne.boolean,received:r.parsedType}),ge}return gt(t.data)}}to.create=e=>new to({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class rr extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return te(s,{code:Z.invalid_type,expected:ne.date,received:s.parsedType}),ge}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:Z.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),te(o,{code:Z.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:Z.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):be.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}rr.create=e=>new rr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...Ee(e)});class ls extends Ne{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:Z.invalid_type,expected:ne.symbol,received:r.parsedType}),ge}return gt(t.data)}}ls.create=e=>new ls({typeName:he.ZodSymbol,...Ee(e)});class no extends Ne{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:Z.invalid_type,expected:ne.undefined,received:r.parsedType}),ge}return gt(t.data)}}no.create=e=>new no({typeName:he.ZodUndefined,...Ee(e)});class ro extends Ne{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return te(r,{code:Z.invalid_type,expected:ne.null,received:r.parsedType}),ge}return gt(t.data)}}ro.create=e=>new ro({typeName:he.ZodNull,...Ee(e)});class Dr extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return gt(t.data)}}Dr.create=e=>new Dr({typeName:he.ZodAny,...Ee(e)});class or extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return gt(t.data)}}or.create=e=>new or({typeName:he.ZodUnknown,...Ee(e)});class hn extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:Z.invalid_type,expected:ne.never,received:n.parsedType}),ge}}hn.create=e=>new hn({typeName:he.ZodNever,...Ee(e)});class us extends Ne{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:Z.invalid_type,expected:ne.void,received:r.parsedType}),ge}return gt(t.data)}}us.create=e=>new us({typeName:he.ZodVoid,...Ee(e)});class Ut extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return te(n,{code:Z.invalid_type,expected:ne.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)&&(te(n,{code:i?Z.too_big:Z.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:Z.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(te(n,{code:Z.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 Jt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Jt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...Ee(t)});function $r(e){if(e instanceof ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xt.create($r(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:$r(e.element)}):e instanceof Xt?Xt.create($r(e.unwrap())):e instanceof An?An.create($r(e.unwrap())):e instanceof Yt?Yt.create(e.items.map(t=>$r(t))):e}class ze extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const u=this._getOrReturnCtx(t);return te(u,{code:Z.invalid_type,expected:ne.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 hn&&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 Jt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof hn){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&&(te(o,{code:Z.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 Jt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>ut.mergeObjectSync(r,u)):ut.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return se.errToObj,new ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=se.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ze({...this._def,unknownKeys:"strip"})}passthrough(){return new ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ze({...this._def,catchall:t})}pick(t){const n={};return be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}omit(t){const n={};return be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}deepPartial(){return $r(this)}partial(t){const n={};return be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ze({...this._def,shape:()=>n})}required(t){const n={};return be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Xt;)s=s._def.innerType;n[r]=s}}),new ze({...this._def,shape:()=>n})}keyof(){return El(be.objectKeys(this.shape))}}ze.create=(e,t)=>new ze({shape:()=>e,unknownKeys:"strip",catchall:hn.create(),typeName:he.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:hn.create(),typeName:he.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:hn.create(),typeName:he.ZodObject,...Ee(t)});class oo extends Ne{_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 Ct(a.ctx.common.issues));return te(n,{code:Z.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 Ct(l));return te(n,{code:Z.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}}oo.create=(e,t)=>new oo({options:e,typeName:he.ZodUnion,...Ee(t)});const mn=e=>e instanceof ao?mn(e.schema):e instanceof Ft?mn(e.innerType()):e instanceof lo?[e.value]:e instanceof In?e.options:e instanceof uo?be.objectValues(e.enum):e instanceof co?mn(e._def.innerType):e instanceof no?[void 0]:e instanceof ro?[null]:e instanceof Xt?[void 0,...mn(e.unwrap())]:e instanceof An?[null,...mn(e.unwrap())]:e instanceof ki||e instanceof ho?mn(e.unwrap()):e instanceof fo?mn(e._def.innerType):[];class cs extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return te(n,{code:Z.invalid_type,expected:ne.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}):(te(n,{code:Z.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=mn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new cs({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function Si(e,t){const n=Pn(e),r=Pn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=be.objectKeys(t),s=be.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Si(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Si(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class so extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Oi(s)||Oi(i))return ge;const a=Si(s.value,i.value);return a.valid?((Ni(s)||Ni(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:Z.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}))}}so.create=(e,t,n)=>new so({left:e,right:t,typeName:he.ZodIntersection,...Ee(n)});class Yt extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return te(r,{code:Z.invalid_type,expected:ne.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return te(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:Z.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 Jt(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 Yt({...this._def,rest:t})}}Yt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yt({items:e,typeName:he.ZodTuple,rest:null,...Ee(t)})};class io extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return te(r,{code:Z.invalid_type,expected:ne.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 Jt(r,a,r.path,a)),value:i._parse(new Jt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new io({keyType:t,valueType:n,typeName:he.ZodRecord,...Ee(r)}):new io({keyType:Mt.create(),valueType:t,typeName:he.ZodRecord,...Ee(n)})}}class ds extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return te(r,{code:Z.invalid_type,expected:ne.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 Jt(r,a,r.path,[u,"key"])),value:s._parse(new Jt(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}}}}ds.create=(e,t,n)=>new ds({valueType:t,keyType:e,typeName:he.ZodMap,...Ee(n)});class sr extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return te(r,{code:Z.invalid_type,expected:ne.set,received:r.parsedType}),ge;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:Z.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(te(r,{code:Z.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 Jt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new sr({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new sr({...this._def,maxSize:{value:t,message:se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}sr.create=(e,t)=>new sr({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...Ee(t)});class Ir extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return te(n,{code:Z.invalid_type,expected:ne.function,received:n.parsedType}),ge;function r(a,l){return is({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),Tr].filter(u=>!!u),issueData:{code:Z.invalid_arguments,argumentsError:l}})}function o(a,l){return is({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),Tr].filter(u=>!!u),issueData:{code:Z.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ar){const a=this;return gt(async function(...l){const u=new Ct([]),c=await a._def.args.parseAsync(l,s).catch(h=>{throw u.addIssue(r(l,h)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw u.addIssue(o(d,h)),u})})}else{const a=this;return gt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Ct([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Ct([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ir({...this._def,args:Yt.create(t).rest(or.create())})}returns(t){return new Ir({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ir({args:t||Yt.create([]).rest(or.create()),returns:n||or.create(),typeName:he.ZodFunction,...Ee(r)})}}class ao extends Ne{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})}}ao.create=(e,t)=>new ao({getter:e,typeName:he.ZodLazy,...Ee(t)});class lo extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}lo.create=(e,t)=>new lo({value:e,typeName:he.ZodLiteral,...Ee(t)});function El(e,t){return new In({values:e,typeName:he.ZodEnum,...Ee(t)})}class In extends Ne{constructor(){super(...arguments),Qr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:be.joinValues(r),received:n.parsedType,code:Z.invalid_type}),ge}if(as(this,Qr)||gl(this,Qr,new Set(this._def.values)),!as(this,Qr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:Z.invalid_enum_value,options:r}),ge}return gt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return In.create(t,{...this._def,...n})}exclude(t,n=this._def){return In.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Qr=new WeakMap,In.create=El;class uo extends Ne{constructor(){super(...arguments),eo.set(this,void 0)}_parse(t){const n=be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=be.objectValues(n);return te(r,{expected:be.joinValues(o),received:r.parsedType,code:Z.invalid_type}),ge}if(as(this,eo)||gl(this,eo,new Set(be.getValidEnumValues(this._def.values))),!as(this,eo).has(t.data)){const o=be.objectValues(n);return te(r,{received:r.data,code:Z.invalid_enum_value,options:o}),ge}return gt(t.data)}get enum(){return this._def.values}}eo=new WeakMap,uo.create=(e,t)=>new uo({values:e,typeName:he.ZodNativeEnum,...Ee(t)});class Ar extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return te(n,{code:Z.invalid_type,expected:ne.promise,received:n.parsedType}),ge;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return gt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ar.create=(e,t)=>new Ar({type:e,typeName:he.ZodPromise,...Ee(t)});class Ft extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{te(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ge;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ge:l.status==="dirty"||n.value==="dirty"?Pr(l.value):l});{if(n.value==="aborted")return ge;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ge:a.status==="dirty"||n.value==="dirty"?Pr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?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(!Yr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Yr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:he.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...Ee(n)});class Xt extends Ne{_parse(t){return this._getType(t)===ne.undefined?gt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xt.create=(e,t)=>new Xt({innerType:e,typeName:he.ZodOptional,...Ee(t)});class An extends Ne{_parse(t){return this._getType(t)===ne.null?gt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}An.create=(e,t)=>new An({innerType:e,typeName:he.ZodNullable,...Ee(t)});class co extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class fo extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Xr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ct(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ct(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fo.create=(e,t)=>new fo({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class fs extends Ne{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return te(r,{code:Z.invalid_type,expected:ne.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}fs.create=e=>new fs({typeName:he.ZodNaN,...Ee(e)});const Yf=Symbol("zod_brand");class ki extends Ne{_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 po extends Ne{_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(),Pr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?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 po({in:t,out:n,typeName:he.ZodPipeline})}}class ho extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Yr(o)&&(o.value=Object.freeze(o.value)),o);return Xr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}ho.create=(e,t)=>new ho({innerType:e,typeName:he.ZodReadonly,...Ee(t)});function Ol(e,t={},n){return e?Dr.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})}}):Dr.create()}const Xf={object:ze.lazycreate};var he;(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"})(he||(he={}));const Qf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Mt.create,xl=Dn.create,ep=fs.create,tp=$n.create,Sl=to.create,np=rr.create,rp=ls.create,op=no.create,sp=ro.create,ip=Dr.create,ap=or.create,lp=hn.create,up=us.create,cp=Ut.create,dp=ze.create,fp=ze.strictCreate,pp=oo.create,hp=cs.create,mp=so.create,vp=Yt.create,gp=io.create,yp=ds.create,bp=sr.create,_p=Ir.create,wp=ao.create,Ep=lo.create,Op=In.create,Np=uo.create,xp=Ar.create,kl=Ft.create,Sp=Xt.create,kp=An.create,Cp=Ft.createWithPreprocess,Tp=po.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Tr,setErrorMap:Af,getErrorMap:ss,makeIssue:is,EMPTY_PATH:Vf,addIssueToContext:te,ParseStatus:ut,INVALID:ge,DIRTY:Pr,OK:gt,isAborted:Oi,isDirty:Ni,isValid:Yr,isAsync:Xr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Pn,ZodType:Ne,datetimeRegex:wl,ZodString:Mt,ZodNumber:Dn,ZodBigInt:$n,ZodBoolean:to,ZodDate:rr,ZodSymbol:ls,ZodUndefined:no,ZodNull:ro,ZodAny:Dr,ZodUnknown:or,ZodNever:hn,ZodVoid:us,ZodArray:Ut,ZodObject:ze,ZodUnion:oo,ZodDiscriminatedUnion:cs,ZodIntersection:so,ZodTuple:Yt,ZodRecord:io,ZodMap:ds,ZodSet:sr,ZodFunction:Ir,ZodLazy:ao,ZodLiteral:lo,ZodEnum:In,ZodNativeEnum:uo,ZodPromise:Ar,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Xt,ZodNullable:An,ZodDefault:co,ZodCatch:fo,ZodNaN:fs,BRAND:Yf,ZodBranded:ki,ZodPipeline:po,ZodReadonly:ho,custom:Ol,Schema:Ne,ZodSchema:Ne,late:Xf,get ZodFirstPartyTypeKind(){return he},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Dn.create({...e,coerce:!0}),boolean:e=>to.create({...e,coerce:!0}),bigint:e=>$n.create({...e,coerce:!0}),date:e=>rr.create({...e,coerce:!0})},any:ip,array:cp,bigint:tp,boolean:Sl,date:np,discriminatedUnion:hp,effect:kl,enum:Op,function:_p,instanceof:Qf,intersection:mp,lazy:wp,literal:Ep,map:yp,nan:ep,nativeEnum:Np,never:lp,null:sp,nullable:kp,number:xl,object:dp,oboolean:()=>Sl().optional(),onumber:()=>xl().optional(),optional:Sp,ostring:()=>Nl().optional(),pipeline:Tp,preprocess:Cp,promise:xp,record:gp,set:bp,strictObject:fp,string:Nl,symbol:rp,transformer:kl,tuple:vp,undefined:op,union:pp,unknown:ap,void:up,NEVER:ge,ZodIssueCode:Z,quotelessJson:If,ZodError:Ct}),Cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ci={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Cl<"u"&&Cl,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(N){return N&&DataView.prototype.isPrototypeOf(N)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(N){return N&&c.indexOf(Object.prototype.toString.call(N))>-1};function f(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(N)||N==="")throw new TypeError('Invalid character in header field name: "'+N+'"');return N.toLowerCase()}function h(N){return typeof N!="string"&&(N=String(N)),N}function y(N){var A={next:function(){var Q=N.shift();return{done:Q===void 0,value:Q}}};return l.iterable&&(A[Symbol.iterator]=function(){return A}),A}function O(N){this.map={},N instanceof O?N.forEach(function(A,Q){this.append(Q,A)},this):Array.isArray(N)?N.forEach(function(A){this.append(A[0],A[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(A){this.append(A,N[A])},this)}O.prototype.append=function(N,A){N=f(N),A=h(A);var Q=this.map[N];this.map[N]=Q?Q+", "+A:A},O.prototype.delete=function(N){delete this.map[f(N)]},O.prototype.get=function(N){return N=f(N),this.has(N)?this.map[N]:null},O.prototype.has=function(N){return this.map.hasOwnProperty(f(N))},O.prototype.set=function(N,A){this.map[f(N)]=h(A)},O.prototype.forEach=function(N,A){for(var Q in this.map)this.map.hasOwnProperty(Q)&&N.call(A,this.map[Q],Q,this)},O.prototype.keys=function(){var N=[];return this.forEach(function(A,Q){N.push(Q)}),y(N)},O.prototype.values=function(){var N=[];return this.forEach(function(A){N.push(A)}),y(N)},O.prototype.entries=function(){var N=[];return this.forEach(function(A,Q){N.push([Q,A])}),y(N)},l.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function b(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function k(N){return new Promise(function(A,Q){N.onload=function(){A(N.result)},N.onerror=function(){Q(N.error)}})}function R(N){var A=new FileReader,Q=k(A);return A.readAsArrayBuffer(N),Q}function T(N){var A=new FileReader,Q=k(A);return A.readAsText(N),Q}function P(N){for(var A=new Uint8Array(N),Q=new Array(A.length),re=0;re<A.length;re++)Q[re]=String.fromCharCode(A[re]);return Q.join("")}function E(N){if(N.slice)return N.slice(0);var A=new Uint8Array(N.byteLength);return A.set(new Uint8Array(N)),A.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(N){this.bodyUsed=this.bodyUsed,this._bodyInit=N,N?typeof N=="string"?this._bodyText=N:l.blob&&Blob.prototype.isPrototypeOf(N)?this._bodyBlob=N:l.formData&&FormData.prototype.isPrototypeOf(N)?this._bodyFormData=N:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)?this._bodyText=N.toString():l.arrayBuffer&&l.blob&&u(N)?(this._bodyArrayBuffer=E(N.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(N)||d(N))?this._bodyArrayBuffer=E(N):this._bodyText=N=Object.prototype.toString.call(N):this._bodyText="",this.headers.get("content-type")||(typeof N=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var N=b(this);if(N)return N;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var N=b(this);return N||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(R)}),this.text=function(){var N=b(this);if(N)return N;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(P(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(L)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function de(N){var A=N.toUpperCase();return D.indexOf(A)>-1?A:N}function W(N,A){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');A=A||{};var Q=A.body;if(N instanceof W){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,A.headers||(this.headers=new O(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!Q&&N._bodyInit!=null&&(Q=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new O(A.headers)),this.method=de(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Q),(this.method==="GET"||this.method==="HEAD")&&(A.cache==="no-store"||A.cache==="no-cache")){var re=/([?&])_=[^&]*/;if(re.test(this.url))this.url=this.url.replace(re,"$1_="+new Date().getTime());else{var me=/\?/;this.url+=(me.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}W.prototype.clone=function(){return new W(this,{body:this._bodyInit})};function L(N){var A=new FormData;return N.trim().split("&").forEach(function(Q){if(Q){var re=Q.split("="),me=re.shift().replace(/\+/g," "),oe=re.join("=").replace(/\+/g," ");A.append(decodeURIComponent(me),decodeURIComponent(oe))}}),A}function M(N){var A=new O,Q=N.replace(/\r?\n[\t ]+/g," ");return Q.split("\r").map(function(re){return re.indexOf(`
|
|
3
|
+
`)===0?re.substr(1,re.length):re}).forEach(function(re){var me=re.split(":"),oe=me.shift().trim();if(oe){var Fe=me.join(":").trim();A.append(oe,Fe)}}),A}I.call(W.prototype);function V(N,A){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText=A.statusText===void 0?"":""+A.statusText,this.headers=new O(A.headers),this.url=A.url||"",this._initBody(N)}I.call(V.prototype),V.prototype.clone=function(){return new V(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},V.error=function(){var N=new V(null,{status:0,statusText:""});return N.type="error",N};var ae=[301,302,303,307,308];V.redirect=function(N,A){if(ae.indexOf(A)===-1)throw new RangeError("Invalid status code");return new V(null,{status:A,headers:{location:N}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(A,Q){this.message=A,this.name=Q;var re=Error(A);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(N,A){return new Promise(function(Q,re){var me=new W(N,A);if(me.signal&&me.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:M(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var St="response"in oe?oe.response:oe.responseText;setTimeout(function(){Q(new V(St,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function mt(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(me.method,mt(me.url),!0),me.credentials==="include"?oe.withCredentials=!0:me.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&me.headers.get("Content-Type")&&me.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),A&&typeof A.headers=="object"&&!(A.headers instanceof O)?Object.getOwnPropertyNames(A.headers).forEach(function(Be){oe.setRequestHeader(Be,h(A.headers[Be]))}):me.headers.forEach(function(Be,St){oe.setRequestHeader(St,Be)}),me.signal&&(me.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&me.signal.removeEventListener("abort",Fe)}),oe.send(typeof me._bodyInit>"u"?null:me._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=W,a.Response=V),i.Headers=O,i.Request=W,i.Response=V,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(Ci,Ci.exports);var Dp=Ci.exports;const ps=Pp(Dp);var $p=Object.defineProperty,Tl=(e,t)=>{for(var n in t)$p(e,n,{get:t[n],enumerable:!0})},Vr=v.record(v.number()),Ip=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Vr.optional(),isExclusive:v.boolean()}),Ap=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Vr.optional(),isExclusive:v.boolean()}),Ti=v.discriminatedUnion("type",[Ip,Ap]),Rr=v.object({id:v.string(),name:v.string(),originalPrice:Vr,price:Vr,hasDiscount:v.boolean(),discount:Ti.optional()});function mo(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Pl(e){return v.object({value:e,quantity:v.number()})}var Qt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Qt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Qt),size:v.number(),path:v.string().nullable()}),Pi=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),releaseDescription:v.string().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Dl).optional()}),hs=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Dl.array().optional(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),$l=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:hs.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Vp=v.object({suggestedCurrency:v.string(),products:hs.array(),bundles:$l.array()}),en=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(en||{}),ms=v.object({id:v.string(),status:v.nativeEnum(en),product:hs,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Rp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/activations/${e}`,ms)).data}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`,v.boolean());return v.boolean().parse(t.data)}async fulfillLicense(e){return(await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,ms,{method:"POST"})).data}async fulfillTrial(e){return(await this.api.fetch(`/api/customer/activations/${e}/trial`,ms,{method:"POST"})).data}async cancel(e){return(await this.api.fetch(`/api/customer/activations/${e}/cancel`,ms,{method:"POST"})).data}},jp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},Di=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},Vn=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},jr=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}},Lp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function Mp(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 $i(e){if(e.status===404)throw new Vn;if(e.status===401)throw new Di;if(e.status===403)throw new jp;let t;try{const n=await e.json();t=Lp.parse(n)}catch(n){throw console.warn("Could not handle response",{response:e,err:n,content:await e.text()}),new Error("An unknown problem occurred")}throw new jr(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Mp(n),r.join(", ")])):void 0)}var Il=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),Up=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Up,ownedProducts:v.string().array().optional()}),Ii=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Vl=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Fp=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){return(await this.api.authenticatedFetch("/api/customer/meta/user",Al)).data}async signIn(e,t){const n=await ps(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${encodeURIComponent(e)}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new Vn("User not found");n.status>=400&&await $i(n);try{const r=await n.json(),o=Ii.parse(r);return this.tokenStore.setUser(o),o}catch(r){throw console.warn("Could not sign in user",{email:e,response:n,err:r}),new jr("Bad response","Could not sign in user",n.status)}}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,Ii,{method:"POST",body:{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}});return this.tokenStore.setUser(a.data),a.data}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity",null,{method:"PATCH",body:{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r}})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password",null,{method:"POST",body:{currentPassword:e,newPassword:t}})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,null,{method:"POST"})}async resetPassword(e,t,n){const r=await ps(`${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 $i(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,Vl,{method:"POST"});try{return Vl.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new jr("Bad response","Could not confirm user account",n.status)}}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}},Rl={};Tl(Rl,{completedOrderSchema:()=>Fl,openBundleLineItem:()=>Ul,openOrderLineItem:()=>Ai,openOrderSchema:()=>vs,openProductLineItem:()=>Ml,orderSchema:()=>Bl});var Lr=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(Lr||{}),jl=v.object({code:v.string(),name:v.string(),description:v.string()}),Ll=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ml=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Vr.optional(),variation:Rr.optional(),product:Ll.optional(),appliedDiscount:Ti.optional()}),Bp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),products:Ll.and(v.object({included:v.boolean().optional()})).array()}),Ul=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),partial:v.boolean().optional(),price:Vr.optional(),variation:Rr.optional(),bundle:Bp.optional(),appliedDiscount:Ti.optional()}),Ai=v.discriminatedUnion("type",[Ml,Ul]),vs=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Ai.array(),couponsApplied:jl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),vo=v.object({currency:v.string(),amount:v.number()}),Hp=v.object({original:vo,discount:vo,subtotal:vo,taxes:vo,due:vo}),Zp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:Il.nullable()}),Fl=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Zp,total:Hp,items:Ai.array(),couponsApplied:jl.array()}),Bl=v.discriminatedUnion("status",[vs,Fl]),qp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/orders/${e}`,Bl)).data}async pushContent(e,t,n){const r={...Hl(n)};return t&&(r.checkout="true",r.returnUrl=t.returnUrl),(await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,vs,{method:"PATCH",body:{currency:e.currency||void 0,items:e.items}})).data}async removeBillingDetails(e){return(await this.api.fetch(`/api/customer/orders/${e}/billing-details`,vs,{method:"DELETE"})).data}};function Hl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var Wp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Hl(e));return(await this.api.fetch(`/api/customer/storefront?${t.toString()}`,Vp)).data}},zp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n){if(!this.tokenStore.hasAccessToken)throw new Di;return await this.fetch(e,t,n)}async fetch(e,t,n){var r;const o=await this.tokenStore.getAccessToken(),s=(r=n==null?void 0:n.contentType)!=null?r:"application/json",i=await ps(this.baseUrl+e,{method:(n==null?void 0:n.method)||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":s,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n!=null&&n.body?s!=="application/json"?n.body:JSON.stringify(n.body):void 0});i.status>=400&&await $i(i);let a;try{return a=t?await i.json():null,{data:t?t.parse(a):null,headers:Object.fromEntries(i.headers.entries()),status:i.status}}catch(l){throw console.warn("Could not parse response",{status:i.status,path:e,content:a||(i.bodyUsed?"unknown":await i.text()),headers:Object.fromEntries(i.headers.entries()),userAgent:window&&window.navigator&&window.navigator.userAgent,err:l}),new jr("Bad response","Could not parse server response",i.status)}}},Zl=class os{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(os.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(os.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(os.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 ps(`${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 jr("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Ii.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case os.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));break}}};Zl.storageKey="moonbase_auth";var Kp=Zl,ql=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Pl(hs).array(),redeemsBundles:Pl($l).array()}),Gp=class{constructor(e){this.api=e}async peek(e){return(await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`,ql)).data}async redeem(e){return(await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,ql,{method:"POST"})).data}},Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(zl||{}),Vi=(e=>(e.Online="Online",e.Offline="Offline",e))(Vi||{}),Ri=v.object({id:v.string(),status:v.nativeEnum(Wl),product:Pi,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Kl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(zl),activationMethod:v.nativeEnum(Vi),lastValidatedAt:v.coerce.date().nullable()}),Jp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,Ri,{method:"POST",body:e,contentType:"text/plain"});return{license:n.data,url:v.string().parse(n.headers.location)}}},Yp=class{constructor(e){this.api=e}async get(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses",mo(Ri))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`,mo(Kl))).data}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,null,{method:"POST"})}},Xp=class{constructor(e){this.api=e}async get(e,t){return(await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`,Pi)).data}async getOwned(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/products",mo(Pi))).data}async getLicenses(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`,mo(Ri))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`,mo(Kl))).data}async getDownloadUrl(e){const t=new URL(e);return t.searchParams.append("redirect","false"),(await this.api.fetch(t.pathname+t.search,v.object({location:v.string()}))).data.location}},Qp=class{constructor(e){this.licenses=new Yp(e),this.products=new Xp(e),this.activation=new Jp(e)}},Gl={};Tl(Gl,{orders:()=>Rl});var eh=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new Kp(e);const t=new zp(this.configuration.endpoint,this.tokenStore);this.storefront=new Wp(t),this.identity=new Fp(t,this.tokenStore),this.vouchers=new Gp(t),this.orders=new qp(t),this.inventory=new Qp(t),this.activationRequests=new Rp(t)}},Jl={};/**
|
|
4
4
|
* @vue/shared v3.5.3
|
|
5
5
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
6
6
|
* @license MIT
|
|
7
|
-
**//*! #__NO_SIDE_EFFECTS__ */function hn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const je=Jl.NODE_ENV!=="production"?Object.freeze({}):{},Mr=Jl.NODE_ENV!=="production"?Object.freeze([]):[],et=()=>{},eh=()=>!1,go=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gs=e=>e.startsWith("onUpdate:"),Ke=Object.assign,Ri=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},th=Object.prototype.hasOwnProperty,De=(e,t)=>th.call(e,t),ue=Array.isArray,ir=e=>ys(e)==="[object Map]",Yl=e=>ys(e)==="[object Set]",de=e=>typeof e=="function",Ze=e=>typeof e=="string",Vn=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",ji=e=>(Ie(e)||de(e))&&de(e.then)&&de(e.catch),Xl=Object.prototype.toString,ys=e=>Xl.call(e),Li=e=>ys(e).slice(8,-1),Ql=e=>ys(e)==="[object Object]",Mi=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nh=hn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),bs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},rh=/-(\w)/g,Ct=bs(e=>e.replace(rh,(t,n)=>n?n.toUpperCase():"")),oh=/\B([A-Z])/g,mn=bs(e=>e.replace(oh,"-$1").toLowerCase()),ar=bs(e=>e.charAt(0).toUpperCase()+e.slice(1)),lr=bs(e=>e?`on${ar(e)}`:""),Rn=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_s=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},sh=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ih=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let eu;const Ui=()=>eu||(eu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Fi(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?ch(r):Fi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const ah=/;(?![^(]*\))/g,lh=/:([^]+)/,uh=/\/\*[^]*?\*\//g;function ch(e){const t={};return e.replace(uh,"").split(ah).forEach(n=>{if(n){const r=n.split(lh);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ws(e){let t="";if(Ze(e))t=e;else if(ue(e))for(let n=0;n<e.length;n++){const r=ws(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const dh="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",fh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",ph="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",hh=hn(dh),mh=hn(fh),vh=hn(ph),gh=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tu(e){return!!e||e===""}const nu=e=>!!(e&&e.__v_isRef===!0),K=e=>Ze(e)?e:e==null?"":ue(e)||Ie(e)&&(e.toString===Xl||!de(e.toString))?nu(e)?K(e.value):JSON.stringify(e,ru,2):String(e),ru=(e,t)=>nu(t)?ru(e,t.value):ir(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Bi(r,s)+" =>"]=o,n),{})}:Yl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Bi(n))}:Vn(t)?Bi(t):Ie(t)&&!ue(t)&&!Ql(t)?String(t):t,Bi=(e,t="")=>{var n;return Vn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let gt;class ou{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&>&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=gt;try{return gt=this,t()}finally{gt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){gt=this}off(){gt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function su(e){return new ou(e)}function iu(){return gt}function yh(e,t=!1){gt?gt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Hi=new WeakSet;class au{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,gt&>.active&>.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Hi.has(this)&&(Hi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=_o,_o=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pu(this),uu(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),cu(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)zi(t);this.deps=this.depsTail=void 0,pu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Hi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Wi(this)&&this.run()}get dirty(){return Wi(this)}}let lu=0,_o;function Zi(){lu++}function qi(){if(--lu>0)return;let e;for(;_o;){let t=_o;for(_o=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function uu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),zi(r),bh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function Wi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&du(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function du(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wo))return;e.globalVersion=wo;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!Wi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{uu(e);const o=e.fn(e._value);(t.version===0||Rn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,cu(e),e.flags&=-3}}function zi(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)zi(o)}}function bh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const fu=[];function vn(){fu.push(Bt),Bt=!1}function gn(){const e=fu.pop();Bt=e===void 0?!0:e}function pu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let wo=0;class Ki{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&hu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,wo++,this.notify(t)}notify(t){Zi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{qi()}}}function hu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const Es=new WeakMap,ur=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Gi=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),Eo=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function tt(e,t,n){if(Bt&&Ae){let r=Es.get(e);r||Es.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Ki),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function en(e,t,n,r,o,s){const i=Es.get(e);if(!i){wo++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=ue(e),u=l&&Mi(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Eo||!Vn(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(Eo)),t){case"add":l?u&&c(i.get("length")):(c(i.get(ur)),ir(e)&&c(i.get(Gi)));break;case"delete":l||(c(i.get(ur)),ir(e)&&c(i.get(Gi)));break;case"set":ir(e)&&c(i.get(ur));break}}}Zi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();qi()}function _h(e,t){var n;return(n=Es.get(e))==null?void 0:n.get(t)}function Ur(e){const t=ye(e);return t===e?t:(tt(t,"iterate",Eo),Ot(e)?t:t.map(ct))}function Os(e){return tt(e=ye(e),"iterate",Eo),e}const wh={__proto__:null,[Symbol.iterator](){return Ji(this,Symbol.iterator,ct)},concat(...e){return Ur(this).concat(...e.map(t=>ue(t)?Ur(t):t))},entries(){return Ji(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return yn(this,"find",e,t,ct,arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Yi(this,"includes",e)},indexOf(...e){return Yi(this,"indexOf",e)},join(e){return Ur(this).join(e)},lastIndexOf(...e){return Yi(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return Oo(this,"pop")},push(...e){return Oo(this,"push",e)},reduce(e,...t){return mu(this,"reduce",e,t)},reduceRight(e,...t){return mu(this,"reduceRight",e,t)},shift(){return Oo(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return Oo(this,"splice",e)},toReversed(){return Ur(this).toReversed()},toSorted(e){return Ur(this).toSorted(e)},toSpliced(...e){return Ur(this).toSpliced(...e)},unshift(...e){return Oo(this,"unshift",e)},values(){return Ji(this,"values",ct)}};function Ji(e,t,n){const r=Os(e),o=r[t]();return r!==e&&!Ot(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Eh=Array.prototype;function yn(e,t,n,r,o,s){const i=Os(e),a=i!==e&&!Ot(e),l=i[t];if(l!==Eh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function mu(e,t,n,r){const o=Os(e);let s=n;return o!==e&&(Ot(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Yi(e,t,n){const r=ye(e);tt(r,"iterate",Eo);const o=r[t](...n);return(o===-1||o===!1)&&So(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function Oo(e,t,n=[]){vn(),Zi();const r=ye(e)[t].apply(e,n);return qi(),gn(),r}const Oh=hn("__proto__,__v_isRef,__isVue"),vu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Vn));function Nh(e){Vn(e)||(e=String(e));const t=ye(this);return tt(t,"has",e),t.hasOwnProperty(e)}class gu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Tu:ku:s?xu:Su).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ue(t);if(!o){let l;if(i&&(l=wh[n]))return l;if(n==="hasOwnProperty")return Nh}const a=Reflect.get(t,n,qe(t)?t:r);return(Vn(n)?vu.has(n):Oh(n))||(o||tt(t,"get",n),s)?a:qe(a)?i&&Mi(n)?a:a.value:Ie(a)?o?Cu(a):No(a):a}}class yu extends gu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=bn(s);if(!Ot(r)&&!bn(r)&&(s=ye(s),r=ye(r)),!ue(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=ue(t)&&Mi(n)?Number(n)<t.length:De(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?Rn(r,s)&&en(t,"set",n,r,s):en(t,"add",n,r)),a}deleteProperty(t,n){const r=De(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&en(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Vn(n)||!vu.has(n))&&tt(t,"has",n),r}ownKeys(t){return tt(t,"iterate",ue(t)?"length":ur),Reflect.ownKeys(t)}}class bu extends gu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Sh=new yu,xh=new bu,kh=new yu(!0),Th=new bu(!0),Xi=e=>e,Ns=e=>Reflect.getPrototypeOf(e);function Ss(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(Rn(t,s)&&tt(o,"get",t),tt(o,"get",s));const{has:i}=Ns(o),a=r?Xi:n?Qi:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function xs(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(Rn(e,o)&&tt(r,"has",e),tt(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ks(e,t=!1){return e=e.__v_raw,!t&&tt(ye(e),"iterate",ur),Reflect.get(e,"size",e)}function _u(e,t=!1){!t&&!Ot(e)&&!bn(e)&&(e=ye(e));const n=ye(this);return Ns(n).has.call(n,e)||(n.add(e),en(n,"add",e,e)),this}function wu(e,t,n=!1){!n&&!Ot(t)&&!bn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=Ns(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&Nu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Rn(t,a)&&en(r,"set",e,t,a):en(r,"add",e,t),this}function Eu(e){const t=ye(this),{has:n,get:r}=Ns(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&Nu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&en(t,"delete",e,void 0,s),i}function Ou(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?ir(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&en(e,"clear",void 0,void 0,n),r}function Ts(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Xi:e?Qi:ct;return!e&&tt(a,"iterate",ur),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function Cs(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=ir(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Xi:t?Qi:ct;return!t&&tt(s,"iterate",l?Gi:ur),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function jn(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${ar(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ch(){const e={get(s){return Ss(this,s)},get size(){return ks(this)},has:xs,add:_u,set:wu,delete:Eu,clear:Ou,forEach:Ts(!1,!1)},t={get(s){return Ss(this,s,!1,!0)},get size(){return ks(this)},has:xs,add(s){return _u.call(this,s,!0)},set(s,i){return wu.call(this,s,i,!0)},delete:Eu,clear:Ou,forEach:Ts(!1,!0)},n={get(s){return Ss(this,s,!0)},get size(){return ks(this,!0)},has(s){return xs.call(this,s,!0)},add:jn("add"),set:jn("set"),delete:jn("delete"),clear:jn("clear"),forEach:Ts(!0,!1)},r={get(s){return Ss(this,s,!0,!0)},get size(){return ks(this,!0)},has(s){return xs.call(this,s,!0)},add:jn("add"),set:jn("set"),delete:jn("delete"),clear:jn("clear"),forEach:Ts(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Cs(s,!1,!1),n[s]=Cs(s,!0,!1),t[s]=Cs(s,!1,!0),r[s]=Cs(s,!0,!0)}),[e,n,t,r]}const[Ph,Dh,$h,Ih]=Ch();function Ps(e,t){const n=t?e?Ih:$h:e?Dh:Ph;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(De(n,o)&&o in r?n:r,o,s)}const Ah={get:Ps(!1,!1)},Vh={get:Ps(!1,!0)},Rh={get:Ps(!0,!1)},jh={get:Ps(!0,!0)};function Nu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=Li(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Su=new WeakMap,xu=new WeakMap,ku=new WeakMap,Tu=new WeakMap;function Lh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mh(e){return e.__v_skip||!Object.isExtensible(e)?0:Lh(Li(e))}function No(e){return bn(e)?e:Ds(e,!1,Sh,Ah,Su)}function Uh(e){return Ds(e,!1,kh,Vh,xu)}function Cu(e){return Ds(e,!0,xh,Rh,ku)}function tn(e){return Ds(e,!0,Th,jh,Tu)}function Ds(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Mh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function nn(e){return bn(e)?nn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function So(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function Ln(e){return Object.isExtensible(e)&&_s(e,"__v_skip",!0),e}const ct=e=>Ie(e)?No(e):e,Qi=e=>Ie(e)?Cu(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function P(e){return Pu(e,!1)}function Fh(e){return Pu(e,!0)}function Pu(e,t){return qe(e)?e:new Bh(e,t)}class Bh{constructor(t,n){this.dep=new Ki,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ot(t)||bn(t);t=r?t:ye(t),Rn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function _(e){return qe(e)?e.value:e}function Mn(e){return de(e)?e():_(e)}const Hh={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Du(e){return nn(e)?e:new Proxy(e,Hh)}function $u(e){Ve.NODE_ENV!=="production"&&!So(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=ue(e)?new Array(e.length):{};for(const n in e)t[n]=Iu(e,n);return t}class Zh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return _h(ye(this._object),this._key)}}class qh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ea(e,t,n){return qe(e)?e:de(e)?new qh(e):Ie(e)&&arguments.length>1?Iu(e,t,n):P(e)}function Iu(e,t,n){const r=e[t];return qe(r)?r:new Zh(e,t,n)}class Wh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ki(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return du(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function zh(e,t,n=!1){let r,o;de(e)?r=e:(r=e.get,o=e.set);const s=new Wh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const $s={},Is=new WeakMap;let cr;function Kh(e,t=!1,n=cr){if(n){let r=Is.get(n);r||Is.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gh(e,t,n=je){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=x=>{(n.onWarn||At)("Invalid watch source: ",x,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=x=>o?x:Ot(x)||o===!1||o===0?Un(x,1):Un(x);let d,f,m,b,O=!1,E=!1;if(qe(e)?(f=()=>e.value,O=Ot(e)):nn(e)?(f=()=>c(e),O=!0):ue(e)?(E=!0,O=e.some(x=>nn(x)||Ot(x)),f=()=>e.map(x=>{if(qe(x))return x.value;if(nn(x))return c(x);if(de(x))return l?l(x,2):x();Ve.NODE_ENV!=="production"&&u(x)})):de(e)?t?f=l?()=>l(e,2):e:f=()=>{if(m){vn();try{m()}finally{gn()}}const x=cr;cr=d;try{return l?l(e,3,[b]):e(b)}finally{cr=x}}:(f=et,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const x=f,L=o===!0?1/0:o;f=()=>Un(x(),L)}const T=iu(),M=()=>{d.stop(),T&&Ri(T.effects,d)};if(s)if(t){const x=t;t=(...L)=>{x(...L),M()}}else{const x=f;f=()=>{x(),M()}}let C=E?new Array(e.length).fill($s):$s;const ee=x=>{if(!(!(d.flags&1)||!d.dirty&&!x))if(t){const L=d.run();if(o||O||(E?L.some((I,he)=>Rn(I,C[he])):Rn(L,C))){m&&m();const I=cr;cr=d;try{const he=[L,C===$s?void 0:E&&C[0]===$s?[]:C,b];l?l(t,3,he):t(...he),C=L}finally{cr=I}}}else d.run()};return a&&a(ee),d=new au(f),d.scheduler=i?()=>i(ee,!1):ee,b=x=>Kh(x,!1,d),m=d.onStop=()=>{const x=Is.get(d);if(x){if(l)l(x,4);else for(const L of x)L();Is.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?ee(!0):C=d.run():i?i(ee.bind(null,!0),!0):d.run(),M.pause=d.pause.bind(d),M.resume=d.resume.bind(d),M.stop=M,M}function Un(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Un(e.value,t,n);else if(ue(e))for(let r=0;r<e.length;r++)Un(e[r],t,n);else if(Yl(e)||ir(e))e.forEach(r=>{Un(r,t,n)});else if(Ql(e)){for(const r in e)Un(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Un(e[r],t,n)}return e}var g={};const dr=[];function As(e){dr.push(e)}function Vs(){dr.pop()}let ta=!1;function B(e,...t){if(ta)return;ta=!0,vn();const n=dr.length?dr[dr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Jh();if(r)Fr(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Xs(n,s.type)}>`).join(`
|
|
7
|
+
**//*! #__NO_SIDE_EFFECTS__ */function vn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const Le=Jl.NODE_ENV!=="production"?Object.freeze({}):{},Mr=Jl.NODE_ENV!=="production"?Object.freeze([]):[],et=()=>{},th=()=>!1,go=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gs=e=>e.startsWith("onUpdate:"),Ke=Object.assign,ji=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},nh=Object.prototype.hasOwnProperty,De=(e,t)=>nh.call(e,t),ue=Array.isArray,ir=e=>ys(e)==="[object Map]",Yl=e=>ys(e)==="[object Set]",fe=e=>typeof e=="function",Ze=e=>typeof e=="string",Rn=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Li=e=>(Ie(e)||fe(e))&&fe(e.then)&&fe(e.catch),Xl=Object.prototype.toString,ys=e=>Xl.call(e),Mi=e=>ys(e).slice(8,-1),Ql=e=>ys(e)==="[object Object]",Ui=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=vn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rh=vn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),bs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},oh=/-(\w)/g,Tt=bs(e=>e.replace(oh,(t,n)=>n?n.toUpperCase():"")),sh=/\B([A-Z])/g,gn=bs(e=>e.replace(sh,"-$1").toLowerCase()),ar=bs(e=>e.charAt(0).toUpperCase()+e.slice(1)),lr=bs(e=>e?`on${ar(e)}`:""),jn=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_s=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ih=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ah=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let eu;const Fi=()=>eu||(eu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bi(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?dh(r):Bi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const lh=/;(?![^(]*\))/g,uh=/:([^]+)/,ch=/\/\*[^]*?\*\//g;function dh(e){const t={};return e.replace(ch,"").split(lh).forEach(n=>{if(n){const r=n.split(uh);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ws(e){let t="";if(Ze(e))t=e;else if(ue(e))for(let n=0;n<e.length;n++){const r=ws(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const fh="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",ph="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",hh="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",mh=vn(fh),vh=vn(ph),gh=vn(hh),yh=vn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tu(e){return!!e||e===""}const nu=e=>!!(e&&e.__v_isRef===!0),G=e=>Ze(e)?e:e==null?"":ue(e)||Ie(e)&&(e.toString===Xl||!fe(e.toString))?nu(e)?G(e.value):JSON.stringify(e,ru,2):String(e),ru=(e,t)=>nu(t)?ru(e,t.value):ir(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Hi(r,s)+" =>"]=o,n),{})}:Yl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hi(n))}:Rn(t)?Hi(t):Ie(t)&&!ue(t)&&!Ql(t)?String(t):t,Hi=(e,t="")=>{var n;return Rn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let yt;class ou{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=yt,!t&&yt&&(this.index=(yt.scopes||(yt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=yt;try{return yt=this,t()}finally{yt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){yt=this}off(){yt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function su(e){return new ou(e)}function iu(){return yt}function bh(e,t=!1){yt?yt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Zi=new WeakSet;class au{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,yt&&yt.active&&yt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Zi.has(this)&&(Zi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=_o,_o=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pu(this),uu(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),cu(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ki(t);this.deps=this.depsTail=void 0,pu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Zi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zi(this)&&this.run()}get dirty(){return zi(this)}}let lu=0,_o;function qi(){lu++}function Wi(){if(--lu>0)return;let e;for(;_o;){let t=_o;for(_o=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function uu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),Ki(r),_h(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function zi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&du(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function du(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wo))return;e.globalVersion=wo;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!zi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{uu(e);const o=e.fn(e._value);(t.version===0||jn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,cu(e),e.flags&=-3}}function Ki(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Ki(o)}}function _h(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const fu=[];function yn(){fu.push(Bt),Bt=!1}function bn(){const e=fu.pop();Bt=e===void 0?!0:e}function pu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let wo=0;class Gi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&hu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,wo++,this.notify(t)}notify(t){qi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{Wi()}}}function hu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const Es=new WeakMap,ur=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Ji=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),Eo=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function tt(e,t,n){if(Bt&&Ae){let r=Es.get(e);r||Es.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Gi),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function tn(e,t,n,r,o,s){const i=Es.get(e);if(!i){wo++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=ue(e),u=l&&Ui(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Eo||!Rn(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(Eo)),t){case"add":l?u&&c(i.get("length")):(c(i.get(ur)),ir(e)&&c(i.get(Ji)));break;case"delete":l||(c(i.get(ur)),ir(e)&&c(i.get(Ji)));break;case"set":ir(e)&&c(i.get(ur));break}}}qi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();Wi()}function wh(e,t){var n;return(n=Es.get(e))==null?void 0:n.get(t)}function Ur(e){const t=ye(e);return t===e?t:(tt(t,"iterate",Eo),Nt(e)?t:t.map(ct))}function Os(e){return tt(e=ye(e),"iterate",Eo),e}const Eh={__proto__:null,[Symbol.iterator](){return Yi(this,Symbol.iterator,ct)},concat(...e){return Ur(this).concat(...e.map(t=>ue(t)?Ur(t):t))},entries(){return Yi(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return _n(this,"every",e,t,void 0,arguments)},filter(e,t){return _n(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return _n(this,"find",e,t,ct,arguments)},findIndex(e,t){return _n(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _n(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return _n(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _n(this,"forEach",e,t,void 0,arguments)},includes(...e){return Xi(this,"includes",e)},indexOf(...e){return Xi(this,"indexOf",e)},join(e){return Ur(this).join(e)},lastIndexOf(...e){return Xi(this,"lastIndexOf",e)},map(e,t){return _n(this,"map",e,t,void 0,arguments)},pop(){return Oo(this,"pop")},push(...e){return Oo(this,"push",e)},reduce(e,...t){return mu(this,"reduce",e,t)},reduceRight(e,...t){return mu(this,"reduceRight",e,t)},shift(){return Oo(this,"shift")},some(e,t){return _n(this,"some",e,t,void 0,arguments)},splice(...e){return Oo(this,"splice",e)},toReversed(){return Ur(this).toReversed()},toSorted(e){return Ur(this).toSorted(e)},toSpliced(...e){return Ur(this).toSpliced(...e)},unshift(...e){return Oo(this,"unshift",e)},values(){return Yi(this,"values",ct)}};function Yi(e,t,n){const r=Os(e),o=r[t]();return r!==e&&!Nt(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Oh=Array.prototype;function _n(e,t,n,r,o,s){const i=Os(e),a=i!==e&&!Nt(e),l=i[t];if(l!==Oh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function mu(e,t,n,r){const o=Os(e);let s=n;return o!==e&&(Nt(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Xi(e,t,n){const r=ye(e);tt(r,"iterate",Eo);const o=r[t](...n);return(o===-1||o===!1)&&xo(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function Oo(e,t,n=[]){yn(),qi();const r=ye(e)[t].apply(e,n);return Wi(),bn(),r}const Nh=vn("__proto__,__v_isRef,__isVue"),vu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rn));function xh(e){Rn(e)||(e=String(e));const t=ye(this);return tt(t,"has",e),t.hasOwnProperty(e)}class gu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Cu:ku:s?Su:xu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ue(t);if(!o){let l;if(i&&(l=Eh[n]))return l;if(n==="hasOwnProperty")return xh}const a=Reflect.get(t,n,qe(t)?t:r);return(Rn(n)?vu.has(n):Nh(n))||(o||tt(t,"get",n),s)?a:qe(a)?i&&Ui(n)?a:a.value:Ie(a)?o?Tu(a):No(a):a}}class yu extends gu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=wn(s);if(!Nt(r)&&!wn(r)&&(s=ye(s),r=ye(r)),!ue(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=ue(t)&&Ui(n)?Number(n)<t.length:De(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?jn(r,s)&&tn(t,"set",n,r,s):tn(t,"add",n,r)),a}deleteProperty(t,n){const r=De(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&tn(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Rn(n)||!vu.has(n))&&tt(t,"has",n),r}ownKeys(t){return tt(t,"iterate",ue(t)?"length":ur),Reflect.ownKeys(t)}}class bu extends gu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Sh=new yu,kh=new bu,Ch=new yu(!0),Th=new bu(!0),Qi=e=>e,Ns=e=>Reflect.getPrototypeOf(e);function xs(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(jn(t,s)&&tt(o,"get",t),tt(o,"get",s));const{has:i}=Ns(o),a=r?Qi:n?ea:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function Ss(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(jn(e,o)&&tt(r,"has",e),tt(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ks(e,t=!1){return e=e.__v_raw,!t&&tt(ye(e),"iterate",ur),Reflect.get(e,"size",e)}function _u(e,t=!1){!t&&!Nt(e)&&!wn(e)&&(e=ye(e));const n=ye(this);return Ns(n).has.call(n,e)||(n.add(e),tn(n,"add",e,e)),this}function wu(e,t,n=!1){!n&&!Nt(t)&&!wn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=Ns(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&Nu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?jn(t,a)&&tn(r,"set",e,t,a):tn(r,"add",e,t),this}function Eu(e){const t=ye(this),{has:n,get:r}=Ns(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&Nu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&tn(t,"delete",e,void 0,s),i}function Ou(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?ir(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&tn(e,"clear",void 0,void 0,n),r}function Cs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Qi:e?ea:ct;return!e&&tt(a,"iterate",ur),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function Ts(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=ir(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Qi:t?ea:ct;return!t&&tt(s,"iterate",l?Ji:ur),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Ln(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${ar(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ph(){const e={get(s){return xs(this,s)},get size(){return ks(this)},has:Ss,add:_u,set:wu,delete:Eu,clear:Ou,forEach:Cs(!1,!1)},t={get(s){return xs(this,s,!1,!0)},get size(){return ks(this)},has:Ss,add(s){return _u.call(this,s,!0)},set(s,i){return wu.call(this,s,i,!0)},delete:Eu,clear:Ou,forEach:Cs(!1,!0)},n={get(s){return xs(this,s,!0)},get size(){return ks(this,!0)},has(s){return Ss.call(this,s,!0)},add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear"),forEach:Cs(!0,!1)},r={get(s){return xs(this,s,!0,!0)},get size(){return ks(this,!0)},has(s){return Ss.call(this,s,!0)},add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear"),forEach:Cs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Ts(s,!1,!1),n[s]=Ts(s,!0,!1),t[s]=Ts(s,!1,!0),r[s]=Ts(s,!0,!0)}),[e,n,t,r]}const[Dh,$h,Ih,Ah]=Ph();function Ps(e,t){const n=t?e?Ah:Ih:e?$h:Dh;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(De(n,o)&&o in r?n:r,o,s)}const Vh={get:Ps(!1,!1)},Rh={get:Ps(!1,!0)},jh={get:Ps(!0,!1)},Lh={get:Ps(!0,!0)};function Nu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=Mi(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const xu=new WeakMap,Su=new WeakMap,ku=new WeakMap,Cu=new WeakMap;function Mh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Uh(e){return e.__v_skip||!Object.isExtensible(e)?0:Mh(Mi(e))}function No(e){return wn(e)?e:Ds(e,!1,Sh,Vh,xu)}function Fh(e){return Ds(e,!1,Ch,Rh,Su)}function Tu(e){return Ds(e,!0,kh,jh,ku)}function nn(e){return Ds(e,!0,Th,Lh,Cu)}function Ds(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Uh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function rn(e){return wn(e)?rn(e.__v_raw):!!(e&&e.__v_isReactive)}function wn(e){return!!(e&&e.__v_isReadonly)}function Nt(e){return!!(e&&e.__v_isShallow)}function xo(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function Mn(e){return Object.isExtensible(e)&&_s(e,"__v_skip",!0),e}const ct=e=>Ie(e)?No(e):e,ea=e=>Ie(e)?Tu(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function $(e){return Pu(e,!1)}function Bh(e){return Pu(e,!0)}function Pu(e,t){return qe(e)?e:new Hh(e,t)}class Hh{constructor(t,n){this.dep=new Gi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Nt(t)||wn(t);t=r?t:ye(t),jn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function w(e){return qe(e)?e.value:e}function Un(e){return fe(e)?e():w(e)}const Zh={get:(e,t,n)=>t==="__v_raw"?e:w(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Du(e){return rn(e)?e:new Proxy(e,Zh)}function $u(e){Ve.NODE_ENV!=="production"&&!xo(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=ue(e)?new Array(e.length):{};for(const n in e)t[n]=Iu(e,n);return t}class qh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return wh(ye(this._object),this._key)}}class Wh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ta(e,t,n){return qe(e)?e:fe(e)?new Wh(e):Ie(e)&&arguments.length>1?Iu(e,t,n):$(e)}function Iu(e,t,n){const r=e[t];return qe(r)?r:new qh(e,t,n)}class zh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Gi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return du(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function Kh(e,t,n=!1){let r,o;fe(e)?r=e:(r=e.get,o=e.set);const s=new zh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const $s={},Is=new WeakMap;let cr;function Gh(e,t=!1,n=cr){if(n){let r=Is.get(n);r||Is.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Jh(e,t,n=Le){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=E=>{(n.onWarn||At)("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.")},c=E=>o?E:Nt(E)||o===!1||o===0?Fn(E,1):Fn(E);let d,f,h,y,O=!1,b=!1;if(qe(e)?(f=()=>e.value,O=Nt(e)):rn(e)?(f=()=>c(e),O=!0):ue(e)?(b=!0,O=e.some(E=>rn(E)||Nt(E)),f=()=>e.map(E=>{if(qe(E))return E.value;if(rn(E))return c(E);if(fe(E))return l?l(E,2):E();Ve.NODE_ENV!=="production"&&u(E)})):fe(e)?t?f=l?()=>l(e,2):e:f=()=>{if(h){yn();try{h()}finally{bn()}}const E=cr;cr=d;try{return l?l(e,3,[y]):e(y)}finally{cr=E}}:(f=et,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const E=f,I=o===!0?1/0:o;f=()=>Fn(E(),I)}const k=iu(),R=()=>{d.stop(),k&&ji(k.effects,d)};if(s)if(t){const E=t;t=(...I)=>{E(...I),R()}}else{const E=f;f=()=>{E(),R()}}let T=b?new Array(e.length).fill($s):$s;const P=E=>{if(!(!(d.flags&1)||!d.dirty&&!E))if(t){const I=d.run();if(o||O||(b?I.some((D,de)=>jn(D,T[de])):jn(I,T))){h&&h();const D=cr;cr=d;try{const de=[I,T===$s?void 0:b&&T[0]===$s?[]:T,y];l?l(t,3,de):t(...de),T=I}finally{cr=D}}}else d.run()};return a&&a(P),d=new au(f),d.scheduler=i?()=>i(P,!1):P,y=E=>Gh(E,!1,d),h=d.onStop=()=>{const E=Is.get(d);if(E){if(l)l(E,4);else for(const I of E)I();Is.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?P(!0):T=d.run():i?i(P.bind(null,!0),!0):d.run(),R.pause=d.pause.bind(d),R.resume=d.resume.bind(d),R.stop=R,R}function Fn(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Fn(e.value,t,n);else if(ue(e))for(let r=0;r<e.length;r++)Fn(e[r],t,n);else if(Yl(e)||ir(e))e.forEach(r=>{Fn(r,t,n)});else if(Ql(e)){for(const r in e)Fn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Fn(e[r],t,n)}return e}var g={};const dr=[];function As(e){dr.push(e)}function Vs(){dr.pop()}let na=!1;function H(e,...t){if(na)return;na=!0,yn();const n=dr.length?dr[dr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Yh();if(r)Fr(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Xs(n,s.type)}>`).join(`
|
|
8
8
|
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
|
|
9
|
-
`,...
|
|
10
|
-
`],...Xh(n))}),t}function Xh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Xs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Qh(e.props),s]:[o+s]}function Qh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Au(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Au(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Au(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):de(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function em(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?B(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&B(`${t} is NaN - the duration expression might be incorrect.`))}const na={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Fr(e,t,n,r){try{return r?e(...r):e()}catch(o){xo(o,t,n)}}function Ht(e,t,n,r){if(de(e)){const o=Fr(e,t,n,r);return o&&ji(o)&&o.catch(s=>{xo(s,t,n)}),o}if(ue(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&B(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function xo(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?na[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Fr(s,null,10,[e,l,u]),gn();return}}tm(e,n,o,r,i)}function tm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=na[t];if(n&&As(n),B(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Vs(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let ko=!1,ra=!1;const yt=[];let rn=0;const Br=[];let Fn=null,Hr=0;const Vu=Promise.resolve();let oa=null;const nm=100;function To(e){const t=oa||Vu;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=ko?rn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=Co(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function Rs(e){if(!(e.flags&1)){const t=Co(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=Co(n)?yt.push(e):yt.splice(rm(t),0,e),e.flags|=1,Ru()}}function Ru(){!ko&&!ra&&(ra=!0,oa=Vu.then(Uu))}function ju(e){ue(e)?Br.push(...e):Fn&&e.id===-1?Fn.splice(Hr+1,0,e):e.flags&1||(Br.push(e),e.flags|=1),Ru()}function Lu(e,t,n=ko?rn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&sa(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Mu(e){if(Br.length){const t=[...new Set(Br)].sort((n,r)=>Co(n)-Co(r));if(Br.length=0,Fn){Fn.push(...t);return}for(Fn=t,g.NODE_ENV!=="production"&&(e=e||new Map),Hr=0;Hr<Fn.length;Hr++){const n=Fn[Hr];g.NODE_ENV!=="production"&&sa(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Fn=null,Hr=0}}const Co=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uu(e){ra=!1,ko=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>sa(e,n):et;try{for(rn=0;rn<yt.length;rn++){const n=yt[rn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Fr(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;rn<yt.length;rn++){const n=yt[rn];n&&(n.flags&=-2)}rn=0,yt.length=0,Mu(e),ko=!1,oa=null,(yt.length||Br.length)&&Uu(e)}}function sa(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>nm){const r=t.i,o=r&&Ra(r.type);return xo(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Bn=!1;const js=new Map;g.NODE_ENV!=="production"&&(Ui().__VUE_HMR_RUNTIME__={createRecord:ia(Fu),rerender:ia(im),reload:ia(am)});const fr=new Map;function om(e){const t=e.type.__hmrId;let n=fr.get(t);n||(Fu(t,e.type),n=fr.get(t)),n.instances.add(e)}function sm(e){fr.get(e.type.__hmrId).instances.delete(e)}function Fu(e,t){return fr.has(e)?!1:(fr.set(e,{initialDef:Ls(t),instances:new Set}),!0)}function Ls(e){return zc(e)?e.__vccOpts:e}function im(e,t){const n=fr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Ls(r.type).render=t),r.renderCache=[],Bn=!0,r.update(),Bn=!1}))}function am(e,t){const n=fr.get(e);if(!n)return;t=Ls(t),Bu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Ls(s.type);let a=js.get(i);a||(i!==n.initialDef&&Bu(i,t),js.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?Rs(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}ju(()=>{js.clear()})}function Bu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function ia(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 on,Po=[],aa=!1;function Do(e,...t){on?on.emit(e,...t):aa||Po.push({event:e,args:t})}function Hu(e,t){var n,r;on=e,on?(on.enabled=!0,Po.forEach(({event:o,args:s})=>on.emit(o,...s)),Po=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Hu(s,t)}),setTimeout(()=>{on||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,aa=!0,Po=[])},3e3)):(aa=!0,Po=[])}function lm(e,t){Do("app:init",e,t,{Fragment:xe,Text:jo,Comment:Je,Static:Lo})}function um(e){Do("app:unmount",e)}const cm=la("component:added"),Zu=la("component:updated"),dm=la("component:removed"),fm=e=>{on&&typeof on.cleanupBuffer=="function"&&!on.cleanupBuffer(e)&&dm(e)};/*! #__NO_SIDE_EFFECTS__ */function la(e){return t=>{Do(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const pm=qu("perf:start"),hm=qu("perf:end");function qu(e){return(t,n,r)=>{Do(e,t.appContext.app,t.uid,t,n,r)}}function mm(e,t,n){Do("component:emit",e.appContext.app,e,t,n)}let nt=null,Wu=null;function Ms(e){const t=nt;return nt=e,Wu=e&&e.type.__scopeId||null,t}function _e(e,t=nt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&jc(-1);const s=Ms(t);let i;try{i=e(...o)}finally{Ms(s),r._d&&jc(1)}return g.NODE_ENV!=="production"&&Zu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function zu(e){nh(e)&&B("Do not use built-in directive ids as custom directive id: "+e)}function pr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Ku=Symbol("_vte"),Gu=e=>e.__isTeleport,hr=e=>e&&(e.disabled||e.disabled===""),vm=e=>e&&(e.defer||e.defer===""),Ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ua=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!hr(e)&&B(`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"&&B("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!hr(e)&&B(`Invalid Teleport target: ${n}`),n},gm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:b,createText:O,createComment:E}}=u,T=hr(t.props);let{shapeFlag:M,children:C,dynamicChildren:ee}=t;if(g.NODE_ENV!=="production"&&Bn&&(l=!1,ee=null),e==null){const x=t.el=g.NODE_ENV!=="production"?E("teleport start"):O(""),L=t.anchor=g.NODE_ENV!=="production"?E("teleport end"):O("");m(x,n,r),m(L,n,r);const I=(q,V)=>{M&16&&c(C,q,V,o,s,i,a,l)},he=()=>{const q=t.target=ua(t.props,b),V=Xu(q,t,O,m);q?(i!=="svg"&&Ju(q)?i="svg":i!=="mathml"&&Yu(q)&&(i="mathml"),T||(I(q,V),Fs(t))):g.NODE_ENV!=="production"&&!T&&B("Invalid Teleport target on mount:",q,`(${typeof q})`)};T&&(I(n,L),Fs(t)),vm(t.props)?Nt(he,s):he()}else{t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,L=t.target=e.target,I=t.targetAnchor=e.targetAnchor,he=hr(e.props),q=he?n:L,V=he?x:I;if(i==="svg"||Ju(L)?i="svg":(i==="mathml"||Yu(L))&&(i="mathml"),ee?(f(e.dynamicChildren,ee,q,o,s,i,a),Ro(e,t,!0)):l||d(e,t,q,V,o,s,i,a,!1),T)he?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Us(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=ua(t.props,b);R?Us(t,R,null,u,0):g.NODE_ENV!=="production"&&B("Invalid Teleport target on update:",L,`(${typeof L})`)}else he&&Us(t,L,I,u,1);Fs(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!hr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,m,!!O.dynamicChildren)}}},move:Us,hydrate:ym};function Us(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||hr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ym(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=ua(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(hr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||Xu(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}Fs(t)}return t.anchor&&i(t.anchor)}const bm=gm;function Fs(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Xu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Ku]=s,e&&(r(o,e),r(s,e)),s}const Hn=Symbol("_leaveCb"),Bs=Symbol("_enterCb");function _m(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),pa(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Qu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},ec=e=>{const t=e.subTree;return t.component?ec(t.component):t},wm={name:"BaseTransition",props:Qu,setup(e,{slots:t}){const n=Gs(),r=_m();return()=>{const o=t.default&&oc(t.default(),!0);if(!o||!o.length)return;const s=tc(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&B(`invalid <transition> mode: ${a}`),r.isLeaving)return da(s);const l=rc(s);if(!l)return da(s);let u=ca(l,i,r,n,f=>u=f);l.type!==Je&&$o(l,u);const c=n.subTree,d=c&&rc(c);if(d&&d.type!==Je&&!yr(l,d)&&ec(n).type!==Je){const f=ca(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Je)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},da(s);a==="in-out"&&l.type!==Je&&(f.delayLeave=(m,b,O)=>{const E=nc(r,d);E[String(d.key)]=d,m[Hn]=()=>{b(),m[Hn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function tc(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Je){if(g.NODE_ENV!=="production"&&n){B("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Em=wm;function nc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ca(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:E,onAppear:T,onAfterAppear:M,onAppearCancelled:C}=t,ee=String(e.key),x=nc(n,e),L=(q,V)=>{q&&Ht(q,r,9,V)},I=(q,V)=>{const R=V[1];L(q,V),ue(q)?q.every($=>$.length<=1)&&R():q.length<=1&&R()},he={mode:i,persisted:a,beforeEnter(q){let V=l;if(!n.isMounted)if(s)V=E||l;else return;q[Hn]&&q[Hn](!0);const R=x[ee];R&&yr(e,R)&&R.el[Hn]&&R.el[Hn](),L(V,[q])},enter(q){let V=u,R=c,$=d;if(!n.isMounted)if(s)V=T||u,R=M||c,$=C||d;else return;let ae=!1;const $e=q[Bs]=w=>{ae||(ae=!0,w?L($,[q]):L(R,[q]),he.delayedLeave&&he.delayedLeave(),q[Bs]=void 0)};V?I(V,[q,$e]):$e()},leave(q,V){const R=String(e.key);if(q[Bs]&&q[Bs](!0),n.isUnmounting)return V();L(f,[q]);let $=!1;const ae=q[Hn]=$e=>{$||($=!0,V(),$e?L(O,[q]):L(b,[q]),q[Hn]=void 0,x[R]===e&&delete x[R])};x[R]=e,m?I(m,[q,ae]):ae()},clone(q){const V=ca(q,t,n,r,o);return o&&o(V),V}};return he}function da(e){if(Io(e))return e=Zt(e),e.children=null,e}function rc(e){if(!Io(e))return Gu(e.type)&&e.children?tc(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&de(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(oc(i.children,t,a))):(t||i.type!==Je)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function fe(e,t){return de(e)?Ke({name:e.name},t,{setup:e}):e}function sc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Om=new WeakSet;function fa(e,t,n,r,o=!1){if(ue(e)){e.forEach((b,O)=>fa(b,t&&(ue(t)?t[O]:t),n,r,o));return}if(Zr(r)&&!o)return;const s=r.shapeFlag&4?Va(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){B("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),m=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Om.has(f[b])?!1:De(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,m(u)&&(d[u]=null)):qe(u)&&(u.value=null)),de(l))Fr(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const E=()=>{if(e.f){const T=b?m(l)?d[l]:c[l]:l.value;o?ue(T)&&Ri(T,s):ue(T)?T.includes(s)||T.push(s):b?(c[l]=[s],m(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,m(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&B("Invalid template ref type:",l,`(${typeof l})`)};i?(E.id=-1,Nt(E,n)):E()}else g.NODE_ENV!=="production"&&B("Invalid template ref type:",l,`(${typeof l})`)}}const Zr=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function Nm(e,t){ic(e,"a",t)}function Sm(e,t){ic(e,"da",t)}function ic(e,t,n=Xe){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Hs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Io(o.parent.vnode)&&xm(r,t,n,o),o=o.parent}}function xm(e,t,n,r){const o=Hs(t,e,r,!0);bt(()=>{Ri(r[t],o)},n)}function Hs(e,t,n=Xe,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Fo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=lr(na[e].replace(/ hook$/,""));B(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Xe)=>{(!Ys||e==="sp")&&Hs(e,(...r)=>t(...r),n)},km=_n("bm"),Le=_n("m"),Tm=_n("bu"),Cm=_n("u"),pa=_n("bum"),bt=_n("um"),Pm=_n("sp"),Dm=_n("rtg"),$m=_n("rtc");function Im(e,t=Xe){Hs("ec",e,t)}const Am="components",ac=Symbol.for("v-ndc");function ha(e){return Ze(e)?Vm(Am,e,!1)||e:e||ac}function Vm(e,t,n=!0,r=!1){const o=nt||Xe;if(o){const s=o.type;{const a=Ra(s,!1);if(a&&(a===t||a===Ct(t)||a===ar(Ct(t))))return s}const i=lc(o[e]||s[e],t)||lc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&B(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
11
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&B(`resolve${ar(e.slice(0,-1))} can only be used in render() or setup().`)}function lc(e,t){return e&&(e[t]||e[Ct(t)]||e[ar(Ct(t))])}function sn(e,t,n,r){let o;const s=n,i=ue(e);if(i||Ze(e)){const a=i&&nn(e);a&&(e=Os(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&B(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function ma(e,t,n={},r,o){if(nt.ce||nt.parent&&Zr(nt.parent)&&nt.parent.ce)return y(),Se(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(B("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&uc(s(n)),a=Se(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function uc(e){return e.some(t=>qr(t)?!(t.type===Je||t.type===xe&&!uc(t.children)):!0)?e:null}const va=e=>e?Hc(e)?Va(e):va(e.parent):null,mr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?tn(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?tn(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?tn(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?tn(e.refs):e.refs,$parent:e=>va(e.parent),$root:e=>va(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>_a(e),$forceUpdate:e=>e.f||(e.f=()=>{Rs(e.update)}),$nextTick:e=>e.n||(e.n=To.bind(e.proxy)),$watch:e=>hv.bind(e)}),ga=e=>e==="_"||e==="$",ya=(e,t)=>e!==je&&!e.__isScriptSetup&&De(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ya(r,t))return i[t]=1,r[t];if(o!==je&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==je&&De(n,t))return i[t]=4,n[t];ba&&(i[t]=0)}}const c=mr[t];let d,f;if(c)return t==="$attrs"?(tt(e.attrs,"get",""),g.NODE_ENV!=="production"&&zs()):g.NODE_ENV!=="production"&&t==="$slots"&&tt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&nt&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&ga(t[0])&&De(o,t)?B(`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===nt&&B(`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 ya(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(B(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&B(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&B(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&De(e,i)||ya(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(mr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(cc.ownKeys=e=>(B("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Rm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(mr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>mr[n](e),set:et})}),t}function jm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:et})})}function Lm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(ga(r[0])){B(`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:et})}})}function dc(e){return ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Mm(){const e=Object.create(null);return(t,n)=>{e[n]?B(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let ba=!0;function Um(e){const t=_a(e),n=e.proxy,r=e.ctx;ba=!1,t.beforeCreate&&fc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:b,activated:O,deactivated:E,beforeDestroy:T,beforeUnmount:M,destroyed:C,unmounted:ee,render:x,renderTracked:L,renderTriggered:I,errorCaptured:he,serverPrefetch:q,expose:V,inheritAttrs:R,components:$,directives:ae,filters:$e}=t,w=g.NODE_ENV!=="production"?Mm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)w("Props",re)}if(u&&Fm(u,r,w),i)for(const Y in i){const re=i[Y];de(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&w("Methods",Y)):g.NODE_ENV!=="production"&&B(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!de(o)&&B("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&ji(Y)&&B("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&B("data() should return an object.");else if(e.data=No(Y),g.NODE_ENV!=="production")for(const re in Y)w("Data",re),ga(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:et})}if(ba=!0,s)for(const Y in s){const re=s[Y],me=de(re)?re.bind(n,n):de(re.get)?re.get.bind(n,n):et;g.NODE_ENV!=="production"&&me===et&&B(`Computed property "${Y}" has no getter.`);const oe=!de(re)&&de(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{B(`Write operation failed: computed property "${Y}" is readonly.`)}:et,Fe=Q({get:me,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&w("Computed",Y)}if(a)for(const Y in a)pc(a[Y],r,n,Y);if(l){const Y=de(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&fc(c,e,"c");function D(Y,re){ue(re)?re.forEach(me=>Y(me.bind(n))):re&&Y(re.bind(n))}if(D(km,d),D(Le,f),D(Tm,m),D(Cm,b),D(Nm,O),D(Sm,E),D(Im,he),D($m,L),D(Dm,I),D(pa,M),D(bt,ee),D(Pm,q),ue(V))if(V.length){const Y=e.exposed||(e.exposed={});V.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:me=>n[re]=me})})}else e.exposed||(e.exposed={});x&&e.render===et&&(e.render=x),R!=null&&(e.inheritAttrs=R),$&&(e.components=$),ae&&(e.directives=ae),q&&sc(e)}function Fm(e,t,n=et){ue(e)&&(e=wa(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function fc(e,t,n){Ht(ue(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function pc(e,t,n,r){let o=r.includes(".")?Dc(n,r):()=>n[r];if(Ze(e)){const s=t[e];de(s)?Ge(o,s):g.NODE_ENV!=="production"&&B(`Invalid watch handler specified by key "${e}"`,s)}else if(de(e))Ge(o,e.bind(n));else if(Ie(e))if(ue(e))e.forEach(s=>pc(s,t,n,r));else{const s=de(e.handler)?e.handler.bind(n):t[e.handler];de(s)?Ge(o,s,e):g.NODE_ENV!=="production"&&B(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&B(`Invalid watch option: "${r}"`,e)}function _a(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=>Zs(l,u,i,!0)),Zs(l,t,i)),Ie(t)&&s.set(t,l),l}function Zs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Zs(e,s,n,!0),o&&o.forEach(i=>Zs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&B('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Bm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Bm={data:hc,props:mc,emits:mc,methods:Ao,computed:Ao,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Ao,directives:Ao,watch:Zm,provide:hc,inject:Hm};function hc(e,t){return t?e?function(){return Ke(de(e)?e.call(this,this):e,de(t)?t.call(this,this):t)}:t:e}function Hm(e,t){return Ao(wa(e),wa(t))}function wa(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Ao(e,t){return e?Ke(Object.create(null),e,t):t}function mc(e,t){return e?ue(e)&&ue(t)?[...new Set([...e,...t])]:Ke(Object.create(null),dc(e),dc(t??{})):t}function Zm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function vc(){return{app:null,config:{isNativeTag:eh,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qm=0;function Wm(e,t){return function(r,o=null){de(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&B("root props passed to app.mount() must be an object."),o=null);const s=vc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:qm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Kc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&B("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&B("Plugin has already been applied to target app."):c&&de(c.install)?(i.add(c),c.install(u,...d)):de(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&B('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&B("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&Ia(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&B(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&zu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&B(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&B("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&B("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const m=u._ceVNode||Z(r,o);return m.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(m),c,f)}),d&&t?t(m,c):e(m,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=m.component,lm(u,Kc)),Va(m.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&B(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,um(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&B("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&B(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=vr;vr=u;try{return c()}finally{vr=d}}};return u}}let vr=null;function dt(e,t){if(!Xe)g.NODE_ENV!=="production"&&B("provide() can only be used inside setup().");else{let n=Xe.provides;const r=Xe.parent&&Xe.parent.provides;r===n&&(n=Xe.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Xe||nt;if(r||vr){const o=vr?vr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&de(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&B(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&B("inject() can only be used inside setup() or functional components.")}function zm(){return!!(Xe||nt||vr)}const gc={},yc=()=>Object.create(gc),bc=e=>Object.getPrototypeOf(e)===gc;function Km(e,t,n,r=!1){const o={},s=yc();e.propsDefaults=Object.create(null),_c(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Oc(t||{},o,e),n?e.props=r?o:Uh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Gm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Jm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Gm(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Ws(e.emitsOptions,f))continue;const m=t[f];if(l)if(De(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const b=Ct(f);o[b]=Ea(l,a,b,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{_c(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=mn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=Ea(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&en(e.attrs,"set",""),g.NODE_ENV!=="production"&&Oc(t||{},o,e)}function _c(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(yo(l))continue;const u=t[l];let c;o&&De(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Ws(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=Ea(o,l,d,u[d],e,!De(u,d))}}return i}function Ea(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&de(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Fo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const Ym=new WeakMap;function wc(e,t,n=!1){const r=n?Ym:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!de(e)){const c=d=>{l=!0;const[f,m]=wc(d,t,!0);Ke(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Mr),Mr;if(ue(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&B("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);Ec(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&B("invalid props options",s);for(const c in s){const d=Ct(c);if(Ec(d)){const f=s[c],m=i[d]=ue(f)||de(f)?{type:f}:Ke({},f),b=m.type;let O=!1,E=!0;if(ue(b))for(let T=0;T<b.length;++T){const M=b[T],C=de(M)&&M.name;if(C==="Boolean"){O=!0;break}else C==="String"&&(E=!1)}else O=de(b)&&b.name==="Boolean";m[0]=O,m[1]=E,(O||De(m,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function Ec(e){return e[0]!=="$"&&!yo(e)?!0:(g.NODE_ENV!=="production"&&B(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Xm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Oc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&Qm(s,r[s],i,g.NODE_ENV!=="production"?tn(r):r,!De(e,s)&&!De(e,mn(s)))}}function Qm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){B('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=ue(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:b}=tv(t,c[f]);d.push(b||""),u=m}if(!u){B(nv(e,t,d));return}}a&&!a(t,r)&&B('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ev=hn("String,Number,Boolean,Function,Symbol,BigInt");function tv(e,t){let n;const r=Xm(t);if(r==="null")n=e===null;else if(ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=ue(e):n=e instanceof t;return{valid:n,expectedType:r}}function nv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ar).join(" | ")}`;const o=n[0],s=Li(t),i=Nc(t,o),a=Nc(t,s);return n.length===1&&Sc(o)&&!rv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Sc(s)&&(r+=`with value ${a}.`),r}function Nc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Sc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function rv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const xc=e=>e[0]==="_"||e==="$stable",Oa=e=>ue(e)?e.map(qt):[qt(e)],ov=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Xe&&(!n||n.root===Xe.root)&&B(`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.`),Oa(t(...o))),n);return r._c=!1,r},kc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(xc(o))continue;const s=e[o];if(de(s))t[o]=ov(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&B(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Oa(s);t[o]=()=>i}}},Tc=(e,t)=>{g.NODE_ENV!=="production"&&!Io(e.vnode)&&B("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Oa(t);e.slots.default=()=>n},Na=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},sv=(e,t,n)=>{const r=e.slots=yc();if(e.vnode.shapeFlag&32){const o=t._;o?(Na(r,t,n),n&&_s(r,"_",o,!0)):kc(t,r)}else t&&Tc(e,t)},iv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Bn?(Na(o,t,n),en(e,"set","$slots")):n&&a===1?s=!1:Na(o,t,n):(s=!t.$stable,kc(t,o)),i=t}else t&&(Tc(e,t),i={default:1});if(s)for(const a in o)!xc(a)&&i[a]==null&&delete o[a]};let Vo,Zn;function wn(e,t){e.appContext.config.performance&&qs()&&Zn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&pm(e,t,qs()?Zn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&qs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Zn.mark(r),Zn.measure(`<${Xs(e,e.type)}> ${t}`,n,r),Zn.clearMarks(n),Zn.clearMarks(r)}g.NODE_ENV!=="production"&&hm(e,t,qs()?Zn.now():Date.now())}function qs(){return Vo!==void 0||(typeof window<"u"&&window.performance?(Vo=!0,Zn=window.performance):Vo=!1),Vo}function av(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
9
|
+
`,...Xh(o)),console.warn(...s)}bn(),na=!1}function Yh(){let e=dr[dr.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function Xh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
|
10
|
+
`],...Qh(n))}),t}function Qh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Xs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...em(e.props),s]:[o+s]}function em(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Au(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Au(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Au(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function tm(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?H(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&H(`${t} is NaN - the duration expression might be incorrect.`))}const ra={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Fr(e,t,n,r){try{return r?e(...r):e()}catch(o){So(o,t,n)}}function Ht(e,t,n,r){if(fe(e)){const o=Fr(e,t,n,r);return o&&Li(o)&&o.catch(s=>{So(s,t,n)}),o}if(ue(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&H(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function So(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Le;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?ra[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){yn(),Fr(s,null,10,[e,l,u]),bn();return}}nm(e,n,o,r,i)}function nm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=ra[t];if(n&&As(n),H(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Vs(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let ko=!1,oa=!1;const bt=[];let on=0;const Br=[];let Bn=null,Hr=0;const Vu=Promise.resolve();let sa=null;const rm=100;function Co(e){const t=sa||Vu;return e?t.then(this?e.bind(this):e):t}function om(e){let t=ko?on+1:0,n=bt.length;for(;t<n;){const r=t+n>>>1,o=bt[r],s=To(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function Rs(e){if(!(e.flags&1)){const t=To(e),n=bt[bt.length-1];!n||!(e.flags&2)&&t>=To(n)?bt.push(e):bt.splice(om(t),0,e),e.flags|=1,Ru()}}function Ru(){!ko&&!oa&&(oa=!0,sa=Vu.then(Uu))}function ju(e){ue(e)?Br.push(...e):Bn&&e.id===-1?Bn.splice(Hr+1,0,e):e.flags&1||(Br.push(e),e.flags|=1),Ru()}function Lu(e,t,n=ko?on+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<bt.length;n++){const r=bt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&ia(t,r))continue;bt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Mu(e){if(Br.length){const t=[...new Set(Br)].sort((n,r)=>To(n)-To(r));if(Br.length=0,Bn){Bn.push(...t);return}for(Bn=t,g.NODE_ENV!=="production"&&(e=e||new Map),Hr=0;Hr<Bn.length;Hr++){const n=Bn[Hr];g.NODE_ENV!=="production"&&ia(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Bn=null,Hr=0}}const To=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uu(e){oa=!1,ko=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>ia(e,n):et;try{for(on=0;on<bt.length;on++){const n=bt[on];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Fr(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;on<bt.length;on++){const n=bt[on];n&&(n.flags&=-2)}on=0,bt.length=0,Mu(e),ko=!1,sa=null,(bt.length||Br.length)&&Uu(e)}}function ia(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>rm){const r=t.i,o=r&&ja(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 Hn=!1;const js=new Map;g.NODE_ENV!=="production"&&(Fi().__VUE_HMR_RUNTIME__={createRecord:aa(Fu),rerender:aa(am),reload:aa(lm)});const fr=new Map;function sm(e){const t=e.type.__hmrId;let n=fr.get(t);n||(Fu(t,e.type),n=fr.get(t)),n.instances.add(e)}function im(e){fr.get(e.type.__hmrId).instances.delete(e)}function Fu(e,t){return fr.has(e)?!1:(fr.set(e,{initialDef:Ls(t),instances:new Set}),!0)}function Ls(e){return zc(e)?e.__vccOpts:e}function am(e,t){const n=fr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Ls(r.type).render=t),r.renderCache=[],Hn=!0,r.update(),Hn=!1}))}function lm(e,t){const n=fr.get(e);if(!n)return;t=Ls(t),Bu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Ls(s.type);let a=js.get(i);a||(i!==n.initialDef&&Bu(i,t),js.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?Rs(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}ju(()=>{js.clear()})}function Bu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function aa(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 sn,Po=[],la=!1;function Do(e,...t){sn?sn.emit(e,...t):la||Po.push({event:e,args:t})}function Hu(e,t){var n,r;sn=e,sn?(sn.enabled=!0,Po.forEach(({event:o,args:s})=>sn.emit(o,...s)),Po=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Hu(s,t)}),setTimeout(()=>{sn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,la=!0,Po=[])},3e3)):(la=!0,Po=[])}function um(e,t){Do("app:init",e,t,{Fragment:ke,Text:jo,Comment:Je,Static:Lo})}function cm(e){Do("app:unmount",e)}const dm=ua("component:added"),Zu=ua("component:updated"),fm=ua("component:removed"),pm=e=>{sn&&typeof sn.cleanupBuffer=="function"&&!sn.cleanupBuffer(e)&&fm(e)};/*! #__NO_SIDE_EFFECTS__ */function ua(e){return t=>{Do(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const hm=qu("perf:start"),mm=qu("perf:end");function qu(e){return(t,n,r)=>{Do(e,t.appContext.app,t.uid,t,n,r)}}function vm(e,t,n){Do("component:emit",e.appContext.app,e,t,n)}let nt=null,Wu=null;function Ms(e){const t=nt;return nt=e,Wu=e&&e.type.__scopeId||null,t}function _e(e,t=nt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&jc(-1);const s=Ms(t);let i;try{i=e(...o)}finally{Ms(s),r._d&&jc(1)}return g.NODE_ENV!=="production"&&Zu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function zu(e){rh(e)&&H("Do not use built-in directive ids as custom directive id: "+e)}function pr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(yn(),Ht(l,n,8,[e.el,a,e,t]),bn())}}const Ku=Symbol("_vte"),Gu=e=>e.__isTeleport,hr=e=>e&&(e.disabled||e.disabled===""),gm=e=>e&&(e.defer||e.defer===""),Ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ca=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!hr(e)&&H(`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"&&H("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!hr(e)&&H(`Invalid Teleport target: ${n}`),n},ym={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:y,createText:O,createComment:b}}=u,k=hr(t.props);let{shapeFlag:R,children:T,dynamicChildren:P}=t;if(g.NODE_ENV!=="production"&&Hn&&(l=!1,P=null),e==null){const E=t.el=g.NODE_ENV!=="production"?b("teleport start"):O(""),I=t.anchor=g.NODE_ENV!=="production"?b("teleport end"):O("");h(E,n,r),h(I,n,r);const D=(W,L)=>{R&16&&c(T,W,L,o,s,i,a,l)},de=()=>{const W=t.target=ca(t.props,y),L=Xu(W,t,O,h);W?(i!=="svg"&&Ju(W)?i="svg":i!=="mathml"&&Yu(W)&&(i="mathml"),k||(D(W,L),Fs(t))):g.NODE_ENV!=="production"&&!k&&H("Invalid Teleport target on mount:",W,`(${typeof W})`)};k&&(D(n,I),Fs(t)),gm(t.props)?xt(de,s):de()}else{t.el=e.el,t.targetStart=e.targetStart;const E=t.anchor=e.anchor,I=t.target=e.target,D=t.targetAnchor=e.targetAnchor,de=hr(e.props),W=de?n:I,L=de?E:D;if(i==="svg"||Ju(I)?i="svg":(i==="mathml"||Yu(I))&&(i="mathml"),P?(f(e.dynamicChildren,P,W,o,s,i,a),Ro(e,t,!0)):l||d(e,t,W,L,o,s,i,a,!1),k)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Us(t,n,E,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=t.target=ca(t.props,y);M?Us(t,M,null,u,0):g.NODE_ENV!=="production"&&H("Invalid Teleport target on update:",I,`(${typeof I})`)}else de&&Us(t,I,D,u,1);Fs(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 h=s||!hr(f);for(let y=0;y<a.length;y++){const O=a[y];r(O,t,n,h,!!O.dynamicChildren)}}},move:Us,hydrate:bm};function Us(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||hr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function bm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=ca(t.props,l);if(f){const h=f._lpa||f.firstChild;if(t.shapeFlag&16)if(hr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=h,t.targetAnchor=h&&i(h);else{t.anchor=i(e);let y=h;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}t.targetAnchor||Xu(f,t,c,u),d(h&&i(h),t,f,n,r,o,s)}Fs(t)}return t.anchor&&i(t.anchor)}const _m=ym;function Fs(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Xu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Ku]=s,e&&(r(o,e),r(s,e)),s}const Zn=Symbol("_leaveCb"),Bs=Symbol("_enterCb");function wm(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Re(()=>{e.isMounted=!0}),ha(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Qu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},ec=e=>{const t=e.subTree;return t.component?ec(t.component):t},Em={name:"BaseTransition",props:Qu,setup(e,{slots:t}){const n=Gs(),r=wm();return()=>{const o=t.default&&oc(t.default(),!0);if(!o||!o.length)return;const s=tc(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&H(`invalid <transition> mode: ${a}`),r.isLeaving)return fa(s);const l=rc(s);if(!l)return fa(s);let u=da(l,i,r,n,f=>u=f);l.type!==Je&&$o(l,u);const c=n.subTree,d=c&&rc(c);if(d&&d.type!==Je&&!yr(l,d)&&ec(n).type!==Je){const f=da(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Je)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},fa(s);a==="in-out"&&l.type!==Je&&(f.delayLeave=(h,y,O)=>{const b=nc(r,d);b[String(d.key)]=d,h[Zn]=()=>{y(),h[Zn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function tc(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Je){if(g.NODE_ENV!=="production"&&n){H("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Om=Em;function nc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function da(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:y,onLeaveCancelled:O,onBeforeAppear:b,onAppear:k,onAfterAppear:R,onAppearCancelled:T}=t,P=String(e.key),E=nc(n,e),I=(W,L)=>{W&&Ht(W,r,9,L)},D=(W,L)=>{const M=L[1];I(W,L),ue(W)?W.every(V=>V.length<=1)&&M():W.length<=1&&M()},de={mode:i,persisted:a,beforeEnter(W){let L=l;if(!n.isMounted)if(s)L=b||l;else return;W[Zn]&&W[Zn](!0);const M=E[P];M&&yr(e,M)&&M.el[Zn]&&M.el[Zn](),I(L,[W])},enter(W){let L=u,M=c,V=d;if(!n.isMounted)if(s)L=k||u,M=R||c,V=T||d;else return;let ae=!1;const $e=W[Bs]=N=>{ae||(ae=!0,N?I(V,[W]):I(M,[W]),de.delayedLeave&&de.delayedLeave(),W[Bs]=void 0)};L?D(L,[W,$e]):$e()},leave(W,L){const M=String(e.key);if(W[Bs]&&W[Bs](!0),n.isUnmounting)return L();I(f,[W]);let V=!1;const ae=W[Zn]=$e=>{V||(V=!0,L(),$e?I(O,[W]):I(y,[W]),W[Zn]=void 0,E[M]===e&&delete E[M])};E[M]=e,h?D(h,[W,ae]):ae()},clone(W){const L=da(W,t,n,r,o);return o&&o(L),L}};return de}function fa(e){if(Io(e))return e=Zt(e),e.children=null,e}function rc(e){if(!Io(e))return Gu(e.type)&&e.children?tc(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&fe(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===ke?(i.patchFlag&128&&o++,r=r.concat(oc(i.children,t,a))):(t||i.type!==Je)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function pe(e,t){return fe(e)?Ke({name:e.name},t,{setup:e}):e}function sc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Nm=new WeakSet;function pa(e,t,n,r,o=!1){if(ue(e)){e.forEach((y,O)=>pa(y,t&&(ue(t)?t[O]:t),n,r,o));return}if(Zr(r)&&!o)return;const s=r.shapeFlag&4?Ra(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){H("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===Le?a.refs={}:a.refs,d=a.setupState,f=ye(d),h=d===Le?()=>!1:y=>g.NODE_ENV!=="production"&&Nm.has(f[y])?!1:De(f,y);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,h(u)&&(d[u]=null)):qe(u)&&(u.value=null)),fe(l))Fr(l,a,12,[i,c]);else{const y=Ze(l),O=qe(l);if(y||O){const b=()=>{if(e.f){const k=y?h(l)?d[l]:c[l]:l.value;o?ue(k)&&ji(k,s):ue(k)?k.includes(s)||k.push(s):y?(c[l]=[s],h(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else y?(c[l]=i,h(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&H("Invalid template ref type:",l,`(${typeof l})`)};i?(b.id=-1,xt(b,n)):b()}else g.NODE_ENV!=="production"&&H("Invalid template ref type:",l,`(${typeof l})`)}}const Zr=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function xm(e,t){ic(e,"a",t)}function Sm(e,t){ic(e,"da",t)}function ic(e,t,n=Xe){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Hs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Io(o.parent.vnode)&&km(r,t,n,o),o=o.parent}}function km(e,t,n,r){const o=Hs(t,e,r,!0);dt(()=>{ji(r[t],o)},n)}function Hs(e,t,n=Xe,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{yn();const a=Fo(n),l=Ht(t,n,e,i);return a(),bn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=lr(ra[e].replace(/ hook$/,""));H(`${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 En=e=>(t,n=Xe)=>{(!Ys||e==="sp")&&Hs(e,(...r)=>t(...r),n)},Cm=En("bm"),Re=En("m"),Tm=En("bu"),Pm=En("u"),ha=En("bum"),dt=En("um"),Dm=En("sp"),$m=En("rtg"),Im=En("rtc");function Am(e,t=Xe){Hs("ec",e,t)}const Vm="components",ac=Symbol.for("v-ndc");function ma(e){return Ze(e)?Rm(Vm,e,!1)||e:e||ac}function Rm(e,t,n=!0,r=!1){const o=nt||Xe;if(o){const s=o.type;{const a=ja(s,!1);if(a&&(a===t||a===Tt(t)||a===ar(Tt(t))))return s}const i=lc(o[e]||s[e],t)||lc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&H(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
11
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&H(`resolve${ar(e.slice(0,-1))} can only be used in render() or setup().`)}function lc(e,t){return e&&(e[t]||e[Tt(t)]||e[ar(Tt(t))])}function an(e,t,n,r){let o;const s=n,i=ue(e);if(i||Ze(e)){const a=i&&rn(e);a&&(e=Os(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&H(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function va(e,t,n={},r,o){if(nt.ce||nt.parent&&Zr(nt.parent)&&nt.parent.ce)return _(),xe(ke,null,[q("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(H("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),_();const i=s&&uc(s(n)),a=xe(ke,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function uc(e){return e.some(t=>qr(t)?!(t.type===Je||t.type===ke&&!uc(t.children)):!0)?e:null}const ga=e=>e?Hc(e)?Ra(e):ga(e.parent):null,mr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?nn(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?nn(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?nn(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?nn(e.refs):e.refs,$parent:e=>ga(e.parent),$root:e=>ga(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wa(e),$forceUpdate:e=>e.f||(e.f=()=>{Rs(e.update)}),$nextTick:e=>e.n||(e.n=Co.bind(e.proxy)),$watch:e=>mv.bind(e)}),ya=e=>e==="_"||e==="$",ba=(e,t)=>e!==Le&&!e.__isScriptSetup&&De(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ba(r,t))return i[t]=1,r[t];if(o!==Le&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==Le&&De(n,t))return i[t]=4,n[t];_a&&(i[t]=0)}}const c=mr[t];let d,f;if(c)return t==="$attrs"?(tt(e.attrs,"get",""),g.NODE_ENV!=="production"&&zs()):g.NODE_ENV!=="production"&&t==="$slots"&&tt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Le&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&nt&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==Le&&ya(t[0])&&De(o,t)?H(`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===nt&&H(`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 ba(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(H(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Le&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&H(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&H(`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!==Le&&De(e,i)||ba(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(mr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(cc.ownKeys=e=>(H("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 jm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(mr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>mr[n](e),set:et})}),t}function Lm(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:et})})}function Mm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(ya(r[0])){H(`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:et})}})}function dc(e){return ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Um(){const e=Object.create(null);return(t,n)=>{e[n]?H(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let _a=!0;function Fm(e){const t=wa(e),n=e.proxy,r=e.ctx;_a=!1,t.beforeCreate&&fc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:y,activated:O,deactivated:b,beforeDestroy:k,beforeUnmount:R,destroyed:T,unmounted:P,render:E,renderTracked:I,renderTriggered:D,errorCaptured:de,serverPrefetch:W,expose:L,inheritAttrs:M,components:V,directives:ae,filters:$e}=t,N=g.NODE_ENV!=="production"?Um():null;if(g.NODE_ENV!=="production"){const[Q]=e.propsOptions;if(Q)for(const re in Q)N("Props",re)}if(u&&Bm(u,r,N),i)for(const Q in i){const re=i[Q];fe(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Q,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Q]=re.bind(n),g.NODE_ENV!=="production"&&N("Methods",Q)):g.NODE_ENV!=="production"&&H(`Method "${Q}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!fe(o)&&H("The data option must be a function. Plain object usage is no longer supported.");const Q=o.call(n,n);if(g.NODE_ENV!=="production"&&Li(Q)&&H("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Q))g.NODE_ENV!=="production"&&H("data() should return an object.");else if(e.data=No(Q),g.NODE_ENV!=="production")for(const re in Q)N("Data",re),ya(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Q[re],set:et})}if(_a=!0,s)for(const Q in s){const re=s[Q],me=fe(re)?re.bind(n,n):fe(re.get)?re.get.bind(n,n):et;g.NODE_ENV!=="production"&&me===et&&H(`Computed property "${Q}" has no getter.`);const oe=!fe(re)&&fe(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{H(`Write operation failed: computed property "${Q}" is readonly.`)}:et,Fe=J({get:me,set:oe});Object.defineProperty(r,Q,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:mt=>Fe.value=mt}),g.NODE_ENV!=="production"&&N("Computed",Q)}if(a)for(const Q in a)pc(a[Q],r,n,Q);if(l){const Q=fe(l)?l.call(n):l;Reflect.ownKeys(Q).forEach(re=>{ft(re,Q[re])})}c&&fc(c,e,"c");function A(Q,re){ue(re)?re.forEach(me=>Q(me.bind(n))):re&&Q(re.bind(n))}if(A(Cm,d),A(Re,f),A(Tm,h),A(Pm,y),A(xm,O),A(Sm,b),A(Am,de),A(Im,I),A($m,D),A(ha,R),A(dt,P),A(Dm,W),ue(L))if(L.length){const Q=e.exposed||(e.exposed={});L.forEach(re=>{Object.defineProperty(Q,re,{get:()=>n[re],set:me=>n[re]=me})})}else e.exposed||(e.exposed={});E&&e.render===et&&(e.render=E),M!=null&&(e.inheritAttrs=M),V&&(e.components=V),ae&&(e.directives=ae),W&&sc(e)}function Bm(e,t,n=et){ue(e)&&(e=Ea(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Se(o.from||r,o.default,!0):s=Se(o.from||r):s=Se(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function fc(e,t,n){Ht(ue(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function pc(e,t,n,r){let o=r.includes(".")?Dc(n,r):()=>n[r];if(Ze(e)){const s=t[e];fe(s)?Ge(o,s):g.NODE_ENV!=="production"&&H(`Invalid watch handler specified by key "${e}"`,s)}else if(fe(e))Ge(o,e.bind(n));else if(Ie(e))if(ue(e))e.forEach(s=>pc(s,t,n,r));else{const s=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(s)?Ge(o,s,e):g.NODE_ENV!=="production"&&H(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&H(`Invalid watch option: "${r}"`,e)}function wa(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=>Zs(l,u,i,!0)),Zs(l,t,i)),Ie(t)&&s.set(t,l),l}function Zs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Zs(e,s,n,!0),o&&o.forEach(i=>Zs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&H('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Hm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Hm={data:hc,props:mc,emits:mc,methods:Ao,computed:Ao,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Ao,directives:Ao,watch:qm,provide:hc,inject:Zm};function hc(e,t){return t?e?function(){return Ke(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function Zm(e,t){return Ao(Ea(e),Ea(t))}function Ea(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Ao(e,t){return e?Ke(Object.create(null),e,t):t}function mc(e,t){return e?ue(e)&&ue(t)?[...new Set([...e,...t])]:Ke(Object.create(null),dc(e),dc(t??{})):t}function qm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function vc(){return{app:null,config:{isNativeTag:th,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 Wm=0;function zm(e,t){return function(r,o=null){fe(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&H("root props passed to app.mount() must be an object."),o=null);const s=vc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:Wm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Kc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&H("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&H("Plugin has already been applied to target app."):c&&fe(c.install)?(i.add(c),c.install(u,...d)):fe(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&H('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&H("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&Aa(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&H(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&zu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&H(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&H("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&H("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 h=u._ceVNode||q(r,o);return h.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(h),c,f)}),d&&t?t(h,c):e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=h.component,um(u,Kc)),Ra(h.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&H(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,cm(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&H("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&H(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=vr;vr=u;try{return c()}finally{vr=d}}};return u}}let vr=null;function ft(e,t){if(!Xe)g.NODE_ENV!=="production"&&H("provide() can only be used inside setup().");else{let n=Xe.provides;const r=Xe.parent&&Xe.parent.provides;r===n&&(n=Xe.provides=Object.create(r)),n[e]=t}}function Se(e,t,n=!1){const r=Xe||nt;if(r||vr){const o=vr?vr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&fe(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&H(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&H("inject() can only be used inside setup() or functional components.")}function Km(){return!!(Xe||nt||vr)}const gc={},yc=()=>Object.create(gc),bc=e=>Object.getPrototypeOf(e)===gc;function Gm(e,t,n,r=!1){const o={},s=yc();e.propsDefaults=Object.create(null),_c(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Oc(t||{},o,e),n?e.props=r?o:Fh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Jm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Ym(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Jm(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(Ws(e.emitsOptions,f))continue;const h=t[f];if(l)if(De(s,f))h!==s[f]&&(s[f]=h,u=!0);else{const y=Tt(f);o[y]=Oa(l,a,y,h,e,!1)}else h!==s[f]&&(s[f]=h,u=!0)}}}else{_c(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=gn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=Oa(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&tn(e.attrs,"set",""),g.NODE_ENV!=="production"&&Oc(t||{},o,e)}function _c(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(yo(l))continue;const u=t[l];let c;o&&De(o,c=Tt(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Ws(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||Le;for(let c=0;c<s.length;c++){const d=s[c];n[d]=Oa(o,l,d,u[d],e,!De(u,d))}}return i}function Oa(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&fe(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Fo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===gn(n))&&(r=!0))}return r}const Xm=new WeakMap;function wc(e,t,n=!1){const r=n?Xm: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,h]=wc(d,t,!0);Ke(i,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Mr),Mr;if(ue(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&H("props must be strings when using array syntax.",s[c]);const d=Tt(s[c]);Ec(d)&&(i[d]=Le)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&H("invalid props options",s);for(const c in s){const d=Tt(c);if(Ec(d)){const f=s[c],h=i[d]=ue(f)||fe(f)?{type:f}:Ke({},f),y=h.type;let O=!1,b=!0;if(ue(y))for(let k=0;k<y.length;++k){const R=y[k],T=fe(R)&&R.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(b=!1)}else O=fe(y)&&y.name==="Boolean";h[0]=O,h[1]=b,(O||De(h,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function Ec(e){return e[0]!=="$"&&!yo(e)?!0:(g.NODE_ENV!=="production"&&H(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Qm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Oc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&ev(s,r[s],i,g.NODE_ENV!=="production"?nn(r):r,!De(e,s)&&!De(e,gn(s)))}}function ev(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){H('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=ue(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:h,expectedType:y}=nv(t,c[f]);d.push(y||""),u=h}if(!u){H(rv(e,t,d));return}}a&&!a(t,r)&&H('Invalid prop: custom validator check failed for prop "'+e+'".')}}const tv=vn("String,Number,Boolean,Function,Symbol,BigInt");function nv(e,t){let n;const r=Qm(t);if(r==="null")n=e===null;else if(tv(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=ue(e):n=e instanceof t;return{valid:n,expectedType:r}}function rv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ar).join(" | ")}`;const o=n[0],s=Mi(t),i=Nc(t,o),a=Nc(t,s);return n.length===1&&xc(o)&&!ov(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,xc(s)&&(r+=`with value ${a}.`),r}function Nc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function xc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function ov(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Sc=e=>e[0]==="_"||e==="$stable",Na=e=>ue(e)?e.map(qt):[qt(e)],sv=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Xe&&(!n||n.root===Xe.root)&&H(`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.`),Na(t(...o))),n);return r._c=!1,r},kc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Sc(o))continue;const s=e[o];if(fe(s))t[o]=sv(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&H(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Na(s);t[o]=()=>i}}},Cc=(e,t)=>{g.NODE_ENV!=="production"&&!Io(e.vnode)&&H("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Na(t);e.slots.default=()=>n},xa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},iv=(e,t,n)=>{const r=e.slots=yc();if(e.vnode.shapeFlag&32){const o=t._;o?(xa(r,t,n),n&&_s(r,"_",o,!0)):kc(t,r)}else t&&Cc(e,t)},av=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Le;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Hn?(xa(o,t,n),tn(e,"set","$slots")):n&&a===1?s=!1:xa(o,t,n):(s=!t.$stable,kc(t,o)),i=t}else t&&(Cc(e,t),i={default:1});if(s)for(const a in o)!Sc(a)&&i[a]==null&&delete o[a]};let Vo,qn;function On(e,t){e.appContext.config.performance&&qs()&&qn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&hm(e,t,qs()?qn.now():Date.now())}function Nn(e,t){if(e.appContext.config.performance&&qs()){const n=`vue-${t}-${e.uid}`,r=n+":end";qn.mark(r),qn.measure(`<${Xs(e,e.type)}> ${t}`,n,r),qn.clearMarks(n),qn.clearMarks(r)}g.NODE_ENV!=="production"&&mm(e,t,qs()?qn.now():Date.now())}function qs(){return Vo!==void 0||(typeof window<"u"&&window.performance?(Vo=!0,qn=window.performance):Vo=!1),Vo}function lv(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
12
12
|
|
|
13
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=Ui();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=et,insertStaticContent:b}=e,O=(p,h,k,U=null,A=null,j=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Bn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!yr(p,h)&&(U=wi(p),Be(p,A,j,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:F,ref:ve,shapeFlag:X}=h;switch(F){case jo:E(p,h,k,U);break;case Je:T(p,h,k,U);break;case Lo:p==null?M(h,k,U,J):g.NODE_ENV!=="production"&&C(p,h,k,J);break;case xe:ae(p,h,k,U,A,j,J,z,W);break;default:X&1?L(p,h,k,U,A,j,J,z,W):X&6?$e(p,h,k,U,A,j,J,z,W):X&64||X&128?F.process(p,h,k,U,A,j,J,z,W,ns):g.NODE_ENV!=="production"&&B("Invalid VNode type:",F,`(${typeof F})`)}ve!=null&&A&&fa(ve,p&&p.ref,j,h||p,!h)},E=(p,h,k,U)=>{if(p==null)r(h.el=a(h.children),k,U);else{const A=h.el=p.el;h.children!==p.children&&u(A,h.children)}},T=(p,h,k,U)=>{p==null?r(h.el=l(h.children||""),k,U):h.el=p.el},M=(p,h,k,U)=>{[p.el,p.anchor]=b(p.children,h,k,U,p.el,p.anchor)},C=(p,h,k,U)=>{if(h.children!==p.children){const A=f(p.anchor);x(p),[h.el,h.anchor]=b(h.children,k,A,U)}else h.el=p.el,h.anchor=p.anchor},ee=({el:p,anchor:h},k,U)=>{let A;for(;p&&p!==h;)A=f(p),r(p,k,U),p=A;r(h,k,U)},x=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},L=(p,h,k,U,A,j,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?I(h,k,U,A,j,J,z,W):V(p,h,A,j,J,z,W)},I=(p,h,k,U,A,j,J,z)=>{let W,F;const{props:ve,shapeFlag:X,transition:le,dirs:we}=p;if(W=p.el=i(p.type,j,ve&&ve.is,ve),X&8?c(W,p.children):X&16&&q(p.children,W,null,U,A,Sa(p,j),J,z),we&&pr(p,null,U,"created"),he(W,p,p.scopeId,J,U),ve){for(const He in ve)He!=="value"&&!yo(He)&&s(W,He,null,ve[He],j,U);"value"in ve&&s(W,"value",null,ve.value,j),(F=ve.onVnodeBeforeMount)&&an(F,U,p)}g.NODE_ENV!=="production"&&(_s(W,"__vnode",p,!0),_s(W,"__vueParentComponent",U,!0)),we&&pr(p,null,U,"beforeMount");const Pe=cv(A,le);Pe&&le.beforeEnter(W),r(W,h,k),((F=ve&&ve.onVnodeMounted)||Pe||we)&&Nt(()=>{F&&an(F,U,p),Pe&&le.enter(W),we&&pr(p,null,U,"mounted")},A)},he=(p,h,k,U,A)=>{if(k&&m(p,k),U)for(let j=0;j<U.length;j++)m(p,U[j]);if(A){let j=A.subTree;if(g.NODE_ENV!=="production"&&j.patchFlag>0&&j.patchFlag&2048&&(j=Ca(j.children)||j),h===j||Rc(j.type)&&(j.ssContent===h||j.ssFallback===h)){const J=A.vnode;he(p,J,J.scopeId,J.slotScopeIds,A.parent)}}},q=(p,h,k,U,A,j,J,z,W=0)=>{for(let F=W;F<p.length;F++){const ve=p[F]=z?qn(p[F]):qt(p[F]);O(null,ve,h,k,U,A,j,J,z)}},V=(p,h,k,U,A,j,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:F,dirs:ve}=h;W|=p.patchFlag&16;const X=p.props||je,le=h.props||je;let we;if(k&&gr(k,!1),(we=le.onVnodeBeforeUpdate)&&an(we,k,h,p),ve&&pr(h,p,k,"beforeUpdate"),k&&gr(k,!0),g.NODE_ENV!=="production"&&Bn&&(W=0,J=!1,F=null),(X.innerHTML&&le.innerHTML==null||X.textContent&&le.textContent==null)&&c(z,""),F?(R(p.dynamicChildren,F,z,k,U,Sa(h,A),j),g.NODE_ENV!=="production"&&Ro(p,h)):J||me(p,h,z,null,k,U,Sa(h,A),j,!1),W>0){if(W&16)$(z,X,le,k,A);else if(W&2&&X.class!==le.class&&s(z,"class",null,le.class,A),W&4&&s(z,"style",X.style,le.style,A),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=le[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,A,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&F==null&&$(z,X,le,k,A);((we=le.onVnodeUpdated)||ve)&&Nt(()=>{we&&an(we,k,h,p),ve&&pr(h,p,k,"updated")},U)},R=(p,h,k,U,A,j,J)=>{for(let z=0;z<h.length;z++){const W=p[z],F=h[z],ve=W.el&&(W.type===xe||!yr(W,F)||W.shapeFlag&70)?d(W.el):k;O(W,F,ve,null,U,A,j,J,!0)}},$=(p,h,k,U,A)=>{if(h!==k){if(h!==je)for(const j in h)!yo(j)&&!(j in k)&&s(p,j,h[j],null,A,U);for(const j in k){if(yo(j))continue;const J=k[j],z=h[j];J!==z&&j!=="value"&&s(p,j,z,J,A,U)}"value"in k&&s(p,"value",h.value,k.value,A)}},ae=(p,h,k,U,A,j,J,z,W)=>{const F=h.el=p?p.el:a(""),ve=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:le,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Bn||X&2048)&&(X=0,W=!1,le=null),we&&(z=z?z.concat(we):we),p==null?(r(F,k,U),r(ve,k,U),q(h.children||[],k,ve,A,j,J,z,W)):X>0&&X&64&&le&&p.dynamicChildren?(R(p.dynamicChildren,le,k,A,j,J,z),g.NODE_ENV!=="production"?Ro(p,h):(h.key!=null||A&&h===A.subTree)&&Ro(p,h,!0)):me(p,h,k,ve,A,j,J,z,W)},$e=(p,h,k,U,A,j,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?A.ctx.activate(h,k,U,J,W):w(h,k,U,A,j,J,W):D(p,h,W)},w=(p,h,k,U,A,j,J)=>{const z=p.component=Tv(p,U,A);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&(As(p),wn(z,"mount")),Io(p)&&(z.ctx.renderer=ns),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(A&&A.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Je);T(null,W,h,k)}}else Y(z,p,h,k,A,j,J);g.NODE_ENV!=="production"&&(Vs(),En(z,"mount"))},D=(p,h,k)=>{const U=h.component=p.component;if(bv(p,h,k))if(U.asyncDep&&!U.asyncResolved){g.NODE_ENV!=="production"&&As(h),re(U,h,k),g.NODE_ENV!=="production"&&Vs();return}else U.next=h,U.update();else h.el=p.el,U.vnode=h},Y=(p,h,k,U,A,j,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:le,u:we,parent:Pe,vnode:He}=p;{const It=Cc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&As(X||p.vnode),gr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,le&&bo(le),($t=X.props&&X.props.onVnodeBeforeUpdate)&&an($t,Pe,X,He),gr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=Ta(p);g.NODE_ENV!=="production"&&En(p,"render");const Kt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(Kt,mt,d(Kt.el),wi(Kt),p,A,j),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,A),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>an($t,Pe,X,He),A),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&Vs()}else{let X;const{el:le,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,Kt=Zr(h);if(gr(p,!1),Pe&&bo(Pe),!Kt&&(X=we&&we.onVnodeBeforeMount)&&an(X,Me,h),gr(p,!0),le&&Cf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=Ta(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),Cf(le,p.subTree,p,A,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};Kt&&mt.__asyncHydrate?mt.__asyncHydrate(le,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=Ta(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,U,p,A,j),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,A),!Kt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>an(X,Me,It),A)}(h.shapeFlag&256||Me&&Zr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,A),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=U=null}};p.scope.on();const W=p.effect=new au(z);p.scope.off();const F=p.update=W.run.bind(W),ve=p.job=W.runIfDirty.bind(W);ve.i=p,ve.id=p.uid,W.scheduler=()=>Rs(ve),gr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>bo(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>bo(p.rtg,X):void 0),F()},re=(p,h,k)=>{h.component=p;const U=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,U,k),iv(p,h.children,k),vn(),Lu(p),gn()},me=(p,h,k,U,A,j,J,z,W=!1)=>{const F=p&&p.children,ve=p?p.shapeFlag:0,X=h.children,{patchFlag:le,shapeFlag:we}=h;if(le>0){if(le&128){Fe(F,X,k,U,A,j,J,z,W);return}else if(le&256){oe(F,X,k,U,A,j,J,z,W);return}}we&8?(ve&16&&ts(F,A,j),X!==F&&c(k,X)):ve&16?we&16?Fe(F,X,k,U,A,j,J,z,W):ts(F,A,j,!0):(ve&8&&c(k,""),we&16&&q(X,k,U,A,j,J,z,W))},oe=(p,h,k,U,A,j,J,z,W)=>{p=p||Mr,h=h||Mr;const F=p.length,ve=h.length,X=Math.min(F,ve);let le;for(le=0;le<X;le++){const we=h[le]=W?qn(h[le]):qt(h[le]);O(p[le],we,k,null,A,j,J,z,W)}F>ve?ts(p,A,j,!0,!1,X):q(h,k,U,A,j,J,z,W,X)},Fe=(p,h,k,U,A,j,J,z,W)=>{let F=0;const ve=h.length;let X=p.length-1,le=ve-1;for(;F<=X&&F<=le;){const we=p[F],Pe=h[F]=W?qn(h[F]):qt(h[F]);if(yr(we,Pe))O(we,Pe,k,null,A,j,J,z,W);else break;F++}for(;F<=X&&F<=le;){const we=p[X],Pe=h[le]=W?qn(h[le]):qt(h[le]);if(yr(we,Pe))O(we,Pe,k,null,A,j,J,z,W);else break;X--,le--}if(F>X){if(F<=le){const we=le+1,Pe=we<ve?h[we].el:U;for(;F<=le;)O(null,h[F]=W?qn(h[F]):qt(h[F]),k,Pe,A,j,J,z,W),F++}}else if(F>le)for(;F<=X;)Be(p[F],A,j,!0),F++;else{const we=F,Pe=F,He=new Map;for(F=Pe;F<=le;F++){const Et=h[F]=W?qn(h[F]):qt(h[F]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&B("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,F))}let Me,$t=0;const mt=le-Pe+1;let Kt=!1,It=0;const rs=new Array(mt);for(F=0;F<mt;F++)rs[F]=0;for(F=we;F<=X;F++){const Et=p[F];if($t>=mt){Be(Et,A,j,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=le;Me++)if(rs[Me-Pe]===0&&yr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,A,j,!0):(rs[dn-Pe]=F+1,dn>=It?It=dn:Kt=!0,O(Et,h[dn],k,null,A,j,J,z,W),$t++)}const Pf=Kt?dv(rs):Mr;for(Me=Pf.length-1,F=mt-1;F>=0;F--){const Et=Pe+F,dn=h[Et],Df=Et+1<ve?h[Et+1].el:U;rs[F]===0?O(null,dn,k,Df,A,j,J,z,W):Kt&&(Me<0||F!==Pf[Me]?ht(dn,k,Df,2):Me--)}}},ht=(p,h,k,U,A=null)=>{const{el:j,type:J,transition:z,children:W,shapeFlag:F}=p;if(F&6){ht(p.component.subTree,h,k,U);return}if(F&128){p.suspense.move(h,k,U);return}if(F&64){J.move(p,h,k,ns);return}if(J===xe){r(j,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,U);r(p.anchor,h,k);return}if(J===Lo){ee(p,h,k);return}if(U!==2&&F&1&&z)if(U===0)z.beforeEnter(j),r(j,h,k),Nt(()=>z.enter(j),A);else{const{leave:X,delayLeave:le,afterLeave:we}=z,Pe=()=>r(j,h,k),He=()=>{X(j,()=>{Pe(),we&&we()})};le?le(j,Pe,He):He()}else r(j,h,k)},Be=(p,h,k,U=!1,A=!1)=>{const{type:j,props:J,ref:z,children:W,dynamicChildren:F,shapeFlag:ve,patchFlag:X,dirs:le,cacheIndex:we}=p;if(X===-2&&(A=!1),z!=null&&fa(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),ve&256){h.ctx.deactivate(p);return}const Pe=ve&1&&le,He=!Zr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&an(Me,h,p),ve&6)Sw(p.component,k,U);else{if(ve&128){p.suspense.unmount(k,U);return}Pe&&pr(p,null,h,"beforeUnmount"),ve&64?p.type.remove(p,h,k,ns,U):F&&!F.hasOnce&&(j!==xe||X>0&&X&64)?ts(F,h,k,!1,!0):(j===xe&&X&384||!A&&ve&16)&&ts(W,h,k),U&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&an(Me,h,p),Pe&&pr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:U,transition:A}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&A&&!A.persisted?p.children.forEach(J=>{J.type===Je?o(J.el):xt(J)}):nr(k,U);return}if(h===Lo){x(p);return}const j=()=>{o(k),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(p.shapeFlag&1&&A&&!A.persisted){const{leave:J,delayLeave:z}=A,W=()=>J(k,j);z?z(p.el,j,W):W()}else j()},nr=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Sw=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:U,scope:A,job:j,subTree:J,um:z,m:W,a:F}=p;Pc(W),Pc(F),U&&bo(U),A.stop(),j&&(j.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&fm(p)},ts=(p,h,k,U=!1,A=!1,j=0)=>{for(let J=j;J<p.length;J++)Be(p[J],h,k,U,A)},wi=p=>{if(p.shapeFlag&6)return wi(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Ku];return k?f(k):h};let ml=!1;const kf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ns={p:O,um:Be,m:ht,r:xt,mt:w,mc:q,pc:me,pbc:R,n:wi,o:e};let Tf,Cf;return{render:kf,hydrate:Tf,createApp:Wm(kf,Tf)}}function Sa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(ue(r)&&ue(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]=qn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Je&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&B("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return xa(e,null,t)}function Ge(e,t,n){return g.NODE_ENV!=="production"&&!de(t)&&B("`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."),xa(e,t,n)}function xa(e,t,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&B('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&B('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&B('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=B);let l;if(Ys)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:et,resume:et,pause:et};const u=Xe;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():Rs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;de(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=xa(o,s.bind(r),n);return i(),a}function Dc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Ct(t))in d))&&B(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Ct(t))}" prop.`);else{const f=c[t];de(f)&&(f(...n)||B(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(sh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&B(`Event "${c}" is emitted in component ${Xs(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Ct(t))];!l&&s&&(l=r[a=lr(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!de(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(ue(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Ws(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let ka=!1;function zs(){ka=!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:b,inheritAttrs:O}=e,E=Ms(e);let T,M;g.NODE_ENV!=="production"&&(ka=!1);try{if(n.shapeFlag&4){const x=o||r,L=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(x,{get(I,he,q){return B(`Property '${String(he)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(I,he,q)}}):x;T=qt(u.call(L,x,c,g.NODE_ENV!=="production"?tn(d):d,m,f,b)),M=a}else{const x=t;g.NODE_ENV!=="production"&&a===d&&zs(),T=qt(x.length>1?x(g.NODE_ENV!=="production"?tn(d):d,g.NODE_ENV!=="production"?{get attrs(){return zs(),tn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):x(g.NODE_ENV!=="production"?tn(d):d,null)),M=t.props?a:gv(a)}}catch(x){Mo.length=0,xo(x,e,1),T=Z(Je)}let C=T,ee;if(g.NODE_ENV!=="production"&&T.patchFlag>0&&T.patchFlag&2048&&([C,ee]=Ic(T)),M&&O!==!1){const x=Object.keys(M),{shapeFlag:L}=C;if(x.length){if(L&7)s&&x.some(gs)&&(M=yv(M,s)),C=Zt(C,M,!1,!0);else if(g.NODE_ENV!=="production"&&!ka&&C.type!==Je){const I=Object.keys(a),he=[],q=[];for(let V=0,R=I.length;V<R;V++){const $=I[V];go($)?gs($)||he.push($[2].toLowerCase()+$.slice(3)):q.push($)}q.length&&B(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),he.length&&B(`Extraneous non-emits event listeners (${he.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!Ac(C)&&B("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Zt(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(C)&&B("Component inside <Transition> renders non-element root node that cannot be animated."),$o(C,n.transition)),g.NODE_ENV!=="production"&&ee?ee(C):T=C,Ms(E),T}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Ca(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function Ca(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(qr(o)){if(o.type!==Je||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ca(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!gs(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Je;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Bn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Ws(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Ws(n,s))return!0}return!1}function _v({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Rc=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const xe=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Je=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function y(e=!1){Mo.push(Pt=e?null:[])}function Ev(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Mr:null,Ev(),Uo>0&&Pt&&Pt.push(e),e}function S(e,t,n,r,o,s){return Lc(N(e,t,n,r,o,s,!0))}function Se(e,t,n,r,o){return Lc(Z(e,t,n,r,o,!0))}function qr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=js.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ov=(...e)=>Uc(...e),Mc=({key:e})=>e??null,Ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||de(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Ks(t),scopeId:Wu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:nt};return a?(Pa(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&B("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&B(`Invalid vnode type when creating vnode: ${e}.`),e=Je),qr(e)){const a=Zt(e,t,!0);return n&&Pa(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=ws(a)),Ie(l)&&(So(l)&&!ue(l)&&(l=Ke({},l)),t.style=Fi(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:de(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&So(e)&&(e=ye(e),B("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
14
|
-
Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?So(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Da(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?ue(s)?s.concat(Ks(t)):[s,Ks(t)]:Ks(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ue(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return ue(e.children)&&(t.children=e.children.map(Fc)),t}function ke(e=" ",t=0){return Z(jo,null,e,t)}function Sv(e,t){const n=Z(Lo,null,e);return n.staticCount=t,n}function ce(e="",t=!1){return t?(y(),Se(Je,null,e)):Z(Je,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Je):ue(e)?Z(xe,null,e.slice()):typeof e=="object"?qn(e):Z(jo,null,String(e))}function qn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Pa(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ue(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Pa(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!bc(t)?t._ctx=nt:o===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else de(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Da(...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=ws([t.class,r.class]));else if(o==="style")t.style=Fi([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(ue(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function an(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=vc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Xe=null;const Gs=()=>Xe||nt;let Js,$a;{const e=Ui(),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)}};Js=t("__VUE_INSTANCE_SETTERS__",n=>Xe=n),$a=t("__VUE_SSR_SETTERS__",n=>Ys=n)}const Fo=e=>{const t=Xe;return Js(e),e.scope.on(),()=>{e.scope.off(),Js(t)}},Bc=()=>{Xe&&Xe.scope.off(),Js(null)},Cv=hn("slot,component");function Ia(e,{isNativeTag:t}){(Cv(e)||t(e))&&B("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Ys=!1;function Pv(e,t=!1,n=!1){t&&$a(t);const{props:r,children:o}=e.vnode,s=Hc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&$a(!1),i}function Dv(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++)zu(s[i])}r.compilerOptions&&$v()&&B('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Fo(e);vn();const a=Fr(o,e,0,[g.NODE_ENV!=="production"?tn(e.props):e.props,s]);if(gn(),i(),ji(a)){if(Zr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(e,l,t)}).catch(l=>{xo(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";B(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){de(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&qr(t)&&B("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&B(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Aa;const $v=()=>!Aa;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Aa&&!r.render){const o=r.template||_a(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Aa(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||et}{const o=Fo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===et&&!t&&(r.template?B('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".'):B("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return zs(),tt(e,"get",""),e[t]},set(){return B("setupContext.attrs is readonly."),!1},deleteProperty(){return B("setupContext.attrs is readonly."),!1}}:{get(e,t){return tt(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return tt(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&B("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ue(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&B(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Wc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Va(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(Ln(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ra(e,t=!0){return de(e)?e.displayName||e.name:e.name||t&&e.__name}function Xs(e,t,n=!1){let r=Ra(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Rv(r):n?"App":"Anonymous"}function zc(e){return de(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,Ys);if(g.NODE_ENV!=="production"){const r=Gs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!ue(t)?qr(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&qr(n)&&(n=[n]),Z(e,t,n))}function jv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:nn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(de(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(ue(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",On=g.NODE_ENV!=="production"?B:et;var ln={};let ja;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{ja=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){ln.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Jc=ja?e=>ja.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Yc=Nn&&Nn.createElement("template"),Uv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Wn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fv=Ke({},Qu,Xc),La=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),br=(e,t=[])=>{ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const $ in e)$ in Xc||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],E=b&&b[1],{onBeforeEnter:T,onEnter:M,onEnterCancelled:C,onLeave:ee,onLeaveCancelled:x,onBeforeAppear:L=T,onAppear:I=M,onAppearCancelled:he=C}=t,q=($,ae,$e)=>{_r($,ae?c:a),_r($,ae?u:i),$e&&$e()},V=($,ae)=>{$._isLeaving=!1,_r($,d),_r($,m),_r($,f),ae&&ae()},R=$=>(ae,$e)=>{const w=$?I:M,D=()=>q(ae,$,$e);br(w,[ae,D]),ed(()=>{_r(ae,$?l:s),zn(ae,$?c:a),Qc(w)||td(ae,r,O,D)})};return Ke(t,{onBeforeEnter($){br(T,[$]),zn($,s),zn($,i)},onBeforeAppear($){br(L,[$]),zn($,l),zn($,u)},onEnter:R(!1),onAppear:R(!0),onLeave($,ae){$._isLeaving=!0;const $e=()=>V($,ae);zn($,d),zn($,f),Wv(),ed(()=>{$._isLeaving&&(_r($,d),zn($,m),Qc(ee)||td($,r,E,$e))}),br(ee,[$,$e])},onEnterCancelled($){q($,!1),br(C,[$])},onAppearCancelled($){q($,!0),br(he,[$])},onLeaveCancelled($){V($),br(x,[$])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[Ma(e.enter),Ma(e.leave)];{const t=Ma(e);return[t,t]}}function Ma(e){const t=ih(e);return ln.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function zn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function td(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${Wn}Delay`),s=r(`${Wn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===Wn?i>0&&(c=Wn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Wn:Bo:null,f=c?c===Wn?s.length:l.length:0);const m=c===Wn&&/\b(transform|all)(,|$)/.test(r(`${Wn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(ln.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Qs(r,a,"")}else for(const i in t)n[i]==null&&Qs(r,i,"");for(const i in n)i==="display"&&(s=!0),Qs(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,sd=/\s*!important$/;function Qs(e,t,n){if(ue(n))n.forEach(r=>Qs(e,t,r));else if(n==null&&(n=""),ln.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);sd.test(n)?e.setProperty(mn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Ua={};function Qv(e,t){const n=Ua[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return Ua[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Ua[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=gh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Vn(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){ln.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=ln.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(ln.NODE_ENV!=="production"?dd(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function og(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Fa=0;const sg=Promise.resolve(),ig=()=>Fa||(sg.then(()=>Fa=0),Fa=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function dd(e,t){return de(e)||ue(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
15
|
-
Expected function or array of functions, received type ${typeof e}.`),et)}function lg(e,t){if(ue(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?gs(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&de(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);ln.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!de(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return ln.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return ln.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let ei;const Og=new Uint8Array(16);function Ng(){if(!ei&&(ei=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ei))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ei(Og)}const it=[];for(let e=0;e<256;++e)it.push((e+256).toString(16).slice(1));function Sg(e,t=0){return it[e[t+0]]+it[e[t+1]]+it[e[t+2]]+it[e[t+3]]+"-"+it[e[t+4]]+it[e[t+5]]+"-"+it[e[t+6]]+it[e[t+7]]+"-"+it[e[t+8]]+it[e[t+9]]+"-"+it[e[t+10]]+it[e[t+11]]+it[e[t+12]]+it[e[t+13]]+it[e[t+14]]+it[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ti(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var Kn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Zo=class Ye{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=P(null),this.loadedUser=P(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=P({id:ti(),status:Lr.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(Ye.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Ye.storefrontKey}_loaded`,!1),this.utm=r(Ye.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(Ye.utmKey,{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}),this.hasUtm&&t.persistUtm)localStorage.setItem(Ye.utmKey,JSON.stringify(this.utm.value));else if(t.persistUtm){const l=localStorage.getItem(Ye.utmKey);if(l)try{this.utm=r(Ye.utmKey,JSON.parse(l))}catch{}}const i=localStorage.getItem(Ye.sessionKey);i?(this.currentOrder=P(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=P({id:ti(),status:Lr.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtm&&this.pushOrderContent());const a=localStorage.getItem(Ye.storefrontKey);if(a?(this.storefront=r(Ye.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${Ye.storefrontKey}_loaded`,!0)):(this.storefront=r(Ye.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Ye.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Ge(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get hasUtm(){return!!this.utm.value&&Object.values(this.utm.value).some(t=>!!t)}get loadedUserPromise(){return new Promise(t=>{Ge(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Kn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof Pi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(Ye.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(Ye.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){var n;switch(t.key){case Ye.sessionKey:this.currentOrder.value=t.newValue?JSON.parse(t.newValue):{id:ti(),currency:((n=this.storefront.value)==null?void 0:n.suggestedCurrency)||"",status:Lr.Open,items:[],couponsApplied:[]};break;case Ye.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break;case Ye.utmKey:this.utm.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==Lr.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(Ye.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:ti(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Lr.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(Ye.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof An)return;console.warn("Could not surrender order:",t)}}};Zo.userKey="moonbase_user",Zo.sessionKey="moonbase_session",Zo.storefrontKey="moonbase_storefront",Zo.utmKey="moonbase_utm";var Dg=Zo;function vd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ni(e){const t=Ce(Kn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function $g(e,t){const n=Ce(Kn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Mn(e)}`,null),o=n.stateFactory(`activation-request-${Mn(e)}-error`,null),s=n.stateFactory(`activation-request-${Mn(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Mn(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Mn(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Mn(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Qt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Ge(()=>Mn(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Qt.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),pa(()=>{l.value&&clearTimeout(l.value)}),Ge(n.currentUser,async()=>{var c,d;const f=Mn(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Qt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Qt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Qt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(Kn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(E=>E.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(E=>E.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(E=>E.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(E=>E.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);if(s)s.quantity+=1;else if(n.type==="bundle")s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else if(n.type==="product")s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else throw new jr("Invalid input",`Could not handle item of type '${n.type}'`);return t.pushOrderContent(),s},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)}return t.pushOrderContent(),n},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=>{var r;const o=typeof window<"u"?window.location.pathname:"",s=new URL((r=n.returnUrl)!=null?r:o,document.baseURI).href,i=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:s},t.hasUtm?t.utm.value:void 0);if(!n.redirect&&i.embeddedCheckoutUrl&&typeof window<"u"){const a=i.embeddedCheckoutUrl;return new Promise(l=>{md(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{l({next:u.detail.next})})})}else{if(n.redirect&&i.checkoutUrl&&typeof window<"u")return window.location.href=i.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Kn);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 Promise.all([t.updateStorefront(),t.surrenderOrder()]),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>(await t.client.identity.confirmEmailChange(n,r),await t.updateUser())}}function Ag(e,t,n){const r={endpoint:e};return new Dg(r,new Qp(r),(o,s)=>P(s))}var yd=!1;function ri(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let Wr,Za;function Mg(){var e;return Wr!==void 0||(typeof window<"u"&&window.performance?(Wr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Wr=!0,Za=globalThis.perf_hooks.performance):Wr=!1),Wr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let qo;const Wo=e=>qo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var un;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(un||(un={}));const Er=typeof window<"u",Ed=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Bg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function oi(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 si=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(si.userAgent)&&/AppleWebKit/.test(si.userAgent)&&!/Safari/.test(si.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in si?Zg:qg:()=>{};function Hg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Od(r.href)?qa(e,t,n):(r.target="_blank",oi(r)):oi(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){oi(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){oi(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function st(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return st("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(st('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),st("Global state copied to clipboard.")}catch(t){if(kd(t))return;st("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),st("Global state pasted from clipboard.")}catch(t){if(kd(t))return;st("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){st("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),st(`Global state imported from "${o.name}".`)}catch(t){st("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",ii="_root";function Yg(e){return Wa(e)?{id:ii,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Qg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case un.direct:return"mutation";case un.patchFunction:return"$patch";case un.patchObject:return"$patch";default:return"unknown"}}let zr=!0;const ai=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,li=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ai,app:e},n=>{typeof n.now!="function"&&st("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?st(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),st(`Store "${r}" reset.`)):st(`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:li(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:li(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===ii?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==ii&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===ii?t:t._s.get(r.nodeId);if(!s)return st(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),zr=!1,r.set(s,i,r.state.value),zr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return st(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return st(`Invalid path for store "${o}":
|
|
13
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const xt=Ev;function uv(e){return cv(e)}function cv(e,t){lv();const n=Fi();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=et,insertStaticContent:y}=e,O=(p,m,C,F=null,j=null,U=null,X=void 0,K=null,z=g.NODE_ENV!=="production"&&Hn?!1:!!m.dynamicChildren)=>{if(p===m)return;p&&!yr(p,m)&&(F=Ei(p),Be(p,j,U,!0),p=null),m.patchFlag===-2&&(z=!1,m.dynamicChildren=null);const{type:B,ref:ve,shapeFlag:ee}=m;switch(B){case jo:b(p,m,C,F);break;case Je:k(p,m,C,F);break;case Lo:p==null?R(m,C,F,X):g.NODE_ENV!=="production"&&T(p,m,C,X);break;case ke:ae(p,m,C,F,j,U,X,K,z);break;default:ee&1?I(p,m,C,F,j,U,X,K,z):ee&6?$e(p,m,C,F,j,U,X,K,z):ee&64||ee&128?B.process(p,m,C,F,j,U,X,K,z,ns):g.NODE_ENV!=="production"&&H("Invalid VNode type:",B,`(${typeof B})`)}ve!=null&&j&&pa(ve,p&&p.ref,U,m||p,!m)},b=(p,m,C,F)=>{if(p==null)r(m.el=a(m.children),C,F);else{const j=m.el=p.el;m.children!==p.children&&u(j,m.children)}},k=(p,m,C,F)=>{p==null?r(m.el=l(m.children||""),C,F):m.el=p.el},R=(p,m,C,F)=>{[p.el,p.anchor]=y(p.children,m,C,F,p.el,p.anchor)},T=(p,m,C,F)=>{if(m.children!==p.children){const j=f(p.anchor);E(p),[m.el,m.anchor]=y(m.children,C,j,F)}else m.el=p.el,m.anchor=p.anchor},P=({el:p,anchor:m},C,F)=>{let j;for(;p&&p!==m;)j=f(p),r(p,C,F),p=j;r(m,C,F)},E=({el:p,anchor:m})=>{let C;for(;p&&p!==m;)C=f(p),o(p),p=C;o(m)},I=(p,m,C,F,j,U,X,K,z)=>{m.type==="svg"?X="svg":m.type==="math"&&(X="mathml"),p==null?D(m,C,F,j,U,X,K,z):L(p,m,j,U,X,K,z)},D=(p,m,C,F,j,U,X,K)=>{let z,B;const{props:ve,shapeFlag:ee,transition:le,dirs:we}=p;if(z=p.el=i(p.type,U,ve&&ve.is,ve),ee&8?c(z,p.children):ee&16&&W(p.children,z,null,F,j,Sa(p,U),X,K),we&&pr(p,null,F,"created"),de(z,p,p.scopeId,X,F),ve){for(const He in ve)He!=="value"&&!yo(He)&&s(z,He,null,ve[He],U,F);"value"in ve&&s(z,"value",null,ve.value,U),(B=ve.onVnodeBeforeMount)&&ln(B,F,p)}g.NODE_ENV!=="production"&&(_s(z,"__vnode",p,!0),_s(z,"__vueParentComponent",F,!0)),we&&pr(p,null,F,"beforeMount");const Pe=dv(j,le);Pe&&le.beforeEnter(z),r(z,m,C),((B=ve&&ve.onVnodeMounted)||Pe||we)&&xt(()=>{B&&ln(B,F,p),Pe&&le.enter(z),we&&pr(p,null,F,"mounted")},j)},de=(p,m,C,F,j)=>{if(C&&h(p,C),F)for(let U=0;U<F.length;U++)h(p,F[U]);if(j){let U=j.subTree;if(g.NODE_ENV!=="production"&&U.patchFlag>0&&U.patchFlag&2048&&(U=Pa(U.children)||U),m===U||Rc(U.type)&&(U.ssContent===m||U.ssFallback===m)){const X=j.vnode;de(p,X,X.scopeId,X.slotScopeIds,j.parent)}}},W=(p,m,C,F,j,U,X,K,z=0)=>{for(let B=z;B<p.length;B++){const ve=p[B]=K?Wn(p[B]):qt(p[B]);O(null,ve,m,C,F,j,U,X,K)}},L=(p,m,C,F,j,U,X)=>{const K=m.el=p.el;g.NODE_ENV!=="production"&&(K.__vnode=m);let{patchFlag:z,dynamicChildren:B,dirs:ve}=m;z|=p.patchFlag&16;const ee=p.props||Le,le=m.props||Le;let we;if(C&&gr(C,!1),(we=le.onVnodeBeforeUpdate)&&ln(we,C,m,p),ve&&pr(m,p,C,"beforeUpdate"),C&&gr(C,!0),g.NODE_ENV!=="production"&&Hn&&(z=0,X=!1,B=null),(ee.innerHTML&&le.innerHTML==null||ee.textContent&&le.textContent==null)&&c(K,""),B?(M(p.dynamicChildren,B,K,C,F,Sa(m,j),U),g.NODE_ENV!=="production"&&Ro(p,m)):X||me(p,m,K,null,C,F,Sa(m,j),U,!1),z>0){if(z&16)V(K,ee,le,C,j);else if(z&2&&ee.class!==le.class&&s(K,"class",null,le.class,j),z&4&&s(K,"style",ee.style,le.style,j),z&8){const Pe=m.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=ee[Me],vt=le[Me];(vt!==$t||Me==="value")&&s(K,Me,$t,vt,j,C)}}z&1&&p.children!==m.children&&c(K,m.children)}else!X&&B==null&&V(K,ee,le,C,j);((we=le.onVnodeUpdated)||ve)&&xt(()=>{we&&ln(we,C,m,p),ve&&pr(m,p,C,"updated")},F)},M=(p,m,C,F,j,U,X)=>{for(let K=0;K<m.length;K++){const z=p[K],B=m[K],ve=z.el&&(z.type===ke||!yr(z,B)||z.shapeFlag&70)?d(z.el):C;O(z,B,ve,null,F,j,U,X,!0)}},V=(p,m,C,F,j)=>{if(m!==C){if(m!==Le)for(const U in m)!yo(U)&&!(U in C)&&s(p,U,m[U],null,j,F);for(const U in C){if(yo(U))continue;const X=C[U],K=m[U];X!==K&&U!=="value"&&s(p,U,K,X,j,F)}"value"in C&&s(p,"value",m.value,C.value,j)}},ae=(p,m,C,F,j,U,X,K,z)=>{const B=m.el=p?p.el:a(""),ve=m.anchor=p?p.anchor:a("");let{patchFlag:ee,dynamicChildren:le,slotScopeIds:we}=m;g.NODE_ENV!=="production"&&(Hn||ee&2048)&&(ee=0,z=!1,le=null),we&&(K=K?K.concat(we):we),p==null?(r(B,C,F),r(ve,C,F),W(m.children||[],C,ve,j,U,X,K,z)):ee>0&&ee&64&&le&&p.dynamicChildren?(M(p.dynamicChildren,le,C,j,U,X,K),g.NODE_ENV!=="production"?Ro(p,m):(m.key!=null||j&&m===j.subTree)&&Ro(p,m,!0)):me(p,m,C,ve,j,U,X,K,z)},$e=(p,m,C,F,j,U,X,K,z)=>{m.slotScopeIds=K,p==null?m.shapeFlag&512?j.ctx.activate(m,C,F,X,z):N(m,C,F,j,U,X,z):A(p,m,z)},N=(p,m,C,F,j,U,X)=>{const K=p.component=Tv(p,F,j);if(g.NODE_ENV!=="production"&&K.type.__hmrId&&sm(K),g.NODE_ENV!=="production"&&(As(p),On(K,"mount")),Io(p)&&(K.ctx.renderer=ns),g.NODE_ENV!=="production"&&On(K,"init"),Dv(K,!1,X),g.NODE_ENV!=="production"&&Nn(K,"init"),K.asyncDep){if(j&&j.registerDep(K,Q,X),!p.el){const z=K.subTree=q(Je);k(null,z,m,C)}}else Q(K,p,m,C,j,U,X);g.NODE_ENV!=="production"&&(Vs(),Nn(K,"mount"))},A=(p,m,C)=>{const F=m.component=p.component;if(_v(p,m,C))if(F.asyncDep&&!F.asyncResolved){g.NODE_ENV!=="production"&&As(m),re(F,m,C),g.NODE_ENV!=="production"&&Vs();return}else F.next=m,F.update();else m.el=p.el,F.vnode=m},Q=(p,m,C,F,j,U,X)=>{const K=()=>{if(p.isMounted){let{next:ee,bu:le,u:we,parent:Pe,vnode:He}=p;{const It=Tc(p);if(It){ee&&(ee.el=He.el,re(p,ee,X)),It.asyncDep.then(()=>{p.isUnmounted||K()});return}}let Me=ee,$t;g.NODE_ENV!=="production"&&As(ee||p.vnode),gr(p,!1),ee?(ee.el=He.el,re(p,ee,X)):ee=He,le&&bo(le),($t=ee.props&&ee.props.onVnodeBeforeUpdate)&&ln($t,Pe,ee,He),gr(p,!0),g.NODE_ENV!=="production"&&On(p,"render");const vt=Ta(p);g.NODE_ENV!=="production"&&Nn(p,"render");const Gt=p.subTree;p.subTree=vt,g.NODE_ENV!=="production"&&On(p,"patch"),O(Gt,vt,d(Gt.el),Ei(Gt),p,j,U),g.NODE_ENV!=="production"&&Nn(p,"patch"),ee.el=vt.el,Me===null&&wv(p,vt.el),we&&xt(we,j),($t=ee.props&&ee.props.onVnodeUpdated)&&xt(()=>ln($t,Pe,ee,He),j),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&Vs()}else{let ee;const{el:le,props:we}=m,{bm:Pe,m:He,parent:Me,root:$t,type:vt}=p,Gt=Zr(m);if(gr(p,!1),Pe&&bo(Pe),!Gt&&(ee=we&&we.onVnodeBeforeMount)&&ln(ee,Me,m),gr(p,!0),le&&Pf){const It=()=>{g.NODE_ENV!=="production"&&On(p,"render"),p.subTree=Ta(p),g.NODE_ENV!=="production"&&Nn(p,"render"),g.NODE_ENV!=="production"&&On(p,"hydrate"),Pf(le,p.subTree,p,j,null),g.NODE_ENV!=="production"&&Nn(p,"hydrate")};Gt&&vt.__asyncHydrate?vt.__asyncHydrate(le,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(vt),g.NODE_ENV!=="production"&&On(p,"render");const It=p.subTree=Ta(p);g.NODE_ENV!=="production"&&Nn(p,"render"),g.NODE_ENV!=="production"&&On(p,"patch"),O(null,It,C,F,p,j,U),g.NODE_ENV!=="production"&&Nn(p,"patch"),m.el=It.el}if(He&&xt(He,j),!Gt&&(ee=we&&we.onVnodeMounted)){const It=m;xt(()=>ln(ee,Me,It),j)}(m.shapeFlag&256||Me&&Zr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&xt(p.a,j),p.isMounted=!0,g.NODE_ENV!=="production"&&dm(p),m=C=F=null}};p.scope.on();const z=p.effect=new au(K);p.scope.off();const B=p.update=z.run.bind(z),ve=p.job=z.runIfDirty.bind(z);ve.i=p,ve.id=p.uid,z.scheduler=()=>Rs(ve),gr(p,!0),g.NODE_ENV!=="production"&&(z.onTrack=p.rtc?ee=>bo(p.rtc,ee):void 0,z.onTrigger=p.rtg?ee=>bo(p.rtg,ee):void 0),B()},re=(p,m,C)=>{m.component=p;const F=p.vnode.props;p.vnode=m,p.next=null,Ym(p,m.props,F,C),av(p,m.children,C),yn(),Lu(p),bn()},me=(p,m,C,F,j,U,X,K,z=!1)=>{const B=p&&p.children,ve=p?p.shapeFlag:0,ee=m.children,{patchFlag:le,shapeFlag:we}=m;if(le>0){if(le&128){Fe(B,ee,C,F,j,U,X,K,z);return}else if(le&256){oe(B,ee,C,F,j,U,X,K,z);return}}we&8?(ve&16&&ts(B,j,U),ee!==B&&c(C,ee)):ve&16?we&16?Fe(B,ee,C,F,j,U,X,K,z):ts(B,j,U,!0):(ve&8&&c(C,""),we&16&&W(ee,C,F,j,U,X,K,z))},oe=(p,m,C,F,j,U,X,K,z)=>{p=p||Mr,m=m||Mr;const B=p.length,ve=m.length,ee=Math.min(B,ve);let le;for(le=0;le<ee;le++){const we=m[le]=z?Wn(m[le]):qt(m[le]);O(p[le],we,C,null,j,U,X,K,z)}B>ve?ts(p,j,U,!0,!1,ee):W(m,C,F,j,U,X,K,z,ee)},Fe=(p,m,C,F,j,U,X,K,z)=>{let B=0;const ve=m.length;let ee=p.length-1,le=ve-1;for(;B<=ee&&B<=le;){const we=p[B],Pe=m[B]=z?Wn(m[B]):qt(m[B]);if(yr(we,Pe))O(we,Pe,C,null,j,U,X,K,z);else break;B++}for(;B<=ee&&B<=le;){const we=p[ee],Pe=m[le]=z?Wn(m[le]):qt(m[le]);if(yr(we,Pe))O(we,Pe,C,null,j,U,X,K,z);else break;ee--,le--}if(B>ee){if(B<=le){const we=le+1,Pe=we<ve?m[we].el:F;for(;B<=le;)O(null,m[B]=z?Wn(m[B]):qt(m[B]),C,Pe,j,U,X,K,z),B++}}else if(B>le)for(;B<=ee;)Be(p[B],j,U,!0),B++;else{const we=B,Pe=B,He=new Map;for(B=Pe;B<=le;B++){const Ot=m[B]=z?Wn(m[B]):qt(m[B]);Ot.key!=null&&(g.NODE_ENV!=="production"&&He.has(Ot.key)&&H("Duplicate keys found during update:",JSON.stringify(Ot.key),"Make sure keys are unique."),He.set(Ot.key,B))}let Me,$t=0;const vt=le-Pe+1;let Gt=!1,It=0;const rs=new Array(vt);for(B=0;B<vt;B++)rs[B]=0;for(B=we;B<=ee;B++){const Ot=p[B];if($t>=vt){Be(Ot,j,U,!0);continue}let pn;if(Ot.key!=null)pn=He.get(Ot.key);else for(Me=Pe;Me<=le;Me++)if(rs[Me-Pe]===0&&yr(Ot,m[Me])){pn=Me;break}pn===void 0?Be(Ot,j,U,!0):(rs[pn-Pe]=B+1,pn>=It?It=pn:Gt=!0,O(Ot,m[pn],C,null,j,U,X,K,z),$t++)}const Df=Gt?fv(rs):Mr;for(Me=Df.length-1,B=vt-1;B>=0;B--){const Ot=Pe+B,pn=m[Ot],$f=Ot+1<ve?m[Ot+1].el:F;rs[B]===0?O(null,pn,C,$f,j,U,X,K,z):Gt&&(Me<0||B!==Df[Me]?mt(pn,C,$f,2):Me--)}}},mt=(p,m,C,F,j=null)=>{const{el:U,type:X,transition:K,children:z,shapeFlag:B}=p;if(B&6){mt(p.component.subTree,m,C,F);return}if(B&128){p.suspense.move(m,C,F);return}if(B&64){X.move(p,m,C,ns);return}if(X===ke){r(U,m,C);for(let ee=0;ee<z.length;ee++)mt(z[ee],m,C,F);r(p.anchor,m,C);return}if(X===Lo){P(p,m,C);return}if(F!==2&&B&1&&K)if(F===0)K.beforeEnter(U),r(U,m,C),xt(()=>K.enter(U),j);else{const{leave:ee,delayLeave:le,afterLeave:we}=K,Pe=()=>r(U,m,C),He=()=>{ee(U,()=>{Pe(),we&&we()})};le?le(U,Pe,He):He()}else r(U,m,C)},Be=(p,m,C,F=!1,j=!1)=>{const{type:U,props:X,ref:K,children:z,dynamicChildren:B,shapeFlag:ve,patchFlag:ee,dirs:le,cacheIndex:we}=p;if(ee===-2&&(j=!1),K!=null&&pa(K,null,C,p,!0),we!=null&&(m.renderCache[we]=void 0),ve&256){m.ctx.deactivate(p);return}const Pe=ve&1&&le,He=!Zr(p);let Me;if(He&&(Me=X&&X.onVnodeBeforeUnmount)&&ln(Me,m,p),ve&6)Tw(p.component,C,F);else{if(ve&128){p.suspense.unmount(C,F);return}Pe&&pr(p,null,m,"beforeUnmount"),ve&64?p.type.remove(p,m,C,ns,F):B&&!B.hasOnce&&(U!==ke||ee>0&&ee&64)?ts(B,m,C,!1,!0):(U===ke&&ee&384||!j&&ve&16)&&ts(z,m,C),F&&St(p)}(He&&(Me=X&&X.onVnodeUnmounted)||Pe)&&xt(()=>{Me&&ln(Me,m,p),Pe&&pr(p,null,m,"unmounted")},C)},St=p=>{const{type:m,el:C,anchor:F,transition:j}=p;if(m===ke){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&j&&!j.persisted?p.children.forEach(X=>{X.type===Je?o(X.el):St(X)}):nr(C,F);return}if(m===Lo){E(p);return}const U=()=>{o(C),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(p.shapeFlag&1&&j&&!j.persisted){const{leave:X,delayLeave:K}=j,z=()=>X(C,U);K?K(p.el,U,z):z()}else U()},nr=(p,m)=>{let C;for(;p!==m;)C=f(p),o(p),p=C;o(m)},Tw=(p,m,C)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&im(p);const{bum:F,scope:j,job:U,subTree:X,um:K,m:z,a:B}=p;Pc(z),Pc(B),F&&bo(F),j.stop(),U&&(U.flags|=8,Be(X,p,m,C)),K&&xt(K,m),xt(()=>{p.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve()),g.NODE_ENV!=="production"&&pm(p)},ts=(p,m,C,F=!1,j=!1,U=0)=>{for(let X=U;X<p.length;X++)Be(p[X],m,C,F,j)},Ei=p=>{if(p.shapeFlag&6)return Ei(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const m=f(p.anchor||p.el),C=m&&m[Ku];return C?f(C):m};let ml=!1;const Cf=(p,m,C)=>{p==null?m._vnode&&Be(m._vnode,null,null,!0):O(m._vnode||null,p,m,null,null,null,C),m._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ns={p:O,um:Be,m:mt,r:St,mt:N,mc:W,pc:me,pbc:M,n:Ei,o:e};let Tf,Pf;return{render:Cf,hydrate:Tf,createApp:zm(Cf,Tf)}}function Sa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function dv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(ue(r)&&ue(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]=Wn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Je&&!a.el&&(a.el=i.el)}}function fv(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 Tc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Tc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const pv=Symbol.for("v-scx"),hv=()=>{{const e=Se(pv);return e||g.NODE_ENV!=="production"&&H("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function pt(e,t){return ka(e,null,t)}function Ge(e,t,n){return g.NODE_ENV!=="production"&&!fe(t)&&H("`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."),ka(e,t,n)}function ka(e,t,n=Le){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&H('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&H('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&H('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=H);let l;if(Ys)if(s==="sync"){const f=hv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:et,resume:et,pause:et};const u=Xe;a.call=(f,h,y)=>Ht(f,u,h,y);let c=!1;s==="post"?a.scheduler=f=>{xt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,h)=>{h?f():Rs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Jh(e,t,a);return l&&l.push(d),d}function mv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;fe(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=ka(o,s.bind(r),n);return i(),a}function Dc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const vv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Tt(t)}Modifiers`]||e[`${gn(t)}Modifiers`];function gv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Le;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Tt(t))in d))&&H(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Tt(t))}" prop.`);else{const f=c[t];fe(f)&&(f(...n)||H(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&vv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(ih))),g.NODE_ENV!=="production"&&vm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&H(`Event "${c}" is emitted in component ${Xs(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 "${gn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Tt(t))];!l&&s&&(l=r[a=lr(gn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!fe(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(ue(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Ws(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,gn(t))||De(e,t))}let Ca=!1;function zs(){Ca=!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:h,ctx:y,inheritAttrs:O}=e,b=Ms(e);let k,R;g.NODE_ENV!=="production"&&(Ca=!1);try{if(n.shapeFlag&4){const E=o||r,I=g.NODE_ENV!=="production"&&h.__isScriptSetup?new Proxy(E,{get(D,de,W){return H(`Property '${String(de)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(D,de,W)}}):E;k=qt(u.call(I,E,c,g.NODE_ENV!=="production"?nn(d):d,h,f,y)),R=a}else{const E=t;g.NODE_ENV!=="production"&&a===d&&zs(),k=qt(E.length>1?E(g.NODE_ENV!=="production"?nn(d):d,g.NODE_ENV!=="production"?{get attrs(){return zs(),nn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):E(g.NODE_ENV!=="production"?nn(d):d,null)),R=t.props?a:yv(a)}}catch(E){Mo.length=0,So(E,e,1),k=q(Je)}let T=k,P;if(g.NODE_ENV!=="production"&&k.patchFlag>0&&k.patchFlag&2048&&([T,P]=Ic(k)),R&&O!==!1){const E=Object.keys(R),{shapeFlag:I}=T;if(E.length){if(I&7)s&&E.some(gs)&&(R=bv(R,s)),T=Zt(T,R,!1,!0);else if(g.NODE_ENV!=="production"&&!Ca&&T.type!==Je){const D=Object.keys(a),de=[],W=[];for(let L=0,M=D.length;L<M;L++){const V=D[L];go(V)?gs(V)||de.push(V[2].toLowerCase()+V.slice(3)):W.push(V)}W.length&&H(`Extraneous non-props attributes (${W.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),de.length&&H(`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"&&!Ac(T)&&H("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(T)&&H("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&P?P(T):k=T,Ms(b),k}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Pa(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function Pa(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(qr(o)){if(o.type!==Je||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Pa(n.children)}}else return}return n}const yv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},bv=(e,t)=>{const n={};for(const r in e)(!gs(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Je;function _v(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)&&Hn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Ws(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Ws(n,s))return!0}return!1}function wv({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Rc=e=>e.__isSuspense;function Ev(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const ke=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Je=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function _(e=!1){Mo.push(Pt=e?null:[])}function Ov(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Mr:null,Ov(),Uo>0&&Pt&&Pt.push(e),e}function S(e,t,n,r,o,s){return Lc(x(e,t,n,r,o,s,!0))}function xe(e,t,n,r,o){return Lc(q(e,t,n,r,o,!0))}function qr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=js.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 Nv=(...e)=>Uc(...e),Mc=({key:e})=>e??null,Ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||fe(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function x(e,t=null,n=null,r=0,o=null,s=e===ke?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Ks(t),scopeId:Wu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:nt};return a?(Da(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&H("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const q=g.NODE_ENV!=="production"?Nv:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&H(`Invalid vnode type when creating vnode: ${e}.`),e=Je),qr(e)){const a=Zt(e,t,!0);return n&&Da(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=xv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=ws(a)),Ie(l)&&(xo(l)&&!ue(l)&&(l=Ke({},l)),t.style=Bi(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:fe(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&xo(e)&&(e=ye(e),H("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
14
|
+
Component that was made reactive: `,e)),x(e,t,n,r,o,i,s,!0)}function xv(e){return e?xo(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?$a(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?ue(s)?s.concat(Ks(t)):[s,Ks(t)]:Ks(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ue(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ke?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return ue(e.children)&&(t.children=e.children.map(Fc)),t}function Ce(e=" ",t=0){return q(jo,null,e,t)}function Sv(e,t){const n=q(Lo,null,e);return n.staticCount=t,n}function ce(e="",t=!1){return t?(_(),xe(Je,null,e)):q(Je,null,e)}function qt(e){return e==null||typeof e=="boolean"?q(Je):ue(e)?q(ke,null,e.slice()):typeof e=="object"?Wn(e):q(jo,null,String(e))}function Wn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Da(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ue(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Da(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!bc(t)?t._ctx=nt:o===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),r&64?(n=16,t=[Ce(t)]):n=8);e.children=t,e.shapeFlag|=n}function $a(...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=ws([t.class,r.class]));else if(o==="style")t.style=Bi([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(ue(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function ln(e,t,n,r=null){Ht(e,t,7,[n,r])}const kv=vc();let Cv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||kv,s={uid:Cv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:Le,inheritAttrs:r.inheritAttrs,ctx:Le,data:Le,props:Le,attrs:Le,slots:Le,refs:Le,setupState:Le,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=jm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=gv.bind(null,s),e.ce&&e.ce(s),s}let Xe=null;const Gs=()=>Xe||nt;let Js,Ia;{const e=Fi(),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)}};Js=t("__VUE_INSTANCE_SETTERS__",n=>Xe=n),Ia=t("__VUE_SSR_SETTERS__",n=>Ys=n)}const Fo=e=>{const t=Xe;return Js(e),e.scope.on(),()=>{e.scope.off(),Js(t)}},Bc=()=>{Xe&&Xe.scope.off(),Js(null)},Pv=vn("slot,component");function Aa(e,{isNativeTag:t}){(Pv(e)||t(e))&&H("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Ys=!1;function Dv(e,t=!1,n=!1){t&&Ia(t);const{props:r,children:o}=e.vnode,s=Hc(e);Gm(e,r,s,t),iv(e,o,n);const i=s?$v(e,t):void 0;return t&&Ia(!1),i}function $v(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&Aa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)Aa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)zu(s[i])}r.compilerOptions&&Iv()&&H('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cc),g.NODE_ENV!=="production"&&Lm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Vv(e):null,i=Fo(e);yn();const a=Fr(o,e,0,[g.NODE_ENV!=="production"?nn(e.props):e.props,s]);if(bn(),i(),Li(a)){if(Zr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(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";H(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&qr(t)&&H("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Mm(e)):g.NODE_ENV!=="production"&&t!==void 0&&H(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Va;const Iv=()=>!Va;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Va&&!r.render){const o=r.template||wa(e).template;if(o){g.NODE_ENV!=="production"&&On(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Va(o,u),g.NODE_ENV!=="production"&&Nn(e,"compile")}}e.render=r.render||et}{const o=Fo(e);yn();try{Fm(e)}finally{bn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===et&&!t&&(r.template?H('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".'):H("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return zs(),tt(e,"get",""),e[t]},set(){return H("setupContext.attrs is readonly."),!1},deleteProperty(){return H("setupContext.attrs is readonly."),!1}}:{get(e,t){return tt(e,"get",""),e[t]}};function Av(e){return new Proxy(e.slots,{get(t,n){return tt(e,"get","$slots"),t[n]}})}function Vv(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&H("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ue(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&H(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Wc))},get slots(){return r||(r=Av(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Ra(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(Mn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Rv=/(?:^|[-_])(\w)/g,jv=e=>e.replace(Rv,t=>t.toUpperCase()).replace(/[-_]/g,"");function ja(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Xs(e,t,n=!1){let r=ja(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?jv(r):n?"App":"Anonymous"}function zc(e){return fe(e)&&"__vccOpts"in e}const J=(e,t)=>{const n=Kh(e,t,Ys);if(g.NODE_ENV!=="production"){const r=Gs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!ue(t)?qr(t)?q(e,null,[t]):q(e,t):q(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&qr(n)&&(n=[n]),q(e,t,n))}function Lv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:rn(d)?["div",{},["span",e,Nt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${wn(d)?" (readonly)":""}`]:wn(d)?["div",{},["span",e,Nt(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==Le&&f.push(i("setup",d.setupState)),d.data!==Le&&f.push(i("data",ye(d.data)));const h=l(d,"computed");h&&f.push(i("computed",h));const y=l(d,"inject");return y&&f.push(i("injected",y)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(h=>["div",{},["span",r,h+": "],a(f[h],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const h=d.type;if(fe(h))return;const y={};for(const O in d.ctx)u(h,O,f)&&(y[O]=d.ctx[O]);return y}function u(d,f,h){const y=d[h];if(ue(y)&&y.includes(f)||Ie(y)&&f in y||d.extends&&u(d.extends,f,h)||d.mixins&&d.mixins.some(O=>u(O,f,h)))return!0}function c(d){return Nt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",xn=g.NODE_ENV!=="production"?H:et;var un={};let La;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{La=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){un.NODE_ENV!=="production"&&xn(`Error creating trusted types policy: ${e}`)}const Jc=La?e=>La.createHTML(e):e=>e,Mv="http://www.w3.org/2000/svg",Uv="http://www.w3.org/1998/Math/MathML",Sn=typeof document<"u"?document:null,Yc=Sn&&Sn.createElement("template"),Fv={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"?Sn.createElementNS(Mv,e):t==="mathml"?Sn.createElementNS(Uv,e):n?Sn.createElement(e,{is:n}):Sn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Sn.createTextNode(e),createComment:e=>Sn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},zn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Bv=Ke({},Qu,Xc),Ma=(e=>(e.displayName="Transition",e.props=Bv,e))((e,{slots:t})=>Ue(Om,Hv(e),t)),br=(e,t=[])=>{ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Hv(e){const t={};for(const V in e)V in Xc||(t[V]=e[V]);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:h=`${n}-leave-to`}=e,y=Zv(o),O=y&&y[0],b=y&&y[1],{onBeforeEnter:k,onEnter:R,onEnterCancelled:T,onLeave:P,onLeaveCancelled:E,onBeforeAppear:I=k,onAppear:D=R,onAppearCancelled:de=T}=t,W=(V,ae,$e)=>{_r(V,ae?c:a),_r(V,ae?u:i),$e&&$e()},L=(V,ae)=>{V._isLeaving=!1,_r(V,d),_r(V,h),_r(V,f),ae&&ae()},M=V=>(ae,$e)=>{const N=V?D:R,A=()=>W(ae,V,$e);br(N,[ae,A]),ed(()=>{_r(ae,V?l:s),Kn(ae,V?c:a),Qc(N)||td(ae,r,O,A)})};return Ke(t,{onBeforeEnter(V){br(k,[V]),Kn(V,s),Kn(V,i)},onBeforeAppear(V){br(I,[V]),Kn(V,l),Kn(V,u)},onEnter:M(!1),onAppear:M(!0),onLeave(V,ae){V._isLeaving=!0;const $e=()=>L(V,ae);Kn(V,d),Kn(V,f),zv(),ed(()=>{V._isLeaving&&(_r(V,d),Kn(V,h),Qc(P)||td(V,r,b,$e))}),br(P,[V,$e])},onEnterCancelled(V){W(V,!1),br(T,[V])},onAppearCancelled(V){W(V,!0),br(de,[V])},onLeaveCancelled(V){L(V),br(E,[V])}})}function Zv(e){if(e==null)return null;if(Ie(e))return[Ua(e.enter),Ua(e.leave)];{const t=Ua(e);return[t,t]}}function Ua(e){const t=ah(e);return un.NODE_ENV!=="production"&&tm(t,"<transition> explicit duration"),t}function Kn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let qv=0;function td(e,t,n,r){const o=e._endId=++qv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=Wv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function Wv(e,t){const n=window.getComputedStyle(e),r=y=>(n[y]||"").split(", "),o=r(`${zn}Delay`),s=r(`${zn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===zn?i>0&&(c=zn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?zn:Bo:null,f=c?c===zn?s.length:l.length:0);const h=c===zn&&/\b(transform|all)(,|$)/.test(r(`${zn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function zv(){return document.body.offsetHeight}function Kv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Gv=Symbol("_vsh"),Jv=Symbol(un.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Yv=/(^|;)\s*display\s*:/;function Xv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Qs(r,a,"")}else for(const i in t)n[i]==null&&Qs(r,i,"");for(const i in n)i==="display"&&(s=!0),Qs(r,i,n[i])}else if(o){if(t!==n){const i=r[Jv];i&&(n+=";"+i),r.cssText=n,s=Yv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Gv]&&(r.display="none"))}const Qv=/[^\\];\s*$/,sd=/\s*!important$/;function Qs(e,t,n){if(ue(n))n.forEach(r=>Qs(e,t,r));else if(n==null&&(n=""),un.NODE_ENV!=="production"&&Qv.test(n)&&xn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=eg(e,t);sd.test(n)?e.setProperty(gn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Fa={};function eg(e,t){const n=Fa[t];if(n)return n;let r=Tt(t);if(r!=="filter"&&r in e)return Fa[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Fa[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=yh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Rn(n)?String(n):n)}function tg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){un.NODE_ENV!=="production"&&!s&&xn(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function ng(e,t,n,r){e.addEventListener(t,n,r)}function rg(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function og(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=un.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=sg(t);if(r){const u=s[t]=lg(un.NODE_ENV!=="production"?dd(r,t):r,o);ng(e,a,u,l)}else i&&(rg(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function sg(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):gn(e.slice(2)),t]}let Ba=0;const ig=Promise.resolve(),ag=()=>Ba||(ig.then(()=>Ba=0),Ba=Date.now());function lg(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(ug(r,n.value),t,5,[r])};return n.value=e,n.attached=ag(),n}function dd(e,t){return fe(e)||ue(e)?e:(xn(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
15
|
+
Expected function or array of functions, received type ${typeof e}.`),et)}function ug(e,t){if(ue(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cg=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?Kv(e,r,i):t==="style"?Xv(e,n,r):go(t)?gs(t)||og(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):dg(e,t,r,i))?(tg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function dg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(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 fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const fg=["ctrl","shift","alt","meta"],pg={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)=>fg.some(n=>e[`${n}Key`]&&!t.includes(n))},hg=(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=pg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},mg=Ke({patchProp:cg},Fv);let pd;function vg(){return pd||(pd=uv(mg))}const gg=(...e)=>{const t=vg().createApp(...e);un.NODE_ENV!=="production"&&(bg(t),_g(t));const{mount:n}=t;return t.mount=r=>{const o=wg(r);if(!o)return;const s=t._component;!fe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,yg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function yg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>mh(t)||vh(t)||gh(t),writable:!1})}function _g(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){xn("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 xn(r),n},set(){xn(r)}})}}function wg(e){if(Ze(e)){const t=document.querySelector(e);return un.NODE_ENV!=="production"&&!t&&xn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return un.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&xn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var Eg={};function Og(){Lv()}Eg.NODE_ENV!=="production"&&Og();let ei;const Ng=new Uint8Array(16);function xg(){if(!ei&&(ei=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ei))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ei(Ng)}const it=[];for(let e=0;e<256;++e)it.push((e+256).toString(16).slice(1));function Sg(e,t=0){return it[e[t+0]]+it[e[t+1]]+it[e[t+2]]+it[e[t+3]]+"-"+it[e[t+4]]+it[e[t+5]]+"-"+it[e[t+6]]+it[e[t+7]]+"-"+it[e[t+8]]+it[e[t+9]]+"-"+it[e[t+10]]+it[e[t+11]]+it[e[t+12]]+it[e[t+13]]+it[e[t+14]]+it[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ti(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||xg)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var cn=Symbol("storefront");function kg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Cg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Pg=v.discriminatedUnion("event",[Cg,Tg]);function Dg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Pg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Zo=class Ye{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=$(null),this.loadedUser=$(!1),this.debouncedPushOrderContent=kg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=$({id:ti(),status:Lr.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(Ye.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Ye.storefrontKey}_loaded`,!1),this.utm=r(Ye.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(Ye.utmKey,{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}),this.hasUtm&&t.persistUtm)localStorage.setItem(Ye.utmKey,JSON.stringify(this.utm.value));else if(t.persistUtm){const l=localStorage.getItem(Ye.utmKey);if(l)try{this.utm=r(Ye.utmKey,JSON.parse(l))}catch{}}const i=localStorage.getItem(Ye.sessionKey);i?(this.currentOrder=$(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=$({id:ti(),status:Lr.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtm&&this.pushOrderContent());const a=localStorage.getItem(Ye.storefrontKey);if(a?(this.storefront=r(Ye.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${Ye.storefrontKey}_loaded`,!0)):(this.storefront=r(Ye.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Ye.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([h])=>!h.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const h of Object.keys(d))f.searchParams.append(h,d[h]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Ge(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get hasUtm(){return!!this.utm.value&&Object.values(this.utm.value).some(t=>!!t)}get loadedUserPromise(){return new Promise(t=>{Ge(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Dg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(cn,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 Di||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(Ye.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(Ye.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){var n;switch(t.key){case Ye.sessionKey:this.currentOrder.value=t.newValue?JSON.parse(t.newValue):{id:ti(),currency:((n=this.storefront.value)==null?void 0:n.suggestedCurrency)||"",status:Lr.Open,items:[],couponsApplied:[]};break;case Ye.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break;case Ye.utmKey:this.utm.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==Lr.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(Ye.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:ti(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Lr.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(Ye.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof Vn)return;console.warn("Could not surrender order:",t)}}};Zo.userKey="moonbase_user",Zo.sessionKey="moonbase_session",Zo.storefrontKey="moonbase_storefront",Zo.utmKey="moonbase_utm";var $g=Zo;function vd(e,t){const n=t??Se(cn);if(!n)throw new Error("No storefront configured");return J(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function Ig(e){const t=Se(cn);if(!t)throw new Error("No storefront configured");return J(()=>t.storefront.value.bundles)}function gd(e,t){const n=t??Se(cn);if(!n)throw new Error("No storefront configured");return J(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Ag(e){const t=Se(cn);if(!t)throw new Error("No storefront configured");return J(()=>t.storefront.value.products)}function ni(e){const t=Se(cn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function Vg(e,t){const n=Se(cn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Un(e)}`,null),o=n.stateFactory(`activation-request-${Un(e)}-error`,null),s=n.stateFactory(`activation-request-${Un(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Un(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Un(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Un(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=en.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Ge(()=>Un(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===en.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),ha(()=>{l.value&&clearTimeout(l.value)}),Ge(n.currentUser,async()=>{var c,d;const f=Un(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===en.Fulfilled&&(a.value=!0,u())}catch(h){o.value=h}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:J(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===en.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===en.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Rg(e){const t=Se(cn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof Vn?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Vn?new Error("Voucher code invalid"):r}}}}function ri(e){const t=e??Se(cn);if(!t)throw new Error("No storefront configured");return{items:J(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:J(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:J(()=>{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 h=t.storefront.value.products.find(b=>b.id===s.productId),O=((h==null?void 0:h.variations)||[]).find(b=>b.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=h==null?void 0:h.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const h=t.storefront.value.bundles.find(b=>b.id===s.bundleId),O=((h==null?void 0:h.variations)||[]).find(b=>b.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=h==null?void 0:h.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=w(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);if(s)s.quantity+=1;else if(n.type==="bundle")s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else if(n.type==="product")s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else throw new jr("Invalid input",`Could not handle item of type '${n.type}'`);return t.pushOrderContent(),s},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)}return t.pushOrderContent(),n},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=>{var r;const o=typeof window<"u"?window.location.pathname:"",s=new URL((r=n.returnUrl)!=null?r:o,document.baseURI).href,i=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:s},t.hasUtm?t.utm.value:void 0);if(!n.redirect&&i.embeddedCheckoutUrl&&typeof window<"u"){const a=i.embeddedCheckoutUrl;return new Promise(l=>{md(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{l({next:u.detail.next})})})}else{if(n.redirect&&i.checkoutUrl&&typeof window<"u")return window.location.href=i.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function wt(e){const t=e??Se(cn);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 Promise.all([t.updateStorefront(),t.surrenderOrder()]),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>(await t.client.identity.confirmEmailChange(n,r),await t.updateUser())}}function jg(e,t,n){const r={endpoint:e};return new $g(r,new eh(r),(o,s)=>$(s))}var yd=!1;function oi(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Lg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Mg=typeof Proxy=="function",Ug="devtools-plugin:setup",Fg="plugin:settings:set";let Wr,Za;function Bg(){var e;return Wr!==void 0||(typeof window<"u"&&window.performance?(Wr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Wr=!0,Za=globalThis.perf_hooks.performance):Wr=!1),Wr}function Hg(){return Bg()?Za.now():Date.now()}class Zg{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 Hg()}},n&&n.on(Fg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _d(e,t){const n=e,r=bd(),o=Lg(),s=Mg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Ug,e,t);else{const i=s?new Zg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let qo;const Wo=e=>qo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var dn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(dn||(dn={}));const Er=typeof window<"u",Ed=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function qg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){xd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function si(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 ii=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(ii.userAgent)&&/AppleWebKit/.test(ii.userAgent)&&!/Safari/.test(ii.userAgent),xd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Wg:"msSaveOrOpenBlob"in ii?zg:Kg:()=>{};function Wg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Od(r.href)?qa(e,t,n):(r.target="_blank",si(r)):si(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){si(r)},0))}function zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){si(r)})}else navigator.msSaveOrOpenBlob(qg(e,n),t)}function Kg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function st(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function Sd(){if(!("clipboard"in navigator))return st("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(st('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Gg(e){if(!Sd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),st("Global state copied to clipboard.")}catch(t){if(kd(t))return;st("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Jg(e){if(!Sd())try{Cd(e,JSON.parse(await navigator.clipboard.readText())),st("Global state pasted from clipboard.")}catch(t){if(kd(t))return;st("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Yg(e){try{xd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){st("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let kn;function Xg(){kn||(kn=document.createElement("input"),kn.type="file",kn.accept=".json");function e(){return new Promise((t,n)=>{kn.onchange=async()=>{const r=kn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},kn.oncancel=()=>t(null),kn.onerror=n,kn.click()})}return e}async function Qg(e){try{const n=await Xg()();if(!n)return;const{text:r,file:o}=n;Cd(e,JSON.parse(r)),st(`Global state imported from "${o.name}".`)}catch(t){st("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Cd(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Td="🍍 Pinia (root)",ai="_root";function ey(e){return Wa(e)?{id:ai,label:Td}:{id:e.$id,label:e.$id}}function ty(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function ny(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ry(e){switch(e){case dn.direct:return"mutation";case dn.patchFunction:return"$patch";case dn.patchObject:return"$patch";default:return"unknown"}}let zr=!0;const li=[],Or="pinia:mutations",ht="pinia",{assign:oy}=Object,ui=e=>"🍍 "+e;function sy(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:li,app:e},n=>{typeof n.now!="function"&&st("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:ht,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Gg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Jg(t),n.sendInspectorTree(ht),n.sendInspectorState(ht)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Yg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Qg(t),n.sendInspectorTree(ht),n.sendInspectorState(ht)},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"?st(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),st(`Store "${r}" reset.`)):st(`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:ui(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ui(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===ht){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()):Td.toLowerCase().includes(r.filter.toLowerCase())):o).map(ey)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===ht){const o=r.nodeId===ai?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==ai&&(globalThis.$store=ye(o)),r.state=ty(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===ht){const s=r.nodeId===ai?t:t._s.get(r.nodeId);if(!s)return st(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),zr=!1,r.set(s,i,r.state.value),zr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return st(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return st(`Invalid path for store "${o}":
|
|
16
16
|
${i}
|
|
17
|
-
Only state can be modified.`);i[0]="$state",zr=!1,r.set(s,i,r.state.value),zr=!0}})})}function
|
|
17
|
+
Only state can be modified.`);i[0]="$state",zr=!1,r.set(s,i,r.state.value),zr=!0}})})}function iy(e,t){li.includes(ui(t.$id))||li.push(ui(t.$id)),_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:li,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=Pd++;n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Ge(()=>w(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(ht),zr&&n.addTimelineEvent({layerId:Or,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Gn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(ht),!zr)return;const u={time:r(),title:ry(a),data:oy({store:Wt(t.$id)},ny(i)),groupId:Gn};a===dn.patchFunction?u.subtitle="⤵️":a===dn.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Or,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Mn(i=>{o(i),n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(ht),n.sendInspectorState(ht)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(ht),n.sendInspectorState(ht),n.getSettings().logStoreChanges&&st(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(ht),n.sendInspectorState(ht),n.getSettings().logStoreChanges&&st(`"${t.$id}" store installed 🆕`)})}let Pd=0,Gn;function Dd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=Pd,i=n?new Proxy(e,{get(...l){return Gn=s,Reflect.get(...l)},set(...l){return Gn=s,Reflect.set(...l)}}):e;Gn=s;const a=r[o].apply(i,arguments);return Gn=void 0,a}}function ay({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Dd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Dd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}iy(e,t)}}function ly(){const e=su(!0),t=e.run(()=>$({}));let n=[],r=[];const o=Mn({install(s){Wo(o),o._a=s,s.provide(wd,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er&&sy(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!yd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(ay),o}function $d(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];wr(o)&&wr(r)&&!qe(r)&&!rn(r)?e[n]=$d(o,r):e[n]=r}return e}const Id=()=>{};function Ad(e,t,n,r=Id){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&iu()&&bh(o),o}function Kr(e,...t){e.slice().forEach(n=>{n(...t)})}const uy=e=>e(),Vd=Symbol(),za=Symbol();function Ka(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];wr(o)&&wr(r)&&e.hasOwnProperty(n)&&!qe(r)&&!rn(r)?e[n]=Ka(o,r):e[n]=r}return e}const cy=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function dy(e){return!wr(e)||!e.hasOwnProperty(cy)}const{assign:Rt}=Object;function Rd(e){return!!(qe(e)&&e.effect)}function jd(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?$u($(o?o():{}).value):$u(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=Mn(J(()=>{Wo(n);const h=n._s.get(e);return i[f].call(h,h)})),d),{}))}return l=Ga(e,u,t,n,r,!0),l}function Ga(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!yd&&(l.onTrigger=L=>{u?h=L:u==!1&&!D._hotUpdating&&(Array.isArray(h)?h.push(L):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],h;const y=r.state.value[e];!s&&!y&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=$({});let b;function k(L){let M;u=c=!1,Te.NODE_ENV!=="production"&&(h=[]),typeof L=="function"?(L(r.state.value[e]),M={type:dn.patchFunction,storeId:e,events:h}):(Ka(r.state.value[e],L),M={type:dn.patchObject,payload:L,storeId:e,events:h});const V=b=Symbol();Co().then(()=>{b===V&&(u=!0)}),c=!0,Kr(d,M,r.state.value[e])}const R=s?function(){const{state:M}=n,V=M?M():{};this.$patch(ae=>{Rt(ae,V)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Id;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const P=(L,M="")=>{if(Vd in L)return L[za]=M,L;const V=function(){Wo(r);const ae=Array.from(arguments),$e=[],N=[];function A(me){$e.push(me)}function Q(me){N.push(me)}Kr(f,{args:ae,name:V[za],store:D,after:A,onError:Q});let re;try{re=L.apply(this&&this.$id===e?this:D,ae)}catch(me){throw Kr(N,me),me}return re instanceof Promise?re.then(me=>(Kr($e,me),me)).catch(me=>(Kr(N,me),Promise.reject(me))):(Kr($e,re),re)};return V[Vd]=!0,V[za]=M,V},E=Mn({actions:{},getters:{},state:[],hotState:O}),I={_p:r,$id:e,$onAction:Ad.bind(null,f),$patch:k,$reset:R,$subscribe(L,M={}){const V=Ad(d,L,M.detached,()=>ae()),ae=i.run(()=>Ge(()=>r.state.value[e],$e=>{(M.flush==="sync"?c:u)&&L({storeId:e,type:dn.direct,events:h},$e)},Rt({},l,M)));return V},$dispose:T},D=No(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er?Rt({_hmrPayload:E,_customProperties:Mn(new Set)},I):I);r._s.set(e,D);const W=(r._a&&r._a.runWithContext||uy)(()=>r._e.run(()=>(i=su()).run(()=>t({action:P}))));for(const L in W){const M=W[L];if(qe(M)&&!Rd(M)||rn(M))Te.NODE_ENV!=="production"&&o?oi(O.value,L,ta(W,L)):s||(y&&dy(M)&&(qe(M)?M.value=y[L]:Ka(M,y[L])),r.state.value[e][L]=M),Te.NODE_ENV!=="production"&&E.state.push(L);else if(typeof M=="function"){const V=Te.NODE_ENV!=="production"&&o?M:P(M,L);W[L]=V,Te.NODE_ENV!=="production"&&(E.actions[L]=M),a.actions[L]=M}else Te.NODE_ENV!=="production"&&Rd(M)&&(E.getters[L]=s?n.getters[L]:M,Er&&(W._getters||(W._getters=Mn([]))).push(L))}if(Rt(D,W),Rt(ye(D),W),Object.defineProperty(D,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:L=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");k(M=>{Rt(M,L)})}}),Te.NODE_ENV!=="production"&&(D._hotUpdate=Mn(L=>{D._hotUpdating=!0,L._hmrPayload.state.forEach(M=>{if(M in D.$state){const V=L.$state[M],ae=D.$state[M];typeof V=="object"&&wr(V)&&wr(ae)?$d(V,ae):L.$state[M]=ae}oi(D,M,ta(L.$state,M))}),Object.keys(D.$state).forEach(M=>{M in L.$state||Ha(D,M)}),u=!1,c=!1,r.state.value[e]=ta(L._hmrPayload,"hotState"),c=!0,Co().then(()=>{u=!0});for(const M in L._hmrPayload.actions){const V=L[M];oi(D,M,P(V,M))}for(const M in L._hmrPayload.getters){const V=L._hmrPayload.getters[M],ae=s?J(()=>(Wo(r),V.call(D,D))):V;oi(D,M,ae)}Object.keys(D._hmrPayload.getters).forEach(M=>{M in L._hmrPayload.getters||Ha(D,M)}),Object.keys(D._hmrPayload.actions).forEach(M=>{M in L._hmrPayload.actions||Ha(D,M)}),D._hmrPayload=L._hmrPayload,D._getters=L._getters,D._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const L={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(M=>{Object.defineProperty(D,M,Rt({value:D[M]},L))})}return r._p.forEach(L=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const M=i.run(()=>L({store:D,app:r._a,pinia:r,options:a}));Object.keys(M||{}).forEach(V=>D._customProperties.add(V)),Rt(D,M)}else Rt(D,i.run(()=>L({store:D,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&D.$state&&typeof D.$state=="object"&&typeof D.$state.constructor=="function"&&!D.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
18
18
|
state: () => new MyClass()
|
|
19
|
-
Found in store "${
|
|
19
|
+
Found in store "${D.$id}".`),y&&s&&n.hydrate&&n.hydrate(D.$state,y),u=!0,c=!0,D}function fy(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=Km();if(a=(Te.NODE_ENV==="test"&&qo&&qo._testing?null:a)||(u?Se(wd,null):null),a&&Wo(a),Te.NODE_ENV!=="production"&&!qo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
20
20
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
21
|
-
This will fail in production.`);a=qo,a._s.has(r)||(s?Ga(r,t,o,a):jd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):jd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&Er){const d=Gs();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 ie=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ie||{});const cy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},zo=Symbol("options");var Oe=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Oe||{});const Re=uy("ui",()=>{const e=P("None"),t=P(null),n=P(null),r=P(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),To(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),zt=e=>new Promise(t=>setTimeout(t,e)),dy=["data-visible","data-location"],fy={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},py=["disabled"],hy=fe({__name:"Toolbar",setup(e){const t=P(!1),n=Re(),r=St(),o=Ce(zo);return Le(()=>{zt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),S("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Oe).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),S("a",fy,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):ce("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),S("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Oe).Cart,_(ie).AddToCart))}," Cart ")):ce("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),S("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Oe).Authentication,_(ie).SignIn))}," Log in ",8,py)):(c=_(o))!=null&&c.toolbar.show.account?(y(),S("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Oe).Customer,_(ie).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):ce("",!0)],8,dy)}}}),my=["hidden"],vy=["for"],gy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],yy=["id"],by=["id"],wt=fe({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),S("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,vy),N("input",Da({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,gy),t.error?(y(),S("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,yy)):t.hint?(y(),S("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,by)):ce("",!0)],8,my))}}),Gr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_y={},wy={fill:"none",viewBox:"0 0 24 24"};function Ey(e,t){return y(),S("svg",wy,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Gr(_y,[["render",Ey],["__scopeId","data-v-687bcaf0"]]),Oy=["disabled"],Ld=Symbol("form-state"),Jn=fe({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=P(!1),r=P(!1),o=P(!1);dt(Ld,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await zt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(i,a)=>(y(),S("form",{disabled:n.value||r.value,onSubmit:pg(s,["prevent"])},[ma(i.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,Oy))}}),Ny=["disabled","data-success","data-error","data-working"],Sy=["data-visible"],Yn=Gr(fe({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Ld),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),S("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Se(jt,{key:0})):ce("",!0)],8,Sy),ke(" "+K(s.value),1)],8,Ny))}}),[["__scopeId","data-v-ba1085a0"]]),xy={class:"moonbase:checkbox"},ky={class:"moonbase:checkbox-container"},Ty=["id","name","value","disabled","aria-invalid","aria-describedby"],Cy={class:"moonbase:checkbox-description"},Py=["for"],Dy=["id"],$y=["id"],Md=fe({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),S("div",xy,[N("div",ky,[N("input",Da({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Ty)]),N("div",Cy,[N("label",{for:`mb-${t.name}`},K(t.label),9,Py),t.error?(y(),S("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Dy)):t.hint?(y(),S("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,$y)):ce("",!0)])]))}}),Iy=["data-visible"],Ay=fe({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=P(""),i=P(r.getParameter("email")??""),a=P(""),l=P(!1),u=P(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);zt(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Se(Jn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Yn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Iy),N("button",{type:"button",onClick:f[4]||(f[4]=m=>_(r).show(_(Oe).Authentication,_(ie).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Vy={key:0,class:"moonbase:loader"},Ry={key:1,class:"moonbase:error","data-visible":""},jy=["data-visible"],Ly=fe({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=P(!0),i=P(null),a=P(""),l=P(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof An?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);zt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Se(Jn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),S("div",Vy,[Z(jt)])):i.value?(y(),S(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,jy)],64)):(y(),S("div",Ry,K(l.value),1))]),_:1}))}}),My=["data-visible"],Uy=fe({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=P(t.getParameter("email")??""),o=P(null),s=P(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),zt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof An?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Se(Jn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(({disabled:u})=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:"",disabled:u},null,8,["modelValue","disabled"]),Z(Yn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,My)]),_:1}))}}),Fy=["data-visible"],By=fe({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=P(""),a=P(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);zt(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Se(Jn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,Fy)]),_:1}))}}),Hy={class:"moonbase:confirm-email-change"},Zy={key:0,class:"moonbase:loader"},qy={key:1,class:"moonbase:error","data-visible":""},Wy=fe({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Re(),{user:o,confirmEmailChange:s}=St(),i=P(!0),a=P(null);return Le(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),zt(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>{var c;return y(),S("div",Hy,[i.value?(y(),S("div",Zy,[Z(jt)])):a.value?(y(),S("div",qy,K(a.value),1)):(y(),S(xe,{key:2},[N("h3",null," Hi "+K((c=_(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class zy{constructor(){Tr(this,"current",this.detect());Tr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let Ko=new zy;function Ja(e,t,n,r){Ko.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ud(e,t,n,r){Ko.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ya(){let e=P(0),t=P(!0);return Ud(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Qe(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,Qe),r}var Xn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Xn||{}),Qn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Qn||{});function rt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Bd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return ui(i);if(t&1){const a=s.unmount??!0?0:1;return Qe(a,{0(){return null},1(){return ui({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return ui(i)}function ui({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Fd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Ky(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,E)=>E.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
|
|
22
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(
|
|
21
|
+
This will fail in production.`);a=qo,a._s.has(r)||(s?Ga(r,t,o,a):jd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):jd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&Er){const d=Gs();if(d&&d.proxy&&!l){const f=d.proxy,h="_pStores"in f?f._pStores:f._pStores={};h[r]=c}}return c}return i.$id=r,i}var ie=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ie||{});const py={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},zo=Symbol("options");var Oe=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Oe||{});const je=fy("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(),Co(()=>{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}}),zt=e=>new Promise(t=>setTimeout(t,e)),hy=["data-visible","data-location"],my={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},vy=["disabled"],gy=pe({__name:"Toolbar",setup(e){const t=$(!1),n=je(),r=wt(),o=Se(zo);return Re(()=>{zt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return _(),S("div",{class:"moonbase:toolbar","data-visible":t.value&&w(n).active===w(Oe).None?"true":"false","data-location":w(o).toolbar.location},[(a=w(o))!=null&&a.toolbar.show.moonbase?(_(),S("a",my,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):ce("",!0),(l=w(o))!=null&&l.toolbar.show.cart?(_(),S("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>w(n).show(w(Oe).Cart,w(ie).AddToCart))}," Cart ")):ce("",!0),(u=w(o))!=null&&u.toolbar.show.account&&!w(r).user.value?(_(),S("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!w(r).loaded,onClick:i[1]||(i[1]=f=>w(n).show(w(Oe).Authentication,w(ie).SignIn))}," Log in ",8,vy)):(c=w(o))!=null&&c.toolbar.show.account?(_(),S("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>w(n).show(w(Oe).Customer,w(ie).ViewAccount))},G((d=w(r).user.value)==null?void 0:d.name),1)):ce("",!0)],8,hy)}}}),yy=["hidden"],by=["for"],_y=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],wy=["id"],Ey=["id"],Et=pe({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)=>(_(),S("div",{class:"moonbase:input",hidden:t.hidden||void 0},[x("label",{for:`mb-${t.name}`},G(t.label),9,by),x("input",$a({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,_y),t.error?(_(),S("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},G(t.error),9,wy)):t.hint?(_(),S("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},G(t.hint),9,Ey)):ce("",!0)],8,yy))}}),Gr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Oy={},Ny={fill:"none",viewBox:"0 0 24 24"};function xy(e,t){return _(),S("svg",Ny,t[0]||(t[0]=[x("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),x("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Gr(Oy,[["render",xy],["__scopeId","data-v-687bcaf0"]]),Sy=["disabled"],Ld=Symbol("form-state"),Jn=pe({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=$(!1),r=$(!1),o=$(!1);ft(Ld,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await zt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(i,a)=>(_(),S("form",{disabled:n.value||r.value,onSubmit:hg(s,["prevent"])},[va(i.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,Sy))}}),ky=["disabled","data-success","data-error","data-working"],Cy=["data-visible"],Yn=Gr(pe({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Se(Ld),s=J(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(_(),S("button",{class:"moonbase:submit-button",type:"submit",disabled:w(r)||w(o)||w(n),"data-success":w(r)||void 0,"data-error":w(o)||void 0,"data-working":w(n)||void 0},[x("div",{"data-visible":w(n)||void 0,"aria-hidden":"true"},[w(n)?(_(),xe(jt,{key:0})):ce("",!0)],8,Cy),Ce(" "+G(s.value),1)],8,ky))}}),[["__scopeId","data-v-ba1085a0"]]),Ty={class:"moonbase:checkbox"},Py={class:"moonbase:checkbox-container"},Dy=["id","name","value","disabled","aria-invalid","aria-describedby"],$y={class:"moonbase:checkbox-description"},Iy=["for"],Ay=["id"],Vy=["id"],Md=pe({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(_(),S("div",Ty,[x("div",Py,[x("input",$a({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,Dy)]),x("div",$y,[x("label",{for:`mb-${t.name}`},G(t.label),9,Iy),t.error?(_(),S("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},G(t.error),9,Ay)):t.hint?(_(),S("p",{key:1,id:`mb-${t.name}-hint`},G(t.hint),9,Vy)):ce("",!0)])]))}}),Ry=["data-visible"],jy=pe({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=je(),o=wt(),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);zt(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(_(),xe(Jn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[q(Et,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=h=>s.value=h),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),q(Et,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=h=>i.value=h),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),q(Et,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=h=>a.value=h),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(Md,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=h=>l.value=h),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),q(Yn,{success:"Signed up",label:"Sign up",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!u.value||void 0},G(u.value),9,Ry),x("button",{type:"button",onClick:f[4]||(f[4]=h=>w(r).show(w(Oe).Authentication,w(ie).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Ly={key:0,class:"moonbase:loader"},My={key:1,class:"moonbase:error","data-visible":""},Uy=["data-visible"],Fy=pe({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=je(),o=wt(),s=$(!0),i=$(null),a=$(""),l=$(null);Re(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof Vn?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const h=await o.signIn(f,a.value);zt(1500).then(()=>n("confirmedAccount",h))}catch(f){throw l.value=f.message,f}}return(c,d)=>(_(),xe(Jn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(_(),S("div",Ly,[q(jt)])):i.value?(_(),S(ke,{key:2},[x("h3",null," Hi "+G(i.value.name)+", ",1),d[1]||(d[1]=x("p",null," Please create a new password for your account: ",-1)),q(Et,{"model-value":w(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),q(Et,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(Yn,{success:"Password saved",label:"Save password",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!l.value||void 0},G(l.value),9,Uy)],64)):(_(),S("div",My,G(l.value),1))]),_:1}))}}),By=["data-visible"],Hy=pe({__name:"ForgotPassword",setup(e){const t=je(),n=wt(),r=$(t.getParameter("email")??""),o=$(null),s=$(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),zt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Vn?o.value="User not found":o.value=a.message,a}}return(a,l)=>(_(),xe(Jn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(({disabled:u})=>[l[1]||(l[1]=x("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=x("p",null," Please enter your email for a reset link: ",-1)),q(Et,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:"",disabled:u},null,8,["modelValue","disabled"]),q(Yn,{success:"Email sent",label:"Reset password",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!o.value||void 0},G(o.value),9,By)]),_:1}))}}),Zy=["data-visible"],qy=pe({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=je(),o=wt(),s=J(()=>r.getParameter("email")),i=$(""),a=$(null);Re(()=>{(!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);zt(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(_(),xe(Jn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[x("h3",null," Hi "+G(s.value)+", ",1),c[1]||(c[1]=x("p",null," Please create a new password for your account: ",-1)),q(Et,{"model-value":w(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),q(Et,{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(Yn,{success:"Password saved",label:"Save password",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!a.value||void 0},G(a.value),9,Zy)]),_:1}))}}),Wy={class:"moonbase:confirm-email-change"},zy={key:0,class:"moonbase:loader"},Ky={key:1,class:"moonbase:error","data-visible":""},Gy=pe({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=je(),{user:o,confirmEmailChange:s}=wt(),i=$(!0),a=$(null);return Re(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),zt(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>{var c;return _(),S("div",Wy,[i.value?(_(),S("div",zy,[q(jt)])):a.value?(_(),S("div",Ky,G(a.value),1)):(_(),S(ke,{key:2},[x("h3",null," Hi "+G((c=w(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=x("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class Jy{constructor(){Cr(this,"current",this.detect());Cr(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 Ko=new Jy;function Ja(e,t,n,r){Ko.isServer||pt(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ud(e,t,n,r){Ko.isServer||pt(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ya(){let e=$(0),t=$(!0);return Ud(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Qe(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,Qe),r}var Xn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Xn||{}),Qn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Qn||{});function rt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Bd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return ci(i);if(t&1){const a=s.unmount??!0?0:1;return Qe(a,{0(){return null},1(){return ci({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return ci(i)}function ci({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,h]of Object.entries(r))typeof h=="boolean"&&(c=!0),h===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Fd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Yy(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(y=>y.trim()).filter((y,O,b)=>b.indexOf(y)===O).sort((y,O)=>y.localeCompare(O)).map(y=>` - ${y}`).join(`
|
|
22
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(y=>` - ${y}`).join(`
|
|
23
23
|
`)].join(`
|
|
24
|
-
`));const f=Bd(c.props??{},i,l),m=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(m.props||(m.props={}),m.props[b]=f[b]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Fd(e){return e.flatMap(t=>t.type===xe?Fd(t.children):[t])}function Bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ky(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var er=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(er||{});let tr=fe({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 rt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(Ko.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const ci=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function di(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ci)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Hd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Qe(t,{0(){return e.matches(ci)},1(){let r=e;for(;r!==null;){if(r.matches(ci))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Nr(e){e==null||e.focus({preventScroll:!0})}const Jy=["textarea","input"].join(",");function Yy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Jy))??!1}function Jr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function at(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Jr(e):e:di(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&Yy(f)&&f.select(),2}let Sr=[];Gy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Sr[0]===t.target)return;let n=t.target;n=n.closest(ci),Sr.unshift(n??t.target),Sr=Sr.filter(r=>r!=null&&r.isConnected),Sr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function fi(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var qd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qd||{});const Go=Object.assign(fe({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:P(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=P(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=P(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),Qy({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=eb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));tb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ya();function u(m){const b=G(o);if(!b)return;(E=>E())(()=>{Qe(l.value,{[Dt.Forwards]:()=>{at(b,We.First,{skipElements:[m.relatedTarget]})},[Dt.Backwards]:()=>{at(b,We.Last,{skipElements:[m.relatedTarget]})}})})}const c=P(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const b=Zd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=m.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Wd(b,O)||(c.value?at(G(o),Qe(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Nr(m.target)))}return()=>{const m={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:E,containers:T,...M}=e;return Ue(xe,[!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable}),rt({ourProps:b,theirProps:{...t,...M},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable})])}}}),{features:qd});function Xy(e){const t=P(Sr.slice());return Ge([e],([n],[r])=>{r===!0&&n===!1?fi(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Sr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Qy({ownerDocument:e},t){const n=Xy(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Nr(n())},{flush:"post"})}),bt(()=>{t.value&&Nr(n())})}function eb({ownerDocument:e,container:t,initialFocus:n},r){const o=P(null),s=P(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{Ge([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&fi(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Nr(u):at(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function tb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Zd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Wd(a,u)?(r.value=u,Nr(u)):(i.preventDefault(),i.stopPropagation(),Nr(l)):Nr(r.value)},!0)}function Wd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function nb(e){let t=Fh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Jo(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return fi(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Jo();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function rb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ob(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return/Android/gi.test(window.navigator.userAgent)}function ib(){return zd()||sb()}function ab(){return zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Jo();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function lb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ub(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const xr=rb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Jo(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:ub(n)},o=[ab(),ob(),lb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});xr.subscribe(()=>{const e=xr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&xr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&xr.dispatch("TEARDOWN",n)}});function cb(e,t,n){const r=nb(xr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Ge([e,t],([s,i],[a],l)=>{if(!s||!i)return;xr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(xr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let db=0;function fb(){return++db}function Lt(){return fb()}const el=new Map,Yo=new Map;function Kd(e,t=P(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Yo.get(r)??1;if(s===1?Yo.delete(r):Yo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Yo.get(r)??0;Yo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Xo(e,t,n,r){Ko.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Gd=30;function Jd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=P(null);Xo(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),Xo(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),Xo(n,"click",i=>{ib()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Xo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Xo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Gd||Math.abs(a.y-s.y)>=Gd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ud(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Yd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=P(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(tr,{features:er.Hidden,ref:r})}}}let Xd=Symbol("Context");var lt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(lt||{});function pb(){return pi()!==null}function pi(){return Ce(Xd,null)}function Qd(e){dt(Xd,e)}const ef=Symbol("ForcePortalRootContext");function hb(){return Ce(ef,!1)}const tf=fe({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(ef,e.force),()=>{const{force:r,...o}=e;return rt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let nf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function mb(){return Ce(nf,()=>{})}function vb({type:e,enabled:t,element:n,onUpdate:r}){let o=mb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{Ge(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(nf,s)}var ot=(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))(ot||{});let gb=Symbol("DescriptionContext");function yb({slot:e=P({}),name:t="Description",props:n={}}={}){let r=P([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(gb,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function rf(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const bb=fe({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=P(null);Q(()=>cn(r));const o=hb(),s=Ce(sf,null),i=P(o===!0||s==null?rf(r.value):s.resolveTarget()),a=P(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(nl,null);let u=!1;const c=Gs();return Ge(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(bm,{to:i.value},rt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function of(){const e=Ce(nl,null),t=P([]);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,fe({name:"PortalWrapper",setup(s,{slots:i}){return dt(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let sf=Symbol("PortalGroupContext");const _b=fe({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=No({resolveTarget(){return e.target}});return dt(sf,r),()=>{const{target:o,...s}=e;return rt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function hi(e){const t=Ce(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hi),n}return t}const mi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",af=fe({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:mi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var me;const s=P(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=P(0),u=pi(),c=Q(()=>e.open===mi&&u!==null?(u.value<.Open)===lt.Open:e.open),d=P(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==mi||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===mi?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),E=P(null),T={titleId:E,panelRef:P(null),dialogState:b,setTitleId(oe){E.value!==oe&&(E.value=oe)},close(){t("close",!1)}},M=Q(()=>l.value>1),C=Ce(rl,null)!==null,[ee,x]=of(),{resolveContainers:L,mainTreeNodeRef:I,MainTreeNode:he}=Yd({portals:ee,defaultContainers:[Q(()=>T.panelRef.value??d.value)]}),q=Q(()=>M.value?"parent":"leaf"),V=Q(()=>u!==null?(u.value<.Closing)===lt.Closing:!1),R=Q(()=>C||V.value?!1:O.value),$=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(I))&&Fe instanceof HTMLElement)??null});Kd($,R);const ae=Q(()=>M.value?!0:O.value),$e=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(I))&&Fe instanceof HTMLElement)??null});Kd($e,ae),vb({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Qe(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const w=yb({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(rl,T);const D=Q(()=>!(!O.value||M.value));Jd(L,(oe,Fe)=>{oe.preventDefault(),T.close(),To(()=>Fe==null?void 0:Fe.focus())},D);const Y=Q(()=>!(M.value||b.value!==0));Ja((me=f.value)==null?void 0:me.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===ot.Escape&&(oe.preventDefault(),oe.stopPropagation(),T.close()))});const re=Q(()=>!(V.value||b.value!==0||C));return cb(f,re,oe=>({containers:[...oe.containers??[],L]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const nr=xt.target.getBoundingClientRect();nr.x===0&&nr.y===0&&nr.width===0&&nr.height===0&&T.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":E.value,"aria-describedby":w.value},nr={open:b.value===0};return Ue(tf,{force:!0},()=>[Ue(bb,()=>Ue(_b,{target:d.value},()=>Ue(tf,{force:!1},()=>Ue(Go,{initialFocus:ht,containers:L,features:O.value?Qe(q.value,{parent:Go.features.RestoreFocus,leaf:Go.features.All&~Go.features.FocusLock}):Go.features.None},()=>Ue(x,{},()=>rt({ourProps:xt,theirProps:{...Be,...n},slot:nr,attrs:n,slots:r,visible:b.value===0,features:Xn.RenderStrategy|Xn.Static,name:"Dialog"})))))),Ue(he)])}}}),lf=fe({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=hi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return rt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),uf=fe({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=hi("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 rt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),vi=fe({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=hi("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return rt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function cf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function df(e,t){let n=P(cf(e.value.type,e.value.as));return Le(()=>{n.value=cf(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const ff=Symbol("PopoverContext");function ol(e){const t=Ce(ff,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const wb=Symbol("PopoverGroupContext");function pf(){return Ce(wb,null)}const hf=Symbol("PopoverPanelContext");function Eb(){return Ce(hf,null)}let sl=fe({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var ee;const o=P(null);r({el:o,$el:o});const s=P(1),i=P(null),a=P(null),l=P(null),u=P(null),c=Q(()=>cn(o)),d=Q(()=>{var R,$;if(!G(i)||!G(u))return!1;for(const ae of document.querySelectorAll("body > *"))if(Number(ae==null?void 0:ae.contains(G(i)))^Number(ae==null?void 0:ae.contains(G(u))))return!0;const x=di(),L=x.indexOf(G(i)),I=(L+x.length-1)%x.length,he=(L+1)%x.length,q=x[I],V=x[he];return!((R=G(u))!=null&&R.contains(q))&&!(($=G(u))!=null&&$.contains(V))}),f={popoverState:s,buttonId:P(null),panelId:P(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Qe(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(x){f.closePopover();const L=x?x instanceof HTMLElement?x:x.value instanceof HTMLElement?G(x):G(f.button):G(f.button);L==null||L.focus()}};dt(ff,f),Qd(Q(()=>Qe(s.value,{0:lt.Open,1:lt.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=pf(),O=b==null?void 0:b.registerPopover,[E,T]=of(),M=Yd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:E,defaultContainers:[i,u]});function C(){var x,L,I;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((x=c.value)==null?void 0:x.activeElement)&&(((L=G(i))==null?void 0:L.contains(c.value.activeElement))||((I=G(u))==null?void 0:I.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(m)),Ja((ee=c.value)==null?void 0:ee.defaultView,"focus",x=>{var L,I;x.target!==window&&x.target instanceof HTMLElement&&s.value===0&&(C()||i&&u&&(M.contains(x.target)||(L=G(f.beforePanelSentinel))!=null&&L.contains(x.target)||(I=G(f.afterPanelSentinel))!=null&&I.contains(x.target)||f.closePopover()))},!0),Jd(M.resolveContainers,(x,L)=>{var I;f.closePopover(),Hd(L,Qa.Loose)||(x.preventDefault(),(I=G(i))==null||I.focus())},Q(()=>s.value===0)),()=>{const x={open:s.value===0,close:f.close};return Ue(xe,[Ue(T,{},()=>rt({theirProps:{...e,...n},ourProps:{ref:o},slot:x,slots:t,attrs:n,name:"Popover"})),Ue(M.MainTreeNode)])}}});const mf=fe({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=pf(),a=i==null?void 0:i.closeOthers,l=Eb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=P(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=df(Q(()=>({as:e.as,type:t.type})),c);function m(C){var ee,x,L,I,he;if(u.value){if(o.popoverState.value===1)return;switch(C.key){case ot.Space:case ot.Enter:C.preventDefault(),(x=(ee=C.target).click)==null||x.call(ee),o.closePopover(),(L=G(o.button))==null||L.focus();break}}else switch(C.key){case ot.Space:case ot.Enter:C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case ot.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(I=s.value)!=null&&I.activeElement&&!((he=G(o.button))!=null&&he.contains(s.value.activeElement)))return;C.preventDefault(),C.stopPropagation(),o.closePopover();break}}function b(C){u.value||C.key===ot.Space&&C.preventDefault()}function O(C){var ee,x;e.disabled||(u.value?(o.closePopover(),(ee=G(o.button))==null||ee.focus()):(C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(x=G(o.button))==null||x.focus()))}function E(C){C.preventDefault(),C.stopPropagation()}const T=Ya();function M(){const C=G(o.panel);if(!C)return;function ee(){Qe(T.value,{[Dt.Forwards]:()=>at(C,We.First),[Dt.Backwards]:()=>at(C,We.Last)})===xn.Error&&at(di().filter(L=>L.dataset.moonbaseFocusGuard!=="true"),Qe(T.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:G(o.button)})}ee()}return()=>{const C=o.popoverState.value===0,ee={open:C},{id:x,...L}=e,I=u.value?{ref:c,type:f.value,onKeydown:m,onClick:O}:{ref:c,id:x,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:b,onClick:O,onMousedown:E};return Ue(xe,[rt({ourProps:I,theirProps:{...t,...L},slot:ee,attrs:t,slots:n,name:"PopoverButton"}),C&&!u.value&&o.isPortalled.value&&Ue(tr,{id:d,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:M})])}}}),vf=fe({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(hf,s.panelId),ft(()=>{var T,M;if(!o||s.popoverState.value!==0||!s.panel)return;const E=(T=i.value)==null?void 0:T.activeElement;(M=G(s.panel))!=null&&M.contains(E)||at(G(s.panel),We.First)});const u=pi(),c=Q(()=>u!==null?(u.value<.Open)===lt.Open:s.popoverState.value===0);function d(E){var T,M;switch(E.key){case ot.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!((T=G(s.panel))!=null&&T.contains(i.value.activeElement)))return;E.preventDefault(),E.stopPropagation(),s.closePopover(),(M=G(s.button))==null||M.focus();break}}function f(E){var M,C,ee,x,L;const T=E.relatedTarget;T&&G(s.panel)&&((M=G(s.panel))!=null&&M.contains(T)||(s.closePopover(),((ee=(C=G(s.beforePanelSentinel))==null?void 0:C.contains)!=null&&ee.call(C,T)||(L=(x=G(s.afterPanelSentinel))==null?void 0:x.contains)!=null&&L.call(x,T))&&T.focus({preventScroll:!0})))}const m=Ya();function b(){const E=G(s.panel);if(!E)return;function T(){Qe(m.value,{[Dt.Forwards]:()=>{var C;at(E,We.First)===xn.Error&&((C=G(s.afterPanelSentinel))==null||C.focus())},[Dt.Backwards]:()=>{var M;(M=G(s.button))==null||M.focus({preventScroll:!0})}})}T()}function O(){const E=G(s.panel);if(!E)return;function T(){Qe(m.value,{[Dt.Forwards]:()=>{const M=G(s.button),C=G(s.panel);if(!M)return;const ee=di(),x=ee.indexOf(M),L=ee.slice(0,x+1),he=[...ee.slice(x+1),...L];for(const q of he.slice())if(q.dataset.moonbaseFocusGuard==="true"||C!=null&&C.contains(q)){const V=he.indexOf(q);V!==-1&&he.splice(V,1)}at(he,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var C;at(E,We.Previous)===xn.Error&&((C=G(s.button))==null||C.focus())}})}T()}return()=>{const E={open:s.popoverState.value===0,close:s.close},{id:T,focus:M,...C}=e,ee={ref:s.panel,id:T,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return rt({ourProps:ee,theirProps:{...t,...C},attrs:t,slot:E,slots:{...n,default:(...x)=>{var L;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(tr,{id:a,ref:s.beforePanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(L=n.default)==null?void 0:L.call(n,...x),c.value&&s.isPortalled.value&&Ue(tr,{id:l,ref:s.afterPanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Xn.RenderStrategy|Xn.Static,visible:c.value,name:"PopoverPanel"})}}});let Ob=fe({props:{onFocus:{type:Function,required:!0}},setup(e){let t=P(!0);return()=>t.value?Ue(tr,{as:"button",type:"button",features:er.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const gf=Symbol("TabsContext");function Qo(e){const t=Ce(gf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qo),n}return t}const il=Symbol("TabsSSRContext"),Nb=fe({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=P(e.selectedIndex??e.defaultIndex),s=P([]),i=P([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=Jr(c.tabs.value,G),E=Jr(c.panels.value,G),T=O.filter(M=>{var C;return!((C=G(M))!=null&&C.hasAttribute("disabled"))});if(b<0||b>O.length-1){const M=Qe(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Qe(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),C=Qe(M,{0:()=>O.indexOf(T[0]),1:()=>O.indexOf(T[T.length-1])});C!==-1&&(o.value=C),c.tabs.value=O,c.panels.value=E}else{const M=O.slice(0,b),ee=[...O.slice(b),...M].find(L=>T.includes(L));if(!ee)return;let x=O.indexOf(ee)??c.selectedIndex.value;x===-1&&(x=c.selectedIndex.value),o.value=x,c.tabs.value=O,c.panels.value=E}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=Jr(s.value,G),!a.value){const E=s.value.indexOf(O)??o.value;E!==-1&&(o.value=E)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=Jr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(gf,c);const d=P({tabs:[],panels:[]}),f=P(!1);Le(()=>{f.value=!0}),dt(il,Q(()=>f.value?null:d.value));const m=Q(()=>e.selectedIndex);return Le(()=>{Ge([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=Jr(c.tabs.value,G);b.some((E,T)=>G(c.tabs.value[T])!==G(E))&&c.setSelectedIndex(b.findIndex(E=>G(E)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Ob,{onFocus:()=>{for(const O of s.value){const E=G(O);if((E==null?void 0:E.tabIndex)===0)return E.focus(),!0}return!1}}),rt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Sb=fe({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Qo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return rt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=fe({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("Tab"),s=P(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(il),a=Q(()=>{if(i.value){const E=i.value.tabs.indexOf(e.id);return E===-1?i.value.tabs.push(e.id)-1:E}return-1}),l=Q(()=>{const E=o.tabs.value.indexOf(s);return E===-1?a.value:E}),u=Q(()=>l.value===o.selectedIndex.value);function c(E){var M;const T=E();if(T===xn.Success&&o.activation.value==="auto"){const C=(M=cn(s))==null?void 0:M.activeElement,ee=o.tabs.value.findIndex(x=>G(x)===C);ee!==-1&&o.setSelectedIndex(ee)}return T}function d(E){const T=o.tabs.value.map(C=>G(C)).filter(Boolean);if(E.key===ot.Space||E.key===ot.Enter){E.preventDefault(),E.stopPropagation(),o.setSelectedIndex(l.value);return}switch(E.key){case ot.Home:case ot.PageUp:return E.preventDefault(),E.stopPropagation(),c(()=>at(T,We.First));case ot.End:case ot.PageDown:return E.preventDefault(),E.stopPropagation(),c(()=>at(T,We.Last))}if(c(()=>Qe(o.orientation.value,{vertical(){return E.key===ot.ArrowUp?at(T,We.Previous|We.WrapAround):E.key===ot.ArrowDown?at(T,We.Next|We.WrapAround):xn.Error},horizontal(){return E.key===ot.ArrowLeft?at(T,We.Previous|We.WrapAround):E.key===ot.ArrowRight?at(T,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return E.preventDefault()}const f=P(!1);function m(){var E;f.value||(f.value=!0,!e.disabled&&((E=G(s))==null||E.focus({preventScroll:!0}),o.setSelectedIndex(l.value),fi(()=>{f.value=!1})))}function b(E){E.preventDefault()}const O=df(Q(()=>({as:e.as,type:t.type})),s);return()=>{var ee;const E={selected:u.value,disabled:e.disabled??!1},{id:T,...M}=e,C={ref:s,onKeydown:d,onMousedown:b,onClick:m,id:T,role:"tab",type:O.value,"aria-controls":(ee=G(o.panels.value[l.value]))==null?void 0:ee.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return rt({ourProps:C,theirProps:M,slot:E,attrs:t,slots:n,name:"Tab"})}}}),xb=fe({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Qo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return rt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=fe({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("TabPanel"),s=P(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(il),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(tr,{as:"span","aria-hidden":!0,...b}):rt({ourProps:b,theirProps:m,slot:c,attrs:t,slots:n,features:Xn.Static|Xn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function kb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function gi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Tb(e,t){const n=Jo();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function yf(e,t,n,r,o,s){const i=Jo(),a=s!==void 0?kb(s):()=>{};return gi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{gi(e,...n),ul(e,...r),i.add(Tb(e,l=>(gi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>gi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function kr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function Cb(){return Ce(dl,null)!==null}function Pb(){const e=Ce(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Db(){const e=Ce(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function yi(e){return"children"in e?yi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bf(e){const t=P([]),n=P(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Qn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Qe(i,{[Qn.Unmount](){t.value.splice(a,1)},[Qn.Hidden](){t.value[a].state="hidden"}}),!yi(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,Qn.Unmount)}return{children:t,register:o,unregister:r}}const _f=Xn.RenderStrategy,es=fe({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=P(0);function i(){s.value|=lt.Opening,t("beforeEnter")}function a(){s.value&=~lt.Opening,t("afterEnter")}function l(){s.value|=lt.Closing,t("beforeLeave")}function u(){s.value&=~lt.Closing,t("afterLeave")}if(!Cb()&&pb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=P(null),d=Q(()=>e.unmount?Qn.Unmount:Qn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Pb(),{register:b,unregister:O}=Db(),E=P(f.value?"visible":"hidden"),T={value:!0},M=Lt(),C={value:!1},ee=bf(()=>{!C.value&&E.value!=="hidden"&&(E.value="hidden",O(M),u())});Le(()=>{const ae=b(M);bt(ae)}),ft(()=>{if(d.value===Qn.Hidden&&M){if(f.value&&E.value!=="visible"){E.value="visible";return}Qe(E.value,{hidden:()=>O(M),visible:()=>b(M)})}});const x=kr(e.enter),L=kr(e.enterFrom),I=kr(e.enterTo),he=kr(e.entered),q=kr(e.leave),V=kr(e.leaveFrom),R=kr(e.leaveTo);Le(()=>{ft(()=>{if(E.value==="visible"){const ae=G(c);if(ae instanceof Comment&&ae.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function $(ae){const $e=T.value&&!m.value,w=G(c);!w||!(w instanceof HTMLElement)||$e||(C.value=!0,f.value&&i(),f.value||l(),ae(f.value?yf(w,x,L,I,he,D=>{C.value=!1,D===cl.Finished&&a()}):yf(w,q,V,R,he,D=>{C.value=!1,D===cl.Finished&&(yi(ee)||(E.value="hidden",O(M),u()))})))}return Le(()=>{Ge([f],(ae,$e,w)=>{$(w),T.value=!1},{immediate:!0})}),dt(fl,ee),Qd(Q(()=>Qe(E.value,{visible:lt.Open,hidden:lt.Closed})|s.value)),()=>{const{appear:ae,show:$e,enter:w,enterFrom:D,enterTo:Y,entered:re,leave:me,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...m.value&&f.value&&Ko.isServer?{class:ws([n.class,ht.class,...x,...L])}:{}};return rt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:_f,visible:E.value==="visible",name:"TransitionChild"})}}}),$b=es,pl=fe({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=pi(),s=Q(()=>e.show===null&&o!==null?(o.value<.Open)===lt.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=P(s.value?"visible":"hidden"),a=bf(()=>{i.value="hidden"}),l=P(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":yi(a)||(i.value="hidden")})}),dt(fl,a),dt(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return rt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue($b,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:_f,visible:i.value==="visible",name:"Transition"})}}}),Ib={class:"moonbase:modal-container"},bi=fe({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Se(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Ib,[Z(_(es),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(es),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:modal-content"},{default:_e(()=>[ma(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Ab=["data-visible"],Vb=fe({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(zo),i=P(r.getParameter("email")??""),a=P(""),l=P(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);zt(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof An?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Se(Jn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Ab),(f=_(s))!=null&&f.auth.enable.signUp?(y(),S("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>_(r).show(_(Oe).Authentication,_(ie).SignUp,{email:i.value}))}," Create account ")):ce("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=m=>_(r).show(_(Oe).Authentication,_(ie).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Rb={class:"moonbase:authentication"},jb={key:0,class:"moonbase:loader"},Lb=fe({__name:"Authentication",props:{open:{type:Boolean}},setup(e){const t=Re(),{loaded:n}=St(),r=Q(()=>{switch(t.intent){case ie.SignIn:return"Sign in";case ie.SignUp:return"Sign up";case ie.ConfirmAccount:return"Confirm account";case ie.ConfirmEmailChange:return"Confirm email change";case ie.ForgotPassword:return"Forgot password";case ie.ResetPassword:return"Reset password"}return"Authentication"}),o=Q(()=>{if(t.intent===ie.SignIn&&t.next){const[i,a,l]=t.next;if(i===Oe.Authentication&&a===ie.ConfirmEmailChange)return"to confirm email"}return null});function s(){t.reset()}return(i,a)=>(y(),Se(bi,{open:i.open,onClose:s},{default:_e(()=>[N("div",Rb,[Z(_(vi),{as:"h3"},{default:_e(()=>[ke(K(r.value)+" "+K(o.value),1)]),_:1}),_(n)?_(t).intent===_(ie).SignIn?(y(),Se(Vb,{key:1,onSignedIn:a[0]||(a[0]=l=>_(t).dequeue())})):_(t).intent===_(ie).SignUp?(y(),Se(Ay,{key:2,onSignedUp:a[1]||(a[1]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):_(t).intent===_(ie).ConfirmAccount?(y(),Se(Ly,{key:3,onConfirmedAccount:a[2]||(a[2]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):_(t).intent===_(ie).ConfirmEmailChange?(y(),Se(Wy,{key:4})):_(t).intent===_(ie).ForgotPassword?(y(),Se(Uy,{key:5})):_(t).intent===_(ie).ResetPassword?(y(),Se(By,{key:6,onPasswordReset:a[3]||(a[3]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):ce("",!0):(y(),S("div",jb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Mb={class:"moonbase:product-cart-item"},Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb={class:"moonbase:product-cart-item-content"},Hb={key:0,class:"moonbase:cart-item-discount"},Zb={class:"font-semibold"},qb={key:0,class:"ml-0.5"},Wb={key:2,class:"moonbase:product-cart-item-total"},zb={key:0,class:"moonbase:discount"},Kb={key:1},Gb=fe({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),S("div",Mb,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),S("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Ub)):(y(),S("div",Fb)),N("div",Bb,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),S("p",Hb,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",Zb,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),S("span",qb," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):ce("",!0)])):ce("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),S("div",Wb,[t.lineItem.variation.hasDiscount?(y(),S("span",zb,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):ce("",!0),t.lineItem.quantity!==1?(y(),S("span",Kb,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):ce("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):ce("",!0)])}}}),Jb={class:"moonbase:bundle-cart-item"},Yb=["src"],Xb={key:1,class:"moonbase:image-placeholder"},Qb={class:"moonbase:bundle-cart-item-content"},e_={key:0,class:"moonbase:cart-item-discount"},t_={class:"font-semibold"},n_={key:0,class:"ml-0.5"},r_={class:"moonbase:bundle-cart-item-summary"},o_=["data-open"],s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=["src"],u_={key:1,class:"moonbase:image-placeholder"},c_=["data-included"],d_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},f_={key:0,class:"truncate italic"},p_={key:1,class:"truncate"},h_=fe({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=P(!1),n=P(null);return Ge(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),S("div",null,[N("div",Jb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),S("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Yb)):(y(),S("div",Xb)),N("div",Qb,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),S("p",e_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",t_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),S("span",n_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):ce("",!0)])):ce("",!0),N("div",r_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),S("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),S(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):ce("",!0),o[2]||(o[2]=ke(" products "))]),(y(),S("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,o_))])):ce("",!0)])]),r.lineItem.variation?(y(),S("div",s_,[r.lineItem.variation.hasDiscount?(y(),S("span",i_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):ce("",!0),r.lineItem.quantity!==1?(y(),S("span",a_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):ce("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):ce("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),S(xe,null,sn(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),S("div",{key:f.id},[f!=null&&f.iconUrl?(y(),S("img",{key:0,src:f.iconUrl,alt:""},null,8,l_)):(y(),S("div",u_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),S("svg",d_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):ce("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,c_),f.included?f!=null&&f.tagline?(y(),S("p",p_,K(f.tagline),1)):ce("",!0):(y(),S("p",f_," You already own this "))])]))),128))],512)])}}}),m_={class:"moonbase:cart-modal-container"},v_=fe({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Se(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",m_,[Z(_(es),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(es),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[ma(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),g_=["disabled","data-success","data-error","data-working","data-variant"],y_=["data-visible"],wf=fe({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=P(!1),r=P(!1),o=P(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await zt(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(a,l)=>(y(),S("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Se(jt,{key:0})):ce("",!0)],8,y_),ke(" "+K(s.value),1)],8,g_))}}),b_={class:"moonbase:cart"},__={key:0,role:"list",class:"moonbase:cart-items"},w_={key:1,class:"moonbase:cart-empty"},E_={key:2,class:"moonbase:cart-total"},O_=fe({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=e,n=Re(),{items:r,total:o,currency:s,checkout:i}=Ba(),a=Ce(zo);Ge(()=>t.open,u=>{});async function l(){if(!await i({redirect:(a==null?void 0:a.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(u,c)=>(y(),Se(v_,{open:u.open,onClose:c[0]||(c[0]=d=>_(n).reset())},{default:_e(()=>[N("div",b_,[Z(_(vi),{as:"h3"},{default:_e(()=>c[1]||(c[1]=[ke(" Cart ")])),_:1}),_(r).length>0?(y(),S("ul",__,[(y(!0),S(xe,null,sn(_(r),d=>(y(),S("li",{key:d.id},[d.type==="Product"?(y(),Se(Gb,{key:0,"line-item":d,currency:_(s)},null,8,["line-item","currency"])):d.type==="Bundle"?(y(),Se(h_,{key:1,"line-item":d,currency:_(s)},null,8,["line-item","currency"])):ce("",!0)]))),128))])):(y(),S("div",w_," Your cart is empty! ")),_(r).length>0?(y(),S("div",E_,[c[2]||(c[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(o).amount,_(o).currency)),1),c[3]||(c[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):ce("",!0),_(r).length>0?(y(),Se(wf,{key:3,handler:l,label:"Checkout",error:"Cancelled"})):ce("",!0)])]),_:1},8,["open"]))}}),N_={class:"moonbase:account"},S_={key:0,class:"moonbase:error"},x_={key:1,class:"moonbase:notification"},k_={key:0,class:"moonbase:error"},T_=fe({__name:"Account",setup(e){var M,C,ee;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=P(((M=n.value)==null?void 0:M.name)??""),a=P(((C=n.value)==null?void 0:C.email)??""),l=P(((ee=n.value)==null?void 0:ee.communicationPreferences)??{newsletterOptIn:!1}),u=P(null),c=P(!1),d=P(""),f=P(""),m=P(null),b=P(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(x){throw u.value=x,x}}async function E(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(x){throw m.value=x,x}}async function T(){b.value=!0,await s(),t.reset()}return(x,L)=>(y(),S("div",N_,[Z(Jn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":L[0]||(L[0]=I=>i.value=I),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":L[1]||(L[1]=I=>a.value=I),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":L[2]||(L[2]=I=>l.value.newsletterOptIn=I),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Yn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),S("p",S_,K(u.value.message),1)):c.value?(y(),S("p",x_," You need to confirm your new email address, please check your inbox ")):ce("",!0)]),_:1}),Z(Jn,{handler:E},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":L[3]||(L[3]=I=>d.value=I),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":L[4]||(L[4]=I=>f.value=I),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),S("p",k_,K(m.value.message),1)):ce("",!0)]),_:1}),Z(wf,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:T})]))}}),C_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function D_(e,t){return y(),S("svg",P_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Ef=Gr(C_,[["render",D_]]),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return y(),S("svg",I_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Of=Gr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return y(),S("svg",R_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Nf=Gr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return y(),S("svg",M_,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Sf=Gr(L_,[["render",U_]]),F_={class:"moonbase:product-downloads"},B_=["data-last","onClick"],H_={class:"moonbase:sr-only"},Z_={class:"moonbase:sr-only"},q_=["onClick"],W_=fe({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Xt.Universal]:()=>Ef,[Xt.Windows]:()=>Of,[Xt.Linux]:()=>Nf,[Xt.Mac]:()=>Sf},{downloadProduct:r}=ni(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),S("span",F_,[(y(!0),S(xe,null,sn(o.value,(a,l,u)=>(y(),S(xe,{key:l},[a.length===1?(y(),S("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",H_,K(l.toString()),1),(y(),Se(ha(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,B_)):(y(),Se(_(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(mf),null,{default:_e(()=>[N("span",Z_,K(l.toString()),1),(y(),Se(ha(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(La,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),S(xe,null,sn(a,c=>(y(),S("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},[N("span",null,K(c.name),1)],8,q_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),z_={class:"moonbase:product-activations"},K_={key:0,scope:"col"},G_={key:0},J_={colspan:"3"},Y_={key:1},X_={key:0},Q_=["onClick"],e1=fe({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ni(),i=P(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===Ai.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),S("table",z_,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),S("th",K_,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):ce("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),S("tr",Y_,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):ce("",!0):(y(),S("tr",G_,[N("td",J_,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),S(xe,null,sn(i.value,d=>{var f;return y(),S("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),S("td",X_,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Se(jt,{key:0})):ce("",!0),c[7]||(c[7]=ke(" Revoke "))],8,Q_)])):ce("",!0)])}),128))])]))}}),t1={class:"moonbase:products"},n1={key:0,scope:"col"},r1={key:1,scope:"col"},o1={key:0},s1={key:1},i1=["src"],a1={key:1,class:"moonbase:image-placeholder"},l1={key:1},u1={key:2},c1={key:0},d1=fe({__name:"Products",setup(e){const{getProducts:t}=ni(),n=P(null);Le(async()=>{let s=await t();for(n.value=s.items;s.hasMore&&s.next;)s=await t(s.next),n.value.push(...s.items)});const r=Q(()=>n.value&&n.value.some(s=>s.downloads)),o=Q(()=>n.value&&n.value.some(s=>s.maxActivations&&s.maxActivations>0));return(s,i)=>(y(),S("table",t1,[N("thead",null,[N("tr",null,[i[0]||(i[0]=N("th",{scope:"col"}," Product ",-1)),o.value?(y(),S("th",n1," Activations ")):ce("",!0),r.value?(y(),S("th",r1," Downloads ")):ce("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),S("tr",s1,i[3]||(i[3]=[N("td",{colspan:"3"}," No products found ",-1)]))):ce("",!0):(y(),S("tr",o1,[N("td",null,[Z(jt),i[1]||(i[1]=ke(" Loading products.. "))]),i[2]||(i[2]=N("td",null,null,-1))])),(y(!0),S(xe,null,sn(n.value||[],a=>(y(),S("tr",{key:a.id},[N("td",null,[N("div",null,[a.iconUrl?(y(),S("img",{key:0,src:a.iconUrl,alt:""},null,8,i1)):(y(),S("div",a1)),N("span",null,K(a.name),1)])]),a.maxActivations&&a.maxActivations>0?(y(),Se(_(sl),{key:0,as:"td"},{default:_e(()=>[Z(_(mf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[i[4]||(i[4]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(a.currentActivations)+" / "+K(a.maxActivations),1)]),_:2},1024),Z(La,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),null,{default:_e(()=>[Z(e1,{"product-id":a.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024)):o.value?(y(),S("td",l1)):ce("",!0),r.value?(y(),S("td",u1,[a.currentVersion!=null?(y(),S("div",c1,[a.downloads?(y(),Se(W_,{key:0,downloads:a.downloads},null,8,["downloads"])):ce("",!0)])):ce("",!0)])):ce("",!0)]))),128))])]))}}),f1={class:"moonbase:redeem"},p1=["data-visible"],h1={key:1,class:"moonbase:redeem-voucher"},m1={key:0},v1={key:1},g1={class:"moonbase:redeem-voucher-products"},y1=["src"],b1={key:1,class:"moonbase:image-placeholder"},_1={key:0},w1={class:"moonbase:redeem-voucher-bundle"},E1=["src"],O1={key:1,class:"moonbase:image-placeholder"},N1={key:0},S1={class:"moonbase:redeem-voucher-bundle-products"},x1={class:"shrink-0"},k1=["src"],T1={key:1,class:"moonbase:image-placeholder"},C1=fe({__name:"Redeem",setup(e){const{redeem:t}=Ig(),n=P(!1),r=P(null),o=P(null),s=P("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),S("div",f1,[Z(La,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),S("div",h1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),S("h4",m1,K(r.value.description),1)):ce("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),S("div",v1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",g1,[(y(!0),S(xe,null,sn(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),S("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,y1)):(y(),S("div",b1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),S("span",_1,"x "+K(c),1)):ce("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),S(xe,null,sn(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),S("div",{key:u.id},[N("div",w1,[N("div",null,[u.iconUrl?(y(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,E1)):(y(),S("div",O1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),S("span",N1,"x "+K(c),1)):ce("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",S1,[(y(!0),S(xe,null,sn(u.products,d=>(y(),S("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",x1,[d.iconUrl?(y(),S("img",{key:0,src:d.iconUrl,alt:""},null,8,k1)):(y(),S("div",T1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):ce("",!0)])):(y(),Se(Jn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Yn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,p1)]}),_:1}))]),_:1})]))}}),P1={class:"moonbase:customer"},D1=fe({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ie.ViewAccount:return 0;case ie.ViewProducts:return 1;case ie.RedeemVoucher:return 2}return 0}const r=P(n(t.intent));Ge(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Se(bi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",P1,[Z(_(Nb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Sb),null,{default:_e(()=>[Z(_(al),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(al),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(al),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(xb),null,{default:_e(()=>[Z(_(ll),null,{default:_e(()=>[Z(T_)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(d1)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(C1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),$1={class:"moonbase:auto-activate"},I1={key:0,class:"moonbase:loader"},A1={key:1,class:"moonbase:loader"},V1={key:2,class:"moonbase:loader"},R1={key:3},j1={key:0,class:"moonbase:auto-activate-product"},L1=["src"],M1={key:1,class:"moonbase:image-placeholder"},U1={key:1,class:"moonbase:loader"},F1={key:2,class:"moonbase:loader"},B1={key:3,class:"moonbase:loader"},H1={key:4,class:"moonbase:auto-activate-content"},Z1={key:0},q1={key:1},W1={class:"moonbase:auto-activate-cta"},z1=["href"],K1={key:2,class:"moonbase:auto-activate-trial"},G1={class:"moonbase:auto-activate-cta"},J1=fe({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=$g(o);Ge(s,O=>{var E;!a.value&&!l.value&&(O==null?void 0:O.status)===Qt.Requested&&((E=O==null?void 0:O.licenseEligibility)!=null&&E.eligible)&&c()});function m(){f(),t.show(Oe.Customer,ie.ViewProducts)}function b(){t.enqueue(Oe.Activation,ie.ActivateProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}return(O,E)=>{var T,M,C,ee;return y(),S("div",$1,[_(i)||!_(r)?(y(),S("div",I1,[Z(jt)])):_(u)?(y(),S("div",A1,K(_(u)),1)):_(s)?(y(),S("div",R1,[_(s).product?(y(),S("div",j1,[_(s).product.iconUrl?(y(),S("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,L1)):(y(),S("div",M1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):ce("",!0),((T=_(s))==null?void 0:T.status)===_(Qt).Cancelled?(y(),S("div",U1,E[2]||(E[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),S("div",F1,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((M=_(s))==null?void 0:M.status)===_(Qt).Completed?(y(),S("div",B1,E[3]||(E[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),S("div",H1,[_(n)?(C=_(n).ownedProducts)!=null&&C.includes(_(s).product.id)?(y(),S("div",q1,[E[5]||(E[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",W1,[N("button",{role:"button",class:"moonbase:button",onClick:E[0]||(E[0]=x=>m())}," Licenses "),_(s).product&&_(s).product.website?(y(),S("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,z1)):ce("",!0)])])):ce("",!0):(y(),S("div",Z1,[E[4]||(E[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(ee=_(s).trialEligibility)!=null&&ee.eligible?(y(),S("div",K1,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),S(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):ce("",!0),E[6]||(E[6]=ke(". ")),N("span",G1,[N("button",{role:"button",class:"moonbase:button",onClick:E[1]||(E[1]=x=>_(d)())}," Start trial ")])])):ce("",!0)]))])):(y(),S("div",V1," Could not find activation request "))])}}}),Y1={class:"moonbase:activation"},X1=fe({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Se(bi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",Y1,[Z(_(vi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ie).ActivateProduct?(y(),Se(J1,{key:0})):ce("",!0)])]),_:1},8,["open"]))}});function Q1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const ew={class:"moonbase:download-product"},tw={key:0,class:"moonbase:loader"},nw={key:1,class:"moonbase:loader"},rw={key:2,class:"moonbase:loader"},ow={key:3},sw={class:"moonbase:download-product-product"},iw=["src"],aw={key:1,class:"moonbase:image-placeholder"},lw={key:0},uw=["data-open"],cw={key:0,class:"moonbase:download-product-content"},dw={key:1,class:"moonbase:download-product-content"},fw={key:2,class:"moonbase:download-product-content"},pw=["data-open"],hw={key:1,role:"list"},mw={class:"moonbase:download-product-download-name"},vw=["onClick"],gw={class:"moonbase:download-product-download-description"},yw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},bw={key:2,class:"moonbase:loader"},_w=fe({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=ni(),i={[Xt.Universal]:()=>Ef,[Xt.Windows]:()=>Of,[Xt.Linux]:()=>Nf,[Xt.Mac]:()=>Sf},a=P(null),l=P([]),u=P(null),c=P(!0),d=P(!1),f=Q(()=>t.getParameter("key")),m=Q(()=>{var E,T;return(T=(E=a.value)==null?void 0:E.downloads)==null?void 0:T.filter(M=>!f.value||M.key===f.value)});Le(async()=>{const E=t.getParameter("product_id"),T=t.getParameter("version");if(!E){u.value="Link is broken";return}try{a.value=await o(E,T||void 0)}catch(M){u.value=M.message}c.value=!1});function b(){t.enqueue(Oe.Download,ie.DownloadProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}async function O(E){l.value.push(E.key),await s(E),l.value=l.value.filter(T=>T!==E.key)}return(E,T)=>{var M,C,ee,x,L;return y(),S("div",ew,[c.value||!_(r)?(y(),S("div",tw,[Z(jt)])):u.value?(y(),S("div",nw,K(u.value),1)):a.value?(y(),S("div",ow,[N("div",sw,[a.value.iconUrl?(y(),S("img",{key:0,src:a.value.iconUrl,alt:""},null,8,iw)):(y(),S("div",aw)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),S("span",lw," (pre-release)")):ce("",!0)]),N("h3",null,K(a.value.tagline),1)]),a.value.releaseDescription&&(!a.value.downloadsNeedsUser||_(n))&&(!a.value.downloadsNeedsOwnership||(C=(M=_(n))==null?void 0:M.ownedProducts)!=null&&C.includes(a.value.id))?(y(),S("button",{key:2,"data-open":d.value||void 0,onClick:T[0]||(T[0]=I=>d.value=!d.value)},T[1]||(T[1]=[N("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})],-1),N("span",null," Details ",-1)]),8,uw)):ce("",!0)]),a.value.downloadsNeedsUser&&!_(n)?(y(),S("div",cw,[T[2]||(T[2]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((x=(ee=_(n))==null?void 0:ee.ownedProducts)!=null&&x.includes(a.value.id))?(y(),S("div",dw," This product requires ownership to download ")):(y(),S("div",fw,[a.value.releaseDescription?(y(),S("div",{key:0,class:"moonbase:download-product-release-description","data-open":d.value||void 0},[N("div",null,[N("h3",null," v"+K(a.value.version||a.value.currentVersion)+" Release Notes ",1),N("p",null,K(a.value.releaseDescription),1)])],8,pw)):ce("",!0),(L=a.value)!=null&&L.downloads&&a.value.downloads.length>0?(y(),S("ul",hw,[(y(!0),S(xe,null,sn(m.value,I=>(y(),S("li",{key:I.key},[N("div",null,[N("p",mw,[N("button",{onClick:he=>O(I)},[T[3]||(T[3]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(I.name),1)],8,vw)]),N("p",gw,[(y(),Se(ha(i[I.platform]()),{"aria-hidden":"true"})),ke(" "+K(I.platform)+" ",1),T[4]||(T[4]=N("span",null," |",-1)),ke(" "+K(_(Q1)(I.size)),1)])]),N("div",null,[l.value.includes(I.key)?(y(),Se(jt,{key:0})):(y(),S("svg",yw,T[5]||(T[5]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),S("div",bw," No downloadable files found "))]))])):(y(),S("div",rw," Could not find product "))])}}}),ww={class:"moonbase:download"},Ew=fe({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Se(bi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",ww,[Z(_(vi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ie).DownloadProduct?(y(),Se(_w,{key:0})):ce("",!0)])]),_:1},8,["open"]))}}),Ow=fe({__name:"App",setup(e){const t=Ce(zo),n=Re();return Ge(()=>[n.active,n.intent],([r,o])=>{}),(r,o)=>{var s;return y(),S(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Se(hy,{key:0})):ce("",!0),Z(O_,{open:_(n).active===_(Oe).Cart},null,8,["open"]),Z(Lb,{open:_(n).active===_(Oe).Authentication},null,8,["open"]),Z(X1,{open:_(n).active===_(Oe).Activation},null,8,["open"]),Z(Ew,{open:_(n).active===_(Oe).Download},null,8,["open"]),Z(D1,{open:_(n).active===_(Oe).Customer},null,8,["open"])],64)}}});function _i(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(_i(e)&&_i(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];_i(o)&&_i(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class Nw{constructor(){Tr(this,"initialized",!1);Tr(this,"pinia");Tr(this,"storefront");Tr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(cy,n),this.storefront=Ag(t),this.pinia=sy(),vg(Ow).use(this.storefront).use(this.pinia).provide(zo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ie).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ie.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ie.ViewProducts&&(s.user?o.show(Oe.Customer,ie.ViewProducts):o.show(Oe.Cart,ie.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Oe.Authentication,ie.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Oe.Authentication,ie.ConfirmEmailChange,t):(n.show(Oe.Authentication,ie.SignIn),n.enqueue(Oe.Authentication,ie.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Oe.Customer,ie.ViewAccount):(t.show(Oe.Authentication,ie.SignIn),t.enqueue(Oe.Customer,ie.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Download,ie.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Oe.Activation,ie.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ba(this.storefront);if(t!=null&&t.product_id){const l=gd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=vd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=vd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Oe.Cart,ie.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ba(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const xf=new Nw;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=xf),kt.MoonbaseIntent=ie,kt.default=xf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
24
|
+
`));const f=Bd(c.props??{},i,l),h=Zt(c,f,!0);for(const y in f)y.startsWith("on")&&(h.props||(h.props={}),h.props[y]=f[y]);return h}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Fd(e){return e.flatMap(t=>t.type===ke?Fd(t.children):[t])}function Bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Yy(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var er=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(er||{});let tr=pe({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 rt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Xy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function Y(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function fn(e){if(Ko.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=Y(e);if(t)return t.ownerDocument}return document}const di=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),Cn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Cn||{});function fi(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(di)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Hd(e,t=0){var n;return e===((n=fn(e))==null?void 0:n.body)?!1:Qe(t,{0(){return e.matches(di)},1(){let r=e;for(;r!==null;){if(r.matches(di))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Nr(e){e==null||e.focus({preventScroll:!0})}const Qy=["textarea","input"].join(",");function eb(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Qy))??!1}function Jr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function at(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Jr(e):e:fi(e);o.length>0&&i.length>1&&(i=i.filter(h=>!o.includes(h))),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 h=l+c;if(t&16)h=(h+d)%d;else{if(h<0)return 3;if(h>=d)return 1}f=i[h],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&eb(f)&&f.select(),2}let xr=[];Xy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||xr[0]===t.target)return;let n=t.target;n=n.closest(di),xr.unshift(n??t.target),xr=xr.filter(r=>r!=null&&r.isConnected),xr.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 pi(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=Y(n);r instanceof HTMLElement&&t.add(r)}return t}var qd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qd||{});const Go=Object.assign(pe({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=J(()=>fn(o)),i=$(!1);Re(()=>i.value=!0),dt(()=>i.value=!1),nb({ownerDocument:s},J(()=>i.value&&!!(e.features&16)));const a=rb({ownerDocument:s,container:o,initialFocus:J(()=>e.initialFocus)},J(()=>i.value&&!!(e.features&2)));ob({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},J(()=>i.value&&!!(e.features&8)));const l=Ya();function u(h){const y=Y(o);if(!y)return;(b=>b())(()=>{Qe(l.value,{[Dt.Forwards]:()=>{at(y,We.First,{skipElements:[h.relatedTarget]})},[Dt.Backwards]:()=>{at(y,We.Last,{skipElements:[h.relatedTarget]})}})})}const c=$(!1);function d(h){h.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(h){if(!i.value)return;const y=Zd(e.containers);Y(o)instanceof HTMLElement&&y.add(Y(o));const O=h.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Wd(y,O)||(c.value?at(Y(o),Qe(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&Nr(h.target)))}return()=>{const h={},y={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:b,containers:k,...R}=e;return Ue(ke,[!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable}),rt({ourProps:y,theirProps:{...t,...R},slot:h,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable})])}}}),{features:qd});function tb(e){const t=$(xr.slice());return Ge([e],([n],[r])=>{r===!0&&n===!1?pi(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=xr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function nb({ownerDocument:e},t){const n=tb(t);Re(()=>{pt(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Nr(n())},{flush:"post"})}),dt(()=>{t.value&&Nr(n())})}function rb({ownerDocument:e,container:t,initialFocus:n},r){const o=$(null),s=$(!1);return Re(()=>s.value=!0),dt(()=>s.value=!1),Re(()=>{Ge([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=Y(t);l&&pi(()=>{var d,f;if(!s.value)return;const u=Y(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Nr(u):at(l,We.First|We.NoScroll)===Cn.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 ob({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Zd(n);Y(t)instanceof HTMLElement&&a.add(Y(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Wd(a,u)?(r.value=u,Nr(u)):(i.preventDefault(),i.stopPropagation(),Nr(l)):Nr(r.value)},!0)}function Wd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function sb(e){let t=Bh(e.getSnapshot());return dt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Jo(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return pi(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Jo();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function ib(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 ab(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function lb(){return/Android/gi.test(window.navigator.userAgent)}function ub(){return zd()||lb()}function cb(){return zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Jo();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 db(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function fb(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const Sr=ib(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Jo(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:fb(n)},o=[cb(),ab(),db()];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)}});Sr.subscribe(()=>{const e=Sr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Sr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Sr.dispatch("TEARDOWN",n)}});function pb(e,t,n){const r=sb(Sr),o=J(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Ge([e,t],([s,i],[a],l)=>{if(!s||!i)return;Sr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(Sr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let hb=0;function mb(){return++hb}function Lt(){return mb()}const el=new Map,Yo=new Map;function Kd(e,t=$(!0)){pt(n=>{if(!t.value)return;const r=Y(e);if(!r)return;n(()=>{if(!r)return;const s=Yo.get(r)??1;if(s===1?Yo.delete(r):Yo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Yo.get(r)??0;Yo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Xo(e,t,n,r){Ko.isServer||pt(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Gd=30;function Jd(e,t,n=J(()=>!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:Y(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=$(null);Xo(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),Xo(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),Xo(n,"click",i=>{ub()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Xo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Xo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Gd||Math.abs(a.y-s.y)>=Gd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ud(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Yd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=$(null),o=fn(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(Y(r))||u.contains((l=(a=Y(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(tr,{features:er.Hidden,ref:r})}}}let Xd=Symbol("Context");var lt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(lt||{});function vb(){return hi()!==null}function hi(){return Se(Xd,null)}function Qd(e){ft(Xd,e)}const ef=Symbol("ForcePortalRootContext");function gb(){return Se(ef,!1)}const tf=pe({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return ft(ef,e.force),()=>{const{force:r,...o}=e;return rt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let nf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function yb(){return Se(nf,()=>{})}function bb({type:e,enabled:t,element:n,onUpdate:r}){let o=yb();function s(...i){r==null||r(...i),o(...i)}Re(()=>{Ge(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),dt(()=>{t.value&&s(1,e,n)}),ft(nf,s)}var ot=(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))(ot||{});let _b=Symbol("DescriptionContext");function wb({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 ft(_b,{register:o,slot:e,name:t,props:n}),J(()=>r.value.length>0?r.value.join(" "):void 0)}function rf(e){const t=fn(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 Eb=pe({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$(null);J(()=>fn(r));const o=gb(),s=Se(sf,null),i=$(o===!0||s==null?rf(r.value):s.resolveTarget()),a=$(!1);Re(()=>{a.value=!0}),pt(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Se(nl,null);let u=!1;const c=Gs();return Ge(r,()=>{if(u||!l)return;const d=Y(r);d&&(dt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(_m,{to:i.value},rt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function of(){const e=Se(nl,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,pe({name:"PortalWrapper",setup(s,{slots:i}){return ft(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let sf=Symbol("PortalGroupContext");const Ob=pe({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=No({resolveTarget(){return e.target}});return ft(sf,r),()=>{const{target:o,...s}=e;return rt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function mi(e){const t=Se(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,mi),n}return t}const vi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",af=pe({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:vi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var me;const s=$(!1);Re(()=>{s.value=!0});let i=!1;const a=J(()=>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=hi(),c=J(()=>e.open===vi&&u!==null?(u.value<.Open)===lt.Open:e.open),d=$(null),f=J(()=>fn(d));if(o({el:d,$el:d}),!(e.open!==vi||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===vi?void 0:e.open}`);const y=J(()=>s.value&&c.value?0:1),O=J(()=>y.value===0),b=$(null),k={titleId:b,panelRef:$(null),dialogState:y,setTitleId(oe){b.value!==oe&&(b.value=oe)},close(){t("close",!1)}},R=J(()=>l.value>1),T=Se(rl,null)!==null,[P,E]=of(),{resolveContainers:I,mainTreeNodeRef:D,MainTreeNode:de}=Yd({portals:P,defaultContainers:[J(()=>k.panelRef.value??d.value)]}),W=J(()=>R.value?"parent":"leaf"),L=J(()=>u!==null?(u.value<.Closing)===lt.Closing:!1),M=J(()=>T||L.value?!1:O.value),V=J(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(Y(D))&&Fe instanceof HTMLElement)??null});Kd(V,M);const ae=J(()=>R.value?!0:O.value),$e=J(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(Y(D))&&Fe instanceof HTMLElement)??null});Kd($e,ae),bb({type:"Dialog",enabled:J(()=>y.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Qe(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const N=wb({name:"DialogDescription",slot:J(()=>({open:c.value}))});ft(rl,k);const A=J(()=>!(!O.value||R.value));Jd(I,(oe,Fe)=>{oe.preventDefault(),k.close(),Co(()=>Fe==null?void 0:Fe.focus())},A);const Q=J(()=>!(R.value||y.value!==0));Ja((me=f.value)==null?void 0:me.defaultView,"keydown",oe=>{Q.value&&(oe.defaultPrevented||oe.key===ot.Escape&&(oe.preventDefault(),oe.stopPropagation(),k.close()))});const re=J(()=>!(L.value||y.value!==0||T));return pb(f,re,oe=>({containers:[...oe.containers??[],I]})),pt(oe=>{if(y.value!==0)return;const Fe=Y(d);if(!Fe)return;const mt=new ResizeObserver(Be=>{for(const St of Be){const nr=St.target.getBoundingClientRect();nr.x===0&&nr.y===0&&nr.width===0&&nr.height===0&&k.close()}});mt.observe(Fe),oe(()=>mt.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:mt,...Be}=e,St={...n,ref:d,id:oe,role:a.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":b.value,"aria-describedby":N.value},nr={open:y.value===0};return Ue(tf,{force:!0},()=>[Ue(Eb,()=>Ue(Ob,{target:d.value},()=>Ue(tf,{force:!1},()=>Ue(Go,{initialFocus:mt,containers:I,features:O.value?Qe(W.value,{parent:Go.features.RestoreFocus,leaf:Go.features.All&~Go.features.FocusLock}):Go.features.None},()=>Ue(E,{},()=>rt({ourProps:St,theirProps:{...Be,...n},slot:nr,attrs:n,slots:r,visible:y.value===0,features:Xn.RenderStrategy|Xn.Static,name:"Dialog"})))))),Ue(de)])}}}),lf=pe({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=mi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return rt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),uf=pe({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=mi("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 rt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),gi=pe({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=mi("DialogTitle");return Re(()=>{r.setTitleId(e.id),dt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return rt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function cf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function df(e,t){let n=$(cf(e.value.type,e.value.as));return Re(()=>{n.value=cf(e.value.type,e.value.as)}),pt(()=>{var r;n.value||Y(t)&&Y(t)instanceof HTMLButtonElement&&!((r=Y(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const ff=Symbol("PopoverContext");function ol(e){const t=Se(ff,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const Nb=Symbol("PopoverGroupContext");function pf(){return Se(Nb,null)}const hf=Symbol("PopoverPanelContext");function xb(){return Se(hf,null)}let sl=pe({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var P;const o=$(null);r({el:o,$el:o});const s=$(1),i=$(null),a=$(null),l=$(null),u=$(null),c=J(()=>fn(o)),d=J(()=>{var M,V;if(!Y(i)||!Y(u))return!1;for(const ae of document.querySelectorAll("body > *"))if(Number(ae==null?void 0:ae.contains(Y(i)))^Number(ae==null?void 0:ae.contains(Y(u))))return!0;const E=fi(),I=E.indexOf(Y(i)),D=(I+E.length-1)%E.length,de=(I+1)%E.length,W=E[D],L=E[de];return!((M=Y(u))!=null&&M.contains(W))&&!((V=Y(u))!=null&&V.contains(L))}),f={popoverState:s,buttonId:$(null),panelId:$(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Qe(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(E){f.closePopover();const I=E?E instanceof HTMLElement?E:E.value instanceof HTMLElement?Y(E):Y(f.button):Y(f.button);I==null||I.focus()}};ft(ff,f),Qd(J(()=>Qe(s.value,{0:lt.Open,1:lt.Closed})));const h={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},y=pf(),O=y==null?void 0:y.registerPopover,[b,k]=of(),R=Yd({mainTreeNodeRef:y==null?void 0:y.mainTreeNodeRef,portals:b,defaultContainers:[i,u]});function T(){var E,I,D;return(y==null?void 0:y.isFocusWithinPopoverGroup())??(((E=c.value)==null?void 0:E.activeElement)&&(((I=Y(i))==null?void 0:I.contains(c.value.activeElement))||((D=Y(u))==null?void 0:D.contains(c.value.activeElement))))}return pt(()=>O==null?void 0:O(h)),Ja((P=c.value)==null?void 0:P.defaultView,"focus",E=>{var I,D;E.target!==window&&E.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(R.contains(E.target)||(I=Y(f.beforePanelSentinel))!=null&&I.contains(E.target)||(D=Y(f.afterPanelSentinel))!=null&&D.contains(E.target)||f.closePopover()))},!0),Jd(R.resolveContainers,(E,I)=>{var D;f.closePopover(),Hd(I,Qa.Loose)||(E.preventDefault(),(D=Y(i))==null||D.focus())},J(()=>s.value===0)),()=>{const E={open:s.value===0,close:f.close};return Ue(ke,[Ue(k,{},()=>rt({theirProps:{...e,...n},ourProps:{ref:o},slot:E,slots:t,attrs:n,name:"Popover"})),Ue(R.MainTreeNode)])}}});const mf=pe({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=J(()=>fn(o.button));r({el:o.button,$el:o.button}),Re(()=>{o.buttonId.value=e.id}),dt(()=>{o.buttonId.value=null});const i=pf(),a=i==null?void 0:i.closeOthers,l=xb(),u=J(()=>l===null?!1:l.value===o.panelId.value),c=$(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||pt(()=>{o.button.value=Y(c)});const f=df(J(()=>({as:e.as,type:t.type})),c);function h(T){var P,E,I,D,de;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case ot.Space:case ot.Enter:T.preventDefault(),(E=(P=T.target).click)==null||E.call(P),o.closePopover(),(I=Y(o.button))==null||I.focus();break}}else switch(T.key){case ot.Space:case ot.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case ot.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!Y(o.button)||(D=s.value)!=null&&D.activeElement&&!((de=Y(o.button))!=null&&de.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function y(T){u.value||T.key===ot.Space&&T.preventDefault()}function O(T){var P,E;e.disabled||(u.value?(o.closePopover(),(P=Y(o.button))==null||P.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(E=Y(o.button))==null||E.focus()))}function b(T){T.preventDefault(),T.stopPropagation()}const k=Ya();function R(){const T=Y(o.panel);if(!T)return;function P(){Qe(k.value,{[Dt.Forwards]:()=>at(T,We.First),[Dt.Backwards]:()=>at(T,We.Last)})===Cn.Error&&at(fi().filter(I=>I.dataset.moonbaseFocusGuard!=="true"),Qe(k.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:Y(o.button)})}P()}return()=>{const T=o.popoverState.value===0,P={open:T},{id:E,...I}=e,D=u.value?{ref:c,type:f.value,onKeydown:h,onClick:O}:{ref:c,id:E,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":Y(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:h,onKeyup:y,onClick:O,onMousedown:b};return Ue(ke,[rt({ourProps:D,theirProps:{...t,...I},slot:P,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(tr,{id:d,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:R})])}}}),vf=pe({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=J(()=>fn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Re(()=>{s.panelId.value=e.id}),dt(()=>{s.panelId.value=null}),ft(hf,s.panelId),pt(()=>{var k,R;if(!o||s.popoverState.value!==0||!s.panel)return;const b=(k=i.value)==null?void 0:k.activeElement;(R=Y(s.panel))!=null&&R.contains(b)||at(Y(s.panel),We.First)});const u=hi(),c=J(()=>u!==null?(u.value<.Open)===lt.Open:s.popoverState.value===0);function d(b){var k,R;switch(b.key){case ot.Escape:if(s.popoverState.value!==0||!Y(s.panel)||i.value&&!((k=Y(s.panel))!=null&&k.contains(i.value.activeElement)))return;b.preventDefault(),b.stopPropagation(),s.closePopover(),(R=Y(s.button))==null||R.focus();break}}function f(b){var R,T,P,E,I;const k=b.relatedTarget;k&&Y(s.panel)&&((R=Y(s.panel))!=null&&R.contains(k)||(s.closePopover(),((P=(T=Y(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&P.call(T,k)||(I=(E=Y(s.afterPanelSentinel))==null?void 0:E.contains)!=null&&I.call(E,k))&&k.focus({preventScroll:!0})))}const h=Ya();function y(){const b=Y(s.panel);if(!b)return;function k(){Qe(h.value,{[Dt.Forwards]:()=>{var T;at(b,We.First)===Cn.Error&&((T=Y(s.afterPanelSentinel))==null||T.focus())},[Dt.Backwards]:()=>{var R;(R=Y(s.button))==null||R.focus({preventScroll:!0})}})}k()}function O(){const b=Y(s.panel);if(!b)return;function k(){Qe(h.value,{[Dt.Forwards]:()=>{const R=Y(s.button),T=Y(s.panel);if(!R)return;const P=fi(),E=P.indexOf(R),I=P.slice(0,E+1),de=[...P.slice(E+1),...I];for(const W of de.slice())if(W.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(W)){const L=de.indexOf(W);L!==-1&&de.splice(L,1)}at(de,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var T;at(b,We.Previous)===Cn.Error&&((T=Y(s.button))==null||T.focus())}})}k()}return()=>{const b={open:s.popoverState.value===0,close:s.close},{id:k,focus:R,...T}=e,P={ref:s.panel,id:k,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return rt({ourProps:P,theirProps:{...t,...T},attrs:t,slot:b,slots:{...n,default:(...E)=>{var I;return[Ue(ke,[c.value&&s.isPortalled.value&&Ue(tr,{id:a,ref:s.beforePanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:y}),(I=n.default)==null?void 0:I.call(n,...E),c.value&&s.isPortalled.value&&Ue(tr,{id:l,ref:s.afterPanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Xn.RenderStrategy|Xn.Static,visible:c.value,name:"PopoverPanel"})}}});let Sb=pe({props:{onFocus:{type:Function,required:!0}},setup(e){let t=$(!0);return()=>t.value?Ue(tr,{as:"button",type:"button",features:er.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const gf=Symbol("TabsContext");function Qo(e){const t=Se(gf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qo),n}return t}const il=Symbol("TabsSSRContext"),kb=pe({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=J(()=>e.selectedIndex!==null),l=J(()=>a.value?e.selectedIndex:o.value);function u(y){const O=Jr(c.tabs.value,Y),b=Jr(c.panels.value,Y),k=O.filter(R=>{var T;return!((T=Y(R))!=null&&T.hasAttribute("disabled"))});if(y<0||y>O.length-1){const R=Qe(o.value===null?0:Math.sign(y-o.value),{[-1]:()=>1,0:()=>Qe(Math.sign(y),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Qe(R,{0:()=>O.indexOf(k[0]),1:()=>O.indexOf(k[k.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=b}else{const R=O.slice(0,y),P=[...O.slice(y),...R].find(I=>k.includes(I));if(!P)return;let E=O.indexOf(P)??c.selectedIndex.value;E===-1&&(E=c.selectedIndex.value),o.value=E,c.tabs.value=O,c.panels.value=b}}let c={selectedIndex:J(()=>o.value??e.defaultIndex??null),orientation:J(()=>e.vertical?"vertical":"horizontal"),activation:J(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(y){l.value!==y&&r("change",y),a.value||u(y)},registerTab(y){if(s.value.includes(y))return;const O=s.value[o.value];if(s.value.push(y),s.value=Jr(s.value,Y),!a.value){const b=s.value.indexOf(O)??o.value;b!==-1&&(o.value=b)}},unregisterTab(y){const O=s.value.indexOf(y);O!==-1&&s.value.splice(O,1)},registerPanel(y){i.value.includes(y)||(i.value.push(y),i.value=Jr(i.value,Y))},unregisterPanel(y){const O=i.value.indexOf(y);O!==-1&&i.value.splice(O,1)}};ft(gf,c);const d=$({tabs:[],panels:[]}),f=$(!1);Re(()=>{f.value=!0}),ft(il,J(()=>f.value?null:d.value));const h=J(()=>e.selectedIndex);return Re(()=>{Ge([h],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),pt(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const y=Jr(c.tabs.value,Y);y.some((b,k)=>Y(c.tabs.value[k])!==Y(b))&&c.setSelectedIndex(y.findIndex(b=>Y(b)===Y(c.tabs.value[l.value])))}),()=>{const y={selectedIndex:o.value};return Ue(ke,[s.value.length<=0&&Ue(Sb,{onFocus:()=>{for(const O of s.value){const b=Y(O);if((b==null?void 0:b.tabIndex)===0)return b.focus(),!0}return!1}}),rt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:y,slots:t,attrs:n,name:"TabGroup"})])}}}),Cb=pe({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Qo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return rt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=pe({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("Tab"),s=$(null);r({el:s,$el:s}),Re(()=>o.registerTab(s)),dt(()=>o.unregisterTab(s));const i=Se(il),a=J(()=>{if(i.value){const b=i.value.tabs.indexOf(e.id);return b===-1?i.value.tabs.push(e.id)-1:b}return-1}),l=J(()=>{const b=o.tabs.value.indexOf(s);return b===-1?a.value:b}),u=J(()=>l.value===o.selectedIndex.value);function c(b){var R;const k=b();if(k===Cn.Success&&o.activation.value==="auto"){const T=(R=fn(s))==null?void 0:R.activeElement,P=o.tabs.value.findIndex(E=>Y(E)===T);P!==-1&&o.setSelectedIndex(P)}return k}function d(b){const k=o.tabs.value.map(T=>Y(T)).filter(Boolean);if(b.key===ot.Space||b.key===ot.Enter){b.preventDefault(),b.stopPropagation(),o.setSelectedIndex(l.value);return}switch(b.key){case ot.Home:case ot.PageUp:return b.preventDefault(),b.stopPropagation(),c(()=>at(k,We.First));case ot.End:case ot.PageDown:return b.preventDefault(),b.stopPropagation(),c(()=>at(k,We.Last))}if(c(()=>Qe(o.orientation.value,{vertical(){return b.key===ot.ArrowUp?at(k,We.Previous|We.WrapAround):b.key===ot.ArrowDown?at(k,We.Next|We.WrapAround):Cn.Error},horizontal(){return b.key===ot.ArrowLeft?at(k,We.Previous|We.WrapAround):b.key===ot.ArrowRight?at(k,We.Next|We.WrapAround):Cn.Error}}))===Cn.Success)return b.preventDefault()}const f=$(!1);function h(){var b;f.value||(f.value=!0,!e.disabled&&((b=Y(s))==null||b.focus({preventScroll:!0}),o.setSelectedIndex(l.value),pi(()=>{f.value=!1})))}function y(b){b.preventDefault()}const O=df(J(()=>({as:e.as,type:t.type})),s);return()=>{var P;const b={selected:u.value,disabled:e.disabled??!1},{id:k,...R}=e,T={ref:s,onKeydown:d,onMousedown:y,onClick:h,id:k,role:"tab",type:O.value,"aria-controls":(P=Y(o.panels.value[l.value]))==null?void 0:P.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return rt({ourProps:T,theirProps:R,slot:b,attrs:t,slots:n,name:"Tab"})}}}),Tb=pe({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Qo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return rt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=pe({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("TabPanel"),s=$(null);r({el:s,$el:s}),Re(()=>o.registerPanel(s)),dt(()=>o.unregisterPanel(s));const i=Se(il),a=J(()=>{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=J(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=J(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...h}=e,y={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=Y(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(tr,{as:"span","aria-hidden":!0,...y}):rt({ourProps:y,theirProps:h,slot:c,attrs:t,slots:n,features:Xn.Static|Xn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function Pb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function yi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Db(e,t){const n=Jo();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function yf(e,t,n,r,o,s){const i=Jo(),a=s!==void 0?Pb(s):()=>{};return yi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{yi(e,...n),ul(e,...r),i.add(Db(e,l=>(yi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>yi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function kr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function $b(){return Se(dl,null)!==null}function Ib(){const e=Se(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Ab(){const e=Se(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function bi(e){return"children"in e?bi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bf(e){const t=$([]),n=$(!1);Re(()=>n.value=!0),dt(()=>n.value=!1);function r(s,i=Qn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Qe(i,{[Qn.Unmount](){t.value.splice(a,1)},[Qn.Hidden](){t.value[a].state="hidden"}}),!bi(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,Qn.Unmount)}return{children:t,register:o,unregister:r}}const _f=Xn.RenderStrategy,es=pe({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|=lt.Opening,t("beforeEnter")}function a(){s.value&=~lt.Opening,t("afterEnter")}function l(){s.value|=lt.Closing,t("beforeLeave")}function u(){s.value&=~lt.Closing,t("afterLeave")}if(!$b()&&vb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=$(null),d=J(()=>e.unmount?Qn.Unmount:Qn.Hidden);o({el:c,$el:c});const{show:f,appear:h}=Ib(),{register:y,unregister:O}=Ab(),b=$(f.value?"visible":"hidden"),k={value:!0},R=Lt(),T={value:!1},P=bf(()=>{!T.value&&b.value!=="hidden"&&(b.value="hidden",O(R),u())});Re(()=>{const ae=y(R);dt(ae)}),pt(()=>{if(d.value===Qn.Hidden&&R){if(f.value&&b.value!=="visible"){b.value="visible";return}Qe(b.value,{hidden:()=>O(R),visible:()=>y(R)})}});const E=kr(e.enter),I=kr(e.enterFrom),D=kr(e.enterTo),de=kr(e.entered),W=kr(e.leave),L=kr(e.leaveFrom),M=kr(e.leaveTo);Re(()=>{pt(()=>{if(b.value==="visible"){const ae=Y(c);if(ae instanceof Comment&&ae.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function V(ae){const $e=k.value&&!h.value,N=Y(c);!N||!(N instanceof HTMLElement)||$e||(T.value=!0,f.value&&i(),f.value||l(),ae(f.value?yf(N,E,I,D,de,A=>{T.value=!1,A===cl.Finished&&a()}):yf(N,W,L,M,de,A=>{T.value=!1,A===cl.Finished&&(bi(P)||(b.value="hidden",O(R),u()))})))}return Re(()=>{Ge([f],(ae,$e,N)=>{V(N),k.value=!1},{immediate:!0})}),ft(fl,P),Qd(J(()=>Qe(b.value,{visible:lt.Open,hidden:lt.Closed})|s.value)),()=>{const{appear:ae,show:$e,enter:N,enterFrom:A,enterTo:Q,entered:re,leave:me,leaveFrom:oe,leaveTo:Fe,...mt}=e,Be={ref:c},St={...mt,...h.value&&f.value&&Ko.isServer?{class:ws([n.class,mt.class,...E,...I])}:{}};return rt({theirProps:St,ourProps:Be,slot:{},slots:r,attrs:n,features:_f,visible:b.value==="visible",name:"TransitionChild"})}}}),Vb=es,pl=pe({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=hi(),s=J(()=>e.show===null&&o!==null?(o.value<.Open)===lt.Open:e.show);pt(()=>{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=bf(()=>{i.value="hidden"}),l=$(!0),u={show:s,appear:J(()=>e.appear||!l.value)};return Re(()=>{pt(()=>{l.value=!1,s.value?i.value="visible":bi(a)||(i.value="hidden")})}),ft(fl,a),ft(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return rt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue(Vb,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:_f,visible:i.value==="visible",name:"Transition"})}}}),Rb={class:"moonbase:modal-container"},_i=pe({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),xe(w(pl),{as:"template",show:t.open},{default:_e(()=>[q(w(af),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[x("div",Rb,[q(w(es),{as:"template"},{default:_e(()=>[q(w(lf),{class:"moonbase:modal-overlay"})]),_:1}),q(w(es),{as:"template"},{default:_e(()=>[q(w(uf),{class:"moonbase:modal-content"},{default:_e(()=>[va(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),jb=["data-visible"],Lb=pe({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=je(),o=wt(),s=Se(zo),i=$(r.getParameter("email")??""),a=$(""),l=$(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);zt(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof Vn?l.value="User not found":l.value=c.message,c}}return(c,d)=>(_(),xe(Jn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[q(Et,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),q(Et,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=h=>a.value=h),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(Yn,{success:"Signed in",label:"Sign in",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!l.value||void 0},G(l.value),9,jb),(f=w(s))!=null&&f.auth.enable.signUp?(_(),S("button",{key:0,type:"button",onClick:d[2]||(d[2]=h=>w(r).show(w(Oe).Authentication,w(ie).SignUp,{email:i.value}))}," Create account ")):ce("",!0),x("button",{type:"button",onClick:d[3]||(d[3]=h=>w(r).show(w(Oe).Authentication,w(ie).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}});function wf(...e){}const Mb={class:"moonbase:authentication"},Ub={key:0,class:"moonbase:loader"},Fb=pe({__name:"Authentication",props:{open:{type:Boolean}},setup(e){const t=je(),{loaded:n}=wt(),r=J(()=>{switch(t.intent){case ie.SignIn:return"Sign in";case ie.SignUp:return"Sign up";case ie.ConfirmAccount:return"Confirm account";case ie.ConfirmEmailChange:return"Confirm email change";case ie.ForgotPassword:return"Forgot password";case ie.ResetPassword:return"Reset password"}return"Authentication"}),o=J(()=>{if(t.intent===ie.SignIn&&t.next){const[i,a,l]=t.next;if(i===Oe.Authentication&&a===ie.ConfirmEmailChange)return"to confirm email"}return null});function s(){t.reset()}return(i,a)=>(_(),xe(_i,{open:i.open,onClose:s},{default:_e(()=>[x("div",Mb,[q(w(gi),{as:"h3"},{default:_e(()=>[Ce(G(r.value)+" "+G(o.value),1)]),_:1}),w(n)?w(t).intent===w(ie).SignIn?(_(),xe(Lb,{key:1,onSignedIn:a[0]||(a[0]=l=>w(t).dequeue())})):w(t).intent===w(ie).SignUp?(_(),xe(jy,{key:2,onSignedUp:a[1]||(a[1]=l=>w(t).show(w(Oe).Customer,w(ie).ViewAccount))})):w(t).intent===w(ie).ConfirmAccount?(_(),xe(Fy,{key:3,onConfirmedAccount:a[2]||(a[2]=l=>w(t).show(w(Oe).Customer,w(ie).ViewAccount))})):w(t).intent===w(ie).ConfirmEmailChange?(_(),xe(Gy,{key:4})):w(t).intent===w(ie).ForgotPassword?(_(),xe(Hy,{key:5})):w(t).intent===w(ie).ResetPassword?(_(),xe(qy,{key:6,onPasswordReset:a[3]||(a[3]=l=>w(t).show(w(Oe).Customer,w(ie).ViewAccount))})):ce("",!0):(_(),S("div",Ub,[q(jt)]))])]),_:1},8,["open"]))}});function Kt(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Bb={class:"moonbase:product-cart-item"},Hb=["src"],Zb={key:1,class:"moonbase:image-placeholder"},qb={class:"moonbase:product-cart-item-content"},Wb={key:0,class:"moonbase:cart-item-discount"},zb={class:"font-semibold"},Kb={key:0,class:"ml-0.5"},Gb={key:2,class:"moonbase:product-cart-item-total"},Jb={key:0,class:"moonbase:discount"},Yb={key:1},Xb=pe({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return _(),S("div",Bb,[(r=t.lineItem.product)!=null&&r.iconUrl?(_(),S("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Hb)):(_(),S("div",Zb)),x("div",qb,[x("h3",null,G((o=t.lineItem.product)==null?void 0:o.name),1),x("p",null,G((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(_(),S("p",Wb,[n[0]||(n[0]=Ce(" Discount applied: ")),x("span",zb,G(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(_(),S("span",Kb," (-"+G(w(Kt)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):ce("",!0)])):ce("",!0),x("p",null,G(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(_(),S("div",Gb,[t.lineItem.variation.hasDiscount?(_(),S("span",Jb,G(w(Kt)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):ce("",!0),t.lineItem.quantity!==1?(_(),S("span",Yb,G(t.lineItem.quantity)+" x "+G(w(Kt)(t.lineItem.variation.price[t.currency],t.currency)),1)):ce("",!0),Ce(" "+G(w(Kt)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):ce("",!0)])}}}),Qb={class:"moonbase:bundle-cart-item"},e_=["src"],t_={key:1,class:"moonbase:image-placeholder"},n_={class:"moonbase:bundle-cart-item-content"},r_={key:0,class:"moonbase:cart-item-discount"},o_={class:"font-semibold"},s_={key:0,class:"ml-0.5"},i_={class:"moonbase:bundle-cart-item-summary"},a_=["data-open"],l_={key:2,class:"moonbase:product-cart-item-total"},u_={key:0,class:"moonbase:discount"},c_={key:1},d_=["src"],f_={key:1,class:"moonbase:image-placeholder"},p_=["data-included"],h_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},m_={key:0,class:"truncate italic"},v_={key:1,class:"truncate"},g_=pe({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=$(!1),n=$(null);return Ge(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 _(),S("div",null,[x("div",Qb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(_(),S("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,e_)):(_(),S("div",t_)),x("div",n_,[x("h3",null,G((i=r.lineItem.bundle)==null?void 0:i.name),1),x("p",null,G((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(_(),S("p",r_,[o[1]||(o[1]=Ce(" Discount applied: ")),x("span",o_,G(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(_(),S("span",s_," (-"+G(w(Kt)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):ce("",!0)])):ce("",!0),x("div",i_,[x("span",null,G(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(_(),S("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[x("span",null,[Ce(" Including "+G((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)?(_(),S(ke,{key:0},[Ce("of "+G((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):ce("",!0),o[2]||(o[2]=Ce(" products "))]),(_(),S("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,a_))])):ce("",!0)])]),r.lineItem.variation?(_(),S("div",l_,[r.lineItem.variation.hasDiscount?(_(),S("span",u_,G(w(Kt)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):ce("",!0),r.lineItem.quantity!==1?(_(),S("span",c_,G(r.lineItem.quantity)+" x "+G(w(Kt)(r.lineItem.variation.price[r.currency],r.currency)),1)):ce("",!0),Ce(" "+G(w(Kt)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):ce("",!0)]),x("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(_(!0),S(ke,null,an(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(_(),S("div",{key:f.id},[f!=null&&f.iconUrl?(_(),S("img",{key:0,src:f.iconUrl,alt:""},null,8,d_)):(_(),S("div",f_)),x("div",null,[x("h3",{"data-included":f.included||void 0},[f.included?(_(),S("svg",h_,o[4]||(o[4]=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):ce("",!0),Ce(" "+G(f==null?void 0:f.name),1)],8,p_),f.included?f!=null&&f.tagline?(_(),S("p",v_,G(f.tagline),1)):ce("",!0):(_(),S("p",m_," You already own this "))])]))),128))],512)])}}}),y_={class:"moonbase:cart-modal-container"},b_=pe({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),xe(w(pl),{as:"template",show:t.open},{default:_e(()=>[q(w(af),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[x("div",y_,[q(w(es),{as:"template"},{default:_e(()=>[q(w(lf),{class:"moonbase:cart-modal-overlay"})]),_:1}),q(w(es),{as:"template"},{default:_e(()=>[q(w(uf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[va(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),__=["disabled","data-success","data-error","data-working","data-variant"],w_=["data-visible"],Ef=pe({__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=J(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await zt(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(a,l)=>(_(),S("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[x("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(_(),xe(jt,{key:0})):ce("",!0)],8,w_),Ce(" "+G(s.value),1)],8,__))}}),E_={class:"moonbase:cart"},O_={key:0,role:"list",class:"moonbase:cart-items"},N_={key:1,class:"moonbase:cart-empty"},x_={key:2,class:"moonbase:cart-total"},S_=pe({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=je(),{items:n,total:r,currency:o,checkout:s}=ri(),i=Se(zo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(_(),xe(b_,{open:l.open,onClose:u[0]||(u[0]=c=>w(t).reset())},{default:_e(()=>[x("div",E_,[q(w(gi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[Ce(" Cart ")])),_:1}),w(n).length>0?(_(),S("ul",O_,[(_(!0),S(ke,null,an(w(n),c=>(_(),S("li",{key:c.id},[c.type==="Product"?(_(),xe(Xb,{key:0,"line-item":c,currency:w(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(_(),xe(g_,{key:1,"line-item":c,currency:w(o)},null,8,["line-item","currency"])):ce("",!0)]))),128))])):(_(),S("div",N_," Your cart is empty! ")),w(n).length>0?(_(),S("div",x_,[u[2]||(u[2]=x("label",null," Total ",-1)),x("span",null,G(w(Kt)(w(r).amount,w(r).currency)),1),u[3]||(u[3]=x("p",null," Sales tax to be calculated at checkout ",-1))])):ce("",!0),w(n).length>0?(_(),xe(Ef,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):ce("",!0)])]),_:1},8,["open"]))}}),k_={class:"moonbase:account"},C_={key:0,class:"moonbase:error"},T_={key:1,class:"moonbase:notification"},P_={key:0,class:"moonbase:error"},D_=pe({__name:"Account",setup(e){var R,T,P;const t=je(),{user:n,update:r,setPassword:o,signOut:s}=wt(),i=$(((R=n.value)==null?void 0:R.name)??""),a=$(((T=n.value)==null?void 0:T.email)??""),l=$(((P=n.value)==null?void 0:P.communicationPreferences)??{newsletterOptIn:!1}),u=$(null),c=$(!1),d=$(""),f=$(""),h=$(null),y=$(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(E){throw u.value=E,E}}async function b(){h.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(E){throw h.value=E,E}}async function k(){y.value=!0,await s(),t.reset()}return(E,I)=>(_(),S("div",k_,[q(Jn,{handler:O},{default:_e(()=>[q(Et,{modelValue:i.value,"onUpdate:modelValue":I[0]||(I[0]=D=>i.value=D),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),q(Et,{modelValue:a.value,"onUpdate:modelValue":I[1]||(I[1]=D=>a.value=D),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),q(Md,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":I[2]||(I[2]=D=>l.value.newsletterOptIn=D),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),q(Yn,{label:"Save",error:"Error",success:"Saved"}),u.value?(_(),S("p",C_,G(u.value.message),1)):c.value?(_(),S("p",T_," You need to confirm your new email address, please check your inbox ")):ce("",!0)]),_:1}),q(Jn,{handler:b},{default:_e(()=>[q(Et,{modelValue:d.value,"onUpdate:modelValue":I[3]||(I[3]=D=>d.value=D),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),q(Et,{modelValue:f.value,"onUpdate:modelValue":I[4]||(I[4]=D=>f.value=D),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),q(Yn,{label:"Save",error:"Error",success:"Saved"}),h.value?(_(),S("p",P_,G(h.value.message),1)):ce("",!0)]),_:1}),q(Ef,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:k})]))}}),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return _(),S("svg",I_,t[0]||(t[0]=[x("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Of=Gr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return _(),S("svg",R_,t[0]||(t[0]=[x("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Nf=Gr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return _(),S("svg",M_,t[0]||(t[0]=[x("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const xf=Gr(L_,[["render",U_]]),F_={},B_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function H_(e,t){return _(),S("svg",B_,t[0]||(t[0]=[x("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),x("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Sf=Gr(F_,[["render",H_]]),Z_={class:"moonbase:product-downloads"},q_=["data-last","onClick"],W_={class:"moonbase:sr-only"},z_={class:"moonbase:sr-only"},K_=["onClick"],G_=pe({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Qt.Universal]:()=>Of,[Qt.Windows]:()=>Nf,[Qt.Linux]:()=>xf,[Qt.Mac]:()=>Sf},{downloadProduct:r}=ni(),o=J(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(_(),S("span",Z_,[(_(!0),S(ke,null,an(o.value,(a,l,u)=>(_(),S(ke,{key:l},[a.length===1?(_(),S("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>w(r)(a[0])},[x("span",W_,G(l.toString()),1),(_(),xe(ma(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,q_)):(_(),xe(w(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[q(w(mf),null,{default:_e(()=>[x("span",z_,G(l.toString()),1),(_(),xe(ma(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=x("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),q(Ma,{name:"moonbase:scale"},{default:_e(()=>[q(w(vf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(_(!0),S(ke,null,an(a,c=>(_(),S("button",{key:c.key,type:"button",role:"button",onClick:d=>w(r)(c)},[x("span",null,G(c.name),1)],8,K_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),J_={class:"moonbase:product-activations"},Y_={key:0,scope:"col"},X_={key:0},Q_={colspan:"3"},e1={key:1},t1={key:0},n1=["onClick"],r1=pe({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ni(),i=$(null);Re(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=J(()=>i.value&&i.value.some(u=>u.activationMethod===Vi.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)=>(_(),S("table",J_,[x("thead",null,[x("tr",null,[c[1]||(c[1]=x("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=x("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=x("th",{scope:"col"}," Last Online ",-1)),a.value?(_(),S("th",Y_,c[0]||(c[0]=[x("span",{class:"sr-only"},"Actions",-1)]))):ce("",!0)])]),x("tbody",null,[i.value?i.value.length===0?(_(),S("tr",e1,c[6]||(c[6]=[x("td",{colspan:"3"}," No activations found ",-1)]))):ce("",!0):(_(),S("tr",X_,[x("td",Q_,[q(jt),c[4]||(c[4]=Ce(" Loading activations.. "))]),c[5]||(c[5]=x("td",null,null,-1))])),(_(!0),S(ke,null,an(i.value,d=>{var f;return _(),S("tr",{key:d.id},[x("td",null,G(d.name),1),x("td",null,G(d.activationMethod),1),x("td",null,G((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(_(),S("td",t1,[x("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:h=>l(d)},[d.revoking?(_(),xe(jt,{key:0})):ce("",!0),c[7]||(c[7]=Ce(" Revoke "))],8,n1)])):ce("",!0)])}),128))])]))}}),o1={class:"moonbase:products"},s1={key:0,scope:"col"},i1={key:1,scope:"col"},a1={key:0},l1={key:1},u1=["src"],c1={key:1,class:"moonbase:image-placeholder"},d1={key:1},f1={key:2},p1={key:0},h1=pe({__name:"Products",setup(e){const{getProducts:t}=ni(),n=$(null);Re(async()=>{let s=await t();for(n.value=s.items;s.hasMore&&s.next;)s=await t(s.next),n.value.push(...s.items)});const r=J(()=>n.value&&n.value.some(s=>s.downloads)),o=J(()=>n.value&&n.value.some(s=>s.maxActivations&&s.maxActivations>0));return(s,i)=>(_(),S("table",o1,[x("thead",null,[x("tr",null,[i[0]||(i[0]=x("th",{scope:"col"}," Product ",-1)),o.value?(_(),S("th",s1," Activations ")):ce("",!0),r.value?(_(),S("th",i1," Downloads ")):ce("",!0)])]),x("tbody",null,[n.value?n.value.length===0?(_(),S("tr",l1,i[3]||(i[3]=[x("td",{colspan:"3"}," No products found ",-1)]))):ce("",!0):(_(),S("tr",a1,[x("td",null,[q(jt),i[1]||(i[1]=Ce(" Loading products.. "))]),i[2]||(i[2]=x("td",null,null,-1))])),(_(!0),S(ke,null,an(n.value||[],a=>(_(),S("tr",{key:a.id},[x("td",null,[x("div",null,[a.iconUrl?(_(),S("img",{key:0,src:a.iconUrl,alt:""},null,8,u1)):(_(),S("div",c1)),x("span",null,G(a.name),1)])]),a.maxActivations&&a.maxActivations>0?(_(),xe(w(sl),{key:0,as:"td"},{default:_e(()=>[q(w(mf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[i[4]||(i[4]=x("span",{class:"moonbase:sr-only"},"View activations",-1)),Ce(" "+G(a.currentActivations)+" / "+G(a.maxActivations),1)]),_:2},1024),q(Ma,{name:"moonbase:scale"},{default:_e(()=>[q(w(vf),null,{default:_e(()=>[q(r1,{"product-id":a.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024)):o.value?(_(),S("td",d1)):ce("",!0),r.value?(_(),S("td",f1,[a.currentVersion!=null?(_(),S("div",p1,[a.downloads?(_(),xe(G_,{key:0,downloads:a.downloads},null,8,["downloads"])):ce("",!0)])):ce("",!0)])):ce("",!0)]))),128))])]))}}),m1={class:"moonbase:redeem"},v1=["data-visible"],g1={key:1,class:"moonbase:redeem-voucher"},y1={key:0},b1={key:1},_1={class:"moonbase:redeem-voucher-products"},w1=["src"],E1={key:1,class:"moonbase:image-placeholder"},O1={key:0},N1={class:"moonbase:redeem-voucher-bundle"},x1=["src"],S1={key:1,class:"moonbase:image-placeholder"},k1={key:0},C1={class:"moonbase:redeem-voucher-bundle-products"},T1={class:"shrink-0"},P1=["src"],D1={key:1,class:"moonbase:image-placeholder"},$1=pe({__name:"Redeem",setup(e){const{redeem:t}=Rg(),n=$(!1),r=$(null),o=$(null),s=$("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(_(),S("div",m1,[q(Ma,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(_(),S("div",g1,[x("h3",null,[l[1]||(l[1]=Ce(" You got: ")),x("strong",null,G(r.value.name),1)]),r.value.description?(_(),S("h4",y1,G(r.value.description),1)):ce("",!0),x("h4",null,[l[2]||(l[2]=Ce(" Code: ")),x("strong",null,G(r.value.code),1)]),r.value.redeemsProducts.length>0?(_(),S("div",b1,[l[3]||(l[3]=x("span",null," Contains: ",-1)),x("div",_1,[(_(!0),S(ke,null,an(r.value.redeemsProducts,({value:u,quantity:c})=>(_(),S("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[x("div",null,[u.iconUrl?(_(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,w1)):(_(),S("div",E1))]),x("div",null,[x("p",null,[Ce(G(u.name)+" ",1),c!==1?(_(),S("span",O1,"x "+G(c),1)):ce("",!0)]),x("p",null,G(u.tagline),1)])]))),128)),(_(!0),S(ke,null,an(r.value.redeemsBundles,({value:u,quantity:c})=>(_(),S("div",{key:u.id},[x("div",N1,[x("div",null,[u.iconUrl?(_(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,x1)):(_(),S("div",S1))]),x("div",null,[x("p",null,[Ce(G(u.name)+" ",1),c!==1?(_(),S("span",k1,"x "+G(c),1)):ce("",!0)]),x("p",null,G(u.tagline),1)])]),x("div",C1,[(_(!0),S(ke,null,an(u.products,d=>(_(),S("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[x("div",T1,[d.iconUrl?(_(),S("img",{key:0,src:d.iconUrl,alt:""},null,8,P1)):(_(),S("div",D1))]),x("div",null,[x("p",null,G(d.name),1),x("p",null,G(d.tagline),1)])]))),128))])]))),128))])])):ce("",!0)])):(_(),xe(Jn,{key:0,handler:i},{default:_e(()=>{var u;return[q(Et,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),q(Yn,{label:"Redeem",success:"Redeem",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!o.value||void 0},G((u=o.value)==null?void 0:u.message),9,v1)]}),_:1}))]),_:1})]))}}),I1={class:"moonbase:customer"},A1=pe({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=je();function n(s){switch(s){case ie.ViewAccount:return 0;case ie.ViewProducts:return 1;case ie.RedeemVoucher:return 2}return 0}const r=$(n(t.intent));Ge(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(_(),xe(_i,{open:s.open,onClose:i[0]||(i[0]=a=>w(t).reset())},{default:_e(()=>[x("div",I1,[q(w(kb),{"selected-index":r.value,onChange:o},{default:_e(()=>[q(w(Cb),null,{default:_e(()=>[q(w(al),null,{default:_e(()=>i[1]||(i[1]=[Ce("Account")])),_:1}),q(w(al),null,{default:_e(()=>i[2]||(i[2]=[Ce(" Products ")])),_:1}),q(w(al),null,{default:_e(()=>i[3]||(i[3]=[Ce("Redeem")])),_:1})]),_:1}),q(w(Tb),null,{default:_e(()=>[q(w(ll),null,{default:_e(()=>[q(D_)]),_:1}),q(w(ll),null,{default:_e(()=>[q(h1)]),_:1}),q(w(ll),null,{default:_e(()=>[q($1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),V1={class:"moonbase:auto-activate"},R1={key:0,class:"moonbase:loader"},j1={key:1,class:"moonbase:loader"},L1={key:2,class:"moonbase:loader"},M1={key:3},U1={key:0,class:"moonbase:auto-activate-product"},F1=["src"],B1={key:1,class:"moonbase:image-placeholder"},H1={key:1,class:"moonbase:loader"},Z1={key:2,class:"moonbase:loader"},q1={key:3,class:"moonbase:loader"},W1={key:4,class:"moonbase:auto-activate-content"},z1={key:0},K1={key:1},G1={class:"moonbase:auto-activate-cta"},J1=["href"],Y1={key:2,class:"moonbase:auto-activate-trial"},X1={class:"moonbase:auto-activate-cta"},Q1=pe({__name:"AutoActivate",setup(e){const t=je(),{user:n,loaded:r}=wt(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=Vg(o);Ge(s,O=>{var b;!a.value&&!l.value&&(O==null?void 0:O.status)===en.Requested&&((b=O==null?void 0:O.licenseEligibility)!=null&&b.eligible)&&c()});function h(){f(),t.show(Oe.Customer,ie.ViewProducts)}function y(){t.enqueue(Oe.Activation,ie.ActivateProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}return(O,b)=>{var k,R,T,P;return _(),S("div",V1,[w(i)||!w(r)?(_(),S("div",R1,[q(jt)])):w(u)?(_(),S("div",j1,G(w(u)),1)):w(s)?(_(),S("div",M1,[w(s).product?(_(),S("div",U1,[w(s).product.iconUrl?(_(),S("img",{key:0,src:w(s).product.iconUrl,alt:""},null,8,F1)):(_(),S("div",B1)),x("div",null,[x("h2",null,G(w(s).product.name),1),x("h3",null,G(w(s).product.tagline),1)])])):ce("",!0),((k=w(s))==null?void 0:k.status)===w(en).Cancelled?(_(),S("div",H1,b[2]||(b[2]=[x("h3",null," Uh oh ",-1),x("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):w(a)||w(l)?(_(),S("div",Z1,[q(jt),x("p",null,"Activating "+G(w(s).product.name)+"...",1)])):((R=w(s))==null?void 0:R.status)===w(en).Completed?(_(),S("div",q1,b[3]||(b[3]=[x("h3",null," Done! ",-1),x("p",null," Your product is activated. ",-1)]))):(_(),S("div",W1,[w(n)?(T=w(n).ownedProducts)!=null&&T.includes(w(s).product.id)?(_(),S("div",K1,[b[5]||(b[5]=x("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)),x("span",G1,[x("button",{role:"button",class:"moonbase:button",onClick:b[0]||(b[0]=E=>h())}," Licenses "),w(s).product&&w(s).product.website?(_(),S("a",{key:0,href:w(s).product.website,class:"moonbase:button"}," Purchase ",8,J1)):ce("",!0)])])):ce("",!0):(_(),S("div",z1,[b[4]||(b[4]=Ce(" Please sign in to use a license ")),x("span",{class:"moonbase:auto-activate-cta"},[x("button",{role:"button",class:"moonbase:button",onClick:y}," Sign in ")])])),(P=w(s).trialEligibility)!=null&&P.eligible?(_(),S("div",Y1,[Ce(" You are eligible for a "+G(w(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),w(s).trialEligibility.existing?(_(),S(ke,{key:0},[Ce(" of which you have "+G(w(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):ce("",!0),b[6]||(b[6]=Ce(". ")),x("span",X1,[x("button",{role:"button",class:"moonbase:button",onClick:b[1]||(b[1]=E=>w(d)())}," Start trial ")])])):ce("",!0)]))])):(_(),S("div",L1," Could not find activation request "))])}}}),ew={class:"moonbase:activation"},tw=pe({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=je();return(n,r)=>(_(),xe(_i,{open:n.open,onClose:r[0]||(r[0]=o=>w(t).reset())},{default:_e(()=>[x("div",ew,[q(w(gi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[Ce(" Activate product ")])),_:1}),n.open&&w(t).intent===w(ie).ActivateProduct?(_(),xe(Q1,{key:0})):ce("",!0)])]),_:1},8,["open"]))}});function nw(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const rw={class:"moonbase:download-product"},ow={key:0,class:"moonbase:loader"},sw={key:1,class:"moonbase:loader"},iw={key:2,class:"moonbase:loader"},aw={key:3},lw={class:"moonbase:download-product-product"},uw=["src"],cw={key:1,class:"moonbase:image-placeholder"},dw={key:0},fw=["data-open"],pw={key:0,class:"moonbase:download-product-content"},hw={key:1,class:"moonbase:download-product-content"},mw={key:2,class:"moonbase:download-product-content"},vw=["data-open"],gw={key:1,role:"list"},yw={class:"moonbase:download-product-download-name"},bw=["onClick"],_w={class:"moonbase:download-product-download-description"},ww={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Ew={key:2,class:"moonbase:loader"},Ow=pe({__name:"DownloadProduct",setup(e){const t=je(),{user:n,loaded:r}=wt(),{getProduct:o,downloadProduct:s}=ni(),i={[Qt.Universal]:()=>Of,[Qt.Windows]:()=>Nf,[Qt.Linux]:()=>xf,[Qt.Mac]:()=>Sf},a=$(null),l=$([]),u=$(null),c=$(!0),d=$(!1),f=J(()=>t.getParameter("key")),h=J(()=>{var b,k;return(k=(b=a.value)==null?void 0:b.downloads)==null?void 0:k.filter(R=>!f.value||R.key===f.value)});Re(async()=>{const b=t.getParameter("product_id"),k=t.getParameter("version");if(!b){u.value="Link is broken";return}try{a.value=await o(b,k||void 0)}catch(R){u.value=R.message}c.value=!1});function y(){t.enqueue(Oe.Download,ie.DownloadProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}async function O(b){l.value.push(b.key),await s(b),l.value=l.value.filter(k=>k!==b.key)}return(b,k)=>{var R,T,P,E,I;return _(),S("div",rw,[c.value||!w(r)?(_(),S("div",ow,[q(jt)])):u.value?(_(),S("div",sw,G(u.value),1)):a.value?(_(),S("div",aw,[x("div",lw,[a.value.iconUrl?(_(),S("img",{key:0,src:a.value.iconUrl,alt:""},null,8,uw)):(_(),S("div",cw)),x("div",null,[x("h2",null,[Ce(G(a.value.name)+" ",1),x("span",null,"v"+G(a.value.version||a.value.currentVersion),1),a.value.prerelease?(_(),S("span",dw," (pre-release)")):ce("",!0)]),x("h3",null,G(a.value.tagline),1)]),a.value.releaseDescription&&(!a.value.downloadsNeedsUser||w(n))&&(!a.value.downloadsNeedsOwnership||(T=(R=w(n))==null?void 0:R.ownedProducts)!=null&&T.includes(a.value.id))?(_(),S("button",{key:2,"data-open":d.value||void 0,onClick:k[0]||(k[0]=D=>d.value=!d.value)},k[1]||(k[1]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})],-1),x("span",null," Details ",-1)]),8,fw)):ce("",!0)]),a.value.downloadsNeedsUser&&!w(n)?(_(),S("div",pw,[k[2]||(k[2]=Ce(" Please sign in to download product ")),x("span",{class:"moonbase:download-product-cta"},[x("button",{role:"button",class:"moonbase:button",onClick:y}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((E=(P=w(n))==null?void 0:P.ownedProducts)!=null&&E.includes(a.value.id))?(_(),S("div",hw," This product requires ownership to download ")):(_(),S("div",mw,[a.value.releaseDescription?(_(),S("div",{key:0,class:"moonbase:download-product-release-description","data-open":d.value||void 0},[x("div",null,[x("h3",null," v"+G(a.value.version||a.value.currentVersion)+" Release Notes ",1),x("p",null,G(a.value.releaseDescription),1)])],8,vw)):ce("",!0),(I=a.value)!=null&&I.downloads&&a.value.downloads.length>0?(_(),S("ul",gw,[(_(!0),S(ke,null,an(h.value,D=>(_(),S("li",{key:D.key},[x("div",null,[x("p",yw,[x("button",{onClick:de=>O(D)},[k[3]||(k[3]=x("span",{class:"moonbase:download-product-clicker"},null,-1)),Ce(" "+G(D.name),1)],8,bw)]),x("p",_w,[(_(),xe(ma(i[D.platform]()),{"aria-hidden":"true"})),Ce(" "+G(D.platform)+" ",1),k[4]||(k[4]=x("span",null," |",-1)),Ce(" "+G(w(nw)(D.size)),1)])]),x("div",null,[l.value.includes(D.key)?(_(),xe(jt,{key:0})):(_(),S("svg",ww,k[5]||(k[5]=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(_(),S("div",Ew," No downloadable files found "))]))])):(_(),S("div",iw," Could not find product "))])}}}),Nw={class:"moonbase:download"},xw=pe({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=je();return(n,r)=>(_(),xe(_i,{open:n.open,onClose:r[0]||(r[0]=o=>w(t).reset())},{default:_e(()=>[x("div",Nw,[q(w(gi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[Ce(" Download product ")])),_:1}),n.open&&w(t).intent===w(ie).DownloadProduct?(_(),xe(Ow,{key:0})):ce("",!0)])]),_:1},8,["open"]))}});function Sw(){const e=$(null),t=$({}),n=J(()=>t.value.user||[]),r=J(()=>t.value.product||[]),o=J(()=>t.value.bundle||[]),s=$({}),i=J(()=>s.value.user||[]),a=J(()=>s.value.product||[]),l=J(()=>s.value.bundle||[]),u=wt(),{currency:c}=ri(),d=Ag(),f=Ig();Ge([n,i,u.user],([h,y,O])=>{if(h){for(const b of h)if(O)switch(b.textContent&&!b.dataset.moonbaseOriginal&&(b.dataset.moonbaseOriginal=b.textContent),b.dataset.moonbaseRender){case"user.name":b.textContent=O.name;break;case"user.email":b.textContent=O.email;break}else b.dataset.moonbaseOriginal?b.textContent=b.dataset.moonbaseOriginal:b.textContent="";for(const b of y)O?b.hidden=b.dataset.moonbaseIf==="!user":b.hidden=b.dataset.moonbaseIf==="user"}},{immediate:!0}),Ge([r,a,d,c],([h,y,O,b])=>{var k,R,T;if(h){for(const P of h){const E=(k=P.dataset.moonbaseRender)==null?void 0:k.split(".")[1],I=(R=P.dataset.moonbaseRender)==null?void 0:R.split(".")[2],D=O.find(de=>de.id===E);if(D&&D.defaultVariation)switch(P.textContent&&!P.dataset.moonbaseOriginal&&(P.dataset.moonbaseOriginal=P.textContent),I){case"price":P.textContent=Kt(D.defaultVariation.price[b],b);break}else P.dataset.moonbaseOriginal?P.textContent=P.dataset.moonbaseOriginal:P.textContent=""}for(const P of y){const E=(T=P.dataset.moonbaseRender)==null?void 0:T.split(".")[1];O.find(D=>D.id===E)?P.hidden=P.dataset.moonbaseIf===`!product.${E}`:P.hidden=P.dataset.moonbaseIf===`product.${E}`}}},{immediate:!0}),Ge([o,l,f,c],([h,y,O,b])=>{var k,R,T;if(h){for(const P of h){const E=(k=P.dataset.moonbaseRender)==null?void 0:k.split(".")[1],I=(R=P.dataset.moonbaseRender)==null?void 0:R.split(".")[2],D=O.find(de=>de.id===E);if(D&&D.defaultVariation)switch(P.textContent&&!P.dataset.moonbaseOriginal&&(P.dataset.moonbaseOriginal=P.textContent),I){case"price":P.textContent=Kt(D.defaultVariation.price[b],b);break}else P.dataset.moonbaseOriginal?P.textContent=P.dataset.moonbaseOriginal:P.textContent=""}for(const P of y){const E=(T=P.dataset.moonbaseRender)==null?void 0:T.split(".")[1];O.find(D=>D.id===E)?P.hidden=P.dataset.moonbaseIf===`!bundle.${E}`:P.hidden=P.dataset.moonbaseIf===`bundle.${E}`}}},{immediate:!0}),Re(()=>{var T;e.value=new MutationObserver((P,E)=>{for(const I of P)I.type==="childList"||(I.type==="attributes"?wf(`The ${I.attributeName} attribute was modified.`):wf(`A ${I.type} mutation took place.`))}),e.value.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["data-moonbase-if","data-moonbase-render"]});const h=[/user\.name/,/user\.email/,/product\.[a-z\-]+\.price/,/bundle\.[a-z\-]+\.price/],y={},O=document.querySelectorAll("[data-moonbase-render]");for(const P of O){const E=P.dataset.moonbaseRender;if(!E||!h.some(I=>I.test(E)))console.warn(`Element has an unknown Moonbase target (${E})`,P);else if(E){const I=E.split(".")[0];y[I]=y[I]||[],y[I].push(P)}}t.value=y;const b=["user","product","bundle"],k={},R=document.querySelectorAll("[data-moonbase-if]");for(const P of R){const E=(T=P.dataset.moonbaseIf)==null?void 0:T.replace(/^!/,"");!E||!b.includes(E)?console.warn(`Element has an unknown Moonbase target (${E})`,P):E&&(k[E]=k[E]||[],k[E].push(P))}s.value=k}),dt(()=>e.value&&e.value.disconnect())}const kw=pe({__name:"App",setup(e){const t=Se(zo),n=je();return Ge(()=>[n.active,n.intent],([r,o])=>{}),Sw(),(r,o)=>{var s;return _(),S(ke,null,[(s=w(t))!=null&&s.toolbar.enabled?(_(),xe(gy,{key:0})):ce("",!0),q(S_,{open:w(n).active===w(Oe).Cart},null,8,["open"]),q(Fb,{open:w(n).active===w(Oe).Authentication},null,8,["open"]),q(tw,{open:w(n).active===w(Oe).Activation},null,8,["open"]),q(xw,{open:w(n).active===w(Oe).Download},null,8,["open"]),q(A1,{open:w(n).active===w(Oe).Customer},null,8,["open"])],64)}}});function wi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(wi(e)&&wi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];wi(o)&&wi(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class Cw{constructor(){Cr(this,"initialized",!1);Cr(this,"pinia");Cr(this,"storefront");Cr(this,"options")}async setup(t,n){if(typeof window>"u")throw console.error("Moonbase setup must be done client-side"),new Error("Moonbase setup must be done client-side");if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(py,n),this.storefront=jg(t),this.pinia=ly(),gg(kw).use(this.storefront).use(this.pinia).provide(zo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ie).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ie.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=je(this.pinia),s=wt(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ie.ViewProducts&&(s.user?o.show(Oe.Customer,ie.ViewProducts):o.show(Oe.Cart,ie.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Authentication,ie.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");je(this.pinia).show(Oe.Authentication,ie.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Authentication,ie.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Authentication,ie.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Authentication,ie.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=je(this.pinia);wt(this.storefront).user.value?n.show(Oe.Authentication,ie.ConfirmEmailChange,t):(n.show(Oe.Authentication,ie.SignIn),n.enqueue(Oe.Authentication,ie.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=je(this.pinia);wt(this.storefront).user.value?t.show(Oe.Customer,ie.ViewAccount):(t.show(Oe.Authentication,ie.SignIn),t.enqueue(Oe.Customer,ie.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Cart,ie.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Cart,ie.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Download,ie.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");je(this.pinia).show(Oe.Activation,ie.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");je(this.pinia).show(Oe.Cart,ie.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=ri(this.storefront);if(t!=null&&t.product_id){const l=gd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=vd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=vd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}je(this.pinia).show(Oe.Cart,ie.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;ri(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const kf=new Cw;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=kf),kt.MoonbaseIntent=ie,kt.default=kf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|