@m4l/graphics 0.0.34 → 0.0.35
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/dist/components/Page/index.js +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/index.js +1 -5
- package/package.json +1 -1
- package/dist/commonjs.js +0 -1
- package/dist/react-helmet-async-invariant.js +0 -23
- package/dist/react-helmet-async-react-fast-compare.js +0 -90
- package/dist/react-helmet-async-shallowequal.js +0 -32
- package/dist/react-helmet-async.js +0 -363
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Helmet } from "react-helmet-async";
|
|
3
3
|
import { Box } from "@mui/material";
|
|
4
4
|
import { u as useLocales } from "../../hooks/useLocales/index.js";
|
|
5
5
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
@@ -14,7 +14,7 @@ const Page = forwardRef((props, ref) => {
|
|
|
14
14
|
currentLang
|
|
15
15
|
} = useLocales();
|
|
16
16
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
17
|
-
children: [/* @__PURE__ */ jsxs(
|
|
17
|
+
children: [/* @__PURE__ */ jsxs(Helmet, {
|
|
18
18
|
children: [/* @__PURE__ */ jsx("title", {
|
|
19
19
|
children: `${title} | Made4Labs`
|
|
20
20
|
}), /* @__PURE__ */ jsx("html", {
|
package/dist/contexts/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { P as ProgressBarStyle } from "./components/ProgressBarStyle/index.js";
|
|
|
2
2
|
export { P as Page } from "./components/Page/index.js";
|
|
3
3
|
export { L as LocalesContext, a as LocalesProvider } from "./contexts/LocalesContext/index.js";
|
|
4
4
|
export { H as HostThemeContext, a as HostThemeProvider } from "./contexts/HostThemeContext/index.js";
|
|
5
|
-
export {
|
|
5
|
+
export { HelmetProvider } from "react-helmet-async";
|
|
6
6
|
export { u as useResponsive, a as useResponsiveDesktop } from "./hooks/useResponsive/index.js";
|
|
7
7
|
export { u as useIsMountedRef, a as useOffSetTop } from "./hooks/index.js";
|
|
8
8
|
export { u as useLocales } from "./hooks/useLocales/index.js";
|
|
@@ -20,10 +20,6 @@ import "date-fns/locale/es";
|
|
|
20
20
|
import "date-fns/locale/fr";
|
|
21
21
|
import "date-fns/locale/en-US";
|
|
22
22
|
import "@m4l/core";
|
|
23
|
-
import "prop-types";
|
|
24
|
-
import "./react-helmet-async-react-fast-compare.js";
|
|
25
|
-
import "./react-helmet-async-invariant.js";
|
|
26
|
-
import "./react-helmet-async-shallowequal.js";
|
|
27
23
|
import "@mui/material/useMediaQuery";
|
|
28
24
|
import "./theme/typography.js";
|
|
29
25
|
import "./utils/index.js";
|
package/package.json
CHANGED
package/dist/commonjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var invariant = function(condition, format, a, b, c, d, e, f) {
|
|
2
|
-
if (!condition) {
|
|
3
|
-
var error;
|
|
4
|
-
if (format === void 0) {
|
|
5
|
-
error = new Error(
|
|
6
|
-
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
7
|
-
);
|
|
8
|
-
} else {
|
|
9
|
-
var args = [a, b, c, d, e, f];
|
|
10
|
-
var argIndex = 0;
|
|
11
|
-
error = new Error(
|
|
12
|
-
format.replace(/%s/g, function() {
|
|
13
|
-
return args[argIndex++];
|
|
14
|
-
})
|
|
15
|
-
);
|
|
16
|
-
error.name = "Invariant Violation";
|
|
17
|
-
}
|
|
18
|
-
error.framesToPop = 1;
|
|
19
|
-
throw error;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
var browser = invariant;
|
|
23
|
-
export { browser as b };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var hasElementType = typeof Element !== "undefined";
|
|
2
|
-
var hasMap = typeof Map === "function";
|
|
3
|
-
var hasSet = typeof Set === "function";
|
|
4
|
-
var hasArrayBuffer = typeof ArrayBuffer === "function" && !!ArrayBuffer.isView;
|
|
5
|
-
function equal(a, b) {
|
|
6
|
-
if (a === b)
|
|
7
|
-
return true;
|
|
8
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
9
|
-
if (a.constructor !== b.constructor)
|
|
10
|
-
return false;
|
|
11
|
-
var length, i, keys;
|
|
12
|
-
if (Array.isArray(a)) {
|
|
13
|
-
length = a.length;
|
|
14
|
-
if (length != b.length)
|
|
15
|
-
return false;
|
|
16
|
-
for (i = length; i-- !== 0; )
|
|
17
|
-
if (!equal(a[i], b[i]))
|
|
18
|
-
return false;
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
var it;
|
|
22
|
-
if (hasMap && a instanceof Map && b instanceof Map) {
|
|
23
|
-
if (a.size !== b.size)
|
|
24
|
-
return false;
|
|
25
|
-
it = a.entries();
|
|
26
|
-
while (!(i = it.next()).done)
|
|
27
|
-
if (!b.has(i.value[0]))
|
|
28
|
-
return false;
|
|
29
|
-
it = a.entries();
|
|
30
|
-
while (!(i = it.next()).done)
|
|
31
|
-
if (!equal(i.value[1], b.get(i.value[0])))
|
|
32
|
-
return false;
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
if (hasSet && a instanceof Set && b instanceof Set) {
|
|
36
|
-
if (a.size !== b.size)
|
|
37
|
-
return false;
|
|
38
|
-
it = a.entries();
|
|
39
|
-
while (!(i = it.next()).done)
|
|
40
|
-
if (!b.has(i.value[0]))
|
|
41
|
-
return false;
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
45
|
-
length = a.length;
|
|
46
|
-
if (length != b.length)
|
|
47
|
-
return false;
|
|
48
|
-
for (i = length; i-- !== 0; )
|
|
49
|
-
if (a[i] !== b[i])
|
|
50
|
-
return false;
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
if (a.constructor === RegExp)
|
|
54
|
-
return a.source === b.source && a.flags === b.flags;
|
|
55
|
-
if (a.valueOf !== Object.prototype.valueOf)
|
|
56
|
-
return a.valueOf() === b.valueOf();
|
|
57
|
-
if (a.toString !== Object.prototype.toString)
|
|
58
|
-
return a.toString() === b.toString();
|
|
59
|
-
keys = Object.keys(a);
|
|
60
|
-
length = keys.length;
|
|
61
|
-
if (length !== Object.keys(b).length)
|
|
62
|
-
return false;
|
|
63
|
-
for (i = length; i-- !== 0; )
|
|
64
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
65
|
-
return false;
|
|
66
|
-
if (hasElementType && a instanceof Element)
|
|
67
|
-
return false;
|
|
68
|
-
for (i = length; i-- !== 0; ) {
|
|
69
|
-
if ((keys[i] === "_owner" || keys[i] === "__v" || keys[i] === "__o") && a.$$typeof) {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
if (!equal(a[keys[i]], b[keys[i]]))
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return a !== a && b !== b;
|
|
78
|
-
}
|
|
79
|
-
var reactFastCompare = function isEqual(a, b) {
|
|
80
|
-
try {
|
|
81
|
-
return equal(a, b);
|
|
82
|
-
} catch (error) {
|
|
83
|
-
if ((error.message || "").match(/stack|recursion/i)) {
|
|
84
|
-
console.warn("react-fast-compare cannot handle circular refs");
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
throw error;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
export { reactFastCompare as r };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
|
|
2
|
-
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
3
|
-
if (ret !== void 0) {
|
|
4
|
-
return !!ret;
|
|
5
|
-
}
|
|
6
|
-
if (objA === objB) {
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
var keysA = Object.keys(objA);
|
|
13
|
-
var keysB = Object.keys(objB);
|
|
14
|
-
if (keysA.length !== keysB.length) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
18
|
-
for (var idx = 0; idx < keysA.length; idx++) {
|
|
19
|
-
var key = keysA[idx];
|
|
20
|
-
if (!bHasOwnProperty(key)) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
var valueA = objA[key];
|
|
24
|
-
var valueB = objB[key];
|
|
25
|
-
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
26
|
-
if (ret === false || ret === void 0 && valueA !== valueB) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
};
|
|
32
|
-
export { shallowequal as s };
|
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
import t, { Component } from "react";
|
|
2
|
-
import r from "prop-types";
|
|
3
|
-
import { r as reactFastCompare } from "./react-helmet-async-react-fast-compare.js";
|
|
4
|
-
import { b as browser } from "./react-helmet-async-invariant.js";
|
|
5
|
-
import { s as shallowequal } from "./react-helmet-async-shallowequal.js";
|
|
6
|
-
function a() {
|
|
7
|
-
return a = Object.assign || function(t2) {
|
|
8
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
9
|
-
var r2 = arguments[e];
|
|
10
|
-
for (var n in r2)
|
|
11
|
-
Object.prototype.hasOwnProperty.call(r2, n) && (t2[n] = r2[n]);
|
|
12
|
-
}
|
|
13
|
-
return t2;
|
|
14
|
-
}, a.apply(this, arguments);
|
|
15
|
-
}
|
|
16
|
-
function s(t2, e) {
|
|
17
|
-
t2.prototype = Object.create(e.prototype), t2.prototype.constructor = t2, c(t2, e);
|
|
18
|
-
}
|
|
19
|
-
function c(t2, e) {
|
|
20
|
-
return c = Object.setPrototypeOf || function(t3, e2) {
|
|
21
|
-
return t3.__proto__ = e2, t3;
|
|
22
|
-
}, c(t2, e);
|
|
23
|
-
}
|
|
24
|
-
function u(t2, e) {
|
|
25
|
-
if (null == t2)
|
|
26
|
-
return {};
|
|
27
|
-
var r2, n, i = {}, o = Object.keys(t2);
|
|
28
|
-
for (n = 0; n < o.length; n++)
|
|
29
|
-
e.indexOf(r2 = o[n]) >= 0 || (i[r2] = t2[r2]);
|
|
30
|
-
return i;
|
|
31
|
-
}
|
|
32
|
-
var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link", META: "meta", NOSCRIPT: "noscript", SCRIPT: "script", STYLE: "style", TITLE: "title", FRAGMENT: "Symbol(react.fragment)" }, p = { rel: ["amphtml", "canonical", "alternate"] }, f = { type: ["application/ld+json"] }, d = { charset: "", name: ["robots", "description"], property: ["og:type", "og:title", "og:url", "og:image", "og:image:alt", "og:description", "twitter:url", "twitter:title", "twitter:description", "twitter:image", "twitter:image:alt", "twitter:card", "twitter:site"] }, h = Object.keys(l).map(function(t2) {
|
|
33
|
-
return l[t2];
|
|
34
|
-
}), m = { accesskey: "accessKey", charset: "charSet", class: "className", contenteditable: "contentEditable", contextmenu: "contextMenu", "http-equiv": "httpEquiv", itemprop: "itemProp", tabindex: "tabIndex" }, y = Object.keys(m).reduce(function(t2, e) {
|
|
35
|
-
return t2[m[e]] = e, t2;
|
|
36
|
-
}, {}), T = function(t2, e) {
|
|
37
|
-
for (var r2 = t2.length - 1; r2 >= 0; r2 -= 1) {
|
|
38
|
-
var n = t2[r2];
|
|
39
|
-
if (Object.prototype.hasOwnProperty.call(n, e))
|
|
40
|
-
return n[e];
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}, g = function(t2) {
|
|
44
|
-
var e = T(t2, l.TITLE), r2 = T(t2, "titleTemplate");
|
|
45
|
-
if (Array.isArray(e) && (e = e.join("")), r2 && e)
|
|
46
|
-
return r2.replace(/%s/g, function() {
|
|
47
|
-
return e;
|
|
48
|
-
});
|
|
49
|
-
var n = T(t2, "defaultTitle");
|
|
50
|
-
return e || n || void 0;
|
|
51
|
-
}, b = function(t2) {
|
|
52
|
-
return T(t2, "onChangeClientState") || function() {
|
|
53
|
-
};
|
|
54
|
-
}, v = function(t2, e) {
|
|
55
|
-
return e.filter(function(e2) {
|
|
56
|
-
return void 0 !== e2[t2];
|
|
57
|
-
}).map(function(e2) {
|
|
58
|
-
return e2[t2];
|
|
59
|
-
}).reduce(function(t3, e2) {
|
|
60
|
-
return a({}, t3, e2);
|
|
61
|
-
}, {});
|
|
62
|
-
}, A = function(t2, e) {
|
|
63
|
-
return e.filter(function(t3) {
|
|
64
|
-
return void 0 !== t3[l.BASE];
|
|
65
|
-
}).map(function(t3) {
|
|
66
|
-
return t3[l.BASE];
|
|
67
|
-
}).reverse().reduce(function(e2, r2) {
|
|
68
|
-
if (!e2.length)
|
|
69
|
-
for (var n = Object.keys(r2), i = 0; i < n.length; i += 1) {
|
|
70
|
-
var o = n[i].toLowerCase();
|
|
71
|
-
if (-1 !== t2.indexOf(o) && r2[o])
|
|
72
|
-
return e2.concat(r2);
|
|
73
|
-
}
|
|
74
|
-
return e2;
|
|
75
|
-
}, []);
|
|
76
|
-
}, C = function(t2, e, r2) {
|
|
77
|
-
var n = {};
|
|
78
|
-
return r2.filter(function(e2) {
|
|
79
|
-
return !!Array.isArray(e2[t2]) || (void 0 !== e2[t2] && console && "function" == typeof console.warn && console.warn("Helmet: " + t2 + ' should be of type "Array". Instead found type "' + typeof e2[t2] + '"'), false);
|
|
80
|
-
}).map(function(e2) {
|
|
81
|
-
return e2[t2];
|
|
82
|
-
}).reverse().reduce(function(t3, r3) {
|
|
83
|
-
var i = {};
|
|
84
|
-
r3.filter(function(t4) {
|
|
85
|
-
for (var r4, o2 = Object.keys(t4), a2 = 0; a2 < o2.length; a2 += 1) {
|
|
86
|
-
var s3 = o2[a2], c3 = s3.toLowerCase();
|
|
87
|
-
-1 === e.indexOf(c3) || "rel" === r4 && "canonical" === t4[r4].toLowerCase() || "rel" === c3 && "stylesheet" === t4[c3].toLowerCase() || (r4 = c3), -1 === e.indexOf(s3) || "innerHTML" !== s3 && "cssText" !== s3 && "itemprop" !== s3 || (r4 = s3);
|
|
88
|
-
}
|
|
89
|
-
if (!r4 || !t4[r4])
|
|
90
|
-
return false;
|
|
91
|
-
var u3 = t4[r4].toLowerCase();
|
|
92
|
-
return n[r4] || (n[r4] = {}), i[r4] || (i[r4] = {}), !n[r4][u3] && (i[r4][u3] = true, true);
|
|
93
|
-
}).reverse().forEach(function(e2) {
|
|
94
|
-
return t3.push(e2);
|
|
95
|
-
});
|
|
96
|
-
for (var o = Object.keys(i), s2 = 0; s2 < o.length; s2 += 1) {
|
|
97
|
-
var c2 = o[s2], u2 = a({}, n[c2], i[c2]);
|
|
98
|
-
n[c2] = u2;
|
|
99
|
-
}
|
|
100
|
-
return t3;
|
|
101
|
-
}, []).reverse();
|
|
102
|
-
}, O = function(t2, e) {
|
|
103
|
-
if (Array.isArray(t2) && t2.length) {
|
|
104
|
-
for (var r2 = 0; r2 < t2.length; r2 += 1)
|
|
105
|
-
if (t2[r2][e])
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
return false;
|
|
109
|
-
}, S = function(t2) {
|
|
110
|
-
return Array.isArray(t2) ? t2.join("") : t2;
|
|
111
|
-
}, E = function(t2, e) {
|
|
112
|
-
return Array.isArray(t2) ? t2.reduce(function(t3, r2) {
|
|
113
|
-
return function(t4, e2) {
|
|
114
|
-
for (var r3 = Object.keys(t4), n = 0; n < r3.length; n += 1)
|
|
115
|
-
if (e2[r3[n]] && e2[r3[n]].includes(t4[r3[n]]))
|
|
116
|
-
return true;
|
|
117
|
-
return false;
|
|
118
|
-
}(r2, e) ? t3.priority.push(r2) : t3.default.push(r2), t3;
|
|
119
|
-
}, { priority: [], default: [] }) : { default: t2 };
|
|
120
|
-
}, I = function(t2, e) {
|
|
121
|
-
var r2;
|
|
122
|
-
return a({}, t2, ((r2 = {})[e] = void 0, r2));
|
|
123
|
-
}, P = [l.NOSCRIPT, l.SCRIPT, l.STYLE], w = function(t2, e) {
|
|
124
|
-
return void 0 === e && (e = true), false === e ? String(t2) : String(t2).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
125
|
-
}, x = function(t2) {
|
|
126
|
-
return Object.keys(t2).reduce(function(e, r2) {
|
|
127
|
-
var n = void 0 !== t2[r2] ? r2 + '="' + t2[r2] + '"' : "" + r2;
|
|
128
|
-
return e ? e + " " + n : n;
|
|
129
|
-
}, "");
|
|
130
|
-
}, L = function(t2, e) {
|
|
131
|
-
return void 0 === e && (e = {}), Object.keys(t2).reduce(function(e2, r2) {
|
|
132
|
-
return e2[m[r2] || r2] = t2[r2], e2;
|
|
133
|
-
}, e);
|
|
134
|
-
}, j = function(e, r2) {
|
|
135
|
-
return r2.map(function(r3, n) {
|
|
136
|
-
var i, o = ((i = { key: n })["data-rh"] = true, i);
|
|
137
|
-
return Object.keys(r3).forEach(function(t2) {
|
|
138
|
-
var e2 = m[t2] || t2;
|
|
139
|
-
"innerHTML" === e2 || "cssText" === e2 ? o.dangerouslySetInnerHTML = { __html: r3.innerHTML || r3.cssText } : o[e2] = r3[t2];
|
|
140
|
-
}), t.createElement(e, o);
|
|
141
|
-
});
|
|
142
|
-
}, M = function(e, r2, n) {
|
|
143
|
-
switch (e) {
|
|
144
|
-
case l.TITLE:
|
|
145
|
-
return { toComponent: function() {
|
|
146
|
-
return n2 = r2.titleAttributes, (i = { key: e2 = r2.title })["data-rh"] = true, o = L(n2, i), [t.createElement(l.TITLE, o, e2)];
|
|
147
|
-
var e2, n2, i, o;
|
|
148
|
-
}, toString: function() {
|
|
149
|
-
return function(t2, e2, r3, n2) {
|
|
150
|
-
var i = x(r3), o = S(e2);
|
|
151
|
-
return i ? "<" + t2 + ' data-rh="true" ' + i + ">" + w(o, n2) + "</" + t2 + ">" : "<" + t2 + ' data-rh="true">' + w(o, n2) + "</" + t2 + ">";
|
|
152
|
-
}(e, r2.title, r2.titleAttributes, n);
|
|
153
|
-
} };
|
|
154
|
-
case "bodyAttributes":
|
|
155
|
-
case "htmlAttributes":
|
|
156
|
-
return { toComponent: function() {
|
|
157
|
-
return L(r2);
|
|
158
|
-
}, toString: function() {
|
|
159
|
-
return x(r2);
|
|
160
|
-
} };
|
|
161
|
-
default:
|
|
162
|
-
return { toComponent: function() {
|
|
163
|
-
return j(e, r2);
|
|
164
|
-
}, toString: function() {
|
|
165
|
-
return function(t2, e2, r3) {
|
|
166
|
-
return e2.reduce(function(e3, n2) {
|
|
167
|
-
var i = Object.keys(n2).filter(function(t3) {
|
|
168
|
-
return !("innerHTML" === t3 || "cssText" === t3);
|
|
169
|
-
}).reduce(function(t3, e4) {
|
|
170
|
-
var i2 = void 0 === n2[e4] ? e4 : e4 + '="' + w(n2[e4], r3) + '"';
|
|
171
|
-
return t3 ? t3 + " " + i2 : i2;
|
|
172
|
-
}, ""), o = n2.innerHTML || n2.cssText || "", a2 = -1 === P.indexOf(t2);
|
|
173
|
-
return e3 + "<" + t2 + ' data-rh="true" ' + i + (a2 ? "/>" : ">" + o + "</" + t2 + ">");
|
|
174
|
-
}, "");
|
|
175
|
-
}(e, r2, n);
|
|
176
|
-
} };
|
|
177
|
-
}
|
|
178
|
-
}, k = function(t2) {
|
|
179
|
-
var e = t2.baseTag, r2 = t2.bodyAttributes, n = t2.encode, i = t2.htmlAttributes, o = t2.noscriptTags, a2 = t2.styleTags, s2 = t2.title, c2 = void 0 === s2 ? "" : s2, u2 = t2.titleAttributes, h2 = t2.linkTags, m2 = t2.metaTags, y2 = t2.scriptTags, T2 = { toComponent: function() {
|
|
180
|
-
}, toString: function() {
|
|
181
|
-
return "";
|
|
182
|
-
} };
|
|
183
|
-
if (t2.prioritizeSeoTags) {
|
|
184
|
-
var g2 = function(t3) {
|
|
185
|
-
var e2 = t3.linkTags, r3 = t3.scriptTags, n2 = t3.encode, i2 = E(t3.metaTags, d), o2 = E(e2, p), a3 = E(r3, f);
|
|
186
|
-
return { priorityMethods: { toComponent: function() {
|
|
187
|
-
return [].concat(j(l.META, i2.priority), j(l.LINK, o2.priority), j(l.SCRIPT, a3.priority));
|
|
188
|
-
}, toString: function() {
|
|
189
|
-
return M(l.META, i2.priority, n2) + " " + M(l.LINK, o2.priority, n2) + " " + M(l.SCRIPT, a3.priority, n2);
|
|
190
|
-
} }, metaTags: i2.default, linkTags: o2.default, scriptTags: a3.default };
|
|
191
|
-
}(t2);
|
|
192
|
-
T2 = g2.priorityMethods, h2 = g2.linkTags, m2 = g2.metaTags, y2 = g2.scriptTags;
|
|
193
|
-
}
|
|
194
|
-
return { priority: T2, base: M(l.BASE, e, n), bodyAttributes: M("bodyAttributes", r2, n), htmlAttributes: M("htmlAttributes", i, n), link: M(l.LINK, h2, n), meta: M(l.META, m2, n), noscript: M(l.NOSCRIPT, o, n), script: M(l.SCRIPT, y2, n), style: M(l.STYLE, a2, n), title: M(l.TITLE, { title: c2, titleAttributes: u2 }, n) };
|
|
195
|
-
}, H = [], N = function(t2, e) {
|
|
196
|
-
var r2 = this;
|
|
197
|
-
void 0 === e && (e = "undefined" != typeof document), this.instances = [], this.value = { setHelmet: function(t3) {
|
|
198
|
-
r2.context.helmet = t3;
|
|
199
|
-
}, helmetInstances: { get: function() {
|
|
200
|
-
return r2.canUseDOM ? H : r2.instances;
|
|
201
|
-
}, add: function(t3) {
|
|
202
|
-
(r2.canUseDOM ? H : r2.instances).push(t3);
|
|
203
|
-
}, remove: function(t3) {
|
|
204
|
-
var e2 = (r2.canUseDOM ? H : r2.instances).indexOf(t3);
|
|
205
|
-
(r2.canUseDOM ? H : r2.instances).splice(e2, 1);
|
|
206
|
-
} } }, this.context = t2, this.canUseDOM = e, e || (t2.helmet = k({ baseTag: [], bodyAttributes: {}, encodeSpecialCharacters: true, htmlAttributes: {}, linkTags: [], metaTags: [], noscriptTags: [], scriptTags: [], styleTags: [], title: "", titleAttributes: {} }));
|
|
207
|
-
}, R = t.createContext({}), D = r.shape({ setHelmet: r.func, helmetInstances: r.shape({ get: r.func, add: r.func, remove: r.func }) }), U = "undefined" != typeof document, q = /* @__PURE__ */ function(e) {
|
|
208
|
-
function r2(t2) {
|
|
209
|
-
var n;
|
|
210
|
-
return (n = e.call(this, t2) || this).helmetData = new N(n.props.context, r2.canUseDOM), n;
|
|
211
|
-
}
|
|
212
|
-
return s(r2, e), r2.prototype.render = function() {
|
|
213
|
-
return t.createElement(R.Provider, { value: this.helmetData.value }, this.props.children);
|
|
214
|
-
}, r2;
|
|
215
|
-
}(Component);
|
|
216
|
-
q.canUseDOM = U, q.propTypes = { context: r.shape({ helmet: r.shape() }), children: r.node.isRequired }, q.defaultProps = { context: {} }, q.displayName = "HelmetProvider";
|
|
217
|
-
var Y = function(t2, e) {
|
|
218
|
-
var r2, n = document.head || document.querySelector(l.HEAD), i = n.querySelectorAll(t2 + "[data-rh]"), o = [].slice.call(i), a2 = [];
|
|
219
|
-
return e && e.length && e.forEach(function(e2) {
|
|
220
|
-
var n2 = document.createElement(t2);
|
|
221
|
-
for (var i2 in e2)
|
|
222
|
-
Object.prototype.hasOwnProperty.call(e2, i2) && ("innerHTML" === i2 ? n2.innerHTML = e2.innerHTML : "cssText" === i2 ? n2.styleSheet ? n2.styleSheet.cssText = e2.cssText : n2.appendChild(document.createTextNode(e2.cssText)) : n2.setAttribute(i2, void 0 === e2[i2] ? "" : e2[i2]));
|
|
223
|
-
n2.setAttribute("data-rh", "true"), o.some(function(t3, e3) {
|
|
224
|
-
return r2 = e3, n2.isEqualNode(t3);
|
|
225
|
-
}) ? o.splice(r2, 1) : a2.push(n2);
|
|
226
|
-
}), o.forEach(function(t3) {
|
|
227
|
-
return t3.parentNode.removeChild(t3);
|
|
228
|
-
}), a2.forEach(function(t3) {
|
|
229
|
-
return n.appendChild(t3);
|
|
230
|
-
}), { oldTags: o, newTags: a2 };
|
|
231
|
-
}, B = function(t2, e) {
|
|
232
|
-
var r2 = document.getElementsByTagName(t2)[0];
|
|
233
|
-
if (r2) {
|
|
234
|
-
for (var n = r2.getAttribute("data-rh"), i = n ? n.split(",") : [], o = [].concat(i), a2 = Object.keys(e), s2 = 0; s2 < a2.length; s2 += 1) {
|
|
235
|
-
var c2 = a2[s2], u2 = e[c2] || "";
|
|
236
|
-
r2.getAttribute(c2) !== u2 && r2.setAttribute(c2, u2), -1 === i.indexOf(c2) && i.push(c2);
|
|
237
|
-
var l2 = o.indexOf(c2);
|
|
238
|
-
-1 !== l2 && o.splice(l2, 1);
|
|
239
|
-
}
|
|
240
|
-
for (var p2 = o.length - 1; p2 >= 0; p2 -= 1)
|
|
241
|
-
r2.removeAttribute(o[p2]);
|
|
242
|
-
i.length === o.length ? r2.removeAttribute("data-rh") : r2.getAttribute("data-rh") !== a2.join(",") && r2.setAttribute("data-rh", a2.join(","));
|
|
243
|
-
}
|
|
244
|
-
}, K = function(t2, e) {
|
|
245
|
-
var r2 = t2.baseTag, n = t2.htmlAttributes, i = t2.linkTags, o = t2.metaTags, a2 = t2.noscriptTags, s2 = t2.onChangeClientState, c2 = t2.scriptTags, u2 = t2.styleTags, p2 = t2.title, f2 = t2.titleAttributes;
|
|
246
|
-
B(l.BODY, t2.bodyAttributes), B(l.HTML, n), function(t3, e2) {
|
|
247
|
-
void 0 !== t3 && document.title !== t3 && (document.title = S(t3)), B(l.TITLE, e2);
|
|
248
|
-
}(p2, f2);
|
|
249
|
-
var d2 = { baseTag: Y(l.BASE, r2), linkTags: Y(l.LINK, i), metaTags: Y(l.META, o), noscriptTags: Y(l.NOSCRIPT, a2), scriptTags: Y(l.SCRIPT, c2), styleTags: Y(l.STYLE, u2) }, h2 = {}, m2 = {};
|
|
250
|
-
Object.keys(d2).forEach(function(t3) {
|
|
251
|
-
var e2 = d2[t3], r3 = e2.newTags, n2 = e2.oldTags;
|
|
252
|
-
r3.length && (h2[t3] = r3), n2.length && (m2[t3] = d2[t3].oldTags);
|
|
253
|
-
}), e && e(), s2(t2, h2, m2);
|
|
254
|
-
}, _ = null, z = /* @__PURE__ */ function(t2) {
|
|
255
|
-
function e() {
|
|
256
|
-
for (var e2, r3 = arguments.length, n = new Array(r3), i = 0; i < r3; i++)
|
|
257
|
-
n[i] = arguments[i];
|
|
258
|
-
return (e2 = t2.call.apply(t2, [this].concat(n)) || this).rendered = false, e2;
|
|
259
|
-
}
|
|
260
|
-
s(e, t2);
|
|
261
|
-
var r2 = e.prototype;
|
|
262
|
-
return r2.shouldComponentUpdate = function(t3) {
|
|
263
|
-
return !shallowequal(t3, this.props);
|
|
264
|
-
}, r2.componentDidUpdate = function() {
|
|
265
|
-
this.emitChange();
|
|
266
|
-
}, r2.componentWillUnmount = function() {
|
|
267
|
-
this.props.context.helmetInstances.remove(this), this.emitChange();
|
|
268
|
-
}, r2.emitChange = function() {
|
|
269
|
-
var t3, e2, r3 = this.props.context, n = r3.setHelmet, i = null, o = (t3 = r3.helmetInstances.get().map(function(t4) {
|
|
270
|
-
var e3 = a({}, t4.props);
|
|
271
|
-
return delete e3.context, e3;
|
|
272
|
-
}), { baseTag: A(["href"], t3), bodyAttributes: v("bodyAttributes", t3), defer: T(t3, "defer"), encode: T(t3, "encodeSpecialCharacters"), htmlAttributes: v("htmlAttributes", t3), linkTags: C(l.LINK, ["rel", "href"], t3), metaTags: C(l.META, ["name", "charset", "http-equiv", "property", "itemprop"], t3), noscriptTags: C(l.NOSCRIPT, ["innerHTML"], t3), onChangeClientState: b(t3), scriptTags: C(l.SCRIPT, ["src", "innerHTML"], t3), styleTags: C(l.STYLE, ["cssText"], t3), title: g(t3), titleAttributes: v("titleAttributes", t3), prioritizeSeoTags: O(t3, "prioritizeSeoTags") });
|
|
273
|
-
q.canUseDOM ? (e2 = o, _ && cancelAnimationFrame(_), e2.defer ? _ = requestAnimationFrame(function() {
|
|
274
|
-
K(e2, function() {
|
|
275
|
-
_ = null;
|
|
276
|
-
});
|
|
277
|
-
}) : (K(e2), _ = null)) : k && (i = k(o)), n(i);
|
|
278
|
-
}, r2.init = function() {
|
|
279
|
-
this.rendered || (this.rendered = true, this.props.context.helmetInstances.add(this), this.emitChange());
|
|
280
|
-
}, r2.render = function() {
|
|
281
|
-
return this.init(), null;
|
|
282
|
-
}, e;
|
|
283
|
-
}(Component);
|
|
284
|
-
z.propTypes = { context: D.isRequired }, z.displayName = "HelmetDispatcher";
|
|
285
|
-
var F = ["children"], G = ["children"], W = /* @__PURE__ */ function(e) {
|
|
286
|
-
function r2() {
|
|
287
|
-
return e.apply(this, arguments) || this;
|
|
288
|
-
}
|
|
289
|
-
s(r2, e);
|
|
290
|
-
var o = r2.prototype;
|
|
291
|
-
return o.shouldComponentUpdate = function(t2) {
|
|
292
|
-
return !reactFastCompare(I(this.props, "helmetData"), I(t2, "helmetData"));
|
|
293
|
-
}, o.mapNestedChildrenToProps = function(t2, e2) {
|
|
294
|
-
if (!e2)
|
|
295
|
-
return null;
|
|
296
|
-
switch (t2.type) {
|
|
297
|
-
case l.SCRIPT:
|
|
298
|
-
case l.NOSCRIPT:
|
|
299
|
-
return { innerHTML: e2 };
|
|
300
|
-
case l.STYLE:
|
|
301
|
-
return { cssText: e2 };
|
|
302
|
-
default:
|
|
303
|
-
throw new Error("<" + t2.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
|
|
304
|
-
}
|
|
305
|
-
}, o.flattenArrayTypeChildren = function(t2) {
|
|
306
|
-
var e2, r3 = t2.child, n = t2.arrayTypeChildren;
|
|
307
|
-
return a({}, n, ((e2 = {})[r3.type] = [].concat(n[r3.type] || [], [a({}, t2.newChildProps, this.mapNestedChildrenToProps(r3, t2.nestedChildren))]), e2));
|
|
308
|
-
}, o.mapObjectTypeChildren = function(t2) {
|
|
309
|
-
var e2, r3, n = t2.child, i = t2.newProps, o2 = t2.newChildProps, s2 = t2.nestedChildren;
|
|
310
|
-
switch (n.type) {
|
|
311
|
-
case l.TITLE:
|
|
312
|
-
return a({}, i, ((e2 = {})[n.type] = s2, e2.titleAttributes = a({}, o2), e2));
|
|
313
|
-
case l.BODY:
|
|
314
|
-
return a({}, i, { bodyAttributes: a({}, o2) });
|
|
315
|
-
case l.HTML:
|
|
316
|
-
return a({}, i, { htmlAttributes: a({}, o2) });
|
|
317
|
-
default:
|
|
318
|
-
return a({}, i, ((r3 = {})[n.type] = a({}, o2), r3));
|
|
319
|
-
}
|
|
320
|
-
}, o.mapArrayTypeChildrenToProps = function(t2, e2) {
|
|
321
|
-
var r3 = a({}, e2);
|
|
322
|
-
return Object.keys(t2).forEach(function(e3) {
|
|
323
|
-
var n;
|
|
324
|
-
r3 = a({}, r3, ((n = {})[e3] = t2[e3], n));
|
|
325
|
-
}), r3;
|
|
326
|
-
}, o.warnOnInvalidChildren = function(t2, e2) {
|
|
327
|
-
return browser(h.some(function(e3) {
|
|
328
|
-
return t2.type === e3;
|
|
329
|
-
}), "function" == typeof t2.type ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : "Only elements types " + h.join(", ") + " are allowed. Helmet does not support rendering <" + t2.type + "> elements. Refer to our API for more information."), browser(!e2 || "string" == typeof e2 || Array.isArray(e2) && !e2.some(function(t3) {
|
|
330
|
-
return "string" != typeof t3;
|
|
331
|
-
}), "Helmet expects a string as a child of <" + t2.type + ">. Did you forget to wrap your children in braces? ( <" + t2.type + ">{``}</" + t2.type + "> ) Refer to our API for more information."), true;
|
|
332
|
-
}, o.mapChildrenToProps = function(e2, r3) {
|
|
333
|
-
var n = this, i = {};
|
|
334
|
-
return t.Children.forEach(e2, function(t2) {
|
|
335
|
-
if (t2 && t2.props) {
|
|
336
|
-
var e3 = t2.props, o2 = e3.children, a2 = u(e3, F), s2 = Object.keys(a2).reduce(function(t3, e4) {
|
|
337
|
-
return t3[y[e4] || e4] = a2[e4], t3;
|
|
338
|
-
}, {}), c2 = t2.type;
|
|
339
|
-
switch ("symbol" == typeof c2 ? c2 = c2.toString() : n.warnOnInvalidChildren(t2, o2), c2) {
|
|
340
|
-
case l.FRAGMENT:
|
|
341
|
-
r3 = n.mapChildrenToProps(o2, r3);
|
|
342
|
-
break;
|
|
343
|
-
case l.LINK:
|
|
344
|
-
case l.META:
|
|
345
|
-
case l.NOSCRIPT:
|
|
346
|
-
case l.SCRIPT:
|
|
347
|
-
case l.STYLE:
|
|
348
|
-
i = n.flattenArrayTypeChildren({ child: t2, arrayTypeChildren: i, newChildProps: s2, nestedChildren: o2 });
|
|
349
|
-
break;
|
|
350
|
-
default:
|
|
351
|
-
r3 = n.mapObjectTypeChildren({ child: t2, newProps: r3, newChildProps: s2, nestedChildren: o2 });
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}), this.mapArrayTypeChildrenToProps(i, r3);
|
|
355
|
-
}, o.render = function() {
|
|
356
|
-
var e2 = this.props, r3 = e2.children, n = u(e2, G), i = a({}, n), o2 = n.helmetData;
|
|
357
|
-
return r3 && (i = this.mapChildrenToProps(r3, i)), !o2 || o2 instanceof N || (o2 = new N(o2.context, o2.instances)), o2 ? /* @__PURE__ */ t.createElement(z, a({}, i, { context: o2.value, helmetData: void 0 })) : /* @__PURE__ */ t.createElement(R.Consumer, null, function(e3) {
|
|
358
|
-
return t.createElement(z, a({}, i, { context: e3 }));
|
|
359
|
-
});
|
|
360
|
-
}, r2;
|
|
361
|
-
}(Component);
|
|
362
|
-
W.propTypes = { base: r.object, bodyAttributes: r.object, children: r.oneOfType([r.arrayOf(r.node), r.node]), defaultTitle: r.string, defer: r.bool, encodeSpecialCharacters: r.bool, htmlAttributes: r.object, link: r.arrayOf(r.object), meta: r.arrayOf(r.object), noscript: r.arrayOf(r.object), onChangeClientState: r.func, script: r.arrayOf(r.object), style: r.arrayOf(r.object), title: r.string, titleAttributes: r.object, titleTemplate: r.string, prioritizeSeoTags: r.bool, helmetData: r.object }, W.defaultProps = { defer: true, encodeSpecialCharacters: true, prioritizeSeoTags: false }, W.displayName = "Helmet";
|
|
363
|
-
export { W, q };
|