/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{toConsumableArray as n}from"../_virtual/_rollupPluginBabelHelpers.js";import e from"../utils/util.js";import t from"./en.js";var a={lang:{},langKeys:[],textKeys:[]};function r(t,a){return Object.keys(a).forEach(function(l){var s,g=e.typeOf(a[l]),u=e.typeOf(t[l]);"Array"===g?("Array"!==u&&(t[l]=[]),(s=t[l]).push.apply(s,n(a[l]))):"Object"===g?("Object"!==u&&(t[l]={}),r(t[l],a[l])):t[l]=a[l]}),t}function l(){Object.keys(a.lang.en).map(function(n){a.textKeys[n]=n})}function s(n,e){var t=n.LANG;if(e||(e=a),e.lang){var s=n.TEXT||{};"zh"===t&&(t="zh-cn"),e.lang[t]?r(e.lang[t],s):(e.langKeys.push(t),e.lang[t]=s),l()}}s(t);var g={get textKeys(){return a.textKeys},get langKeys(){return a.langKeys},get lang(){var n={};return a.langKeys.map(function(e){n[e]=a.lang[e]}),a.lang["zh-cn"]&&(n.zh=a.lang["zh-cn"]||{}),n},extend:function(n,t){var g=[];if(t||(t=a),t.lang){g="Array"!==e.typeOf(n)?Object.keys(n).map(function(e){return{LANG:"zh"===e?"zh-cn":e,TEXT:n[e]}}):n;var u=t.lang;g.map(function(n){"zh"===n.LANG&&(n.LANG="zh-cn"),u[n.LANG]?r(u[n.LANG]||{},n.TEXT||{}):s(n,t)}),l()}},use:s,init:function(e){var t,l={lang:{},langKeys:[],textKeys:{},pId:e};return r(l.lang,a.lang),(t=l.langKeys).push.apply(t,n(a.langKeys)),r(l.textKeys,a.textKeys),l}};export{g as default};