ranuts 0.1.0-alpha-21 → 0.1.0-alpha-22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{color-BgjAdNyp.js → color-48RIDBG4.js} +10 -44
- package/dist/index.js +2 -2
- package/dist/src/node/index.js +1 -1
- package/dist/src/utils/bom.d.ts +3 -3
- package/dist/src/utils/dom.d.ts +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/index.js +9 -6
- package/dist/umd/index.umd.cjs +1 -1
- package/dist/umd/utils/utils.umd.cjs +1 -1
- package/dist/{ws-D7Jt2dzL.js → ws-CUTzWNwq.js} +1 -1
- package/package.json +1 -1
|
@@ -80362,8 +80362,6 @@ const transformText = (content) => {
|
|
|
80362
80362
|
content: text
|
|
80363
80363
|
};
|
|
80364
80364
|
}
|
|
80365
|
-
} else {
|
|
80366
|
-
console.error("Unexpected result type:", typeof content);
|
|
80367
80365
|
}
|
|
80368
80366
|
};
|
|
80369
80367
|
const md5 = (str) => {
|
|
@@ -80570,7 +80568,6 @@ const MessageCodec = {
|
|
|
80570
80568
|
const bytes = encoder.encode(jsonStr);
|
|
80571
80569
|
return btoa(String.fromCharCode.apply(null, Array.from(bytes)));
|
|
80572
80570
|
} catch (error) {
|
|
80573
|
-
console.error("Message encode error:", error);
|
|
80574
80571
|
return "";
|
|
80575
80572
|
}
|
|
80576
80573
|
},
|
|
@@ -80590,7 +80587,6 @@ const MessageCodec = {
|
|
|
80590
80587
|
const jsonStr = decoder.decode(bytes);
|
|
80591
80588
|
return JSON.parse(jsonStr);
|
|
80592
80589
|
} catch (error) {
|
|
80593
|
-
console.error("Message decode error:", error);
|
|
80594
80590
|
return null;
|
|
80595
80591
|
}
|
|
80596
80592
|
},
|
|
@@ -80628,18 +80624,14 @@ const MessageCodec = {
|
|
|
80628
80624
|
try {
|
|
80629
80625
|
const decoded = this.decode(encoded);
|
|
80630
80626
|
if (decoded.type !== "File") {
|
|
80631
|
-
throw new MessageCodecError(
|
|
80632
|
-
`Expected File type but got ${decoded.type}`,
|
|
80633
|
-
"INVALID_FILE_TYPE"
|
|
80634
|
-
);
|
|
80627
|
+
throw new MessageCodecError(`Expected File type but got ${decoded.type}`, "INVALID_FILE_TYPE");
|
|
80635
80628
|
}
|
|
80636
80629
|
const metadata = decoded;
|
|
80637
80630
|
const content = metadata.content instanceof Uint8Array ? metadata.content.buffer.slice(0) : metadata.content;
|
|
80638
|
-
return new File(
|
|
80639
|
-
|
|
80640
|
-
metadata.
|
|
80641
|
-
|
|
80642
|
-
);
|
|
80631
|
+
return new File([content], metadata.name, {
|
|
80632
|
+
type: metadata.mimeType,
|
|
80633
|
+
lastModified: metadata.lastModified
|
|
80634
|
+
});
|
|
80643
80635
|
} catch (error) {
|
|
80644
80636
|
if (error instanceof MessageCodecError) {
|
|
80645
80637
|
throw error;
|
|
@@ -80682,17 +80674,11 @@ const MessageCodec = {
|
|
|
80682
80674
|
try {
|
|
80683
80675
|
const decoded = this.decode(encoded);
|
|
80684
80676
|
if (decoded.type !== "Blob") {
|
|
80685
|
-
throw new MessageCodecError(
|
|
80686
|
-
`Expected Blob type but got ${decoded.type}`,
|
|
80687
|
-
"INVALID_BLOB_TYPE"
|
|
80688
|
-
);
|
|
80677
|
+
throw new MessageCodecError(`Expected Blob type but got ${decoded.type}`, "INVALID_BLOB_TYPE");
|
|
80689
80678
|
}
|
|
80690
80679
|
const metadata = decoded;
|
|
80691
80680
|
const content = metadata.content instanceof Uint8Array ? metadata.content.buffer.slice(0) : metadata.content;
|
|
80692
|
-
return new Blob(
|
|
80693
|
-
[content],
|
|
80694
|
-
{ type: metadata.mimeType }
|
|
80695
|
-
);
|
|
80681
|
+
return new Blob([content], { type: metadata.mimeType });
|
|
80696
80682
|
} catch (error) {
|
|
80697
80683
|
if (error instanceof MessageCodecError) {
|
|
80698
80684
|
throw error;
|
|
@@ -80715,7 +80701,6 @@ const MessageCodec = {
|
|
|
80715
80701
|
value: date.toISOString()
|
|
80716
80702
|
});
|
|
80717
80703
|
} catch (error) {
|
|
80718
|
-
console.error("Date encode error:", error);
|
|
80719
80704
|
throw error;
|
|
80720
80705
|
}
|
|
80721
80706
|
},
|
|
@@ -80732,7 +80717,6 @@ const MessageCodec = {
|
|
|
80732
80717
|
}
|
|
80733
80718
|
return new Date(decoded.value);
|
|
80734
80719
|
} catch (error) {
|
|
80735
|
-
console.error("Date decode error:", error);
|
|
80736
80720
|
throw error;
|
|
80737
80721
|
}
|
|
80738
80722
|
},
|
|
@@ -80749,7 +80733,6 @@ const MessageCodec = {
|
|
|
80749
80733
|
flags: regexp.flags
|
|
80750
80734
|
});
|
|
80751
80735
|
} catch (error) {
|
|
80752
|
-
console.error("RegExp encode error:", error);
|
|
80753
80736
|
throw error;
|
|
80754
80737
|
}
|
|
80755
80738
|
},
|
|
@@ -80766,7 +80749,6 @@ const MessageCodec = {
|
|
|
80766
80749
|
}
|
|
80767
80750
|
return new RegExp(decoded.source, decoded.flags);
|
|
80768
80751
|
} catch (error) {
|
|
80769
|
-
console.error("RegExp decode error:", error);
|
|
80770
80752
|
throw error;
|
|
80771
80753
|
}
|
|
80772
80754
|
},
|
|
@@ -80782,7 +80764,6 @@ const MessageCodec = {
|
|
|
80782
80764
|
value: Array.from(map.entries())
|
|
80783
80765
|
});
|
|
80784
80766
|
} catch (error) {
|
|
80785
|
-
console.error("Map encode error:", error);
|
|
80786
80767
|
throw error;
|
|
80787
80768
|
}
|
|
80788
80769
|
},
|
|
@@ -80799,7 +80780,6 @@ const MessageCodec = {
|
|
|
80799
80780
|
}
|
|
80800
80781
|
return new Map(decoded.value);
|
|
80801
80782
|
} catch (error) {
|
|
80802
|
-
console.error("Map decode error:", error);
|
|
80803
80783
|
throw error;
|
|
80804
80784
|
}
|
|
80805
80785
|
},
|
|
@@ -80815,7 +80795,6 @@ const MessageCodec = {
|
|
|
80815
80795
|
value: Array.from(set)
|
|
80816
80796
|
});
|
|
80817
80797
|
} catch (error) {
|
|
80818
|
-
console.error("Set encode error:", error);
|
|
80819
80798
|
throw error;
|
|
80820
80799
|
}
|
|
80821
80800
|
},
|
|
@@ -80832,7 +80811,6 @@ const MessageCodec = {
|
|
|
80832
80811
|
}
|
|
80833
80812
|
return new Set(decoded.value);
|
|
80834
80813
|
} catch (error) {
|
|
80835
|
-
console.error("Set decode error:", error);
|
|
80836
80814
|
throw error;
|
|
80837
80815
|
}
|
|
80838
80816
|
},
|
|
@@ -80850,7 +80828,6 @@ const MessageCodec = {
|
|
|
80850
80828
|
stack: error.stack
|
|
80851
80829
|
});
|
|
80852
80830
|
} catch (error2) {
|
|
80853
|
-
console.error("Error encode error:", error2);
|
|
80854
80831
|
throw error2;
|
|
80855
80832
|
}
|
|
80856
80833
|
},
|
|
@@ -80870,7 +80847,6 @@ const MessageCodec = {
|
|
|
80870
80847
|
error.stack = decoded.stack;
|
|
80871
80848
|
return error;
|
|
80872
80849
|
} catch (error) {
|
|
80873
|
-
console.error("Error decode error:", error);
|
|
80874
80850
|
throw error;
|
|
80875
80851
|
}
|
|
80876
80852
|
},
|
|
@@ -80886,7 +80862,6 @@ const MessageCodec = {
|
|
|
80886
80862
|
value: Array.from(new Uint8Array(buffer))
|
|
80887
80863
|
});
|
|
80888
80864
|
} catch (error) {
|
|
80889
|
-
console.error("ArrayBuffer encode error:", error);
|
|
80890
80865
|
throw error;
|
|
80891
80866
|
}
|
|
80892
80867
|
},
|
|
@@ -80903,7 +80878,6 @@ const MessageCodec = {
|
|
|
80903
80878
|
}
|
|
80904
80879
|
return new Uint8Array(decoded.value).buffer;
|
|
80905
80880
|
} catch (error) {
|
|
80906
|
-
console.error("ArrayBuffer decode error:", error);
|
|
80907
80881
|
throw error;
|
|
80908
80882
|
}
|
|
80909
80883
|
},
|
|
@@ -80920,8 +80894,7 @@ const MessageCodec = {
|
|
|
80920
80894
|
value: Array.from(new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength))
|
|
80921
80895
|
});
|
|
80922
80896
|
} catch (error) {
|
|
80923
|
-
|
|
80924
|
-
throw error;
|
|
80897
|
+
return "";
|
|
80925
80898
|
}
|
|
80926
80899
|
},
|
|
80927
80900
|
/**
|
|
@@ -80938,7 +80911,6 @@ const MessageCodec = {
|
|
|
80938
80911
|
const TypedArrayConstructor = window[decoded.constructor];
|
|
80939
80912
|
return new TypedArrayConstructor(decoded.value);
|
|
80940
80913
|
} catch (error) {
|
|
80941
|
-
console.error("TypedArray decode error:", error);
|
|
80942
80914
|
throw error;
|
|
80943
80915
|
}
|
|
80944
80916
|
},
|
|
@@ -80952,10 +80924,7 @@ const MessageCodec = {
|
|
|
80952
80924
|
async encodeFileChunked(file, chunkSize = 16 * 1024) {
|
|
80953
80925
|
try {
|
|
80954
80926
|
if (chunkSize <= 0) {
|
|
80955
|
-
throw new MessageCodecError(
|
|
80956
|
-
"Chunk size must be greater than 0",
|
|
80957
|
-
"INVALID_CHUNK_SIZE"
|
|
80958
|
-
);
|
|
80927
|
+
throw new MessageCodecError("Chunk size must be greater than 0", "INVALID_CHUNK_SIZE");
|
|
80959
80928
|
}
|
|
80960
80929
|
const totalChunks = Math.ceil(file.size / chunkSize);
|
|
80961
80930
|
const chunks = [];
|
|
@@ -81007,10 +80976,7 @@ const MessageCodec = {
|
|
|
81007
80976
|
chunks.sort((a, b) => a.chunkIndex - b.chunkIndex);
|
|
81008
80977
|
for (let i = 0; i < chunks.length; i++) {
|
|
81009
80978
|
if (chunks[i].chunkIndex !== i) {
|
|
81010
|
-
throw new MessageCodecError(
|
|
81011
|
-
`Invalid chunk index at position ${i}`,
|
|
81012
|
-
"INVALID_CHUNK_ORDER"
|
|
81013
|
-
);
|
|
80979
|
+
throw new MessageCodecError(`Invalid chunk index at position ${i}`, "INVALID_CHUNK_ORDER");
|
|
81014
80980
|
}
|
|
81015
80981
|
}
|
|
81016
80982
|
const chunksData = await Promise.all(
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AudioRecorder, BridgeManager, Chain, Client, Mathjs, Monitor, Platform, PostMessageBridge, QuestQueue, SyncHook, TOTP, addClassToElement, addNumSym, appendUrl, audioVendor, bridgeManager, canvasVendor, cloneDeep, compose, connection, convertImageToBase64, create, createData, createDocumentFragment, createObjectURL, createSignal, currentDevice, debounce, durationHandler, encodeUrl, escapeHtml, filterObj, formatJson, generateThrottle, getAllQueryString, getCookie, getCookieByName, getFrame, getHost, getPerformance, getPixelRatio, getQuery, getStatus, getWindow, handleConsole, handleError, handleFetchHook, imageRequest, isBangDevice, isClient, isEqual, isImageSize, isMobile, isSafari, isWeiXin, localStorageGetItem, localStorageSetItem, mathjs, memoize, merge, mergeExports, networkSpeed, noop, perToNum, performanceTime, querystring, range, removeClassToElement, removeGhosting, replaceOld, report, requestUrlToBuffer, retain, scriptOnLoad, setAttributeByGlobal, setFontSize2html, status, subscribers, throttle, timeFormat, timestampToTime, transformNumber, webglVendor } from "./src/utils/index.js";
|
|
2
|
-
import { C, a, F, H, b, E, M, R, c, d, z, e, f, g, G, x, h, D, i, j, k, l, m, n, o, B, r, p, q, s, t, u, v, w, y, A } from "./color-
|
|
3
|
-
import { R as R2, S, W, a as a2, b as b2, c as c2, d as d2, g as g2, e as e2, i as i2, p as p2, f as f2, q as q2, r as r2, h as h2, j as j2, k as k2, s as s2, l as l2, t as t2, m as m2, n as n2, w as w2, o as o2 } from "./ws-
|
|
2
|
+
import { C, a, F, H, b, E, M, R, c, d, z, e, f, g, G, x, h, D, i, j, k, l, m, n, o, B, r, p, q, s, t, u, v, w, y, A } from "./color-48RIDBG4.js";
|
|
3
|
+
import { R as R2, S, W, a as a2, b as b2, c as c2, d as d2, g as g2, e as e2, i as i2, p as p2, f as f2, q as q2, r as r2, h as h2, j as j2, k as k2, s as s2, l as l2, t as t2, m as m2, n as n2, w as w2, o as o2 } from "./ws-CUTzWNwq.js";
|
|
4
4
|
import "node:fs";
|
|
5
5
|
import { r as r3 } from "./reactify-Z-V9Vblb.js";
|
|
6
6
|
import { ocr } from "./src/ml/index.js";
|
package/dist/src/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R, S, W, a, b, c, d, g, e, i, p, f, q, r, h, j, k, s, l, t, m, n, w, o } from "../../ws-
|
|
1
|
+
import { R, S, W, a, b, c, d, g, e, i, p, f, q, r, h, j, k, s, l, t, m, n, w, o } from "../../ws-CUTzWNwq.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
const writeFile = (path, content) => new Promise((resolve, reject) => {
|
|
4
4
|
fs.writeFile(
|
package/dist/src/utils/bom.d.ts
CHANGED
|
@@ -161,7 +161,7 @@ export declare class PostMessageBridge {
|
|
|
161
161
|
private targetOrigin;
|
|
162
162
|
private messageHandlers;
|
|
163
163
|
private pendingRequests;
|
|
164
|
-
constructor(targetWindow
|
|
164
|
+
constructor(targetWindow?: Window, targetOrigin?: string);
|
|
165
165
|
private handleMessage;
|
|
166
166
|
on: <T = unknown, R = unknown>(type: string, handler: MessageHandler<T, R>) => void;
|
|
167
167
|
off: (type: string) => void;
|
|
@@ -174,8 +174,8 @@ export declare class PostMessageBridge {
|
|
|
174
174
|
}
|
|
175
175
|
export interface BridgeManagerOptions {
|
|
176
176
|
id?: string;
|
|
177
|
-
targetOrigin
|
|
178
|
-
targetWindow
|
|
177
|
+
targetOrigin?: string;
|
|
178
|
+
targetWindow?: Window;
|
|
179
179
|
}
|
|
180
180
|
export declare class BridgeManager {
|
|
181
181
|
private static instance;
|
package/dist/src/utils/dom.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ export declare class Chain {
|
|
|
82
82
|
* @description: 给当前元素添加子元素
|
|
83
83
|
* @return {Chain}
|
|
84
84
|
*/
|
|
85
|
-
addChild: (child: Chain | Chain[]) => Chain;
|
|
85
|
+
addChild: (child: Chain | Chain[] | HTMLElement | HTMLElement[]) => Chain;
|
|
86
86
|
/**
|
|
87
87
|
* @description: 给当前元素添加事件监听
|
|
88
88
|
* @param {string} type
|
|
@@ -31,5 +31,5 @@ import { performanceTime, timeFormat, timestampToTime } from './time';
|
|
|
31
31
|
import type { CurrentDevice } from './device';
|
|
32
32
|
import { currentDevice, isBangDevice, isClient, isMobile, isWeiXin } from './device';
|
|
33
33
|
import { Color, ColorScheme, FMT, Hsl, Hsla, Rgb, Rgba, componentToHex, hexToRgb, hsbToRgb, hslToRgb, hsvToHsl, hsvToRgb, hue2rgb, randomColor, rgbToHex, rgbToHsb, rgbToHsl } from '@/utils/color';
|
|
34
|
-
export { performanceTime, timeFormat, timestampToTime, generateThrottle, throttle, SyncHook, changeHumpToLowerCase, clearBr, clearStr, isString, randomString, str2Xml, strParse, scriptOnLoad, handleFetchHook, createData, report, QuestQueue, noop, getPerformance, querystring, formatJson, filterObj, merge, replaceOld, mergeExports, perToNum, range, Mathjs, mathjs, getStatus, status, Monitor, MimeType, getExtensions, setMime, getMime, memoize, isImageSize, convertImageToBase64, handleError, addClassToElement, removeClassToElement, createDocumentFragment, escapeHtml, isClient, isWeiXin, isMobile, debounce, currentDevice, handleConsole, compose, Color, FMT, Hsl, Hsla, Rgb, Rgba, randomColor, hexToRgb, componentToHex, rgbToHex, rgbToHsl, hue2rgb, hslToRgb, rgbToHsb, hsbToRgb, hsvToRgb, hsvToHsl, ColorScheme, AudioRecorder, webglVendor, canvasVendor, audioVendor, retain, getCookie, requestUrlToBuffer, getPixelRatio, createObjectURL, getFrame, getHost, getAllQueryString, appendUrl, removeGhosting, getCookieByName, getWindow, connection, encodeUrl, imageRequest, durationHandler, networkSpeed, TOTP, isBangDevice, localStorageGetItem, localStorageSetItem, setAttributeByGlobal, setFontSize2html, Chain, create, isEqual, cloneDeep, createSignal, subscribers, getMatchingSentences, transformNumber, toString, addNumSym, getQuery, checkEncoding, transformText, isSafari, md5, getRandomString, bridgeManager, Client, BridgeManager, PostMessageBridge, MessageCodec, Platform };
|
|
34
|
+
export { performanceTime, timeFormat, timestampToTime, generateThrottle, throttle, SyncHook, changeHumpToLowerCase, clearBr, clearStr, isString, randomString, str2Xml, strParse, scriptOnLoad, handleFetchHook, createData, report, QuestQueue, noop, getPerformance, querystring, formatJson, filterObj, merge, replaceOld, mergeExports, perToNum, range, Mathjs, mathjs, getStatus, status, Monitor, MimeType, getExtensions, setMime, getMime, memoize, isImageSize, convertImageToBase64, handleError, addClassToElement, removeClassToElement, createDocumentFragment, escapeHtml, isClient, isWeiXin, isMobile, debounce, currentDevice, handleConsole, compose, Color, FMT, Hsl, Hsla, Rgb, Rgba, randomColor, hexToRgb, componentToHex, rgbToHex, rgbToHsl, hue2rgb, hslToRgb, rgbToHsb, hsbToRgb, hsvToRgb, hsvToHsl, ColorScheme, AudioRecorder, webglVendor, canvasVendor, audioVendor, retain, getCookie, requestUrlToBuffer, getPixelRatio, createObjectURL, getFrame, getHost, getAllQueryString, appendUrl, removeGhosting, getCookieByName, getWindow, connection, encodeUrl, imageRequest, durationHandler, networkSpeed, TOTP, isBangDevice, localStorageGetItem, localStorageSetItem, setAttributeByGlobal, setFontSize2html, Chain, create, isEqual, cloneDeep, createSignal, subscribers, getMatchingSentences, transformNumber, toString, addNumSym, getQuery, checkEncoding, transformText, isSafari, md5, getRandomString, bridgeManager, Client, BridgeManager, PostMessageBridge, MessageCodec, Platform, };
|
|
35
35
|
export type { CurrentDevice, TransformText, MessageHandler, MessageData, PendingRequest, BridgeManagerOptions, BroadcastPayload, CallToPayload, };
|
package/dist/src/utils/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { y as toString, o as isString, D as getRandomString, E as MessageCodec, p as randomString } from "../../color-
|
|
5
|
-
import { C, a, F, H, b, M, R, c, d, z, e, f, g, G, x, h, i, j, k, l, m, n, B, r, q, s, t, u, v, w, A } from "../../color-
|
|
4
|
+
import { y as toString, o as isString, D as getRandomString, E as MessageCodec, p as randomString } from "../../color-48RIDBG4.js";
|
|
5
|
+
import { C, a, F, H, b, M, R, c, d, z, e, f, g, G, x, h, i, j, k, l, m, n, B, r, q, s, t, u, v, w, A } from "../../color-48RIDBG4.js";
|
|
6
6
|
const NEW_LISTENER = "NEW_LISTENER";
|
|
7
7
|
class SyncHook {
|
|
8
8
|
constructor() {
|
|
@@ -601,16 +601,17 @@ const isSafari = () => {
|
|
|
601
601
|
!navigator.userAgent.includes("FxiOS")
|
|
602
602
|
);
|
|
603
603
|
};
|
|
604
|
-
const DEFAULT_TIMEOUT =
|
|
604
|
+
const DEFAULT_TIMEOUT = 2e4;
|
|
605
605
|
class PostMessageBridge {
|
|
606
|
-
constructor(targetWindow, targetOrigin = "*") {
|
|
606
|
+
constructor(targetWindow = window, targetOrigin = "*") {
|
|
607
607
|
__publicField(this, "targetWindow");
|
|
608
608
|
__publicField(this, "targetOrigin");
|
|
609
609
|
__publicField(this, "messageHandlers");
|
|
610
610
|
__publicField(this, "pendingRequests");
|
|
611
611
|
__publicField(this, "handleMessage", (event) => {
|
|
612
612
|
if (this.targetOrigin !== "*" && event.origin !== this.targetOrigin) return;
|
|
613
|
-
const
|
|
613
|
+
const dataCopy = typeof event.data === "string" ? String(event.data) : event.data;
|
|
614
|
+
const decodedData = MessageCodec.decode(dataCopy);
|
|
614
615
|
if (!decodedData) return;
|
|
615
616
|
const { type, payload, id, isResponse } = decodedData;
|
|
616
617
|
if (isResponse && id) {
|
|
@@ -802,7 +803,9 @@ const Client = {
|
|
|
802
803
|
const initPlatform = (events) => {
|
|
803
804
|
const initBridge = async (event) => {
|
|
804
805
|
var _a;
|
|
805
|
-
|
|
806
|
+
if (typeof event.data !== "string") return;
|
|
807
|
+
const str = String(event.data);
|
|
808
|
+
const decodedData = MessageCodec.decode(str);
|
|
806
809
|
if (!decodedData) return;
|
|
807
810
|
const { type, payload, id } = decodedData;
|
|
808
811
|
const handler = events[type];
|