@yoyaflow/yoya-ui 0.3.2 → 0.3.3

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/yoya.ssr.js CHANGED
@@ -1,10 +1,164 @@
1
+ //#region src/core/access.js
2
+ var e = null, t = null;
3
+ function n(e) {
4
+ if (!e) return null;
5
+ if (typeof e == "object" && e.code) return {
6
+ code: e.code,
7
+ level: e.level === "write" ? "write" : "read"
8
+ };
9
+ let t = String(e).trim();
10
+ return t ? t.startsWith("w.") ? {
11
+ code: t.slice(2),
12
+ level: "write"
13
+ } : t.startsWith("r.") ? {
14
+ code: t.slice(2),
15
+ level: "read"
16
+ } : {
17
+ code: t,
18
+ level: "write"
19
+ } : null;
20
+ }
21
+ function r(e) {
22
+ let t = n(e);
23
+ return t ? t.code : String(e ?? "");
24
+ }
25
+ function i({ permissions: e = [], roles: t = [], superAdmins: n = ["super_admin"] } = {}) {
26
+ let i = {
27
+ permissions: [...e || []],
28
+ roles: [...t || []],
29
+ superAdmins: [...n || []]
30
+ }, a = new Set(i.permissions), o = /* @__PURE__ */ new Set(), s = () => i.superAdmins.some((e) => i.roles.includes(e));
31
+ function c(e, t) {
32
+ return s() ? !0 : t === "write" ? a.has(`w.${e}`) || a.has(e) : a.has(`r.${e}`) || a.has(`w.${e}`) || a.has(e);
33
+ }
34
+ function l(e, t) {
35
+ return c(r(e), t);
36
+ }
37
+ let u = {
38
+ roles() {
39
+ return i.roles.slice();
40
+ },
41
+ permissions() {
42
+ return i.permissions.slice();
43
+ },
44
+ isSuper: s,
45
+ has(e) {
46
+ let t = r(e);
47
+ return s() || a.has(`r.${t}`) || a.has(`w.${t}`) || a.has(t);
48
+ },
49
+ canRead(e) {
50
+ return l(e, "read");
51
+ },
52
+ canWrite(e) {
53
+ return l(e, "write");
54
+ },
55
+ setPermissions(e) {
56
+ return i.permissions = [...e || []], a.clear(), (e || []).forEach((e) => a.add(e)), o.forEach((e) => e()), u;
57
+ },
58
+ subscribe(e) {
59
+ return o.add(e), () => o.delete(e);
60
+ }
61
+ };
62
+ return u;
63
+ }
64
+ function a(t, n) {
65
+ let r = e;
66
+ e = t || r;
67
+ try {
68
+ return n();
69
+ } finally {
70
+ e = r;
71
+ }
72
+ }
73
+ function o(e) {
74
+ return t = e || null, t;
75
+ }
76
+ function s() {
77
+ return e || t;
78
+ }
79
+ //#endregion
1
80
  //#region src/core/node.js
