{"version":3,"file":"Unmatched.js","names":[],"sources":["esm/fallbackViews/Unmatched.js"],"sourcesContent":["import * as React from \"react\";\nimport { usePathname, useRouter } from \"../hooks\";\nimport { Link } from \"../link/Link\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nfunction NoSSR({ children }) {\n  const [render, setRender] = React.useState(false);\n  React.useEffect(() => {\n    setRender(true);\n  }, []);\n  return render ? /* @__PURE__ */ jsx(Fragment, { children }) : null;\n}\nfunction CurrentURL() {\n  return /* @__PURE__ */ jsx(Fragment, { children: window.location.href });\n}\nfunction Unmatched() {\n  const router = useRouter();\n  const pathname = usePathname();\n  return /* @__PURE__ */ jsxs(\n    \"main\",\n    {\n      style: {\n        minHeight: \"100vh\",\n        boxSizing: \"border-box\",\n        display: \"flex\",\n        flexDirection: \"column\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        backgroundColor: \"black\",\n        color: \"white\",\n        padding: 24,\n        textAlign: \"center\"\n      },\n      children: [\n        /* @__PURE__ */ jsx(\n          \"h1\",\n          {\n            style: {\n              fontSize: 36,\n              paddingBottom: 12,\n              margin: \"0 0 12px\",\n              borderBottom: \"1px solid #323232\"\n            },\n            children: \"Unmatched Route\"\n          }\n        ),\n        /* @__PURE__ */ jsxs(\"p\", { style: { fontSize: 18, margin: \"0 0 12px\" }, children: [\n          \"Page could not be found.\",\n          \" \",\n          /* @__PURE__ */ jsx(\n            \"button\",\n            {\n              type: \"button\",\n              onClick: () => {\n                if (router.canGoBack()) {\n                  router.back();\n                } else {\n                  router.replace(\"/\");\n                }\n              },\n              style: {\n                appearance: \"none\",\n                border: 0,\n                padding: 0,\n                background: \"transparent\",\n                color: \"rgba(255,255,255,0.6)\",\n                cursor: \"pointer\",\n                font: \"inherit\",\n                textDecoration: \"underline\"\n              },\n              children: \"Go back.\"\n            }\n          )\n        ] }),\n        /* @__PURE__ */ jsx(NoSSR, { children: /* @__PURE__ */ jsx(\n          Link,\n          {\n            href: pathname,\n            replace: true,\n            style: { color: \"rgba(255,255,255,0.4)\", textAlign: \"center\" },\n            children: /* @__PURE__ */ jsx(CurrentURL, {})\n          }\n        ) }),\n        /* @__PURE__ */ jsx(\n          Link,\n          {\n            href: \"/_sitemap\",\n            replace: true,\n            style: { color: \"rgba(255,255,255,0.4)\", marginTop: 8, textAlign: \"center\" },\n            children: \"Sitemap\"\n          }\n        )\n      ]\n    }\n  );\n}\nexport {\n  Unmatched\n};\n//# sourceMappingURL=Unmatched.web.js.map\n"],"mappings":";;;;;;AAIA,SAAS,MAAM,EAAE,YAAY;CAC3B,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAS,KAAK;CAChD,MAAM,gBAAgB;EACpB,UAAU,IAAI;CAChB,GAAG,CAAC,CAAC;CACL,OAAO,SAAyB,oBAAI,UAAU,EAAE,SAAS,CAAC,IAAI;AAChE;AACA,SAAS,aAAa;CACpB,OAAuB,oBAAI,UAAU,EAAE,UAAU,OAAO,SAAS,KAAK,CAAC;AACzE;AACA,SAAS,YAAY;CACnB,MAAM,SAAS,UAAU;CACzB,MAAM,WAAW,YAAY;CAC7B,OAAuB,qBACrB,QACA;EACE,OAAO;GACL,WAAW;GACX,WAAW;GACX,SAAS;GACT,eAAe;GACf,YAAY;GACZ,gBAAgB;GAChB,iBAAiB;GACjB,OAAO;GACP,SAAS;GACT,WAAW;EACb;EACA,UAAU;GACQ,oBACd,MACA;IACE,OAAO;KACL,UAAU;KACV,eAAe;KACf,QAAQ;KACR,cAAc;IAChB;IACA,UAAU;GACZ,CACF;GACgB,qBAAK,KAAK;IAAE,OAAO;KAAE,UAAU;KAAI,QAAQ;IAAW;IAAG,UAAU;KACjF;KACA;KACgB,oBACd,UACA;MACE,MAAM;MACN,eAAe;OACb,IAAI,OAAO,UAAU,GAAG;QACtB,OAAO,KAAK;OACd,OAAO;QACL,OAAO,QAAQ,GAAG;OACpB;MACF;MACA,OAAO;OACL,YAAY;OACZ,QAAQ;OACR,SAAS;OACT,YAAY;OACZ,OAAO;OACP,QAAQ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