my-header-yichong 2.1.0 → 2.1.1

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/my-header.js CHANGED
@@ -304,21 +304,21 @@ function Pt(e, t, n) {
304
304
  const r = n.metaTokens, o = n.visitor || c, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && h.isSpecCompliantForm(t);
305
305
  if (!h.isFunction(o))
306
306
  throw new TypeError("visitor must be a function");
307
- function l(m) {
308
- if (m === null)
307
+ function l(v) {
308
+ if (v === null)
309
309
  return "";
310
- if (h.isDate(m))
311
- return m.toISOString();
312
- if (!d && h.isBlob(m))
310
+ if (h.isDate(v))
311
+ return v.toISOString();
312
+ if (!d && h.isBlob(v))
313
313
  throw new L("Blob is not supported. Use a Buffer instead.");
314
- return h.isArrayBuffer(m) || h.isTypedArray(m) ? d && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
314
+ return h.isArrayBuffer(v) || h.isTypedArray(v) ? d && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
315
315
  }
316
- function c(m, p, y) {
317
- let S = m;
318
- if (m && !y && typeof m == "object") {
316
+ function c(v, p, y) {
317
+ let S = v;
318
+ if (v && !y && typeof v == "object") {
319
319
  if (h.endsWith(p, "{}"))
320
- p = r ? p : p.slice(0, -2), m = JSON.stringify(m);
321
- else if (h.isArray(m) && gs(m) || (h.isFileList(m) || h.endsWith(p, "[]")) && (S = h.toArray(m)))
320
+ p = r ? p : p.slice(0, -2), v = JSON.stringify(v);
321
+ else if (h.isArray(v) && gs(v) || (h.isFileList(v) || h.endsWith(p, "[]")) && (S = h.toArray(v)))
322
322
  return p = xr(p), S.forEach(function(C, A) {
323
323
  !(h.isUndefined(C) || C === null) && t.append(
324
324
  // eslint-disable-next-line no-nested-ternary
@@ -327,31 +327,31 @@ function Pt(e, t, n) {
327
327
  );
328
328
  }), !1;
329
329
  }
330
- return Qt(m) ? !0 : (t.append(Fn(y, p, s), l(m)), !1);
330
+ return Qt(v) ? !0 : (t.append(Fn(y, p, s), l(v)), !1);
331
331
  }
332
332
  const u = [], f = Object.assign(ys, {
333
333
  defaultVisitor: c,
334
334
  convertValue: l,
335
335
  isVisitable: Qt
336
336
  });
337
- function v(m, p) {
338
- if (!h.isUndefined(m)) {
339
- if (u.indexOf(m) !== -1)
337
+ function m(v, p) {
338
+ if (!h.isUndefined(v)) {
339
+ if (u.indexOf(v) !== -1)
340
340
  throw Error("Circular reference detected in " + p.join("."));
341
- u.push(m), h.forEach(m, function(S, N) {
341
+ u.push(v), h.forEach(v, function(S, N) {
342
342
  (!(h.isUndefined(S) || S === null) && o.call(
343
343
  t,
344
344
  S,
345
345
  h.isString(N) ? N.trim() : N,
346
346
  p,
347
347
  f
348
- )) === !0 && v(S, p ? p.concat(N) : [N]);
348
+ )) === !0 && m(S, p ? p.concat(N) : [N]);
349
349
  }), u.pop();
350
350
  }
351
351
  }
352
352
  if (!h.isObject(e))
353
353
  throw new TypeError("data must be an object");
354
- return v(e), t;
354
+ return m(e), t;
355
355
  }
356
356
  function Rn(e) {
357
357
  const t = {
@@ -875,8 +875,8 @@ function Vs(e, t) {
875
875
  f += n[u++], u = u % e;
876
876
  if (o = (o + 1) % e, o === s && (s = (s + 1) % e), l - a < t)
877
877
  return;
878
- const v = c && l - c;
879
- return v ? Math.round(f * 1e3 / v) : void 0;
878
+ const m = c && l - c;
879
+ return m ? Math.round(f * 1e3 / m) : void 0;
880
880
  };
881
881
  }
882
882
  function In(e, t) {
@@ -908,21 +908,21 @@ const zs = typeof XMLHttpRequest < "u", qs = zs && function(e) {
908
908
  h.isFormData(o) && (ce.isStandardBrowserEnv || ce.isStandardBrowserWebWorkerEnv ? s.setContentType(!1) : s.setContentType("multipart/form-data;", !1));
909
909
  let l = new XMLHttpRequest();
910
910
  if (e.auth) {
911
- const v = e.auth.username || "", m = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
912
- s.set("Authorization", "Basic " + btoa(v + ":" + m));
911
+ const m = e.auth.username || "", v = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
912
+ s.set("Authorization", "Basic " + btoa(m + ":" + v));
913
913
  }
914
914
  const c = Ar(e.baseURL, e.url);
915
915
  l.open(e.method.toUpperCase(), Or(c, e.params, e.paramsSerializer), !0), l.timeout = e.timeout;
916
916
  function u() {
917
917
  if (!l)
918
918
  return;
919
- const v = he.from(
919
+ const m = he.from(
920
920
  "getAllResponseHeaders" in l && l.getAllResponseHeaders()
921
921
  ), p = {
922
922
  data: !a || a === "text" || a === "json" ? l.responseText : l.response,
923
923
  status: l.status,
924
924
  statusText: l.statusText,
925
- headers: v,
925
+ headers: m,
926
926
  config: e,
927
927
  request: l
928
928
  };
@@ -939,22 +939,22 @@ const zs = typeof XMLHttpRequest < "u", qs = zs && function(e) {
939
939
  }, l.onerror = function() {
940
940
  r(new L("Network Error", L.ERR_NETWORK, e, l)), l = null;
941
941
  }, l.ontimeout = function() {
942
- let m = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
942
+ let v = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
943
943
  const p = e.transitional || Tr;
944
- e.timeoutErrorMessage && (m = e.timeoutErrorMessage), r(new L(
945
- m,
944
+ e.timeoutErrorMessage && (v = e.timeoutErrorMessage), r(new L(
945
+ v,
946
946
  p.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
947
947
  e,
948
948
  l
949
949
  )), l = null;
950
950
  }, ce.isStandardBrowserEnv) {
951
- const v = (e.withCredentials || Us(c)) && e.xsrfCookieName && Is.read(e.xsrfCookieName);
952
- v && s.set(e.xsrfHeaderName, v);
951
+ const m = (e.withCredentials || Us(c)) && e.xsrfCookieName && Is.read(e.xsrfCookieName);
952
+ m && s.set(e.xsrfHeaderName, m);
953
953
  }
954
- o === void 0 && s.setContentType(null), "setRequestHeader" in l && h.forEach(s.toJSON(), function(m, p) {
955
- l.setRequestHeader(p, m);
956
- }), h.isUndefined(e.withCredentials) || (l.withCredentials = !!e.withCredentials), a && a !== "json" && (l.responseType = e.responseType), typeof e.onDownloadProgress == "function" && l.addEventListener("progress", In(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", In(e.onUploadProgress)), (e.cancelToken || e.signal) && (i = (v) => {
957
- l && (r(!v || v.type ? new st(null, e, l) : v), l.abort(), l = null);
954
+ o === void 0 && s.setContentType(null), "setRequestHeader" in l && h.forEach(s.toJSON(), function(v, p) {
955
+ l.setRequestHeader(p, v);
956
+ }), h.isUndefined(e.withCredentials) || (l.withCredentials = !!e.withCredentials), a && a !== "json" && (l.responseType = e.responseType), typeof e.onDownloadProgress == "function" && l.addEventListener("progress", In(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", In(e.onUploadProgress)), (e.cancelToken || e.signal) && (i = (m) => {
957
+ l && (r(!m || m.type ? new st(null, e, l) : m), l.abort(), l = null);
958
958
  }, e.cancelToken && e.cancelToken.subscribe(i), e.signal && (e.signal.aborted ? i() : e.signal.addEventListener("abort", i)));
959
959
  const f = Hs(c);
960
960
  if (f && ce.protocols.indexOf(f) === -1) {
@@ -1164,8 +1164,8 @@ class yt {
1164
1164
  s[n.method]
1165
1165
  ), a && h.forEach(
1166
1166
  ["delete", "get", "head", "post", "put", "patch", "common"],
1167
- (m) => {
1168
- delete s[m];
1167
+ (v) => {
1168
+ delete s[v];
1169
1169
  }
1170
1170
  ), n.headers = he.concat(a, s);
1171
1171
  const i = [];
@@ -1179,26 +1179,26 @@ class yt {
1179
1179
  });
1180
1180
  let c, u = 0, f;
1181
1181
  if (!d) {
1182
- const m = [Bn.bind(this), void 0];
1183
- for (m.unshift.apply(m, i), m.push.apply(m, l), f = m.length, c = Promise.resolve(n); u < f; )
1184
- c = c.then(m[u++], m[u++]);
1182
+ const v = [Bn.bind(this), void 0];
1183
+ for (v.unshift.apply(v, i), v.push.apply(v, l), f = v.length, c = Promise.resolve(n); u < f; )
1184
+ c = c.then(v[u++], v[u++]);
1185
1185
  return c;
1186
1186
  }
1187
1187
  f = i.length;
1188
- let v = n;
1188
+ let m = n;
1189
1189
  for (u = 0; u < f; ) {
1190
- const m = i[u++], p = i[u++];
1190
+ const v = i[u++], p = i[u++];
1191
1191
  try {
1192
- v = m(v);
1192
+ m = v(m);
1193
1193
  } catch (y) {
1194
1194
  p.call(this, y);
1195
1195
  break;
1196
1196
  }
1197
1197
  }
1198
1198
  try {
1199
- c = Bn.call(this, v);
1200
- } catch (m) {
1201
- return Promise.reject(m);
1199
+ c = Bn.call(this, m);
1200
+ } catch (v) {
1201
+ return Promise.reject(v);
1202
1202
  }
1203
1203
  for (u = 0, f = l.length; u < f; )
1204
1204
  c = c.then(l[u++], l[u++]);
@@ -1814,7 +1814,7 @@ const Mr = (e = "") => e.split(" ").filter((t) => !!t.trim()), Xn = (e, t) => {
1814
1814
  validator: n || a ? (l) => {
1815
1815
  let c = !1, u = [];
1816
1816
  if (n && (u = Array.from(n), qn(e, "default") && u.push(o), c || (c = u.includes(l))), a && (c || (c = a(l))), !c && u.length > 0) {
1817
- const f = [...new Set(u)].map((v) => JSON.stringify(v)).join(", ");
1817
+ const f = [...new Set(u)].map((m) => JSON.stringify(m)).join(", ");
1818
1818
  xo(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`);
1819
1819
  }
1820
1820
  return c;
@@ -2112,16 +2112,16 @@ function Xi(e) {
2112
2112
  r.text = f;
2113
2113
  }
2114
2114
  function s() {
2115
- const f = r.parent, v = u.ns;
2115
+ const f = r.parent, m = u.ns;
2116
2116
  if (!f.vLoadingAddClassList) {
2117
- let m = f.getAttribute("loading-number");
2118
- m = Number.parseInt(m) - 1, m ? f.setAttribute("loading-number", m.toString()) : (bt(f, v.bm("parent", "relative")), f.removeAttribute("loading-number")), bt(f, v.bm("parent", "hidden"));
2117
+ let v = f.getAttribute("loading-number");
2118
+ v = Number.parseInt(v) - 1, v ? f.setAttribute("loading-number", v.toString()) : (bt(f, m.bm("parent", "relative")), f.removeAttribute("loading-number")), bt(f, m.bm("parent", "hidden"));
2119
2119
  }
2120
2120
  a(), c.unmount();
2121
2121
  }
2122
2122
  function a() {
2123
- var f, v;
2124
- (v = (f = u.$el) == null ? void 0 : f.parentNode) == null || v.removeChild(u.$el);
2123
+ var f, m;
2124
+ (m = (f = u.$el) == null ? void 0 : f.parentNode) == null || m.removeChild(u.$el);
2125
2125
  }
2126
2126
  function i() {
2127
2127
  var f;
@@ -2135,10 +2135,10 @@ function Xi(e) {
2135
2135
  }
2136
2136
  const l = U({
2137
2137
  name: "ElLoading",
2138
- setup(f, { expose: v }) {
2139
- const { ns: m, zIndex: p } = Ji("loading");
2140
- return v({
2141
- ns: m,
2138
+ setup(f, { expose: m }) {
2139
+ const { ns: v, zIndex: p } = Ji("loading");
2140
+ return m({
2141
+ ns: v,
2142
2142
  zIndex: p
2143
2143
  }), () => {
2144
2144
  const y = r.spinner || r.svg, S = j("svg", {
@@ -2153,9 +2153,9 @@ function Xi(e) {
2153
2153
  r: "20",
2154
2154
  fill: "none"
2155
2155
  })
2156
- ]), N = r.text ? j("p", { class: m.b("text") }, [r.text]) : void 0;
2156
+ ]), N = r.text ? j("p", { class: v.b("text") }, [r.text]) : void 0;
2157
2157
  return j(dr, {
2158
- name: m.b("fade"),
2158
+ name: v.b("fade"),
2159
2159
  onAfterLeave: d
2160
2160
  }, {
2161
2161
  default: be(() => [
@@ -2164,13 +2164,13 @@ function Xi(e) {
2164
2164
  backgroundColor: r.background || ""
2165
2165
  },
2166
2166
  class: [
2167
- m.b("mask"),
2167
+ v.b("mask"),
2168
2168
  r.customClass,
2169
2169
  r.fullscreen ? "is-fullscreen" : ""
2170
2170
  ]
2171
2171
  }, [
2172
2172
  j("div", {
2173
- class: m.b("spinner")
2173
+ class: v.b("spinner")
2174
2174
  }, [S, N])
2175
2175
  ]), [[fr, r.visible]])
2176
2176
  ])
@@ -2245,8 +2245,8 @@ const rn = function(e = {}) {
2245
2245
  }, on = Symbol("ElLoading"), er = (e, t) => {
2246
2246
  var n, r, o, s;
2247
2247
  const a = t.instance, i = (f) => Ct(t.value) ? t.value[f] : void 0, d = (f) => {
2248
- const v = En(f) && (a == null ? void 0 : a[f]) || f;
2249
- return v && T(v);
2248
+ const m = En(f) && (a == null ? void 0 : a[f]) || f;
2249
+ return m && T(m);
2250
2250
  }, l = (f) => d(i(f) || e.getAttribute(`element-loading-${oa(f)}`)), c = (n = i("fullscreen")) != null ? n : t.modifiers.fullscreen, u = {
2251
2251
  text: l("text"),
2252
2252
  svg: l("svg"),
@@ -2334,14 +2334,15 @@ function je({ url: e, data: t = null, method: n = "GET", headers: r = null, cach
2334
2334
  return Promise.race([c(), fetch(e, l).then((u) => u.json())]).then((u) => (console.log(u), u.success == !0 || u.ok === 0 || u.code == 0 ? (o && (s ? ut.put(o, u.data, s) : ut.put(o, u.data)), (u.message || u.message == 0) && (window.g_message = u.message), Promise.resolve(u.data)) : u && u.image || u && u.GOOGLE_ACCESS_TOKEN ? (o && (s ? ut.put(o, u, s) : ut.put(o, u)), Promise.resolve(u)) : u.statusText == "timeout" ? Promise.reject("The system is busy, please try again later") : Promise.reject(u.message || u.msg && u || "failed, please check your network and try again"))).catch((u) => Promise.reject(u));
2335
2335
  }
2336
2336
  let Ie = kt();
2337
- function nr() {
2338
- const e = {
2337
+ function nr(e = !1) {
2338
+ const t = {
2339
2339
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
2340
2340
  };
2341
- return je({
2342
- url: Ie + "/api/user/status",
2341
+ let n = Ie + "/api/user/status";
2342
+ return e && (n += "?drive=1"), je({
2343
+ url: n,
2343
2344
  method: "POST",
2344
- headers: e
2345
+ headers: t
2345
2346
  });
2346
2347
  }
2347
2348
  const nl = (e) => je({
@@ -2428,8 +2429,8 @@ function Jt({ props: e, attrs: t, slots: n, slot: r, name: o }) {
2428
2429
  let { as: i, ...d } = il(e, ["unmount", "static"]), l = (s = n.default) == null ? void 0 : s.call(n, r), c = {};
2429
2430
  if (r) {
2430
2431
  let u = !1, f = [];
2431
- for (let [v, m] of Object.entries(r))
2432
- typeof m == "boolean" && (u = !0), m === !0 && f.push(v);
2432
+ for (let [m, v] of Object.entries(r))
2433
+ typeof v == "boolean" && (u = !0), v === !0 && f.push(m);
2433
2434
  u && (c["data-headlessui-state"] = f.join(" "));
2434
2435
  }
2435
2436
  if (i === "template") {
@@ -2440,10 +2441,10 @@ function Jt({ props: e, attrs: t, slots: n, slot: r, name: o }) {
2440
2441
  `), "", "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((p) => ` - ${p}`).join(`
2441
2442
  `)].join(`
2442
2443
  `));
2443
- let v = Zr((a = u.props) != null ? a : {}, d), m = Oo(u, v);
2444
- for (let p in v)
2445
- p.startsWith("on") && (m.props || (m.props = {}), m.props[p] = v[p]);
2446
- return m;
2444
+ let m = Zr((a = u.props) != null ? a : {}, d), v = Oo(u, m);
2445
+ for (let p in m)
2446
+ p.startsWith("on") && (v.props || (v.props = {}), v.props[p] = m[p]);
2447
+ return v;
2447
2448
  }
2448
2449
  return Array.isArray(l) && l.length === 1 ? l[0] : l;
2449
2450
  }
@@ -2602,7 +2603,7 @@ function wl(e, t = (n) => n) {
2602
2603
  function ne(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: o = [] } = {}) {
2603
2604
  var s;
2604
2605
  let a = (s = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? s : document, i = Array.isArray(e) ? n ? wl(e) : e : $t(e);
2605
- o.length > 0 && i.length > 1 && (i = i.filter((m) => !o.includes(m))), r = r ?? a.activeElement;
2606
+ o.length > 0 && i.length > 1 && (i = i.filter((v) => !o.includes(v))), r = r ?? a.activeElement;
2606
2607
  let d = (() => {
2607
2608
  if (t & 5)
2608
2609
  return 1;
@@ -2619,22 +2620,22 @@ function ne(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: o = [] }
2619
2620
  if (t & 8)
2620
2621
  return i.length - 1;
2621
2622
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
2622
- })(), c = t & 32 ? { preventScroll: !0 } : {}, u = 0, f = i.length, v;
2623
+ })(), c = t & 32 ? { preventScroll: !0 } : {}, u = 0, f = i.length, m;
2623
2624
  do {
2624
2625
  if (u >= f || u + f <= 0)
2625
2626
  return 0;
2626
- let m = l + u;
2627
+ let v = l + u;
2627
2628
  if (t & 16)
2628
- m = (m + f) % f;
2629
+ v = (v + f) % f;
2629
2630
  else {
2630
- if (m < 0)
2631
+ if (v < 0)
2631
2632
  return 3;
2632
- if (m >= f)
2633
+ if (v >= f)
2633
2634
  return 1;
2634
2635
  }
2635
- v = i[m], v == null || v.focus(c), u += d;
2636
- } while (v !== a.activeElement);
2637
- return t & 6 && bl(v) && v.select(), 2;
2636
+ m = i[v], m == null || m.focus(c), u += d;
2637
+ } while (m !== a.activeElement);
2638
+ return t & 6 && bl(m) && m.select(), 2;
2638
2639
  }
2639
2640
  function sr(e, t, n) {
2640
2641
  Lt.isServer || se((r) => {
@@ -2761,33 +2762,33 @@ let ze = Object.assign(U({ name: "FocusTrap", props: { as: { type: [Object, Stri
2761
2762
  let i = Pl({ ownerDocument: s, container: o, initialFocus: x(() => e.initialFocus) }, x(() => a.value && !!(e.features & 2)));
2762
2763
  Ol({ ownerDocument: s, container: o, containers: e.containers, previousActiveElement: i }, x(() => a.value && !!(e.features & 8)));
2763
2764
  let d = Nn();
2764
- function l(v) {
2765
- let m = _(o);
2766
- m && ((p) => p())(() => {
2765
+ function l(m) {
2766
+ let v = _(o);
2767
+ v && ((p) => p())(() => {
2767
2768
  X(d.value, { [Y.Forwards]: () => {
2768
- ne(m, q.First, { skipElements: [v.relatedTarget] });
2769
+ ne(v, q.First, { skipElements: [m.relatedTarget] });
2769
2770
  }, [Y.Backwards]: () => {
2770
- ne(m, q.Last, { skipElements: [v.relatedTarget] });
2771
+ ne(v, q.Last, { skipElements: [m.relatedTarget] });
2771
2772
  } });
2772
2773
  });
2773
2774
  }
2774
2775
  let c = T(!1);
2775
- function u(v) {
2776
- v.key === "Tab" && (c.value = !0, requestAnimationFrame(() => {
2776
+ function u(m) {
2777
+ m.key === "Tab" && (c.value = !0, requestAnimationFrame(() => {
2777
2778
  c.value = !1;
2778
2779
  }));
2779
2780
  }
2780
- function f(v) {
2781
+ function f(m) {
2781
2782
  if (!a.value)
2782
2783
  return;
2783
- let m = so(e.containers);
2784
- _(o) instanceof HTMLElement && m.add(_(o));
2785
- let p = v.relatedTarget;
2786
- p instanceof HTMLElement && p.dataset.headlessuiFocusGuard !== "true" && (io(m, p) || (c.value ? ne(_(o), X(d.value, { [Y.Forwards]: () => q.Next, [Y.Backwards]: () => q.Previous }) | q.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && Ee(v.target)));
2784
+ let v = so(e.containers);
2785
+ _(o) instanceof HTMLElement && v.add(_(o));
2786
+ let p = m.relatedTarget;
2787
+ p instanceof HTMLElement && p.dataset.headlessuiFocusGuard !== "true" && (io(v, p) || (c.value ? ne(_(o), X(d.value, { [Y.Forwards]: () => q.Next, [Y.Backwards]: () => q.Previous }) | q.WrapAround, { relativeTo: m.target }) : m.target instanceof HTMLElement && Ee(m.target)));
2787
2788
  }
2788
2789
  return () => {
2789
- let v = {}, m = { ref: o, onKeydown: u, onFocusout: f }, { features: p, initialFocus: y, containers: S, ...N } = e;
2790
- return j(ve, [!!(p & 4) && j(Fe, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: l, features: Oe.Focusable }), G({ ourProps: m, theirProps: { ...t, ...N }, slot: v, attrs: t, slots: n, name: "FocusTrap" }), !!(p & 4) && j(Fe, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: l, features: Oe.Focusable })]);
2790
+ let m = {}, v = { ref: o, onKeydown: u, onFocusout: f }, { features: p, initialFocus: y, containers: S, ...N } = e;
2791
+ return j(ve, [!!(p & 4) && j(Fe, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: l, features: Oe.Focusable }), G({ ourProps: v, theirProps: { ...t, ...N }, slot: m, attrs: t, slots: n, name: "FocusTrap" }), !!(p & 4) && j(Fe, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: l, features: Oe.Focusable })]);
2791
2792
  };
2792
2793
  } }), { features: ao }), we = [];
2793
2794
  El(() => {
@@ -3146,15 +3147,15 @@ let ft = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Hl = U({ name: "Dialog", inheri
3146
3147
  throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
3147
3148
  if (typeof l.value != "boolean")
3148
3149
  throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${l.value === ft ? void 0 : e.open}`);
3149
- let f = x(() => a.value && l.value ? 0 : 1), v = x(() => f.value === 0), m = x(() => i.value > 1), p = H(cn, null) !== null, [y, S] = co(), { resolveContainers: N, mainTreeNodeRef: C, MainTreeNode: A } = mo({ portals: y, defaultContainers: [x(() => {
3150
+ let f = x(() => a.value && l.value ? 0 : 1), m = x(() => f.value === 0), v = x(() => i.value > 1), p = H(cn, null) !== null, [y, S] = co(), { resolveContainers: N, mainTreeNodeRef: C, MainTreeNode: A } = mo({ portals: y, defaultContainers: [x(() => {
3150
3151
  var F;
3151
3152
  return (F = I.panelRef.value) != null ? F : c.value;
3152
- })] }), E = x(() => m.value ? "parent" : "leaf"), O = x(() => d !== null ? (d.value & te.Closing) === te.Closing : !1), b = x(() => p || O.value ? !1 : v.value), V = x(() => {
3153
+ })] }), E = x(() => v.value ? "parent" : "leaf"), O = x(() => d !== null ? (d.value & te.Closing) === te.Closing : !1), b = x(() => p || O.value ? !1 : m.value), V = x(() => {
3153
3154
  var F, R, ie;
3154
3155
  return (ie = Array.from((R = (F = u.value) == null ? void 0 : F.querySelectorAll("body > *")) != null ? R : []).find((le) => le.id === "headlessui-portal-root" ? !1 : le.contains(_(C)) && le instanceof HTMLElement)) != null ? ie : null;
3155
3156
  });
3156
3157
  ar(V, b);
3157
- let W = x(() => m.value ? !0 : v.value), P = x(() => {
3158
+ let W = x(() => v.value ? !0 : m.value), P = x(() => {
3158
3159
  var F, R, ie;
3159
3160
  return (ie = Array.from((R = (F = u.value) == null ? void 0 : F.querySelectorAll("[data-headlessui-portal]")) != null ? R : []).find((le) => le.contains(_(C)) && le instanceof HTMLElement)) != null ? ie : null;
3160
3161
  });
@@ -3168,11 +3169,11 @@ let ft = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Hl = U({ name: "Dialog", inheri
3168
3169
  t("close", !1);
3169
3170
  } };
3170
3171
  oe(cn, I);
3171
- let ge = x(() => !(!v.value || m.value));
3172
+ let ge = x(() => !(!m.value || v.value));
3172
3173
  no(N, (F, R) => {
3173
3174
  I.close(), Xe(() => R == null ? void 0 : R.focus());
3174
3175
  }, ge);
3175
- let Rt = x(() => !(m.value || f.value !== 0));
3176
+ let Rt = x(() => !(v.value || f.value !== 0));
3176
3177
  An((s = u.value) == null ? void 0 : s.defaultView, "keydown", (F) => {
3177
3178
  Rt.value && (F.defaultPrevented || F.key === pe.Escape && (F.preventDefault(), F.stopPropagation(), I.close()));
3178
3179
  });
@@ -3195,7 +3196,7 @@ let ft = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Hl = U({ name: "Dialog", inheri
3195
3196
  ie.observe(R), F(() => ie.disconnect());
3196
3197
  }), () => {
3197
3198
  let { id: F, open: R, initialFocus: ie, ...le } = e, jt = { ...n, ref: c, id: F, role: "dialog", "aria-modal": f.value === 0 ? !0 : void 0, "aria-labelledby": D.value, "aria-describedby": w.value }, Ae = { open: f.value === 0 };
3198
- return j(an, { force: !0 }, () => [j(uo, () => j(Nl, { target: c.value }, () => j(an, { force: !1 }, () => j(ze, { initialFocus: ie, containers: N, features: v.value ? X(E.value, { parent: ze.features.RestoreFocus, leaf: ze.features.All & ~ze.features.FocusLock }) : ze.features.None }, () => j(S, {}, () => G({ ourProps: jt, theirProps: { ...le, ...n }, slot: Ae, attrs: n, slots: r, visible: f.value === 0, features: Pe.RenderStrategy | Pe.Static, name: "Dialog" })))))), j(A)]);
3199
+ return j(an, { force: !0 }, () => [j(uo, () => j(Nl, { target: c.value }, () => j(an, { force: !1 }, () => j(ze, { initialFocus: ie, containers: N, features: m.value ? X(E.value, { parent: ze.features.RestoreFocus, leaf: ze.features.All & ~ze.features.FocusLock }) : ze.features.None }, () => j(S, {}, () => G({ ourProps: jt, theirProps: { ...le, ...n }, slot: Ae, attrs: n, slots: r, visible: f.value === 0, features: Pe.RenderStrategy | Pe.Static, name: "Dialog" })))))), j(A)]);
3199
3200
  };
3200
3201
  } });
3201
3202
  U({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${ee()}` } }, setup(e, { attrs: t, slots: n }) {
@@ -3269,31 +3270,31 @@ let wo = U({ name: "Popover", props: { as: { type: [Object, String], default: "d
3269
3270
  return !0;
3270
3271
  let b = $t(), V = b.indexOf(_(i)), W = (V + b.length - 1) % b.length, P = (V + 1) % b.length, w = b[W], D = b[P];
3271
3272
  return !((E = _(c)) != null && E.contains(w)) && !((O = _(c)) != null && O.contains(D));
3272
- }), v = { popoverState: a, buttonId: T(null), panelId: T(null), panel: c, button: i, isPortalled: f, beforePanelSentinel: d, afterPanelSentinel: l, togglePopover() {
3273
+ }), m = { popoverState: a, buttonId: T(null), panelId: T(null), panel: c, button: i, isPortalled: f, beforePanelSentinel: d, afterPanelSentinel: l, togglePopover() {
3273
3274
  a.value = X(a.value, { [0]: 1, [1]: 0 });
3274
3275
  }, closePopover() {
3275
3276
  a.value !== 1 && (a.value = 1);
3276
3277
  }, close(E) {
3277
- v.closePopover();
3278
- let O = (() => E ? E instanceof HTMLElement ? E : E.value instanceof HTMLElement ? _(E) : _(v.button) : _(v.button))();
3278
+ m.closePopover();
3279
+ let O = (() => E ? E instanceof HTMLElement ? E : E.value instanceof HTMLElement ? _(E) : _(m.button) : _(m.button))();
3279
3280
  O == null || O.focus();
3280
3281
  } };
3281
- oe(vo, v), dl(x(() => X(a.value, { [0]: te.Open, [1]: te.Closed })));
3282
- let m = { buttonId: v.buttonId, panelId: v.panelId, close() {
3283
- v.closePopover();
3282
+ oe(vo, m), dl(x(() => X(a.value, { [0]: te.Open, [1]: te.Closed })));
3283
+ let v = { buttonId: m.buttonId, panelId: m.panelId, close() {
3284
+ m.closePopover();
3284
3285
  } }, p = yo(), y = p == null ? void 0 : p.registerPopover, [S, N] = co(), C = mo({ portals: S, defaultContainers: [i, c] });
3285
3286
  function A() {
3286
3287
  var E, O, b, V;
3287
3288
  return (V = p == null ? void 0 : p.isFocusWithinPopoverGroup()) != null ? V : ((E = u.value) == null ? void 0 : E.activeElement) && (((O = _(i)) == null ? void 0 : O.contains(u.value.activeElement)) || ((b = _(c)) == null ? void 0 : b.contains(u.value.activeElement)));
3288
3289
  }
3289
- return se(() => y == null ? void 0 : y(m)), An((o = u.value) == null ? void 0 : o.defaultView, "focus", (E) => {
3290
+ return se(() => y == null ? void 0 : y(v)), An((o = u.value) == null ? void 0 : o.defaultView, "focus", (E) => {
3290
3291
  var O, b;
3291
- E.target !== window && E.target instanceof HTMLElement && a.value === 0 && (A() || i && c && (C.contains(E.target) || (O = _(v.beforePanelSentinel)) != null && O.contains(E.target) || (b = _(v.afterPanelSentinel)) != null && b.contains(E.target) || v.closePopover()));
3292
+ E.target !== window && E.target instanceof HTMLElement && a.value === 0 && (A() || i && c && (C.contains(E.target) || (O = _(m.beforePanelSentinel)) != null && O.contains(E.target) || (b = _(m.afterPanelSentinel)) != null && b.contains(E.target) || m.closePopover()));
3292
3293
  }, !0), no(C.resolveContainers, (E, O) => {
3293
3294
  var b;
3294
- v.closePopover(), eo(O, Cn.Loose) || (E.preventDefault(), (b = _(i)) == null || b.focus());
3295
+ m.closePopover(), eo(O, Cn.Loose) || (E.preventDefault(), (b = _(i)) == null || b.focus());
3295
3296
  }, x(() => a.value === 0)), () => {
3296
- let E = { open: a.value === 0, close: v.close };
3297
+ let E = { open: a.value === 0, close: m.close };
3297
3298
  return j(N, {}, () => G({ theirProps: { ...e, ...n }, ourProps: { ref: s }, slot: E, slots: t, attrs: n, name: "Popover" }));
3298
3299
  };
3299
3300
  } }), Gl = U({ name: "PopoverButton", props: { as: { type: [Object, String], default: "button" }, disabled: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-popover-button-${ee()}` } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: r }) {
@@ -3308,7 +3309,7 @@ let wo = U({ name: "Popover", props: { as: { type: [Object, String], default: "d
3308
3309
  o.button.value = c.value;
3309
3310
  });
3310
3311
  let f = fl(x(() => ({ as: e.as, type: t.type })), c);
3311
- function v(C) {
3312
+ function m(C) {
3312
3313
  var A, E, O, b, V;
3313
3314
  if (l.value) {
3314
3315
  if (o.popoverState.value === 1)
@@ -3334,7 +3335,7 @@ let wo = U({ name: "Popover", props: { as: { type: [Object, String], default: "d
3334
3335
  break;
3335
3336
  }
3336
3337
  }
3337
- function m(C) {
3338
+ function v(C) {
3338
3339
  l.value || C.key === pe.Space && C.preventDefault();
3339
3340
  }
3340
3341
  function p(C) {
@@ -3355,7 +3356,7 @@ let wo = U({ name: "Popover", props: { as: { type: [Object, String], default: "d
3355
3356
  A();
3356
3357
  }
3357
3358
  return () => {
3358
- let C = o.popoverState.value === 0, A = { open: C }, { id: E, ...O } = e, b = l.value ? { ref: c, type: f.value, onKeydown: v, onClick: p } : { ref: c, id: E, type: f.value, "aria-expanded": e.disabled ? void 0 : o.popoverState.value === 0, "aria-controls": _(o.panel) ? o.panelId.value : void 0, disabled: e.disabled ? !0 : void 0, onKeydown: v, onKeyup: m, onClick: p, onMousedown: y };
3359
+ let C = o.popoverState.value === 0, A = { open: C }, { id: E, ...O } = e, b = l.value ? { ref: c, type: f.value, onKeydown: m, onClick: p } : { ref: c, id: E, type: f.value, "aria-expanded": e.disabled ? void 0 : o.popoverState.value === 0, "aria-controls": _(o.panel) ? o.panelId.value : void 0, disabled: e.disabled ? !0 : void 0, onKeydown: m, onKeyup: v, onClick: p, onMousedown: y };
3359
3360
  return j(ve, [G({ ourProps: b, theirProps: { ...t, ...O }, slot: A, attrs: t, slots: n, name: "PopoverButton" }), C && !l.value && o.isPortalled.value && j(Fe, { id: u, features: Oe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: N })]);
3360
3361
  };
3361
3362
  } });
@@ -3398,13 +3399,13 @@ let Wl = U({ name: "PopoverPanel", props: { as: { type: [Object, String], defaul
3398
3399
  let O = y.relatedTarget;
3399
3400
  O && _(s.panel) && ((S = _(s.panel)) != null && S.contains(O) || (s.closePopover(), ((C = (N = _(s.beforePanelSentinel)) == null ? void 0 : N.contains) != null && C.call(N, O) || (E = (A = _(s.afterPanelSentinel)) == null ? void 0 : A.contains) != null && E.call(A, O)) && O.focus({ preventScroll: !0 })));
3400
3401
  }
3401
- let v = Nn();
3402
- function m() {
3402
+ let m = Nn();
3403
+ function v() {
3403
3404
  let y = _(s.panel);
3404
3405
  if (!y)
3405
3406
  return;
3406
3407
  function S() {
3407
- X(v.value, { [Y.Forwards]: () => {
3408
+ X(m.value, { [Y.Forwards]: () => {
3408
3409
  var N;
3409
3410
  ne(y, q.First) === et.Error && ((N = _(s.afterPanelSentinel)) == null || N.focus());
3410
3411
  }, [Y.Backwards]: () => {
@@ -3419,7 +3420,7 @@ let Wl = U({ name: "PopoverPanel", props: { as: { type: [Object, String], defaul
3419
3420
  if (!y)
3420
3421
  return;
3421
3422
  function S() {
3422
- X(v.value, { [Y.Forwards]: () => {
3423
+ X(m.value, { [Y.Forwards]: () => {
3423
3424
  let N = _(s.button), C = _(s.panel);
3424
3425
  if (!N)
3425
3426
  return;
@@ -3441,7 +3442,7 @@ let Wl = U({ name: "PopoverPanel", props: { as: { type: [Object, String], defaul
3441
3442
  let y = { open: s.popoverState.value === 0, close: s.close }, { id: S, focus: N, ...C } = e, A = { ref: s.panel, id: S, onKeydown: u, onFocusout: o && s.popoverState.value === 0 ? f : void 0, tabIndex: -1 };
3442
3443
  return G({ ourProps: A, theirProps: { ...t, ...C }, attrs: t, slot: y, slots: { ...n, default: (...E) => {
3443
3444
  var O;
3444
- return [j(ve, [c.value && s.isPortalled.value && j(Fe, { id: i, ref: s.beforePanelSentinel, features: Oe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: m }), (O = n.default) == null ? void 0 : O.call(n, ...E), c.value && s.isPortalled.value && j(Fe, { id: d, ref: s.afterPanelSentinel, features: Oe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: p })])];
3445
+ return [j(ve, [c.value && s.isPortalled.value && j(Fe, { id: i, ref: s.beforePanelSentinel, features: Oe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: v }), (O = n.default) == null ? void 0 : O.call(n, ...E), c.value && s.isPortalled.value && j(Fe, { id: d, ref: s.afterPanelSentinel, features: Oe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: p })])];
3445
3446
  } }, features: Pe.RenderStrategy | Pe.Static, visible: c.value, name: "PopoverPanel" });
3446
3447
  };
3447
3448
  } });
@@ -3462,10 +3463,10 @@ U({ name: "PopoverGroup", props: { as: { type: [Object, String], default: "div"
3462
3463
  let f = a.value;
3463
3464
  if (!f)
3464
3465
  return !1;
3465
- let v = f.activeElement;
3466
- return (u = _(o)) != null && u.contains(v) ? !0 : s.value.some((m) => {
3466
+ let m = f.activeElement;
3467
+ return (u = _(o)) != null && u.contains(m) ? !0 : s.value.some((v) => {
3467
3468
  var p, y;
3468
- return ((p = f.getElementById(m.buttonId.value)) == null ? void 0 : p.contains(v)) || ((y = f.getElementById(m.panelId.value)) == null ? void 0 : y.contains(v));
3469
+ return ((p = f.getElementById(v.buttonId.value)) == null ? void 0 : p.contains(m)) || ((y = f.getElementById(v.panelId.value)) == null ? void 0 : y.contains(m));
3469
3470
  });
3470
3471
  }
3471
3472
  function c(u) {
@@ -4062,8 +4063,8 @@ function ur(e, t, n, r) {
4062
4063
  ) : Xt(n.state.value[e]);
4063
4064
  return Z(c, s, Object.keys(a || {}).reduce((u, f) => (process.env.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}".`), u[f] = Ge(x(() => {
4064
4065
  _t(n);
4065
- const v = n._s.get(e);
4066
- return a[f].call(v, v);
4066
+ const m = n._s.get(e);
4067
+ return a[f].call(m, m);
4067
4068
  })), u), {}));
4068
4069
  }
4069
4070
  return d = fn(e, l, t, n, r, !0), d;
@@ -4078,24 +4079,24 @@ function fn(e, t, n = {}, r, o, s) {
4078
4079
  // flush: 'post',
4079
4080
  };
4080
4081
  process.env.NODE_ENV !== "production" && !Qs && (d.onTrigger = (P) => {
4081
- l ? v = P : l == !1 && !b._hotUpdating && (Array.isArray(v) ? v.push(P) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
4082
+ l ? m = P : l == !1 && !b._hotUpdating && (Array.isArray(m) ? m.push(P) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
4082
4083
  });
4083
- let l, c, u = [], f = [], v;
4084
- const m = r.state.value[e];
4085
- !s && !m && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
4084
+ let l, c, u = [], f = [], m;
4085
+ const v = r.state.value[e];
4086
+ !s && !v && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
4086
4087
  const p = T({});
4087
4088
  let y;
4088
4089
  function S(P) {
4089
4090
  let w;
4090
- l = c = !1, process.env.NODE_ENV !== "production" && (v = []), typeof P == "function" ? (P(r.state.value[e]), w = {
4091
+ l = c = !1, process.env.NODE_ENV !== "production" && (m = []), typeof P == "function" ? (P(r.state.value[e]), w = {
4091
4092
  type: Ye.patchFunction,
4092
4093
  storeId: e,
4093
- events: v
4094
+ events: m
4094
4095
  }) : (dn(r.state.value[e], P), w = {
4095
4096
  type: Ye.patchObject,
4096
4097
  payload: P,
4097
4098
  storeId: e,
4098
- events: v
4099
+ events: m
4099
4100
  });
4100
4101
  const D = y = Symbol();
4101
4102
  Xe().then(() => {
@@ -4159,7 +4160,7 @@ function fn(e, t, n = {}, r, o, s) {
4159
4160
  (w.flush === "sync" ? c : l) && P({
4160
4161
  storeId: e,
4161
4162
  type: Ye.direct,
4162
- events: v
4163
+ events: m
4163
4164
  }, ge);
4164
4165
  }, Z({}, d, w)));
4165
4166
  return D;
@@ -4180,7 +4181,7 @@ function fn(e, t, n = {}, r, o, s) {
4180
4181
  for (const P in W) {
4181
4182
  const w = W[P];
4182
4183
  if (Se(w) && !lr(w) || mn(w))
4183
- process.env.NODE_ENV !== "production" && o ? ct(p.value, P, Bt(W, P)) : s || (m && $u(w) && (Se(w) ? w.value = m[P] : dn(w, m[P])), r.state.value[e][P] = w), process.env.NODE_ENV !== "production" && E.state.push(P);
4184
+ process.env.NODE_ENV !== "production" && o ? ct(p.value, P, Bt(W, P)) : s || (v && $u(w) && (Se(w) ? w.value = v[P] : dn(w, v[P])), r.state.value[e][P] = w), process.env.NODE_ENV !== "production" && E.state.push(P);
4184
4185
  else if (typeof w == "function") {
4185
4186
  const D = process.env.NODE_ENV !== "production" && o ? w : A(P, w);
4186
4187
  W[P] = D, process.env.NODE_ENV !== "production" && (E.actions[P] = w), i.actions[P] = w;
@@ -4257,7 +4258,7 @@ function fn(e, t, n = {}, r, o, s) {
4257
4258
  })));
4258
4259
  }), process.env.NODE_ENV !== "production" && b.$state && typeof b.$state == "object" && typeof b.$state.constructor == "function" && !b.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
4259
4260
  state: () => new MyClass()
4260
- Found in store "${b.$id}".`), m && s && n.hydrate && n.hydrate(b.$state, m), l = !0, c = !0, b;
4261
+ Found in store "${b.$id}".`), v && s && n.hydrate && n.hydrate(b.$state, v), l = !0, c = !0, b;
4261
4262
  }
4262
4263
  function Fu(e, t, n) {
4263
4264
  let r, o;
@@ -4285,8 +4286,8 @@ This will fail in production.`);
4285
4286
  const u = pn();
4286
4287
  if (u && u.proxy && // avoid adding stores that are just built for hot module replacement
4287
4288
  !d) {
4288
- const f = u.proxy, v = "_pStores" in f ? f._pStores : f._pStores = {};
4289
- v[r] = c;
4289
+ const f = u.proxy, m = "_pStores" in f ? f._pStores : f._pStores = {};
4290
+ m[r] = c;
4290
4291
  }
4291
4292
  }
4292
4293
  return c;
@@ -4308,57 +4309,57 @@ const Du = Fu("user", {
4308
4309
  toastContent: ""
4309
4310
  }),
4310
4311
  actions: {
4311
- getUser() {
4312
- return window.getUserStatusPromise = new Promise((e, t) => {
4313
- nr().then(({ profile: n, subscription: r, drive: o }) => {
4314
- if (n) {
4315
- let { free_cnt: s, is_subscribed: a, detail: i } = r;
4316
- s || (s = 0), i && i.ends_at && (a = new Date(i.ends_at) > /* @__PURE__ */ new Date());
4317
- const d = { ...n, free_cnt: s, is_subscribed: a, subscribedType: a && i.name || "", detail: i, drive: o };
4318
- this.user = d, window.userStatus = d;
4312
+ getUser(e = !1) {
4313
+ return window.getUserStatusPromise = new Promise((t, n) => {
4314
+ nr(e).then(({ profile: r, subscription: o, drive: s }) => {
4315
+ if (r) {
4316
+ let { free_cnt: a, is_subscribed: i, detail: d } = o;
4317
+ a || (a = 0), d && d.ends_at && (i = new Date(d.ends_at) > /* @__PURE__ */ new Date());
4318
+ const l = { ...r, free_cnt: a, is_subscribed: i, subscribedType: i && d.name || "", detail: d, drive: s };
4319
+ this.user = l, window.userStatus = l;
4319
4320
  }
4320
- e({ profile: n, subscription: r });
4321
- }, (n) => {
4322
- t(n);
4321
+ t({ profile: r, subscription: o });
4322
+ }, (r) => {
4323
+ n(r);
4323
4324
  });
4324
4325
  });
4325
4326
  },
4326
4327
  logout() {
4327
4328
  this.user = null, window.userStatus = null;
4328
4329
  },
4329
- updateUser(e = !1, t) {
4330
- const n = ElLoading.service({
4330
+ updateUser(e = !1, t, n = !1) {
4331
+ const r = ElLoading.service({
4331
4332
  text: "Upgrading....",
4332
4333
  background: "rgba(0, 0, 0, 0.7)"
4333
4334
  });
4334
- let r = 1;
4335
- const o = () => {
4336
- nr().then(({ profile: s, subscription: a, drive: i }) => {
4337
- let { free_cnt: d, is_subscribed: l, detail: c } = a;
4338
- if (d || (d = 0), c && c.ends_at && (l = new Date(c.ends_at) > /* @__PURE__ */ new Date()), l || t == "purchase" && d) {
4339
- const u = { ...s, free_cnt: d, is_subscribed: l, subscribedType: l && c.name || "", detail: c, drive: i };
4340
- if (this.user = u, window.userStatus = u, window.opener) {
4341
- const f = {
4335
+ let o = 1;
4336
+ const s = () => {
4337
+ nr(n).then(({ profile: a, subscription: i, drive: d }) => {
4338
+ let { free_cnt: l, is_subscribed: c, detail: u } = i;
4339
+ if (l || (l = 0), u && u.ends_at && (c = new Date(u.ends_at) > /* @__PURE__ */ new Date()), c || t == "purchase" && l) {
4340
+ const f = { ...a, free_cnt: l, is_subscribed: c, subscribedType: c && u.name || "", detail: u, drive: d };
4341
+ if (this.user = f, window.userStatus = f, window.opener) {
4342
+ const m = {
4342
4343
  type: "subscribed"
4343
4344
  // token: profile.token,
4344
4345
  // expire_at: profile.expire_at
4345
4346
  };
4346
- Jr({ message: f, user: u }, "subscribed:success"), window.opener.postMessage(f, process.env.NODE_ENV == "development" ? "http://localhost:8080" : "*");
4347
+ Jr({ message: m, user: f }, "subscribed:success"), window.opener.postMessage(m, process.env.NODE_ENV == "development" ? "http://localhost:8080" : "*");
4347
4348
  }
4348
- n.close(), this.isShowToast = !0, this.toastContent = t == "purchase" ? "purchased credits" : "upgraded to a member", setTimeout(() => {
4349
+ r.close(), this.isShowToast = !0, this.toastContent = t == "purchase" ? "purchased credits" : "upgraded to a member", setTimeout(() => {
4349
4350
  this.isShowToast = !1;
4350
- const f = Kr();
4351
- (window.opener && !e || f.product && f.product == "image_translator" || f.close) && window.close();
4351
+ const m = Kr();
4352
+ (window.opener && !e || m.product && m.product == "image_translator" || m.close) && window.close();
4352
4353
  }, 3e3);
4353
4354
  } else
4354
- r > 20 ? n.close() : setTimeout(() => {
4355
- r++, o();
4355
+ o > 20 ? r.close() : setTimeout(() => {
4356
+ o++, s();
4356
4357
  }, 2e3);
4357
- }, (s) => {
4358
- n.close();
4358
+ }, (a) => {
4359
+ r.close();
4359
4360
  });
4360
4361
  };
4361
- o();
4362
+ s();
4362
4363
  },
4363
4364
  showLogin(e) {
4364
4365
  this.isShowLogin = e;
@@ -4683,6 +4684,10 @@ const Ne = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
4683
4684
  className: {
4684
4685
  type: String,
4685
4686
  default: "max-w-7xl"
4687
+ },
4688
+ driveQuery: {
4689
+ type: Boolean,
4690
+ default: !1
4686
4691
  }
4687
4692
  },
4688
4693
  emits: ["loginSuccess", "initUserCallback"],
@@ -4710,7 +4715,7 @@ const Ne = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
4710
4715
  n.userStore.showLogin(!0);
4711
4716
  }, f = T(!1);
4712
4717
  K(() => {
4713
- n.userStore.getUser().then(
4718
+ n.userStore.getUser(n.driveQuery).then(
4714
4719
  ({ profile: A }) => {
4715
4720
  t("initUserCallback", A), console.log("login", A), !A && n.from != "login" && !n.isShenHe && N();
4716
4721
  },
@@ -4718,20 +4723,20 @@ const Ne = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
4718
4723
  }
4719
4724
  );
4720
4725
  });
4721
- async function v() {
4722
- m();
4726
+ async function m() {
4727
+ v();
4723
4728
  const A = We.service({
4724
4729
  text: "logining...",
4725
4730
  background: "rgba(0, 0, 0, 0.7)"
4726
4731
  });
4727
4732
  try {
4728
- await n.userStore.getUser(), t("loginSuccess");
4733
+ await n.userStore.getUser(n.driveQuery), t("loginSuccess");
4729
4734
  } catch {
4730
4735
  } finally {
4731
4736
  A.close();
4732
4737
  }
4733
4738
  }
4734
- function m() {
4739
+ function v() {
4735
4740
  n.userStore.showLogin(!1);
4736
4741
  }
4737
4742
  function p() {
@@ -4752,7 +4757,7 @@ const Ne = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
4752
4757
  function C(A) {
4753
4758
  !A || !A.credential || Yr(A.credential).then(
4754
4759
  (E) => {
4755
- console.log("fetch_success", E), n.userStore ? n.userStore.getUser() : location.href = location.pathname;
4760
+ console.log("fetch_success", E), n.userStore ? n.userStore.getUser(n.driveQuery) : location.href = location.pathname;
4756
4761
  },
4757
4762
  (E) => {
4758
4763
  console.log("fetch_fail", E);
@@ -5017,8 +5022,8 @@ const Ne = (e) => (nt("data-v-c970699f"), e = e(), rt(), e), cc = {
5017
5022
  B(" 引入登录 "),
5018
5023
  e.userStore.isShowLogin ? (k(), Be(Nu, {
5019
5024
  key: 0,
5020
- onSuccess: v,
5021
- onClose: m
5025
+ onSuccess: m,
5026
+ onClose: v
5022
5027
  })) : B("v-if", !0),
5023
5028
  e.userStore.isShowToast ? (k(), Be(lc, {
5024
5029
  key: 1,