2
- var e = /* @__PURE__ */ new Set([
81
+ var c = Symbol.for("yoya.devtools.bridge");
82
+ function l() {
83
+ return typeof globalThis > "u" ? null : globalThis[c] || null;
84
+ }
85
+ function u() {
86
+ let e = l();
87
+ return e ? e.enabled() : !1;
88
+ }
89
+ function d(e) {
90
+ let t = l();
91
+ t && t.emit(e);
92
+ }
93
+ function f(e) {
94
+ let t = l();
95
+ t && t.unregister(e);
96
+ }
97
+ function p(e) {
98
+ let t = l();
99
+ t && t.captureScope(e);
100
+ }
101
+ function m(e) {
102
+ let t = l();
103
+ return t ? t.ensureId(e) : void 0;
104
+ }
105
+ function h(e, t, n) {
106
+ let r = l();
107
+ r && r.notify(e, t, n);
108
+ }
109
+ function g(e) {
110
+ let t = l();
111
+ t && t.commit(e);
112
+ }
113
+ var _ = /* @__PURE__ */ new Set([
3
114
  "checked",
4
115
  "disabled",
5
116
  "readonly",
6
117
  "selected"
7
- ]), t = /* @__PURE__ */ new Set([
118
+ ]), v = /* @__PURE__ */ new Set([
119
+ "input",
120
+ "select",
121
+ "textarea",
122
+ "button",
123
+ "fieldset",
124
+ "option",
125
+ "optgroup",
126
+ "keygen"
127
+ ]), y = /* @__PURE__ */ new Set(["input", "textarea"]), b = [];
128
+ function x() {
129
+ return b.length > 0 ? b[b.length - 1] : null;
130
+ }
131
+ function S(e, t) {
132
+ b.push(e);
133
+ try {
134
+ return t();
135
+ } finally {
136
+ b.pop();
137
+ }
138
+ }
139
+ var C = null;
140
+ function w(e, t) {
141
+ let n = C;
142
+ C = e;
143
+ try {
144
+ return t();
145
+ } finally {
146
+ C = n;
147
+ }
148
+ }
149
+ function T(e, t, n, r) {
150
+ if (!C) throw TypeError(`vStateNode binding scope required for function value (${e}${t ? ` "${t}"` : ""})`);
151
+ let i = C;
152
+ i.bindings.push({
153
+ commit: r,
154
+ committed: !1,
155
+ evaluate: () => n(i.getState()),
156
+ key: t,
157
+ kind: e,
158
+ last: void 0
159
+ });
160
+ }
161
+ var E = /* @__PURE__ */ new Set([
8
162
  "area",
9
163
  "base",
10
164
  "br",
@@ -20,23 +174,23 @@ var e = /* @__PURE__ */ new Set([
20
174
  "track",
21
175
  "wbr"
22
176
  ]);
23
- function n(e) {
177
+ function D(e) {
24
178
  return typeof e == "string" ? document.querySelector(e) : e;
25
179
  }
26
- function r(e) {
180
+ function ee(e) {
27
181
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
28
182
  }
29
- function i(t) {
30
- return e.has(t);
183
+ function te(e) {
184
+ return _.has(e);
31
185
  }
32
- function a(e, t, n) {
186
+ function O(e, t, n) {
33
187
  if (n == null || n === !1) {
34
188
  if (e.removeAttribute(t), t in e) try {
35
189
  e[t] = !1;
36
190
  } catch {}
37
191
  return;
38
192
  }
39
- if (n === !0 || i(t)) {
193
+ if (n === !0 || te(t)) {
40
194
  if (e.setAttribute(t, t), t in e) try {
41
195
  e[t] = !0;
42
196
  } catch {}
@@ -46,19 +200,36 @@ function a(e, t, n) {
46
200
  e[t] = n;
47
201
  } catch {}
48
202
  }
49
- function o(e) {
50
- return Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, t]) => `${s(e)}:${r(t)}`).join("; ");
203
+ function ne(e) {
204
+ return Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, t]) => `${re(e)}:${ee(t)}`).join("; ");
51
205
  }
52
- function s(e) {
206
+ function re(e) {
53
207
  return String(e).replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
54
208
  }
55
- var c = class e {
209
+ function ie(e, t) {
210
+ return e === t ? !0 : !e || !t || typeof e != "object" || typeof t != "object" ? !1 : !!e.capture == !!t.capture && !!e.once == !!t.once && !!e.passive == !!t.passive;
211
+ }
212
+ var k = class e {
56
213
  constructor(e = null) {
57
- this._children = [], this._events = /* @__PURE__ */ new Map(), this._cleanup = [], this._states = {}, this._stateTypes = {}, this._stateHandlers = /* @__PURE__ */ new Map(), this._pendingRemovals = /* @__PURE__ */ new Set(), this._childrenDirty = !1, this._deleted = !1, e !== null && this.setup(e);
214
+ this._children = [], this._childKeys = /* @__PURE__ */ new Map(), this._events = /* @__PURE__ */ new Map(), this._domAdapters = /* @__PURE__ */ new Map(), this._cleanup = [], this._states = {}, this._stateTypes = {}, this._stateHandlers = /* @__PURE__ */ new Map(), this._pendingRemovals = /* @__PURE__ */ new Set(), this._childrenDirty = !1, this._deleted = !1, this._access = null, this._accessContext = s(), u() && p(this), e !== null && this.setup(e);
58
215
  }
59
216
  setup(t) {
60
217
  return typeof t == "function" ? t(this) : t instanceof e ? this.child(t) : typeof t == "string" || typeof t == "number" ? this.text(t) : t && typeof t == "object" && this._setupObject(t), this;
61
218
  }
219
+ access(e) {
220
+ let t = n(e);
221
+ return this._access = t ? {
222
+ code: t.code,
223
+ level: "write"
224
+ } : null, this;
225
+ }
226
+ _permissionState() {
227
+ let e = this._access ?? x();
228
+ if (!e) return "active";
229
+ let t = this._accessContext || s();
230
+ return t ? t.canRead(e.code) ? e.level === "write" && !t.canWrite(e.code) ? "readonly" : "active" : "hidden" : "active";
231
+ }
232
+ _applyAccessState(e) {}
62
233
  _setupObject(e) {
63
234
  e.children && this.child(e.children);
64
235
  }
@@ -66,25 +237,79 @@ var c = class e {
66
237
  return [...this._children];
67
238
  }
68
239
  clearChildren() {
69
- return this._children.forEach((e) => {
240
+ let e = this._el && u() && !this._devtoolsRendering ? this._children.map((e) => m(e)) : [];
241
+ return this._dropChildKeys(this._children), this._children.forEach((e) => {
70
242
  this._pendingRemovals.add(e);
71
- }), this._children = [], this._childrenDirty = !0, this;
243
+ }), this._children = [], this._childrenDirty = !0, e.length > 0 && !this._devtoolsRendering && h(this, "child", { removed: e }), this;
244
+ }
245
+ addChild(e, t) {
246
+ let n = String(e);
247
+ if (this._childKeys.has(n)) throw TypeError(`duplicate key "${n}"`);
248
+ let r = ae(t);
249
+ if (this._childKeys.set(n, r), typeof r.attr == "function" && r.attr("data-row-key", n), this._pendingRemovals.delete(r), this._children.push(r), this._childrenDirty = !0, this._el) {
250
+ let e = S(this._access ?? x(), () => r.renderDom());
251
+ e && e.parentNode !== this._el && this._el.appendChild(e), u() && !this._devtoolsRendering && h(this, "child", { added: [m(r)] });
252
+ }
253
+ return this;
254
+ }
255
+ getChild(e) {
256
+ return this._childKeys.get(String(e)) || null;
257
+ }
258
+ removeChild(e) {
259
+ let t = String(e), n = this._childKeys.get(t);
260
+ if (!n) return this;
261
+ this._childKeys.delete(t);
262
+ let r = this._children.indexOf(n);
263
+ r !== -1 && this._children.splice(r, 1), this._childrenDirty = !0;
264
+ let i = this._el && u() && !this._devtoolsRendering ? m(n) : null;
265
+ return n.destroy(), i !== null && h(this, "child", { removed: [i] }), this;
266
+ }
267
+ _dropChildKeys(e) {
268
+ let t = new Set(e);
269
+ this._childKeys.forEach((e, n) => {
270
+ t.has(e) && this._childKeys.delete(n);
271
+ });
72
272
  }
73
273
  child(...e) {
74
274
  return e.flat(Infinity).forEach((e) => {
75
275
  if (e == null) return;
76
- let t = f(e);
276
+ let t = ae(e);
77
277
  this._pendingRemovals.delete(t), this._children.push(t), this._childrenDirty = !0;
78
278
  }), this;
79
279
  }
80
280
  text(e) {
81
- return this.child(new l(e));
281
+ return this.child(new A(e));
82
282
  }
83
283
  on(e, t, n) {
84
- return this._events.has(e) || this._events.set(e, []), this._events.get(e).push({
284
+ if (typeof t != "function") throw TypeError("ViewNode event handler must be a function");
285
+ let r = this._events.get(e);
286
+ return this._events.set(e, {
85
287
  handler: t,
86
288
  options: n
87
- }), this._el && (this._el.addEventListener(e, t, n), this._cleanup.push(() => this._el.removeEventListener(e, t, n))), this;
289
+ }), this._el && this._bindDomAdapter(e, r?.options, n), this;
290
+ }
291
+ off(e) {
292
+ this._events.delete(e);
293
+ let t = this._domAdapters.get(e);
294
+ return t && (t.cleanup(), this._removeCleanup(t.cleanup), this._domAdapters.delete(e)), this;
295
+ }
296
+ _bindDomAdapter(e, t, n) {
297
+ let r = this._domAdapters.get(e);
298
+ if (r) {
299
+ if (ie(t, n)) return;
300
+ r.cleanup(), this._removeCleanup(r.cleanup), this._domAdapters.delete(e);
301
+ }
302
+ let i = (t) => {
303
+ let n = this._events.get(e);
304
+ !n || typeof n.handler != "function" || (n.handler.call(this, t), n.options?.once && this.off(e));
305
+ }, a = () => {
306
+ this._el && this._el.removeEventListener(e, i, n);
307
+ };
308
+ this._el.addEventListener(e, i, n), this._domAdapters.set(e, { cleanup: a }), this._cleanup.push(a);
309
+ }
310
+ _removeCleanup(e) {
311
+ let t = this._cleanup.indexOf(e);
312
+ t !== -1 && this._cleanup.splice(t, 1);
88
313
  }
89
314
  registerStateAttrs(...e) {
90
315
  return e.forEach((e) => {
@@ -127,11 +352,14 @@ var c = class e {
127
352
  this._pendingRemovals.forEach((e) => e.destroy()), this._pendingRemovals.clear(), this._childrenDirty = !1;
128
353
  }
129
354
  bindTo(e) {
130
- let t = n(e), r = this.renderDom();
131
- return t && r && t.appendChild(r), this;
355
+ let t = D(e), n = this.renderDom();
356
+ return t && n && t.appendChild(n), this;
132
357
  }
133
358
  destroy() {
134
- return this._deleted = !0, this._cleanup.forEach((e) => e()), this._cleanup = [], this._children.forEach((e) => e.destroy()), this._pendingRemovals.forEach((e) => e.destroy()), this._pendingRemovals.clear(), this._children = [], this._el?.parentNode && this._el.parentNode.removeChild(this._el), this;
359
+ return u() && (d({
360
+ type: "destroy",
361
+ node: this
362
+ }), f(this)), this._deleted = !0, this._cleanup.forEach((e) => e()), this._cleanup = [], this._children.forEach((e) => e.destroy()), this._pendingRemovals.forEach((e) => e.destroy()), this._pendingRemovals.clear(), this._children = [], this._childKeys.clear(), this._el?.parentNode && this._el.parentNode.removeChild(this._el), this;
135
363
  }
136
364
  toHTML() {
137
365
  return "";
@@ -139,58 +367,110 @@ var c = class e {
139
367
  hydrateSnapshot() {
140
368
  return this;
141
369
  }
142
- }, l = class extends c {
370
+ }, A = class extends k {
143
371
  constructor(e = "") {
144
- super(null), this._content = String(e), this._textNode = null;
372
+ if (super(null), this._content = "", this._textNode = null, typeof e == "function") {
373
+ T("text", null, e, (e) => this.textContent(e));
374
+ return;
375
+ }
376
+ this._content = String(e);
145
377
  }
146
378
  textContent(e) {
147
- return e === void 0 ? this._content : (this._content = String(e), this._textNode && (this._textNode.textContent = this._content), this);
379
+ if (e === void 0) return this._content;
380
+ if (typeof e == "function") return T("text", null, e, (e) => this.textContent(e)), this;
381
+ let t = this._content;
382
+ return this._content = String(e), this._textNode && (this._textNode.textContent = this._content), this._textNode && u() && !Object.is(t, this._content) && h(this, "text", {
383
+ from: t,
384
+ to: this._content
385
+ }), this;
148
386
  }
149
387
  renderDom() {
150
- return this._deleted ? null : (this._textNode || (this._textNode = document.createTextNode(this._content), this._el = this._textNode), this._textNode);
388
+ return this._deleted || this._permissionState() === "hidden" ? null : (this._textNode || (this._textNode = document.createTextNode(this._content), this._el = this._textNode), this._textNode);
151
389
  }
152
390
  toHTML() {
153
- return this._deleted ? "" : r(this._content);
391
+ return this._deleted || this._permissionState() === "hidden" ? "" : ee(this._content);
154
392
  }
155
- }, u = class extends c {
393
+ }, j = class extends k {
156
394
  constructor(e) {
157
- super(null), this._component = e, this._resolved = null;
395
+ super(null), this._component = e, this._resolved = null, this._resolvedList = null, this._roots = null, this._fragmentDom = null;
158
396
  }
159
397
  _resolve() {
160
- if (this._resolved) return this._resolved;
161
- let e = typeof this._component == "function" ? this._component() : this._component.render();
162
- if (!(e instanceof c)) throw TypeError("Component render must return a ViewNode");
163
- return this._resolved = e, e;
398
+ if (this._resolvedList) return this._resolved;
399
+ let e = a(this._accessContext || s(), () => typeof this._component == "function" ? this._component() : this._component.render()), t = Array.isArray(e) ? e.slice() : [e];
400
+ return t.forEach((e) => {
401
+ if (!(e instanceof k)) throw TypeError("Component render must return a ViewNode or an array of ViewNodes");
402
+ }), this._resolvedList = t, this._resolved = t[0] || null, this._roots = Array.isArray(e) ? t : null, this._component && typeof this._component == "object" && typeof this._component._attachHost == "function" && this._component._attachHost(this), this._resolved;
403
+ }
404
+ _resolveList() {
405
+ return this._resolve(), this._resolvedList || [];
406
+ }
407
+ _replaceResolved(e) {
408
+ let t = this._resolvedList || [], n = Array.isArray(e) ? e.slice() : [e];
409
+ if (n.forEach((e) => {
410
+ if (!(e instanceof k)) throw TypeError("Component render must return a ViewNode or an array of ViewNodes");
411
+ }), t.length === n.length && t.every((e, t) => e === n[t])) return;
412
+ let r = [];
413
+ if (this._fragmentDom && this._fragmentDom.length > 0) r.push(...this._fragmentDom);
414
+ else if (t.length > 0) {
415
+ let e = t[0]._el;
416
+ e && e.parentNode && r.push(e);
417
+ }
418
+ if (this._resolvedList = n, this._resolved = n[0] || null, this._roots = Array.isArray(e) ? n : null, this._fragmentDom = null, r.length === 0) {
419
+ t.forEach((e) => e.destroy());
420
+ return;
421
+ }
422
+ let i = x(), a = r[0].parentNode, o = [];
423
+ n.forEach((e) => {
424
+ let t = S(this._access ?? i, () => e.renderDom());
425
+ t && o.push(t);
426
+ }), o.length > 0 && a && o.forEach((e) => a.insertBefore(e, r[0])), r.forEach((e) => {
427
+ e.parentNode === a && a.removeChild(e);
428
+ }), this._roots ? this._fragmentDom = o : this._el = o[0] || null, t.forEach((e) => e.destroy());
164
429
  }
165
430
  children() {
166
- return this._resolved ? this._resolved.children() : [];
431
+ return this._resolvedList ? this._roots ? this._resolvedList.flatMap((e) => e.children()) : this._resolvedList[0] ? this._resolvedList[0].children() : [] : [];
167
432
  }
168
433
  textContent() {
169
- let e = this._resolve();
170
- return typeof e.textContent == "function" ? e.textContent() : "";
434
+ return this._resolveList().map((e) => typeof e.textContent == "function" ? e.textContent() : "").join("");
171
435
  }
172
436
  renderDom() {
173
- if (this._deleted) return null;
174
- let e = this._resolve().renderDom();
175
- return this._el = e, e;
437
+ if (this._deleted || this._permissionState() === "hidden") return null;
438
+ let e = x(), t = this._resolveList();
439
+ if (this._roots) {
440
+ if (this._fragmentDom) return null;
441
+ let n = [];
442
+ t.forEach((t) => {
443
+ let r = S(this._access ?? e, () => t.renderDom());
444
+ r && n.push(r);
445
+ }), this._fragmentDom = n;
446
+ let r = document.createDocumentFragment();
447
+ return n.forEach((e) => r.appendChild(e)), r;
448
+ }
449
+ let n = t[0];
450
+ return S(this._access ?? e, () => {
451
+ let e = n.renderDom();
452
+ return this._el = e, e;
453
+ });
176
454
  }
177
455
  toHTML() {
178
- return this._deleted ? "" : this._resolve().toHTML();
456
+ if (this._deleted || this._permissionState() === "hidden") return "";
457
+ let e = x(), t = this._resolveList();
458
+ return S(this._access ?? e, () => t.map((e) => e.toHTML()).join(""));
179
459
  }
180
460
  destroy() {
181
- return this._resolved && this._resolved.destroy(), super.destroy();
461
+ return this._component && typeof this._component == "object" && typeof this._component.destroy == "function" && this._component.destroy(), (this._resolvedList || []).forEach((e) => e.destroy()), this._fragmentDom = null, super.destroy();
182
462
  }
183
463
  };
184
- function d(e = "") {
185
- return new l(e);
464
+ function M(e = "") {
465
+ return new A(e);
186
466
  }
187
- function f(e) {
188
- if (e instanceof c) return e;
189
- if (typeof e == "function" || e && typeof e == "object" && typeof e.render == "function") return new u(e);
190
- if (typeof e == "string" || typeof e == "number") return new l(e);
467
+ function ae(e) {
468
+ if (e instanceof k) return e;
469
+ if (typeof e == "function" || e && typeof e == "object" && typeof e.render == "function") return new j(e);
470
+ if (typeof e == "string" || typeof e == "number") return new A(e);
191
471
  throw TypeError("ViewNode child must be a ViewNode, component, string, or number");
192
472
  }
193
- function p(e = null, t = null, n = null) {
473
+ function oe(e = null, t = null, n = null) {
194
474
  return typeof t == "function" && n == null ? {
195
475
  first: e,
196
476
  options: null,
@@ -201,10 +481,10 @@ function p(e = null, t = null, n = null) {
201
481
  callback: n
202
482
  };
203
483
  }
204
- function m(e, t) {
484
+ function N(e, t) {
205
485
  return !t || typeof t != "object" || Array.isArray(t) ? e : (t.attrs && typeof e.attr == "function" && e.attr(t.attrs), t.style && typeof e.styles == "function" && e.styles(t.style), e);
206
486
  }
207
- var h = class extends c {
487
+ var P = class extends k {
208
488
  constructor(e, t = null) {
209
489
  super(null), this._tagName = e, this._attrs = {}, this._styles = {}, this._classes = /* @__PURE__ */ new Set(), this._el = null, t !== null && this.setup(t);
210
490
  }
@@ -244,7 +524,15 @@ var h = class extends c {
244
524
  return this._children.map((e) => typeof e.textContent == "function" ? e.textContent() : "").join("");
245
525
  }
246
526
  attr(e, t) {
247
- return t === void 0 && typeof e == "string" ? this._attrs[e] : e && typeof e == "object" ? (Object.entries(e).forEach(([e, t]) => this.attr(e, t)), this) : (t == null || t === !1 ? delete this._attrs[e] : this._attrs[e] = t, this._el && a(this._el, e, t), this);
527
+ if (t === void 0 && typeof e == "string") return this._attrs[e];
528
+ if (e && typeof e == "object") return Object.entries(e).forEach(([e, t]) => this.attr(e, t)), this;
529
+ if (typeof t == "function") return T("attr", e, t, (t) => this.attr(e, t)), this;
530
+ let n = this._attrs[e];
531
+ return t == null || t === !1 ? delete this._attrs[e] : this._attrs[e] = t, this._el && O(this._el, e, t), this._el && u() && !this._devtoolsRendering && !Object.is(n, t) && h(this, "attr", {
532
+ name: e,
533
+ previous: n,
534
+ next: t
535
+ }), this;
248
536
  }
249
537
  id(e) {
250
538
  return e === void 0 ? this.attr("id") : this.attr("id", e);
@@ -264,39 +552,69 @@ var h = class extends c {
264
552
  return !e || !t || e === t ? this : this._classes.has(e) ? (this._classes.delete(e), this.className(t)) : n ? this.className(t) : this;
265
553
  }
266
554
  style(e, t) {
267
- return t === void 0 && typeof e == "string" ? this._styles[e] : e && typeof e == "object" ? this.styles(e) : (t == null || t === "" ? delete this._styles[e] : this._styles[e] = t, this._el && (this._el.style[e] = t || ""), this);
555
+ if (t === void 0 && typeof e == "string") return this._styles[e];
556
+ if (e && typeof e == "object") return this.styles(e);
557
+ if (typeof t == "function") return T("style", e, t, (t) => this.style(e, t)), this;
558
+ let n = this._styles[e];
559
+ return t == null || t === "" ? delete this._styles[e] : this._styles[e] = t, this._el && (this._el.style[e] = t || ""), this._el && u() && !this._devtoolsRendering && !Object.is(n, t) && h(this, "style", {
560
+ name: e,
561
+ previous: n,
562
+ next: t
563
+ }), this;
268
564
  }
269
565
  styles(e) {
270
566
  return Object.entries(e || {}).forEach(([e, t]) => this.style(e, t)), this;
271
567
  }
272
568
  child(...e) {
569
+ let t = this._el && u() && !this._devtoolsRendering ? [] : null;
273
570
  return e.flat(Infinity).forEach((e) => {
274
571
  if (e == null) return;
275
- let t = f(e);
276
- if (this._pendingRemovals.delete(t), this._children.push(t), this._childrenDirty = !0, this._el) {
277
- let e = t.renderDom();
278
- e && e.parentNode !== this._el && this._el.appendChild(e);
572
+ let n = ae(e);
573
+ if (this._pendingRemovals.delete(n), this._children.push(n), this._childrenDirty = !0, this._el) {
574
+ let e = S(this._access ?? x(), () => n.renderDom());
575
+ e && e.parentNode !== this._el && this._el.appendChild(e), t && t.push(m(n));
279
576
  }
280
- }), this;
577
+ }), t && t.length > 0 && h(this, "child", { added: t }), this;
578
+ }
579
+ _applyAccessState(e) {
580
+ if (e === "readonly") {
581
+ this._accessAttrsApplied = !0;
582
+ let e = this._tagName;
583
+ v.has(e) && this.attr("disabled", !0), y.has(e) && this.attr("readonly", !0), this.attr("aria-disabled", "true");
584
+ return;
585
+ }
586
+ this._accessAttrsApplied && (this._accessAttrsApplied = !1, this.attr("disabled", null), this.attr("readonly", null), this.attr("aria-disabled", null));
281
587
  }
282
588
  renderDom() {
283
- return this._deleted ? null : (this._el || (this._el = document.createElement(this._tagName), this._applySnapshotToElement()), this._commitChildren(), this._children.forEach((e) => {
284
- let t = e.renderDom();
285
- t && t.parentNode !== this._el && this._el.appendChild(t);
286
- }), this._el);
589
+ if (this._deleted) return null;
590
+ let e = this._permissionState();
591
+ if (e === "hidden") return null;
592
+ let t = this._access ?? x();
593
+ u() && (this._devtoolsRendering = !0);
594
+ try {
595
+ return this._el || (this._el = document.createElement(this._tagName), S(t, () => this._applySnapshotToElement())), this._applyAccessState(e), this._commitChildren(), this._children.forEach((e) => {
596
+ S(t, () => {
597
+ let t = e.renderDom();
598
+ t && t.parentNode !== this._el ? this._el.appendChild(t) : !t && e._el && e._el.parentNode === this._el && this._el.removeChild(e._el);
599
+ });
600
+ }), u() && g(this), this._el;
601
+ } finally {
602
+ this._devtoolsRendering = !1;
603
+ }
287
604
  }
288
605
  toHTML() {
289
606
  if (this._deleted) return "";
290
- let e = this._serializeAttributes(), n = e ? `<${this._tagName} ${e}>` : `<${this._tagName}>`;
291
- return t.has(this._tagName) ? n : `${n}${this._children.map((e) => e.toHTML()).join("")}</${this._tagName}>`;
607
+ let e = this._permissionState();
608
+ return e === "hidden" ? "" : (this._applyAccessState(e), S(this._access ?? x(), () => {
609
+ let e = this._serializeAttributes(), t = e ? `<${this._tagName} ${e}>` : `<${this._tagName}>`;
610
+ return E.has(this._tagName) ? t : `${t}${this._children.map((e) => e.toHTML()).join("")}</${this._tagName}>`;
611
+ }));
292
612
  }
293
613
  _applyBindingsToElement() {
294
- Object.entries(this._attrs).forEach(([e, t]) => a(this._el, e, t)), this._syncClassName(), Object.entries(this._styles).forEach(([e, t]) => {
614
+ Object.entries(this._attrs).forEach(([e, t]) => O(this._el, e, t)), this._syncClassName(), Object.entries(this._styles).forEach(([e, t]) => {
295
615
  this._el.style[e] = t;
296
616
  }), this._events.forEach((e, t) => {
297
- e.forEach(({ handler: e, options: n }) => {
298
- this._el.addEventListener(t, e, n), this._cleanup.push(() => this._el.removeEventListener(t, e, n));
299
- });
617
+ this._bindDomAdapter(t, void 0, e.options);
300
618
  });
301
619
  }
302
620
  _applySnapshotToElement() {
@@ -306,24 +624,28 @@ var h = class extends c {
306
624
  });
307
625
  }
308
626
  _syncClassName() {
309
- let e = [...this._classes].join(" ");
310
- e ? this._attrs.class = e : delete this._attrs.class, this._el && (e ? this._el.className = e : this._el.removeAttribute("class"));
627
+ let e = this._attrs.class, t = [...this._classes].join(" ");
628
+ t ? this._attrs.class = t : delete this._attrs.class, this._el && (t ? this._el.className = t : this._el.removeAttribute("class"), u() && !this._devtoolsRendering && !Object.is(e, t) && h(this, "attr", {
629
+ name: "class",
630
+ previous: e,
631
+ next: t || void 0
632
+ }));
311
633
  }
312
634
  _serializeAttributes() {
313
635
  let e = { ...this._attrs }, t = this._serializeStyles();
314
- return t && (e.style = e.style ? `${e.style}; ${t}` : t), Object.entries(e).filter(([, e]) => e != null && e !== !1).map(([e, t]) => t === !0 || i(e) ? `${e}="${e}"` : `${e}="${r(t)}"`).join(" ");
636
+ return t && (e.style = e.style ? `${e.style}; ${t}` : t), Object.entries(e).filter(([, e]) => e != null && e !== !1).map(([e, t]) => t === !0 || te(e) ? `${e}="${e}"` : `${e}="${ee(t)}"`).join(" ");
315
637
  }
316
638
  _serializeStyles() {
317
- return o(this._styles);
639
+ return ne(this._styles);
318
640
  }
319
641
  };
320
- function g(e, t = h) {
642
+ function se(e, t = P) {
321
643
  return function(n = null, r = null, i = null) {
322
- let a = p(n, r, i), o = new t(e, a.first);
323
- return m(o, a.options), typeof a.callback == "function" && a.callback(o), o;
644
+ let a = oe(n, r, i), o = new t(e, a.first);
645
+ return N(o, a.options), typeof a.callback == "function" && a.callback(o), o;
324
646
  };
325
647
  }
326
- function _(e, t, n = {}) {
648
+ function F(e, t, n = {}) {
327
649
  let { override: r = !1 } = n;
328
650
  Object.entries(t).forEach(([t, n]) => {
329
651
  !r && e.prototype[t] || (e.prototype[t] = function(...e) {
@@ -333,7 +655,7 @@ function _(e, t, n = {}) {
333
655
  }
334
656
  //#endregion
335
657
  //#region src/html/index.js
336
- var v = class extends h {}, y = [
658
+ var I = class extends P {}, ce = [
337
659
  "a",
338
660
  "abbr",
339
661
  "address",
@@ -455,18 +777,18 @@ var v = class extends h {}, y = [
455
777
  "video",
456
778
  "wbr"
457
779
  ];
458
- function b() {
459
- return y.reduce((e, t) => {
460
- let { aliases: n = [], name: r, tagName: i } = tn(t), a = g(i, v);
780
+ function le() {
781
+ return ce.reduce((e, t) => {
782
+ let { aliases: n = [], name: r, tagName: i } = vn(t), a = se(i, I);
461
783
  return e[r] = a, n.forEach((t) => {
462
784
  e[t] = a;
463
785
  }), e;
464
786
  }, {});
465
787
  }
466
- var x = b();
467
- _(v, x);
468
- var { a: S, abbr: ee, address: te, area: ne, article: C, aside: re, audio: w, b: T, base: ie, bdi: ae, bdo: E, blockquote: oe, body: se, br: ce, button: le, canvas: ue, caption: de, cite: fe, code: pe, col: me, colgroup: he, data: ge, datalist: _e, dd: ve, del: ye, details: be, dfn: xe, dialog: Se, div: Ce, dl: we, dt: Te, em: Ee, embed: De, fieldset: Oe, figcaption: ke, figure: Ae, footer: je, form: Me, h1: Ne, h2: Pe, h3: Fe, h4: Ie, h5: Le, h6: Re, head: ze, header: Be, hgroup: Ve, hr: He, html: Ue, i: We, iframe: Ge, img: Ke, input: qe, ins: Je, kbd: Ye, label: Xe, legend: Ze, li: Qe, link: $e, main: et, map: tt, mark: nt, menu: rt, meta: it, meter: at, nav: ot, noscript: st, object: ct, ol: lt, optgroup: ut, option: dt, output: ft, p: pt, picture: mt, pre: ht, progress: gt, q: _t, rp: vt, rt: yt, ruby: bt, s: xt, samp: St, script: Ct, search: wt, section: Tt, select: Et, selectedcontent: Dt, slot: Ot, small: kt, source: At, span: jt, strong: Mt, style: Nt, styleTag: Pt, sub: Ft, summary: It, sup: Lt, table: Rt, tbody: zt, td: Bt, template: Vt, textarea: Ht, tfoot: Ut, th: Wt, thead: Gt, time: Kt, title: qt, tr: Jt, track: Yt, u: Xt, ul: Zt, varTag: Qt, video: $t, wbr: en } = x;
469
- function tn(e) {
788
+ var ue = le();
789
+ F(I, ue);
790
+ var { a: de, abbr: fe, address: pe, area: me, article: he, aside: ge, audio: _e, b: ve, base: ye, bdi: be, bdo: xe, blockquote: Se, body: Ce, br: we, button: Te, canvas: Ee, caption: De, cite: Oe, code: ke, col: Ae, colgroup: je, data: Me, datalist: Ne, dd: Pe, del: Fe, details: Ie, dfn: Le, dialog: Re, div: ze, dl: Be, dt: Ve, em: He, embed: Ue, fieldset: We, figcaption: Ge, figure: Ke, footer: qe, form: Je, h1: Ye, h2: Xe, h3: Ze, h4: Qe, h5: $e, h6: et, head: tt, header: nt, hgroup: rt, hr: it, html: at, i: ot, iframe: st, img: ct, input: lt, ins: ut, kbd: dt, label: ft, legend: pt, li: mt, link: ht, main: gt, map: _t, mark: vt, menu: yt, meta: bt, meter: xt, nav: St, noscript: Ct, object: wt, ol: Tt, optgroup: Et, option: Dt, output: Ot, p: kt, picture: At, pre: jt, progress: Mt, q: Nt, rp: Pt, rt: Ft, ruby: It, s: Lt, samp: Rt, script: zt, search: Bt, section: Vt, select: Ht, selectedcontent: Ut, slot: Wt, small: Gt, source: Kt, span: qt, strong: Jt, style: Yt, styleTag: Xt, sub: Zt, summary: Qt, sup: $t, table: en, tbody: tn, td: nn, template: rn, textarea: an, tfoot: on, th: sn, thead: cn, time: ln, title: un, tr: dn, track: fn, u: pn, ul: mn, varTag: hn, video: gn, wbr: _n } = ue;
791
+ function vn(e) {
470
792
  return typeof e == "string" ? {
471
793
  name: e,
472
794
  tagName: e
@@ -474,20 +796,20 @@ function tn(e) {
474
796
  }
475
797
  //#endregion
476
798
  //#region src/core/document-events.js
477
- function D(e, t, n = void 0) {
799
+ function L(e, t, n = void 0) {
478
800
  return typeof document > "u" ? () => {} : (document.addEventListener(e, t, n), () => {
479
801
  document.removeEventListener(e, t, n);
480
802
  });
481
803
  }
482
- function nn(e, t, n = void 0) {
804
+ function yn(e, t, n = void 0) {
483
805
  typeof document > "u" || document.removeEventListener(e, t, n);
484
806
  }
485
- function O(e, t, n = void 0) {
807
+ function R(e, t, n = void 0) {
486
808
  return typeof window > "u" ? () => {} : (window.addEventListener(e, t, n), () => {
487
809
  window.removeEventListener(e, t, n);
488
810
  });
489
811
  }
490
- function rn(e, t = null) {
812
+ function bn(e, t = null) {
491
813
  if (typeof document > "u") return null;
492
814
  if (t) {
493
815
  let e = document.querySelector(`[${t}]`);
@@ -498,19 +820,19 @@ function rn(e, t = null) {
498
820
  }
499
821
  //#endregion
500
822
  //#region src/svg/index.js
501
- var an = "http://www.w3.org/2000/svg", on = /* @__PURE__ */ new Set([
823
+ var xn = "http://www.w3.org/2000/svg", Sn = /* @__PURE__ */ new Set([
502
824
  "desc",
503
825
  "metadata",
504
826
  "text",
505
827
  "textPath",
506
828
  "title",
507
829
  "tspan"
508
- ]), sn = class e extends h {
830
+ ]), Cn = class e extends P {
509
831
  setup(e) {
510
832
  return typeof e == "string" || typeof e == "number" ? this.child(e) : super.setup(e);
511
833
  }
512
834
  text(...e) {
513
- if (on.has(this._tagName)) {
835
+ if (Sn.has(this._tagName)) {
514
836
  let [t, n] = e;
515
837
  return e.length > 0 && this.child(t), n != null && this.setup(n), this;
516
838
  }
@@ -518,10 +840,10 @@ var an = "http://www.w3.org/2000/svg", on = /* @__PURE__ */ new Set([
518
840
  }
519
841
  style(...e) {
520
842
  let [t, n] = e;
521
- return this._tagName === "style" && e.length <= 1 ? (e.length === 1 && this.child(t), this) : e.length <= 1 && cn(t) ? this._svgChild("style", t) : super.style(t, n);
843
+ return this._tagName === "style" && e.length <= 1 ? (e.length === 1 && this.child(t), this) : e.length <= 1 && wn(t) ? this._svgChild("style", t) : super.style(t, n);
522
844
  }
523
845
  renderDom() {
524
- return this._deleted ? null : (this._el || (this._el = document.createElementNS(an, this._tagName), this._applySnapshotToElement()), this._el);
846
+ return this._deleted ? null : (this._el || (this._el = document.createElementNS(xn, this._tagName), this._applySnapshotToElement()), this._el);
525
847
  }
526
848
  _syncClassName() {
527
849
  let e = [...this._classes].join(" ");
@@ -534,32 +856,32 @@ var an = "http://www.w3.org/2000/svg", on = /* @__PURE__ */ new Set([
534
856
  }), this.child(r);
535
857
  }
536
858
  };
537
- function cn(e) {
859
+ function wn(e) {
538
860
  return e == null || typeof e == "function" || typeof e == "string" || typeof e == "number" || Array.isArray(e);
539
861
  }
540
- var ln = /* @__PURE__ */ "animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.a.script.style.switch.text.title.symbol.textPath.tspan.use.view".split(".");
541
- function un(e) {
862
+ var Tn = /* @__PURE__ */ "animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.a.script.style.switch.text.title.symbol.textPath.tspan.use.view".split(".");
863
+ function En(e) {
542
864
  return function(...t) {
543
- let n = new sn(e);
865
+ let n = new Cn(e);
544
866
  return e === "svg" && n.style("display", "block"), t.forEach((e) => {
545
867
  e != null && n.setup(e);
546
868
  }), n;
547
869
  };
548
870
  }
549
- function dn() {
550
- return ln.reduce((e, t) => {
551
- let { aliases: n = [], name: r, tagName: i } = mn(t), a = un(i);
871
+ function Dn() {
872
+ return Tn.reduce((e, t) => {
873
+ let { aliases: n = [], name: r, tagName: i } = An(t), a = En(i);
552
874
  return e[r] = a, n.forEach((t) => {
553
875
  e[t] = a;
554
876
  }), e;
555
877
  }, {});
556
878
  }
557
- var fn = un("svg"), pn = dn();
558
- _(v, { svg: fn }), _(sn, {
559
- svg: fn,
560
- ...pn
879
+ var On = En("svg"), kn = Dn();
880
+ F(I, { svg: On }), F(Cn, {
881
+ svg: On,
882
+ ...kn
561
883
  });
562
- function mn(e) {
884
+ function An(e) {
563
885
  return typeof e == "string" ? {
564
886
  name: e,
565
887
  tagName: e
@@ -567,8 +889,8 @@ function mn(e) {
567
889
  }
568
890
  //#endregion
569
891
  //#region src/svg/icons.js
570
- function hn() {
571
- return fn((e) => {
892
+ function jn() {
893
+ return On((e) => {
572
894
  e.className("yoya-icon").attr({
573
895
  "aria-hidden": "true",
574
896
  fill: "none",
@@ -585,63 +907,63 @@ function hn() {
585
907
  }
586
908
  //#endregion
587
909
  //#region src/components/shared.js
588
- var gn = "yoya-component";
589
- function k(e, t) {
910
+ var Mn = "yoya-component";
911
+ function z(e, t) {
590
912
  return `var(--yoya-${e}, ${t})`;
591
913
  }
592
- function A(e, t, n = "1px") {
593
- return `${n} solid ${k(e, t)}`;
914
+ function B(e, t, n = "1px") {
915
+ return `${n} solid ${z(e, t)}`;
594
916
  }
595
- function j(e = null, t = null, n = null) {
596
- return p(e, t, n);
917
+ function V(e = null, t = null, n = null) {
918
+ return oe(e, t, n);
597
919
  }
598
- function _n(e, t) {
599
- return typeof e.attr == "function" || typeof e.styles == "function" ? m(e, t) : (typeof e.render == "function" && m(e.render(), t), e);
920
+ function Nn(e, t) {
921
+ return typeof e.attr == "function" || typeof e.styles == "function" ? N(e, t) : (typeof e.render == "function" && N(e.render(), t), e);
600
922
  }
601
- function M(e, t = null, n = null) {
602
- return _n(e, t), typeof n == "function" && n(e), e;
923
+ function H(e, t = null, n = null) {
924
+ return Nn(e, t), typeof n == "function" && n(e), e;
603
925
  }
604
- function vn(e, t = null, n = null, r = null) {
605
- let { first: i, options: a, callback: o } = j(t, n, r);
606
- return M(i instanceof e ? i : new e(i), a, o);
926
+ function Pn(e, t = null, n = null, r = null) {
927
+ let { first: i, options: a, callback: o } = V(t, n, r);
928
+ return H(i instanceof e ? i : new e(i), a, o);
607
929
  }
608
- function yn(e, t) {
609
- return t == null ? e : typeof t == "function" ? (t(e), e) : t instanceof c || Array.isArray(t) || typeof t == "string" || typeof t == "number" ? (e.child(t), e) : (xn(t) && e.setup(t), e);
930
+ function Fn(e, t) {
931
+ return t == null ? e : typeof t == "function" ? (t(e), e) : t instanceof k || Array.isArray(t) || typeof t == "string" || typeof t == "number" ? (e.child(t), e) : (Ln(t) && e.setup(t), e);
610
932
  }
611
- function bn(e) {
933
+ function In(e) {
612
934
  return e == null ? [] : Array.isArray(e) ? e : [e];
613
935
  }
614
- function N(e, t) {
936
+ function U(e, t) {
615
937
  return e.children().forEach((e) => e.destroy()), e._children = [], e._el && e._el.replaceChildren(), t.length > 0 && e.child(t), e;
616
938
  }
617
- function xn(e) {
939
+ function Ln(e) {
618
940
  if (Object.prototype.toString.call(e) !== "[object Object]") return !1;
619
941
  let t = Object.getPrototypeOf(e);
620
942
  return t === Object.prototype || t === null;
621
943
  }
622
944
  //#endregion
623
945
  //#region src/layout/split-panel.js
624
- var Sn = class extends v {
946
+ var Rn = class extends I {
625
947
  constructor(e = null, t = null, n = null) {
626
- super("div", null), this.className(gn, "yoya-vsplit-panel"), this.styles({
948
+ super("div", null), this.className(Mn, "yoya-vsplit-panel"), this.styles({
627
949
  boxSizing: "border-box",
628
950
  display: "flex",
629
951
  minHeight: "0",
630
952
  minWidth: "0",
631
953
  overflow: "hidden",
632
954
  width: "100%"
633
- }), this._direction = "horizontal", this._firstSize = "50%", this._minSize = 40, this._drag = null, this._dragMove = null, this._dragUp = null, this._first = new v("div").className("yoya-vsplit-panel-first").attr("data-vsplit-first", "true").styles({
955
+ }), this._direction = "horizontal", this._firstSize = "50%", this._minSize = 40, this._drag = null, this._dragMove = null, this._dragUp = null, this._first = new I("div").className("yoya-vsplit-panel-first").attr("data-vsplit-first", "true").styles({
634
956
  boxSizing: "border-box",
635
957
  minHeight: "0",
636
958
  minWidth: "0",
637
959
  overflow: "auto"
638
- }), this._second = new v("div").className("yoya-vsplit-panel-second").attr("data-vsplit-second", "true").styles({
960
+ }), this._second = new I("div").className("yoya-vsplit-panel-second").attr("data-vsplit-second", "true").styles({
639
961
  boxSizing: "border-box",
640
962
  flex: "1 1 auto",
641
963
  minHeight: "0",
642
964
  minWidth: "0",
643
965
  overflow: "auto"
644
- }), this._divider = new v("div").className("yoya-vsplit-panel-divider").attr({
966
+ }), this._divider = new I("div").className("yoya-vsplit-panel-divider").attr({
645
967
  "aria-orientation": "horizontal",
646
968
  "data-vsplit-divider": "true",
647
969
  role: "separator",
@@ -651,13 +973,13 @@ var Sn = class extends v {
651
973
  background: "transparent",
652
974
  boxSizing: "border-box",
653
975
  flex: "0 0 auto"
654
- }).on("mousedown", (e) => this._startDrag(e)).on("dblclick", () => this.reset()).on("keydown", (e) => this._handleKeydown(e)).on("mouseenter", () => this._hoverDivider(!0)).on("mouseleave", () => this._hoverDivider(!1)), this.child(this._first, this._divider, this._second), this._sync(), this._setupSplitPanel(e), M(this, t, n);
976
+ }).on("mousedown", (e) => this._startDrag(e)).on("dblclick", () => this.reset()).on("keydown", (e) => this._handleKeydown(e)).on("mouseenter", () => this._hoverDivider(!0)).on("mouseleave", () => this._hoverDivider(!1)), this.child(this._first, this._divider, this._second), this._sync(), this._setupSplitPanel(e), H(this, t, n);
655
977
  }
656
978
  direction(e) {
657
979
  return e === void 0 ? this._direction : (this._direction = e === "vertical" ? "vertical" : "horizontal", this._sync(), this);
658
980
  }
659
981
  size(e) {
660
- return e === void 0 ? this._firstSize : (this._firstSize = wn(e), this._sync(), this);
982
+ return e === void 0 ? this._firstSize : (this._firstSize = Bn(e), this._sync(), this);
661
983
  }
662
984
  minSize(e) {
663
985
  if (e === void 0) return this._minSize;
@@ -668,10 +990,10 @@ var Sn = class extends v {
668
990
  return this.size("50%");
669
991
  }
670
992
  first(e) {
671
- return N(this._first, []), typeof e == "function" ? e(this._first) : N(this._first, bn(e)), this;
993
+ return U(this._first, []), typeof e == "function" ? e(this._first) : U(this._first, In(e)), this;
672
994
  }
673
995
  second(e) {
674
- return N(this._second, []), typeof e == "function" ? e(this._second) : N(this._second, bn(e)), this;
996
+ return U(this._second, []), typeof e == "function" ? e(this._second) : U(this._second, In(e)), this;
675
997
  }
676
998
  destroy() {
677
999
  return this._endDrag(), super.destroy();
@@ -693,7 +1015,7 @@ var Sn = class extends v {
693
1015
  }), this._divider.attr("aria-orientation", e ? "horizontal" : "vertical"), this;
694
1016
  }
695
1017
  _hoverDivider(e) {
696
- this._divider.style("background", e ? k("color-primary-subtle", "#eff6ff") : "var(--yoya-color-border-faint, #efefef)");
1018
+ this._divider.style("background", e ? z("color-primary-subtle", "#eff6ff") : "var(--yoya-color-border-faint, #efefef)");
697
1019
  }
698
1020
  _startDrag(e) {
699
1021
  if (e.button !== 0 || !this._el) return;
@@ -703,18 +1025,18 @@ var Sn = class extends v {
703
1025
  containerSize: a,
704
1026
  start: r,
705
1027
  startSize: i
706
- }, this._dragMove = (e) => this._onDrag(e), this._dragUp = () => this._endDrag(), this._dragUnbindMove = D("mousemove", this._dragMove), this._dragUnbindUp = D("mouseup", this._dragUp);
1028
+ }, this._dragMove = (e) => this._onDrag(e), this._dragUp = () => this._endDrag(), this._dragUnbindMove = L("mousemove", this._dragMove), this._dragUnbindUp = L("mouseup", this._dragUp);
707
1029
  }
708
1030
  _onDrag(e) {
709
1031
  if (!this._drag) return;
710
- let t = (this._direction === "horizontal" ? e.clientX : e.clientY) - this._drag.start, n = Tn(this._drag.startSize + t, this._minSize, this._drag.containerSize - this._minSize);
1032
+ let t = (this._direction === "horizontal" ? e.clientX : e.clientY) - this._drag.start, n = Vn(this._drag.startSize + t, this._minSize, this._drag.containerSize - this._minSize);
711
1033
  this._firstSize = `${Math.round(n)}px`, this._sync();
712
1034
  }
713
1035
  _handleKeydown(e) {
714
1036
  let t = e.key === "ArrowLeft" || e.key === "ArrowUp" ? -16 : e.key === "ArrowRight" || e.key === "ArrowDown" ? 16 : 0;
715
1037
  if (!t || !this._el) return;
716
1038
  e.preventDefault();
717
- let n = this._direction === "horizontal" ? this._el.offsetWidth : this._el.offsetHeight, r = Tn((Number.parseFloat(this._firstSize) || 0) + t, this._minSize, n - this._minSize);
1039
+ let n = this._direction === "horizontal" ? this._el.offsetWidth : this._el.offsetHeight, r = Vn((Number.parseFloat(this._firstSize) || 0) + t, this._minSize, n - this._minSize);
718
1040
  this._firstSize = `${Math.round(r)}px`, this._sync();
719
1041
  }
720
1042
  _endDrag() {
@@ -726,7 +1048,7 @@ var Sn = class extends v {
726
1048
  e(this);
727
1049
  return;
728
1050
  }
729
- if (xn(e)) {
1051
+ if (Ln(e)) {
730
1052
  let { direction: t, first: n, minSize: r, second: i, size: a, ...o } = e;
731
1053
  Object.keys(o).length > 0 && this.setup(o), t !== void 0 && this.direction(t), a !== void 0 && this.size(a), r !== void 0 && this.minSize(r), n !== void 0 && this.first(n), i !== void 0 && this.second(i);
732
1054
  return;
@@ -735,21 +1057,21 @@ var Sn = class extends v {
735
1057
  }
736
1058
  }
737
1059
  };
738
- function Cn(e = null, t = null, n = null) {
739
- return vn(Sn, e, t, n);
1060
+ function zn(e = null, t = null, n = null) {
1061
+ return Pn(Rn, e, t, n);
740
1062
  }
741
- _(v, { vSplitPanel: Cn });
742
- function wn(e) {
1063
+ F(I, { vSplitPanel: zn });
1064
+ function Bn(e) {
743
1065
  return typeof e == "number" ? `${e}px` : e;
744
1066
  }
745
- function Tn(e, t, n) {
1067
+ function Vn(e, t, n) {
746
1068
  return Number.isNaN(e) ? t : Math.min(Math.max(e, t), Math.max(n, t));
747
1069
  }
748
1070
  //#endregion
749
1071
  //#region src/layout/masonry.js
750
- var En = class extends v {
1072
+ var Hn = class extends I {
751
1073
  constructor(e = null) {
752
- super("div", null), this._columns = 3, this._gap = 16, this._minColumnWidth = null, this.className(gn, "yoya-vmasonry"), this.attr({ "data-columns": "3" }), this.styles({
1074
+ super("div", null), this._columns = 3, this._gap = 16, this._minColumnWidth = null, this.className(Mn, "yoya-vmasonry"), this.attr({ "data-columns": "3" }), this.styles({
753
1075
  boxSizing: "border-box",
754
1076
  columnCount: "3",
755
1077
  columnGap: "16px",
@@ -780,28 +1102,28 @@ var En = class extends v {
780
1102
  e(this);
781
1103
  return;
782
1104
  }
783
- if (xn(e)) {
1105
+ if (Ln(e)) {
784
1106
  let { columns: t, gap: n, minColumnWidth: r, ...i } = e;
785
1107
  Object.keys(i).length > 0 && this.setup(i), t !== void 0 && this.columns(t), n !== void 0 && this.gap(n), r !== void 0 && this.minColumnWidth(r);
786
1108
  }
787
1109
  }
788
1110
  }
789
1111
  };
790
- function Dn(e = null, t = null, n = null) {
791
- return vn(En, e, t, n);
1112
+ function Un(e = null, t = null, n = null) {
1113
+ return Pn(Hn, e, t, n);
792
1114
  }
793
1115
  //#endregion
794
1116
  //#region src/layout/theme-shell.js
795
- var On = class extends v {
1117
+ var Wn = class extends I {
796
1118
  constructor(e = null) {
797
1119
  super("div", null), this.className("yoya-component", "yoya-vtheme-shell"), this.styles({
798
- background: k("color-surface", "#ffffff"),
799
- border: `1px solid ${k("color-border", "#d8dee8")}`,
800
- borderRadius: k("radius-md", "6px"),
1120
+ background: z("color-surface", "#ffffff"),
1121
+ border: `1px solid ${z("color-border", "#d8dee8")}`,
1122
+ borderRadius: z("radius-md", "6px"),
801
1123
  boxSizing: "border-box",
802
- color: k("color-text", "#172033"),
1124
+ color: z("color-text", "#172033"),
803
1125
  minWidth: "0"
804
- }), yn(this, e);
1126
+ }), Fn(this, e);
805
1127
  }
806
1128
  _requireSingleShellChild() {
807
1129
  let e = this.children();
@@ -842,7 +1164,7 @@ var On = class extends v {
842
1164
  return e === void 0 ? this._styles.background : e === null ? this : (this._styles.background = String(e), this._el && (this._el.style.background = String(e)), this);
843
1165
  }
844
1166
  backgroundOpacity(e) {
845
- let t = this.background() || k("color-surface", "#ffffff"), n = Math.max(0, Math.min(1, Number(e) || 0));
1167
+ let t = this.background() || z("color-surface", "#ffffff"), n = Math.max(0, Math.min(1, Number(e) || 0));
846
1168
  return this.background(`color-mix(in srgb, ${t} ${Math.round(n * 100)}%, transparent)`);
847
1169
  }
848
1170
  radius(e) {
@@ -858,81 +1180,81 @@ var On = class extends v {
858
1180
  return this.styles({ overflow: e ? "auto" : "visible" });
859
1181
  }
860
1182
  };
861
- function kn(e = null, t = null, n = null) {
862
- return vn(On, e, t, n);
1183
+ function Gn(e = null, t = null, n = null) {
1184
+ return Pn(Wn, e, t, n);
863
1185
  }
864
- _(h, { vThemeShell: kn });
1186
+ F(P, { vThemeShell: Gn });
865
1187
  //#endregion
866
1188
  //#region src/layout/index.js
867
- var An = /* @__PURE__ */ new Set(/* @__PURE__ */ "align.areas.asideWidth.autoFlow.breakpoint.columns.direction.drawer.gutter.offset.pull.push.span.xs.sm.md.lg.xl.gap.justify.maxWidth.minColumnWidth.mobileDirection.mobileGap.orientation.padding.paddingInline.rows.safeArea.size.breakpoints.viewport.wrap".split(".")), jn = /* @__PURE__ */ new Set(["height", "width"]);
868
- function Mn(e = null, t = null, n = null) {
869
- return P("flex", { display: "flex" }, e, I, t, n);
1189
+ var Kn = /* @__PURE__ */ new Set(/* @__PURE__ */ "align.areas.asideWidth.autoFlow.breakpoint.columns.direction.drawer.gutter.offset.pull.push.span.xs.sm.md.lg.xl.gap.justify.maxWidth.minColumnWidth.mobileDirection.mobileGap.orientation.padding.paddingInline.rows.safeArea.size.breakpoints.viewport.wrap".split(".")), qn = /* @__PURE__ */ new Set(["height", "width"]);
1190
+ function Jn(e = null, t = null, n = null) {
1191
+ return W("flex", { display: "flex" }, e, vr, t, n);
870
1192
  }
871
- function Nn(e = null, t = null, n = null) {
872
- return P("stack", {
1193
+ function Yn(e = null, t = null, n = null) {
1194
+ return W("stack", {
873
1195
  display: "flex",
874
1196
  flexDirection: "column"
875
- }, e, I, t, n);
1197
+ }, e, vr, t, n);
876
1198
  }
877
- function Pn(e = null, t = null, n = null) {
878
- return P("vstack", {
1199
+ function Xn(e = null, t = null, n = null) {
1200
+ return W("vstack", {
879
1201
  display: "flex",
880
1202
  flexDirection: "column"
881
- }, e, I, t, n);
1203
+ }, e, vr, t, n);
882
1204
  }
883
- function Fn(e = null, t = null, n = null) {
884
- return P("hstack", {
1205
+ function Zn(e = null, t = null, n = null) {
1206
+ return W("hstack", {
885
1207
  display: "flex",
886
1208
  flexDirection: "row"
887
- }, e, I, t, n);
1209
+ }, e, vr, t, n);
888
1210
  }
889
- function In(e = null, t = null, n = null) {
890
- return P("center", {
1211
+ function Qn(e = null, t = null, n = null) {
1212
+ return W("center", {
891
1213
  display: "flex",
892
1214
  alignItems: "center",
893
1215
  justifyContent: "center"
894
- }, e, I, t, n);
1216
+ }, e, vr, t, n);
895
1217
  }
896
- function Ln(e = null, t = null, n = null) {
897
- let r = j(e, t, n), i = new v("div");
1218
+ function $n(e = null, t = null, n = null) {
1219
+ let r = V(e, t, n), i = new I("div");
898
1220
  i.className("yoya-layout", "yoya-vrow"), i.styles({
899
1221
  boxSizing: "border-box",
900
1222
  display: "flex",
901
1223
  flexWrap: "wrap",
902
1224
  width: "100%"
903
- }), i._gutter = null, i.gutter = (e) => e === void 0 ? i._gutter : (i._gutter = B(e), cr(i), i), i.justify = (e) => e === void 0 ? i.style("justifyContent") : (i.style("justifyContent", e), i), i.align = (e) => e === void 0 ? i.style("alignItems") : (i.style("alignItems", e), i), i.wrap = (e) => e === void 0 ? i.style("flexWrap") : (i.style("flexWrap", e === !1 ? "nowrap" : V(e ?? !0)), i);
1225
+ }), i._gutter = null, i.gutter = (e) => e === void 0 ? i._gutter : (i._gutter = q(e), Tr(i), i), i.justify = (e) => e === void 0 ? i.style("justifyContent") : (i.style("justifyContent", e), i), i.align = (e) => e === void 0 ? i.style("alignItems") : (i.style("alignItems", e), i), i.wrap = (e) => e === void 0 ? i.style("flexWrap") : (i.style("flexWrap", e === !1 ? "nowrap" : Jr(e ?? !0)), i);
904
1226
  let a = i.child.bind(i);
905
- return i.child = (...e) => (a(...e), cr(i), i), F(i, r.first, lr), cr(i), M(i, r.options, r.callback);
1227
+ return i.child = (...e) => (a(...e), Tr(i), i), G(i, r.first, Er), Tr(i), H(i, r.options, r.callback);
906
1228
  }
907
- function Rn(e = null, t = null, n = null) {
908
- let r = j(e, t, n), i = new v("div");
1229
+ function er(e = null, t = null, n = null) {
1230
+ let r = V(e, t, n), i = new I("div");
909
1231
  return i.className("yoya-layout", "yoya-vcol"), i.styles({
910
1232
  boxSizing: "border-box",
911
1233
  minWidth: "0"
912
- }), i._baseCol = L({}), i._responsiveCols = [], i._gutter = null, i.refresh = i._refreshCol = () => {
1234
+ }), i._baseCol = kr({}), i._responsiveCols = [], i._gutter = null, i.refresh = i._refreshCol = () => {
913
1235
  let e = typeof window > "u" ? null : window.innerWidth, t = (e === null ? null : i._responsiveCols.filter((t) => e >= t.minWidth).at(-1))?.props ?? i._baseCol;
914
- return i.style("boxSizing", "border-box"), i.style("flex", "0 0 auto"), i.style("left", t.push ? `${z(t.push)}%` : null), i.style("marginLeft", t.offset ? `${z(t.offset)}%` : null), i.style("paddingLeft", i._gutter ? mr(i._gutter) : null), i.style("paddingRight", i._gutter ? mr(i._gutter) : null), i.style("position", t.push || t.pull ? "relative" : null), i.style("right", t.pull ? `${z(t.pull)}%` : null), i.style("width", `${z(t.span)}%`), i;
915
- }, i.span = (e) => e === void 0 ? i._baseCol.span : (i._baseCol.span = R(e), i._refreshCol(), i), i.offset = (e) => e === void 0 ? i._baseCol.offset : (i._baseCol.offset = R(e), i._refreshCol(), i), i.push = (e) => e === void 0 ? i._baseCol.push : (i._baseCol.push = R(e), i._refreshCol(), i), i.pull = (e) => e === void 0 ? i._baseCol.pull : (i._baseCol.pull = R(e), i._refreshCol(), i), i.gutter = (e) => e === void 0 ? i._gutter : (i._gutter = B(e), i._refreshCol(), i), F(i, r.first, ur), i._refreshCol(), i._responsiveCols.length && (i._colResize = () => i._refreshCol(), i._colResizeUnbind = O("resize", i._colResize), hr(i)), M(i, r.options, r.callback);
1236
+ return i.style("boxSizing", "border-box"), i.style("flex", "0 0 auto"), i.style("left", t.push ? `${Mr(t.push)}%` : null), i.style("marginLeft", t.offset ? `${Mr(t.offset)}%` : null), i.style("paddingLeft", i._gutter ? Nr(i._gutter) : null), i.style("paddingRight", i._gutter ? Nr(i._gutter) : null), i.style("position", t.push || t.pull ? "relative" : null), i.style("right", t.pull ? `${Mr(t.pull)}%` : null), i.style("width", `${Mr(t.span)}%`), i;
1237
+ }, i.span = (e) => e === void 0 ? i._baseCol.span : (i._baseCol.span = K(e), i._refreshCol(), i), i.offset = (e) => e === void 0 ? i._baseCol.offset : (i._baseCol.offset = K(e), i._refreshCol(), i), i.push = (e) => e === void 0 ? i._baseCol.push : (i._baseCol.push = K(e), i._refreshCol(), i), i.pull = (e) => e === void 0 ? i._baseCol.pull : (i._baseCol.pull = K(e), i._refreshCol(), i), i.gutter = (e) => e === void 0 ? i._gutter : (i._gutter = q(e), i._refreshCol(), i), G(i, r.first, Dr), i._refreshCol(), i._responsiveCols.length && (i._colResize = () => i._refreshCol(), i._colResizeUnbind = R("resize", i._colResize), Pr(i)), H(i, r.options, r.callback);
916
1238
  }
917
- function zn(e = null, t = null, n = null) {
918
- return P("grid", { display: "grid" }, e, nr, t, n);
1239
+ function tr(e = null, t = null, n = null) {
1240
+ return W("grid", { display: "grid" }, e, yr, t, n);
919
1241
  }
920
- function Bn(e = null, t = null, n = null) {
921
- let r = j(e, t, n), i = P("responsive-grid", { display: "grid" }, r.first, rr, r.options, r.callback), a = U(r.first) ? r.first : {};
922
- return i._responsiveGridBreakpoints = Or(a.breakpoints), i._responsiveGridMinColumnWidth = Dr(a.minColumnWidth), i._responsiveGridRefresh = () => {
1242
+ function nr(e = null, t = null, n = null) {
1243
+ let r = V(e, t, n), i = W("responsive-grid", { display: "grid" }, r.first, br, r.options, r.callback), a = Xr(r.first) ? r.first : {};
1244
+ return i._responsiveGridBreakpoints = qr(a.breakpoints), i._responsiveGridMinColumnWidth = Kr(a.minColumnWidth), i._responsiveGridRefresh = () => {
923
1245
  let e = typeof window > "u" ? null : window.innerWidth, t = e === null ? null : i._responsiveGridBreakpoints.filter((t) => e >= t.minWidth).at(-1);
924
1246
  return i.style("gridTemplateColumns", t ? `repeat(${t.columns}, minmax(0, 1fr))` : `repeat(auto-fit, minmax(${i._responsiveGridMinColumnWidth}, 1fr))`), i;
925
- }, i.refresh = i._responsiveGridRefresh, i.minColumnWidth = (e) => e === void 0 ? i._responsiveGridMinColumnWidth : (i._responsiveGridMinColumnWidth = Dr(e), i._responsiveGridRefresh(), i), i.breakpoints = (e) => e === void 0 ? i._responsiveGridBreakpoints : (i._responsiveGridBreakpoints = Or(e), i._responsiveGridBreakpoints.length && !i._responsiveGridResize && !i._responsiveGridResizeUnbind && (i._responsiveGridResize = () => i._responsiveGridRefresh(), i._responsiveGridResizeUnbind = O("resize", i._responsiveGridResize), Un(i)), i._responsiveGridRefresh(), i), i._responsiveGridRefresh(), i._responsiveGridBreakpoints.length && (i._responsiveGridResize = () => i._responsiveGridRefresh(), i._responsiveGridResizeUnbind = O("resize", i._responsiveGridResize), Un(i)), i;
1247
+ }, i.refresh = i._responsiveGridRefresh, i.minColumnWidth = (e) => e === void 0 ? i._responsiveGridMinColumnWidth : (i._responsiveGridMinColumnWidth = Kr(e), i._responsiveGridRefresh(), i), i.breakpoints = (e) => e === void 0 ? i._responsiveGridBreakpoints : (i._responsiveGridBreakpoints = qr(e), i._responsiveGridBreakpoints.length && !i._responsiveGridResize && !i._responsiveGridResizeUnbind && (i._responsiveGridResize = () => i._responsiveGridRefresh(), i._responsiveGridResizeUnbind = R("resize", i._responsiveGridResize), ar(i)), i._responsiveGridRefresh(), i), i._responsiveGridRefresh(), i._responsiveGridBreakpoints.length && (i._responsiveGridResize = () => i._responsiveGridRefresh(), i._responsiveGridResizeUnbind = R("resize", i._responsiveGridResize), ar(i)), i;
926
1248
  }
927
- function Vn(e = null, t = null, n = null) {
928
- let r = j(e, t, n), i = new v("div"), a = new v("div").className("yoya-vbody-content"), o = i.child.bind(i);
1249
+ function rr(e = null, t = null, n = null) {
1250
+ let r = V(e, t, n), i = new I("div"), a = new I("div").className("yoya-vbody-content"), o = i.child.bind(i);
929
1251
  return i.className("yoya-layout", "yoya-vbody"), i.attr("data-page-body", "true"), i.styles({
930
- background: k("color-bg", "#f9f9f9"),
1252
+ background: z("color-bg", "#f9f9f9"),
931
1253
  boxSizing: "border-box",
932
- color: k("color-text", "#0d0d0d"),
933
- fontFamily: k("font-family", "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"),
934
- fontSize: k("font-size", "14px"),
935
- lineHeight: k("line-height", "1.5"),
1254
+ color: z("color-text", "#0d0d0d"),
1255
+ fontFamily: z("font-family", "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"),
1256
+ fontSize: z("font-size", "14px"),
1257
+ lineHeight: z("line-height", "1.5"),
936
1258
  minHeight: "100%",
937
1259
  padding: "clamp(16px, 3vw, 32px)",
938
1260
  width: "100%"
@@ -943,30 +1265,30 @@ function Vn(e = null, t = null, n = null) {
943
1265
  marginRight: "auto",
944
1266
  maxWidth: "1120px",
945
1267
  width: "100%"
946
- }), o(a), i.background = (e) => e === void 0 ? i.style("background") : (i.style("background", e), i), i.maxWidth = (e) => e === void 0 ? a.style("maxWidth") : (a.style("maxWidth", B(e)), i), i.padding = (e) => e === void 0 ? i.style("padding") : (i.style("padding", B(e)), i), i.gap = (e) => e === void 0 ? a.style("gap") : (a.style("gap", B(e)), i), i.minHeight = (e) => e === void 0 ? i.style("minHeight") : (i.style("minHeight", B(e)), i), i.content = (e) => e === void 0 ? a : (typeof e == "function" ? e(a) : a.child(e), i), i.child = (...e) => (a.child(...e), i), ir(i, r.first), M(i, r.options, r.callback);
1268
+ }), o(a), i.background = (e) => e === void 0 ? i.style("background") : (i.style("background", e), i), i.maxWidth = (e) => e === void 0 ? a.style("maxWidth") : (a.style("maxWidth", q(e)), i), i.padding = (e) => e === void 0 ? i.style("padding") : (i.style("padding", q(e)), i), i.gap = (e) => e === void 0 ? a.style("gap") : (a.style("gap", q(e)), i), i.minHeight = (e) => e === void 0 ? i.style("minHeight") : (i.style("minHeight", q(e)), i), i.content = (e) => e === void 0 ? a : (typeof e == "function" ? e(a) : a.child(e), i), i.child = (...e) => (a.child(...e), i), xr(i, r.first), H(i, r.options, r.callback);
947
1269
  }
948
- function Hn(e = null, t = null) {
949
- let n = Vn(e);
1270
+ function ir(e = null, t = null) {
1271
+ let n = rr(e);
950
1272
  return typeof document < "u" && n.bindTo(t || document.body), n;
951
1273
  }
952
- function Un(e) {
1274
+ function ar(e) {
953
1275
  if (e._responsiveGridDestroyWrapped) return;
954
1276
  e._responsiveGridDestroyWrapped = !0;
955
1277
  let t = e.destroy.bind(e);
956
1278
  e.destroy = () => (e._responsiveGridResizeUnbind?.(), t());
957
1279
  }
958
- function Wn(e = null, t = null, n = null) {
959
- return P("container", {
1280
+ function or(e = null, t = null, n = null) {
1281
+ return W("container", {
960
1282
  width: "100%",
961
1283
  maxWidth: "1120px",
962
1284
  marginLeft: "auto",
963
1285
  marginRight: "auto",
964
1286
  paddingLeft: "16px",
965
1287
  paddingRight: "16px"
966
- }, e, ar, t, n);
1288
+ }, e, Sr, t, n);
967
1289
  }
968
- function Gn(e = null, t = null, n = null) {
969
- let r = j(e, t, n), i = new v("div");
1290
+ function sr(e = null, t = null, n = null) {
1291
+ let r = V(e, t, n), i = new I("div");
970
1292
  i.className("yoya-layout", "yoya-vcontainer"), i.styles({
971
1293
  boxSizing: "border-box",
972
1294
  display: "flex",
@@ -987,22 +1309,22 @@ function Gn(e = null, t = null, n = null) {
987
1309
  minHeight: i._scrollable ? "0" : null,
988
1310
  overflow: i._scrollable ? "auto" : null,
989
1311
  overscrollBehavior: i._scrollable ? "contain" : null
990
- }), i), i._autoDirection = () => i.children().some((e) => br(e)) ? "column" : "row", i._syncContainerDirection = () => (i.style("flexDirection", i._direction || i._autoDirection()), i), i.direction = (e) => e === void 0 ? i._direction || i._autoDirection() : (i._direction = e, i._syncContainerDirection(), i);
1312
+ }), i), i._autoDirection = () => i.children().some((e) => zr(e)) ? "column" : "row", i._syncContainerDirection = () => (i.style("flexDirection", i._direction || i._autoDirection()), i), i.direction = (e) => e === void 0 ? i._direction || i._autoDirection() : (i._direction = e, i._syncContainerDirection(), i);
991
1313
  let a = i.child.bind(i);
992
- return i.child = (...e) => (a(...e), i._syncContainerDirection(), i), F(i, r.first, xr), i._syncContainerDirection(), M(i, r.options, r.callback);
1314
+ return i.child = (...e) => (a(...e), i._syncContainerDirection(), i), G(i, r.first, Br), i._syncContainerDirection(), H(i, r.options, r.callback);
993
1315
  }
994
- function Kn(e = null, t = null, n = null) {
995
- let r = j(e, t, n), i = new v("div");
1316
+ function cr(e = null, t = null, n = null) {
1317
+ let r = V(e, t, n), i = new I("div");
996
1318
  i.className("yoya-layout", "yoya-mobile-layout", "yoya-vmobile-layout"), i.attr("data-mobile-layout", "false"), i.styles({
997
1319
  boxSizing: "border-box",
998
1320
  display: "flex",
999
1321
  minWidth: "0",
1000
1322
  width: "100%"
1001
- }), i._breakpoint = 768, i._desktopDirection = "row", i._mobileDirection = "column", i._desktopGap = 0, i._mobileGap = 12, i._asideWidth = 280, i._safeArea = !1, i._safeAreaApplied = !1, i._viewport = !1, i._mobile = !1, i._drawerEnabled = !0, i._asideOpen = !1, i._asideBackdrop = new v("div").className("yoya-vmobile-layout-backdrop").attr("aria-hidden", "true").style("display", "none").on("click", () => i.closeAside()), i._asideToggle = new v("button").className("yoya-vmobile-layout-toggle").attr({
1323
+ }), i._breakpoint = 768, i._desktopDirection = "row", i._mobileDirection = "column", i._desktopGap = 0, i._mobileGap = 12, i._asideWidth = 280, i._safeArea = !1, i._safeAreaApplied = !1, i._viewport = !1, i._mobile = !1, i._drawerEnabled = !0, i._asideOpen = !1, i._asideBackdrop = new I("div").className("yoya-vmobile-layout-backdrop").attr("aria-hidden", "true").style("display", "none").on("click", () => i.closeAside()), i._asideToggle = new I("button").className("yoya-vmobile-layout-toggle").attr({
1002
1324
  type: "button",
1003
1325
  "aria-label": "打开导航",
1004
1326
  "aria-expanded": "false"
1005
- }).style("display", "none").child(hn().styles({
1327
+ }).style("display", "none").child(jn().styles({
1006
1328
  height: "18px",
1007
1329
  width: "18px"
1008
1330
  })).on("click", () => i.toggleAside()), i._refreshMobileLayout = () => {
@@ -1013,86 +1335,86 @@ function Kn(e = null, t = null, n = null) {
1013
1335
  height: i._viewport ? "100dvh" : null,
1014
1336
  minHeight: i._viewport ? "100vh" : null,
1015
1337
  overflow: i._viewport ? "hidden" : null
1016
- }), i._safeArea ? (i._safeAreaApplied = !0, i.style("paddingLeft", t ? "max(env(safe-area-inset-left), 0px)" : null), i.style("paddingRight", t ? "max(env(safe-area-inset-right), 0px)" : null), i.style("paddingTop", t ? "max(env(safe-area-inset-top), 0px)" : null), i.style("paddingBottom", t ? "max(env(safe-area-inset-bottom), 0px)" : null)) : i._safeAreaApplied && (i._safeAreaApplied = !1, i.style("paddingLeft", null), i.style("paddingRight", null), i.style("paddingTop", null), i.style("paddingBottom", null)), i.children().forEach((e) => _r(i, e)), vr(i), i;
1017
- }, i.refresh = i._refreshMobileLayout, i.breakpoint = (e) => e === void 0 ? i._breakpoint : (i._breakpoint = Number(e), (!Number.isFinite(i._breakpoint) || i._breakpoint <= 0) && (i._breakpoint = 768), i._refreshMobileLayout(), i), i.direction = (e, t) => e === void 0 ? i._desktopDirection : (i._desktopDirection = e || "row", t !== void 0 && (i._mobileDirection = t || "column"), i._refreshMobileLayout(), i), i.mobileDirection = (e) => e === void 0 ? i._mobileDirection : (i._mobileDirection = e || "column", i._refreshMobileLayout(), i), i.gap = (e, t) => e === void 0 ? i._desktopGap : (i._desktopGap = B(e), t !== void 0 && (i._mobileGap = B(t)), i._refreshMobileLayout(), i), i.mobileGap = (e) => e === void 0 ? i._mobileGap : (i._mobileGap = B(e), i._refreshMobileLayout(), i), i.asideWidth = (e) => e === void 0 ? i._asideWidth : (i._asideWidth = B(e), i._refreshMobileLayout(), i), i.viewport = (e = !0) => e === void 0 ? i._viewport : (i._viewport = !!e, i._refreshMobileLayout(), i), i.safeArea = (e = !0) => e === void 0 ? i._safeArea : (i._safeArea = !!e, i._refreshMobileLayout(), i), i.drawer = (e = !0) => e === void 0 ? i._drawerEnabled : (i._drawerEnabled = !!e, i._drawerEnabled || (i._asideOpen = !1), i._refreshMobileLayout(), i), i.asideOpen = (e) => e === void 0 ? i._asideOpen : (i._asideOpen = !!e, i._refreshMobileLayout(), i), i.openAside = () => i.asideOpen(!0), i.closeAside = () => i.asideOpen(!1), i.toggleAside = () => i.asideOpen(!i._asideOpen), i.mobile = () => i._mobile;
1338
+ }), i._safeArea ? (i._safeAreaApplied = !0, i.style("paddingLeft", t ? "max(env(safe-area-inset-left), 0px)" : null), i.style("paddingRight", t ? "max(env(safe-area-inset-right), 0px)" : null), i.style("paddingTop", t ? "max(env(safe-area-inset-top), 0px)" : null), i.style("paddingBottom", t ? "max(env(safe-area-inset-bottom), 0px)" : null)) : i._safeAreaApplied && (i._safeAreaApplied = !1, i.style("paddingLeft", null), i.style("paddingRight", null), i.style("paddingTop", null), i.style("paddingBottom", null)), i.children().forEach((e) => Ir(i, e)), Lr(i), i;
1339
+ }, i.refresh = i._refreshMobileLayout, i.breakpoint = (e) => e === void 0 ? i._breakpoint : (i._breakpoint = Number(e), (!Number.isFinite(i._breakpoint) || i._breakpoint <= 0) && (i._breakpoint = 768), i._refreshMobileLayout(), i), i.direction = (e, t) => e === void 0 ? i._desktopDirection : (i._desktopDirection = e || "row", t !== void 0 && (i._mobileDirection = t || "column"), i._refreshMobileLayout(), i), i.mobileDirection = (e) => e === void 0 ? i._mobileDirection : (i._mobileDirection = e || "column", i._refreshMobileLayout(), i), i.gap = (e, t) => e === void 0 ? i._desktopGap : (i._desktopGap = q(e), t !== void 0 && (i._mobileGap = q(t)), i._refreshMobileLayout(), i), i.mobileGap = (e) => e === void 0 ? i._mobileGap : (i._mobileGap = q(e), i._refreshMobileLayout(), i), i.asideWidth = (e) => e === void 0 ? i._asideWidth : (i._asideWidth = q(e), i._refreshMobileLayout(), i), i.viewport = (e = !0) => e === void 0 ? i._viewport : (i._viewport = !!e, i._refreshMobileLayout(), i), i.safeArea = (e = !0) => e === void 0 ? i._safeArea : (i._safeArea = !!e, i._refreshMobileLayout(), i), i.drawer = (e = !0) => e === void 0 ? i._drawerEnabled : (i._drawerEnabled = !!e, i._drawerEnabled || (i._asideOpen = !1), i._refreshMobileLayout(), i), i.asideOpen = (e) => e === void 0 ? i._asideOpen : (i._asideOpen = !!e, i._refreshMobileLayout(), i), i.openAside = () => i.asideOpen(!0), i.closeAside = () => i.asideOpen(!1), i.toggleAside = () => i.asideOpen(!i._asideOpen), i.mobile = () => i._mobile;
1018
1340
  let a = i.child.bind(i);
1019
- return i.child = (...e) => (a(...e), i._refreshMobileLayout(), i), F(i, r.first, Sr), i.child(i._asideBackdrop, i._asideToggle), i._mobileLayoutResize = () => i._refreshMobileLayout(), i._mobileLayoutResizeUnbind = O("resize", i._mobileLayoutResize), gr(i), i._refreshMobileLayout(), M(i, r.options, r.callback);
1341
+ return i.child = (...e) => (a(...e), i._refreshMobileLayout(), i), G(i, r.first, Vr), i.child(i._asideBackdrop, i._asideToggle), i._mobileLayoutResize = () => i._refreshMobileLayout(), i._mobileLayoutResizeUnbind = R("resize", i._mobileLayoutResize), Fr(i), i._refreshMobileLayout(), H(i, r.options, r.callback);
1020
1342
  }
1021
- var qn = Kn;
1022
- function Jn(e = null, t = null, n = null) {
1023
- return P("vheader", {
1343
+ var lr = cr;
1344
+ function ur(e = null, t = null, n = null) {
1345
+ return W("vheader", {
1024
1346
  boxSizing: "border-box",
1025
1347
  flex: "0 0 auto",
1026
1348
  height: "60px",
1027
1349
  width: "100%"
1028
- }, e, Cr, t, n, "header", jn, er);
1350
+ }, e, Hr, t, n, "header", qn, gr);
1029
1351
  }
1030
- function Yn(e = null, t = null, n = null) {
1031
- return P("vaside", {
1352
+ function dr(e = null, t = null, n = null) {
1353
+ return W("vaside", {
1032
1354
  boxSizing: "border-box",
1033
1355
  flex: "0 0 auto",
1034
1356
  minWidth: "0",
1035
1357
  width: "300px"
1036
- }, e, wr, t, n, "aside", jn, tr);
1358
+ }, e, Ur, t, n, "aside", qn, _r);
1037
1359
  }
1038
- function Xn(e = null, t = null, n = null) {
1039
- return P("vmain", {
1360
+ function fr(e = null, t = null, n = null) {
1361
+ return W("vmain", {
1040
1362
  boxSizing: "border-box",
1041
1363
  flex: "1 1 auto",
1042
1364
  minHeight: "0",
1043
1365
  minWidth: "0",
1044
1366
  overflow: "auto"
1045
- }, e, Tr, t, n, "main", jn, tr);
1367
+ }, e, Wr, t, n, "main", qn, _r);
1046
1368
  }
1047
- function Zn(e = null, t = null, n = null) {
1048
- return P("vfooter", {
1369
+ function pr(e = null, t = null, n = null) {
1370
+ return W("vfooter", {
1049
1371
  boxSizing: "border-box",
1050
1372
  flex: "0 0 auto",
1051
1373
  height: "60px",
1052
1374
  width: "100%"
1053
- }, e, Cr, t, n, "footer", jn, er);
1375
+ }, e, Hr, t, n, "footer", qn, gr);
1054
1376
  }
1055
- function Qn(e = null, t = null, n = null) {
1056
- let r = P("spacer", {
1377
+ function mr(e = null, t = null, n = null) {
1378
+ let r = W("spacer", {
1057
1379
  flexGrow: 1,
1058
1380
  minWidth: 0,
1059
1381
  minHeight: 0
1060
- }, e, or, t, n);
1382
+ }, e, Cr, t, n);
1061
1383
  return r.attr("aria-hidden", "true"), r;
1062
1384
  }
1063
- function $n(e = null, t = null, n = null) {
1064
- let r = P("divider", {}, e, sr, t, n);
1385
+ function hr(e = null, t = null, n = null) {
1386
+ let r = W("divider", {}, e, wr, t, n);
1065
1387
  return r.attr("role", "separator"), r.attr("aria-orientation") || r.attr("aria-orientation", "horizontal"), r;
1066
1388
  }
1067
- _(v, {
1068
- vAside: Yn,
1069
- vCol: Rn,
1070
- vContainer: Gn,
1071
- vFooter: Zn,
1072
- vHeader: Jn,
1073
- vMain: Xn,
1074
- vMasonry: Dn,
1075
- vRow: Ln,
1076
- vSplitPanel: Cn,
1077
- center: In,
1078
- container: Wn,
1079
- divider: $n,
1080
- flex: Mn,
1081
- grid: zn,
1082
- mobileLayout: Kn,
1083
- responsiveGrid: Bn,
1084
- vMobileLayout: qn,
1085
- vBody: Vn,
1086
- hstack: Fn,
1087
- spacer: Qn,
1088
- stack: Nn,
1089
- vstack: Pn
1389
+ F(I, {
1390
+ vAside: dr,
1391
+ vCol: er,
1392
+ vContainer: sr,
1393
+ vFooter: pr,
1394
+ vHeader: ur,
1395
+ vMain: fr,
1396
+ vMasonry: Un,
1397
+ vRow: $n,
1398
+ vSplitPanel: zn,
1399
+ center: Qn,
1400
+ container: or,
1401
+ divider: hr,
1402
+ flex: Jn,
1403
+ grid: tr,
1404
+ mobileLayout: cr,
1405
+ responsiveGrid: nr,
1406
+ vMobileLayout: lr,
1407
+ vBody: rr,
1408
+ hstack: Zn,
1409
+ spacer: mr,
1410
+ stack: Yn,
1411
+ vstack: Xn
1090
1412
  });
1091
- function P(e, t, n, r, i, a, o = "div", s = null, c = null) {
1092
- let l = j(n, i, a), u = new v(o);
1093
- return u.className("yoya-layout", `yoya-${e}`), u.styles(t), c && c(u), F(u, l.first, r, s), M(u, l.options, l.callback);
1413
+ function W(e, t, n, r, i, a, o = "div", s = null, c = null) {
1414
+ let l = V(n, i, a), u = new I(o);
1415
+ return u.className("yoya-layout", `yoya-${e}`), u.styles(t), c && c(u), G(u, l.first, r, s), H(u, l.options, l.callback);
1094
1416
  }
1095
- function er(e) {
1417
+ function gr(e) {
1096
1418
  e.sticky = (t = !0) => {
1097
1419
  if (t === void 0) return e.style("position") === "sticky";
1098
1420
  let n = !!t;
@@ -1103,7 +1425,7 @@ function er(e) {
1103
1425
  }), e;
1104
1426
  };
1105
1427
  }
1106
- function tr(e) {
1428
+ function _r(e) {
1107
1429
  e.scrollable = (t = !0) => {
1108
1430
  if (t === void 0) return e.style("overflow") === "auto";
1109
1431
  let n = !!t;
@@ -1115,59 +1437,59 @@ function tr(e) {
1115
1437
  }), e;
1116
1438
  };
1117
1439
  }
1118
- function F(e, t, n, r = null) {
1440
+ function G(e, t, n, r = null) {
1119
1441
  if (t == null) return n(e, {}), e;
1120
- if (!U(t)) return n(e, {}), e.setup(t);
1442
+ if (!Xr(t)) return n(e, {}), e.setup(t);
1121
1443
  n(e, t);
1122
- let i = kr(t, r);
1444
+ let i = Yr(t, r);
1123
1445
  return Object.keys(i).length > 0 && e.setup(i), e;
1124
1446
  }
1125
- function I(e, t) {
1126
- e.styles(H({
1447
+ function vr(e, t) {
1448
+ e.styles(J({
1127
1449
  alignItems: t.align,
1128
1450
  flexDirection: t.direction,
1129
- flexWrap: V(t.wrap),
1451
+ flexWrap: Jr(t.wrap),
1130
1452
  gap: t.gap,
1131
1453
  justifyContent: t.justify
1132
1454
  }));
1133
1455
  }
1134
- function nr(e, t) {
1135
- e.styles(H({
1456
+ function yr(e, t) {
1457
+ e.styles(J({
1136
1458
  gap: t.gap,
1137
1459
  gridAutoFlow: t.autoFlow,
1138
1460
  gridTemplateAreas: t.areas,
1139
- gridTemplateColumns: Er(t.columns),
1140
- gridTemplateRows: Er(t.rows)
1461
+ gridTemplateColumns: Gr(t.columns),
1462
+ gridTemplateRows: Gr(t.rows)
1141
1463
  }));
1142
1464
  }
1143
- function rr(e, t) {
1144
- e.style("gap", t.gap), e.style("gridTemplateColumns", `repeat(auto-fit, minmax(${Dr(t.minColumnWidth)}, 1fr))`);
1465
+ function br(e, t) {
1466
+ e.style("gap", t.gap), e.style("gridTemplateColumns", `repeat(auto-fit, minmax(${Kr(t.minColumnWidth)}, 1fr))`);
1145
1467
  }
1146
- function ir(e, t) {
1468
+ function xr(e, t) {
1147
1469
  if (t == null) return e;
1148
1470
  if (typeof t == "function") return t(e), e;
1149
- if (!U(t)) return e.child(t), e;
1471
+ if (!Xr(t)) return e.child(t), e;
1150
1472
  let { background: n, children: r, content: i, gap: a, maxWidth: o, minHeight: s, padding: c, ...l } = t;
1151
1473
  Object.keys(l).length && e.setup(l), n !== void 0 && e.background(n), o !== void 0 && e.maxWidth(o), c !== void 0 && e.padding(c), a !== void 0 && e.gap(a), s !== void 0 && e.minHeight(s);
1152
1474
  let u = i ?? r;
1153
1475
  return u !== void 0 && e.content(u), e;
1154
1476
  }
1155
- function ar(e, t) {
1477
+ function Sr(e, t) {
1156
1478
  let n = t.paddingInline ?? t.padding;
1157
- e.styles(H({
1479
+ e.styles(J({
1158
1480
  maxWidth: t.maxWidth,
1159
1481
  paddingLeft: n,
1160
1482
  paddingRight: n
1161
1483
  }));
1162
1484
  }
1163
- function or(e, t) {
1164
- e.styles(H({
1485
+ function Cr(e, t) {
1486
+ e.styles(J({
1165
1487
  flexBasis: t.size,
1166
1488
  height: t.orientation === "vertical" ? t.size : void 0,
1167
1489
  width: t.orientation === "horizontal" ? t.size : void 0
1168
1490
  }));
1169
1491
  }
1170
- function sr(e, t) {
1492
+ function wr(e, t) {
1171
1493
  let n = t.orientation === "vertical" ? "vertical" : "horizontal";
1172
1494
  if (e.attr("aria-orientation", n), n === "vertical") {
1173
1495
  e.styles({
@@ -1185,71 +1507,71 @@ function sr(e, t) {
1185
1507
  width: "100%"
1186
1508
  });
1187
1509
  }
1188
- function cr(e) {
1510
+ function Tr(e) {
1189
1511
  e.children().forEach((t) => {
1190
1512
  let n = t?._resolved ?? t?._resolve?.() ?? t;
1191
1513
  n && typeof n.gutter == "function" && n.gutter(e._gutter);
1192
1514
  });
1193
1515
  }
1194
- function lr(e, t) {
1195
- t.gutter !== void 0 && e.gutter(t.gutter), e.styles(H({
1516
+ function Er(e, t) {
1517
+ t.gutter !== void 0 && e.gutter(t.gutter), e.styles(J({
1196
1518
  alignItems: t.align,
1197
- flexWrap: t.wrap === void 0 || t.wrap === null ? "wrap" : t.wrap === !1 ? "nowrap" : V(t.wrap),
1519
+ flexWrap: t.wrap === void 0 || t.wrap === null ? "wrap" : t.wrap === !1 ? "nowrap" : Jr(t.wrap),
1198
1520
  justifyContent: t.justify
1199
1521
  }));
1200
1522
  }
1201
- function ur(e, t) {
1202
- e._baseCol = L(t), e._responsiveCols = fr(t), t.gutter !== void 0 && e.gutter(t.gutter);
1523
+ function Dr(e, t) {
1524
+ e._baseCol = kr(t), e._responsiveCols = Ar(t), t.gutter !== void 0 && e.gutter(t.gutter);
1203
1525
  }
1204
- var dr = [
1526
+ var Or = [
1205
1527
  ["xs", 0],
1206
1528
  ["sm", 768],
1207
1529
  ["md", 992],
1208
1530
  ["lg", 1200],
1209
1531
  ["xl", 1920]
1210
1532
  ];
1211
- function L(e = {}) {
1533
+ function kr(e = {}) {
1212
1534
  return {
1213
- span: R(e.span ?? 24),
1214
- offset: R(e.offset ?? 0),
1215
- push: R(e.push ?? 0),
1216
- pull: R(e.pull ?? 0)
1535
+ span: K(e.span ?? 24),
1536
+ offset: K(e.offset ?? 0),
1537
+ push: K(e.push ?? 0),
1538
+ pull: K(e.pull ?? 0)
1217
1539
  };
1218
1540
  }
1219
- function fr(e = {}) {
1220
- return dr.filter(([t]) => e[t] !== void 0).map(([t, n]) => ({
1541
+ function Ar(e = {}) {
1542
+ return Or.filter(([t]) => e[t] !== void 0).map(([t, n]) => ({
1221
1543
  minWidth: n,
1222
- props: pr(e[t])
1544
+ props: jr(e[t])
1223
1545
  }));
1224
1546
  }
1225
- function pr(e) {
1226
- return typeof e == "number" ? L({ span: e }) : U(e) ? L(e) : L({});
1547
+ function jr(e) {
1548
+ return typeof e == "number" ? kr({ span: e }) : Xr(e) ? kr(e) : kr({});
1227
1549
  }
1228
- function R(e) {
1550
+ function K(e) {
1229
1551
  let t = Number(e);
1230
1552
  return Number.isFinite(t) ? Math.min(24, Math.max(0, Math.round(t))) : 0;
1231
1553
  }
1232
- function z(e) {
1554
+ function Mr(e) {
1233
1555
  return e / 24 * 100;
1234
1556
  }
1235
- function mr(e) {
1557
+ function Nr(e) {
1236
1558
  if (typeof e == "number") return `${e / 2}px`;
1237
1559
  let t = String(e).match(/^(-?(?:\d+\.?\d*|\.\d+))([a-z%]+)$/i);
1238
1560
  return t ? `${Number(t[1]) / 2}${t[2]}` : `calc(${e} * 0.5)`;
1239
1561
  }
1240
- function hr(e) {
1562
+ function Pr(e) {
1241
1563
  if (e._colDestroyWrapped) return;
1242
1564
  e._colDestroyWrapped = !0;
1243
1565
  let t = e.destroy.bind(e);
1244
1566
  e.destroy = () => (e._colResizeUnbind?.(), t());
1245
1567
  }
1246
- function gr(e) {
1568
+ function Fr(e) {
1247
1569
  if (e._mobileLayoutDestroyWrapped) return;
1248
1570
  e._mobileLayoutDestroyWrapped = !0;
1249
1571
  let t = e.destroy.bind(e);
1250
1572
  e.destroy = () => (e._mobileLayoutResizeUnbind?.(), t());
1251
1573
  }
1252
- function _r(e, t) {
1574
+ function Ir(e, t) {
1253
1575
  let n = t?._resolved ?? t?._resolve?.() ?? t;
1254
1576
  if (!n || typeof n.styles != "function") return;
1255
1577
  let r = n._classes;
@@ -1294,7 +1616,7 @@ function _r(e, t) {
1294
1616
  visibility: null,
1295
1617
  zIndex: null
1296
1618
  })), n._mobileDrawerAriaHiddenApplied && (n._mobileDrawerAriaHiddenApplied = !1, n.attr("aria-hidden", null));
1297
- let t = e._mobile ? "100%" : B(e._asideWidth);
1619
+ let t = e._mobile ? "100%" : q(e._asideWidth);
1298
1620
  n.styles({
1299
1621
  flex: "0 0 auto",
1300
1622
  maxWidth: t,
@@ -1314,8 +1636,8 @@ function _r(e, t) {
1314
1636
  width: null
1315
1637
  })));
1316
1638
  }
1317
- function vr(e) {
1318
- let t = e._mobile && e._drawerEnabled && yr(e), n = t && e._asideOpen, r = e._asideBackdrop, i = e._asideToggle;
1639
+ function Lr(e) {
1640
+ let t = e._mobile && e._drawerEnabled && Rr(e), n = t && e._asideOpen, r = e._asideBackdrop, i = e._asideToggle;
1319
1641
  i && i.attr("aria-expanded", n ? "true" : "false").attr("aria-label", n ? "关闭导航" : "打开导航").styles({
1320
1642
  alignItems: "center",
1321
1643
  background: "var(--yoya-color-surface, #ffffff)",
@@ -1341,42 +1663,42 @@ function vr(e) {
1341
1663
  zIndex: n ? "35" : null
1342
1664
  });
1343
1665
  }
1344
- function yr(e) {
1666
+ function Rr(e) {
1345
1667
  return e.children().some((e) => !!(e?._resolved ?? e?._resolve?.() ?? e)?._classes?.has("yoya-vaside"));
1346
1668
  }
1347
- function br(e) {
1669
+ function zr(e) {
1348
1670
  let t = (e?._resolved ?? e?._resolve?.() ?? e)?._classes;
1349
1671
  return !!(t?.has("yoya-vheader") || t?.has("yoya-vfooter"));
1350
1672
  }
1351
- function xr(e, t) {
1352
- t.direction !== void 0 && e.direction(t.direction), e.styles(H({ gap: t.gap }));
1673
+ function Br(e, t) {
1674
+ t.direction !== void 0 && e.direction(t.direction), e.styles(J({ gap: t.gap }));
1353
1675
  }
1354
- function Sr(e, t) {
1355
- e.styles(H({
1676
+ function Vr(e, t) {
1677
+ e.styles(J({
1356
1678
  alignItems: t.align,
1357
- flexWrap: V(t.wrap),
1679
+ flexWrap: Jr(t.wrap),
1358
1680
  justifyContent: t.justify
1359
1681
  })), t.direction === void 0 ? t.mobileDirection !== void 0 && e.mobileDirection(t.mobileDirection) : e.direction(t.direction, t.mobileDirection), t.gap === void 0 ? t.mobileGap !== void 0 && e.mobileGap(t.mobileGap) : e.gap(t.gap, t.mobileGap), t.breakpoint !== void 0 && e.breakpoint(t.breakpoint), t.asideWidth !== void 0 && e.asideWidth(t.asideWidth), t.drawer !== void 0 && e.drawer(t.drawer), t.viewport !== void 0 && e.viewport(t.viewport), t.safeArea !== void 0 && e.safeArea(t.safeArea);
1360
1682
  }
1361
- function Cr(e, t) {
1362
- e.style("height", B(t.height ?? t.size ?? 60)), e.style("width", "100%");
1683
+ function Hr(e, t) {
1684
+ e.style("height", q(t.height ?? t.size ?? 60)), e.style("width", "100%");
1363
1685
  }
1364
- function wr(e, t) {
1365
- e.style("width", B(t.width ?? t.size ?? 300));
1686
+ function Ur(e, t) {
1687
+ e.style("width", q(t.width ?? t.size ?? 300));
1366
1688
  }
1367
- function Tr(e, t = {}) {
1368
- t.height !== void 0 && e.style("height", B(t.height));
1689
+ function Wr(e, t = {}) {
1690
+ t.height !== void 0 && e.style("height", q(t.height));
1369
1691
  }
1370
- function Er(e) {
1692
+ function Gr(e) {
1371
1693
  if (e != null && e !== !1) return typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : String(e);
1372
1694
  }
1373
- function Dr(e) {
1695
+ function Kr(e) {
1374
1696
  return typeof e == "number" ? `${e}px` : e || "240px";
1375
1697
  }
1376
- function B(e) {
1698
+ function q(e) {
1377
1699
  return typeof e == "number" ? `${e}px` : e;
1378
1700
  }
1379
- function Or(e) {
1701
+ function qr(e) {
1380
1702
  return e ? (Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => ({
1381
1703
  minWidth: e,
1382
1704
  columns: t
@@ -1385,28 +1707,28 @@ function Or(e) {
1385
1707
  minWidth: Number.parseInt(e.minWidth, 10)
1386
1708
  })).filter(({ columns: e, minWidth: t }) => Number.isFinite(t) && e > 0).sort((e, t) => e.minWidth - t.minWidth) : [];
1387
1709
  }
1388
- function V(e) {
1710
+ function Jr(e) {
1389
1711
  if (e === !0) return "wrap";
1390
1712
  if (e !== !1 && e != null) return String(e);
1391
1713
  }
1392
- function kr(e, t = null) {
1393
- let n = t || An;
1714
+ function Yr(e, t = null) {
1715
+ let n = t || Kn;
1394
1716
  return Object.fromEntries(Object.entries(e).filter(([e]) => !n.has(e)));
1395
1717
  }
1396
- function H(e) {
1718
+ function J(e) {
1397
1719
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e != null && e !== !1));
1398
1720
  }
1399
- function U(e) {
1721
+ function Xr(e) {
1400
1722
  return Object.prototype.toString.call(e) === "[object Object]";
1401
1723
  }
1402
1724
  //#endregion
1403
1725
  //#region src/core/client-only.js
1404
- var Ar = class extends c {
1726
+ var Zr = class extends k {
1405
1727
  constructor(e) {
1406
1728
  super(null), this._loader = e, this._resolved = null;
1407
1729
  }
1408
1730
  _resolve() {
1409
- return this._resolved ||= Mr(this._loader), this._resolved;
1731
+ return this._resolved ||= $r(this._loader), this._resolved;
1410
1732
  }
1411
1733
  toHTML() {
1412
1734
  return this._deleted ? "" : "<div class=\"yoya-client-only\" data-client-only=\"true\"></div>";
@@ -1426,21 +1748,21 @@ var Ar = class extends c {
1426
1748
  return this._resolved && this._resolved.destroy(), super.destroy();
1427
1749
  }
1428
1750
  };
1429
- function jr(e) {
1430
- return new Ar(e);
1751
+ function Qr(e) {
1752
+ return new Zr(e);
1431
1753
  }
1432
- function Mr(e) {
1433
- if (e instanceof c) return e;
1434
- if (typeof e == "function") return Mr(e());
1435
- if (e && typeof e.render == "function") return Mr(e.render());
1754
+ function $r(e) {
1755
+ if (e instanceof k) return e;
1756
+ if (typeof e == "function") return $r(e());
1757
+ if (e && typeof e.render == "function") return $r(e.render());
1436
1758
  throw TypeError("vClientOnly loader must return a ViewNode or a component object");
1437
1759
  }
1438
1760
  //#endregion
1439
1761
  //#region src/core/i18n.js
1440
- var Nr = "yoya-ui:i18n", W = /* @__PURE__ */ new Map(), Pr = class {
1762
+ var ei = "yoya-ui:i18n", Y = /* @__PURE__ */ new Map(), ti = class {
1441
1763
  constructor(e = {}) {
1442
1764
  let t = e.language || "zh-CN";
1443
- this._key = e.key || null, this._storage = ei(e.storage), this._storageKey = e.storageKey || null, this._sharedStorageKey = this._key ? Nr : null, this._fallbackLanguage = e.fallbackLanguage || t, this._language = this._readStoredLanguage(t), this._messages = {}, this._listeners = /* @__PURE__ */ new Set(), this.registerMessages(e.messages || {}), this._key && Vr(this);
1765
+ this._key = e.key || null, this._storage = ji(e.storage), this._storageKey = e.storageKey || null, this._sharedStorageKey = this._key ? ei : null, this._fallbackLanguage = e.fallbackLanguage || t, this._language = this._readStoredLanguage(t), this._messages = {}, this._listeners = /* @__PURE__ */ new Set(), this.registerMessages(e.messages || {}), this._key && li(this);
1444
1766
  }
1445
1767
  key() {
1446
1768
  return this._key;
@@ -1460,21 +1782,31 @@ var Nr = "yoya-ui:i18n", W = /* @__PURE__ */ new Map(), Pr = class {
1460
1782
  clearPersistedLanguage() {
1461
1783
  if (!this._storageKey) {
1462
1784
  if (!this._sharedStorageKey) return this;
1463
- let e = Kr(this._storage, this._sharedStorageKey);
1464
- return delete e[this._key], qr(this._storage, this._sharedStorageKey, e), this;
1785
+ let e = mi(this._storage, this._sharedStorageKey);
1786
+ return delete e[this._key], hi(this._storage, this._sharedStorageKey, e), this;
1465
1787
  }
1466
1788
  try {
1467
1789
  this._storage.removeItem(this._storageKey);
1468
1790
  } catch {}
1469
1791
  return this;
1470
1792
  }
1793
+ registerLocale(e, t) {
1794
+ if (!e || typeof t != "function") return Promise.reject(/* @__PURE__ */ TypeError("registerLocale requires a language name and a loader"));
1795
+ let n;
1796
+ try {
1797
+ n = t();
1798
+ } catch (e) {
1799
+ return Promise.reject(e);
1800
+ }
1801
+ return Promise.resolve(n).then((t) => (this.register(e, t || {}), this));
1802
+ }
1471
1803
  register(e, t = {}) {
1472
- return e ? ($r(t).forEach((t) => {
1473
- this._messages[e] = Xr(this._messages[e] || {}, t);
1804
+ return e ? (Ai(t).forEach((t) => {
1805
+ this._messages[e] = Di(this._messages[e] || {}, t);
1474
1806
  }), this._notify(), this) : this;
1475
1807
  }
1476
1808
  registerMessages(e = {}) {
1477
- return Qr(e).forEach((e) => {
1809
+ return ki(e).forEach((e) => {
1478
1810
  if (e.language) {
1479
1811
  this.register(e.language, e.messages || {});
1480
1812
  return;
@@ -1485,11 +1817,11 @@ var Nr = "yoya-ui:i18n", W = /* @__PURE__ */ new Map(), Pr = class {
1485
1817
  }), this;
1486
1818
  }
1487
1819
  t(e, t = {}, n = void 0) {
1488
- let r = Jr(this._messages[this._language], e) ?? Jr(this._messages[this._fallbackLanguage], e) ?? n ?? e;
1489
- return Yr(typeof r == "function" ? r(t, this) : r, t);
1820
+ let r = gi(this._messages[this._language], e) ?? gi(this._messages[this._fallbackLanguage], e) ?? n ?? e;
1821
+ return _i(typeof r == "function" ? r(t, this) : r, t, this);
1490
1822
  }
1491
1823
  text(e, t = {}, n = void 0) {
1492
- return new Fr(this, e, t, n);
1824
+ return new ni(this, e, t, n);
1493
1825
  }
1494
1826
  subscribe(e) {
1495
1827
  return this._listeners.add(e), () => {
@@ -1502,7 +1834,7 @@ var Nr = "yoya-ui:i18n", W = /* @__PURE__ */ new Map(), Pr = class {
1502
1834
  } catch {
1503
1835
  return e;
1504
1836
  }
1505
- return this._sharedStorageKey && Kr(this._storage, this._sharedStorageKey)[this._key] || e;
1837
+ return this._sharedStorageKey && mi(this._storage, this._sharedStorageKey)[this._key] || e;
1506
1838
  }
1507
1839
  _persistLanguage() {
1508
1840
  if (this._storageKey) {
@@ -1512,14 +1844,14 @@ var Nr = "yoya-ui:i18n", W = /* @__PURE__ */ new Map(), Pr = class {
1512
1844
  return;
1513
1845
  }
1514
1846
  if (this._sharedStorageKey) {
1515
- let e = Kr(this._storage, this._sharedStorageKey);
1516
- e[this._key] = this._language, qr(this._storage, this._sharedStorageKey, e);
1847
+ let e = mi(this._storage, this._sharedStorageKey);
1848
+ e[this._key] = this._language, hi(this._storage, this._sharedStorageKey, e);
1517
1849
  }
1518
1850
  }
1519
1851
  _notify() {
1520
1852
  this._listeners.forEach((e) => e(this));
1521
1853
  }
1522
- }, Fr = class extends l {
1854
+ }, ni = class extends A {
1523
1855
  constructor(e, t, n = {}, r = void 0) {
1524
1856
  super(e.t(t, n, r)), this._i18n = e, this._key = t, this._params = n || {}, this._defaultValue = r, this._unsubscribe = e.subscribe(() => this.refresh());
1525
1857
  }
@@ -1539,16 +1871,16 @@ var Nr = "yoya-ui:i18n", W = /* @__PURE__ */ new Map(), Pr = class {
1539
1871
  return this._unsubscribe &&= (this._unsubscribe(), null), super.destroy();
1540
1872
  }
1541
1873
  };
1542
- function Ir(e = {}) {
1543
- return new Pr(e);
1874
+ function ri(e = {}) {
1875
+ return new ti(e);
1544
1876
  }
1545
- var G = Ir();
1546
- function Lr(e, t = {}) {
1547
- return G.text(e, t);
1877
+ var ii = ri();
1878
+ function ai(e, t = {}) {
1879
+ return ii.text(e, t);
1548
1880
  }
1549
- var K = G;
1550
- function Rr(e = G) {
1551
- return K = e, String.prototype._yoyaUiStringShortcutInstalled ? e : (Object.defineProperty(String.prototype, "_yoyaUiStringShortcutInstalled", {
1881
+ var X = ii;
1882
+ function oi(e = ii) {
1883
+ return X = e, String.prototype._yoyaUiStringShortcutInstalled ? e : (Object.defineProperty(String.prototype, "_yoyaUiStringShortcutInstalled", {
1552
1884
  configurable: !0,
1553
1885
  enumerable: !1,
1554
1886
  value: !0
@@ -1556,43 +1888,43 @@ function Rr(e = G) {
1556
1888
  configurable: !0,
1557
1889
  enumerable: !1,
1558
1890
  value: function(e, t, n) {
1559
- let r = String(this), i = {}, a = K;
1560
- return Br(t) ? a = t : typeof t == "string" ? a = Ur(t) || K : (i = t || {}, Br(n) ? a = n : typeof n == "string" && (a = Ur(n) || K)), a.text(e || r, i, r);
1891
+ let r = String(this), i = {}, a = X;
1892
+ return ci(t) ? a = t : typeof t == "string" ? a = di(t) || X : (i = t || {}, ci(n) ? a = n : typeof n == "string" && (a = di(n) || X)), a.text(e || r, i, r);
1561
1893
  }
1562
1894
  }), e);
1563
1895
  }
1564
- function zr(e, t) {
1565
- let n = K;
1566
- K = e || n;
1896
+ function si(e, t) {
1897
+ let n = X;
1898
+ X = e || n;
1567
1899
  try {
1568
1900
  return t();
1569
1901
  } finally {
1570
- K = n;
1902
+ X = n;
1571
1903
  }
1572
1904
  }
1573
- function Br(e) {
1905
+ function ci(e) {
1574
1906
  return !!(e && typeof e.text == "function");
1575
1907
  }
1576
- function Vr(e) {
1908
+ function li(e) {
1577
1909
  let t = e?.key?.();
1578
- return t ? (W.set(t, e), () => {
1579
- W.get(t) === e && W.delete(t);
1910
+ return t ? (Y.set(t, e), () => {
1911
+ Y.get(t) === e && Y.delete(t);
1580
1912
  }) : () => {};
1581
1913
  }
1582
- function Hr(e) {
1914
+ function ui(e) {
1583
1915
  let t = typeof e == "string" ? e : e?.key?.();
1584
- return t && W.delete(t), t;
1916
+ return t && Y.delete(t), t;
1585
1917
  }
1586
- function Ur(e) {
1587
- return e && W.get(e) || null;
1918
+ function di(e) {
1919
+ return e && Y.get(e) || null;
1588
1920
  }
1589
- function Wr() {
1590
- return new Map(W);
1921
+ function fi() {
1922
+ return new Map(Y);
1591
1923
  }
1592
- function Gr(e) {
1593
- return Kr(e || ei(), Nr);
1924
+ function pi(e) {
1925
+ return mi(e || ji(), ei);
1594
1926
  }
1595
- function Kr(e, t) {
1927
+ function mi(e, t) {
1596
1928
  if (!e) return {};
1597
1929
  try {
1598
1930
  let n = e.getItem(t);
@@ -1603,97 +1935,242 @@ function Kr(e, t) {
1603
1935
  return {};
1604
1936
  }
1605
1937
  }
1606
- function qr(e, t, n) {
1938
+ function hi(e, t, n) {
1607
1939
  if (e) try {
1608
1940
  e.setItem(t, JSON.stringify(n));
1609
1941
  } catch {}
1610
1942
  }
1611
- Rr(G);
1612
- function Jr(e, t) {
1943
+ oi(ii);
1944
+ function gi(e, t) {
1613
1945
  if (!(!e || !t)) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : String(t).split(".").reduce((e, t) => {
1614
1946
  if (e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
1615
1947
  }, e);
1616
1948
  }
1617
- function Yr(e, t) {
1618
- return String(e).replace(/\{([^{}]+)\}/g, (e, n) => {
1619
- let r = t?.[n.trim()];
1620
- return r == null ? e : String(r);
1621
- });
1949
+ function _i(e, t, n) {
1950
+ let r = String(e), i = [], a = 0;
1951
+ for (; a < r.length;) {
1952
+ let e = r.charAt(a);
1953
+ if (e === "{") {
1954
+ let e = vi(r, a), o = r.slice(a + 1, e).trim();
1955
+ i.push(yi(o, t, n, r.slice(a, e + 1))), a = e + 1;
1956
+ } else i.push(e), a += 1;
1957
+ }
1958
+ return i.join("");
1959
+ }
1960
+ function vi(e, t) {
1961
+ let n = 0;
1962
+ for (let r = t; r < e.length; r += 1) {
1963
+ let t = e.charAt(r);
1964
+ if (t === "{") n += 1;
1965
+ else if (t === "}" && (--n, n === 0)) return r;
1966
+ }
1967
+ return e.length - 1;
1968
+ }
1969
+ function yi(e, t, n, r) {
1970
+ let i = bi(e);
1971
+ if (i.length === 1) return xi(t, i[0], r);
1972
+ let [a, o, ...s] = i, c = xi(t, a, void 0);
1973
+ if (c == null) return r;
1974
+ let l = n?.getLanguage?.() || "zh-CN";
1975
+ if (/^number$/i.test(o || "")) return wi(c, l);
1976
+ if (/^date$/i.test(o || "")) return Ei(c, l, s[0]);
1977
+ if (/^plural$/i.test(o || "")) {
1978
+ let e = Ci(c, l), a = Si(i.slice(2).join(","));
1979
+ return _i(a[`=${c}`] ?? a[e] ?? a.other ?? r, t, n);
1980
+ }
1981
+ return r;
1982
+ }
1983
+ function bi(e) {
1984
+ let t = [], n = 0, r = "";
1985
+ for (let i of String(e)) i === "{" ? n += 1 : i === "}" && --n, i === "," && n === 0 ? (t.push(r.trim()), r = "") : r += i;
1986
+ return r && t.push(r.trim()), t;
1987
+ }
1988
+ function xi(e, t, n) {
1989
+ let r = e?.[t];
1990
+ return r === void 0 ? n : r;
1991
+ }
1992
+ function Si(e) {
1993
+ let t = {}, n = /([^\s{}]+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g, r;
1994
+ for (; r = n.exec(e);) t[r[1].trim()] = r[2].trim();
1995
+ return t;
1996
+ }
1997
+ function Ci(e, t) {
1998
+ let n = Number(e);
1999
+ if (typeof Intl > "u" || typeof Intl.PluralRules != "function") return n === 1 ? "one" : "other";
2000
+ try {
2001
+ return new Intl.PluralRules(t).select(n);
2002
+ } catch {
2003
+ return n === 1 ? "one" : "other";
2004
+ }
2005
+ }
2006
+ function wi(e, t) {
2007
+ if (typeof Intl > "u" || typeof Intl.NumberFormat != "function") return String(e);
2008
+ try {
2009
+ return new Intl.NumberFormat(t).format(e);
2010
+ } catch {
2011
+ return String(e);
2012
+ }
2013
+ }
2014
+ var Ti = /* @__PURE__ */ new Set([
2015
+ "full",
2016
+ "long",
2017
+ "medium",
2018
+ "short"
2019
+ ]);
2020
+ function Ei(e, t, n = "medium") {
2021
+ if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return String(e);
2022
+ try {
2023
+ return new Intl.DateTimeFormat(t, { dateStyle: Ti.has(n) ? n : "medium" }).format(new Date(e));
2024
+ } catch {
2025
+ return String(e);
2026
+ }
1622
2027
  }
1623
- function Xr(e, t) {
2028
+ function Di(e, t) {
1624
2029
  let n = { ...e };
1625
2030
  return Object.entries(t || {}).forEach(([e, t]) => {
1626
- Zr(t) && Zr(n[e]) ? n[e] = Xr(n[e], t) : n[e] = t;
2031
+ Oi(t) && Oi(n[e]) ? n[e] = Di(n[e], t) : n[e] = t;
1627
2032
  }), n;
1628
2033
  }
1629
- function Zr(e) {
2034
+ function Oi(e) {
1630
2035
  return Object.prototype.toString.call(e) === "[object Object]";
1631
2036
  }
1632
- function Qr(e) {
1633
- return Array.isArray(e) ? e.flatMap((e) => Qr(e)) : [e || {}];
2037
+ function ki(e) {
2038
+ return Array.isArray(e) ? e.flatMap((e) => ki(e)) : [e || {}];
1634
2039
  }
1635
- function $r(e) {
1636
- return Array.isArray(e) ? e.flatMap((e) => $r(e)) : [e || {}];
2040
+ function Ai(e) {
2041
+ return Array.isArray(e) ? e.flatMap((e) => Ai(e)) : [e || {}];
1637
2042
  }
1638
- function ei(e) {
2043
+ function ji(e) {
1639
2044
  if (e) return e;
1640
2045
  try {
1641
2046
  if (typeof globalThis < "u" && globalThis.localStorage) return globalThis.localStorage;
1642
2047
  } catch {}
1643
- return ni();
2048
+ return Ni();
1644
2049
  }
1645
- var ti = /* @__PURE__ */ new Map();
1646
- function ni() {
2050
+ var Mi = /* @__PURE__ */ new Map();
2051
+ function Ni() {
1647
2052
  return {
1648
2053
  getItem(e) {
1649
- return ti.has(e) ? ti.get(e) : null;
2054
+ return Mi.has(e) ? Mi.get(e) : null;
1650
2055
  },
1651
2056
  setItem(e, t) {
1652
- ti.set(e, String(t));
2057
+ Mi.set(e, String(t));
1653
2058
  },
1654
2059
  removeItem(e) {
1655
- ti.delete(e);
2060
+ Mi.delete(e);
1656
2061
  }
1657
2062
  };
1658
2063
  }
1659
2064
  //#endregion
2065
+ //#region src/core/context.js
2066
+ var Pi = [], Z = null;
2067
+ function Fi(e, t) {
2068
+ if (!e || typeof e != "object") return t();
2069
+ Pi.push(e);
2070
+ try {
2071
+ return t();
2072
+ } finally {
2073
+ Pi.pop();
2074
+ }
2075
+ }
2076
+ function Ii(e) {
2077
+ return Z = e && typeof e == "object" ? e : null, Z;
2078
+ }
2079
+ function Li() {
2080
+ return Z = null, null;
2081
+ }
2082
+ function Ri(e, t = void 0) {
2083
+ for (let t = Pi.length - 1; t >= 0; --t) {
2084
+ let n = Pi[t];
2085
+ if (n && Object.prototype.hasOwnProperty.call(n, e)) return n[e];
2086
+ }
2087
+ return Z && Object.prototype.hasOwnProperty.call(Z, e) ? Z[e] : t;
2088
+ }
2089
+ function zi() {
2090
+ let e = { ...Z || {} };
2091
+ return Pi.forEach((t) => Object.assign(e, t)), e;
2092
+ }
2093
+ //#endregion
2094
+ //#region src/core/devtools.js
2095
+ var Bi = !1, Vi = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new Map(), Ui = 1;
2096
+ function Wi() {
2097
+ return Bi;
2098
+ }
2099
+ function Gi(e) {}
2100
+ function Ki(e) {
2101
+ let t = Vi.get(e);
2102
+ return t === void 0 && (t = Ui, Ui += 1, Vi.set(e, t)), Hi.set(t, e), t;
2103
+ }
2104
+ function qi(e) {
2105
+ let t = Vi.get(e);
2106
+ t !== void 0 && Hi.delete(t);
2107
+ }
2108
+ function Ji(e) {
2109
+ let t = zi();
2110
+ e._devtoolsContext = Object.keys(t).length > 0 ? t : null;
2111
+ }
2112
+ function Yi(e) {
2113
+ return Ki(e);
2114
+ }
2115
+ function Xi(e, t, n) {}
2116
+ function Zi(e) {}
2117
+ var Qi = Symbol.for("yoya.devtools.bridge");
2118
+ function $i() {
2119
+ typeof globalThis > "u" || (globalThis[Qi] = {
2120
+ captureScope: Ji,
2121
+ commit: Zi,
2122
+ emit: Gi,
2123
+ enabled: () => Bi,
2124
+ ensureId: Yi,
2125
+ notify: Xi,
2126
+ unregister: qi
2127
+ });
2128
+ }
2129
+ $i();
2130
+ //#endregion
1660
2131
  //#region src/core/state-node.js
1661
- var ri = /* @__PURE__ */ new Set([
2132
+ var ea = /* @__PURE__ */ new Set([
1662
2133
  "state",
1663
2134
  "render",
1664
2135
  "update"
1665
- ]), ii = /* @__PURE__ */ new Set([
2136
+ ]), ta = /* @__PURE__ */ new Set([
2137
+ "_attachHost",
1666
2138
  "destroy",
1667
2139
  "getState",
1668
2140
  "setState",
1669
2141
  "subscribe"
1670
2142
  ]);
1671
- function ai(e = {}) {
2143
+ function na(e = {}) {
1672
2144
  if (typeof e.render != "function") throw TypeError("vStateNode requires a render function");
1673
- let t = typeof e.state == "function" ? e.state() : { ...e.state || {} }, n = /* @__PURE__ */ new Set(), r = !1, i = null, a = {
2145
+ let t = typeof e.state == "function" ? e.state() : { ...e.state || {} }, n = /* @__PURE__ */ new Set(), r = !1, i = null, a = null, o = [], s = {
2146
+ _attachHost(e) {
2147
+ return a = e, s;
2148
+ },
1674
2149
  destroy() {
1675
- return r ? a : (r = !0, n.clear(), i && i.destroy(), a);
2150
+ if (r) return s;
2151
+ if (r = !0, o = [], n.clear(), a = null, i) {
2152
+ let e = i;
2153
+ i = null, e.forEach((e) => e.destroy());
2154
+ }
2155
+ return s;
1676
2156
  },
1677
2157
  getState() {
1678
- return a.state();
2158
+ return s.state();
1679
2159
  },
1680
2160
  render() {
1681
- if (r) return i;
1682
- if (!i) {
1683
- i = new h("div");
1684
- let e = i.destroy.bind(i);
1685
- i.destroy = () => (n.clear(), e()), o();
1686
- }
1687
- return i;
2161
+ return r || i || c(), l();
1688
2162
  },
1689
2163
  setState(e) {
1690
- if (r || e == null) return a;
1691
- let o = typeof e == "function" ? e({ ...t }) : e;
1692
- if (!o || typeof o != "object") return a;
1693
- let c = /* @__PURE__ */ new Set();
1694
- return Object.entries(o).forEach(([e, n]) => {
1695
- t[e] !== n && (t[e] = n, c.add(e));
1696
- }), c.size > 0 && (i && s(c), n.forEach((e) => e(t, a))), a;
2164
+ if (r || e == null) return s;
2165
+ let a = typeof e == "function" ? e({ ...t }) : e;
2166
+ if (!a || typeof a != "object") return s;
2167
+ let o = /* @__PURE__ */ new Set(), c = Wi() ? {} : null;
2168
+ return Object.entries(a).forEach(([e, n]) => {
2169
+ t[e] !== n && (c && (c[e] = {
2170
+ from: t[e],
2171
+ to: n
2172
+ }), t[e] = n, o.add(e));
2173
+ }), o.size > 0 && (i && d(o), n.forEach((e) => e(t, s)), Wi() && c && { ...t }), s;
1697
2174
  },
1698
2175
  state() {
1699
2176
  return { ...t };
@@ -1703,91 +2180,173 @@ function ai(e = {}) {
1703
2180
  return n.add(e), () => n.delete(e);
1704
2181
  }
1705
2182
  };
1706
- for (let t of Object.keys(e)) if (!(ri.has(t) || typeof e[t] != "function")) {
1707
- if (ii.has(t)) throw TypeError(`vStateNode config key "${t}" conflicts with the built-in API`);
1708
- a[t] = e[t];
1709
- }
1710
- return a;
1711
- function o() {
1712
- let n = e.render.call(a, t, a);
1713
- i.clearChildren().child(n), i._el && i.commit();
1714
- }
1715
- function s(n) {
1716
- if (typeof e.update == "function") {
1717
- e.update.call(a, t, a, n) === !0 && o();
2183
+ for (let t of Object.keys(e)) if (!(ea.has(t) || typeof e[t] != "function")) {
2184
+ if (ta.has(t)) throw TypeError(`vStateNode config key "${t}" conflicts with the built-in API`);
2185
+ s[t] = e[t];
2186
+ }
2187
+ return s;
2188
+ function c() {
2189
+ let n = i || [];
2190
+ o = [];
2191
+ let r = w({
2192
+ bindings: o,
2193
+ getState: () => t
2194
+ }, () => e.render.call(s, t, s)), c = Array.isArray(r) ? r.slice() : [r];
2195
+ if (c.forEach((e) => {
2196
+ if (!(e instanceof k)) throw TypeError("vStateNode render must return a ViewNode or an array of ViewNodes");
2197
+ }), i = c, u(), a) {
2198
+ a._replaceResolved(l());
1718
2199
  return;
1719
2200
  }
1720
- o();
2201
+ if (n.length > 0) {
2202
+ let e = n.length === 1 ? n[0] : null;
2203
+ if (e && e._el && e._el.parentNode && c.length === 1) {
2204
+ let t = c[0].renderDom();
2205
+ t && e._el.parentNode.replaceChild(t, e._el);
2206
+ }
2207
+ n.forEach((e) => e.destroy());
2208
+ }
2209
+ }
2210
+ function l() {
2211
+ return i ? i.length === 1 ? i[0] : i : null;
2212
+ }
2213
+ function u() {
2214
+ o.forEach((e) => {
2215
+ let t = e.evaluate();
2216
+ (!e.committed || !Object.is(t, e.last)) && (e.committed = !0, e.last = t, e.commit(t));
2217
+ });
1721
2218
  }
2219
+ function d(n) {
2220
+ return typeof e.update == "function" ? e.update.call(s, t, s, n) === !0 ? (c(), "rebuild") : o.length > 0 ? (u(), "bindings") : "update" : o.length > 0 ? (u(), "bindings") : (c(), "rebuild");
2221
+ }
2222
+ }
2223
+ F(P, { vStateNode: na });
2224
+ //#endregion
2225
+ //#region src/core/a11y.js
2226
+ var ra = [
2227
+ "a[href]",
2228
+ "button:not([disabled])",
2229
+ "input:not([disabled])",
2230
+ "select:not([disabled])",
2231
+ "textarea:not([disabled])",
2232
+ "[tabindex]:not([tabindex=\"-1\"])"
2233
+ ].join(", "), ia = "data-yoya-live";
2234
+ function aa(e) {
2235
+ return !e || typeof e.querySelectorAll != "function" ? [] : Array.from(e.querySelectorAll(ra)).filter((e) => e.getAttribute && e.getAttribute("tabindex") !== "-1");
2236
+ }
2237
+ function oa(e, t = {}) {
2238
+ let { onEscape: n = null, restoreFocus: r = !0 } = t;
2239
+ if (typeof document > "u" || !e) return {
2240
+ activate() {},
2241
+ destroy() {}
2242
+ };
2243
+ let i = !1, a = null, o = null, s = (t) => {
2244
+ if (!i) return;
2245
+ if (t.key === "Escape") {
2246
+ n && n(t);
2247
+ return;
2248
+ }
2249
+ if (t.key !== "Tab") return;
2250
+ let r = aa(e);
2251
+ if (r.length === 0) {
2252
+ t.preventDefault();
2253
+ return;
2254
+ }
2255
+ let a = document.activeElement, o = r.indexOf(a), s;
2256
+ s = t.shiftKey ? o <= 0 ? r.length - 1 : o - 1 : o === -1 || o === r.length - 1 ? 0 : o + 1, t.preventDefault(), r[s].focus();
2257
+ };
2258
+ return {
2259
+ activate: () => {
2260
+ if (i) return;
2261
+ i = !0, a = document.activeElement, o = L("keydown", s);
2262
+ let t = aa(e)[0];
2263
+ t && t.focus();
2264
+ },
2265
+ destroy: () => {
2266
+ i && (i = !1, o &&= (o(), null), r && a && typeof a.isConnected == "boolean" && a.isConnected && typeof a.focus == "function" && a.focus());
2267
+ }
2268
+ };
2269
+ }
2270
+ function sa(e, t = {}) {
2271
+ if (typeof document > "u") return null;
2272
+ let { politeness: n = "polite", dedupeKey: r = "yoya-announce" } = t, i = document.querySelector(`[${ia}="${r}"]`);
2273
+ return i || (i = document.createElement("div"), i.setAttribute(ia, r), i.setAttribute("aria-live", n), i.setAttribute("aria-atomic", "true"), i.className = "yoya-a11y-live", i.style.cssText = "position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0;margin:-1px;", document.body.appendChild(i)), i.textContent = "", queueMicrotask(() => {
2274
+ i.textContent = String(e);
2275
+ }), i;
2276
+ }
2277
+ function ca({ key: e, items: t, currentIndex: n = -1, shiftKey: r = !1 }) {
2278
+ let i = t?.length || 0;
2279
+ if (i === 0) return -1;
2280
+ let a = i - 1, o = n >= 0 && n < i ? n : -1;
2281
+ return e === "Home" ? 0 : e === "End" ? a : e === "ArrowDown" ? r ? -1 : o === a ? 0 : o + 1 : e === "ArrowUp" ? r || o <= 0 ? a : o - 1 : o;
1722
2282
  }
1723
- _(h, { vStateNode: ai });
1724
2283
  //#endregion
1725
2284
  //#region src/core/theme.js
1726
- var oi = [
2285
+ var la = [
1727
2286
  "light",
1728
2287
  "dark",
1729
2288
  "system"
1730
- ], si = "yoya-theme-mode", ci = "yoya-theme-name";
1731
- function li() {
2289
+ ], ua = "yoya-theme-mode", da = "yoya-theme-name";
2290
+ function fa() {
1732
2291
  return typeof document > "u" ? null : document.documentElement;
1733
2292
  }
1734
- function q() {
2293
+ function pa() {
1735
2294
  try {
1736
2295
  return typeof localStorage < "u" && localStorage !== null;
1737
2296
  } catch {
1738
2297
  return !1;
1739
2298
  }
1740
2299
  }
1741
- function ui(e = "light", t = {}) {
1742
- let n = oi.includes(e) ? e : "light", r = li();
1743
- if (r && (r.dataset.yoyaMode = n), t.persist && q()) try {
1744
- localStorage.setItem(si, n);
2300
+ function ma(e = "light", t = {}) {
2301
+ let n = la.includes(e) ? e : "light", r = fa();
2302
+ if (r && (r.dataset.yoyaMode = n), t.persist && pa()) try {
2303
+ localStorage.setItem(ua, n);
1745
2304
  } catch {}
1746
2305
  return n;
1747
2306
  }
1748
- function di() {
1749
- let e = li(), t = e && e.dataset.yoyaMode;
1750
- return oi.includes(t) ? t : "light";
2307
+ function ha() {
2308
+ let e = fa(), t = e && e.dataset.yoyaMode;
2309
+ return la.includes(t) ? t : "light";
1751
2310
  }
1752
- function fi() {
1753
- let e = di();
2311
+ function ga() {
2312
+ let e = ha();
1754
2313
  return e === "system" ? typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
1755
2314
  }
1756
- function pi(e = "", t = {}) {
1757
- let n = li();
2315
+ function _a(e = "", t = {}) {
2316
+ let n = fa();
1758
2317
  if (!e) {
1759
- if (n && delete n.dataset.yoyaTheme, t.persist && q()) try {
1760
- localStorage.removeItem(ci);
2318
+ if (n && delete n.dataset.yoyaTheme, t.persist && pa()) try {
2319
+ localStorage.removeItem(da);
1761
2320
  } catch {}
1762
2321
  return "";
1763
2322
  }
1764
- if (n && (n.dataset.yoyaTheme = e), t.persist && q()) try {
1765
- localStorage.setItem(ci, e);
2323
+ if (n && (n.dataset.yoyaTheme = e), t.persist && pa()) try {
2324
+ localStorage.setItem(da, e);
1766
2325
  } catch {}
1767
2326
  return e;
1768
2327
  }
1769
- function mi() {
1770
- let e = li();
2328
+ function va() {
2329
+ let e = fa();
1771
2330
  return e && e.dataset.yoyaTheme || "";
1772
2331
  }
1773
- function hi(e = {}) {
2332
+ function ya(e = {}) {
1774
2333
  let t = e.mode, n = e.theme;
1775
- if (t === void 0 && q()) {
1776
- let e = localStorage.getItem(si);
1777
- oi.includes(e) && (t = e);
2334
+ if (t === void 0 && pa()) {
2335
+ let e = localStorage.getItem(ua);
2336
+ la.includes(e) && (t = e);
1778
2337
  }
1779
- return n === void 0 && q() && (n = localStorage.getItem(ci) || ""), t !== void 0 && ui(t, { persist: e.persist }), n !== void 0 && pi(n, { persist: e.persist }), {
1780
- mode: di(),
1781
- theme: mi()
2338
+ return n === void 0 && pa() && (n = localStorage.getItem(da) || ""), t !== void 0 && ma(t, { persist: e.persist }), n !== void 0 && _a(n, { persist: e.persist }), {
2339
+ mode: ha(),
2340
+ theme: va()
1782
2341
  };
1783
2342
  }
1784
2343
  //#endregion
1785
2344
  //#region src/core/request.js
1786
- var gi = null;
1787
- function _i({ submit: e } = {}) {
1788
- return gi = typeof e == "function" ? e : null, gi;
2345
+ var ba = null;
2346
+ function xa({ submit: e } = {}) {
2347
+ return ba = typeof e == "function" ? e : null, ba;
1789
2348
  }
1790
- var vi = class {
2349
+ var Sa = class {
1791
2350
  method() {
1792
2351
  return "GET";
1793
2352
  }
@@ -1807,10 +2366,10 @@ var vi = class {
1807
2366
  return "";
1808
2367
  }
1809
2368
  submit() {
1810
- if (typeof gi != "function") throw Error("RequestBase: 未注册请求传输,请先 configureRequest({ submit })");
1811
- return gi(this);
2369
+ if (typeof ba != "function") throw Error("RequestBase: 未注册请求传输,请先 configureRequest({ submit })");
2370
+ return ba(this);
1812
2371
  }
1813
- }, yi = class e {
2372
+ }, Ca = class e {
1814
2373
  constructor({ ok: e = !0, code: t = "0", msg: n = null, showType: r = 0, data: i = null, kind: a = "detail", pageNum: o = null, pageSize: s = null, total: c = null } = {}) {
1815
2374
  this.ok = e, this.code = t, this.msg = n, this.showType = r, this.data = i, this.kind = a, this.pageNum = o, this.pageSize = s, this.total = c;
1816
2375
  }
@@ -1838,16 +2397,16 @@ var vi = class {
1838
2397
  total: t.total
1839
2398
  });
1840
2399
  }
1841
- }, J = 8, bi = null;
1842
- function xi() {
1843
- bi ||= rn(".yoya-vrouter-views-titlebar,\n.yoya-vrouter-views-popup {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.yoya-vrouter-views-titlebar::-webkit-scrollbar,\n.yoya-vrouter-views-popup::-webkit-scrollbar {\n display: none;\n height: 0;\n width: 0;\n}\n.yoya-vrouter-views-popup-item:hover {\n background: var(--yoya-color-surface-hover, #eef3f9);\n}\n.yoya-vrouter-views-popup-item[aria-current='true'] {\n background: var(--yoya-color-primary-subtle, #e8f0fe);\n color: var(--yoya-color-primary, #1f6feb);\n}\n.yoya-vrouter-views-popup-close {\n color: var(--yoya-color-text-secondary, #57606a);\n opacity: 0.65;\n}\n.yoya-vrouter-views-popup-item:hover .yoya-vrouter-views-popup-close,\n.yoya-vrouter-views-popup-close:hover {\n color: var(--yoya-color-text-danger, #b91c1c);\n opacity: 1;\n}\n.yoya-vrouter-views-context-item:hover {\n background: var(--yoya-color-surface-hover, #f6f8fa);\n}\n.yoya-vrouter-views-context-separator {\n background: var(--yoya-color-border, #d0d7de);\n height: 1px;\n margin: 4px 6px;\n}", "data-yoya-vrouter-views-popup-style");
2400
+ }, wa = 8, Ta = null;
2401
+ function Ea() {
2402
+ Ta ||= bn(".yoya-vrouter-views-titlebar,\n.yoya-vrouter-views-popup {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.yoya-vrouter-views-titlebar::-webkit-scrollbar,\n.yoya-vrouter-views-popup::-webkit-scrollbar {\n display: none;\n height: 0;\n width: 0;\n}\n.yoya-vrouter-views-popup-item:hover {\n background: var(--yoya-color-surface-hover, #eef3f9);\n}\n.yoya-vrouter-views-popup-item[aria-current='true'] {\n background: var(--yoya-color-primary-subtle, #e8f0fe);\n color: var(--yoya-color-primary, #1f6feb);\n}\n.yoya-vrouter-views-popup-close {\n color: var(--yoya-color-text-secondary, #57606a);\n opacity: 0.65;\n}\n.yoya-vrouter-views-popup-item:hover .yoya-vrouter-views-popup-close,\n.yoya-vrouter-views-popup-close:hover {\n color: var(--yoya-color-text-danger, #b91c1c);\n opacity: 1;\n}\n.yoya-vrouter-views-context-item:hover {\n background: var(--yoya-color-surface-hover, #f6f8fa);\n}\n.yoya-vrouter-views-context-separator {\n background: var(--yoya-color-border, #d0d7de);\n height: 1px;\n margin: 4px 6px;\n}", "data-yoya-vrouter-views-popup-style");
1844
2403
  }
1845
- function Si(e) {
2404
+ function Da(e) {
1846
2405
  let t = [e._defaultPath || "/", e._routes.map((e) => e.pattern).join("|")].join("::"), n = 0;
1847
2406
  for (let e = 0; e < t.length; e += 1) n = n * 31 + t.charCodeAt(e) | 0;
1848
2407
  return `yoya-ui:router-views:${(n >>> 0).toString(36)}`;
1849
2408
  }
1850
- function Ci(e) {
2409
+ function Oa(e) {
1851
2410
  if (typeof localStorage > "u") return null;
1852
2411
  try {
1853
2412
  let t = JSON.parse(localStorage.getItem(e) || "null");
@@ -1856,7 +2415,7 @@ function Ci(e) {
1856
2415
  return null;
1857
2416
  }
1858
2417
  }
1859
- var wi = class extends h {
2418
+ var ka = class extends P {
1860
2419
  constructor(e = null) {
1861
2420
  super("div"), this._routes = [], this._defaultPath = null, this._notFoundView = null, this._beforeEach = null, this._currentPath = "/", this._currentParams = {}, this._currentQuery = {}, this._currentRoute = null, this._currentView = null, this._loadingView = null, this._errorView = null, this._navigationGeneration = 0, this._outlet = this, this._subscribers = /* @__PURE__ */ new Set(), this._ignoreNextHashPath = null, this._mode = "hash", this._started = !1, this._onHashChange = () => this._handleHashChange(), this._onPopState = () => this._handlePopState(), this.attr("data-yoya-router", ""), e !== null && this.setup(e);
1862
2421
  }
@@ -1864,7 +2423,7 @@ var wi = class extends h {
1864
2423
  return typeof e == "function" ? (e(this), this) : super.setup(e);
1865
2424
  }
1866
2425
  default(e) {
1867
- return this._defaultPath = Z(e), this;
2426
+ return this._defaultPath = $(e), this;
1868
2427
  }
1869
2428
  mode(e) {
1870
2429
  if (e === void 0) return this._mode;
@@ -1874,7 +2433,7 @@ var wi = class extends h {
1874
2433
  return n && this.stop(), this._mode = t, n && this.start(), this;
1875
2434
  }
1876
2435
  route(e, t) {
1877
- let n = Mi(e, t);
2436
+ let n = La(e, t);
1878
2437
  return this._routes.push(n), this;
1879
2438
  }
1880
2439
  notFound(e) {
@@ -1890,19 +2449,19 @@ var wi = class extends h {
1890
2449
  return this._beforeEach = e, this;
1891
2450
  }
1892
2451
  start() {
1893
- this._started ||= (this._stopListening = this._mode === "history" ? O("popstate", this._onPopState) : O("hashchange", this._onHashChange), !0);
1894
- let e = Ji(this._mode);
2452
+ this._started ||= (this._stopListening = this._mode === "history" ? R("popstate", this._onPopState) : R("hashchange", this._onHashChange), !0);
2453
+ let e = eo(this._mode);
1895
2454
  return (this._mode === "history" ? e === "/" || e === "/index.html" : !window.location.hash) && this._defaultPath ? this.navigate(this._defaultPath, { replace: !0 }) : this.refresh();
1896
2455
  }
1897
2456
  stop() {
1898
2457
  return this._started &&= (this._stopListening?.(), this._stopListening = null, !1), this;
1899
2458
  }
1900
2459
  navigate(e, t = {}) {
1901
- let n = Z(e), r = this._resolve(n);
1902
- return this._canEnter(r.context) ? (Xi(n, t, this._mode) && !t.replace && this._mode === "hash" && (this._ignoreNextHashPath = n), this._renderResolved(r), this) : this;
2460
+ let n = $(e), r = this._resolve(n);
2461
+ return this._canEnter(r.context) ? (no(n, t, this._mode) && !t.replace && this._mode === "hash" && (this._ignoreNextHashPath = n), this._renderResolved(r), this) : this;
1903
2462
  }
1904
2463
  refresh() {
1905
- let e = Ji(this._mode), t = this._resolve(e);
2464
+ let e = eo(this._mode), t = this._resolve(e);
1906
2465
  return this._canEnter(t.context) && this._renderResolved(t), this;
1907
2466
  }
1908
2467
  renderPath(e) {
@@ -1926,7 +2485,7 @@ var wi = class extends h {
1926
2485
  }
1927
2486
  outlet(e) {
1928
2487
  if (e === void 0) return this._outlet;
1929
- if (!(e instanceof h)) throw TypeError("Router outlet must be an ElementNode");
2488
+ if (!(e instanceof P)) throw TypeError("Router outlet must be an ElementNode");
1930
2489
  return this._outlet = e, this;
1931
2490
  }
1932
2491
  subscribe(e) {
@@ -1948,16 +2507,16 @@ var wi = class extends h {
1948
2507
  _resolve(e) {
1949
2508
  let t = this._routes.map((t) => ({
1950
2509
  route: t,
1951
- match: Gi(t.pattern, e)
2510
+ match: Za(t.pattern, e)
1952
2511
  })).find(({ match: e }) => e);
1953
2512
  if (t) return {
1954
- context: Ki(this, e, t.route, t.match),
2513
+ context: Qa(this, e, t.route, t.match),
1955
2514
  route: t.route,
1956
2515
  view: t.route.view
1957
2516
  };
1958
- let n = Q(e);
2517
+ let n = io(e);
1959
2518
  return {
1960
- context: Ki(this, e, null, {
2519
+ context: Qa(this, e, null, {
1961
2520
  params: {},
1962
2521
  pathname: n.pathname,
1963
2522
  query: n.query
@@ -1967,7 +2526,7 @@ var wi = class extends h {
1967
2526
  };
1968
2527
  }
1969
2528
  _handleHashChange() {
1970
- let e = qi();
2529
+ let e = $a();
1971
2530
  return this._ignoreNextHashPath === e ? (this._ignoreNextHashPath = null, this) : (this._ignoreNextHashPath = null, e === this._currentPath ? this : this.refresh());
1972
2531
  }
1973
2532
  _handlePopState() {
@@ -1984,8 +2543,8 @@ var wi = class extends h {
1984
2543
  }
1985
2544
  _renderResolved(e) {
1986
2545
  let { context: t, route: n, view: r } = e, i = typeof r == "function" ? r(t) : r;
1987
- if (this._navigationGeneration += 1, !Ui(i)) {
1988
- this._commitView(e, X(i, t));
2546
+ if (this._navigationGeneration += 1, !Ya(i)) {
2547
+ this._commitView(e, Q(i, t));
1989
2548
  return;
1990
2549
  }
1991
2550
  let a = this._navigationGeneration;
@@ -1993,7 +2552,7 @@ var wi = class extends h {
1993
2552
  if (a !== this._navigationGeneration || this._deleted) return r;
1994
2553
  let i;
1995
2554
  try {
1996
- i = X(r, t);
2555
+ i = Q(r, t);
1997
2556
  } catch (i) {
1998
2557
  return this._commitView(e, this._buildErrorView(n, t, i)), r;
1999
2558
  }
@@ -2005,59 +2564,59 @@ var wi = class extends h {
2005
2564
  this._destroyCurrentView(), i._children = [], i._el && i._el.replaceChildren(), i.child(t), this._currentPath = n.path, this._currentParams = n.params, this._currentQuery = n.query, this._currentRoute = r, this._currentView = t, this._subscribers.forEach((e) => e(n, this));
2006
2565
  }
2007
2566
  _buildLoadingView(e, t) {
2008
- return Wi(e?.loading ?? this._loadingView ?? Vi, [t]);
2567
+ return Xa(e?.loading ?? this._loadingView ?? qa, [t]);
2009
2568
  }
2010
2569
  _buildErrorView(e, t, n) {
2011
- return Wi(e?.error ?? this._errorView ?? Hi, [n, t]);
2570
+ return Xa(e?.error ?? this._errorView ?? Ja, [n, t]);
2012
2571
  }
2013
2572
  _destroyCurrentView() {
2014
2573
  this._currentView?.destroy && this._currentView.destroy(), this._currentView = null;
2015
2574
  }
2016
2575
  };
2017
- function Ti(e = null, t = null, n = null) {
2018
- let r = p(e, t, n), i = new wi(r.first);
2019
- return m(i, r.options), typeof r.callback == "function" && r.callback(i), i;
2576
+ function Aa(e = null, t = null, n = null) {
2577
+ let r = oe(e, t, n), i = new ka(r.first);
2578
+ return N(i, r.options), typeof r.callback == "function" && r.callback(i), i;
2020
2579
  }
2021
- var Ei = Ti;
2022
- function Di(e, t) {
2580
+ var ja = Aa;
2581
+ function Ma(e, t) {
2023
2582
  return {
2024
2583
  config: t,
2025
2584
  pattern: e
2026
2585
  };
2027
2586
  }
2028
- function Oi(e = null, t = null, n = null) {
2029
- let r = p(e, t, n), i = new wi();
2030
- return i.vRoute = (e, t) => (i.route(e, t), i), Fi(i, r.first), m(i, r.options), typeof r.callback == "function" && r.callback(i), i;
2587
+ function Na(e = null, t = null, n = null) {
2588
+ let r = oe(e, t, n), i = new ka();
2589
+ return i.vRoute = (e, t) => (i.route(e, t), i), Ba(i, r.first), N(i, r.options), typeof r.callback == "function" && r.callback(i), i;
2031
2590
  }
2032
- function ki(e, t = null, n = null) {
2033
- Ni(e);
2034
- let r = new h("a"), i = {
2591
+ function Pa(e, t = null, n = null) {
2592
+ Ra(e);
2593
+ let r = new P("a"), i = {
2035
2594
  exact: !0,
2036
2595
  label: null,
2037
2596
  params: {},
2038
2597
  query: {},
2039
2598
  replace: !1,
2040
2599
  to: "/"
2041
- }, a = new h("span").className("yoya-vlink-label");
2042
- r.className("yoya-vlink"), r.attr("data-router-link", "true"), r.child(a), r.to = (e) => Y(r, i, "to", e), r.params = (e) => Y(r, i, "params", e || {}), r.query = (e) => Y(r, i, "query", e || {}), r.replace = (e) => Y(r, i, "replace", !!e), r.exact = (e) => Y(r, i, "exact", !!e), r.label = (e) => e === void 0 ? i.label : (i.label = e, N(a, bn(e)), r), Ii(r, i, t), Li(r, i, e), r.on("click", (t) => {
2043
- Bi(t, r) && (t.preventDefault(), e.navigate(Ri(i.to, i.params, i.query), { replace: i.replace }));
2600
+ }, a = new P("span").className("yoya-vlink-label");
2601
+ r.className("yoya-vlink"), r.attr("data-router-link", "true"), r.child(a), r.to = (e) => Ha(r, i, "to", e), r.params = (e) => Ha(r, i, "params", e || {}), r.query = (e) => Ha(r, i, "query", e || {}), r.replace = (e) => Ha(r, i, "replace", !!e), r.exact = (e) => Ha(r, i, "exact", !!e), r.label = (e) => e === void 0 ? i.label : (i.label = e, U(a, In(e)), r), Va(r, i, t), Ua(r, i, e), r.on("click", (t) => {
2602
+ Ka(t, r) && (t.preventDefault(), e.navigate(Wa(i.to, i.params, i.query), { replace: i.replace }));
2044
2603
  });
2045
- let o = e.subscribe(() => Li(r, i, e)), s = r.destroy.bind(r);
2604
+ let o = e.subscribe(() => Ua(r, i, e)), s = r.destroy.bind(r);
2046
2605
  return r.destroy = () => (o(), s()), typeof n == "function" && n(r), r;
2047
2606
  }
2048
- function Ai(e, t = null, n = null) {
2049
- Ni(e);
2050
- let r = new h("div");
2607
+ function Fa(e, t = null, n = null) {
2608
+ Ra(e);
2609
+ let r = new P("div");
2051
2610
  r.className("yoya-vrouter-view"), r.attr("data-router-view", "true"), typeof t == "function" ? t(r) : t && r.setup(t), e.outlet(r);
2052
2611
  let i = r.destroy.bind(r);
2053
2612
  return r.destroy = () => (e.outlet() === r && e.outlet(e), i()), typeof n == "function" && n(r), r;
2054
2613
  }
2055
- function ji(e, t = null, n = null) {
2056
- Ni(e);
2057
- let r = new h("div"), i = new h("header").className("yoya-vrouter-views-titlebar").attr({
2614
+ function Ia(e, t = null, n = null) {
2615
+ Ra(e);
2616
+ let r = new P("div"), i = new P("header").className("yoya-vrouter-views-titlebar").attr({
2058
2617
  role: "tablist",
2059
2618
  "aria-label": "已打开页面"
2060
- }), a = new h("div").className("yoya-vrouter-views-content"), o = d("⋯"), s = new h("button").className("yoya-vrouter-views-expand").attr({
2619
+ }), a = new P("div").className("yoya-vrouter-views-content"), o = M("⋯"), s = new P("button").className("yoya-vrouter-views-expand").attr({
2061
2620
  type: "button",
2062
2621
  "aria-expanded": "false",
2063
2622
  "aria-label": "展开全部标签"
@@ -2065,7 +2624,7 @@ function ji(e, t = null, n = null) {
2065
2624
  alignItems: "center",
2066
2625
  background: "transparent",
2067
2626
  border: "0",
2068
- color: k("color-text-secondary", "#57606a"),
2627
+ color: z("color-text-secondary", "#57606a"),
2069
2628
  cursor: "pointer",
2070
2629
  display: "none",
2071
2630
  flexShrink: "0",
@@ -2081,12 +2640,12 @@ function ji(e, t = null, n = null) {
2081
2640
  position: "sticky",
2082
2641
  right: "8px",
2083
2642
  zIndex: "2"
2084
- }).child(o), c = new h("div").className("yoya-vrouter-views-popup").attr({
2643
+ }).child(o), c = new P("div").className("yoya-vrouter-views-popup").attr({
2085
2644
  role: "menu",
2086
2645
  "aria-label": "已打开页面"
2087
2646
  }).styles({
2088
- background: k("color-surface", "#ffffff"),
2089
- border: A("color-border", "#d0d7de"),
2647
+ background: z("color-surface", "#ffffff"),
2648
+ border: B("color-border", "#d0d7de"),
2090
2649
  borderRadius: "8px",
2091
2650
  boxShadow: "0 12px 28px rgba(15, 23, 42, 0.18)",
2092
2651
  display: "none",
@@ -2104,7 +2663,7 @@ function ji(e, t = null, n = null) {
2104
2663
  overflow: !1,
2105
2664
  persist: !0,
2106
2665
  popupOpen: !1,
2107
- storageKey: Si(e),
2666
+ storageKey: Da(e),
2108
2667
  suppressPersist: !1,
2109
2668
  tabs: /* @__PURE__ */ new Map(),
2110
2669
  title: "工作区",
@@ -2112,14 +2671,14 @@ function ji(e, t = null, n = null) {
2112
2671
  titlePosition: "top"
2113
2672
  };
2114
2673
  r.className("yoya-vrouter-views"), r.styles({
2115
- border: A("color-border", "#d0d7de"),
2674
+ border: B("color-border", "#d0d7de"),
2116
2675
  boxSizing: "border-box",
2117
2676
  overflow: "hidden"
2118
2677
  }), i.styles({
2119
- background: k("color-surface-hover", "#f6f8fa"),
2120
- borderBottom: A("color-border", "#d0d7de"),
2678
+ background: z("color-surface-hover", "#f6f8fa"),
2679
+ borderBottom: B("color-border", "#d0d7de"),
2121
2680
  boxSizing: "border-box",
2122
- color: k("color-text-secondary", "#57606a"),
2681
+ color: z("color-text-secondary", "#57606a"),
2123
2682
  display: "flex",
2124
2683
  flexWrap: "nowrap",
2125
2684
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
@@ -2163,24 +2722,24 @@ function ji(e, t = null, n = null) {
2163
2722
  minWidth: e ? "0" : null,
2164
2723
  overflow: null
2165
2724
  });
2166
- }, f = (e) => {
2725
+ }, d = (e) => {
2167
2726
  let t = e !== "top";
2168
2727
  r.styles({
2169
2728
  alignItems: t ? "stretch" : null,
2170
2729
  display: t ? "flex" : null
2171
2730
  }), i.styles({
2172
- background: k("color-surface-hover", "#f6f8fa"),
2173
- borderBottom: t ? null : A("color-border", "#d0d7de"),
2731
+ background: z("color-surface-hover", "#f6f8fa"),
2732
+ borderBottom: t ? null : B("color-border", "#d0d7de"),
2174
2733
  borderLeft: e === "right" ? "1px solid" : null,
2175
- borderLeftColor: e === "right" ? k("color-border", "#d0d7de") : null,
2734
+ borderLeftColor: e === "right" ? z("color-border", "#d0d7de") : null,
2176
2735
  borderLeftStyle: e === "right" ? "solid" : null,
2177
2736
  borderLeftWidth: e === "right" ? "1px" : null,
2178
2737
  borderRight: e === "left" ? "1px solid" : null,
2179
- borderRightColor: e === "left" ? k("color-border", "#d0d7de") : null,
2738
+ borderRightColor: e === "left" ? z("color-border", "#d0d7de") : null,
2180
2739
  borderRightStyle: e === "left" ? "solid" : null,
2181
2740
  borderRightWidth: e === "left" ? "1px" : null,
2182
2741
  boxSizing: "border-box",
2183
- color: k("color-text-secondary", "#57606a"),
2742
+ color: z("color-text-secondary", "#57606a"),
2184
2743
  display: "flex",
2185
2744
  flexDirection: t ? "column" : "row",
2186
2745
  flexShrink: t ? "0" : null,
@@ -2211,79 +2770,79 @@ function ji(e, t = null, n = null) {
2211
2770
  let t = e.renderDom();
2212
2771
  t && r._el.appendChild(t);
2213
2772
  }), u();
2214
- }, p = (e = {}) => {
2773
+ }, f = (e = {}) => {
2215
2774
  let t = l.title, n = e.route?.title;
2216
2775
  if (n !== void 0 && (t = typeof n == "function" ? n(e) : n), l.titleResolver) {
2217
2776
  let n = l.titleResolver(e);
2218
2777
  n != null && (t = typeof n == "function" ? n(e) : n);
2219
2778
  }
2220
2779
  return t ?? "";
2221
- }, m = (e, t) => {
2780
+ }, p = (e, t) => {
2222
2781
  let n = e.tab, r = l.titlePosition, i = r !== "top";
2223
2782
  e.label.attr("aria-selected", String(t)), n.styles({
2224
- background: t ? k("color-surface", "#ffffff") : k("color-surface-active", "#eaeef2"),
2225
- border: A("color-border", "#d0d7de"),
2226
- borderBottomColor: r === "top" && t ? k("color-surface", "#ffffff") : k("color-border", "#d0d7de"),
2783
+ background: t ? z("color-surface", "#ffffff") : z("color-surface-active", "#eaeef2"),
2784
+ border: B("color-border", "#d0d7de"),
2785
+ borderBottomColor: r === "top" && t ? z("color-surface", "#ffffff") : z("color-border", "#d0d7de"),
2227
2786
  borderLeftColor: "transparent",
2228
- borderRightColor: r === "left" && t ? k("color-surface", "#ffffff") : k("color-border", "#d0d7de"),
2229
- color: t ? k("color-text", "#24292f") : k("color-text-secondary", "#57606a"),
2787
+ borderRightColor: r === "left" && t ? z("color-surface", "#ffffff") : z("color-border", "#d0d7de"),
2788
+ color: t ? z("color-text", "#24292f") : z("color-text-secondary", "#57606a"),
2230
2789
  fontWeight: t ? "600" : "400",
2231
2790
  marginBottom: r === "top" ? "-9px" : "0",
2232
2791
  marginLeft: r === "right" ? "-9px" : "0",
2233
2792
  marginRight: r === "left" ? "-9px" : "0",
2234
2793
  padding: i ? "8px 10px" : "7px 14px 8px"
2235
2794
  });
2236
- }, g = (e) => {
2795
+ }, m = (e) => {
2237
2796
  l.overflow = !!e, r.attr("data-title-overflow", l.overflow ? "true" : null), s.style("display", l.overflow ? "inline-flex" : "none");
2238
- }, _ = () => {
2239
- if (l.titlePosition !== "top" || l.tabs.size <= J) {
2240
- g(!1);
2797
+ }, h = () => {
2798
+ if (l.titlePosition !== "top" || l.tabs.size <= wa) {
2799
+ m(!1);
2241
2800
  return;
2242
2801
  }
2243
- g(!0);
2244
- }, v = () => {
2245
- let e = Array.from(l.tabs.entries()), t = e.slice(0, J).map(([, e]) => e.tab).filter((e) => e !== s);
2246
- if (!(e.length > J && l.titlePosition === "top")) {
2247
- l.popupOpen && x(), i._children = t, i._childrenDirty = !0, i._el ? i._el.replaceChildren(...t.map((e) => e.renderDom()).filter(Boolean)) : s._el?.remove(), g(!1);
2802
+ m(!0);
2803
+ }, g = () => {
2804
+ let e = Array.from(l.tabs.entries()), t = e.slice(0, wa).map(([, e]) => e.tab).filter((e) => e !== s);
2805
+ if (!(e.length > wa && l.titlePosition === "top")) {
2806
+ l.popupOpen && y(), i._children = t, i._childrenDirty = !0, i._el ? i._el.replaceChildren(...t.map((e) => e.renderDom()).filter(Boolean)) : s._el?.remove(), m(!1);
2248
2807
  return;
2249
2808
  }
2250
2809
  if (i._children = [...t, s], i._childrenDirty = !0, i._el) {
2251
2810
  let e = t.map((e) => e.renderDom()).filter(Boolean);
2252
2811
  i._el.replaceChildren(...e, s.renderDom());
2253
2812
  }
2254
- _();
2255
- }, y = () => {
2813
+ h();
2814
+ }, _ = () => {
2256
2815
  if (!(!l.persist || l.suppressPersist || typeof localStorage > "u")) try {
2257
2816
  localStorage.setItem(l.storageKey, JSON.stringify({
2258
2817
  activePath: e.currentPath(),
2259
2818
  paths: Array.from(l.tabs.keys())
2260
2819
  }));
2261
2820
  } catch {}
2262
- }, b = null, x = () => {
2263
- l.popupOpen = !1, r.attr("data-title-popup", null), s.attr("aria-expanded", "false"), c.style("display", "none"), b &&= (b(), null);
2264
- }, S = () => {
2265
- c.clearChildren(), c._el && c._el.replaceChildren(), Array.from(l.tabs.entries()).slice(J).forEach(([t, n]) => {
2266
- let r = n.text.textContent(), i = new h("div").className("yoya-vrouter-views-popup-item").attr({
2821
+ }, v = null, y = () => {
2822
+ l.popupOpen = !1, r.attr("data-title-popup", null), s.attr("aria-expanded", "false"), c.style("display", "none"), v &&= (v(), null);
2823
+ }, b = () => {
2824
+ c.clearChildren(), c._el && c._el.replaceChildren(), Array.from(l.tabs.entries()).slice(wa).forEach(([t, n]) => {
2825
+ let r = n.text.textContent(), i = new P("div").className("yoya-vrouter-views-popup-item").attr({
2267
2826
  role: "menuitem",
2268
2827
  tabIndex: "0",
2269
2828
  "data-router-view-path": t
2270
2829
  }).styles({
2271
2830
  alignItems: "center",
2272
2831
  borderRadius: "6px",
2273
- color: k("color-text", "#24292f"),
2832
+ color: z("color-text", "#24292f"),
2274
2833
  cursor: "pointer",
2275
2834
  display: "flex",
2276
2835
  fontSize: "13px",
2277
2836
  gap: "8px",
2278
2837
  padding: "7px 8px",
2279
2838
  width: "100%"
2280
- }), a = new h("span").className("yoya-vrouter-views-popup-title").styles({
2839
+ }), a = new P("span").className("yoya-vrouter-views-popup-title").styles({
2281
2840
  flex: "1",
2282
2841
  minWidth: "0",
2283
2842
  overflow: "hidden",
2284
2843
  textOverflow: "ellipsis",
2285
2844
  whiteSpace: "nowrap"
2286
- }).text(r), o = new h("button").className("yoya-vrouter-views-popup-close").attr({
2845
+ }).text(r), o = new P("button").className("yoya-vrouter-views-popup-close").attr({
2287
2846
  type: "button",
2288
2847
  "aria-label": `关闭 ${r}`
2289
2848
  }).styles({
@@ -2297,27 +2856,27 @@ function ji(e, t = null, n = null) {
2297
2856
  padding: "2px 4px"
2298
2857
  }).text("×");
2299
2858
  t === e.currentPath() && (i.attr("aria-current", "true"), i.styles({
2300
- background: k("color-primary-subtle", "#e8f0fe"),
2301
- color: k("color-primary", "#1f6feb")
2859
+ background: z("color-primary-subtle", "#e8f0fe"),
2860
+ color: z("color-primary", "#1f6feb")
2302
2861
  }));
2303
2862
  let s = () => {
2304
- x(), e.navigate(t);
2863
+ y(), e.navigate(t);
2305
2864
  };
2306
2865
  i.on("click", s), i.on("keydown", (e) => {
2307
2866
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), s());
2308
2867
  }), o.on("click", (e) => {
2309
- e.stopPropagation(), ne(t, e), l.popupOpen && S();
2868
+ e.stopPropagation(), C(t, e), l.popupOpen && b();
2310
2869
  }), i.child(a, o), c.child(i);
2311
2870
  });
2312
- }, ee = () => {
2871
+ }, x = () => {
2313
2872
  if (l.tabs.size === 0) return;
2314
- xi(), S(), l.popupOpen = !0, r.attr("data-title-popup", "true"), s.attr("aria-expanded", "true"), c.styles({ display: "block" }), f();
2873
+ Ea(), b(), l.popupOpen = !0, r.attr("data-title-popup", "true"), s.attr("aria-expanded", "true"), c.styles({ display: "block" }), f();
2315
2874
  let e = (e) => {
2316
- !c._el?.contains(e.target) && !s._el?.contains(e.target) && x();
2875
+ !c._el?.contains(e.target) && !s._el?.contains(e.target) && y();
2317
2876
  }, t = (e) => {
2318
- e.key === "Escape" && x();
2319
- }, n = () => f(), i = () => f(), a = D("click", e), o = D("keydown", t), u = O("scroll", n, !0), d = O("resize", i);
2320
- b = () => {
2877
+ e.key === "Escape" && y();
2878
+ }, n = () => f(), i = () => f(), a = L("click", e), o = L("keydown", t), u = R("scroll", n, !0), d = R("resize", i);
2879
+ v = () => {
2321
2880
  a(), o(), u(), d();
2322
2881
  };
2323
2882
  function f() {
@@ -2333,26 +2892,26 @@ function ji(e, t = null, n = null) {
2333
2892
  }
2334
2893
  };
2335
2894
  s.on("click", () => {
2336
- l.popupOpen ? x() : ee();
2895
+ l.popupOpen ? y() : x();
2337
2896
  });
2338
- let te = r.renderDom.bind(r);
2897
+ let S = r.renderDom.bind(r);
2339
2898
  r.renderDom = () => {
2340
- xi();
2341
- let e = te();
2342
- return _(), e;
2343
- }, r.updateOverflow = _, r.titlePosition = (t) => {
2899
+ Ea();
2900
+ let e = S();
2901
+ return h(), e;
2902
+ }, r.updateOverflow = h, r.titlePosition = (t) => {
2344
2903
  if (t === void 0) return l.titlePosition;
2345
- let n = Pi(t);
2346
- return l.titlePosition = n, n !== "top" && l.popupOpen && x(), r.attr("data-title-position", l.titlePosition), i.attr("aria-orientation", l.titlePosition === "top" ? "horizontal" : "vertical"), f(l.titlePosition), v(), l.tabs.forEach((t, n) => {
2347
- m(t, n === e.currentPath());
2348
- }), _(), r;
2349
- }, r.titlePosition(l.titlePosition), r.lockTitle = (e = !0) => e === void 0 ? l.lockTitle : (l.lockTitle = !!e, r.attr("data-title-locked", l.lockTitle ? "true" : null), f(l.titlePosition), _(), r), r.titleLocked = r.lockTitle;
2350
- let ne = (t, n = null) => {
2904
+ let n = za(t);
2905
+ return l.titlePosition = n, n !== "top" && l.popupOpen && y(), r.attr("data-title-position", l.titlePosition), i.attr("aria-orientation", l.titlePosition === "top" ? "horizontal" : "vertical"), d(l.titlePosition), g(), l.tabs.forEach((t, n) => {
2906
+ p(t, n === e.currentPath());
2907
+ }), h(), r;
2908
+ }, r.titlePosition(l.titlePosition), r.lockTitle = (e = !0) => e === void 0 ? l.lockTitle : (l.lockTitle = !!e, r.attr("data-title-locked", l.lockTitle ? "true" : null), d(l.titlePosition), h(), r), r.titleLocked = r.lockTitle;
2909
+ let C = (t, n = null) => {
2351
2910
  n && n.stopPropagation();
2352
2911
  let r = Array.from(l.tabs.entries()).findIndex(([e]) => e === t), o = l.tabs.get(t);
2353
2912
  if (!o) return;
2354
2913
  let s = o.label.attr("aria-selected") === "true";
2355
- if (l.tabs.delete(t), i._children = i.children().filter((e) => e !== o.tab), i._childrenDirty = !0, o.tab.destroy(), v(), y(), !s) return;
2914
+ if (l.tabs.delete(t), i._children = i.children().filter((e) => e !== o.tab), i._childrenDirty = !0, o.tab.destroy(), g(), _(), !s) return;
2356
2915
  let c = Array.from(l.tabs.keys());
2357
2916
  if (c.length > 0) {
2358
2917
  let t = c[Math.min(r, c.length - 1)];
@@ -2360,12 +2919,12 @@ function ji(e, t = null, n = null) {
2360
2919
  return;
2361
2920
  }
2362
2921
  a.clearChildren().commit(), e._navigationGeneration += 1, e._currentView = null;
2363
- }, C = new h("div").className("yoya-vrouter-views-context").attr({
2922
+ }, w = new P("div").className("yoya-vrouter-views-context").attr({
2364
2923
  role: "menu",
2365
2924
  "aria-label": "标签页操作"
2366
2925
  }).styles({
2367
- background: k("color-surface", "#ffffff"),
2368
- border: A("color-border", "#d0d7de"),
2926
+ background: z("color-surface", "#ffffff"),
2927
+ border: B("color-border", "#d0d7de"),
2369
2928
  borderRadius: "8px",
2370
2929
  boxShadow: "0 12px 28px rgba(15, 23, 42, 0.18)",
2371
2930
  display: "none",
@@ -2373,13 +2932,13 @@ function ji(e, t = null, n = null) {
2373
2932
  padding: "6px",
2374
2933
  position: "fixed",
2375
2934
  zIndex: "100"
2376
- }), re = null, w = () => {
2377
- C.styles({ display: "none" }), C.clearChildren(), C._el?.remove(), re &&= (re(), null);
2378
- }, T = (t, n = null) => {
2935
+ }), T = null, E = () => {
2936
+ w.styles({ display: "none" }), w.clearChildren(), w._el?.remove(), T &&= (T(), null);
2937
+ }, D = (t, n = null) => {
2379
2938
  let r = new Set(t), o = Array.from(l.tabs.entries()), s = o.findIndex(([e]) => r.has(e));
2380
2939
  if (o.forEach(([e, t]) => {
2381
2940
  r.has(e) && (l.tabs.delete(e), i._children = i.children().filter((e) => e !== t.tab), i._childrenDirty = !0, t.tab.destroy());
2382
- }), v(), y(), l.popupOpen && S(), !r.has(e.currentPath())) return;
2941
+ }), g(), _(), l.popupOpen && b(), !r.has(e.currentPath())) return;
2383
2942
  let c = Array.from(l.tabs.keys());
2384
2943
  if (c.length === 0) {
2385
2944
  a.clearChildren().commit(), e._navigationGeneration += 1, e._currentView = null;
@@ -2387,20 +2946,20 @@ function ji(e, t = null, n = null) {
2387
2946
  }
2388
2947
  let u = n && l.tabs.has(n) ? n : c[Math.min(Math.max(s, 0), c.length - 1)];
2389
2948
  e.navigate(u, { replace: !0 });
2390
- }, ie = (t) => {
2949
+ }, ee = (t) => {
2391
2950
  if (typeof navigator > "u" || !navigator.clipboard) return;
2392
2951
  let n = typeof window > "u" ? "" : window.location.origin, r = typeof window > "u" ? "" : window.location.pathname, i = e.mode() === "history" ? `${n}${r}${t}` : `${n}${r}#${t}`;
2393
2952
  navigator.clipboard.writeText(i).catch(() => {});
2394
- }, ae = (t, n) => {
2395
- l.popupOpen && x(), w();
2396
- let r = Array.from(l.tabs.entries()), i = r.findIndex(([e]) => e === t), a = () => T(r.filter(([e]) => e !== t).map(([e]) => e), t), o = () => T(r.slice(0, i).map(([e]) => e), t), s = () => T(r.slice(i + 1).map(([e]) => e), t), c = () => T(r.map(([e]) => e)), u = (e, t, n = !1, r = !1) => {
2397
- let i = new h("div").className("yoya-vrouter-views-context-item").attr({
2953
+ }, te = (t, n) => {
2954
+ l.popupOpen && y(), E();
2955
+ let r = Array.from(l.tabs.entries()), i = r.findIndex(([e]) => e === t), a = () => D(r.filter(([e]) => e !== t).map(([e]) => e), t), o = () => D(r.slice(0, i).map(([e]) => e), t), s = () => D(r.slice(i + 1).map(([e]) => e), t), c = () => D(r.map(([e]) => e)), u = (e, t, n = !1, r = !1) => {
2956
+ let i = new P("div").className("yoya-vrouter-views-context-item").attr({
2398
2957
  role: "menuitem",
2399
2958
  tabIndex: "0"
2400
2959
  }).text(e).styles({
2401
2960
  alignItems: "center",
2402
2961
  borderRadius: "6px",
2403
- color: n ? k("color-text-danger", "#b91c1c") : k("color-text", "#24292f"),
2962
+ color: n ? z("color-text-danger", "#b91c1c") : z("color-text", "#24292f"),
2404
2963
  cursor: r ? "default" : "pointer",
2405
2964
  display: "flex",
2406
2965
  fontSize: "13px",
@@ -2409,30 +2968,30 @@ function ji(e, t = null, n = null) {
2409
2968
  width: "100%"
2410
2969
  });
2411
2970
  return r ? (i.attr("aria-disabled", "true"), i.styles({ opacity: "0.4" })) : i.on("click", () => {
2412
- w(), t();
2413
- }), C.child(i), i;
2414
- }, d = () => C.child(new h("div").className("yoya-vrouter-views-context-separator"));
2415
- u("刷新", () => e.navigate(t, { replace: !0 })), u("复制链接", () => ie(t)), d(), u("关闭", () => ne(t), !0), u("关闭其他", a, !1, r.length <= 1), u("关闭左侧", o, !1, i <= 0), u("关闭右侧", s, !1, i === r.length - 1), d(), u("关闭全部", c, !0, r.length === 0), C.bindTo(document.body), C.styles({ display: "block" });
2416
- let f = C._el.getBoundingClientRect(), p = typeof window > "u" ? 0 : window.innerWidth || 0, m = typeof window > "u" ? 0 : window.innerHeight || 0, g = Math.max(8, Math.min(n.clientX || 0, p - f.width - 8)), _ = Math.max(8, Math.min(n.clientY || 0, m - f.height - 8));
2417
- C.styles({
2418
- left: `${g}px`,
2419
- top: `${_}px`
2971
+ E(), t();
2972
+ }), w.child(i), i;
2973
+ }, d = () => w.child(new P("div").className("yoya-vrouter-views-context-separator"));
2974
+ u("刷新", () => e.navigate(t, { replace: !0 })), u("复制链接", () => ee(t)), d(), u("关闭", () => C(t), !0), u("关闭其他", a, !1, r.length <= 1), u("关闭左侧", o, !1, i <= 0), u("关闭右侧", s, !1, i === r.length - 1), d(), u("关闭全部", c, !0, r.length === 0), w.bindTo(document.body), w.styles({ display: "block" });
2975
+ let f = w._el.getBoundingClientRect(), p = typeof window > "u" ? 0 : window.innerWidth || 0, m = typeof window > "u" ? 0 : window.innerHeight || 0, h = Math.max(8, Math.min(n.clientX || 0, p - f.width - 8)), g = Math.max(8, Math.min(n.clientY || 0, m - f.height - 8));
2976
+ w.styles({
2977
+ left: `${h}px`,
2978
+ top: `${g}px`
2420
2979
  });
2421
- let v = (e) => {
2422
- C._el?.contains(e.target) || w();
2423
- }, y = (e) => {
2424
- e.key === "Escape" && w();
2425
- }, b = () => w(), S = D("mousedown", v), ee = D("keydown", y), te = O("scroll", b, !0), ae = O("resize", b);
2426
- re = () => {
2427
- S(), ee(), te(), ae();
2980
+ let _ = (e) => {
2981
+ w._el?.contains(e.target) || E();
2982
+ }, v = (e) => {
2983
+ e.key === "Escape" && E();
2984
+ }, b = () => E(), x = L("mousedown", _), S = L("keydown", v), te = R("scroll", b, !0), O = R("resize", b);
2985
+ T = () => {
2986
+ x(), S(), te(), O();
2428
2987
  };
2429
- }, E = (t = {}) => {
2430
- let n = t.path || e.currentPath(), r = new Set(l.titlePosition === "top" ? Array.from(l.tabs.keys()).slice(0, J) : Array.from(l.tabs.keys())), a = l.tabs.get(n);
2988
+ }, O = (t = {}) => {
2989
+ let n = t.path || e.currentPath(), r = new Set(l.titlePosition === "top" ? Array.from(l.tabs.keys()).slice(0, wa) : Array.from(l.tabs.keys())), a = l.tabs.get(n);
2431
2990
  if (a) {
2432
- let e = p(t);
2991
+ let e = f(t);
2433
2992
  a.text.textContent(e), a.closeButton.attr("aria-label", `关闭 ${e}`);
2434
2993
  } else {
2435
- let r = new h("div").className("yoya-vrouter-views-title"), o = d(p(t)), s = new h("button").className("yoya-vrouter-views-label").child(o), c = new h("button").className("yoya-vrouter-views-close");
2994
+ let r = new P("div").className("yoya-vrouter-views-title"), o = M(f(t)), s = new P("button").className("yoya-vrouter-views-label").child(o), c = new P("button").className("yoya-vrouter-views-close");
2436
2995
  r.attr({ "data-router-view-path": n }), r.styles({
2437
2996
  alignItems: "center",
2438
2997
  cursor: "pointer",
@@ -2452,7 +3011,7 @@ function ji(e, t = null, n = null) {
2452
3011
  padding: "0"
2453
3012
  }), s.on("click", () => e.navigate(n)), c.attr({
2454
3013
  type: "button",
2455
- "aria-label": `关闭 ${p(t)}`
3014
+ "aria-label": `关闭 ${f(t)}`
2456
3015
  }), c.styles({
2457
3016
  background: "transparent",
2458
3017
  border: "0",
@@ -2461,31 +3020,31 @@ function ji(e, t = null, n = null) {
2461
3020
  font: "inherit",
2462
3021
  lineHeight: "1",
2463
3022
  padding: "0"
2464
- }), c.text("×"), c.on("click", (e) => ne(n, e)), r.on("contextmenu", (e) => {
2465
- e.preventDefault(), e.stopPropagation(), ae(n, e);
3023
+ }), c.text("×"), c.on("click", (e) => C(n, e)), r.on("contextmenu", (e) => {
3024
+ e.preventDefault(), e.stopPropagation(), te(n, e);
2466
3025
  }), r.child(s, c), i.child(r), a = {
2467
3026
  closeButton: c,
2468
3027
  label: s,
2469
3028
  tab: r,
2470
3029
  text: o
2471
- }, l.tabs.set(n, a), m(a, !1);
3030
+ }, l.tabs.set(n, a), p(a, !1);
2472
3031
  }
2473
- r.has(n) || (l.tabs.delete(n), l.tabs = new Map([[n, a], ...l.tabs])), l.tabs.forEach((e, t) => m(e, t === n)), v(), l.popupOpen && S(), y();
2474
- }, oe = () => {
3032
+ r.has(n) || (l.tabs.delete(n), l.tabs = new Map([[n, a], ...l.tabs])), l.tabs.forEach((e, t) => p(e, t === n)), g(), l.popupOpen && b(), _();
3033
+ }, ne = () => {
2475
3034
  if (!l.persist) return;
2476
- let t = Ci(l.storageKey);
3035
+ let t = Oa(l.storageKey);
2477
3036
  if (t) {
2478
3037
  l.suppressPersist = !0;
2479
3038
  try {
2480
3039
  t.paths.slice().reverse().forEach((t) => {
2481
3040
  let n = e._resolve(t);
2482
- E({
3041
+ O({
2483
3042
  ...n.context,
2484
3043
  path: t
2485
3044
  });
2486
3045
  });
2487
3046
  } finally {
2488
- l.suppressPersist = !1, y();
3047
+ l.suppressPersist = !1, _();
2489
3048
  }
2490
3049
  }
2491
3050
  };
@@ -2494,40 +3053,40 @@ function ji(e, t = null, n = null) {
2494
3053
  let { persist: e, storageKey: n, title: i, titlePosition: a, titleResolver: o, ...s } = t;
2495
3054
  i !== void 0 && (l.title = i), e !== void 0 && (l.persist = !!e), n !== void 0 && (l.storageKey = n), a !== void 0 && r.titlePosition(a), typeof o == "function" && (l.titleResolver = o), Object.keys(s).length > 0 && r.setup(s);
2496
3055
  }
2497
- e.outlet(a), oe(), (e.currentRoute() || e.currentPath() !== "/") && E({
3056
+ e.outlet(a), ne(), (e.currentRoute() || e.currentPath() !== "/") && O({
2498
3057
  params: e.currentParams(),
2499
3058
  path: e.currentPath(),
2500
3059
  query: e.currentQuery(),
2501
3060
  route: e.currentRoute(),
2502
3061
  router: e
2503
3062
  });
2504
- let se = e.subscribe((e) => E(e)), ce = O("resize", () => _()), le = r.destroy.bind(r);
2505
- return r.destroy = () => (l.popupOpen && x(), w(), ce(), se(), e.outlet() === a && e.outlet(e), le()), typeof n == "function" && n(r), r;
2506
- }
2507
- _(h, {
2508
- vLink: ki,
2509
- vRouter: Oi,
2510
- vRouterView: Ai,
2511
- vRouterViews: ji
3063
+ let re = e.subscribe((e) => O(e)), ie = R("resize", () => h()), k = r.destroy.bind(r);
3064
+ return r.destroy = () => (l.popupOpen && y(), E(), ie(), re(), e.outlet() === a && e.outlet(e), k()), typeof n == "function" && n(r), r;
3065
+ }
3066
+ F(P, {
3067
+ vLink: Pa,
3068
+ vRouter: Na,
3069
+ vRouterView: Fa,
3070
+ vRouterViews: Ia
2512
3071
  });
2513
- function Mi(e, t) {
3072
+ function La(e, t) {
2514
3073
  let n = {
2515
3074
  beforeEnter: null,
2516
3075
  error: null,
2517
3076
  loading: null,
2518
- pattern: Zi(e),
3077
+ pattern: ro(e),
2519
3078
  title: null,
2520
3079
  view: null
2521
3080
  };
2522
- return typeof t == "function" || t instanceof c || $i(t) ? (n.view = t, n) : (t && typeof t == "object" && (n.beforeEnter = t.beforeEnter || null, n.error = t.error ?? null, n.loading = t.loading ?? null, n.title = t.title ?? null, n.view = t.view || t.component || null), n);
3081
+ return typeof t == "function" || t instanceof k || oo(t) ? (n.view = t, n) : (t && typeof t == "object" && (n.beforeEnter = t.beforeEnter || null, n.error = t.error ?? null, n.loading = t.loading ?? null, n.title = t.title ?? null, n.view = t.view || t.component || null), n);
2523
3082
  }
2524
- function Ni(e) {
2525
- if (!(e instanceof wi)) throw TypeError("vLink and vRouterView require a Router instance");
3083
+ function Ra(e) {
3084
+ if (!(e instanceof ka)) throw TypeError("vLink and vRouterView require a Router instance");
2526
3085
  }
2527
- function Pi(e) {
3086
+ function za(e) {
2528
3087
  return e === "left" || e === "right" ? e : "top";
2529
3088
  }
2530
- function Fi(e, t) {
3089
+ function Ba(e, t) {
2531
3090
  if (typeof t == "function") return t(e), e;
2532
3091
  if (!t || typeof t != "object") return e;
2533
3092
  let { beforeEach: n, default: r, error: i, loading: a, notFound: o, routes: s = [], ...c } = t;
@@ -2535,7 +3094,7 @@ function Fi(e, t) {
2535
3094
  t?.pattern !== void 0 && e.vRoute(t.pattern, t.config);
2536
3095
  }), o !== void 0 && e.notFound(o), e;
2537
3096
  }
2538
- function Ii(e, t, n) {
3097
+ function Va(e, t, n) {
2539
3098
  if (typeof n == "function") {
2540
3099
  n(e);
2541
3100
  return;
@@ -2548,56 +3107,56 @@ function Ii(e, t, n) {
2548
3107
  let { exact: r, label: i, params: a, query: o, replace: s, to: c, ...l } = n;
2549
3108
  Object.keys(l).length && e.setup(l), c !== void 0 && (t.to = c), a !== void 0 && (t.params = a || {}), o !== void 0 && (t.query = o || {}), s !== void 0 && (t.replace = !!s), r !== void 0 && (t.exact = !!r), t.label = i ?? t.to, e.label(t.label);
2550
3109
  }
2551
- function Y(e, t, n, r) {
3110
+ function Ha(e, t, n, r) {
2552
3111
  if (r === void 0) return t[n];
2553
- t[n] = r, n === "to" && t.label === null && N(e.children()[0], bn(r));
3112
+ t[n] = r, n === "to" && t.label === null && U(e.children()[0], In(r));
2554
3113
  let i = e._routerInstance;
2555
- return i && Li(e, t, i), e;
3114
+ return i && Ua(e, t, i), e;
2556
3115
  }
2557
- function Li(e, t, n) {
3116
+ function Ua(e, t, n) {
2558
3117
  e._routerInstance = n;
2559
- let r = Ri(t.to, t.params, t.query), i = zi(n.currentPath(), r, t.exact), a = new Set(String(e.attr("class") || "").split(/\s+/).filter(Boolean));
3118
+ let r = Wa(t.to, t.params, t.query), i = Ga(n.currentPath(), r, t.exact), a = new Set(String(e.attr("class") || "").split(/\s+/).filter(Boolean));
2560
3119
  return a.add("yoya-vlink"), i ? a.add("is-active") : a.delete("is-active"), e.attr({
2561
3120
  "aria-current": i ? "page" : null,
2562
3121
  class: [...a].join(" "),
2563
3122
  href: n.mode() === "history" ? r : `#${r}`
2564
3123
  }), e;
2565
3124
  }
2566
- function Ri(e, t, n) {
2567
- let [r, i = ""] = Z(e).split("?"), a = r.replace(/:([A-Za-z0-9_]+)/g, (e, n) => t[n] === void 0 ? e : encodeURIComponent(t[n])), o = new URLSearchParams(i);
3125
+ function Wa(e, t, n) {
3126
+ let [r, i = ""] = $(e).split("?"), a = r.replace(/:([A-Za-z0-9_]+)/g, (e, n) => t[n] === void 0 ? e : encodeURIComponent(t[n])), o = new URLSearchParams(i);
2568
3127
  Object.entries(n || {}).forEach(([e, t]) => {
2569
3128
  o.delete(e), Array.isArray(t) ? t.forEach((t) => o.append(e, t)) : t != null && o.set(e, t);
2570
3129
  });
2571
3130
  let s = o.toString();
2572
3131
  return s ? `${a}?${s}` : a;
2573
3132
  }
2574
- function zi(e, t, n) {
2575
- let r = Z(e), i = Z(t);
3133
+ function Ga(e, t, n) {
3134
+ let r = $(e), i = $(t);
2576
3135
  if (n) return r === i;
2577
- let a = Q(r).pathname, o = Q(i).pathname;
3136
+ let a = io(r).pathname, o = io(i).pathname;
2578
3137
  return a === o || a.startsWith(`${o}/`);
2579
3138
  }
2580
- function Bi(e, t) {
3139
+ function Ka(e, t) {
2581
3140
  return !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey && (!t.attr("target") || t.attr("target") === "_self");
2582
3141
  }
2583
- function X(e, t) {
2584
- if (e instanceof c) return e;
2585
- if (e == null) return d("");
2586
- if ($i(e)) return d(e);
2587
- if (typeof e == "object" && e && e.default !== void 0 && typeof e.render != "function") return X(e.default, t);
2588
- if (typeof e == "function") return X(e(t), t);
2589
- if (typeof e == "object" && typeof e.render == "function") return X(e.render(), t);
3142
+ function Q(e, t) {
3143
+ if (e instanceof k) return e;
3144
+ if (e == null) return M("");
3145
+ if (oo(e)) return M(e);
3146
+ if (typeof e == "object" && e && e.default !== void 0 && typeof e.render != "function") return Q(e.default, t);
3147
+ if (typeof e == "function") return Q(e(t), t);
3148
+ if (typeof e == "object" && typeof e.render == "function") return Q(e.render(), t);
2590
3149
  throw TypeError("Router route view must be a ViewNode, string, number, null, undefined, a render() component object, a factory returning one, or a module with a default export");
2591
3150
  }
2592
- var Vi = () => "加载中…", Hi = (e) => `加载失败:${e?.message ?? String(e)}`;
2593
- function Ui(e) {
3151
+ var qa = () => "加载中…", Ja = (e) => `加载失败:${e?.message ?? String(e)}`;
3152
+ function Ya(e) {
2594
3153
  return e !== null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
2595
3154
  }
2596
- function Wi(e, t) {
2597
- return X(typeof e == "function" ? e(...t) : e, t[t.length - 1]);
3155
+ function Xa(e, t) {
3156
+ return Q(typeof e == "function" ? e(...t) : e, t[t.length - 1]);
2598
3157
  }
2599
- function Gi(e, t) {
2600
- let n = Q(e), r = Q(t), i = Qi(n.pathname), a = Qi(r.pathname);
3158
+ function Za(e, t) {
3159
+ let n = io(e), r = io(t), i = ao(n.pathname), a = ao(r.pathname);
2601
3160
  if (i.length !== a.length) return null;
2602
3161
  let o = {};
2603
3162
  for (let e = 0; e < i.length; e += 1) {
@@ -2614,7 +3173,7 @@ function Gi(e, t) {
2614
3173
  query: r.query
2615
3174
  };
2616
3175
  }
2617
- function Ki(e, t, n, r) {
3176
+ function Qa(e, t, n, r) {
2618
3177
  return {
2619
3178
  params: { ...r.params },
2620
3179
  path: t,
@@ -2624,68 +3183,68 @@ function Ki(e, t, n, r) {
2624
3183
  router: e
2625
3184
  };
2626
3185
  }
2627
- function qi() {
2628
- return typeof window > "u" ? "/" : Z(window.location.hash.replace(/^#/, "") || "/");
3186
+ function $a() {
3187
+ return typeof window > "u" ? "/" : $(window.location.hash.replace(/^#/, "") || "/");
2629
3188
  }
2630
- function Ji(e = "hash") {
2631
- return typeof window > "u" ? "/" : e === "history" ? Z(`${window.location.pathname}${window.location.search}`) : qi();
3189
+ function eo(e = "hash") {
3190
+ return typeof window > "u" ? "/" : e === "history" ? $(`${window.location.pathname}${window.location.search}`) : $a();
2632
3191
  }
2633
- function Yi(e, t = {}) {
3192
+ function to(e, t = {}) {
2634
3193
  if (typeof window > "u") return !1;
2635
3194
  let n = `#${e}`;
2636
3195
  return t.replace ? (window.history.replaceState(null, "", n), !0) : window.location.hash !== n && (window.location.hash = n, !0);
2637
3196
  }
2638
- function Xi(e, t = {}, n = "hash") {
3197
+ function no(e, t = {}, n = "hash") {
2639
3198
  if (typeof window > "u") return !1;
2640
- if (n !== "history") return Yi(e, t);
2641
- let r = Z(e), i = Ji("history");
3199
+ if (n !== "history") return to(e, t);
3200
+ let r = $(e), i = eo("history");
2642
3201
  return !t.replace && i === r ? !1 : (t.replace ? window.history.replaceState(null, "", r) : window.history.pushState(null, "", r), !0);
2643
3202
  }
2644
- function Zi(e) {
2645
- return Z(e).split("?")[0] || "/";
3203
+ function ro(e) {
3204
+ return $(e).split("?")[0] || "/";
2646
3205
  }
2647
- function Z(e) {
3206
+ function $(e) {
2648
3207
  let [t, n = ""] = String(e || "/").replace(/^#/, "").split("?"), r = t.startsWith("/") ? t : `/${t}`, i = r.length > 1 ? r.replace(/\/+$/, "") : r;
2649
3208
  return n ? `${i}?${n}` : i;
2650
3209
  }
2651
- function Q(e) {
2652
- let [t, n = ""] = Z(e).split("?");
3210
+ function io(e) {
3211
+ let [t, n = ""] = $(e).split("?");
2653
3212
  return {
2654
3213
  pathname: t,
2655
3214
  query: Object.fromEntries(new URLSearchParams(n))
2656
3215
  };
2657
3216
  }
2658
- function Qi(e) {
3217
+ function ao(e) {
2659
3218
  return e.split("/").filter(Boolean);
2660
3219
  }
2661
- function $i(e) {
3220
+ function oo(e) {
2662
3221
  return typeof e == "string" || typeof e == "number";
2663
3222
  }
2664
3223
  //#endregion
2665
3224
  //#region src/core/id.js
2666
- var ea = null;
2667
- function ta() {
3225
+ var so = null;
3226
+ function co() {
2668
3227
  let e = 0;
2669
3228
  return { next() {
2670
3229
  return e += 1, e;
2671
3230
  } };
2672
3231
  }
2673
- function na(e, t) {
2674
- let n = ea;
2675
- ea = e;
3232
+ function lo(e, t) {
3233
+ let n = so;
3234
+ so = e;
2676
3235
  try {
2677
3236
  return t();
2678
3237
  } finally {
2679
- ea = n;
3238
+ so = n;
2680
3239
  }
2681
3240
  }
2682
3241
  //#endregion
2683
3242
  //#region src/core/ssr.js
2684
- function ra(e = {}, t = {}) {
3243
+ function uo(e = {}, t = {}) {
2685
3244
  let { cookie: n = "", url: r = "", acceptLanguage: i = "" } = e || {}, { cookieKey: a = "yoya-lang", queryKey: o = "locale", defaultLanguage: s = "zh-CN" } = t;
2686
- return ia(n, a) || aa(r, o) || oa(i) || s;
3245
+ return fo(n, a) || po(r, o) || mo(i) || s;
2687
3246
  }
2688
- function ia(e, t) {
3247
+ function fo(e, t) {
2689
3248
  if (!e || !t) return null;
2690
3249
  for (let n of String(e).split(";")) {
2691
3250
  let e = n.indexOf("=");
@@ -2700,52 +3259,63 @@ function ia(e, t) {
2700
3259
  }
2701
3260
  return null;
2702
3261
  }
2703
- function aa(e, t) {
3262
+ function po(e, t) {
2704
3263
  if (!e || !t) return null;
2705
3264
  let n = String(e).indexOf("?");
2706
3265
  return n === -1 ? null : new URLSearchParams(String(e).slice(n + 1)).get(t) || null;
2707
3266
  }
2708
- function oa(e) {
3267
+ function mo(e) {
2709
3268
  if (!e) return null;
2710
3269
  let t = String(e).split(",")[0];
2711
3270
  return t && t.split(";")[0].trim() || null;
2712
3271
  }
2713
- function sa(e, t, n) {
2714
- return e ? zr(typeof e == "function" ? e(t) : e, n) : n();
3272
+ function ho(e, t) {
3273
+ return e ? a(typeof e == "function" ? e() : e, t) : t();
3274
+ }
3275
+ function go(e, t, n, r, i) {
3276
+ return ho(e, () => _o(t, r, () => vo(n, r, i)));
2715
3277
  }
2716
- function $(e, t = null) {
2717
- if (e instanceof c) return e;
2718
- if (typeof e == "function") return $(e(t), t);
2719
- if (e && typeof e.render == "function") return $(e.render(), t);
3278
+ function _o(e, t, n) {
3279
+ return e ? Fi(typeof e == "function" ? e(t) : e, n) : n();
3280
+ }
3281
+ function vo(e, t, n) {
3282
+ return e ? si(typeof e == "function" ? e(t) : e, n) : n();
3283
+ }
3284
+ function yo(e, t = null) {
3285
+ if (e instanceof k) return e;
3286
+ if (typeof e == "function") return yo(e(t), t);
3287
+ if (e && typeof e.render == "function") return yo(e.render(), t);
2720
3288
  throw TypeError("renderToString/mount requires a ViewNode, a component object with render(), or a factory function");
2721
3289
  }
2722
- function ca(e) {
3290
+ function bo(e) {
2723
3291
  let t = 1;
2724
3292
  return typeof e.children == "function" && e.children().forEach((e) => {
2725
- t += ca(e instanceof u ? e._resolve() : e);
3293
+ (e instanceof j ? e._resolveList() : [e]).forEach((e) => {
3294
+ t += bo(e);
3295
+ });
2726
3296
  }), t;
2727
3297
  }
2728
- function la(e, t = {}) {
2729
- let { maxNodes: n = Infinity, state: r = null, i18n: i = null } = t || {}, a = ma(r);
2730
- return na(ta(), () => sa(i, r, () => {
2731
- let t = typeof e == "function", i = $(e, r), o;
3298
+ function xo(e, t = {}) {
3299
+ let { access: n = null, context: r = null, maxNodes: i = Infinity, state: a = null, i18n: o = null } = t || {}, s = Eo(a);
3300
+ return lo(co(), () => go(n, r, o, a, () => {
3301
+ let t = typeof e == "function", n = yo(e, a), r;
2732
3302
  try {
2733
- o = ca(i) > n ? {
3303
+ r = bo(n) > i ? {
2734
3304
  exceeded: !0,
2735
3305
  html: "",
2736
- state: a
3306
+ state: s
2737
3307
  } : {
2738
3308
  exceeded: !1,
2739
- html: i.toHTML(),
2740
- state: a
3309
+ html: n.toHTML(),
3310
+ state: s
2741
3311
  };
2742
3312
  } finally {
2743
- t && i.destroy();
3313
+ t && n.destroy();
2744
3314
  }
2745
- return o;
3315
+ return r;
2746
3316
  }));
2747
3317
  }
2748
- var ua = class extends v {
3318
+ var So = class extends I {
2749
3319
  constructor() {
2750
3320
  super("html", null), this._headCallback = null, this._bodyCallback = null;
2751
3321
  }
@@ -2759,98 +3329,116 @@ var ua = class extends v {
2759
3329
  return this.body((t) => t.vBody(...e));
2760
3330
  }
2761
3331
  };
2762
- function da(e) {
3332
+ function Co(e) {
2763
3333
  return String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;");
2764
3334
  }
2765
- function fa(e, t = {}, n = {}) {
2766
- let { client: r = "/client.js", containerId: i = "app", i18n: a = null, maxNodes: o = Infinity, messages: s, stateId: c = "__YOYA_DATA__" } = n || {}, l = t || {};
3335
+ function wo(e, t = {}, n = {}) {
3336
+ let { client: r = "/client.js", containerId: i = "app", access: a = null, context: o = null, i18n: s = null, maxNodes: c = Infinity, messages: l, stateId: u = "__YOYA_DATA__" } = n || {}, d = t || {};
2767
3337
  if (!e || typeof e.page != "function") throw TypeError("renderPage requires { page: (page, state) => {} }");
2768
- let u = a || (s ? () => Ir({
2769
- language: l.lang || "zh-CN",
2770
- messages: s
2771
- }) : null), d = ma(l);
2772
- return na(ta(), () => sa(u, l, () => {
2773
- let t = new ua();
2774
- e.page(t, l);
2775
- let n = new v("head");
2776
- t._headCallback && t._headCallback(n, l);
2777
- let a = new v("body");
2778
- t._bodyCallback && t._bodyCallback(a, l);
2779
- let s = ca(a) > o, u = n.toHTML(), f = `<div id="${da(i)}">`, p = s ? `${f}</div>` : `${f}${a.toHTML()}</div>`, m = `<script type="application/json" id="${da(c)}">${d}<\/script>`, h = `<script type="module" src="${da(r)}"><\/script>`;
3338
+ let f = s || (l ? () => ri({
3339
+ language: d.lang || "zh-CN",
3340
+ messages: l
3341
+ }) : null), p = Eo(d);
3342
+ return lo(co(), () => go(a, o, f, d, () => {
3343
+ let t = new So();
3344
+ e.page(t, d);
3345
+ let n = new I("head");
3346
+ t._headCallback && t._headCallback(n, d);
3347
+ let a = new I("body");
3348
+ t._bodyCallback && t._bodyCallback(a, d);
3349
+ let o = bo(a) > c, s = n.toHTML(), l = `<div id="${Co(i)}">`, f = o ? `${l}</div>` : `${l}${a.toHTML()}</div>`, m = `<script type="application/json" id="${Co(u)}">${p}<\/script>`, h = `<script type="module" src="${Co(r)}"><\/script>`;
2780
3350
  return n.destroy(), a.destroy(), `<!doctype html>
2781
- <html lang="${da(l.lang || "zh-CN")}">
2782
- ${u}
3351
+ <html lang="${Co(d.lang || "zh-CN")}">
3352
+ ${s}
2783
3353
  <body>
2784
- ${p}
3354
+ ${f}
2785
3355
  ${m}
2786
3356
  ${h}
2787
3357
  </body>
2788
3358
  </html>`;
2789
3359
  }));
2790
3360
  }
2791
- function pa(e, t = {}) {
3361
+ function To(e, t = {}) {
2792
3362
  if (typeof document > "u") return null;
2793
- let { messages: r, i18n: i = null, stateId: a = "__YOYA_DATA__", target: o = "#app" } = t || {}, s = document.getElementById(a), c = ha(s ? s.textContent : ""), l = i || (r ? () => Ir({
2794
- language: c?.lang || "zh-CN",
2795
- messages: r
2796
- }) : null), u = n(o);
2797
- return u && u.firstElementChild ? _a(e, o, c, { i18n: l }) : ga(e, o, c, { i18n: l });
3363
+ let { messages: n, i18n: r = null, stateId: i = "__YOYA_DATA__", target: a = "#app" } = t || {}, o = document.getElementById(i), s = Do(o ? o.textContent : ""), c = r || (n ? () => ri({
3364
+ language: s?.lang || "zh-CN",
3365
+ messages: n
3366
+ }) : null), l = D(a);
3367
+ return l && l.firstElementChild ? ko(e, a, s, {
3368
+ access: t.access,
3369
+ context: t.context,
3370
+ i18n: c
3371
+ }) : Oo(e, a, s, {
3372
+ access: t.access,
3373
+ context: t.context,
3374
+ i18n: c
3375
+ });
2798
3376
  }
2799
- function ma(e) {
3377
+ function Eo(e) {
2800
3378
  return e == null ? null : JSON.stringify(e).replace(/</g, "\\u003c");
2801
3379
  }
2802
- function ha(e) {
3380
+ function Do(e) {
2803
3381
  return e == null || e === "" ? null : JSON.parse(e);
2804
3382
  }
2805
- function ga(e, t, r = null, i = {}) {
2806
- return na(ta(), () => sa(i.i18n, r, () => {
2807
- let i = $(e, r), a = n(t);
2808
- return a && (a.replaceChildren(), a.appendChild(i.renderDom())), i;
3383
+ function Oo(e, t, n = null, r = {}) {
3384
+ return lo(co(), () => go(r.access, r.context, r.i18n, n, () => {
3385
+ let r = yo(e, n), i = D(t);
3386
+ return i && (i.replaceChildren(), i.appendChild(r.renderDom())), r;
2809
3387
  }));
2810
3388
  }
2811
- function _a(e, t, r = null, i = {}) {
2812
- return na(ta(), () => sa(i.i18n, r, () => {
2813
- let i = $(e, r), a = n(t);
2814
- if (a) {
2815
- let e = a.firstElementChild;
2816
- e ? (va(i, e), ba(i), ya(i), i.renderDom()) : a.appendChild(i.renderDom());
3389
+ function ko(e, t, n = null, r = {}) {
3390
+ return lo(co(), () => go(r.access, r.context, r.i18n, n, () => {
3391
+ let r = yo(e, n), i = D(t);
3392
+ if (i) {
3393
+ let e = i.firstElementChild;
3394
+ e ? (Ao(r, e), Mo(r), jo(r), r.renderDom()) : i.appendChild(r.renderDom());
2817
3395
  }
2818
- return i;
3396
+ return r;
2819
3397
  }));
2820
3398
  }
2821
- function va(e, t) {
2822
- if (e instanceof u) {
2823
- va(e._resolve(), t);
3399
+ function Ao(e, t) {
3400
+ if (e instanceof j) {
3401
+ let n = e._resolveList();
3402
+ if (n.length === 1) {
3403
+ Ao(n[0], t);
3404
+ return;
3405
+ }
3406
+ let r = t ? Array.from(t.childNodes) : [];
3407
+ n.forEach((e, t) => Ao(e, r[t]));
2824
3408
  return;
2825
3409
  }
2826
- if (e instanceof l) {
2827
- t && t.nodeType === 3 ? (e._textNode = t, e._el = t, t.textContent !== e._content && (t.textContent = e._content)) : xa(t, e.renderDom());
3410
+ if (e instanceof A) {
3411
+ t && t.nodeType === 3 ? (e._textNode = t, e._el = t, t.textContent !== e._content && (t.textContent = e._content)) : No(t, e.renderDom());
2828
3412
  return;
2829
3413
  }
2830
3414
  if (t && t.nodeType === 1 && t.tagName.toLowerCase() === e._tagName) {
2831
3415
  e._el = t, e._hydrated = !0;
2832
- let n = Array.from(t.childNodes);
2833
- e.children().forEach((e, t) => va(e, n[t]));
3416
+ let n = Array.from(t.childNodes), r = 0;
3417
+ e.children().forEach((e) => {
3418
+ (e instanceof j ? e._resolveList() : [e]).forEach((e) => {
3419
+ Ao(e, n[r]), r += 1;
3420
+ });
3421
+ });
2834
3422
  return;
2835
3423
  }
2836
- xa(t, e.renderDom());
3424
+ No(t, e.renderDom());
2837
3425
  }
2838
- function ya(e) {
2839
- if (e instanceof u) {
2840
- ya(e._resolve());
3426
+ function jo(e) {
3427
+ if (e instanceof j) {
3428
+ e._resolveList().forEach((e) => jo(e));
2841
3429
  return;
2842
3430
  }
2843
- e instanceof l || (e._el && e._hydrated && e._applyBindingsToElement(), e.children().forEach(ya));
3431
+ e instanceof A || (e._el && e._hydrated && e._applyBindingsToElement(), e.children().forEach(jo));
2844
3432
  }
2845
- function ba(e) {
2846
- if (e instanceof u) {
2847
- ba(e._resolve());
3433
+ function Mo(e) {
3434
+ if (e instanceof j) {
3435
+ e._resolveList().forEach((e) => Mo(e));
2848
3436
  return;
2849
3437
  }
2850
- e instanceof l || (e.children().forEach(ba), typeof e.hydrateSnapshot == "function" && e.hydrateSnapshot());
3438
+ e instanceof A || (e.children().forEach(Mo), typeof e.hydrateSnapshot == "function" && e.hydrateSnapshot());
2851
3439
  }
2852
- function xa(e, t) {
3440
+ function No(e, t) {
2853
3441
  e && e.parentNode && e.parentNode.replaceChild(t, e);
2854
3442
  }
2855
3443
  //#endregion
2856
- export { Ar as ClientOnlyNode, u as ComponentNode, h as ElementNode, v as HtmlElementNode, Pr as I18n, Fr as I18nTextNode, ua as PageDocumentNode, vi as RequestBase, yi as Result, wi as Router, l as TextNode, l as VTextNode, l as ViewTextNode, En as VMasonry, Sn as VSplitPanel, On as VThemeShell, c as ViewNode, S as a, ee as abbr, te as address, m as applyElementOptions, ne as area, C as article, re as aside, w as audio, T as b, ie as base, ae as bdi, E as bdo, D as bindDocumentEvent, O as bindWindowEvent, oe as blockquote, se as body, ce as br, le as button, ue as canvas, de as caption, In as center, fe as cite, pe as code, me as col, he as colgroup, _i as configureRequest, Wn as container, g as createElementFactory, b as createHtmlFactories, Ir as createI18n, Ti as createRouter, Hn as createVBodyPage, ge as data, _e as datalist, ve as dd, ye as del, be as details, xe as dfn, Se as dialog, Ce as div, $n as divider, we as dl, Te as dt, Ee as em, De as embed, r as escapeHtml, Oe as fieldset, ke as figcaption, Ae as figure, Mn as flex, je as footer, Me as form, Ur as getI18n, Gr as getPersistedI18nLocales, di as getYoyaMode, mi as getYoyaTheme, zn as grid, Ne as h1, Pe as h2, Fe as h3, Ie as h4, Le as h5, Re as h6, ze as head, Be as header, Ve as hgroup, He as hr, Fn as hstack, Ue as html, _a as hydrate, pa as hydrateOrMount, We as i, G as i18n, Lr as i18nText, Ge as iframe, Ke as img, hi as initYoyaTheme, rn as injectDocumentStyle, qe as input, Je as ins, Rr as installI18nStringShortcut, Ye as kbd, Xe as label, Ze as legend, Qe as li, $e as link, Wr as listI18n, et as main, tt as map, nt as mark, rt as menu, it as meta, at as meter, Kn as mobileLayout, ga as mount, ot as nav, f as normalizeChild, p as normalizeSetupArguments, st as noscript, ct as object, lt as ol, ut as optgroup, dt as option, ft as output, pt as p, ha as parseState, mt as picture, ht as pre, gt as progress, _t as q, _ as registerChildFactories, Vr as registerI18n, fa as renderPage, la as renderToString, ra as resolveLocale, n as resolveTarget, fi as resolveYoyaMode, Bn as responsiveGrid, Ei as router, vt as rp, yt as rt, bt as ruby, xt as s, St as samp, Ct as script, wt as search, Tt as section, Et as select, Dt as selectedcontent, ma as serializeState, ui as setYoyaMode, pi as setYoyaTheme, Ot as slot, kt as small, At as source, Qn as spacer, jt as span, Nn as stack, Mt as strong, Nt as style, Pt as styleTag, Ft as sub, It as summary, Lt as sup, Rt as table, zt as tbody, Bt as td, Vt as template, d as text, d as vText, Ht as textarea, Ut as tfoot, Wt as th, Gt as thead, Kt as time, qt as title, Jt as tr, Yt as track, Xt as u, Zt as ul, nn as unbindDocumentEvent, Hr as unregisterI18n, Yn as vAside, Vn as vBody, jr as vClientOnly, Rn as vCol, Gn as vContainer, Zn as vFooter, Jn as vHeader, ki as vLink, Xn as vMain, Dn as vMasonry, qn as vMobileLayout, Di as vRoute, Oi as vRouter, Ai as vRouterView, ji as vRouterViews, Ln as vRow, Cn as vSplitPanel, ai as vStateNode, kn as vThemeShell, Qt as varTag, $t as video, Pn as vstack, en as wbr, zr as withI18nStringShortcut };
3444
+ export { Zr as ClientOnlyNode, j as ComponentNode, P as ElementNode, I as HtmlElementNode, ti as I18n, ni as I18nTextNode, So as PageDocumentNode, Sa as RequestBase, Ca as Result, ka as Router, A as TextNode, A as VTextNode, A as ViewTextNode, Hn as VMasonry, Rn as VSplitPanel, Wn as VThemeShell, k as ViewNode, de as a, fe as abbr, pe as address, sa as announce, N as applyElementOptions, me as area, he as article, ge as aside, _e as audio, ve as b, ye as base, be as bdi, xe as bdo, L as bindDocumentEvent, R as bindWindowEvent, Se as blockquote, Ce as body, we as br, Te as button, Ee as canvas, De as caption, Qn as center, Oe as cite, Li as clearInstalledContext, ke as code, Ae as col, je as colgroup, xa as configureRequest, or as container, i as createAccess, se as createElementFactory, oa as createFocusTrap, le as createHtmlFactories, ri as createI18n, Aa as createRouter, ir as createVBodyPage, s as currentAccess, Ri as currentContext, Me as data, Ne as datalist, Pe as dd, Fe as del, Ie as details, Le as dfn, Re as dialog, ze as div, hr as divider, Be as dl, Ve as dt, He as em, Ue as embed, ee as escapeHtml, We as fieldset, Ge as figcaption, Ke as figure, Jn as flex, qe as footer, Je as form, aa as getFocusableElements, di as getI18n, pi as getPersistedI18nLocales, ha as getYoyaMode, va as getYoyaTheme, tr as grid, Ye as h1, Xe as h2, Ze as h3, Qe as h4, $e as h5, et as h6, tt as head, nt as header, rt as hgroup, it as hr, Zn as hstack, at as html, ko as hydrate, To as hydrateOrMount, ot as i, ii as i18n, ai as i18nText, st as iframe, ct as img, ya as initYoyaTheme, bn as injectDocumentStyle, lt as input, ut as ins, o as installAccess, Ii as installContext, oi as installI18nStringShortcut, dt as kbd, ft as label, pt as legend, mt as li, ht as link, fi as listI18n, gt as main, _t as map, vt as mark, yt as menu, bt as meta, xt as meter, cr as mobileLayout, Oo as mount, ca as moveByKey, St as nav, ae as normalizeChild, oe as normalizeSetupArguments, Ct as noscript, wt as object, Tt as ol, Et as optgroup, Dt as option, Ot as output, kt as p, n as parseAccessSpec, Do as parseState, At as picture, jt as pre, Mt as progress, Nt as q, F as registerChildFactories, li as registerI18n, wo as renderPage, xo as renderToString, uo as resolveLocale, D as resolveTarget, ga as resolveYoyaMode, nr as responsiveGrid, ja as router, Pt as rp, Ft as rt, It as ruby, Lt as s, Rt as samp, zt as script, Bt as search, Vt as section, Ht as select, Ut as selectedcontent, Eo as serializeState, ma as setYoyaMode, _a as setYoyaTheme, Wt as slot, Gt as small, zi as snapshotContext, Kt as source, mr as spacer, qt as span, Yn as stack, r as stripAccessCode, Jt as strong, Yt as style, Xt as styleTag, Zt as sub, Qt as summary, $t as sup, en as table, tn as tbody, nn as td, rn as template, M as text, M as vText, an as textarea, on as tfoot, sn as th, cn as thead, ln as time, un as title, dn as tr, fn as track, pn as u, mn as ul, yn as unbindDocumentEvent, ui as unregisterI18n, dr as vAside, rr as vBody, Qr as vClientOnly, er as vCol, sr as vContainer, pr as vFooter, ur as vHeader, Pa as vLink, fr as vMain, Un as vMasonry, lr as vMobileLayout, Ma as vRoute, Na as vRouter, Fa as vRouterView, Ia as vRouterViews, $n as vRow, zn as vSplitPanel, na as vStateNode, Gn as vThemeShell, hn as varTag, gn as video, Xn as vstack, _n as wbr, a as withAccess, Fi as withContext, si as withI18nStringShortcut };