@delta-comic/model 2.2.0 → 3.0.0-next.4

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/index.js DELETED
@@ -1,640 +0,0 @@
1
- import { shallowReactive as e } from "vue";
2
- import { useGlobalVar as t } from "@delta-comic/utils";
3
- //#region \0rolldown/runtime.js
4
- var n = Object.create, r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.getPrototypeOf, s = Object.prototype.hasOwnProperty, c = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), l = (e, t) => {
5
- let n = {};
6
- for (var i in e) r(n, i, {
7
- get: e[i],
8
- enumerable: !0
9
- });
10
- return t || r(n, Symbol.toStringTag, { value: "Module" }), n;
11
- }, u = (e, t, n, o) => {
12
- if (t && typeof t == "object" || typeof t == "function") for (var c = a(t), l = 0, u = c.length, d; l < u; l++) d = c[l], !s.call(e, d) && d !== n && r(e, d, {
13
- get: ((e) => t[e]).bind(null, d),
14
- enumerable: !(o = i(t, d)) || o.enumerable
15
- });
16
- return e;
17
- }, d = (e, t, i) => (i = e == null ? {} : n(o(e)), u(t || !e || !e.__esModule ? r(i, "default", {
18
- value: e,
19
- enumerable: !0
20
- }) : i, e));
21
- //#endregion
22
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
23
- function f(e) {
24
- return ArrayBuffer.isView(e) && !(e instanceof DataView);
25
- }
26
- //#endregion
27
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
28
- function p(e) {
29
- return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
30
- }
31
- //#endregion
32
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isLength.mjs
33
- function m(e) {
34
- return Number.isSafeInteger(e) && e >= 0;
35
- }
36
- //#endregion
37
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isString.mjs
38
- function h(e) {
39
- return typeof e == "string";
40
- }
41
- //#endregion
42
- //#region lib/struct/store.ts
43
- var g = class {
44
- toJSON(e) {
45
- return h(e) ? this.parse(e) : e;
46
- }
47
- parse(e) {
48
- let t = e.split(this.separator);
49
- return [t[0], t.slice(1).join(this.separator)];
50
- }
51
- toString(e) {
52
- return h(e) ? e : this.stringify(e);
53
- }
54
- stringify(e) {
55
- return e.join(this.separator);
56
- }
57
- constructor(e = ":") {
58
- this.separator = e;
59
- }
60
- }, _ = class {
61
- getOrInsert(e, t) {
62
- let n = this.key.toString(e);
63
- return this.store.has(n) ? this.store.get(n) : (this.store.set(n, t), t);
64
- }
65
- getOrInsertComputed(e, t) {
66
- let n = this.key.toString(e);
67
- if (this.store.has(n)) return this.store.get(n);
68
- let r = t(n);
69
- return this.store.set(n, r), r;
70
- }
71
- static createReactive(t = ":") {
72
- return e(new this(t));
73
- }
74
- constructor(e = ":") {
75
- this.key = new g(e);
76
- }
77
- key;
78
- store = e(/* @__PURE__ */ new Map());
79
- get size() {
80
- return this.store.size;
81
- }
82
- [Symbol.toStringTag] = "SourcedKeyMap";
83
- clear() {
84
- this.store.clear();
85
- }
86
- delete(e) {
87
- return this.store.delete(this.key.toString(e));
88
- }
89
- forEach(e, t) {
90
- this.store.forEach((n, r) => {
91
- e.call(t, n, r, this);
92
- });
93
- }
94
- get(e) {
95
- return this.store.get(this.key.toString(e));
96
- }
97
- has(e) {
98
- return this.store.has(this.key.toString(e));
99
- }
100
- set(e, t) {
101
- return this.store.set(this.key.toString(e), t), this;
102
- }
103
- entries() {
104
- return this.store.entries();
105
- }
106
- keys() {
107
- return this.store.keys();
108
- }
109
- values() {
110
- return this.store.values();
111
- }
112
- [Symbol.iterator]() {
113
- return this.entries();
114
- }
115
- }, v = class e {
116
- toJSON() {
117
- return JSON.parse(JSON.stringify(this.$$raw));
118
- }
119
- constructor(e) {
120
- this.$$raw = e;
121
- }
122
- static toRaw(t) {
123
- return t instanceof e ? t.toJSON() : t;
124
- }
125
- }, y = class {
126
- constructor(e, t) {
127
- this.query = e, this.initPage = t;
128
- }
129
- }, b = /* @__PURE__ */ c(((e, t) => {
130
- (function(n, r) {
131
- typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
132
- })(e, (function() {
133
- var e = 1e3, t = 6e4, n = 36e5, r = "millisecond", i = "second", a = "minute", o = "hour", s = "day", c = "week", l = "month", u = "quarter", d = "year", f = "date", p = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = {
134
- name: "en",
135
- weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
136
- months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
137
- ordinal: function(e) {
138
- var t = [
139
- "th",
140
- "st",
141
- "nd",
142
- "rd"
143
- ], n = e % 100;
144
- return "[" + e + (t[(n - 20) % 10] || t[n] || t[0]) + "]";
145
- }
146
- }, _ = function(e, t, n) {
147
- var r = String(e);
148
- return !r || r.length >= t ? e : "" + Array(t + 1 - r.length).join(n) + e;
149
- }, v = {
150
- s: _,
151
- z: function(e) {
152
- var t = -e.utcOffset(), n = Math.abs(t), r = Math.floor(n / 60), i = n % 60;
153
- return (t <= 0 ? "+" : "-") + _(r, 2, "0") + ":" + _(i, 2, "0");
154
- },
155
- m: function e(t, n) {
156
- if (t.date() < n.date()) return -e(n, t);
157
- var r = 12 * (n.year() - t.year()) + (n.month() - t.month()), i = t.clone().add(r, l), a = n - i < 0, o = t.clone().add(r + (a ? -1 : 1), l);
158
- return +(-(r + (n - i) / (a ? i - o : o - i)) || 0);
159
- },
160
- a: function(e) {
161
- return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
162
- },
163
- p: function(e) {
164
- return {
165
- M: l,
166
- y: d,
167
- w: c,
168
- d: s,
169
- D: f,
170
- h: o,
171
- m: a,
172
- s: i,
173
- ms: r,
174
- Q: u
175
- }[e] || String(e || "").toLowerCase().replace(/s$/, "");
176
- },
177
- u: function(e) {
178
- return e === void 0;
179
- }
180
- }, y = "en", b = {};
181
- b[y] = g;
182
- var x = "$isDayjsObject", S = function(e) {
183
- return e instanceof E || !(!e || !e[x]);
184
- }, C = function e(t, n, r) {
185
- var i;
186
- if (!t) return y;
187
- if (typeof t == "string") {
188
- var a = t.toLowerCase();
189
- b[a] && (i = a), n && (b[a] = n, i = a);
190
- var o = t.split("-");
191
- if (!i && o.length > 1) return e(o[0]);
192
- } else {
193
- var s = t.name;
194
- b[s] = t, i = s;
195
- }
196
- return !r && i && (y = i), i || !r && y;
197
- }, w = function(e, t) {
198
- if (S(e)) return e.clone();
199
- var n = typeof t == "object" ? t : {};
200
- return n.date = e, n.args = arguments, new E(n);
201
- }, T = v;
202
- T.l = C, T.i = S, T.w = function(e, t) {
203
- return w(e, {
204
- locale: t.$L,
205
- utc: t.$u,
206
- x: t.$x,
207
- $offset: t.$offset
208
- });
209
- };
210
- var E = function() {
211
- function g(e) {
212
- this.$L = C(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[x] = !0;
213
- }
214
- var _ = g.prototype;
215
- return _.parse = function(e) {
216
- this.$d = function(e) {
217
- var t = e.date, n = e.utc;
218
- if (t === null) return /* @__PURE__ */ new Date(NaN);
219
- if (T.u(t)) return /* @__PURE__ */ new Date();
220
- if (t instanceof Date) return new Date(t);
221
- if (typeof t == "string" && !/Z$/i.test(t)) {
222
- var r = t.match(m);
223
- if (r) {
224
- var i = r[2] - 1 || 0, a = (r[7] || "0").substring(0, 3);
225
- return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a);
226
- }
227
- }
228
- return new Date(t);
229
- }(e), this.init();
230
- }, _.init = function() {
231
- var e = this.$d;
232
- this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
233
- }, _.$utils = function() {
234
- return T;
235
- }, _.isValid = function() {
236
- return this.$d.toString() !== p;
237
- }, _.isSame = function(e, t) {
238
- var n = w(e);
239
- return this.startOf(t) <= n && n <= this.endOf(t);
240
- }, _.isAfter = function(e, t) {
241
- return w(e) < this.startOf(t);
242
- }, _.isBefore = function(e, t) {
243
- return this.endOf(t) < w(e);
244
- }, _.$g = function(e, t, n) {
245
- return T.u(e) ? this[t] : this.set(n, e);
246
- }, _.unix = function() {
247
- return Math.floor(this.valueOf() / 1e3);
248
- }, _.valueOf = function() {
249
- return this.$d.getTime();
250
- }, _.startOf = function(e, t) {
251
- var n = this, r = !!T.u(t) || t, u = T.p(e), p = function(e, t) {
252
- var i = T.w(n.$u ? Date.UTC(n.$y, t, e) : new Date(n.$y, t, e), n);
253
- return r ? i : i.endOf(s);
254
- }, m = function(e, t) {
255
- return T.w(n.toDate()[e].apply(n.toDate("s"), (r ? [
256
- 0,
257
- 0,
258
- 0,
259
- 0
260
- ] : [
261
- 23,
262
- 59,
263
- 59,
264
- 999
265
- ]).slice(t)), n);
266
- }, h = this.$W, g = this.$M, _ = this.$D, v = "set" + (this.$u ? "UTC" : "");
267
- switch (u) {
268
- case d: return r ? p(1, 0) : p(31, 11);
269
- case l: return r ? p(1, g) : p(0, g + 1);
270
- case c:
271
- var y = this.$locale().weekStart || 0, b = (h < y ? h + 7 : h) - y;
272
- return p(r ? _ - b : _ + (6 - b), g);
273
- case s:
274
- case f: return m(v + "Hours", 0);
275
- case o: return m(v + "Minutes", 1);
276
- case a: return m(v + "Seconds", 2);
277
- case i: return m(v + "Milliseconds", 3);
278
- default: return this.clone();
279
- }
280
- }, _.endOf = function(e) {
281
- return this.startOf(e, !1);
282
- }, _.$set = function(e, t) {
283
- var n, c = T.p(e), u = "set" + (this.$u ? "UTC" : ""), p = (n = {}, n[s] = u + "Date", n[f] = u + "Date", n[l] = u + "Month", n[d] = u + "FullYear", n[o] = u + "Hours", n[a] = u + "Minutes", n[i] = u + "Seconds", n[r] = u + "Milliseconds", n)[c], m = c === s ? this.$D + (t - this.$W) : t;
284
- if (c === l || c === d) {
285
- var h = this.clone().set(f, 1);
286
- h.$d[p](m), h.init(), this.$d = h.set(f, Math.min(this.$D, h.daysInMonth())).$d;
287
- } else p && this.$d[p](m);
288
- return this.init(), this;
289
- }, _.set = function(e, t) {
290
- return this.clone().$set(e, t);
291
- }, _.get = function(e) {
292
- return this[T.p(e)]();
293
- }, _.add = function(r, u) {
294
- var f, p = this;
295
- r = Number(r);
296
- var m = T.p(u), h = function(e) {
297
- var t = w(p);
298
- return T.w(t.date(t.date() + Math.round(e * r)), p);
299
- };
300
- if (m === l) return this.set(l, this.$M + r);
301
- if (m === d) return this.set(d, this.$y + r);
302
- if (m === s) return h(1);
303
- if (m === c) return h(7);
304
- var g = (f = {}, f[a] = t, f[o] = n, f[i] = e, f)[m] || 1, _ = this.$d.getTime() + r * g;
305
- return T.w(_, this);
306
- }, _.subtract = function(e, t) {
307
- return this.add(-1 * e, t);
308
- }, _.format = function(e) {
309
- var t = this, n = this.$locale();
310
- if (!this.isValid()) return n.invalidDate || p;
311
- var r = e || "YYYY-MM-DDTHH:mm:ssZ", i = T.z(this), a = this.$H, o = this.$m, s = this.$M, c = n.weekdays, l = n.months, u = n.meridiem, d = function(e, n, i, a) {
312
- return e && (e[n] || e(t, r)) || i[n].slice(0, a);
313
- }, f = function(e) {
314
- return T.s(a % 12 || 12, e, "0");
315
- }, m = u || function(e, t, n) {
316
- var r = e < 12 ? "AM" : "PM";
317
- return n ? r.toLowerCase() : r;
318
- };
319
- return r.replace(h, (function(e, r) {
320
- return r || function(e) {
321
- switch (e) {
322
- case "YY": return String(t.$y).slice(-2);
323
- case "YYYY": return T.s(t.$y, 4, "0");
324
- case "M": return s + 1;
325
- case "MM": return T.s(s + 1, 2, "0");
326
- case "MMM": return d(n.monthsShort, s, l, 3);
327
- case "MMMM": return d(l, s);
328
- case "D": return t.$D;
329
- case "DD": return T.s(t.$D, 2, "0");
330
- case "d": return String(t.$W);
331
- case "dd": return d(n.weekdaysMin, t.$W, c, 2);
332
- case "ddd": return d(n.weekdaysShort, t.$W, c, 3);
333
- case "dddd": return c[t.$W];
334
- case "H": return String(a);
335
- case "HH": return T.s(a, 2, "0");
336
- case "h": return f(1);
337
- case "hh": return f(2);
338
- case "a": return m(a, o, !0);
339
- case "A": return m(a, o, !1);
340
- case "m": return String(o);
341
- case "mm": return T.s(o, 2, "0");
342
- case "s": return String(t.$s);
343
- case "ss": return T.s(t.$s, 2, "0");
344
- case "SSS": return T.s(t.$ms, 3, "0");
345
- case "Z": return i;
346
- }
347
- return null;
348
- }(e) || i.replace(":", "");
349
- }));
350
- }, _.utcOffset = function() {
351
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
352
- }, _.diff = function(r, f, p) {
353
- var m, h = this, g = T.p(f), _ = w(r), v = (_.utcOffset() - this.utcOffset()) * t, y = this - _, b = function() {
354
- return T.m(h, _);
355
- };
356
- switch (g) {
357
- case d:
358
- m = b() / 12;
359
- break;
360
- case l:
361
- m = b();
362
- break;
363
- case u:
364
- m = b() / 3;
365
- break;
366
- case c:
367
- m = (y - v) / 6048e5;
368
- break;
369
- case s:
370
- m = (y - v) / 864e5;
371
- break;
372
- case o:
373
- m = y / n;
374
- break;
375
- case a:
376
- m = y / t;
377
- break;
378
- case i:
379
- m = y / e;
380
- break;
381
- default: m = y;
382
- }
383
- return p ? m : T.a(m);
384
- }, _.daysInMonth = function() {
385
- return this.endOf(l).$D;
386
- }, _.$locale = function() {
387
- return b[this.$L];
388
- }, _.locale = function(e, t) {
389
- if (!e) return this.$L;
390
- var n = this.clone(), r = C(e, t, !0);
391
- return r && (n.$L = r), n;
392
- }, _.clone = function() {
393
- return T.w(this.$d, this);
394
- }, _.toDate = function() {
395
- return new Date(this.valueOf());
396
- }, _.toJSON = function() {
397
- return this.isValid() ? this.toISOString() : null;
398
- }, _.toISOString = function() {
399
- return this.$d.toISOString();
400
- }, _.toString = function() {
401
- return this.$d.toUTCString();
402
- }, g;
403
- }(), D = E.prototype;
404
- return w.prototype = D, [
405
- ["$ms", r],
406
- ["$s", i],
407
- ["$m", a],
408
- ["$H", o],
409
- ["$W", s],
410
- ["$M", l],
411
- ["$y", d],
412
- ["$D", f]
413
- ].forEach((function(e) {
414
- D[e[1]] = function(t) {
415
- return this.$g(t, e[0], e[1]);
416
- };
417
- })), w.extend = function(e, t) {
418
- return e.$i ||= (e(t, E, w), !0), w;
419
- }, w.locale = C, w.isDayjs = S, w.unix = function(e) {
420
- return w(1e3 * e);
421
- }, w.en = b[y], w.Ls = b, w.p = {}, w;
422
- }));
423
- })), x = /* @__PURE__ */ l({ Comment: () => C }), S = /* @__PURE__ */ d(b(), 1), C = class extends v {
424
- static commentRow = _.createReactive();
425
- constructor(e) {
426
- super(e), this.content = e.content, this.time = e.time, this.id = e.id, this.childrenCount = e.childrenCount, this.likeCount = e.likeCount, this.isLiked = e.isLiked, this.reported = e.reported, this.$$plugin = e.$$plugin, this.$$meta = e.$$meta, this.isTop = e.isTop;
427
- }
428
- content;
429
- time;
430
- get $time() {
431
- return (0, S.default)(this.time);
432
- }
433
- id;
434
- childrenCount;
435
- likeCount;
436
- isTop;
437
- isLiked;
438
- reported;
439
- $$plugin;
440
- $$meta;
441
- }, w = /* @__PURE__ */ l({ Ep: () => T }), T = class extends v {
442
- name;
443
- id;
444
- $$plugin;
445
- $$meta;
446
- constructor(e) {
447
- super(e), this.name = e.name, this.id = e.id, this.$$plugin = e.$$plugin, this.$$meta = e.$$meta;
448
- }
449
- };
450
- //#endregion
451
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
452
- function E(e) {
453
- return e != null && typeof e != "function" && m(e.length);
454
- }
455
- //#endregion
456
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
457
- function D(e) {
458
- return typeof e == "object" && !!e && p(e) === "[object Arguments]";
459
- }
460
- //#endregion
461
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isString.mjs
462
- function O(e) {
463
- return typeof e == "string" || e instanceof String;
464
- }
465
- //#endregion
466
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs
467
- function k(e) {
468
- let t = e?.constructor;
469
- return e === (typeof t == "function" ? t.prototype : Object.prototype);
470
- }
471
- //#endregion
472
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
473
- function A(e) {
474
- return f(e);
475
- }
476
- //#endregion
477
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs
478
- function j(e) {
479
- if (e == null) return !0;
480
- if (E(e)) return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !A(e) && !D(e) ? !1 : e.length === 0;
481
- if (typeof e == "object") {
482
- if (e instanceof Map || e instanceof Set) return e.size === 0;
483
- let t = Object.keys(e);
484
- return k(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
485
- }
486
- return !0;
487
- }
488
- //#endregion
489
- //#region lib/model/resource.ts
490
- var M = /* @__PURE__ */ l({ Resource: () => N }), N = class n extends v {
491
- static processInstances = t(_.createReactive(), "uni/resource/processInstances");
492
- static fork = t(_.createReactive(), "uni/resource/fork");
493
- static precedenceFork = t(_.createReactive(), "uni/resource/precedenceFork");
494
- static is(e) {
495
- return e instanceof this;
496
- }
497
- static create(e) {
498
- return new this(e);
499
- }
500
- constructor(e) {
501
- super(e), this.$$plugin = e.$$plugin, this.$$meta = e.$$meta, this.pathname = e.pathname, this.type = e.type, this.processSteps = (e.processSteps ?? []).map((e) => O(e) ? {
502
- referenceName: e,
503
- ignoreExit: !1
504
- } : e);
505
- }
506
- type;
507
- pathname;
508
- processSteps;
509
- $$meta;
510
- $$plugin;
511
- async getUrl() {
512
- let e = this.pathname;
513
- for (let t of this.processSteps) {
514
- let r = n.processInstances.get([this.$$plugin, t.referenceName]);
515
- if (!r) {
516
- console.warn(`[Resource.getUrl] process not found, fullname: [${this.$$plugin}, ${t.referenceName}]`);
517
- continue;
518
- }
519
- let i = await r(e, this);
520
- if (e = i[0], !(t.ignoreExit || !i[1])) break;
521
- }
522
- return URL.canParse(e) ? e : `${this.getThisFork()}/${e}`;
523
- }
524
- omittedForks = e(/* @__PURE__ */ new Set());
525
- getThisFork() {
526
- let e = new Set(n.fork.get([this.$$plugin, this.type])?.urls ?? []), t;
527
- if (t = j(this.omittedForks) ? n.precedenceFork.get([this.$$plugin, this.type]) : Array.from(e.difference(this.omittedForks).values())[0], !t) throw Error(`[Resource.getThisFork] fork not found, type: [${this.$$plugin}, ${this.type}]`);
528
- return t;
529
- }
530
- localChangeFork() {
531
- let e = new Set(n.fork.get([this.$$plugin, this.type])?.urls ?? []);
532
- this.omittedForks.add(this.getThisFork());
533
- let t = j(e.difference(this.omittedForks));
534
- return t && this.omittedForks.clear(), t;
535
- }
536
- }, P = /* @__PURE__ */ l({ Image: () => F }), F = class extends N {
537
- static is(e) {
538
- return e instanceof this;
539
- }
540
- static create(e, t) {
541
- return new this(e, t);
542
- }
543
- constructor(e, t) {
544
- "forkNamespace" in e ? super({
545
- $$plugin: e.$$plugin,
546
- $$meta: {
547
- ...e.$$meta,
548
- aspect: t
549
- },
550
- pathname: e.path,
551
- type: e.forkNamespace,
552
- processSteps: e.processSteps
553
- }) : super(e);
554
- }
555
- get aspect() {
556
- return this.$$meta.aspect;
557
- }
558
- set aspect(e) {
559
- e && (this.$$meta ??= {}, this.$$meta.aspect ??= {}, this.$$meta.aspect.width = e.width, this.$$meta.aspect.height = e.height);
560
- }
561
- }, I = /* @__PURE__ */ l({ Item: () => L }), L = class extends v {
562
- static itemTranslator = _.createReactive();
563
- static create(e) {
564
- let t = this.itemTranslator.get(e.contentType);
565
- if (!t) throw Error(`can not found itemTranslator contentType:"${z.contentPages.key.toString(e.contentType)}"`);
566
- return t(e);
567
- }
568
- static authorIcon = _.createReactive();
569
- static itemCards = t(_.createReactive(), "uni/item/itemCards");
570
- static is(e) {
571
- return e instanceof this;
572
- }
573
- cover;
574
- get $cover() {
575
- return F.create(this.cover);
576
- }
577
- title;
578
- id;
579
- categories;
580
- author;
581
- viewNumber;
582
- likeNumber;
583
- commentNumber;
584
- isLiked;
585
- description;
586
- updateTime;
587
- get $updateTime() {
588
- return (0, S.default)(this.updateTime);
589
- }
590
- contentType;
591
- length;
592
- epLength;
593
- $$plugin;
594
- $$meta;
595
- thisEp;
596
- customIsSafe;
597
- get $thisEp() {
598
- return new T(this.thisEp);
599
- }
600
- constructor(e) {
601
- super(e), this.$$plugin = e.$$plugin, this.$$meta = e.$$meta, this.thisEp = e.thisEp, this.updateTime = e.updateTime, this.cover = e.cover, this.title = e.title, this.id = e.id, this.categories = e.categories, this.author = e.author, this.viewNumber = e.viewNumber, this.likeNumber = e.likeNumber, this.commentNumber = e.commentNumber, this.isLiked = e.isLiked, this.customIsAI = e.customIsAI, this.contentType = z.contentPages.key.toJSON(e.contentType), this.length = e.length, this.epLength = e.epLength, this.description = e.description, this.commentSendable = e.commentSendable, this.customIsSafe = e.customIsSafe;
602
- }
603
- commentSendable;
604
- customIsAI;
605
- get $isAi() {
606
- let e = (e) => /(^|[\((\[\s【])ai[】\))\]\s]?/gi.test(e);
607
- return this.customIsAI || e(this.title) || this.author.some((t) => e(`${t.label}\u1145${t.description}`));
608
- }
609
- }, R = /* @__PURE__ */ l({ ContentPage: () => z }), z = class {
610
- static layouts = t(_.createReactive(), "uni/contentPage/layouts");
611
- static contentPages = t(_.createReactive(), "uni/contentPage/contentPages");
612
- constructor(e, t, n) {
613
- this.preload = e, this.id = t, this.ep = n;
614
- }
615
- }, B = /* @__PURE__ */ l({ Downloader: () => V }), V = class {}, H = /* @__PURE__ */ l({ User: () => U }), U = class {
616
- static userBase = e(/* @__PURE__ */ new Map());
617
- static userEditorBase = e(/* @__PURE__ */ new Map());
618
- static userCards = e(/* @__PURE__ */ new Map());
619
- constructor(e) {
620
- e.avatar && (this.avatar = F.create(e.avatar)), this.name = e.name, this.id = e.id, this.$$plugin = e.$$plugin, this.$$meta = e.$$meta;
621
- }
622
- avatar;
623
- name;
624
- id;
625
- $$plugin;
626
- $$meta;
627
- }, W = /* @__PURE__ */ l({
628
- comment: () => x,
629
- content: () => R,
630
- download: () => B,
631
- ep: () => w,
632
- image: () => P,
633
- item: () => I,
634
- resource: () => M,
635
- user: () => H
636
- });
637
- //#endregion
638
- export { _ as SourcedKeyMap, g as SourcedValue, y as StreamQuery, v as Struct, W as uni };
639
-
640
- //# sourceMappingURL=index.js.map