@feedmepos/mf-brand-app-builder 0.5.13-alpha → 0.5.13
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/{App-Dx-zim3o.js → App-DF03mf4C.js} +27 -25
- package/dist/{AssetsSettings-BrFOHUWK.js → AssetsSettings-CLNsRfkn.js} +84 -86
- package/dist/{BuilderView-qdOop6ed.js → BuilderView-C-zYam5O.js} +10 -10
- package/dist/{ButtonGroup-B3ba45VA.js → ButtonGroup-CbW3Lnxj.js} +2 -2
- package/dist/{CircularProgress-h90pbjU3.js → CircularProgress-DdblYCtV.js} +4 -4
- package/dist/{ColorPicker-DAysa9fA.js → ColorPicker-Bz8yOMlS.js} +2 -2
- package/dist/{Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js → Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js} +2 -2
- package/dist/{ImageUpload-DxE1yPGA.js → ImageUpload-Cpkzp4iS.js} +14 -14
- package/dist/{LinkButton-Cbch02ih.js → LinkButton-D0MS93kZ.js} +3 -3
- package/dist/{ListRepeater-Btngd8M3.js → ListRepeater-DDJL956f.js} +2 -2
- package/dist/{ManagementSettings-de-TEfbe.js → ManagementSettings-BQuJDFla.js} +6 -6
- package/dist/{Select-CbQFoAzb.js → Select-C2r_c4vv.js} +2 -2
- package/dist/{SettingsView-DFAxZPug.js → SettingsView-BUGfoZhA.js} +2 -2
- package/dist/{StepperField-DrHM9EDn.js → StepperField-xVvcmxNx.js} +2 -2
- package/dist/{Switch-8mmNQUDo.js → Switch-uc_zN-mb.js} +2 -2
- package/dist/{TextAlign-BOC8ekaH.js → TextAlign-BSp1Xi7F.js} +2 -2
- package/dist/{TextDecorators-BJC4umDR.js → TextDecorators-1C54q7us.js} +4 -4
- package/dist/{TextField-BiVH5rLX.js → TextField-DfBJB6vQ.js} +2 -2
- package/dist/{TextStyleList-CuPE80Py.js → TextStyleList-Bef3irUx.js} +3 -3
- package/dist/{app-s4CdT1Jt.js → app-DXnRpFqq.js} +27 -27
- package/dist/app.js +1 -1
- package/dist/components/src/components/BranchList.vue.d.ts +1 -1
- package/dist/components/src/components/ButtonList.vue.d.ts +1 -1
- package/dist/components/src/components/CountrySwitcher.vue.d.ts +1 -1
- package/dist/components/src/components/Homepage.vue.d.ts +3 -3
- package/dist/components/src/components/ImageCarousel.vue.d.ts +1 -1
- package/dist/components/src/components/ImageDisplay.vue.d.ts +1 -1
- package/dist/components/src/components/MemberCard.vue.d.ts +2 -1
- package/dist/components/src/components/OrderHistoryCard.vue.d.ts +1 -1
- package/dist/components/src/components/OrderMethod.vue.d.ts +1 -1
- package/dist/components/src/components/TextDisplay.vue.d.ts +1 -1
- package/dist/components/src/components/atoms/Button.vue.d.ts +4 -4
- package/dist/components/src/components/atoms/CircularProgress.vue.d.ts +1 -1
- package/dist/components/src/components/atoms/Container.vue.d.ts +3 -3
- package/dist/components/src/components/atoms/Divider.vue.d.ts +1 -1
- package/dist/components/src/components/atoms/Icon.vue.d.ts +1 -1
- package/dist/components/src/components/atoms/LinkSlot.vue.d.ts +4 -4
- package/dist/components/src/views/OrderDetails.vue.d.ts +1 -1
- package/dist/{image-C-MNSOjE.js → image-Dm7AsBZX.js} +8 -8
- package/dist/index-B0O5NxWl.js +1741 -0
- package/dist/{index-D2kxtvYi.js → index-BZ63ygCw.js} +1 -1
- package/dist/{index-C4WOObjm.js → index-CAfpg2Eg.js} +205 -201
- package/dist/{index-WtAjKyig.js → index-CJXFGv-u.js} +21 -21
- package/dist/{main-CZCjdYQJ.js → main-BnnUrWK-.js} +265 -266
- package/dist/merchant/src/api/business/index.d.ts +1 -1
- package/dist/merchant/src/api/index.d.ts +21 -1
- package/dist/merchant/src/components/atoms/BaButtonGroup.vue.d.ts +1 -1
- package/dist/merchant/src/components/atoms/BaDivider.vue.d.ts +1 -1
- package/dist/merchant/src/components/editor/Editor.vue.d.ts +1 -1
- package/dist/merchant/src/components/editor/EditorFloatingToobar.vue.d.ts +1 -1
- package/dist/merchant/src/components/editor/toolbar/EditorToolbar.vue.d.ts +1 -1
- package/dist/merchant/src/components/element-sidebar/ElementSidebar.vue.d.ts +1 -1
- package/dist/merchant/src/components/inputs/ColorPicker.vue.d.ts +1 -1
- package/dist/merchant/src/components/inputs/ImageUpload.vue.d.ts +1 -1
- package/dist/merchant/src/components/inputs/TextAlign.vue.d.ts +1 -1
- package/dist/merchant/src/components/inputs/TextDecorators.vue.d.ts +1 -1
- package/dist/merchant/src/components/inputs/TextStyleList.vue.d.ts +1 -1
- package/dist/merchant/src/components/inspector/Inspector.vue.d.ts +1 -1
- package/dist/merchant/src/components/inspector/atoms/ConfigSection.vue.d.ts +3 -3
- package/dist/merchant/src/components/inspector/atoms/ConfigTab.vue.d.ts +3 -3
- package/dist/merchant/src/components/inspector/atoms/ConfigTabItem.vue.d.ts +3 -3
- package/dist/merchant/src/components/inspector/atoms/ConfigTabTitle.vue.d.ts +1 -1
- package/dist/merchant/src/components/navigation-sidebar/NavigationSidebar.vue.d.ts +1 -1
- package/dist/merchant/src/components/settings/AssetsSettings.vue.d.ts +1 -1
- package/dist/merchant/src/components/settings/ManagementSettings.vue.d.ts +1 -1
- package/dist/merchant/src/views/BuilderView.vue.d.ts +1 -1
- package/dist/merchant/src/views/HomeView.vue.d.ts +1 -1
- package/dist/merchant/src/views/SettingsView.vue.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/{v4-ANoOI1Qw.js → v4-CKwdnpQf.js} +8 -8
- package/package.json +1 -1
- package/dist/index-C1ZVL1AH.js +0 -1729
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { defineComponent as bt, useAttrs as
|
|
2
|
-
import { H as
|
|
1
|
+
import { defineComponent as bt, useAttrs as Xt, ref as p, computed as g, createElementBlock as f, watchEffect as W, nextTick as Zt, watch as Wt, openBlock as d, unref as N, Fragment as j, renderList as mt, mergeProps as pt, createBlock as K, normalizeStyle as ft, normalizeClass as L, withCtx as V, renderSlot as z, createVNode as U, onMounted as Rt, onBeforeUnmount as te, createCommentVNode as G, resolveDynamicComponent as tt, createElementVNode as D, normalizeProps as Vt, createTextVNode as Ut, toDisplayString as ct } from "vue";
|
|
2
|
+
import { H as F, a as Ft } from "./index-B0O5NxWl.js";
|
|
3
3
|
var ee = Object.defineProperty, ae = (s, a, t) => a in s ? ee(s, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[a] = t, k = (s, a, t) => ae(s, typeof a != "symbol" ? a + "" : a, t);
|
|
4
4
|
function oe(s) {
|
|
5
5
|
if (typeof document > "u") return;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function a() {
|
|
7
|
+
let t = document.head || document.getElementsByTagName("head")[0];
|
|
8
|
+
if (!t) return;
|
|
9
|
+
let n = document.createElement("style");
|
|
10
|
+
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = s : n.appendChild(document.createTextNode(s));
|
|
11
|
+
}
|
|
12
|
+
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", a) : a();
|
|
8
13
|
}
|
|
9
14
|
oe(":where([data-sonner-toaster][dir=ltr]),:where(html[dir=ltr]){--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}:where([data-sonner-toaster][dir=rtl]),:where(html[dir=rtl]){--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted=true]){transform:translateY(-10px)}@media (hover:none) and (pointer:coarse){:where([data-sonner-toaster][data-lifted=true]){transform:none}}:where([data-sonner-toaster][data-x-position=right]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position=left]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position=center]){left:50%;transform:translateX(-50%)}:where([data-sonner-toaster][data-y-position=top]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position=bottom]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled=true]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast][data-y-position=top]){top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position=bottom]){bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise=true]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme=dark]) :where([data-cancel]){background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast]) :where([data-disabled=true]){cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping=true])::before{content:'';position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position=top][data-swiping=true])::before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position=bottom][data-swiping=true])::before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping=false][data-removed=true])::before{content:'';position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast])::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted=true]){--y:translateY(0);opacity:1}:where([data-sonner-toast][data-expanded=false][data-front=false]){--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded=false][data-front=false][data-styled=true])>*{opacity:0}:where([data-sonner-toast][data-visible=false]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted=true][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]){--y:translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]){--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed=true][data-front=false])::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
10
15
|
let yt = 0;
|
|
@@ -19,14 +24,14 @@ class se {
|
|
|
19
24
|
this.publish(a), this.toasts = [...this.toasts, a];
|
|
20
25
|
}), k(this, "create", (a) => {
|
|
21
26
|
var t;
|
|
22
|
-
const { message: n, ...r } = a, y = typeof a.id == "number" || a.id && ((t = a.id) == null ? void 0 : t.length) > 0 ? a.id : yt++, T = this.toasts.find((
|
|
23
|
-
return T ? this.toasts = this.toasts.map((
|
|
24
|
-
...
|
|
27
|
+
const { message: n, ...r } = a, y = typeof a.id == "number" || a.id && ((t = a.id) == null ? void 0 : t.length) > 0 ? a.id : yt++, T = this.toasts.find((h) => h.id === y), E = a.dismissible === void 0 ? !0 : a.dismissible;
|
|
28
|
+
return T ? this.toasts = this.toasts.map((h) => h.id === y ? (this.publish({ ...h, ...a, id: y, title: n }), {
|
|
29
|
+
...h,
|
|
25
30
|
...a,
|
|
26
31
|
id: y,
|
|
27
|
-
dismissible:
|
|
32
|
+
dismissible: E,
|
|
28
33
|
title: n
|
|
29
|
-
}) :
|
|
34
|
+
}) : h) : this.addToast({ title: n, ...r, dismissible: E, id: y }), y;
|
|
30
35
|
}), k(this, "dismiss", (a) => (a || this.toasts.forEach((t) => {
|
|
31
36
|
this.subscribers.forEach(
|
|
32
37
|
(n) => n({ id: t.id, dismiss: !0 })
|
|
@@ -44,38 +49,38 @@ class se {
|
|
|
44
49
|
}));
|
|
45
50
|
const r = a instanceof Promise ? a : a();
|
|
46
51
|
let y = n !== void 0, T;
|
|
47
|
-
const
|
|
52
|
+
const E = r.then(async (c) => {
|
|
48
53
|
if (T = ["resolve", c], re(c) && !c.ok) {
|
|
49
54
|
y = !1;
|
|
50
|
-
const
|
|
55
|
+
const v = typeof t.error == "function" ? await t.error(
|
|
51
56
|
`HTTP error! status: ${c.status}`
|
|
52
57
|
) : t.error, b = typeof t.description == "function" ? (
|
|
53
58
|
// @ts-expect-error
|
|
54
59
|
await t.description(`HTTP error! status: ${c.status}`)
|
|
55
60
|
) : t.description;
|
|
56
|
-
this.create({ id: n, type: "error", message:
|
|
61
|
+
this.create({ id: n, type: "error", message: v, description: b });
|
|
57
62
|
} else if (t.success !== void 0) {
|
|
58
63
|
y = !1;
|
|
59
|
-
const
|
|
60
|
-
this.create({ id: n, type: "success", message:
|
|
64
|
+
const v = typeof t.success == "function" ? await t.success(c) : t.success, b = typeof t.description == "function" ? await t.description(c) : t.description;
|
|
65
|
+
this.create({ id: n, type: "success", message: v, description: b });
|
|
61
66
|
}
|
|
62
67
|
}).catch(async (c) => {
|
|
63
68
|
if (T = ["reject", c], t.error !== void 0) {
|
|
64
69
|
y = !1;
|
|
65
|
-
const
|
|
70
|
+
const v = typeof t.error == "function" ? await t.error(c) : t.error, b = typeof t.description == "function" ? await t.description(
|
|
66
71
|
c
|
|
67
72
|
) : t.description;
|
|
68
|
-
this.create({ id: n, type: "error", message:
|
|
73
|
+
this.create({ id: n, type: "error", message: v, description: b });
|
|
69
74
|
}
|
|
70
75
|
}).finally(() => {
|
|
71
76
|
var c;
|
|
72
77
|
y && (this.dismiss(n), n = void 0), (c = t.finally) == null || c.call(t);
|
|
73
|
-
}),
|
|
74
|
-
(c,
|
|
75
|
-
() => T[0] === "reject" ?
|
|
76
|
-
).catch(
|
|
78
|
+
}), h = () => new Promise(
|
|
79
|
+
(c, v) => E.then(
|
|
80
|
+
() => T[0] === "reject" ? v(T[1]) : c(T[1])
|
|
81
|
+
).catch(v)
|
|
77
82
|
);
|
|
78
|
-
return typeof n != "string" && typeof n != "number" ? { unwrap:
|
|
83
|
+
return typeof n != "string" && typeof n != "number" ? { unwrap: h } : Object.assign(n, { unwrap: h });
|
|
79
84
|
}), k(this, "custom", (a, t) => {
|
|
80
85
|
const n = (t == null ? void 0 : t.id) || yt++;
|
|
81
86
|
return this.publish({ component: a, id: n, ...t }), n;
|
|
@@ -92,7 +97,7 @@ function ne(s, a) {
|
|
|
92
97
|
...a
|
|
93
98
|
}), t;
|
|
94
99
|
}
|
|
95
|
-
const re = (s) => s && typeof s == "object" && "ok" in s && typeof s.ok == "boolean" && "status" in s && typeof s.status == "number", ie = ne, le = () => $.toasts,
|
|
100
|
+
const re = (s) => s && typeof s == "object" && "ok" in s && typeof s.ok == "boolean" && "status" in s && typeof s.status == "number", ie = ne, le = () => $.toasts, ea = Object.assign(
|
|
96
101
|
ie,
|
|
97
102
|
{
|
|
98
103
|
success: $.success,
|
|
@@ -114,7 +119,7 @@ function ut(s) {
|
|
|
114
119
|
}
|
|
115
120
|
function de() {
|
|
116
121
|
const s = p(!1);
|
|
117
|
-
return
|
|
122
|
+
return W(() => {
|
|
118
123
|
const a = () => {
|
|
119
124
|
s.value = document.hidden;
|
|
120
125
|
};
|
|
@@ -123,7 +128,7 @@ function de() {
|
|
|
123
128
|
isDocumentHidden: s
|
|
124
129
|
};
|
|
125
130
|
}
|
|
126
|
-
const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "data-promise", "data-removed", "data-visible", "data-y-position", "data-x-position", "data-index", "data-front", "data-swiping", "data-dismissible", "data-type", "data-invert", "data-swipe-out", "data-expanded"], ue = ["aria-label", "data-disabled"],
|
|
131
|
+
const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "data-promise", "data-removed", "data-visible", "data-y-position", "data-x-position", "data-index", "data-front", "data-swiping", "data-dismissible", "data-type", "data-invert", "data-swipe-out", "data-expanded"], ue = ["aria-label", "data-disabled"], Gt = 4e3, pe = 20, fe = 200, he = /* @__PURE__ */ bt({
|
|
127
132
|
__name: "Toast",
|
|
128
133
|
props: {
|
|
129
134
|
toast: {},
|
|
@@ -155,23 +160,23 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
155
160
|
},
|
|
156
161
|
emits: ["update:heights", "removeToast"],
|
|
157
162
|
setup(s, { emit: a }) {
|
|
158
|
-
const t = s, n = a, r = p(!1), y = p(!1), T = p(!1),
|
|
159
|
-
t.toast.duration || t.duration ||
|
|
160
|
-
), I = p(null), B = p(null),
|
|
163
|
+
const t = s, n = a, r = p(!1), y = p(!1), T = p(!1), E = p(!1), h = p(!1), c = p(0), v = p(0), b = p(
|
|
164
|
+
t.toast.duration || t.duration || Gt
|
|
165
|
+
), I = p(null), B = p(null), ht = g(() => t.index === 0), vt = g(() => t.index + 1 <= t.visibleToasts), S = g(() => t.toast.type), O = g(() => t.toast.dismissible !== !1), gt = g(() => t.toast.class || ""), o = g(() => t.descriptionClass || ""), i = t.toast.style || {}, l = g(
|
|
161
166
|
() => t.heights.findIndex((e) => e.toastId === t.toast.id) || 0
|
|
162
167
|
), w = g(() => t.toast.closeButton ?? t.closeButton);
|
|
163
168
|
g(
|
|
164
|
-
() => t.toast.duration || t.duration ||
|
|
169
|
+
() => t.toast.duration || t.duration || Gt
|
|
165
170
|
);
|
|
166
171
|
const P = p(0), A = p(0), H = p(null), q = g(() => t.position.split("-")), J = g(() => q.value[0]), at = g(() => q.value[1]), ot = g(() => typeof t.toast.title != "string"), st = g(
|
|
167
172
|
() => typeof t.toast.description != "string"
|
|
168
|
-
), nt = g(() => t.heights.reduce((e, u, x) => x >= l.value ? e : e + u.height, 0)), rt = de(), it = g(() => t.toast.invert || t.invert),
|
|
173
|
+
), nt = g(() => t.heights.reduce((e, u, x) => x >= l.value ? e : e + u.height, 0)), rt = de(), it = g(() => t.toast.invert || t.invert), _ = g(() => S.value === "loading"), Y = g(() => l.value * t.gap + nt.value || 0);
|
|
169
174
|
Rt(() => {
|
|
170
175
|
if (!r.value) return;
|
|
171
176
|
const e = B.value, u = e == null ? void 0 : e.style.height;
|
|
172
177
|
e.style.height = "auto";
|
|
173
178
|
const x = e.getBoundingClientRect().height;
|
|
174
|
-
e.style.height = u,
|
|
179
|
+
e.style.height = u, v.value = x;
|
|
175
180
|
let C;
|
|
176
181
|
t.heights.find(
|
|
177
182
|
(m) => m.toastId === t.toast.id
|
|
@@ -186,44 +191,44 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
186
191
|
...t.heights
|
|
187
192
|
], n("update:heights", C);
|
|
188
193
|
});
|
|
189
|
-
function
|
|
194
|
+
function R() {
|
|
190
195
|
y.value = !0, c.value = Y.value;
|
|
191
196
|
const e = t.heights.filter(
|
|
192
197
|
(u) => u.toastId !== t.toast.id
|
|
193
198
|
);
|
|
194
199
|
n("update:heights", e), setTimeout(() => {
|
|
195
200
|
n("removeToast", t.toast);
|
|
196
|
-
},
|
|
201
|
+
}, fe);
|
|
197
202
|
}
|
|
198
203
|
function wt() {
|
|
199
204
|
var e, u;
|
|
200
|
-
if (
|
|
205
|
+
if (_.value || !O.value)
|
|
201
206
|
return {};
|
|
202
|
-
|
|
207
|
+
R(), (u = (e = t.toast).onDismiss) == null || u.call(e, t.toast);
|
|
203
208
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
209
|
+
function qt(e) {
|
|
210
|
+
_.value || !O.value || (I.value = /* @__PURE__ */ new Date(), c.value = Y.value, e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (T.value = !0, H.value = { x: e.clientX, y: e.clientY }));
|
|
206
211
|
}
|
|
207
|
-
function
|
|
212
|
+
function Jt() {
|
|
208
213
|
var e, u, x, C, m;
|
|
209
|
-
if (
|
|
214
|
+
if (E.value || !O) return;
|
|
210
215
|
H.value = null;
|
|
211
216
|
const M = Number(
|
|
212
217
|
((e = B.value) == null ? void 0 : e.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0
|
|
213
218
|
), lt = (/* @__PURE__ */ new Date()).getTime() - ((u = I.value) == null ? void 0 : u.getTime()), dt = Math.abs(M) / lt;
|
|
214
219
|
if (Math.abs(M) >= pe || dt > 0.11) {
|
|
215
|
-
c.value = Y.value, (C = (x = t.toast).onDismiss) == null || C.call(x, t.toast),
|
|
220
|
+
c.value = Y.value, (C = (x = t.toast).onDismiss) == null || C.call(x, t.toast), R(), E.value = !0, h.value = !1;
|
|
216
221
|
return;
|
|
217
222
|
}
|
|
218
223
|
(m = B.value) == null || m.style.setProperty("--swipe-amount", "0px"), T.value = !1;
|
|
219
224
|
}
|
|
220
|
-
function
|
|
225
|
+
function Qt(e) {
|
|
221
226
|
var u, x;
|
|
222
|
-
if (!H.value || !
|
|
227
|
+
if (!H.value || !O.value) return;
|
|
223
228
|
const C = e.clientY - H.value.y, m = ((u = window.getSelection()) == null ? void 0 : u.toString().length) > 0, M = J.value === "top" ? Math.min(0, C) : Math.max(0, C);
|
|
224
|
-
Math.abs(M) > 0 && (
|
|
229
|
+
Math.abs(M) > 0 && (h.value = !0), !m && ((x = B.value) == null || x.style.setProperty("--swipe-amount", `${M}px`));
|
|
225
230
|
}
|
|
226
|
-
return
|
|
231
|
+
return W((e) => {
|
|
227
232
|
if (t.toast.promise && S.value === "loading" || t.toast.duration === 1 / 0 || t.toast.type === "loading")
|
|
228
233
|
return;
|
|
229
234
|
let u;
|
|
@@ -236,16 +241,16 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
236
241
|
}, C = () => {
|
|
237
242
|
b.value !== 1 / 0 && (P.value = (/* @__PURE__ */ new Date()).getTime(), u = setTimeout(() => {
|
|
238
243
|
var m, M;
|
|
239
|
-
(M = (m = t.toast).onAutoClose) == null || M.call(m, t.toast),
|
|
244
|
+
(M = (m = t.toast).onAutoClose) == null || M.call(m, t.toast), R();
|
|
240
245
|
}, b.value));
|
|
241
246
|
};
|
|
242
247
|
t.expanded || t.interacting || t.pauseWhenPageIsHidden && rt ? x() : C(), e(() => {
|
|
243
248
|
clearTimeout(u);
|
|
244
249
|
});
|
|
245
|
-
}),
|
|
250
|
+
}), Wt(
|
|
246
251
|
() => t.toast.delete,
|
|
247
252
|
() => {
|
|
248
|
-
t.toast.delete &&
|
|
253
|
+
t.toast.delete && R();
|
|
249
254
|
},
|
|
250
255
|
{
|
|
251
256
|
deep: !0
|
|
@@ -253,14 +258,14 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
253
258
|
), Rt(() => {
|
|
254
259
|
if (r.value = !0, B.value) {
|
|
255
260
|
const e = B.value.getBoundingClientRect().height;
|
|
256
|
-
|
|
261
|
+
v.value = e;
|
|
257
262
|
const u = [
|
|
258
263
|
{ toastId: t.toast.id, height: e, position: t.toast.position },
|
|
259
264
|
...t.heights
|
|
260
265
|
];
|
|
261
266
|
n("update:heights", u);
|
|
262
267
|
}
|
|
263
|
-
}),
|
|
268
|
+
}), te(() => {
|
|
264
269
|
if (B.value) {
|
|
265
270
|
const e = t.heights.filter(
|
|
266
271
|
(u) => u.toastId !== t.toast.id
|
|
@@ -268,8 +273,8 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
268
273
|
n("update:heights", e);
|
|
269
274
|
}
|
|
270
275
|
}), (e, u) => {
|
|
271
|
-
var x, C, m, M, lt, dt, xt, kt, Bt, Ct, Tt, St, Pt, $t,
|
|
272
|
-
return d(),
|
|
276
|
+
var x, C, m, M, lt, dt, xt, kt, Bt, Ct, Tt, St, Pt, $t, Et, zt, Mt, It, At, Yt, Ht, Lt, Dt, Ot, Nt, jt, _t;
|
|
277
|
+
return d(), f("li", {
|
|
273
278
|
ref_key: "toastRef",
|
|
274
279
|
ref: B,
|
|
275
280
|
"aria-live": e.toast.important ? "assertive" : "polite",
|
|
@@ -277,7 +282,7 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
277
282
|
role: "status",
|
|
278
283
|
tabindex: "0",
|
|
279
284
|
"data-sonner-toast": "true",
|
|
280
|
-
class:
|
|
285
|
+
class: L(
|
|
281
286
|
e.cn(
|
|
282
287
|
t.class,
|
|
283
288
|
gt.value,
|
|
@@ -294,67 +299,66 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
294
299
|
"data-mounted": r.value,
|
|
295
300
|
"data-promise": !!e.toast.promise,
|
|
296
301
|
"data-removed": y.value,
|
|
297
|
-
"data-visible":
|
|
302
|
+
"data-visible": vt.value,
|
|
298
303
|
"data-y-position": J.value,
|
|
299
304
|
"data-x-position": at.value,
|
|
300
305
|
"data-index": e.index,
|
|
301
|
-
"data-front":
|
|
306
|
+
"data-front": ht.value,
|
|
302
307
|
"data-swiping": T.value,
|
|
303
|
-
"data-dismissible":
|
|
308
|
+
"data-dismissible": O.value,
|
|
304
309
|
"data-type": S.value,
|
|
305
310
|
"data-invert": it.value,
|
|
306
|
-
"data-swipe-out":
|
|
311
|
+
"data-swipe-out": E.value,
|
|
307
312
|
"data-expanded": !!(e.expanded || e.expandByDefault && r.value),
|
|
308
|
-
style:
|
|
313
|
+
style: ft({
|
|
309
314
|
"--index": e.index,
|
|
310
315
|
"--toasts-before": e.index,
|
|
311
316
|
"--z-index": e.toasts.length - e.index,
|
|
312
317
|
"--offset": `${y.value ? c.value : Y.value}px`,
|
|
313
|
-
"--initial-height": e.expandByDefault ? "auto" : `${
|
|
318
|
+
"--initial-height": e.expandByDefault ? "auto" : `${v.value}px`,
|
|
314
319
|
...e.style,
|
|
315
320
|
...N(i)
|
|
316
321
|
}),
|
|
317
|
-
onPointerdown:
|
|
318
|
-
onPointerup:
|
|
319
|
-
onPointermove:
|
|
322
|
+
onPointerdown: qt,
|
|
323
|
+
onPointerup: Jt,
|
|
324
|
+
onPointermove: Qt
|
|
320
325
|
}, [
|
|
321
|
-
w.value && !e.toast.component ? (d(),
|
|
326
|
+
w.value && !e.toast.component ? (d(), f("button", {
|
|
322
327
|
key: 0,
|
|
323
328
|
"aria-label": e.closeButtonAriaLabel || "Close toast",
|
|
324
|
-
"data-disabled":
|
|
329
|
+
"data-disabled": _.value,
|
|
325
330
|
"data-close-button": "true",
|
|
326
|
-
class:
|
|
331
|
+
class: L(e.cn((xt = e.classes) == null ? void 0 : xt.closeButton, (Bt = (kt = e.toast) == null ? void 0 : kt.classes) == null ? void 0 : Bt.closeButton)),
|
|
327
332
|
onClick: wt
|
|
328
333
|
}, [
|
|
329
|
-
(Ct = e.icons) != null && Ct.close ? (d(),
|
|
330
|
-
], 10, ue)) :
|
|
331
|
-
e.toast.component ? (d(),
|
|
332
|
-
S.value !== "default" || e.toast.icon || e.toast.promise ? (d(),
|
|
334
|
+
(Ct = e.icons) != null && Ct.close ? (d(), K(tt((Tt = e.icons) == null ? void 0 : Tt.close), { key: 0 })) : z(e.$slots, "close-icon", { key: 1 })
|
|
335
|
+
], 10, ue)) : G("", !0),
|
|
336
|
+
e.toast.component ? (d(), K(tt(e.toast.component), pt({ key: 1 }, e.toast.componentProps, { onCloseToast: wt }), null, 16)) : (d(), f(j, { key: 2 }, [
|
|
337
|
+
S.value !== "default" || e.toast.icon || e.toast.promise ? (d(), f("div", {
|
|
333
338
|
key: 0,
|
|
334
339
|
"data-icon": "",
|
|
335
|
-
class:
|
|
340
|
+
class: L(e.cn((St = e.classes) == null ? void 0 : St.icon, ($t = (Pt = e.toast) == null ? void 0 : Pt.classes) == null ? void 0 : $t.icon))
|
|
336
341
|
}, [
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
S.value === "success" ? E(e.$slots, "success-icon", { key: 0 }) : S.value === "error" ? E(e.$slots, "error-icon", { key: 1 }) : S.value === "warning" ? E(e.$slots, "warning-icon", { key: 2 }) : S.value === "info" ? E(e.$slots, "info-icon", { key: 3 }) : _("", !0)
|
|
342
|
+
e.toast.icon ? (d(), K(tt(e.toast.icon), { key: 0 })) : (d(), f(j, { key: 1 }, [
|
|
343
|
+
S.value === "loading" ? z(e.$slots, "loading-icon", { key: 0 }) : S.value === "success" ? z(e.$slots, "success-icon", { key: 1 }) : S.value === "error" ? z(e.$slots, "error-icon", { key: 2 }) : S.value === "warning" ? z(e.$slots, "warning-icon", { key: 3 }) : S.value === "info" ? z(e.$slots, "info-icon", { key: 4 }) : G("", !0)
|
|
340
344
|
], 64))
|
|
341
|
-
], 2)) :
|
|
342
|
-
|
|
345
|
+
], 2)) : G("", !0),
|
|
346
|
+
D("div", {
|
|
343
347
|
"data-content": "",
|
|
344
|
-
class:
|
|
348
|
+
class: L(e.cn((Et = e.classes) == null ? void 0 : Et.content, (Mt = (zt = e.toast) == null ? void 0 : zt.classes) == null ? void 0 : Mt.content))
|
|
345
349
|
}, [
|
|
346
|
-
|
|
350
|
+
D("div", {
|
|
347
351
|
"data-title": "",
|
|
348
|
-
class:
|
|
352
|
+
class: L(e.cn((It = e.classes) == null ? void 0 : It.title, (At = e.toast.classes) == null ? void 0 : At.title))
|
|
349
353
|
}, [
|
|
350
|
-
ot.value ? (d(),
|
|
354
|
+
ot.value ? (d(), K(tt(e.toast.title), Vt(pt({ key: 0 }, e.toast.componentProps)), null, 16)) : (d(), f(j, { key: 1 }, [
|
|
351
355
|
Ut(ct(e.toast.title), 1)
|
|
352
356
|
], 64))
|
|
353
357
|
], 2),
|
|
354
|
-
e.toast.description ? (d(),
|
|
358
|
+
e.toast.description ? (d(), f("div", {
|
|
355
359
|
key: 0,
|
|
356
360
|
"data-description": "",
|
|
357
|
-
class:
|
|
361
|
+
class: L(
|
|
358
362
|
e.cn(
|
|
359
363
|
e.descriptionClass,
|
|
360
364
|
o.value,
|
|
@@ -363,33 +367,33 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
363
367
|
)
|
|
364
368
|
)
|
|
365
369
|
}, [
|
|
366
|
-
st.value ? (d(),
|
|
370
|
+
st.value ? (d(), K(tt(e.toast.description), Vt(pt({ key: 0 }, e.toast.componentProps)), null, 16)) : (d(), f(j, { key: 1 }, [
|
|
367
371
|
Ut(ct(e.toast.description), 1)
|
|
368
372
|
], 64))
|
|
369
|
-
], 2)) :
|
|
373
|
+
], 2)) : G("", !0)
|
|
370
374
|
], 2),
|
|
371
|
-
e.toast.cancel ? (d(),
|
|
375
|
+
e.toast.cancel ? (d(), f("button", {
|
|
372
376
|
key: 1,
|
|
373
|
-
style:
|
|
374
|
-
class:
|
|
377
|
+
style: ft(e.toast.cancelButtonStyle || e.cancelButtonStyle),
|
|
378
|
+
class: L(e.cn((Lt = e.classes) == null ? void 0 : Lt.cancelButton, (Dt = e.toast.classes) == null ? void 0 : Dt.cancelButton)),
|
|
375
379
|
"data-button": "",
|
|
376
380
|
"data-cancel": "",
|
|
377
381
|
onClick: u[0] || (u[0] = (Q) => {
|
|
378
382
|
var X, Z;
|
|
379
|
-
N(ut)(e.toast.cancel) &&
|
|
383
|
+
N(ut)(e.toast.cancel) && O.value && ((Z = (X = e.toast.cancel).onClick) == null || Z.call(X, Q), R());
|
|
380
384
|
})
|
|
381
|
-
}, ct(N(ut)(e.toast.cancel) ? (
|
|
382
|
-
e.toast.action ? (d(),
|
|
385
|
+
}, ct(N(ut)(e.toast.cancel) ? (Ot = e.toast.cancel) == null ? void 0 : Ot.label : e.toast.cancel), 7)) : G("", !0),
|
|
386
|
+
e.toast.action ? (d(), f("button", {
|
|
383
387
|
key: 2,
|
|
384
|
-
style:
|
|
385
|
-
class:
|
|
388
|
+
style: ft(e.toast.actionButtonStyle || e.actionButtonStyle),
|
|
389
|
+
class: L(e.cn((Nt = e.classes) == null ? void 0 : Nt.actionButton, (jt = e.toast.classes) == null ? void 0 : jt.actionButton)),
|
|
386
390
|
"data-button": "",
|
|
387
391
|
"data-action": "",
|
|
388
392
|
onClick: u[1] || (u[1] = (Q) => {
|
|
389
393
|
var X, Z;
|
|
390
|
-
N(ut)(e.toast.action) && (Q.defaultPrevented || ((Z = (X = e.toast.action).onClick) == null || Z.call(X, Q), !Q.defaultPrevented &&
|
|
394
|
+
N(ut)(e.toast.action) && (Q.defaultPrevented || ((Z = (X = e.toast.action).onClick) == null || Z.call(X, Q), !Q.defaultPrevented && R()));
|
|
391
395
|
})
|
|
392
|
-
}, ct(N(ut)(e.toast.action) ? (
|
|
396
|
+
}, ct(N(ut)(e.toast.action) ? (_t = e.toast.action) == null ? void 0 : _t.label : e.toast.action), 7)) : G("", !0)
|
|
393
397
|
], 64))
|
|
394
398
|
], 46, ce);
|
|
395
399
|
};
|
|
@@ -399,7 +403,7 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
399
403
|
for (const [n, r] of a)
|
|
400
404
|
t[n] = r;
|
|
401
405
|
return t;
|
|
402
|
-
},
|
|
406
|
+
}, ve = {}, ge = {
|
|
403
407
|
xmlns: "http://www.w3.org/2000/svg",
|
|
404
408
|
width: "12",
|
|
405
409
|
height: "12",
|
|
@@ -411,14 +415,14 @@ const ce = ["aria-live", "data-rich-colors", "data-styled", "data-mounted", "dat
|
|
|
411
415
|
"stroke-linejoin": "round"
|
|
412
416
|
};
|
|
413
417
|
function me(s, a) {
|
|
414
|
-
return d(),
|
|
415
|
-
|
|
418
|
+
return d(), f("svg", ge, a[0] || (a[0] = [
|
|
419
|
+
D("line", {
|
|
416
420
|
x1: "18",
|
|
417
421
|
y1: "6",
|
|
418
422
|
x2: "6",
|
|
419
423
|
y2: "18"
|
|
420
424
|
}, null, -1),
|
|
421
|
-
|
|
425
|
+
D("line", {
|
|
422
426
|
x1: "6",
|
|
423
427
|
y1: "6",
|
|
424
428
|
x2: "18",
|
|
@@ -426,19 +430,19 @@ function me(s, a) {
|
|
|
426
430
|
}, null, -1)
|
|
427
431
|
]));
|
|
428
432
|
}
|
|
429
|
-
const ye = /* @__PURE__ */ et(
|
|
433
|
+
const ye = /* @__PURE__ */ et(ve, [["render", me]]), be = ["data-visible"], we = { class: "sonner-spinner" }, xe = /* @__PURE__ */ bt({
|
|
430
434
|
__name: "Loader",
|
|
431
435
|
props: {
|
|
432
436
|
visible: { type: Boolean }
|
|
433
437
|
},
|
|
434
438
|
setup(s) {
|
|
435
439
|
const a = Array(12).fill(0);
|
|
436
|
-
return (t, n) => (d(),
|
|
440
|
+
return (t, n) => (d(), f("div", {
|
|
437
441
|
class: "sonner-loading-wrapper",
|
|
438
442
|
"data-visible": t.visible
|
|
439
443
|
}, [
|
|
440
|
-
|
|
441
|
-
(d(!0),
|
|
444
|
+
D("div", we, [
|
|
445
|
+
(d(!0), f(j, null, mt(N(a), (r) => (d(), f("div", {
|
|
442
446
|
key: `spinner-bar-${r}`,
|
|
443
447
|
class: "sonner-loading-bar"
|
|
444
448
|
}))), 128))
|
|
@@ -453,8 +457,8 @@ const ye = /* @__PURE__ */ et(fe, [["render", me]]), be = ["data-visible"], we =
|
|
|
453
457
|
width: "20"
|
|
454
458
|
};
|
|
455
459
|
function Ce(s, a) {
|
|
456
|
-
return d(),
|
|
457
|
-
|
|
460
|
+
return d(), f("svg", Be, a[0] || (a[0] = [
|
|
461
|
+
D("path", {
|
|
458
462
|
"fill-rule": "evenodd",
|
|
459
463
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
460
464
|
"clip-rule": "evenodd"
|
|
@@ -469,15 +473,15 @@ const Te = /* @__PURE__ */ et(ke, [["render", Ce]]), Se = {}, Pe = {
|
|
|
469
473
|
width: "20"
|
|
470
474
|
};
|
|
471
475
|
function $e(s, a) {
|
|
472
|
-
return d(),
|
|
473
|
-
|
|
476
|
+
return d(), f("svg", Pe, a[0] || (a[0] = [
|
|
477
|
+
D("path", {
|
|
474
478
|
"fill-rule": "evenodd",
|
|
475
479
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
476
480
|
"clip-rule": "evenodd"
|
|
477
481
|
}, null, -1)
|
|
478
482
|
]));
|
|
479
483
|
}
|
|
480
|
-
const
|
|
484
|
+
const Ee = /* @__PURE__ */ et(Se, [["render", $e]]), ze = {}, Me = {
|
|
481
485
|
xmlns: "http://www.w3.org/2000/svg",
|
|
482
486
|
viewBox: "0 0 24 24",
|
|
483
487
|
fill: "currentColor",
|
|
@@ -485,35 +489,35 @@ const ze = /* @__PURE__ */ et(Se, [["render", $e]]), Ee = {}, Me = {
|
|
|
485
489
|
width: "20"
|
|
486
490
|
};
|
|
487
491
|
function Ie(s, a) {
|
|
488
|
-
return d(),
|
|
489
|
-
|
|
492
|
+
return d(), f("svg", Me, a[0] || (a[0] = [
|
|
493
|
+
D("path", {
|
|
490
494
|
"fill-rule": "evenodd",
|
|
491
495
|
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
492
496
|
"clip-rule": "evenodd"
|
|
493
497
|
}, null, -1)
|
|
494
498
|
]));
|
|
495
499
|
}
|
|
496
|
-
const Ae = /* @__PURE__ */ et(
|
|
500
|
+
const Ae = /* @__PURE__ */ et(ze, [["render", Ie]]), Ye = {}, He = {
|
|
497
501
|
xmlns: "http://www.w3.org/2000/svg",
|
|
498
502
|
viewBox: "0 0 20 20",
|
|
499
503
|
fill: "currentColor",
|
|
500
504
|
height: "20",
|
|
501
505
|
width: "20"
|
|
502
506
|
};
|
|
503
|
-
function
|
|
504
|
-
return d(),
|
|
505
|
-
|
|
507
|
+
function Le(s, a) {
|
|
508
|
+
return d(), f("svg", He, a[0] || (a[0] = [
|
|
509
|
+
D("path", {
|
|
506
510
|
"fill-rule": "evenodd",
|
|
507
511
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
508
512
|
"clip-rule": "evenodd"
|
|
509
513
|
}, null, -1)
|
|
510
514
|
]));
|
|
511
515
|
}
|
|
512
|
-
const
|
|
516
|
+
const De = /* @__PURE__ */ et(Ye, [["render", Le]]), Oe = ["aria-label"], Ne = ["dir", "data-theme", "data-rich-colors", "data-y-position", "data-x-position", "data-lifted"], je = 3, Kt = "32px", _e = 356, Re = 14, Ve = typeof window < "u" && typeof document < "u";
|
|
513
517
|
function Ue(...s) {
|
|
514
518
|
return s.filter(Boolean).join(" ");
|
|
515
519
|
}
|
|
516
|
-
const
|
|
520
|
+
const aa = /* @__PURE__ */ bt({
|
|
517
521
|
name: "Toaster",
|
|
518
522
|
inheritAttrs: !1,
|
|
519
523
|
__name: "Toaster",
|
|
@@ -526,12 +530,12 @@ const ea = /* @__PURE__ */ bt({
|
|
|
526
530
|
expand: { type: Boolean, default: !1 },
|
|
527
531
|
duration: {},
|
|
528
532
|
gap: { default: Re },
|
|
529
|
-
visibleToasts: { default:
|
|
533
|
+
visibleToasts: { default: je },
|
|
530
534
|
closeButton: { type: Boolean, default: !1 },
|
|
531
535
|
toastOptions: { default: () => ({}) },
|
|
532
536
|
class: { default: "" },
|
|
533
537
|
style: { default: () => ({}) },
|
|
534
|
-
offset: { default:
|
|
538
|
+
offset: { default: Kt },
|
|
535
539
|
dir: { default: "auto" },
|
|
536
540
|
icons: {},
|
|
537
541
|
containerAriaLabel: { default: "Notifications" },
|
|
@@ -545,15 +549,15 @@ const ea = /* @__PURE__ */ bt({
|
|
|
545
549
|
const o = document.documentElement.getAttribute("dir");
|
|
546
550
|
return o === "auto" || !o ? window.getComputedStyle(document.documentElement).direction : o;
|
|
547
551
|
}
|
|
548
|
-
const n =
|
|
552
|
+
const n = Xt(), r = p([]), y = g(() => (o, i) => r.value.filter(
|
|
549
553
|
(l) => !l.position && i === 0 || l.position === o
|
|
550
554
|
)), T = g(() => {
|
|
551
555
|
const o = r.value.filter((i) => i.position).map((i) => i.position);
|
|
552
556
|
return o.length > 0 ? Array.from(new Set([a.position].concat(o))) : [a.position];
|
|
553
|
-
}),
|
|
557
|
+
}), E = p([]), h = p(!1), c = p(!1), v = p(
|
|
554
558
|
a.theme !== "system" ? a.theme : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
|
|
555
|
-
), b = p(null), I = p(null), B = p(!1),
|
|
556
|
-
function
|
|
559
|
+
), b = p(null), I = p(null), B = p(!1), ht = a.hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
|
|
560
|
+
function vt(o) {
|
|
557
561
|
var i;
|
|
558
562
|
(i = r.value.find((l) => l.id === o.id)) != null && i.delete || $.dismiss(o.id), r.value = r.value.filter(({ id: l }) => l !== o.id);
|
|
559
563
|
}
|
|
@@ -561,13 +565,13 @@ const ea = /* @__PURE__ */ bt({
|
|
|
561
565
|
var i, l;
|
|
562
566
|
B.value && !((l = (i = o.currentTarget) == null ? void 0 : i.contains) != null && l.call(i, o.relatedTarget)) && (B.value = !1, I.value && (I.value.focus({ preventScroll: !0 }), I.value = null));
|
|
563
567
|
}
|
|
564
|
-
function
|
|
568
|
+
function O(o) {
|
|
565
569
|
o.target instanceof HTMLElement && o.target.dataset.dismissible === "false" || B.value || (B.value = !0, I.value = o.relatedTarget);
|
|
566
570
|
}
|
|
567
571
|
function gt(o) {
|
|
568
572
|
o.target && o.target instanceof HTMLElement && o.target.dataset.dismissible === "false" || (c.value = !0);
|
|
569
573
|
}
|
|
570
|
-
return
|
|
574
|
+
return W((o) => {
|
|
571
575
|
const i = $.subscribe((l) => {
|
|
572
576
|
if (l.dismiss) {
|
|
573
577
|
r.value = r.value.map(
|
|
@@ -575,7 +579,7 @@ const ea = /* @__PURE__ */ bt({
|
|
|
575
579
|
);
|
|
576
580
|
return;
|
|
577
581
|
}
|
|
578
|
-
|
|
582
|
+
Zt(() => {
|
|
579
583
|
const w = r.value.findIndex(
|
|
580
584
|
(P) => P.id === l.id
|
|
581
585
|
);
|
|
@@ -587,55 +591,55 @@ const ea = /* @__PURE__ */ bt({
|
|
|
587
591
|
});
|
|
588
592
|
});
|
|
589
593
|
o(i);
|
|
590
|
-
}),
|
|
594
|
+
}), Wt(
|
|
591
595
|
() => a.theme,
|
|
592
596
|
(o) => {
|
|
593
597
|
if (o !== "system") {
|
|
594
|
-
|
|
598
|
+
v.value = o;
|
|
595
599
|
return;
|
|
596
600
|
}
|
|
597
|
-
if (o === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
601
|
+
if (o === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? v.value = "dark" : v.value = "light"), typeof window > "u") return;
|
|
598
602
|
const i = window.matchMedia("(prefers-color-scheme: dark)");
|
|
599
603
|
try {
|
|
600
604
|
i.addEventListener("change", ({ matches: l }) => {
|
|
601
|
-
l ?
|
|
605
|
+
l ? v.value = "dark" : v.value = "light";
|
|
602
606
|
});
|
|
603
607
|
} catch {
|
|
604
608
|
i.addListener(({ matches: l }) => {
|
|
605
609
|
try {
|
|
606
|
-
l ?
|
|
610
|
+
l ? v.value = "dark" : v.value = "light";
|
|
607
611
|
} catch (w) {
|
|
608
612
|
console.error(w);
|
|
609
613
|
}
|
|
610
614
|
});
|
|
611
615
|
}
|
|
612
616
|
}
|
|
613
|
-
),
|
|
617
|
+
), W(() => {
|
|
614
618
|
b.value && I.value && (I.value.focus({ preventScroll: !0 }), I.value = null, B.value = !1);
|
|
615
|
-
}),
|
|
616
|
-
r.value.length <= 1 && (
|
|
617
|
-
}),
|
|
619
|
+
}), W(() => {
|
|
620
|
+
r.value.length <= 1 && (h.value = !1);
|
|
621
|
+
}), W((o) => {
|
|
618
622
|
function i(l) {
|
|
619
623
|
const w = a.hotkey.every(
|
|
620
624
|
(H) => l[H] || l.code === H
|
|
621
625
|
), P = Array.isArray(b.value) ? b.value[0] : b.value;
|
|
622
|
-
w && (
|
|
626
|
+
w && (h.value = !0, P == null || P.focus());
|
|
623
627
|
const A = document.activeElement === b.value || (P == null ? void 0 : P.contains(document.activeElement));
|
|
624
|
-
l.code === "Escape" && A && (
|
|
628
|
+
l.code === "Escape" && A && (h.value = !1);
|
|
625
629
|
}
|
|
626
630
|
Ve && (document.addEventListener("keydown", i), o(() => {
|
|
627
631
|
document.removeEventListener("keydown", i);
|
|
628
632
|
}));
|
|
629
|
-
}), (o, i) => (d(),
|
|
630
|
-
"aria-label": `${o.containerAriaLabel} ${N(
|
|
633
|
+
}), (o, i) => (d(), f("section", {
|
|
634
|
+
"aria-label": `${o.containerAriaLabel} ${N(ht)}`,
|
|
631
635
|
tabIndex: -1,
|
|
632
636
|
"aria-live": "polite",
|
|
633
637
|
"aria-relevant": "additions text",
|
|
634
638
|
"aria-atomic": "false"
|
|
635
639
|
}, [
|
|
636
|
-
(d(!0),
|
|
640
|
+
(d(!0), f(j, null, mt(T.value, (l, w) => {
|
|
637
641
|
var P;
|
|
638
|
-
return d(),
|
|
642
|
+
return d(), f("ol", pt({
|
|
639
643
|
key: l,
|
|
640
644
|
ref_for: !0,
|
|
641
645
|
ref_key: "listRef",
|
|
@@ -648,89 +652,89 @@ const ea = /* @__PURE__ */ bt({
|
|
|
648
652
|
"data-rich-colors": o.richColors,
|
|
649
653
|
"data-y-position": l.split("-")[0],
|
|
650
654
|
"data-x-position": l.split("-")[1],
|
|
651
|
-
"data-lifted":
|
|
655
|
+
"data-lifted": h.value && r.value.length > 1 && !o.expand,
|
|
652
656
|
style: {
|
|
653
|
-
"--front-toast-height": `${(P =
|
|
654
|
-
"--offset": typeof o.offset == "number" ? `${o.offset}px` : o.offset ||
|
|
655
|
-
"--width": `${
|
|
657
|
+
"--front-toast-height": `${(P = E.value[0]) == null ? void 0 : P.height}px`,
|
|
658
|
+
"--offset": typeof o.offset == "number" ? `${o.offset}px` : o.offset || Kt,
|
|
659
|
+
"--width": `${_e}px`,
|
|
656
660
|
"--gap": `${o.gap}px`,
|
|
657
661
|
...o.style,
|
|
658
662
|
...N(n).style
|
|
659
663
|
}
|
|
660
664
|
}, o.$attrs, {
|
|
661
665
|
onBlur: S,
|
|
662
|
-
onFocus:
|
|
663
|
-
onMouseenter: i[1] || (i[1] = () =>
|
|
664
|
-
onMousemove: i[2] || (i[2] = () =>
|
|
666
|
+
onFocus: O,
|
|
667
|
+
onMouseenter: i[1] || (i[1] = () => h.value = !0),
|
|
668
|
+
onMousemove: i[2] || (i[2] = () => h.value = !0),
|
|
665
669
|
onMouseleave: i[3] || (i[3] = () => {
|
|
666
|
-
c.value || (
|
|
670
|
+
c.value || (h.value = !1);
|
|
667
671
|
}),
|
|
668
672
|
onPointerdown: gt,
|
|
669
673
|
onPointerup: i[4] || (i[4] = () => c.value = !1)
|
|
670
674
|
}), [
|
|
671
|
-
(d(!0),
|
|
672
|
-
var q, J, at, ot, st, nt, rt, it,
|
|
673
|
-
return d(),
|
|
675
|
+
(d(!0), f(j, null, mt(y.value(l, w), (A, H) => {
|
|
676
|
+
var q, J, at, ot, st, nt, rt, it, _;
|
|
677
|
+
return d(), K(he, {
|
|
674
678
|
key: A.id,
|
|
675
|
-
heights:
|
|
679
|
+
heights: E.value.filter((Y) => Y.position === A.position),
|
|
676
680
|
icons: o.icons,
|
|
677
681
|
index: H,
|
|
678
682
|
toast: A,
|
|
679
683
|
defaultRichColors: o.richColors,
|
|
680
684
|
duration: ((q = o.toastOptions) == null ? void 0 : q.duration) ?? o.duration,
|
|
681
|
-
class:
|
|
685
|
+
class: L(((J = o.toastOptions) == null ? void 0 : J.class) ?? ""),
|
|
682
686
|
descriptionClass: (at = o.toastOptions) == null ? void 0 : at.descriptionClass,
|
|
683
687
|
invert: o.invert,
|
|
684
688
|
visibleToasts: o.visibleToasts,
|
|
685
689
|
closeButton: ((ot = o.toastOptions) == null ? void 0 : ot.closeButton) ?? o.closeButton,
|
|
686
690
|
interacting: c.value,
|
|
687
691
|
position: l,
|
|
688
|
-
style:
|
|
692
|
+
style: ft((st = o.toastOptions) == null ? void 0 : st.style),
|
|
689
693
|
unstyled: (nt = o.toastOptions) == null ? void 0 : nt.unstyled,
|
|
690
694
|
classes: (rt = o.toastOptions) == null ? void 0 : rt.classes,
|
|
691
695
|
cancelButtonStyle: (it = o.toastOptions) == null ? void 0 : it.cancelButtonStyle,
|
|
692
|
-
actionButtonStyle: (
|
|
696
|
+
actionButtonStyle: (_ = o.toastOptions) == null ? void 0 : _.actionButtonStyle,
|
|
693
697
|
toasts: r.value.filter((Y) => Y.position === A.position),
|
|
694
698
|
expandByDefault: o.expand,
|
|
695
699
|
gap: o.gap,
|
|
696
|
-
expanded:
|
|
700
|
+
expanded: h.value,
|
|
697
701
|
pauseWhenPageIsHidden: o.pauseWhenPageIsHidden,
|
|
698
702
|
cn: o.cn,
|
|
699
703
|
"onUpdate:heights": i[0] || (i[0] = (Y) => {
|
|
700
|
-
|
|
704
|
+
E.value = Y;
|
|
701
705
|
}),
|
|
702
|
-
onRemoveToast:
|
|
706
|
+
onRemoveToast: vt
|
|
703
707
|
}, {
|
|
704
|
-
"close-icon":
|
|
705
|
-
|
|
706
|
-
|
|
708
|
+
"close-icon": V(() => [
|
|
709
|
+
z(o.$slots, "close-icon", {}, () => [
|
|
710
|
+
U(ye)
|
|
707
711
|
])
|
|
708
712
|
]),
|
|
709
|
-
"loading-icon":
|
|
710
|
-
|
|
711
|
-
|
|
713
|
+
"loading-icon": V(() => [
|
|
714
|
+
z(o.$slots, "loading-icon", {}, () => [
|
|
715
|
+
U(xe, {
|
|
712
716
|
visible: A.type === "loading"
|
|
713
717
|
}, null, 8, ["visible"])
|
|
714
718
|
])
|
|
715
719
|
]),
|
|
716
|
-
"success-icon":
|
|
717
|
-
|
|
718
|
-
|
|
720
|
+
"success-icon": V(() => [
|
|
721
|
+
z(o.$slots, "success-icon", {}, () => [
|
|
722
|
+
U(Te)
|
|
719
723
|
])
|
|
720
724
|
]),
|
|
721
|
-
"error-icon":
|
|
722
|
-
|
|
723
|
-
|
|
725
|
+
"error-icon": V(() => [
|
|
726
|
+
z(o.$slots, "error-icon", {}, () => [
|
|
727
|
+
U(De)
|
|
724
728
|
])
|
|
725
729
|
]),
|
|
726
|
-
"warning-icon":
|
|
727
|
-
|
|
728
|
-
|
|
730
|
+
"warning-icon": V(() => [
|
|
731
|
+
z(o.$slots, "warning-icon", {}, () => [
|
|
732
|
+
U(Ae)
|
|
729
733
|
])
|
|
730
734
|
]),
|
|
731
|
-
"info-icon":
|
|
732
|
-
|
|
733
|
-
|
|
735
|
+
"info-icon": V(() => [
|
|
736
|
+
z(o.$slots, "info-icon", {}, () => [
|
|
737
|
+
U(Ee)
|
|
734
738
|
])
|
|
735
739
|
]),
|
|
736
740
|
_: 2
|
|
@@ -738,18 +742,18 @@ const ea = /* @__PURE__ */ bt({
|
|
|
738
742
|
}), 128))
|
|
739
743
|
], 16, Ne);
|
|
740
744
|
}), 128))
|
|
741
|
-
], 8,
|
|
745
|
+
], 8, Oe));
|
|
742
746
|
}
|
|
743
|
-
}),
|
|
744
|
-
async function
|
|
745
|
-
return (await
|
|
746
|
-
"https://api.
|
|
747
|
+
}), Ge = () => Ft().PORTAL_V2_BACKEND, Ke = () => Ft().LICENSE_BACKEND;
|
|
748
|
+
async function We(s) {
|
|
749
|
+
return (await F.Get(
|
|
750
|
+
"https://api.feedme.vip",
|
|
747
751
|
`/short-url/${s}`
|
|
748
752
|
)).data;
|
|
749
753
|
}
|
|
750
754
|
async function Fe(s, a, t) {
|
|
751
|
-
return await
|
|
752
|
-
"https://api.
|
|
755
|
+
return await F.Post(
|
|
756
|
+
"https://api.feedme.vip",
|
|
753
757
|
"/short-url",
|
|
754
758
|
{
|
|
755
759
|
data: {
|
|
@@ -764,15 +768,15 @@ async function Fe(s, a, t) {
|
|
|
764
768
|
throw (r = n.response) == null ? void 0 : r.data;
|
|
765
769
|
});
|
|
766
770
|
}
|
|
767
|
-
async function
|
|
768
|
-
return (await
|
|
769
|
-
"https://api.
|
|
771
|
+
async function qe(s) {
|
|
772
|
+
return (await F.Get(
|
|
773
|
+
"https://api.feedme.vip",
|
|
770
774
|
`/metadata/${s}/config`
|
|
771
775
|
)).data;
|
|
772
776
|
}
|
|
773
|
-
async function
|
|
774
|
-
return (await
|
|
775
|
-
"https://api.
|
|
777
|
+
async function Je(s, a, t) {
|
|
778
|
+
return (await F.Post(
|
|
779
|
+
"https://api.feedme.vip",
|
|
776
780
|
`/metadata/${s}/config`,
|
|
777
781
|
{
|
|
778
782
|
data: {
|
|
@@ -783,9 +787,9 @@ async function qe(s, a, t) {
|
|
|
783
787
|
}
|
|
784
788
|
)).data;
|
|
785
789
|
}
|
|
786
|
-
async function
|
|
787
|
-
return await
|
|
788
|
-
|
|
790
|
+
async function Qe(s, a) {
|
|
791
|
+
return await F.Put(
|
|
792
|
+
Ge(),
|
|
789
793
|
`businesses/${s}/profile`,
|
|
790
794
|
{
|
|
791
795
|
data: a
|
|
@@ -795,22 +799,22 @@ async function Je(s, a) {
|
|
|
795
799
|
throw (r = n.response) == null ? void 0 : r.data;
|
|
796
800
|
});
|
|
797
801
|
}
|
|
798
|
-
async function
|
|
799
|
-
return (await
|
|
800
|
-
|
|
801
|
-
|
|
802
|
+
async function Xe(s) {
|
|
803
|
+
return (await F.Get(
|
|
804
|
+
Ke(),
|
|
805
|
+
`api/business/${s}/feature/miniprogram`
|
|
802
806
|
)).data;
|
|
803
807
|
}
|
|
804
|
-
const
|
|
805
|
-
getGlobalSlug:
|
|
808
|
+
const oa = {
|
|
809
|
+
getGlobalSlug: We,
|
|
806
810
|
setShortUrl: Fe,
|
|
807
|
-
getBusinessMetadata:
|
|
808
|
-
setBusinessMetadata:
|
|
809
|
-
updateBusinessProfile:
|
|
810
|
-
getBusinessPremiumStatus:
|
|
811
|
+
getBusinessMetadata: qe,
|
|
812
|
+
setBusinessMetadata: Je,
|
|
813
|
+
updateBusinessProfile: Qe,
|
|
814
|
+
getBusinessPremiumStatus: Xe
|
|
811
815
|
};
|
|
812
816
|
export {
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
817
|
+
oa as B,
|
|
818
|
+
ea as K,
|
|
819
|
+
aa as V
|
|
816
820
|
};
|