rari 0.17.3 → 0.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/dist/{define-B5IGgRrU.mjs → define-CuBTL1jt.mjs} +1 -1
  3. package/dist/{execute-D_MjcLUi.mjs → execute-DJ7w3uhW.mjs} +1 -1
  4. package/dist/{feed-0uhXs0oQ.mjs → feed-CfjUO7Zz.mjs} +1 -1
  5. package/dist/{get-client-component-DFAmn8Ey.mjs → get-client-component-D2K213pV.mjs} +1 -1
  6. package/dist/image.mjs +1 -1
  7. package/dist/mdx/define.mjs +1 -1
  8. package/dist/mdx.mjs +1 -1
  9. package/dist/og.mjs +1 -1
  10. package/dist/{preload-modules-D_bnDKi8.mjs → preload-modules-BDQFWAlZ.mjs} +1 -1
  11. package/dist/proxy/executor.mjs +1 -1
  12. package/dist/react-helpers-duOBWuYF.mjs +1 -0
  13. package/dist/{robots-D3a0R_Ni.mjs → robots-C4JcczMZ.mjs} +1 -1
  14. package/dist/{route-cache-Cgh5HhiB.mjs → route-cache-D2iIKQIU.mjs} +1 -1
  15. package/dist/{router-6mdxF_x7.mjs → router-Cc9lVbtA.mjs} +1 -1
  16. package/dist/router.mjs +1 -1
  17. package/dist/{rsc-vite-build-Btih-0Tu.mjs → rsc-vite-build-Cyc5ad0S.mjs} +1 -1
  18. package/dist/runtime/AppRouterProvider.d.mts +2 -0
  19. package/dist/runtime/AppRouterProvider.mjs +1 -1
  20. package/dist/runtime/ClientRouter.mjs +4 -4
  21. package/dist/runtime/ErrorBoundaryWrapper.mjs +1 -1
  22. package/dist/runtime/action-flight-refresh.mjs +1 -1
  23. package/dist/runtime/call-server.mjs +1 -1
  24. package/dist/runtime/entry-client.mjs +2 -2
  25. package/dist/runtime/merge-flight-refresh.mjs +1 -1
  26. package/dist/runtime/rsc-client-runtime.mjs +1 -1
  27. package/dist/{sitemap-WDyhpXk3.mjs → sitemap-BcUkIffd.mjs} +1 -1
  28. package/dist/type-guards-BLY2PlGR.mjs +1 -0
  29. package/dist/vite.mjs +18 -18
  30. package/package.json +9 -9
  31. package/dist/react-helpers-BKmKvCbj.mjs +0 -1
  32. package/dist/type-guards-BozK2q2n.mjs +0 -1
@@ -1,5 +1,5 @@
1
- import{f as e,h as t,i as n,n as r,r as i}from"../type-guards-BozK2q2n.mjs";import{t as a}from"../router-6mdxF_x7.mjs";import{a as o,n as s,r as c}from"../rari-global-5vGzhToD.mjs";import{r as l}from"../react-helpers-BKmKvCbj.mjs";import{n as u,t as d}from"../preload-modules-D_bnDKi8.mjs";import{createElement as f}from"react";import{createFromFetch as p,createFromReadableStream as m}from"virtual:react-flight-client";import{createRoot as h,hydrateRoot as g}from"react-dom/client";import{AppRouterProvider as _}from"virtual:app-router-provider";import{ClientRouter as v}from"virtual:client-router";import"virtual:rsc-integration.ts";function y(e,t){if(e.querySelector(`.rari-error[data-rari-hydration-failure]`))return;let n=document.createElement(`div`);n.className=`rari-error`,n.setAttribute(`data-rari-hydration-failure`,`true`),n.setAttribute(`role`,`alert`),n.style.cssText=`color:red;border:1px solid red;padding:10px;border-radius:4px;background-color:#fff5f5;margin:10px 0;`;let r=document.createElement(`strong`);r.textContent=`Failed to load page: `,n.append(r,document.createTextNode(t)),e.prepend(n)}function b(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(;t.nextNode();){let e=t.currentNode;if(e.nodeType===8&&`data`in e){let t=e.data;if(t===`$`||t===`$?`||t===`/$`)return!0}}return!!(e.querySelector(`[data-reactroot]`)||e.querySelectorAll(`template[data-rri]`).length>0)}function x(e){let t=e.tagName;if(t===`SCRIPT`||t===`STYLE`||t===`LINK`||t===`META`||t===`NOSCRIPT`)return!0;let n=typeof e.getAttribute==`function`?e.getAttribute.bind(e):null;return n==null?!1:n(`data-rari-nav-transition`)!=null||n(`aria-hidden`)===`true`}function S(e){let t=e.firstElementChild;for(;t!=null&&x(t);)t=t.nextElementSibling;return t}function C(e){if(b(e))return!0;let t=S(e);return t!==null&&!t.classList.contains(`rari-error`)}function w(e){return b(e)}function T(e){e.querySelectorAll(`.rari-error:not([data-rari-hydration-failure])`).forEach(e=>{e.remove()})}async function E(t){let n=u(t);for(let t=0;t<10&&e(n);t+=1)n=u(await n);if(e(n))throw Error(`[rari] Failed to resolve Flight element to a React node`);return n}function D(e){if(!l(e))return y(document.body,`RSC payload did not resolve to an <html> document root. Try refreshing the page.`),console.error(`[rari] Hydration skipped: Flight content is not a document root`),!1;let t=f(_,{initialPayload:{element:e}});return t=f(v,{initialRoute:window.location.pathname},t),t=f(a,{initialPathname:window.location.pathname},t),A(t),!0}function O(){Reflect.set(globalThis,`__rari_client_ready`,!0),window.dispatchEvent(new CustomEvent(`rari:client-ready`))}function k(e){if(e===``)return;let t=()=>{document.title.trim()===``&&(document.title=e)};t(),queueMicrotask(t),requestAnimationFrame(()=>{t(),requestAnimationFrame(t)})}function A(e){let t=document.documentElement,n=document.title.trim();w(t)?(T(t),g(document,e,{onRecoverableError(e){import.meta.env.DEV&&console.warn(`[rari] Hydration mismatch:`,e)}})):h(document).render(e),k(n),O()}
1
+ import{g as e,i as t,n,p as r,r as i}from"../type-guards-BLY2PlGR.mjs";import{t as a}from"../router-Cc9lVbtA.mjs";import{a as o,n as s,r as c}from"../rari-global-5vGzhToD.mjs";import{r as l}from"../react-helpers-duOBWuYF.mjs";import{n as u,t as d}from"../preload-modules-BDQFWAlZ.mjs";import{createElement as f}from"react";import{createFromFetch as p,createFromReadableStream as m}from"virtual:react-flight-client";import{createRoot as h,hydrateRoot as g}from"react-dom/client";import{AppRouterProvider as _}from"virtual:app-router-provider";import{ClientRouter as v}from"virtual:client-router";import"virtual:rsc-integration.ts";function y(e,t){if(e.querySelector(`.rari-error[data-rari-hydration-failure]`))return;let n=document.createElement(`div`);n.className=`rari-error`,n.setAttribute(`data-rari-hydration-failure`,`true`),n.setAttribute(`role`,`alert`),n.style.cssText=`color:red;border:1px solid red;padding:10px;border-radius:4px;background-color:#fff5f5;margin:10px 0;`;let r=document.createElement(`strong`);r.textContent=`Failed to load page: `,n.append(r,document.createTextNode(t)),e.prepend(n)}function b(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(;t.nextNode();){let e=t.currentNode;if(e.nodeType===8&&`data`in e){let t=e.data;if(t===`$`||t===`$?`||t===`/$`)return!0}}return!!(e.querySelector(`[data-reactroot]`)||e.querySelectorAll(`template[data-rri]`).length>0)}function x(e){let t=e.tagName;if(t===`SCRIPT`||t===`STYLE`||t===`LINK`||t===`META`||t===`NOSCRIPT`)return!0;let n=typeof e.getAttribute==`function`?e.getAttribute.bind(e):null;return n==null?!1:n(`data-rari-nav-transition`)!=null||n(`aria-hidden`)===`true`}function S(e){let t=e.firstElementChild;for(;t!=null&&x(t);)t=t.nextElementSibling;return t}function C(e){if(b(e))return!0;let t=S(e);return t!==null&&!t.classList.contains(`rari-error`)}function w(e){return b(e)}function T(e){e.querySelectorAll(`.rari-error:not([data-rari-hydration-failure])`).forEach(e=>{e.remove()})}async function E(e){let t=u(e);for(let e=0;e<10&&r(t);e+=1)t=u(await t);if(r(t))throw Error(`[rari] Failed to resolve Flight element to a React node`);return t}function D(e){if(!l(e))return y(document.body,`RSC payload did not resolve to an <html> document root. Try refreshing the page.`),console.error(`[rari] Hydration skipped: Flight content is not a document root`),!1;let t=f(_,{initialPayload:{element:e}});return t=f(v,{initialRoute:window.location.pathname},t),t=f(a,{initialPathname:window.location.pathname},t),A(t),!0}function O(){Reflect.set(globalThis,`__rari_client_ready`,!0),window.dispatchEvent(new CustomEvent(`rari:client-ready`))}function k(e){if(e===``)return;let t=()=>{document.title.trim()===``&&(document.title=e)};t(),queueMicrotask(t),requestAnimationFrame(()=>{t(),requestAnimationFrame(t)})}function A(e){let t=document.documentElement,n=document.title.trim();w(t)?(T(t),g(document,e,{onRecoverableError(e){import.meta.env.DEV&&console.warn(`[rari] Hydration mismatch:`,e)}})):h(document).render(e),k(n),O()}
2
2
  /*! @preserve CLIENT_COMPONENT_IMPORTS_PLACEHOLDER */
