HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/AppData/Local/Microsoft/OneDrive/26.168.0830.0006/WebAssets/static/shell/shell-nav.js
function initShellNav(e){"use strict";const l=window.ShellIframeCache,P=document.getElementById("tagSearchInput"),T=document.getElementById("tagSearchClear"),M=document.getElementById("filterDateFrom"),O=document.getElementById("filterDateTo"),W=document.getElementById("dateRangeClear");let S=[];function I(){S=[];const t=e.getViewSettingsEls();t.viewSettingsContent&&(t.viewSettingsContent.innerHTML=""),t.viewSettingsSection&&t.viewSettingsSection.classList.remove("active")}function A(t,o){const s=e.getViewSettingsEls();if(!(!s.viewSettingsContent||!s.viewSettingsSection)){S=o,s.viewSettingsName&&(s.viewSettingsName.textContent=t),s.viewSettingsContent.innerHTML="";for(const n of o)if(n.type==="toggle"){const r=document.createElement("div");r.className="settings-row"+(n.sub?" settings-row--sub":""),r.innerHTML='<div class="settings-row-info"><div class="settings-row-title">'+n.label+"</div>"+(n.desc?'<div class="settings-row-desc">'+n.desc+"</div>":"")+'</div><label class="toggle"><input type="checkbox" data-setting-id="'+n.id+'"'+(n.value?" checked":"")+'><span class="toggle-track"></span></label>',r.querySelector("input").addEventListener("change",g=>{const u=e.get("activeIframe"),a=e.get("iframeReady");u&&a&&u.contentWindow.postMessage({type:"setting-changed",id:n.id,value:g.target.checked},"*")}),s.viewSettingsContent.appendChild(r)}else if(n.type==="slider"){var i=document.createElement("div");i.className="settings-row"+(n.sub?" settings-row--sub":"");var d=function(r,g){return g==="mb"?r>=1e3?(r/1e3).toFixed(1)+"GB":r+"MB":g==="pct"?r+"%":String(r)};i.style.flexDirection="column",i.style.alignItems="stretch",i.innerHTML='<div class="settings-row-title">'+n.label+"</div>"+(n.desc?'<div class="settings-row-desc">'+n.desc+"</div>":"")+'<div style="display:flex;align-items:center;gap:8px;margin-top:6px"><input type="range" data-setting-id="'+n.id+'" min="'+(n.min||0)+'" max="'+(n.max||100)+'" step="'+(n.step||1)+'" value="'+n.value+'" style="flex:1"><span class="settings-slider-value" id="vs-'+n.id+'">'+d(n.value,n.format)+"</span></div>";var h=n.format,y=i.querySelector("input[type=range]"),C=i.querySelector(".settings-slider-value");y.addEventListener("input",function(r){var g=Number(r.target.value);C.textContent=d(g,h);var u=e.get("activeIframe"),a=e.get("iframeReady");u&&a&&u.contentWindow.postMessage({type:"setting-changed",id:n.id,value:g},"*")}),s.viewSettingsContent.appendChild(i)}else if(n.type==="status"){const r=document.createElement("div");r.className="view-settings-stat",r.innerHTML='<span class="view-settings-stat-label">'+n.label+'</span><span class="view-settings-stat-value" id="vs-'+n.id+'">'+(n.value??"")+"</span>",s.viewSettingsContent.appendChild(r)}s.viewSettingsSection.classList.add("active")}}function b(t){let o="/"+t;const s=e.get("activeSortOrder"),i=e.get("skinId");return s&&s!=="desc"&&(o+=(o.includes("?")?"&":"?")+"sortOrder="+s),i&&(o+=(o.includes("?")?"&":"?")+"skin="+encodeURIComponent(i)),o}function F(t){return"/"+t}function D(){l.invalidateAll()}function p(){return document.querySelectorAll("[data-page]")}const q=new Set(["albums.html","memories.html","people.html","time.html"]);function B(t){return!(!q.has(t)||t==="people.html"&&document.body.classList.contains("od4-people-sql-backed")||t==="albums.html"&&document.body.classList.contains("od4-albums-sql-backed"))}const V=new Set(["memories.html","moments-l2.html","albums.html","people.html"]);function G(t){return V.has(t)&&(document.body.classList.contains("od4-business-account")||document.body.classList.contains("od4-interactive-sign-in-blocked"))}const N=76;function H(){const t=l.IFRAME_TITLE_KEYS||{};l.forEach(function(s,i){const d=t[s];d&&(i.iframe.title=Od4Strings.t(d))});const o=e.get("activeIframe");if(o){const s=(o.dataset.page||"").split("?")[0],i=t[s];i&&(o.title=Od4Strings.t(i))}}function _(t,o){if(t.startsWith("__")||B(t)&&!window.OfflineManager?.isOnline())return;if(G(t)){e.get("activePage")||_("webgl2.html",o);return}e.set("activePage",t),e.onNavigate&&e.onNavigate(t),window.ShellInfoTooltip?.hide(),e.get("detailsPaneOpen")&&e.closeDetailsPane();const s=e.getFiltersPane();if(s&&s.classList.contains("open")&&e.closeFilters(),t==="time.html"){const a=e.get("activeFilterTags"),f=e.get("filterStartDate"),c=e.get("activeFolderIds");(a.length||f||c.length)&&(e.set("activeFilterTags",[]),e.renderActiveTags(),e.set("availableTagCounts",null),P&&(P.value=""),T&&(T.style.display="none"),M&&(M.value=""),O&&(O.value=""),e.set("filterStartDate",""),e.set("filterEndDate",""),W&&(W.style.display="none"),e.syncDatePresets(),e.set("activeFolderIds",[]),e.renderFolderTree(),e.resetTagsCache(),e.loadTags(),e.updateFilterBadge())}p().forEach(a=>{const f=a.dataset.page===t;a.classList.toggle("active",f),f?a.setAttribute("aria-current","page"):a.removeAttribute("aria-current")});const i=!0,d=150,h=e.get("activeIframe");if(h){const a=h,f=l.isLibraryPage(a.dataset.page);try{a.contentWindow?.postMessage({type:"clear-selection"},"*")}catch{}l.hideIframe(a,f,i,d)}if(e.welcomeEl&&(e.welcomeEl.style.display="none"),t==="people.html"){const a=window.__od4PeopleConsent,f=window.__od4PeopleConsentContent;if(!!(!!(a&&a.isEnabled&&a.isEnabled())&&f&&f.variantForStatus&&f.variantForStatus(window.__od4PeopleConsentStatus,"page"))){if(l.has(t)){const v=l.get(t);v&&v.iframe&&v.iframe.remove(),l.delete(t)}const w=e.contentEl.querySelector('iframe[data-page="people.html"]');w&&w.remove(),e.set("activeIframe",null),e.set("iframeReady",!1),history.replaceState({page:t},"","/#"+t);return}}const y=l.isLibraryPage(t),C=F(t);if(y&&l.has(t)){const a=l.get(t);if(l.stripTagsFromSrc(a.src)===C){const c=a.iframe;e.set("activeIframe",c);try{c.contentWindow.postMessage({type:"shell-pane-resize",insetEnd:0,instant:!0},"*")}catch{}const L=e.getFiltersPane(),w=L&&L.classList.contains("open"),v=document.getElementById("filterBadge"),Y=v&&v.style.display!=="none";try{c.contentWindow.postMessage({type:"filters-pane-state",open:w,hasFilters:Y},"*")}catch{}l.showCachedIframe(c,i,d),c.focus();try{c.contentWindow.postMessage({type:"focus-view",keyboard:!!o},"*")}catch{}e.set("iframeReady",!0);try{c.contentWindow.postMessage({type:"bottom-clearance",value:N},"*")}catch{}try{c.contentWindow.postMessage({type:"shell-scroll-sync",scrollTop:0},"*")}catch{}try{c.contentWindow.postMessage({type:"scroll-to-top"},"*")}catch{}e.scrollToTop();const R=e.get("currentThemePref");try{c.contentWindow.postMessage({type:"theme-changed",theme:e.resolveTheme(R),preference:R},"*")}catch{}try{c.contentWindow.postMessage({type:"request-view-settings"},"*")}catch{}if(typeof window._od4GetSyncStateForPage=="function"){const k=window._od4GetSyncStateForPage(t);if(k)try{c.contentWindow.postMessage({type:"sync-status",...k},"*")}catch{}}e.get("detailsPaneOpen")&&e.get("detailsCurrentPhoto")&&c.contentWindow.postMessage({type:"navigate-to-photo",photo:e.get("detailsCurrentPhoto")},"*"),history.replaceState({page:t},"","/#"+t);return}else a.iframe.remove(),l.delete(t)}I(),e.set("iframeReady",!1),window._announce&&window._announce(Od4Strings.t("navLoading"));const n=l.createIframe(t,i);e.set("activeIframe",n);let r=e.get("pendingIframeActions"),g=b(t);if(r.length>0){const a=r.splice(0);g+=(g.includes("?")?"&":"?")+"_actions="+encodeURIComponent(JSON.stringify(a))}n.src=g,n.addEventListener("load",()=>{if(e.get("activeIframe")!==n)return;e.set("iframeReady",!0);try{n.contentWindow.postMessage({type:"bottom-clearance",value:N},"*")}catch{}l.fadeInOnLoad(n,i,d),n.focus();try{n.contentWindow.postMessage({type:"focus-view",keyboard:!!o},"*")}catch{}if(window.dispatchEvent(new Event("_vp_iframe_loaded")),r=e.get("pendingIframeActions"),r.length>0){const f=r.splice(0);for(const c of f)n.contentWindow.postMessage({type:"shell-action",...c},"*")}const a=e.get("currentThemePref");try{n.contentWindow.postMessage({type:"theme-changed",theme:e.resolveTheme(a),preference:a},"*")}catch{}e.get("detailsPaneOpen")&&e.get("detailsCurrentPhoto")&&n.contentWindow.postMessage({type:"navigate-to-photo",photo:e.get("detailsCurrentPhoto")},"*")});var u=e.contentEl.querySelector(".od4-action-bar-glow");u?e.contentEl.insertBefore(n,u):e.contentEl.appendChild(n),n.focus(),y&&l.set(t,{iframe:n,src:b(t)}),history.replaceState({page:t},"","/#"+t)}function K(){e.set("activePage",null),I(),window.ShellInfoTooltip?.hide();const t=e.get("activeIframe");t&&(l.isLibraryPage(t.dataset.page)?t.style.display="none":t.remove(),e.set("activeIframe",null)),e.welcomeEl&&(e.welcomeEl.style.display=""),p().forEach(o=>{o.classList.toggle("active",!1)}),history.replaceState(null,"","/")}p().forEach(t=>{t.addEventListener("click",o=>{try{const s=t.dataset.page,i=l.get(s),d=i&&i.iframe;d&&d.contentWindow&&d.contentWindow.postMessage({type:"exit-l2-detail"},"*")}catch{}_(t.dataset.page,o.detail===0)})});const m=document.createElement("div");m.className="od4-offline-nav-tooltip",document.body.appendChild(m);const E=document.querySelector(".od4-nav");return E&&(E.addEventListener("mousemove",t=>{if(window.OfflineManager?.isOnline()!==!1){m.classList.remove("visible");return}const o=[...p()].find(s=>{if(!B(s.dataset.page))return!1;const i=s.getBoundingClientRect();return t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom});if(o){const s=o.getBoundingClientRect();m.textContent=Od4Strings.t("unavailableOffline"),m.style.left=s.left+s.width/2+"px",m.style.top=s.bottom+6+"px",m.classList.add("visible")}else m.classList.remove("visible")}),E.addEventListener("mouseleave",()=>m.classList.remove("visible"))),{navigate:_,showWelcome:K,buildIframeSrc:b,buildCacheKey:F,invalidateIframeCache:D,clearViewSettings:I,renderViewSettings:A,getViewSettingsDefs:function(){return S},refreshIframeTitles:H}}