react-grab 0.0.3 → 0.0.5
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/index.cjs +179 -14
- package/dist/index.d.cts +1 -11
- package/dist/index.d.ts +1 -11
- package/dist/index.global.js +19 -12
- package/dist/index.js +180 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12,26 +12,179 @@ var source = require('bippy/dist/source');
|
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var getStack = async (element) => {
|
|
16
16
|
const fiber = bippy.getFiberFromHostInstance(element);
|
|
17
17
|
if (!fiber) return null;
|
|
18
18
|
const stackTrace = source.getFiberStackTrace(fiber);
|
|
19
19
|
const rawOwnerStack = await source.getOwnerStack(stackTrace);
|
|
20
|
-
const stack = rawOwnerStack.
|
|
20
|
+
const stack = rawOwnerStack.map((item) => ({
|
|
21
21
|
componentName: item.name,
|
|
22
22
|
fileName: item.source?.fileName
|
|
23
23
|
}));
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
return stack;
|
|
25
|
+
};
|
|
26
|
+
var filterStack = (stack) => {
|
|
27
|
+
return stack.filter(
|
|
28
|
+
(item) => item.fileName && !item.fileName.includes("node_modules") && item.componentName.length > 1 && !item.fileName.startsWith("_")
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
var findCommonRoot = (paths) => {
|
|
32
|
+
if (paths.length === 0) return "";
|
|
33
|
+
if (paths.length === 1) {
|
|
34
|
+
const lastSlash2 = paths[0].lastIndexOf("/");
|
|
35
|
+
return lastSlash2 > 0 ? paths[0].substring(0, lastSlash2 + 1) : "";
|
|
36
|
+
}
|
|
37
|
+
let commonPrefix = paths[0];
|
|
38
|
+
for (let i = 1; i < paths.length; i++) {
|
|
39
|
+
const path = paths[i];
|
|
40
|
+
let j = 0;
|
|
41
|
+
while (j < commonPrefix.length && j < path.length && commonPrefix[j] === path[j]) {
|
|
42
|
+
j++;
|
|
43
|
+
}
|
|
44
|
+
commonPrefix = commonPrefix.substring(0, j);
|
|
45
|
+
}
|
|
46
|
+
const lastSlash = commonPrefix.lastIndexOf("/");
|
|
47
|
+
return lastSlash > 0 ? commonPrefix.substring(0, lastSlash + 1) : "";
|
|
48
|
+
};
|
|
49
|
+
var serializeStack = (stack) => {
|
|
50
|
+
const filePaths = stack.map((item) => item.fileName).filter((path) => !!path);
|
|
51
|
+
const commonRoot = findCommonRoot(filePaths);
|
|
52
|
+
return stack.map((item) => {
|
|
53
|
+
let fileName = item.fileName;
|
|
54
|
+
if (fileName && commonRoot) {
|
|
55
|
+
fileName = fileName.startsWith(commonRoot) ? fileName.substring(commonRoot.length) : fileName;
|
|
56
|
+
}
|
|
57
|
+
return `${item.componentName}${fileName ? ` (${fileName})` : ""}`;
|
|
58
|
+
}).join("\n");
|
|
59
|
+
};
|
|
60
|
+
var getHTMLSnippet = (element) => {
|
|
61
|
+
const getElementTag = (el) => {
|
|
62
|
+
const tagName = el.tagName.toLowerCase();
|
|
63
|
+
const importantAttrs = [
|
|
64
|
+
"id",
|
|
65
|
+
"class",
|
|
66
|
+
"name",
|
|
67
|
+
"type",
|
|
68
|
+
"role",
|
|
69
|
+
"aria-label"
|
|
70
|
+
];
|
|
71
|
+
const maxValueLength = 50;
|
|
72
|
+
const attrs = Array.from(el.attributes).filter((attr) => {
|
|
73
|
+
return importantAttrs.includes(attr.name) || attr.name.startsWith("data-");
|
|
74
|
+
}).map((attr) => {
|
|
75
|
+
let value = attr.value;
|
|
76
|
+
if (value.length > maxValueLength) {
|
|
77
|
+
value = value.substring(0, maxValueLength) + "...";
|
|
78
|
+
}
|
|
79
|
+
return `${attr.name}="${value}"`;
|
|
80
|
+
}).join(" ");
|
|
81
|
+
return attrs ? `<${tagName} ${attrs}>` : `<${tagName}>`;
|
|
82
|
+
};
|
|
83
|
+
const getClosingTag = (el) => {
|
|
84
|
+
return `</${el.tagName.toLowerCase()}>`;
|
|
85
|
+
};
|
|
86
|
+
const getChildrenCount = (el) => {
|
|
87
|
+
const children = Array.from(el.children);
|
|
88
|
+
return children.length;
|
|
89
|
+
};
|
|
90
|
+
const getTextContent = (el) => {
|
|
91
|
+
let text = "";
|
|
92
|
+
const childNodes = Array.from(el.childNodes);
|
|
93
|
+
for (const node of childNodes) {
|
|
94
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
95
|
+
text += node.textContent || "";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
text = text.trim();
|
|
99
|
+
const maxLength = 100;
|
|
100
|
+
if (text.length > maxLength) {
|
|
101
|
+
text = text.substring(0, maxLength) + "...";
|
|
102
|
+
}
|
|
103
|
+
return text;
|
|
27
104
|
};
|
|
105
|
+
const lines = [];
|
|
106
|
+
const parent = element.parentElement;
|
|
107
|
+
if (parent) {
|
|
108
|
+
lines.push(getElementTag(parent));
|
|
109
|
+
const siblings = Array.from(parent.children);
|
|
110
|
+
const targetIndex = siblings.indexOf(element);
|
|
111
|
+
if (targetIndex > 0) {
|
|
112
|
+
lines.push(
|
|
113
|
+
` ... (${targetIndex} element${targetIndex === 1 ? "" : "s"})`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const indent = parent ? " " : "";
|
|
118
|
+
lines.push(indent + "<!-- SELECTED -->");
|
|
119
|
+
lines.push(indent + getElementTag(element));
|
|
120
|
+
const textContent = getTextContent(element);
|
|
121
|
+
const childrenCount = getChildrenCount(element);
|
|
122
|
+
if (textContent) {
|
|
123
|
+
lines.push(`${indent} ${textContent}`);
|
|
124
|
+
}
|
|
125
|
+
if (childrenCount > 0) {
|
|
126
|
+
lines.push(
|
|
127
|
+
`${indent} ... (${childrenCount} element${childrenCount === 1 ? "" : "s"})`
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
lines.push(indent + getClosingTag(element));
|
|
131
|
+
if (parent) {
|
|
132
|
+
const siblings = Array.from(parent.children);
|
|
133
|
+
const targetIndex = siblings.indexOf(element);
|
|
134
|
+
const siblingsAfter = siblings.length - targetIndex - 1;
|
|
135
|
+
if (siblingsAfter > 0) {
|
|
136
|
+
lines.push(
|
|
137
|
+
` ... (${siblingsAfter} element${siblingsAfter === 1 ? "" : "s"})`
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
lines.push(getClosingTag(parent));
|
|
141
|
+
}
|
|
142
|
+
return lines.join("\n");
|
|
28
143
|
};
|
|
144
|
+
|
|
145
|
+
// src/index.ts
|
|
29
146
|
var init = () => {
|
|
30
147
|
let metaKeyTimer = null;
|
|
31
148
|
let overlay = null;
|
|
32
149
|
let isActive = false;
|
|
150
|
+
let isLocked = false;
|
|
33
151
|
let currentElement = null;
|
|
34
152
|
let animationFrame = null;
|
|
153
|
+
let pendingCopyText = null;
|
|
154
|
+
const copyToClipboard = async (text) => {
|
|
155
|
+
if (!document.hasFocus()) {
|
|
156
|
+
pendingCopyText = text;
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
await navigator.clipboard.writeText(text);
|
|
161
|
+
pendingCopyText = null;
|
|
162
|
+
hideOverlay();
|
|
163
|
+
} catch {
|
|
164
|
+
const textarea = document.createElement("textarea");
|
|
165
|
+
textarea.value = text;
|
|
166
|
+
textarea.style.position = "fixed";
|
|
167
|
+
textarea.style.left = "-999999px";
|
|
168
|
+
textarea.style.top = "-999999px";
|
|
169
|
+
document.body.appendChild(textarea);
|
|
170
|
+
textarea.focus();
|
|
171
|
+
textarea.select();
|
|
172
|
+
try {
|
|
173
|
+
document.execCommand("copy");
|
|
174
|
+
pendingCopyText = null;
|
|
175
|
+
hideOverlay();
|
|
176
|
+
} catch (execErr) {
|
|
177
|
+
console.error("Failed to copy to clipboard:", execErr);
|
|
178
|
+
hideOverlay();
|
|
179
|
+
}
|
|
180
|
+
document.body.removeChild(textarea);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const handleWindowFocus = () => {
|
|
184
|
+
if (pendingCopyText) {
|
|
185
|
+
void copyToClipboard(pendingCopyText);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
35
188
|
let currentX = 0;
|
|
36
189
|
let currentY = 0;
|
|
37
190
|
let currentWidth = 0;
|
|
@@ -61,7 +214,7 @@ var init = () => {
|
|
|
61
214
|
};
|
|
62
215
|
const updateOverlayPosition = () => {
|
|
63
216
|
if (!overlay || !isActive) return;
|
|
64
|
-
const factor = 0.
|
|
217
|
+
const factor = 0.5;
|
|
65
218
|
currentX = lerp(currentX, targetX, factor);
|
|
66
219
|
currentY = lerp(currentY, targetY, factor);
|
|
67
220
|
currentWidth = lerp(currentWidth, targetWidth, factor);
|
|
@@ -74,6 +227,7 @@ var init = () => {
|
|
|
74
227
|
animationFrame = requestAnimationFrame(updateOverlayPosition);
|
|
75
228
|
};
|
|
76
229
|
const handleMouseMove = (e) => {
|
|
230
|
+
if (isLocked) return;
|
|
77
231
|
const element = document.elementFromPoint(e.clientX, e.clientY);
|
|
78
232
|
if (!element || element === overlay) return;
|
|
79
233
|
currentElement = element;
|
|
@@ -90,14 +244,24 @@ var init = () => {
|
|
|
90
244
|
e.preventDefault();
|
|
91
245
|
e.stopPropagation();
|
|
92
246
|
e.stopImmediatePropagation();
|
|
247
|
+
isLocked = true;
|
|
93
248
|
const elementToInspect = currentElement;
|
|
94
|
-
hideOverlay();
|
|
95
249
|
if (elementToInspect) {
|
|
96
|
-
void
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
250
|
+
void getStack(elementToInspect).then((stack) => {
|
|
251
|
+
if (!stack) {
|
|
252
|
+
hideOverlay();
|
|
253
|
+
return;
|
|
100
254
|
}
|
|
255
|
+
const serializedStack = serializeStack(filterStack(stack));
|
|
256
|
+
const htmlSnippet = getHTMLSnippet(elementToInspect);
|
|
257
|
+
const payload = `## Referenced element
|
|
258
|
+
${htmlSnippet}
|
|
259
|
+
|
|
260
|
+
Import traces:
|
|
261
|
+
${serializedStack}
|
|
262
|
+
|
|
263
|
+
Page: ${window.location.href}`;
|
|
264
|
+
void copyToClipboard(payload);
|
|
101
265
|
});
|
|
102
266
|
}
|
|
103
267
|
};
|
|
@@ -121,6 +285,7 @@ var init = () => {
|
|
|
121
285
|
};
|
|
122
286
|
const hideOverlay = () => {
|
|
123
287
|
isActive = false;
|
|
288
|
+
isLocked = false;
|
|
124
289
|
if (overlay) {
|
|
125
290
|
overlay.style.display = "none";
|
|
126
291
|
}
|
|
@@ -133,7 +298,6 @@ var init = () => {
|
|
|
133
298
|
const handleKeyDown = (e) => {
|
|
134
299
|
if (e.metaKey && !metaKeyTimer && !isActive) {
|
|
135
300
|
metaKeyTimer = setTimeout(() => {
|
|
136
|
-
console.log("Meta key held for 750ms");
|
|
137
301
|
if (!isInsideInputOrTextarea()) {
|
|
138
302
|
showOverlay();
|
|
139
303
|
}
|
|
@@ -147,7 +311,7 @@ var init = () => {
|
|
|
147
311
|
clearTimeout(metaKeyTimer);
|
|
148
312
|
metaKeyTimer = null;
|
|
149
313
|
}
|
|
150
|
-
if (isActive) {
|
|
314
|
+
if (isActive && !isLocked) {
|
|
151
315
|
hideOverlay();
|
|
152
316
|
}
|
|
153
317
|
}
|
|
@@ -157,6 +321,7 @@ var init = () => {
|
|
|
157
321
|
document.addEventListener("mousemove", handleMouseMove);
|
|
158
322
|
document.addEventListener("mousedown", handleMouseDown, true);
|
|
159
323
|
document.addEventListener("click", handleClick, true);
|
|
324
|
+
window.addEventListener("focus", handleWindowFocus);
|
|
160
325
|
return () => {
|
|
161
326
|
if (metaKeyTimer) {
|
|
162
327
|
clearTimeout(metaKeyTimer);
|
|
@@ -172,9 +337,9 @@ var init = () => {
|
|
|
172
337
|
document.removeEventListener("mousemove", handleMouseMove);
|
|
173
338
|
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
174
339
|
document.removeEventListener("click", handleClick, true);
|
|
340
|
+
window.removeEventListener("focus", handleWindowFocus);
|
|
175
341
|
};
|
|
176
342
|
};
|
|
177
343
|
init();
|
|
178
344
|
|
|
179
|
-
exports.getReactData = getReactData;
|
|
180
345
|
exports.init = init;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import * as bippy from 'bippy';
|
|
2
|
-
|
|
3
|
-
interface StackItem {
|
|
4
|
-
componentName: string;
|
|
5
|
-
fileName: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
declare const getReactData: (element: Element) => Promise<{
|
|
8
|
-
fiber: bippy.Fiber;
|
|
9
|
-
stack: StackItem[];
|
|
10
|
-
} | null>;
|
|
11
1
|
declare const init: () => () => void;
|
|
12
2
|
|
|
13
|
-
export {
|
|
3
|
+
export { init };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import * as bippy from 'bippy';
|
|
2
|
-
|
|
3
|
-
interface StackItem {
|
|
4
|
-
componentName: string;
|
|
5
|
-
fileName: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
declare const getReactData: (element: Element) => Promise<{
|
|
8
|
-
fiber: bippy.Fiber;
|
|
9
|
-
stack: StackItem[];
|
|
10
|
-
} | null>;
|
|
11
1
|
declare const init: () => () => void;
|
|
12
2
|
|
|
13
|
-
export {
|
|
3
|
+
export { init };
|
package/dist/index.global.js
CHANGED
|
@@ -6,18 +6,25 @@ var ReactGrab=(function(exports){'use strict';/**
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
var me="0.3.28",
|
|
10
|
-
`).filter(
|
|
11
|
-
`).filter(p=>!p.match(Ze)),e).map(p=>{if(p.includes(" > eval")&&(p=p.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!p.includes("@")&&!p.includes(":"))return {function:p};{let C=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,d=p.match(C),s=d&&d[1]?d[1]:undefined,o=we(p.replace(C,""));return {function:s,file:o[0],line:o[1]?+o[1]:undefined,col:o[2]?+o[2]:undefined,raw:p}}})}var rt=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js"(n){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(a){if(0<=a&&a<e.length)return e[a];throw new TypeError("Must be between 0 and 63: "+a)},n.decode=function(a){var p=65,C=90,d=97,s=122,o=48,i=57,u=43,y=47,g=26,h=52;return p<=a&&a<=C?a-p:d<=a&&a<=s?a-d+g:o<=a&&a<=i?a-o+h:a==u?62:a==y?63:-1};}}),Oe=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js"(n){var e=rt(),a=5,p=1<<a,C=p-1,d=p;function s(i){return i<0?(-i<<1)+1:(i<<1)+0}function o(i){var u=(i&1)===1,y=i>>1;return u?-y:y}n.encode=function(u){var y="",g,h=s(u);do g=h&C,h>>>=a,h>0&&(g|=d),y+=e.encode(g);while(h>0);return y},n.decode=function(u,y,g){var h=u.length,r=0,l=0,c,v;do{if(y>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(v=e.decode(u.charCodeAt(y++)),v===-1)throw new Error("Invalid base64 digit: "+u.charAt(y-1));c=!!(v&d),v&=C,r=r+(v<<l),l+=a;}while(c);g.value=o(r),g.rest=y;};}}),H=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js"(n){function e(f,t,S){if(t in f)return f[t];if(arguments.length===3)return S;throw new Error('"'+t+'" is a required argument.')}n.getArg=e;var a=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,p=/^data:.+\,.+$/;function C(f){var t=f.match(a);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}n.urlParse=C;function d(f){var t="";return f.scheme&&(t+=f.scheme+":"),t+="//",f.auth&&(t+=f.auth+"@"),f.host&&(t+=f.host),f.port&&(t+=":"+f.port),f.path&&(t+=f.path),t}n.urlGenerate=d;var s=32;function o(f){var t=[];return function(S){for(var m=0;m<t.length;m++)if(t[m].input===S){var F=t[0];return t[0]=t[m],t[m]=F,t[0].result}var R=f(S);return t.unshift({input:S,result:R}),t.length>s&&t.pop(),R}}var i=o(function(t){var S=t,m=C(t);if(m){if(!m.path)return t;S=m.path;}for(var F=n.isAbsolute(S),R=[],A=0,L=0;;)if(A=L,L=S.indexOf("/",A),L===-1){R.push(S.slice(A));break}else for(R.push(S.slice(A,L));L<S.length&&S[L]==="/";)L++;for(var D,I=0,L=R.length-1;L>=0;L--)D=R[L],D==="."?R.splice(L,1):D===".."?I++:I>0&&(D===""?(R.splice(L+1,I),I=0):(R.splice(L,2),I--));return S=R.join("/"),S===""&&(S=F?"/":"."),m?(m.path=S,d(m)):S});n.normalize=i;function u(f,t){f===""&&(f="."),t===""&&(t=".");var S=C(t),m=C(f);if(m&&(f=m.path||"/"),S&&!S.scheme)return m&&(S.scheme=m.scheme),d(S);if(S||t.match(p))return t;if(m&&!m.host&&!m.path)return m.host=t,d(m);var F=t.charAt(0)==="/"?t:i(f.replace(/\/+$/,"")+"/"+t);return m?(m.path=F,d(m)):F}n.join=u,n.isAbsolute=function(f){return f.charAt(0)==="/"||a.test(f)};function y(f,t){f===""&&(f="."),f=f.replace(/\/$/,"");for(var S=0;t.indexOf(f+"/")!==0;){var m=f.lastIndexOf("/");if(m<0||(f=f.slice(0,m),f.match(/^([^\/]+:\/)?\/*$/)))return t;++S;}return Array(S+1).join("../")+t.substr(f.length+1)}n.relative=y;var g=function(){var f=Object.create(null);return !("__proto__"in f)}();function h(f){return f}function r(f){return c(f)?"$"+f:f}n.toSetString=g?h:r;function l(f){return c(f)?f.slice(1):f}n.fromSetString=g?h:l;function c(f){if(!f)return false;var t=f.length;if(t<9||f.charCodeAt(t-1)!==95||f.charCodeAt(t-2)!==95||f.charCodeAt(t-3)!==111||f.charCodeAt(t-4)!==116||f.charCodeAt(t-5)!==111||f.charCodeAt(t-6)!==114||f.charCodeAt(t-7)!==112||f.charCodeAt(t-8)!==95||f.charCodeAt(t-9)!==95)return false;for(var S=t-10;S>=0;S--)if(f.charCodeAt(S)!==36)return false;return true}function v(f,t,S){var m=w(f.source,t.source);return m!==0||(m=f.originalLine-t.originalLine,m!==0)||(m=f.originalColumn-t.originalColumn,m!==0||S)||(m=f.generatedColumn-t.generatedColumn,m!==0)||(m=f.generatedLine-t.generatedLine,m!==0)?m:w(f.name,t.name)}n.compareByOriginalPositions=v;function _(f,t,S){var m;return m=f.originalLine-t.originalLine,m!==0||(m=f.originalColumn-t.originalColumn,m!==0||S)||(m=f.generatedColumn-t.generatedColumn,m!==0)||(m=f.generatedLine-t.generatedLine,m!==0)?m:w(f.name,t.name)}n.compareByOriginalPositionsNoSource=_;function b(f,t,S){var m=f.generatedLine-t.generatedLine;return m!==0||(m=f.generatedColumn-t.generatedColumn,m!==0||S)||(m=w(f.source,t.source),m!==0)||(m=f.originalLine-t.originalLine,m!==0)||(m=f.originalColumn-t.originalColumn,m!==0)?m:w(f.name,t.name)}n.compareByGeneratedPositionsDeflated=b;function E(f,t,S){var m=f.generatedColumn-t.generatedColumn;return m!==0||S||(m=w(f.source,t.source),m!==0)||(m=f.originalLine-t.originalLine,m!==0)||(m=f.originalColumn-t.originalColumn,m!==0)?m:w(f.name,t.name)}n.compareByGeneratedPositionsDeflatedNoLine=E;function w(f,t){return f===t?0:f===null?1:t===null?-1:f>t?1:-1}function T(f,t){var S=f.generatedLine-t.generatedLine;return S!==0||(S=f.generatedColumn-t.generatedColumn,S!==0)||(S=w(f.source,t.source),S!==0)||(S=f.originalLine-t.originalLine,S!==0)||(S=f.originalColumn-t.originalColumn,S!==0)?S:w(f.name,t.name)}n.compareByGeneratedPositionsInflated=T;function O(f){return JSON.parse(f.replace(/^\)]}'[^\n]*\n/,""))}n.parseSourceMapInput=O;function M(f,t,S){if(t=t||"",f&&(f[f.length-1]!=="/"&&t[0]!=="/"&&(f+="/"),t=f+t),S){var m=C(S);if(!m)throw new Error("sourceMapURL could not be parsed");if(m.path){var F=m.path.lastIndexOf("/");F>=0&&(m.path=m.path.substring(0,F+1));}t=u(d(m),t);}return i(t)}n.computeSourceURL=M;}}),Re=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js"(n){var e=H(),a=Object.prototype.hasOwnProperty,p=typeof Map<"u";function C(){this._array=[],this._set=p?new Map:Object.create(null);}C.fromArray=function(s,o){for(var i=new C,u=0,y=s.length;u<y;u++)i.add(s[u],o);return i},C.prototype.size=function(){return p?this._set.size:Object.getOwnPropertyNames(this._set).length},C.prototype.add=function(s,o){var i=p?s:e.toSetString(s),u=p?this.has(s):a.call(this._set,i),y=this._array.length;(!u||o)&&this._array.push(s),u||(p?this._set.set(s,y):this._set[i]=y);},C.prototype.has=function(s){if(p)return this._set.has(s);var o=e.toSetString(s);return a.call(this._set,o)},C.prototype.indexOf=function(s){if(p){var o=this._set.get(s);if(o>=0)return o}else {var i=e.toSetString(s);if(a.call(this._set,i))return this._set[i]}throw new Error('"'+s+'" is not in the set.')},C.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},C.prototype.toArray=function(){return this._array.slice()},n.ArraySet=C;}}),ot=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js"(n){var e=H();function a(C,d){var s=C.generatedLine,o=d.generatedLine,i=C.generatedColumn,u=d.generatedColumn;return o>s||o==s&&u>=i||e.compareByGeneratedPositionsInflated(C,d)<=0}function p(){this._array=[],this._sorted=true,this._last={generatedLine:-1,generatedColumn:0};}p.prototype.unsortedForEach=function(d,s){this._array.forEach(d,s);},p.prototype.add=function(d){a(this._last,d)?(this._last=d,this._array.push(d)):(this._sorted=false,this._array.push(d));},p.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=true),this._array},n.MappingList=p;}}),Le=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js"(n){var e=Oe(),a=H(),p=Re().ArraySet,C=ot().MappingList;function d(s){s||(s={}),this._file=a.getArg(s,"file",null),this._sourceRoot=a.getArg(s,"sourceRoot",null),this._skipValidation=a.getArg(s,"skipValidation",false),this._ignoreInvalidMapping=a.getArg(s,"ignoreInvalidMapping",false),this._sources=new p,this._names=new p,this._mappings=new C,this._sourcesContents=null;}d.prototype._version=3,d.fromSourceMap=function(o,i){var u=o.sourceRoot,y=new d(Object.assign(i||{},{file:o.file,sourceRoot:u}));return o.eachMapping(function(g){var h={generated:{line:g.generatedLine,column:g.generatedColumn}};g.source!=null&&(h.source=g.source,u!=null&&(h.source=a.relative(u,h.source)),h.original={line:g.originalLine,column:g.originalColumn},g.name!=null&&(h.name=g.name)),y.addMapping(h);}),o.sources.forEach(function(g){var h=g;u!==null&&(h=a.relative(u,g)),y._sources.has(h)||y._sources.add(h);var r=o.sourceContentFor(g);r!=null&&y.setSourceContent(g,r);}),y},d.prototype.addMapping=function(o){var i=a.getArg(o,"generated"),u=a.getArg(o,"original",null),y=a.getArg(o,"source",null),g=a.getArg(o,"name",null);!this._skipValidation&&this._validateMapping(i,u,y,g)===false||(y!=null&&(y=String(y),this._sources.has(y)||this._sources.add(y)),g!=null&&(g=String(g),this._names.has(g)||this._names.add(g)),this._mappings.add({generatedLine:i.line,generatedColumn:i.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:y,name:g}));},d.prototype.setSourceContent=function(o,i){var u=o;this._sourceRoot!=null&&(u=a.relative(this._sourceRoot,u)),i!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[a.toSetString(u)]=i):this._sourcesContents&&(delete this._sourcesContents[a.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null));},d.prototype.applySourceMap=function(o,i,u){var y=i;if(i==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);y=o.file;}var g=this._sourceRoot;g!=null&&(y=a.relative(g,y));var h=new p,r=new p;this._mappings.unsortedForEach(function(l){if(l.source===y&&l.originalLine!=null){var c=o.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,u!=null&&(l.source=a.join(u,l.source)),g!=null&&(l.source=a.relative(g,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name));}var v=l.source;v!=null&&!h.has(v)&&h.add(v);var _=l.name;_!=null&&!r.has(_)&&r.add(_);},this),this._sources=h,this._names=r,o.sources.forEach(function(l){var c=o.sourceContentFor(l);c!=null&&(u!=null&&(l=a.join(u,l)),g!=null&&(l=a.relative(g,l)),this.setSourceContent(l,c));},this);},d.prototype._validateMapping=function(o,i,u,y){if(i&&typeof i.line!="number"&&typeof i.column!="number"){var g="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(g),false;throw new Error(g)}if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!i&&!u&&!y)){if(o&&"line"in o&&"column"in o&&i&&"line"in i&&"column"in i&&o.line>0&&o.column>=0&&i.line>0&&i.column>=0&&u)return;var g="Invalid mapping: "+JSON.stringify({generated:o,source:u,original:i,name:y});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(g),false;throw new Error(g)}},d.prototype._serializeMappings=function(){for(var o=0,i=1,u=0,y=0,g=0,h=0,r="",l,c,v,_,b=this._mappings.toArray(),E=0,w=b.length;E<w;E++){if(c=b[E],l="",c.generatedLine!==i)for(o=0;c.generatedLine!==i;)l+=";",i++;else if(E>0){if(!a.compareByGeneratedPositionsInflated(c,b[E-1]))continue;l+=",";}l+=e.encode(c.generatedColumn-o),o=c.generatedColumn,c.source!=null&&(_=this._sources.indexOf(c.source),l+=e.encode(_-h),h=_,l+=e.encode(c.originalLine-1-y),y=c.originalLine-1,l+=e.encode(c.originalColumn-u),u=c.originalColumn,c.name!=null&&(v=this._names.indexOf(c.name),l+=e.encode(v-g),g=v)),r+=l;}return r},d.prototype._generateSourcesContent=function(o,i){return o.map(function(u){if(!this._sourcesContents)return null;i!=null&&(u=a.relative(i,u));var y=a.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,y)?this._sourcesContents[y]:null},this)},d.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},d.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=d;}}),it=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js"(n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2;function e(a,p,C,d,s,o){var i=Math.floor((p-a)/2)+a,u=s(C,d[i],true);return u===0?i:u>0?p-i>1?e(i,p,C,d,s,o):o==n.LEAST_UPPER_BOUND?p<d.length?p:-1:i:i-a>1?e(a,i,C,d,s,o):o==n.LEAST_UPPER_BOUND?i:a<0?-1:a}n.search=function(p,C,d,s){if(C.length===0)return -1;var o=e(-1,C.length,p,C,d,s||n.GREATEST_LOWER_BOUND);if(o<0)return -1;for(;o-1>=0&&d(C[o],C[o-1],true)===0;)--o;return o};}}),st=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js"(n){function e(C){function d(i,u,y){var g=i[u];i[u]=i[y],i[y]=g;}function s(i,u){return Math.round(i+Math.random()*(u-i))}function o(i,u,y,g){if(y<g){var h=s(y,g),r=y-1;d(i,h,g);for(var l=i[g],c=y;c<g;c++)u(i[c],l,false)<=0&&(r+=1,d(i,r,c));d(i,r+1,c);var v=r+1;o(i,u,y,v-1),o(i,u,v+1,g);}}return o}function a(C){let d=e.toString();return new Function(`return ${d}`)()(C)}let p=new WeakMap;n.quickSort=function(C,d,s=0){let o=p.get(d);o===undefined&&(o=a(d),p.set(d,o)),o(C,d,s,C.length-1);};}}),at=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js"(n){var e=H(),a=it(),p=Re().ArraySet,C=Oe(),d=st().quickSort;function s(h,r){var l=h;return typeof h=="string"&&(l=e.parseSourceMapInput(h)),l.sections!=null?new g(l,r):new o(l,r)}s.fromSourceMap=function(h,r){return o.fromSourceMap(h,r)},s.prototype._version=3,s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),s.prototype._charIsMappingSeparator=function(r,l){var c=r.charAt(l);return c===";"||c===","},s.prototype._parseMappings=function(r,l){throw new Error("Subclasses must implement _parseMappings")},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2,s.prototype.eachMapping=function(r,l,c){var v=l||null,_=c||s.GENERATED_ORDER,b;switch(_){case s.GENERATED_ORDER:b=this._generatedMappings;break;case s.ORIGINAL_ORDER:b=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var E=this.sourceRoot,w=r.bind(v),T=this._names,O=this._sources,M=this._sourceMapURL,f=0,t=b.length;f<t;f++){var S=b[f],m=S.source===null?null:O.at(S.source);m!==null&&(m=e.computeSourceURL(E,m,M)),w({source:m,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:T.at(S.name)});}},s.prototype.allGeneratedPositionsFor=function(r){var l=e.getArg(r,"line"),c={source:e.getArg(r,"source"),originalLine:l,originalColumn:e.getArg(r,"column",0)};if(c.source=this._findSourceIndex(c.source),c.source<0)return [];var v=[],_=this._findMapping(c,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,a.LEAST_UPPER_BOUND);if(_>=0){var b=this._originalMappings[_];if(r.column===undefined)for(var E=b.originalLine;b&&b.originalLine===E;)v.push({line:e.getArg(b,"generatedLine",null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}),b=this._originalMappings[++_];else for(var w=b.originalColumn;b&&b.originalLine===l&&b.originalColumn==w;)v.push({line:e.getArg(b,"generatedLine",null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}),b=this._originalMappings[++_];}return v},n.SourceMapConsumer=s;function o(h,r){var l=h;typeof h=="string"&&(l=e.parseSourceMapInput(h));var c=e.getArg(l,"version"),v=e.getArg(l,"sources"),_=e.getArg(l,"names",[]),b=e.getArg(l,"sourceRoot",null),E=e.getArg(l,"sourcesContent",null),w=e.getArg(l,"mappings"),T=e.getArg(l,"file",null);if(c!=this._version)throw new Error("Unsupported version: "+c);b&&(b=e.normalize(b)),v=v.map(String).map(e.normalize).map(function(O){return b&&e.isAbsolute(b)&&e.isAbsolute(O)?e.relative(b,O):O}),this._names=p.fromArray(_.map(String),true),this._sources=p.fromArray(v,true),this._absoluteSources=this._sources.toArray().map(function(O){return e.computeSourceURL(b,O,r)}),this.sourceRoot=b,this.sourcesContent=E,this._mappings=w,this._sourceMapURL=r,this.file=T;}o.prototype=Object.create(s.prototype),o.prototype.consumer=s,o.prototype._findSourceIndex=function(h){var r=h;if(this.sourceRoot!=null&&(r=e.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);var l;for(l=0;l<this._absoluteSources.length;++l)if(this._absoluteSources[l]==h)return l;return -1},o.fromSourceMap=function(r,l){var c=Object.create(o.prototype),v=c._names=p.fromArray(r._names.toArray(),true),_=c._sources=p.fromArray(r._sources.toArray(),true);c.sourceRoot=r._sourceRoot,c.sourcesContent=r._generateSourcesContent(c._sources.toArray(),c.sourceRoot),c.file=r._file,c._sourceMapURL=l,c._absoluteSources=c._sources.toArray().map(function(t){return e.computeSourceURL(c.sourceRoot,t,l)});for(var b=r._mappings.toArray().slice(),E=c.__generatedMappings=[],w=c.__originalMappings=[],T=0,O=b.length;T<O;T++){var M=b[T],f=new i;f.generatedLine=M.generatedLine,f.generatedColumn=M.generatedColumn,M.source&&(f.source=_.indexOf(M.source),f.originalLine=M.originalLine,f.originalColumn=M.originalColumn,M.name&&(f.name=v.indexOf(M.name)),w.push(f)),E.push(f);}return d(c.__originalMappings,e.compareByOriginalPositions),c},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null;}let u=e.compareByGeneratedPositionsDeflatedNoLine;function y(h,r){let l=h.length,c=h.length-r;if(!(c<=1))if(c==2){let v=h[r],_=h[r+1];u(v,_)>0&&(h[r]=_,h[r+1]=v);}else if(c<20)for(let v=r;v<l;v++)for(let _=v;_>r;_--){let b=h[_-1],E=h[_];if(u(b,E)<=0)break;h[_-1]=E,h[_]=b;}else d(h,u,r);}o.prototype._parseMappings=function(r,l){var c=1,v=0,_=0,b=0,E=0,w=0,T=r.length,O=0,f={},t=[],S=[],m,R,A,L;let D=0;for(;O<T;)if(r.charAt(O)===";")c++,O++,v=0,y(S,D),D=S.length;else if(r.charAt(O)===",")O++;else {for(m=new i,m.generatedLine=c,A=O;A<T&&!this._charIsMappingSeparator(r,A);A++);for(r.slice(O,A),R=[];O<A;)C.decode(r,O,f),L=f.value,O=f.rest,R.push(L);if(R.length===2)throw new Error("Found a source, but no line and column");if(R.length===3)throw new Error("Found a source and line, but no column");if(m.generatedColumn=v+R[0],v=m.generatedColumn,R.length>1&&(m.source=E+R[1],E+=R[1],m.originalLine=_+R[2],_=m.originalLine,m.originalLine+=1,m.originalColumn=b+R[3],b=m.originalColumn,R.length>4&&(m.name=w+R[4],w+=R[4])),S.push(m),typeof m.originalLine=="number"){let x=m.source;for(;t.length<=x;)t.push(null);t[x]===null&&(t[x]=[]),t[x].push(m);}}y(S,D),this.__generatedMappings=S;for(var I=0;I<t.length;I++)t[I]!=null&&d(t[I],e.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...t);},o.prototype._findMapping=function(r,l,c,v,_,b){if(r[c]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+r[c]);if(r[v]<0)throw new TypeError("Column must be greater than or equal to 0, got "+r[v]);return a.search(r,l,_,b)},o.prototype.computeColumnSpans=function(){for(var r=0;r<this._generatedMappings.length;++r){var l=this._generatedMappings[r];if(r+1<this._generatedMappings.length){var c=this._generatedMappings[r+1];if(l.generatedLine===c.generatedLine){l.lastGeneratedColumn=c.generatedColumn-1;continue}}l.lastGeneratedColumn=1/0;}},o.prototype.originalPositionFor=function(r){var l={generatedLine:e.getArg(r,"line"),generatedColumn:e.getArg(r,"column")},c=this._findMapping(l,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(r,"bias",s.GREATEST_LOWER_BOUND));if(c>=0){var v=this._generatedMappings[c];if(v.generatedLine===l.generatedLine){var _=e.getArg(v,"source",null);_!==null&&(_=this._sources.at(_),_=e.computeSourceURL(this.sourceRoot,_,this._sourceMapURL));var b=e.getArg(v,"name",null);return b!==null&&(b=this._names.at(b)),{source:_,line:e.getArg(v,"originalLine",null),column:e.getArg(v,"originalColumn",null),name:b}}}return {source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(r){return r==null}):false},o.prototype.sourceContentFor=function(r,l){if(!this.sourcesContent)return null;var c=this._findSourceIndex(r);if(c>=0)return this.sourcesContent[c];var v=r;this.sourceRoot!=null&&(v=e.relative(this.sourceRoot,v));var _;if(this.sourceRoot!=null&&(_=e.urlParse(this.sourceRoot))){var b=v.replace(/^file:\/\//,"");if(_.scheme=="file"&&this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];if((!_.path||_.path=="/")&&this._sources.has("/"+v))return this.sourcesContent[this._sources.indexOf("/"+v)]}if(l)return null;throw new Error('"'+v+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(r){var l=e.getArg(r,"source");if(l=this._findSourceIndex(l),l<0)return {line:null,column:null,lastColumn:null};var c={source:l,originalLine:e.getArg(r,"line"),originalColumn:e.getArg(r,"column")},v=this._findMapping(c,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(r,"bias",s.GREATEST_LOWER_BOUND));if(v>=0){var _=this._originalMappings[v];if(_.source===c.source)return {line:e.getArg(_,"generatedLine",null),column:e.getArg(_,"generatedColumn",null),lastColumn:e.getArg(_,"lastGeneratedColumn",null)}}return {line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o;function g(h,r){var l=h;typeof h=="string"&&(l=e.parseSourceMapInput(h));var c=e.getArg(l,"version"),v=e.getArg(l,"sections");if(c!=this._version)throw new Error("Unsupported version: "+c);this._sources=new p,this._names=new p;var _={line:-1,column:0};this._sections=v.map(function(b){if(b.url)throw new Error("Support for url field in sections not implemented.");var E=e.getArg(b,"offset"),w=e.getArg(E,"line"),T=e.getArg(E,"column");if(w<_.line||w===_.line&&T<_.column)throw new Error("Section offsets must be ordered and non-overlapping.");return _=E,{generatedOffset:{generatedLine:w+1,generatedColumn:T+1},consumer:new s(e.getArg(b,"map"),r)}});}g.prototype=Object.create(s.prototype),g.prototype.constructor=s,g.prototype._version=3,Object.defineProperty(g.prototype,"sources",{get:function(){for(var h=[],r=0;r<this._sections.length;r++)for(var l=0;l<this._sections[r].consumer.sources.length;l++)h.push(this._sections[r].consumer.sources[l]);return h}}),g.prototype.originalPositionFor=function(r){var l={generatedLine:e.getArg(r,"line"),generatedColumn:e.getArg(r,"column")},c=a.search(l,this._sections,function(_,b){var E=_.generatedLine-b.generatedOffset.generatedLine;return E||_.generatedColumn-b.generatedOffset.generatedColumn}),v=this._sections[c];return v?v.consumer.originalPositionFor({line:l.generatedLine-(v.generatedOffset.generatedLine-1),column:l.generatedColumn-(v.generatedOffset.generatedLine===l.generatedLine?v.generatedOffset.generatedColumn-1:0),bias:r.bias}):{source:null,line:null,column:null,name:null}},g.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(r){return r.consumer.hasContentsOfAllSources()})},g.prototype.sourceContentFor=function(r,l){for(var c=0;c<this._sections.length;c++){var v=this._sections[c],_=v.consumer.sourceContentFor(r,true);if(_||_==="")return _}if(l)return null;throw new Error('"'+r+'" is not in the SourceMap.')},g.prototype.generatedPositionFor=function(r){for(var l=0;l<this._sections.length;l++){var c=this._sections[l];if(c.consumer._findSourceIndex(e.getArg(r,"source"))!==-1){var v=c.consumer.generatedPositionFor(r);if(v){var _={line:v.line+(c.generatedOffset.generatedLine-1),column:v.column+(c.generatedOffset.generatedLine===v.line?c.generatedOffset.generatedColumn-1:0)};return _}}}return {line:null,column:null}},g.prototype._parseMappings=function(r,l){this.__generatedMappings=[],this.__originalMappings=[];for(var c=0;c<this._sections.length;c++)for(var v=this._sections[c],_=v.consumer._generatedMappings,b=0;b<_.length;b++){var E=_[b],w=v.consumer._sources.at(E.source);w!==null&&(w=e.computeSourceURL(v.consumer.sourceRoot,w,this._sourceMapURL)),this._sources.add(w),w=this._sources.indexOf(w);var T=null;E.name&&(T=v.consumer._names.at(E.name),this._names.add(T),T=this._names.indexOf(T));var O={source:w,generatedLine:E.generatedLine+(v.generatedOffset.generatedLine-1),generatedColumn:E.generatedColumn+(v.generatedOffset.generatedLine===E.generatedLine?v.generatedOffset.generatedColumn-1:0),originalLine:E.originalLine,originalColumn:E.originalColumn,name:T};this.__generatedMappings.push(O),typeof O.originalLine=="number"&&this.__originalMappings.push(O);}d(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),d(this.__originalMappings,e.compareByOriginalPositions);},n.IndexedSourceMapConsumer=g;}}),lt=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js"(n){var e=Le().SourceMapGenerator,a=H(),p=/(\r?\n)/,C=10,d="$$$isSourceNode$$$";function s(o,i,u,y,g){this.children=[],this.sourceContents={},this.line=o??null,this.column=i??null,this.source=u??null,this.name=g??null,this[d]=true,y!=null&&this.add(y);}s.fromStringWithSourceMap=function(i,u,y){var g=new s,h=i.split(p),r=0,l=function(){var E=T(),w=T()||"";return E+w;function T(){return r<h.length?h[r++]:undefined}},c=1,v=0,_=null;return u.eachMapping(function(E){if(_!==null)if(c<E.generatedLine)b(_,l()),c++,v=0;else {var w=h[r]||"",T=w.substr(0,E.generatedColumn-v);h[r]=w.substr(E.generatedColumn-v),v=E.generatedColumn,b(_,T),_=E;return}for(;c<E.generatedLine;)g.add(l()),c++;if(v<E.generatedColumn){var w=h[r]||"";g.add(w.substr(0,E.generatedColumn)),h[r]=w.substr(E.generatedColumn),v=E.generatedColumn;}_=E;},this),r<h.length&&(_&&b(_,l()),g.add(h.splice(r).join(""))),u.sources.forEach(function(E){var w=u.sourceContentFor(E);w!=null&&(y!=null&&(E=a.join(y,E)),g.setSourceContent(E,w));}),g;function b(E,w){if(E===null||E.source===undefined)g.add(w);else {var T=y?a.join(y,E.source):E.source;g.add(new s(E.originalLine,E.originalColumn,T,w,E.name));}}},s.prototype.add=function(i){if(Array.isArray(i))i.forEach(function(u){this.add(u);},this);else if(i[d]||typeof i=="string")i&&this.children.push(i);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+i);return this},s.prototype.prepend=function(i){if(Array.isArray(i))for(var u=i.length-1;u>=0;u--)this.prepend(i[u]);else if(i[d]||typeof i=="string")this.children.unshift(i);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+i);return this},s.prototype.walk=function(i){for(var u,y=0,g=this.children.length;y<g;y++)u=this.children[y],u[d]?u.walk(i):u!==""&&i(u,{source:this.source,line:this.line,column:this.column,name:this.name});},s.prototype.join=function(i){var u,y,g=this.children.length;if(g>0){for(u=[],y=0;y<g-1;y++)u.push(this.children[y]),u.push(i);u.push(this.children[y]),this.children=u;}return this},s.prototype.replaceRight=function(i,u){var y=this.children[this.children.length-1];return y[d]?y.replaceRight(i,u):typeof y=="string"?this.children[this.children.length-1]=y.replace(i,u):this.children.push("".replace(i,u)),this},s.prototype.setSourceContent=function(i,u){this.sourceContents[a.toSetString(i)]=u;},s.prototype.walkSourceContents=function(i){for(var u=0,y=this.children.length;u<y;u++)this.children[u][d]&&this.children[u].walkSourceContents(i);for(var g=Object.keys(this.sourceContents),u=0,y=g.length;u<y;u++)i(a.fromSetString(g[u]),this.sourceContents[g[u]]);},s.prototype.toString=function(){var i="";return this.walk(function(u){i+=u;}),i},s.prototype.toStringWithSourceMap=function(i){var u={code:"",line:1,column:0},y=new e(i),g=false,h=null,r=null,l=null,c=null;return this.walk(function(v,_){u.code+=v,_.source!==null&&_.line!==null&&_.column!==null?((h!==_.source||r!==_.line||l!==_.column||c!==_.name)&&y.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:u.line,column:u.column},name:_.name}),h=_.source,r=_.line,l=_.column,c=_.name,g=true):g&&(y.addMapping({generated:{line:u.line,column:u.column}}),h=null,g=false);for(var b=0,E=v.length;b<E;b++)v.charCodeAt(b)===C?(u.line++,u.column=0,b+1===E?(h=null,g=false):g&&y.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:u.line,column:u.column},name:_.name})):u.column++;}),this.walkSourceContents(function(v,_){y.setSourceContent(v,_);}),{code:u.code,map:y}},n.SourceNode=s;}}),ut=N({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.js"(n){n.SourceMapGenerator=Le().SourceMapGenerator,n.SourceMapConsumer=at().SourceMapConsumer,n.SourceNode=lt().SourceNode;}}),ct=Je(ut()),ae=false,k=n=>`
|
|
12
|
-
in ${
|
|
13
|
-
`),
|
|
14
|
-
`),
|
|
15
|
-
`),
|
|
16
|
-
${
|
|
17
|
-
in ${
|
|
9
|
+
var me="0.3.28",q=`bippy-${me}`,fe=Object.defineProperty,He=Object.prototype.hasOwnProperty,H=()=>{},pe=t=>{try{Function.prototype.toString.call(t).indexOf("^_^")>-1&&setTimeout(()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},he=(t=j())=>"getFiberRoots"in t,ge=false,de,W=(t=j())=>ge?true:(typeof t.inject=="function"&&(de=t.inject.toString()),!!de?.includes("(injected)")),$=new Set,P=new Set,ve=t=>{let e=new Map,i=0,f={checkDCE:pe,supportsFiber:true,supportsFlight:true,hasUnsupportedRendererAttached:false,renderers:e,onCommitFiberRoot:H,onCommitFiberUnmount:H,onPostCommitFiberRoot:H,on:H,inject(C){let l=++i;return e.set(l,C),P.add(C),f._instrumentationIsActive||(f._instrumentationIsActive=true,$.forEach(r=>r())),l},_instrumentationSource:q,_instrumentationIsActive:false};try{fe(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{get(){return f},set(r){if(r&&typeof r=="object"){let o=f.renderers;f=r,o.size>0&&(o.forEach((s,c)=>{P.add(s),r.renderers.set(c,s);}),z(t));}},configurable:!0,enumerable:!0});let C=window.hasOwnProperty,l=!1;fe(window,"hasOwnProperty",{value:function(){try{if(!l&&arguments[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,l=!0,-0}catch{}return C.apply(this,arguments)},configurable:!0,writable:!0});}catch{z(t);}return f},z=t=>{try{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e)return;if(!e._instrumentationSource){if(e.checkDCE=pe,e.supportsFiber=!0,e.supportsFlight=!0,e.hasUnsupportedRendererAttached=!1,e._instrumentationSource=q,e._instrumentationIsActive=!1,e.on=H,e.renderers.size){e._instrumentationIsActive=!0,$.forEach(f=>f());return}let i=e.inject;W(e)&&!he()&&(ge=!0,e.inject({scheduleRefresh(){}})&&(e._instrumentationIsActive=!0)),e.inject=f=>{let C=i(f);return P.add(f),e._instrumentationIsActive=!0,$.forEach(l=>l()),C};}(e.renderers.size||e._instrumentationIsActive||W())&&t?.();}catch{}},_e=()=>He.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),j=t=>_e()?(z(t),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):ve(t),ye=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Ce=()=>{try{ye()&&j();}catch{}},Y=0,K=1;var Q=5;var X=11,J=13;var Z=15,ee=16;var te=19;var ne=26,re=27,oe=28,ie=30;var U=t=>{let e=t;return typeof e=="function"?e:typeof e=="object"&&e?U(e.type||e.render):null},B=t=>{let e=t;if(typeof e=="string")return e;if(typeof e!="function"&&!(typeof e=="object"&&e))return null;let i=e.displayName||e.name||null;if(i)return i;let f=U(e);return f&&(f.displayName||f.name)||null};var se=t=>{let e=j();for(let i of e.renderers.values())try{let f=i.findFiberByHostInstance?.(t);if(f)return f}catch{}if(typeof t=="object"&&t!=null){if("_reactRootContainer"in t)return t._reactRootContainer?._internalRoot?.current?.child;for(let i in t)if(i.startsWith("__reactContainer$")||i.startsWith("__reactInternalInstance$")||i.startsWith("__reactFiber"))return t[i]||null}return null};Ce();var Xe=Object.create,Se=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,be=Object.getOwnPropertyNames,Ze=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty,k=(t,e)=>function(){return e||(0, t[be(t)[0]])((e={exports:{}}).exports,e),e.exports},tt=(t,e,i,f)=>{if(e&&typeof e=="object"||typeof e=="function")for(var C=be(e),l=0,r=C.length,o;l<r;l++)o=C[l],!et.call(t,o)&&o!==i&&Se(t,o,{get:(s=>e[s]).bind(null,o),enumerable:!(f=Je(e,o))||f.enumerable});return t},nt=(t,e,i)=>(i=t!=null?Xe(Ze(t)):{},tt(Se(i,"default",{value:t,enumerable:true}),t)),Ee=/^\s*at .*(\S+:\d+|\(native\))/m,rt=/^(eval@)?(\[native code\])?$/;function ot(t,e){return t.match(Ee)?it(t,e):st(t,e)}function we(t){if(!t.includes(":"))return [t,undefined,undefined];let i=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return [i[1],i[2]||undefined,i[3]||undefined]}function Te(t,e){return e&&e.slice!=null?Array.isArray(e.slice)?t.slice(e.slice[0],e.slice[1]):t.slice(0,e.slice):t}function it(t,e){return Te(t.split(`
|
|
10
|
+
`).filter(f=>!!f.match(Ee)),e).map(f=>{f.includes("(eval ")&&(f=f.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let C=f.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),l=C.match(/ (\(.+\)$)/);C=l?C.replace(l[0],""):C;let r=we(l?l[1]:C),o=l&&C||undefined,s=["eval","<anonymous>"].includes(r[0])?undefined:r[0];return {function:o,file:s,line:r[1]?+r[1]:undefined,col:r[2]?+r[2]:undefined,raw:f}})}function st(t,e){return Te(t.split(`
|
|
11
|
+
`).filter(f=>!f.match(rt)),e).map(f=>{if(f.includes(" > eval")&&(f=f.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!f.includes("@")&&!f.includes(":"))return {function:f};{let C=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,l=f.match(C),r=l&&l[1]?l[1]:undefined,o=we(f.replace(C,""));return {function:r,file:o[0],line:o[1]?+o[1]:undefined,col:o[2]?+o[2]:undefined,raw:f}}})}var at=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js"(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(i){if(0<=i&&i<e.length)return e[i];throw new TypeError("Must be between 0 and 63: "+i)},t.decode=function(i){var f=65,C=90,l=97,r=122,o=48,s=57,c=43,g=47,m=26,p=52;return f<=i&&i<=C?i-f:l<=i&&i<=r?i-l+m:o<=i&&i<=s?i-o+p:i==c?62:i==g?63:-1};}}),Le=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js"(t){var e=at(),i=5,f=1<<i,C=f-1,l=f;function r(s){return s<0?(-s<<1)+1:(s<<1)+0}function o(s){var c=(s&1)===1,g=s>>1;return c?-g:g}t.encode=function(c){var g="",m,p=r(c);do m=p&C,p>>>=i,p>0&&(m|=l),g+=e.encode(m);while(p>0);return g},t.decode=function(c,g,m){var p=c.length,n=0,a=0,u,_;do{if(g>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(_=e.decode(c.charCodeAt(g++)),_===-1)throw new Error("Invalid base64 digit: "+c.charAt(g-1));u=!!(_&l),_&=C,n=n+(_<<a),a+=i;}while(u);m.value=o(n),m.rest=g;};}}),G=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js"(t){function e(d,h,S){if(h in d)return d[h];if(arguments.length===3)return S;throw new Error('"'+h+'" is a required argument.')}t.getArg=e;var i=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,f=/^data:.+\,.+$/;function C(d){var h=d.match(i);return h?{scheme:h[1],auth:h[2],host:h[3],port:h[4],path:h[5]}:null}t.urlParse=C;function l(d){var h="";return d.scheme&&(h+=d.scheme+":"),h+="//",d.auth&&(h+=d.auth+"@"),d.host&&(h+=d.host),d.port&&(h+=":"+d.port),d.path&&(h+=d.path),h}t.urlGenerate=l;var r=32;function o(d){var h=[];return function(S){for(var v=0;v<h.length;v++)if(h[v].input===S){var A=h[0];return h[0]=h[v],h[v]=A,h[0].result}var w=d(S);return h.unshift({input:S,result:w}),h.length>r&&h.pop(),w}}var s=o(function(h){var S=h,v=C(h);if(v){if(!v.path)return h;S=v.path;}for(var A=t.isAbsolute(S),w=[],L=0,M=0;;)if(L=M,M=S.indexOf("/",L),M===-1){w.push(S.slice(L));break}else for(w.push(S.slice(L,M));M<S.length&&S[M]==="/";)M++;for(var N,I=0,M=w.length-1;M>=0;M--)N=w[M],N==="."?w.splice(M,1):N===".."?I++:I>0&&(N===""?(w.splice(M+1,I),I=0):(w.splice(M,2),I--));return S=w.join("/"),S===""&&(S=A?"/":"."),v?(v.path=S,l(v)):S});t.normalize=s;function c(d,h){d===""&&(d="."),h===""&&(h=".");var S=C(h),v=C(d);if(v&&(d=v.path||"/"),S&&!S.scheme)return v&&(S.scheme=v.scheme),l(S);if(S||h.match(f))return h;if(v&&!v.host&&!v.path)return v.host=h,l(v);var A=h.charAt(0)==="/"?h:s(d.replace(/\/+$/,"")+"/"+h);return v?(v.path=A,l(v)):A}t.join=c,t.isAbsolute=function(d){return d.charAt(0)==="/"||i.test(d)};function g(d,h){d===""&&(d="."),d=d.replace(/\/$/,"");for(var S=0;h.indexOf(d+"/")!==0;){var v=d.lastIndexOf("/");if(v<0||(d=d.slice(0,v),d.match(/^([^\/]+:\/)?\/*$/)))return h;++S;}return Array(S+1).join("../")+h.substr(d.length+1)}t.relative=g;var m=function(){var d=Object.create(null);return !("__proto__"in d)}();function p(d){return d}function n(d){return u(d)?"$"+d:d}t.toSetString=m?p:n;function a(d){return u(d)?d.slice(1):d}t.fromSetString=m?p:a;function u(d){if(!d)return false;var h=d.length;if(h<9||d.charCodeAt(h-1)!==95||d.charCodeAt(h-2)!==95||d.charCodeAt(h-3)!==111||d.charCodeAt(h-4)!==116||d.charCodeAt(h-5)!==111||d.charCodeAt(h-6)!==114||d.charCodeAt(h-7)!==112||d.charCodeAt(h-8)!==95||d.charCodeAt(h-9)!==95)return false;for(var S=h-10;S>=0;S--)if(d.charCodeAt(S)!==36)return false;return true}function _(d,h,S){var v=T(d.source,h.source);return v!==0||(v=d.originalLine-h.originalLine,v!==0)||(v=d.originalColumn-h.originalColumn,v!==0||S)||(v=d.generatedColumn-h.generatedColumn,v!==0)||(v=d.generatedLine-h.generatedLine,v!==0)?v:T(d.name,h.name)}t.compareByOriginalPositions=_;function y(d,h,S){var v;return v=d.originalLine-h.originalLine,v!==0||(v=d.originalColumn-h.originalColumn,v!==0||S)||(v=d.generatedColumn-h.generatedColumn,v!==0)||(v=d.generatedLine-h.generatedLine,v!==0)?v:T(d.name,h.name)}t.compareByOriginalPositionsNoSource=y;function b(d,h,S){var v=d.generatedLine-h.generatedLine;return v!==0||(v=d.generatedColumn-h.generatedColumn,v!==0||S)||(v=T(d.source,h.source),v!==0)||(v=d.originalLine-h.originalLine,v!==0)||(v=d.originalColumn-h.originalColumn,v!==0)?v:T(d.name,h.name)}t.compareByGeneratedPositionsDeflated=b;function E(d,h,S){var v=d.generatedColumn-h.generatedColumn;return v!==0||S||(v=T(d.source,h.source),v!==0)||(v=d.originalLine-h.originalLine,v!==0)||(v=d.originalColumn-h.originalColumn,v!==0)?v:T(d.name,h.name)}t.compareByGeneratedPositionsDeflatedNoLine=E;function T(d,h){return d===h?0:d===null?1:h===null?-1:d>h?1:-1}function O(d,h){var S=d.generatedLine-h.generatedLine;return S!==0||(S=d.generatedColumn-h.generatedColumn,S!==0)||(S=T(d.source,h.source),S!==0)||(S=d.originalLine-h.originalLine,S!==0)||(S=d.originalColumn-h.originalColumn,S!==0)?S:T(d.name,h.name)}t.compareByGeneratedPositionsInflated=O;function R(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=R;function F(d,h,S){if(h=h||"",d&&(d[d.length-1]!=="/"&&h[0]!=="/"&&(d+="/"),h=d+h),S){var v=C(S);if(!v)throw new Error("sourceMapURL could not be parsed");if(v.path){var A=v.path.lastIndexOf("/");A>=0&&(v.path=v.path.substring(0,A+1));}h=c(l(v),h);}return s(h)}t.computeSourceURL=F;}}),Oe=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js"(t){var e=G(),i=Object.prototype.hasOwnProperty,f=typeof Map<"u";function C(){this._array=[],this._set=f?new Map:Object.create(null);}C.fromArray=function(r,o){for(var s=new C,c=0,g=r.length;c<g;c++)s.add(r[c],o);return s},C.prototype.size=function(){return f?this._set.size:Object.getOwnPropertyNames(this._set).length},C.prototype.add=function(r,o){var s=f?r:e.toSetString(r),c=f?this.has(r):i.call(this._set,s),g=this._array.length;(!c||o)&&this._array.push(r),c||(f?this._set.set(r,g):this._set[s]=g);},C.prototype.has=function(r){if(f)return this._set.has(r);var o=e.toSetString(r);return i.call(this._set,o)},C.prototype.indexOf=function(r){if(f){var o=this._set.get(r);if(o>=0)return o}else {var s=e.toSetString(r);if(i.call(this._set,s))return this._set[s]}throw new Error('"'+r+'" is not in the set.')},C.prototype.at=function(r){if(r>=0&&r<this._array.length)return this._array[r];throw new Error("No element indexed by "+r)},C.prototype.toArray=function(){return this._array.slice()},t.ArraySet=C;}}),lt=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js"(t){var e=G();function i(C,l){var r=C.generatedLine,o=l.generatedLine,s=C.generatedColumn,c=l.generatedColumn;return o>r||o==r&&c>=s||e.compareByGeneratedPositionsInflated(C,l)<=0}function f(){this._array=[],this._sorted=true,this._last={generatedLine:-1,generatedColumn:0};}f.prototype.unsortedForEach=function(l,r){this._array.forEach(l,r);},f.prototype.add=function(l){i(this._last,l)?(this._last=l,this._array.push(l)):(this._sorted=false,this._array.push(l));},f.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=true),this._array},t.MappingList=f;}}),Re=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js"(t){var e=Le(),i=G(),f=Oe().ArraySet,C=lt().MappingList;function l(r){r||(r={}),this._file=i.getArg(r,"file",null),this._sourceRoot=i.getArg(r,"sourceRoot",null),this._skipValidation=i.getArg(r,"skipValidation",false),this._ignoreInvalidMapping=i.getArg(r,"ignoreInvalidMapping",false),this._sources=new f,this._names=new f,this._mappings=new C,this._sourcesContents=null;}l.prototype._version=3,l.fromSourceMap=function(o,s){var c=o.sourceRoot,g=new l(Object.assign(s||{},{file:o.file,sourceRoot:c}));return o.eachMapping(function(m){var p={generated:{line:m.generatedLine,column:m.generatedColumn}};m.source!=null&&(p.source=m.source,c!=null&&(p.source=i.relative(c,p.source)),p.original={line:m.originalLine,column:m.originalColumn},m.name!=null&&(p.name=m.name)),g.addMapping(p);}),o.sources.forEach(function(m){var p=m;c!==null&&(p=i.relative(c,m)),g._sources.has(p)||g._sources.add(p);var n=o.sourceContentFor(m);n!=null&&g.setSourceContent(m,n);}),g},l.prototype.addMapping=function(o){var s=i.getArg(o,"generated"),c=i.getArg(o,"original",null),g=i.getArg(o,"source",null),m=i.getArg(o,"name",null);!this._skipValidation&&this._validateMapping(s,c,g,m)===false||(g!=null&&(g=String(g),this._sources.has(g)||this._sources.add(g)),m!=null&&(m=String(m),this._names.has(m)||this._names.add(m)),this._mappings.add({generatedLine:s.line,generatedColumn:s.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:g,name:m}));},l.prototype.setSourceContent=function(o,s){var c=o;this._sourceRoot!=null&&(c=i.relative(this._sourceRoot,c)),s!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(c)]=s):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null));},l.prototype.applySourceMap=function(o,s,c){var g=s;if(s==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);g=o.file;}var m=this._sourceRoot;m!=null&&(g=i.relative(m,g));var p=new f,n=new f;this._mappings.unsortedForEach(function(a){if(a.source===g&&a.originalLine!=null){var u=o.originalPositionFor({line:a.originalLine,column:a.originalColumn});u.source!=null&&(a.source=u.source,c!=null&&(a.source=i.join(c,a.source)),m!=null&&(a.source=i.relative(m,a.source)),a.originalLine=u.line,a.originalColumn=u.column,u.name!=null&&(a.name=u.name));}var _=a.source;_!=null&&!p.has(_)&&p.add(_);var y=a.name;y!=null&&!n.has(y)&&n.add(y);},this),this._sources=p,this._names=n,o.sources.forEach(function(a){var u=o.sourceContentFor(a);u!=null&&(c!=null&&(a=i.join(c,a)),m!=null&&(a=i.relative(m,a)),this.setSourceContent(a,u));},this);},l.prototype._validateMapping=function(o,s,c,g){if(s&&typeof s.line!="number"&&typeof s.column!="number"){var m="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(m),false;throw new Error(m)}if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!s&&!c&&!g)){if(o&&"line"in o&&"column"in o&&s&&"line"in s&&"column"in s&&o.line>0&&o.column>=0&&s.line>0&&s.column>=0&&c)return;var m="Invalid mapping: "+JSON.stringify({generated:o,source:c,original:s,name:g});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(m),false;throw new Error(m)}},l.prototype._serializeMappings=function(){for(var o=0,s=1,c=0,g=0,m=0,p=0,n="",a,u,_,y,b=this._mappings.toArray(),E=0,T=b.length;E<T;E++){if(u=b[E],a="",u.generatedLine!==s)for(o=0;u.generatedLine!==s;)a+=";",s++;else if(E>0){if(!i.compareByGeneratedPositionsInflated(u,b[E-1]))continue;a+=",";}a+=e.encode(u.generatedColumn-o),o=u.generatedColumn,u.source!=null&&(y=this._sources.indexOf(u.source),a+=e.encode(y-p),p=y,a+=e.encode(u.originalLine-1-g),g=u.originalLine-1,a+=e.encode(u.originalColumn-c),c=u.originalColumn,u.name!=null&&(_=this._names.indexOf(u.name),a+=e.encode(_-m),m=_)),n+=a;}return n},l.prototype._generateSourcesContent=function(o,s){return o.map(function(c){if(!this._sourcesContents)return null;s!=null&&(c=i.relative(s,c));var g=i.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,g)?this._sourcesContents[g]:null},this)},l.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},l.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=l;}}),ut=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js"(t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2;function e(i,f,C,l,r,o){var s=Math.floor((f-i)/2)+i,c=r(C,l[s],true);return c===0?s:c>0?f-s>1?e(s,f,C,l,r,o):o==t.LEAST_UPPER_BOUND?f<l.length?f:-1:s:s-i>1?e(i,s,C,l,r,o):o==t.LEAST_UPPER_BOUND?s:i<0?-1:i}t.search=function(f,C,l,r){if(C.length===0)return -1;var o=e(-1,C.length,f,C,l,r||t.GREATEST_LOWER_BOUND);if(o<0)return -1;for(;o-1>=0&&l(C[o],C[o-1],true)===0;)--o;return o};}}),ct=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js"(t){function e(C){function l(s,c,g){var m=s[c];s[c]=s[g],s[g]=m;}function r(s,c){return Math.round(s+Math.random()*(c-s))}function o(s,c,g,m){if(g<m){var p=r(g,m),n=g-1;l(s,p,m);for(var a=s[m],u=g;u<m;u++)c(s[u],a,false)<=0&&(n+=1,l(s,n,u));l(s,n+1,u);var _=n+1;o(s,c,g,_-1),o(s,c,_+1,m);}}return o}function i(C){let l=e.toString();return new Function(`return ${l}`)()(C)}let f=new WeakMap;t.quickSort=function(C,l,r=0){let o=f.get(l);o===undefined&&(o=i(l),f.set(l,o)),o(C,l,r,C.length-1);};}}),ft=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js"(t){var e=G(),i=ut(),f=Oe().ArraySet,C=Le(),l=ct().quickSort;function r(p,n){var a=p;return typeof p=="string"&&(a=e.parseSourceMapInput(p)),a.sections!=null?new m(a,n):new o(a,n)}r.fromSourceMap=function(p,n){return o.fromSourceMap(p,n)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(n,a){var u=n.charAt(a);return u===";"||u===","},r.prototype._parseMappings=function(n,a){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(n,a,u){var _=a||null,y=u||r.GENERATED_ORDER,b;switch(y){case r.GENERATED_ORDER:b=this._generatedMappings;break;case r.ORIGINAL_ORDER:b=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var E=this.sourceRoot,T=n.bind(_),O=this._names,R=this._sources,F=this._sourceMapURL,d=0,h=b.length;d<h;d++){var S=b[d],v=S.source===null?null:R.at(S.source);v!==null&&(v=e.computeSourceURL(E,v,F)),T({source:v,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:O.at(S.name)});}},r.prototype.allGeneratedPositionsFor=function(n){var a=e.getArg(n,"line"),u={source:e.getArg(n,"source"),originalLine:a,originalColumn:e.getArg(n,"column",0)};if(u.source=this._findSourceIndex(u.source),u.source<0)return [];var _=[],y=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(y>=0){var b=this._originalMappings[y];if(n.column===undefined)for(var E=b.originalLine;b&&b.originalLine===E;)_.push({line:e.getArg(b,"generatedLine",null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}),b=this._originalMappings[++y];else for(var T=b.originalColumn;b&&b.originalLine===a&&b.originalColumn==T;)_.push({line:e.getArg(b,"generatedLine",null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}),b=this._originalMappings[++y];}return _},t.SourceMapConsumer=r;function o(p,n){var a=p;typeof p=="string"&&(a=e.parseSourceMapInput(p));var u=e.getArg(a,"version"),_=e.getArg(a,"sources"),y=e.getArg(a,"names",[]),b=e.getArg(a,"sourceRoot",null),E=e.getArg(a,"sourcesContent",null),T=e.getArg(a,"mappings"),O=e.getArg(a,"file",null);if(u!=this._version)throw new Error("Unsupported version: "+u);b&&(b=e.normalize(b)),_=_.map(String).map(e.normalize).map(function(R){return b&&e.isAbsolute(b)&&e.isAbsolute(R)?e.relative(b,R):R}),this._names=f.fromArray(y.map(String),true),this._sources=f.fromArray(_,true),this._absoluteSources=this._sources.toArray().map(function(R){return e.computeSourceURL(b,R,n)}),this.sourceRoot=b,this.sourcesContent=E,this._mappings=T,this._sourceMapURL=n,this.file=O;}o.prototype=Object.create(r.prototype),o.prototype.consumer=r,o.prototype._findSourceIndex=function(p){var n=p;if(this.sourceRoot!=null&&(n=e.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var a;for(a=0;a<this._absoluteSources.length;++a)if(this._absoluteSources[a]==p)return a;return -1},o.fromSourceMap=function(n,a){var u=Object.create(o.prototype),_=u._names=f.fromArray(n._names.toArray(),true),y=u._sources=f.fromArray(n._sources.toArray(),true);u.sourceRoot=n._sourceRoot,u.sourcesContent=n._generateSourcesContent(u._sources.toArray(),u.sourceRoot),u.file=n._file,u._sourceMapURL=a,u._absoluteSources=u._sources.toArray().map(function(h){return e.computeSourceURL(u.sourceRoot,h,a)});for(var b=n._mappings.toArray().slice(),E=u.__generatedMappings=[],T=u.__originalMappings=[],O=0,R=b.length;O<R;O++){var F=b[O],d=new s;d.generatedLine=F.generatedLine,d.generatedColumn=F.generatedColumn,F.source&&(d.source=y.indexOf(F.source),d.originalLine=F.originalLine,d.originalColumn=F.originalColumn,F.name&&(d.name=_.indexOf(F.name)),T.push(d)),E.push(d);}return l(u.__originalMappings,e.compareByOriginalPositions),u},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null;}let c=e.compareByGeneratedPositionsDeflatedNoLine;function g(p,n){let a=p.length,u=p.length-n;if(!(u<=1))if(u==2){let _=p[n],y=p[n+1];c(_,y)>0&&(p[n]=y,p[n+1]=_);}else if(u<20)for(let _=n;_<a;_++)for(let y=_;y>n;y--){let b=p[y-1],E=p[y];if(c(b,E)<=0)break;p[y-1]=E,p[y]=b;}else l(p,c,n);}o.prototype._parseMappings=function(n,a){var u=1,_=0,y=0,b=0,E=0,T=0,O=n.length,R=0,d={},h=[],S=[],v,w,L,M;let N=0;for(;R<O;)if(n.charAt(R)===";")u++,R++,_=0,g(S,N),N=S.length;else if(n.charAt(R)===",")R++;else {for(v=new s,v.generatedLine=u,L=R;L<O&&!this._charIsMappingSeparator(n,L);L++);for(n.slice(R,L),w=[];R<L;)C.decode(n,R,d),M=d.value,R=d.rest,w.push(M);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");if(v.generatedColumn=_+w[0],_=v.generatedColumn,w.length>1&&(v.source=E+w[1],E+=w[1],v.originalLine=y+w[2],y=v.originalLine,v.originalLine+=1,v.originalColumn=b+w[3],b=v.originalColumn,w.length>4&&(v.name=T+w[4],T+=w[4])),S.push(v),typeof v.originalLine=="number"){let x=v.source;for(;h.length<=x;)h.push(null);h[x]===null&&(h[x]=[]),h[x].push(v);}}g(S,N),this.__generatedMappings=S;for(var I=0;I<h.length;I++)h[I]!=null&&l(h[I],e.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...h);},o.prototype._findMapping=function(n,a,u,_,y,b){if(n[u]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[u]);if(n[_]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[_]);return i.search(n,a,y,b)},o.prototype.computeColumnSpans=function(){for(var n=0;n<this._generatedMappings.length;++n){var a=this._generatedMappings[n];if(n+1<this._generatedMappings.length){var u=this._generatedMappings[n+1];if(a.generatedLine===u.generatedLine){a.lastGeneratedColumn=u.generatedColumn-1;continue}}a.lastGeneratedColumn=1/0;}},o.prototype.originalPositionFor=function(n){var a={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},u=this._findMapping(a,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(n,"bias",r.GREATEST_LOWER_BOUND));if(u>=0){var _=this._generatedMappings[u];if(_.generatedLine===a.generatedLine){var y=e.getArg(_,"source",null);y!==null&&(y=this._sources.at(y),y=e.computeSourceURL(this.sourceRoot,y,this._sourceMapURL));var b=e.getArg(_,"name",null);return b!==null&&(b=this._names.at(b)),{source:y,line:e.getArg(_,"originalLine",null),column:e.getArg(_,"originalColumn",null),name:b}}}return {source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):false},o.prototype.sourceContentFor=function(n,a){if(!this.sourcesContent)return null;var u=this._findSourceIndex(n);if(u>=0)return this.sourcesContent[u];var _=n;this.sourceRoot!=null&&(_=e.relative(this.sourceRoot,_));var y;if(this.sourceRoot!=null&&(y=e.urlParse(this.sourceRoot))){var b=_.replace(/^file:\/\//,"");if(y.scheme=="file"&&this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];if((!y.path||y.path=="/")&&this._sources.has("/"+_))return this.sourcesContent[this._sources.indexOf("/"+_)]}if(a)return null;throw new Error('"'+_+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(n){var a=e.getArg(n,"source");if(a=this._findSourceIndex(a),a<0)return {line:null,column:null,lastColumn:null};var u={source:a,originalLine:e.getArg(n,"line"),originalColumn:e.getArg(n,"column")},_=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(n,"bias",r.GREATEST_LOWER_BOUND));if(_>=0){var y=this._originalMappings[_];if(y.source===u.source)return {line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}}return {line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=o;function m(p,n){var a=p;typeof p=="string"&&(a=e.parseSourceMapInput(p));var u=e.getArg(a,"version"),_=e.getArg(a,"sections");if(u!=this._version)throw new Error("Unsupported version: "+u);this._sources=new f,this._names=new f;var y={line:-1,column:0};this._sections=_.map(function(b){if(b.url)throw new Error("Support for url field in sections not implemented.");var E=e.getArg(b,"offset"),T=e.getArg(E,"line"),O=e.getArg(E,"column");if(T<y.line||T===y.line&&O<y.column)throw new Error("Section offsets must be ordered and non-overlapping.");return y=E,{generatedOffset:{generatedLine:T+1,generatedColumn:O+1},consumer:new r(e.getArg(b,"map"),n)}});}m.prototype=Object.create(r.prototype),m.prototype.constructor=r,m.prototype._version=3,Object.defineProperty(m.prototype,"sources",{get:function(){for(var p=[],n=0;n<this._sections.length;n++)for(var a=0;a<this._sections[n].consumer.sources.length;a++)p.push(this._sections[n].consumer.sources[a]);return p}}),m.prototype.originalPositionFor=function(n){var a={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},u=i.search(a,this._sections,function(y,b){var E=y.generatedLine-b.generatedOffset.generatedLine;return E||y.generatedColumn-b.generatedOffset.generatedColumn}),_=this._sections[u];return _?_.consumer.originalPositionFor({line:a.generatedLine-(_.generatedOffset.generatedLine-1),column:a.generatedColumn-(_.generatedOffset.generatedLine===a.generatedLine?_.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}},m.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})},m.prototype.sourceContentFor=function(n,a){for(var u=0;u<this._sections.length;u++){var _=this._sections[u],y=_.consumer.sourceContentFor(n,true);if(y||y==="")return y}if(a)return null;throw new Error('"'+n+'" is not in the SourceMap.')},m.prototype.generatedPositionFor=function(n){for(var a=0;a<this._sections.length;a++){var u=this._sections[a];if(u.consumer._findSourceIndex(e.getArg(n,"source"))!==-1){var _=u.consumer.generatedPositionFor(n);if(_){var y={line:_.line+(u.generatedOffset.generatedLine-1),column:_.column+(u.generatedOffset.generatedLine===_.line?u.generatedOffset.generatedColumn-1:0)};return y}}}return {line:null,column:null}},m.prototype._parseMappings=function(n,a){this.__generatedMappings=[],this.__originalMappings=[];for(var u=0;u<this._sections.length;u++)for(var _=this._sections[u],y=_.consumer._generatedMappings,b=0;b<y.length;b++){var E=y[b],T=_.consumer._sources.at(E.source);T!==null&&(T=e.computeSourceURL(_.consumer.sourceRoot,T,this._sourceMapURL)),this._sources.add(T),T=this._sources.indexOf(T);var O=null;E.name&&(O=_.consumer._names.at(E.name),this._names.add(O),O=this._names.indexOf(O));var R={source:T,generatedLine:E.generatedLine+(_.generatedOffset.generatedLine-1),generatedColumn:E.generatedColumn+(_.generatedOffset.generatedLine===E.generatedLine?_.generatedOffset.generatedColumn-1:0),originalLine:E.originalLine,originalColumn:E.originalColumn,name:O};this.__generatedMappings.push(R),typeof R.originalLine=="number"&&this.__originalMappings.push(R);}l(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),l(this.__originalMappings,e.compareByOriginalPositions);},t.IndexedSourceMapConsumer=m;}}),dt=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js"(t){var e=Re().SourceMapGenerator,i=G(),f=/(\r?\n)/,C=10,l="$$$isSourceNode$$$";function r(o,s,c,g,m){this.children=[],this.sourceContents={},this.line=o??null,this.column=s??null,this.source=c??null,this.name=m??null,this[l]=true,g!=null&&this.add(g);}r.fromStringWithSourceMap=function(s,c,g){var m=new r,p=s.split(f),n=0,a=function(){var E=O(),T=O()||"";return E+T;function O(){return n<p.length?p[n++]:undefined}},u=1,_=0,y=null;return c.eachMapping(function(E){if(y!==null)if(u<E.generatedLine)b(y,a()),u++,_=0;else {var T=p[n]||"",O=T.substr(0,E.generatedColumn-_);p[n]=T.substr(E.generatedColumn-_),_=E.generatedColumn,b(y,O),y=E;return}for(;u<E.generatedLine;)m.add(a()),u++;if(_<E.generatedColumn){var T=p[n]||"";m.add(T.substr(0,E.generatedColumn)),p[n]=T.substr(E.generatedColumn),_=E.generatedColumn;}y=E;},this),n<p.length&&(y&&b(y,a()),m.add(p.splice(n).join(""))),c.sources.forEach(function(E){var T=c.sourceContentFor(E);T!=null&&(g!=null&&(E=i.join(g,E)),m.setSourceContent(E,T));}),m;function b(E,T){if(E===null||E.source===undefined)m.add(T);else {var O=g?i.join(g,E.source):E.source;m.add(new r(E.originalLine,E.originalColumn,O,T,E.name));}}},r.prototype.add=function(s){if(Array.isArray(s))s.forEach(function(c){this.add(c);},this);else if(s[l]||typeof s=="string")s&&this.children.push(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this},r.prototype.prepend=function(s){if(Array.isArray(s))for(var c=s.length-1;c>=0;c--)this.prepend(s[c]);else if(s[l]||typeof s=="string")this.children.unshift(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this},r.prototype.walk=function(s){for(var c,g=0,m=this.children.length;g<m;g++)c=this.children[g],c[l]?c.walk(s):c!==""&&s(c,{source:this.source,line:this.line,column:this.column,name:this.name});},r.prototype.join=function(s){var c,g,m=this.children.length;if(m>0){for(c=[],g=0;g<m-1;g++)c.push(this.children[g]),c.push(s);c.push(this.children[g]),this.children=c;}return this},r.prototype.replaceRight=function(s,c){var g=this.children[this.children.length-1];return g[l]?g.replaceRight(s,c):typeof g=="string"?this.children[this.children.length-1]=g.replace(s,c):this.children.push("".replace(s,c)),this},r.prototype.setSourceContent=function(s,c){this.sourceContents[i.toSetString(s)]=c;},r.prototype.walkSourceContents=function(s){for(var c=0,g=this.children.length;c<g;c++)this.children[c][l]&&this.children[c].walkSourceContents(s);for(var m=Object.keys(this.sourceContents),c=0,g=m.length;c<g;c++)s(i.fromSetString(m[c]),this.sourceContents[m[c]]);},r.prototype.toString=function(){var s="";return this.walk(function(c){s+=c;}),s},r.prototype.toStringWithSourceMap=function(s){var c={code:"",line:1,column:0},g=new e(s),m=false,p=null,n=null,a=null,u=null;return this.walk(function(_,y){c.code+=_,y.source!==null&&y.line!==null&&y.column!==null?((p!==y.source||n!==y.line||a!==y.column||u!==y.name)&&g.addMapping({source:y.source,original:{line:y.line,column:y.column},generated:{line:c.line,column:c.column},name:y.name}),p=y.source,n=y.line,a=y.column,u=y.name,m=true):m&&(g.addMapping({generated:{line:c.line,column:c.column}}),p=null,m=false);for(var b=0,E=_.length;b<E;b++)_.charCodeAt(b)===C?(c.line++,c.column=0,b+1===E?(p=null,m=false):m&&g.addMapping({source:y.source,original:{line:y.line,column:y.column},generated:{line:c.line,column:c.column},name:y.name})):c.column++;}),this.walkSourceContents(function(_,y){g.setSourceContent(_,y);}),{code:c.code,map:g}},t.SourceNode=r;}}),mt=k({"../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.js"(t){t.SourceMapGenerator=Re().SourceMapGenerator,t.SourceMapConsumer=ft().SourceMapConsumer,t.SourceNode=dt().SourceNode;}}),pt=nt(mt()),ae=false,D=t=>`
|
|
12
|
+
in ${t}`,ht=/^data:application\/json[^,]+base64,/,gt=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Me=async(t,e)=>{let i=e.split(`
|
|
13
|
+
`),f;for(let r=i.length-1;r>=0&&!f;r--){let o=i[r].match(gt);o&&(f=o[1]);}if(!f)return null;if(!(ht.test(f)||f.startsWith("/"))){let r=t.split("/");r[r.length-1]=f,f=r.join("/");}let l=await(await fetch(f)).json();return new pt.SourceMapConsumer(l)},Fe=async(t,e)=>{let i=ot(t);if(!i.length)return [];let f=i.slice(0,e);return (await Promise.all(f.map(async({file:l,line:r,col:o=0})=>{if(!l||!r)return null;try{let s=await fetch(l);if(s.ok){let c=await s.text(),g=await Me(l,c);if(g){let m=g.originalPositionFor({line:r,column:o});return {fileName:(g.file||m.source).replace(/^file:\/\//,""),lineNumber:m.line,columnNumber:m.column}}}return {fileName:l.replace(/^file:\/\//,""),lineNumber:r,columnNumber:o}}catch{return {fileName:l.replace(/^file:\/\//,""),lineNumber:r,columnNumber:o}}}))).filter(l=>l!==null)},V=(t,e)=>{if(!t||ae)return "";let i=Error.prepareStackTrace;Error.prepareStackTrace=undefined,ae=true;let f=Ae();le(null);let C=console.error,l=console.warn;console.error=()=>{},console.warn=()=>{};try{let s={DetermineComponentFrameRoot(){let p;try{if(e){let n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[]);}catch(a){p=a;}Reflect.construct(t,[],n);}else {try{n.call();}catch(a){p=a;}t.call(n.prototype);}}else {try{throw Error()}catch(a){p=a;}let n=t();n&&typeof n.catch=="function"&&n.catch(()=>{});}}catch(n){if(n&&p&&typeof n.stack=="string")return [n.stack,p.stack]}return [null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[g,m]=s.DetermineComponentFrameRoot();if(g&&m){let p=g.split(`
|
|
14
|
+
`),n=m.split(`
|
|
15
|
+
`),a=0,u=0;for(;a<p.length&&!p[a].includes("DetermineComponentFrameRoot");)a++;for(;u<n.length&&!n[u].includes("DetermineComponentFrameRoot");)u++;if(a===p.length||u===n.length)for(a=p.length-1,u=n.length-1;a>=1&&u>=0&&p[a]!==n[u];)u--;for(;a>=1&&u>=0;a--,u--)if(p[a]!==n[u]){if(a!==1||u!==1)do if(a--,u--,u<0||p[a]!==n[u]){let _=`
|
|
16
|
+
${p[a].replace(" at new "," at ")}`,y=B(t);return y&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",y)),_}while(a>=1&&u>=0);break}}}finally{ae=false,Error.prepareStackTrace=i,le(f),console.error=C,console.warn=l;}let r=t?B(t):"";return r?D(r):""},Ae=()=>{let t=j();for(let e of [...Array.from(P),...Array.from(t.renderers.values())]){let i=e.currentDispatcherRef;if(i&&typeof i=="object")return "H"in i?i.H:i.current}return null},le=t=>{for(let e of P){let i=e.currentDispatcherRef;i&&typeof i=="object"&&("H"in i?i.H=t:i.current=t);}};var Ne=(t,e)=>{switch(t.tag){case ne:case re:case Q:return D(t.type);case ee:return D("Lazy");case J:return t.child!==e&&e!==null?D("Suspense Fallback"):D("Suspense");case te:return D("SuspenseList");case Y:case Z:return V(t.type,false);case X:return V(t.type.render,false);case K:return V(t.type,true);case oe:return D("Activity");case ie:return D("ViewTransition");default:return ""}},Ie=(t,e,i)=>{let f=`
|
|
17
|
+
in ${t}`;return e&&(f+=` (at ${e})`),f},ue=t=>{try{let e="",i=t,f=null;do{e+=Ne(i,f);let C=i._debugInfo;if(C&&Array.isArray(C))for(let l=C.length-1;l>=0;l--){let r=C[l];typeof r.name=="string"&&(e+=Ie(r.name,r.env,r.debugLocation));}f=i,i=i.return;}while(i);return e}catch(e){return e instanceof Error?`
|
|
18
18
|
Error generating stack: ${e.message}
|
|
19
|
-
${e.stack}`:""}},ke=
|
|
20
|
-
`)
|
|
19
|
+
${e.stack}`:""}},ke=t=>t.length?t[0]===t[0].toUpperCase():false,ce=async t=>{let e=/\n\s+(?:in|at)\s+([^\s(]+)(?:\s+\((?:at\s+)?([^)]+)\))?/g,i=[],f;for(f=e.exec(t);f!==null;){let C=f[1],l=f[2];if(!ke(C)){f=e.exec(t),i.push({name:C,source:undefined});continue}let r;if(l&&l!=="Server")try{let o=` at ${C} (${l})`,s=await Fe(o,1);s.length>0&&(r=s[0]);}catch{}i.push({name:C,source:r||undefined}),f=e.exec(t);}return i};var De=async t=>{let e=se(t);if(!e)return null;let i=ue(e);return (await ce(i)).map(l=>({componentName:l.name,fileName:l.source?.fileName}))},Pe=t=>t.filter(e=>e.fileName&&!e.fileName.includes("node_modules")&&e.componentName.length>1&&!e.fileName.startsWith("_")),vt=t=>{if(t.length===0)return "";if(t.length===1){let f=t[0].lastIndexOf("/");return f>0?t[0].substring(0,f+1):""}let e=t[0];for(let f=1;f<t.length;f++){let C=t[f],l=0;for(;l<e.length&&l<C.length&&e[l]===C[l];)l++;e=e.substring(0,l);}let i=e.lastIndexOf("/");return i>0?e.substring(0,i+1):""},je=t=>{let e=t.map(f=>f.fileName).filter(f=>!!f),i=vt(e);return t.map(f=>{let C=f.fileName;return C&&i&&(C=C.startsWith(i)?C.substring(i.length):C),`${f.componentName}${C?` (${C})`:""}`}).join(`
|
|
20
|
+
`)},xe=t=>{let e=g=>{let m=g.tagName.toLowerCase(),p=["id","class","name","type","role","aria-label"],n=50,a=Array.from(g.attributes).filter(u=>p.includes(u.name)||u.name.startsWith("data-")).map(u=>{let _=u.value;return _.length>n&&(_=_.substring(0,n)+"..."),`${u.name}="${_}"`}).join(" ");return a?`<${m} ${a}>`:`<${m}>`},i=g=>`</${g.tagName.toLowerCase()}>`,f=g=>Array.from(g.children).length,C=g=>{let m="",p=Array.from(g.childNodes);for(let a of p)a.nodeType===Node.TEXT_NODE&&(m+=a.textContent||"");m=m.trim();let n=100;return m.length>n&&(m=m.substring(0,n)+"..."),m},l=[],r=t.parentElement;if(r){l.push(e(r));let m=Array.from(r.children).indexOf(t);m>0&&l.push(` ... (${m} element${m===1?"":"s"})`);}let o=r?" ":"";l.push(o+"<!-- SELECTED -->"),l.push(o+e(t));let s=C(t),c=f(t);if(s&&l.push(`${o} ${s}`),c>0&&l.push(`${o} ... (${c} element${c===1?"":"s"})`),l.push(o+i(t)),r){let g=Array.from(r.children),m=g.indexOf(t),p=g.length-m-1;p>0&&l.push(` ... (${p} element${p===1?"":"s"})`),l.push(i(r));}return l.join(`
|
|
21
|
+
`)};var _t=()=>{let t=null,e=null,i=false,f=false,C=null,l=null,r=null,o=async w=>{if(!document.hasFocus()){r=w;return}try{await navigator.clipboard.writeText(w),r=null,S();}catch{let L=document.createElement("textarea");L.value=w,L.style.position="fixed",L.style.left="-999999px",L.style.top="-999999px",document.body.appendChild(L),L.focus(),L.select();try{document.execCommand("copy"),r=null,S();}catch(M){console.error("Failed to copy to clipboard:",M),S();}document.body.removeChild(L);}},s=()=>{r&&o(r);},c=0,g=0,m=0,p=0,n=0,a=0,u=0,_=0,y="",b=()=>{let w=document.activeElement;return w instanceof HTMLInputElement||w instanceof HTMLTextAreaElement||w?.tagName==="INPUT"||w?.tagName==="TEXTAREA"},E=()=>{let w=document.createElement("div");return w.style.position="fixed",w.style.border="2px solid #3b82f6",w.style.backgroundColor="rgba(59, 130, 246, 0.1)",w.style.pointerEvents="none",w.style.zIndex="999999",w.style.transition="none",document.body.appendChild(w),w},T=(w,L,M)=>w+(L-w)*M,O=()=>{if(!e||!i)return;let w=.5;c=T(c,n,w),g=T(g,a,w),m=T(m,u,w),p=T(p,_,w),e.style.left=`${c}px`,e.style.top=`${g}px`,e.style.width=`${m}px`,e.style.height=`${p}px`,e.style.borderRadius=y,l=requestAnimationFrame(O);},R=w=>{if(f)return;let L=document.elementFromPoint(w.clientX,w.clientY);if(!L||L===e)return;C=L;let M=L.getBoundingClientRect(),N=window.getComputedStyle(L);n=M.left,a=M.top,u=M.width,_=M.height,y=N.borderRadius;},F=w=>{if(!i)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation(),f=true;let L=C;L&&De(L).then(M=>{if(!M){S();return}let N=je(Pe(M)),x=`## Referenced element
|
|
22
|
+
${xe(L)}
|
|
23
|
+
|
|
24
|
+
Import traces:
|
|
25
|
+
${N}
|
|
26
|
+
|
|
27
|
+
Page: ${window.location.href}`;o(x);});},d=w=>{i&&(w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation());},h=()=>{e||(e=E()),i=true,e.style.display="block",c=n,g=a,m=u,p=_,O();},S=()=>{i=false,f=false,e&&(e.style.display="none"),l&&(cancelAnimationFrame(l),l=null),C=null;},v=w=>{w.metaKey&&!t&&!i&&(t=setTimeout(()=>{b()||h(),t=null;},750));},A=w=>{w.metaKey||(t&&(clearTimeout(t),t=null),i&&!f&&S());};return document.addEventListener("keydown",v),document.addEventListener("keyup",A),document.addEventListener("mousemove",R),document.addEventListener("mousedown",d,true),document.addEventListener("click",F,true),window.addEventListener("focus",s),()=>{t&&clearTimeout(t),l&&cancelAnimationFrame(l),e&&e.parentNode&&e.parentNode.removeChild(e),document.removeEventListener("keydown",v),document.removeEventListener("keyup",A),document.removeEventListener("mousemove",R),document.removeEventListener("mousedown",d,true),document.removeEventListener("click",F,true),window.removeEventListener("focus",s);}};_t();/*! Bundled license information:
|
|
21
28
|
|
|
22
29
|
bippy/dist/src-CqIv1vpl.js:
|
|
23
30
|
(**
|
|
@@ -58,4 +65,4 @@ bippy/dist/source.js:
|
|
|
58
65
|
* This source code is licensed under the MIT license found in the
|
|
59
66
|
* LICENSE file in the root directory of this source tree.
|
|
60
67
|
*)
|
|
61
|
-
*/exports.
|
|
68
|
+
*/exports.init=_t;return exports;})({});
|
package/dist/index.js
CHANGED
|
@@ -10,26 +10,179 @@ import { getFiberStackTrace, getOwnerStack } from 'bippy/dist/source';
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var getStack = async (element) => {
|
|
14
14
|
const fiber = getFiberFromHostInstance(element);
|
|
15
15
|
if (!fiber) return null;
|
|
16
16
|
const stackTrace = getFiberStackTrace(fiber);
|
|
17
17
|
const rawOwnerStack = await getOwnerStack(stackTrace);
|
|
18
|
-
const stack = rawOwnerStack.
|
|
18
|
+
const stack = rawOwnerStack.map((item) => ({
|
|
19
19
|
componentName: item.name,
|
|
20
20
|
fileName: item.source?.fileName
|
|
21
21
|
}));
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
return stack;
|
|
23
|
+
};
|
|
24
|
+
var filterStack = (stack) => {
|
|
25
|
+
return stack.filter(
|
|
26
|
+
(item) => item.fileName && !item.fileName.includes("node_modules") && item.componentName.length > 1 && !item.fileName.startsWith("_")
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
var findCommonRoot = (paths) => {
|
|
30
|
+
if (paths.length === 0) return "";
|
|
31
|
+
if (paths.length === 1) {
|
|
32
|
+
const lastSlash2 = paths[0].lastIndexOf("/");
|
|
33
|
+
return lastSlash2 > 0 ? paths[0].substring(0, lastSlash2 + 1) : "";
|
|
34
|
+
}
|
|
35
|
+
let commonPrefix = paths[0];
|
|
36
|
+
for (let i = 1; i < paths.length; i++) {
|
|
37
|
+
const path = paths[i];
|
|
38
|
+
let j = 0;
|
|
39
|
+
while (j < commonPrefix.length && j < path.length && commonPrefix[j] === path[j]) {
|
|
40
|
+
j++;
|
|
41
|
+
}
|
|
42
|
+
commonPrefix = commonPrefix.substring(0, j);
|
|
43
|
+
}
|
|
44
|
+
const lastSlash = commonPrefix.lastIndexOf("/");
|
|
45
|
+
return lastSlash > 0 ? commonPrefix.substring(0, lastSlash + 1) : "";
|
|
46
|
+
};
|
|
47
|
+
var serializeStack = (stack) => {
|
|
48
|
+
const filePaths = stack.map((item) => item.fileName).filter((path) => !!path);
|
|
49
|
+
const commonRoot = findCommonRoot(filePaths);
|
|
50
|
+
return stack.map((item) => {
|
|
51
|
+
let fileName = item.fileName;
|
|
52
|
+
if (fileName && commonRoot) {
|
|
53
|
+
fileName = fileName.startsWith(commonRoot) ? fileName.substring(commonRoot.length) : fileName;
|
|
54
|
+
}
|
|
55
|
+
return `${item.componentName}${fileName ? ` (${fileName})` : ""}`;
|
|
56
|
+
}).join("\n");
|
|
57
|
+
};
|
|
58
|
+
var getHTMLSnippet = (element) => {
|
|
59
|
+
const getElementTag = (el) => {
|
|
60
|
+
const tagName = el.tagName.toLowerCase();
|
|
61
|
+
const importantAttrs = [
|
|
62
|
+
"id",
|
|
63
|
+
"class",
|
|
64
|
+
"name",
|
|
65
|
+
"type",
|
|
66
|
+
"role",
|
|
67
|
+
"aria-label"
|
|
68
|
+
];
|
|
69
|
+
const maxValueLength = 50;
|
|
70
|
+
const attrs = Array.from(el.attributes).filter((attr) => {
|
|
71
|
+
return importantAttrs.includes(attr.name) || attr.name.startsWith("data-");
|
|
72
|
+
}).map((attr) => {
|
|
73
|
+
let value = attr.value;
|
|
74
|
+
if (value.length > maxValueLength) {
|
|
75
|
+
value = value.substring(0, maxValueLength) + "...";
|
|
76
|
+
}
|
|
77
|
+
return `${attr.name}="${value}"`;
|
|
78
|
+
}).join(" ");
|
|
79
|
+
return attrs ? `<${tagName} ${attrs}>` : `<${tagName}>`;
|
|
80
|
+
};
|
|
81
|
+
const getClosingTag = (el) => {
|
|
82
|
+
return `</${el.tagName.toLowerCase()}>`;
|
|
83
|
+
};
|
|
84
|
+
const getChildrenCount = (el) => {
|
|
85
|
+
const children = Array.from(el.children);
|
|
86
|
+
return children.length;
|
|
87
|
+
};
|
|
88
|
+
const getTextContent = (el) => {
|
|
89
|
+
let text = "";
|
|
90
|
+
const childNodes = Array.from(el.childNodes);
|
|
91
|
+
for (const node of childNodes) {
|
|
92
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
93
|
+
text += node.textContent || "";
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
text = text.trim();
|
|
97
|
+
const maxLength = 100;
|
|
98
|
+
if (text.length > maxLength) {
|
|
99
|
+
text = text.substring(0, maxLength) + "...";
|
|
100
|
+
}
|
|
101
|
+
return text;
|
|
25
102
|
};
|
|
103
|
+
const lines = [];
|
|
104
|
+
const parent = element.parentElement;
|
|
105
|
+
if (parent) {
|
|
106
|
+
lines.push(getElementTag(parent));
|
|
107
|
+
const siblings = Array.from(parent.children);
|
|
108
|
+
const targetIndex = siblings.indexOf(element);
|
|
109
|
+
if (targetIndex > 0) {
|
|
110
|
+
lines.push(
|
|
111
|
+
` ... (${targetIndex} element${targetIndex === 1 ? "" : "s"})`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const indent = parent ? " " : "";
|
|
116
|
+
lines.push(indent + "<!-- SELECTED -->");
|
|
117
|
+
lines.push(indent + getElementTag(element));
|
|
118
|
+
const textContent = getTextContent(element);
|
|
119
|
+
const childrenCount = getChildrenCount(element);
|
|
120
|
+
if (textContent) {
|
|
121
|
+
lines.push(`${indent} ${textContent}`);
|
|
122
|
+
}
|
|
123
|
+
if (childrenCount > 0) {
|
|
124
|
+
lines.push(
|
|
125
|
+
`${indent} ... (${childrenCount} element${childrenCount === 1 ? "" : "s"})`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
lines.push(indent + getClosingTag(element));
|
|
129
|
+
if (parent) {
|
|
130
|
+
const siblings = Array.from(parent.children);
|
|
131
|
+
const targetIndex = siblings.indexOf(element);
|
|
132
|
+
const siblingsAfter = siblings.length - targetIndex - 1;
|
|
133
|
+
if (siblingsAfter > 0) {
|
|
134
|
+
lines.push(
|
|
135
|
+
` ... (${siblingsAfter} element${siblingsAfter === 1 ? "" : "s"})`
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
lines.push(getClosingTag(parent));
|
|
139
|
+
}
|
|
140
|
+
return lines.join("\n");
|
|
26
141
|
};
|
|
142
|
+
|
|
143
|
+
// src/index.ts
|
|
27
144
|
var init = () => {
|
|
28
145
|
let metaKeyTimer = null;
|
|
29
146
|
let overlay = null;
|
|
30
147
|
let isActive = false;
|
|
148
|
+
let isLocked = false;
|
|
31
149
|
let currentElement = null;
|
|
32
150
|
let animationFrame = null;
|
|
151
|
+
let pendingCopyText = null;
|
|
152
|
+
const copyToClipboard = async (text) => {
|
|
153
|
+
if (!document.hasFocus()) {
|
|
154
|
+
pendingCopyText = text;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
await navigator.clipboard.writeText(text);
|
|
159
|
+
pendingCopyText = null;
|
|
160
|
+
hideOverlay();
|
|
161
|
+
} catch {
|
|
162
|
+
const textarea = document.createElement("textarea");
|
|
163
|
+
textarea.value = text;
|
|
164
|
+
textarea.style.position = "fixed";
|
|
165
|
+
textarea.style.left = "-999999px";
|
|
166
|
+
textarea.style.top = "-999999px";
|
|
167
|
+
document.body.appendChild(textarea);
|
|
168
|
+
textarea.focus();
|
|
169
|
+
textarea.select();
|
|
170
|
+
try {
|
|
171
|
+
document.execCommand("copy");
|
|
172
|
+
pendingCopyText = null;
|
|
173
|
+
hideOverlay();
|
|
174
|
+
} catch (execErr) {
|
|
175
|
+
console.error("Failed to copy to clipboard:", execErr);
|
|
176
|
+
hideOverlay();
|
|
177
|
+
}
|
|
178
|
+
document.body.removeChild(textarea);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const handleWindowFocus = () => {
|
|
182
|
+
if (pendingCopyText) {
|
|
183
|
+
void copyToClipboard(pendingCopyText);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
33
186
|
let currentX = 0;
|
|
34
187
|
let currentY = 0;
|
|
35
188
|
let currentWidth = 0;
|
|
@@ -59,7 +212,7 @@ var init = () => {
|
|
|
59
212
|
};
|
|
60
213
|
const updateOverlayPosition = () => {
|
|
61
214
|
if (!overlay || !isActive) return;
|
|
62
|
-
const factor = 0.
|
|
215
|
+
const factor = 0.5;
|
|
63
216
|
currentX = lerp(currentX, targetX, factor);
|
|
64
217
|
currentY = lerp(currentY, targetY, factor);
|
|
65
218
|
currentWidth = lerp(currentWidth, targetWidth, factor);
|
|
@@ -72,6 +225,7 @@ var init = () => {
|
|
|
72
225
|
animationFrame = requestAnimationFrame(updateOverlayPosition);
|
|
73
226
|
};
|
|
74
227
|
const handleMouseMove = (e) => {
|
|
228
|
+
if (isLocked) return;
|
|
75
229
|
const element = document.elementFromPoint(e.clientX, e.clientY);
|
|
76
230
|
if (!element || element === overlay) return;
|
|
77
231
|
currentElement = element;
|
|
@@ -88,14 +242,24 @@ var init = () => {
|
|
|
88
242
|
e.preventDefault();
|
|
89
243
|
e.stopPropagation();
|
|
90
244
|
e.stopImmediatePropagation();
|
|
245
|
+
isLocked = true;
|
|
91
246
|
const elementToInspect = currentElement;
|
|
92
|
-
hideOverlay();
|
|
93
247
|
if (elementToInspect) {
|
|
94
|
-
void
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
248
|
+
void getStack(elementToInspect).then((stack) => {
|
|
249
|
+
if (!stack) {
|
|
250
|
+
hideOverlay();
|
|
251
|
+
return;
|
|
98
252
|
}
|
|
253
|
+
const serializedStack = serializeStack(filterStack(stack));
|
|
254
|
+
const htmlSnippet = getHTMLSnippet(elementToInspect);
|
|
255
|
+
const payload = `## Referenced element
|
|
256
|
+
${htmlSnippet}
|
|
257
|
+
|
|
258
|
+
Import traces:
|
|
259
|
+
${serializedStack}
|
|
260
|
+
|
|
261
|
+
Page: ${window.location.href}`;
|
|
262
|
+
void copyToClipboard(payload);
|
|
99
263
|
});
|
|
100
264
|
}
|
|
101
265
|
};
|
|
@@ -119,6 +283,7 @@ var init = () => {
|
|
|
119
283
|
};
|
|
120
284
|
const hideOverlay = () => {
|
|
121
285
|
isActive = false;
|
|
286
|
+
isLocked = false;
|
|
122
287
|
if (overlay) {
|
|
123
288
|
overlay.style.display = "none";
|
|
124
289
|
}
|
|
@@ -131,7 +296,6 @@ var init = () => {
|
|
|
131
296
|
const handleKeyDown = (e) => {
|
|
132
297
|
if (e.metaKey && !metaKeyTimer && !isActive) {
|
|
133
298
|
metaKeyTimer = setTimeout(() => {
|
|
134
|
-
console.log("Meta key held for 750ms");
|
|
135
299
|
if (!isInsideInputOrTextarea()) {
|
|
136
300
|
showOverlay();
|
|
137
301
|
}
|
|
@@ -145,7 +309,7 @@ var init = () => {
|
|
|
145
309
|
clearTimeout(metaKeyTimer);
|
|
146
310
|
metaKeyTimer = null;
|
|
147
311
|
}
|
|
148
|
-
if (isActive) {
|
|
312
|
+
if (isActive && !isLocked) {
|
|
149
313
|
hideOverlay();
|
|
150
314
|
}
|
|
151
315
|
}
|
|
@@ -155,6 +319,7 @@ var init = () => {
|
|
|
155
319
|
document.addEventListener("mousemove", handleMouseMove);
|
|
156
320
|
document.addEventListener("mousedown", handleMouseDown, true);
|
|
157
321
|
document.addEventListener("click", handleClick, true);
|
|
322
|
+
window.addEventListener("focus", handleWindowFocus);
|
|
158
323
|
return () => {
|
|
159
324
|
if (metaKeyTimer) {
|
|
160
325
|
clearTimeout(metaKeyTimer);
|
|
@@ -170,8 +335,9 @@ var init = () => {
|
|
|
170
335
|
document.removeEventListener("mousemove", handleMouseMove);
|
|
171
336
|
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
172
337
|
document.removeEventListener("click", handleClick, true);
|
|
338
|
+
window.removeEventListener("focus", handleWindowFocus);
|
|
173
339
|
};
|
|
174
340
|
};
|
|
175
341
|
init();
|
|
176
342
|
|
|
177
|
-
export {
|
|
343
|
+
export { init };
|