PageSourceSearch

https://asketch.ai/_nuxt/rm-y-VpX.js

js asketch.ai collected 2026-10-05 11:52:05 UTC 15,593 bytes, 434 lines download raw bytes

1import { b as W, fn as X, eY as Z, cg as ee, cY as u, dD as te, eO as ae, dn as $, cR as z, cS as oe, m as x, cq as p, fm as w, hu as E, __tla as __tla_0 } from "./D9BjAukf.js";
2import { i as T, __tla as __tla_1 } from "./CevamKTt.js";
3import { V as ne, __tla as __tla_2 } from "./DeRgj6Pb.js";
4let Ce;
5let __tla = Promise.all([
6  (() => {
7    try {
8      return __tla_0;
9    } catch {
10    }
11  })(),
12  (() => {
13    try {
14      return __tla_1;
15    } catch {
16    }
17  })(),
18  (() => {
19    try {
20      return __tla_2;
21    } catch {
22    }
23  })()
24]).then(async () => {
25  let se, le, re, be, l, r, i, o, d, v, O, he, L, R, ie, ce, me, g, de, ue, pe, ye, fe, N;
26  ({ unref: se } = await T("vue"));
27  ({ withAsyncContext: le, defineComponent: re } = await T("vue"));
28  ({ resolveComponent: be, createVNode: l, createTextVNode: r, createElementVNode: i, withCtx: o, unref: d, openBlock: v, createBlock: O, createCommentVNode: he, isRef: L, toDisplayString: R, renderList: ie, Fragment: ce, createElementBlock: me } = await T("vue"));
29  ({ ref: g } = await T("vue"));
30  de = {
31    class: "text-base flex items-center"
32  };
33  ue = {
34    class: "flex gap-2 my-2"
35  };
36  pe = {
37    class: "flex items-center"
38  };
39  ye = {
40    class: "flex items-center"
41  };
42  fe = {
43    class: "flex gap-2"
44  };
45  N = "\u662F\u5426\u9700\u8981\u7ACB\u5373\u91CD\u542F?\u4E0D\u6D89\u53CA\u5B8C\u5168\u7684\u6570\u636E\u8FC1\u79FB\uFF0C\u4EC5\u5728\u5F53\u524D\u7248\u672C\u4E14\u65F6\u95F4\u8DE8\u5EA6\u4E0D\u8D85\u8FC77\u5929\uFF0C\u4E14\u6CA1\u6709\u91CD\u5927\u7684\u914D\u7F6E\u53D8\u66F4\uFF0C\u4E00\u822C\u4E0D\u9700\u8981\u91CD\u542F\u3002";
46  Ce = re({
47    __name: "backup-restore",
48    async setup(ge) {
49      let b, B;
50      const j = (t) => x("/system/backup", {
51        method: "POST",
52        body: t
53      }), A = (t) => x(`/system/restore/${t}`, {
54        method: "POST"
55      }), M = (t) => x(`/system/backup/${t}`, {
56        method: "DELETE"
57      }), I = () => x("/app/restart"), G = () => W("/system/backup/record", {
58        method: "GET"
59      }), { data: V, refresh: U } = ([b, B] = le(() => G()), b = await b, B(), b), h = g("\u624B\u52A8\u5907\u4EFD"), C = g(false), k = g(false), Y = async () => {
60        C.value = true, j({
61          summary: h.value
62        }).then(() => {
63          p({
64            type: "success",
65            message: "\u5907\u4EFD\u6210\u529F"
66          }), U();
67        }).catch((t) => {
68          p({
69            type: "error",
70            message: t.message
71          }), C.value = false;
72        }).finally(() => {
73          C.value = false, k.value = false;
74        });
75      }, D = async (t, e) => {
76        w({
77          title: `\u786E\u8BA4\u8FD8\u539F\u5230${$(t.createdAt)}\u6761\u5907\u4EFD\u8BB0\u5F55\uFF1F\u8FD8\u539F\u5907\u4EFD\u5C06\u4E22\u5931\u5907\u4EFD\u65F6\u95F4\u70B9\u4EE5\u540E\u7684\u6240\u6709\u66F4\u6539\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002
78 \u8FD8\u539F\u5230\u65E9\u671F\u7248\u672C\u65F6\uFF0C\u4F1A\u4E22\u5931\u8FD1\u671F\u7684\u5907\u4EFD\u8BB0\u5F55\uFF0C\u5EFA\u8BAE\u5148\u4FDD\u7559\u8FD1\u671F\u7684\u5907\u4EFD\u8BB0\u5F55\u5230\u672C\u5730\uFF0C\u4FBF\u4E8E\u518D\u6B21\u8FD8\u539F\u56DE\u6765\uFF01`,
79          cancelText: "\u53D6\u6D88",
80          onOk: () => {
81            e !== void 0 ? F.value = true : t.loading = true, A(t._id).then((s) => {
82              U(), w({
83                title: `${s.message || "\u8FD8\u539F\u6210\u529F\uFF0C"}${N}`,
84                okText: "\u7A0D\u540E\u624B\u52A8\u91CD\u542F",
85                cancelText: "\u7ACB\u5373\u91CD\u542F",
86                onOk: () => {
87                },
88                onCancel: () => {
89                  P();
90                }
91              });
92            }).catch((s) => {
93              p({
94                type: "error",
95                message: s.message
96              });
97            }).finally(() => {
98              F.value = false, t.loading = false;
99            });
100          }
101        });
102      }, q = async (t) => {
103        w({
104          title: "\u5220\u9664\u8BB0\u5F55\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u5220\u9664\u5417\uFF1F",
105          cancelText: "\u53D6\u6D88",
106          onOk: () => {
107            M(t._id).then(() => {
108              p({
109                type: "success",
110                message: "\u5220\u9664\u6210\u529F"
111              }), U();
112            });
113          }
114        });
115      }, H = async (t) => {
116        if (t.remotePath && t.remotePath.length > 0) for (const f of t.remotePath) {
117          const a = document.createElement("a");
118          a.href = f, a.style.display = "none", document.body.appendChild(a), a.click(), document.body.removeChild(a), p({
119            type: "success",
120            message: `\u4ECEOSS\u5907\u4EFD\uFF1A${f}\u4E0B\u8F7D\u6210\u529F`
121          });
122          return;
123        }
124        const e = "/system/backup/download/" + t._id, s = t.localPath, y = s.substring(s.lastIndexOf("/") + 1), n = await E(e);
125        if (n.ok) {
126          const f = await n.arrayBuffer(), a = new Blob([
127            f
128          ]), c = URL.createObjectURL(a), m = document.createElement("a");
129          m.href = c, m.download = y, m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), URL.revokeObjectURL(c), p({
130            type: "success",
131            message: "\u4ECE\u670D\u52A1\u5668\u5907\u4EFD\u4E0B\u8F7D\u6210\u529F"
132          });
133        }
134      }, J = [
135        {
136          title: "\u5E8F\u53F7",
137          key: "_id",
138          width: 40
139        },
140        {
141          title: "\u5907\u6CE8",
142          key: "summary",
143          align: "center"
144        },
145        {
146          title: "\u5907\u4EFD\u65F6\u95F4",
147          key: "createdAt",
148          align: "center"
149        },
150        {
151          title: "\u670D\u52A1\u5668\u5907\u4EFD",
152          key: "localPath",
153          align: "center"
154        },
155        {
156          title: "OSS\u8FDC\u7A0B\u5907\u4EFD",
157          key: "remotePath",
158          align: "center"
159        },
160        {
161          title: "\u64CD\u4F5C",
162          key: "actions",
163          align: "center"
164        }
165      ], _ = g([]), S = g(false), F = g(false), K = async (t) => {
166        S.value = true;
167        const e = t.file.originFileObj;
168        if (!e) return;
169        _.value = _.value.map((n) => n.status !== "done" && n.originFileObj && n.uid === n.uid ? (n.url = URL.createObjectURL(n.originFileObj), n.status = "done", n) : (n.url || n.originFileObj, n));
170        const s = new FormData();
171        s.append("file", e);
172        const y = await E("/system/restoreFromUpload", {
173          method: "POST",
174          body: s
175        }).finally(() => {
176          S.value = false;
177        });
178        if (y.ok) {
179          const n = await y.json();
180          w({
181            title: `${n.message || "\u6062\u590D\u5907\u4EFD\u6210\u529F\uFF0C"}${N}`,
182            okText: "\u7A0D\u540E\u624B\u52A8\u91CD\u542F",
183            cancelText: "\u7ACB\u5373\u91CD\u542F",
184            onOk: () => {
185            },
186            onCancel: () => {
187              P();
188            }
189          });
190        }
191      }, P = async () => {
192        z.confirm({
193          title: "\u786E\u5B9A\u8981\u91CD\u542F\u540E\u7AEF\u670D\u52A1\u5417\uFF1F",
194          content: "\u6B64\u64CD\u4F5C\u5C06\u5173\u95ED\u6240\u6709\u6B63\u5728\u8FD0\u884C\u7684\u670D\u52A1\uFF0C\u5E76\u91CD\u65B0\u542F\u52A8\u540E\u7AEF\u670D\u52A1\uFF0C\u4E00\u822C\u5728\u7CFB\u7EDF\u6062\u590D\u8FD8\u539F\u6216\u8005\u914D\u7F6E\u66F4\u65B0\u7684\u60C5\u51B5\u4E0B\u624D\u9700\u8981\u8FDB\u884C\u8BE5\u9879\u64CD\u4F5C\u3002",
195          okText: "\u91CD\u542F",
196          cancelText: "\u53D6\u6D88",
197          centered: true,
198          onOk: () => {
199            I().then((t) => {
200              p({
201                type: "success",
202                message: t.message || "\u670D\u52A1\u5668\u5DF2\u91CD\u542F\uFF01"
203              });
204            });
205          }
206        });
207      }, Q = (t) => t.substring(t.lastIndexOf("/") + 1);
208      return (t, e) => {
209        const s = ee, y = te, n = oe, f = z;
210        return v(), O(X, {
211          "max-width": "1200"
212        }, {
213          default: o(() => [
214            l(Z, {
215              type: "success",
216              closable: "",
217              density: "compact"
218            }, {
219              prepend: o(() => [
220                ...e[5] || (e[5] = [])
221              ]),
222              title: o(() => [
223                i("p", de, [
224                  l(s, {
225                    name: "material-symbols-light:rotate-auto",
226                    size: "24"
227                  }),
228                  e[6] || (e[6] = r(" \u81EA\u52A8\u5907\u4EFD\u5DF2\u5F00\u542F,\u6BCF\u592902:00\u81EA\u52A8\u521B\u5EFA\u5907\u4EFD,\u5E76\u81EA\u52A8\u5220\u96647\u5929\u524D\u7684\u81EA\u52A8\u5907\u4EFD\u6570\u636E\uFF0C\u624B\u52A8\u521B\u5EFA\u7684\u5907\u4EFD\u4E0D\u4F1A\u88AB\u81EA\u52A8\u5220\u9664 ", -1))
229                ])
230              ]),
231              _: 1
232            }),
233            i("div", ue, [
234              l(u, {
235                size: "small",
236                color: "primary",
237                onClick: e[0] || (e[0] = (a) => k.value = true)
238              }, {
239                default: o(() => [
240                  ...e[7] || (e[7] = [
241                    r(" \u624B\u52A8\u521B\u5EFA\u65B0\u5907\u4EFD ", -1)
242                  ])
243                ]),
244                _: 1
245              }),
246              l(u, {
247                size: "small",
248                color: "primary",
249                variant: "tonal",
250                loading: d(F),
251                onClick: e[1] || (e[1] = (a) => D(d(V)[0], 0))
252              }, {
253                default: o(() => [
254                  ...e[8] || (e[8] = [
255                    r(" \u8FD8\u539F\u6700\u8FD1\u5907\u4EFD ", -1)
256                  ])
257                ]),
258                _: 1
259              }, 8, [
260                "loading"
261              ]),
262              l(y, {
263                "file-list": d(_),
264                "onUpdate:fileList": e[2] || (e[2] = (a) => L(_) ? _.value = a : null),
265                name: "file",
266                accept: ".gz",
267                multiple: false,
268                "max-count": 1,
269                onChange: K
270              }, {
271                default: o(() => [
272                  l(u, {
273                    size: "small",
274                    color: "primary",
275                    variant: "tonal"
276                  }, {
277                    prepend: o(() => [
278                      d(S) ? (v(), O(s, {
279                        key: 0,
280                        name: "line-md:loading-loop"
281                      })) : (v(), O(s, {
282                        key: 1,
283                        name: "material-symbols:upload-rounded"
284                      }))
285                    ]),
286                    default: o(() => [
287                      e[9] || (e[9] = r(" \u4E0A\u4F20\u672C\u5730\u5907\u4EFD\u6587\u4EF6\u8FD8\u539F ", -1))
288                    ]),
289                    _: 1
290                  })
291                ]),
292                _: 1
293              }, 8, [
294                "file-list"
295              ]),
296              l(u, {
297                size: "small",
298                color: "error",
299                variant: "tonal",
300                onClick: P
301              }, {
302                prepend: o(() => [
303                  l(s, {
304                    name: "material-symbols:restart-alt-rounded"
305                  })
306                ]),
307                default: o(() => [
308                  e[10] || (e[10] = r(" \u91CD\u542F ", -1))
309                ]),
310                _: 1
311              })
312            ]),
313            l(ne, {
314              headers: J,
315              items: d(V)
316            }, {
317              "item._id": o(({ item: a, index: c }) => [
318                i("div", null, R(c + 1), 1)
319              ]),
320              "item.createdAt": o(({ item: a }) => [
321                i("div", null, R(("formatDateTime" in t ? t.formatDateTime : se($))(a.createdAt)), 1)
322              ]),
323              "item.localPath": o(({ item: a }) => [
324                i("div", pe, [
325                  l(s, {
326                    name: "material-symbols-light:database"
327                  }),
328                  r(" " + R(Q(a.localPath)), 1)
329                ])
330              ]),
331              "item.remotePath": o(({ item: a }) => [
332                i("div", ye, [
333                  (v(true), me(ce, null, ie(a.remotePath, (c, m) => (v(), O(ae, {
334                    size: "small",
335                    variant: "outlined",
336                    rounded: "sm"
337                  }, {
338                    default: o(() => [
339                      l(s, {
340                        name: "material-symbols-light:cloud"
341                      }),
342                      i("span", null, " \u4E91\u7AEF\u5907\u4EFD" + R(m + 1), 1)
343                    ]),
344                    _: 2
345                  }, 1024))), 256))
346                ])
347              ]),
348              "item.actions": o(({ item: a }) => [
349                i("div", fe, [
350                  l(u, {
351                    size: "small",
352                    color: "primary",
353                    loading: a.loading,
354                    onClick: (c) => D(a)
355                  }, {
356                    default: o(() => [
357                      ...e[11] || (e[11] = [
358                        r(" \u8FD8\u539F ", -1)
359                      ])
360                    ]),
361                    _: 1
362                  }, 8, [
363                    "loading",
364                    "onClick"
365                  ]),
366                  l(u, {
367                    size: "small",
368                    color: "primary",
369                    variant: "tonal",
370                    onClick: (c) => H(a)
371                  }, {
372                    default: o(() => [
373                      ...e[12] || (e[12] = [
374                        r(" \u4FDD\u5B58\u5230\u672C\u5730 ", -1)
375                      ])
376                    ]),
377                    _: 1
378                  }, 8, [
379                    "onClick"
380                  ]),
381                  l(u, {
382                    size: "small",
383                    color: "warning",
384                    variant: "tonal",
385                    onClick: (c) => q(a)
386                  }, {
387                    default: o(() => [
388                      ...e[13] || (e[13] = [
389                        r(" \u5220\u9664 ", -1)
390                      ])
391                    ]),
392                    _: 1
393                  }, 8, [
394                    "onClick"
395                  ])
396                ])
397              ]),
398              _: 1
399            }, 8, [
400              "items"
401            ]),
402            l(f, {
403              open: d(k),
404              "onUpdate:open": e[4] || (e[4] = (a) => L(k) ? k.value = a : null),
405              title: "\u662F\u5426\u4EE5\u5F53\u524D\u72B6\u6001\u521B\u5EFA\u5907\u4EFD\uFF1F",
406              "confirm-loading": d(C),
407              onOk: Y
408            }, {
409              default: o(() => [
410                e[14] || (e[14] = i("div", null, " \u586B\u5199\u5907\u4EFD\u5907\u6CE8\u8BF4\u660E\uFF0C\u4EE5\u4FBF\u533A\u5206\u4E0D\u540C\u5206\u5907\u4EFD\u7248\u672C ", -1)),
411                l(n, {
412                  value: d(h),
413                  "onUpdate:value": e[3] || (e[3] = (a) => L(h) ? h.value = a : null),
414                  placeholder: "\u8BF7\u586B\u5199\u5907\u4EFD\u5907\u6CE8"
415                }, null, 8, [
416                  "value"
417                ])
418              ]),
419              _: 1
420            }, 8, [
421              "open",
422              "confirm-loading"
423            ])
424          ]),
425          _: 1
426        });
427      };
428    }
429  });
430});
431export {
432  __tla,
433  Ce as default
434};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.