nuxt-i18n-micro 3.18.3 → 3.20.0
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.
- package/README.md +16 -16
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{D6byAye8.js → BA2bGsrZ.js} +1 -1
- package/dist/client/_nuxt/{BNXusRXY.js → C_HK2snF.js} +1 -1
- package/dist/client/_nuxt/{BCTbvRLO.js → Dx6dmpFi.js} +1 -1
- package/dist/client/_nuxt/SDQMalAT.js +14 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/5a55317c-1ad8-41ca-a7f6-2fe58e16b2f6.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +197 -231
- package/dist/runtime/components/i18n-group.vue +1 -4
- package/dist/runtime/components/i18n-link.vue +2 -12
- package/dist/runtime/components/i18n-switcher.vue +7 -30
- package/dist/runtime/composables/useI18n.js +1 -1
- package/dist/runtime/composables/useI18nLocale.js +5 -6
- package/dist/runtime/composables/useLocaleHead.js +2 -2
- package/dist/runtime/middleware/i18n-redirect.global.d.ts +6 -0
- package/dist/runtime/middleware/i18n-redirect.global.js +43 -0
- package/dist/runtime/plugins/01.plugin.d.ts +21 -21
- package/dist/runtime/plugins/01.plugin.js +69 -313
- package/dist/runtime/plugins/02.meta.js +2 -2
- package/dist/runtime/plugins/05.hooks.js +32 -32
- package/dist/runtime/plugins/06.redirect.d.ts +1 -0
- package/dist/runtime/plugins/06.redirect.js +15 -86
- package/dist/runtime/server/middleware/i18n.global.js +17 -5
- package/dist/runtime/server/plugins/watcher.dev.js +36 -66
- package/dist/runtime/server/routes/i18n.js +2 -2
- package/dist/runtime/server/utils/locale-detector.d.ts +9 -12
- package/dist/runtime/server/utils/locale-detector.js +25 -18
- package/dist/runtime/server/utils/locale-server-middleware.js +10 -8
- package/dist/runtime/server/utils/server-loader.d.ts +3 -3
- package/dist/runtime/server/utils/server-loader.js +40 -15
- package/dist/runtime/server/utils/translation-server-middleware.js +10 -8
- package/dist/runtime/utils/nuxt-i18n.d.ts +122 -0
- package/dist/runtime/utils/nuxt-i18n.js +335 -0
- package/dist/runtime/utils/storage.d.ts +11 -12
- package/dist/runtime/utils/storage.js +37 -21
- package/dist/types.d.mts +2 -0
- package/internals.d.mts +1 -0
- package/package.json +21 -15
- package/dist/client/_nuxt/B-cq5x_h.js +0 -14
- package/dist/client/_nuxt/builds/meta/c5d2004e-f981-4363-a9ec-4d72cf7f4a8f.json +0 -1
- package/dist/runtime/utils/accept-language.d.ts +0 -3
- package/dist/runtime/utils/accept-language.js +0 -21
- package/dist/runtime/utils/active-locales.d.ts +0 -4
- package/dist/runtime/utils/active-locales.js +0 -9
- package/dist/runtime/utils/cache-control.d.ts +0 -50
- package/dist/runtime/utils/cache-control.js +0 -88
- package/dist/runtime/utils/cookie.d.ts +0 -24
- package/dist/runtime/utils/cookie.js +0 -22
- package/dist/runtime/utils/deep-merge.d.ts +0 -15
- package/dist/runtime/utils/deep-merge.js +0 -14
- package/dist/runtime/utils/resolve-server-locale.d.ts +0 -21
- package/dist/runtime/utils/resolve-server-locale.js +0 -30
- package/dist/runtime/utils/route-utils.d.ts +0 -33
- package/dist/runtime/utils/route-utils.js +0 -63
- package/dist/runtime/utils/runtime-i18n-config.d.ts +0 -8
- package/dist/runtime/utils/runtime-i18n-config.js +0 -90
package/README.md
CHANGED
|
@@ -30,40 +30,40 @@ To showcase the efficiency of `Nuxt I18n Micro`, we conducted tests under identi
|
|
|
30
30
|
|
|
31
31
|
| Project | Build Time | Code Bundle | Max Memory | Max CPU |
|
|
32
32
|
|---------|------------|-------------|------------|---------|
|
|
33
|
-
| **plain-nuxt** (baseline) |
|
|
34
|
-
| **i18n-micro** |
|
|
35
|
-
| **i18n v10** |
|
|
33
|
+
| **plain-nuxt** (baseline) | 6.50s | 1.35 MB | 745 MB | 195% |
|
|
34
|
+
| **i18n-micro** | 14.95s | 1.48 MB | 1,175 MB | 243% |
|
|
35
|
+
| **i18n v10** | 82.26s | 19.24 MB | 9,117 MB | 419% |
|
|
36
36
|
|
|
37
37
|
> **Code Bundle** = JavaScript/CSS code only (excludes translation JSON files).
|
|
38
38
|
> i18n-micro stores translations as lazy-loaded JSON files, keeping the code bundle minimal.
|
|
39
39
|
|
|
40
|
-
- **i18n-micro vs baseline**: +
|
|
41
|
-
- **i18n v10 vs baseline**: +
|
|
40
|
+
- **i18n-micro vs baseline**: +8.45s build, +131 KB code, +430 MB memory
|
|
41
|
+
- **i18n v10 vs baseline**: +75.76s build, +17.89 MB code, +8,372 MB memory
|
|
42
42
|
|
|
43
43
|
#### Stress Test Results (Requests per Second)
|
|
44
44
|
|
|
45
45
|
| Project | Avg Response | RPS (Artillery) | Max Memory |
|
|
46
46
|
|---------|--------------|-----------------|------------|
|
|
47
|
-
| **plain-nuxt** |
|
|
48
|
-
| **i18n-micro** |
|
|
49
|
-
| **i18n v10** | 1,
|
|
47
|
+
| **plain-nuxt** | 453 ms | 274 | 324 MB |
|
|
48
|
+
| **i18n-micro** | 437 ms | 278 | 275 MB |
|
|
49
|
+
| **i18n v10** | 1,177 ms | 51 | 1,095 MB |
|
|
50
50
|
|
|
51
51
|
#### Comparison: i18n v10 vs i18n-micro
|
|
52
52
|
|
|
53
|
-
- **Code Bundle**: 17.
|
|
54
|
-
- **Build Time**:
|
|
55
|
-
- **Max Memory (build)**: 7,
|
|
56
|
-
- **Average Response Time**:
|
|
57
|
-
- **Requests Per Second**:
|
|
53
|
+
- **Code Bundle**: 17.76 MB smaller (i18n-micro: 1.48 MB vs i18n v10: 19.24 MB)
|
|
54
|
+
- **Build Time**: 67.31s faster (i18n-micro: 14.95s vs i18n v10: 82.26s)
|
|
55
|
+
- **Max Memory (build)**: 7,942 MB less (i18n-micro: 1,175 MB vs i18n v10: 9,117 MB)
|
|
56
|
+
- **Average Response Time**: 740 ms faster (i18n-micro: 437 ms vs i18n v10: 1,177 ms)
|
|
57
|
+
- **Requests Per Second**: 227 more (i18n-micro: 278 vs i18n v10: 51)
|
|
58
58
|
|
|
59
|
-
These results clearly demonstrate that `Nuxt I18n Micro` significantly outperforms the original module in every critical area while staying close to the plain Nuxt baseline.
|
|
59
|
+
These results clearly demonstrate that `Nuxt I18n Micro` significantly outperforms the original module in every critical area while staying close to the plain Nuxt baseline. See the [full benchmark report](https://s00d.github.io/nuxt-i18n-micro/guide/performance-results) for methodology and charts.
|
|
60
60
|
|
|
61
61
|
## Key Features
|
|
62
62
|
|
|
63
63
|
- 🌐 **Compact Yet Powerful**: Despite its small size, `Nuxt I18n Micro` is designed for large-scale projects, focusing on performance and efficiency.
|
|
64
64
|
- ⚡ **Optimized Build and Runtime**: Reduces build times, memory usage, and server load, making it ideal for high-traffic applications.
|
|
65
|
-
- 🛠 **Minimalist Design**: The module is
|
|
66
|
-
- 📏 **
|
|
65
|
+
- 🛠 **Minimalist Design**: The module core is a single Nuxt module plus a small set of runtime plugins, making it easy to understand, extend, and maintain.
|
|
66
|
+
- 📏 **Strategy-Based Routing**: Locale prefixes are handled via `@i18n-micro/route-strategy` (build-time) and `@i18n-micro/path-strategy` (runtime), with strategies such as `prefix`, `no_prefix`, `prefix_except_default`, and `prefix_and_default`.
|
|
67
67
|
- 🗂 **Streamlined Translation Loading**: Only JSON files are supported, with translations split between a global file for common texts (e.g., menus) and page-specific files, which are auto-generated in the `dev` mode if not present.
|
|
68
68
|
|
|
69
69
|
## Quick Setup
|
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/SDQMalAT.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/SDQMalAT.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.CyBDSRXN.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/Dx6dmpFi.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BA2bGsrZ.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.DJtCwW7w.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C_HK2snF.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"5a55317c-1ad8-41ca-a7f6-2fe58e16b2f6",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1781512938774,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/SDQMalAT.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/SDQMalAT.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.CyBDSRXN.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/Dx6dmpFi.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BA2bGsrZ.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.DJtCwW7w.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C_HK2snF.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"5a55317c-1ad8-41ca-a7f6-2fe58e16b2f6",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1781512938774,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as r,a as o,E as u,F as c,G as i}from"./
|
|
1
|
+
import{D as r,a as o,E as u,F as c,G as i}from"./SDQMalAT.js";function d(e){const t=e||o();return t.ssrContext?.head||t.runWithContext(()=>{if(u()){const n=c(i);if(!n)throw new Error("[nuxt] [unhead] Missing Unhead instance.");return n}})}function x(e,t={}){const n=d(t.nuxt);return r(e,{head:n,...t})}const f=(e,t)=>{const n=e.__vccOpts||e;for(const[s,a]of t)n[s]=a;return n};export{f as _,x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,u as s}from"./
|
|
1
|
+
import{_ as o,u as s}from"./BA2bGsrZ.js";import{v as a,x as i,y as t,z as r}from"./SDQMalAT.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,h)=>(a(),i("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-334154a6"]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as P,d as B,s as O,r as E,a as L,o as T,b as H,c as I,e as U,f as M,h as R,g as N,p as V,i as q,j as b,k as A,l as D,n as F,m as $,w as W,q as G,t as K,v as Q,x as J,y as C,z as _,A as X,B as Y,C as Z}from"./
|
|
1
|
+
import{u as P,d as B,s as O,r as E,a as L,o as T,b as H,c as I,e as U,f as M,h as R,g as N,p as V,i as q,j as b,k as A,l as D,n as F,m as $,w as W,q as G,t as K,v as Q,x as J,y as C,z as _,A as X,B as Y,C as Z}from"./SDQMalAT.js";import{_ as ee,u as te}from"./BA2bGsrZ.js";async function j(t,n=P()){const{path:u,matched:p}=n.resolve(t);if(!p.length||(n._routePreloaded||=new Set,n._routePreloaded.has(u)))return;const d=n._preloadPromises||=[];if(d.length>4)return Promise.all(d).then(()=>j(t,n));n._routePreloaded.add(u);for(const e of p){const o=e.components?.default;if(typeof o!="function")continue;const c=Promise.resolve(o()).catch(()=>{}).finally(()=>d.splice(d.indexOf(c)));d.push(c)}await Promise.all(d)}const ne=(...t)=>t.find(n=>n!==void 0);function re(t){const n=t.componentName||"NuxtLink";function u(e){return typeof e=="string"&&e.startsWith("#")}function p(e,o,c){const a=c??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return S(e,a);const s="path"in e&&e.path!==void 0?e.path:o(e).path;return{...e,name:void 0,path:S(s,a)}}function d(e){const o=P(),c=$(),a=b(()=>!!e.target&&e.target!=="_self"),s=b(()=>{const l=e.to||e.href||"";return typeof l=="string"&&A(l,{acceptRelative:!0})}),y=N("RouterLink"),g=y&&typeof y!="string"?y.useLink:void 0,h=b(()=>{if(e.external)return!0;const l=e.to||e.href||"";return typeof l=="object"?!1:l===""||s.value}),i=b(()=>{const l=e.to||e.href||"";return h.value?l:p(l,o.resolve,e.trailingSlash)}),m=h.value?void 0:g?.({...e,to:i}),x=b(()=>{const l=e.trailingSlash??t.trailingSlash;if(!i.value||s.value||u(i.value))return i.value;if(h.value){const k=typeof i.value=="object"&&"path"in i.value?q(i.value):i.value,w=typeof k=="object"?o.resolve(k).href:k;return S(w,l)}return typeof i.value=="object"?o.resolve(i.value)?.href??null:S(D(c.app.baseURL,i.value),l)});return{to:i,hasTarget:a,isAbsoluteUrl:s,isExternal:h,href:x,isActive:m?.isActive??b(()=>i.value===o.currentRoute.value.path),isExactActive:m?.isExactActive??b(()=>i.value===o.currentRoute.value.path),route:m?.route??b(()=>o.resolve(i.value)),async navigate(l){await F(x.value,{replace:e.replace,external:h.value||a.value})}}}return B({name:n,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:d,setup(e,{slots:o}){const c=P(),{to:a,href:s,navigate:y,isExternal:g,hasTarget:h,isAbsoluteUrl:i}=d(e),m=O(!1),x=E(null),l=f=>{x.value=e.custom?f?.$el?.nextElementSibling:f?.$el};function k(f){return!m.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===f:e.prefetchOn?.[f]??t.prefetchOn?.[f])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function w(f=L()){if(m.value)return;m.value=!0;const v=typeof a.value=="string"?a.value:g.value?q(a.value):c.resolve(a.value).fullPath,r=g.value?new URL(v,window.location.href).href:v;await Promise.all([f.hooks.callHook("link:prefetch",r).catch(()=>{}),!g.value&&!h.value&&j(a.value,c).catch(()=>{})])}if(k("visibility")){const f=L();let v,r=null;T(()=>{const z=oe();H(()=>{v=I(()=>{x?.value?.tagName&&(r=z.observe(x.value,async()=>{r?.(),r=null,await w(f)}))})})}),U(()=>{v&&M(v),r?.(),r=null})}return()=>{if(!g.value&&!h.value&&!u(a.value)){const r={ref:l,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(k("interaction")&&(r.onPointerenter=w.bind(null,void 0),r.onFocus=w.bind(null,void 0)),m.value&&(r.class=e.prefetchedClass||t.prefetchedClass),r.rel=e.rel||void 0),R(N("RouterLink"),r,o.default)}const f=e.target||null,v=ne(e.noRel?"":e.rel,t.externalRelAttribute,i.value||h.value?"noopener noreferrer":"")||null;return e.custom?o.default?o.default({href:s.value,navigate:y,prefetch:w,get route(){if(!s.value)return;const r=new URL(s.value,window.location.href);return{path:r.pathname,fullPath:r.pathname,get query(){return V(r.search)},hash:r.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:s.value}},rel:v,target:f,isExternal:g.value||h.value,isActive:!1,isExactActive:!1}):null:R("a",{ref:x,href:s.value||null,rel:v,target:f,onClick:r=>{if(!(g.value||h.value))return r.preventDefault(),e.replace?c.replace(s.value):c.push(s.value)}},o.default?.())}}})}const ae=re(K);function S(t,n){const u=n==="append"?W:G;return A(t)&&!t.startsWith("http")?t:u(t,!0)}function oe(){const t=L();if(t._observer)return t._observer;let n=null;const u=new Map,p=(e,o)=>(n||=new IntersectionObserver(c=>{for(const a of c){const s=u.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&s&&s()}}),u.set(e,o),n.observe(e),()=>{u.delete(e),n?.unobserve(e),u.size===0&&(n?.disconnect(),n=null)});return t._observer={observe:p}}const ie=/2g/;function se(){const t=navigator.connection;return!!(t&&(t.saveData||ie.test(t.effectiveType)))}const le={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},ue={class:"max-w-520px text-center"},ce=["textContent"],fe=["textContent"],de=["textContent"],he={class:"flex items-center justify-center w-full"},ve={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return te({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(u,p)=>{const d=ae;return Q(),J("div",le,[C("div",ue,[C("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:_(t.statusCode)},null,8,ce),C("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:_(t.statusMessage)},null,8,fe),C("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:_(t.description)},null,8,de),C("div",he,[X(d,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:Y(()=>[Z(_(t.backHome),1)]),_:1})])])])}}},me=ee(ve,[["__scopeId","data-v-c9a13a71"]]);export{me as default};
|