@quicktvui/naddons 1.0.0-rc.2 → 1.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,10 @@
1
- import { defineComponent as w, ref as A, openBlock as S, createBlock as $, unref as D, mergeProps as B, withCtx as R, renderSlot as F, shallowRef as me, watch as ee, computed as W, resolveComponent as ge, createElementBlock as J, normalizeStyle as fe, Fragment as Ke, renderList as He, onMounted as et, h as H, nextTick as tt, provide as ot, inject as nt } from "vue";
2
- import { Native as N } from "@extscreen/es3-vue";
3
- import { useES as Ze, useESPlugin as at } from "@extscreen/es3-core";
4
- const be = "QtGridTabs", X = /* @__PURE__ */ w({
1
+ import { defineComponent as $, ref as A, openBlock as x, createBlock as O, unref as M, mergeProps as F, withCtx as Q, renderSlot as D, shallowRef as ve, watch as ee, computed as j, resolveComponent as de, createElementBlock as Z, normalizeStyle as fe, Fragment as _e, renderList as qe, onMounted as Me, h as H, nextTick as ze, provide as Le, inject as Ue } from "vue";
2
+ import { Native as I } from "@extscreen/es3-vue";
3
+ import { useES as Fe, useESPlugin as Ve } from "@extscreen/es3-core";
4
+ const We = {
5
+ inheritAttrs: !1
6
+ }, X = /* @__PURE__ */ $({
7
+ ...We,
5
8
  __name: "GridTabs",
6
9
  props: {
7
10
  protocolVersion: {},
@@ -10,199 +13,199 @@ const be = "QtGridTabs", X = /* @__PURE__ */ w({
10
13
  actionPayload: {}
11
14
  },
12
15
  emits: ["onTabSelected", "onTabClick", "onTabNeedsData", "onLoadMore", "onScroll", "onScrollStateChanged", "onItemPresence", "onTabFocused", "onItemClick", "onItemLongClick", "onItemFocused", "onProtocolMismatch"],
13
- setup(e, { expose: i }) {
14
- const u = A(), s = _(), f = be + "_Plugin", l = (s.isPluginActive ? f : be).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
15
- l,
16
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
16
+ setup(e, { expose: a }) {
17
+ const d = A(), u = L(), v = "QtGridTabs", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
18
+ s,
19
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
17
20
  );
18
- return i({
21
+ return a({
19
22
  getNativeNode: () => {
20
- var a, c;
21
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
23
+ var l, i;
24
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
22
25
  },
23
- dispatchAction: (...a) => {
24
- var d, h;
25
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
26
- if (c)
27
- if (a.length > 0) {
28
- let C = a[0];
29
- typeof C == "object" && (C = JSON.stringify(C)), N.callUIFunction(c, "dispatchAction", [C]);
26
+ dispatchAction: (...l) => {
27
+ var f, p;
28
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
29
+ if (i)
30
+ if (l.length > 0) {
31
+ let w = l[0];
32
+ typeof w == "object" && (w = JSON.stringify(w)), I.callUIFunction(i, "dispatchAction", [w]);
30
33
  } else
31
- N.callUIFunction(c, "dispatchAction", a);
34
+ I.callUIFunction(i, "dispatchAction", l);
32
35
  },
33
- scrollToTop: (...a) => {
34
- var d, h;
35
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
36
- c && N.callUIFunction(c, "scrollToTop", a);
36
+ scrollToTop: (...l) => {
37
+ var f, p;
38
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
39
+ i && I.callUIFunction(i, "scrollToTop", l);
37
40
  },
38
- getFocusState: (...a) => {
39
- var d, h;
40
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
41
- c && N.callUIFunction(c, "getFocusState", a);
41
+ getFocusState: (...l) => {
42
+ var f, p;
43
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
44
+ i && I.callUIFunction(i, "getFocusState", l);
42
45
  },
43
- getItemRect: (...a) => {
44
- var d, h;
45
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
46
- c && N.callUIFunction(c, "getItemRect", a);
46
+ getItemRect: (...l) => {
47
+ var f, p;
48
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
49
+ i && I.callUIFunction(i, "getItemRect", l);
47
50
  },
48
- requestFocus: (...a) => {
49
- var d, h;
50
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
51
- c && N.callUIFunction(c, "requestFocus", a);
51
+ requestFocus: (...l) => {
52
+ var f, p;
53
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
54
+ i && I.callUIFunction(i, "requestFocus", l);
52
55
  }
53
- }), (a, c) => (S(), $(D(r), B({
56
+ }), (l, i) => (x(), O(M(h), F({
54
57
  ref_key: "nativeRef",
55
- ref: u,
58
+ ref: d,
56
59
  protocolVersion: e.protocolVersion,
57
60
  pageSpec: e.pageSpec,
58
61
  tabsData: e.tabsData,
59
62
  actionPayload: e.actionPayload,
60
- onOnTabSelected: c[0] || (c[0] = (d) => a.$emit("onTabSelected", d.nativeEvent)),
61
- onOnTabClick: c[1] || (c[1] = (d) => a.$emit("onTabClick", d.nativeEvent)),
62
- onOnTabNeedsData: c[2] || (c[2] = (d) => a.$emit("onTabNeedsData", d.nativeEvent)),
63
- onOnLoadMore: c[3] || (c[3] = (d) => a.$emit("onLoadMore", d.nativeEvent)),
64
- onOnScroll: c[4] || (c[4] = (d) => a.$emit("onScroll", d.nativeEvent)),
65
- onOnScrollStateChanged: c[5] || (c[5] = (d) => a.$emit("onScrollStateChanged", d.nativeEvent)),
66
- onOnItemPresence: c[6] || (c[6] = (d) => a.$emit("onItemPresence", d.nativeEvent)),
67
- onOnTabFocused: c[7] || (c[7] = (d) => a.$emit("onTabFocused", d.nativeEvent)),
68
- onOnItemClick: c[8] || (c[8] = (d) => a.$emit("onItemClick", d.nativeEvent)),
69
- onOnItemLongClick: c[9] || (c[9] = (d) => a.$emit("onItemLongClick", d.nativeEvent)),
70
- onOnItemFocused: c[10] || (c[10] = (d) => a.$emit("onItemFocused", d.nativeEvent)),
71
- onOnProtocolMismatch: c[11] || (c[11] = (d) => a.$emit("onProtocolMismatch", d.nativeEvent))
72
- }, a.$attrs), {
73
- default: R(() => [
74
- F(a.$slots, "default")
63
+ onOnTabSelected: i[0] || (i[0] = (f) => l.$emit("onTabSelected", f.nativeEvent)),
64
+ onOnTabClick: i[1] || (i[1] = (f) => l.$emit("onTabClick", f.nativeEvent)),
65
+ onOnTabNeedsData: i[2] || (i[2] = (f) => l.$emit("onTabNeedsData", f.nativeEvent)),
66
+ onOnLoadMore: i[3] || (i[3] = (f) => l.$emit("onLoadMore", f.nativeEvent)),
67
+ onOnScroll: i[4] || (i[4] = (f) => l.$emit("onScroll", f.nativeEvent)),
68
+ onOnScrollStateChanged: i[5] || (i[5] = (f) => l.$emit("onScrollStateChanged", f.nativeEvent)),
69
+ onOnItemPresence: i[6] || (i[6] = (f) => l.$emit("onItemPresence", f.nativeEvent)),
70
+ onOnTabFocused: i[7] || (i[7] = (f) => l.$emit("onTabFocused", f.nativeEvent)),
71
+ onOnItemClick: i[8] || (i[8] = (f) => l.$emit("onItemClick", f.nativeEvent)),
72
+ onOnItemLongClick: i[9] || (i[9] = (f) => l.$emit("onItemLongClick", f.nativeEvent)),
73
+ onOnItemFocused: i[10] || (i[10] = (f) => l.$emit("onItemFocused", f.nativeEvent)),
74
+ onOnProtocolMismatch: i[11] || (i[11] = (f) => l.$emit("onProtocolMismatch", f.nativeEvent))
75
+ }, l.$attrs), {
76
+ default: Q(() => [
77
+ D(l.$slots, "default")
75
78
  ]),
76
79
  _: 3
77
80
  }, 16, ["protocolVersion", "pageSpec", "tabsData", "actionPayload"]));
78
81
  }
79
82
  });
80
83
  let te;
81
- var Fe;
84
+ var Se;
82
85
  try {
83
86
  const e = require("@extscreen/es3-vue");
84
- te = e.registerElement || ((Fe = e.default) == null ? void 0 : Fe.registerElement);
87
+ te = e.registerElement || ((Se = e.default) == null ? void 0 : Se.registerElement);
85
88
  } catch {
86
89
  }
87
- const it = {
90
+ const je = {
88
91
  install: (e) => {
89
92
  if (!globalThis.__QtGridTabs_registered)
90
93
  if (te) {
91
- const i = (u, s) => {
92
- te(u, {
94
+ const a = (d, u) => {
95
+ te(d, {
93
96
  component: {
94
- name: s ? "QtGridTabs_Plugin" : "QtGridTabs",
95
- processEventData(f, v) {
96
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
97
- return l && (l.nativeEvent = r), l;
97
+ name: u ? "QtGridTabs_Plugin" : "QtGridTabs",
98
+ processEventData(v, g) {
99
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
100
+ return c && (c.nativeEvent = s), c;
98
101
  }
99
102
  }
100
103
  });
101
104
  };
102
- i("qt-grid-tabs", !1), i("qt-grid-tabs-plugin", !0), i("QtGridTabs", !1), i("QtGridTabs_Plugin", !0), i("gt-tabs", !1), i("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
105
+ a("qt-grid-tabs", !1), a("qt-grid-tabs-plugin", !0), a("QtGridTabs", !1), a("QtGridTabs_Plugin", !0), a("gt-tabs", !1), a("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
103
106
  } else
104
107
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
105
108
  e.component("GridTabs", X), e.component("qt-grid-tabs", X), e.component("gt-tabs", X);
106
109
  }
107
110
  };
108
- function _t(e, i) {
109
- const u = A(""), s = i ? JSON.parse(JSON.stringify(i)) : {}, f = me([]), v = me([]);
110
- let l = !1, r = !1;
111
- const a = "__virtual_single_tab__";
112
- let c = "", d = !1;
113
- const h = A({}), C = (o) => {
111
+ function Rt(e, a) {
112
+ const d = A(""), u = a ? JSON.parse(JSON.stringify(a)) : {}, v = ve([]), g = ve([]);
113
+ let c = !1, s = !1;
114
+ const h = "__virtual_single_tab__";
115
+ let l = "", i = !1;
116
+ const f = A({}), p = (o) => {
114
117
  const t = Array.isArray(o) ? o : [o];
115
- if (r && e.value) {
118
+ if (s && e.value) {
116
119
  if (typeof e.value.dispatchAction == "function") {
117
120
  console.log("[useGridTabs] Calling Wrapper dispatchAction directly"), e.value.dispatchAction(t);
118
121
  return;
119
122
  }
120
123
  let n = e.value;
121
- typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), n ? (console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"), N.callUIFunction(n, "dispatchAction", [JSON.stringify(t)])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
124
+ typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), n ? (console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"), I.callUIFunction(n, "dispatchAction", [JSON.stringify(t)])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
122
125
  }
123
- }, z = (o, t) => {
126
+ }, w = (o, t) => {
124
127
  if (!o)
125
128
  return !1;
126
129
  let n = !0;
127
130
  return o.id || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`, o), n = !1), o.viewType || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): 卡片缺失必填字段 'viewType' (id: ${o.id || "未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`, o), n = !1), n;
128
- }, q = (o, t) => {
131
+ }, _ = (o, t) => {
129
132
  if (!o)
130
133
  return !1;
131
134
  let n = !0;
132
135
  return o.tabId || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`, o), n = !1), (o.title === void 0 || o.title === null) && console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${t}): Tab 缺失 'title' 字段 (tabId: ${o.tabId || "未知"}),导航栏可能显示为空。`, o), n;
133
- }, Z = (o, t) => {
136
+ }, J = (o, t) => {
134
137
  if (!o || o.length === 0)
135
138
  return;
136
139
  U.clear();
137
140
  const n = o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items);
138
- l = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((g, m) => z(g, `items.value[${m}]`)) : o.forEach((g, m) => {
139
- q(g, `tabs.value[${m}]`), g.items && Array.isArray(g.items) && g.items.forEach((y, b) => z(y, `tabs.value[${m}].items[${b}]`));
140
- }), r = !0, p();
141
- }, U = /* @__PURE__ */ new Set(), p = (o = "unknown") => {
142
- if (!r) {
141
+ c = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((r, m) => w(r, `items.value[${m}]`)) : o.forEach((r, m) => {
142
+ _(r, `tabs.value[${m}]`), r.items && Array.isArray(r.items) && r.items.forEach((y, b) => w(y, `tabs.value[${m}].items[${b}]`));
143
+ }), s = !0, C();
144
+ }, U = /* @__PURE__ */ new Set(), C = (o = "unknown") => {
145
+ if (!s) {
143
146
  console.warn("[useGridTabs] triggerRootUpdate skipped because isInitialized is false");
144
147
  return;
145
148
  }
146
149
  let t = {
147
150
  protocolVersion: "1.28.0",
148
151
  // 新增:显式声明协议版本
149
- gridBasis: (s == null ? void 0 : s.gridBasis) ?? 30,
150
- unitType: (s == null ? void 0 : s.unitType) ?? "px",
151
- contentConfig: (s == null ? void 0 : s.contentConfig) ?? (s == null ? void 0 : s.layoutConfig) ?? {
152
+ gridBasis: (u == null ? void 0 : u.gridBasis) ?? 30,
153
+ unitType: (u == null ? void 0 : u.unitType) ?? "px",
154
+ contentConfig: (u == null ? void 0 : u.contentConfig) ?? (u == null ? void 0 : u.layoutConfig) ?? {
152
155
  box: { padding: [0, 60, 60, 60] },
153
156
  navContentGapNormal: 0,
154
157
  itemGap: 24
155
158
  },
156
- navConfig: (s == null ? void 0 : s.navConfig) ?? {
159
+ navConfig: (u == null ? void 0 : u.navConfig) ?? {
157
160
  dock: "left",
158
161
  mode: "fixed",
159
162
  renderType: "smart-hybrid",
160
163
  box: { size: [200, 0] },
161
164
  expandedBox: { size: [300, 0] }
162
165
  },
163
- cacheConfig: (s == null ? void 0 : s.cacheConfig) ?? {
166
+ cacheConfig: (u == null ? void 0 : u.cacheConfig) ?? {
164
167
  offscreenPageLimit: 1,
165
168
  prefetchOffset: 2,
166
169
  preLoadEnabled: !1,
167
170
  strategy: "data_priority"
168
171
  },
169
- animationConfig: (s == null ? void 0 : s.animationConfig) ?? {
172
+ animationConfig: (u == null ? void 0 : u.animationConfig) ?? {
170
173
  duration: 300,
171
174
  easing: "ease-out"
172
175
  },
173
- interactionStrategy: (s == null ? void 0 : s.interactionStrategy) ?? {
176
+ interactionStrategy: (u == null ? void 0 : u.interactionStrategy) ?? {
174
177
  defaultFocus: "nav",
175
178
  interceptBack: !0,
176
179
  backMode: "home-first",
177
180
  autoScrollToTop: !0,
178
181
  edgeScrollProtection: 0.5
179
182
  },
180
- focusConfig: (s == null ? void 0 : s.focusConfig) ?? {
183
+ focusConfig: (u == null ? void 0 : u.focusConfig) ?? {
181
184
  boundaryLock: { left: !1, right: !1, top: !1, bottom: !1 }
182
185
  },
183
- themeConfig: s == null ? void 0 : s.themeConfig,
184
- referenceResolution: (s == null ? void 0 : s.referenceResolution) ?? { w: 1920, h: 1080 }
186
+ themeConfig: u == null ? void 0 : u.themeConfig,
187
+ referenceResolution: (u == null ? void 0 : u.referenceResolution) ?? { w: 1920, h: 1080 }
185
188
  }, n = [];
186
- l ? (t.navConfig = { ...t.navConfig, renderType: "none" }, n = [
189
+ c ? (t.navConfig = { ...t.navConfig, renderType: "none" }, n = [
187
190
  {
188
- tabId: a,
191
+ tabId: h,
189
192
  title: "Virtual Tab",
190
193
  hidden: !0,
191
- items: v.value
194
+ items: g.value
192
195
  }
193
- ]) : n = f.value;
194
- const g = JSON.stringify({
196
+ ]) : n = v.value;
197
+ const r = JSON.stringify({
195
198
  page_spec: t,
196
199
  tabs: n
197
200
  });
198
- if (u.value === "")
199
- console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${g.length})`), u.value = g, c = g;
201
+ if (d.value === "")
202
+ console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${r.length})`), d.value = r, l = r;
200
203
  else {
201
- if (c === g) {
204
+ if (l === r) {
202
205
  console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");
203
206
  return;
204
207
  }
205
- console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${g.length})`), u.value = g, c = g, C({
208
+ console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${r.length})`), d.value = r, l = r, p({
206
209
  op: "RELOAD_TABS",
207
210
  payload: {
208
211
  pageSpec: t,
@@ -212,13 +215,13 @@ function _t(e, i) {
212
215
  }
213
216
  });
214
217
  }
215
- }, I = (o) => {
218
+ }, T = (o) => {
216
219
  if (!o || typeof o != "object" || o.__isGridTabsProxy)
217
220
  return o;
218
221
  o.content && typeof o.content == "object" && !o.content.__isGridTabsProxy && (o.content = new Proxy(o.content, {
219
- set(n, g, m, y) {
220
- const b = Reflect.set(n, g, m, y);
221
- return o.id && r && C({
222
+ set(n, r, m, y) {
223
+ const b = Reflect.set(n, r, m, y);
224
+ return o.id && s && p({
222
225
  op: "UPDATE_ITEM",
223
226
  itemId: o.id,
224
227
  payload: o
@@ -226,9 +229,9 @@ function _t(e, i) {
226
229
  }
227
230
  }), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems = P(o.subItems, o.id), Object.defineProperty(o.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.subItems, "__v_skip", { value: !0, enumerable: !1 }));
228
231
  const t = new Proxy(o, {
229
- set(n, g, m, y) {
230
- const b = Reflect.set(n, g, m, y);
231
- return n.id && r && !d && C({
232
+ set(n, r, m, y) {
233
+ const b = Reflect.set(n, r, m, y);
234
+ return n.id && s && !i && p({
232
235
  op: "UPDATE_ITEM",
233
236
  itemId: n.id,
234
237
  payload: n
@@ -238,131 +241,131 @@ function _t(e, i) {
238
241
  return Object.defineProperty(t, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t, "__v_skip", { value: !0, enumerable: !1 }), t;
239
242
  }, P = (o, t) => {
240
243
  for (let n = 0; n < o.length; n++)
241
- o[n] = I(o[n]);
244
+ o[n] = T(o[n]);
242
245
  return new Proxy(o, {
243
- get(n, g, m) {
244
- return g === "push" ? (...y) => {
245
- y.forEach((Q, K) => z(Q, `push(${K})`)), r || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
246
- const b = y.map((Q) => I(Q)), k = Array.prototype.push.apply(n, b);
247
- return d || C({
246
+ get(n, r, m) {
247
+ return r === "push" ? (...y) => {
248
+ y.forEach((q, K) => w(q, `push(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
249
+ const b = y.map((q) => T(q)), k = Array.prototype.push.apply(n, b);
250
+ return i || p({
248
251
  op: "APPEND_SUB_ITEMS",
249
252
  itemId: t,
250
253
  payload: { subItems: b }
251
254
  }), k;
252
- } : g === "unshift" ? (...y) => {
253
- y.forEach((Q, K) => z(Q, `unshift(${K})`)), r || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
254
- const b = y.map((Q) => I(Q)), k = Array.prototype.unshift.apply(n, b);
255
- return r && b.length > 0 && !d && C({
255
+ } : r === "unshift" ? (...y) => {
256
+ y.forEach((q, K) => w(q, `unshift(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
257
+ const b = y.map((q) => T(q)), k = Array.prototype.unshift.apply(n, b);
258
+ return s && b.length > 0 && !i && p({
256
259
  op: "PREPEND_SUB_ITEMS",
257
260
  itemId: t,
258
261
  payload: { subItems: b }
259
262
  }), k;
260
- } : g === "splice" ? (...y) => {
263
+ } : r === "splice" ? (...y) => {
261
264
  const b = y.length >= 2 && y[0] === 0 && y[1] === n.length, k = Array.prototype.splice.apply(n, y);
262
- return r && b && t !== a ? d || C({
265
+ return s && b && t !== h ? i || p({
263
266
  op: "CLEAR_SUB_ITEMS",
264
267
  itemId: t
265
- }) : r && (d || p("items array spliced")), k;
266
- } : Reflect.get(n, g, m);
268
+ }) : s && (i || C("items array spliced")), k;
269
+ } : Reflect.get(n, r, m);
267
270
  },
268
- set(n, g, m, y) {
269
- if (g !== "length" && !isNaN(Number(g))) {
270
- r || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(g)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), z(m, `索引赋值 [${String(g)}]`);
271
- const b = I(m), k = Reflect.set(n, g, b, y);
272
- return b && b.id && !d && C({
271
+ set(n, r, m, y) {
272
+ if (r !== "length" && !isNaN(Number(r))) {
273
+ s || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), w(m, `索引赋值 [${String(r)}]`);
274
+ const b = T(m), k = Reflect.set(n, r, b, y);
275
+ return b && b.id && !i && p({
273
276
  op: "UPDATE_ITEM",
274
277
  itemId: b.id,
275
278
  payload: b
276
279
  }), k;
277
280
  }
278
- return Reflect.set(n, g, m, y);
281
+ return Reflect.set(n, r, m, y);
279
282
  }
280
283
  });
281
- }, E = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = P(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
282
- set(t, n, g, m) {
284
+ }, S = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = P(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
285
+ set(t, n, r, m) {
283
286
  if (n === "items") {
284
- let b = g;
285
- return Array.isArray(g) && !g.__isGridTabsProxy && (b = P(g, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
287
+ let b = r;
288
+ return Array.isArray(r) && !r.__isGridTabsProxy && (b = P(r, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
286
289
  } else if (n === "loadState") {
287
- const b = Reflect.set(t, n, g, m);
288
- return r && t.tabId && !d && C({
290
+ const b = Reflect.set(t, n, r, m);
291
+ return s && t.tabId && !i && p({
289
292
  op: "UPDATE_TAB_STATE",
290
293
  itemId: t.tabId,
291
- payload: { loadState: g }
294
+ payload: { loadState: r }
292
295
  }), b;
293
296
  }
294
- return Reflect.set(t, n, g, m);
297
+ return Reflect.set(t, n, r, m);
295
298
  }
296
- })), G = (o) => {
297
- const t = o.map((n) => E(n));
299
+ })), B = (o) => {
300
+ const t = o.map((n) => S(n));
298
301
  return new Proxy(t, {
299
- set(n, g, m, y) {
300
- if (g !== "length" && !isNaN(Number(g))) {
302
+ set(n, r, m, y) {
303
+ if (r !== "length" && !isNaN(Number(r))) {
301
304
  let b = m;
302
- m.__isGridTabsProxy || (b = E(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
303
- const k = Reflect.set(n, g, b, y);
304
- return p(), k;
305
+ m.__isGridTabsProxy || (b = S(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
306
+ const k = Reflect.set(n, r, b, y);
307
+ return C(), k;
305
308
  }
306
- return Reflect.set(n, g, m, y);
309
+ return Reflect.set(n, r, m, y);
307
310
  }
308
311
  });
309
312
  };
310
- ee(f, (o, t) => {
311
- if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: r }), !o || o.length === 0) {
312
- u.value = "", c = "", r = !1;
313
+ ee(v, (o, t) => {
314
+ if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: s }), !o || o.length === 0) {
315
+ d.value = "", l = "", s = !1;
313
316
  return;
314
317
  }
315
318
  if (o.__isGridTabsProxy)
316
- console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), p();
319
+ console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), C();
317
320
  else {
318
321
  console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
319
- const n = G(o);
320
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Z(n, "2d"), f.value = n;
322
+ const n = B(o);
323
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), v.value = n;
321
324
  }
322
- }, { flush: "sync", deep: !1 }), ee(v, (o, t) => {
323
- if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: r }), !o || o.length === 0) {
324
- u.value = "", c = "", r = !1;
325
+ }, { flush: "sync", deep: !1 }), ee(g, (o, t) => {
326
+ if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: s }), !o || o.length === 0) {
327
+ d.value = "", l = "", s = !1;
325
328
  return;
326
329
  }
327
330
  if (o.__isGridTabsProxy)
328
- console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), p();
331
+ console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), C();
329
332
  else {
330
333
  console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
331
- const n = P(o, a);
332
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Z(n, "1d"), v.value = n;
334
+ const n = P(o, h);
335
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), g.value = n;
333
336
  }
334
337
  }, { flush: "sync", deep: !1 });
335
- const T = {}, O = () => {
336
- console.log("[useGridTabs] resetInitialization called manually"), r = !1, U.clear();
337
- for (const o in T)
338
- delete T[o];
339
- }, M = (o) => {
338
+ const N = {}, G = () => {
339
+ console.log("[useGridTabs] resetInitialization called manually"), s = !1, U.clear();
340
+ for (const o in N)
341
+ delete N[o];
342
+ }, R = (o) => {
340
343
  if (!o || o.length === 0) {
341
- u.value = "", r = !1;
344
+ d.value = "", s = !1;
342
345
  return;
343
346
  }
344
- o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? f.value = o : v.value = o;
345
- }, x = (o) => {
346
- h.value = o;
347
- }, V = W(() => ({
348
- tabsData: u.value,
347
+ o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? v.value = o : g.value = o;
348
+ }, E = (o) => {
349
+ f.value = o;
350
+ }, V = j(() => ({
351
+ tabsData: d.value,
349
352
  // 不再绑定 actionPayload 属性,完全走命令式 API,防止触发无意义的 Vue 节点更新
350
353
  onTabNeedsData: async (...o) => {
351
354
  let t = o[0];
352
- if (t && t.nativeEvent && (t = t.nativeEvent), !h.value.onTabNeedsData)
355
+ if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onTabNeedsData)
353
356
  return;
354
- const { tabId: n, index: g, reason: m } = t;
357
+ const { tabId: n, index: r, reason: m } = t;
355
358
  if (U.has(n)) {
356
359
  console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);
357
360
  return;
358
361
  }
359
362
  U.add(n);
360
363
  try {
361
- const y = await h.value.onTabNeedsData(n, g, m);
364
+ const y = await f.value.onTabNeedsData(n, r, m);
362
365
  if (y && Array.isArray(y))
363
- if (T[n] = 1, y.length > 0) {
364
- const b = f.value.find((k) => k.tabId === n);
365
- b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready", C({
366
+ if (N[n] = 1, y.length > 0) {
367
+ const b = v.value.find((k) => k.tabId === n);
368
+ b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready", p({
366
369
  op: "UPDATE_TAB_STATE",
367
370
  itemId: n,
368
371
  payload: { loadState: "ready" }
@@ -375,18 +378,18 @@ function _t(e, i) {
375
378
  },
376
379
  onLoadMore: async (...o) => {
377
380
  let t = o[0];
378
- if (t && t.nativeEvent && (t = t.nativeEvent), !h.value.onLoadMore)
381
+ if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onLoadMore)
379
382
  return;
380
- const { tabId: n, itemId: g } = t, y = (T[n] || 1) + 1;
383
+ const { tabId: n, itemId: r } = t, y = (N[n] || 1) + 1;
381
384
  console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${y}`);
382
385
  try {
383
- const b = await h.value.onLoadMore(n, y, g);
386
+ const b = await f.value.onLoadMore(n, y, r);
384
387
  if (b && Array.isArray(b))
385
388
  if (b.length > 0)
386
- if (T[n] = y, l)
387
- v.value.push(...b);
389
+ if (N[n] = y, c)
390
+ g.value.push(...b);
388
391
  else {
389
- const k = f.value.find((Q) => Q.tabId === n);
392
+ const k = v.value.find((q) => q.tabId === n);
390
393
  k && k.items && k.items.push(...b);
391
394
  }
392
395
  else
@@ -397,230 +400,262 @@ function _t(e, i) {
397
400
  },
398
401
  onItemPresence: (...o) => {
399
402
  let t = o[0];
400
- if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", t), h.value.onItemPresence)
403
+ if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", t), f.value.onItemPresence)
401
404
  try {
402
405
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.nativeEvent) || t;
403
406
  n && typeof n.data == "string" && (n = n.data);
404
- const g = typeof n == "string" ? JSON.parse(n) : n;
405
- g && g.type === "VIEW_PRESENCE_BATCH" && Array.isArray(g.payload) ? g.payload.forEach((m) => {
406
- m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), h.value.onItemPresence(m);
407
- }) : h.value.onItemPresence(g);
407
+ const r = typeof n == "string" ? JSON.parse(n) : n;
408
+ r && r.type === "VIEW_PRESENCE_BATCH" && Array.isArray(r.payload) ? r.payload.forEach((m) => {
409
+ m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), f.value.onItemPresence(m);
410
+ }) : f.value.onItemPresence(r);
408
411
  } catch (n) {
409
- console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), h.value.onItemPresence(t);
412
+ console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), f.value.onItemPresence(t);
410
413
  }
411
414
  },
412
415
  onTabSelected: (...o) => {
413
416
  let t = o[0];
414
- t && t.nativeEvent && (t = t.nativeEvent), h.value.onTabSelected && h.value.onTabSelected(t);
417
+ t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabSelected && f.value.onTabSelected(t);
415
418
  },
416
419
  onTabClick: (...o) => {
417
420
  let t = o[0];
418
- t && t.nativeEvent && (t = t.nativeEvent), h.value.onTabClick && h.value.onTabClick(t);
421
+ t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabClick && f.value.onTabClick(t);
419
422
  },
420
423
  onItemClick: (...o) => {
421
424
  let t = o[0];
422
- if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemClick)
425
+ if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemClick)
423
426
  try {
424
427
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
425
- const g = typeof n == "string" ? JSON.parse(n) : n;
426
- h.value.onItemClick(g);
428
+ const r = typeof n == "string" ? JSON.parse(n) : n;
429
+ if (r && typeof r.clickPayload == "string")
430
+ try {
431
+ r.clickPayload = JSON.parse(r.clickPayload);
432
+ } catch (m) {
433
+ console.warn("Failed to parse clickPayload:", m);
434
+ }
435
+ if (r && typeof r.focusPayload == "string")
436
+ try {
437
+ r.focusPayload = JSON.parse(r.focusPayload);
438
+ } catch (m) {
439
+ console.warn("Failed to parse focusPayload:", m);
440
+ }
441
+ f.value.onItemClick(r);
427
442
  } catch (n) {
428
- console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), h.value.onItemClick(t);
443
+ console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), f.value.onItemClick(t);
429
444
  }
430
445
  else
431
446
  console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!");
432
447
  },
433
448
  onItemLongClick: (...o) => {
434
449
  let t = o[0];
435
- if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemLongClick)
450
+ if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemLongClick)
436
451
  try {
437
452
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
438
- const g = typeof n == "string" ? JSON.parse(n) : n;
439
- h.value.onItemLongClick(g);
453
+ const r = typeof n == "string" ? JSON.parse(n) : n;
454
+ if (r && typeof r.clickPayload == "string")
455
+ try {
456
+ r.clickPayload = JSON.parse(r.clickPayload);
457
+ } catch {
458
+ }
459
+ if (r && typeof r.focusPayload == "string")
460
+ try {
461
+ r.focusPayload = JSON.parse(r.focusPayload);
462
+ } catch {
463
+ }
464
+ f.value.onItemLongClick(r);
440
465
  } catch (n) {
441
- console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n), h.value.onItemLongClick(t);
466
+ console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n), f.value.onItemLongClick(t);
442
467
  }
443
468
  },
444
469
  onItemFocused: (...o) => {
445
470
  let t = o[0];
446
- if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemFocused)
471
+ if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemFocused)
447
472
  try {
448
473
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
449
- const g = typeof n == "string" ? JSON.parse(n) : n;
450
- h.value.onItemFocused(g);
474
+ const r = typeof n == "string" ? JSON.parse(n) : n;
475
+ if (r && typeof r.clickPayload == "string")
476
+ try {
477
+ r.clickPayload = JSON.parse(r.clickPayload);
478
+ } catch {
479
+ }
480
+ if (r && typeof r.focusPayload == "string")
481
+ try {
482
+ r.focusPayload = JSON.parse(r.focusPayload);
483
+ } catch {
484
+ }
485
+ f.value.onItemFocused(r);
451
486
  } catch (n) {
452
- console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), h.value.onItemFocused(t);
487
+ console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), f.value.onItemFocused(t);
453
488
  }
454
489
  },
455
490
  onTabFocused: (...o) => {
456
491
  let t = o[0];
457
- t && t.nativeEvent && (t = t.nativeEvent), h.value.onTabFocused && h.value.onTabFocused(t);
492
+ t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabFocused && f.value.onTabFocused(t);
458
493
  },
459
494
  onScroll: (...o) => {
460
495
  let t = o[0];
461
- if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onScroll)
496
+ if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScroll)
462
497
  try {
463
498
  const n = (t == null ? void 0 : t.data) || t;
464
- h.value.onScroll(n);
499
+ f.value.onScroll(n);
465
500
  } catch {
466
- h.value.onScroll(t);
501
+ f.value.onScroll(t);
467
502
  }
468
503
  },
469
504
  onScrollStateChanged: (...o) => {
470
505
  let t = o[0];
471
- if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onScrollStateChanged)
506
+ if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScrollStateChanged)
472
507
  try {
473
508
  const n = (t == null ? void 0 : t.data) || t;
474
- h.value.onScrollStateChanged(n);
509
+ f.value.onScrollStateChanged(n);
475
510
  } catch {
476
- h.value.onScrollStateChanged(t);
511
+ f.value.onScrollStateChanged(t);
477
512
  }
478
513
  }
479
514
  }));
480
515
  return {
481
- tabsDataStr: u,
516
+ tabsDataStr: d,
482
517
  bindings: V,
483
- tabs: f,
484
- items: v,
485
- initData: M,
486
- setCallbacks: x,
518
+ tabs: v,
519
+ items: g,
520
+ initData: R,
521
+ setCallbacks: E,
487
522
  updateItem: (o, t) => {
488
- if (!r) {
523
+ if (!s) {
489
524
  console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
490
525
  return;
491
526
  }
492
- C({ op: "UPDATE_ITEM", itemId: o, payload: t }), d = !0;
527
+ p({ op: "UPDATE_ITEM", itemId: o, payload: t }), i = !0;
493
528
  try {
494
- if (l) {
495
- const n = v.value.find((g) => g.id === o);
529
+ if (c) {
530
+ const n = g.value.find((r) => r.id === o);
496
531
  n && Object.assign(n, t);
497
532
  } else
498
- for (const n of f.value)
533
+ for (const n of v.value)
499
534
  if (n.items) {
500
- const g = n.items.find((m) => m.id === o);
501
- if (g) {
502
- Object.assign(g, t);
535
+ const r = n.items.find((m) => m.id === o);
536
+ if (r) {
537
+ Object.assign(r, t);
503
538
  break;
504
539
  }
505
540
  }
506
541
  } finally {
507
- d = !1;
542
+ i = !1;
508
543
  }
509
544
  },
510
545
  deleteItem: (o, t = !0) => {
511
- if (r) {
512
- C({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), d = !0;
546
+ if (s) {
547
+ p({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), i = !0;
513
548
  try {
514
- if (l) {
515
- const n = v.value.findIndex((g) => g.id === o);
516
- n !== -1 && v.value.splice(n, 1);
549
+ if (c) {
550
+ const n = g.value.findIndex((r) => r.id === o);
551
+ n !== -1 && g.value.splice(n, 1);
517
552
  } else
518
- for (const n of f.value)
553
+ for (const n of v.value)
519
554
  if (n.items) {
520
- const g = n.items.findIndex((m) => m.id === o);
521
- if (g !== -1) {
522
- n.items.splice(g, 1);
555
+ const r = n.items.findIndex((m) => m.id === o);
556
+ if (r !== -1) {
557
+ n.items.splice(r, 1);
523
558
  break;
524
559
  }
525
560
  }
526
561
  } finally {
527
- d = !1;
562
+ i = !1;
528
563
  }
529
564
  }
530
565
  },
531
566
  prependItems: (o, t) => {
532
- if (r) {
533
- C({
567
+ if (s) {
568
+ p({
534
569
  op: "PREPEND_SUB_ITEMS",
535
570
  itemId: o,
536
571
  payload: { subItems: t }
537
- }), d = !0;
572
+ }), i = !0;
538
573
  try {
539
- if (l)
540
- v.value.unshift(...t);
574
+ if (c)
575
+ g.value.unshift(...t);
541
576
  else {
542
- const n = f.value.find((g) => g.tabId === o);
577
+ const n = v.value.find((r) => r.tabId === o);
543
578
  n && n.items && n.items.unshift(...t);
544
579
  }
545
580
  } finally {
546
- d = !1;
581
+ i = !1;
547
582
  }
548
583
  }
549
584
  },
550
585
  clearItems: (o) => {
551
- if (r) {
552
- C({
586
+ if (s) {
587
+ p({
553
588
  op: "CLEAR_SUB_ITEMS",
554
589
  itemId: o
555
- }), d = !0;
590
+ }), i = !0;
556
591
  try {
557
- if (l)
558
- v.value.splice(0, v.value.length);
592
+ if (c)
593
+ g.value.splice(0, g.value.length);
559
594
  else {
560
- const t = f.value.find((n) => n.tabId === o);
595
+ const t = v.value.find((n) => n.tabId === o);
561
596
  t && t.items && t.items.splice(0, t.items.length);
562
597
  }
563
598
  } finally {
564
- d = !1;
599
+ i = !1;
565
600
  }
566
601
  }
567
602
  },
568
603
  moveItem: (o, t, n) => {
569
- if (r) {
570
- C({
604
+ if (s) {
605
+ p({
571
606
  op: "MOVE_ITEM",
572
607
  itemId: o,
573
608
  payload: { targetPosition: t, anchorItemId: n }
574
- }), d = !0;
609
+ }), i = !0;
575
610
  try {
576
- const g = (m) => {
611
+ const r = (m) => {
577
612
  const y = m.findIndex((k) => k.id === o), b = m.findIndex((k) => k.id === n);
578
613
  if (y !== -1 && b !== -1) {
579
- const k = m.splice(y, 1)[0], Q = m.findIndex((Ye) => Ye.id === n), K = t === "after" ? Q + 1 : Q;
614
+ const k = m.splice(y, 1)[0], q = m.findIndex((De) => De.id === n), K = t === "after" ? q + 1 : q;
580
615
  m.splice(K, 0, k);
581
616
  }
582
617
  };
583
- if (l)
584
- g(v.value);
618
+ if (c)
619
+ r(g.value);
585
620
  else
586
- for (const m of f.value)
587
- m.items && g(m.items);
621
+ for (const m of v.value)
622
+ m.items && r(m.items);
588
623
  } finally {
589
- d = !1;
624
+ i = !1;
590
625
  }
591
626
  }
592
627
  },
593
628
  replaceItem: (o, t) => {
594
- if (r) {
595
- C({
629
+ if (s) {
630
+ p({
596
631
  op: "REPLACE_ITEM",
597
632
  itemId: o,
598
633
  payload: t
599
- }), d = !0;
634
+ }), i = !0;
600
635
  try {
601
- if (l) {
602
- const n = v.value.findIndex((g) => g.id === o);
603
- n !== -1 && (v.value[n] = t);
636
+ if (c) {
637
+ const n = g.value.findIndex((r) => r.id === o);
638
+ n !== -1 && (g.value[n] = t);
604
639
  } else
605
- for (const n of f.value)
640
+ for (const n of v.value)
606
641
  if (n.items) {
607
- const g = n.items.findIndex((m) => m.id === o);
608
- if (g !== -1) {
609
- n.items[g] = t;
642
+ const r = n.items.findIndex((m) => m.id === o);
643
+ if (r !== -1) {
644
+ n.items[r] = t;
610
645
  break;
611
646
  }
612
647
  }
613
648
  } finally {
614
- d = !1;
649
+ i = !1;
615
650
  }
616
651
  }
617
652
  },
618
- dispatchAction: C,
619
- resetInitialization: O,
653
+ dispatchAction: p,
654
+ resetInitialization: G,
620
655
  getFocusState: async () => new Promise((o, t) => {
621
656
  let n = e.value;
622
657
  typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), console.log("[useGridTabs] getFocusState called, nativeTarget:", n);
623
- const g = (m) => {
658
+ const r = (m) => {
624
659
  if (console.log("[useGridTabs] getFocusState callback received:", m), m && m.isSuccess !== void 0 && m.result !== void 0) {
625
660
  o(m.result);
626
661
  return;
@@ -632,11 +667,11 @@ function _t(e, i) {
632
667
  t(y);
633
668
  }
634
669
  };
635
- typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), N.callUIFunction(n, "getFocusState", [], g)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
670
+ typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), I.callUIFunction(n, "getFocusState", [], r)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
636
671
  }),
637
672
  getItemRect: async (o) => new Promise((t, n) => {
638
- let g = e.value;
639
- typeof e.value.getNativeNode == "function" ? g = e.value.getNativeNode() || e.value : e.value.nativeRef && (g = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, g);
673
+ let r = e.value;
674
+ typeof e.value.getNativeNode == "function" ? r = e.value.getNativeNode() || e.value : e.value.nativeRef && (r = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, r);
640
675
  const m = (y) => {
641
676
  if (console.log(`[useGridTabs] getItemRect callback received for itemId=${o}:`, y), y && y.isSuccess !== void 0 && y.result !== void 0) {
642
677
  t(y.result);
@@ -649,29 +684,29 @@ function _t(e, i) {
649
684
  n(b);
650
685
  }
651
686
  };
652
- typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), N.callUIFunction(g, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
687
+ typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), I.callUIFunction(r, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
653
688
  }),
654
689
  requestFocus: (o) => {
655
690
  let t = e.value;
656
- typeof e.value.getNativeNode == "function" ? t = e.value.getNativeNode() || e.value : e.value.nativeRef && (t = e.value.nativeRef), N.callUIFunction(t, "requestFocus", [o]);
691
+ typeof e.value.getNativeNode == "function" ? t = e.value.getNativeNode() || e.value : e.value.nativeRef && (t = e.value.nativeRef), I.callUIFunction(t, "requestFocus", [o]);
657
692
  },
658
693
  updatePageSpec: (o) => {
659
- if (!r)
694
+ if (!s)
660
695
  return;
661
- const t = Object.assign({}, JSON.parse(u.value).page_spec, o);
662
- o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)), s && Object.assign(s, t), C({
696
+ const t = Object.assign({}, JSON.parse(d.value).page_spec, o);
697
+ o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)), u && Object.assign(u, t), p({
663
698
  op: "RELOAD_TABS",
664
699
  payload: {
665
700
  pageSpec: t,
666
701
  page_spec: t,
667
- tabs: f.value
702
+ tabs: v.value
668
703
  }
669
704
  });
670
- const n = JSON.parse(u.value);
671
- n.page_spec = t, u.value = JSON.stringify(n), c = u.value;
705
+ const n = JSON.parse(d.value);
706
+ n.page_spec = t, d.value = JSON.stringify(n), l = d.value;
672
707
  },
673
708
  reloadAll: (o, t) => {
674
- s && (Object.keys(s).forEach((n) => delete s[n]), Object.assign(s, o)), f.value = t, C({
709
+ u && (Object.keys(u).forEach((n) => delete u[n]), Object.assign(u, o)), v.value = t, p({
675
710
  op: "RELOAD_TABS",
676
711
  payload: {
677
712
  pageSpec: o,
@@ -682,11 +717,14 @@ function _t(e, i) {
682
717
  },
683
718
  scrollToTop: () => {
684
719
  let o = e.value;
685
- typeof e.value.getNativeNode == "function" ? o = e.value.getNativeNode() || e.value : e.value.nativeRef && (o = e.value.nativeRef), N.callUIFunction(o, "scrollToTop", []);
720
+ typeof e.value.getNativeNode == "function" ? o = e.value.getNativeNode() || e.value : e.value.nativeRef && (o = e.value.nativeRef), I.callUIFunction(o, "scrollToTop", []);
686
721
  }
687
722
  };
688
723
  }
689
- const ye = "QtKeyboard", he = /* @__PURE__ */ w({
724
+ const Ke = {
725
+ inheritAttrs: !1
726
+ }, me = /* @__PURE__ */ $({
727
+ ...Ke,
690
728
  __name: "Keyboard",
691
729
  props: {
692
730
  backgroundColor: {},
@@ -706,25 +744,25 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
706
744
  rememberKeyboardType: { type: Boolean }
707
745
  },
708
746
  emits: ["onInputChanged", "onKeyPressed"],
709
- setup(e, { expose: i }) {
710
- const u = A(), s = _(), f = ye + "_Plugin", l = (s.isPluginActive ? f : ye).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
711
- l,
712
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
747
+ setup(e, { expose: a }) {
748
+ const d = A(), u = L(), v = "QtKeyboard", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
749
+ s,
750
+ u.pluginPackageName || "com.quicktvui.plugin.extraui",
713
751
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
714
752
  );
715
- return i({
753
+ return a({
716
754
  getNativeNode: () => {
717
- var a, c;
718
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
755
+ var l, i;
756
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
719
757
  },
720
- requestFocus: (...a) => {
721
- var d, h;
722
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
723
- c && N.callUIFunction(c, "requestFocus", a);
758
+ requestFocus: (...l) => {
759
+ var f, p;
760
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
761
+ i && I.callUIFunction(i, "requestFocus", l);
724
762
  }
725
- }), (a, c) => (S(), $(D(r), B({
763
+ }), (l, i) => (x(), O(M(h), F({
726
764
  ref_key: "nativeRef",
727
- ref: u,
765
+ ref: d,
728
766
  backgroundColor: e.backgroundColor,
729
767
  backgroundGradient: e.backgroundGradient,
730
768
  textColor: e.textColor,
@@ -740,265 +778,280 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
740
778
  currentInput: e.currentInput,
741
779
  autofocus: e.autofocus,
742
780
  rememberKeyboardType: e.rememberKeyboardType,
743
- onOnInputChanged: c[0] || (c[0] = (d) => a.$emit("onInputChanged", d.nativeEvent)),
744
- onOnKeyPressed: c[1] || (c[1] = (d) => a.$emit("onKeyPressed", d.nativeEvent))
745
- }, a.$attrs), {
746
- default: R(() => [
747
- F(a.$slots, "default")
781
+ onOnInputChanged: i[0] || (i[0] = (f) => l.$emit("onInputChanged", f.nativeEvent)),
782
+ onOnKeyPressed: i[1] || (i[1] = (f) => l.$emit("onKeyPressed", f.nativeEvent))
783
+ }, l.$attrs), {
784
+ default: Q(() => [
785
+ D(l.$slots, "default")
748
786
  ]),
749
787
  _: 3
750
788
  }, 16, ["backgroundColor", "backgroundGradient", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "keyboardType", "textClear", "textDelete", "currentInput", "autofocus", "rememberKeyboardType"]));
751
789
  }
752
790
  });
753
791
  let oe;
754
- var ze;
792
+ var Ee;
755
793
  try {
756
794
  const e = require("@extscreen/es3-vue");
757
- oe = e.registerElement || ((ze = e.default) == null ? void 0 : ze.registerElement);
795
+ oe = e.registerElement || ((Ee = e.default) == null ? void 0 : Ee.registerElement);
758
796
  } catch {
759
797
  }
760
- const lt = {
798
+ const He = {
761
799
  install: (e) => {
762
800
  if (!globalThis.__QtKeyboard_registered)
763
801
  if (oe) {
764
- const i = (u, s) => {
765
- oe(u, {
802
+ const a = (d, u) => {
803
+ oe(d, {
766
804
  component: {
767
- name: s ? "QtKeyboard_Plugin" : "QtKeyboard",
768
- processEventData(f, v) {
769
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
770
- return l && (l.nativeEvent = r), l;
805
+ name: u ? "QtKeyboard_Plugin" : "QtKeyboard",
806
+ processEventData(v, g) {
807
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
808
+ return c && (c.nativeEvent = s), c;
771
809
  }
772
810
  }
773
811
  });
774
812
  };
775
- i("qt-keyboard", !1), i("qt-keyboard-plugin", !0), i("QtKeyboard", !1), i("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
813
+ a("qt-keyboard", !1), a("qt-keyboard-plugin", !0), a("QtKeyboard", !1), a("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
776
814
  } else
777
815
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
778
- e.component("Keyboard", he), e.component("qt-keyboard", he);
816
+ e.component("Keyboard", me), e.component("qt-keyboard", me);
779
817
  }
780
- }, pe = "QtPortalPool", Ce = /* @__PURE__ */ w({
818
+ }, Je = {
819
+ inheritAttrs: !1
820
+ }, be = /* @__PURE__ */ $({
821
+ ...Je,
781
822
  __name: "PortalPool",
782
- setup(e, { expose: i }) {
783
- const u = A(), s = _(), f = pe + "_Plugin", l = (s.isPluginActive ? f : pe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
784
- l,
785
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
823
+ setup(e, { expose: a }) {
824
+ const d = A(), u = L(), v = "QtPortalPool", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
825
+ s,
826
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
786
827
  );
787
- return i({
828
+ return a({
788
829
  getNativeNode: () => {
789
- var a, c;
790
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
830
+ var l, i;
831
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
791
832
  }
792
- }), (a, c) => (S(), $(D(r), B({
833
+ }), (l, i) => (x(), O(M(h), F({
793
834
  ref_key: "nativeRef",
794
- ref: u,
835
+ ref: d,
795
836
  style: { position: "absolute" },
796
837
  absolute: !0
797
- }, a.$attrs), {
798
- default: R(() => [
799
- F(a.$slots, "default")
838
+ }, l.$attrs), {
839
+ default: Q(() => [
840
+ D(l.$slots, "default")
800
841
  ]),
801
842
  _: 3
802
843
  }, 16));
803
844
  }
804
845
  });
805
846
  let ne;
806
- var Me;
847
+ var xe;
807
848
  try {
808
849
  const e = require("@extscreen/es3-vue");
809
- ne = e.registerElement || ((Me = e.default) == null ? void 0 : Me.registerElement);
850
+ ne = e.registerElement || ((xe = e.default) == null ? void 0 : xe.registerElement);
810
851
  } catch {
811
852
  }
812
- const rt = {
853
+ const Ze = {
813
854
  install: (e) => {
814
855
  if (!globalThis.__QtPortalPool_registered)
815
856
  if (ne) {
816
- const i = (u, s) => {
817
- ne(u, {
857
+ const a = (d, u) => {
858
+ ne(d, {
818
859
  component: {
819
- name: s ? "QtPortalPool_Plugin" : "QtPortalPool",
820
- processEventData(f, v) {
821
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
822
- return l && (l.nativeEvent = r), l;
860
+ name: u ? "QtPortalPool_Plugin" : "QtPortalPool",
861
+ processEventData(v, g) {
862
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
863
+ return c && (c.nativeEvent = s), c;
823
864
  }
824
865
  }
825
866
  });
826
867
  };
827
- i("qt-portal-pool", !1), i("qt-portal-pool-plugin", !0), i("QtPortalPool", !1), i("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
868
+ a("qt-portal-pool", !1), a("qt-portal-pool-plugin", !0), a("QtPortalPool", !1), a("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
828
869
  } else
829
870
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
830
- e.component("PortalPool", Ce), e.component("qt-portal-pool", Ce);
871
+ e.component("PortalPool", be), e.component("qt-portal-pool", be);
831
872
  }
832
- }, ke = "QtPortalItem", Ie = /* @__PURE__ */ w({
873
+ }, Xe = {
874
+ inheritAttrs: !1
875
+ }, ye = /* @__PURE__ */ $({
876
+ ...Xe,
833
877
  __name: "PortalItem",
834
878
  props: {
835
879
  portalId: {}
836
880
  },
837
- setup(e, { expose: i }) {
838
- const u = A(), s = _(), f = ke + "_Plugin", l = (s.isPluginActive ? f : ke).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
839
- l,
840
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
881
+ setup(e, { expose: a }) {
882
+ const d = A(), u = L(), v = "QtPortalItem", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
883
+ s,
884
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
841
885
  );
842
- return i({
886
+ return a({
843
887
  getNativeNode: () => {
844
- var a, c;
845
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
888
+ var l, i;
889
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
846
890
  }
847
- }), (a, c) => (S(), $(D(r), B({
891
+ }), (l, i) => (x(), O(M(h), F({
848
892
  ref_key: "nativeRef",
849
- ref: u,
893
+ ref: d,
850
894
  style: { position: "absolute" },
851
895
  absolute: !0,
852
896
  portalId: e.portalId
853
- }, a.$attrs), {
854
- default: R(() => [
855
- F(a.$slots, "default")
897
+ }, l.$attrs), {
898
+ default: Q(() => [
899
+ D(l.$slots, "default")
856
900
  ]),
857
901
  _: 3
858
902
  }, 16, ["portalId"]));
859
903
  }
860
904
  });
861
905
  let ae;
862
- var De;
906
+ var Ae;
863
907
  try {
864
908
  const e = require("@extscreen/es3-vue");
865
- ae = e.registerElement || ((De = e.default) == null ? void 0 : De.registerElement);
909
+ ae = e.registerElement || ((Ae = e.default) == null ? void 0 : Ae.registerElement);
866
910
  } catch {
867
911
  }
868
- const st = {
912
+ const Ye = {
869
913
  install: (e) => {
870
914
  if (!globalThis.__QtPortalItem_registered)
871
915
  if (ae) {
872
- const i = (u, s) => {
873
- ae(u, {
916
+ const a = (d, u) => {
917
+ ae(d, {
874
918
  component: {
875
- name: s ? "QtPortalItem_Plugin" : "QtPortalItem",
876
- processEventData(f, v) {
877
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
878
- return l && (l.nativeEvent = r), l;
919
+ name: u ? "QtPortalItem_Plugin" : "QtPortalItem",
920
+ processEventData(v, g) {
921
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
922
+ return c && (c.nativeEvent = s), c;
879
923
  }
880
924
  }
881
925
  });
882
926
  };
883
- i("qt-portal-item", !1), i("qt-portal-item-plugin", !0), i("QtPortalItem", !1), i("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
927
+ a("qt-portal-item", !1), a("qt-portal-item-plugin", !0), a("QtPortalItem", !1), a("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
884
928
  } else
885
929
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
886
- e.component("PortalItem", Ie), e.component("qt-portal-item", Ie);
930
+ e.component("PortalItem", ye), e.component("qt-portal-item", ye);
887
931
  }
888
- }, Ne = "QtHsvBackground", Te = /* @__PURE__ */ w({
932
+ }, et = {
933
+ inheritAttrs: !1
934
+ }, he = /* @__PURE__ */ $({
935
+ ...et,
889
936
  __name: "HsvBackground",
890
937
  props: {
891
938
  hue: {},
892
939
  hueDuration: {}
893
940
  },
894
- setup(e, { expose: i }) {
895
- const u = A(), s = _(), f = Ne + "_Plugin", l = (s.isPluginActive ? f : Ne).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
896
- l,
897
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
941
+ setup(e, { expose: a }) {
942
+ const d = A(), u = L(), v = "QtHsvBackground", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
943
+ s,
944
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
898
945
  );
899
- return i({
946
+ return a({
900
947
  getNativeNode: () => {
901
- var a, c;
902
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
948
+ var l, i;
949
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
903
950
  }
904
- }), (a, c) => (S(), $(D(r), B({
951
+ }), (l, i) => (x(), O(M(h), F({
905
952
  ref_key: "nativeRef",
906
- ref: u,
953
+ ref: d,
907
954
  hue: e.hue,
908
955
  hueDuration: e.hueDuration
909
- }, a.$attrs), {
910
- default: R(() => [
911
- F(a.$slots, "default")
956
+ }, l.$attrs), {
957
+ default: Q(() => [
958
+ D(l.$slots, "default")
912
959
  ]),
913
960
  _: 3
914
961
  }, 16, ["hue", "hueDuration"]));
915
962
  }
916
963
  });
917
- let ie;
918
- var Le;
964
+ let le;
965
+ var we;
919
966
  try {
920
967
  const e = require("@extscreen/es3-vue");
921
- ie = e.registerElement || ((Le = e.default) == null ? void 0 : Le.registerElement);
968
+ le = e.registerElement || ((we = e.default) == null ? void 0 : we.registerElement);
922
969
  } catch {
923
970
  }
924
- const ct = {
971
+ const tt = {
925
972
  install: (e) => {
926
973
  if (!globalThis.__QtHsvBackground_registered)
927
- if (ie) {
928
- const i = (u, s) => {
929
- ie(u, {
974
+ if (le) {
975
+ const a = (d, u) => {
976
+ le(d, {
930
977
  component: {
931
- name: s ? "QtHsvBackground_Plugin" : "QtHsvBackground",
932
- processEventData(f, v) {
933
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
934
- return l && (l.nativeEvent = r), l;
978
+ name: u ? "QtHsvBackground_Plugin" : "QtHsvBackground",
979
+ processEventData(v, g) {
980
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
981
+ return c && (c.nativeEvent = s), c;
935
982
  }
936
983
  }
937
984
  });
938
985
  };
939
- i("qt-hsv-background", !1), i("qt-hsv-background-plugin", !0), i("QtHsvBackground", !1), i("QtHsvBackground_Plugin", !0), globalThis.__QtHsvBackground_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtHsvBackground");
986
+ a("qt-hsv-background", !1), a("qt-hsv-background-plugin", !0), a("QtHsvBackground", !1), a("QtHsvBackground_Plugin", !0), globalThis.__QtHsvBackground_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtHsvBackground");
940
987
  } else
941
988
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
942
- e.component("HsvBackground", Te), e.component("qt-hsv-background", Te);
989
+ e.component("HsvBackground", he), e.component("qt-hsv-background", he);
943
990
  }
944
- }, Se = "QtSvgImage", Pe = /* @__PURE__ */ w({
991
+ }, ot = {
992
+ inheritAttrs: !1
993
+ }, pe = /* @__PURE__ */ $({
994
+ ...ot,
945
995
  __name: "SvgImage",
946
996
  props: {
947
997
  src: {},
948
998
  tintColor: {}
949
999
  },
950
- setup(e, { expose: i }) {
951
- const u = A(), s = _(), f = Se + "_Plugin", l = (s.isPluginActive ? f : Se).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
952
- l,
953
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
1000
+ setup(e, { expose: a }) {
1001
+ const d = A(), u = L(), v = "QtSvgImage", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1002
+ s,
1003
+ u.pluginPackageName || "com.quicktvui.plugin.extraui",
954
1004
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
955
1005
  );
956
- return i({
1006
+ return a({
957
1007
  getNativeNode: () => {
958
- var a, c;
959
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1008
+ var l, i;
1009
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
960
1010
  }
961
- }), (a, c) => (S(), $(D(r), B({
1011
+ }), (l, i) => (x(), O(M(h), F({
962
1012
  ref_key: "nativeRef",
963
- ref: u,
1013
+ ref: d,
964
1014
  src: e.src,
965
1015
  tintColor: e.tintColor
966
- }, a.$attrs), {
967
- default: R(() => [
968
- F(a.$slots, "default")
1016
+ }, l.$attrs), {
1017
+ default: Q(() => [
1018
+ D(l.$slots, "default")
969
1019
  ]),
970
1020
  _: 3
971
1021
  }, 16, ["src", "tintColor"]));
972
1022
  }
973
1023
  });
974
- let le;
975
- var _e;
1024
+ let ie;
1025
+ var $e;
976
1026
  try {
977
1027
  const e = require("@extscreen/es3-vue");
978
- le = e.registerElement || ((_e = e.default) == null ? void 0 : _e.registerElement);
1028
+ ie = e.registerElement || (($e = e.default) == null ? void 0 : $e.registerElement);
979
1029
  } catch {
980
1030
  }
981
- const ut = {
1031
+ const nt = {
982
1032
  install: (e) => {
983
1033
  if (!globalThis.__QtSvgImage_registered)
984
- if (le) {
985
- const i = (u, s) => {
986
- le(u, {
1034
+ if (ie) {
1035
+ const a = (d, u) => {
1036
+ ie(d, {
987
1037
  component: {
988
- name: s ? "QtSvgImage_Plugin" : "QtSvgImage",
989
- processEventData(f, v) {
990
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
991
- return l && (l.nativeEvent = r), l;
1038
+ name: u ? "QtSvgImage_Plugin" : "QtSvgImage",
1039
+ processEventData(v, g) {
1040
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1041
+ return c && (c.nativeEvent = s), c;
992
1042
  }
993
1043
  }
994
1044
  });
995
1045
  };
996
- i("qt-svg-image", !1), i("qt-svg-image-plugin", !0), i("QtSvgImage", !1), i("QtSvgImage_Plugin", !0), globalThis.__QtSvgImage_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtSvgImage");
1046
+ a("qt-svg-image", !1), a("qt-svg-image-plugin", !0), a("QtSvgImage", !1), a("QtSvgImage_Plugin", !0), globalThis.__QtSvgImage_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtSvgImage");
997
1047
  } else
998
1048
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
999
- e.component("SvgImage", Pe), e.component("qt-svg-image", Pe);
1049
+ e.component("SvgImage", pe), e.component("qt-svg-image", pe);
1000
1050
  }
1001
- }, Ee = "QtNaButton", dt = /* @__PURE__ */ w({
1051
+ }, at = {
1052
+ inheritAttrs: !1
1053
+ }, lt = /* @__PURE__ */ $({
1054
+ ...at,
1002
1055
  __name: "NaButtonBase",
1003
1056
  props: {
1004
1057
  text: {},
@@ -1020,20 +1073,20 @@ const ut = {
1020
1073
  enableFocusBorder: { type: Boolean }
1021
1074
  },
1022
1075
  emits: ["onButtonCustomEvent"],
1023
- setup(e, { expose: i }) {
1024
- const u = A(), s = _(), f = Ee + "_Plugin", l = (s.isPluginActive ? f : Ee).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1025
- l,
1026
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
1076
+ setup(e, { expose: a }) {
1077
+ const d = A(), u = L(), v = "QtNaButton", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1078
+ s,
1079
+ u.pluginPackageName || "com.quicktvui.plugin.extraui",
1027
1080
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
1028
1081
  );
1029
- return i({
1082
+ return a({
1030
1083
  getNativeNode: () => {
1031
- var a, c;
1032
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1084
+ var l, i;
1085
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
1033
1086
  }
1034
- }), (a, c) => (S(), $(D(r), B({
1087
+ }), (l, i) => (x(), O(M(h), F({
1035
1088
  ref_key: "nativeRef",
1036
- ref: u,
1089
+ ref: d,
1037
1090
  text: e.text,
1038
1091
  icon: e.icon,
1039
1092
  iconSize: e.iconSize,
@@ -1051,61 +1104,67 @@ const ut = {
1051
1104
  cornerRadius: e.cornerRadius,
1052
1105
  focusScale: e.focusScale,
1053
1106
  enableFocusBorder: e.enableFocusBorder,
1054
- onOnButtonCustomEvent: c[0] || (c[0] = (d) => a.$emit("onButtonCustomEvent", d.nativeEvent))
1055
- }, a.$attrs), {
1056
- default: R(() => [
1057
- F(a.$slots, "default")
1107
+ onOnButtonCustomEvent: i[0] || (i[0] = (f) => l.$emit("onButtonCustomEvent", f.nativeEvent))
1108
+ }, l.$attrs), {
1109
+ default: Q(() => [
1110
+ D(l.$slots, "default")
1058
1111
  ]),
1059
1112
  _: 3
1060
1113
  }, 16, ["text", "icon", "iconSize", "iconSpace", "layoutDirection", "fontSize", "maxLines", "textColor", "focusTextColor", "backgroundColor", "focusBackgroundColor", "normalBorderWidth", "normalBorderColor", "focusBorderColor", "cornerRadius", "focusScale", "enableFocusBorder"]));
1061
1114
  }
1062
- }), xe = /* @__PURE__ */ w({
1115
+ }), it = {
1116
+ inheritAttrs: !1
1117
+ }, Ce = /* @__PURE__ */ $({
1118
+ ...it,
1063
1119
  __name: "NaButton",
1064
1120
  props: {
1065
1121
  width: {},
1066
1122
  height: {}
1067
1123
  },
1068
1124
  setup(e) {
1069
- const i = e, u = W(() => ({
1070
- width: typeof i.width == "number" ? `${i.width}px` : i.width,
1071
- height: typeof i.height == "number" ? `${i.height}px` : i.height
1125
+ const a = e, d = j(() => ({
1126
+ width: typeof a.width == "number" ? `${a.width}px` : a.width,
1127
+ height: typeof a.height == "number" ? `${a.height}px` : a.height
1072
1128
  }));
1073
- return (s, f) => (S(), $(dt, B(s.$attrs, { style: u.value }), {
1074
- default: R(() => [
1075
- F(s.$slots, "default")
1129
+ return (u, v) => (x(), O(lt, F(u.$attrs, { style: d.value }), {
1130
+ default: Q(() => [
1131
+ D(u.$slots, "default")
1076
1132
  ]),
1077
1133
  _: 3
1078
1134
  }, 16, ["style"]));
1079
1135
  }
1080
1136
  });
1081
1137
  let re;
1082
- var Ue;
1138
+ var Be;
1083
1139
  try {
1084
1140
  const e = require("@extscreen/es3-vue");
1085
- re = e.registerElement || ((Ue = e.default) == null ? void 0 : Ue.registerElement);
1141
+ re = e.registerElement || ((Be = e.default) == null ? void 0 : Be.registerElement);
1086
1142
  } catch {
1087
1143
  }
1088
- const gt = {
1144
+ const rt = {
1089
1145
  install: (e) => {
1090
1146
  if (!globalThis.__QtNaButton_registered)
1091
1147
  if (re) {
1092
- const i = (u, s) => {
1093
- re(u, {
1148
+ const a = (d, u) => {
1149
+ re(d, {
1094
1150
  component: {
1095
- name: s ? "QtNaButton_Plugin" : "QtNaButton",
1096
- processEventData(f, v) {
1097
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1098
- return l && (l.nativeEvent = r), l;
1151
+ name: u ? "QtNaButton_Plugin" : "QtNaButton",
1152
+ processEventData(v, g) {
1153
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1154
+ return c && (c.nativeEvent = s), c;
1099
1155
  }
1100
1156
  }
1101
1157
  });
1102
1158
  };
1103
- i("qt-na-button", !1), i("qt-na-button-plugin", !0), i("QtNaButton", !1), i("QtNaButton_Plugin", !0), globalThis.__QtNaButton_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaButton");
1159
+ a("qt-na-button", !1), a("qt-na-button-plugin", !0), a("QtNaButton", !1), a("QtNaButton_Plugin", !0), globalThis.__QtNaButton_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaButton");
1104
1160
  } else
1105
1161
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1106
- e.component("NaButton", xe), e.component("qt-na-button", xe);
1162
+ e.component("NaButton", Ce), e.component("qt-na-button", Ce);
1107
1163
  }
1108
- }, Ae = "QtNaCheckbox", we = /* @__PURE__ */ w({
1164
+ }, st = {
1165
+ inheritAttrs: !1
1166
+ }, ke = /* @__PURE__ */ $({
1167
+ ...st,
1109
1168
  __name: "NaCheckbox",
1110
1169
  props: {
1111
1170
  text: {},
@@ -1151,19 +1210,19 @@ const gt = {
1151
1210
  type: {}
1152
1211
  },
1153
1212
  emits: ["onCheckedChange"],
1154
- setup(e, { expose: i }) {
1155
- const u = A(), s = _(), f = Ae + "_Plugin", l = (s.isPluginActive ? f : Ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1156
- l,
1157
- s.pluginPackageName || ""
1213
+ setup(e, { expose: a }) {
1214
+ const d = A(), u = L(), v = "QtNaCheckbox", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1215
+ s,
1216
+ u.pluginPackageName || ""
1158
1217
  );
1159
- return i({
1218
+ return a({
1160
1219
  getNativeNode: () => {
1161
- var a, c;
1162
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1220
+ var l, i;
1221
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
1163
1222
  }
1164
- }), (a, c) => (S(), $(D(r), B({
1223
+ }), (l, i) => (x(), O(M(h), F({
1165
1224
  ref_key: "nativeRef",
1166
- ref: u,
1225
+ ref: d,
1167
1226
  text: e.text,
1168
1227
  checked: e.checked,
1169
1228
  disabled: e.disabled,
@@ -1205,43 +1264,43 @@ const gt = {
1205
1264
  cornerRadius: e.cornerRadius,
1206
1265
  focusScale: e.focusScale,
1207
1266
  type: e.type,
1208
- onOnCheckedChange: c[0] || (c[0] = (d) => a.$emit("onCheckedChange", d.nativeEvent))
1209
- }, a.$attrs), {
1210
- default: R(() => [
1211
- F(a.$slots, "default")
1267
+ onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
1268
+ }, l.$attrs), {
1269
+ default: Q(() => [
1270
+ D(l.$slots, "default")
1212
1271
  ]),
1213
1272
  _: 3
1214
1273
  }, 16, ["text", "checked", "disabled", "checkedIcon", "uncheckedIcon", "iconSize", "iconSpace", "layoutDirection", "gravity", "paddingX", "showBackground", "fontSize", "textColor", "focusTextColor", "checkedTextColor", "focusCheckedTextColor", "disabledTextColor", "iconColor", "focusIconColor", "checkedIconColor", "focusCheckedIconColor", "disabledIconColor", "iconInnerColor", "focusIconInnerColor", "checkedIconInnerColor", "focusCheckedIconInnerColor", "disabledIconInnerColor", "focusMode", "bgColor", "focusBgColor", "checkedBgColor", "focusCheckedBgColor", "disabledBgColor", "borderColor", "focusBorderColor", "checkedBorderColor", "focusCheckedBorderColor", "disabledBorderColor", "cornerRadius", "focusScale", "type"]));
1215
1274
  }
1216
1275
  });
1217
1276
  let se;
1218
- var Ve;
1277
+ var Ge;
1219
1278
  try {
1220
1279
  const e = require("@extscreen/es3-vue");
1221
- se = e.registerElement || ((Ve = e.default) == null ? void 0 : Ve.registerElement);
1280
+ se = e.registerElement || ((Ge = e.default) == null ? void 0 : Ge.registerElement);
1222
1281
  } catch {
1223
1282
  }
1224
- const ft = {
1283
+ const ct = {
1225
1284
  install: (e) => {
1226
1285
  if (!globalThis.__QtNaCheckbox_registered)
1227
1286
  if (se) {
1228
- const i = (u, s) => {
1229
- se(u, {
1287
+ const a = (d, u) => {
1288
+ se(d, {
1230
1289
  component: {
1231
- name: s ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
1232
- processEventData(f, v) {
1233
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1234
- return l && (l.nativeEvent = r), l;
1290
+ name: u ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
1291
+ processEventData(v, g) {
1292
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1293
+ return c && (c.nativeEvent = s), c;
1235
1294
  }
1236
1295
  }
1237
1296
  });
1238
1297
  };
1239
- i("qt-na-checkbox", !1), i("qt-na-checkbox-plugin", !0), i("QtNaCheckbox", !1), i("QtNaCheckbox_Plugin", !0), globalThis.__QtNaCheckbox_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaCheckbox");
1298
+ a("qt-na-checkbox", !1), a("qt-na-checkbox-plugin", !0), a("QtNaCheckbox", !1), a("QtNaCheckbox_Plugin", !0), globalThis.__QtNaCheckbox_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaCheckbox");
1240
1299
  } else
1241
1300
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1242
- e.component("NaCheckbox", we), e.component("qt-na-checkbox", we);
1301
+ e.component("NaCheckbox", ke), e.component("qt-na-checkbox", ke);
1243
1302
  }
1244
- }, vt = w({
1303
+ }, ut = $({
1245
1304
  name: "NaRadioGroup",
1246
1305
  props: {
1247
1306
  modelValue: {
@@ -1278,55 +1337,55 @@ const ft = {
1278
1337
  }
1279
1338
  },
1280
1339
  emits: ["update:modelValue", "change"],
1281
- setup(e, { emit: i }) {
1340
+ setup(e, { emit: a }) {
1282
1341
  return {
1283
- groupStyle: W(() => ({
1342
+ groupStyle: j(() => ({
1284
1343
  display: "flex",
1285
1344
  flexDirection: e.direction,
1286
1345
  alignItems: "center"
1287
1346
  })),
1288
- getItemStyle: (v, l) => {
1289
- var a;
1290
- const r = { ...((a = v.props) == null ? void 0 : a.style) || {} };
1291
- return e.itemWidth !== void 0 && (r.width = e.itemWidth), e.itemHeight !== void 0 && (r.height = e.itemHeight), l !== e.options.length - 1 && (e.direction === "row" ? r.marginRight = e.itemGap : r.marginBottom = e.itemGap), r;
1347
+ getItemStyle: (g, c) => {
1348
+ var h;
1349
+ const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
1350
+ return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
1292
1351
  },
1293
- onItemClick: (v) => {
1294
- v.disabled || (i("update:modelValue", v.value), i("change", v.value));
1352
+ onItemClick: (g) => {
1353
+ g.disabled || (a("update:modelValue", g.value), a("change", g.value));
1295
1354
  }
1296
1355
  };
1297
1356
  }
1298
1357
  });
1299
- const ve = (e, i) => {
1300
- const u = e.__vccOpts || e;
1301
- for (const [s, f] of i)
1302
- u[s] = f;
1303
- return u;
1358
+ const ge = (e, a) => {
1359
+ const d = e.__vccOpts || e;
1360
+ for (const [u, v] of a)
1361
+ d[u] = v;
1362
+ return d;
1304
1363
  };
1305
- function mt(e, i, u, s, f, v) {
1306
- const l = ge("qt-na-checkbox");
1307
- return S(), J("div", {
1364
+ function dt(e, a, d, u, v, g) {
1365
+ const c = de("qt-na-checkbox");
1366
+ return x(), Z("div", {
1308
1367
  class: "na-radio-group",
1309
1368
  style: fe(e.groupStyle)
1310
1369
  }, [
1311
- (S(!0), J(Ke, null, He(e.options, (r, a) => (S(), $(l, B({
1312
- key: a,
1370
+ (x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
1371
+ key: h,
1313
1372
  type: "radio",
1314
- checked: e.modelValue === r.value,
1315
- text: r.label,
1373
+ checked: e.modelValue === s.value,
1374
+ text: s.label,
1316
1375
  gravity: e.gravity,
1317
1376
  showBackground: e.showBackground,
1318
- disabled: r.disabled
1319
- }, { ref_for: !0 }, r.props, {
1320
- style: e.getItemStyle(r, a),
1321
- onClick: (c) => e.onItemClick(r)
1377
+ disabled: s.disabled
1378
+ }, { ref_for: !0 }, s.props, {
1379
+ style: e.getItemStyle(s, h),
1380
+ onClick: (l) => e.onItemClick(s)
1322
1381
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1323
1382
  ], 4);
1324
1383
  }
1325
- const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252ff"]]), bt = {
1384
+ const Te = /* @__PURE__ */ ge(ut, [["render", dt], ["__scopeId", "data-v-448252ff"]]), ft = {
1326
1385
  install: (e) => {
1327
- e.component("NaRadioGroup", $e), e.component("qt-na-radio-group", $e);
1386
+ e.component("NaRadioGroup", Te), e.component("qt-na-radio-group", Te);
1328
1387
  }
1329
- }, yt = w({
1388
+ }, gt = $({
1330
1389
  name: "NaCheckboxGroup",
1331
1390
  props: {
1332
1391
  modelValue: {
@@ -1363,52 +1422,55 @@ const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252f
1363
1422
  }
1364
1423
  },
1365
1424
  emits: ["update:modelValue", "change"],
1366
- setup(e, { emit: i }) {
1425
+ setup(e, { emit: a }) {
1367
1426
  return {
1368
- groupStyle: W(() => ({
1427
+ groupStyle: j(() => ({
1369
1428
  display: "flex",
1370
1429
  flexDirection: e.direction,
1371
1430
  alignItems: "center"
1372
1431
  })),
1373
- getItemStyle: (v, l) => {
1374
- var a;
1375
- const r = { ...((a = v.props) == null ? void 0 : a.style) || {} };
1376
- return e.itemWidth !== void 0 && (r.width = e.itemWidth), e.itemHeight !== void 0 && (r.height = e.itemHeight), l !== e.options.length - 1 && (e.direction === "row" ? r.marginRight = e.itemGap : r.marginBottom = e.itemGap), r;
1432
+ getItemStyle: (g, c) => {
1433
+ var h;
1434
+ const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
1435
+ return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
1377
1436
  },
1378
- onItemClick: (v) => {
1379
- if (v.disabled)
1437
+ onItemClick: (g) => {
1438
+ if (g.disabled)
1380
1439
  return;
1381
- const l = [...e.modelValue], r = l.indexOf(v.value);
1382
- r > -1 ? l.splice(r, 1) : l.push(v.value), i("update:modelValue", l), i("change", l);
1440
+ const c = [...e.modelValue], s = c.indexOf(g.value);
1441
+ s > -1 ? c.splice(s, 1) : c.push(g.value), a("update:modelValue", c), a("change", c);
1383
1442
  }
1384
1443
  };
1385
1444
  }
1386
1445
  });
1387
- function ht(e, i, u, s, f, v) {
1388
- const l = ge("qt-na-checkbox");
1389
- return S(), J("div", {
1446
+ function vt(e, a, d, u, v, g) {
1447
+ const c = de("qt-na-checkbox");
1448
+ return x(), Z("div", {
1390
1449
  class: "na-checkbox-group",
1391
1450
  style: fe(e.groupStyle)
1392
1451
  }, [
1393
- (S(!0), J(Ke, null, He(e.options, (r, a) => (S(), $(l, B({
1394
- key: a,
1452
+ (x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
1453
+ key: h,
1395
1454
  type: "checkbox",
1396
- checked: e.modelValue.includes(r.value),
1397
- text: r.label,
1455
+ checked: e.modelValue.includes(s.value),
1456
+ text: s.label,
1398
1457
  gravity: e.gravity,
1399
1458
  showBackground: e.showBackground,
1400
- disabled: r.disabled
1401
- }, { ref_for: !0 }, r.props, {
1402
- style: e.getItemStyle(r, a),
1403
- onClick: (c) => e.onItemClick(r)
1459
+ disabled: s.disabled
1460
+ }, { ref_for: !0 }, s.props, {
1461
+ style: e.getItemStyle(s, h),
1462
+ onClick: (l) => e.onItemClick(s)
1404
1463
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1405
1464
  ], 4);
1406
1465
  }
1407
- const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4eaa"]]), pt = {
1466
+ const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4eaa"]]), mt = {
1408
1467
  install: (e) => {
1409
- e.component("NaCheckboxGroup", Be), e.component("qt-na-checkbox-group", Be);
1468
+ e.component("NaCheckboxGroup", Ie), e.component("qt-na-checkbox-group", Ie);
1410
1469
  }
1411
- }, Ge = "QtNaSwitcher", Oe = /* @__PURE__ */ w({
1470
+ }, bt = {
1471
+ inheritAttrs: !1
1472
+ }, Ne = /* @__PURE__ */ $({
1473
+ ...bt,
1412
1474
  __name: "NaSwitcher",
1413
1475
  props: {
1414
1476
  checked: { type: Boolean },
@@ -1425,19 +1487,19 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
1425
1487
  stateTextSize: {}
1426
1488
  },
1427
1489
  emits: ["onCheckedChange"],
1428
- setup(e, { expose: i }) {
1429
- const u = A(), s = _(), f = Ge + "_Plugin", l = (s.isPluginActive ? f : Ge).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1430
- l,
1431
- s.pluginPackageName || ""
1490
+ setup(e, { expose: a }) {
1491
+ const d = A(), u = L(), v = "QtNaSwitcher", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1492
+ s,
1493
+ u.pluginPackageName || ""
1432
1494
  );
1433
- return i({
1495
+ return a({
1434
1496
  getNativeNode: () => {
1435
- var a, c;
1436
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1497
+ var l, i;
1498
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
1437
1499
  }
1438
- }), (a, c) => (S(), $(D(r), B({
1500
+ }), (l, i) => (x(), O(M(h), F({
1439
1501
  ref_key: "nativeRef",
1440
- ref: u,
1502
+ ref: d,
1441
1503
  checked: e.checked,
1442
1504
  disabled: e.disabled,
1443
1505
  title: e.title,
@@ -1450,43 +1512,43 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
1450
1512
  titleTextSize: e.titleTextSize,
1451
1513
  subtitleTextSize: e.subtitleTextSize,
1452
1514
  stateTextSize: e.stateTextSize,
1453
- onOnCheckedChange: c[0] || (c[0] = (d) => a.$emit("onCheckedChange", d.nativeEvent))
1454
- }, a.$attrs), {
1455
- default: R(() => [
1456
- F(a.$slots, "default")
1515
+ onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
1516
+ }, l.$attrs), {
1517
+ default: Q(() => [
1518
+ D(l.$slots, "default")
1457
1519
  ]),
1458
1520
  _: 3
1459
1521
  }, 16, ["checked", "disabled", "title", "textOn", "textOff", "subtitle", "subtitleColor", "titleColor", "focusTitleColor", "titleTextSize", "subtitleTextSize", "stateTextSize"]));
1460
1522
  }
1461
1523
  });
1462
1524
  let ce;
1463
- var We;
1525
+ var Oe;
1464
1526
  try {
1465
1527
  const e = require("@extscreen/es3-vue");
1466
- ce = e.registerElement || ((We = e.default) == null ? void 0 : We.registerElement);
1528
+ ce = e.registerElement || ((Oe = e.default) == null ? void 0 : Oe.registerElement);
1467
1529
  } catch {
1468
1530
  }
1469
- const Ct = {
1531
+ const yt = {
1470
1532
  install: (e) => {
1471
1533
  if (!globalThis.__QtNaSwitcher_registered)
1472
1534
  if (ce) {
1473
- const i = (u, s) => {
1474
- ce(u, {
1535
+ const a = (d, u) => {
1536
+ ce(d, {
1475
1537
  component: {
1476
- name: s ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
1477
- processEventData(f, v) {
1478
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1479
- return l && (l.nativeEvent = r), l;
1538
+ name: u ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
1539
+ processEventData(v, g) {
1540
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1541
+ return c && (c.nativeEvent = s), c;
1480
1542
  }
1481
1543
  }
1482
1544
  });
1483
1545
  };
1484
- i("qt-na-switcher", !1), i("qt-na-switcher-plugin", !0), i("QtNaSwitcher", !1), i("QtNaSwitcher_Plugin", !0), globalThis.__QtNaSwitcher_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaSwitcher");
1546
+ a("qt-na-switcher", !1), a("qt-na-switcher-plugin", !0), a("QtNaSwitcher", !1), a("QtNaSwitcher_Plugin", !0), globalThis.__QtNaSwitcher_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaSwitcher");
1485
1547
  } else
1486
1548
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1487
- e.component("NaSwitcher", Oe), e.component("qt-na-switcher", Oe);
1549
+ e.component("NaSwitcher", Ne), e.component("qt-na-switcher", Ne);
1488
1550
  }
1489
- }, kt = w({
1551
+ }, ht = $({
1490
1552
  name: "NaSettingSwitch",
1491
1553
  props: {
1492
1554
  title: {
@@ -1535,32 +1597,32 @@ const Ct = {
1535
1597
  }
1536
1598
  },
1537
1599
  emits: ["update:modelValue", "change"],
1538
- setup(e, { emit: i, attrs: u }) {
1539
- const s = A(e.modelValue);
1540
- ee(() => e.modelValue, (r) => {
1541
- s.value = r;
1600
+ setup(e, { emit: a, attrs: d }) {
1601
+ const u = A(e.modelValue);
1602
+ ee(() => e.modelValue, (s) => {
1603
+ u.value = s;
1542
1604
  });
1543
- const f = (r) => {
1544
- const a = r.checked;
1545
- s.value = a, i("update:modelValue", a), i("change", a);
1546
- }, v = W(() => typeof e.width == "number" ? `${e.width}px` : e.width), l = W(() => {
1547
- const r = u.style || {}, a = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1605
+ const v = (s) => {
1606
+ const h = s.checked;
1607
+ u.value = h, a("update:modelValue", h), a("change", h);
1608
+ }, g = j(() => typeof e.width == "number" ? `${e.width}px` : e.width), c = j(() => {
1609
+ const s = d.style || {}, h = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1548
1610
  return {
1549
- width: v.value,
1550
- height: typeof a == "number" ? `${a}px` : a,
1551
- ...r
1611
+ width: g.value,
1612
+ height: typeof h == "number" ? `${h}px` : h,
1613
+ ...s
1552
1614
  };
1553
1615
  });
1554
1616
  return {
1555
- checked: s,
1556
- handleCheckedChange: f,
1557
- mergedStyle: l
1617
+ checked: u,
1618
+ handleCheckedChange: v,
1619
+ mergedStyle: c
1558
1620
  };
1559
1621
  }
1560
1622
  });
1561
- function It(e, i, u, s, f, v) {
1562
- const l = ge("qt-na-switcher");
1563
- return S(), $(l, {
1623
+ function pt(e, a, d, u, v, g) {
1624
+ const c = de("qt-na-switcher");
1625
+ return x(), O(c, {
1564
1626
  class: "na-setting-switch",
1565
1627
  style: fe(e.mergedStyle),
1566
1628
  title: e.title,
@@ -1575,119 +1637,16 @@ function It(e, i, u, s, f, v) {
1575
1637
  onOnCheckedChange: e.handleCheckedChange
1576
1638
  }, null, 8, ["style", "title", "subtitle", "checked", "textOn", "textOff", "titleTextSize", "subtitleTextSize", "stateTextSize", "disabled", "onOnCheckedChange"]);
1577
1639
  }
1578
- const qe = /* @__PURE__ */ ve(kt, [["render", It]]), Nt = {
1640
+ const Pe = /* @__PURE__ */ ge(ht, [["render", pt]]), Ct = {
1579
1641
  install(e) {
1580
- e.component("NaSettingSwitch", qe), e.component("qt-na-setting-switch", qe);
1642
+ e.component("NaSettingSwitch", Pe), e.component("qt-na-setting-switch", Pe);
1581
1643
  }
1582
- }, Qe = "QtNaInputView", Tt = /* @__PURE__ */ w({
1583
- __name: "NaInputViewBase",
1584
- props: {
1585
- text: {},
1586
- placeholder: {},
1587
- type: {},
1588
- status: {},
1589
- disabled: { type: Boolean },
1590
- inputSize: {},
1591
- cursorVisible: { type: Boolean },
1592
- useSystemKeyboard: { type: Boolean },
1593
- trailingIcon: {}
1594
- },
1595
- emits: ["onInputClick", "onChange"],
1596
- setup(e, { expose: i }) {
1597
- const u = A(), s = _(), f = Qe + "_Plugin", l = (s.isPluginActive ? f : Qe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1598
- l,
1599
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
1600
- "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
1601
- );
1602
- return i({
1603
- getNativeNode: () => {
1604
- var a, c;
1605
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1606
- }
1607
- }), (a, c) => (S(), $(D(r), B({
1608
- ref_key: "nativeRef",
1609
- ref: u,
1610
- text: e.text,
1611
- placeholder: e.placeholder,
1612
- type: e.type,
1613
- status: e.status,
1614
- disabled: e.disabled,
1615
- inputSize: e.inputSize,
1616
- cursorVisible: e.cursorVisible,
1617
- useSystemKeyboard: e.useSystemKeyboard,
1618
- trailingIcon: e.trailingIcon,
1619
- onOnInputClick: c[0] || (c[0] = (d) => a.$emit("onInputClick", d.nativeEvent)),
1620
- onOnChange: c[1] || (c[1] = (d) => a.$emit("onChange", d.nativeEvent))
1621
- }, a.$attrs), {
1622
- default: R(() => [
1623
- F(a.$slots, "default")
1624
- ]),
1625
- _: 3
1626
- }, 16, ["text", "placeholder", "type", "status", "disabled", "inputSize", "cursorVisible", "useSystemKeyboard", "trailingIcon"]));
1627
- }
1628
- }), Re = /* @__PURE__ */ w({
1629
- __name: "NaInputView",
1630
- props: {
1631
- inputSize: { default: "medium" }
1632
- },
1633
- emits: ["onInputClick", "onChange"],
1634
- setup(e, { emit: i }) {
1635
- const u = i, s = e, f = W(() => {
1636
- let r = 60;
1637
- return s.inputSize === "large" ? r = 70 : s.inputSize === "small" && (r = 50), {
1638
- height: `${r}px`
1639
- };
1640
- }), v = (r) => {
1641
- u("onInputClick", r);
1642
- }, l = (r) => {
1643
- u("onChange", r);
1644
- };
1645
- return (r, a) => (S(), $(Tt, B(r.$attrs, {
1646
- style: f.value,
1647
- inputSize: e.inputSize,
1648
- onOnInputClick: v,
1649
- onOnChange: l
1650
- }), {
1651
- default: R(() => [
1652
- F(r.$slots, "default")
1653
- ]),
1654
- _: 3
1655
- }, 16, ["style", "inputSize"]));
1656
- }
1657
- });
1658
- let ue;
1659
- var je;
1660
- try {
1661
- const e = require("@extscreen/es3-vue");
1662
- ue = e.registerElement || ((je = e.default) == null ? void 0 : je.registerElement);
1663
- } catch {
1664
- }
1665
- const St = {
1666
- install: (e) => {
1667
- if (!globalThis.__QtNaInputView_registered)
1668
- if (ue) {
1669
- const i = (u, s) => {
1670
- ue(u, {
1671
- component: {
1672
- name: s ? "QtNaInputView_Plugin" : "QtNaInputView",
1673
- processEventData(f, v) {
1674
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1675
- return l && (l.nativeEvent = r), l;
1676
- }
1677
- }
1678
- });
1679
- };
1680
- i("qt-na-input-view", !1), i("qt-na-input-view-plugin", !0), i("QtNaInputView", !1), i("QtNaInputView_Plugin", !0), globalThis.__QtNaInputView_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaInputView");
1681
- } else
1682
- console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1683
- e.component("NaInputView", Re), e.component("qt-na-input-view", Re);
1684
- }
1685
- }, Pt = {
1644
+ }, kt = {
1686
1645
  // 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
1687
1646
  skipPluginCheck: !1
1688
1647
  }, Y = /* @__PURE__ */ new Set();
1689
- function L(e, i, u) {
1690
- return w({
1648
+ function z(e, a, d) {
1649
+ return $({
1691
1650
  name: `${e}AsyncWrapper`,
1692
1651
  inheritAttrs: !1,
1693
1652
  props: {
@@ -1697,206 +1656,206 @@ function L(e, i, u) {
1697
1656
  default: !1
1698
1657
  }
1699
1658
  },
1700
- setup(s, { slots: f, attrs: v, expose: l }) {
1701
- const r = A("loading"), a = A(""), c = A(), d = globalThis.__VUE_INSTANCE__;
1702
- l({
1659
+ setup(u, { slots: v, attrs: g, expose: c }) {
1660
+ const s = A("loading"), h = A(""), l = A(), i = globalThis.__VUE_INSTANCE__;
1661
+ c({
1703
1662
  getNativeNode: () => {
1704
- let p = c.value;
1705
- return !p && d && d.vnode && d.vnode.el && (p = d.vnode.el, p.childNodes && p.childNodes.length > 0 && (p = p.childNodes[0])), p;
1663
+ let C = l.value;
1664
+ return !C && i && i.vnode && i.vnode.el && (C = i.vnode.el, C.childNodes && C.childNodes.length > 0 && (C = C.childNodes[0])), C;
1706
1665
  },
1707
- nativeRef: c
1666
+ nativeRef: l
1708
1667
  });
1709
- let z = null, q = null;
1668
+ let w = null, _ = null;
1710
1669
  try {
1711
- z = Ze(), q = at();
1712
- } catch (p) {
1713
- console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", p);
1670
+ w = Fe(), _ = Ve();
1671
+ } catch (C) {
1672
+ console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", C);
1714
1673
  }
1715
- const Z = async () => {
1716
- if (!z || typeof z.isComponentRegistered != "function")
1674
+ const J = async () => {
1675
+ if (!w || typeof w.isComponentRegistered != "function")
1717
1676
  return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
1718
1677
  try {
1719
- const p = await z.isComponentRegistered(e);
1720
- if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`, p), p === !0 || p && typeof p == "object" && (p.registered === !0 || p.isRegistered === !0))
1678
+ const C = await w.isComponentRegistered(e);
1679
+ if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`, C), C === !0 || C && typeof C == "object" && (C.registered === !0 || C.isRegistered === !0))
1721
1680
  return !0;
1722
1681
  try {
1723
- const I = await N.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
1724
- if (I && I.core_version) {
1725
- const P = I.core_version;
1682
+ const T = await I.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
1683
+ if (T && T.core_version) {
1684
+ const P = T.core_version;
1726
1685
  console.log(`[withAsyncPlugin] 当前引擎核心版本: ${P}`);
1727
- const E = P.split(".").map((G) => parseInt(G, 10));
1728
- if (E.length >= 3 && !isNaN(E[0]) && !isNaN(E[1]) && !isNaN(E[2]))
1729
- if (E[0] * 1e6 + E[1] * 1e3 + E[2] >= 1011205) {
1686
+ const S = P.split(".").map((B) => parseInt(B, 10));
1687
+ if (S.length >= 3 && !isNaN(S[0]) && !isNaN(S[1]) && !isNaN(S[2]))
1688
+ if (S[0] * 1e6 + S[1] * 1e3 + S[2] >= 1011205) {
1730
1689
  console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${e}`);
1731
- const T = e.split("-").map((x) => x.charAt(0).toUpperCase() + x.slice(1)).join("");
1732
- console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${T}`);
1733
- const [O, M] = await Promise.all([
1734
- N.callNativeWithPromise("ExtendModule", "isComponentRegistered", e).catch(() => !1),
1735
- N.callNativeWithPromise("ExtendModule", "isComponentRegistered", T).catch(() => !1)
1690
+ const N = e.split("-").map((E) => E.charAt(0).toUpperCase() + E.slice(1)).join("");
1691
+ console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${N}`);
1692
+ const [G, R] = await Promise.all([
1693
+ I.callNativeWithPromise("ExtendModule", "isComponentRegistered", e).catch(() => !1),
1694
+ I.callNativeWithPromise("ExtendModule", "isComponentRegistered", N).catch(() => !1)
1736
1695
  ]);
1737
- if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${O}, ${M}]`), O === !0 || M === !0)
1696
+ if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${G}, ${R}]`), G === !0 || R === !0)
1738
1697
  return !0;
1739
1698
  } else
1740
1699
  console.log(`[withAsyncPlugin] 引擎版本 ${P} < 1.11.205,跳过 ExtendModule 检查`);
1741
1700
  else
1742
1701
  console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${P}`);
1743
1702
  }
1744
- } catch (I) {
1745
- console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", I);
1703
+ } catch (T) {
1704
+ console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", T);
1746
1705
  }
1747
1706
  return !1;
1748
- } catch (p) {
1749
- return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", p), !1;
1707
+ } catch (C) {
1708
+ return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", C), !1;
1750
1709
  }
1751
1710
  }, U = async () => {
1752
- if (Pt.skipPluginCheck || s.skipPluginCheck) {
1753
- console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), r.value = "ready";
1711
+ if (kt.skipPluginCheck || u.skipPluginCheck) {
1712
+ console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), s.value = "ready";
1754
1713
  return;
1755
1714
  }
1756
- if (!i) {
1757
- r.value = "ready";
1715
+ if (!a) {
1716
+ s.value = "ready";
1758
1717
  return;
1759
1718
  }
1760
- const p = await Z();
1761
- if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, p), p || Y.has(i)) {
1762
- r.value = "ready", Y.add(i), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
1719
+ const C = await J();
1720
+ if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, C), C || Y.has(a)) {
1721
+ s.value = "ready", Y.add(a), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
1763
1722
  return;
1764
1723
  }
1765
- if (!q) {
1766
- console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), r.value = "ready";
1724
+ if (!_) {
1725
+ console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), s.value = "ready";
1767
1726
  return;
1768
1727
  }
1769
- console.log(`[withAsyncPlugin] 开始动态安装插件: ${i}`);
1728
+ console.log(`[withAsyncPlugin] 开始动态安装插件: ${a}`);
1770
1729
  try {
1771
- await new Promise((I, P) => {
1772
- let E;
1773
- const G = {
1774
- onPluginInstallSuccess(T, O, M) {
1775
- T === i && (clearTimeout(E), q.removeListener(G), console.log(`[withAsyncPlugin] 安装成功 pkg=${T} 状态码=${O}`), O == 1003 || O == 1001 ? (u ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${u}`), N.callNative("EsNativeModule", "callReflect", {
1730
+ await new Promise((T, P) => {
1731
+ let S;
1732
+ const B = {
1733
+ onPluginInstallSuccess(N, G, R) {
1734
+ N === a && (clearTimeout(S), _.removeListener(B), console.log(`[withAsyncPlugin] 安装成功 pkg=${N} 状态码=${G}`), G == 1003 || G == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), I.callNative("EsNativeModule", "callReflect", {
1776
1735
  entry: {
1777
- from: u,
1736
+ from: d,
1778
1737
  method: "setup"
1779
1738
  }
1780
- })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), I()) : P(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1739
+ })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), T()) : P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
1781
1740
  },
1782
- onPluginInstallError(T, O, M) {
1783
- T === i && (clearTimeout(E), q.removeListener(G), P(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1741
+ onPluginInstallError(N, G, R) {
1742
+ N === a && (clearTimeout(S), _.removeListener(B), P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
1784
1743
  }
1785
1744
  };
1786
- q.addListener({ pkg: i }, G), E = setTimeout(() => {
1787
- q.removeListener(G), P(new Error(`插件安装超时: ${i}`));
1788
- }, 8e3), typeof q.installPlugin == "function" ? q.installPlugin({ pkg: i }) : typeof q.install == "function" ? q.install(i) : P(new Error("当前运行时不支持 install / installPlugin"));
1789
- }), await tt(), Y.add(i), r.value = "ready";
1790
- } catch (I) {
1791
- console.error("[withAsyncPlugin] 插件加载失败:", I), a.value = (I == null ? void 0 : I.message) || String(I), r.value = "error";
1745
+ _.addListener({ pkg: a }, B), S = setTimeout(() => {
1746
+ _.removeListener(B), P(new Error(`插件安装超时: ${a}`));
1747
+ }, 8e3), typeof _.installPlugin == "function" ? _.installPlugin({ pkg: a }) : typeof _.install == "function" ? _.install(a) : P(new Error("当前运行时不支持 install / installPlugin"));
1748
+ }), await ze(), Y.add(a), s.value = "ready";
1749
+ } catch (T) {
1750
+ console.error("[withAsyncPlugin] 插件加载失败:", T), h.value = (T == null ? void 0 : T.message) || String(T), s.value = "error";
1792
1751
  }
1793
1752
  };
1794
- return et(() => {
1753
+ return Me(() => {
1795
1754
  U();
1796
1755
  }), () => {
1797
- const p = {
1756
+ const C = {
1798
1757
  display: "flex",
1799
1758
  flexDirection: "column",
1800
1759
  justifyContent: "center",
1801
1760
  alignItems: "center",
1802
- ...v.style || {}
1761
+ ...g.style || {}
1803
1762
  };
1804
- v.width !== void 0 && !p.width && (p.width = typeof v.width == "number" ? `${v.width}px` : v.width), v.height !== void 0 && !p.height && (p.height = typeof v.height == "number" ? `${v.height}px` : v.height);
1805
- const I = v.class ? `qt-plugin-container ${v.class}` : "qt-plugin-container", P = {
1806
- class: I,
1807
- style: p,
1763
+ g.width !== void 0 && !C.width && (C.width = typeof g.width == "number" ? `${g.width}px` : g.width), g.height !== void 0 && !C.height && (C.height = typeof g.height == "number" ? `${g.height}px` : g.height);
1764
+ const T = g.class ? `qt-plugin-container ${g.class}` : "qt-plugin-container", P = {
1765
+ class: T,
1766
+ style: C,
1808
1767
  // 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
1809
1768
  clipChildren: !1,
1810
1769
  clipPadding: !1,
1811
1770
  clipToPadding: !1
1812
1771
  };
1813
- if (r.value === "loading")
1772
+ if (s.value === "loading")
1814
1773
  return H("div", P, [
1815
1774
  H("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
1816
1775
  ]);
1817
- if (r.value === "error")
1776
+ if (s.value === "error")
1818
1777
  return H("div", P, [
1819
- H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${a.value}`)
1778
+ H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${h.value}`)
1820
1779
  ]);
1821
- const E = {}, G = {};
1822
- for (const [x, V] of Object.entries(v))
1823
- if (x.startsWith("on") && typeof V == "function") {
1824
- let j = x;
1825
- x.startsWith("onOn") && (j = "on" + x.slice(4)), G[j] = V;
1826
- } else if (x.startsWith("on") && Array.isArray(V)) {
1827
- let j = x;
1828
- x.startsWith("onOn") && (j = "on" + x.slice(4)), G[j] = V;
1780
+ const S = {}, B = {};
1781
+ for (const [E, V] of Object.entries(g))
1782
+ if (E.startsWith("on") && typeof V == "function") {
1783
+ let W = E;
1784
+ E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
1785
+ } else if (E.startsWith("on") && Array.isArray(V)) {
1786
+ let W = E;
1787
+ E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
1829
1788
  } else
1830
- x.startsWith("onOn") || (E[x] = V);
1831
- const T = {
1832
- ...E,
1833
- ...G,
1834
- class: I,
1789
+ E.startsWith("onOn") || (S[E] = V);
1790
+ const N = {
1791
+ ...S,
1792
+ ...B,
1793
+ class: T,
1835
1794
  // 把外层 class 传给内部
1836
- style: p,
1795
+ style: C,
1837
1796
  // 把外层 style 传给内部
1838
- ref: (x) => {
1839
- c.value = x;
1797
+ ref: (E) => {
1798
+ l.value = E;
1840
1799
  }
1841
- }, O = T.tabsData || "", M = T.actionPayload || "";
1842
- return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(T), "tabsData.length=", O.length, "actionPayload.length=", M.length), H(e, T, f.default ? f.default() : []);
1800
+ }, G = N.tabsData || "", R = N.actionPayload || "";
1801
+ return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(N), "tabsData.length=", G.length, "actionPayload.length=", R.length), H(e, N, v.default ? v.default() : []);
1843
1802
  };
1844
1803
  }
1845
1804
  });
1846
1805
  }
1847
- const Je = Symbol("AddonEnvContext"), Xe = {
1806
+ const Re = Symbol("AddonEnvContext"), Qe = {
1848
1807
  isPluginActive: !1,
1849
1808
  nameSuffix: "",
1850
1809
  pluginPackageName: "com.quicktvui.plugin.glintui",
1851
1810
  builtInVersions: {}
1852
1811
  };
1853
- async function Ut(e = "com.quicktvui.plugin.glintui", i = "_Plugin") {
1854
- const u = Ze();
1855
- let s = {};
1812
+ async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
1813
+ const d = Fe();
1814
+ let u = {};
1856
1815
  try {
1857
- const a = await N.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
1858
- a && typeof a == "object" && (s = a);
1859
- } catch (a) {
1860
- console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", a);
1816
+ const h = await I.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
1817
+ h && typeof h == "object" && (u = h);
1818
+ } catch (h) {
1819
+ console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", h);
1861
1820
  }
1862
- const f = `QtGridTabs${i}`, v = u.isComponentRegistered(f), l = v instanceof Promise ? await v : v, r = {
1863
- isPluginActive: l,
1864
- nameSuffix: l ? i : "",
1821
+ const v = `QtGridTabs${a}`, g = d.isComponentRegistered(v), c = g instanceof Promise ? await g : g, s = {
1822
+ isPluginActive: c,
1823
+ nameSuffix: c ? a : "",
1865
1824
  // 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
1866
- pluginPackageName: l ? `${e}.ext` : e,
1867
- builtInVersions: s
1825
+ pluginPackageName: c ? `${e}.ext` : e,
1826
+ builtInVersions: u
1868
1827
  };
1869
- return console.info("[AddonProvider] Environment initialized:", r), r;
1828
+ return console.info("[AddonProvider] Environment initialized:", s), s;
1870
1829
  }
1871
- let de = A(Xe);
1872
- function Vt(e) {
1873
- de.value = e, ot(Je, de);
1830
+ let ue = A(Qe);
1831
+ function Dt(e) {
1832
+ ue.value = e, Le(Re, ue);
1874
1833
  }
1875
- function _() {
1834
+ function L() {
1876
1835
  var e;
1877
- return ((e = nt(Je, de)) == null ? void 0 : e.value) || Xe;
1836
+ return ((e = Ue(Re, ue)) == null ? void 0 : e.value) || Qe;
1878
1837
  }
1879
- async function Et(e) {
1838
+ async function Tt(e) {
1880
1839
  console.log("[AddonProvider] Sending GridTabs global config to Native:", e);
1881
1840
  try {
1882
- const i = await N.callNativeWithPromise("GridTabsConfigModule", "setDefaultConfig", JSON.stringify(e));
1883
- return console.log("[AddonProvider] Received response from Native:", i), !!(i && i.success);
1884
- } catch (i) {
1885
- return console.error("[AddonProvider] Failed to initialize GridTabs global config:", i), !1;
1841
+ const a = await I.callNativeWithPromise("GridTabsConfigModule", "setDefaultConfig", JSON.stringify(e));
1842
+ return console.log("[AddonProvider] Received response from Native:", a), !!(a && a.success);
1843
+ } catch (a) {
1844
+ return console.error("[AddonProvider] Failed to initialize GridTabs global config:", a), !1;
1886
1845
  }
1887
1846
  }
1888
- async function xt(e) {
1847
+ async function It(e) {
1889
1848
  console.log("[AddonProvider] Sending ExtraUI global theme config to Native:", e);
1890
1849
  try {
1891
- const i = await N.callNativeWithPromise("ExtraUIConfigModule", "setThemeConfig", JSON.stringify(e));
1892
- return console.log("[AddonProvider] Received ExtraUI theme response from Native:", i), !!(i && i.success);
1893
- } catch (i) {
1894
- return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:", i), !1;
1850
+ const a = await I.callNativeWithPromise("ExtraUIConfigModule", "setThemeConfig", JSON.stringify(e));
1851
+ return console.log("[AddonProvider] Received ExtraUI theme response from Native:", a), !!(a && a.success);
1852
+ } catch (a) {
1853
+ return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:", a), !1;
1895
1854
  }
1896
1855
  }
1897
- async function Wt(e) {
1856
+ async function Mt(e) {
1898
1857
  console.log("[AddonProvider] Initializing global theme across all modules:", e);
1899
- const i = await xt(e), u = await Et({
1858
+ const a = await It(e), d = await Tt({
1900
1859
  themeConfig: {
1901
1860
  placeholderColor: e.placeholderColor,
1902
1861
  glowColor: e.glowColor || e.focusBackgroundColor,
@@ -1915,50 +1874,48 @@ async function Wt(e) {
1915
1874
  // 更多属性映射根据后续 Glint/GridTabs 支持情况添加
1916
1875
  }
1917
1876
  });
1918
- return i && u;
1877
+ return a && d;
1919
1878
  }
1920
- const jt = {
1879
+ const zt = {
1921
1880
  install: (e) => {
1922
- e.use(it), e.use(lt), e.use(rt), e.use(st), e.use(ct), e.use(ut), e.use(gt), e.use(ft), e.use(bt), e.use(pt), e.use(Ct), e.use(Nt), e.use(St);
1881
+ e.use(je), e.use(He), e.use(Ze), e.use(Ye), e.use(tt), e.use(nt), e.use(rt), e.use(ct), e.use(ft), e.use(mt), e.use(yt), e.use(Ct);
1923
1882
  }
1924
1883
  };
1925
1884
  export {
1926
- Je as ADDON_ENV_CONTEXT_KEY,
1885
+ Re as ADDON_ENV_CONTEXT_KEY,
1927
1886
  X as GridTabs,
1928
- it as GridTabsPlugin,
1929
- Te as HsvBackground,
1930
- ct as HsvBackgroundPlugin,
1931
- he as Keyboard,
1932
- lt as KeyboardPlugin,
1933
- xe as NaButton,
1934
- gt as NaButtonPlugin,
1935
- we as NaCheckbox,
1936
- Be as NaCheckboxGroup,
1937
- pt as NaCheckboxGroupPlugin,
1938
- ft as NaCheckboxPlugin,
1939
- Re as NaInputView,
1940
- St as NaInputViewPlugin,
1941
- $e as NaRadioGroup,
1942
- bt as NaRadioGroupPlugin,
1943
- qe as NaSettingSwitch,
1944
- Nt as NaSettingSwitchPlugin,
1945
- Oe as NaSwitcher,
1946
- Ct as NaSwitcherPlugin,
1947
- Ie as PortalItem,
1948
- st as PortalItemPlugin,
1949
- Ce as PortalPool,
1950
- rt as PortalPoolPlugin,
1951
- jt as QuickTVUINAddons,
1952
- Pt as QuickTVUINAddonsConfig,
1953
- Pe as SvgImage,
1954
- ut as SvgImagePlugin,
1955
- jt as default,
1956
- Ut as initAddonEnv,
1957
- xt as initExtraUIGlobalTheme,
1958
- Wt as initGlobalTheme,
1959
- Et as initGridTabsGlobalConfig,
1960
- Vt as provideAddonEnv,
1961
- _ as useAddonEnv,
1962
- _t as useGridTabs,
1963
- L as withAsyncPlugin
1887
+ je as GridTabsPlugin,
1888
+ he as HsvBackground,
1889
+ tt as HsvBackgroundPlugin,
1890
+ me as Keyboard,
1891
+ He as KeyboardPlugin,
1892
+ Ce as NaButton,
1893
+ rt as NaButtonPlugin,
1894
+ ke as NaCheckbox,
1895
+ Ie as NaCheckboxGroup,
1896
+ mt as NaCheckboxGroupPlugin,
1897
+ ct as NaCheckboxPlugin,
1898
+ Te as NaRadioGroup,
1899
+ ft as NaRadioGroupPlugin,
1900
+ Pe as NaSettingSwitch,
1901
+ Ct as NaSettingSwitchPlugin,
1902
+ Ne as NaSwitcher,
1903
+ yt as NaSwitcherPlugin,
1904
+ ye as PortalItem,
1905
+ Ye as PortalItemPlugin,
1906
+ be as PortalPool,
1907
+ Ze as PortalPoolPlugin,
1908
+ zt as QuickTVUINAddons,
1909
+ kt as QuickTVUINAddonsConfig,
1910
+ pe as SvgImage,
1911
+ nt as SvgImagePlugin,
1912
+ zt as default,
1913
+ Qt as initAddonEnv,
1914
+ It as initExtraUIGlobalTheme,
1915
+ Mt as initGlobalTheme,
1916
+ Tt as initGridTabsGlobalConfig,
1917
+ Dt as provideAddonEnv,
1918
+ L as useAddonEnv,
1919
+ Rt as useGridTabs,
1920
+ z as withAsyncPlugin
1964
1921
  };