3
3
  c(),s();
4
4
  /*! @preserve CLIENT_COMPONENT_REGISTRATIONS_PLACEHOLDER */
5
- function j(){let e=Reflect.get(globalThis,`__rari_f`);if(Array.isArray(e))return e}function M(e){return t(e)&&typeof e.rscRow==`string`}function N(e){return Array.isArray(e)&&typeof e[1]==`string`}function P(){return!!j()?.some(e=>e!==0)}function F(){let e=j();if(e?.length==null||e.length===0)return null;let t=``,n=[];for(let r of e)r!==0&&(typeof r==`string`?t+=r:N(r)&&n.push(r[1]));if(n.length>0){let e=n.map(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0))),t=e.reduce((e,t)=>e+t.length,0),r=new Uint8Array(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return r}return t?new TextEncoder().encode(t):null}async function I(e,t){let r=new TextDecoder().decode(e);await d(r);let i=o(),a=i.streaming,s=!!(a?.bufferedRows&&a.bufferedRows.length>0);if(t.streaming&&(a?.complete===void 0||s)){let t=new ReadableStream({start(t){let r=!1;t.enqueue(e);let a=e=>{if(r)return;let i=n(e,M);i&&t.enqueue(new TextEncoder().encode(`\n${i.rscRow}`))},o=()=>{r||(r=!0,t.close(),window.removeEventListener(`rari:html-stream-row`,a),window.removeEventListener(`rari:stream-complete`,o))};if(window.addEventListener(`rari:html-stream-row`,a),window.addEventListener(`rari:stream-complete`,o),i.streaming?.bufferedRows){let e=[...i.streaming.bufferedRows];for(let n of e)t.enqueue(new TextEncoder().encode(`\n${n}`));i.streaming.bufferedRows=[]}i.streaming?.complete&&o()}});return m(t)}let c=new ReadableStream({start(t){t.enqueue(e),t.close()}});return m(c)}async function L(e){let t=`Could not load interactive page data.`,n;try{n=await I(e,{streaming:!1})}catch(e){t=i(e,`Failed to parse embedded RSC payload.`);try{let e=window.location.pathname+window.location.search,r=await fetch(e,{headers:{Accept:`text/x-component`},cache:`no-store`});r.ok?n=await p(Promise.resolve(r)):t=`Failed to fetch RSC payload fallback: HTTP ${r.status}.`}catch(e){t=i(e,`Failed to fetch RSC payload fallback.`),console.error(`[rari] Failed to fetch RSC payload fallback:`,e)}}return n==null?(y(document.body,`${t} Try refreshing the page.`),console.error(`[rari] Hydration skipped: failed to load RSC payload`),{ok:!1,errorMessage:t}):(D(await E(n)),{ok:!0,errorMessage:t})}async function R(){try{let e=window.location.pathname+window.location.search,t=await fetch(e,{headers:{Accept:`text/x-component`},cache:`no-store`});if(!t.ok&&t.status!==404)throw Error(`Failed to fetch RSC data: ${t.status}`);if(!t.body)throw Error(`RSC response has no body`);return await p(Promise.resolve(t))}catch(e){if(e instanceof Promise)throw e;return console.error(`[rari] Failed to fetch initial RSC data:`,e),null}}function z(){return new ReadableStream({start(e){let t=t=>{let r=n(t,M);r&&e.enqueue(new TextEncoder().encode(`${r.rscRow}\n`))},r=()=>{e.close(),window.removeEventListener(`rari:html-stream-row`,t),window.removeEventListener(`rari:stream-complete`,r)};window.addEventListener(`rari:html-stream-row`,t),window.addEventListener(`rari:stream-complete`,r);let i=o();if(i.streaming?.bufferedRows){let t=[...i.streaming.bufferedRows];i.streaming.bufferedRows=[];for(let n of t)e.enqueue(new TextEncoder().encode(`${n}\n`))}i.streaming?.complete&&r()}})}async function B(){try{return await m(z())}catch(e){return console.error(`[rari] Failed to process streaming RSC payload:`,e),null}}async function V(e){try{return await I(e,{streaming:!0})}catch(e){return console.error(`[rari] Failed to parse embedded RSC payload:`,e),console.error(`[rari] Error stack:`,r(e)?.stack??`no stack`),null}}async function H(){let e=P(),t=F(),n=document.documentElement,r=C(document.body)||b(n),i=o().streaming,a=!!(i?.bufferedRows&&i.bufferedRows.length>0);try{if(r&&e&&t){await L(t);return}let n=!e&&!a&&!r,i;if(n?i=await R():e&&t?i=await V(t):a&&(i=await B()),i==null)throw Error(`No RSC data available for hydration`);D(await E(i))}catch(e){console.error(`[rari] Error rendering app:`,e)}}function U(){let e=import.meta.hot;if(!e)return{};let n=e.data;return t(n)?{hasRendered:n.hasRendered===!0}:{}}function W(){let e=import.meta.hot;if(!e)return;let n=e.data;t(n)&&(n.hasRendered=!0)}(!import.meta.hot||U().hasRendered!==!0)&&(H().catch(e=>{console.error(`[rari] Fatal error:`,e)}),W());export{H as renderApp};
5
+ function j(){let e=Reflect.get(globalThis,`__rari_f`);if(Array.isArray(e))return e}function M(t){return e(t)&&typeof t.rscRow==`string`}function N(e){return Array.isArray(e)&&typeof e[1]==`string`}function P(){return!!j()?.some(e=>e!==0)}function F(){let e=j();if(e?.length==null||e.length===0)return null;let t=``,n=[];for(let r of e)r!==0&&(typeof r==`string`?t+=r:N(r)&&n.push(r[1]));if(n.length>0){let e=n.map(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0))),t=e.reduce((e,t)=>e+t.length,0),r=new Uint8Array(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return r}return t?new TextEncoder().encode(t):null}async function I(e,n){let r=new TextDecoder().decode(e);await d(r);let i=o(),a=i.streaming,s=!!(a?.bufferedRows&&a.bufferedRows.length>0);if(n.streaming&&(a?.complete===void 0||s)){let n=new ReadableStream({start(n){let r=!1;n.enqueue(e);let a=e=>{if(r)return;let i=t(e,M);i&&n.enqueue(new TextEncoder().encode(`\n${i.rscRow}`))},o=()=>{r||(r=!0,n.close(),window.removeEventListener(`rari:html-stream-row`,a),window.removeEventListener(`rari:stream-complete`,o))};if(window.addEventListener(`rari:html-stream-row`,a),window.addEventListener(`rari:stream-complete`,o),i.streaming?.bufferedRows){let e=[...i.streaming.bufferedRows];for(let t of e)n.enqueue(new TextEncoder().encode(`\n${t}`));i.streaming.bufferedRows=[]}i.streaming?.complete&&o()}});return m(n)}let c=new ReadableStream({start(t){t.enqueue(e),t.close()}});return m(c)}async function L(e){let t=`Could not load interactive page data.`,n;try{n=await I(e,{streaming:!1})}catch(e){t=i(e,`Failed to parse embedded RSC payload.`);try{let e=window.location.pathname+window.location.search,r=await fetch(e,{headers:{Accept:`text/x-component`},cache:`no-store`});r.ok?n=await p(Promise.resolve(r)):t=`Failed to fetch RSC payload fallback: HTTP ${r.status}.`}catch(e){t=i(e,`Failed to fetch RSC payload fallback.`),console.error(`[rari] Failed to fetch RSC payload fallback:`,e)}}return n==null?(y(document.body,`${t} Try refreshing the page.`),console.error(`[rari] Hydration skipped: failed to load RSC payload`),{ok:!1,errorMessage:t}):(D(await E(n)),{ok:!0,errorMessage:t})}async function R(){try{let e=window.location.pathname+window.location.search,t=await fetch(e,{headers:{Accept:`text/x-component`},cache:`no-store`});if(!t.ok&&t.status!==404)throw Error(`Failed to fetch RSC data: ${t.status}`);if(!t.body)throw Error(`RSC response has no body`);return await p(Promise.resolve(t))}catch(e){if(e instanceof Promise)throw e;return console.error(`[rari] Failed to fetch initial RSC data:`,e),null}}function z(){return new ReadableStream({start(e){let n=n=>{let r=t(n,M);r&&e.enqueue(new TextEncoder().encode(`${r.rscRow}\n`))},r=()=>{e.close(),window.removeEventListener(`rari:html-stream-row`,n),window.removeEventListener(`rari:stream-complete`,r)};window.addEventListener(`rari:html-stream-row`,n),window.addEventListener(`rari:stream-complete`,r);let i=o();if(i.streaming?.bufferedRows){let t=[...i.streaming.bufferedRows];i.streaming.bufferedRows=[];for(let n of t)e.enqueue(new TextEncoder().encode(`${n}\n`))}i.streaming?.complete&&r()}})}async function B(){try{return await m(z())}catch(e){return console.error(`[rari] Failed to process streaming RSC payload:`,e),null}}async function V(e){try{return await I(e,{streaming:!0})}catch(e){return console.error(`[rari] Failed to parse embedded RSC payload:`,e),console.error(`[rari] Error stack:`,n(e)?.stack??`no stack`),null}}async function H(){let e=P(),t=F(),n=document.documentElement,r=C(document.body)||b(n),i=o().streaming,a=!!(i?.bufferedRows&&i.bufferedRows.length>0);try{if(r&&e&&t){await L(t);return}let n=!e&&!a&&!r,i;if(n?i=await R():e&&t?i=await V(t):a&&(i=await B()),i==null)throw Error(`No RSC data available for hydration`);D(await E(i))}catch(e){console.error(`[rari] Error rendering app:`,e)}}function U(){let t=import.meta.hot;if(!t)return{};let n=t.data;return e(n)?{hasRendered:n.hasRendered===!0}:{}}function W(){let t=import.meta.hot;if(!t)return;let n=t.data;e(n)&&(n.hasRendered=!0)}(!import.meta.hot||U().hasRendered!==!0)&&(H().catch(e=>{console.error(`[rari] Fatal error:`,e)}),W());export{H as renderApp};
@@ -1 +1 @@
1
- import{c as e,f as t,h as n,o as r}from"../type-guards-BozK2q2n.mjs";import{Children as i,Fragment as a,cloneElement as o,createElement as s,isValidElement as c}from"react";function l(t){return e(t.type)}function u(e){return e.type===`head`||e.type===`HEAD`}function d(e){return e.type===`html`||e.type===`HTML`}function f(e){return e.type===`body`||e.type===`BODY`}function p(e){return e.type===`rari-layout-reuse`}function m(e){let t=e.props[`data-rari-layout-path`];return typeof t==`string`&&t!==``?t:void 0}function ee(e,t,n){if(m(e)===t)return W(e,e.props,n);let r=q(e,t);if(r==null)return null;let i=r.parent.props,a=_(r.parent),o=a[r.slotIndex];if(!c(o))return null;let s=[...a];s[r.slotIndex]=W(o,o.props,n);let l=Q(e,r.parent,W(r.parent,i,s));return c(l)?l:null}function h(e){let t={...e};return delete t.children,t}function g(e,t){if(!l(e)||!l(t))return!1;let n=r(e.type)?e.type.$$id:void 0,i=r(t.type)?t.type.$$id:void 0;return n==null||n===``||i==null||i===``||n!==i?!1:(e.key??null)===(t.key??null)}function _(e){return S(e.props.children)}function v(e){return Array.isArray(e)&&e.some(e=>Array.isArray(e))}function y(e,t){let n=e.key,r=typeof n==`string`&&n!==``?`${t}:${n.replace(/^\.+/,``)}`:t;return o(e,{key:r})}function b(e,t,n){return Array.isArray(e)?x(e,t==null?`.${n}`:`${t}:${n}`):e==null||e===!1||e===!0?[]:c(e)&&t!=null?[y(e,`${t}:${n}`)]:[e]}function x(e,t){if(!Array.isArray(e))return e==null||e===!1||e===!0?[]:c(e)&&t!=null?[y(e,t)]:[e];let n=[];for(let r=0;r<e.length;r+=1)n.push(...b(e[r],t,r));return n}function S(e){return e==null||e===!1||e===!0?[]:c(e)||typeof e==`string`||typeof e==`number`?[e]:Array.isArray(e)?x(e,null):t(e)?[e]:i.toArray(e)}function C(e){return c(e)?p(e)?!0:S(e.props.children).some(e=>C(e)):!1}function te(e){let t=e.type;return t===`title`||t===`TITLE`||t===`meta`||t===`META`||t===`link`||t===`LINK`}function w(e){if(e.type!==`link`&&e.type!==`LINK`)return!1;let t=e.props.rel;if(typeof t!=`string`||t===``)return!1;let n=t.toLowerCase();return n===`stylesheet`||n===`preload`||n===`modulepreload`||n===`preconnect`||n===`dns-prefetch`||n===`icon`||n===`shortcut icon`||n===`apple-touch-icon`}function T(e){if(n(e)){if(e.status===`fulfilled`)return e.value;if(n(e._payload)&&e._payload.status===`fulfilled`)return e._payload.value}}function E(e){let r=e;for(let e=0;e<10;e+=1){if(!t(r)&&(!n(r)||!n(r._payload)))return r;let e=T(r);if(e===void 0)return r;if(e==null||e===!1||e===!0)return e;r=e}return r}function D(e){let t=E(e);if(Array.isArray(t)){let e=[];for(let n of t)e.push(...D(n));return e}return c(t)&&t.type===a?O(_(t)):t==null||t===!1||t===!0?[]:[t]}function O(e){let t=[];for(let n of e)t.push(...D(n));return t}function k(e){let t=E(e);return Array.isArray(t)?!0:c(t)&&t.type===a}function A(e){let t=[];for(let n of e){if(c(n)&&n.type===a){t.push(...A(_(n)));continue}t.push(n)}return t}function j(e){if(e.type!==`meta`&&e.type!==`META`)return!1;let t=e.props;return t.charSet!=null||t.charset!=null||typeof t.httpEquiv==`string`&&t.httpEquiv.toLowerCase()===`content-type`||typeof t.name==`string`&&t.name.toLowerCase()===`viewport`}function M(e,t){let n=e.props;return A(t).some(e=>{if(!c(e)||!j(e))return!1;let t=e.props;return n.charSet!=null||n.charset!=null?t.charSet!=null||t.charset!=null:typeof n.httpEquiv==`string`&&n.httpEquiv.toLowerCase()===`content-type`?typeof t.httpEquiv==`string`&&t.httpEquiv.toLowerCase()===`content-type`:typeof t.name==`string`&&t.name.toLowerCase()===`viewport`})}function N(e){return e.type===`title`||e.type===`TITLE`}function P(e){if(e.type!==`meta`&&e.type!==`META`)return!1;let t=e.props.name;return typeof t==`string`&&t.toLowerCase()===`description`}function F(e){return A(e).some(e=>c(e)&&N(e))}function I(e){return A(e).some(e=>c(e)&&P(e))}function L(e,t){let n=e.props,r=A(_(e)),i=_(t),a=A(i),o=F(a),s=I(a);return W(e,n,[...r.filter(e=>{if(!c(e))return!0;if(N(e))return!o;if(e.type===`meta`||e.type===`META`)return j(e)?!M(e,i):P(e)?!s:!1;if(!w(e))return!te(e);let t=e.props;return!a.some(e=>{if(!c(e)||!w(e))return!1;let n=e.props;return t.rel!=null&&t.rel===n.rel&&t.href===n.href})}),...a])}function R(e){return e.length===0?null:e.length===1?e[0]:[...e]}function z(e){let t=[];for(let n of S(e))t.push(B(n));return t}function B(e){if(Array.isArray(e))return R(z(e));if(!c(e))return e;if(p(e))return R(z(e.props.children));let t=e.props,n=S(t.children);if(n.length===0)return e;let r=z(n);return!v(t.children)&&r.every((e,t)=>e===n[t])?e:W(e,t,R(r))}function V(e,t){if(e.length===0)return[B(t)];if(e.length===1)return[$(e[0],t)];let n=[],r=!1;for(let i of e)!r&&c(i)?(r=!0,n.push($(i,t))):n.push(i);return r?n:[B(t)]}function H(e,t){let n=[],r=0;for(let i of t){if(c(i)&&p(i)){n.push(...V(e.slice(r),i)),r=e.length;continue}let t=e[r];n.push(t===void 0?B(i):$(t,i)),r+=1}return r<e.length&&n.push(...e.slice(r)),R(n)}function U(e,t){let n=S(e),r=S(t);return n.length===0||r.length===0?B(t):r.some(e=>c(e)&&p(e))?H(n,r):n.length===r.length?R(n.map((e,t)=>$(e,r[t]))):B(t)}function W(e,t,n){let r=S(n);return o(e,h(t),...r.length===0?[null]:r)}function G(e,t){for(let n=0;n<e.length;n+=1){let r=e[n];if(c(r)&&m(r)===t)return n;for(let e of D(r))if(c(e)&&m(e)===t)return n}return-1}function K(e,t){let n=_(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(c(i)){let e=q(i,t);if(e!=null)return e;continue}let a=E(i);if(c(a)&&q(a,t)!=null)return{parent:e,slotIndex:r}}return null}function q(e,t){let n=G(_(e),t);return n>=0?{parent:e,slotIndex:n}:K(e,t)}function J(e,t,n){let r=E(e);if(Array.isArray(r)){let e=[];for(let t of r)e.push(...D(t));return Z(s(a,null,...e.length===0?[null]:e),t,n)}return c(r)?Z(r,t,n):t}function Y(e,t){if(t==null||t===!1||t===!0)return t;let n=_(e);return n.length===1?$(n[0],t):t}function X(e,n,r){if(m(e)===r)return W(e,e.props,Y(e,n));let i=q(e,r);if(i==null)return null;let a=i.parent.props,o=_(i.parent),s=[...o],l=o[i.slotIndex];return k(l)||!c(l)&&t(l)?s[i.slotIndex]=J(l,n,r):c(l)?s[i.slotIndex]=W(l,l.props,Y(l,n)):s[i.slotIndex]=n,Q(e,i.parent,W(i.parent,a,s))}function Z(e,t,n){if(!c(e))return t;if(c(t)&&p(t)){let r=m(t);return Z(e,t.props.children,r??n)}return n!=null&&n!==``?X(e,t,n)??e:e}function Q(e,t,n){if(e===t)return n;let r=e.props,i=_(e),a=[],o=!1;for(let e of i){if(!c(e)){a.push(e);continue}if(e===t){o=!0,a.push(n);continue}let r=Q(e,t,n);r!==e&&(o=!0),a.push(r)}return o?W(e,r,a):e}function ne(e,t){let n=e.props,r=_(e),i=_(t),a=r.find(e=>c(e)&&u(e)),o=i.find(e=>c(e)&&u(e)),s=r.find(e=>c(e)&&f(e)),l=i.find(e=>c(e)&&f(e)),d=c(a)&&c(o)?L(a,o):c(a)?a:o,p=c(s)&&c(l)?$(s,l):c(s)?s:l;if(d===a&&p===s)return e;let m=[];return d!=null&&m.push(d),p!=null&&m.push(p),W(e,n,m)}function re(e,t,n){let r=e.props,i=_(e),a=i.findIndex(e=>c(e)&&f(e)),o=a>=0?i[a]:void 0,s=c(o)?Z(o,t.children,n):Z(e,t.children,n);if(s===o||s===e)return e;if(c(o)&&a>=0){let t=[...i];return t[a]=s,W(e,r,t)}return W(e,r,s)}function ie(e,t){let n=e.props,r=t.props,i=S(r.children);if(i.length===1&&c(i[0])&&p(i[0])){let t=i[0];return Z(e,t.props.children,m(t))}let a=U(n.children,r.children);return a===r.children?t:C(t)?W(e,n,a):W(t,r,a)}function $(e,t){if(e==null)return B(t);if(t==null)return e;if(!c(e)||!c(t))return t;if(p(t)){let n=t.props,r=m(t);return d(e)?re(e,n,r):Z(e,n.children,r)}return d(e)&&d(t)&&C(t)?ne(e,t):u(e)||u(t)?t:g(e,t)||e.type===t.type?ie(e,t):t}export{p as isLayoutReuseMarker,m as layoutPathOf,$ as mergeFlightRefresh,ee as setChildrenAtLayoutPath,E as unwrapFulfilledFlightNode};
1
+ import{g as e,l as t,o as n,p as r}from"../type-guards-BLY2PlGR.mjs";import{Children as i,Fragment as a,cloneElement as o,createElement as s,isValidElement as c}from"react";function l(e){return t(e.type)}function u(e){return e.type===`head`||e.type===`HEAD`}function d(e){return e.type===`html`||e.type===`HTML`}function f(e){return e.type===`body`||e.type===`BODY`}function p(e){return e.type===`rari-layout-reuse`}function m(e){let t=e.props[`data-rari-layout-path`];return typeof t==`string`&&t!==``?t:void 0}function ee(e,t,n){if(m(e)===t)return W(e,e.props,n);let r=q(e,t);if(r==null)return null;let i=r.parent.props,a=_(r.parent),o=a[r.slotIndex];if(!c(o))return null;let s=[...a];s[r.slotIndex]=W(o,o.props,n);let l=Q(e,r.parent,W(r.parent,i,s));return c(l)?l:null}function h(e){let t={...e};return delete t.children,t}function g(e,t){if(!l(e)||!l(t))return!1;let r=n(e.type)?e.type.$$id:void 0,i=n(t.type)?t.type.$$id:void 0;return r==null||r===``||i==null||i===``||r!==i?!1:(e.key??null)===(t.key??null)}function _(e){return S(e.props.children)}function v(e){return Array.isArray(e)&&e.some(e=>Array.isArray(e))}function y(e,t){let n=e.key,r=typeof n==`string`&&n!==``?`${t}:${n.replace(/^\.+/,``)}`:t;return o(e,{key:r})}function b(e,t,n){return Array.isArray(e)?x(e,t==null?`.${n}`:`${t}:${n}`):e==null||e===!1||e===!0?[]:c(e)&&t!=null?[y(e,`${t}:${n}`)]:[e]}function x(e,t){if(!Array.isArray(e))return e==null||e===!1||e===!0?[]:c(e)&&t!=null?[y(e,t)]:[e];let n=[];for(let r=0;r<e.length;r+=1)n.push(...b(e[r],t,r));return n}function S(e){return e==null||e===!1||e===!0?[]:c(e)||typeof e==`string`||typeof e==`number`?[e]:Array.isArray(e)?x(e,null):r(e)?[e]:i.toArray(e)}function C(e){return c(e)?p(e)?!0:S(e.props.children).some(e=>C(e)):!1}function te(e){let t=e.type;return t===`title`||t===`TITLE`||t===`meta`||t===`META`||t===`link`||t===`LINK`}function w(e){if(e.type!==`link`&&e.type!==`LINK`)return!1;let t=e.props.rel;if(typeof t!=`string`||t===``)return!1;let n=t.toLowerCase();return n===`stylesheet`||n===`preload`||n===`modulepreload`||n===`preconnect`||n===`dns-prefetch`||n===`icon`||n===`shortcut icon`||n===`apple-touch-icon`}function T(t){if(e(t)){if(t.status===`fulfilled`)return t.value;if(e(t._payload)&&t._payload.status===`fulfilled`)return t._payload.value}}function E(t){let n=t;for(let t=0;t<10;t+=1){if(!r(n)&&(!e(n)||!e(n._payload)))return n;let t=T(n);if(t===void 0)return n;if(t==null||t===!1||t===!0)return t;n=t}return n}function D(e){let t=E(e);if(Array.isArray(t)){let e=[];for(let n of t)e.push(...D(n));return e}return c(t)&&t.type===a?O(_(t)):t==null||t===!1||t===!0?[]:[t]}function O(e){let t=[];for(let n of e)t.push(...D(n));return t}function k(e){let t=E(e);return Array.isArray(t)?!0:c(t)&&t.type===a}function A(e){let t=[];for(let n of e){if(c(n)&&n.type===a){t.push(...A(_(n)));continue}t.push(n)}return t}function j(e){if(e.type!==`meta`&&e.type!==`META`)return!1;let t=e.props;return t.charSet!=null||t.charset!=null||typeof t.httpEquiv==`string`&&t.httpEquiv.toLowerCase()===`content-type`||typeof t.name==`string`&&t.name.toLowerCase()===`viewport`}function M(e,t){let n=e.props;return A(t).some(e=>{if(!c(e)||!j(e))return!1;let t=e.props;return n.charSet!=null||n.charset!=null?t.charSet!=null||t.charset!=null:typeof n.httpEquiv==`string`&&n.httpEquiv.toLowerCase()===`content-type`?typeof t.httpEquiv==`string`&&t.httpEquiv.toLowerCase()===`content-type`:typeof t.name==`string`&&t.name.toLowerCase()===`viewport`})}function N(e){return e.type===`title`||e.type===`TITLE`}function P(e){if(e.type!==`meta`&&e.type!==`META`)return!1;let t=e.props.name;return typeof t==`string`&&t.toLowerCase()===`description`}function F(e){return A(e).some(e=>c(e)&&N(e))}function I(e){return A(e).some(e=>c(e)&&P(e))}function L(e,t){let n=e.props,r=A(_(e)),i=_(t),a=A(i),o=F(a),s=I(a);return W(e,n,[...r.filter(e=>{if(!c(e))return!0;if(N(e))return!o;if(e.type===`meta`||e.type===`META`)return j(e)?!M(e,i):P(e)?!s:!1;if(!w(e))return!te(e);let t=e.props;return!a.some(e=>{if(!c(e)||!w(e))return!1;let n=e.props;return t.rel!=null&&t.rel===n.rel&&t.href===n.href})}),...a])}function R(e){return e.length===0?null:e.length===1?e[0]:[...e]}function z(e){let t=[];for(let n of S(e))t.push(B(n));return t}function B(e){if(Array.isArray(e))return R(z(e));if(!c(e))return e;if(p(e))return R(z(e.props.children));let t=e.props,n=S(t.children);if(n.length===0)return e;let r=z(n);return!v(t.children)&&r.every((e,t)=>e===n[t])?e:W(e,t,R(r))}function V(e,t){if(e.length===0)return[B(t)];if(e.length===1)return[$(e[0],t)];let n=[],r=!1;for(let i of e)!r&&c(i)?(r=!0,n.push($(i,t))):n.push(i);return r?n:[B(t)]}function H(e,t){let n=[],r=0;for(let i of t){if(c(i)&&p(i)){n.push(...V(e.slice(r),i)),r=e.length;continue}let t=e[r];n.push(t===void 0?B(i):$(t,i)),r+=1}return r<e.length&&n.push(...e.slice(r)),R(n)}function U(e,t){let n=S(e),r=S(t);return n.length===0||r.length===0?B(t):r.some(e=>c(e)&&p(e))?H(n,r):n.length===r.length?R(n.map((e,t)=>$(e,r[t]))):B(t)}function W(e,t,n){let r=S(n);return o(e,h(t),...r.length===0?[null]:r)}function G(e,t){for(let n=0;n<e.length;n+=1){let r=e[n];if(c(r)&&m(r)===t)return n;for(let e of D(r))if(c(e)&&m(e)===t)return n}return-1}function K(e,t){let n=_(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(c(i)){let e=q(i,t);if(e!=null)return e;continue}let a=E(i);if(c(a)&&q(a,t)!=null)return{parent:e,slotIndex:r}}return null}function q(e,t){let n=G(_(e),t);return n>=0?{parent:e,slotIndex:n}:K(e,t)}function J(e,t,n){let r=E(e);if(Array.isArray(r)){let e=[];for(let t of r)e.push(...D(t));return Z(s(a,null,...e.length===0?[null]:e),t,n)}return c(r)?Z(r,t,n):t}function Y(e,t){if(t==null||t===!1||t===!0)return t;let n=_(e);return n.length===1?$(n[0],t):t}function X(e,t,n){if(m(e)===n)return W(e,e.props,Y(e,t));let i=q(e,n);if(i==null)return null;let a=i.parent.props,o=_(i.parent),s=[...o],l=o[i.slotIndex];return k(l)||!c(l)&&r(l)?s[i.slotIndex]=J(l,t,n):c(l)?s[i.slotIndex]=W(l,l.props,Y(l,t)):s[i.slotIndex]=t,Q(e,i.parent,W(i.parent,a,s))}function Z(e,t,n){if(!c(e))return t;if(c(t)&&p(t)){let r=m(t);return Z(e,t.props.children,r??n)}return n!=null&&n!==``?X(e,t,n)??e:e}function Q(e,t,n){if(e===t)return n;let r=e.props,i=_(e),a=[],o=!1;for(let e of i){if(!c(e)){a.push(e);continue}if(e===t){o=!0,a.push(n);continue}let r=Q(e,t,n);r!==e&&(o=!0),a.push(r)}return o?W(e,r,a):e}function ne(e,t){let n=e.props,r=_(e),i=_(t),a=r.find(e=>c(e)&&u(e)),o=i.find(e=>c(e)&&u(e)),s=r.find(e=>c(e)&&f(e)),l=i.find(e=>c(e)&&f(e)),d=c(a)&&c(o)?L(a,o):c(a)?a:o,p=c(s)&&c(l)?$(s,l):c(s)?s:l;if(d===a&&p===s)return e;let m=[];return d!=null&&m.push(d),p!=null&&m.push(p),W(e,n,m)}function re(e,t,n){let r=e.props,i=_(e),a=i.findIndex(e=>c(e)&&f(e)),o=a>=0?i[a]:void 0,s=c(o)?Z(o,t.children,n):Z(e,t.children,n);if(s===o||s===e)return e;if(c(o)&&a>=0){let t=[...i];return t[a]=s,W(e,r,t)}return W(e,r,s)}function ie(e,t){let n=e.props,r=t.props,i=S(r.children);if(i.length===1&&c(i[0])&&p(i[0])){let t=i[0];return Z(e,t.props.children,m(t))}let a=U(n.children,r.children);return a===r.children?t:C(t)?W(e,n,a):W(t,r,a)}function $(e,t){if(e==null)return B(t);if(t==null)return e;if(!c(e)||!c(t))return t;if(p(t)){let n=t.props,r=m(t);return d(e)?re(e,n,r):Z(e,n.children,r)}return d(e)&&d(t)&&C(t)?ne(e,t):u(e)||u(t)?t:g(e,t)||e.type===t.type?ie(e,t):t}export{p as isLayoutReuseMarker,m as layoutPathOf,$ as mergeFlightRefresh,ee as setChildrenAtLayoutPath,E as unwrapFulfilledFlightNode};
@@ -1 +1 @@
1
- import{h as e}from"../type-guards-BozK2q2n.mjs";import{a as t,i as n,n as r,r as i,t as a}from"../rari-global-5vGzhToD.mjs";import{n as o,r as s}from"../get-client-component-DFAmn8Ey.mjs";if(n().isDevelopment=process.env.NODE_ENV!==`production`,i(),a(),r(),typeof window<`u`&&(o(),Reflect.set(globalThis,`__rari_rsc_require__`,s)),typeof window<`u`){let e=t();e.streaming??={bufferedRows:[]}}if(import.meta.hot){function t(e){if(!e)return!1;try{return n().serverComponents?.has(e)===!0}catch{return!1}}let r=!1,i=[],a=/* @__PURE__ */ new Map;function o(e,t,n){a.set(e,async e=>{n(e)&&await t(e)}),import.meta.hot.on(e,t=>{(async()=>{if(!r){i.push({event:e,data:t});return}try{let n=a.get(e);n&&await n(t)}catch(t){console.error(`[rari] HMR: Error in handler for '${e}':`,t)}})()})}function s(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}function c(t){return e(t)&&Array.isArray(t.serverComponents)}function l(t){return e(t)&&typeof t.path==`string`&&t.path!==``}function u(t){return e(t)}function d(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}function f(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}o(`rari:register-server-component`,e=>{let t=n();t.serverComponents??=/* @__PURE__ */ new Set,t.serverComponents.add(e.filePath)},s),o(`rari:server-components-registry`,e=>{let t=n();t.serverComponents??=/* @__PURE__ */ new Set;for(let n of e.serverComponents)t.serverComponents.add(n)},c),o(`vite:beforeFullReload`,e=>{t(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},l),o(`rari:server-component-updated`,e=>{let n=e.id!=null&&e.id!==``?e.id:e.componentId,r=e.t!=null&&e.t!==0?e.t:e.timestamp;n!=null&&n!==``?window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{componentId:n,filePath:e.filePath!=null&&e.filePath!==``?e.filePath:e.file,type:`server-component`,timestamp:r}})):e.path!=null&&e.path!==``&&t(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},u);function p(e){if(e.title!=null&&e.title!==``&&(document.title=e.title),e.description==null||e.description===``)return;let t=document.querySelector(`meta[name="description"]`);t||(t=document.createElement(`meta`),t.setAttribute(`name`,`description`),document.head.appendChild(t)),t.setAttribute(`content`,e.description)}function m(t){let n=e(t)&&t.success===!0,r=e(t)&&t.reloaded===!0,i=e(t)&&t.content_unchanged===!0,a=e(t)&&typeof t.error==`string`?t.error:`Component reload unsuccessful`;return{ok:n||r,contentUnchanged:i,errorMessage:a}}async function h(e){if(e.routePath!=null&&e.routePath!==``||e.affectedRoutes!=null&&e.affectedRoutes.length!==0)try{let t=await fetch(`/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`register`,file_path:e.filePath})});if(!t.ok)throw Error(`Component reload failed: ${t.status}`);let n=m(await t.json());if(!n.ok)throw Error(n.errorMessage);if(n.contentUnchanged)return;await fetch(`/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`invalidate`,componentId:e.routePath!=null&&e.routePath!==``?e.routePath:e.filePath,filePath:e.filePath})}),e.metadataChanged&&e.metadata&&p(e.metadata),window.dispatchEvent(new CustomEvent(`rari:app-router-rerender`,{detail:{routePath:e.routePath,affectedRoutes:e.affectedRoutes??(e.routePath==null?[]:[e.routePath]),currentPath:window.location.pathname,preserveParams:!0}}))}catch(e){console.error(`[rari] HMR: App router update failed:`,e)}}o(`rari:app-router-updated`,h,d),o(`rari:server-action-updated`,e=>{window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.filePath,type:`server-action`}}))},f),i.length>0?(async()=>{try{let e=[...i];i.length=0;for(let{event:t,data:n}of e){let e=a.get(t);e&&await e(n)}}catch(e){console.error(`[rari] HMR: Error during event replay:`,e)}finally{r=!0}})():r=!0}export{};
1
+ import{g as e}from"../type-guards-BLY2PlGR.mjs";import{a as t,i as n,n as r,r as i,t as a}from"../rari-global-5vGzhToD.mjs";import{n as o,r as s}from"../get-client-component-D2K213pV.mjs";if(n().isDevelopment=process.env.NODE_ENV!==`production`,i(),a(),r(),typeof window<`u`&&(o(),Reflect.set(globalThis,`__rari_rsc_require__`,s)),typeof window<`u`){let e=t();e.streaming??={bufferedRows:[]}}if(import.meta.hot){function t(e){if(!e)return!1;try{return n().serverComponents?.has(e)===!0}catch{return!1}}let r=!1,i=[],a=/* @__PURE__ */ new Map;function o(e,t,n){a.set(e,async e=>{n(e)&&await t(e)}),import.meta.hot.on(e,t=>{(async()=>{if(!r){i.push({event:e,data:t});return}try{let n=a.get(e);n&&await n(t)}catch(t){console.error(`[rari] HMR: Error in handler for '${e}':`,t)}})()})}function s(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}function c(t){return e(t)&&Array.isArray(t.serverComponents)}function l(t){return e(t)&&typeof t.path==`string`&&t.path!==``}function u(t){return e(t)}function d(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}function f(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}o(`rari:register-server-component`,e=>{let t=n();t.serverComponents??=/* @__PURE__ */ new Set,t.serverComponents.add(e.filePath)},s),o(`rari:server-components-registry`,e=>{let t=n();t.serverComponents??=/* @__PURE__ */ new Set;for(let n of e.serverComponents)t.serverComponents.add(n)},c),o(`vite:beforeFullReload`,e=>{t(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},l),o(`rari:server-component-updated`,e=>{let n=e.id!=null&&e.id!==``?e.id:e.componentId,r=e.t!=null&&e.t!==0?e.t:e.timestamp;n!=null&&n!==``?window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{componentId:n,filePath:e.filePath!=null&&e.filePath!==``?e.filePath:e.file,type:`server-component`,timestamp:r}})):e.path!=null&&e.path!==``&&t(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},u);function p(e){if(e.title!=null&&e.title!==``&&(document.title=e.title),e.description==null||e.description===``)return;let t=document.querySelector(`meta[name="description"]`);t||(t=document.createElement(`meta`),t.setAttribute(`name`,`description`),document.head.appendChild(t)),t.setAttribute(`content`,e.description)}function m(t){let n=e(t)&&t.success===!0,r=e(t)&&t.reloaded===!0,i=e(t)&&t.content_unchanged===!0,a=e(t)&&typeof t.error==`string`?t.error:`Component reload unsuccessful`;return{ok:n||r,contentUnchanged:i,errorMessage:a}}async function h(e){if(e.routePath!=null&&e.routePath!==``||e.affectedRoutes!=null&&e.affectedRoutes.length!==0)try{let t=await fetch(`/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`register`,file_path:e.filePath})});if(!t.ok)throw Error(`Component reload failed: ${t.status}`);let n=m(await t.json());if(!n.ok)throw Error(n.errorMessage);if(n.contentUnchanged)return;await fetch(`/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`invalidate`,componentId:e.routePath!=null&&e.routePath!==``?e.routePath:e.filePath,filePath:e.filePath})}),e.metadataChanged&&e.metadata&&p(e.metadata),window.dispatchEvent(new CustomEvent(`rari:app-router-rerender`,{detail:{routePath:e.routePath,affectedRoutes:e.affectedRoutes??(e.routePath==null?[]:[e.routePath]),currentPath:window.location.pathname,preserveParams:!0}}))}catch(e){console.error(`[rari] HMR: App router update failed:`,e)}}o(`rari:app-router-updated`,h,d),o(`rari:server-action-updated`,e=>{window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.filePath,type:`server-action`}}))},f),i.length>0?(async()=>{try{let e=[...i];i.length=0;for(let{event:t,data:n}of e){let e=a.get(t);e&&await e(n)}}catch(e){console.error(`[rari] HMR: Error during event replay:`,e)}finally{r=!0}})():r=!0}export{};
@@ -1,4 +1,4 @@
1
- import{h as e}from"./type-guards-BozK2q2n.mjs";import{t}from"./xml-DPsk9WTz.mjs";import{i as n,n as r,t as i}from"./execute-D_MjcLUi.mjs";import{promises as a}from"node:fs";import o from"node:path";const s=/[^\w-]/g;function c(e){return(typeof e==`string`?new Date(e):e).toISOString()}function l(e){return[` <image:image>`,` <image:loc>${t(e)}</image:loc>`,` </image:image>`].join(`
1
+ import{g as e}from"./type-guards-BLY2PlGR.mjs";import{t}from"./xml-DPsk9WTz.mjs";import{i as n,n as r,t as i}from"./execute-DJ7w3uhW.mjs";import{promises as a}from"node:fs";import o from"node:path";const s=/[^\w-]/g;function c(e){return(typeof e==`string`?new Date(e):e).toISOString()}function l(e){return[` <image:image>`,` <image:loc>${t(e)}</image:loc>`,` </image:image>`].join(`
2
2
  `)}function u(e){let n=[` <image:image>`,` <image:loc>${t(e.loc)}</image:loc>`];return e.title!=null&&e.title!==``&&n.push(` <image:title>${t(e.title)}</image:title>`),e.caption!=null&&e.caption!==``&&n.push(` <image:caption>${t(e.caption)}</image:caption>`),e.geoLocation!=null&&e.geoLocation!==``&&n.push(` <image:geo_location>${t(e.geoLocation)}</image:geo_location>`),e.license!=null&&e.license!==``&&n.push(` <image:license>${t(e.license)}</image:license>`),n.push(` </image:image>`),n.join(`
3
3
  `)}function d(e){let t=[];for(let n of e)typeof n==`string`?t.push(l(n)):t.push(u(n));return t.join(`
4
4
  `)}function f(e){return[` <video:video>`,` <video:title>${t(e.title)}</video:title>`,` <video:thumbnail_loc>${t(e.thumbnail_loc)}</video:thumbnail_loc>`,` <video:description>${t(e.description)}</video:description>`,...p(e),...m(e),...h(e),...g(e),` </video:video>`].join(`
@@ -0,0 +1 @@
1
+ function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function t(t){return e(t)&&typeof t.then==`function`}function n(e){return r(e)&&`code`in e}function r(e){return typeof Error.isError==`function`?Error.isError(e):e instanceof Error}function i(t){return e(t)&&t.name===`AbortError`}function a(e){return r(e)?e:void 0}function o(e){return a(e)??Error(String(e))}function s(e,t=`Unknown error`){return r(e)?e.message:typeof e==`string`?e:t}function c(e){return typeof e==`function`}function l(t){try{let n=JSON.parse(t);return e(n)?n:null}catch{return null}}function u(e){let t=e.packageManager;return typeof t==`string`?t.startsWith(`pnpm`)?`pnpm`:t.startsWith(`yarn`)?`yarn`:t.startsWith(`bun`)?`bun`:t.startsWith(`npm`)?`npm`:null:null}function d(t){let n=e(t.dependencies)?t.dependencies:{},r=e(t.devDependencies)?t.devDependencies:{},i={...n,...r};return typeof i[`vite-plus`]==`string`?`vp`:typeof i.vite==`string`?`vite`:null}function f(e,t){if(!(e instanceof CustomEvent))return;let n=e.detail;if(t(n))return n}function p(e){return n(e)?e.code:void 0}function m(t,n){let r=l(t);if(!r)return null;let i=r[n];return Array.isArray(i)?i.filter(e):null}function h(t){return Array.isArray(t)?t.every(t=>{if(!e(t))return!1;let{find:n,replacement:r}=t;return(typeof n==`string`||n instanceof RegExp)&&typeof r==`string`}):!1}function g(t){return typeof t==`function`||e(t)&&(`$$typeof`in t||`render`in t)}function _(e){return Array.isArray(e)&&typeof e[0]==`string`}function v(t){return e(t)&&t.$$typeof===Symbol.for(`react.client.reference`)}function y(t){return e(t)&&typeof t.$$id==`string`}function b(e){return Object.entries(e).flatMap(([e,t])=>typeof t==`string`?[{find:e,replacement:t}]:[])}function x(t){return e(t)&&typeof t.route==`string`&&typeof t.navigationId==`number`&&typeof t.timestamp==`number`&&typeof t.key==`string`}function S(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function C(t){return Array.isArray(t)?t.every(t=>e(t)?Object.values(t).every(e=>typeof e==`string`||S(e)):!1):!1}function w(e){console.warn(`[rari] generateStaticParams() in ${e} returned invalid params. Expected Array<Record<string, string | string[]>> (e.g. [{ slug: "post" }]). Static routes for this page will not be generated.`)}export{w as C,o as S,C as _,p as a,u as b,h as c,r as d,_ as f,e as g,x as h,f as i,v as l,c as m,a as n,y as o,t as p,s as r,i as s,b as t,g as u,m as v,d as x,l as y};