@yext/pages-components 1.1.6 → 1.1.8
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/debugger-B_wkxpSc.cjs +1 -0
- package/dist/{debugger-7xORzT5W.js → debugger-j6XliS2e.js} +123 -102
- package/dist/{index-dVLsHsji.cjs → index-BOvpRtOh.cjs} +1 -1
- package/dist/{index-BbVj7quu.cjs → index-CJMukuXt.cjs} +27 -27
- package/dist/{index-C8IsJIMm.js → index-CZ9UWAMK.js} +195 -165
- package/dist/{index-Ck_jvPcD.js → index-DOAw7xqq.js} +1 -1
- package/dist/index.d.cts +28 -174
- package/dist/index.d.ts +28 -174
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +16 -15
- package/package.json +1 -1
- package/dist/debugger-fEUqg7Sy.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CJMukuXt.cjs"),m=require("react"),N=require("react-dom");function S(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,N.createPortal(i.jsxRuntimeExports.jsx(k,{}),document.body))}const B=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,r=e.dataset.yaEventname,c=t||n;return{action:s,originalEventName:c?`${c}_${r}`:r,scope:c}},C=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},b={},R="YA_NO_SCOPE",w=(e,n,s,t)=>{b.hasOwnProperty(e)?b[e].events.map(r=>r.el).includes(t)||(b[e].events=[...b[e].events,{eventData:n,el:t}]):b[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function k(){const[e,n]=m.useState(),[s,t]=m.useState([]),[r,c]=m.useState(!1),o=a=>{n(e===a?void 0:a)};return m.useEffect(()=>{let a=null;const d=()=>{a&&a.abort(),a=new AbortController;const l=a.signal;document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,j)=>{const p=u.closest("[data-ya-scope]"),v=p==null?void 0:p.dataset.yaScope,x=B(u,v);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${x.originalEventName}_${j}`,action:x.action,originalEventName:x.originalEventName,scope:x.scope}])},{signal:l}),u.addEventListener("mouseleave",()=>{t([])},{signal:l});const E=u.dataset.yaScopeoverride;E?w(E,x,p,u):[v,...C(u,"[data-ya-scope]").map(y=>y.dataset.yaScope)].forEach(y=>{w(y||R,x,p,u)})}),c(!0)};d();const g=new MutationObserver(d);return g.observe(document,{childList:!0,subtree:!0}),()=>{document.documentElement.classList.remove("xYextDebug"),g.disconnect(),a==null||a.abort()}},[]),r?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(D,{data:b,setTooltips:t}):i.jsxRuntimeExports.jsx($,{data:b,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(Y,{tooltips:s})]}):null}const O=()=>{const e={};return Object.values(b).forEach(n=>{n.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(r=>r.el===s.el)&&e[t].push(s)})}),e};function D(e){const{setTooltips:n}=e,[s,t]=m.useState([]),[r,c]=m.useState(""),o=(a,d)=>{s.forEach(l=>l.classList.remove("analytics-event-highlight"));const g=a.map(l=>(l.el.scrollIntoView({behavior:"smooth",block:"nearest"}),l.el.classList.add("analytics-event-highlight"),l.el));t(g),c(d),n(a.map((l,h)=>({elem:l.el,key:`${l.eventData.originalEventName}_${h}`,action:l.eventData.action,originalEventName:l.eventData.originalEventName,scope:l.eventData.scope})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(O()).map(([a,d],g)=>{const l=`${a}_${g}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":l===r}),onClick:()=>o(d,l),children:a})},l)})})]})}function $(e){const{data:n,setTooltips:s}=e,[t,r]=m.useState(""),c=o=>{const a=n[o];a.scopeEl&&(a.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),r(o),s(a.events.map((d,g)=>{const l=d.eventData;return{elem:d.el,key:`${l.originalEventName}_${g}`,action:l.action,originalEventName:l.originalEventName,scope:l.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,a)=>{if(o!==R)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>c(o),children:o})},o+a)})})]})}function Y(e){const n=m.useRef({});return m.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(r=>r.el).filter(r=>r!==s.el);T(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function T(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!L(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let c=!0;for(let o=0;o<n.length;o++){const a=n[o];A(e.el,a)&&(c=!1)}if(c)break}}function A(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,r=s+e.clientHeight,c=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,a=n.getBoundingClientRect().left,d=o+n.clientHeight,g=a+n.clientWidth,l=(h,u,j,p,v,x,E,f)=>j<=v&&v<=E&&p<=x&&x<=f||j<=h&&h<=E&&p<=u&&u<=f||j<=h&&h<=E&&p<=x&&x<=f||j<=v&&v<=E&&p<=u&&u<=f;return l(t,s,a,o,c,r,g,d)||l(a,o,t,s,g,d,c,r)}function L(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,r=n.clientWidth;let c,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",c=e.left-r+"px";break}case 1:{o=window.scrollY+e.top-t+"px",c=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",c=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",c=e.right-r+"px";break}case 4:{o=window.scrollY+e.bottom+"px",c=e.left-r+"px";break}case 5:{o=window.scrollY+e.bottom+"px",c=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",c=e.right-r+"px";break}case 7:{o=window.scrollY+e.bottom+"px",c=e.right+"px";break}default:o=0,c=0}return{top:o,left:c}}exports.AnalyticsDebuggerInternal=k;exports.default=S;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { g as C, j as o, c as j } from "./index-CZ9UWAMK.js";
|
|
2
|
+
import { useState as w, useEffect as N, useRef as O } from "react";
|
|
3
|
+
import { createPortal as D } from "react-dom";
|
|
4
|
+
function z() {
|
|
5
|
+
return C().name !== "browser" || window.hasOwnProperty("debuggerInitialized") ? null : (window.debuggerInitialized = !0, D(/* @__PURE__ */ o.jsx(R, {}), document.body));
|
|
6
6
|
}
|
|
7
7
|
const S = (e, s) => {
|
|
8
|
-
const n = e.dataset.yaAction, t = e.dataset.yaScopeoverride,
|
|
8
|
+
const n = e.dataset.yaAction, t = e.dataset.yaScopeoverride, r = e.dataset.yaEventname, c = t || s;
|
|
9
9
|
return {
|
|
10
10
|
action: n,
|
|
11
|
-
originalEventName: c ? `${c}_${
|
|
11
|
+
originalEventName: c ? `${c}_${r}` : r,
|
|
12
12
|
scope: c
|
|
13
13
|
};
|
|
14
14
|
}, Y = (e, s) => {
|
|
@@ -17,14 +17,14 @@ const S = (e, s) => {
|
|
|
17
17
|
for (; t != null && t.parentElement; )
|
|
18
18
|
t = t.parentElement.closest(s), t && n.push(t);
|
|
19
19
|
return n;
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
...
|
|
20
|
+
}, b = {}, B = "YA_NO_SCOPE", k = (e, s, n, t) => {
|
|
21
|
+
b.hasOwnProperty(e) ? b[e].events.map((r) => r.el).includes(t) || (b[e].events = [
|
|
22
|
+
...b[e].events,
|
|
23
23
|
{
|
|
24
24
|
eventData: s,
|
|
25
25
|
el: t
|
|
26
26
|
}
|
|
27
|
-
]) :
|
|
27
|
+
]) : b[e] = {
|
|
28
28
|
scopeEl: n || t,
|
|
29
29
|
// overidden scopes still need an element
|
|
30
30
|
events: [
|
|
@@ -35,39 +35,60 @@ const S = (e, s) => {
|
|
|
35
35
|
]
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
function
|
|
39
|
-
const [e, s] =
|
|
40
|
-
s(e ===
|
|
38
|
+
function R() {
|
|
39
|
+
const [e, s] = w(), [n, t] = w([]), [r, c] = w(!1), i = (a) => {
|
|
40
|
+
s(e === a ? void 0 : a);
|
|
41
41
|
};
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
42
|
+
return N(() => {
|
|
43
|
+
let a = null;
|
|
44
|
+
const u = () => {
|
|
45
|
+
a && a.abort(), a = new AbortController();
|
|
46
|
+
const l = a.signal;
|
|
47
|
+
document.documentElement.classList.add("xYextDebug"), document.querySelectorAll(
|
|
48
|
+
"[data-ya-eventname]"
|
|
49
|
+
).forEach((d, x) => {
|
|
50
|
+
const m = d.closest("[data-ya-scope]"), v = m == null ? void 0 : m.dataset.yaScope, p = S(d, v);
|
|
51
|
+
d.addEventListener(
|
|
52
|
+
"mouseenter",
|
|
53
|
+
() => {
|
|
54
|
+
t([
|
|
55
|
+
{
|
|
56
|
+
elem: d,
|
|
57
|
+
key: `${p.originalEventName}_${x}`,
|
|
58
|
+
action: p.action,
|
|
59
|
+
originalEventName: p.originalEventName,
|
|
60
|
+
scope: p.scope
|
|
61
|
+
}
|
|
62
|
+
]);
|
|
63
|
+
},
|
|
64
|
+
{ signal: l }
|
|
65
|
+
), d.addEventListener(
|
|
66
|
+
"mouseleave",
|
|
67
|
+
() => {
|
|
68
|
+
t([]);
|
|
69
|
+
},
|
|
70
|
+
{ signal: l }
|
|
71
|
+
);
|
|
72
|
+
const f = d.dataset.yaScopeoverride;
|
|
73
|
+
f ? k(f, p, m, d) : [
|
|
74
|
+
v,
|
|
75
|
+
...Y(d, "[data-ya-scope]").map(
|
|
76
|
+
(E) => E.dataset.yaScope
|
|
77
|
+
)
|
|
78
|
+
].forEach((E) => {
|
|
79
|
+
k(E || B, p, m, d);
|
|
80
|
+
});
|
|
81
|
+
}), c(!0);
|
|
82
|
+
};
|
|
83
|
+
u();
|
|
84
|
+
const g = new MutationObserver(u);
|
|
85
|
+
return g.observe(document, {
|
|
86
|
+
childList: !0,
|
|
87
|
+
subtree: !0
|
|
88
|
+
}), () => {
|
|
89
|
+
document.documentElement.classList.remove("xYextDebug"), g.disconnect(), a == null || a.abort();
|
|
90
|
+
};
|
|
91
|
+
}, []), r ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
71
92
|
/* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger", children: [
|
|
72
93
|
/* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-toggles", children: [
|
|
73
94
|
/* @__PURE__ */ o.jsx(
|
|
@@ -91,80 +112,80 @@ function D() {
|
|
|
91
112
|
}
|
|
92
113
|
)
|
|
93
114
|
] }),
|
|
94
|
-
e && /* @__PURE__ */ o.jsx("div", { className: "analytics-debugger-tabs", children: e === "Events" ? /* @__PURE__ */ o.jsx(
|
|
115
|
+
e && /* @__PURE__ */ o.jsx("div", { className: "analytics-debugger-tabs", children: e === "Events" ? /* @__PURE__ */ o.jsx(A, { data: b, setTooltips: t }) : /* @__PURE__ */ o.jsx($, { data: b, setTooltips: t }) })
|
|
95
116
|
] }),
|
|
96
|
-
/* @__PURE__ */ o.jsx(
|
|
117
|
+
/* @__PURE__ */ o.jsx(L, { tooltips: n })
|
|
97
118
|
] }) : null;
|
|
98
119
|
}
|
|
99
|
-
const
|
|
120
|
+
const T = () => {
|
|
100
121
|
const e = {};
|
|
101
|
-
return Object.values(
|
|
122
|
+
return Object.values(b).forEach((s) => {
|
|
102
123
|
s.events.forEach((n) => {
|
|
103
124
|
const { originalEventName: t } = n.eventData;
|
|
104
125
|
e[t] || (e[t] = []), !e[t].find(
|
|
105
|
-
(
|
|
126
|
+
(r) => r.el === n.el
|
|
106
127
|
) && e[t].push(n);
|
|
107
128
|
});
|
|
108
129
|
}), e;
|
|
109
130
|
};
|
|
110
|
-
function
|
|
111
|
-
const { setTooltips: s } = e, [n, t] =
|
|
131
|
+
function A(e) {
|
|
132
|
+
const { setTooltips: s } = e, [n, t] = w([]), [r, c] = w(""), i = (a, u) => {
|
|
112
133
|
n.forEach(
|
|
113
|
-
(
|
|
134
|
+
(l) => l.classList.remove("analytics-event-highlight")
|
|
114
135
|
);
|
|
115
|
-
const g =
|
|
116
|
-
t(g), c(
|
|
117
|
-
|
|
118
|
-
elem:
|
|
119
|
-
key: `${
|
|
120
|
-
action:
|
|
121
|
-
originalEventName:
|
|
122
|
-
scope:
|
|
136
|
+
const g = a.map((l) => (l.el.scrollIntoView({ behavior: "smooth", block: "nearest" }), l.el.classList.add("analytics-event-highlight"), l.el));
|
|
137
|
+
t(g), c(u), s(
|
|
138
|
+
a.map((l, h) => ({
|
|
139
|
+
elem: l.el,
|
|
140
|
+
key: `${l.eventData.originalEventName}_${h}`,
|
|
141
|
+
action: l.eventData.action,
|
|
142
|
+
originalEventName: l.eventData.originalEventName,
|
|
143
|
+
scope: l.eventData.scope
|
|
123
144
|
}))
|
|
124
145
|
);
|
|
125
146
|
};
|
|
126
147
|
return /* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-tab", children: [
|
|
127
148
|
/* @__PURE__ */ o.jsx("h2", { className: "analytics-debugger-tab-title", children: "Event Names" }),
|
|
128
|
-
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.entries(
|
|
129
|
-
([
|
|
130
|
-
const
|
|
149
|
+
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.entries(T()).map(
|
|
150
|
+
([a, u], g) => {
|
|
151
|
+
const l = `${a}_${g}`;
|
|
131
152
|
return /* @__PURE__ */ o.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ o.jsx(
|
|
132
153
|
"button",
|
|
133
154
|
{
|
|
134
155
|
className: j("analytics-debugger-button", {
|
|
135
|
-
"is-active":
|
|
156
|
+
"is-active": l === r
|
|
136
157
|
}),
|
|
137
|
-
onClick: () => i(
|
|
138
|
-
children:
|
|
158
|
+
onClick: () => i(u, l),
|
|
159
|
+
children: a
|
|
139
160
|
}
|
|
140
|
-
) },
|
|
161
|
+
) }, l);
|
|
141
162
|
}
|
|
142
163
|
) })
|
|
143
164
|
] });
|
|
144
165
|
}
|
|
145
166
|
function $(e) {
|
|
146
|
-
const { data: s, setTooltips: n } = e, [t,
|
|
147
|
-
const
|
|
148
|
-
|
|
167
|
+
const { data: s, setTooltips: n } = e, [t, r] = w(""), c = (i) => {
|
|
168
|
+
const a = s[i];
|
|
169
|
+
a.scopeEl && (a.scopeEl.scrollIntoView({
|
|
149
170
|
behavior: "smooth",
|
|
150
171
|
block: "nearest"
|
|
151
|
-
}),
|
|
152
|
-
|
|
153
|
-
const
|
|
172
|
+
}), r(i), n(
|
|
173
|
+
a.events.map((u, g) => {
|
|
174
|
+
const l = u.eventData;
|
|
154
175
|
return {
|
|
155
|
-
elem:
|
|
156
|
-
key: `${
|
|
157
|
-
action:
|
|
158
|
-
originalEventName:
|
|
159
|
-
scope:
|
|
176
|
+
elem: u.el,
|
|
177
|
+
key: `${l.originalEventName}_${g}`,
|
|
178
|
+
action: l.action,
|
|
179
|
+
originalEventName: l.originalEventName,
|
|
180
|
+
scope: l.scope
|
|
160
181
|
};
|
|
161
182
|
})
|
|
162
183
|
));
|
|
163
184
|
};
|
|
164
185
|
return /* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-tab", children: [
|
|
165
186
|
/* @__PURE__ */ o.jsx("h2", { className: "analytics-debugger-tab-title", children: "Scope Names" }),
|
|
166
|
-
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.keys(s).map((i,
|
|
167
|
-
if (i !==
|
|
187
|
+
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.keys(s).map((i, a) => {
|
|
188
|
+
if (i !== B)
|
|
168
189
|
return /* @__PURE__ */ o.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ o.jsx(
|
|
169
190
|
"button",
|
|
170
191
|
{
|
|
@@ -174,17 +195,17 @@ function $(e) {
|
|
|
174
195
|
onClick: () => c(i),
|
|
175
196
|
children: i
|
|
176
197
|
}
|
|
177
|
-
) }, i +
|
|
198
|
+
) }, i + a);
|
|
178
199
|
}) })
|
|
179
200
|
] });
|
|
180
201
|
}
|
|
181
|
-
function
|
|
182
|
-
const s =
|
|
183
|
-
return
|
|
202
|
+
function L(e) {
|
|
203
|
+
const s = O({});
|
|
204
|
+
return N(() => {
|
|
184
205
|
if (s.current)
|
|
185
206
|
for (const n of Object.values(s.current)) {
|
|
186
|
-
const t = Object.values(s.current).map((
|
|
187
|
-
|
|
207
|
+
const t = Object.values(s.current).map((r) => r.el).filter((r) => r !== n.el);
|
|
208
|
+
_(n, t), n.el.style.visibility = "visible";
|
|
188
209
|
}
|
|
189
210
|
}, [e.tooltips]), /* @__PURE__ */ o.jsx(o.Fragment, { children: e.tooltips.map((n) => /* @__PURE__ */ o.jsxs(
|
|
190
211
|
"div",
|
|
@@ -217,14 +238,14 @@ function A(e) {
|
|
|
217
238
|
n.key
|
|
218
239
|
)) });
|
|
219
240
|
}
|
|
220
|
-
function
|
|
241
|
+
function _(e, s) {
|
|
221
242
|
for (let n = 0; n < 9; n++) {
|
|
222
|
-
const t =
|
|
243
|
+
const t = H(
|
|
223
244
|
e.tooltip.elem.getBoundingClientRect(),
|
|
224
245
|
e.el,
|
|
225
246
|
n
|
|
226
247
|
);
|
|
227
|
-
if (e.el.style.inset = `${t.top} auto auto ${t.left}`, !!
|
|
248
|
+
if (e.el.style.inset = `${t.top} auto auto ${t.left}`, !!P(
|
|
228
249
|
e.el.getBoundingClientRect().left,
|
|
229
250
|
e.el.getBoundingClientRect().top + window.scrollY,
|
|
230
251
|
e.el.getBoundingClientRect().right,
|
|
@@ -232,25 +253,25 @@ function L(e, s) {
|
|
|
232
253
|
)) continue;
|
|
233
254
|
let c = !0;
|
|
234
255
|
for (let i = 0; i < s.length; i++) {
|
|
235
|
-
const
|
|
236
|
-
|
|
256
|
+
const a = s[i];
|
|
257
|
+
I(e.el, a) && (c = !1);
|
|
237
258
|
}
|
|
238
259
|
if (c) break;
|
|
239
260
|
}
|
|
240
261
|
}
|
|
241
|
-
function
|
|
242
|
-
const n = e.getBoundingClientRect().top + window.scrollY, t = e.getBoundingClientRect().left,
|
|
243
|
-
return
|
|
262
|
+
function I(e, s) {
|
|
263
|
+
const n = e.getBoundingClientRect().top + window.scrollY, t = e.getBoundingClientRect().left, r = n + e.clientHeight, c = t + e.clientWidth, i = s.getBoundingClientRect().top + window.scrollY, a = s.getBoundingClientRect().left, u = i + s.clientHeight, g = a + s.clientWidth, l = (h, d, x, m, v, p, f, y) => x <= v && v <= f && m <= p && p <= y || x <= h && h <= f && m <= d && d <= y || x <= h && h <= f && m <= p && p <= y || x <= v && v <= f && m <= d && d <= y;
|
|
264
|
+
return l(t, n, a, i, c, r, g, u) || l(a, i, t, n, g, u, c, r);
|
|
244
265
|
}
|
|
245
|
-
function
|
|
266
|
+
function P(e, s, n, t) {
|
|
246
267
|
return e < 0 || n > window.innerWidth || s < 0 || t > document.documentElement.scrollHeight;
|
|
247
268
|
}
|
|
248
|
-
function
|
|
249
|
-
const t = s.clientHeight,
|
|
269
|
+
function H(e, s, n) {
|
|
270
|
+
const t = s.clientHeight, r = s.clientWidth;
|
|
250
271
|
let c, i;
|
|
251
272
|
switch (n) {
|
|
252
273
|
case 0: {
|
|
253
|
-
i = window.scrollY + e.top - t + "px", c = e.left -
|
|
274
|
+
i = window.scrollY + e.top - t + "px", c = e.left - r + "px";
|
|
254
275
|
break;
|
|
255
276
|
}
|
|
256
277
|
case 1: {
|
|
@@ -262,11 +283,11 @@ function P(e, s, n) {
|
|
|
262
283
|
break;
|
|
263
284
|
}
|
|
264
285
|
case 3: {
|
|
265
|
-
i = window.scrollY + e.top - t + "px", c = e.right -
|
|
286
|
+
i = window.scrollY + e.top - t + "px", c = e.right - r + "px";
|
|
266
287
|
break;
|
|
267
288
|
}
|
|
268
289
|
case 4: {
|
|
269
|
-
i = window.scrollY + e.bottom + "px", c = e.left -
|
|
290
|
+
i = window.scrollY + e.bottom + "px", c = e.left - r + "px";
|
|
270
291
|
break;
|
|
271
292
|
}
|
|
272
293
|
case 5: {
|
|
@@ -274,7 +295,7 @@ function P(e, s, n) {
|
|
|
274
295
|
break;
|
|
275
296
|
}
|
|
276
297
|
case 6: {
|
|
277
|
-
i = window.scrollY + e.bottom + "px", c = e.right -
|
|
298
|
+
i = window.scrollY + e.bottom + "px", c = e.right - r + "px";
|
|
278
299
|
break;
|
|
279
300
|
}
|
|
280
301
|
case 7: {
|
|
@@ -290,6 +311,6 @@ function P(e, s, n) {
|
|
|
290
311
|
};
|
|
291
312
|
}
|
|
292
313
|
export {
|
|
293
|
-
|
|
294
|
-
|
|
314
|
+
R as AnalyticsDebuggerInternal,
|
|
315
|
+
z as default
|
|
295
316
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-CJMukuXt.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
|
|
2
2
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(t,!0)},{type:"text",value:`
|
|
3
3
|
`}]}}function yt(n,t){const e=m.createState(n,t),r=e.one(n,null),i=er(e);return i&&r.children.push({type:"text",value:`
|
|
4
4
|
`},i),Array.isArray(r)?{type:"root",children:r}:r}const tr=function(n,t){return n&&"run"in n?rr(n,t):ir(n||t)};function rr(n,t){return(e,r,i)=>{n.run(yt(e,t),r,l=>{i(l)})}}function ir(n){return t=>yt(t,n)}const Pe=["http","https","mailto","tel"];function xt(n){const t=(n||"").trim(),e=t.charAt(0);if(e==="#"||e==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Pe.length;){const l=Pe[i];if(r===l.length&&t.slice(0,l.length).toLowerCase()===l)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
|