@kanadego/dsh-heartbeat 1.5.1 → 1.6.0

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.
@@ -1,235 +0,0 @@
1
- // node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.3/node_modules/@deepseek-ai/cosmokit/lib/index.js
2
- function isNullable(value) {
3
- return value === null || value === void 0;
4
- }
5
- function isPlainObject(data) {
6
- return data && typeof data === "object" && !Array.isArray(data);
7
- }
8
- function filterKeys(object, filter) {
9
- return Object.fromEntries(Object.entries(object).filter(([key, value]) => filter(key, value)));
10
- }
11
- function mapValues(object, transform) {
12
- return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, transform(value, key)]));
13
- }
14
- function pick(source, keys, forced) {
15
- if (!keys) return { ...source };
16
- const result = {};
17
- for (const key of keys) if (forced || source[key] !== void 0) result[key] = source[key];
18
- return result;
19
- }
20
- function defineProperty(object, key, value) {
21
- return Object.defineProperty(object, key, {
22
- writable: true,
23
- value,
24
- enumerable: false
25
- });
26
- }
27
- function is(type, value) {
28
- if (arguments.length === 1) return (value2) => is(type, value2);
29
- return type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;
30
- }
31
- function isArrayBufferLike(value) {
32
- return is("ArrayBuffer", value) || is("SharedArrayBuffer", value);
33
- }
34
- function isArrayBufferSource(value) {
35
- return isArrayBufferLike(value) || ArrayBuffer.isView(value);
36
- }
37
- var Binary;
38
- (function(Binary2) {
39
- Binary2.is = isArrayBufferLike;
40
- Binary2.isSource = isArrayBufferSource;
41
- function fromSource(source) {
42
- if (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);
43
- else return source;
44
- }
45
- Binary2.fromSource = fromSource;
46
- function toBase64(source) {
47
- source = fromSource(source);
48
- if (typeof Buffer !== "undefined") return Buffer.from(source).toString("base64");
49
- let binary = "";
50
- const bytes = new Uint8Array(source);
51
- for (let i = 0; i < bytes.byteLength; i++) binary += String.fromCharCode(bytes[i]);
52
- return btoa(binary);
53
- }
54
- Binary2.toBase64 = toBase64;
55
- function fromBase64(source) {
56
- if (typeof Buffer !== "undefined") return fromSource(Buffer.from(source, "base64"));
57
- return Uint8Array.from(atob(source), (c) => c.charCodeAt(0));
58
- }
59
- Binary2.fromBase64 = fromBase64;
60
- function toHex(source) {
61
- source = fromSource(source);
62
- if (typeof Buffer !== "undefined") return Buffer.from(source).toString("hex");
63
- return Array.from(new Uint8Array(source), (byte) => byte.toString(16).padStart(2, "0")).join("");
64
- }
65
- Binary2.toHex = toHex;
66
- function fromHex(source) {
67
- if (typeof Buffer !== "undefined") return fromSource(Buffer.from(source, "hex"));
68
- const hex = source.length % 2 === 0 ? source : source.slice(0, source.length - 1);
69
- const buffer = [];
70
- for (let i = 0; i < hex.length; i += 2) buffer.push(parseInt(`${hex[i]}${hex[i + 1]}`, 16));
71
- return Uint8Array.from(buffer).buffer;
72
- }
73
- Binary2.fromHex = fromHex;
74
- })(Binary || (Binary = {}));
75
- var base64ToArrayBuffer = Binary.fromBase64;
76
- var arrayBufferToBase64 = Binary.toBase64;
77
- var hexToArrayBuffer = Binary.fromHex;
78
- var arrayBufferToHex = Binary.toHex;
79
- function clone(source, refs = /* @__PURE__ */ new Map()) {
80
- if (!source || typeof source !== "object") return source;
81
- if (is("Date", source)) return new Date(source.valueOf());
82
- if (is("RegExp", source)) return new RegExp(source.source, source.flags);
83
- if (isArrayBufferLike(source)) return source.slice(0);
84
- if (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);
85
- const cached = refs.get(source);
86
- if (cached) return cached;
87
- if (Array.isArray(source)) {
88
- const result2 = [];
89
- refs.set(source, result2);
90
- source.forEach((value, index) => {
91
- result2[index] = Reflect.apply(clone, null, [value, refs]);
92
- });
93
- return result2;
94
- }
95
- const result = Object.create(Object.getPrototypeOf(source));
96
- refs.set(source, result);
97
- for (const key of Reflect.ownKeys(source)) {
98
- const descriptor = { ...Reflect.getOwnPropertyDescriptor(source, key) };
99
- if ("value" in descriptor) descriptor.value = Reflect.apply(clone, null, [descriptor.value, refs]);
100
- Reflect.defineProperty(result, key, descriptor);
101
- }
102
- return result;
103
- }
104
- function deepEqual(a, b, strict) {
105
- if (a === b) return true;
106
- if (!strict && isNullable(a) && isNullable(b)) return true;
107
- if (typeof a !== typeof b) return false;
108
- if (typeof a !== "object") return false;
109
- if (!a || !b) return false;
110
- function check(test, then) {
111
- return test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;
112
- }
113
- return check(Array.isArray, (a2, b2) => a2.length === b2.length && a2.every((item, index) => deepEqual(item, b2[index]))) ?? check(is("Date"), (a2, b2) => a2.valueOf() === b2.valueOf()) ?? check(is("RegExp"), (a2, b2) => a2.source === b2.source && a2.flags === b2.flags) ?? check(isArrayBufferLike, (a2, b2) => {
114
- if (a2.byteLength !== b2.byteLength) return false;
115
- const viewA = new Uint8Array(a2);
116
- const viewB = new Uint8Array(b2);
117
- for (let i = 0; i < viewA.length; i++) if (viewA[i] !== viewB[i]) return false;
118
- return true;
119
- }) ?? Object.keys({
120
- ...a,
121
- ...b
122
- }).every((key) => deepEqual(a[key], b[key], strict));
123
- }
124
- function tokenize(source, delimiters, delimiter) {
125
- const output = [];
126
- let state = 0;
127
- for (let i = 0; i < source.length; i++) {
128
- const code = source.charCodeAt(i);
129
- if (code >= 65 && code <= 90) {
130
- if (state === 1) {
131
- const next = source.charCodeAt(i + 1);
132
- if (next >= 97 && next <= 122) output.push(delimiter);
133
- output.push(code + 32);
134
- } else {
135
- if (state !== 0) output.push(delimiter);
136
- output.push(code + 32);
137
- }
138
- state = 1;
139
- } else if (code >= 97 && code <= 122) {
140
- output.push(code);
141
- state = 2;
142
- } else if (delimiters.includes(code)) {
143
- if (state !== 0) output.push(delimiter);
144
- state = 0;
145
- } else output.push(code);
146
- }
147
- return String.fromCharCode(...output);
148
- }
149
- function paramCase(source) {
150
- return tokenize(source, [45, 95], 45);
151
- }
152
- var hyphenate = paramCase;
153
- var Time;
154
- (function(Time2) {
155
- Time2.millisecond = 1;
156
- Time2.second = 1e3;
157
- Time2.minute = Time2.second * 60;
158
- Time2.hour = Time2.minute * 60;
159
- Time2.day = Time2.hour * 24;
160
- Time2.week = Time2.day * 7;
161
- let timezoneOffset = (/* @__PURE__ */ new Date()).getTimezoneOffset();
162
- function setTimezoneOffset(offset) {
163
- timezoneOffset = offset;
164
- }
165
- Time2.setTimezoneOffset = setTimezoneOffset;
166
- function getTimezoneOffset() {
167
- return timezoneOffset;
168
- }
169
- Time2.getTimezoneOffset = getTimezoneOffset;
170
- function getDateNumber(date = /* @__PURE__ */ new Date(), offset) {
171
- if (typeof date === "number") date = new Date(date);
172
- if (offset === void 0) offset = timezoneOffset;
173
- return Math.floor((date.valueOf() / Time2.minute - offset) / 1440);
174
- }
175
- Time2.getDateNumber = getDateNumber;
176
- function fromDateNumber(value, offset) {
177
- const date = new Date(value * Time2.day);
178
- if (offset === void 0) offset = timezoneOffset;
179
- return new Date(+date + offset * Time2.minute);
180
- }
181
- Time2.fromDateNumber = fromDateNumber;
182
- const numeric = /\d+(?:\.\d+)?/.source;
183
- const timeRegExp = new RegExp(`^${[
184
- "w(?:eek(?:s)?)?",
185
- "d(?:ay(?:s)?)?",
186
- "h(?:our(?:s)?)?",
187
- "m(?:in(?:ute)?(?:s)?)?",
188
- "s(?:ec(?:ond)?(?:s)?)?"
189
- ].map((unit) => `(${numeric}${unit})?`).join("")}$`);
190
- function parseTime(source) {
191
- const capture = timeRegExp.exec(source);
192
- if (!capture) return 0;
193
- return (parseFloat(capture[1]) * Time2.week || 0) + (parseFloat(capture[2]) * Time2.day || 0) + (parseFloat(capture[3]) * Time2.hour || 0) + (parseFloat(capture[4]) * Time2.minute || 0) + (parseFloat(capture[5]) * Time2.second || 0);
194
- }
195
- Time2.parseTime = parseTime;
196
- function parseDate(date) {
197
- const parsed = parseTime(date);
198
- if (parsed) date = Date.now() + parsed;
199
- else if (/^\d{1,2}(:\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${date}`;
200
- else if (/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).getFullYear()}-${date}`;
201
- return date ? new Date(date) : /* @__PURE__ */ new Date();
202
- }
203
- Time2.parseDate = parseDate;
204
- function format(ms) {
205
- const abs = Math.abs(ms);
206
- if (abs >= Time2.day - Time2.hour / 2) return Math.round(ms / Time2.day) + "d";
207
- else if (abs >= Time2.hour - Time2.minute / 2) return Math.round(ms / Time2.hour) + "h";
208
- else if (abs >= Time2.minute - Time2.second / 2) return Math.round(ms / Time2.minute) + "m";
209
- else if (abs >= Time2.second) return Math.round(ms / Time2.second) + "s";
210
- return ms + "ms";
211
- }
212
- Time2.format = format;
213
- function toDigits(source, length = 2) {
214
- return source.toString().padStart(length, "0");
215
- }
216
- Time2.toDigits = toDigits;
217
- function template(template2, time = /* @__PURE__ */ new Date()) {
218
- return template2.replace("yyyy", time.getFullYear().toString()).replace("yy", time.getFullYear().toString().slice(2)).replace("MM", toDigits(time.getMonth() + 1)).replace("dd", toDigits(time.getDate())).replace("hh", toDigits(time.getHours())).replace("mm", toDigits(time.getMinutes())).replace("ss", toDigits(time.getSeconds())).replace("SSS", toDigits(time.getMilliseconds(), 3));
219
- }
220
- Time2.template = template;
221
- })(Time || (Time = {}));
222
-
223
- export {
224
- isNullable,
225
- isPlainObject,
226
- filterKeys,
227
- mapValues,
228
- pick,
229
- defineProperty,
230
- Binary,
231
- clone,
232
- deepEqual,
233
- hyphenate
234
- };
235
- //# sourceMappingURL=chunk-AISZRA4C.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.3/node_modules/@deepseek-ai/cosmokit/lib/index.js"],"sourcesContent":["//#region lib/types/misc.js\n/** No-op callback returning `undefined` at runtime and `any` at type level. */\nfunction noop() {}\n/** Return true when a value is `null` or `undefined`. */\nfunction isNullable(value) {\n\treturn value === null || value === void 0;\n}\n/** Return true when a value is neither `null` nor `undefined`. */\nfunction isNonNullable(value) {\n\treturn !isNullable(value);\n}\n/** Return true for non-array object values. */\nfunction isPlainObject(data) {\n\treturn data && typeof data === \"object\" && !Array.isArray(data);\n}\n/** Filter object entries and return a new object. */\nfunction filterKeys(object, filter) {\n\treturn Object.fromEntries(Object.entries(object).filter(([key, value]) => filter(key, value)));\n}\n/** Map object values while preserving the original key set. */\nfunction mapValues(object, transform) {\n\treturn Object.fromEntries(Object.entries(object).map(([key, value]) => [key, transform(value, key)]));\n}\n/** Pick selected keys from an object, optionally including `undefined` values. */\nfunction pick(source, keys, forced) {\n\tif (!keys) return { ...source };\n\tconst result = {};\n\tfor (const key of keys) if (forced || source[key] !== void 0) result[key] = source[key];\n\treturn result;\n}\n/** Omit selected keys from a shallow object copy. */\nfunction omit(source, keys) {\n\tif (!keys) return { ...source };\n\tconst result = { ...source };\n\tfor (const key of keys) Reflect.deleteProperty(result, key);\n\treturn result;\n}\n/** Define a non-enumerable writable property and return the object. */\nfunction defineProperty(object, key, value) {\n\treturn Object.defineProperty(object, key, {\n\t\twritable: true,\n\t\tvalue,\n\t\tenumerable: false\n\t});\n}\n//#endregion\n//#region lib/types/array.js\n/** Return true when every item in `array2` is present in `array1`. */\nfunction contain(array1, array2) {\n\treturn array2.every((item) => array1.includes(item));\n}\n/** Return items that appear in both arrays. */\nfunction intersection(array1, array2) {\n\treturn array1.filter((item) => array2.includes(item));\n}\n/** Return items from `array1` that do not appear in `array2`. */\nfunction difference(array1, array2) {\n\treturn array1.filter((item) => !array2.includes(item));\n}\n/** Return the set-union of two arrays while preserving first occurrence order. */\nfunction union(array1, array2) {\n\treturn Array.from(new Set([...array1, ...array2]));\n}\n/** Remove duplicate values while preserving first occurrence order. */\nfunction deduplicate(array) {\n\treturn [...new Set(array)];\n}\n/** Remove one item from an array and report whether it was found. */\nfunction remove(list, item) {\n\tconst index = list?.indexOf(item);\n\tif (index >= 0) {\n\t\tlist.splice(index, 1);\n\t\treturn true;\n\t} else return false;\n}\n/** Normalize nullish, scalar, or array input to an array. */\nfunction makeArray(source) {\n\treturn Array.isArray(source) ? source : isNullable(source) ? [] : [source];\n}\n//#endregion\n//#region lib/types/types.js\n/** Test values using `instanceof` with a `toStringTag` fallback. */\nfunction is(type, value) {\n\tif (arguments.length === 1) return (value) => is(type, value);\n\treturn type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;\n}\nfunction isArrayBufferLike(value) {\n\treturn is(\"ArrayBuffer\", value) || is(\"SharedArrayBuffer\", value);\n}\nfunction isArrayBufferSource(value) {\n\treturn isArrayBufferLike(value) || ArrayBuffer.isView(value);\n}\n/** Binary source detection and base64/hex conversion helpers. */\nvar Binary;\n(function(Binary) {\n\tBinary.is = isArrayBufferLike;\n\tBinary.isSource = isArrayBufferSource;\n\tfunction fromSource(source) {\n\t\tif (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);\n\t\telse return source;\n\t}\n\tBinary.fromSource = fromSource;\n\tfunction toBase64(source) {\n\t\tsource = fromSource(source);\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(source).toString(\"base64\");\n\t\tlet binary = \"\";\n\t\tconst bytes = new Uint8Array(source);\n\t\tfor (let i = 0; i < bytes.byteLength; i++) binary += String.fromCharCode(bytes[i]);\n\t\treturn btoa(binary);\n\t}\n\tBinary.toBase64 = toBase64;\n\tfunction fromBase64(source) {\n\t\tif (typeof Buffer !== \"undefined\") return fromSource(Buffer.from(source, \"base64\"));\n\t\treturn Uint8Array.from(atob(source), (c) => c.charCodeAt(0));\n\t}\n\tBinary.fromBase64 = fromBase64;\n\tfunction toHex(source) {\n\t\tsource = fromSource(source);\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(source).toString(\"hex\");\n\t\treturn Array.from(new Uint8Array(source), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n\t}\n\tBinary.toHex = toHex;\n\tfunction fromHex(source) {\n\t\tif (typeof Buffer !== \"undefined\") return fromSource(Buffer.from(source, \"hex\"));\n\t\tconst hex = source.length % 2 === 0 ? source : source.slice(0, source.length - 1);\n\t\tconst buffer = [];\n\t\tfor (let i = 0; i < hex.length; i += 2) buffer.push(parseInt(`${hex[i]}${hex[i + 1]}`, 16));\n\t\treturn Uint8Array.from(buffer).buffer;\n\t}\n\tBinary.fromHex = fromHex;\n})(Binary || (Binary = {}));\n/** Decode a base64 string into binary data. */\nconst base64ToArrayBuffer = Binary.fromBase64;\n/** Encode binary data as base64. */\nconst arrayBufferToBase64 = Binary.toBase64;\n/** Decode a hex string into binary data. */\nconst hexToArrayBuffer = Binary.fromHex;\n/** Encode binary data as hex. */\nconst arrayBufferToHex = Binary.toHex;\n/** Deep-clone common JavaScript values while preserving prototypes and cycles. */\nfunction clone(source, refs = /* @__PURE__ */ new Map()) {\n\tif (!source || typeof source !== \"object\") return source;\n\tif (is(\"Date\", source)) return new Date(source.valueOf());\n\tif (is(\"RegExp\", source)) return new RegExp(source.source, source.flags);\n\tif (isArrayBufferLike(source)) return source.slice(0);\n\tif (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);\n\tconst cached = refs.get(source);\n\tif (cached) return cached;\n\tif (Array.isArray(source)) {\n\t\tconst result = [];\n\t\trefs.set(source, result);\n\t\tsource.forEach((value, index) => {\n\t\t\tresult[index] = Reflect.apply(clone, null, [value, refs]);\n\t\t});\n\t\treturn result;\n\t}\n\tconst result = Object.create(Object.getPrototypeOf(source));\n\trefs.set(source, result);\n\tfor (const key of Reflect.ownKeys(source)) {\n\t\tconst descriptor = { ...Reflect.getOwnPropertyDescriptor(source, key) };\n\t\tif (\"value\" in descriptor) descriptor.value = Reflect.apply(clone, null, [descriptor.value, refs]);\n\t\tReflect.defineProperty(result, key, descriptor);\n\t}\n\treturn result;\n}\n/** Deeply compare arrays, dates, regexps, buffers, and plain object fields. */\nfunction deepEqual(a, b, strict) {\n\tif (a === b) return true;\n\tif (!strict && isNullable(a) && isNullable(b)) return true;\n\tif (typeof a !== typeof b) return false;\n\tif (typeof a !== \"object\") return false;\n\tif (!a || !b) return false;\n\tfunction check(test, then) {\n\t\treturn test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;\n\t}\n\treturn check(Array.isArray, (a, b) => a.length === b.length && a.every((item, index) => deepEqual(item, b[index]))) ?? check(is(\"Date\"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is(\"RegExp\"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike, (a, b) => {\n\t\tif (a.byteLength !== b.byteLength) return false;\n\t\tconst viewA = new Uint8Array(a);\n\t\tconst viewB = new Uint8Array(b);\n\t\tfor (let i = 0; i < viewA.length; i++) if (viewA[i] !== viewB[i]) return false;\n\t\treturn true;\n\t}) ?? Object.keys({\n\t\t...a,\n\t\t...b\n\t}).every((key) => deepEqual(a[key], b[key], strict));\n}\n//#endregion\n//#region lib/types/string.js\n/** Uppercase the first character of a string. */\nfunction capitalize(source) {\n\treturn source.charAt(0).toUpperCase() + source.slice(1);\n}\n/** Lowercase the first character of a string. */\nfunction uncapitalize(source) {\n\treturn source.charAt(0).toLowerCase() + source.slice(1);\n}\n/** Convert dash or underscore delimited text to camelCase. */\nfunction camelCase(source) {\n\treturn source.replace(/[_-][a-z]/g, (str) => str.slice(1).toUpperCase());\n}\nfunction tokenize(source, delimiters, delimiter) {\n\tconst output = [];\n\tlet state = 0;\n\tfor (let i = 0; i < source.length; i++) {\n\t\tconst code = source.charCodeAt(i);\n\t\tif (code >= 65 && code <= 90) {\n\t\t\tif (state === 1) {\n\t\t\t\tconst next = source.charCodeAt(i + 1);\n\t\t\t\tif (next >= 97 && next <= 122) output.push(delimiter);\n\t\t\t\toutput.push(code + 32);\n\t\t\t} else {\n\t\t\t\tif (state !== 0) output.push(delimiter);\n\t\t\t\toutput.push(code + 32);\n\t\t\t}\n\t\t\tstate = 1;\n\t\t} else if (code >= 97 && code <= 122) {\n\t\t\toutput.push(code);\n\t\t\tstate = 2;\n\t\t} else if (delimiters.includes(code)) {\n\t\t\tif (state !== 0) output.push(delimiter);\n\t\t\tstate = 0;\n\t\t} else output.push(code);\n\t}\n\treturn String.fromCharCode(...output);\n}\n/** Convert text to dash-delimited parameter case. */\nfunction paramCase(source) {\n\treturn tokenize(source, [45, 95], 45);\n}\n/** Convert text to underscore-delimited snake case. */\nfunction snakeCase(source) {\n\treturn tokenize(source, [45, 95], 95);\n}\n/** Runtime alias for `camelCase`. */\nconst camelize = camelCase;\n/** Runtime alias for `paramCase`. */\nconst hyphenate = paramCase;\n/** Format a property key as a JavaScript member access suffix. */\nfunction formatProperty(key) {\n\tif (typeof key !== \"string\") return `[${key.toString()}]`;\n\treturn /^[a-z_$][\\w$]*$/i.test(key) ? `.${key}` : `[${JSON.stringify(key)}]`;\n}\n/** Remove one trailing slash from a path string. */\nfunction trimSlash(source) {\n\treturn source.replace(/\\/$/, \"\");\n}\n/** Ensure a path starts with `/` and has no trailing slash. */\nfunction sanitize(source) {\n\tif (!source.startsWith(\"/\")) source = \"/\" + source;\n\treturn trimSlash(source);\n}\n//#endregion\n//#region lib/types/time.js\n/** Time constants plus parsing and formatting helpers. */\nvar Time;\n(function(Time) {\n\tTime.millisecond = 1;\n\tTime.second = 1e3;\n\tTime.minute = Time.second * 60;\n\tTime.hour = Time.minute * 60;\n\tTime.day = Time.hour * 24;\n\tTime.week = Time.day * 7;\n\tlet timezoneOffset = (/* @__PURE__ */ new Date()).getTimezoneOffset();\n\tfunction setTimezoneOffset(offset) {\n\t\ttimezoneOffset = offset;\n\t}\n\tTime.setTimezoneOffset = setTimezoneOffset;\n\tfunction getTimezoneOffset() {\n\t\treturn timezoneOffset;\n\t}\n\tTime.getTimezoneOffset = getTimezoneOffset;\n\tfunction getDateNumber(date = /* @__PURE__ */ new Date(), offset) {\n\t\tif (typeof date === \"number\") date = new Date(date);\n\t\tif (offset === void 0) offset = timezoneOffset;\n\t\treturn Math.floor((date.valueOf() / Time.minute - offset) / 1440);\n\t}\n\tTime.getDateNumber = getDateNumber;\n\tfunction fromDateNumber(value, offset) {\n\t\tconst date = new Date(value * Time.day);\n\t\tif (offset === void 0) offset = timezoneOffset;\n\t\treturn new Date(+date + offset * Time.minute);\n\t}\n\tTime.fromDateNumber = fromDateNumber;\n\tconst numeric = /\\d+(?:\\.\\d+)?/.source;\n\tconst timeRegExp = new RegExp(`^${[\n\t\t\"w(?:eek(?:s)?)?\",\n\t\t\"d(?:ay(?:s)?)?\",\n\t\t\"h(?:our(?:s)?)?\",\n\t\t\"m(?:in(?:ute)?(?:s)?)?\",\n\t\t\"s(?:ec(?:ond)?(?:s)?)?\"\n\t].map((unit) => `(${numeric}${unit})?`).join(\"\")}$`);\n\tfunction parseTime(source) {\n\t\tconst capture = timeRegExp.exec(source);\n\t\tif (!capture) return 0;\n\t\treturn (parseFloat(capture[1]) * Time.week || 0) + (parseFloat(capture[2]) * Time.day || 0) + (parseFloat(capture[3]) * Time.hour || 0) + (parseFloat(capture[4]) * Time.minute || 0) + (parseFloat(capture[5]) * Time.second || 0);\n\t}\n\tTime.parseTime = parseTime;\n\tfunction parseDate(date) {\n\t\tconst parsed = parseTime(date);\n\t\tif (parsed) date = Date.now() + parsed;\n\t\telse if (/^\\d{1,2}(:\\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${date}`;\n\t\telse if (/^\\d{1,2}-\\d{1,2}-\\d{1,2}(:\\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).getFullYear()}-${date}`;\n\t\treturn date ? new Date(date) : /* @__PURE__ */ new Date();\n\t}\n\tTime.parseDate = parseDate;\n\tfunction format(ms) {\n\t\tconst abs = Math.abs(ms);\n\t\tif (abs >= Time.day - Time.hour / 2) return Math.round(ms / Time.day) + \"d\";\n\t\telse if (abs >= Time.hour - Time.minute / 2) return Math.round(ms / Time.hour) + \"h\";\n\t\telse if (abs >= Time.minute - Time.second / 2) return Math.round(ms / Time.minute) + \"m\";\n\t\telse if (abs >= Time.second) return Math.round(ms / Time.second) + \"s\";\n\t\treturn ms + \"ms\";\n\t}\n\tTime.format = format;\n\tfunction toDigits(source, length = 2) {\n\t\treturn source.toString().padStart(length, \"0\");\n\t}\n\tTime.toDigits = toDigits;\n\tfunction template(template, time = /* @__PURE__ */ new Date()) {\n\t\treturn template.replace(\"yyyy\", time.getFullYear().toString()).replace(\"yy\", time.getFullYear().toString().slice(2)).replace(\"MM\", toDigits(time.getMonth() + 1)).replace(\"dd\", toDigits(time.getDate())).replace(\"hh\", toDigits(time.getHours())).replace(\"mm\", toDigits(time.getMinutes())).replace(\"ss\", toDigits(time.getSeconds())).replace(\"SSS\", toDigits(time.getMilliseconds(), 3));\n\t}\n\tTime.template = template;\n})(Time || (Time = {}));\n//#endregion\nexport { Binary, Time, arrayBufferToBase64, arrayBufferToHex, base64ToArrayBuffer, camelCase, camelize, capitalize, clone, contain, deduplicate, deepEqual, defineProperty, difference, filterKeys, formatProperty, hexToArrayBuffer, hyphenate, intersection, is, isNonNullable, isNullable, isPlainObject, makeArray, mapValues, mapValues as valueMap, noop, omit, paramCase, pick, remove, sanitize, snakeCase, trimSlash, uncapitalize, union };\n"],"mappings":";AAIA,SAAS,WAAW,OAAO;AAC1B,SAAO,UAAU,QAAQ,UAAU;AACpC;AAMA,SAAS,cAAc,MAAM;AAC5B,SAAO,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI;AAC/D;AAEA,SAAS,WAAW,QAAQ,QAAQ;AACnC,SAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,OAAO,KAAK,KAAK,CAAC,CAAC;AAC9F;AAEA,SAAS,UAAU,QAAQ,WAAW;AACrC,SAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,EAAE,I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