Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
40
node_modules/next/dist/esm/lib/metadata/generate/alternate.js
generated
vendored
Normal file
40
node_modules/next/dist/esm/lib/metadata/generate/alternate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
import { MetaFilter } from './meta';
|
||||
function AlternateLink({ descriptor, ...props }) {
|
||||
if (!descriptor.url) return null;
|
||||
return /*#__PURE__*/ _jsx("link", {
|
||||
...props,
|
||||
...descriptor.title && {
|
||||
title: descriptor.title
|
||||
},
|
||||
href: descriptor.url.toString()
|
||||
});
|
||||
}
|
||||
export function AlternatesMetadata({ alternates }) {
|
||||
if (!alternates) return null;
|
||||
const { canonical, languages, media, types } = alternates;
|
||||
return MetaFilter([
|
||||
canonical ? AlternateLink({
|
||||
rel: 'canonical',
|
||||
descriptor: canonical
|
||||
}) : null,
|
||||
languages ? Object.entries(languages).flatMap(([locale, descriptors])=>descriptors == null ? void 0 : descriptors.map((descriptor)=>AlternateLink({
|
||||
rel: 'alternate',
|
||||
hrefLang: locale,
|
||||
descriptor
|
||||
}))) : null,
|
||||
media ? Object.entries(media).flatMap(([mediaName, descriptors])=>descriptors == null ? void 0 : descriptors.map((descriptor)=>AlternateLink({
|
||||
rel: 'alternate',
|
||||
media: mediaName,
|
||||
descriptor
|
||||
}))) : null,
|
||||
types ? Object.entries(types).flatMap(([type, descriptors])=>descriptors == null ? void 0 : descriptors.map((descriptor)=>AlternateLink({
|
||||
rel: 'alternate',
|
||||
type,
|
||||
descriptor
|
||||
}))) : null
|
||||
]);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=alternate.js.map
|
||||
1
node_modules/next/dist/esm/lib/metadata/generate/alternate.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/lib/metadata/generate/alternate.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/lib/metadata/generate/alternate.tsx"],"sourcesContent":["import type { ResolvedMetadata } from '../types/metadata-interface'\nimport type { AlternateLinkDescriptor } from '../types/alternative-urls-types'\n\nimport React from 'react'\nimport { MetaFilter } from './meta'\n\nfunction AlternateLink({\n descriptor,\n ...props\n}: {\n descriptor: AlternateLinkDescriptor\n} & React.LinkHTMLAttributes<HTMLLinkElement>) {\n if (!descriptor.url) return null\n return (\n <link\n {...props}\n {...(descriptor.title && { title: descriptor.title })}\n href={descriptor.url.toString()}\n />\n )\n}\n\nexport function AlternatesMetadata({\n alternates,\n}: {\n alternates: ResolvedMetadata['alternates']\n}) {\n if (!alternates) return null\n\n const { canonical, languages, media, types } = alternates\n\n return MetaFilter([\n canonical\n ? AlternateLink({ rel: 'canonical', descriptor: canonical })\n : null,\n languages\n ? Object.entries(languages).flatMap(([locale, descriptors]) =>\n descriptors?.map((descriptor) =>\n AlternateLink({ rel: 'alternate', hrefLang: locale, descriptor })\n )\n )\n : null,\n media\n ? Object.entries(media).flatMap(([mediaName, descriptors]) =>\n descriptors?.map((descriptor) =>\n AlternateLink({ rel: 'alternate', media: mediaName, descriptor })\n )\n )\n : null,\n types\n ? Object.entries(types).flatMap(([type, descriptors]) =>\n descriptors?.map((descriptor) =>\n AlternateLink({ rel: 'alternate', type, descriptor })\n )\n )\n : null,\n ])\n}\n"],"names":["React","MetaFilter","AlternateLink","descriptor","props","url","link","title","href","toString","AlternatesMetadata","alternates","canonical","languages","media","types","rel","Object","entries","flatMap","locale","descriptors","map","hrefLang","mediaName","type"],"mappings":";AAGA,OAAOA,WAAW,QAAO;AACzB,SAASC,UAAU,QAAQ,SAAQ;AAEnC,SAASC,cAAc,EACrBC,UAAU,EACV,GAAGC,OAGwC;IAC3C,IAAI,CAACD,WAAWE,GAAG,EAAE,OAAO;IAC5B,qBACE,KAACC;QACE,GAAGF,KAAK;QACR,GAAID,WAAWI,KAAK,IAAI;YAAEA,OAAOJ,WAAWI,KAAK;QAAC,CAAC;QACpDC,MAAML,WAAWE,GAAG,CAACI,QAAQ;;AAGnC;AAEA,OAAO,SAASC,mBAAmB,EACjCC,UAAU,EAGX;IACC,IAAI,CAACA,YAAY,OAAO;IAExB,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGJ;IAE/C,OAAOV,WAAW;QAChBW,YACIV,cAAc;YAAEc,KAAK;YAAab,YAAYS;QAAU,KACxD;QACJC,YACII,OAAOC,OAAO,CAACL,WAAWM,OAAO,CAAC,CAAC,CAACC,QAAQC,YAAY,GACtDA,+BAAAA,YAAaC,GAAG,CAAC,CAACnB,aAChBD,cAAc;oBAAEc,KAAK;oBAAaO,UAAUH;oBAAQjB;gBAAW,OAGnE;QACJW,QACIG,OAAOC,OAAO,CAACJ,OAAOK,OAAO,CAAC,CAAC,CAACK,WAAWH,YAAY,GACrDA,+BAAAA,YAAaC,GAAG,CAAC,CAACnB,aAChBD,cAAc;oBAAEc,KAAK;oBAAaF,OAAOU;oBAAWrB;gBAAW,OAGnE;QACJY,QACIE,OAAOC,OAAO,CAACH,OAAOI,OAAO,CAAC,CAAC,CAACM,MAAMJ,YAAY,GAChDA,+BAAAA,YAAaC,GAAG,CAAC,CAACnB,aAChBD,cAAc;oBAAEc,KAAK;oBAAaS;oBAAMtB;gBAAW,OAGvD;KACL;AACH"}
|
||||
261
node_modules/next/dist/esm/lib/metadata/generate/basic.js
generated
vendored
Normal file
261
node_modules/next/dist/esm/lib/metadata/generate/basic.js
generated
vendored
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { Meta, MetaFilter, MultiMeta } from './meta';
|
||||
import { ViewportMetaKeys } from '../constants';
|
||||
import { getOrigin } from './utils';
|
||||
// convert viewport object to string for viewport meta tag
|
||||
function resolveViewportLayout(viewport) {
|
||||
let resolved = null;
|
||||
if (viewport && typeof viewport === 'object') {
|
||||
resolved = '';
|
||||
for(const viewportKey_ in ViewportMetaKeys){
|
||||
const viewportKey = viewportKey_;
|
||||
if (viewportKey in viewport) {
|
||||
let value = viewport[viewportKey];
|
||||
if (typeof value === 'boolean') {
|
||||
value = value ? 'yes' : 'no';
|
||||
} else if (!value && viewportKey === 'initialScale') {
|
||||
value = undefined;
|
||||
}
|
||||
if (value) {
|
||||
if (resolved) resolved += ', ';
|
||||
resolved += `${ViewportMetaKeys[viewportKey]}=${value}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return resolved;
|
||||
}
|
||||
export function ViewportMeta({ viewport }) {
|
||||
return MetaFilter([
|
||||
/*#__PURE__*/ _jsx("meta", {
|
||||
charSet: "utf-8"
|
||||
}),
|
||||
Meta({
|
||||
name: 'viewport',
|
||||
content: resolveViewportLayout(viewport)
|
||||
}),
|
||||
...viewport.themeColor ? viewport.themeColor.map((themeColor)=>Meta({
|
||||
name: 'theme-color',
|
||||
content: themeColor.color,
|
||||
media: themeColor.media
|
||||
})) : [],
|
||||
Meta({
|
||||
name: 'color-scheme',
|
||||
content: viewport.colorScheme
|
||||
})
|
||||
]);
|
||||
}
|
||||
export function BasicMeta({ metadata }) {
|
||||
var _metadata_keywords, _metadata_robots, _metadata_robots1;
|
||||
const manifestOrigin = metadata.manifest ? getOrigin(metadata.manifest) : undefined;
|
||||
return MetaFilter([
|
||||
metadata.title !== null && metadata.title.absolute ? /*#__PURE__*/ _jsx("title", {
|
||||
children: metadata.title.absolute
|
||||
}) : null,
|
||||
Meta({
|
||||
name: 'description',
|
||||
content: metadata.description
|
||||
}),
|
||||
Meta({
|
||||
name: 'application-name',
|
||||
content: metadata.applicationName
|
||||
}),
|
||||
...metadata.authors ? metadata.authors.map((author)=>[
|
||||
author.url ? /*#__PURE__*/ _jsx("link", {
|
||||
rel: "author",
|
||||
href: author.url.toString()
|
||||
}) : null,
|
||||
Meta({
|
||||
name: 'author',
|
||||
content: author.name
|
||||
})
|
||||
]) : [],
|
||||
metadata.manifest ? /*#__PURE__*/ _jsx("link", {
|
||||
rel: "manifest",
|
||||
href: metadata.manifest.toString(),
|
||||
// If it's same origin, and it's a preview deployment,
|
||||
// including credentials for manifest request.
|
||||
crossOrigin: !manifestOrigin && process.env.VERCEL_ENV === 'preview' ? 'use-credentials' : undefined
|
||||
}) : null,
|
||||
Meta({
|
||||
name: 'generator',
|
||||
content: metadata.generator
|
||||
}),
|
||||
Meta({
|
||||
name: 'keywords',
|
||||
content: (_metadata_keywords = metadata.keywords) == null ? void 0 : _metadata_keywords.join(',')
|
||||
}),
|
||||
Meta({
|
||||
name: 'referrer',
|
||||
content: metadata.referrer
|
||||
}),
|
||||
Meta({
|
||||
name: 'creator',
|
||||
content: metadata.creator
|
||||
}),
|
||||
Meta({
|
||||
name: 'publisher',
|
||||
content: metadata.publisher
|
||||
}),
|
||||
Meta({
|
||||
name: 'robots',
|
||||
content: (_metadata_robots = metadata.robots) == null ? void 0 : _metadata_robots.basic
|
||||
}),
|
||||
Meta({
|
||||
name: 'googlebot',
|
||||
content: (_metadata_robots1 = metadata.robots) == null ? void 0 : _metadata_robots1.googleBot
|
||||
}),
|
||||
Meta({
|
||||
name: 'abstract',
|
||||
content: metadata.abstract
|
||||
}),
|
||||
...metadata.archives ? metadata.archives.map((archive)=>/*#__PURE__*/ _jsx("link", {
|
||||
rel: "archives",
|
||||
href: archive
|
||||
})) : [],
|
||||
...metadata.assets ? metadata.assets.map((asset)=>/*#__PURE__*/ _jsx("link", {
|
||||
rel: "assets",
|
||||
href: asset
|
||||
})) : [],
|
||||
...metadata.bookmarks ? metadata.bookmarks.map((bookmark)=>/*#__PURE__*/ _jsx("link", {
|
||||
rel: "bookmarks",
|
||||
href: bookmark
|
||||
})) : [],
|
||||
...metadata.pagination ? [
|
||||
metadata.pagination.previous ? /*#__PURE__*/ _jsx("link", {
|
||||
rel: "prev",
|
||||
href: metadata.pagination.previous
|
||||
}) : null,
|
||||
metadata.pagination.next ? /*#__PURE__*/ _jsx("link", {
|
||||
rel: "next",
|
||||
href: metadata.pagination.next
|
||||
}) : null
|
||||
] : [],
|
||||
Meta({
|
||||
name: 'category',
|
||||
content: metadata.category
|
||||
}),
|
||||
Meta({
|
||||
name: 'classification',
|
||||
content: metadata.classification
|
||||
}),
|
||||
...metadata.other ? Object.entries(metadata.other).map(([name, content])=>{
|
||||
if (Array.isArray(content)) {
|
||||
return content.map((contentItem)=>Meta({
|
||||
name,
|
||||
content: contentItem
|
||||
}));
|
||||
} else {
|
||||
return Meta({
|
||||
name,
|
||||
content
|
||||
});
|
||||
}
|
||||
}) : []
|
||||
]);
|
||||
}
|
||||
export function ItunesMeta({ itunes }) {
|
||||
if (!itunes) return null;
|
||||
const { appId, appArgument } = itunes;
|
||||
let content = `app-id=${appId}`;
|
||||
if (appArgument) {
|
||||
content += `, app-argument=${appArgument}`;
|
||||
}
|
||||
return /*#__PURE__*/ _jsx("meta", {
|
||||
name: "apple-itunes-app",
|
||||
content: content
|
||||
});
|
||||
}
|
||||
export function FacebookMeta({ facebook }) {
|
||||
if (!facebook) return null;
|
||||
const { appId, admins } = facebook;
|
||||
return MetaFilter([
|
||||
appId ? /*#__PURE__*/ _jsx("meta", {
|
||||
property: "fb:app_id",
|
||||
content: appId
|
||||
}) : null,
|
||||
...admins ? admins.map((admin)=>/*#__PURE__*/ _jsx("meta", {
|
||||
property: "fb:admins",
|
||||
content: admin
|
||||
})) : []
|
||||
]);
|
||||
}
|
||||
export function PinterestMeta({ pinterest }) {
|
||||
if (!pinterest || !pinterest.richPin) return null;
|
||||
const { richPin } = pinterest;
|
||||
return /*#__PURE__*/ _jsx("meta", {
|
||||
property: "pinterest-rich-pin",
|
||||
content: richPin.toString()
|
||||
});
|
||||
}
|
||||
const formatDetectionKeys = [
|
||||
'telephone',
|
||||
'date',
|
||||
'address',
|
||||
'email',
|
||||
'url'
|
||||
];
|
||||
export function FormatDetectionMeta({ formatDetection }) {
|
||||
if (!formatDetection) return null;
|
||||
let content = '';
|
||||
for (const key of formatDetectionKeys){
|
||||
if (key in formatDetection) {
|
||||
if (content) content += ', ';
|
||||
content += `${key}=no`;
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/ _jsx("meta", {
|
||||
name: "format-detection",
|
||||
content: content
|
||||
});
|
||||
}
|
||||
export function AppleWebAppMeta({ appleWebApp }) {
|
||||
if (!appleWebApp) return null;
|
||||
const { capable, title, startupImage, statusBarStyle } = appleWebApp;
|
||||
return MetaFilter([
|
||||
capable ? Meta({
|
||||
name: 'mobile-web-app-capable',
|
||||
content: 'yes'
|
||||
}) : null,
|
||||
Meta({
|
||||
name: 'apple-mobile-web-app-title',
|
||||
content: title
|
||||
}),
|
||||
startupImage ? startupImage.map((image)=>/*#__PURE__*/ _jsx("link", {
|
||||
href: image.url,
|
||||
media: image.media,
|
||||
rel: "apple-touch-startup-image"
|
||||
})) : null,
|
||||
statusBarStyle ? Meta({
|
||||
name: 'apple-mobile-web-app-status-bar-style',
|
||||
content: statusBarStyle
|
||||
}) : null
|
||||
]);
|
||||
}
|
||||
export function VerificationMeta({ verification }) {
|
||||
if (!verification) return null;
|
||||
return MetaFilter([
|
||||
MultiMeta({
|
||||
namePrefix: 'google-site-verification',
|
||||
contents: verification.google
|
||||
}),
|
||||
MultiMeta({
|
||||
namePrefix: 'y_key',
|
||||
contents: verification.yahoo
|
||||
}),
|
||||
MultiMeta({
|
||||
namePrefix: 'yandex-verification',
|
||||
contents: verification.yandex
|
||||
}),
|
||||
MultiMeta({
|
||||
namePrefix: 'me',
|
||||
contents: verification.me
|
||||
}),
|
||||
...verification.other ? Object.entries(verification.other).map(([key, value])=>MultiMeta({
|
||||
namePrefix: key,
|
||||
contents: value
|
||||
})) : []
|
||||
]);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=basic.js.map
|
||||
1
node_modules/next/dist/esm/lib/metadata/generate/basic.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/lib/metadata/generate/basic.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
50
node_modules/next/dist/esm/lib/metadata/generate/icons.js
generated
vendored
Normal file
50
node_modules/next/dist/esm/lib/metadata/generate/icons.js
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { MetaFilter } from './meta';
|
||||
function IconDescriptorLink({ icon }) {
|
||||
const { url, rel = 'icon', ...props } = icon;
|
||||
return /*#__PURE__*/ _jsx("link", {
|
||||
rel: rel,
|
||||
href: url.toString(),
|
||||
...props
|
||||
});
|
||||
}
|
||||
function IconLink({ rel, icon }) {
|
||||
if (typeof icon === 'object' && !(icon instanceof URL)) {
|
||||
if (!icon.rel && rel) icon.rel = rel;
|
||||
return IconDescriptorLink({
|
||||
icon
|
||||
});
|
||||
} else {
|
||||
const href = icon.toString();
|
||||
return /*#__PURE__*/ _jsx("link", {
|
||||
rel: rel,
|
||||
href: href
|
||||
});
|
||||
}
|
||||
}
|
||||
export function IconsMetadata({ icons }) {
|
||||
if (!icons) return null;
|
||||
const shortcutList = icons.shortcut;
|
||||
const iconList = icons.icon;
|
||||
const appleList = icons.apple;
|
||||
const otherList = icons.other;
|
||||
return MetaFilter([
|
||||
shortcutList ? shortcutList.map((icon)=>IconLink({
|
||||
rel: 'shortcut icon',
|
||||
icon
|
||||
})) : null,
|
||||
iconList ? iconList.map((icon)=>IconLink({
|
||||
rel: 'icon',
|
||||
icon
|
||||
})) : null,
|
||||
appleList ? appleList.map((icon)=>IconLink({
|
||||
rel: 'apple-touch-icon',
|
||||
icon
|
||||
})) : null,
|
||||
otherList ? otherList.map((icon)=>IconDescriptorLink({
|
||||
icon
|
||||
})) : null
|
||||
]);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=icons.js.map
|
||||
1
node_modules/next/dist/esm/lib/metadata/generate/icons.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/lib/metadata/generate/icons.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/lib/metadata/generate/icons.tsx"],"sourcesContent":["import type { ResolvedMetadata } from '../types/metadata-interface'\nimport type { Icon, IconDescriptor } from '../types/metadata-types'\n\nimport { MetaFilter } from './meta'\n\nfunction IconDescriptorLink({ icon }: { icon: IconDescriptor }) {\n const { url, rel = 'icon', ...props } = icon\n\n return <link rel={rel} href={url.toString()} {...props} />\n}\n\nfunction IconLink({ rel, icon }: { rel?: string; icon: Icon }) {\n if (typeof icon === 'object' && !(icon instanceof URL)) {\n if (!icon.rel && rel) icon.rel = rel\n return IconDescriptorLink({ icon })\n } else {\n const href = icon.toString()\n return <link rel={rel} href={href} />\n }\n}\n\nexport function IconsMetadata({ icons }: { icons: ResolvedMetadata['icons'] }) {\n if (!icons) return null\n\n const shortcutList = icons.shortcut\n const iconList = icons.icon\n const appleList = icons.apple\n const otherList = icons.other\n\n return MetaFilter([\n shortcutList\n ? shortcutList.map((icon) => IconLink({ rel: 'shortcut icon', icon }))\n : null,\n iconList ? iconList.map((icon) => IconLink({ rel: 'icon', icon })) : null,\n appleList\n ? appleList.map((icon) => IconLink({ rel: 'apple-touch-icon', icon }))\n : null,\n otherList ? otherList.map((icon) => IconDescriptorLink({ icon })) : null,\n ])\n}\n"],"names":["MetaFilter","IconDescriptorLink","icon","url","rel","props","link","href","toString","IconLink","URL","IconsMetadata","icons","shortcutList","shortcut","iconList","appleList","apple","otherList","other","map"],"mappings":";AAGA,SAASA,UAAU,QAAQ,SAAQ;AAEnC,SAASC,mBAAmB,EAAEC,IAAI,EAA4B;IAC5D,MAAM,EAAEC,GAAG,EAAEC,MAAM,MAAM,EAAE,GAAGC,OAAO,GAAGH;IAExC,qBAAO,KAACI;QAAKF,KAAKA;QAAKG,MAAMJ,IAAIK,QAAQ;QAAK,GAAGH,KAAK;;AACxD;AAEA,SAASI,SAAS,EAAEL,GAAG,EAAEF,IAAI,EAAgC;IAC3D,IAAI,OAAOA,SAAS,YAAY,CAAEA,CAAAA,gBAAgBQ,GAAE,GAAI;QACtD,IAAI,CAACR,KAAKE,GAAG,IAAIA,KAAKF,KAAKE,GAAG,GAAGA;QACjC,OAAOH,mBAAmB;YAAEC;QAAK;IACnC,OAAO;QACL,MAAMK,OAAOL,KAAKM,QAAQ;QAC1B,qBAAO,KAACF;YAAKF,KAAKA;YAAKG,MAAMA;;IAC/B;AACF;AAEA,OAAO,SAASI,cAAc,EAAEC,KAAK,EAAwC;IAC3E,IAAI,CAACA,OAAO,OAAO;IAEnB,MAAMC,eAAeD,MAAME,QAAQ;IACnC,MAAMC,WAAWH,MAAMV,IAAI;IAC3B,MAAMc,YAAYJ,MAAMK,KAAK;IAC7B,MAAMC,YAAYN,MAAMO,KAAK;IAE7B,OAAOnB,WAAW;QAChBa,eACIA,aAAaO,GAAG,CAAC,CAAClB,OAASO,SAAS;gBAAEL,KAAK;gBAAiBF;YAAK,MACjE;QACJa,WAAWA,SAASK,GAAG,CAAC,CAAClB,OAASO,SAAS;gBAAEL,KAAK;gBAAQF;YAAK,MAAM;QACrEc,YACIA,UAAUI,GAAG,CAAC,CAAClB,OAASO,SAAS;gBAAEL,KAAK;gBAAoBF;YAAK,MACjE;QACJgB,YAAYA,UAAUE,GAAG,CAAC,CAAClB,OAASD,mBAAmB;gBAAEC;YAAK,MAAM;KACrE;AACH"}
|
||||
92
node_modules/next/dist/esm/lib/metadata/generate/meta.js
generated
vendored
Normal file
92
node_modules/next/dist/esm/lib/metadata/generate/meta.js
generated
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
import { nonNullable } from '../../non-nullable';
|
||||
export function Meta({ name, property, content, media }) {
|
||||
if (typeof content !== 'undefined' && content !== null && content !== '') {
|
||||
return /*#__PURE__*/ _jsx("meta", {
|
||||
...name ? {
|
||||
name
|
||||
} : {
|
||||
property
|
||||
},
|
||||
...media ? {
|
||||
media
|
||||
} : undefined,
|
||||
content: typeof content === 'string' ? content : content.toString()
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
export function MetaFilter(items) {
|
||||
const acc = [];
|
||||
for (const item of items){
|
||||
if (Array.isArray(item)) {
|
||||
acc.push(...item.filter(nonNullable));
|
||||
} else if (nonNullable(item)) {
|
||||
acc.push(item);
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
function camelToSnake(camelCaseStr) {
|
||||
return camelCaseStr.replace(/([A-Z])/g, function(match) {
|
||||
return '_' + match.toLowerCase();
|
||||
});
|
||||
}
|
||||
const aliasPropPrefixes = new Set([
|
||||
'og:image',
|
||||
'twitter:image',
|
||||
'og:video',
|
||||
'og:audio'
|
||||
]);
|
||||
function getMetaKey(prefix, key) {
|
||||
// Use `twitter:image` and `og:image` instead of `twitter:image:url` and `og:image:url`
|
||||
// to be more compatible as it's a more common format.
|
||||
// `og:video` & `og:audio` do not have a `:url` suffix alias
|
||||
if (aliasPropPrefixes.has(prefix) && key === 'url') {
|
||||
return prefix;
|
||||
}
|
||||
if (prefix.startsWith('og:') || prefix.startsWith('twitter:')) {
|
||||
key = camelToSnake(key);
|
||||
}
|
||||
return prefix + ':' + key;
|
||||
}
|
||||
function ExtendMeta({ content, namePrefix, propertyPrefix }) {
|
||||
if (!content) return null;
|
||||
return MetaFilter(Object.entries(content).map(([k, v])=>{
|
||||
return typeof v === 'undefined' ? null : Meta({
|
||||
...propertyPrefix && {
|
||||
property: getMetaKey(propertyPrefix, k)
|
||||
},
|
||||
...namePrefix && {
|
||||
name: getMetaKey(namePrefix, k)
|
||||
},
|
||||
content: typeof v === 'string' ? v : v == null ? void 0 : v.toString()
|
||||
});
|
||||
}));
|
||||
}
|
||||
export function MultiMeta({ propertyPrefix, namePrefix, contents }) {
|
||||
if (typeof contents === 'undefined' || contents === null) {
|
||||
return null;
|
||||
}
|
||||
return MetaFilter(contents.map((content)=>{
|
||||
if (typeof content === 'string' || typeof content === 'number' || content instanceof URL) {
|
||||
return Meta({
|
||||
...propertyPrefix ? {
|
||||
property: propertyPrefix
|
||||
} : {
|
||||
name: namePrefix
|
||||
},
|
||||
content
|
||||
});
|
||||
} else {
|
||||
return ExtendMeta({
|
||||
namePrefix,
|
||||
propertyPrefix,
|
||||
content
|
||||
});
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=meta.js.map
|
||||
1
node_modules/next/dist/esm/lib/metadata/generate/meta.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/lib/metadata/generate/meta.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
452
node_modules/next/dist/esm/lib/metadata/generate/opengraph.js
generated
vendored
Normal file
452
node_modules/next/dist/esm/lib/metadata/generate/opengraph.js
generated
vendored
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
import { Meta, MetaFilter, MultiMeta } from './meta';
|
||||
export function OpenGraphMetadata({ openGraph }) {
|
||||
var _openGraph_title, _openGraph_url, _openGraph_ttl;
|
||||
if (!openGraph) {
|
||||
return null;
|
||||
}
|
||||
let typedOpenGraph;
|
||||
if ('type' in openGraph) {
|
||||
const openGraphType = openGraph.type;
|
||||
switch(openGraphType){
|
||||
case 'website':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'website'
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'article':
|
||||
var _openGraph_publishedTime, _openGraph_modifiedTime, _openGraph_expirationTime;
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'article'
|
||||
}),
|
||||
Meta({
|
||||
property: 'article:published_time',
|
||||
content: (_openGraph_publishedTime = openGraph.publishedTime) == null ? void 0 : _openGraph_publishedTime.toString()
|
||||
}),
|
||||
Meta({
|
||||
property: 'article:modified_time',
|
||||
content: (_openGraph_modifiedTime = openGraph.modifiedTime) == null ? void 0 : _openGraph_modifiedTime.toString()
|
||||
}),
|
||||
Meta({
|
||||
property: 'article:expiration_time',
|
||||
content: (_openGraph_expirationTime = openGraph.expirationTime) == null ? void 0 : _openGraph_expirationTime.toString()
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'article:author',
|
||||
contents: openGraph.authors
|
||||
}),
|
||||
Meta({
|
||||
property: 'article:section',
|
||||
content: openGraph.section
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'article:tag',
|
||||
contents: openGraph.tags
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'book':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'book'
|
||||
}),
|
||||
Meta({
|
||||
property: 'book:isbn',
|
||||
content: openGraph.isbn
|
||||
}),
|
||||
Meta({
|
||||
property: 'book:release_date',
|
||||
content: openGraph.releaseDate
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'book:author',
|
||||
contents: openGraph.authors
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'book:tag',
|
||||
contents: openGraph.tags
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'profile':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'profile'
|
||||
}),
|
||||
Meta({
|
||||
property: 'profile:first_name',
|
||||
content: openGraph.firstName
|
||||
}),
|
||||
Meta({
|
||||
property: 'profile:last_name',
|
||||
content: openGraph.lastName
|
||||
}),
|
||||
Meta({
|
||||
property: 'profile:username',
|
||||
content: openGraph.username
|
||||
}),
|
||||
Meta({
|
||||
property: 'profile:gender',
|
||||
content: openGraph.gender
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'music.song':
|
||||
var _openGraph_duration;
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'music.song'
|
||||
}),
|
||||
Meta({
|
||||
property: 'music:duration',
|
||||
content: (_openGraph_duration = openGraph.duration) == null ? void 0 : _openGraph_duration.toString()
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:album',
|
||||
contents: openGraph.albums
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:musician',
|
||||
contents: openGraph.musicians
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'music.album':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'music.album'
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:song',
|
||||
contents: openGraph.songs
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:musician',
|
||||
contents: openGraph.musicians
|
||||
}),
|
||||
Meta({
|
||||
property: 'music:release_date',
|
||||
content: openGraph.releaseDate
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'music.playlist':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'music.playlist'
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:song',
|
||||
contents: openGraph.songs
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:creator',
|
||||
contents: openGraph.creators
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'music.radio_station':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'music.radio_station'
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'music:creator',
|
||||
contents: openGraph.creators
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'video.movie':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'video.movie'
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:actor',
|
||||
contents: openGraph.actors
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:director',
|
||||
contents: openGraph.directors
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:writer',
|
||||
contents: openGraph.writers
|
||||
}),
|
||||
Meta({
|
||||
property: 'video:duration',
|
||||
content: openGraph.duration
|
||||
}),
|
||||
Meta({
|
||||
property: 'video:release_date',
|
||||
content: openGraph.releaseDate
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:tag',
|
||||
contents: openGraph.tags
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'video.episode':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'video.episode'
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:actor',
|
||||
contents: openGraph.actors
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:director',
|
||||
contents: openGraph.directors
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:writer',
|
||||
contents: openGraph.writers
|
||||
}),
|
||||
Meta({
|
||||
property: 'video:duration',
|
||||
content: openGraph.duration
|
||||
}),
|
||||
Meta({
|
||||
property: 'video:release_date',
|
||||
content: openGraph.releaseDate
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'video:tag',
|
||||
contents: openGraph.tags
|
||||
}),
|
||||
Meta({
|
||||
property: 'video:series',
|
||||
content: openGraph.series
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'video.tv_show':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'video.tv_show'
|
||||
})
|
||||
];
|
||||
break;
|
||||
case 'video.other':
|
||||
typedOpenGraph = [
|
||||
Meta({
|
||||
property: 'og:type',
|
||||
content: 'video.other'
|
||||
})
|
||||
];
|
||||
break;
|
||||
default:
|
||||
const _exhaustiveCheck = openGraphType;
|
||||
throw Object.defineProperty(new Error(`Invalid OpenGraph type: ${_exhaustiveCheck}`), "__NEXT_ERROR_CODE", {
|
||||
value: "E237",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
return MetaFilter([
|
||||
Meta({
|
||||
property: 'og:determiner',
|
||||
content: openGraph.determiner
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:title',
|
||||
content: (_openGraph_title = openGraph.title) == null ? void 0 : _openGraph_title.absolute
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:description',
|
||||
content: openGraph.description
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:url',
|
||||
content: (_openGraph_url = openGraph.url) == null ? void 0 : _openGraph_url.toString()
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:site_name',
|
||||
content: openGraph.siteName
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:locale',
|
||||
content: openGraph.locale
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:country_name',
|
||||
content: openGraph.countryName
|
||||
}),
|
||||
Meta({
|
||||
property: 'og:ttl',
|
||||
content: (_openGraph_ttl = openGraph.ttl) == null ? void 0 : _openGraph_ttl.toString()
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:image',
|
||||
contents: openGraph.images
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:video',
|
||||
contents: openGraph.videos
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:audio',
|
||||
contents: openGraph.audio
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:email',
|
||||
contents: openGraph.emails
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:phone_number',
|
||||
contents: openGraph.phoneNumbers
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:fax_number',
|
||||
contents: openGraph.faxNumbers
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'og:locale:alternate',
|
||||
contents: openGraph.alternateLocale
|
||||
}),
|
||||
...typedOpenGraph ? typedOpenGraph : []
|
||||
]);
|
||||
}
|
||||
function TwitterAppItem({ app, type }) {
|
||||
var _app_url_type, _app_url;
|
||||
return [
|
||||
Meta({
|
||||
name: `twitter:app:name:${type}`,
|
||||
content: app.name
|
||||
}),
|
||||
Meta({
|
||||
name: `twitter:app:id:${type}`,
|
||||
content: app.id[type]
|
||||
}),
|
||||
Meta({
|
||||
name: `twitter:app:url:${type}`,
|
||||
content: (_app_url = app.url) == null ? void 0 : (_app_url_type = _app_url[type]) == null ? void 0 : _app_url_type.toString()
|
||||
})
|
||||
];
|
||||
}
|
||||
export function TwitterMetadata({ twitter }) {
|
||||
var _twitter_title;
|
||||
if (!twitter) return null;
|
||||
const { card } = twitter;
|
||||
return MetaFilter([
|
||||
Meta({
|
||||
name: 'twitter:card',
|
||||
content: card
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:site',
|
||||
content: twitter.site
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:site:id',
|
||||
content: twitter.siteId
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:creator',
|
||||
content: twitter.creator
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:creator:id',
|
||||
content: twitter.creatorId
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:title',
|
||||
content: (_twitter_title = twitter.title) == null ? void 0 : _twitter_title.absolute
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:description',
|
||||
content: twitter.description
|
||||
}),
|
||||
MultiMeta({
|
||||
namePrefix: 'twitter:image',
|
||||
contents: twitter.images
|
||||
}),
|
||||
...card === 'player' ? twitter.players.flatMap((player)=>[
|
||||
Meta({
|
||||
name: 'twitter:player',
|
||||
content: player.playerUrl.toString()
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:player:stream',
|
||||
content: player.streamUrl.toString()
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:player:width',
|
||||
content: player.width
|
||||
}),
|
||||
Meta({
|
||||
name: 'twitter:player:height',
|
||||
content: player.height
|
||||
})
|
||||
]) : [],
|
||||
...card === 'app' ? [
|
||||
TwitterAppItem({
|
||||
app: twitter.app,
|
||||
type: 'iphone'
|
||||
}),
|
||||
TwitterAppItem({
|
||||
app: twitter.app,
|
||||
type: 'ipad'
|
||||
}),
|
||||
TwitterAppItem({
|
||||
app: twitter.app,
|
||||
type: 'googleplay'
|
||||
})
|
||||
] : []
|
||||
]);
|
||||
}
|
||||
export function AppLinksMeta({ appLinks }) {
|
||||
if (!appLinks) return null;
|
||||
return MetaFilter([
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:ios',
|
||||
contents: appLinks.ios
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:iphone',
|
||||
contents: appLinks.iphone
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:ipad',
|
||||
contents: appLinks.ipad
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:android',
|
||||
contents: appLinks.android
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:windows_phone',
|
||||
contents: appLinks.windows_phone
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:windows',
|
||||
contents: appLinks.windows
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:windows_universal',
|
||||
contents: appLinks.windows_universal
|
||||
}),
|
||||
MultiMeta({
|
||||
propertyPrefix: 'al:web',
|
||||
contents: appLinks.web
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=opengraph.js.map
|
||||
1
node_modules/next/dist/esm/lib/metadata/generate/opengraph.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/lib/metadata/generate/opengraph.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
27
node_modules/next/dist/esm/lib/metadata/generate/utils.js
generated
vendored
Normal file
27
node_modules/next/dist/esm/lib/metadata/generate/utils.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
function resolveArray(value) {
|
||||
if (Array.isArray(value)) {
|
||||
return value;
|
||||
}
|
||||
return [
|
||||
value
|
||||
];
|
||||
}
|
||||
function resolveAsArrayOrUndefined(value) {
|
||||
if (typeof value === 'undefined' || value === null) {
|
||||
return undefined;
|
||||
}
|
||||
return resolveArray(value);
|
||||
}
|
||||
function getOrigin(url) {
|
||||
let origin = undefined;
|
||||
if (typeof url === 'string') {
|
||||
try {
|
||||
url = new URL(url);
|
||||
origin = url.origin;
|
||||
} catch {}
|
||||
}
|
||||
return origin;
|
||||
}
|
||||
export { resolveAsArrayOrUndefined, resolveArray, getOrigin };
|
||||
|
||||
//# sourceMappingURL=utils.js.map
|
||||
1
node_modules/next/dist/esm/lib/metadata/generate/utils.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/lib/metadata/generate/utils.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/lib/metadata/generate/utils.ts"],"sourcesContent":["function resolveArray<T>(value: T | T[]): T[] {\n if (Array.isArray(value)) {\n return value as any\n }\n return [value] as any\n}\n\nfunction resolveAsArrayOrUndefined<T>(\n value: T | T[] | undefined | null\n): T extends undefined | null ? undefined : T[] {\n if (typeof value === 'undefined' || value === null) {\n return undefined as any\n }\n return resolveArray(value) as any\n}\n\nfunction getOrigin(url: string | URL): string | undefined {\n let origin = undefined\n if (typeof url === 'string') {\n try {\n url = new URL(url)\n origin = url.origin\n } catch {}\n }\n return origin\n}\n\nexport { resolveAsArrayOrUndefined, resolveArray, getOrigin }\n"],"names":["resolveArray","value","Array","isArray","resolveAsArrayOrUndefined","undefined","getOrigin","url","origin","URL"],"mappings":"AAAA,SAASA,aAAgBC,KAAc;IACrC,IAAIC,MAAMC,OAAO,CAACF,QAAQ;QACxB,OAAOA;IACT;IACA,OAAO;QAACA;KAAM;AAChB;AAEA,SAASG,0BACPH,KAAiC;IAEjC,IAAI,OAAOA,UAAU,eAAeA,UAAU,MAAM;QAClD,OAAOI;IACT;IACA,OAAOL,aAAaC;AACtB;AAEA,SAASK,UAAUC,GAAiB;IAClC,IAAIC,SAASH;IACb,IAAI,OAAOE,QAAQ,UAAU;QAC3B,IAAI;YACFA,MAAM,IAAIE,IAAIF;YACdC,SAASD,IAAIC,MAAM;QACrB,EAAE,OAAM,CAAC;IACX;IACA,OAAOA;AACT;AAEA,SAASJ,yBAAyB,EAAEJ,YAAY,EAAEM,SAAS,GAAE"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue