1import{V as e,X as t,k as n,w as r}from"./string-C5fLiEhb.js";import{_ as i,s as a,v as o}from"./function-B1_dLWJl.js";import{M as s}from"./assets-DSt_IM9G.js";import{D as c,O as l,W as u,n as d,z as f}from"./element-7c8P4ipT.js";import{t as p}from"./hub-CQbyO_3k.js";var m=r.local.misc.lead_modal_late_show_rules;function h(){function e(){let e=u(localStorage.getItem(m));e&&(window.scrollY>=2e3&&localStorage.setItem(m,JSON.stringify({...e,scrollToBottom:!0})),e.scrollToBottom&&window.scrollY===0&&localStorage.setItem(m,JSON.stringify({...e,scrollToTop:!0})))}d(window,{scroll:e})}function g(){let e=u(localStorage.getItem(m))||{},t=e?.lastPage,n=window.performance.getEntriesByType(`navigation`)[0].type;t&&t===window.location.href&&n===`back_forward`&&localStorage.setItem(m,JSON.stringify({...e,backCount:e.backCount+=1})),localStorage.setItem(m,JSON.stringify({...e,lastPage:document.referrer,currentPage:window.location.href}))}function _(){let e=u(localStorage.getItem(m))||{};e?.idle||setTimeout(()=>{localStorage.setItem(m,JSON.stringify({...e,idle:!0}))},1e4)}function v(){u(localStorage.getItem(m))||localStorage.setItem(m,JSON.stringify({scrollToBottom:!1,scrollToTop:!1,idle:!1,lastPage:``,currentPage:window.location.href,backCount:0})),_(),g()}var y={},b=()=>{function e(e){let t=e.currentTarget.scrollLeft;l(`.synced-scrollers, .synced-scrollers-all-bp`).forEach(e=>e.scrollLeft=t)}l(`.synced-scrollers, .synced-scrollers-all-bp`).forEach(t=>{t.removeEventListener(`scroll`,e),t.addEventListener(`scroll`,e)})};function x(){let e=c(`.LPMcontainer`);e?e.click():f.error(`LivePerson element not found`)}var S=()=>{window.location.hash&&window.history.scrollRestoration&&(window.history.scrollRestoration=`manual`);let e=c(`[data-show-onload]`);e&&p.sub(p.topics.MODAL_READY,()=>{p.pub(p.topics.MODAL,{target:e})})};function C(e){let t=a;return document.readyState===`complete`?e():(window.addEventListener(`load`,e),t=()=>window.removeEventListener(`load`,e)),t}function w(e,t=2e3){if(typeof window>`u`)return a;
1if(window.requestIdleCallback){let n=window.requestIdleCallback(e,{timeout:t});return()=>window.cancelIdleCallback(n)}let n=window.setTimeout(e,1);return()=>window.clearTimeout(n)}function T(e,r=5e3){if(!t)return Promise.reject(`onGlobalReady called on server`);let i=performance.now();return new Promise((t,a)=>{function s(){let c=performance.now()-i,l=o(window,e);if(l)t(l);else if(c>r){let t=window.location.host.includes(`sleepnumber.test`),i=`Failed to detect window.${e} after ${r}ms`;a(t||!n()?i:Error(i))}else window.requestAnimationFrame(s)}s()})}function E(){let e=s.get(s.Entry.page_loads);e.push(Date.now()),e.shift(),s.set(s.Entry.page_loads,e)}function D(){t&&(S(),C(()=>{E(),v()}),f.info(`%csn.ui: %cAutowired`,e.strong,e.value))}D(),i(`sn.ui`,y),i(`sn.env`,()=>{try{let t=window.sn_globals;f.info(`%csn.env: \n%c${JSON.stringify(t,null,2)}`,e.strong,e.value)}catch(e){f.warn(`Failed to parse sn-env element`,e)}});function O(e,t={}){return new Promise((n,r)=>{let i=document.createElement(`script`);Object.entries(t).forEach(([e,t])=>i.setAttribute(e,t)),i.onload=(...e)=>{t?.onload&&t.onload(...e),n(i)},i.onerror=t=>{r(URIError(`The script ${e} didn't load correctly.`,{cause:t}))},document.head.appendChild(i),i.src=e})}export{x as a,C as i,T as n,b as o,w as r,h as s,O as t}; 2//# sourceMappingURL=ui-DkKsDIhI.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.