/*!
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{isBrowser as e}from"@gsc-basic/utils";function t(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)}function n(e){const n=t(e,"line-height");if("normal"===n){const t=document.createElement("span");t.style.width="300px",t.style.position="absolute",t.style.visibility="hidden",t.innerText="temp",e.appendChild(t);const n=t.clientHeight;return e.removeChild(t),1.1*n}return Number.parseFloat(n)}function o(e){const n=t(e,"word-break"),o=t(e,"overflow-wrap");if("word-break"!==n&&"break-all"!==n&&"break-word"!==o){const t=e.style.wordBreak;return e.style.wordBreak="break-word",t}}function r(e,t){e.style.wordBreak=t}function i(e,t){return Math.floor((e+t)/2)}function l(e,t,n,o){for(;e<t;){const r=i(e,t);if(o(e,t,r))break;n(e,t,r)?t=r:e=r}}function c(t){e&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.parentNode?.replaceChild(function(e){const t=document.createElement("span");return t.className="l--ellipsis-js-content-text",t.textContent=e,t}(t.textContent),t):t.childNodes.forEach(e=>{c(e)}))}function a(e){return e.clientHeight}export{l as binarySearch,t as computeStyle,a as getElementHeight,n as getLineHeight,o as registerWordBreak,r as setWordBreak,c as wrapTextChildNodesWithSpan};