1import{aH as d,az as N,ay as R,aI as j,bb as i,bc as x,bd as _,be as P,bf as v,A as S,bg as w,P as c,b9 as y,aY as A,b3 as O,bh as T,a5 as m,bi as h,bj as B,bk as E,bl as H}from"./Bv6rD22K.js";const L=B,C=d({name:"LayoutLoader",inheritAttrs:!1,props:{name:String,layoutProps:Object},setup(e,s){return()=>y(i[e.name],e.layoutProps,s.slots)}}),M={name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},W=d({name:"NuxtLayout",inheritAttrs:!1,props:M,setup(e,s){const t=N(),u=P(c),a=!u||u===R()?v():u,o=S(()=>{let n=m(e.name)??a?.meta.layout??L(a?.path).appLayout??"default";return n&&!(n in i)&&e.fallback&&(n=m(e.fallback)),n}),l=w();s.expose({layoutRef:l});const r=t.deferHydration();if(t.isHydrating){const n=t.hooks.hookOnce("app:error",r);j().beforeEach(n)}let p;return()=>{const n=o.value&&o.value in i,f=a?.meta.layoutTransition??x,k=p;return p=o.value,_(n&&f,{default:()=>y(T,{suspensible:!0,onResolve:()=>{O(r)}},{default:()=>y(I,{layoutProps:A(s.attrs,a.meta.layoutProps??{},{ref:l}),key:o.value||void 0,name:o.value,shouldProvide:!e.name,isRenderingNewLayout:b=>b!==k&&b===o.value,hasTransition:!!f},s.slots)})}).default()}}}),I=d({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean},isRenderingNewLayout:{type:Function,required:!0}},setup(e,s){const t=e.name;e.shouldProvide&&h(E,{isCurrent:a=>t===!1||t===(a.meta.layout??L(a.path).appLayout??"default")});const u=P(c);if(u&&u===R()){const a=v(),o={};for(const l in a){const r=l;Object.defineProperty(o,r,{enumerable:!0,get:()=>e.isRenderingNewLayout(e.name)?a[r]:u[r]})}h(c,H(o))}return()=>!t||typeof t=="string"&&!(t in i)?s.slots.default?.():y(C,{key:t,layoutProps:e.layoutProps,name:t},s.slots)}});export{W as _};
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.