import{a,i as r,b as o,c as l,f as g,r as c}from"./chunk-BdvozYt0.js";function f(t,i){const e=`URL ${t} passed to ${i}() is invalid`;return a(r(t),e),t.startsWith(location.origin)&&(t=t.slice(location.origin.length)),a(t.startsWith("/")||o(t),e),t}l();async function m(t,i){f(t,"navigate"),await g;const{keepScrollPosition:e,overwriteLastHistoryEntry:s,pageContext:n}=i??{};await c({scrollTarget:{preserveScroll:e??!1},urlOriginal:t,overwriteLastHistoryEntry:s,pageContextInitClient:n})}export{m as n};
