@quicktvui/naddons 1.0.0-rc.0 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/GridTabs/GridTabs.vue.d.ts +50 -2
- package/dist/components/GridTabs/useGridTabs.d.ts +4 -1
- package/dist/components/SvgImage/SvgImage.vue.d.ts +26 -0
- package/dist/components/SvgImage/index.d.ts +13 -0
- package/dist/core/AddonProvider.d.ts +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/naddons.cjs.js +1 -1
- package/dist/naddons.es.js +727 -588
- package/package.json +1 -1
|
@@ -1,9 +1,57 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
protocolVersion?: string | undefined;
|
|
3
|
+
pageSpec?: string | undefined;
|
|
4
|
+
tabsData?: string | undefined;
|
|
5
|
+
actionPayload?: string | undefined;
|
|
6
|
+
}>>, {
|
|
2
7
|
getNativeNode: () => any;
|
|
3
|
-
|
|
8
|
+
dispatchAction: (...args: any[]) => void;
|
|
9
|
+
scrollToTop: (...args: any[]) => void;
|
|
10
|
+
getFocusState: (...args: any[]) => void;
|
|
11
|
+
getItemRect: (...args: any[]) => void;
|
|
12
|
+
requestFocus: (...args: any[]) => void;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
onTabSelected: (payload?: any) => void;
|
|
15
|
+
onTabNeedsData: (payload?: any) => void;
|
|
16
|
+
onLoadMore: (payload?: any) => void;
|
|
17
|
+
onScroll: (payload?: any) => void;
|
|
18
|
+
onScrollStateChanged: (payload?: any) => void;
|
|
19
|
+
onItemPresence: (payload?: any) => void;
|
|
20
|
+
onTabFocused: (payload?: any) => void;
|
|
21
|
+
onItemClick: (payload?: any) => void;
|
|
22
|
+
onItemLongClick: (payload?: any) => void;
|
|
23
|
+
onItemFocused: (payload?: any) => void;
|
|
24
|
+
onProtocolMismatch: (payload?: any) => void;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
26
|
+
protocolVersion?: string | undefined;
|
|
27
|
+
pageSpec?: string | undefined;
|
|
28
|
+
tabsData?: string | undefined;
|
|
29
|
+
actionPayload?: string | undefined;
|
|
30
|
+
}>>> & Readonly<{
|
|
31
|
+
onOnScroll?: ((payload?: any) => any) | undefined;
|
|
32
|
+
onOnTabSelected?: ((payload?: any) => any) | undefined;
|
|
33
|
+
onOnTabNeedsData?: ((payload?: any) => any) | undefined;
|
|
34
|
+
onOnLoadMore?: ((payload?: any) => any) | undefined;
|
|
35
|
+
onOnScrollStateChanged?: ((payload?: any) => any) | undefined;
|
|
36
|
+
onOnItemPresence?: ((payload?: any) => any) | undefined;
|
|
37
|
+
onOnTabFocused?: ((payload?: any) => any) | undefined;
|
|
38
|
+
onOnItemClick?: ((payload?: any) => any) | undefined;
|
|
39
|
+
onOnItemLongClick?: ((payload?: any) => any) | undefined;
|
|
40
|
+
onOnItemFocused?: ((payload?: any) => any) | undefined;
|
|
41
|
+
onOnProtocolMismatch?: ((payload?: any) => any) | undefined;
|
|
42
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
4
43
|
default?(_: {}): any;
|
|
5
44
|
}>;
|
|
6
45
|
export default _default;
|
|
46
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
47
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
48
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
49
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
50
|
+
} : {
|
|
51
|
+
type: import('vue').PropType<T[K]>;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
7
55
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
56
|
new (): {
|
|
9
57
|
$slots: S;
|
|
@@ -142,5 +142,8 @@ export interface UseGridTabsReturn<T extends GTTab = GTTab, I extends GTItem = G
|
|
|
142
142
|
getFocusState: () => Promise<any>;
|
|
143
143
|
getItemRect: (itemId: string) => Promise<any>;
|
|
144
144
|
requestFocus: (itemId: string) => void;
|
|
145
|
+
updatePageSpec: (partialSpec: any) => void;
|
|
146
|
+
reloadAll: (newSpec: any, newTabs: any[]) => void;
|
|
147
|
+
scrollToTop: () => void;
|
|
145
148
|
}
|
|
146
|
-
export declare function useGridTabs<T extends GTTab = GTTab, I extends GTItem = GTItem>(gridRef: any,
|
|
149
|
+
export declare function useGridTabs<T extends GTTab = GTTab, I extends GTItem = GTItem>(gridRef: any, initialConfig?: GTConfig): UseGridTabsReturn<T, I>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
src?: string | undefined;
|
|
3
|
+
tintColor?: string | undefined;
|
|
4
|
+
}>>, {
|
|
5
|
+
getNativeNode: () => any;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
src?: string | undefined;
|
|
8
|
+
tintColor?: string | undefined;
|
|
9
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
+
} : {
|
|
18
|
+
type: import('vue').PropType<T[K]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import SvgImage from './SvgImage.vue';
|
|
3
|
+
export declare const SvgImagePlugin: {
|
|
4
|
+
install: (app: App) => void;
|
|
5
|
+
};
|
|
6
|
+
export { SvgImage };
|
|
7
|
+
export default SvgImagePlugin;
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
interface GlobalComponents {
|
|
10
|
+
SvgImage: typeof SvgImage;
|
|
11
|
+
'qt-svg-image': typeof SvgImage;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -36,6 +36,6 @@ export declare function useAddonEnv(): AddonEnv;
|
|
|
36
36
|
* 初始化 GridTabs 的全局兜底配置。
|
|
37
37
|
* 允许设置全局的 themeConfig、loadingConfig 等,避免每个页面重复配置。
|
|
38
38
|
*
|
|
39
|
-
* @param config 全局配置对象 (如 { themeConfig: { placeholderColor: '#
|
|
39
|
+
* @param config 全局配置对象 (如 { themeConfig: { placeholderColor: '#282A32', glowColor: '#000000', outerBorderColor: '#FFFFFF' } })
|
|
40
40
|
*/
|
|
41
41
|
export declare function initGridTabsGlobalConfig(config: Record<string, any>): Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import { KeyboardPlugin, Keyboard } from './components/Keyboard';
|
|
|
5
5
|
import { PortalPoolPlugin, PortalPool } from './components/PortalPool';
|
|
6
6
|
import { PortalItemPlugin, PortalItem } from './components/PortalItem';
|
|
7
7
|
import { HsvBackgroundPlugin, HsvBackground } from './components/HsvBackground';
|
|
8
|
-
|
|
8
|
+
import { SvgImagePlugin, SvgImage } from './components/SvgImage';
|
|
9
|
+
export { GridTabsPlugin, GridTabs, KeyboardPlugin, Keyboard, PortalPoolPlugin, PortalPool, PortalItemPlugin, PortalItem, HsvBackgroundPlugin, HsvBackground, SvgImagePlugin, SvgImage };
|
|
9
10
|
export { withAsyncPlugin, QuickTVUINAddonsConfig } from './core/withAsyncPlugin';
|
|
10
11
|
export * from './core/AddonProvider';
|
|
11
12
|
import { App } from 'vue';
|
|
@@ -26,6 +27,8 @@ declare module '@vue/runtime-core' {
|
|
|
26
27
|
'qt-portal-item': typeof PortalItem;
|
|
27
28
|
HsvBackground: typeof HsvBackground;
|
|
28
29
|
'qt-hsv-background': typeof HsvBackground;
|
|
30
|
+
SvgImage: typeof SvgImage;
|
|
31
|
+
'qt-svg-image': typeof SvgImage;
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
declare module 'vue' {
|
|
@@ -41,5 +44,7 @@ declare module 'vue' {
|
|
|
41
44
|
'qt-portal-item': typeof PortalItem;
|
|
42
45
|
HsvBackground: typeof HsvBackground;
|
|
43
46
|
'qt-hsv-background': typeof HsvBackground;
|
|
47
|
+
SvgImage: typeof SvgImage;
|
|
48
|
+
'qt-svg-image': typeof SvgImage;
|
|
44
49
|
}
|
|
45
50
|
}
|
package/dist/naddons.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),x=require("@extscreen/es3-vue"),K=require("@extscreen/es3-core"),te="QtGridTabs",L=i.defineComponent({__name:"GridTabs",setup(o,{expose:s}){const f=i.ref(),b=B(),g=te+"_Plugin",r=(b.isPluginActive?g:te).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),m=q(r,b.pluginPackageName||"com.quicktvui.plugin.glintui","com.quicktvui.plugin.glintui.GlintPluginApp");return s({getNativeNode:()=>{var l,v;return((v=(l=f.value)==null?void 0:l.getNativeNode)==null?void 0:v.call(l))||f.value}}),(l,v)=>(i.openBlock(),i.createBlock(i.unref(m),i.mergeProps({ref_key:"nativeRef",ref:f},l.$attrs),{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},16))}});let j;var re;try{const o=require("@extscreen/es3-vue");j=o.registerElement||((re=o.default)==null?void 0:re.registerElement)}catch{}const ue={install:o=>{if(!globalThis.__QtGridTabs_registered)if(j){const s=(f,b)=>{j(f,{component:{name:b?"QtGridTabs_Plugin":"QtGridTabs",processEventData(g,y){const r=g.handler||g,m=y||(r==null?void 0:r.nativeParams)||{};return r&&(r.nativeEvent=m),r}}})};s("qt-grid-tabs",!1),s("qt-grid-tabs-plugin",!0),s("QtGridTabs",!1),s("QtGridTabs_Plugin",!0),s("gt-tabs",!1),s("gt-tabs-plugin",!0),globalThis.__QtGridTabs_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtGridTabs")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("GridTabs",L),o.component("qt-grid-tabs",L),o.component("gt-tabs",L)}};function he(o,s){const f=i.ref(""),b=i.shallowRef([]),g=i.shallowRef([]);let y=!1,r=!1;const m="__virtual_single_tab__";let l="",v=!1;const p=i.ref({}),I=n=>{const e=Array.isArray(n)?n:[n];if(r&&o.value){if(typeof o.value.dispatchAction=="function"){console.log("[useGridTabs] Calling Wrapper dispatchAction directly"),o.value.dispatchAction(e);return}let t=o.value;typeof o.value.getNativeNode=="function"?t=o.value.getNativeNode()||o.value:o.value.nativeRef&&(t=o.value.nativeRef),t?(console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"),x.Native.callUIFunction(t,"dispatchAction",[JSON.stringify(e)])):console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction")}},M=(n,e)=>{if(!n)return!1;let t=!0;return n.id||(console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`,n),t=!1),n.viewType||(console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): 卡片缺失必填字段 'viewType' (id: ${n.id||"未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`,n),t=!1),t},R=(n,e)=>{if(!n)return!1;let t=!0;return n.tabId||(console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`,n),t=!1),(n.title===void 0||n.title===null)&&console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${e}): Tab 缺失 'title' 字段 (tabId: ${n.tabId||"未知"}),导航栏可能显示为空。`,n),t},w=(n,e)=>{if(!n||n.length===0)return;C.clear();const t=n[0].hasOwnProperty("tabId")||n[0].hasOwnProperty("items")&&Array.isArray(n[0].items);y=e==="1d",e==="1d"&&t?console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`"):e==="2d"&&!t&&console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"),e==="1d"?n.forEach((a,c)=>M(a,`items.value[${c}]`)):n.forEach((a,c)=>{R(a,`tabs.value[${c}]`),a.items&&Array.isArray(a.items)&&a.items.forEach((d,u)=>M(d,`tabs.value[${c}].items[${u}]`))}),r=!0,O()},C=new Set,O=(n="unknown")=>{if(!r){console.warn("[useGridTabs] triggerRootUpdate skipped because isInitialized is false");return}let e={protocolVersion:"1.28.0",gridBasis:(s==null?void 0:s.gridBasis)??30,unitType:(s==null?void 0:s.unitType)??"px",contentConfig:(s==null?void 0:s.contentConfig)??(s==null?void 0:s.layoutConfig)??{box:{padding:[0,60,60,60]},navContentGapNormal:0,itemGap:24},navConfig:(s==null?void 0:s.navConfig)??{dock:"left",mode:"fixed",renderType:"smart-hybrid",box:{size:[200,0]},expandedBox:{size:[300,0]}},cacheConfig:(s==null?void 0:s.cacheConfig)??{offscreenPageLimit:1,prefetchOffset:2,preLoadEnabled:!1,strategy:"data_priority"},animationConfig:(s==null?void 0:s.animationConfig)??{duration:300,easing:"ease-out"},interactionStrategy:(s==null?void 0:s.interactionStrategy)??{defaultFocus:"nav",interceptBack:!0,backMode:"home-first",autoScrollToTop:!0,edgeScrollProtection:.5},focusConfig:(s==null?void 0:s.focusConfig)??{boundaryLock:{left:!1,right:!1,top:!1,bottom:!1}},themeConfig:s==null?void 0:s.themeConfig,referenceResolution:(s==null?void 0:s.referenceResolution)??{w:1920,h:1080}},t=[];y?(e.navConfig={...e.navConfig,renderType:"none"},t=[{tabId:m,title:"Virtual Tab",hidden:!0,items:g.value}]):t=b.value;const a=JSON.stringify({page_spec:e,tabs:t});if(f.value==="")console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${a.length})`),f.value=a,l=a;else{if(l===a){console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");return}console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${a.length})`),f.value=a,l=a,I({op:"RELOAD_TABS",payload:{pageSpec:e,page_spec:e,tabs:t}})}},h=n=>{if(!n||typeof n!="object"||n.__isGridTabsProxy)return n;n.content&&typeof n.content=="object"&&!n.content.__isGridTabsProxy&&(n.content=new Proxy(n.content,{set(t,a,c,d){const u=Reflect.set(t,a,c,d);return n.id&&r&&I({op:"UPDATE_ITEM",itemId:n.id,payload:n}),u}}),Object.defineProperty(n.content,"__isGridTabsProxy",{value:!0,enumerable:!1}),Object.defineProperty(n.content,"__v_skip",{value:!0,enumerable:!1})),n.subItems&&Array.isArray(n.subItems)&&!n.subItems.__isGridTabsProxy&&(n.subItems=T(n.subItems,n.id),Object.defineProperty(n.subItems,"__isGridTabsProxy",{value:!0,enumerable:!1}),Object.defineProperty(n.subItems,"__v_skip",{value:!0,enumerable:!1}));const e=new Proxy(n,{set(t,a,c,d){const u=Reflect.set(t,a,c,d);return t.id&&r&&!v&&I({op:"UPDATE_ITEM",itemId:t.id,payload:t}),u}});return Object.defineProperty(e,"__isGridTabsProxy",{value:!0,enumerable:!1}),Object.defineProperty(e,"__v_skip",{value:!0,enumerable:!1}),e},T=(n,e)=>{for(let t=0;t<n.length;t++)n[t]=h(n[t]);return new Proxy(n,{get(t,a,c){return a==="push"?(...d)=>{d.forEach((G,U)=>M(G,`push(${U})`)),r||console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");const u=d.map(G=>h(G)),P=Array.prototype.push.apply(t,u);return v||I({op:"APPEND_SUB_ITEMS",itemId:e,payload:{subItems:u}}),P}:a==="unshift"?(...d)=>{d.forEach((G,U)=>M(G,`unshift(${U})`)),r||console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");const u=d.map(G=>h(G)),P=Array.prototype.unshift.apply(t,u);return r&&u.length>0&&!v&&I({op:"PREPEND_SUB_ITEMS",itemId:e,payload:{subItems:u}}),P}:a==="splice"?(...d)=>{const u=d.length>=2&&d[0]===0&&d[1]===t.length,P=Array.prototype.splice.apply(t,d);return r&&u&&e!==m?v||I({op:"CLEAR_SUB_ITEMS",itemId:e}):r&&(v||O("items array spliced")),P}:Reflect.get(t,a,c)},set(t,a,c,d){if(a!=="length"&&!isNaN(Number(a))){r||console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(a)}]。请先对 items.value 或 tabs.value 进行全量赋值!`),M(c,`索引赋值 [${String(a)}]`);const u=h(c),P=Reflect.set(t,a,u,d);return u&&u.id&&!v&&I({op:"UPDATE_ITEM",itemId:u.id,payload:u}),P}return Reflect.set(t,a,c,d)}})},k=n=>(n.items&&Array.isArray(n.items)&&!n.items.__isGridTabsProxy&&(n.items=T(n.items,n.tabId),Object.defineProperty(n.items,"__isGridTabsProxy",{value:!0,enumerable:!1})),new Proxy(n,{set(e,t,a,c){if(t==="items"){let u=a;return Array.isArray(a)&&!a.__isGridTabsProxy&&(u=T(a,e.tabId),Object.defineProperty(u,"__isGridTabsProxy",{value:!0,enumerable:!1})),Reflect.set(e,t,u,c)}else if(t==="loadState"){const u=Reflect.set(e,t,a,c);return r&&e.tabId&&!v&&I({op:"UPDATE_TAB_STATE",itemId:e.tabId,payload:{loadState:a}}),u}return Reflect.set(e,t,a,c)}})),E=n=>{const e=n.map(t=>k(t));return new Proxy(e,{set(t,a,c,d){if(a!=="length"&&!isNaN(Number(a))){let u=c;c.__isGridTabsProxy||(u=k(c),Object.defineProperty(u,"__isGridTabsProxy",{value:!0,enumerable:!1}));const P=Reflect.set(t,a,u,d);return O(),P}return Reflect.set(t,a,c,d)}})};i.watch(b,(n,e)=>{if(console.log("[useGridTabs] watch(tabs) triggered:",{newTabs:n,isInitialized:r}),!n||n.length===0){f.value="",l="",r=!1;return}if(n.__isGridTabsProxy)console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"),O();else{console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");const t=E(n);Object.defineProperty(t,"__isGridTabsProxy",{value:!0,enumerable:!1}),w(t,"2d"),b.value=t}},{flush:"sync",deep:!1}),i.watch(g,(n,e)=>{if(console.log("[useGridTabs] watch(items) triggered:",{newItems:n,isInitialized:r}),!n||n.length===0){f.value="",l="",r=!1;return}if(n.__isGridTabsProxy)console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"),O();else{console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");const t=T(n,m);Object.defineProperty(t,"__isGridTabsProxy",{value:!0,enumerable:!1}),w(t,"1d"),g.value=t}},{flush:"sync",deep:!1});const A={},_=()=>{console.log("[useGridTabs] resetInitialization called manually"),r=!1,C.clear();for(const n in A)delete A[n]},S=n=>{if(!n||n.length===0){f.value="",r=!1;return}n[0].hasOwnProperty("tabId")||n[0].hasOwnProperty("items")&&Array.isArray(n[0].items)?b.value=n:g.value=n},$=n=>{p.value=n},N=i.computed(()=>({tabsData:f.value,onTabNeedsData:async(...n)=>{let e=n[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),!p.value.onTabNeedsData)return;const{tabId:t,index:a,reason:c}=e;if(C.has(t)){console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${t} 已经发起过请求,防止死循环`);return}C.add(t);try{const d=await p.value.onTabNeedsData(t,a,c);if(d&&Array.isArray(d))if(A[t]=1,d.length>0){const u=b.value.find(P=>P.tabId===t);u&&(u.items?u.items.length>0&&u.items.splice(0,u.items.length):u.items=[],u.items.push(...d),u.loadState="ready",I({op:"UPDATE_TAB_STATE",itemId:t,payload:{loadState:"ready"}}))}else console.warn(`[useGridTabs] ⚠️ 警告: onTabNeedsData(tabId="${t}") 返回了空数组 []!`),console.warn("👉 如果你已经在此函数内手动调用了 push() 来追加数据,请在最后 return null 或 undefined。"),console.warn("👉 如果该 Tab 确实没有数据,返回 [] 可能会导致底层的 Header 等已有元素被清空,请注意检查。"),console.warn("👉 框架已为您拦截此次空数组覆盖,保留了当前的 DOM 结构。")}catch(d){console.error("[useGridTabs] onTabNeedsData 执行失败:",d),C.delete(t)}},onLoadMore:async(...n)=>{let e=n[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),!p.value.onLoadMore)return;const{tabId:t,itemId:a}=e,d=(A[t]||1)+1;console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${t}, pageNo=${d}`);try{const u=await p.value.onLoadMore(t,d,a);if(u&&Array.isArray(u))if(u.length>0)if(A[t]=d,y)g.value.push(...u);else{const P=b.value.find(G=>G.tabId===t);P&&P.items&&P.items.push(...u)}else console.warn(`[useGridTabs] ⚠️ 警告: onLoadMore(tabId="${t}", pageNo="${d}") 返回了空数组 []!`),console.warn('👉 如果这是你的最后一页数据,推荐在卡片列表中追加一个 type="no_more" 的 footer 卡片,而不是仅仅返回空。'),console.warn("👉 框架已忽略本次空数据追加,且不会自增页码。")}catch(u){console.error("[useGridTabs] onLoadMore 业务层请求失败:",u)}},onItemPresence:(...n)=>{let e=n[0];if(console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:",e),p.value.onItemPresence)try{let t=typeof e=="string"?e:(e==null?void 0:e.nativeEvent)||e;t&&typeof t.data=="string"&&(t=t.data);const a=typeof t=="string"?JSON.parse(t):t;a&&a.type==="VIEW_PRESENCE_BATCH"&&Array.isArray(a.payload)?a.payload.forEach(c=>{c.itemId&&typeof c.itemId=="string"&&c.itemId.startsWith("fallback_pos_")&&console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${c.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`),p.value.onItemPresence(c)}):p.value.onItemPresence(a)}catch(t){console.error("[useGridTabs] Failed to parse onItemPresence event payload:",t),p.value.onItemPresence(e)}},onTabSelected:(...n)=>{let e=n[0];e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onTabSelected&&p.value.onTabSelected(e)},onItemClick:(...n)=>{let e=n[0];if(console.log("[useGridTabs] RAW onItemClick intercepted from Native:",e),e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onItemClick)try{let t=typeof e=="string"?e:(e==null?void 0:e.data)||e;const a=typeof t=="string"?JSON.parse(t):t;p.value.onItemClick(a)}catch(t){console.error("[useGridTabs] Failed to parse onItemClick event payload:",t),p.value.onItemClick(e)}else console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!")},onItemLongClick:(...n)=>{let e=n[0];if(console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:",e),typeof e=="number"&&n.length>=3&&typeof n[1]=="string"&&(e=n[2]),e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onItemLongClick)try{let t=typeof e=="string"?e:(e==null?void 0:e.data)||e;const a=typeof t=="string"?JSON.parse(t):t;p.value.onItemLongClick(a)}catch(t){console.error("[useGridTabs] Failed to parse onItemLongClick event payload:",t),p.value.onItemLongClick(e)}},onItemFocused:(...n)=>{let e=n[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onItemFocused)try{let t=typeof e=="string"?e:(e==null?void 0:e.data)||e;const a=typeof t=="string"?JSON.parse(t):t;p.value.onItemFocused(a)}catch(t){console.error("[useGridTabs] Failed to parse onItemFocused event payload:",t),p.value.onItemFocused(e)}},onTabFocused:(...n)=>{let e=n[0];e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onTabFocused&&p.value.onTabFocused(e)},onScroll:(...n)=>{let e=n[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onScroll)try{const t=(e==null?void 0:e.data)||e;p.value.onScroll(t)}catch{p.value.onScroll(e)}},onScrollStateChanged:(...n)=>{let e=n[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),p.value.onScrollStateChanged)try{const t=(e==null?void 0:e.data)||e;p.value.onScrollStateChanged(t)}catch{p.value.onScrollStateChanged(e)}}}));return{tabsDataStr:f,bindings:N,tabs:b,items:g,initData:S,setCallbacks:$,updateItem:(n,e)=>{if(!r){console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");return}I({op:"UPDATE_ITEM",itemId:n,payload:e}),v=!0;try{if(y){const t=g.value.find(a=>a.id===n);t&&Object.assign(t,e)}else for(const t of b.value)if(t.items){const a=t.items.find(c=>c.id===n);if(a){Object.assign(a,e);break}}}finally{v=!1}},deleteItem:(n,e=!0)=>{if(r){I({op:"DELETE_ITEM",itemId:n,payload:{animated:e}}),v=!0;try{if(y){const t=g.value.findIndex(a=>a.id===n);t!==-1&&g.value.splice(t,1)}else for(const t of b.value)if(t.items){const a=t.items.findIndex(c=>c.id===n);if(a!==-1){t.items.splice(a,1);break}}}finally{v=!1}}},prependItems:(n,e)=>{if(r){I({op:"PREPEND_SUB_ITEMS",itemId:n,payload:{subItems:e}}),v=!0;try{if(y)g.value.unshift(...e);else{const t=b.value.find(a=>a.tabId===n);t&&t.items&&t.items.unshift(...e)}}finally{v=!1}}},clearItems:n=>{if(r){I({op:"CLEAR_SUB_ITEMS",itemId:n}),v=!0;try{if(y)g.value.splice(0,g.value.length);else{const e=b.value.find(t=>t.tabId===n);e&&e.items&&e.items.splice(0,e.items.length)}}finally{v=!1}}},moveItem:(n,e,t)=>{if(r){I({op:"MOVE_ITEM",itemId:n,payload:{targetPosition:e,anchorItemId:t}}),v=!0;try{const a=c=>{const d=c.findIndex(P=>P.id===n),u=c.findIndex(P=>P.id===t);if(d!==-1&&u!==-1){const P=c.splice(d,1)[0],G=c.findIndex(me=>me.id===t),U=e==="after"?G+1:G;c.splice(U,0,P)}};if(y)a(g.value);else for(const c of b.value)c.items&&a(c.items)}finally{v=!1}}},replaceItem:(n,e)=>{if(r){I({op:"REPLACE_ITEM",itemId:n,payload:e}),v=!0;try{if(y){const t=g.value.findIndex(a=>a.id===n);t!==-1&&(g.value[t]=e)}else for(const t of b.value)if(t.items){const a=t.items.findIndex(c=>c.id===n);if(a!==-1){t.items[a]=e;break}}}finally{v=!1}}},dispatchAction:I,resetInitialization:_,getFocusState:async()=>new Promise((n,e)=>{let t=o.value;typeof o.value.getNativeNode=="function"?t=o.value.getNativeNode()||o.value:o.value.nativeRef&&(t=o.value.nativeRef),console.log("[useGridTabs] getFocusState called, nativeTarget:",t);const a=c=>{if(console.log("[useGridTabs] getFocusState callback received:",c),c&&c.isSuccess!==void 0&&c.result!==void 0){n(c.result);return}try{const d=typeof c=="string"?JSON.parse(c):c;n(d)}catch(d){e(d)}};typeof x.Native.callUIFunction=="function"?(console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'),x.Native.callUIFunction(t,"getFocusState",[],a)):(console.error("[useGridTabs] Native.callUIFunction is not available"),e(new Error("Native.callUIFunction is not available")))}),getItemRect:async n=>new Promise((e,t)=>{let a=o.value;typeof o.value.getNativeNode=="function"?a=o.value.getNativeNode()||o.value:o.value.nativeRef&&(a=o.value.nativeRef),console.log(`[useGridTabs] getItemRect called for itemId=${n}, nativeTarget:`,a);const c=d=>{if(console.log(`[useGridTabs] getItemRect callback received for itemId=${n}:`,d),d&&d.isSuccess!==void 0&&d.result!==void 0){e(d.result);return}try{const u=typeof d=="string"?JSON.parse(d):d;e(u)}catch(u){t(u)}};typeof x.Native.callUIFunction=="function"?(console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'),x.Native.callUIFunction(a,"getItemRect",[n],c)):(console.error("[useGridTabs] Native.callUIFunction is not available"),t(new Error("Native.callUIFunction is not available")))}),requestFocus:n=>{let e=o.value;typeof o.value.getNativeNode=="function"?e=o.value.getNativeNode()||o.value:o.value.nativeRef&&(e=o.value.nativeRef),x.Native.callUIFunction(e,"requestFocus",[n])}}}const ne="QtKeyboard",V=i.defineComponent({__name:"Keyboard",props:{backgroundColor:{},backgroundGradient:{},textColor:{},weakTextColor:{},focusBackgroundColor:{},focusTextColor:{},placeholder:{},textFullKeyboard:{},textT9Keyboard:{},keyboardType:{},textClear:{},textDelete:{},currentInput:{},autofocus:{type:Boolean},rememberKeyboardType:{type:Boolean}},emits:["onInputChanged","onKeyPressed"],setup(o,{expose:s}){const f=i.ref(),b=B(),g=ne+"_Plugin",r=(b.isPluginActive?g:ne).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),m=q(r,b.pluginPackageName||"com.quicktvui.plugin.extraui","com.quicktvui.plugin.extraui.ExtraUIPluginApp");return s({getNativeNode:()=>{var l,v;return((v=(l=f.value)==null?void 0:l.getNativeNode)==null?void 0:v.call(l))||f.value},requestFocus:(...l)=>{var p,I;const v=((I=(p=f.value)==null?void 0:p.getNativeNode)==null?void 0:I.call(p))||f.value;v&&x.Native.callUIFunction(v,"requestFocus",l)}}),(l,v)=>(i.openBlock(),i.createBlock(i.unref(m),i.mergeProps({ref_key:"nativeRef",ref:f,backgroundColor:o.backgroundColor,backgroundGradient:o.backgroundGradient,textColor:o.textColor,weakTextColor:o.weakTextColor,focusBackgroundColor:o.focusBackgroundColor,focusTextColor:o.focusTextColor,placeholder:o.placeholder,textFullKeyboard:o.textFullKeyboard,textT9Keyboard:o.textT9Keyboard,keyboardType:o.keyboardType,textClear:o.textClear,textDelete:o.textDelete,currentInput:o.currentInput,autofocus:o.autofocus,rememberKeyboardType:o.rememberKeyboardType,onOnInputChanged:v[0]||(v[0]=p=>l.$emit("onInputChanged",p.nativeEvent)),onOnKeyPressed:v[1]||(v[1]=p=>l.$emit("onKeyPressed",p.nativeEvent))},l.$attrs),{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},16,["backgroundColor","backgroundGradient","textColor","weakTextColor","focusBackgroundColor","focusTextColor","placeholder","textFullKeyboard","textT9Keyboard","keyboardType","textClear","textDelete","currentInput","autofocus","rememberKeyboardType"]))}});let W;var ie;try{const o=require("@extscreen/es3-vue");W=o.registerElement||((ie=o.default)==null?void 0:ie.registerElement)}catch{}const de={install:o=>{if(!globalThis.__QtKeyboard_registered)if(W){const s=(f,b)=>{W(f,{component:{name:b?"QtKeyboard_Plugin":"QtKeyboard",processEventData(g,y){const r=g.handler||g,m=y||(r==null?void 0:r.nativeParams)||{};return r&&(r.nativeEvent=m),r}}})};s("qt-keyboard",!1),s("qt-keyboard-plugin",!0),s("QtKeyboard",!1),s("QtKeyboard_Plugin",!0),globalThis.__QtKeyboard_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtKeyboard")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("Keyboard",V),o.component("qt-keyboard",V)}},oe="QtPortalPool",z=i.defineComponent({__name:"PortalPool",setup(o,{expose:s}){const f=i.ref(),b=B(),g=oe+"_Plugin",r=(b.isPluginActive?g:oe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),m=q(r,b.pluginPackageName||"com.quicktvui.plugin.glintui");return s({getNativeNode:()=>{var l,v;return((v=(l=f.value)==null?void 0:l.getNativeNode)==null?void 0:v.call(l))||f.value}}),(l,v)=>(i.openBlock(),i.createBlock(i.unref(m),i.mergeProps({ref_key:"nativeRef",ref:f},l.$attrs),{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},16))}});let Z;var le;try{const o=require("@extscreen/es3-vue");Z=o.registerElement||((le=o.default)==null?void 0:le.registerElement)}catch{}const ve={install:o=>{if(!globalThis.__QtPortalPool_registered)if(Z){const s=(f,b)=>{Z(f,{component:{name:b?"QtPortalPool_Plugin":"QtPortalPool",processEventData(g,y){const r=g.handler||g,m=y||(r==null?void 0:r.nativeParams)||{};return r&&(r.nativeEvent=m),r}}})};s("qt-portal-pool",!1),s("qt-portal-pool-plugin",!0),s("QtPortalPool",!1),s("QtPortalPool_Plugin",!0),globalThis.__QtPortalPool_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtPortalPool")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("PortalPool",z),o.component("qt-portal-pool",z)}},se="QtPortalItem",H=i.defineComponent({__name:"PortalItem",props:{portalId:{}},setup(o,{expose:s}){const f=i.ref(),b=B(),g=se+"_Plugin",r=(b.isPluginActive?g:se).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),m=q(r,b.pluginPackageName||"com.quicktvui.plugin.glintui");return s({getNativeNode:()=>{var l,v;return((v=(l=f.value)==null?void 0:l.getNativeNode)==null?void 0:v.call(l))||f.value}}),(l,v)=>(i.openBlock(),i.createBlock(i.unref(m),i.mergeProps({ref_key:"nativeRef",ref:f,portalId:o.portalId},l.$attrs),{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},16,["portalId"]))}});let J;var ce;try{const o=require("@extscreen/es3-vue");J=o.registerElement||((ce=o.default)==null?void 0:ce.registerElement)}catch{}const fe={install:o=>{if(!globalThis.__QtPortalItem_registered)if(J){const s=(f,b)=>{J(f,{component:{name:b?"QtPortalItem_Plugin":"QtPortalItem",processEventData(g,y){const r=g.handler||g,m=y||(r==null?void 0:r.nativeParams)||{};return r&&(r.nativeEvent=m),r}}})};s("qt-portal-item",!1),s("qt-portal-item-plugin",!0),s("QtPortalItem",!1),s("QtPortalItem_Plugin",!0),globalThis.__QtPortalItem_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtPortalItem")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("PortalItem",H),o.component("qt-portal-item",H)}},ae="QtHsvBackground",Y=i.defineComponent({__name:"HsvBackground",props:{hue:{default:-2}},setup(o,{expose:s}){const f=i.ref(),b=B(),g=ae+"_Plugin",r=(b.isPluginActive?g:ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),m=q(r,b.pluginPackageName||"com.quicktvui.plugin.glintui");return s({getNativeNode:()=>{var l,v;return((v=(l=f.value)==null?void 0:l.getNativeNode)==null?void 0:v.call(l))||f.value}}),(l,v)=>(i.openBlock(),i.createBlock(i.unref(m),i.mergeProps({ref_key:"nativeRef",ref:f,hue:o.hue},l.$attrs),{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},16,["hue"]))}}),ge={install(o){o.component("qt-hsv-background",Y),o.component("HsvBackground",Y)}},pe={skipPluginCheck:!1},Q=new Set;function q(o,s,f){return i.defineComponent({name:`${o}AsyncWrapper`,inheritAttrs:!1,props:{skipPluginCheck:{type:Boolean,default:!1}},setup(b,{slots:g,attrs:y,expose:r}){const m=i.ref("loading"),l=i.ref(""),v=i.ref(),p=globalThis.__VUE_INSTANCE__;r({getNativeNode:()=>{let h=v.value;return!h&&p&&p.vnode&&p.vnode.el&&(h=p.vnode.el,h.childNodes&&h.childNodes.length>0&&(h=h.childNodes[0])),h},nativeRef:v});let R=null,w=null;try{R=K.useES(),w=K.useESPlugin()}catch(h){console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。",h)}const C=async()=>{if(!R||typeof R.isComponentRegistered!="function")return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"),!1;try{const h=await R.isComponentRegistered(o);if(console.log(`[withAsyncPlugin] isComponentRegistered('${o}') 返回:`,h),h===!0||h&&typeof h=="object"&&(h.registered===!0||h.isRegistered===!0))return!0;try{const T=await x.Native.callNativeWithPromise("ExtendModule","getCoreSDKInfo");if(T&&T.core_version){const k=T.core_version;console.log(`[withAsyncPlugin] 当前引擎核心版本: ${k}`);const E=k.split(".").map(A=>parseInt(A,10));if(E.length>=3&&!isNaN(E[0])&&!isNaN(E[1])&&!isNaN(E[2]))if(E[0]*1e6+E[1]*1e3+E[2]>=1011205){console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${o}`);const _=o.split("-").map(N=>N.charAt(0).toUpperCase()+N.slice(1)).join("");console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${o}, ${_}`);const[S,$]=await Promise.all([x.Native.callNativeWithPromise("ExtendModule","isComponentRegistered",o).catch(()=>!1),x.Native.callNativeWithPromise("ExtendModule","isComponentRegistered",_).catch(()=>!1)]);if(console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${S}, ${$}]`),S===!0||$===!0)return!0}else console.log(`[withAsyncPlugin] 引擎版本 ${k} < 1.11.205,跳过 ExtendModule 检查`);else console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${k}`)}}catch(T){console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:",T)}return!1}catch(h){return console.warn("[withAsyncPlugin] 检查组件注册状态异常:",h),!1}},O=async()=>{if(pe.skipPluginCheck||b.skipPluginCheck){console.log(`[withAsyncPlugin] 跳过 ${o} 插件检查 (skipPluginCheck = true)`),m.value="ready";return}if(!s){m.value="ready";return}const h=await C();if(console.log(`[withAsyncPlugin] 拦截检查 - ${o} 是否已注册:`,h),h||Q.has(s)){m.value="ready",Q.add(s),console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");return}if(!w){console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`),m.value="ready";return}console.log(`[withAsyncPlugin] 开始动态安装插件: ${s}`);try{await new Promise((T,k)=>{let E;const A={onPluginInstallSuccess(_,S,$){_===s&&(clearTimeout(E),w.removeListener(A),console.log(`[withAsyncPlugin] 安装成功 pkg=${_} 状态码=${S}`),S==1003||S==1001?(f?(console.log(`[withAsyncPlugin] 触发反射初始化: ${f}`),x.Native.callNative("EsNativeModule","callReflect",{entry:{from:f,method:"setup"}})):console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"),T()):k(new Error(`安装失败 pkg=${_} status=${S} msg=${$}`)))},onPluginInstallError(_,S,$){_===s&&(clearTimeout(E),w.removeListener(A),k(new Error(`安装失败 pkg=${_} status=${S} msg=${$}`)))}};w.addListener({pkg:s},A),E=setTimeout(()=>{w.removeListener(A),k(new Error(`插件安装超时: ${s}`))},8e3),typeof w.installPlugin=="function"?w.installPlugin({pkg:s}):typeof w.install=="function"?w.install(s):k(new Error("当前运行时不支持 install / installPlugin"))}),await i.nextTick(),Q.add(s),m.value="ready"}catch(T){console.error("[withAsyncPlugin] 插件加载失败:",T),l.value=(T==null?void 0:T.message)||String(T),m.value="error"}};return i.onMounted(()=>{O()}),()=>{const h={display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",...y.style||{}};y.width!==void 0&&!h.width&&(h.width=typeof y.width=="number"?`${y.width}px`:y.width),y.height!==void 0&&!h.height&&(h.height=typeof y.height=="number"?`${y.height}px`:y.height);const T=y.class?`qt-plugin-container ${y.class}`:"qt-plugin-container",k={class:T,style:h,clipChildren:!1,clipPadding:!1,clipToPadding:!1};if(m.value==="loading")return i.h("div",k,[i.h("div",{style:{color:"white",fontSize:"30px"}},"插件加载中...")]);if(m.value==="error")return i.h("div",k,[i.h("div",{style:{color:"white",fontSize:"30px",backgroundColor:"rgba(255,0,0,0.5)"}},`插件加载失败: ${l.value}`)]);const E={},A={};for(const[N,D]of Object.entries(y))if(N.startsWith("on")&&typeof D=="function"){let F=N;N.startsWith("onOn")&&(F="on"+N.slice(4)),A[F]=D}else if(N.startsWith("on")&&Array.isArray(D)){let F=N;N.startsWith("onOn")&&(F="on"+N.slice(4)),A[F]=D}else N.startsWith("onOn")||(E[N]=D);const _={...E,...A,class:T,style:h,ref:N=>{v.value=N}},S=_.tabsData||"",$=_.actionPayload||"";return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:",Object.keys(_),"tabsData.length=",S.length,"actionPayload.length=",$.length),i.h(o,_,g.default?g.default():[])}}})}const ee=Symbol("AddonEnvContext"),be={isPluginActive:!1,nameSuffix:"",pluginPackageName:"com.quicktvui.plugin.glintui",builtInVersions:{}};async function Pe(o="com.quicktvui.plugin.glintui",s="_Plugin"){const f=K.useES();let b={};try{const l=await x.Native.callNativeModule("AddonEnvModule","getBuiltInVersions",[]);l&&typeof l=="object"&&(b=l)}catch(l){console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule",l)}const g=`QtGridTabs${s}`,y=f.isComponentRegistered(g),r=y instanceof Promise?await y:y,m={isPluginActive:r,nameSuffix:r?s:"",pluginPackageName:r?`${o}.ext`:o,builtInVersions:b};return console.info("[AddonProvider] Environment initialized:",m),m}let X=i.ref(be);function Te(o){X.value=o,i.provide(ee,X)}function B(){var o;return((o=i.inject(ee,X))==null?void 0:o.value)||be}async function Ie(o){console.log("[AddonProvider] Sending GridTabs global config to Native:",o);try{const s=await x.Native.callNativeWithPromise("GridTabsConfigModule","setDefaultConfig",JSON.stringify(o));return console.log("[AddonProvider] Received response from Native:",s),!!(s&&s.success)}catch(s){return console.error("[AddonProvider] Failed to initialize GridTabs global config:",s),!1}}const ye={install:o=>{o.use(ue),o.use(de),o.use(ve),o.use(fe),o.use(ge)}};exports.ADDON_ENV_CONTEXT_KEY=ee;exports.GridTabs=L;exports.GridTabsPlugin=ue;exports.HsvBackground=Y;exports.HsvBackgroundPlugin=ge;exports.Keyboard=V;exports.KeyboardPlugin=de;exports.PortalItem=H;exports.PortalItemPlugin=fe;exports.PortalPool=z;exports.PortalPoolPlugin=ve;exports.QuickTVUINAddons=ye;exports.QuickTVUINAddonsConfig=pe;exports.default=ye;exports.initAddonEnv=Pe;exports.initGridTabsGlobalConfig=Ie;exports.provideAddonEnv=Te;exports.useAddonEnv=B;exports.useGridTabs=he;exports.withAsyncPlugin=q;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),A=require("@extscreen/es3-vue"),j=require("@extscreen/es3-core"),oe="QtGridTabs",B=c.defineComponent({__name:"GridTabs",props:{protocolVersion:{},pageSpec:{},tabsData:{},actionPayload:{}},emits:["onTabSelected","onTabNeedsData","onLoadMore","onScroll","onScrollStateChanged","onItemPresence","onTabFocused","onItemClick","onItemLongClick","onItemFocused","onProtocolMismatch"],setup(o,{expose:d}){const u=c.ref(),r=q(),y=oe+"_Plugin",f=(r.isPluginActive?y:oe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),v=D(f,r.pluginPackageName||"com.quicktvui.plugin.glintui");return d({getNativeNode:()=>{var a,l;return((l=(a=u.value)==null?void 0:a.getNativeNode)==null?void 0:l.call(a))||u.value},dispatchAction:(...a)=>{var s,P;const l=((P=(s=u.value)==null?void 0:s.getNativeNode)==null?void 0:P.call(s))||u.value;if(l)if(a.length>0){let h=a[0];typeof h=="object"&&(h=JSON.stringify(h)),A.Native.callUIFunction(l,"dispatchAction",[h])}else A.Native.callUIFunction(l,"dispatchAction",a)},scrollToTop:(...a)=>{var s,P;const l=((P=(s=u.value)==null?void 0:s.getNativeNode)==null?void 0:P.call(s))||u.value;l&&A.Native.callUIFunction(l,"scrollToTop",a)},getFocusState:(...a)=>{var s,P;const l=((P=(s=u.value)==null?void 0:s.getNativeNode)==null?void 0:P.call(s))||u.value;l&&A.Native.callUIFunction(l,"getFocusState",a)},getItemRect:(...a)=>{var s,P;const l=((P=(s=u.value)==null?void 0:s.getNativeNode)==null?void 0:P.call(s))||u.value;l&&A.Native.callUIFunction(l,"getItemRect",a)},requestFocus:(...a)=>{var s,P;const l=((P=(s=u.value)==null?void 0:s.getNativeNode)==null?void 0:P.call(s))||u.value;l&&A.Native.callUIFunction(l,"requestFocus",a)}}),(a,l)=>(c.openBlock(),c.createBlock(c.unref(v),c.mergeProps({ref_key:"nativeRef",ref:u,protocolVersion:o.protocolVersion,pageSpec:o.pageSpec,tabsData:o.tabsData,actionPayload:o.actionPayload,onOnTabSelected:l[0]||(l[0]=s=>a.$emit("onTabSelected",s.nativeEvent)),onOnTabNeedsData:l[1]||(l[1]=s=>a.$emit("onTabNeedsData",s.nativeEvent)),onOnLoadMore:l[2]||(l[2]=s=>a.$emit("onLoadMore",s.nativeEvent)),onOnScroll:l[3]||(l[3]=s=>a.$emit("onScroll",s.nativeEvent)),onOnScrollStateChanged:l[4]||(l[4]=s=>a.$emit("onScrollStateChanged",s.nativeEvent)),onOnItemPresence:l[5]||(l[5]=s=>a.$emit("onItemPresence",s.nativeEvent)),onOnTabFocused:l[6]||(l[6]=s=>a.$emit("onTabFocused",s.nativeEvent)),onOnItemClick:l[7]||(l[7]=s=>a.$emit("onItemClick",s.nativeEvent)),onOnItemLongClick:l[8]||(l[8]=s=>a.$emit("onItemLongClick",s.nativeEvent)),onOnItemFocused:l[9]||(l[9]=s=>a.$emit("onItemFocused",s.nativeEvent)),onOnProtocolMismatch:l[10]||(l[10]=s=>a.$emit("onProtocolMismatch",s.nativeEvent))},a.$attrs),{default:c.withCtx(()=>[c.renderSlot(a.$slots,"default")]),_:3},16,["protocolVersion","pageSpec","tabsData","actionPayload"]))}});let K;var ce;try{const o=require("@extscreen/es3-vue");K=o.registerElement||((ce=o.default)==null?void 0:ce.registerElement)}catch{}const ge={install:o=>{if(!globalThis.__QtGridTabs_registered)if(K){const d=(u,r)=>{K(u,{component:{name:r?"QtGridTabs_Plugin":"QtGridTabs",processEventData(y,b){const f=y.handler||y,v=b||(f==null?void 0:f.nativeParams)||{};return f&&(f.nativeEvent=v),f}}})};d("qt-grid-tabs",!1),d("qt-grid-tabs-plugin",!0),d("QtGridTabs",!1),d("QtGridTabs_Plugin",!0),d("gt-tabs",!1),d("gt-tabs-plugin",!0),globalThis.__QtGridTabs_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtGridTabs")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("GridTabs",B),o.component("qt-grid-tabs",B),o.component("gt-tabs",B)}};function Ee(o,d){const u=c.ref(""),r=d?JSON.parse(JSON.stringify(d)):{},y=c.shallowRef([]),b=c.shallowRef([]);let f=!1,v=!1;const a="__virtual_single_tab__";let l="",s=!1;const P=c.ref({}),h=t=>{const e=Array.isArray(t)?t:[t];if(v&&o.value){if(typeof o.value.dispatchAction=="function"){console.log("[useGridTabs] Calling Wrapper dispatchAction directly"),o.value.dispatchAction(e);return}let n=o.value;typeof o.value.getNativeNode=="function"?n=o.value.getNativeNode()||o.value:o.value.nativeRef&&(n=o.value.nativeRef),n?(console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"),A.Native.callUIFunction(n,"dispatchAction",[JSON.stringify(e)])):console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction")}},G=(t,e)=>{if(!t)return!1;let n=!0;return t.id||(console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`,t),n=!1),t.viewType||(console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): 卡片缺失必填字段 'viewType' (id: ${t.id||"未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`,t),n=!1),n},$=(t,e)=>{if(!t)return!1;let n=!0;return t.tabId||(console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`,t),n=!1),(t.title===void 0||t.title===null)&&console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${e}): Tab 缺失 'title' 字段 (tabId: ${t.tabId||"未知"}),导航栏可能显示为空。`,t),n},R=(t,e)=>{if(!t||t.length===0)return;F.clear();const n=t[0].hasOwnProperty("tabId")||t[0].hasOwnProperty("items")&&Array.isArray(t[0].items);f=e==="1d",e==="1d"&&n?console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`"):e==="2d"&&!n&&console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"),e==="1d"?t.forEach((i,g)=>G(i,`items.value[${g}]`)):t.forEach((i,g)=>{$(i,`tabs.value[${g}]`),i.items&&Array.isArray(i.items)&&i.items.forEach((m,p)=>G(m,`tabs.value[${g}].items[${p}]`))}),v=!0,T()},F=new Set,T=(t="unknown")=>{if(!v){console.warn("[useGridTabs] triggerRootUpdate skipped because isInitialized is false");return}let e={protocolVersion:"1.28.0",gridBasis:(r==null?void 0:r.gridBasis)??30,unitType:(r==null?void 0:r.unitType)??"px",contentConfig:(r==null?void 0:r.contentConfig)??(r==null?void 0:r.layoutConfig)??{box:{padding:[0,60,60,60]},navContentGapNormal:0,itemGap:24},navConfig:(r==null?void 0:r.navConfig)??{dock:"left",mode:"fixed",renderType:"smart-hybrid",box:{size:[200,0]},expandedBox:{size:[300,0]}},cacheConfig:(r==null?void 0:r.cacheConfig)??{offscreenPageLimit:1,prefetchOffset:2,preLoadEnabled:!1,strategy:"data_priority"},animationConfig:(r==null?void 0:r.animationConfig)??{duration:300,easing:"ease-out"},interactionStrategy:(r==null?void 0:r.interactionStrategy)??{defaultFocus:"nav",interceptBack:!0,backMode:"home-first",autoScrollToTop:!0,edgeScrollProtection:.5},focusConfig:(r==null?void 0:r.focusConfig)??{boundaryLock:{left:!1,right:!1,top:!1,bottom:!1}},themeConfig:r==null?void 0:r.themeConfig,referenceResolution:(r==null?void 0:r.referenceResolution)??{w:1920,h:1080}},n=[];f?(e.navConfig={...e.navConfig,renderType:"none"},n=[{tabId:a,title:"Virtual Tab",hidden:!0,items:b.value}]):n=y.value;const i=JSON.stringify({page_spec:e,tabs:n});if(u.value==="")console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${i.length})`),u.value=i,l=i;else{if(l===i){console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");return}console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${i.length})`),u.value=i,l=i,h({op:"RELOAD_TABS",payload:{pageSpec:e,page_spec:e,tabs:n}})}},N=t=>{if(!t||typeof t!="object"||t.__isGridTabsProxy)return t;t.content&&typeof t.content=="object"&&!t.content.__isGridTabsProxy&&(t.content=new Proxy(t.content,{set(n,i,g,m){const p=Reflect.set(n,i,g,m);return t.id&&v&&h({op:"UPDATE_ITEM",itemId:t.id,payload:t}),p}}),Object.defineProperty(t.content,"__isGridTabsProxy",{value:!0,enumerable:!1}),Object.defineProperty(t.content,"__v_skip",{value:!0,enumerable:!1})),t.subItems&&Array.isArray(t.subItems)&&!t.subItems.__isGridTabsProxy&&(t.subItems=S(t.subItems,t.id),Object.defineProperty(t.subItems,"__isGridTabsProxy",{value:!0,enumerable:!1}),Object.defineProperty(t.subItems,"__v_skip",{value:!0,enumerable:!1}));const e=new Proxy(t,{set(n,i,g,m){const p=Reflect.set(n,i,g,m);return n.id&&v&&!s&&h({op:"UPDATE_ITEM",itemId:n.id,payload:n}),p}});return Object.defineProperty(e,"__isGridTabsProxy",{value:!0,enumerable:!1}),Object.defineProperty(e,"__v_skip",{value:!0,enumerable:!1}),e},S=(t,e)=>{for(let n=0;n<t.length;n++)t[n]=N(t[n]);return new Proxy(t,{get(n,i,g){return i==="push"?(...m)=>{m.forEach((x,U)=>G(x,`push(${U})`)),v||console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");const p=m.map(x=>N(x)),I=Array.prototype.push.apply(n,p);return s||h({op:"APPEND_SUB_ITEMS",itemId:e,payload:{subItems:p}}),I}:i==="unshift"?(...m)=>{m.forEach((x,U)=>G(x,`unshift(${U})`)),v||console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");const p=m.map(x=>N(x)),I=Array.prototype.unshift.apply(n,p);return v&&p.length>0&&!s&&h({op:"PREPEND_SUB_ITEMS",itemId:e,payload:{subItems:p}}),I}:i==="splice"?(...m)=>{const p=m.length>=2&&m[0]===0&&m[1]===n.length,I=Array.prototype.splice.apply(n,m);return v&&p&&e!==a?s||h({op:"CLEAR_SUB_ITEMS",itemId:e}):v&&(s||T("items array spliced")),I}:Reflect.get(n,i,g)},set(n,i,g,m){if(i!=="length"&&!isNaN(Number(i))){v||console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(i)}]。请先对 items.value 或 tabs.value 进行全量赋值!`),G(g,`索引赋值 [${String(i)}]`);const p=N(g),I=Reflect.set(n,i,p,m);return p&&p.id&&!s&&h({op:"UPDATE_ITEM",itemId:p.id,payload:p}),I}return Reflect.set(n,i,g,m)}})},k=t=>(t.items&&Array.isArray(t.items)&&!t.items.__isGridTabsProxy&&(t.items=S(t.items,t.tabId),Object.defineProperty(t.items,"__isGridTabsProxy",{value:!0,enumerable:!1})),new Proxy(t,{set(e,n,i,g){if(n==="items"){let p=i;return Array.isArray(i)&&!i.__isGridTabsProxy&&(p=S(i,e.tabId),Object.defineProperty(p,"__isGridTabsProxy",{value:!0,enumerable:!1})),Reflect.set(e,n,p,g)}else if(n==="loadState"){const p=Reflect.set(e,n,i,g);return v&&e.tabId&&!s&&h({op:"UPDATE_TAB_STATE",itemId:e.tabId,payload:{loadState:i}}),p}return Reflect.set(e,n,i,g)}})),C=t=>{const e=t.map(n=>k(n));return new Proxy(e,{set(n,i,g,m){if(i!=="length"&&!isNaN(Number(i))){let p=g;g.__isGridTabsProxy||(p=k(g),Object.defineProperty(p,"__isGridTabsProxy",{value:!0,enumerable:!1}));const I=Reflect.set(n,i,p,m);return T(),I}return Reflect.set(n,i,g,m)}})};c.watch(y,(t,e)=>{if(console.log("[useGridTabs] watch(tabs) triggered:",{newTabs:t,isInitialized:v}),!t||t.length===0){u.value="",l="",v=!1;return}if(t.__isGridTabsProxy)console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"),T();else{console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");const n=C(t);Object.defineProperty(n,"__isGridTabsProxy",{value:!0,enumerable:!1}),R(n,"2d"),y.value=n}},{flush:"sync",deep:!1}),c.watch(b,(t,e)=>{if(console.log("[useGridTabs] watch(items) triggered:",{newItems:t,isInitialized:v}),!t||t.length===0){u.value="",l="",v=!1;return}if(t.__isGridTabsProxy)console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"),T();else{console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");const n=S(t,a);Object.defineProperty(n,"__isGridTabsProxy",{value:!0,enumerable:!1}),R(n,"1d"),b.value=n}},{flush:"sync",deep:!1});const E={},w=()=>{console.log("[useGridTabs] resetInitialization called manually"),v=!1,F.clear();for(const t in E)delete E[t]},O=t=>{if(!t||t.length===0){u.value="",v=!1;return}t[0].hasOwnProperty("tabId")||t[0].hasOwnProperty("items")&&Array.isArray(t[0].items)?y.value=t:b.value=t},_=t=>{P.value=t},M=c.computed(()=>({tabsData:u.value,onTabNeedsData:async(...t)=>{let e=t[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),!P.value.onTabNeedsData)return;const{tabId:n,index:i,reason:g}=e;if(F.has(n)){console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);return}F.add(n);try{const m=await P.value.onTabNeedsData(n,i,g);if(m&&Array.isArray(m))if(E[n]=1,m.length>0){const p=y.value.find(I=>I.tabId===n);p&&(p.items?p.items.length>0&&p.items.splice(0,p.items.length):p.items=[],p.items.push(...m),p.loadState="ready",h({op:"UPDATE_TAB_STATE",itemId:n,payload:{loadState:"ready"}}))}else console.warn(`[useGridTabs] ⚠️ 警告: onTabNeedsData(tabId="${n}") 返回了空数组 []!`),console.warn("👉 如果你已经在此函数内手动调用了 push() 来追加数据,请在最后 return null 或 undefined。"),console.warn("👉 如果该 Tab 确实没有数据,返回 [] 可能会导致底层的 Header 等已有元素被清空,请注意检查。"),console.warn("👉 框架已为您拦截此次空数组覆盖,保留了当前的 DOM 结构。")}catch(m){console.error("[useGridTabs] onTabNeedsData 执行失败:",m),F.delete(n)}},onLoadMore:async(...t)=>{let e=t[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),!P.value.onLoadMore)return;const{tabId:n,itemId:i}=e,m=(E[n]||1)+1;console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${m}`);try{const p=await P.value.onLoadMore(n,m,i);if(p&&Array.isArray(p))if(p.length>0)if(E[n]=m,f)b.value.push(...p);else{const I=y.value.find(x=>x.tabId===n);I&&I.items&&I.items.push(...p)}else console.warn(`[useGridTabs] ⚠️ 警告: onLoadMore(tabId="${n}", pageNo="${m}") 返回了空数组 []!`),console.warn('👉 如果这是你的最后一页数据,推荐在卡片列表中追加一个 type="no_more" 的 footer 卡片,而不是仅仅返回空。'),console.warn("👉 框架已忽略本次空数据追加,且不会自增页码。")}catch(p){console.error("[useGridTabs] onLoadMore 业务层请求失败:",p)}},onItemPresence:(...t)=>{let e=t[0];if(console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:",e),P.value.onItemPresence)try{let n=typeof e=="string"?e:(e==null?void 0:e.nativeEvent)||e;n&&typeof n.data=="string"&&(n=n.data);const i=typeof n=="string"?JSON.parse(n):n;i&&i.type==="VIEW_PRESENCE_BATCH"&&Array.isArray(i.payload)?i.payload.forEach(g=>{g.itemId&&typeof g.itemId=="string"&&g.itemId.startsWith("fallback_pos_")&&console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${g.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`),P.value.onItemPresence(g)}):P.value.onItemPresence(i)}catch(n){console.error("[useGridTabs] Failed to parse onItemPresence event payload:",n),P.value.onItemPresence(e)}},onTabSelected:(...t)=>{let e=t[0];e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onTabSelected&&P.value.onTabSelected(e)},onItemClick:(...t)=>{let e=t[0];if(console.log("[useGridTabs] RAW onItemClick intercepted from Native:",e),e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onItemClick)try{let n=typeof e=="string"?e:(e==null?void 0:e.data)||e;const i=typeof n=="string"?JSON.parse(n):n;P.value.onItemClick(i)}catch(n){console.error("[useGridTabs] Failed to parse onItemClick event payload:",n),P.value.onItemClick(e)}else console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!")},onItemLongClick:(...t)=>{let e=t[0];if(console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:",e),typeof e=="number"&&t.length>=3&&typeof t[1]=="string"&&(e=t[2]),e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onItemLongClick)try{let n=typeof e=="string"?e:(e==null?void 0:e.data)||e;const i=typeof n=="string"?JSON.parse(n):n;P.value.onItemLongClick(i)}catch(n){console.error("[useGridTabs] Failed to parse onItemLongClick event payload:",n),P.value.onItemLongClick(e)}},onItemFocused:(...t)=>{let e=t[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onItemFocused)try{let n=typeof e=="string"?e:(e==null?void 0:e.data)||e;const i=typeof n=="string"?JSON.parse(n):n;P.value.onItemFocused(i)}catch(n){console.error("[useGridTabs] Failed to parse onItemFocused event payload:",n),P.value.onItemFocused(e)}},onTabFocused:(...t)=>{let e=t[0];e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onTabFocused&&P.value.onTabFocused(e)},onScroll:(...t)=>{let e=t[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onScroll)try{const n=(e==null?void 0:e.data)||e;P.value.onScroll(n)}catch{P.value.onScroll(e)}},onScrollStateChanged:(...t)=>{let e=t[0];if(e&&e.nativeEvent&&(e=e.nativeEvent),P.value.onScrollStateChanged)try{const n=(e==null?void 0:e.data)||e;P.value.onScrollStateChanged(n)}catch{P.value.onScrollStateChanged(e)}}}));return{tabsDataStr:u,bindings:M,tabs:y,items:b,initData:O,setCallbacks:_,updateItem:(t,e)=>{if(!v){console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");return}h({op:"UPDATE_ITEM",itemId:t,payload:e}),s=!0;try{if(f){const n=b.value.find(i=>i.id===t);n&&Object.assign(n,e)}else for(const n of y.value)if(n.items){const i=n.items.find(g=>g.id===t);if(i){Object.assign(i,e);break}}}finally{s=!1}},deleteItem:(t,e=!0)=>{if(v){h({op:"DELETE_ITEM",itemId:t,payload:{animated:e}}),s=!0;try{if(f){const n=b.value.findIndex(i=>i.id===t);n!==-1&&b.value.splice(n,1)}else for(const n of y.value)if(n.items){const i=n.items.findIndex(g=>g.id===t);if(i!==-1){n.items.splice(i,1);break}}}finally{s=!1}}},prependItems:(t,e)=>{if(v){h({op:"PREPEND_SUB_ITEMS",itemId:t,payload:{subItems:e}}),s=!0;try{if(f)b.value.unshift(...e);else{const n=y.value.find(i=>i.tabId===t);n&&n.items&&n.items.unshift(...e)}}finally{s=!1}}},clearItems:t=>{if(v){h({op:"CLEAR_SUB_ITEMS",itemId:t}),s=!0;try{if(f)b.value.splice(0,b.value.length);else{const e=y.value.find(n=>n.tabId===t);e&&e.items&&e.items.splice(0,e.items.length)}}finally{s=!1}}},moveItem:(t,e,n)=>{if(v){h({op:"MOVE_ITEM",itemId:t,payload:{targetPosition:e,anchorItemId:n}}),s=!0;try{const i=g=>{const m=g.findIndex(I=>I.id===t),p=g.findIndex(I=>I.id===n);if(m!==-1&&p!==-1){const I=g.splice(m,1)[0],x=g.findIndex(Ne=>Ne.id===n),U=e==="after"?x+1:x;g.splice(U,0,I)}};if(f)i(b.value);else for(const g of y.value)g.items&&i(g.items)}finally{s=!1}}},replaceItem:(t,e)=>{if(v){h({op:"REPLACE_ITEM",itemId:t,payload:e}),s=!0;try{if(f){const n=b.value.findIndex(i=>i.id===t);n!==-1&&(b.value[n]=e)}else for(const n of y.value)if(n.items){const i=n.items.findIndex(g=>g.id===t);if(i!==-1){n.items[i]=e;break}}}finally{s=!1}}},dispatchAction:h,resetInitialization:w,getFocusState:async()=>new Promise((t,e)=>{let n=o.value;typeof o.value.getNativeNode=="function"?n=o.value.getNativeNode()||o.value:o.value.nativeRef&&(n=o.value.nativeRef),console.log("[useGridTabs] getFocusState called, nativeTarget:",n);const i=g=>{if(console.log("[useGridTabs] getFocusState callback received:",g),g&&g.isSuccess!==void 0&&g.result!==void 0){t(g.result);return}try{const m=typeof g=="string"?JSON.parse(g):g;t(m)}catch(m){e(m)}};typeof A.Native.callUIFunction=="function"?(console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'),A.Native.callUIFunction(n,"getFocusState",[],i)):(console.error("[useGridTabs] Native.callUIFunction is not available"),e(new Error("Native.callUIFunction is not available")))}),getItemRect:async t=>new Promise((e,n)=>{let i=o.value;typeof o.value.getNativeNode=="function"?i=o.value.getNativeNode()||o.value:o.value.nativeRef&&(i=o.value.nativeRef),console.log(`[useGridTabs] getItemRect called for itemId=${t}, nativeTarget:`,i);const g=m=>{if(console.log(`[useGridTabs] getItemRect callback received for itemId=${t}:`,m),m&&m.isSuccess!==void 0&&m.result!==void 0){e(m.result);return}try{const p=typeof m=="string"?JSON.parse(m):m;e(p)}catch(p){n(p)}};typeof A.Native.callUIFunction=="function"?(console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'),A.Native.callUIFunction(i,"getItemRect",[t],g)):(console.error("[useGridTabs] Native.callUIFunction is not available"),n(new Error("Native.callUIFunction is not available")))}),requestFocus:t=>{let e=o.value;typeof o.value.getNativeNode=="function"?e=o.value.getNativeNode()||o.value:o.value.nativeRef&&(e=o.value.nativeRef),A.Native.callUIFunction(e,"requestFocus",[t])},updatePageSpec:t=>{if(!v)return;const e=Object.assign({},JSON.parse(u.value).page_spec,t);t.layout&&(e.navConfig=Object.assign({},e.navConfig,t.layout)),t.navConfig&&(e.navConfig=Object.assign({},e.navConfig,t.navConfig)),t.contentConfig&&(e.contentConfig=Object.assign({},e.contentConfig,t.contentConfig)),r&&Object.assign(r,e),h({op:"RELOAD_TABS",payload:{pageSpec:e,page_spec:e,tabs:y.value}});const n=JSON.parse(u.value);n.page_spec=e,u.value=JSON.stringify(n),l=u.value},reloadAll:(t,e)=>{r&&(Object.keys(r).forEach(n=>delete r[n]),Object.assign(r,t)),y.value=e,h({op:"RELOAD_TABS",payload:{pageSpec:t,page_spec:t,tabs:e}})},scrollToTop:()=>{let t=o.value;typeof o.value.getNativeNode=="function"?t=o.value.getNativeNode()||o.value:o.value.nativeRef&&(t=o.value.nativeRef),A.Native.callUIFunction(t,"scrollToTop",[])}}}const ae="QtKeyboard",V=c.defineComponent({__name:"Keyboard",props:{backgroundColor:{},backgroundGradient:{},textColor:{},weakTextColor:{},focusBackgroundColor:{},focusTextColor:{},placeholder:{},textFullKeyboard:{},textT9Keyboard:{},keyboardType:{},textClear:{},textDelete:{},currentInput:{},autofocus:{type:Boolean},rememberKeyboardType:{type:Boolean}},emits:["onInputChanged","onKeyPressed"],setup(o,{expose:d}){const u=c.ref(),r=q(),y=ae+"_Plugin",f=(r.isPluginActive?y:ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),v=D(f,r.pluginPackageName||"com.quicktvui.plugin.extraui","com.quicktvui.plugin.extraui.ExtraUIPluginApp");return d({getNativeNode:()=>{var a,l;return((l=(a=u.value)==null?void 0:a.getNativeNode)==null?void 0:l.call(a))||u.value},requestFocus:(...a)=>{var s,P;const l=((P=(s=u.value)==null?void 0:s.getNativeNode)==null?void 0:P.call(s))||u.value;l&&A.Native.callUIFunction(l,"requestFocus",a)}}),(a,l)=>(c.openBlock(),c.createBlock(c.unref(v),c.mergeProps({ref_key:"nativeRef",ref:u,backgroundColor:o.backgroundColor,backgroundGradient:o.backgroundGradient,textColor:o.textColor,weakTextColor:o.weakTextColor,focusBackgroundColor:o.focusBackgroundColor,focusTextColor:o.focusTextColor,placeholder:o.placeholder,textFullKeyboard:o.textFullKeyboard,textT9Keyboard:o.textT9Keyboard,keyboardType:o.keyboardType,textClear:o.textClear,textDelete:o.textDelete,currentInput:o.currentInput,autofocus:o.autofocus,rememberKeyboardType:o.rememberKeyboardType,onOnInputChanged:l[0]||(l[0]=s=>a.$emit("onInputChanged",s.nativeEvent)),onOnKeyPressed:l[1]||(l[1]=s=>a.$emit("onKeyPressed",s.nativeEvent))},a.$attrs),{default:c.withCtx(()=>[c.renderSlot(a.$slots,"default")]),_:3},16,["backgroundColor","backgroundGradient","textColor","weakTextColor","focusBackgroundColor","focusTextColor","placeholder","textFullKeyboard","textT9Keyboard","keyboardType","textClear","textDelete","currentInput","autofocus","rememberKeyboardType"]))}});let W;var ue;try{const o=require("@extscreen/es3-vue");W=o.registerElement||((ue=o.default)==null?void 0:ue.registerElement)}catch{}const pe={install:o=>{if(!globalThis.__QtKeyboard_registered)if(W){const d=(u,r)=>{W(u,{component:{name:r?"QtKeyboard_Plugin":"QtKeyboard",processEventData(y,b){const f=y.handler||y,v=b||(f==null?void 0:f.nativeParams)||{};return f&&(f.nativeEvent=v),f}}})};d("qt-keyboard",!1),d("qt-keyboard-plugin",!0),d("QtKeyboard",!1),d("QtKeyboard_Plugin",!0),globalThis.__QtKeyboard_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtKeyboard")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("Keyboard",V),o.component("qt-keyboard",V)}},ie="QtPortalPool",z=c.defineComponent({__name:"PortalPool",setup(o,{expose:d}){const u=c.ref(),r=q(),y=ie+"_Plugin",f=(r.isPluginActive?y:ie).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),v=D(f,r.pluginPackageName||"com.quicktvui.plugin.glintui");return d({getNativeNode:()=>{var a,l;return((l=(a=u.value)==null?void 0:a.getNativeNode)==null?void 0:l.call(a))||u.value}}),(a,l)=>(c.openBlock(),c.createBlock(c.unref(v),c.mergeProps({ref_key:"nativeRef",ref:u},a.$attrs),{default:c.withCtx(()=>[c.renderSlot(a.$slots,"default")]),_:3},16))}});let J;var de;try{const o=require("@extscreen/es3-vue");J=o.registerElement||((de=o.default)==null?void 0:de.registerElement)}catch{}const me={install:o=>{if(!globalThis.__QtPortalPool_registered)if(J){const d=(u,r)=>{J(u,{component:{name:r?"QtPortalPool_Plugin":"QtPortalPool",processEventData(y,b){const f=y.handler||y,v=b||(f==null?void 0:f.nativeParams)||{};return f&&(f.nativeEvent=v),f}}})};d("qt-portal-pool",!1),d("qt-portal-pool-plugin",!0),d("QtPortalPool",!1),d("QtPortalPool_Plugin",!0),globalThis.__QtPortalPool_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtPortalPool")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("PortalPool",z),o.component("qt-portal-pool",z)}},se="QtPortalItem",Z=c.defineComponent({__name:"PortalItem",props:{portalId:{}},setup(o,{expose:d}){const u=c.ref(),r=q(),y=se+"_Plugin",f=(r.isPluginActive?y:se).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),v=D(f,r.pluginPackageName||"com.quicktvui.plugin.glintui");return d({getNativeNode:()=>{var a,l;return((l=(a=u.value)==null?void 0:a.getNativeNode)==null?void 0:l.call(a))||u.value}}),(a,l)=>(c.openBlock(),c.createBlock(c.unref(v),c.mergeProps({ref_key:"nativeRef",ref:u,portalId:o.portalId},a.$attrs),{default:c.withCtx(()=>[c.renderSlot(a.$slots,"default")]),_:3},16,["portalId"]))}});let H;var fe;try{const o=require("@extscreen/es3-vue");H=o.registerElement||((fe=o.default)==null?void 0:fe.registerElement)}catch{}const be={install:o=>{if(!globalThis.__QtPortalItem_registered)if(H){const d=(u,r)=>{H(u,{component:{name:r?"QtPortalItem_Plugin":"QtPortalItem",processEventData(y,b){const f=y.handler||y,v=b||(f==null?void 0:f.nativeParams)||{};return f&&(f.nativeEvent=v),f}}})};d("qt-portal-item",!1),d("qt-portal-item-plugin",!0),d("QtPortalItem",!1),d("QtPortalItem_Plugin",!0),globalThis.__QtPortalItem_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtPortalItem")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("PortalItem",Z),o.component("qt-portal-item",Z)}},le="QtHsvBackground",Y=c.defineComponent({__name:"HsvBackground",props:{hue:{default:-2}},setup(o,{expose:d}){const u=c.ref(),r=q(),y=le+"_Plugin",f=(r.isPluginActive?y:le).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),v=D(f,r.pluginPackageName||"com.quicktvui.plugin.glintui");return d({getNativeNode:()=>{var a,l;return((l=(a=u.value)==null?void 0:a.getNativeNode)==null?void 0:l.call(a))||u.value}}),(a,l)=>(c.openBlock(),c.createBlock(c.unref(v),c.mergeProps({ref_key:"nativeRef",ref:u,hue:o.hue},a.$attrs),{default:c.withCtx(()=>[c.renderSlot(a.$slots,"default")]),_:3},16,["hue"]))}}),ye={install(o){o.component("qt-hsv-background",Y),o.component("HsvBackground",Y)}},re="QtSvgImage",X=c.defineComponent({__name:"SvgImage",props:{src:{},tintColor:{}},setup(o,{expose:d}){const u=c.ref(),r=q(),y=re+"_Plugin",f=(r.isPluginActive?y:re).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase().replace(/^-/,""),v=D(f,r.pluginPackageName||"com.quicktvui.plugin.extraui","com.quicktvui.plugin.extraui.ExtraUIPluginApp");return d({getNativeNode:()=>{var a,l;return((l=(a=u.value)==null?void 0:a.getNativeNode)==null?void 0:l.call(a))||u.value}}),(a,l)=>(c.openBlock(),c.createBlock(c.unref(v),c.mergeProps({ref_key:"nativeRef",ref:u,src:o.src,tintColor:o.tintColor},a.$attrs),{default:c.withCtx(()=>[c.renderSlot(a.$slots,"default")]),_:3},16,["src","tintColor"]))}});let ee;var ve;try{const o=require("@extscreen/es3-vue");ee=o.registerElement||((ve=o.default)==null?void 0:ve.registerElement)}catch{}const Pe={install:o=>{if(!globalThis.__QtSvgImage_registered)if(ee){const d=(u,r)=>{ee(u,{component:{name:r?"QtSvgImage_Plugin":"QtSvgImage",processEventData(y,b){const f=y.handler||y,v=b||(f==null?void 0:f.nativeParams)||{};return f&&(f.nativeEvent=v),f}}})};d("qt-svg-image",!1),d("qt-svg-image-plugin",!0),d("QtSvgImage",!1),d("QtSvgImage_Plugin",!0),globalThis.__QtSvgImage_registered=!0,console.log("[@quicktvui/naddons] Successfully registered Native tag:","QtSvgImage")}else console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");o.component("SvgImage",X),o.component("qt-svg-image",X)}},Te={skipPluginCheck:!1},Q=new Set;function D(o,d,u){return c.defineComponent({name:`${o}AsyncWrapper`,inheritAttrs:!1,props:{skipPluginCheck:{type:Boolean,default:!1}},setup(r,{slots:y,attrs:b,expose:f}){const v=c.ref("loading"),a=c.ref(""),l=c.ref(),s=globalThis.__VUE_INSTANCE__;f({getNativeNode:()=>{let T=l.value;return!T&&s&&s.vnode&&s.vnode.el&&(T=s.vnode.el,T.childNodes&&T.childNodes.length>0&&(T=T.childNodes[0])),T},nativeRef:l});let G=null,$=null;try{G=j.useES(),$=j.useESPlugin()}catch(T){console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。",T)}const R=async()=>{if(!G||typeof G.isComponentRegistered!="function")return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"),!1;try{const T=await G.isComponentRegistered(o);if(console.log(`[withAsyncPlugin] isComponentRegistered('${o}') 返回:`,T),T===!0||T&&typeof T=="object"&&(T.registered===!0||T.isRegistered===!0))return!0;try{const N=await A.Native.callNativeWithPromise("ExtendModule","getCoreSDKInfo");if(N&&N.core_version){const S=N.core_version;console.log(`[withAsyncPlugin] 当前引擎核心版本: ${S}`);const k=S.split(".").map(C=>parseInt(C,10));if(k.length>=3&&!isNaN(k[0])&&!isNaN(k[1])&&!isNaN(k[2]))if(k[0]*1e6+k[1]*1e3+k[2]>=1011205){console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${o}`);const E=o.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1)).join("");console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${o}, ${E}`);const[w,O]=await Promise.all([A.Native.callNativeWithPromise("ExtendModule","isComponentRegistered",o).catch(()=>!1),A.Native.callNativeWithPromise("ExtendModule","isComponentRegistered",E).catch(()=>!1)]);if(console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${w}, ${O}]`),w===!0||O===!0)return!0}else console.log(`[withAsyncPlugin] 引擎版本 ${S} < 1.11.205,跳过 ExtendModule 检查`);else console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${S}`)}}catch(N){console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:",N)}return!1}catch(T){return console.warn("[withAsyncPlugin] 检查组件注册状态异常:",T),!1}},F=async()=>{if(Te.skipPluginCheck||r.skipPluginCheck){console.log(`[withAsyncPlugin] 跳过 ${o} 插件检查 (skipPluginCheck = true)`),v.value="ready";return}if(!d){v.value="ready";return}const T=await R();if(console.log(`[withAsyncPlugin] 拦截检查 - ${o} 是否已注册:`,T),T||Q.has(d)){v.value="ready",Q.add(d),console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");return}if(!$){console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`),v.value="ready";return}console.log(`[withAsyncPlugin] 开始动态安装插件: ${d}`);try{await new Promise((N,S)=>{let k;const C={onPluginInstallSuccess(E,w,O){E===d&&(clearTimeout(k),$.removeListener(C),console.log(`[withAsyncPlugin] 安装成功 pkg=${E} 状态码=${w}`),w==1003||w==1001?(u?(console.log(`[withAsyncPlugin] 触发反射初始化: ${u}`),A.Native.callNative("EsNativeModule","callReflect",{entry:{from:u,method:"setup"}})):console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"),N()):S(new Error(`安装失败 pkg=${E} status=${w} msg=${O}`)))},onPluginInstallError(E,w,O){E===d&&(clearTimeout(k),$.removeListener(C),S(new Error(`安装失败 pkg=${E} status=${w} msg=${O}`)))}};$.addListener({pkg:d},C),k=setTimeout(()=>{$.removeListener(C),S(new Error(`插件安装超时: ${d}`))},8e3),typeof $.installPlugin=="function"?$.installPlugin({pkg:d}):typeof $.install=="function"?$.install(d):S(new Error("当前运行时不支持 install / installPlugin"))}),await c.nextTick(),Q.add(d),v.value="ready"}catch(N){console.error("[withAsyncPlugin] 插件加载失败:",N),a.value=(N==null?void 0:N.message)||String(N),v.value="error"}};return c.onMounted(()=>{F()}),()=>{const T={display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",...b.style||{}};b.width!==void 0&&!T.width&&(T.width=typeof b.width=="number"?`${b.width}px`:b.width),b.height!==void 0&&!T.height&&(T.height=typeof b.height=="number"?`${b.height}px`:b.height);const N=b.class?`qt-plugin-container ${b.class}`:"qt-plugin-container",S={class:N,style:T,clipChildren:!1,clipPadding:!1,clipToPadding:!1};if(v.value==="loading")return c.h("div",S,[c.h("div",{style:{color:"white",fontSize:"30px"}},"插件加载中...")]);if(v.value==="error")return c.h("div",S,[c.h("div",{style:{color:"white",fontSize:"30px",backgroundColor:"rgba(255,0,0,0.5)"}},`插件加载失败: ${a.value}`)]);const k={},C={};for(const[_,M]of Object.entries(b))if(_.startsWith("on")&&typeof M=="function"){let L=_;_.startsWith("onOn")&&(L="on"+_.slice(4)),C[L]=M}else if(_.startsWith("on")&&Array.isArray(M)){let L=_;_.startsWith("onOn")&&(L="on"+_.slice(4)),C[L]=M}else _.startsWith("onOn")||(k[_]=M);const E={...k,...C,class:N,style:T,ref:_=>{l.value=_}},w=E.tabsData||"",O=E.actionPayload||"";return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:",Object.keys(E),"tabsData.length=",w.length,"actionPayload.length=",O.length),c.h(o,E,y.default?y.default():[])}}})}const ne=Symbol("AddonEnvContext"),he={isPluginActive:!1,nameSuffix:"",pluginPackageName:"com.quicktvui.plugin.glintui",builtInVersions:{}};async function Ae(o="com.quicktvui.plugin.glintui",d="_Plugin"){const u=j.useES();let r={};try{const a=await A.Native.callNativeModule("AddonEnvModule","getBuiltInVersions",[]);a&&typeof a=="object"&&(r=a)}catch(a){console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule",a)}const y=`QtGridTabs${d}`,b=u.isComponentRegistered(y),f=b instanceof Promise?await b:b,v={isPluginActive:f,nameSuffix:f?d:"",pluginPackageName:f?`${o}.ext`:o,builtInVersions:r};return console.info("[AddonProvider] Environment initialized:",v),v}let te=c.ref(he);function Se(o){te.value=o,c.provide(ne,te)}function q(){var o;return((o=c.inject(ne,te))==null?void 0:o.value)||he}async function ke(o){console.log("[AddonProvider] Sending GridTabs global config to Native:",o);try{const d=await A.Native.callNativeWithPromise("GridTabsConfigModule","setDefaultConfig",JSON.stringify(o));return console.log("[AddonProvider] Received response from Native:",d),!!(d&&d.success)}catch(d){return console.error("[AddonProvider] Failed to initialize GridTabs global config:",d),!1}}const Ie={install:o=>{o.use(ge),o.use(pe),o.use(me),o.use(be),o.use(ye),o.use(Pe)}};exports.ADDON_ENV_CONTEXT_KEY=ne;exports.GridTabs=B;exports.GridTabsPlugin=ge;exports.HsvBackground=Y;exports.HsvBackgroundPlugin=ye;exports.Keyboard=V;exports.KeyboardPlugin=pe;exports.PortalItem=Z;exports.PortalItemPlugin=be;exports.PortalPool=z;exports.PortalPoolPlugin=me;exports.QuickTVUINAddons=Ie;exports.QuickTVUINAddonsConfig=Te;exports.SvgImage=X;exports.SvgImagePlugin=Pe;exports.default=Ie;exports.initAddonEnv=Ae;exports.initGridTabsGlobalConfig=ke;exports.provideAddonEnv=Se;exports.useAddonEnv=q;exports.useGridTabs=Ee;exports.withAsyncPlugin=D;
|