@mongoosejs/studio 0.6.1 → 0.7.1
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/CHANGELOG.md +62 -0
- package/README.md +85 -4
- package/backend/actions/Model/createChatMessage.js +1 -0
- package/backend/actions/Model/streamChatMessage.js +1 -0
- package/backend/next.js +24 -0
- package/backend/vercel/checkBindIp.js +25 -0
- package/backend/vercel/index.js +3 -0
- package/backend/vercel/mcpConfig.js +28 -0
- package/backend/vercel/vercelMCP.js +152 -0
- package/backend/vercel/vercelMCPRouteHandler.js +19 -0
- package/docs/mcp-oauth.md +1 -1
- package/express.js +1 -1
- package/frontend/index.js +24 -2
- package/frontend/public/app.js +912 -436
- package/frontend/src/mcp/mcp.js +5 -2
- package/next.js +35 -8
- package/package.json +1 -1
- package/vercel.d.ts +14 -1
- package/vercel.js +1 -0
- package/backend/vercel.js +0 -3
package/frontend/public/app.js
CHANGED
|
@@ -8937,13 +8937,16 @@ module.exports = {
|
|
|
8937
8937
|
mcpUrl() {
|
|
8938
8938
|
const configuredUrl = window.MONGOOSE_STUDIO_CONFIG.mcpUrl;
|
|
8939
8939
|
if (configuredUrl) {
|
|
8940
|
-
|
|
8940
|
+
if (/^https?:\/\//i.test(configuredUrl)) {
|
|
8941
|
+
return configuredUrl;
|
|
8942
|
+
}
|
|
8943
|
+
return new URL(configuredUrl, window.location.href).toString();
|
|
8941
8944
|
}
|
|
8942
8945
|
|
|
8943
8946
|
const url = new URL(window.location.href);
|
|
8944
8947
|
url.hash = '';
|
|
8945
8948
|
url.search = '';
|
|
8946
|
-
url.pathname = `${url.pathname.replace(/\/+$/, '')}/mcp`;
|
|
8949
|
+
url.pathname = `${url.pathname.replace(/\/index\.html$/, '').replace(/\/+$/, '')}/mcp`;
|
|
8947
8950
|
return url.toString();
|
|
8948
8951
|
}
|
|
8949
8952
|
},
|
|
@@ -13923,7 +13926,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13923
13926
|
/* harmony export */ });
|
|
13924
13927
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
13925
13928
|
/**
|
|
13926
|
-
* @vue/reactivity v3.5.
|
|
13929
|
+
* @vue/reactivity v3.5.44
|
|
13927
13930
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
13928
13931
|
* @license MIT
|
|
13929
13932
|
**/
|
|
@@ -14827,19 +14830,41 @@ const arrayInstrumentations = {
|
|
|
14827
14830
|
};
|
|
14828
14831
|
function iterator(self, method, wrapValue) {
|
|
14829
14832
|
const arr = shallowReadArray(self);
|
|
14830
|
-
const
|
|
14833
|
+
const methodFn = arr[method];
|
|
14834
|
+
const iter = methodFn.call(arr);
|
|
14831
14835
|
if (arr !== self && !isShallow(self)) {
|
|
14832
|
-
iter.
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
if (
|
|
14836
|
-
|
|
14836
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
14837
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
14838
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
14839
|
+
if (methodFn !== arrayProto[method]) {
|
|
14840
|
+
Object.defineProperties(wrapped, {
|
|
14841
|
+
return: {
|
|
14842
|
+
get() {
|
|
14843
|
+
const fn = iter.return;
|
|
14844
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
14845
|
+
}
|
|
14846
|
+
},
|
|
14847
|
+
throw: {
|
|
14848
|
+
get() {
|
|
14849
|
+
const fn = iter.throw;
|
|
14850
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
14851
|
+
}
|
|
14852
|
+
}
|
|
14853
|
+
});
|
|
14837
14854
|
}
|
|
14838
|
-
return
|
|
14839
|
-
}
|
|
14855
|
+
return wrapped;
|
|
14856
|
+
}
|
|
14857
|
+
iter._next = iter.next;
|
|
14858
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
14840
14859
|
}
|
|
14841
14860
|
return iter;
|
|
14842
14861
|
}
|
|
14862
|
+
function wrapResult(result, wrapValue) {
|
|
14863
|
+
if (!result.done) {
|
|
14864
|
+
result.value = wrapValue(result.value);
|
|
14865
|
+
}
|
|
14866
|
+
return result;
|
|
14867
|
+
}
|
|
14843
14868
|
const arrayProto = Array.prototype;
|
|
14844
14869
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
14845
14870
|
const arr = shallowReadArray(self);
|
|
@@ -15262,6 +15287,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
15262
15287
|
return !isReadonly2;
|
|
15263
15288
|
} else if (key === "__v_isReadonly") {
|
|
15264
15289
|
return isReadonly2;
|
|
15290
|
+
} else if (key === "__v_isShallow") {
|
|
15291
|
+
return shallow;
|
|
15265
15292
|
} else if (key === "__v_raw") {
|
|
15266
15293
|
return target;
|
|
15267
15294
|
}
|
|
@@ -15826,9 +15853,11 @@ function watch(source, cb, options = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.EM
|
|
|
15826
15853
|
if (once && cb) {
|
|
15827
15854
|
const _cb = cb;
|
|
15828
15855
|
cb = (...args) => {
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15856
|
+
try {
|
|
15857
|
+
return _cb(...args);
|
|
15858
|
+
} finally {
|
|
15859
|
+
watchHandle();
|
|
15860
|
+
}
|
|
15832
15861
|
};
|
|
15833
15862
|
}
|
|
15834
15863
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -15839,12 +15868,13 @@ function watch(source, cb, options = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.EM
|
|
|
15839
15868
|
if (cb) {
|
|
15840
15869
|
const newValue = effect.run();
|
|
15841
15870
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(v, oldValue[i])) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(newValue, oldValue))) {
|
|
15842
|
-
if (cleanup) {
|
|
15843
|
-
cleanup();
|
|
15844
|
-
}
|
|
15845
15871
|
const currentWatcher = activeWatcher;
|
|
15846
|
-
|
|
15872
|
+
pauseTracking();
|
|
15847
15873
|
try {
|
|
15874
|
+
if (cleanup) {
|
|
15875
|
+
cleanup();
|
|
15876
|
+
}
|
|
15877
|
+
activeWatcher = effect;
|
|
15848
15878
|
const args = [
|
|
15849
15879
|
newValue,
|
|
15850
15880
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -15858,6 +15888,7 @@ function watch(source, cb, options = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.EM
|
|
|
15858
15888
|
);
|
|
15859
15889
|
} finally {
|
|
15860
15890
|
activeWatcher = currentWatcher;
|
|
15891
|
+
resetTracking();
|
|
15861
15892
|
}
|
|
15862
15893
|
}
|
|
15863
15894
|
} else {
|
|
@@ -16098,7 +16129,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16098
16129
|
/* harmony import */ var _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/reactivity */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
|
|
16099
16130
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
16100
16131
|
/**
|
|
16101
|
-
* @vue/runtime-core v3.5.
|
|
16132
|
+
* @vue/runtime-core v3.5.44
|
|
16102
16133
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16103
16134
|
* @license MIT
|
|
16104
16135
|
**/
|
|
@@ -16434,21 +16465,21 @@ function queuePostFlushCb(cb) {
|
|
|
16434
16465
|
}
|
|
16435
16466
|
queueFlush();
|
|
16436
16467
|
}
|
|
16437
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
16468
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
16438
16469
|
if (true) {
|
|
16439
16470
|
seen = seen || /* @__PURE__ */ new Map();
|
|
16440
16471
|
}
|
|
16441
16472
|
for (; i < queue.length; i++) {
|
|
16442
16473
|
const cb = queue[i];
|
|
16443
16474
|
if (cb && cb.flags & 2) {
|
|
16444
|
-
if (instance && cb.id !== instance.uid) {
|
|
16475
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
16445
16476
|
continue;
|
|
16446
16477
|
}
|
|
16447
16478
|
if ( true && checkRecursiveUpdates(seen, cb)) {
|
|
16448
16479
|
continue;
|
|
16449
16480
|
}
|
|
16450
16481
|
queue.splice(i, 1);
|
|
16451
|
-
i
|
|
16482
|
+
i = instance ? i - 1 : flushIndex;
|
|
16452
16483
|
if (cb.flags & 4) {
|
|
16453
16484
|
cb.flags &= -2;
|
|
16454
16485
|
}
|
|
@@ -16459,12 +16490,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
16459
16490
|
}
|
|
16460
16491
|
}
|
|
16461
16492
|
}
|
|
16462
|
-
function flushPostFlushCbs(seen) {
|
|
16493
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
16463
16494
|
if (pendingPostFlushCbs.length) {
|
|
16464
|
-
|
|
16465
|
-
|
|
16466
|
-
)
|
|
16467
|
-
|
|
16495
|
+
let cbs = pendingPostFlushCbs;
|
|
16496
|
+
let kept = 0;
|
|
16497
|
+
if (skip) {
|
|
16498
|
+
cbs = [];
|
|
16499
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
16500
|
+
const cb = pendingPostFlushCbs[i];
|
|
16501
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
16502
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
16503
|
+
} else {
|
|
16504
|
+
cbs.push(cb);
|
|
16505
|
+
}
|
|
16506
|
+
}
|
|
16507
|
+
}
|
|
16508
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
16509
|
+
pendingPostFlushCbs.length = kept;
|
|
16468
16510
|
if (activePostFlushCbs) {
|
|
16469
16511
|
for (let i = 0; i < deduped.length; i++) {
|
|
16470
16512
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -16490,6 +16532,22 @@ function flushPostFlushCbs(seen) {
|
|
|
16490
16532
|
postFlushIndex = 0;
|
|
16491
16533
|
}
|
|
16492
16534
|
}
|
|
16535
|
+
let isFlushing = false;
|
|
16536
|
+
function flushOnAppMount(fn, minUid) {
|
|
16537
|
+
if (isFlushing) {
|
|
16538
|
+
fn();
|
|
16539
|
+
return;
|
|
16540
|
+
}
|
|
16541
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
16542
|
+
fn();
|
|
16543
|
+
isFlushing = true;
|
|
16544
|
+
try {
|
|
16545
|
+
flushPreFlushCbs(void 0, minUid);
|
|
16546
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
16547
|
+
} finally {
|
|
16548
|
+
isFlushing = false;
|
|
16549
|
+
}
|
|
16550
|
+
}
|
|
16493
16551
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
16494
16552
|
function flushJobs(seen) {
|
|
16495
16553
|
if (true) {
|
|
@@ -16991,6 +17049,7 @@ function doWatch(source, cb, options = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.
|
|
|
16991
17049
|
let isPre = false;
|
|
16992
17050
|
if (flush === "post") {
|
|
16993
17051
|
baseWatchOptions.scheduler = (job) => {
|
|
17052
|
+
job.i = instance;
|
|
16994
17053
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
16995
17054
|
};
|
|
16996
17055
|
} else if (flush !== "sync") {
|
|
@@ -17292,7 +17351,11 @@ const TeleportImpl = {
|
|
|
17292
17351
|
};
|
|
17293
17352
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
17294
17353
|
if (moveType === 0) {
|
|
17354
|
+
if (vnode.targetStart) {
|
|
17355
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
17356
|
+
}
|
|
17295
17357
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
17358
|
+
parentAnchor = vnode.targetAnchor;
|
|
17296
17359
|
}
|
|
17297
17360
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
17298
17361
|
const isReorder = moveType === 2;
|
|
@@ -17461,10 +17524,6 @@ const BaseTransitionPropsValidators = {
|
|
|
17461
17524
|
onAfterAppear: TransitionHookValidator,
|
|
17462
17525
|
onAppearCancelled: TransitionHookValidator
|
|
17463
17526
|
};
|
|
17464
|
-
const recursiveGetSubtree = (instance) => {
|
|
17465
|
-
const subTree = instance.subTree;
|
|
17466
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
17467
|
-
};
|
|
17468
17527
|
const BaseTransitionImpl = {
|
|
17469
17528
|
name: `BaseTransition`,
|
|
17470
17529
|
props: BaseTransitionPropsValidators,
|
|
@@ -17505,7 +17564,7 @@ const BaseTransitionImpl = {
|
|
|
17505
17564
|
setTransitionHooks(innerChild, enterHooks);
|
|
17506
17565
|
}
|
|
17507
17566
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
17508
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
17567
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
17509
17568
|
let leavingHooks = resolveTransitionHooks(
|
|
17510
17569
|
oldInnerChild,
|
|
17511
17570
|
rawProps,
|
|
@@ -17640,8 +17699,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
17640
17699
|
);
|
|
17641
17700
|
}
|
|
17642
17701
|
const leavingVNode = leavingVNodesCache[key];
|
|
17643
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
17644
|
-
leavingVNode.el[leaveCbKey]
|
|
17702
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
17703
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
17704
|
+
if (!leavingCb) {
|
|
17705
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
17706
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
17707
|
+
}
|
|
17708
|
+
if (leavingCb) {
|
|
17709
|
+
leavingCb();
|
|
17710
|
+
}
|
|
17645
17711
|
}
|
|
17646
17712
|
callHook(hook, [el]);
|
|
17647
17713
|
},
|
|
@@ -17769,6 +17835,12 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
17769
17835
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
17770
17836
|
} else {
|
|
17771
17837
|
vnode.transition = hooks;
|
|
17838
|
+
if (vnode.type === Fragment && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {
|
|
17839
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
17840
|
+
if (child) {
|
|
17841
|
+
setTransitionHooks(child, hooks);
|
|
17842
|
+
}
|
|
17843
|
+
}
|
|
17772
17844
|
}
|
|
17773
17845
|
}
|
|
17774
17846
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -17793,6 +17865,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
17793
17865
|
}
|
|
17794
17866
|
return ret;
|
|
17795
17867
|
}
|
|
17868
|
+
function getTransitionRoot(vnode) {
|
|
17869
|
+
if (vnode.component) {
|
|
17870
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
17871
|
+
}
|
|
17872
|
+
if (vnode.type === Fragment) {
|
|
17873
|
+
const child = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
17874
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
17875
|
+
}
|
|
17876
|
+
if (vnode.type !== Comment) {
|
|
17877
|
+
return vnode;
|
|
17878
|
+
}
|
|
17879
|
+
}
|
|
17796
17880
|
|
|
17797
17881
|
// @__NO_SIDE_EFFECTS__
|
|
17798
17882
|
function defineComponent(options, extraOptions) {
|
|
@@ -18700,14 +18784,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
18700
18784
|
break;
|
|
18701
18785
|
}
|
|
18702
18786
|
}, opts);
|
|
18703
|
-
|
|
18704
|
-
if (!(el instanceof Element)) return;
|
|
18787
|
+
const observe = (el) => {
|
|
18705
18788
|
if (elementIsVisibleInViewport(el)) {
|
|
18706
18789
|
hydrate();
|
|
18707
18790
|
ob.disconnect();
|
|
18708
18791
|
return false;
|
|
18709
18792
|
}
|
|
18793
|
+
if (getComputedStyle(el).display === "contents") {
|
|
18794
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
18795
|
+
if (observe(el.children[i]) === false) return false;
|
|
18796
|
+
}
|
|
18797
|
+
}
|
|
18710
18798
|
ob.observe(el);
|
|
18799
|
+
};
|
|
18800
|
+
forEach((el) => {
|
|
18801
|
+
if (!(el instanceof Element)) return;
|
|
18802
|
+
return observe(el);
|
|
18711
18803
|
});
|
|
18712
18804
|
return () => ob.disconnect();
|
|
18713
18805
|
};
|
|
@@ -19064,6 +19156,7 @@ const KeepAliveImpl = {
|
|
|
19064
19156
|
unmount(cached);
|
|
19065
19157
|
} else if (current) {
|
|
19066
19158
|
resetShapeFlag(current);
|
|
19159
|
+
if (cached) resetShapeFlag(cached);
|
|
19067
19160
|
}
|
|
19068
19161
|
cache.delete(key);
|
|
19069
19162
|
keys.delete(key);
|
|
@@ -19354,10 +19447,12 @@ function renderList(source, renderItem, cache, index) {
|
|
|
19354
19447
|
);
|
|
19355
19448
|
}
|
|
19356
19449
|
} else if (typeof source === "number") {
|
|
19357
|
-
if (
|
|
19358
|
-
|
|
19359
|
-
|
|
19360
|
-
|
|
19450
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
19451
|
+
if (true) {
|
|
19452
|
+
warn$1(
|
|
19453
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
19454
|
+
);
|
|
19455
|
+
}
|
|
19361
19456
|
ret = [];
|
|
19362
19457
|
} else {
|
|
19363
19458
|
ret = new Array(source);
|
|
@@ -20998,7 +21093,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
20998
21093
|
}
|
|
20999
21094
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
21000
21095
|
const key = nextKeys[i];
|
|
21001
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
21096
|
+
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
21002
21097
|
return true;
|
|
21003
21098
|
}
|
|
21004
21099
|
}
|
|
@@ -22064,15 +22159,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
22064
22159
|
for (let i = 0; i < newChildren.length; i++) {
|
|
22065
22160
|
const oldVNode = oldChildren[i];
|
|
22066
22161
|
const newVNode = newChildren[i];
|
|
22162
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
22067
22163
|
const container = (
|
|
22068
22164
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
22069
22165
|
// which will not have a mounted element
|
|
22070
|
-
|
|
22166
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
22071
22167
|
// of the Fragment itself so it can move its children.
|
|
22072
22168
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
22073
22169
|
// which also requires the correct parent container
|
|
22074
22170
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
22075
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
22171
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
22076
22172
|
// In other cases, the parent container is not actually used so we
|
|
22077
22173
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
22078
22174
|
fallbackContainer
|
|
@@ -22235,7 +22331,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
22235
22331
|
}
|
|
22236
22332
|
if ( true && isHmrUpdating) initialVNode.el = null;
|
|
22237
22333
|
if (instance.asyncDep) {
|
|
22238
|
-
parentSuspense && parentSuspense.registerDep(
|
|
22334
|
+
parentSuspense && parentSuspense.registerDep(
|
|
22335
|
+
instance,
|
|
22336
|
+
setupRenderEffect,
|
|
22337
|
+
optimized,
|
|
22338
|
+
namespace
|
|
22339
|
+
);
|
|
22239
22340
|
if (!initialVNode.el) {
|
|
22240
22341
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
22241
22342
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -22265,6 +22366,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
22265
22366
|
pushWarningContext(n2);
|
|
22266
22367
|
}
|
|
22267
22368
|
n2.el = n1.el;
|
|
22369
|
+
n2.placeholder = n1.placeholder;
|
|
22268
22370
|
updateComponentPreRender(instance, n2, optimized);
|
|
22269
22371
|
if (true) {
|
|
22270
22372
|
popWarningContext();
|
|
@@ -22276,6 +22378,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
22276
22378
|
}
|
|
22277
22379
|
} else {
|
|
22278
22380
|
n2.el = n1.el;
|
|
22381
|
+
n2.placeholder = n1.placeholder;
|
|
22279
22382
|
instance.vnode = n2;
|
|
22280
22383
|
}
|
|
22281
22384
|
};
|
|
@@ -22929,18 +23032,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
22929
23032
|
};
|
|
22930
23033
|
const remove = (vnode) => {
|
|
22931
23034
|
const { type, el, anchor, transition } = vnode;
|
|
22932
|
-
|
|
22933
|
-
|
|
22934
|
-
|
|
22935
|
-
if (child.type === Comment) {
|
|
22936
|
-
hostRemove(child.el);
|
|
22937
|
-
} else {
|
|
22938
|
-
remove(child);
|
|
22939
|
-
}
|
|
22940
|
-
});
|
|
22941
|
-
} else {
|
|
22942
|
-
removeFragment(el, anchor);
|
|
22943
|
-
}
|
|
23035
|
+
const isFragment = type === Fragment;
|
|
23036
|
+
if (isFragment && !transition) {
|
|
23037
|
+
removeFragment(el, anchor);
|
|
22944
23038
|
return;
|
|
22945
23039
|
}
|
|
22946
23040
|
if (type === Static) {
|
|
@@ -22950,17 +23044,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
22950
23044
|
}
|
|
22951
23045
|
return;
|
|
22952
23046
|
}
|
|
23047
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
22953
23048
|
const performRemove = () => {
|
|
22954
|
-
|
|
23049
|
+
if (isFragment) {
|
|
23050
|
+
if (hostParentNode(el)) {
|
|
23051
|
+
removeFragment(el, anchor);
|
|
23052
|
+
}
|
|
23053
|
+
} else {
|
|
23054
|
+
hostRemove(el);
|
|
23055
|
+
}
|
|
22955
23056
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
22956
23057
|
transition.afterLeave();
|
|
22957
23058
|
}
|
|
22958
23059
|
};
|
|
22959
|
-
if (
|
|
23060
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
22960
23061
|
const { leave, delayLeave } = transition;
|
|
22961
|
-
const
|
|
23062
|
+
const leavingEl = leavingNode.el;
|
|
23063
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
22962
23064
|
if (delayLeave) {
|
|
22963
|
-
delayLeave(
|
|
23065
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
22964
23066
|
} else {
|
|
22965
23067
|
performLeave();
|
|
22966
23068
|
}
|
|
@@ -23021,32 +23123,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
23021
23123
|
const teleportEnd = el && el[TeleportEndKey];
|
|
23022
23124
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
23023
23125
|
};
|
|
23024
|
-
let isFlushing = false;
|
|
23025
23126
|
const render = (vnode, container, namespace) => {
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
if (
|
|
23029
|
-
|
|
23030
|
-
|
|
23127
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
23128
|
+
flushOnAppMount(() => {
|
|
23129
|
+
if (vnode == null) {
|
|
23130
|
+
if (container._vnode) {
|
|
23131
|
+
unmount(container._vnode, null, null, true);
|
|
23132
|
+
}
|
|
23133
|
+
} else {
|
|
23134
|
+
patch(
|
|
23135
|
+
container._vnode || null,
|
|
23136
|
+
vnode,
|
|
23137
|
+
container,
|
|
23138
|
+
null,
|
|
23139
|
+
null,
|
|
23140
|
+
null,
|
|
23141
|
+
namespace
|
|
23142
|
+
);
|
|
23031
23143
|
}
|
|
23032
|
-
|
|
23033
|
-
|
|
23034
|
-
container._vnode || null,
|
|
23035
|
-
vnode,
|
|
23036
|
-
container,
|
|
23037
|
-
null,
|
|
23038
|
-
null,
|
|
23039
|
-
null,
|
|
23040
|
-
namespace
|
|
23041
|
-
);
|
|
23042
|
-
}
|
|
23043
|
-
container._vnode = vnode;
|
|
23044
|
-
if (!isFlushing) {
|
|
23045
|
-
isFlushing = true;
|
|
23046
|
-
flushPreFlushCbs(instance);
|
|
23047
|
-
flushPostFlushCbs();
|
|
23048
|
-
isFlushing = false;
|
|
23049
|
-
}
|
|
23144
|
+
container._vnode = vnode;
|
|
23145
|
+
}, minUid);
|
|
23050
23146
|
};
|
|
23051
23147
|
const internals = {
|
|
23052
23148
|
p: patch,
|
|
@@ -23634,7 +23730,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
23634
23730
|
next() {
|
|
23635
23731
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
23636
23732
|
},
|
|
23637
|
-
|
|
23733
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
23734
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
23735
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
23736
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
23638
23737
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
23639
23738
|
if (isInPendingSuspense) {
|
|
23640
23739
|
suspense.deps++;
|
|
@@ -23647,7 +23746,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
23647
23746
|
return;
|
|
23648
23747
|
}
|
|
23649
23748
|
unsetCurrentInstance();
|
|
23650
|
-
if (
|
|
23749
|
+
if (!instance.scope.active) {
|
|
23651
23750
|
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
23652
23751
|
suspense.resolve();
|
|
23653
23752
|
}
|
|
@@ -23674,7 +23773,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
23674
23773
|
// consider the comment placeholder case.
|
|
23675
23774
|
hydratedEl ? null : next(instance.subTree),
|
|
23676
23775
|
suspense,
|
|
23677
|
-
|
|
23776
|
+
namespace2,
|
|
23678
23777
|
optimized2
|
|
23679
23778
|
);
|
|
23680
23779
|
if (placeholder) {
|
|
@@ -24208,6 +24307,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
24208
24307
|
|
|
24209
24308
|
const emptyAppContext = createAppContext();
|
|
24210
24309
|
let uid = 0;
|
|
24310
|
+
function getNextUid() {
|
|
24311
|
+
return uid;
|
|
24312
|
+
}
|
|
24211
24313
|
function createComponentInstance(vnode, parent, suspense) {
|
|
24212
24314
|
const type = vnode.type;
|
|
24213
24315
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -24882,7 +24984,7 @@ function isMemoSame(cached, memo) {
|
|
|
24882
24984
|
return true;
|
|
24883
24985
|
}
|
|
24884
24986
|
|
|
24885
|
-
const version = "3.5.
|
|
24987
|
+
const version = "3.5.44";
|
|
24886
24988
|
const warn = true ? warn$1 : 0;
|
|
24887
24989
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
24888
24990
|
const devtools = true ? devtools$1 : 0;
|
|
@@ -25093,7 +25195,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25093
25195
|
/* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
|
|
25094
25196
|
/* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
25095
25197
|
/**
|
|
25096
|
-
* @vue/runtime-dom v3.5.
|
|
25198
|
+
* @vue/runtime-dom v3.5.44
|
|
25097
25199
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
25098
25200
|
* @license MIT
|
|
25099
25201
|
**/
|
|
@@ -25655,7 +25757,9 @@ function patchStyle(el, prev, next) {
|
|
|
25655
25757
|
}
|
|
25656
25758
|
}
|
|
25657
25759
|
if (vShowOriginalDisplay in el) {
|
|
25658
|
-
|
|
25760
|
+
if (!isCssString || prev !== next) {
|
|
25761
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
25762
|
+
}
|
|
25659
25763
|
if (el[vShowHidden]) {
|
|
25660
25764
|
style.display = "none";
|
|
25661
25765
|
}
|
|
@@ -26137,7 +26241,9 @@ class VueElement extends BaseClass {
|
|
|
26137
26241
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
26138
26242
|
);
|
|
26139
26243
|
}
|
|
26140
|
-
this.
|
|
26244
|
+
if (this._connected) {
|
|
26245
|
+
this._mount(def);
|
|
26246
|
+
}
|
|
26141
26247
|
};
|
|
26142
26248
|
const asyncDef = this._def.__asyncLoader;
|
|
26143
26249
|
if (asyncDef) {
|
|
@@ -26507,6 +26613,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
26507
26613
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
26508
26614
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
26509
26615
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
26616
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
26510
26617
|
const decorate = (t) => {
|
|
26511
26618
|
delete t.props.mode;
|
|
26512
26619
|
return t;
|
|
@@ -26522,21 +26629,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
26522
26629
|
const state = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState)();
|
|
26523
26630
|
let prevChildren;
|
|
26524
26631
|
let children;
|
|
26525
|
-
|
|
26526
|
-
|
|
26527
|
-
|
|
26632
|
+
let origins;
|
|
26633
|
+
let moves;
|
|
26634
|
+
const willMove = () => {
|
|
26635
|
+
if (moves === void 0) {
|
|
26636
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
26637
|
+
prevChildren[0].el,
|
|
26638
|
+
instance.vnode.el,
|
|
26639
|
+
resolveMoveClass(props)
|
|
26640
|
+
);
|
|
26528
26641
|
}
|
|
26529
|
-
|
|
26530
|
-
|
|
26531
|
-
|
|
26532
|
-
|
|
26533
|
-
|
|
26534
|
-
)) {
|
|
26642
|
+
return moves;
|
|
26643
|
+
};
|
|
26644
|
+
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => {
|
|
26645
|
+
pendingGroups.delete(instance);
|
|
26646
|
+
if (!willMove()) {
|
|
26535
26647
|
prevChildren = [];
|
|
26648
|
+
origins = void 0;
|
|
26536
26649
|
return;
|
|
26537
26650
|
}
|
|
26651
|
+
const moveClass = resolveMoveClass(props);
|
|
26538
26652
|
prevChildren.forEach(callPendingCbs);
|
|
26539
|
-
|
|
26653
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
26654
|
+
origins = void 0;
|
|
26655
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
26540
26656
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
26541
26657
|
forceReflow(instance.vnode.el);
|
|
26542
26658
|
movedChildren.forEach((c) => {
|
|
@@ -26563,6 +26679,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
26563
26679
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
26564
26680
|
let tag = rawProps.tag || _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment;
|
|
26565
26681
|
prevChildren = [];
|
|
26682
|
+
moves = void 0;
|
|
26566
26683
|
if (children) {
|
|
26567
26684
|
for (let i = 0; i < children.length; i++) {
|
|
26568
26685
|
const child = children[i];
|
|
@@ -26594,6 +26711,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
26594
26711
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<TransitionGroup> children must be keyed.`);
|
|
26595
26712
|
}
|
|
26596
26713
|
}
|
|
26714
|
+
if (prevChildren.length) {
|
|
26715
|
+
origins = getOrigins(instance);
|
|
26716
|
+
pendingGroups.set(instance, willMove);
|
|
26717
|
+
}
|
|
26597
26718
|
return (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(tag, null, children);
|
|
26598
26719
|
};
|
|
26599
26720
|
}
|
|
@@ -26608,8 +26729,11 @@ function callPendingCbs(c) {
|
|
|
26608
26729
|
el[enterCbKey]();
|
|
26609
26730
|
}
|
|
26610
26731
|
}
|
|
26611
|
-
function
|
|
26612
|
-
|
|
26732
|
+
function resolveMoveClass(props) {
|
|
26733
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
26734
|
+
}
|
|
26735
|
+
function recordPosition(c, shift) {
|
|
26736
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
26613
26737
|
}
|
|
26614
26738
|
function applyTranslation(c) {
|
|
26615
26739
|
const oldPos = positionMap.get(c);
|
|
@@ -26633,13 +26757,41 @@ function applyTranslation(c) {
|
|
|
26633
26757
|
return c;
|
|
26634
26758
|
}
|
|
26635
26759
|
}
|
|
26636
|
-
function getPosition(el) {
|
|
26760
|
+
function getPosition(el, shift) {
|
|
26637
26761
|
const rect = el.getBoundingClientRect();
|
|
26638
26762
|
return {
|
|
26639
|
-
left: rect.left,
|
|
26640
|
-
top: rect.top
|
|
26763
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
26764
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
26641
26765
|
};
|
|
26642
26766
|
}
|
|
26767
|
+
function getOrigins(instance) {
|
|
26768
|
+
let origins;
|
|
26769
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
26770
|
+
const willMove = pendingGroups.get(group);
|
|
26771
|
+
if (willMove) {
|
|
26772
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
26773
|
+
if (item) {
|
|
26774
|
+
(origins || (origins = [])).push(
|
|
26775
|
+
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__.extend)(getPosition(item), { item, willMove })
|
|
26776
|
+
);
|
|
26777
|
+
}
|
|
26778
|
+
}
|
|
26779
|
+
}
|
|
26780
|
+
return origins;
|
|
26781
|
+
}
|
|
26782
|
+
function findItem(root, node) {
|
|
26783
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
26784
|
+
while (node && node.parentNode !== container) {
|
|
26785
|
+
node = node.parentNode;
|
|
26786
|
+
}
|
|
26787
|
+
if (node && node.nodeType === 1) {
|
|
26788
|
+
return node;
|
|
26789
|
+
}
|
|
26790
|
+
}
|
|
26791
|
+
function getOriginShift(origins, root) {
|
|
26792
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
26793
|
+
return origin && getPosition(origin.item, origin);
|
|
26794
|
+
}
|
|
26643
26795
|
function hasCSSTransform(el, root, moveClass) {
|
|
26644
26796
|
const clone = el.cloneNode();
|
|
26645
26797
|
const _vtc = el[vtcKey];
|
|
@@ -27241,7 +27393,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27241
27393
|
/* harmony export */ toTypeString: () => (/* binding */ toTypeString)
|
|
27242
27394
|
/* harmony export */ });
|
|
27243
27395
|
/**
|
|
27244
|
-
* @vue/shared v3.5.
|
|
27396
|
+
* @vue/shared v3.5.44
|
|
27245
27397
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
27246
27398
|
* @license MIT
|
|
27247
27399
|
**/
|
|
@@ -27574,7 +27726,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
27574
27726
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
27575
27727
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
27576
27728
|
|
|
27577
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
27729
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
27578
27730
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
27579
27731
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
27580
27732
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -29196,7 +29348,7 @@ var reportErrorIfPathIsNotConfigured = function () {
|
|
|
29196
29348
|
reportErrorIfPathIsNotConfigured = function () { };
|
|
29197
29349
|
}
|
|
29198
29350
|
};
|
|
29199
|
-
exports.version = "1.
|
|
29351
|
+
exports.version = "1.45.0";
|
|
29200
29352
|
|
|
29201
29353
|
});
|
|
29202
29354
|
|
|
@@ -32343,14 +32495,15 @@ var MouseHandler = /** @class */ (function () {
|
|
|
32343
32495
|
var character = editor.renderer.screenToTextCoordinates(e.x, e.y);
|
|
32344
32496
|
var range = editor.session.selection.getRange();
|
|
32345
32497
|
var renderer = editor.renderer;
|
|
32498
|
+
if (renderer.scroller.style.cursor == "crosshair")
|
|
32499
|
+
return;
|
|
32346
32500
|
if (!range.isEmpty() && range.insideStart(character.row, character.column)) {
|
|
32347
32501
|
renderer.setCursorStyle("default");
|
|
32348
32502
|
}
|
|
32349
32503
|
else {
|
|
32350
32504
|
renderer.setCursorStyle("");
|
|
32351
32505
|
}
|
|
32352
|
-
}
|
|
32353
|
-
editor);
|
|
32506
|
+
});
|
|
32354
32507
|
}
|
|
32355
32508
|
MouseHandler.prototype.onMouseEvent = function (name, e) {
|
|
32356
32509
|
if (!this.editor.session)
|
|
@@ -32971,12 +33124,7 @@ var BidiHandler = /** @class */ (function () {
|
|
|
32971
33124
|
BidiHandler.prototype.isBidiRow = function (screenRow, docRow, splitIndex) {
|
|
32972
33125
|
if (!this.seenBidi)
|
|
32973
33126
|
return false;
|
|
32974
|
-
|
|
32975
|
-
this.currentRow = screenRow;
|
|
32976
|
-
this.updateRowLine(docRow, splitIndex);
|
|
32977
|
-
this.updateBidiMap();
|
|
32978
|
-
}
|
|
32979
|
-
return this.bidiMap.bidiLevels;
|
|
33127
|
+
return true;
|
|
32980
33128
|
};
|
|
32981
33129
|
BidiHandler.prototype.onChange = function (delta) {
|
|
32982
33130
|
if (!this.seenBidi) {
|
|
@@ -33017,74 +33165,9 @@ var BidiHandler = /** @class */ (function () {
|
|
|
33017
33165
|
}
|
|
33018
33166
|
return splitIndex;
|
|
33019
33167
|
};
|
|
33020
|
-
BidiHandler.prototype.updateRowLine = function (docRow, splitIndex) {
|
|
33021
|
-
if (docRow === undefined)
|
|
33022
|
-
docRow = this.getDocumentRow();
|
|
33023
|
-
var isLastRow = (docRow === this.session.getLength() - 1), endOfLine = isLastRow ? this.EOF : this.EOL;
|
|
33024
|
-
this.wrapIndent = 0;
|
|
33025
|
-
this.line = this.session.getLine(docRow);
|
|
33026
|
-
this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE;
|
|
33027
|
-
if (this.session.$useWrapMode) {
|
|
33028
|
-
var splits = this.session.$wrapData[docRow];
|
|
33029
|
-
if (splits) {
|
|
33030
|
-
if (splitIndex === undefined)
|
|
33031
|
-
splitIndex = this.getSplitIndex();
|
|
33032
|
-
if (splitIndex > 0 && splits.length) {
|
|
33033
|
-
this.wrapIndent = splits.indent;
|
|
33034
|
-
this.wrapOffset = this.wrapIndent * this.charWidths[bidiUtil.L];
|
|
33035
|
-
this.line = (splitIndex < splits.length) ?
|
|
33036
|
-
this.line.substring(splits[splitIndex - 1], splits[splitIndex]) :
|
|
33037
|
-
this.line.substring(splits[splits.length - 1]);
|
|
33038
|
-
}
|
|
33039
|
-
else {
|
|
33040
|
-
this.line = this.line.substring(0, splits[splitIndex]);
|
|
33041
|
-
}
|
|
33042
|
-
if (splitIndex == splits.length) {
|
|
33043
|
-
this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT;
|
|
33044
|
-
}
|
|
33045
|
-
}
|
|
33046
|
-
}
|
|
33047
|
-
else {
|
|
33048
|
-
this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT;
|
|
33049
|
-
}
|
|
33050
|
-
var session = this.session, shift = 0, size;
|
|
33051
|
-
this.line = this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g, function (ch, i) {
|
|
33052
|
-
if (ch === '\t' || session.isFullWidth(ch.charCodeAt(0))) {
|
|
33053
|
-
size = (ch === '\t') ? session.getScreenTabSize(i + shift) : 2;
|
|
33054
|
-
shift += size - 1;
|
|
33055
|
-
return lang.stringRepeat(bidiUtil.DOT, size);
|
|
33056
|
-
}
|
|
33057
|
-
return ch;
|
|
33058
|
-
});
|
|
33059
|
-
if (this.isRtlDir) {
|
|
33060
|
-
this.fontMetrics.$main.textContent = (this.line.charAt(this.line.length - 1) == bidiUtil.DOT) ? this.line.substr(0, this.line.length - 1) : this.line;
|
|
33061
|
-
this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width;
|
|
33062
|
-
}
|
|
33063
|
-
};
|
|
33064
|
-
BidiHandler.prototype.updateBidiMap = function () {
|
|
33065
|
-
var textCharTypes = [];
|
|
33066
|
-
if (bidiUtil.hasBidiCharacters(this.line, textCharTypes) || this.isRtlDir) {
|
|
33067
|
-
this.bidiMap = bidiUtil.doBidiReorder(this.line, textCharTypes, this.isRtlDir);
|
|
33068
|
-
}
|
|
33069
|
-
else {
|
|
33070
|
-
this.bidiMap = {};
|
|
33071
|
-
}
|
|
33072
|
-
};
|
|
33073
33168
|
BidiHandler.prototype.markAsDirty = function () {
|
|
33074
33169
|
this.currentRow = null;
|
|
33075
33170
|
};
|
|
33076
|
-
BidiHandler.prototype.updateCharacterWidths = function (fontMetrics) {
|
|
33077
|
-
if (this.characterWidth === fontMetrics.$characterSize.width)
|
|
33078
|
-
return;
|
|
33079
|
-
this.fontMetrics = fontMetrics;
|
|
33080
|
-
var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;
|
|
33081
|
-
var bidiCharWidth = fontMetrics.$measureCharWidth("\u05d4");
|
|
33082
|
-
this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;
|
|
33083
|
-
this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;
|
|
33084
|
-
this.charWidths[bidiUtil.R_H] = bidiCharWidth * 0.45;
|
|
33085
|
-
this.charWidths[bidiUtil.B] = this.charWidths[bidiUtil.RLE] = 0;
|
|
33086
|
-
this.currentRow = null;
|
|
33087
|
-
};
|
|
33088
33171
|
BidiHandler.prototype.setShowInvisibles = function (showInvisibles) {
|
|
33089
33172
|
this.showInvisibles = showInvisibles;
|
|
33090
33173
|
this.currentRow = null;
|
|
@@ -33112,87 +33195,6 @@ var BidiHandler = /** @class */ (function () {
|
|
|
33112
33195
|
editor.session.doc.insert({ column: 0, row: row }, editor.session.$bidiHandler.RLE);
|
|
33113
33196
|
}
|
|
33114
33197
|
};
|
|
33115
|
-
BidiHandler.prototype.getPosLeft = function (col) {
|
|
33116
|
-
col -= this.wrapIndent;
|
|
33117
|
-
var leftBoundary = (this.line.charAt(0) === this.RLE) ? 1 : 0;
|
|
33118
|
-
var logicalIdx = (col > leftBoundary) ? (this.session.getOverwrite() ? col : col - 1) : leftBoundary;
|
|
33119
|
-
var visualIdx = bidiUtil.getVisualFromLogicalIdx(logicalIdx, this.bidiMap), levels = this.bidiMap.bidiLevels, left = 0;
|
|
33120
|
-
if (!this.session.getOverwrite() && col <= leftBoundary && levels[visualIdx] % 2 !== 0)
|
|
33121
|
-
visualIdx++;
|
|
33122
|
-
for (var i = 0; i < visualIdx; i++) {
|
|
33123
|
-
left += this.charWidths[levels[i]];
|
|
33124
|
-
}
|
|
33125
|
-
if (!this.session.getOverwrite() && (col > leftBoundary) && (levels[visualIdx] % 2 === 0))
|
|
33126
|
-
left += this.charWidths[levels[visualIdx]];
|
|
33127
|
-
if (this.wrapIndent)
|
|
33128
|
-
left += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;
|
|
33129
|
-
if (this.isRtlDir)
|
|
33130
|
-
left += this.rtlLineOffset;
|
|
33131
|
-
return left;
|
|
33132
|
-
};
|
|
33133
|
-
BidiHandler.prototype.getSelections = function (startCol, endCol) {
|
|
33134
|
-
var map = this.bidiMap, levels = map.bidiLevels, level, selections = [], offset = 0, selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent, isSelected = false, isSelectedPrev = false, selectionStart = 0;
|
|
33135
|
-
if (this.wrapIndent)
|
|
33136
|
-
offset += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;
|
|
33137
|
-
for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {
|
|
33138
|
-
logIdx = map.logicalFromVisual[visIdx];
|
|
33139
|
-
level = levels[visIdx];
|
|
33140
|
-
isSelected = (logIdx >= selColMin) && (logIdx < selColMax);
|
|
33141
|
-
if (isSelected && !isSelectedPrev) {
|
|
33142
|
-
selectionStart = offset;
|
|
33143
|
-
}
|
|
33144
|
-
else if (!isSelected && isSelectedPrev) {
|
|
33145
|
-
selections.push({ left: selectionStart, width: offset - selectionStart });
|
|
33146
|
-
}
|
|
33147
|
-
offset += this.charWidths[level];
|
|
33148
|
-
isSelectedPrev = isSelected;
|
|
33149
|
-
}
|
|
33150
|
-
if (isSelected && (visIdx === levels.length)) {
|
|
33151
|
-
selections.push({ left: selectionStart, width: offset - selectionStart });
|
|
33152
|
-
}
|
|
33153
|
-
if (this.isRtlDir) {
|
|
33154
|
-
for (var i = 0; i < selections.length; i++) {
|
|
33155
|
-
selections[i].left += this.rtlLineOffset;
|
|
33156
|
-
}
|
|
33157
|
-
}
|
|
33158
|
-
return selections;
|
|
33159
|
-
};
|
|
33160
|
-
BidiHandler.prototype.offsetToCol = function (posX) {
|
|
33161
|
-
if (this.isRtlDir)
|
|
33162
|
-
posX -= this.rtlLineOffset;
|
|
33163
|
-
var logicalIdx = 0, posX = Math.max(posX, 0), offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels, charWidth = this.charWidths[levels[visualIdx]];
|
|
33164
|
-
if (this.wrapIndent)
|
|
33165
|
-
posX -= this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;
|
|
33166
|
-
while (posX > offset + charWidth / 2) {
|
|
33167
|
-
offset += charWidth;
|
|
33168
|
-
if (visualIdx === levels.length - 1) {
|
|
33169
|
-
charWidth = 0;
|
|
33170
|
-
break;
|
|
33171
|
-
}
|
|
33172
|
-
charWidth = this.charWidths[levels[++visualIdx]];
|
|
33173
|
-
}
|
|
33174
|
-
if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)) {
|
|
33175
|
-
if (posX < offset)
|
|
33176
|
-
visualIdx--;
|
|
33177
|
-
logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];
|
|
33178
|
-
}
|
|
33179
|
-
else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)) {
|
|
33180
|
-
logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]
|
|
33181
|
-
: this.bidiMap.logicalFromVisual[visualIdx - 1]);
|
|
33182
|
-
}
|
|
33183
|
-
else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))
|
|
33184
|
-
|| (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))) {
|
|
33185
|
-
logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];
|
|
33186
|
-
}
|
|
33187
|
-
else {
|
|
33188
|
-
if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)
|
|
33189
|
-
visualIdx--;
|
|
33190
|
-
logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];
|
|
33191
|
-
}
|
|
33192
|
-
if (logicalIdx === 0 && this.isRtlDir)
|
|
33193
|
-
logicalIdx++;
|
|
33194
|
-
return (logicalIdx + this.wrapIndent);
|
|
33195
|
-
};
|
|
33196
33198
|
return BidiHandler;
|
|
33197
33199
|
}());
|
|
33198
33200
|
exports.BidiHandler = BidiHandler;
|
|
@@ -33624,15 +33626,13 @@ var Selection = /** @class */ (function () {
|
|
|
33624
33626
|
Selection.prototype.moveCursorBy = function (rows, chars) {
|
|
33625
33627
|
var screenPos = this.session.documentToScreenPosition(this.lead.row, this.lead.column);
|
|
33626
33628
|
var offsetX;
|
|
33629
|
+
var fontMetrics = this.session.$fontMetrics;
|
|
33630
|
+
var useFontMetrics = chars === 0 && rows !== 0 && fontMetrics;
|
|
33627
33631
|
if (chars === 0) {
|
|
33628
|
-
if (
|
|
33629
|
-
|
|
33630
|
-
|
|
33631
|
-
|
|
33632
|
-
}
|
|
33633
|
-
else {
|
|
33634
|
-
offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];
|
|
33635
|
-
}
|
|
33632
|
+
if (useFontMetrics && this.$desiredColumn == null) {
|
|
33633
|
+
offsetX = fontMetrics.textWidth(screenPos.row, screenPos.column);
|
|
33634
|
+
if (isFinite(offsetX))
|
|
33635
|
+
this.$desiredColumn = offsetX / fontMetrics.config.characterWidth;
|
|
33636
33636
|
}
|
|
33637
33637
|
if (this.$desiredColumn)
|
|
33638
33638
|
screenPos.column = this.$desiredColumn;
|
|
@@ -33646,9 +33646,13 @@ var Selection = /** @class */ (function () {
|
|
|
33646
33646
|
else if (rows > 0)
|
|
33647
33647
|
rows += widget.rowCount - (widget.rowsAbove || 0);
|
|
33648
33648
|
}
|
|
33649
|
-
var
|
|
33650
|
-
if (
|
|
33649
|
+
var targetScreenRow = screenPos.row + rows;
|
|
33650
|
+
if (useFontMetrics && this.$desiredColumn != null) {
|
|
33651
|
+
offsetX = this.$desiredColumn * fontMetrics.config.characterWidth;
|
|
33652
|
+
var blockCursor = fontMetrics.renderer && fontMetrics.renderer.$blockCursor;
|
|
33653
|
+
screenPos.column = fontMetrics.$pixelToColumn(targetScreenRow, screenPos.column, offsetX, blockCursor, true);
|
|
33651
33654
|
}
|
|
33655
|
+
var docPos = this.session.screenToDocumentPosition(targetScreenRow, screenPos.column);
|
|
33652
33656
|
this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
|
|
33653
33657
|
};
|
|
33654
33658
|
Selection.prototype.moveCursorToPosition = function (position) {
|
|
@@ -33919,6 +33923,37 @@ var Tokenizer = /** @class */ (function () {
|
|
|
33919
33923
|
if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end)))
|
|
33920
33924
|
src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);
|
|
33921
33925
|
}
|
|
33926
|
+
var leadingLookbehind;
|
|
33927
|
+
while ((leadingLookbehind = /^(?:\((?:\?:)?)*\(\?<[=!]/.exec(src))) {
|
|
33928
|
+
var start = leadingLookbehind[0].length - 4;
|
|
33929
|
+
var end = -1;
|
|
33930
|
+
var depth = 0;
|
|
33931
|
+
var inClass = false;
|
|
33932
|
+
var re = /\\.|[\[\]()]/g;
|
|
33933
|
+
re.lastIndex = start;
|
|
33934
|
+
var m;
|
|
33935
|
+
while ((m = re.exec(src))) {
|
|
33936
|
+
var ch = m[0];
|
|
33937
|
+
if (ch.length > 1)
|
|
33938
|
+
continue;
|
|
33939
|
+
if (inClass) {
|
|
33940
|
+
inClass = ch != "]";
|
|
33941
|
+
}
|
|
33942
|
+
else if (ch == "[") {
|
|
33943
|
+
inClass = true;
|
|
33944
|
+
}
|
|
33945
|
+
else if (ch == "(") {
|
|
33946
|
+
depth++;
|
|
33947
|
+
}
|
|
33948
|
+
else if (ch == ")" && --depth == 0) {
|
|
33949
|
+
end = m.index + 1;
|
|
33950
|
+
break;
|
|
33951
|
+
}
|
|
33952
|
+
}
|
|
33953
|
+
if (end == -1)
|
|
33954
|
+
break;
|
|
33955
|
+
src = src.substring(0, start) + src.substr(end);
|
|
33956
|
+
}
|
|
33922
33957
|
if (src.charAt(0) != "^")
|
|
33923
33958
|
src = "^" + src;
|
|
33924
33959
|
if (src.charAt(src.length - 1) != "$")
|
|
@@ -36143,9 +36178,11 @@ var SearchHighlight = /** @class */ (function () {
|
|
|
36143
36178
|
var renderedMarkerRanges = {};
|
|
36144
36179
|
var _search = session.$editor && session.$editor.$search;
|
|
36145
36180
|
var mtSearch = _search && _search.$isMultilineSearch(session.$editor.getLastSearchOptions());
|
|
36181
|
+
var docLen = session.getValue().length;
|
|
36182
|
+
var cacheInvalid = docLen != this.docLen;
|
|
36146
36183
|
for (var i = start; i <= end; i++) {
|
|
36147
36184
|
var ranges = this.cache[i];
|
|
36148
|
-
if (ranges == null ||
|
|
36185
|
+
if (ranges == null || cacheInvalid) {
|
|
36149
36186
|
if (mtSearch) {
|
|
36150
36187
|
ranges = [];
|
|
36151
36188
|
var match = _search.$multiLineForward(session, this.regExp, i, end);
|
|
@@ -36179,7 +36216,7 @@ var SearchHighlight = /** @class */ (function () {
|
|
|
36179
36216
|
markerLayer.drawSingleLineMarker(html, rangeToAddMarkerTo, this.clazz, config);
|
|
36180
36217
|
}
|
|
36181
36218
|
}
|
|
36182
|
-
this.docLen =
|
|
36219
|
+
this.docLen = docLen;
|
|
36183
36220
|
};
|
|
36184
36221
|
return SearchHighlight;
|
|
36185
36222
|
}());
|
|
@@ -36363,8 +36400,10 @@ var UndoManager = /** @class */ (function () {
|
|
|
36363
36400
|
};
|
|
36364
36401
|
UndoManager.prototype.fromJSON = function (json) {
|
|
36365
36402
|
this.reset();
|
|
36366
|
-
|
|
36367
|
-
|
|
36403
|
+
if (!json)
|
|
36404
|
+
return;
|
|
36405
|
+
this.$undoStack = json.$undoStack || [];
|
|
36406
|
+
this.$redoStack = json.$redoStack || [];
|
|
36368
36407
|
};
|
|
36369
36408
|
UndoManager.prototype.$prettyPrint = function (delta) {
|
|
36370
36409
|
if (delta)
|
|
@@ -38486,10 +38525,12 @@ var EditSession = /** @class */ (function () {
|
|
|
38486
38525
|
if (typeof session == "string")
|
|
38487
38526
|
session = JSON.parse(session);
|
|
38488
38527
|
var undoManager = new UndoManager();
|
|
38489
|
-
|
|
38490
|
-
|
|
38491
|
-
|
|
38492
|
-
|
|
38528
|
+
if (session.history) {
|
|
38529
|
+
undoManager.$undoStack = session.history.$undoStack || [];
|
|
38530
|
+
undoManager.$redoStack = session.history.$redoStack || [];
|
|
38531
|
+
undoManager.mark = session.history.mark || 0;
|
|
38532
|
+
undoManager.$rev = session.history.rev || 0;
|
|
38533
|
+
}
|
|
38493
38534
|
var editSession = new EditSession(session.value);
|
|
38494
38535
|
session.folds.forEach(function (fold) {
|
|
38495
38536
|
editSession.addFold("...", Range.fromPoints(fold.start, fold.end));
|
|
@@ -39533,9 +39574,6 @@ var EditSession = /** @class */ (function () {
|
|
|
39533
39574
|
if (c == 9) {
|
|
39534
39575
|
screenColumn += this.getScreenTabSize(screenColumn);
|
|
39535
39576
|
}
|
|
39536
|
-
else if (c >= 0x1100 && isFullWidth(c)) {
|
|
39537
|
-
screenColumn += 2;
|
|
39538
|
-
}
|
|
39539
39577
|
else {
|
|
39540
39578
|
screenColumn += 1;
|
|
39541
39579
|
}
|
|
@@ -39601,7 +39639,7 @@ var EditSession = /** @class */ (function () {
|
|
|
39601
39639
|
EditSession.prototype.screenToDocumentColumn = function (screenRow, screenColumn) {
|
|
39602
39640
|
return this.screenToDocumentPosition(screenRow, screenColumn).column;
|
|
39603
39641
|
};
|
|
39604
|
-
EditSession.prototype.screenToDocumentPosition = function (screenRow, screenColumn
|
|
39642
|
+
EditSession.prototype.screenToDocumentPosition = function (screenRow, screenColumn) {
|
|
39605
39643
|
if (screenRow < 0)
|
|
39606
39644
|
return { row: 0, column: 0 };
|
|
39607
39645
|
var line;
|
|
@@ -39669,8 +39707,6 @@ var EditSession = /** @class */ (function () {
|
|
|
39669
39707
|
}
|
|
39670
39708
|
}
|
|
39671
39709
|
}
|
|
39672
|
-
if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))
|
|
39673
|
-
screenColumn = this.$bidiHandler.offsetToCol(offsetX);
|
|
39674
39710
|
docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];
|
|
39675
39711
|
if (this.$useWrapMode && docColumn >= column)
|
|
39676
39712
|
docColumn = column - 1;
|
|
@@ -42321,6 +42357,7 @@ var Editor = /** @class */ (function () {
|
|
|
42321
42357
|
this.session.off("startOperation", this.$onStartOperation);
|
|
42322
42358
|
this.session.off("endOperation", this.$onEndOperation);
|
|
42323
42359
|
var selection = this.session.getSelection();
|
|
42360
|
+
this.session.$fontMetrics = null;
|
|
42324
42361
|
selection.off("changeCursor", this.$onCursorChange);
|
|
42325
42362
|
selection.off("changeSelection", this.$onSelectionChange);
|
|
42326
42363
|
}
|
|
@@ -42329,6 +42366,7 @@ var Editor = /** @class */ (function () {
|
|
|
42329
42366
|
this.$onDocumentChange = this.onDocumentChange.bind(this);
|
|
42330
42367
|
session.on("change", this.$onDocumentChange);
|
|
42331
42368
|
this.renderer.setSession(session);
|
|
42369
|
+
session.$fontMetrics = this.renderer.$fontMetrics;
|
|
42332
42370
|
this.$onChangeMode = this.onChangeMode.bind(this);
|
|
42333
42371
|
session.on("changeMode", this.$onChangeMode);
|
|
42334
42372
|
this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
|
|
@@ -44224,6 +44262,24 @@ var Lines = /** @class */ (function () {
|
|
|
44224
44262
|
var lineTop = session.documentToScreenRow(row, 0) * config.lineHeight;
|
|
44225
44263
|
return lineTop - (screenPage * this.canvasHeight);
|
|
44226
44264
|
};
|
|
44265
|
+
Lines.prototype.$getCellByScreenRow = function (screenRow, config) {
|
|
44266
|
+
var screenTop = config.firstRowScreen * config.lineHeight;
|
|
44267
|
+
var screenPage = Math.floor(screenTop / this.canvasHeight);
|
|
44268
|
+
var lineTop = screenRow * config.lineHeight - (screenPage * this.canvasHeight);
|
|
44269
|
+
for (var i = this.cells.length - 1; i >= 0; i--) {
|
|
44270
|
+
var cell = this.cells[i];
|
|
44271
|
+
var top = parseInt(cell.element.style.top);
|
|
44272
|
+
var height = parseInt(cell.element.style.height);
|
|
44273
|
+
if (top <= lineTop) {
|
|
44274
|
+
if (top + height < lineTop) {
|
|
44275
|
+
return null;
|
|
44276
|
+
}
|
|
44277
|
+
var offset = lineTop - top;
|
|
44278
|
+
return { cell: cell, offset: offset };
|
|
44279
|
+
}
|
|
44280
|
+
}
|
|
44281
|
+
return null;
|
|
44282
|
+
};
|
|
44227
44283
|
Lines.prototype.computeLineHeight = function (row, config, session) {
|
|
44228
44284
|
return config.lineHeight * session.getRowLineCount(row);
|
|
44229
44285
|
};
|
|
@@ -44935,6 +44991,7 @@ var Marker = /** @class */ (function () {
|
|
|
44935
44991
|
if (!config)
|
|
44936
44992
|
return;
|
|
44937
44993
|
this.config = config;
|
|
44994
|
+
this.element.style.display = "none";
|
|
44938
44995
|
this.i = 0;
|
|
44939
44996
|
var html;
|
|
44940
44997
|
for (var key in this.markers) {
|
|
@@ -44949,7 +45006,7 @@ var Marker = /** @class */ (function () {
|
|
|
44949
45006
|
range = range.toScreenRange(this.session);
|
|
44950
45007
|
if (marker.renderer) {
|
|
44951
45008
|
var top = this.$getTop(range.start.row, config);
|
|
44952
|
-
var left = this.$padding + range.start.
|
|
45009
|
+
var left = this.$padding + config.fontMetrics.textWidth(range.start.row, range.start.column);
|
|
44953
45010
|
marker.renderer(html, range, left, top, config);
|
|
44954
45011
|
}
|
|
44955
45012
|
else if (marker.type == "fullLine") {
|
|
@@ -44972,6 +45029,7 @@ var Marker = /** @class */ (function () {
|
|
|
44972
45029
|
while (this.i < this.element.childElementCount)
|
|
44973
45030
|
this.element.removeChild(this.element.lastChild);
|
|
44974
45031
|
}
|
|
45032
|
+
this.element.style.display = "";
|
|
44975
45033
|
};
|
|
44976
45034
|
Marker.prototype.$getTop = function (row, layerConfig) {
|
|
44977
45035
|
return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
|
|
@@ -45000,12 +45058,12 @@ var Marker = /** @class */ (function () {
|
|
|
45000
45058
|
var padding = this.$padding;
|
|
45001
45059
|
var height = config.lineHeight;
|
|
45002
45060
|
var top = this.$getTop(range.start.row, config);
|
|
45003
|
-
var left = padding + range.start.
|
|
45061
|
+
var left = padding + config.fontMetrics.textWidth(range.start.row, range.start.column);
|
|
45004
45062
|
extraStyle = extraStyle || "";
|
|
45005
45063
|
if (this.session.$bidiHandler.isBidiRow(range.start.row)) {
|
|
45006
45064
|
var range1 = range.clone();
|
|
45007
45065
|
range1.end.row = range1.start.row;
|
|
45008
|
-
range1.end.column =
|
|
45066
|
+
range1.end.column = Number.MAX_VALUE;
|
|
45009
45067
|
this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br1 ace_start", config, null, extraStyle);
|
|
45010
45068
|
}
|
|
45011
45069
|
else {
|
|
@@ -45019,7 +45077,7 @@ var Marker = /** @class */ (function () {
|
|
|
45019
45077
|
}
|
|
45020
45078
|
else {
|
|
45021
45079
|
top = this.$getTop(range.end.row, config);
|
|
45022
|
-
var width = range.end.
|
|
45080
|
+
var width = config.fontMetrics.textWidth(range.end.row, range.end.column);
|
|
45023
45081
|
this.elt(clazz + " ace_br12", "height:" + height + "px;" +
|
|
45024
45082
|
"width:" + width + "px;" +
|
|
45025
45083
|
"top:" + top + "px;" +
|
|
@@ -45039,22 +45097,22 @@ var Marker = /** @class */ (function () {
|
|
|
45039
45097
|
if (this.session.$bidiHandler.isBidiRow(range.start.row))
|
|
45040
45098
|
return this.drawBidiSingleLineMarker(stringBuilder, range, clazz, config, extraLength, extraStyle);
|
|
45041
45099
|
var height = config.lineHeight;
|
|
45042
|
-
var
|
|
45100
|
+
var right = config.fontMetrics.textWidth(range.start.row, range.end.column) + (extraLength || 0) * config.characterWidth;
|
|
45043
45101
|
var top = this.$getTop(range.start.row, config);
|
|
45044
|
-
var left =
|
|
45102
|
+
var left = config.fontMetrics.textWidth(range.start.row, range.start.column);
|
|
45045
45103
|
this.elt(clazz, "height:" + height + "px;" +
|
|
45046
|
-
"width:" +
|
|
45104
|
+
"width:" + (right - left) + "px;" +
|
|
45047
45105
|
"top:" + top + "px;" +
|
|
45048
|
-
"left:" + left + "px;" + (extraStyle || ""));
|
|
45106
|
+
"left:" + (this.$padding + left) + "px;" + (extraStyle || ""));
|
|
45049
45107
|
};
|
|
45050
45108
|
Marker.prototype.drawBidiSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {
|
|
45051
45109
|
var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;
|
|
45052
|
-
var
|
|
45053
|
-
|
|
45110
|
+
var rects = this.config.fontMetrics.getRects(range.start, range.end);
|
|
45111
|
+
rects.forEach(function (rect) {
|
|
45054
45112
|
this.elt(clazz, "height:" + height + "px;" +
|
|
45055
|
-
"width:" + (
|
|
45113
|
+
"width:" + (rect.width + (extraLength || 0)) + "px;" +
|
|
45056
45114
|
"top:" + top + "px;" +
|
|
45057
|
-
"left:" + (padding +
|
|
45115
|
+
"left:" + (padding + rect.left) + "px;" + (extraStyle || ""));
|
|
45058
45116
|
}, this);
|
|
45059
45117
|
};
|
|
45060
45118
|
Marker.prototype.drawFullLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {
|
|
@@ -45336,7 +45394,7 @@ var Text = /** @class */ (function () {
|
|
|
45336
45394
|
};
|
|
45337
45395
|
Text.prototype.$renderToken = function (parent, screenColumn, token, value) {
|
|
45338
45396
|
var self = this;
|
|
45339
|
-
var re = /(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)
|
|
45397
|
+
var re = /(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200C\u200E\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000+)/g;
|
|
45340
45398
|
var valueFragment = this.dom.createFragment(this.element);
|
|
45341
45399
|
var m;
|
|
45342
45400
|
var i = 0;
|
|
@@ -45345,7 +45403,6 @@ var Text = /** @class */ (function () {
|
|
|
45345
45403
|
var simpleSpace = m[2];
|
|
45346
45404
|
var controlCharacter = m[3];
|
|
45347
45405
|
var cjkSpace = m[4];
|
|
45348
|
-
var cjk = m[5];
|
|
45349
45406
|
if (!self.showSpaces && simpleSpace)
|
|
45350
45407
|
continue;
|
|
45351
45408
|
var before = i != m.index ? value.slice(i, m.index) : "";
|
|
@@ -45378,23 +45435,26 @@ var Text = /** @class */ (function () {
|
|
|
45378
45435
|
valueFragment.appendChild(span);
|
|
45379
45436
|
}
|
|
45380
45437
|
else if (cjkSpace) {
|
|
45381
|
-
|
|
45382
|
-
|
|
45383
|
-
|
|
45384
|
-
|
|
45385
|
-
|
|
45386
|
-
|
|
45438
|
+
if (self.showSpaces) {
|
|
45439
|
+
var span = this.dom.createElement("span");
|
|
45440
|
+
span.className = "ace_invisible ace_invisible_space";
|
|
45441
|
+
span.textContent = lang.stringRepeat(self.CJK_SPACE_CHAR, cjkSpace.length);
|
|
45442
|
+
valueFragment.appendChild(span);
|
|
45443
|
+
}
|
|
45444
|
+
else {
|
|
45445
|
+
valueFragment.appendChild(this.dom.createTextNode(cjkSpace, this.element));
|
|
45446
|
+
}
|
|
45387
45447
|
}
|
|
45388
|
-
|
|
45389
|
-
|
|
45390
|
-
|
|
45391
|
-
|
|
45392
|
-
|
|
45393
|
-
span.textContent = cjk;
|
|
45394
|
-
valueFragment.appendChild(span);
|
|
45448
|
+
}
|
|
45449
|
+
var trimmedValue = i ? value.slice(i) : value;
|
|
45450
|
+
if (trimmedValue.length > 256) {
|
|
45451
|
+
for (var j = 0; j < trimmedValue.length;) {
|
|
45452
|
+
valueFragment.appendChild(this.dom.createTextNode(trimmedValue.slice(j, j += 256), this.element));
|
|
45395
45453
|
}
|
|
45396
45454
|
}
|
|
45397
|
-
|
|
45455
|
+
else {
|
|
45456
|
+
valueFragment.appendChild(this.dom.createTextNode(trimmedValue, this.element));
|
|
45457
|
+
}
|
|
45398
45458
|
if (!isTextToken(token.type)) {
|
|
45399
45459
|
var classes = "ace_" + token.type.replace(/\./g, " ace_");
|
|
45400
45460
|
var span = this.dom.createElement("span");
|
|
@@ -45715,6 +45775,7 @@ Text.prototype.EOL_CHAR_CRLF = "\xa4";
|
|
|
45715
45775
|
Text.prototype.EOL_CHAR = Text.prototype.EOL_CHAR_LF;
|
|
45716
45776
|
Text.prototype.TAB_CHAR = "\u2014"; //"\u21E5";
|
|
45717
45777
|
Text.prototype.SPACE_CHAR = "\xB7";
|
|
45778
|
+
Text.prototype.CJK_SPACE_CHAR = "\u30FB";
|
|
45718
45779
|
Text.prototype.$padding = 0;
|
|
45719
45780
|
Text.prototype.MAX_LINE_LENGTH = 10000;
|
|
45720
45781
|
Text.prototype.showInvisibles = false;
|
|
@@ -45857,16 +45918,16 @@ var Cursor = /** @class */ (function () {
|
|
|
45857
45918
|
};
|
|
45858
45919
|
Cursor.prototype.getPixelPosition = function (position, onScreen) {
|
|
45859
45920
|
if (!this.config || !this.session)
|
|
45860
|
-
return { left: 0, top: 0 };
|
|
45921
|
+
return { left: 0, top: 0, width: 0 };
|
|
45861
45922
|
if (!position)
|
|
45862
45923
|
position = this.session.selection.getCursor();
|
|
45863
45924
|
var pos = this.session.documentToScreenPosition(position);
|
|
45864
|
-
var
|
|
45865
|
-
|
|
45866
|
-
: pos.column * this.config.characterWidth);
|
|
45925
|
+
var textWidth = this.config.fontMetrics.textWidth(pos.row, pos.column);
|
|
45926
|
+
var cursorLeft = this.$padding + textWidth;
|
|
45867
45927
|
var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
|
|
45868
45928
|
this.config.lineHeight;
|
|
45869
|
-
|
|
45929
|
+
var cursorWidth = this.config.fontMetrics.textWidth(pos.row, pos.column + 1) - textWidth;
|
|
45930
|
+
return { left: cursorLeft, top: cursorTop, width: Math.abs(cursorWidth) || this.config.characterWidth };
|
|
45870
45931
|
};
|
|
45871
45932
|
Cursor.prototype.isCursorInView = function (pixelPos, config) {
|
|
45872
45933
|
return pixelPos.top >= 0 && pixelPos.top < config.maxHeight;
|
|
@@ -45893,7 +45954,7 @@ var Cursor = /** @class */ (function () {
|
|
|
45893
45954
|
else {
|
|
45894
45955
|
dom.setStyle(style, "display", "block");
|
|
45895
45956
|
dom.translate(element, pixelPos.left, pixelPos.top);
|
|
45896
|
-
dom.setStyle(style, "width", Math.round(
|
|
45957
|
+
dom.setStyle(style, "width", Math.round(pixelPos.width) + "px");
|
|
45897
45958
|
dom.setStyle(style, "height", config.lineHeight + "px");
|
|
45898
45959
|
}
|
|
45899
45960
|
}
|
|
@@ -46354,17 +46415,36 @@ exports.RenderLoop = RenderLoop;
|
|
|
46354
46415
|
|
|
46355
46416
|
});
|
|
46356
46417
|
|
|
46357
|
-
ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/
|
|
46418
|
+
ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module){var __read = (this && this.__read) || function (o, n) {
|
|
46419
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
46420
|
+
if (!m) return o;
|
|
46421
|
+
var i = m.call(o), r, ar = [], e;
|
|
46422
|
+
try {
|
|
46423
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
46424
|
+
}
|
|
46425
|
+
catch (error) { e = { error: error }; }
|
|
46426
|
+
finally {
|
|
46427
|
+
try {
|
|
46428
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
46429
|
+
}
|
|
46430
|
+
finally { if (e) throw e.error; }
|
|
46431
|
+
}
|
|
46432
|
+
return ar;
|
|
46433
|
+
};
|
|
46434
|
+
var oop = require("../lib/oop");
|
|
46358
46435
|
var dom = require("../lib/dom");
|
|
46359
46436
|
var lang = require("../lib/lang");
|
|
46360
46437
|
var event = require("../lib/event");
|
|
46361
|
-
var useragent = require("../lib/useragent");
|
|
46362
46438
|
var EventEmitter = require("../lib/event_emitter").EventEmitter;
|
|
46363
46439
|
var CHAR_COUNT = 512;
|
|
46364
46440
|
var USE_OBSERVER = typeof ResizeObserver == "function";
|
|
46365
46441
|
var L = 200;
|
|
46366
46442
|
var FontMetrics = /** @class */ (function () {
|
|
46367
|
-
function FontMetrics(parentEl) {
|
|
46443
|
+
function FontMetrics(parentEl, textLayer, renderer) {
|
|
46444
|
+
this.config = { characterWidth: 1 };
|
|
46445
|
+
this.$characterSize = { width: 0, height: 0 };
|
|
46446
|
+
this.textLayer = textLayer;
|
|
46447
|
+
this.renderer = renderer;
|
|
46368
46448
|
this.el = dom.createElement("div");
|
|
46369
46449
|
this.$setMeasureNodeStyles(this.el.style, true);
|
|
46370
46450
|
this.$main = dom.createElement("div");
|
|
@@ -46375,11 +46455,12 @@ var FontMetrics = /** @class */ (function () {
|
|
|
46375
46455
|
this.el.appendChild(this.$measureNode);
|
|
46376
46456
|
parentEl.appendChild(this.el);
|
|
46377
46457
|
this.$measureNode.textContent = lang.stringRepeat("X", CHAR_COUNT);
|
|
46378
|
-
this.$characterSize = { width: 0, height: 0 };
|
|
46379
46458
|
if (USE_OBSERVER)
|
|
46380
46459
|
this.$addObserver();
|
|
46381
46460
|
else
|
|
46382
46461
|
this.checkForSizeChanges();
|
|
46462
|
+
this.textLayer.$setFontMetrics(this);
|
|
46463
|
+
this.$scratchRange = document.createRange();
|
|
46383
46464
|
}
|
|
46384
46465
|
FontMetrics.prototype.$setMeasureNodeStyles = function (style, isRoot) {
|
|
46385
46466
|
style.width = style.height = "auto";
|
|
@@ -46387,12 +46468,7 @@ var FontMetrics = /** @class */ (function () {
|
|
|
46387
46468
|
style.visibility = "hidden";
|
|
46388
46469
|
style.position = "absolute";
|
|
46389
46470
|
style.whiteSpace = "pre";
|
|
46390
|
-
|
|
46391
|
-
style["font-family"] = "inherit";
|
|
46392
|
-
}
|
|
46393
|
-
else {
|
|
46394
|
-
style.font = "inherit";
|
|
46395
|
-
}
|
|
46471
|
+
style.font = "inherit";
|
|
46396
46472
|
style.overflow = isRoot ? "hidden" : "visible";
|
|
46397
46473
|
};
|
|
46398
46474
|
FontMetrics.prototype.checkForSizeChanges = function (size) {
|
|
@@ -46454,6 +46530,12 @@ var FontMetrics = /** @class */ (function () {
|
|
|
46454
46530
|
}
|
|
46455
46531
|
return w;
|
|
46456
46532
|
};
|
|
46533
|
+
FontMetrics.prototype.getTextWidth = function (text) {
|
|
46534
|
+
if (!text)
|
|
46535
|
+
return 0;
|
|
46536
|
+
this.$main.textContent = text;
|
|
46537
|
+
return this.$main.clientWidth;
|
|
46538
|
+
};
|
|
46457
46539
|
FontMetrics.prototype.destroy = function () {
|
|
46458
46540
|
clearInterval(this.$pollSizeChangesTimer);
|
|
46459
46541
|
if (this.$observer)
|
|
@@ -46461,34 +46543,18 @@ var FontMetrics = /** @class */ (function () {
|
|
|
46461
46543
|
if (this.el && this.el.parentNode)
|
|
46462
46544
|
this.el.parentNode.removeChild(this.el);
|
|
46463
46545
|
};
|
|
46464
|
-
FontMetrics.prototype.$getZoom = function (element) {
|
|
46465
|
-
if (!element || !element.parentElement)
|
|
46466
|
-
return 1;
|
|
46467
|
-
return (Number(window.getComputedStyle(element)["zoom"]) || 1) * this.$getZoom(element.parentElement);
|
|
46468
|
-
};
|
|
46469
46546
|
FontMetrics.prototype.$initTransformMeasureNodes = function () {
|
|
46470
|
-
var t = function (
|
|
46547
|
+
var t = function (l, t) {
|
|
46471
46548
|
return ["div", {
|
|
46472
|
-
style: "position: absolute;
|
|
46549
|
+
style: "position: absolute;left:" + l + "px;top:" + t + "px;"
|
|
46473
46550
|
}];
|
|
46474
46551
|
};
|
|
46475
46552
|
this.els = dom.buildDom([t(0, 0), t(L, 0), t(0, L), t(L, L)], this.el);
|
|
46476
46553
|
};
|
|
46477
|
-
FontMetrics.prototype.
|
|
46478
|
-
if (
|
|
46479
|
-
|
|
46480
|
-
clientPos = mul(1 / zoom, clientPos);
|
|
46554
|
+
FontMetrics.prototype.getTransform = function () {
|
|
46555
|
+
if (this.config.$transformData) {
|
|
46556
|
+
return this.config.$transformData;
|
|
46481
46557
|
}
|
|
46482
|
-
function solve(l1, l2, r) {
|
|
46483
|
-
var det = l1[1] * l2[0] - l1[0] * l2[1];
|
|
46484
|
-
return [
|
|
46485
|
-
(-l2[1] * r[0] + l2[0] * r[1]) / det,
|
|
46486
|
-
(+l1[1] * r[0] - l1[0] * r[1]) / det
|
|
46487
|
-
];
|
|
46488
|
-
}
|
|
46489
|
-
function sub(a, b) { return [a[0] - b[0], a[1] - b[1]]; }
|
|
46490
|
-
function add(a, b) { return [a[0] + b[0], a[1] + b[1]]; }
|
|
46491
|
-
function mul(a, b) { return [a * b[0], a * b[1]]; }
|
|
46492
46558
|
if (!this.els)
|
|
46493
46559
|
this.$initTransformMeasureNodes();
|
|
46494
46560
|
function p(el) {
|
|
@@ -46500,23 +46566,400 @@ var FontMetrics = /** @class */ (function () {
|
|
|
46500
46566
|
var c = p(this.els[2]);
|
|
46501
46567
|
var d = p(this.els[3]);
|
|
46502
46568
|
var h = solve(sub(d, b), sub(d, c), sub(add(b, c), add(d, a)));
|
|
46503
|
-
var m1 = mul(1 + h[0], sub(b, a));
|
|
46504
|
-
var m2 = mul(1 + h[1], sub(c, a));
|
|
46569
|
+
var m1 = mul((1 + h[0]) / L, sub(b, a));
|
|
46570
|
+
var m2 = mul((1 + h[1]) / L, sub(c, a));
|
|
46571
|
+
var M = [
|
|
46572
|
+
m1[0], m2[0], 0,
|
|
46573
|
+
m1[1], m2[1], 0,
|
|
46574
|
+
h[0] / L, h[1] / L, 1
|
|
46575
|
+
];
|
|
46576
|
+
var detM = 1 / (M[0] * M[4] - M[3] * M[1]);
|
|
46577
|
+
var MInv = [
|
|
46578
|
+
M[4] * detM, -M[1] * detM, 0,
|
|
46579
|
+
-M[3] * detM, M[0] * detM, 0,
|
|
46580
|
+
(M[3] * M[7] - M[4] * M[6]) * detM, (M[1] * M[6] - M[0] * M[7]) * detM, 1
|
|
46581
|
+
];
|
|
46582
|
+
this.config.$transformData = {
|
|
46583
|
+
M: M,
|
|
46584
|
+
MInv: MInv,
|
|
46585
|
+
t: a
|
|
46586
|
+
};
|
|
46587
|
+
return this.config.$transformData;
|
|
46588
|
+
};
|
|
46589
|
+
FontMetrics.prototype.transformCoordinates = function (clientPos, elPos) {
|
|
46590
|
+
if (!this.config.$transformData)
|
|
46591
|
+
this.getTransform();
|
|
46592
|
+
var tr = this.config.$transformData;
|
|
46505
46593
|
if (elPos) {
|
|
46506
|
-
|
|
46507
|
-
|
|
46508
|
-
|
|
46509
|
-
|
|
46594
|
+
return add(project(tr.M, elPos[0], elPos[1]), tr.t);
|
|
46595
|
+
}
|
|
46596
|
+
return project(tr.MInv, clientPos[0] - tr.t[0], clientPos[1] - tr.t[1]);
|
|
46597
|
+
};
|
|
46598
|
+
FontMetrics.prototype.recoverRect = function (transform, bbox) {
|
|
46599
|
+
var M = transform.M;
|
|
46600
|
+
var isAffine = Math.abs(M[6]) < 1e-10 && Math.abs(M[7]) < 1e-10;
|
|
46601
|
+
var left = bbox.left, top = bbox.top, Wt = bbox.width, Ht = bbox.height;
|
|
46602
|
+
left -= transform.t[0];
|
|
46603
|
+
top -= transform.t[1];
|
|
46604
|
+
if (isAffine) {
|
|
46605
|
+
var _a = __read(M, 6), m00 = _a[0], m01 = _a[1], m02 = _a[2], m10 = _a[3], m11 = _a[4], m12 = _a[5];
|
|
46606
|
+
var absM = [Math.abs(m00), Math.abs(m01), Math.abs(m10), Math.abs(m11)];
|
|
46607
|
+
var delta = absM[0] * absM[3] - absM[2] * absM[1];
|
|
46608
|
+
var w = void 0, h = void 0;
|
|
46609
|
+
if (Math.abs(delta) < 1e-10) {
|
|
46610
|
+
h = this.config && this.config.lineHeight || 0;
|
|
46611
|
+
w = (Wt - absM[1] * h) / absM[0];
|
|
46612
|
+
}
|
|
46613
|
+
else {
|
|
46614
|
+
w = (absM[3] * Wt - absM[1] * Ht) / delta;
|
|
46615
|
+
h = (-absM[2] * Wt + absM[0] * Ht) / delta;
|
|
46616
|
+
}
|
|
46617
|
+
var detM = m00 * m11 - m01 * m10;
|
|
46618
|
+
var ctx = left + Wt / 2 - m02;
|
|
46619
|
+
var cty = top + Ht / 2 - m12;
|
|
46620
|
+
var cx = (m11 * ctx - m01 * cty) / detM;
|
|
46621
|
+
var cy = (-m10 * ctx + m00 * cty) / detM;
|
|
46622
|
+
return { left: cx - w / 2, top: cy - h / 2, width: w, height: h, right: cx + w / 2, bottom: cy + h / 2 };
|
|
46623
|
+
}
|
|
46624
|
+
return recoverRect(transform, bbox);
|
|
46625
|
+
};
|
|
46626
|
+
FontMetrics.prototype.$findElementForScreenRow = function (screenRow) {
|
|
46627
|
+
var textLayer = this.textLayer;
|
|
46628
|
+
if (!this.config)
|
|
46629
|
+
return null; // not initialized yet
|
|
46630
|
+
var data = textLayer.$lines.$getCellByScreenRow(screenRow, this.config);
|
|
46631
|
+
var lineElement = data && data.cell.element;
|
|
46632
|
+
if (lineElement && textLayer.$useLineGroups()) {
|
|
46633
|
+
var index = Math.floor(data.offset / this.config.lineHeight);
|
|
46634
|
+
lineElement = lineElement.children[Math.max(index, 0)];
|
|
46635
|
+
}
|
|
46636
|
+
return lineElement;
|
|
46637
|
+
};
|
|
46638
|
+
FontMetrics.prototype.textWidth = function (screenRow, screenColumn) {
|
|
46639
|
+
var lineElement = this.$findElementForScreenRow(screenRow);
|
|
46640
|
+
if (!lineElement || !document.createRange) {
|
|
46641
|
+
return screenColumn * this.config.characterWidth;
|
|
46642
|
+
}
|
|
46643
|
+
return this.$measureLineToColumn(lineElement, screenColumn);
|
|
46644
|
+
};
|
|
46645
|
+
FontMetrics.prototype.$measureLineToColumn = function (lineElement, screenColumn) {
|
|
46646
|
+
var textLayer = this.textLayer;
|
|
46647
|
+
try {
|
|
46648
|
+
var position = this.$findColumnPosition(lineElement, screenColumn);
|
|
46649
|
+
if (!position) {
|
|
46650
|
+
return screenColumn * this.config.characterWidth;
|
|
46651
|
+
}
|
|
46652
|
+
this.$scratchRange.setStart(position.node, position.offset);
|
|
46653
|
+
this.$scratchRange.setEnd(position.node, position.offset);
|
|
46654
|
+
var rangeRect = this.$scratchRange.getBoundingClientRect();
|
|
46655
|
+
if (this.renderer.$hasCssTransforms) {
|
|
46656
|
+
var tr = this.getTransform();
|
|
46657
|
+
var transformed = this.recoverRect(tr, rangeRect);
|
|
46658
|
+
var leftOffset = this.renderer.gutterWidth + this.renderer.margin.left + this.renderer.$padding - this.renderer.scrollLeft;
|
|
46659
|
+
return transformed.left - leftOffset + position.overflow * this.config.characterWidth;
|
|
46660
|
+
}
|
|
46661
|
+
var rect = textLayer.element.getBoundingClientRect();
|
|
46662
|
+
return rangeRect.left - rect.left + position.overflow * this.config.characterWidth;
|
|
46663
|
+
}
|
|
46664
|
+
catch (e) {
|
|
46665
|
+
console.error("Error measuring text width:", e);
|
|
46666
|
+
return screenColumn * this.config.characterWidth;
|
|
46667
|
+
}
|
|
46668
|
+
};
|
|
46669
|
+
FontMetrics.prototype.$findColumnPosition = function (lineElement, screenColumn) {
|
|
46670
|
+
var walker = document.createTreeWalker(lineElement, NodeFilter.SHOW_TEXT, null);
|
|
46671
|
+
var currentColumn = 0;
|
|
46672
|
+
var node, lastNode;
|
|
46673
|
+
while (node = walker.nextNode()) {
|
|
46674
|
+
var nodeText = node.nodeValue;
|
|
46675
|
+
var nodeLength = nodeText.length;
|
|
46676
|
+
if (currentColumn + nodeLength >= screenColumn) {
|
|
46677
|
+
return {
|
|
46678
|
+
node: node,
|
|
46679
|
+
offset: screenColumn - currentColumn,
|
|
46680
|
+
overflow: 0
|
|
46681
|
+
};
|
|
46682
|
+
}
|
|
46683
|
+
currentColumn += nodeLength;
|
|
46684
|
+
lastNode = node;
|
|
46510
46685
|
}
|
|
46511
|
-
|
|
46512
|
-
|
|
46513
|
-
|
|
46686
|
+
return lastNode && {
|
|
46687
|
+
node: lastNode,
|
|
46688
|
+
offset: lastNode.nodeValue.length,
|
|
46689
|
+
overflow: screenColumn - currentColumn,
|
|
46690
|
+
};
|
|
46691
|
+
};
|
|
46692
|
+
FontMetrics.prototype.$pixelToColumn = function (screenRow, screenColumnMonospace, x, blockCursor, isTextWidthCoordinate) {
|
|
46693
|
+
var _this = this;
|
|
46694
|
+
var scratchRange = this.$scratchRange;
|
|
46695
|
+
var lineElement = this.$findElementForScreenRow(screenRow);
|
|
46696
|
+
if (!lineElement || screenColumnMonospace < 0)
|
|
46697
|
+
return screenColumnMonospace;
|
|
46698
|
+
var hasCssTransform = this.renderer.$hasCssTransforms;
|
|
46699
|
+
var tr = hasCssTransform && this.getTransform();
|
|
46700
|
+
if (isTextWidthCoordinate) {
|
|
46701
|
+
if (!hasCssTransform) {
|
|
46702
|
+
x += this.textLayer.element.getBoundingClientRect().left;
|
|
46703
|
+
}
|
|
46704
|
+
else {
|
|
46705
|
+
x += this.renderer.gutterWidth + this.renderer.margin.left + this.renderer.$padding - this.renderer.scrollLeft;
|
|
46706
|
+
}
|
|
46707
|
+
}
|
|
46708
|
+
var screenColumn = 0;
|
|
46709
|
+
var getRects = function (node) {
|
|
46710
|
+
var rects = [];
|
|
46711
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
46712
|
+
scratchRange.setStart(node, 0);
|
|
46713
|
+
scratchRange.setEnd(node, node.nodeValue.length);
|
|
46714
|
+
rects = Array.from(scratchRange.getClientRects());
|
|
46715
|
+
}
|
|
46716
|
+
else if (node.nodeType === Node.ELEMENT_NODE) {
|
|
46717
|
+
rects = Array.from(node.getClientRects());
|
|
46718
|
+
}
|
|
46719
|
+
if (hasCssTransform) {
|
|
46720
|
+
var fixedRects = [];
|
|
46721
|
+
for (var i = 0; i < rects.length; i++) {
|
|
46722
|
+
var rect = rects[i];
|
|
46723
|
+
fixedRects.push(_this.recoverRect(tr, rect));
|
|
46724
|
+
}
|
|
46725
|
+
rects = fixedRects;
|
|
46726
|
+
}
|
|
46727
|
+
return rects;
|
|
46728
|
+
};
|
|
46729
|
+
var self = this;
|
|
46730
|
+
function search(node) {
|
|
46731
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
46732
|
+
var textLength = node.nodeValue.length;
|
|
46733
|
+
var maxDistance = Number.MAX_VALUE;
|
|
46734
|
+
var index = -1;
|
|
46735
|
+
var lastSignedDistance = undefined;
|
|
46736
|
+
var value = node.nodeValue;
|
|
46737
|
+
for (var j = 0; j <= textLength; j++) {
|
|
46738
|
+
scratchRange.setStart(node, j);
|
|
46739
|
+
scratchRange.setEnd(node, j);
|
|
46740
|
+
if (j > 0 && j < textLength && /[\uDC00-\uDFFF]/.test(value.charAt(j)) &&
|
|
46741
|
+
/[\uD800-\uDBFF]/.test(value.charAt(j - 1))) {
|
|
46742
|
+
continue;
|
|
46743
|
+
}
|
|
46744
|
+
var rect = /** @type {ReturnType<FontMetrics['recoverRect']>}*/ (scratchRange.getBoundingClientRect());
|
|
46745
|
+
if (hasCssTransform) {
|
|
46746
|
+
rect = self.recoverRect(tr, rect);
|
|
46747
|
+
}
|
|
46748
|
+
var signedDistance = x - rect.left;
|
|
46749
|
+
var d = Math.abs(signedDistance);
|
|
46750
|
+
if (d < maxDistance) {
|
|
46751
|
+
index = j;
|
|
46752
|
+
maxDistance = d;
|
|
46753
|
+
lastSignedDistance = signedDistance;
|
|
46754
|
+
}
|
|
46755
|
+
}
|
|
46756
|
+
if (blockCursor) {
|
|
46757
|
+
if (lastSignedDistance < 0) {
|
|
46758
|
+
index = Math.max(0, index - 1);
|
|
46759
|
+
}
|
|
46760
|
+
}
|
|
46761
|
+
return screenColumn = screenColumn + index;
|
|
46762
|
+
}
|
|
46763
|
+
else if (node.nodeType === Node.ELEMENT_NODE) {
|
|
46764
|
+
var childNodes = node.childNodes;
|
|
46765
|
+
for (var i = 0; i < childNodes.length; i++) {
|
|
46766
|
+
var child = childNodes[i];
|
|
46767
|
+
var rects = getRects(child);
|
|
46768
|
+
for (var j = 0; j < rects.length; j++) {
|
|
46769
|
+
var rect = rects[j];
|
|
46770
|
+
if (rect.left <= x && x <= rect.left + rect.width) {
|
|
46771
|
+
search(child);
|
|
46772
|
+
return screenColumn;
|
|
46773
|
+
}
|
|
46774
|
+
}
|
|
46775
|
+
screenColumn += child.nodeType === Node.TEXT_NODE ? child.nodeValue.length : child.textContent.length;
|
|
46776
|
+
}
|
|
46777
|
+
}
|
|
46778
|
+
}
|
|
46779
|
+
search(lineElement);
|
|
46780
|
+
return screenColumn;
|
|
46781
|
+
};
|
|
46782
|
+
FontMetrics.prototype.getRects = function (startScreenPos, endScreenPos) {
|
|
46783
|
+
var row = startScreenPos.row;
|
|
46784
|
+
var textLayer = this.textLayer;
|
|
46785
|
+
var lineElement = this.$findElementForScreenRow(row);
|
|
46786
|
+
if (lineElement) {
|
|
46787
|
+
try {
|
|
46788
|
+
var p1 = this.$findColumnPosition(lineElement, startScreenPos.column);
|
|
46789
|
+
var p2 = this.$findColumnPosition(lineElement, endScreenPos.column);
|
|
46790
|
+
if (p1 && p2) {
|
|
46791
|
+
this.$scratchRange.setStart(p1.node, p1.offset);
|
|
46792
|
+
this.$scratchRange.setEnd(p2.node, p2.offset);
|
|
46793
|
+
var rangeRects = this.$scratchRange.getClientRects();
|
|
46794
|
+
var hasCssTransform = this.renderer && this.renderer.$hasCssTransforms;
|
|
46795
|
+
if (hasCssTransform) {
|
|
46796
|
+
var tr = this.getTransform();
|
|
46797
|
+
var rects = [];
|
|
46798
|
+
for (var i = 0; i < rangeRects.length; i++) {
|
|
46799
|
+
var rangeRect = this.recoverRect(tr, rangeRects[i]);
|
|
46800
|
+
rangeRect.right = rangeRect.left + rangeRect.width;
|
|
46801
|
+
rects.push(rangeRect);
|
|
46802
|
+
}
|
|
46803
|
+
var leftOffset = this.renderer.gutterWidth + this.renderer.margin.left + this.renderer.$padding - this.renderer.scrollLeft;
|
|
46804
|
+
var merged = mergeTouchingRects(rects).map(function (r) {
|
|
46805
|
+
return {
|
|
46806
|
+
left: r.left - leftOffset,
|
|
46807
|
+
width: r.right - r.left,
|
|
46808
|
+
};
|
|
46809
|
+
});
|
|
46810
|
+
return merged;
|
|
46811
|
+
}
|
|
46812
|
+
var rect = textLayer.element.getBoundingClientRect();
|
|
46813
|
+
var merged = mergeTouchingRects(rangeRects).map(function (r) {
|
|
46814
|
+
return {
|
|
46815
|
+
left: r.left - rect.left,
|
|
46816
|
+
width: r.right - r.left,
|
|
46817
|
+
};
|
|
46818
|
+
});
|
|
46819
|
+
return merged;
|
|
46820
|
+
}
|
|
46821
|
+
}
|
|
46822
|
+
catch (e) {
|
|
46823
|
+
console.error("Error measuring text width:", e);
|
|
46824
|
+
}
|
|
46825
|
+
}
|
|
46826
|
+
return [{
|
|
46827
|
+
left: startScreenPos.column * this.config.characterWidth,
|
|
46828
|
+
width: (endScreenPos.column - startScreenPos.column) * this.config.characterWidth,
|
|
46829
|
+
}];
|
|
46514
46830
|
};
|
|
46515
46831
|
return FontMetrics;
|
|
46516
46832
|
}());
|
|
46517
|
-
|
|
46833
|
+
function mergeTouchingRects(rects) {
|
|
46834
|
+
var merged = [];
|
|
46835
|
+
for (var i = 0; i < rects.length; i++) {
|
|
46836
|
+
var rect = rects[i];
|
|
46837
|
+
var found = false;
|
|
46838
|
+
for (var j = 0; j < merged.length; j++) {
|
|
46839
|
+
var m = merged[j];
|
|
46840
|
+
if ((m.left <= rect.left && rect.left <= m.right) ||
|
|
46841
|
+
(m.left <= rect.right && rect.right <= m.right) ||
|
|
46842
|
+
(rect.left <= m.left && m.right <= rect.right)) {
|
|
46843
|
+
m.left = Math.min(m.left, rect.left);
|
|
46844
|
+
m.right = Math.max(m.right, rect.right);
|
|
46845
|
+
found = true;
|
|
46846
|
+
break;
|
|
46847
|
+
}
|
|
46848
|
+
}
|
|
46849
|
+
if (!found) {
|
|
46850
|
+
merged.push({
|
|
46851
|
+
left: rect.left,
|
|
46852
|
+
right: rect.right,
|
|
46853
|
+
top: rect.top,
|
|
46854
|
+
height: rect.height,
|
|
46855
|
+
});
|
|
46856
|
+
}
|
|
46857
|
+
}
|
|
46858
|
+
return merged;
|
|
46859
|
+
}
|
|
46860
|
+
function solve(l1, l2, r) {
|
|
46861
|
+
var det = l1[1] * l2[0] - l1[0] * l2[1];
|
|
46862
|
+
return [
|
|
46863
|
+
(-l2[1] * r[0] + l2[0] * r[1]) / det,
|
|
46864
|
+
(+l1[1] * r[0] - l1[0] * r[1]) / det
|
|
46865
|
+
];
|
|
46866
|
+
}
|
|
46867
|
+
function sub(a, b) { return [a[0] - b[0], a[1] - b[1]]; }
|
|
46868
|
+
function add(a, b) { return [a[0] + b[0], a[1] + b[1]]; }
|
|
46869
|
+
function mul(a, b) { return [a * b[0], a * b[1]]; }
|
|
46518
46870
|
oop.implement(FontMetrics.prototype, EventEmitter);
|
|
46519
46871
|
exports.FontMetrics = FontMetrics;
|
|
46872
|
+
function recoverRect(transform, bbox) {
|
|
46873
|
+
var left = bbox.left, top = bbox.top, width = bbox.width, height = bbox.height;
|
|
46874
|
+
var M = transform.M;
|
|
46875
|
+
left -= transform.t[0];
|
|
46876
|
+
top -= transform.t[1];
|
|
46877
|
+
bbox = { left: left, top: top, width: width, height: height };
|
|
46878
|
+
var targets = [top, left + width, top + height, left]; // minY, maxX, maxY, minX
|
|
46879
|
+
var isYAxis = [true, false, true, false]; // minY=Y, maxX=X, maxY=Y, minX=X
|
|
46880
|
+
var corners = [
|
|
46881
|
+
[0, 0], [1, 0], [1, 1], [0, 1]
|
|
46882
|
+
];
|
|
46883
|
+
var result = null;
|
|
46884
|
+
var mainMappings = [27, 57, 23, 53, 43, 9, 10, 11, 14, 37, 31, 56, 40, 41, 47];
|
|
46885
|
+
for (var i = -mainMappings.length; i < 256; i++) {
|
|
46886
|
+
var index = i < 0 ? mainMappings[mainMappings.length + i] : i;
|
|
46887
|
+
var mappingIdx = [
|
|
46888
|
+
(index >> 0) & 3,
|
|
46889
|
+
(index >> 2) & 3,
|
|
46890
|
+
(index >> 4) & 3,
|
|
46891
|
+
(index >> 6) & 3
|
|
46892
|
+
];
|
|
46893
|
+
var mapping = mappingIdx.map(function (idx) { return corners[idx]; });
|
|
46894
|
+
var rows = mapping.map(function (c, j) {
|
|
46895
|
+
var _a = __read(c, 2), dx = _a[0], dy = _a[1];
|
|
46896
|
+
var target = targets[j];
|
|
46897
|
+
var m = isYAxis[j] ? M.slice(3, 6) : M.slice(0, 3);
|
|
46898
|
+
var mp = M.slice(6, 9);
|
|
46899
|
+
var ax = m[0] - target * mp[0];
|
|
46900
|
+
var ay = m[1] - target * mp[1];
|
|
46901
|
+
return [ax, ay, dx * ax, dy * ay, target * mp[2] - m[2]];
|
|
46902
|
+
});
|
|
46903
|
+
var res = solve4x4(rows);
|
|
46904
|
+
var result;
|
|
46905
|
+
if (res) {
|
|
46906
|
+
var _a = __read(res, 4), x0 = _a[0], y0 = _a[1], w = _a[2], h = _a[3];
|
|
46907
|
+
if (w < 0) {
|
|
46908
|
+
x0 += w;
|
|
46909
|
+
w = -w;
|
|
46910
|
+
}
|
|
46911
|
+
if (h < 0) {
|
|
46912
|
+
y0 += h;
|
|
46913
|
+
h = -h;
|
|
46914
|
+
}
|
|
46915
|
+
if (validateSolution(M, x0, y0, w, h, bbox)) {
|
|
46916
|
+
result = { left: x0, top: y0, width: w, height: h, right: x0 + w, bottom: y0 + h, mappingIdx: i };
|
|
46917
|
+
break;
|
|
46918
|
+
}
|
|
46919
|
+
}
|
|
46920
|
+
}
|
|
46921
|
+
if (!result)
|
|
46922
|
+
console.warn("No valid mapping found in 256 combinations.");
|
|
46923
|
+
return result;
|
|
46924
|
+
}
|
|
46925
|
+
var project = function (m, px, py) {
|
|
46926
|
+
var k = m[6] * px + m[7] * py + m[8];
|
|
46927
|
+
return [(m[0] * px + m[1] * py + m[2]) / k, (m[3] * px + m[4] * py + m[5]) / k];
|
|
46928
|
+
};
|
|
46929
|
+
function validateSolution(M, x, y, w, h, targetBbox) {
|
|
46930
|
+
var pts = [
|
|
46931
|
+
[x, y], [x + w, y], [x + w, y + h], [x, y + h]
|
|
46932
|
+
];
|
|
46933
|
+
return pts.every(function (p) {
|
|
46934
|
+
var mapped = project(M, p[0], p[1]);
|
|
46935
|
+
return targetBbox.left - 0.5 <= mapped[0] && mapped[0] <= targetBbox.left + targetBbox.width + 0.5
|
|
46936
|
+
&& targetBbox.top - 0.5 <= mapped[1] && mapped[1] <= targetBbox.top + targetBbox.height + 0.5;
|
|
46937
|
+
});
|
|
46938
|
+
}
|
|
46939
|
+
function solve4x4(m) {
|
|
46940
|
+
var _a;
|
|
46941
|
+
var n = 4;
|
|
46942
|
+
for (var i = 0; i < n; i++) {
|
|
46943
|
+
var max = i;
|
|
46944
|
+
for (var j = i + 1; j < n; j++)
|
|
46945
|
+
if (Math.abs(m[j][i]) > Math.abs(m[max][i]))
|
|
46946
|
+
max = j;
|
|
46947
|
+
_a = __read([m[max], m[i]], 2), m[i] = _a[0], m[max] = _a[1];
|
|
46948
|
+
var p = m[i][i];
|
|
46949
|
+
if (Math.abs(p) < 1e-10)
|
|
46950
|
+
return null;
|
|
46951
|
+
for (var j = i; j <= n; j++)
|
|
46952
|
+
m[i][j] /= p;
|
|
46953
|
+
for (var k = 0; k < n; k++) {
|
|
46954
|
+
if (k !== i) {
|
|
46955
|
+
var f = m[k][i];
|
|
46956
|
+
for (var j = i; j <= n; j++)
|
|
46957
|
+
m[k][j] -= f * m[i][j];
|
|
46958
|
+
}
|
|
46959
|
+
}
|
|
46960
|
+
}
|
|
46961
|
+
return m.map(function (row) { return row[n]; });
|
|
46962
|
+
}
|
|
46520
46963
|
|
|
46521
46964
|
});
|
|
46522
46965
|
|
|
@@ -46731,8 +47174,7 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
46731
47174
|
row: 0,
|
|
46732
47175
|
column: 0
|
|
46733
47176
|
};
|
|
46734
|
-
this.$fontMetrics = new FontMetrics(this.container);
|
|
46735
|
-
this.$textLayer.$setFontMetrics(this.$fontMetrics);
|
|
47177
|
+
this.$fontMetrics = new FontMetrics(this.container, this.$textLayer, this);
|
|
46736
47178
|
this.$textLayer.on("changeCharacterSize", function (e) {
|
|
46737
47179
|
_self.updateCharacterSize();
|
|
46738
47180
|
_self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
|
|
@@ -46753,12 +47195,14 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
46753
47195
|
lastRow: 0,
|
|
46754
47196
|
lineHeight: 0,
|
|
46755
47197
|
characterWidth: 0,
|
|
47198
|
+
fontMetrics: this.$fontMetrics,
|
|
46756
47199
|
minHeight: 1,
|
|
46757
47200
|
maxHeight: 1,
|
|
46758
47201
|
offset: 0,
|
|
46759
47202
|
height: 1,
|
|
46760
47203
|
gutterOffset: 1
|
|
46761
47204
|
};
|
|
47205
|
+
this.$fontMetrics.config = this.layerConfig;
|
|
46762
47206
|
this.scrollMargin = {
|
|
46763
47207
|
left: 0,
|
|
46764
47208
|
right: 0,
|
|
@@ -47079,7 +47523,7 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47079
47523
|
else {
|
|
47080
47524
|
if (composition.useTextareaForIME) {
|
|
47081
47525
|
var val = this.textarea.value;
|
|
47082
|
-
w = this.
|
|
47526
|
+
w = this.$fontMetrics.getTextWidth(val) + 1;
|
|
47083
47527
|
}
|
|
47084
47528
|
else {
|
|
47085
47529
|
posTop += this.lineHeight + 2;
|
|
@@ -47194,8 +47638,6 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47194
47638
|
this.$textLayer.checkForSizeChanges();
|
|
47195
47639
|
}
|
|
47196
47640
|
this._signal("beforeRender", changes);
|
|
47197
|
-
if (this.session && this.session.$bidiHandler)
|
|
47198
|
-
this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);
|
|
47199
47641
|
var config = this.layerConfig;
|
|
47200
47642
|
if (changes & this.CHANGE_FULL ||
|
|
47201
47643
|
changes & this.CHANGE_SIZE ||
|
|
@@ -47213,17 +47655,9 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47213
47655
|
}
|
|
47214
47656
|
}
|
|
47215
47657
|
config = this.layerConfig;
|
|
47216
|
-
this.$updateScrollBarV();
|
|
47217
|
-
if (changes & this.CHANGE_H_SCROLL)
|
|
47218
|
-
this.$updateScrollBarH();
|
|
47219
|
-
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
|
47220
|
-
var width = config.width + 2 * this.$padding + "px";
|
|
47221
|
-
var height = config.minHeight + "px";
|
|
47222
|
-
dom.setStyle(this.content.style, "width", width);
|
|
47223
|
-
dom.setStyle(this.content.style, "height", height);
|
|
47224
47658
|
}
|
|
47225
47659
|
if (changes & this.CHANGE_H_SCROLL) {
|
|
47226
|
-
|
|
47660
|
+
this.$updateContentTransformAndSize(config, changes);
|
|
47227
47661
|
this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller " : "ace_scroller ace_scroll-left ";
|
|
47228
47662
|
if (this.enableKeyboardAccessibility)
|
|
47229
47663
|
this.scroller.className += this.keyboardFocusClassName;
|
|
@@ -47239,6 +47673,7 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47239
47673
|
this.$markerBack.update(config);
|
|
47240
47674
|
this.$markerFront.update(config);
|
|
47241
47675
|
this.$cursorLayer.update(config);
|
|
47676
|
+
this.$updateContentTransformAndSize(config, changes);
|
|
47242
47677
|
this.$moveTextAreaToCursor();
|
|
47243
47678
|
this._signal("afterRender", changes);
|
|
47244
47679
|
return;
|
|
@@ -47261,6 +47696,7 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47261
47696
|
this.$markerBack.update(config);
|
|
47262
47697
|
this.$markerFront.update(config);
|
|
47263
47698
|
this.$cursorLayer.update(config);
|
|
47699
|
+
this.$updateContentTransformAndSize(config, changes);
|
|
47264
47700
|
this.$moveTextAreaToCursor();
|
|
47265
47701
|
this._signal("afterRender", changes);
|
|
47266
47702
|
return;
|
|
@@ -47273,6 +47709,7 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47273
47709
|
if (this.$customScrollbar) {
|
|
47274
47710
|
this.$scrollDecorator.$updateDecorators(config);
|
|
47275
47711
|
}
|
|
47712
|
+
this.$updateContentTransformAndSize(config, changes);
|
|
47276
47713
|
}
|
|
47277
47714
|
else if (changes & this.CHANGE_LINES) {
|
|
47278
47715
|
if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)
|
|
@@ -47330,6 +47767,44 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47330
47767
|
this._signal("autosize");
|
|
47331
47768
|
}
|
|
47332
47769
|
};
|
|
47770
|
+
VirtualRenderer.prototype.$updateContentTransformAndSize = function (config, changes) {
|
|
47771
|
+
var sm = this.scrollMargin;
|
|
47772
|
+
if (this.session && !this.session.getUseWrapMode()) {
|
|
47773
|
+
var longestRendered = this.$getLongestRenderedLine();
|
|
47774
|
+
if (config.width < longestRendered) {
|
|
47775
|
+
config.width = longestRendered;
|
|
47776
|
+
}
|
|
47777
|
+
}
|
|
47778
|
+
if (this.session) {
|
|
47779
|
+
this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, config.width + 2 * this.$padding - this.$size.scrollerWidth + sm.right)));
|
|
47780
|
+
}
|
|
47781
|
+
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
|
47782
|
+
var width = config.width + 2 * this.$padding + "px";
|
|
47783
|
+
var height = config.minHeight + "px";
|
|
47784
|
+
dom.setStyle(this.content.style, "width", width);
|
|
47785
|
+
dom.setStyle(this.content.style, "height", height);
|
|
47786
|
+
this.$updateScrollBarV();
|
|
47787
|
+
if (changes & this.CHANGE_H_SCROLL)
|
|
47788
|
+
this.$updateScrollBarH();
|
|
47789
|
+
};
|
|
47790
|
+
VirtualRenderer.prototype.$getLongestRenderedLine = function () {
|
|
47791
|
+
var max = 0;
|
|
47792
|
+
var transform = this.$hasCssTransforms && this.$fontMetrics.getTransform();
|
|
47793
|
+
var cells = this.$textLayer.$lines.cells;
|
|
47794
|
+
for (var i = 0; i < cells.length; i++) {
|
|
47795
|
+
var lineElement = cells[i].element;
|
|
47796
|
+
this.$fontMetrics.$scratchRange.setStart(lineElement, 0);
|
|
47797
|
+
this.$fontMetrics.$scratchRange.setEnd(lineElement, lineElement.childNodes.length);
|
|
47798
|
+
var rect = /** @type {ReturnType<FontMetrics['recoverRect']>}*/ (this.$fontMetrics.$scratchRange.getBoundingClientRect());
|
|
47799
|
+
if (this.$hasCssTransforms) {
|
|
47800
|
+
rect = this.$fontMetrics.recoverRect(transform, rect) || rect;
|
|
47801
|
+
}
|
|
47802
|
+
var w = rect.width;
|
|
47803
|
+
if (w > max)
|
|
47804
|
+
max = w;
|
|
47805
|
+
}
|
|
47806
|
+
return max;
|
|
47807
|
+
};
|
|
47333
47808
|
VirtualRenderer.prototype.$computeLayerConfig = function () {
|
|
47334
47809
|
var session = this.session;
|
|
47335
47810
|
var size = this.$size;
|
|
@@ -47356,7 +47831,6 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47356
47831
|
maxHeight += scrollPastEnd;
|
|
47357
47832
|
var sm = this.scrollMargin;
|
|
47358
47833
|
this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));
|
|
47359
|
-
this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));
|
|
47360
47834
|
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
|
|
47361
47835
|
size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);
|
|
47362
47836
|
var vScrollChanged = vScrollBefore !== vScroll;
|
|
@@ -47402,12 +47876,14 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47402
47876
|
lastRow: lastRow,
|
|
47403
47877
|
lineHeight: lineHeight,
|
|
47404
47878
|
characterWidth: this.characterWidth,
|
|
47879
|
+
fontMetrics: this.$fontMetrics,
|
|
47405
47880
|
minHeight: minHeight,
|
|
47406
47881
|
maxHeight: maxHeight,
|
|
47407
47882
|
offset: offset,
|
|
47408
47883
|
gutterOffset: lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,
|
|
47409
47884
|
height: this.$size.scrollerHeight
|
|
47410
47885
|
};
|
|
47886
|
+
this.$fontMetrics.config = this.layerConfig;
|
|
47411
47887
|
if (this.session.$bidiHandler)
|
|
47412
47888
|
this.session.$bidiHandler.setContentWidth(longestLine - this.$padding);
|
|
47413
47889
|
return changes;
|
|
@@ -47646,44 +48122,40 @@ var VirtualRenderer = /** @class */ (function () {
|
|
|
47646
48122
|
VirtualRenderer.prototype.pixelToScreenCoordinates = function (x, y) {
|
|
47647
48123
|
var canvasPos;
|
|
47648
48124
|
if (this.$hasCssTransforms) {
|
|
47649
|
-
canvasPos = { top:
|
|
48125
|
+
canvasPos = { top: this.margin.top, left: this.gutterWidth + this.margin.left };
|
|
47650
48126
|
var p = this.$fontMetrics.transformCoordinates([x, y]);
|
|
47651
|
-
x = p[
|
|
47652
|
-
y = p[
|
|
48127
|
+
x = p[0];
|
|
48128
|
+
y = p[1];
|
|
47653
48129
|
}
|
|
47654
48130
|
else {
|
|
47655
48131
|
canvasPos = this.scroller.getBoundingClientRect();
|
|
47656
48132
|
}
|
|
47657
48133
|
var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;
|
|
47658
48134
|
var offset = offsetX / this.characterWidth;
|
|
47659
|
-
var row =
|
|
48135
|
+
var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;
|
|
47660
48136
|
var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);
|
|
48137
|
+
col = this.$fontMetrics.$pixelToColumn(row, col, x, this.$blockCursor);
|
|
47661
48138
|
return { row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX };
|
|
47662
48139
|
};
|
|
47663
48140
|
VirtualRenderer.prototype.screenToTextCoordinates = function (x, y) {
|
|
47664
|
-
var
|
|
47665
|
-
|
|
47666
|
-
canvasPos = { top: 0, left: 0 };
|
|
47667
|
-
var p = this.$fontMetrics.transformCoordinates([x, y]);
|
|
47668
|
-
x = p[1] - this.gutterWidth - this.margin.left;
|
|
47669
|
-
y = p[0];
|
|
47670
|
-
}
|
|
47671
|
-
else {
|
|
47672
|
-
canvasPos = this.scroller.getBoundingClientRect();
|
|
47673
|
-
}
|
|
47674
|
-
var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;
|
|
47675
|
-
var offset = offsetX / this.characterWidth;
|
|
47676
|
-
var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);
|
|
47677
|
-
var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;
|
|
47678
|
-
return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);
|
|
48141
|
+
var screenPos = this.pixelToScreenCoordinates(x, y);
|
|
48142
|
+
return this.session.screenToDocumentPosition(screenPos.row, Math.max(screenPos.column, 0));
|
|
47679
48143
|
};
|
|
47680
48144
|
VirtualRenderer.prototype.textToScreenCoordinates = function (row, column) {
|
|
47681
|
-
var canvasPos = this.scroller.getBoundingClientRect();
|
|
47682
48145
|
var pos = this.session.documentToScreenPosition(row, column);
|
|
47683
|
-
var x = this.$padding +
|
|
47684
|
-
? this.session.$bidiHandler.getPosLeft(pos.column)
|
|
47685
|
-
: Math.round(pos.column * this.characterWidth));
|
|
48146
|
+
var x = this.$padding + this.$fontMetrics.textWidth(pos.row, pos.column);
|
|
47686
48147
|
var y = pos.row * this.lineHeight;
|
|
48148
|
+
if (this.$hasCssTransforms) {
|
|
48149
|
+
var pagePos = this.$fontMetrics.transformCoordinates(null, [
|
|
48150
|
+
this.gutterWidth + this.margin.left + x - this.scrollLeft,
|
|
48151
|
+
this.margin.top + y - this.scrollTop
|
|
48152
|
+
]);
|
|
48153
|
+
return {
|
|
48154
|
+
pageX: pagePos[0],
|
|
48155
|
+
pageY: pagePos[1]
|
|
48156
|
+
};
|
|
48157
|
+
}
|
|
48158
|
+
var canvasPos = this.scroller.getBoundingClientRect();
|
|
47687
48159
|
return {
|
|
47688
48160
|
pageX: canvasPos.left + x - this.scrollLeft,
|
|
47689
48161
|
pageY: canvasPos.top + y - this.scrollTop
|
|
@@ -48700,7 +49172,7 @@ function onMouseDown(e) {
|
|
|
48700
49172
|
var rectSel = [];
|
|
48701
49173
|
var blockSelect = function () {
|
|
48702
49174
|
var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
|
|
48703
|
-
var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column
|
|
49175
|
+
var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
|
|
48704
49176
|
if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))
|
|
48705
49177
|
return;
|
|
48706
49178
|
screenCursor = newCursor;
|
|
@@ -48946,7 +49418,8 @@ var EditSession = require("./edit_session").EditSession;
|
|
|
48946
49418
|
}
|
|
48947
49419
|
for (var i = removed.length; i--;) {
|
|
48948
49420
|
var index = this.ranges.indexOf(removed[i]);
|
|
48949
|
-
|
|
49421
|
+
if (index != -1)
|
|
49422
|
+
this.ranges.splice(index, 1);
|
|
48950
49423
|
}
|
|
48951
49424
|
this._signal("removeRange", { ranges: removed });
|
|
48952
49425
|
if (this.rangeCount === 0 && this.inMultiSelectMode) {
|
|
@@ -49020,14 +49493,10 @@ var EditSession = require("./edit_session").EditSession;
|
|
|
49020
49493
|
if (xBackwards) {
|
|
49021
49494
|
var startColumn = screenCursor.column;
|
|
49022
49495
|
var endColumn = screenAnchor.column;
|
|
49023
|
-
var startOffsetX = screenCursor.offsetX;
|
|
49024
|
-
var endOffsetX = screenAnchor.offsetX;
|
|
49025
49496
|
}
|
|
49026
49497
|
else {
|
|
49027
49498
|
var startColumn = screenAnchor.column;
|
|
49028
49499
|
var endColumn = screenCursor.column;
|
|
49029
|
-
var startOffsetX = screenAnchor.offsetX;
|
|
49030
|
-
var endOffsetX = screenCursor.offsetX;
|
|
49031
49500
|
}
|
|
49032
49501
|
var yBackwards = screenCursor.row < screenAnchor.row;
|
|
49033
49502
|
if (yBackwards) {
|
|
@@ -49046,7 +49515,7 @@ var EditSession = require("./edit_session").EditSession;
|
|
|
49046
49515
|
includeEmptyLines = true;
|
|
49047
49516
|
var docEnd;
|
|
49048
49517
|
for (var row = startRow; row <= endRow; row++) {
|
|
49049
|
-
var range = Range.fromPoints(this.session.screenToDocumentPosition(row, startColumn
|
|
49518
|
+
var range = Range.fromPoints(this.session.screenToDocumentPosition(row, startColumn), this.session.screenToDocumentPosition(row, endColumn));
|
|
49050
49519
|
if (range.isEmpty()) {
|
|
49051
49520
|
if (docEnd && isSamePoint(range.end, docEnd))
|
|
49052
49521
|
break;
|
|
@@ -49183,32 +49652,36 @@ var Editor = require("./editor").Editor;
|
|
|
49183
49652
|
selection._eventRegistry = {};
|
|
49184
49653
|
var tmpSel = new Selection(session);
|
|
49185
49654
|
this.inVirtualSelectionMode = true;
|
|
49186
|
-
|
|
49187
|
-
|
|
49188
|
-
|
|
49189
|
-
i
|
|
49655
|
+
try {
|
|
49656
|
+
for (var i = ranges.length; i--;) {
|
|
49657
|
+
if ($byLines) {
|
|
49658
|
+
while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)
|
|
49659
|
+
i--;
|
|
49660
|
+
}
|
|
49661
|
+
tmpSel.fromOrientedRange(ranges[i]);
|
|
49662
|
+
tmpSel.index = i;
|
|
49663
|
+
this.selection = session.selection = tmpSel;
|
|
49664
|
+
var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
|
|
49665
|
+
if (!result && cmdResult !== undefined)
|
|
49666
|
+
result = cmdResult;
|
|
49667
|
+
tmpSel.toOrientedRange(ranges[i]);
|
|
49190
49668
|
}
|
|
49191
|
-
tmpSel.
|
|
49192
|
-
|
|
49193
|
-
|
|
49194
|
-
|
|
49195
|
-
|
|
49196
|
-
|
|
49197
|
-
|
|
49198
|
-
|
|
49199
|
-
|
|
49200
|
-
|
|
49201
|
-
|
|
49202
|
-
|
|
49203
|
-
|
|
49204
|
-
|
|
49205
|
-
|
|
49206
|
-
|
|
49207
|
-
this.onCursorChange();
|
|
49208
|
-
this.onSelectionChange();
|
|
49209
|
-
if (anim && anim.from == anim.to)
|
|
49210
|
-
this.renderer.animateScrolling(anim.from);
|
|
49211
|
-
return result;
|
|
49669
|
+
tmpSel.detach();
|
|
49670
|
+
}
|
|
49671
|
+
finally {
|
|
49672
|
+
this.selection = session.selection = selection;
|
|
49673
|
+
this.inVirtualSelectionMode = false;
|
|
49674
|
+
selection._eventRegistry = reg;
|
|
49675
|
+
selection.mergeOverlappingRanges();
|
|
49676
|
+
if (selection.ranges[0])
|
|
49677
|
+
selection.fromOrientedRange(selection.ranges[0]);
|
|
49678
|
+
var anim = this.renderer.$scrollAnimation;
|
|
49679
|
+
this.onCursorChange();
|
|
49680
|
+
this.onSelectionChange();
|
|
49681
|
+
if (anim && anim.from == anim.to)
|
|
49682
|
+
this.renderer.animateScrolling(anim.from);
|
|
49683
|
+
return result;
|
|
49684
|
+
}
|
|
49212
49685
|
};
|
|
49213
49686
|
this.exitMultiSelectMode = function () {
|
|
49214
49687
|
if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
|
|
@@ -49236,6 +49709,8 @@ var Editor = require("./editor").Editor;
|
|
|
49236
49709
|
this.$checkMultiselectChange = function (e, anchor) {
|
|
49237
49710
|
if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
|
|
49238
49711
|
var range = this.multiSelect.ranges[0];
|
|
49712
|
+
if (!range)
|
|
49713
|
+
return;
|
|
49239
49714
|
if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)
|
|
49240
49715
|
return;
|
|
49241
49716
|
var pos = anchor == this.multiSelect.anchor
|
|
@@ -50857,7 +51332,8 @@ function is(token, type) {
|
|
|
50857
51332
|
}
|
|
50858
51333
|
var tags = session.getMatchingTags({ row: row, column: 0 });
|
|
50859
51334
|
if (tags) {
|
|
50860
|
-
|
|
51335
|
+
var startRow = tags.openTag.start.row;
|
|
51336
|
+
return new Range(startRow, session.getLine(startRow).length, tags.closeTag.start.row, tags.closeTag.start.column);
|
|
50861
51337
|
}
|
|
50862
51338
|
};
|
|
50863
51339
|
}).call(FoldMode.prototype);
|
|
@@ -52796,7 +53272,7 @@ module.exports = function stringToParts(str) {
|
|
|
52796
53272
|
\*************************************************************/
|
|
52797
53273
|
(module) {
|
|
52798
53274
|
|
|
52799
|
-
!function(t,e){ true?module.exports=e():0}(this,()=>(()=>{"use strict";var t={537(t,e,n){const r=n(683),{ArrayPrototypeMap:o}=r;e.h=class{hexSlice(t=0,e){return o(this.slice(t,e),t=>("00"+t.toString(16)).slice(-2)).join("")}}},223(t,e,n){const r=n(683),{AggregateError:o,AggregateErrorPrototype:i,Array:l,ArrayBuffer:s,ArrayBufferPrototype:c,ArrayIsArray:a,ArrayPrototype:u,ArrayPrototypeFilter:f,ArrayPrototypeForEach:p,ArrayPrototypeIncludes:y,ArrayPrototypeIndexOf:g,ArrayPrototypeJoin:h,ArrayPrototypeMap:d,ArrayPrototypePop:m,ArrayPrototypePush:b,ArrayPrototypePushApply:$,ArrayPrototypeSlice:P,ArrayPrototypeSort:S,ArrayPrototypeSplice:x,ArrayPrototypeUnshift:A,BigIntPrototypeValueOf:v,Boolean:_,BooleanPrototype:w,BooleanPrototypeValueOf:O,DataView:E,DataViewPrototype:R,Date:L,DatePrototype:k,DatePrototypeGetTime:I,DatePrototypeToISOString:j,DatePrototypeToString:z,Error:B,ErrorPrototype:T,ErrorPrototypeToString:M,Function:N,FunctionPrototype:F,FunctionPrototypeBind:C,FunctionPrototypeCall:D,FunctionPrototypeSymbolHasInstance:W,FunctionPrototypeToString:H,JSONStringify:U,Map:G,MapPrototype:V,MapPrototypeEntries:Z,MapPrototypeGetSize:Y,MathFloor:q,MathMax:J,MathMin:K,MathRound:Q,MathSqrt:X,MathTrunc:tt,Number:et,NumberIsFinite:nt,NumberIsNaN:rt,NumberParseFloat:ot,NumberParseInt:it,NumberPrototype:lt,NumberPrototypeToString:st,NumberPrototypeValueOf:ct,Object:at,ObjectAssign:ut,ObjectDefineProperty:ft,ObjectGetOwnPropertyDescriptor:pt,ObjectGetOwnPropertyNames:yt,ObjectGetOwnPropertySymbols:gt,ObjectGetPrototypeOf:ht,ObjectIs:dt,ObjectKeys:mt,ObjectPrototype:bt,ObjectPrototypeHasOwnProperty:$t,ObjectPrototypePropertyIsEnumerable:Pt,ObjectPrototypeToString:St,ObjectSeal:xt,ObjectSetPrototypeOf:At,Promise:vt,PromisePrototype:_t,RangeError:wt,RangeErrorPrototype:Ot,ReflectApply:Et,ReflectOwnKeys:Rt,RegExp:Lt,RegExpPrototype:kt,RegExpPrototypeExec:It,RegExpPrototypeSymbolReplace:jt,RegExpPrototypeSymbolSplit:zt,RegExpPrototypeToString:Bt,SafeMap:Tt,SafeSet:Mt,SafeStringIterator:Nt,Set:Ft,SetPrototype:Ct,SetPrototypeGetSize:Dt,SetPrototypeValues:Wt,String:Ht,StringPrototype:Ut,StringPrototypeCharCodeAt:Gt,StringPrototypeCodePointAt:Vt,StringPrototypeEndsWith:Zt,StringPrototypeIncludes:Yt,StringPrototypeIndexOf:qt,StringPrototypeLastIndexOf:Jt,StringPrototypeNormalize:Kt,StringPrototypePadEnd:Qt,StringPrototypePadStart:Xt,StringPrototypeRepeat:te,StringPrototypeReplace:ee,StringPrototypeReplaceAll:ne,StringPrototypeSlice:re,StringPrototypeSplit:oe,StringPrototypeStartsWith:ie,StringPrototypeToLowerCase:le,StringPrototypeValueOf:se,SymbolIterator:ce,SymbolPrototypeToString:ae,SymbolPrototypeValueOf:ue,SymbolToPrimitive:fe,SymbolToStringTag:pe,TypeError:ye,TypeErrorPrototype:ge,TypedArray:he,TypedArrayPrototype:de,TypedArrayPrototypeGetLength:me,TypedArrayPrototypeGetSymbolToStringTag:be,Uint8Array:$e,WeakMap:Pe,WeakMapPrototype:Se,WeakSet:xe,WeakSetPrototype:Ae,globalThis:ve,internalBinding:_e,uncurryThis:we}=r,{constants:{ALL_PROPERTIES:Oe,ONLY_ENUMERABLE:Ee,kPending:Re,kRejected:Le},getOwnNonIndexProperties:ke,getPromiseDetails:Ie,getProxyDetails:je,previewEntries:ze,getConstructorName:Be,getExternalValue:Te,Proxy:Me}=n(727),{customInspectSymbol:Ne,isError:Fe,join:Ce,removeColors:De}=n(101),{isStackOverflowError:We}=n(778),{isAsyncFunction:He,isGeneratorFunction:Ue,isAnyArrayBuffer:Ge,isArrayBuffer:Ve,isArgumentsObject:Ze,isBoxedPrimitive:Ye,isDataView:qe,isExternal:Je,isMap:Ke,isMapIterator:Qe,isModuleNamespaceObject:Xe,isNativeError:tn,isPromise:en,isSet:nn,isSetIterator:rn,isWeakMap:on,isWeakSet:ln,isRegExp:sn,isDate:cn,isTypedArray:an,isStringObject:un,isNumberObject:fn,isBooleanObject:pn,isBigIntObject:yn}=n(499),gn=n(123),{BuiltinModule:hn}=n(947),{validateObject:dn,validateString:mn,kValidateObjectAllowArray:bn}=n(302);let $n,Pn,Sn;function xn(t){return Pn=Pn||n(812),Pn.pathToFileURL(t).href}const An=new Mt(f(yt(ve),t=>null!==It(/^[A-Z][a-zA-Z0-9]+$/,t))),vn=t=>void 0===t&&void 0!==t,_n=xt({showHidden:!1,depth:2,colors:!1,customInspect:!0,showProxy:!1,maxArrayLength:100,maxStringLength:1e4,breakLength:80,compact:3,sorted:!1,getters:!1,numericSeparator:!1}),wn=/[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,On=/[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g,En=/[\x00-\x1f\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Rn=/[\x00-\x1f\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g,Ln=/^[a-zA-Z_][a-zA-Z_0-9]*$/,kn=/^(0|[1-9][0-9]*)$/,In=/^ {4}at (?:[^/\\(]+ \(|)node:(.+):\d+:\d+\)?$/,jn=/^(\s+[^(]*?)\s*{/,zn=/(\/\/.*?\n)|(\/\*(.|\n)*?\*\/)/g,Bn=["\\x00","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\x07","\\b","\\t","\\n","\\x0B","\\f","\\r","\\x0E","\\x0F","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1A","\\x1B","\\x1C","\\x1D","\\x1E","\\x1F","","","","","","","","\\'","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\x7F","\\x80","\\x81","\\x82","\\x83","\\x84","\\x85","\\x86","\\x87","\\x88","\\x89","\\x8A","\\x8B","\\x8C","\\x8D","\\x8E","\\x8F","\\x90","\\x91","\\x92","\\x93","\\x94","\\x95","\\x96","\\x97","\\x98","\\x99","\\x9A","\\x9B","\\x9C","\\x9D","\\x9E","\\x9F"],Tn=new Lt("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))","g");let Mn;function Nn(t,e){const n={budget:{},indentationLvl:0,seen:[],currentDepth:0,stylize:Zn,showHidden:_n.showHidden,depth:_n.depth,colors:_n.colors,customInspect:_n.customInspect,showProxy:_n.showProxy,maxArrayLength:_n.maxArrayLength,maxStringLength:_n.maxStringLength,breakLength:_n.breakLength,compact:_n.compact,sorted:_n.sorted,getters:_n.getters,numericSeparator:_n.numericSeparator};if(arguments.length>1)if(arguments.length>2&&(void 0!==arguments[2]&&(n.depth=arguments[2]),arguments.length>3&&void 0!==arguments[3]&&(n.colors=arguments[3])),"boolean"==typeof e)n.showHidden=e;else if(e){const t=mt(e);for(let r=0;r<t.length;++r){const o=t[r];$t(_n,o)||"stylize"===o?n[o]=e[o]:void 0===n.userOptions&&(n.userOptions=e)}}return n.colors&&(n.stylize=Vn),null===n.maxArrayLength&&(n.maxArrayLength=1/0),null===n.maxStringLength&&(n.maxStringLength=1/0),nr(n,t,0)}Nn.custom=Ne,ft(Nn,"defaultOptions",{__proto__:null,get:()=>_n,set:t=>(dn(t,"options"),ut(_n,t))});const Fn=39,Cn=49;function Dn(t,e){ft(Nn.colors,e,{__proto__:null,get(){return this[t]},set(e){this[t]=e},configurable:!0,enumerable:!1})}Nn.colors={__proto__:null,reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],blink:[5,25],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],doubleunderline:[21,24],black:[30,Fn],red:[31,Fn],green:[32,Fn],yellow:[33,Fn],blue:[34,Fn],magenta:[35,Fn],cyan:[36,Fn],white:[37,Fn],bgBlack:[40,Cn],bgRed:[41,Cn],bgGreen:[42,Cn],bgYellow:[43,Cn],bgBlue:[44,Cn],bgMagenta:[45,Cn],bgCyan:[46,Cn],bgWhite:[47,Cn],framed:[51,54],overlined:[53,55],gray:[90,Fn],redBright:[91,Fn],greenBright:[92,Fn],yellowBright:[93,Fn],blueBright:[94,Fn],magentaBright:[95,Fn],cyanBright:[96,Fn],whiteBright:[97,Fn],bgGray:[100,Cn],bgRedBright:[101,Cn],bgGreenBright:[102,Cn],bgYellowBright:[103,Cn],bgBlueBright:[104,Cn],bgMagentaBright:[105,Cn],bgCyanBright:[106,Cn],bgWhiteBright:[107,Cn]},Dn("gray","grey"),Dn("gray","blackBright"),Dn("bgGray","bgGrey"),Dn("bgGray","bgBlackBright"),Dn("dim","faint"),Dn("strikethrough","crossedout"),Dn("strikethrough","strikeThrough"),Dn("strikethrough","crossedOut"),Dn("hidden","conceal"),Dn("inverse","swapColors"),Dn("inverse","swapcolors"),Dn("doubleunderline","doubleUnderline"),Nn.styles=ut({__proto__:null},{special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:function t(e){let n="",r=0,o=0,i=!1;const l=(t.colors?.length>0?t.colors:Wn).reduce((t,e)=>{const n=Nn.colors[e];return n&&t.push([`[${n[0]}m`,`[${n[1]}m`]),t},[]);function s(t,n,i=1){let l="";for(r++;r<e.length&&e[r]!==n;)l+=e[r++];r<e.length?(o-=i,c(t),a(l,1,1),c(n),o+=i):a(t,1,-l.length)}const c=t=>{const e=o%l.length,r=l[e]??l[0];return n+=r[0]+t+r[1],e};function a(t,e,n){o+=e,c(t),o-=e,r+=n}for(c("/"),o++,r=1;r<e.length;){const t=e[r];if(i)if("\\"===t){let t="\\";if(r++,r<e.length){t+=e[r++];const n=t[1];if("u"===n&&"{"===e[r]){s(`${t}{`,"}",0);continue}if(("p"===n||"P"===n)&&"{"===e[r]){s(`${t}{`,"}",0);continue}"x"===t[1]&&(t+=e.slice(r,r+2),r+=2)}c(t)}else"]"===t?(o--,c("]"),r++,i=!1):"-"===t&&"["!==e[r-1]&&r+1<e.length&&"]"!==e[r+1]?a("-",1,1):(c(t),r++);else if("["===t)c("["),o++,r++,i=!0;else if("("===t){if(c("("),o++,r++,r<e.length&&"?"===e[r]){r++;const t=r<e.length?e[r]:"";if(":"===t||"="===t||"!"===t)a(`?${t}`,-1,1);else{const n=r+1<e.length?e[r+1]:"";if("<"!==t||"="!==n&&"!"!==n)if("<"===t){r++;const t=r;for(;r<e.length&&">"!==e[r];)r++;const n=e.slice(t,r);r<e.length&&">"===e[r]?(o--,c("?<"),a(n,1,0),c(">"),o++,r++):(a("?<",-1,0),c(n))}else c("?");else a(`?<${n}`,-1,2)}}}else if(")"===t)o--,c(")"),r++;else if("\\"===t){let t="\\";if(r++,r<e.length){t+=e[r++];const n=t[1];if(r<e.length){if("u"===n&&"{"===e[r]){s(`${t}{`,"}",0);continue}if("x"===n)t+=e.slice(r,r+2),r+=2;else if(n>="0"&&n<="9")for(;r<e.length&&e[r]>="0"&&e[r]<="9";)t+=e[r++];else{if("k"===n&&"<"===e[r]){s(`${t}<`,">");continue}if(("p"===n||"P"===n)&&"{"===e[r]){s(`${t}{`,"}",0);continue}}}}a(t,1,0)}else if("|"===t||"+"===t||"*"===t||"?"===t||","===t||"^"===t||"$"===t)a(t,3,1);else if("{"===t){r++;let t="";for(;r<e.length&&e[r]>="0"&&e[r]<="9";)t+=e[r++];if(t&&(c("{"),o++,a(t,1,0)),r<e.length)if(","===e[r])t||(c("{"),o++),c(","),r++;else if(!t){o+=1,c("{"),o-=1;continue}let n="";for(;r<e.length&&e[r]>="0"&&e[r]<="9";)n+=e[r++];n&&a(n,1,0),r<e.length&&"}"===e[r]&&(o--,c("}"),r++),r<e.length&&"?"===e[r]&&a("?",3,1)}else if("."===t)a(t,2,1);else{if("/"===t)break;a(t,1,1)}}return a("/",-1,1),r<e.length&&c(e.slice(r)),n},module:"underline"}),Nn.styles.regexp.colors=["green","red","yellow","cyan","magenta"];const Wn=Nn.styles.regexp.colors.slice();function Hn(t,e){return-1===e?`"${t}"`:-2===e?`\`${t}\``:`'${t}'`}function Un(t){const e=Gt(t);return Bn.length>e?Bn[e]:`\\u${st(e,16)}`}function Gn(t){let e=wn,n=On,r=39;if(Yt(t,"'")&&(Yt(t,'"')?Yt(t,"`")||Yt(t,"${")||(r=-2):r=-1,39!==r&&(e=En,n=Rn)),t.length<5e3&&null===It(e,t))return Hn(t,r);if(t.length>100)return Hn(t=jt(n,t,Un),r);let o="",i=0;for(let e=0;e<t.length;e++){const n=Gt(t,e);if(n===r||92===n||n<32||n>126&&n<160)o+=i===e?Bn[n]:`${re(t,i,e)}${Bn[n]}`,i=e+1;else if(n>=55296&&n<=57343){if(n<=56319&&e+1<t.length){const n=Gt(t,e+1);if(n>=56320&&n<=57343){e++;continue}}o+=`${re(t,i,e)}\\u${st(n,16)}`,i=e+1}}return i!==t.length&&(o+=re(t,i)),Hn(o,r)}function Vn(t,e){const n=Nn.styles[e];if(void 0!==n){const e=Nn.colors[n];if(void 0!==e)return`[${e[0]}m${t}[${e[1]}m`;if("function"==typeof n)return n(t)}return t}function Zn(t){return t}function Yn(){return[]}function qn(t,e){try{return t instanceof e}catch{return!1}}const Jn=(new Tt).set(u,{name:"Array",constructor:l}).set(c,{name:"ArrayBuffer",constructor:s}).set(F,{name:"Function",constructor:N}).set(V,{name:"Map",constructor:G}).set(Ct,{name:"Set",constructor:Ft}).set(bt,{name:"Object",constructor:at}).set(de,{name:"TypedArray",constructor:he}).set(kt,{name:"RegExp",constructor:Lt}).set(k,{name:"Date",constructor:L}).set(R,{name:"DataView",constructor:E}).set(T,{name:"Error",constructor:B}).set(i,{name:"AggregateError",constructor:o}).set(Ot,{name:"RangeError",constructor:wt}).set(ge,{name:"TypeError",constructor:ye}).set(w,{name:"Boolean",constructor:_}).set(lt,{name:"Number",constructor:et}).set(Ut,{name:"String",constructor:Ht}).set(_t,{name:"Promise",constructor:vt}).set(Se,{name:"WeakMap",constructor:Pe}).set(Ae,{name:"WeakSet",constructor:xe});function Kn(t,e,n,r){let o;const i=t;for(;t||vn(t);){const l=Jn.get(t);if(void 0!==l){const{name:s,constructor:c}=l;if(W(c,i))return void 0!==r&&o!==t&&Qn(e,i,o||i,n,r),s}const s=pt(t,"constructor");if(void 0!==s&&"function"==typeof s.value&&""!==s.value.name&&qn(i,s.value))return void 0===r||o===t&&An.has(s.value.name)||Qn(e,i,o||i,n,r),Ht(s.value.name);t=ht(t),void 0===o&&(o=t)}if(null===o)return null;const l=Be(i);if(n>e.depth&&null!==e.depth)return`${l} <Complex prototype>`;const s=Kn(o,e,n+1,r);return null===s?`${l} <${Nn(o,{...e,customInspect:!1,depth:-1})}>`:`${l} <${s}>`}function Qn(t,e,n,r,o){let i,l,s=0;do{if(0!==s||e===n){if(null===(n=ht(n)))return;const t=pt(n,"constructor");if(void 0!==t&&"function"==typeof t.value&&An.has(t.value.name))return}0===s?l=new Mt:p(i,t=>l.add(t)),i=Rt(n),b(t.seen,e);for(const c of i){if("constructor"===c||$t(e,c)||0!==s&&l.has(c))continue;const i=pt(n,c);if("function"==typeof i.value)continue;const a=Er(t,n,r,c,0,i,e);t.colors?b(o,`[2m${a}[22m`):b(o,a)}m(t.seen)}while(3!==++s)}function Xn(t,e,n,r=""){if(null===t)return""!==e&&n!==e?`[${n}${r}: null prototype] [${e}] `:`[${n}${r}: null prototype] `;let o=`${t}${r} `;if(""!==e){const n=t.indexOf(e);if(-1===n)o+=`[${e}] `;else{const r=n+e.length;r!==t.length&&t[r]===t[r].toLowerCase()&&(o+=`[${e}] `)}}return o}function tr(t,e){let n;const r=gt(t);if(e)n=yt(t),0!==r.length&&$(n,r);else{try{n=mt(t)}catch(e){gn(tn(e)&&"ReferenceError"===e.name&&Xe(t)),n=yt(t)}0!==r.length&&$(n,f(r,e=>Pt(t,e)))}return n}function er(t,e,n){let r="";return null===e&&(r=Be(t),r===n&&(r="Object")),Xn(e,n,r)}function nr(t,e,o,i){if("object"!=typeof e&&"function"!=typeof e&&!vn(e))return pr(t.stylize,e,t);if(null===e)return t.stylize("null","null");const l=e;let s=0,c=je(e,!!t.showProxy);if(void 0!==c){if(t.showProxy)return null===c[0]?t.stylize("<Revoked Proxy>","special"):function(t,e,n){if(n>t.depth&&null!==t.depth)return t.stylize("Proxy [Array]","special");n+=1,t.indentationLvl+=2;const r=[nr(t,e[0],n),nr(t,e[1],n)];return t.indentationLvl-=2,Lr(t,r,"",["Proxy [","]"],2,n)}(t,c,o);do{if(null===c){let e=t.stylize("<Revoked Proxy>","special");for(let n=0;n<s;n++)e=`${t.stylize("Proxy(","special")}${e}${t.stylize(")","special")}`;return e}c=je(e=c,!1),s+=1}while(void 0!==c)}if(t.customInspect){const n=e[Ne];if("function"==typeof n&&n!==Nn&&pt(e,"constructor")?.value?.prototype!==e){const e=null===t.depth?null:t.depth-o,r=0!==s||!W(at,l),i=D(n,l,e,function(t,e){const n={stylize:t.stylize,showHidden:t.showHidden,depth:t.depth,colors:t.colors,customInspect:t.customInspect,showProxy:t.showProxy,maxArrayLength:t.maxArrayLength,maxStringLength:t.maxStringLength,breakLength:t.breakLength,compact:t.compact,sorted:t.sorted,getters:t.getters,numericSeparator:t.numericSeparator,...t.userOptions};if(e){At(n,null);for(const t of mt(n))"object"!=typeof n[t]&&"function"!=typeof n[t]||null===n[t]||delete n[t];n.stylize=At((e,n)=>{let r;try{r=`${t.stylize(e,n)}`}catch{}return"string"!=typeof r?e:r},null)}return n}(t,r),Nn);if(i!==l)return"string"!=typeof i?nr(t,i,o):ne(i,"\n",`\n${te(" ",t.indentationLvl)}`)}}if(t.seen.includes(e)){let n=1;return void 0===t.circular?(t.circular=new Tt,t.circular.set(e,n)):(n=t.circular.get(e),void 0===n&&(n=t.circular.size+1,t.circular.set(e,n))),t.stylize(`[Circular *${n}]`,"special")}let u=function(t,e,o,i){let l,s;t.showHidden&&(o<=t.depth||null===t.depth)&&(s=[]);const c=Kn(e,t,o,s);void 0!==s&&0===s.length&&(s=void 0);let u="";try{u=e[pe]}catch{}("string"!=typeof u||""!==u&&(t.showHidden?$t:Pt)(e,pe))&&(u="");let f,p,d="",m=Yn,_=!0;const w=t.showHidden?Oe:Ee;let E,R,L=0;if(ce in e||null===c)if(_=!1,a(e)){const t="Array"!==c||""!==u?Xn(c,u,"Array",`(${e.length})`):"";if(l=ke(e,w),f=[`${t}[`,"]"],0===e.length&&0===l.length&&void 0===s)return`${f[0]}]`;L=2,m=dr}else if(nn(e)){const n=Dt(e),r=Xn(c,u,"Set",`(${n})`);if(l=tr(e,t.showHidden),m=C(br,null,null!==c?e:Wt(e)),0===n&&0===l.length&&void 0===s)return`${r}{}`;f=[`${r}{`,"}"]}else if(Ke(e)){const n=Y(e),r=Xn(c,u,"Map",`(${n})`);if(l=tr(e,t.showHidden),m=C($r,null,null!==c?e:Z(e)),0===n&&0===l.length&&void 0===s)return`${r}{}`;f=[`${r}{`,"}"]}else if(an(e)){l=ke(e,w);let n=e,o="";null===c&&(o=be(e),n=new r[o](e));const s=me(e);if(f=[`${Xn(c,u,o,`(${s})`)}[`,"]"],0===e.length&&0===l.length&&!t.showHidden)return`${f[0]}]`;m=C(mr,null,n,s),L=2,t.showHidden&&(E=["BYTES_PER_ELEMENT","length","byteLength","byteOffset","buffer"],i=!0)}else Qe(e)?(l=tr(e,t.showHidden),f=rr("Map",u),m=C(_r,null,f)):rn(e)?(l=tr(e,t.showHidden),f=rr("Set",u),m=C(_r,null,f)):_=!0;if(_)if(l=tr(e,t.showHidden),f=["{","}"],"function"==typeof e){if(d=function(t,e,n,r){const o=H(e);if(ie(o,"class")&&"}"===o[o.length-1]){const t=re(o,5,-1),i=qt(t,"{");if(-1!==i&&(!Yt(re(t,0,i),"(")||null!==It(jn,jt(zn,t))))return function(t,e,n){let r=`class ${$t(t,"name")&&t.name||"(anonymous)"}`;if("Function"!==e&&null!==e&&(r+=` [${e}]`),""!==n&&e!==n&&(r+=` [${n}]`),null!==e){const e=ht(t).name;e&&(r+=` extends ${e}`)}else r+=" extends [null prototype]";return`[${r}]`}(e,n,r)}let i="Function";Ue(e)&&(i=`Generator${i}`),He(e)&&(i=`Async${i}`);let l=`[${i}`;return null===n&&(l+=" (null prototype)"),""===e.name?l+=" (anonymous)":l+=`: ${"string"==typeof e.name?e.name:nr(t,e.name)}`,l+="]",n!==i&&null!==n&&(l+=` ${n}`),""!==r&&n!==r&&(l+=` [${r}]`),l}(t,e,c,u),0===l.length&&void 0===s)return t.stylize(d,"special")}else if("Object"===c){if(Ze(e)?f[0]="[Arguments] {":""!==u&&(f[0]=`${Xn(c,u,"Object")}{`),0===l.length&&void 0===s)return`${f[0]}}`}else if(sn(e)){d=Bt(null!==c?e:new Lt(e));const n=Xn(c,u,"RegExp");if("RegExp "!==n&&(d=`${n}${d}`),d=t.stylize(d,"regexp"),0===l.length&&void 0===s||o>t.depth&&null!==t.depth)return d}else if(cn(e)){d=rt(I(e))?z(e):j(e);const n=Xn(c,u,"Date");if("Date "!==n&&(d=`${n}${d}`),0===l.length&&void 0===s)return t.stylize(d,"date")}else if(Fe(e)){if(d=function(t,e,n,r,o){let i,l,s;try{s=ir(r,t)}catch{return St(t)}let c=!1;try{i=t.message}catch{c=!0}let u=!1;try{l=t.name}catch{u=!0}if(!r.showHidden&&0!==o.length){const t=g(o,"stack");if(-1!==t&&x(o,t,1),!c){const t=g(o,"message");-1===t||"string"==typeof i&&!Yt(s,i)||x(o,t,1)}if(!u){const t=g(o,"name");-1===t||"string"==typeof l&&!Yt(s,l)||x(o,t,1)}}l=l??"Error",!$t(t,"cause")||0!==o.length&&y(o,"cause")||b(o,"cause");try{const e=t.errors;!a(e)||!$t(t,"errors")||0!==o.length&&y(o,"errors")||b(o,"errors")}catch{}s=function(t,e,n,r){let o=n.length;if("string"!=typeof n&&(t=ee(t,`${n}`,`${n} [${re(Xn(e,r,"Error"),0,-1)}]`)),null===e||Zt(n,"Error")&&ie(t,n)&&(t.length===o||":"===t[o]||"\n"===t[o])){let i="Error";if(null===e){const e=It(/^([A-Z][a-z_ A-Z0-9[\]()-]+)(?::|\n {4}at)/,t)||It(/^([a-z_A-Z0-9-]*Error)$/,t);i=e?.[1]||"",o=i.length,i=i||"Error"}const l=re(Xn(e,r,i),0,-1);n!==l&&(t=Yt(l,n)?0===o?`${l}: ${t}`:`${l}${re(t,o)}`:`${l} [${n}]${re(t,o)}`)}return t}(s,e,l,n);let f=i&&qt(s,i)||-1;-1!==f&&(f+=i.length);const p=qt(s,"\n at",f);if(-1===p)s=`[${s}]`;else{let e=re(s,0,p);const n=function(t,e,n){const r=oe(n,"\n");let o;try{({cause:o}=e)}catch{}if(null!=o&&Fe(o)){const e=ir(t,o),n=qt(e,"\n at");if(-1!==n){const o=oe(re(e,n+1),"\n"),{0:i,1:l}=or(r,o);if(i>0){const e=i-2,n=` ... ${e} lines matching cause stack trace ...`;r.splice(l+1,e,t.stylize(n,"undefined"))}}}if(r.length>10){const e=function(t){const e=[],n=new Tt;for(let e=0;e<t.length;e++){const r=n.get(t[e]);void 0===r?n.set(t[e],[e]):r[r.length]=e}if(t.length-n.size<=3)return e;for(let r=0;r<t.length-3;r++){const o=n.get(t[r]);if(1===o.length||o[o.length-1]===r)continue;const i=o.indexOf(r)+1;if(i===o.length)continue;let l,s=o[o.length-1]-r;if(s<3)continue;if(i+1<o.length){let t=0;for(let e=i;e<o.length;e++){let n=o[e]-r;for(;0!==n;){const e=t%n;0!==t&&(l=l||new Mt,l.add(t)),t=n,n=e}if(1===t)break}s=t,l&&(l.delete(s),l=[...l])}let c=s,a=0,u=0;for(let e=r+s;;e+=s){let n=0;for(let o=0;o<s&&t[r+o]===t[e+o];o++)n++;if(n===s)u++;else{if(!l?.length)break;0!==u&&c*a<s*u&&(c=s,a=u),s=l.pop(),e=r,u=0}}0!==a&&c*a>=s*u&&(s=c,u=a),u*s>=3&&(e.push(r+s,s,u),r+=s*(u+1)-1)}return e}(r);for(let n=e.length-3;n>=0;n-=3){const o=e[n],i=e[n+1],l=e[n+2],s=` ... collapsed ${i*l} duplicate lines matching above `+(l>1?`${i} lines ${l} times...`:"lines ...");r.splice(o,i*l,t.stylize(s,"undefined"))}}return r}(r,t,re(s,p+1));if(r.colors){const t=function(){let t;try{t=process.cwd()}catch{return}return t}();let o;for(let i of n){const n=It(In,i);if(null!==n&&hn.exists(n[1]))e+=`\n${r.stylize(i,"undefined")}`;else{if(e+="\n",i=lr(r,i),void 0!==t){let e=sr(r,i,t);e===i&&(o=o||xn(t),e=sr(r,i,o)),i=e}e+=i}}}else e+=`\n${h(n,"\n")}`;s=e}if(0!==r.indentationLvl){const t=te(" ",r.indentationLvl);s=ne(s,"\n",`\n${t}`)}return s}(e,c,u,t,l),0===l.length&&void 0===s)return d}else if(Ge(e)){const n=Xn(c,u,Ve(e)?"ArrayBuffer":"SharedArrayBuffer");if(void 0===i)m=hr;else if(0===l.length&&void 0===s)return n+`{ [byteLength]: ${ur(t.stylize,e.byteLength,!1)} }`;f[0]=`${n}{`,E=["byteLength"]}else if(qe(e))f[0]=`${Xn(c,u,"DataView")}{`,E=["byteLength","byteOffset","buffer"];else if(en(e))f[0]=`${Xn(c,u,"Promise")}{`,m=wr;else if(ln(e))f[0]=`${Xn(c,u,"WeakSet")}{`,m=t.showHidden?Ar:xr;else if(on(e))f[0]=`${Xn(c,u,"WeakMap")}{`,m=t.showHidden?vr:xr;else if(Xe(e))f[0]=`${Xn(c,u,"Module")}{`,m=yr.bind(null,l);else if(Ye(e)){if(d=function(t,e,n,r,o){let i,l;fn(t)?(i=ct,l="Number"):un(t)?(i=se,l="String",n.splice(0,t.length)):pn(t)?(i=O,l="Boolean"):yn(t)?(i=v,l="BigInt"):(i=ue,l="Symbol");let s=`[${l}`;return l!==r&&(s+=null===r?" (null prototype)":` (${r})`),s+=`: ${pr(Zn,i(t),e)}]`,""!==o&&o!==r&&(s+=` [${o}]`),0!==n.length||e.stylize===Zn?s:e.stylize(s,le(l))}(e,t,l,c,u),0===l.length&&void 0===s)return d}else if(!function(t){return Pn=Pn||n(812),"string"==typeof t.href&&t instanceof Pn.URL}(e)||o>t.depth&&null!==t.depth){if(0===l.length&&void 0===s){if(Je(e)){const n=Te(e).toString(16);return t.stylize(`[External: ${n}]`,"special")}return`${er(e,c,u)}{}`}f[0]=`${er(e,c,u)}{`}else if(l=function(t){return Sn=Sn||gt(new Pn.URL("http://user:pass@localhost:8080/?foo=bar#baz")),t.filter(t=>-1===Sn[t])}(l),d=e.href,0===l.length&&void 0===s)return d;if(o>t.depth&&null!==t.depth){let n=re(er(e,c,u),0,-1);return null!==c&&(n=`[${n}]`),t.stylize(n,"special")}o+=1,t.seen.push(e),t.currentDepth=o;const k=t.indentationLvl;try{if(R=m(t,e,o),void 0!==E)for(p=0;p<E.length;p++){let n;try{n=Or(t,e,o,E[p],i)}catch{n=Or(t,{[E[p]]:e.buffer[E[p]]},o,E[p],i)}b(R,n)}for(p=0;p<l.length;p++)b(R,Er(t,e,o,l[p],L));void 0!==s&&$(R,s)}catch(n){if(!We(n))throw n;return function(t,e,n,r){return t.seen.pop(),t.indentationLvl=r,t.stylize(`[${n}: Inspection interrupted prematurely. Maximum call stack size exceeded.]`,"special")}(t,0,re(er(e,c,u),0,-1),k)}if(void 0!==t.circular){const n=t.circular.get(e);if(void 0!==n){const e=t.stylize(`<ref *${n}>`,"special");!0!==t.compact?d=""===d?e:`${e} ${d}`:f[0]=`${e} ${f[0]}`}}if(t.seen.pop(),t.sorted){const e=!0===t.sorted?void 0:t.sorted;if(0===L)S(R,e);else if(l.length>1){const t=S(P(R,R.length-l.length),e);A(t,R,R.length-l.length,l.length),Et(x,null,t)}}const B=Lr(t,R,d,f,L,o,e),T=(t.budget[t.indentationLvl]||0)+B.length;return t.budget[t.indentationLvl]=T,T>2**27&&(t.depth=-1),B}(t,e,o,i);if(0!==s)for(let e=0;e<s;e++)u=`${t.stylize("Proxy(","special")}${u}${t.stylize(")","special")}`;return u}function rr(t,e){return e!==`${t} Iterator`&&(""!==e&&(e+="] ["),e+=`${t} Iterator`),[`[${e}] {`,"}"]}function or(t,e){for(let n=0;n<t.length-3;n++){const r=g(e,t[n]);if(-1!==r){const o=e.length-r;if(o>3){let i=1;const l=K(t.length-n,o);for(;l>i&&t[n+i]===e[r+i];)i++;if(i>3)return[i,n]}}}return[0,0]}function ir(t,e){let n;try{n=e.stack}catch{}if(n){if("string"==typeof n)return n;t.seen.push(e),t.indentationLvl+=4;const r=nr(t,n);return t.indentationLvl-=4,t.seen.pop(),`${M(e)}\n ${r}`}return M(e)}function lr(t,e){let n="",r=0,o=0;for(;;){const i=qt(e,"node_modules",o);if(-1===i)break;const l=e[i-1],s=e[i+12];if("/"!==s&&"\\"!==s||"/"!==l&&"\\"!==l){o=i+1;continue}const c=i+13;n+=re(e,r,c);let a=qt(e,l,c);-1===a?a=e.length:"@"===e[c]&&(a=qt(e,l,a+1),-1===a&&(a=e.length));const u=re(e,c,a);n+=t.stylize(u,"module"),r=a,o=a}return 0!==r&&(e=n+re(e,r)),e}function sr(t,e,n){let r=qt(e,n),o="",i=n.length;if(-1!==r){"file://"===re(e,r-7,r)&&(i+=7,r-=7);const n="("===e[r-1]?r-1:r,l=n!==r&&Zt(e,")")?-1:e.length,s=r+i+1,c=re(e,n,s);o+=re(e,0,n),o+=t.stylize(c,"undefined"),o+=re(e,s,l),-1===l&&(o+=t.stylize(")","undefined"))}else o+=e;return o}function cr(t){let e="",n=t.length;gn(0!==n);const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${re(t,n-3,n)}${e}`;return n===t.length?t:`${re(t,0,n)}${e}`}const ar=t=>`... ${t} more item${t>1?"s":""}`;function ur(t,e,n){if(dt(e,-0))return t("-0","number");if(!n)return t(`${e}`,"number");const r=Ht(e);if(tt(e)===e)return!nt(e)||Yt(r,"e")?t(r,"number"):t(cr(r),"number");if(rt(e)||Yt(r,"e"))return t(r,"number");const o=qt(r,"."),i=re(r,0,o),l=re(r,o+1);return t(`${cr(i)}.${function(t){let e="",n=0;for(;n<t.length-3;n+=3)e+=`${re(t,n,n+3)}_`;return 0===n?t:`${e}${re(t,n)}`}(l)}`,"number")}function fr(t,e,n){const r=Ht(e);return t(n?`${cr(r)}n`:`${r}n`,"bigint")}function pr(t,e,n){if("string"==typeof e){let r="";if(e.length>n.maxStringLength){const t=e.length-n.maxStringLength;e=re(e,0,n.maxStringLength),r=`... ${t} more character${t>1?"s":""}`}return!0!==n.compact&&e.length>16&&e.length>n.breakLength-n.indentationLvl-4?h(d(zt(/(?<=\n)/,e),e=>t(Gn(e),"string")),` +\n${te(" ",n.indentationLvl+2)}`)+r:t(Gn(e),"string")+r}return"number"==typeof e?ur(t,e,n.numericSeparator):"bigint"==typeof e?fr(t,e,n.numericSeparator):"boolean"==typeof e?t(`${e}`,"boolean"):void 0===e?t("undefined","undefined"):t(ae(e),"symbol")}function yr(t,e,n,r){const o=new l(t.length);for(let i=0;i<t.length;i++)try{o[i]=Er(e,n,r,t[i],0)}catch(n){gn(tn(n)&&"ReferenceError"===n.name);const l={[t[i]]:""};o[i]=Er(e,l,r,t[i],0);const s=Jt(o[i]," ");o[i]=re(o[i],0,s+1)+e.stylize("<uninitialized>","special")}return t.length=0,o}function gr(t,e,n,r,o,i){const l=mt(e);let s=i;for(;i<l.length&&o.length<r;i++){const c=l[i],a=+c;if(a>2**32-2)break;if(`${s}`!==c){if(null===It(kn,c))break;const e=a-s,n=`<${e} empty item${e>1?"s":""}>`;if(b(o,t.stylize(n,"undefined")),s=a,o.length===r)break}b(o,Er(t,e,n,c,1)),s++}const c=e.length-s;if(o.length!==r){if(c>0){const e=`<${c} empty item${c>1?"s":""}>`;b(o,t.stylize(e,"undefined"))}}else c>0&&b(o,ar(c));return o}function hr(t,e){let r;try{r=new $e(e)}catch{return[t.stylize("(detached)","special")]}void 0===$n&&($n=we(n(537).h.prototype.hexSlice));const o=$n(r,0,K(t.maxArrayLength,r.length));let i="",l=0;for(;l<o.length-2;l+=2)i+=`${o[l]}${o[l+1]} `;o.length>0&&(i+=`${o[l]}${o[l+1]}`);const s=r.length-t.maxArrayLength;return s>0&&(i+=` ... ${s} more byte${s>1?"s":""}`),[`${t.stylize("[Uint8Contents]","special")}: <${i}>`]}function dr(t,e,n){const r=e.length,o=K(J(0,t.maxArrayLength),r),i=r-o,l=[];for(let r=0;r<o;r++){const i=pt(e,r);if(void 0===i)return gr(t,e,n,o,l,r);b(l,Er(t,e,n,r,1,i))}return i>0&&b(l,ar(i)),l}function mr(t,e,n){const r=K(J(0,n.maxArrayLength),e),o=t.length-r,i=new l(r),s=t.length>0&&"number"==typeof t[0]?ur:fr;for(let e=0;e<r;++e)i[e]=s(n.stylize,t[e],n.numericSeparator);return o>0&&(i[r]=ar(o)),i}function br(t,e,n,r){const o=t.size,i=K(J(0,e.maxArrayLength),o),l=o-i,s=[];e.indentationLvl+=2;let c=0;for(const n of t){if(c>=i)break;b(s,nr(e,n,r)),c++}return l>0&&b(s,ar(l)),e.indentationLvl-=2,s}function $r(t,e,n,r){const o=t.size,i=K(J(0,e.maxArrayLength),o),l=o-i,s=[];e.indentationLvl+=2;let c=0;for(const{0:n,1:o}of t){if(c>=i)break;b(s,`${nr(e,n,r)} => ${nr(e,o,r)}`),c++}return l>0&&b(s,ar(l)),e.indentationLvl-=2,s}function Pr(t,e,n,r){const o=J(t.maxArrayLength,0),i=K(o,n.length),s=new l(i);t.indentationLvl+=2;for(let r=0;r<i;r++)s[r]=nr(t,n[r],e);t.indentationLvl-=2,0!==r||t.sorted||S(s);const c=n.length-i;return c>0&&b(s,ar(c)),s}function Sr(t,e,n,r){const o=J(t.maxArrayLength,0),i=n.length/2,s=i-o,c=K(o,i),a=new l(c);let u=0;if(t.indentationLvl+=2,0===r){for(;u<c;u++){const r=2*u;a[u]=`${nr(t,n[r],e)} => ${nr(t,n[r+1],e)}`}t.sorted||S(a)}else for(;u<c;u++){const r=2*u,o=[nr(t,n[r],e),nr(t,n[r+1],e)];a[u]=Lr(t,o,"",["[","]"],2,e)}return t.indentationLvl-=2,s>0&&b(a,ar(s)),a}function xr(t){return[t.stylize("<items unknown>","special")]}function Ar(t,e,n){return Pr(t,n,ze(e),0)}function vr(t,e,n){return Sr(t,n,ze(e),0)}function _r(t,e,n,r){const{0:o,1:i}=ze(n,!0);return i?(t[0]=jt(/ Iterator] {$/,t[0]," Entries] {"),Sr(e,r,o,2)):Pr(e,r,o,1)}function wr(t,e,n){let r;const{0:o,1:i}=Ie(e);if(o===Re)r=[t.stylize("<pending>","special")];else{t.indentationLvl+=2;const e=nr(t,i,n);t.indentationLvl-=2,r=[o===Le?`${t.stylize("<rejected>","special")} ${e}`:e]}return r}function Or(t,e,n,r,o){t.indentationLvl+=2;const i=nr(t,e[r],n,o);return t.indentationLvl-=2,`${t.stylize(`[${r}]`,"string")}: ${i}`}function Er(t,e,n,r,o,i,l=e){let s,c,a=" ";if(void 0!==(i=i||pt(e,r)).value){const e=!0!==t.compact||0!==o?2:3;t.indentationLvl+=e,c=nr(t,i.value,n),3===e&&t.breakLength<Mn(c,t.colors)&&(a=`\n${te(" ",t.indentationLvl)}`),t.indentationLvl-=e}else if(void 0!==i.get){const e=void 0!==i.set?"Getter/Setter":"Getter",r=t.stylize,o="special";if(t.getters&&(!0===t.getters||"get"===t.getters&&void 0===i.set||"set"===t.getters&&void 0!==i.set)){t.indentationLvl+=2;try{const s=D(i.get,l);if(null===s)c=`${r(`[${e}:`,o)} ${r("null","null")}${r("]",o)}`;else if("object"==typeof s)c=`${r(`[${e}]`,o)} ${nr(t,s,n)}`;else{const n=pr(r,s,t);c=`${r(`[${e}:`,o)} ${n}${r("]",o)}`}}catch(i){const l=`<Inspection threw (${nr(t,i,n)})>`;c=`${r(`[${e}:`,o)} ${l}${r("]",o)}`}t.indentationLvl-=2}else c=t.stylize(`[${e}]`,o)}else c=void 0!==i.set?t.stylize("[Setter]","special"):t.stylize("undefined","undefined");if(1===o)return c;if("symbol"==typeof r){const e=jt(On,ae(r),Un);s=t.stylize(e,"symbol")}else s=null!==It(Ln,r)?"__proto__"===r?"['__proto__']":t.stylize(r,"name"):t.stylize(Gn(r),"string");return!1===i.enumerable&&(s=`[${s}]`),`${s}:${a}${c}`}function Rr(t,e,n,r){let o=e.length+n;if(o+e.length>t.breakLength)return!1;for(let n=0;n<e.length;n++)if(t.colors?o+=De(e[n]).length:o+=e[n].length,o>t.breakLength)return!1;return""===r||!Yt(r,"\n")}function Lr(t,e,n,r,o,i,s){if(!0!==t.compact){if("number"==typeof t.compact&&t.compact>=1){const c=e.length;if(2===o&&c>6&&(e=function(t,e,n){let r=0,o=0,i=0,s=e.length;t.maxArrayLength<e.length&&s--;const c=new l(s);for(;i<s;i++){const n=Mn(e[i],t.colors);c[i]=n,r+=n+2,o<n&&(o=n)}const a=o+2;if(3*a+t.indentationLvl<t.breakLength&&(r/a>5||o<=6)){const o=2.5,i=X(a-r/e.length),l=J(a-3-i,1),u=K(Q(X(o*l*s)/l),q((t.breakLength-t.indentationLvl)/a),4*t.compact,15);if(u<=1)return e;const f=[],p=[];for(let t=0;t<u;t++){let n=0;for(let r=t;r<e.length;r+=u)c[r]>n&&(n=c[r]);n+=2,p[t]=n}let y=Xt;if(void 0!==n)for(let t=0;t<e.length;t++)if("number"!=typeof n[t]&&"bigint"!=typeof n[t]){y=Qt;break}for(let t=0;t<s;t+=u){const n=K(t+u,s);let r="",o=t;for(;o<n-1;o++){const n=p[o-t]+e[o].length-c[o];r+=y(`${e[o]}, `,n," ")}if(y===Xt){const n=p[o-t]+e[o].length-c[o]-2;r+=Xt(e[o],n," ")}else r+=e[o];b(f,r)}t.maxArrayLength<e.length&&b(f,e[s]),e=f}return e}(t,e,s)),t.currentDepth-i<t.compact&&c===e.length&&Rr(t,e,e.length+t.indentationLvl+r[0].length+n.length+10,n)){const t=Ce(e,", ");if(!Yt(t,"\n"))return`${n?`${n} `:""}${r[0]} ${t} ${r[1]}`}}const c=`\n${te(" ",t.indentationLvl)}`;return`${n?`${n} `:""}${r[0]}${c} ${Ce(e,`,${c} `)}${c}${r[1]}`}if(Rr(t,e,0,n))return`${r[0]}${n?` ${n}`:""} ${Ce(e,", ")} `+r[1];const c=te(" ",t.indentationLvl),a=""===n&&1===r[0].length?" ":`${n?` ${n}`:""}\n${c} `;return`${r[0]}${a}${Ce(e,`,\n${c} `)} ${r[1]}`}function kr(t){const e=je(t,!1);if(void 0!==e)return null===e||kr(e);let n=$t,r=$t;if("function"!=typeof t.toString){if("function"!=typeof t[fe])return!0;if($t(t,fe))return!1;n=Ir}else{if($t(t,"toString"))return!1;if("function"!=typeof t[fe])r=Ir;else if($t(t,fe))return!1}let o=t;do{o=ht(o)}while(!n(o,"toString")&&!r(o,fe));const i=pt(o,"constructor");return void 0!==i&&"function"==typeof i.value&&An.has(i.value.name)}function Ir(){return!1}const jr=t=>oe(t.message,"\n",1)[0];let zr;function Br(t){try{return U(t)}catch(t){if(!zr)try{const t={};t.a=t,U(t)}catch(t){zr=jr(t)}if("TypeError"===t.name&&jr(t)===zr)return"[Circular]";throw t}}function Tr(t,e){return ur(Zn,t,e?.numericSeparator??_n.numericSeparator)}function Mr(t,e){return fr(Zn,t,e?.numericSeparator??_n.numericSeparator)}function Nr(t,e){const n=e[0];let r=0,o="",i="";if("string"==typeof n){if(1===e.length)return n;let l,s=0;for(let i=0;i<n.length-1;i++)if(37===Gt(n,i)){const c=Gt(n,++i);if(r+1!==e.length){switch(c){case 115:{const n=e[++r];l="number"==typeof n?Tr(n,t):"bigint"==typeof n?Mr(n,t):"object"==typeof n&&null!==n&&kr(n)?Nn(n,{...t,compact:3,colors:!1,depth:0}):Ht(n);break}case 106:l=Br(e[++r]);break;case 100:{const n=e[++r];l="bigint"==typeof n?Mr(n,t):"symbol"==typeof n?"NaN":Tr(et(n),t);break}case 79:l=Nn(e[++r],t);break;case 111:l=Nn(e[++r],{...t,showHidden:!0,showProxy:!0,depth:4});break;case 105:{const n=e[++r];l="bigint"==typeof n?Mr(n,t):"symbol"==typeof n?"NaN":Tr(it(n),t);break}case 102:{const n=e[++r];l="symbol"==typeof n?"NaN":Tr(ot(n),t);break}case 99:r+=1,l="";break;case 37:o+=re(n,s,i),s=i+1;continue;default:continue}s!==i-1&&(o+=re(n,s,i-1)),o+=l,s=i+1}else 37===c&&(o+=re(n,s,i),s=i+1)}0!==s&&(r++,i=" ",s<n.length&&(o+=re(n,s)))}for(;r<e.length;){const n=e[r];o+=i,o+="string"!=typeof n?Nn(n,t):n,i=" ",r++}return o}function Fr(t){return t<=31||t>=127&&t<=159||t>=768&&t<=879||t>=8203&&t<=8207||t>=8400&&t<=8447||t>=65024&&t<=65039||t>=65056&&t<=65071||t>=917760&&t<=917999}if(_e("config").hasIntl)gn(!1);else{Mn=function(e,n=!0){let r=0;n&&(e=Cr(e)),e=Kt(e,"NFC");for(const n of new Nt(e)){const e=Vt(n,0);t(e)?r+=2:Fr(e)||r++}return r};const t=t=>t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=12871&&12351!==t||t>=12880&&t<=19903||t>=19968&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510||t>=110592&&t<=110593||t>=127488&&t<=127569||t>=127744&&t<=128591||t>=131072&&t<=262141)}function Cr(t){return mn(t,"str"),-1===qt(t,"")&&-1===qt(t,"")?t:jt(Tn,t,"")}const Dr={34:""",38:"&",39:"'",60:"<",62:">",160:" "};function Wr(t){return t.replace(/[\u0000-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u00FF]/g,t=>{const e=Ht(t.charCodeAt(0));return Dr[e]||"&#"+e+";"})}t.exports={identicalSequenceRange:or,inspect:Nn,inspectDefaultOptions:_n,format:function(...t){return Nr(void 0,t)},formatWithOptions:function(t,...e){return dn(t,"inspectOptions",bn),Nr(t,e)},getStringWidth:Mn,stripVTControlCharacters:Cr,isZeroWidthCodePoint:Fr,stylizeWithColor:Vn,stylizeWithHTML(t,e){const n=Nn.styles[e];return void 0!==n?`<span style="color:${n};">${Wr(t)}</span>`:Wr(t)},Proxy:Me}},123(t,e,n){let r;function o(){return r=null!=r?r:n(778).codes.ERR_INTERNAL_ASSERTION}function i(t,e){if(!t)throw new(o())(e)}i.fail=function(t){throw new(o())(t)},t.exports=i},947(t){const e=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","module","Module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"];t.exports.BuiltinModule={exists:t=>"internal/modules/cjs/foo"!==t&&(t.startsWith("internal/")||-1!==e.indexOf(t))}},244(t){t.exports={CHAR_DOT:46,CHAR_FORWARD_SLASH:47,CHAR_BACKWARD_SLASH:92}},778(t,e,n){const r=n(683),{ArrayIsArray:o,ArrayPrototypeIncludes:i,ArrayPrototypeIndexOf:l,ArrayPrototypeJoin:s,ArrayPrototypePush:c,ArrayPrototypeSlice:a,ArrayPrototypeSplice:u,Error:f,ErrorCaptureStackTrace:p,JSONStringify:y,ObjectDefineProperty:g,ReflectApply:h,RegExpPrototypeExec:d,SafeMap:m,SafeWeakMap:b,String:$,StringPrototypeEndsWith:P,StringPrototypeIncludes:S,StringPrototypeIndexOf:x,StringPrototypeSlice:A,StringPrototypeToLowerCase:v,Symbol:_,TypeError:w}=r,O=_("kIsNodeError"),E=new m,R={},L=/^[A-Z][a-zA-Z0-9]*$/,k=["string","function","number","object","Function","Object","boolean","bigint","symbol"],I=new b,j=n(123);let z,B,T=null;function M(t,e,n){E.set(t,e);const r=(o=n,i=t,class extends o{code=i;constructor(...t){super(),g(this,"message",{__proto__:null,value:N(i,t,this),enumerable:!1,writable:!0,configurable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}});var o,i;R[t]=r}function N(t,e,n){const r=E.get(t);if("function"==typeof r)return j(r.length<=e.length,`Code: ${t}; The provided arguments length (${e.length}) does not match the required ones (${r.length}).`),h(r,n,e)}const F=_("kEnhanceStackBeforeInspector");function C(t){if(null===t)return"null";if(void 0===t)return"undefined";switch(typeof t){case"bigint":return`type bigint (${t}n)`;case"number":return 0===t?1/t==-1/0?"type number (-0)":"type number (0)":t!=t?"type number (NaN)":t===1/0?"type number (Infinity)":t===-1/0?"type number (-Infinity)":`type number (${t})`;case"boolean":return t?"type boolean (true)":"type boolean (false)";case"symbol":return`type symbol (${$(t)})`;case"function":return`function ${t.name}`;case"object":return t.constructor&&"name"in t.constructor?`an instance of ${t.constructor.name}`:`${(T=T||n(223),T).inspect(t,{depth:-1})}`;case"string":return t.length>28&&(t=`${A(t,0,25)}...`),-1===x(t,"'")?`type string ('${t}')`:`type string (${y(t)})`}}function D(t,e="and"){switch(t.length){case 0:return"";case 1:return`${t[0]}`;case 2:return`${t[0]} ${e} ${t[1]}`;case 3:return`${t[0]}, ${t[1]}, ${e} ${t[2]}`;default:return`${s(a(t,0,-1),", ")}, ${e} ${t[t.length-1]}`}}t.exports={codes:R,determineSpecificType:C,E:M,formatList:D,getMessage:N,hideStackFrames:function(t){function e(...n){try{return h(t,this,n)}catch(t){throw f.stackTraceLimit&&p(t,e),t}}return e.withoutStackTrace=t,e},isStackOverflowError:function(t){if(void 0===B)try{function e(){e()}e()}catch(t){B=t.message,z=t.name}return t&&t.name===z&&t.message===B},kEnhanceStackBeforeInspector:F,kIsNodeError:O,overrideStackTrace:I},M("ERR_INTERNAL_ASSERTION",t=>{const e="This is caused by either a bug in Node.js or incorrect usage of Node.js internals.\nPlease open an issue with this stack trace at https://github.com/nodejs/node/issues\n";return void 0===t?e:`${t}\n${e}`},f),M("ERR_INVALID_ARG_TYPE",(t,e,n)=>{j("string"==typeof t,"'name' must be a string"),o(e)||(e=[e]);let r="The ";P(t," argument")?r+=`${t} `:r+=`"${t}" ${S(t,".")?"property":"argument"} `,r+="must be ";const s=[],a=[],f=[];for(const t of e)j("string"==typeof t,"All expected entries have to be of type string"),i(k,t)?c(s,v(t)):null!==d(L,t)?c(a,t):(j("object"!==t,'The value "object" should be written as "Object"'),c(f,t));if(a.length>0){const t=l(s,"object");-1!==t&&(u(s,t,1),c(a,"Object"))}return s.length>0&&(r+=`${s.length>1?"one of type":"of type"} ${D(s,"or")}`,(a.length>0||f.length>0)&&(r+=" or ")),a.length>0&&(r+=`an instance of ${D(a,"or")}`,f.length>0&&(r+=" or ")),f.length>0&&(f.length>1?r+=`one of ${D(f,"or")}`:(v(f[0])!==f[0]&&(r+="an "),r+=`${f[0]}`)),r+=`. Received ${C(n)}`,r},w)},812(t,e,n){const{StringPrototypeCharCodeAt:r,StringPrototypeIncludes:o,StringPrototypeReplace:i}=n(683),l=n(878),{CHAR_FORWARD_SLASH:s}=n(244),c=n(120),a=/%/g,u=/\\/g,f=/\n/g,p=/\r/g,y=/\t/g;t.exports={pathToFileURL:function(t){const e=new l("file://");let n=c.resolve(t);return r(t,t.length-1)===s&&n[n.length-1]!==c.sep&&(n+="/"),e.pathname=function(t){return o(t,"%")&&(t=i(t,a,"%25")),o(t,"\\")&&(t=i(t,u,"%5C")),o(t,"\n")&&(t=i(t,f,"%0A")),o(t,"\r")&&(t=i(t,p,"%0D")),o(t,"\t")&&(t=i(t,y,"%09")),t}(n),e},URL:l}},101(t,e,n){const r=n(683),{ArrayPrototypeJoin:o,Error:i,ErrorIsError:l,FunctionPrototypeSymbolHasInstance:s,StringPrototypeReplace:c,SymbolFor:a}=r,u=/\u001b\[\d\d?m/g;t.exports={customInspectSymbol:a("nodejs.util.inspect.custom"),isError:t=>l?.(t)||s(i,t),join:o,removeColors:t=>c(t,u,"")}},499(t,e,n){const r=n(683),{ArrayIsArray:o,BigInt:i,Boolean:l,DatePrototype:s,Error:c,FunctionPrototype:a,MapPrototypeHas:u,Number:f,ObjectDefineProperty:p,ObjectGetOwnPropertyDescriptor:y,ObjectGetPrototypeOf:g,ObjectIsFrozen:h,ObjectPrototype:d,SetPrototypeHas:m,String:b,Symbol:$,SymbolToStringTag:P,globalThis:S}=r,{getConstructorName:x}=n(727);function A(t,...e){for(const n of e){const e=S[n];if(e&&t instanceof e)return!0}for(;t;){if("object"!=typeof t)return!1;if(e.indexOf(x(t))>=0)return!0;t=g(t)}return!1}function v(t){return e=>{if(!A(e,t.name))return!1;try{t.prototype.valueOf.call(e)}catch{return!1}return!0}}"object"!=typeof S&&(p(d,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete d.__magic__);const _=v(b),w=v(f),O=v(l),E=v(i),R=v($);t.exports={isAsyncFunction:t=>"function"==typeof t&&a.toString.call(t).startsWith("async"),isGeneratorFunction:t=>"function"==typeof t&&a.toString.call(t).match(/^(async\s+)?function *\*/),isAnyArrayBuffer:t=>A(t,"ArrayBuffer","SharedArrayBuffer"),isArrayBuffer:t=>A(t,"ArrayBuffer"),isArgumentsObject(t){if(null!==t&&"object"==typeof t&&!o(t)&&"number"==typeof t.length&&t.length===(0|t.length)&&t.length>=0){const e=y(t,"callee");return e&&!e.enumerable}return!1},isBoxedPrimitive:t=>w(t)||_(t)||O(t)||E(t)||R(t),isDataView:t=>A(t,"DataView"),isExternal:t=>"object"==typeof t&&h(t)&&null==g(t),isMap(t){if(!A(t,"Map"))return!1;try{u(t)}catch{return!1}return!0},isMapIterator:t=>"[object Map Iterator]"===d.toString.call(g(t)),isModuleNamespaceObject(t){try{return t&&"object"==typeof t&&"Module"===t[P]}catch{return!1}},isNativeError:t=>t instanceof c&&A(t,"Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","AggregateError"),isPromise:t=>A(t,"Promise"),isSet(t){if(!A(t,"Set"))return!1;try{m(t)}catch{return!1}return!0},isSetIterator:t=>"[object Set Iterator]"===d.toString.call(g(t)),isWeakMap:t=>A(t,"WeakMap"),isWeakSet:t=>A(t,"WeakSet"),isRegExp:t=>A(t,"RegExp"),isDate(t){if(A(t,"Date"))try{return s.getTime.call(t),!0}catch{}return!1},isTypedArray:t=>A(t,"Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"),isStringObject:_,isNumberObject:w,isBooleanObject:O,isBigIntObject:E,isSymbolObject:R}},302(t,e,n){const{ArrayIsArray:r}=n(683),{hideStackFrames:o,codes:{ERR_INVALID_ARG_TYPE:i}}=n(778),l=o((t,e,n=0)=>{if(0===n){if(null===t||r(t))throw new i(e,"Object",t);if("object"!=typeof t)throw new i(e,"Object",t)}else{if(!(1&n)&&null===t)throw new i(e,"Object",t);if(!(2&n)&&r(t))throw new i(e,"Object",t);const o=typeof t;if(!("object"===o||4&n&&"function"===o))throw new i(e,"Object",t)}});t.exports={kValidateObjectNone:0,kValidateObjectAllowNullable:1,kValidateObjectAllowArray:2,kValidateObjectAllowFunction:4,validateObject:l,validateString:function(t,e){if("string"!=typeof t)throw new i(e,"string",t)}}},120(t,e,n){const{StringPrototypeCharCodeAt:r,StringPrototypeLastIndexOf:o,StringPrototypeSlice:i}=n(683),{CHAR_DOT:l,CHAR_FORWARD_SLASH:s}=n(244),{validateString:c}=n(302);function a(t){return t===s}function u(t,e,n,c){let a="",u=0,f=-1,p=0,y=0;for(let g=0;g<=t.length;++g){if(g<t.length)y=r(t,g);else{if(c(y))break;y=s}if(c(y)){if(f===g-1||1===p);else if(2===p){if(a.length<2||2!==u||r(a,a.length-1)!==l||r(a,a.length-2)!==l){if(a.length>2){const t=o(a,n);-1===t?(a="",u=0):(a=i(a,0,t),u=a.length-1-o(a,n)),f=g,p=0;continue}if(0!==a.length){a="",u=0,f=g,p=0;continue}}e&&(a+=a.length>0?`${n}..`:"..",u=2)}else a.length>0?a+=`${n}${i(t,f+1,g)}`:a=i(t,f+1,g),u=g-f-1;f=g,p=0}else y===l&&-1!==p?++p:p=-1}return a}t.exports={isPosixPathSeparator:a,normalizeString:u,resolve:function(...t){if(0===t.length||1===t.length&&(""===t[0]||"."===t[0])){const t="/";if(r(t,0)===s)return t}let e="",n=!1;for(let o=t.length-1;o>=0&&!n;o--){const i=t[o];c(i,`paths[${o}]`),0!==i.length&&(e=`${i}/${e}`,n=r(i,0)===s)}if(!n){const t="/";e=`${t}/${e}`,n=r(t,0)===s}return e=u(e,!n,"/",a),n?`/${e}`:e.length>0?e:"."}}},683(t){const e={__proto__:null},{defineProperty:n,getOwnPropertyDescriptor:r,ownKeys:o}=Reflect,{apply:i,bind:l,call:s}=Function.prototype,c=l.bind(s);e.uncurryThis=c;const a=l.bind(i);e.applyBind=a;const u=["ArrayOf","ArrayPrototypePush","ArrayPrototypeUnshift","MathHypot","MathMax","MathMin","StringFromCharCode","StringFromCodePoint","StringPrototypeConcat","TypedArrayOf"];function f(t){return"symbol"==typeof t?`Symbol${t.description[7].toUpperCase()}${t.description.slice(8)}`:`${t[0].toUpperCase()}${t.slice(1)}`}function p(t,e,r,{enumerable:o,get:i,set:l}){n(t,`${e}Get${r}`,{__proto__:null,value:c(i),enumerable:o}),void 0!==l&&n(t,`${e}Set${r}`,{__proto__:null,value:c(l),enumerable:o})}function y(t,e,i){for(const l of o(t)){const o=f(l),s=r(t,l);if("get"in s)p(e,i,o,s);else{const r=`${i}${o}`;n(e,r,{__proto__:null,...s}),u.includes(r)&&n(e,`${r}Apply`,{__proto__:null,value:a(s.value,t)})}}}function g(t,e,i){for(const l of o(t)){const o=f(l),s=r(t,l);if("get"in s)p(e,i,o,s);else{const{value:t}=s;"function"==typeof t&&(s.value=c(t));const r=`${i}${o}`;n(e,r,{__proto__:null,...s}),u.includes(r)&&n(e,`${r}Apply`,{__proto__:null,value:a(t)})}}}["Proxy","globalThis"].forEach(t=>{e[t]=globalThis[t]}),[decodeURI,decodeURIComponent,encodeURI,encodeURIComponent].forEach(t=>{e[t.name]=t}),[escape,eval,unescape].forEach(t=>{e[t.name]=t}),["Atomics","JSON","Math","Proxy","Reflect"].forEach(t=>{y(globalThis[t],e,t)}),["AggregateError","Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","FinalizationRegistry","Float32Array","Float64Array","Function","Int16Array","Int32Array","Int8Array","Map","Number","Object","RangeError","ReferenceError","RegExp","Set","String","Symbol","SyntaxError","TypeError","URIError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","WeakMap","WeakRef","WeakSet"].forEach(t=>{const n=globalThis[t];n&&(e[t]=n,y(n,e,t),g(n.prototype,e,`${t}Prototype`))}),["Promise"].forEach(t=>{const i=globalThis[t];e[t]=i,function(t,e,i){for(const l of o(t)){const o=f(l),s=r(t,l);if("get"in s)p(e,i,o,s);else{const{value:r}=s;"function"==typeof r&&(s.value=r.bind(t)),n(e,`${i}${o}`,{__proto__:null,...s})}}}(i,e,t),g(i.prototype,e,`${t}Prototype`)}),[{name:"TypedArray",original:Reflect.getPrototypeOf(Uint8Array)}].forEach(({name:t,original:n})=>{e[t]=n,g(n,e,t),g(n.prototype,e,`${t}Prototype`)}),[{name:"ArrayIteratorPrototype",original:Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]())},{name:"AsyncFunctionPrototype",original:Reflect.getPrototypeOf(async function(){})},{name:"AsyncGeneratorFunctionPrototype",original:Reflect.getPrototypeOf(async function*(){})},{name:"AsyncIteratorPrototype",original:Reflect.getPrototypeOf(Reflect.getPrototypeOf(async function*(){}).prototype)},{name:"GeneratorFunctionPrototype",original:Reflect.getPrototypeOf(function*(){})},{name:"MapIteratorPrototype",original:Reflect.getPrototypeOf((new e.Map)[Symbol.iterator]())},{name:"RegExpStringIteratorPrototype",original:Reflect.getPrototypeOf(e.RegExp.prototype[Symbol.matchAll]())},{name:"SetIteratorPrototype",original:Reflect.getPrototypeOf((new e.Set)[Symbol.iterator]())},{name:"StringIteratorPrototype",original:Reflect.getPrototypeOf(String.prototype[Symbol.iterator]())}].forEach(({name:t,original:n})=>{e[t]=n,g(n,e,t)});const{ArrayPrototypeForEach:h,ArrayPrototypePushApply:d,ArrayPrototypeSlice:m,FinalizationRegistry:b,FunctionPrototypeCall:$,Map:P,ObjectFreeze:S,ObjectSetPrototypeOf:x,RegExp:A,Set:v,SymbolIterator:_,WeakMap:w,WeakRef:O,WeakSet:E}=e,R=(t,e)=>{class n{constructor(e){this._iterator=t(e)}next(){return e(this._iterator)}[_](){return this}}return x(n.prototype,null),S(n.prototype),S(n),n};e.SafeArrayIterator=R(e.ArrayPrototypeSymbolIterator,e.ArrayIteratorPrototypeNext),e.SafeStringIterator=R(e.StringPrototypeSymbolIterator,e.StringIteratorPrototypeNext);const L=(t,e)=>{h(o(t),o=>{r(e,o)||n(e,o,{__proto__:null,...r(t,o)})})},k=(t,e,i)=>{if(i){const l=new t;h(o(t.prototype),o=>{if(!r(e.prototype,o)){const s=r(t.prototype,o);if("function"==typeof s.value&&0===s.value.length&&$(s.value,l)?.next===i){const t=c(s.value),e=R(t,i);s.value=function(){return new e(this)}}n(e.prototype,o,{__proto__:null,...s})}})}else L(t.prototype,e.prototype);return L(t,e),x(e.prototype,null),S(e.prototype),S(e),e};e.makeSafe=k,e.SafeMap=k(P,class extends P{},e.MapIteratorPrototypeNext),e.SafeWeakMap=k(w,class extends w{}),e.SafeSet=k(v,class extends v{},e.SetIteratorPrototypeNext),e.SafeWeakSet=k(E,class extends E{}),e.SafeFinalizationRegistry=k(b,class extends b{}),e.SafeWeakRef=k(O,class extends O{}),e.internalBinding=t=>{if("config"===t)return{hasIntl:!1};throw new Error(`unknown module: "${t}"`)},e._stringPrototypeReplaceAll=(t,e,n)=>"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?t.replace(e,n):t.replace(new A(e,"g"),n),e.SafeArrayPrototypePushApply=(t,e)=>{let n=65536;if(n<e.length){let r=0;do{d(t,m(e,r,r=n)),n+=65536}while(n<e.length);e=m(e,r)}return d(t,e)},e.StringPrototypeReplaceAll=e.StringPrototypeReplaceAll||e._stringPrototypeReplaceAll,x(e,null),S(e),t.exports=e},179(t,e,n){const r=n(683),{Proxy:o,ProxyRevocable:i,SafeWeakMap:l}=r,s=new l;class c{constructor(t,e){const n=new o(t,e);return s.set(n,[t,e]),n}static getProxyDetails(t,e=!0){const n=s.get(t);if(n)return e?n:n[0]}static revocable(t,e){const n=i(t,e);s.set(n.proxy,[t,e]);const r=n.revoke;return n.revoke=()=>{s.set(n.proxy,[null,null]),r()},n}}t.exports={getProxyDetails:c.getProxyDetails.bind(c),Proxy:c}},878(t){t.exports=URL},727(t,e,n){const r=n(683),{BigInt:o,Error:i,NumberParseInt:l,ObjectEntries:s,ObjectGetOwnPropertyDescriptor:c,ObjectGetOwnPropertyDescriptors:a,ObjectGetOwnPropertySymbols:u,ObjectPrototypeToString:f,Symbol:p}=r,y=n(179),g=p("kPending"),h=p("kRejected");t.exports={constants:{kPending:g,kRejected:h,ALL_PROPERTIES:0,ONLY_ENUMERABLE:2},getOwnNonIndexProperties:function(t,e=2){const n=a(t),r=[];for(const[t,o]of s(n))if(!/^(0|[1-9][0-9]*)$/.test(t)||l(t,10)>=2**32-1){if(2===e&&!o.enumerable)continue;r.push(t)}for(const n of u(t)){const o=c(t,n);(2!==e||o.enumerable)&&r.push(n)}return r},getPromiseDetails:()=>[g,void 0],getProxyDetails:y.getProxyDetails,Proxy:y.Proxy,previewEntries:t=>[[],!1],getConstructorName(t){if(!t||"object"!=typeof t)throw new i("Invalid object");if(t.constructor?.name)return t.constructor.name;const e=f(t).match(/^\[object ([^\]]+)\]/);return e?e[1]:"Object"},getExternalValue:()=>o(0)}}};const e={};return function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}(223)})());
|
|
53275
|
+
!function(t,e){ true?module.exports=e():0}(this,()=>(()=>{"use strict";var t={308(t,e,n){const r=n(80),{ArrayPrototypeMap:o}=r;e.h=class{hexSlice(t=0,e){return o(this.slice(t,e),t=>("00"+t.toString(16)).slice(-2)).join("")}}},160(t,e,n){const r=n(80),{AggregateError:o,AggregateErrorPrototype:i,Array:l,ArrayBuffer:s,ArrayBufferPrototype:c,ArrayIsArray:a,ArrayPrototype:u,ArrayPrototypeFilter:f,ArrayPrototypeForEach:p,ArrayPrototypeIncludes:y,ArrayPrototypeIndexOf:g,ArrayPrototypeJoin:h,ArrayPrototypeMap:d,ArrayPrototypePop:m,ArrayPrototypePush:b,ArrayPrototypePushApply:$,ArrayPrototypeSlice:P,ArrayPrototypeSort:x,ArrayPrototypeSplice:S,ArrayPrototypeUnshift:A,BigIntPrototypeValueOf:v,Boolean:_,BooleanPrototype:w,BooleanPrototypeValueOf:O,DataView:E,DataViewPrototype:R,Date:L,DatePrototype:I,DatePrototypeGetTime:k,DatePrototypeToISOString:j,DatePrototypeToString:z,Error:B,ErrorPrototype:T,ErrorPrototypeToString:M,Function:N,FunctionPrototype:F,FunctionPrototypeBind:C,FunctionPrototypeCall:D,FunctionPrototypeSymbolHasInstance:W,FunctionPrototypeToString:H,JSONStringify:U,Map:G,MapPrototype:V,MapPrototypeEntries:Z,MapPrototypeGetSize:Y,MathFloor:q,MathMax:J,MathMin:K,MathRound:Q,MathSqrt:X,MathTrunc:tt,Number:et,NumberIsFinite:nt,NumberIsNaN:rt,NumberParseFloat:ot,NumberParseInt:it,NumberPrototype:lt,NumberPrototypeToString:st,NumberPrototypeValueOf:ct,Object:at,ObjectAssign:ut,ObjectDefineProperty:ft,ObjectGetOwnPropertyDescriptor:pt,ObjectGetOwnPropertyNames:yt,ObjectGetOwnPropertySymbols:gt,ObjectGetPrototypeOf:ht,ObjectIs:dt,ObjectKeys:mt,ObjectPrototype:bt,ObjectPrototypeHasOwnProperty:$t,ObjectPrototypePropertyIsEnumerable:Pt,ObjectPrototypeToString:xt,ObjectSeal:St,ObjectSetPrototypeOf:At,Promise:vt,PromisePrototype:_t,RangeError:wt,RangeErrorPrototype:Ot,ReflectApply:Et,ReflectOwnKeys:Rt,RegExp:Lt,RegExpPrototype:It,RegExpPrototypeExec:kt,RegExpPrototypeSymbolReplace:jt,RegExpPrototypeSymbolSplit:zt,RegExpPrototypeToString:Bt,SafeMap:Tt,SafeSet:Mt,SafeStringIterator:Nt,Set:Ft,SetPrototype:Ct,SetPrototypeGetSize:Dt,SetPrototypeValues:Wt,String:Ht,StringPrototype:Ut,StringPrototypeCharCodeAt:Gt,StringPrototypeCodePointAt:Vt,StringPrototypeEndsWith:Zt,StringPrototypeIncludes:Yt,StringPrototypeIndexOf:qt,StringPrototypeLastIndexOf:Jt,StringPrototypeNormalize:Kt,StringPrototypePadEnd:Qt,StringPrototypePadStart:Xt,StringPrototypeRepeat:te,StringPrototypeReplace:ee,StringPrototypeReplaceAll:ne,StringPrototypeSlice:re,StringPrototypeSplit:oe,StringPrototypeStartsWith:ie,StringPrototypeToLowerCase:le,StringPrototypeValueOf:se,SymbolIterator:ce,SymbolPrototypeToString:ae,SymbolPrototypeValueOf:ue,SymbolToPrimitive:fe,SymbolToStringTag:pe,TypeError:ye,TypeErrorPrototype:ge,TypedArray:he,TypedArrayPrototype:de,TypedArrayPrototypeGetLength:me,TypedArrayPrototypeGetSymbolToStringTag:be,Uint8Array:$e,WeakMap:Pe,WeakMapPrototype:xe,WeakSet:Se,WeakSetPrototype:Ae,globalThis:ve,internalBinding:_e,uncurryThis:we}=r,{constants:{ALL_PROPERTIES:Oe,ONLY_ENUMERABLE:Ee,kPending:Re,kRejected:Le},getOwnNonIndexProperties:Ie,getPromiseDetails:ke,getProxyDetails:je,previewEntries:ze,getConstructorName:Be,getExternalValue:Te,Proxy:Me}=n(38),{customInspectSymbol:Ne,isError:Fe,join:Ce,removeColors:De}=n(22),{isStackOverflowError:We}=n(317),{isAsyncFunction:He,isGeneratorFunction:Ue,isAnyArrayBuffer:Ge,isArrayBuffer:Ve,isArgumentsObject:Ze,isBoxedPrimitive:Ye,isDataView:qe,isExternal:Je,isMap:Ke,isMapIterator:Qe,isModuleNamespaceObject:Xe,isNativeError:tn,isPromise:en,isSet:nn,isSetIterator:rn,isWeakMap:on,isWeakSet:ln,isRegExp:sn,isDate:cn,isTypedArray:an,isStringObject:un,isNumberObject:fn,isBooleanObject:pn,isBigIntObject:yn}=n(124),gn=n(788),{BuiltinModule:hn}=n(986),{validateObject:dn,validateString:mn,kValidateObjectAllowArray:bn}=n(293);let $n,Pn,xn;function Sn(t){return Pn=Pn||n(613),Pn.pathToFileURL(t).href}const An=new Mt(f(yt(ve),t=>null!==kt(/^[A-Z][a-zA-Z0-9]+$/,t))),vn=t=>void 0===t&&void 0!==t,_n=St({showHidden:!1,depth:2,colors:!1,customInspect:!0,showProxy:!1,maxArrayLength:100,maxStringLength:1e4,breakLength:80,compact:3,sorted:!1,getters:!1,numericSeparator:!1}),wn=/[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,On=/[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g,En=/[\x00-\x1f\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Rn=/[\x00-\x1f\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g,Ln=/^[a-zA-Z_][a-zA-Z_0-9]*$/,In=/^(0|[1-9][0-9]*)$/,kn=/^ {4}at (?:[^/\\(]+ \(|)node:(.+):\d+:\d+\)?$/,jn=/^(\s+[^(]*?)\s*{/,zn=/(\/\/.*?\n)|(\/\*(.|\n)*?\*\/)/g,Bn=["\\x00","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\x07","\\b","\\t","\\n","\\x0B","\\f","\\r","\\x0E","\\x0F","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1A","\\x1B","\\x1C","\\x1D","\\x1E","\\x1F","","","","","","","","\\'","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\x7F","\\x80","\\x81","\\x82","\\x83","\\x84","\\x85","\\x86","\\x87","\\x88","\\x89","\\x8A","\\x8B","\\x8C","\\x8D","\\x8E","\\x8F","\\x90","\\x91","\\x92","\\x93","\\x94","\\x95","\\x96","\\x97","\\x98","\\x99","\\x9A","\\x9B","\\x9C","\\x9D","\\x9E","\\x9F"],Tn=new Lt("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]","g");let Mn;function Nn(t,e){const n={budget:{},indentationLvl:0,seen:[],currentDepth:0,stylize:Zn,showHidden:_n.showHidden,depth:_n.depth,colors:_n.colors,customInspect:_n.customInspect,showProxy:_n.showProxy,maxArrayLength:_n.maxArrayLength,maxStringLength:_n.maxStringLength,breakLength:_n.breakLength,compact:_n.compact,sorted:_n.sorted,getters:_n.getters,numericSeparator:_n.numericSeparator};if(arguments.length>1)if(arguments.length>2&&(void 0!==arguments[2]&&(n.depth=arguments[2]),arguments.length>3&&void 0!==arguments[3]&&(n.colors=arguments[3])),"boolean"==typeof e)n.showHidden=e;else if(e){const t=mt(e);for(let r=0;r<t.length;++r){const o=t[r];$t(_n,o)||"stylize"===o?n[o]=e[o]:void 0===n.userOptions&&(n.userOptions=e)}}return n.colors&&(n.stylize=Vn),null===n.maxArrayLength&&(n.maxArrayLength=1/0),null===n.maxStringLength&&(n.maxStringLength=1/0),nr(n,t,0)}Nn.custom=Ne,ft(Nn,"defaultOptions",{__proto__:null,get:()=>_n,set:t=>(dn(t,"options"),ut(_n,t))});const Fn=39,Cn=49;function Dn(t,e){ft(Nn.colors,e,{__proto__:null,get(){return this[t]},set(e){this[t]=e},configurable:!0,enumerable:!1})}Nn.colors={__proto__:null,reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],blink:[5,25],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],doubleunderline:[21,24],black:[30,Fn],red:[31,Fn],green:[32,Fn],yellow:[33,Fn],blue:[34,Fn],magenta:[35,Fn],cyan:[36,Fn],white:[37,Fn],bgBlack:[40,Cn],bgRed:[41,Cn],bgGreen:[42,Cn],bgYellow:[43,Cn],bgBlue:[44,Cn],bgMagenta:[45,Cn],bgCyan:[46,Cn],bgWhite:[47,Cn],framed:[51,54],overlined:[53,55],gray:[90,Fn],redBright:[91,Fn],greenBright:[92,Fn],yellowBright:[93,Fn],blueBright:[94,Fn],magentaBright:[95,Fn],cyanBright:[96,Fn],whiteBright:[97,Fn],bgGray:[100,Cn],bgRedBright:[101,Cn],bgGreenBright:[102,Cn],bgYellowBright:[103,Cn],bgBlueBright:[104,Cn],bgMagentaBright:[105,Cn],bgCyanBright:[106,Cn],bgWhiteBright:[107,Cn]},Dn("gray","grey"),Dn("gray","blackBright"),Dn("bgGray","bgGrey"),Dn("bgGray","bgBlackBright"),Dn("dim","faint"),Dn("strikethrough","crossedout"),Dn("strikethrough","strikeThrough"),Dn("strikethrough","crossedOut"),Dn("hidden","conceal"),Dn("inverse","swapColors"),Dn("inverse","swapcolors"),Dn("doubleunderline","doubleUnderline"),Nn.styles=ut({__proto__:null},{special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:function t(e){let n="",r=0,o=0,i=!1;const l=(t.colors?.length>0?t.colors:Wn).reduce((t,e)=>{const n=Nn.colors[e];return n&&t.push([`[${n[0]}m`,`[${n[1]}m`]),t},[]);function s(t,n,i=1){let l="";for(r++;r<e.length&&e[r]!==n;)l+=e[r++];r<e.length?(o-=i,c(t),a(l,1,1),c(n),o+=i):a(t,1,-l.length)}const c=t=>{const e=o%l.length,r=l[e]??l[0];return n+=r[0]+t+r[1],e};function a(t,e,n){o+=e,c(t),o-=e,r+=n}for(c("/"),o++,r=1;r<e.length;){const t=e[r];if(i)if("\\"===t){let t="\\";if(r++,r<e.length){t+=e[r++];const n=t[1];if("u"===n&&"{"===e[r]){s(`${t}{`,"}",0);continue}if(("p"===n||"P"===n)&&"{"===e[r]){s(`${t}{`,"}",0);continue}"x"===t[1]&&(t+=e.slice(r,r+2),r+=2)}c(t)}else"]"===t?(o--,c("]"),r++,i=!1):"-"===t&&"["!==e[r-1]&&r+1<e.length&&"]"!==e[r+1]?a("-",1,1):(c(t),r++);else if("["===t)c("["),o++,r++,i=!0;else if("("===t){if(c("("),o++,r++,r<e.length&&"?"===e[r]){r++;const t=r<e.length?e[r]:"";if(":"===t||"="===t||"!"===t)a(`?${t}`,-1,1);else{const n=r+1<e.length?e[r+1]:"";if("<"!==t||"="!==n&&"!"!==n)if("<"===t){r++;const t=r;for(;r<e.length&&">"!==e[r];)r++;const n=e.slice(t,r);r<e.length&&">"===e[r]?(o--,c("?<"),a(n,1,0),c(">"),o++,r++):(a("?<",-1,0),c(n))}else c("?");else a(`?<${n}`,-1,2)}}}else if(")"===t)o--,c(")"),r++;else if("\\"===t){let t="\\";if(r++,r<e.length){t+=e[r++];const n=t[1];if(r<e.length){if("u"===n&&"{"===e[r]){s(`${t}{`,"}",0);continue}if("x"===n)t+=e.slice(r,r+2),r+=2;else if(n>="0"&&n<="9")for(;r<e.length&&e[r]>="0"&&e[r]<="9";)t+=e[r++];else{if("k"===n&&"<"===e[r]){s(`${t}<`,">");continue}if(("p"===n||"P"===n)&&"{"===e[r]){s(`${t}{`,"}",0);continue}}}}a(t,1,0)}else if("|"===t||"+"===t||"*"===t||"?"===t||","===t||"^"===t||"$"===t)a(t,3,1);else if("{"===t){r++;let t="";for(;r<e.length&&e[r]>="0"&&e[r]<="9";)t+=e[r++];if(t&&(c("{"),o++,a(t,1,0)),r<e.length)if(","===e[r])t||(c("{"),o++),c(","),r++;else if(!t){o+=1,c("{"),o-=1;continue}let n="";for(;r<e.length&&e[r]>="0"&&e[r]<="9";)n+=e[r++];n&&a(n,1,0),r<e.length&&"}"===e[r]&&(o--,c("}"),r++),r<e.length&&"?"===e[r]&&a("?",3,1)}else if("."===t)a(t,2,1);else{if("/"===t)break;a(t,1,1)}}return a("/",-1,1),r<e.length&&c(e.slice(r)),n},module:"underline"}),Nn.styles.regexp.colors=["green","red","yellow","cyan","magenta"];const Wn=Nn.styles.regexp.colors.slice();function Hn(t,e){return-1===e?`"${t}"`:-2===e?`\`${t}\``:`'${t}'`}function Un(t){const e=Gt(t);return Bn.length>e?Bn[e]:`\\u${st(e,16)}`}function Gn(t){let e=wn,n=On,r=39;if(Yt(t,"'")&&(Yt(t,'"')?Yt(t,"`")||Yt(t,"${")||(r=-2):r=-1,39!==r&&(e=En,n=Rn)),t.length<5e3&&null===kt(e,t))return Hn(t,r);if(t.length>100)return Hn(t=jt(n,t,Un),r);let o="",i=0;for(let e=0;e<t.length;e++){const n=Gt(t,e);if(n===r||92===n||n<32||n>126&&n<160)o+=i===e?Bn[n]:`${re(t,i,e)}${Bn[n]}`,i=e+1;else if(n>=55296&&n<=57343){if(n<=56319&&e+1<t.length){const n=Gt(t,e+1);if(n>=56320&&n<=57343){e++;continue}}o+=`${re(t,i,e)}\\u${st(n,16)}`,i=e+1}}return i!==t.length&&(o+=re(t,i)),Hn(o,r)}function Vn(t,e){const n=Nn.styles[e];if(void 0!==n){const e=Nn.colors[n];if(void 0!==e)return`[${e[0]}m${t}[${e[1]}m`;if("function"==typeof n)return n(t)}return t}function Zn(t){return t}function Yn(){return[]}function qn(t,e){try{return t instanceof e}catch{return!1}}const Jn=(new Tt).set(u,{name:"Array",constructor:l}).set(c,{name:"ArrayBuffer",constructor:s}).set(F,{name:"Function",constructor:N}).set(V,{name:"Map",constructor:G}).set(Ct,{name:"Set",constructor:Ft}).set(bt,{name:"Object",constructor:at}).set(de,{name:"TypedArray",constructor:he}).set(It,{name:"RegExp",constructor:Lt}).set(I,{name:"Date",constructor:L}).set(R,{name:"DataView",constructor:E}).set(T,{name:"Error",constructor:B}).set(i,{name:"AggregateError",constructor:o}).set(Ot,{name:"RangeError",constructor:wt}).set(ge,{name:"TypeError",constructor:ye}).set(w,{name:"Boolean",constructor:_}).set(lt,{name:"Number",constructor:et}).set(Ut,{name:"String",constructor:Ht}).set(_t,{name:"Promise",constructor:vt}).set(xe,{name:"WeakMap",constructor:Pe}).set(Ae,{name:"WeakSet",constructor:Se});function Kn(t,e,n,r){let o;const i=t;for(;t||vn(t);){const l=Jn.get(t);if(void 0!==l){const{name:s,constructor:c}=l;if(W(c,i))return void 0!==r&&o!==t&&Qn(e,i,o||i,n,r),s}const s=pt(t,"constructor");if(void 0!==s&&"function"==typeof s.value&&""!==s.value.name&&qn(i,s.value))return void 0===r||o===t&&An.has(s.value.name)||Qn(e,i,o||i,n,r),Ht(s.value.name);t=ht(t),void 0===o&&(o=t)}if(null===o)return null;const l=Be(i);if(n>e.depth&&null!==e.depth)return`${l} <Complex prototype>`;const s=Kn(o,e,n+1,r);return null===s?`${l} <${Nn(o,{...e,customInspect:!1,depth:-1})}>`:`${l} <${s}>`}function Qn(t,e,n,r,o){let i,l,s=0;do{if(0!==s||e===n){if(null===(n=ht(n)))return;const t=pt(n,"constructor");if(void 0!==t&&"function"==typeof t.value&&An.has(t.value.name))return}0===s?l=new Mt:p(i,t=>l.add(t)),i=Rt(n),b(t.seen,e);for(const c of i){if("constructor"===c||$t(e,c)||0!==s&&l.has(c))continue;const i=pt(n,c);if("function"==typeof i.value)continue;const a=Er(t,n,r,c,0,i,e);t.colors?b(o,`[2m${a}[22m`):b(o,a)}m(t.seen)}while(3!==++s)}function Xn(t,e,n,r=""){if(null===t)return""!==e&&n!==e?`[${n}${r}: null prototype] [${e}] `:`[${n}${r}: null prototype] `;if(""!==e){const n=Jt(e,".");return t===(n>=1?re(e,n+1):e)?`${e}${r} `:`${t}${r} [${e}] `}return`${t}${r} `}function tr(t,e){let n;const r=gt(t);if(e)n=yt(t),0!==r.length&&$(n,r);else{try{n=mt(t)}catch(e){gn(tn(e)&&"ReferenceError"===e.name&&Xe(t)),n=yt(t)}0!==r.length&&$(n,f(r,e=>Pt(t,e)))}return n}function er(t,e,n){let r="";return null===e&&(r=Be(t),r===n&&(r="Object")),Xn(e,n,r)}function nr(t,e,o,i){if("object"!=typeof e&&"function"!=typeof e&&!vn(e))return pr(t.stylize,e,t);if(null===e)return t.stylize("null","null");const l=e;let s=0,c=je(e,!!t.showProxy);if(void 0!==c){if(t.showProxy)return null===c[0]?t.stylize("<Revoked Proxy>","special"):function(t,e,n){if(n>t.depth&&null!==t.depth)return t.stylize("Proxy [Array]","special");n+=1,t.indentationLvl+=2;const r=[nr(t,e[0],n),nr(t,e[1],n)];return t.indentationLvl-=2,Lr(t,r,"",["Proxy [","]"],2,n)}(t,c,o);do{if(null===c){let e=t.stylize("<Revoked Proxy>","special");for(let n=0;n<s;n++)e=`${t.stylize("Proxy(","special")}${e}${t.stylize(")","special")}`;return e}c=je(e=c,!1),s+=1}while(void 0!==c)}if(t.customInspect){const n=e[Ne];if("function"==typeof n&&n!==Nn&&pt(e,"constructor")?.value?.prototype!==e){const e=null===t.depth?null:t.depth-o,r=0!==s||!W(at,l),i=D(n,l,e,function(t,e){const n={stylize:t.stylize,showHidden:t.showHidden,depth:t.depth,colors:t.colors,customInspect:t.customInspect,showProxy:t.showProxy,maxArrayLength:t.maxArrayLength,maxStringLength:t.maxStringLength,breakLength:t.breakLength,compact:t.compact,sorted:t.sorted,getters:t.getters,numericSeparator:t.numericSeparator,...t.userOptions};if(e){At(n,null);for(const t of mt(n))"object"!=typeof n[t]&&"function"!=typeof n[t]||null===n[t]||delete n[t];n.stylize=At((e,n)=>{let r;try{r=`${t.stylize(e,n)}`}catch{}return"string"!=typeof r?e:r},null)}return n}(t,r),Nn);if(i!==l)return"string"!=typeof i?nr(t,i,o):ne(i,"\n",`\n${te(" ",t.indentationLvl)}`)}}if(t.seen.includes(e)){let n=1;return void 0===t.circular?(t.circular=new Tt,t.circular.set(e,n)):(n=t.circular.get(e),void 0===n&&(n=t.circular.size+1,t.circular.set(e,n))),t.stylize(`[Circular *${n}]`,"special")}let u=function(t,e,o,i){let l,s;t.showHidden&&(o<=t.depth||null===t.depth)&&(s=[]);const c=Kn(e,t,o,s);void 0!==s&&0===s.length&&(s=void 0);let u="";try{u=e[pe]}catch{}("string"!=typeof u||""!==u&&(t.showHidden?$t:Pt)(e,pe))&&(u="");let f,p,d="",m=Yn,_=!0;const w=t.showHidden?Oe:Ee;let E,R,L=0;if(ce in e||null===c)if(_=!1,a(e)){const t="Array"!==c||""!==u?Xn(c,u,"Array",`(${e.length})`):"";if(l=Ie(e,w),f=[`${t}[`,"]"],0===e.length&&0===l.length&&void 0===s)return`${f[0]}]`;L=2,m=dr}else if(nn(e)){const n=Dt(e),r=Xn(c,u,"Set",`(${n})`);if(l=tr(e,t.showHidden),m=C(br,null,null!==c?e:Wt(e)),0===n&&0===l.length&&void 0===s)return`${r}{}`;f=[`${r}{`,"}"]}else if(Ke(e)){const n=Y(e),r=Xn(c,u,"Map",`(${n})`);if(l=tr(e,t.showHidden),m=C($r,null,null!==c?e:Z(e)),0===n&&0===l.length&&void 0===s)return`${r}{}`;f=[`${r}{`,"}"]}else if(an(e)){l=Ie(e,w);let n=e,o="";null===c&&(o=be(e),n=new r[o](e));const s=me(e);if(f=[`${Xn(c,u,o,`(${s})`)}[`,"]"],0===e.length&&0===l.length&&!t.showHidden)return`${f[0]}]`;m=C(mr,null,n,s),L=2,t.showHidden&&(E=["BYTES_PER_ELEMENT","length","byteLength","byteOffset","buffer"],i=!0)}else Qe(e)?(l=tr(e,t.showHidden),f=rr("Map",u),m=C(_r,null,f)):rn(e)?(l=tr(e,t.showHidden),f=rr("Set",u),m=C(_r,null,f)):_=!0;if(_)if(l=tr(e,t.showHidden),f=["{","}"],"function"==typeof e){if(d=function(t,e,n,r){const o=H(e);if(ie(o,"class")&&"}"===o[o.length-1]){const t=re(o,5,-1),i=qt(t,"{");if(-1!==i&&(!Yt(re(t,0,i),"(")||null!==kt(jn,jt(zn,t))))return function(t,e,n){let r=`class ${$t(t,"name")&&t.name||"(anonymous)"}`;if("Function"!==e&&null!==e&&(r+=` [${e}]`),""!==n&&e!==n&&(r+=` [${n}]`),null!==e){const e=ht(t).name;e&&(r+=` extends ${e}`)}else r+=" extends [null prototype]";return`[${r}]`}(e,n,r)}let i="Function";Ue(e)&&(i=`Generator${i}`),He(e)&&(i=`Async${i}`);let l=`[${i}`;return null===n&&(l+=" (null prototype)"),""===e.name?l+=" (anonymous)":l+=`: ${"string"==typeof e.name?e.name:nr(t,e.name)}`,l+="]",n!==i&&null!==n&&(l+=` ${n}`),""!==r&&n!==r&&(l+=` [${r}]`),l}(t,e,c,u),0===l.length&&void 0===s)return t.stylize(d,"special")}else if("Object"===c){if(Ze(e)?f[0]="[Arguments] {":""!==u&&(f[0]=`${Xn(c,u,"Object")}{`),0===l.length&&void 0===s)return`${f[0]}}`}else if(sn(e)){d=Bt(null!==c?e:new Lt(e));const n=Xn(c,u,"RegExp");if("RegExp "!==n&&(d=`${n}${d}`),d=t.stylize(d,"regexp"),0===l.length&&void 0===s||o>t.depth&&null!==t.depth)return d}else if(cn(e)){d=rt(k(e))?z(e):j(e);const n=Xn(c,u,"Date");if("Date "!==n&&(d=`${n}${d}`),0===l.length&&void 0===s)return t.stylize(d,"date")}else if(Fe(e)){if(d=function(t,e,n,r,o){let i,l,s;try{s=ir(r,t)}catch{return xt(t)}let c=!1;try{i=t.message}catch{c=!0}let u=!1;try{l=t.name}catch{u=!0}if(!r.showHidden&&0!==o.length){const t=g(o,"stack");if(-1!==t&&S(o,t,1),!c){const t=g(o,"message");-1===t||"string"==typeof i&&!Yt(s,i)||S(o,t,1)}if(!u){const t=g(o,"name");-1===t||"string"==typeof l&&!Yt(s,l)||S(o,t,1)}}l=l??"Error",!$t(t,"cause")||0!==o.length&&y(o,"cause")||b(o,"cause");try{const e=t.errors;!a(e)||!$t(t,"errors")||0!==o.length&&y(o,"errors")||b(o,"errors")}catch{}!$t(t,"error")||0!==o.length&&y(o,"error")||b(o,"error"),!$t(t,"suppressed")||0!==o.length&&y(o,"suppressed")||b(o,"suppressed"),s=function(t,e,n,r){let o=n.length;if("string"!=typeof n&&(t=ee(t,`${n}`,`${n} [${re(Xn(e,r,"Error"),0,-1)}]`)),null===e||Zt(n,"Error")&&ie(t,n)&&(t.length===o||":"===t[o]||"\n"===t[o])){let i="Error";if(null===e){const e=kt(/^([A-Z][a-z_ A-Z0-9[\]()-]+)(?::|\n {4}at)/,t)||kt(/^([a-z_A-Z0-9-]*Error)$/,t);i=e?.[1]||"",o=i.length,i=i||"Error"}const l=re(Xn(e,r,i),0,-1);n!==l&&(t=Yt(l,n)?0===o?`${l}: ${t}`:`${l}${re(t,o)}`:`${l} [${n}]${re(t,o)}`)}return t}(s,e,l,n);let f=i&&qt(s,i)||-1;-1!==f&&(f+=i.length);const p=qt(s,"\n at",f);if(-1===p)s=`[${s}]`;else{let e=re(s,0,p);const n=function(t,e,n){const r=oe(n,"\n");let o;try{({cause:o}=e)}catch{}if(null!=o&&Fe(o)){const e=ir(t,o),n=qt(e,"\n at");if(-1!==n){const o=oe(re(e,n+1),"\n"),{0:i,1:l}=or(r,o);if(i>0){const e=i-2,n=` ... ${e} lines matching cause stack trace ...`;r.splice(l+1,e,t.stylize(n,"undefined"))}}}if(r.length>10){const e=function(t){const e=[],n=new Tt;for(let e=0;e<t.length;e++){const r=n.get(t[e]);void 0===r?n.set(t[e],[e]):r[r.length]=e}if(t.length-n.size<=3)return e;for(let r=0;r<t.length-3;r++){const o=n.get(t[r]);if(1===o.length||o[o.length-1]===r)continue;const i=o.indexOf(r)+1;if(i===o.length)continue;let l,s=o[o.length-1]-r;if(s<3)continue;if(i+1<o.length){let t=0;for(let e=i;e<o.length;e++){let n=o[e]-r;for(;0!==n;){const e=t%n;0!==t&&(l=l||new Mt,l.add(t)),t=n,n=e}if(1===t)break}s=t,l&&(l.delete(s),l=[...l])}let c=s,a=0,u=0;for(let e=r+s;;e+=s){let n=0;for(let o=0;o<s&&t[r+o]===t[e+o];o++)n++;if(n===s)u++;else{if(!l?.length)break;0!==u&&c*a<s*u&&(c=s,a=u),s=l.pop(),e=r,u=0}}0!==a&&c*a>=s*u&&(s=c,u=a),u*s>=3&&(e.push(r+s,s,u),r+=s*(u+1)-1)}return e}(r);for(let n=e.length-3;n>=0;n-=3){const o=e[n],i=e[n+1],l=e[n+2],s=` ... collapsed ${i*l} duplicate lines matching above `+(l>1?`${i} lines ${l} times...`:"lines ...");r.splice(o,i*l,t.stylize(s,"undefined"))}}return r}(r,t,re(s,p+1));if(r.colors){const t=function(){let t;try{t=process.cwd()}catch{return}return t}();let o;for(let i of n){const n=kt(kn,i);if(null!==n&&hn.exists(n[1]))e+=`\n${r.stylize(i,"undefined")}`;else{if(e+="\n",i=lr(r,i),void 0!==t){let e=sr(r,i,t);e===i&&(o=o||Sn(t),e=sr(r,i,o)),i=e}e+=i}}}else e+=`\n${h(n,"\n")}`;s=e}if(0!==r.indentationLvl){const t=te(" ",r.indentationLvl);s=ne(s,"\n",`\n${t}`)}return s}(e,c,u,t,l),0===l.length&&void 0===s)return d}else if(Ge(e)){const n=Xn(c,u,Ve(e)?"ArrayBuffer":"SharedArrayBuffer");if(void 0===i)m=hr;else if(0===l.length&&void 0===s)return n+`{ [byteLength]: ${ur(t.stylize,e.byteLength,!1)} }`;f[0]=`${n}{`,E=["byteLength"]}else if(qe(e))f[0]=`${Xn(c,u,"DataView")}{`,E=["byteLength","byteOffset","buffer"];else if(en(e))f[0]=`${Xn(c,u,"Promise")}{`,m=wr;else if(ln(e))f[0]=`${Xn(c,u,"WeakSet")}{`,m=t.showHidden?Ar:Sr;else if(on(e))f[0]=`${Xn(c,u,"WeakMap")}{`,m=t.showHidden?vr:Sr;else if(Xe(e))f[0]=`${Xn(c,u,"Module")}{`,m=yr.bind(null,l);else if(Ye(e)){if(d=function(t,e,n,r,o){let i,l;fn(t)?(i=ct,l="Number"):un(t)?(i=se,l="String",n.splice(0,t.length)):pn(t)?(i=O,l="Boolean"):yn(t)?(i=v,l="BigInt"):(i=ue,l="Symbol");let s=`[${l}`;return l!==r&&(s+=null===r?" (null prototype)":` (${r})`),s+=`: ${pr(Zn,i(t),e)}]`,""!==o&&o!==r&&(s+=` [${o}]`),0!==n.length||e.stylize===Zn?s:e.stylize(s,le(l))}(e,t,l,c,u),0===l.length&&void 0===s)return d}else if(!function(t){return Pn=Pn||n(613),"string"==typeof t.href&&t instanceof Pn.URL}(e)||o>t.depth&&null!==t.depth){if(0===l.length&&void 0===s){if(Je(e)){const n=Te(e).toString(16);return t.stylize(`[External: ${n}]`,"special")}return`${er(e,c,u)}{}`}f[0]=`${er(e,c,u)}{`}else if(l=function(t){return xn=xn||gt(new Pn.URL("http://user:pass@localhost:8080/?foo=bar#baz")),t.filter(t=>-1===xn[t])}(l),d=e.href,0===l.length&&void 0===s)return d;if(o>t.depth&&null!==t.depth){let n=re(er(e,c,u),0,-1);return null!==c&&(n=`[${n}]`),t.stylize(n,"special")}o+=1,t.seen.push(e),t.currentDepth=o;const I=t.indentationLvl;try{if(R=m(t,e,o),void 0!==E)for(p=0;p<E.length;p++){let n;try{n=Or(t,e,o,E[p],i)}catch{n=Or(t,{[E[p]]:e.buffer[E[p]]},o,E[p],i)}b(R,n)}for(p=0;p<l.length;p++)b(R,Er(t,e,o,l[p],L));void 0!==s&&$(R,s)}catch(n){if(!We(n))throw n;return function(t,e,n,r){return t.seen.pop(),t.indentationLvl=r,t.stylize(`[${n}: Inspection interrupted prematurely. Maximum call stack size exceeded.]`,"special")}(t,0,re(er(e,c,u),0,-1),I)}if(void 0!==t.circular){const n=t.circular.get(e);if(void 0!==n){const e=t.stylize(`<ref *${n}>`,"special");!0!==t.compact?d=""===d?e:`${e} ${d}`:f[0]=`${e} ${f[0]}`}}if(t.seen.pop(),t.sorted){const e=!0===t.sorted?void 0:t.sorted;if(0===L)x(R,e);else if(l.length>1){const t=x(P(R,R.length-l.length),e);A(t,R,R.length-l.length,l.length),Et(S,null,t)}}const B=Lr(t,R,d,f,L,o,e),T=(t.budget[t.indentationLvl]||0)+B.length;return t.budget[t.indentationLvl]=T,T>2**27&&(t.depth=-1),B}(t,e,o,i);if(0!==s)for(let e=0;e<s;e++)u=`${t.stylize("Proxy(","special")}${u}${t.stylize(")","special")}`;return u}function rr(t,e){return e!==`${t} Iterator`&&(""!==e&&(e+="] ["),e+=`${t} Iterator`),[`[${e}] {`,"}"]}function or(t,e){for(let n=0;n<t.length-3;n++){const r=g(e,t[n]);if(-1!==r){const o=e.length-r;if(o>3){let i=1;const l=K(t.length-n,o);for(;l>i&&t[n+i]===e[r+i];)i++;if(i>3)return[i,n]}}}return[0,0]}function ir(t,e){let n;try{n=e.stack}catch{}if(n){if("string"==typeof n)return n;t.seen.push(e),t.indentationLvl+=4;const r=nr(t,n);return t.indentationLvl-=4,t.seen.pop(),`${M(e)}\n ${r}`}return M(e)}function lr(t,e){let n="",r=0,o=0;for(;;){const i=qt(e,"node_modules",o);if(-1===i)break;const l=e[i-1],s=e[i+12];if("/"!==s&&"\\"!==s||"/"!==l&&"\\"!==l){o=i+1;continue}const c=i+13;n+=re(e,r,c);let a=qt(e,l,c);-1===a?a=e.length:"@"===e[c]&&(a=qt(e,l,a+1),-1===a&&(a=e.length));const u=re(e,c,a);n+=t.stylize(u,"module"),r=a,o=a}return 0!==r&&(e=n+re(e,r)),e}function sr(t,e,n){let r=qt(e,n),o="",i=n.length;if(-1!==r){"file://"===re(e,r-7,r)&&(i+=7,r-=7);const n="("===e[r-1]?r-1:r,l=n!==r&&Zt(e,")")?-1:e.length,s=r+i+1,c=re(e,n,s);o+=re(e,0,n),o+=t.stylize(c,"undefined"),o+=re(e,s,l),-1===l&&(o+=t.stylize(")","undefined"))}else o+=e;return o}function cr(t){let e="",n=t.length;gn(0!==n);const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${re(t,n-3,n)}${e}`;return n===t.length?t:`${re(t,0,n)}${e}`}const ar=t=>`... ${t} more item${t>1?"s":""}`;function ur(t,e,n){if(dt(e,-0))return t("-0","number");if(!n)return t(`${e}`,"number");const r=Ht(e);if(tt(e)===e)return!nt(e)||Yt(r,"e")?t(r,"number"):t(cr(r),"number");if(rt(e)||Yt(r,"e"))return t(r,"number");const o=qt(r,"."),i=re(r,0,o),l=re(r,o+1);return t(`${cr(i)}.${function(t){let e="",n=0;for(;n<t.length-3;n+=3)e+=`${re(t,n,n+3)}_`;return 0===n?t:`${e}${re(t,n)}`}(l)}`,"number")}function fr(t,e,n){const r=Ht(e);return t(n?`${cr(r)}n`:`${r}n`,"bigint")}function pr(t,e,n){if("string"==typeof e){let r="";if(e.length>n.maxStringLength){const t=e.length-n.maxStringLength;e=re(e,0,n.maxStringLength),r=`... ${t} more character${t>1?"s":""}`}return!0!==n.compact&&e.length>16&&e.length>n.breakLength-n.indentationLvl-4?h(d(zt(/(?<=\n)/,e),e=>t(Gn(e),"string")),` +\n${te(" ",n.indentationLvl+2)}`)+r:t(Gn(e),"string")+r}return"number"==typeof e?ur(t,e,n.numericSeparator):"bigint"==typeof e?fr(t,e,n.numericSeparator):"boolean"==typeof e?t(`${e}`,"boolean"):void 0===e?t("undefined","undefined"):t(ae(e),"symbol")}function yr(t,e,n,r){const o=new l(t.length);for(let i=0;i<t.length;i++)try{o[i]=Er(e,n,r,t[i],0)}catch(n){gn(tn(n)&&"ReferenceError"===n.name);const l={[t[i]]:""};o[i]=Er(e,l,r,t[i],0);const s=Jt(o[i]," ");o[i]=re(o[i],0,s+1)+e.stylize("<uninitialized>","special")}return t.length=0,o}function gr(t,e,n,r,o,i){const l=mt(e);let s=i;for(;i<l.length&&o.length<r;i++){const c=l[i],a=+c;if(a>2**32-2)break;if(`${s}`!==c){if(null===kt(In,c))break;const e=a-s,n=`<${e} empty item${e>1?"s":""}>`;if(b(o,t.stylize(n,"undefined")),s=a,o.length===r)break}b(o,Er(t,e,n,c,1)),s++}const c=e.length-s;if(o.length!==r){if(c>0){const e=`<${c} empty item${c>1?"s":""}>`;b(o,t.stylize(e,"undefined"))}}else c>0&&b(o,ar(c));return o}function hr(t,e){let r;try{r=new $e(e)}catch{return[t.stylize("(detached)","special")]}void 0===$n&&($n=we(n(308).h.prototype.hexSlice));const o=$n(r,0,K(t.maxArrayLength,r.length));let i="",l=0;for(;l<o.length-2;l+=2)i+=`${o[l]}${o[l+1]} `;o.length>0&&(i+=`${o[l]}${o[l+1]}`);const s=r.length-t.maxArrayLength;return s>0&&(i+=` ... ${s} more byte${s>1?"s":""}`),[`${t.stylize("[Uint8Contents]","special")}: <${i}>`]}function dr(t,e,n){const r=e.length,o=K(J(0,t.maxArrayLength),r),i=r-o,l=[];for(let r=0;r<o;r++){const i=pt(e,r);if(void 0===i)return gr(t,e,n,o,l,r);b(l,Er(t,e,n,r,1,i))}return i>0&&b(l,ar(i)),l}function mr(t,e,n){const r=K(J(0,n.maxArrayLength),e),o=t.length-r,i=new l(r),s=t.length>0&&"number"==typeof t[0]?ur:fr;for(let e=0;e<r;++e)i[e]=s(n.stylize,t[e],n.numericSeparator);return o>0&&(i[r]=ar(o)),i}function br(t,e,n,r){const o=t.size,i=K(J(0,e.maxArrayLength),o),l=o-i,s=[];e.indentationLvl+=2;let c=0;for(const n of t){if(c>=i)break;b(s,nr(e,n,r)),c++}return l>0&&b(s,ar(l)),e.indentationLvl-=2,s}function $r(t,e,n,r){const o=t.size,i=K(J(0,e.maxArrayLength),o),l=o-i,s=[];e.indentationLvl+=2;let c=0;for(const{0:n,1:o}of t){if(c>=i)break;b(s,`${nr(e,n,r)} => ${nr(e,o,r)}`),c++}return l>0&&b(s,ar(l)),e.indentationLvl-=2,s}function Pr(t,e,n,r){const o=J(t.maxArrayLength,0),i=K(o,n.length),s=new l(i);t.indentationLvl+=2;for(let r=0;r<i;r++)s[r]=nr(t,n[r],e);t.indentationLvl-=2,0!==r||t.sorted||x(s);const c=n.length-i;return c>0&&b(s,ar(c)),s}function xr(t,e,n,r){const o=J(t.maxArrayLength,0),i=n.length/2,s=i-o,c=K(o,i),a=new l(c);let u=0;if(t.indentationLvl+=2,0===r){for(;u<c;u++){const r=2*u;a[u]=`${nr(t,n[r],e)} => ${nr(t,n[r+1],e)}`}t.sorted||x(a)}else for(;u<c;u++){const r=2*u,o=[nr(t,n[r],e),nr(t,n[r+1],e)];a[u]=Lr(t,o,"",["[","]"],2,e)}return t.indentationLvl-=2,s>0&&b(a,ar(s)),a}function Sr(t){return[t.stylize("<items unknown>","special")]}function Ar(t,e,n){return Pr(t,n,ze(e),0)}function vr(t,e,n){return xr(t,n,ze(e),0)}function _r(t,e,n,r){const{0:o,1:i}=ze(n,!0);return i?(t[0]=jt(/ Iterator] {$/,t[0]," Entries] {"),xr(e,r,o,2)):Pr(e,r,o,1)}function wr(t,e,n){let r;const{0:o,1:i}=ke(e);if(o===Re)r=[t.stylize("<pending>","special")];else{t.indentationLvl+=2;const e=nr(t,i,n);t.indentationLvl-=2,r=[o===Le?`${t.stylize("<rejected>","special")} ${e}`:e]}return r}function Or(t,e,n,r,o){const i=e[r];t.indentationLvl+=2;const l=nr(t,i,n,o);return t.indentationLvl-=2,`${t.stylize(`[${r}]`,"string")}: ${l}`}function Er(t,e,n,r,o,i,l=e){let s,c,a=" ";if(void 0!==(i=i||pt(e,r)).value){const e=!0!==t.compact||0!==o?2:3;t.indentationLvl+=e,c=nr(t,i.value,n),3===e&&t.breakLength<Mn(c,t.colors)&&(a=`\n${te(" ",t.indentationLvl)}`),t.indentationLvl-=e}else if(void 0!==i.get){const e=void 0!==i.set?"Getter/Setter":"Getter",r=t.stylize,o="special";if(t.getters&&(!0===t.getters||"get"===t.getters&&void 0===i.set||"set"===t.getters&&void 0!==i.set)){t.indentationLvl+=2;try{const s=D(i.get,l);if(null===s)c=`${r(`[${e}:`,o)} ${r("null","null")}${r("]",o)}`;else if("object"==typeof s||"function"==typeof s)c=`${r(`[${e}]`,o)} ${nr(t,s,n)}`;else{const n=pr(r,s,t);c=`${r(`[${e}:`,o)} ${n}${r("]",o)}`}}catch(i){const l=`<Inspection threw (${nr(t,i,n)})>`;c=`${r(`[${e}:`,o)} ${l}${r("]",o)}`}t.indentationLvl-=2}else c=t.stylize(`[${e}]`,o)}else c=void 0!==i.set?t.stylize("[Setter]","special"):t.stylize("undefined","undefined");if(1===o)return c;if("symbol"==typeof r){const e=jt(On,ae(r),Un);s=t.stylize(e,"symbol")}else s=null!==kt(Ln,r)?"__proto__"===r?"['__proto__']":t.stylize(r,"name"):t.stylize(Gn(r),"string");return!1===i.enumerable&&(s=`[${s}]`),`${s}:${a}${c}`}function Rr(t,e,n,r){if(t.breakLength===1/0){if(""!==r&&Yt(r,"\n"))return!1;for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&Yt(e[t],"\n"))return!1;return!0}let o=e.length+n;if(o+e.length>t.breakLength)return!1;for(let n=0;n<e.length;n++)if(t.colors?o+=De(e[n]).length:o+=e[n].length,o>t.breakLength)return!1;return""===r||!Yt(r,"\n")}function Lr(t,e,n,r,o,i,s){if(!0!==t.compact){if("number"==typeof t.compact&&t.compact>=1){const c=e.length;if(2===o&&c>6&&(e=function(t,e,n){let r=0,o=0,i=0,s=e.length;t.maxArrayLength<e.length&&s--;const c=new l(s);for(;i<s;i++){const n=Mn(e[i],t.colors);c[i]=n,r+=n+2,o<n&&(o=n)}const a=o+2;if(3*a+t.indentationLvl<t.breakLength&&(r/a>5||o<=6)){const o=2.5,i=X(a-r/e.length),l=J(a-3-i,1),u=K(Q(X(o*l*s)/l),q((t.breakLength-t.indentationLvl)/a),4*t.compact,15);if(u<=1)return e;const f=[],p=[];for(let t=0;t<u;t++){let n=0;for(let r=t;r<e.length;r+=u)c[r]>n&&(n=c[r]);n+=2,p[t]=n}let y=Xt;if(void 0!==n)for(let t=0;t<e.length;t++)if("number"!=typeof n[t]&&"bigint"!=typeof n[t]){y=Qt;break}for(let t=0;t<s;t+=u){const n=K(t+u,s);let r="",o=t;for(;o<n-1;o++){const n=p[o-t]+e[o].length-c[o];r+=y(`${e[o]}, `,n," ")}if(y===Xt){const n=p[o-t]+e[o].length-c[o]-2;r+=Xt(e[o],n," ")}else r+=e[o];b(f,r)}t.maxArrayLength<e.length&&b(f,e[s]),e=f}return e}(t,e,s)),t.currentDepth-i<t.compact&&c===e.length&&Rr(t,e,e.length+t.indentationLvl+r[0].length+n.length+10,n)){const t=Ce(e,", ");if(!Yt(t,"\n"))return`${n?`${n} `:""}${r[0]} ${t} ${r[1]}`}}const c=`\n${te(" ",t.indentationLvl)}`;return`${n?`${n} `:""}${r[0]}${c} ${Ce(e,`,${c} `)}${c}${r[1]}`}if(Rr(t,e,0,n))return`${r[0]}${n?` ${n}`:""} ${Ce(e,", ")} `+r[1];const c=te(" ",t.indentationLvl),a=""===n&&1===r[0].length?" ":`${n?` ${n}`:""}\n${c} `;return`${r[0]}${a}${Ce(e,`,\n${c} `)} ${r[1]}`}function Ir(t){const e=je(t,!1);if(void 0!==e)return null===e||Ir(e);let n=$t,r=$t;if("function"!=typeof t.toString){if("function"!=typeof t[fe])return!0;if($t(t,fe))return!1;n=kr}else{if($t(t,"toString"))return!1;if("function"!=typeof t[fe])r=kr;else if($t(t,fe))return!1}let o=t;do{o=ht(o)}while(!n(o,"toString")&&!r(o,fe));const i=pt(o,"constructor");return void 0!==i&&"function"==typeof i.value&&An.has(i.value.name)}function kr(){return!1}const jr=t=>oe(t.message,"\n",1)[0];let zr;function Br(t){try{return U(t)}catch(t){if(!zr)try{const t={};t.a=t,U(t)}catch(t){zr=jr(t)}if("TypeError"===t.name&&jr(t)===zr)return"[Circular]";throw t}}function Tr(t,e){return ur(Zn,t,e?.numericSeparator??_n.numericSeparator)}function Mr(t,e){return fr(Zn,t,e?.numericSeparator??_n.numericSeparator)}function Nr(t,e){const n=e[0];let r=0,o="",i="";if("string"==typeof n){if(1===e.length)return n;let l,s=0;for(let i=0;i<n.length-1;i++)if(37===Gt(n,i)){const c=Gt(n,++i);if(r+1!==e.length){switch(c){case 115:{const n=e[++r];l="number"==typeof n?Tr(n,t):"bigint"==typeof n?Mr(n,t):"object"==typeof n&&null!==n&&Ir(n)?Nn(n,{...t,compact:3,colors:!1,depth:0}):Ht(n);break}case 106:l=Br(e[++r]);break;case 100:{const n=e[++r];l="bigint"==typeof n?Mr(n,t):"symbol"==typeof n?"NaN":Tr(et(n),t);break}case 79:l=Nn(e[++r],t);break;case 111:l=Nn(e[++r],{...t,showHidden:!0,showProxy:!0,depth:4});break;case 105:{const n=e[++r];l="bigint"==typeof n?Mr(n,t):"symbol"==typeof n?"NaN":Tr(it(n),t);break}case 102:{const n=e[++r];l="symbol"==typeof n?"NaN":Tr(ot(n),t);break}case 99:r+=1,l="";break;case 37:o+=re(n,s,i),s=i+1;continue;default:continue}s!==i-1&&(o+=re(n,s,i-1)),o+=l,s=i+1}else 37===c&&(o+=re(n,s,i),s=i+1)}0!==s&&(r++,i=" ",s<n.length&&(o+=re(n,s)))}for(;r<e.length;){const n=e[r];o+=i,o+="string"!=typeof n?Nn(n,t):n,i=" ",r++}return o}function Fr(t){return t<=31||t>=127&&t<=159||t>=768&&t<=879||t>=8203&&t<=8207||t>=8400&&t<=8447||t>=65024&&t<=65039||t>=65056&&t<=65071||t>=917760&&t<=917999}if(_e("config").hasIntl)gn(!1);else{Mn=function(e,n=!0){let r=0;n&&(e=Cr(e)),e=Kt(e,"NFC");for(const n of new Nt(e)){const e=Vt(n,0);t(e)?r+=2:Fr(e)||r++}return r};const t=t=>t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=12871&&12351!==t||t>=12880&&t<=19903||t>=19968&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510||t>=110592&&t<=110593||t>=127488&&t<=127569||t>=127744&&t<=128591||t>=131072&&t<=262141)}function Cr(t){return mn(t,"str"),-1===qt(t,"")&&-1===qt(t,"")?t:jt(Tn,t,"")}const Dr={34:""",38:"&",39:"'",60:"<",62:">",160:" "};function Wr(t){return t.replace(/[\u0000-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u00FF]/g,t=>{const e=Ht(t.charCodeAt(0));return Dr[e]||"&#"+e+";"})}t.exports={identicalSequenceRange:or,inspect:Nn,inspectDefaultOptions:_n,format:function(...t){return Nr(void 0,t)},formatWithOptions:function(t,...e){return dn(t,"inspectOptions",bn),Nr(t,e)},getStringWidth:Mn,stripVTControlCharacters:Cr,isZeroWidthCodePoint:Fr,stylizeWithColor:Vn,stylizeWithHTML(t,e){const n=Nn.styles[e];return void 0!==n?`<span style="color:${n};">${Wr(t)}</span>`:Wr(t)},Proxy:Me}},788(t,e,n){let r;function o(){return r=null!=r?r:n(317).codes.ERR_INTERNAL_ASSERTION}function i(t,e){if(!t)throw new(o())(e)}i.fail=function(t){throw new(o())(t)},t.exports=i},986(t){const e=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","module","Module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"];t.exports.BuiltinModule={exists:t=>"internal/modules/cjs/foo"!==t&&(t.startsWith("internal/")||-1!==e.indexOf(t))}},737(t){t.exports={CHAR_DOT:46,CHAR_FORWARD_SLASH:47}},317(t,e,n){const r=n(80),{ArrayIsArray:o,ArrayPrototypeIncludes:i,ArrayPrototypeIndexOf:l,ArrayPrototypeJoin:s,ArrayPrototypePush:c,ArrayPrototypeSlice:a,ArrayPrototypeSplice:u,Error:f,ErrorCaptureStackTrace:p,JSONStringify:y,ObjectDefineProperty:g,ReflectApply:h,RegExpPrototypeExec:d,SafeMap:m,SafeWeakMap:b,String:$,StringPrototypeEndsWith:P,StringPrototypeIncludes:x,StringPrototypeIndexOf:S,StringPrototypeSlice:A,StringPrototypeToLowerCase:v,Symbol:_,TypeError:w}=r,O=(_("kIsNodeError"),new m),E={},R=/^[A-Z][a-zA-Z0-9]*$/,L=["string","function","number","object","Function","Object","boolean","bigint","symbol"],I=(new b,n(788));let k,j,z=null;function B(t,e,n){O.set(t,e);const r=(o=n,i=t,class extends o{code=i;constructor(...t){super(),g(this,"message",{__proto__:null,value:T(i,t,this),enumerable:!1,writable:!0,configurable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}});var o,i;E[t]=r}function T(t,e,n){const r=O.get(t);if("function"==typeof r)return I(r.length<=e.length,`Code: ${t}; The provided arguments length (${e.length}) does not match the required ones (${r.length}).`),h(r,n,e)}function M(t,e="and"){switch(t.length){case 0:return"";case 1:return`${t[0]}`;case 2:return`${t[0]} ${e} ${t[1]}`;case 3:return`${t[0]}, ${t[1]}, ${e} ${t[2]}`;default:return`${s(a(t,0,-1),", ")}, ${e} ${t[t.length-1]}`}}_("kEnhanceStackBeforeInspector"),t.exports={codes:E,hideStackFrames:function(t){function e(...n){try{return h(t,this,n)}catch(t){throw f.stackTraceLimit&&p(t,e),t}}return e.withoutStackTrace=t,e},isStackOverflowError:function(t){if(void 0===j)try{function e(){e()}e()}catch(t){j=t.message,k=t.name}return t&&t.name===k&&t.message===j}},B("ERR_INTERNAL_ASSERTION",t=>{const e="This is caused by either a bug in Node.js or incorrect usage of Node.js internals.\nPlease open an issue with this stack trace at https://github.com/nodejs/node/issues\n";return void 0===t?e:`${t}\n${e}`},f),B("ERR_INVALID_ARG_TYPE",(t,e,r)=>{I("string"==typeof t,"'name' must be a string"),o(e)||(e=[e]);let s="The ";P(t," argument")?s+=`${t} `:s+=`"${t}" ${x(t,".")?"property":"argument"} `,s+="must be ";const a=[],f=[],p=[];for(const t of e)I("string"==typeof t,"All expected entries have to be of type string"),i(L,t)?c(a,v(t)):null!==d(R,t)?c(f,t):(I("object"!==t,'The value "object" should be written as "Object"'),c(p,t));if(f.length>0){const t=l(a,"object");-1!==t&&(u(a,t,1),c(f,"Object"))}return a.length>0&&(s+=`${a.length>1?"one of type":"of type"} ${M(a,"or")}`,(f.length>0||p.length>0)&&(s+=" or ")),f.length>0&&(s+=`an instance of ${M(f,"or")}`,p.length>0&&(s+=" or ")),p.length>0&&(p.length>1?s+=`one of ${M(p,"or")}`:(v(p[0])!==p[0]&&(s+="an "),s+=`${p[0]}`)),s+=`. Received ${function(t){if(null===t)return"null";if(void 0===t)return"undefined";switch(typeof t){case"bigint":return`type bigint (${t}n)`;case"number":return 0===t?1/t==-1/0?"type number (-0)":"type number (0)":t!=t?"type number (NaN)":t===1/0?"type number (Infinity)":t===-1/0?"type number (-Infinity)":`type number (${t})`;case"boolean":return t?"type boolean (true)":"type boolean (false)";case"symbol":return`type symbol (${$(t)})`;case"function":return`function ${t.name}`;case"object":return t.constructor&&"name"in t.constructor?`an instance of ${t.constructor.name}`:`${(z=z||n(160),z).inspect(t,{depth:-1})}`;case"string":return t.length>28&&(t=`${A(t,0,25)}...`),-1===S(t,"'")?`type string ('${t}')`:`type string (${y(t)})`}}(r)}`,s},w)},613(t,e,n){const{StringPrototypeCharCodeAt:r,StringPrototypeIncludes:o,StringPrototypeReplace:i}=n(80),l=n(533),{CHAR_FORWARD_SLASH:s}=n(737),c=n(589),a=/%/g,u=/\\/g,f=/\n/g,p=/\r/g,y=/\t/g;t.exports={pathToFileURL:function(t){const e=new l("file://");let n=c.resolve(t);return r(t,t.length-1)===s&&n[n.length-1]!==c.sep&&(n+="/"),e.pathname=function(t){return o(t,"%")&&(t=i(t,a,"%25")),o(t,"\\")&&(t=i(t,u,"%5C")),o(t,"\n")&&(t=i(t,f,"%0A")),o(t,"\r")&&(t=i(t,p,"%0D")),o(t,"\t")&&(t=i(t,y,"%09")),t}(n),e},URL:l}},22(t,e,n){const r=n(80),{ArrayPrototypeJoin:o,Error:i,ErrorIsError:l,FunctionPrototypeSymbolHasInstance:s,StringPrototypeReplace:c,SymbolFor:a}=r,u=/\u001b\[\d\d?m/g;t.exports={customInspectSymbol:a("nodejs.util.inspect.custom"),isError:t=>l?.(t)||s(i,t),join:o,removeColors:t=>c(t,u,"")}},124(t,e,n){const r=n(80),{ArrayIsArray:o,BigInt:i,Boolean:l,DatePrototype:s,Error:c,FunctionPrototype:a,MapPrototypeHas:u,Number:f,ObjectDefineProperty:p,ObjectGetOwnPropertyDescriptor:y,ObjectGetPrototypeOf:g,ObjectIsFrozen:h,ObjectPrototype:d,SetPrototypeHas:m,String:b,Symbol:$,SymbolToStringTag:P,globalThis:x}=r,{getConstructorName:S}=n(38);function A(t,...e){for(const n of e){const e=x[n];if(e&&t instanceof e)return!0}for(;t;){if("object"!=typeof t)return!1;if(e.indexOf(S(t))>=0)return!0;t=g(t)}return!1}function v(t){return e=>{if(!A(e,t.name))return!1;try{t.prototype.valueOf.call(e)}catch{return!1}return!0}}"object"!=typeof x&&(p(d,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete d.__magic__);const _=v(b),w=v(f),O=v(l),E=v(i),R=v($);t.exports={isAsyncFunction:t=>"function"==typeof t&&a.toString.call(t).startsWith("async"),isGeneratorFunction:t=>"function"==typeof t&&a.toString.call(t).match(/^(async\s+)?function *\*/),isAnyArrayBuffer:t=>A(t,"ArrayBuffer","SharedArrayBuffer"),isArrayBuffer:t=>A(t,"ArrayBuffer"),isArgumentsObject(t){if(null!==t&&"object"==typeof t&&!o(t)&&"number"==typeof t.length&&t.length===(0|t.length)&&t.length>=0){const e=y(t,"callee");return e&&!e.enumerable}return!1},isBoxedPrimitive:t=>w(t)||_(t)||O(t)||E(t)||R(t),isDataView:t=>A(t,"DataView"),isExternal:t=>"object"==typeof t&&h(t)&&null==g(t),isMap(t){if(!A(t,"Map"))return!1;try{u(t)}catch{return!1}return!0},isMapIterator:t=>"[object Map Iterator]"===d.toString.call(g(t)),isModuleNamespaceObject(t){try{return t&&"object"==typeof t&&"Module"===t[P]}catch{return!1}},isNativeError:t=>t instanceof c&&A(t,"Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","AggregateError"),isPromise:t=>A(t,"Promise"),isSet(t){if(!A(t,"Set"))return!1;try{m(t)}catch{return!1}return!0},isSetIterator:t=>"[object Set Iterator]"===d.toString.call(g(t)),isWeakMap:t=>A(t,"WeakMap"),isWeakSet:t=>A(t,"WeakSet"),isRegExp:t=>A(t,"RegExp"),isDate(t){if(A(t,"Date"))try{return s.getTime.call(t),!0}catch{}return!1},isTypedArray:t=>A(t,"Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"),isStringObject:_,isNumberObject:w,isBooleanObject:O,isBigIntObject:E}},293(t,e,n){const{ArrayIsArray:r}=n(80),{hideStackFrames:o,codes:{ERR_INVALID_ARG_TYPE:i}}=n(317),l=o((t,e,n=0)=>{if(0===n){if(null===t||r(t))throw new i(e,"Object",t);if("object"!=typeof t)throw new i(e,"Object",t)}else{if(!(1&n)&&null===t)throw new i(e,"Object",t);if(!(2&n)&&r(t))throw new i(e,"Object",t);const o=typeof t;if(!("object"===o||4&n&&"function"===o))throw new i(e,"Object",t)}});t.exports={kValidateObjectAllowArray:2,validateObject:l,validateString:function(t,e){if("string"!=typeof t)throw new i(e,"string",t)}}},589(t,e,n){const{StringPrototypeCharCodeAt:r,StringPrototypeLastIndexOf:o,StringPrototypeSlice:i}=n(80),{CHAR_DOT:l,CHAR_FORWARD_SLASH:s}=n(737),{validateString:c}=n(293);function a(t){return t===s}function u(t,e,n,c){let a="",u=0,f=-1,p=0,y=0;for(let g=0;g<=t.length;++g){if(g<t.length)y=r(t,g);else{if(c(y))break;y=s}if(c(y)){if(f===g-1||1===p);else if(2===p){if(a.length<2||2!==u||r(a,a.length-1)!==l||r(a,a.length-2)!==l){if(a.length>2){const t=o(a,n);-1===t?(a="",u=0):(a=i(a,0,t),u=a.length-1-o(a,n)),f=g,p=0;continue}if(0!==a.length){a="",u=0,f=g,p=0;continue}}e&&(a+=a.length>0?`${n}..`:"..",u=2)}else a.length>0?a+=`${n}${i(t,f+1,g)}`:a=i(t,f+1,g),u=g-f-1;f=g,p=0}else y===l&&-1!==p?++p:p=-1}return a}t.exports={isPosixPathSeparator:a,normalizeString:u,resolve:function(...t){if(0===t.length||1===t.length&&(""===t[0]||"."===t[0])){const t="/";if(r(t,0)===s)return t}let e="",n=!1;for(let o=t.length-1;o>=0&&!n;o--){const i=t[o];c(i,`paths[${o}]`),0!==i.length&&(e=`${i}/${e}`,n=r(i,0)===s)}if(!n){const t="/";e=`${t}/${e}`,n=r(t,0)===s}return e=u(e,!n,"/",a),n?`/${e}`:e.length>0?e:"."}}},80(t){const e={__proto__:null},{defineProperty:n,getOwnPropertyDescriptor:r,ownKeys:o}=Reflect,{apply:i,bind:l,call:s}=Function.prototype,c=l.bind(s);e.uncurryThis=c;const a=l.bind(i);e.applyBind=a;const u=["ArrayOf","ArrayPrototypePush","ArrayPrototypeUnshift","MathHypot","MathMax","MathMin","StringFromCharCode","StringFromCodePoint","StringPrototypeConcat","TypedArrayOf"];function f(t){return"symbol"==typeof t?`Symbol${t.description[7].toUpperCase()}${t.description.slice(8)}`:`${t[0].toUpperCase()}${t.slice(1)}`}function p(t,e,r,{enumerable:o,get:i,set:l}){n(t,`${e}Get${r}`,{__proto__:null,value:c(i),enumerable:o}),void 0!==l&&n(t,`${e}Set${r}`,{__proto__:null,value:c(l),enumerable:o})}function y(t,e,i){for(const l of o(t)){const o=f(l),s=r(t,l);if("get"in s)p(e,i,o,s);else{const r=`${i}${o}`;n(e,r,{__proto__:null,...s}),u.includes(r)&&n(e,`${r}Apply`,{__proto__:null,value:a(s.value,t)})}}}function g(t,e,i){for(const l of o(t)){const o=f(l),s=r(t,l);if("get"in s)p(e,i,o,s);else{const{value:t}=s;"function"==typeof t&&(s.value=c(t));const r=`${i}${o}`;n(e,r,{__proto__:null,...s}),u.includes(r)&&n(e,`${r}Apply`,{__proto__:null,value:a(t)})}}}["Proxy","globalThis"].forEach(t=>{e[t]=globalThis[t]}),[decodeURI,decodeURIComponent,encodeURI,encodeURIComponent].forEach(t=>{e[t.name]=t}),[escape,eval,unescape].forEach(t=>{e[t.name]=t}),["Atomics","JSON","Math","Proxy","Reflect"].forEach(t=>{y(globalThis[t],e,t)}),["AggregateError","Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","FinalizationRegistry","Float16Array","Float32Array","Float64Array","Function","Int16Array","Int32Array","Int8Array","Map","Number","Object","RangeError","ReferenceError","RegExp","Set","String","Symbol","SyntaxError","TypeError","URIError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","WeakMap","WeakRef","WeakSet"].forEach(t=>{const n=globalThis[t];n&&(e[t]=n,y(n,e,t),g(n.prototype,e,`${t}Prototype`))}),["Promise"].forEach(t=>{const i=globalThis[t];e[t]=i,function(t,e,i){for(const l of o(t)){const o=f(l),s=r(t,l);if("get"in s)p(e,i,o,s);else{const{value:r}=s;"function"==typeof r&&(s.value=r.bind(t)),n(e,`${i}${o}`,{__proto__:null,...s})}}}(i,e,t),g(i.prototype,e,`${t}Prototype`)}),[{name:"TypedArray",original:Reflect.getPrototypeOf(Uint8Array)}].forEach(({name:t,original:n})=>{e[t]=n,g(n,e,t),g(n.prototype,e,`${t}Prototype`)}),[{name:"ArrayIteratorPrototype",original:Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]())},{name:"AsyncFunctionPrototype",original:Reflect.getPrototypeOf(async function(){})},{name:"AsyncGeneratorFunctionPrototype",original:Reflect.getPrototypeOf(async function*(){})},{name:"AsyncIteratorPrototype",original:Reflect.getPrototypeOf(Reflect.getPrototypeOf(async function*(){}).prototype)},{name:"GeneratorFunctionPrototype",original:Reflect.getPrototypeOf(function*(){})},{name:"MapIteratorPrototype",original:Reflect.getPrototypeOf((new e.Map)[Symbol.iterator]())},{name:"RegExpStringIteratorPrototype",original:Reflect.getPrototypeOf(e.RegExp.prototype[Symbol.matchAll]())},{name:"SetIteratorPrototype",original:Reflect.getPrototypeOf((new e.Set)[Symbol.iterator]())},{name:"StringIteratorPrototype",original:Reflect.getPrototypeOf(String.prototype[Symbol.iterator]())}].forEach(({name:t,original:n})=>{e[t]=n,g(n,e,t)});const{ArrayPrototypeForEach:h,ArrayPrototypePushApply:d,ArrayPrototypeSlice:m,FinalizationRegistry:b,FunctionPrototypeCall:$,Map:P,ObjectFreeze:x,ObjectSetPrototypeOf:S,RegExp:A,Set:v,SymbolIterator:_,WeakMap:w,WeakRef:O,WeakSet:E}=e,R=(t,e)=>{class n{constructor(e){this._iterator=t(e)}next(){return e(this._iterator)}[_](){return this}}return S(n.prototype,null),x(n.prototype),x(n),n};e.SafeArrayIterator=R(e.ArrayPrototypeSymbolIterator,e.ArrayIteratorPrototypeNext),e.SafeStringIterator=R(e.StringPrototypeSymbolIterator,e.StringIteratorPrototypeNext);const L=(t,e)=>{h(o(t),o=>{r(e,o)||n(e,o,{__proto__:null,...r(t,o)})})},I=(t,e,i)=>{if(i){const l=new t;h(o(t.prototype),o=>{if(!r(e.prototype,o)){const s=r(t.prototype,o);if("function"==typeof s.value&&0===s.value.length&&$(s.value,l)?.next===i){const t=c(s.value),e=R(t,i);s.value=function(){return new e(this)}}n(e.prototype,o,{__proto__:null,...s})}})}else L(t.prototype,e.prototype);return L(t,e),S(e.prototype,null),x(e.prototype),x(e),e};e.makeSafe=I,e.SafeMap=I(P,class extends P{},e.MapIteratorPrototypeNext),e.SafeWeakMap=I(w,class extends w{}),e.SafeSet=I(v,class extends v{},e.SetIteratorPrototypeNext),e.SafeWeakSet=I(E,class extends E{}),e.SafeFinalizationRegistry=I(b,class extends b{}),e.SafeWeakRef=I(O,class extends O{}),e.internalBinding=t=>{if("config"===t)return{hasIntl:!1};throw new Error(`unknown module: "${t}"`)},e._stringPrototypeReplaceAll=(t,e,n)=>"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?t.replace(e,n):t.replace(new A(e,"g"),n),e.SafeArrayPrototypePushApply=(t,e)=>{let n=65536;if(n<e.length){let r=0;do{d(t,m(e,r,r=n)),n+=65536}while(n<e.length);e=m(e,r)}return d(t,e)},e.StringPrototypeReplaceAll=e.StringPrototypeReplaceAll||e._stringPrototypeReplaceAll,S(e,null),x(e),t.exports=e},940(t,e,n){const r=n(80),{Proxy:o,ProxyRevocable:i,SafeWeakMap:l}=r,s=new l;class c{constructor(t,e){const n=new o(t,e);return s.set(n,[t,e]),n}static getProxyDetails(t,e=!0){const n=s.get(t);if(n)return e?n:n[0]}static revocable(t,e){const n=i(t,e);s.set(n.proxy,[t,e]);const r=n.revoke;return n.revoke=()=>{s.set(n.proxy,[null,null]),r()},n}}t.exports={getProxyDetails:c.getProxyDetails.bind(c),Proxy:c}},533(t){t.exports=URL},38(t,e,n){const r=n(80),{BigInt:o,Error:i,NumberParseInt:l,ObjectEntries:s,ObjectGetOwnPropertyDescriptor:c,ObjectGetOwnPropertyDescriptors:a,ObjectGetOwnPropertySymbols:u,ObjectPrototypeToString:f,Symbol:p}=r,y=n(940),g=p("kPending"),h=p("kRejected");t.exports={constants:{kPending:g,kRejected:h,ALL_PROPERTIES:0,ONLY_ENUMERABLE:2},getOwnNonIndexProperties:function(t,e=2){const n=a(t),r=[];for(const[t,o]of s(n))if(!/^(0|[1-9][0-9]*)$/.test(t)||l(t,10)>=2**32-1){if(2===e&&!o.enumerable)continue;r.push(t)}for(const n of u(t)){const o=c(t,n);(2!==e||o.enumerable)&&r.push(n)}return r},getPromiseDetails:()=>[g,void 0],getProxyDetails:y.getProxyDetails,Proxy:y.Proxy,previewEntries:t=>[[],!1],getConstructorName(t){if(!t||"object"!=typeof t)throw new i("Invalid object");if(t.constructor?.name)return t.constructor.name;const e=f(t).match(/^\[object ([^\]]+)\]/);return e?e[1]:"Object"},getExternalValue:()=>o(0)}}};const e={};return function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}(160)})());
|
|
52800
53276
|
|
|
52801
53277
|
/***/ },
|
|
52802
53278
|
|
|
@@ -53129,7 +53605,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
53129
53605
|
/* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
|
|
53130
53606
|
/* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js");
|
|
53131
53607
|
/**
|
|
53132
|
-
* vue v3.5.
|
|
53608
|
+
* vue v3.5.44
|
|
53133
53609
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
53134
53610
|
* @license MIT
|
|
53135
53611
|
**/
|
|
@@ -66655,7 +67131,7 @@ var src_default = VueToastificationPlugin;
|
|
|
66655
67131
|
(module) {
|
|
66656
67132
|
|
|
66657
67133
|
"use strict";
|
|
66658
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.
|
|
67134
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.7.1","description":"AI-Powered Data Workspace for MongoDB: Turn your MongoDB data into dashboards, maps, and interactive workflows - powered by your Mongoose models and AI.","homepage":"https://mongoosestudio.app/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"license":"Apache-2.0","dependencies":{"@ai-sdk/anthropic":"2.x","@ai-sdk/google":"2.x","@ai-sdk/openai":"2.x","@modelcontextprotocol/sdk":"^1.30.1","ace-builds":"^1.43.6","ai":"5.x","archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"^0.2.1","marked":"15.0.12","mpath":"^0.9.0","node-inspect-extracted":"3.x","regexp.escape":"^2.0.1","tailwindcss":"3.4.0","time-commando":"1.0.1","typescript":"^6.0.2","vue":"3.x","vue-toastification":"^2.0.0-rc.5","webpack":"5.x","xss":"^1.0.15","zod":"^4.6.5"},"peerDependencies":{"@nestjs/common":"10.x || 11.x","mongoose":"7.x || 8.x || ^9.0.0"},"peerDependenciesMeta":{"@nestjs/common":{"optional":true}},"optionalPeerDependencies":{"@mongoosejs/task":"0.5.x || 0.6.x"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","@nestjs/common":"^11.1.9","express":"4.x","mocha":"10.2.0","mongodb-memory-server":"^11.0.1","mongoose":"9.x","sinon":"^21.0.1"},"scripts":{"lint":"eslint .","seed":"node seed/index.js","start":"node ./local.js","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js","test:frontend":"mocha test/frontend/*.test.js","eval:agent":"node eval/agent/run.js"}}');
|
|
66659
67135
|
|
|
66660
67136
|
/***/ }
|
|
66661
67137
|
|