itsvertical 0.0.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/LICENSE.md +7 -0
- package/README.md +180 -0
- package/cli/dist/index.js +2291 -0
- package/dist/assets/index-CgahjK2L.css +1 -0
- package/dist/assets/index-DZzk7eGT.js +177 -0
- package/dist/assets/logo-B8C4aIsj.png +0 -0
- package/dist/index.html +13 -0
- package/package.json +57 -0
|
@@ -0,0 +1,2291 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// cli/index.ts
|
|
4
|
+
import fs3 from "fs";
|
|
5
|
+
import path3 from "path";
|
|
6
|
+
import { dirname } from "path";
|
|
7
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
|
|
10
|
+
// app/file/format.ts
|
|
11
|
+
function serialize(state) {
|
|
12
|
+
const file = {
|
|
13
|
+
version: 1,
|
|
14
|
+
project: state.project,
|
|
15
|
+
slices: state.slices,
|
|
16
|
+
layers: state.layers,
|
|
17
|
+
tasks: state.tasks
|
|
18
|
+
};
|
|
19
|
+
return JSON.stringify(file, null, 2);
|
|
20
|
+
}
|
|
21
|
+
function deserialize(json) {
|
|
22
|
+
const file = JSON.parse(json);
|
|
23
|
+
if (file.version !== 1) {
|
|
24
|
+
throw new Error(`Unsupported file version: ${file.version}`);
|
|
25
|
+
}
|
|
26
|
+
if (!file.project || !file.slices || !file.layers || !file.tasks) {
|
|
27
|
+
throw new Error("Invalid .vertical file: missing required fields");
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
project: file.project,
|
|
31
|
+
slices: file.slices,
|
|
32
|
+
layers: file.layers,
|
|
33
|
+
tasks: file.tasks
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// app/state/initial-state.ts
|
|
38
|
+
function createBlankProject(name) {
|
|
39
|
+
const projectId = crypto.randomUUID();
|
|
40
|
+
const slices = Array.from({ length: 9 }, (_, i) => ({
|
|
41
|
+
id: crypto.randomUUID(),
|
|
42
|
+
projectId,
|
|
43
|
+
boxNumber: i + 1,
|
|
44
|
+
name: null
|
|
45
|
+
}));
|
|
46
|
+
const layers = slices.map((slice) => ({
|
|
47
|
+
id: crypto.randomUUID(),
|
|
48
|
+
sliceId: slice.id,
|
|
49
|
+
name: null,
|
|
50
|
+
sorting: 1,
|
|
51
|
+
status: null
|
|
52
|
+
}));
|
|
53
|
+
return {
|
|
54
|
+
project: { id: projectId, name },
|
|
55
|
+
slices,
|
|
56
|
+
layers,
|
|
57
|
+
tasks: []
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// cli/apply.ts
|
|
62
|
+
import fs from "fs";
|
|
63
|
+
import path from "path";
|
|
64
|
+
|
|
65
|
+
// app/state/reducer.ts
|
|
66
|
+
function boardReducer(state, action) {
|
|
67
|
+
switch (action.type) {
|
|
68
|
+
case "RENAME_PROJECT":
|
|
69
|
+
return {
|
|
70
|
+
...state,
|
|
71
|
+
project: { ...state.project, name: action.name }
|
|
72
|
+
};
|
|
73
|
+
case "CREATE_TASK":
|
|
74
|
+
return {
|
|
75
|
+
...state,
|
|
76
|
+
tasks: [
|
|
77
|
+
...state.tasks,
|
|
78
|
+
{
|
|
79
|
+
id: action.id,
|
|
80
|
+
projectId: state.project.id,
|
|
81
|
+
layerId: action.layerId,
|
|
82
|
+
name: action.name,
|
|
83
|
+
sorting: action.sorting,
|
|
84
|
+
done: false
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
};
|
|
88
|
+
case "CREATE_TASK_AFTER": {
|
|
89
|
+
const afterTask = state.tasks.find((t) => t.id === action.afterTaskId);
|
|
90
|
+
if (!afterTask)
|
|
91
|
+
return state;
|
|
92
|
+
const nextTask = state.tasks.filter(
|
|
93
|
+
(t) => t.layerId === afterTask.layerId && t.sorting > afterTask.sorting
|
|
94
|
+
).sort((a, b) => a.sorting - b.sorting)[0];
|
|
95
|
+
const sorting = nextTask ? (afterTask.sorting + nextTask.sorting) / 2 : afterTask.sorting + 1;
|
|
96
|
+
return {
|
|
97
|
+
...state,
|
|
98
|
+
tasks: [
|
|
99
|
+
...state.tasks,
|
|
100
|
+
{
|
|
101
|
+
id: action.id,
|
|
102
|
+
projectId: state.project.id,
|
|
103
|
+
layerId: afterTask.layerId,
|
|
104
|
+
name: "",
|
|
105
|
+
sorting,
|
|
106
|
+
done: false
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
case "RENAME_TASK":
|
|
112
|
+
return {
|
|
113
|
+
...state,
|
|
114
|
+
tasks: state.tasks.map(
|
|
115
|
+
(t) => t.id === action.taskId ? { ...t, name: action.name } : t
|
|
116
|
+
)
|
|
117
|
+
};
|
|
118
|
+
case "DELETE_TASK":
|
|
119
|
+
return {
|
|
120
|
+
...state,
|
|
121
|
+
tasks: state.tasks.filter((t) => t.id !== action.taskId)
|
|
122
|
+
};
|
|
123
|
+
case "SET_TASK_DONE":
|
|
124
|
+
return {
|
|
125
|
+
...state,
|
|
126
|
+
tasks: state.tasks.map(
|
|
127
|
+
(t) => t.id === action.taskId ? { ...t, done: action.done } : t
|
|
128
|
+
)
|
|
129
|
+
};
|
|
130
|
+
case "MOVE_TASK":
|
|
131
|
+
return {
|
|
132
|
+
...state,
|
|
133
|
+
tasks: state.tasks.map(
|
|
134
|
+
(t) => t.id === action.taskId ? { ...t, layerId: action.layerId, sorting: action.sorting } : t
|
|
135
|
+
)
|
|
136
|
+
};
|
|
137
|
+
case "RENAME_LAYER":
|
|
138
|
+
return {
|
|
139
|
+
...state,
|
|
140
|
+
layers: state.layers.map(
|
|
141
|
+
(l) => l.id === action.layerId ? { ...l, name: action.name } : l
|
|
142
|
+
)
|
|
143
|
+
};
|
|
144
|
+
case "UNNAME_LAYER":
|
|
145
|
+
return {
|
|
146
|
+
...state,
|
|
147
|
+
layers: state.layers.map(
|
|
148
|
+
(l) => l.id === action.layerId ? { ...l, name: null } : l
|
|
149
|
+
)
|
|
150
|
+
};
|
|
151
|
+
case "SET_LAYER_STATUS":
|
|
152
|
+
return {
|
|
153
|
+
...state,
|
|
154
|
+
layers: state.layers.map(
|
|
155
|
+
(l) => l.id === action.layerId ? { ...l, status: action.status } : l
|
|
156
|
+
)
|
|
157
|
+
};
|
|
158
|
+
case "SPLIT_LAYER": {
|
|
159
|
+
const newLayer = {
|
|
160
|
+
id: action.newLayerId,
|
|
161
|
+
sliceId: action.sliceId,
|
|
162
|
+
name: null,
|
|
163
|
+
sorting: action.newLayerSorting,
|
|
164
|
+
status: null
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
...state,
|
|
168
|
+
layers: [...state.layers, newLayer],
|
|
169
|
+
tasks: state.tasks.map(
|
|
170
|
+
(t) => t.layerId === action.currentLayerId && t.sorting > action.taskSorting ? { ...t, layerId: action.newLayerId } : t
|
|
171
|
+
)
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
case "UNSPLIT_LAYER": {
|
|
175
|
+
const currentLayer = state.layers.find((l) => l.id === action.layerId);
|
|
176
|
+
if (!currentLayer)
|
|
177
|
+
return state;
|
|
178
|
+
const nextLayer = state.layers.filter(
|
|
179
|
+
(l) => l.sliceId === currentLayer.sliceId && l.sorting > currentLayer.sorting
|
|
180
|
+
).sort((a, b) => a.sorting - b.sorting)[0];
|
|
181
|
+
if (!nextLayer)
|
|
182
|
+
return state;
|
|
183
|
+
const maxCurrentSorting = Math.max(
|
|
184
|
+
0,
|
|
185
|
+
...state.tasks.filter((t) => t.layerId === currentLayer.id).map((t) => t.sorting)
|
|
186
|
+
);
|
|
187
|
+
const nextTasks = state.tasks.filter((t) => t.layerId === nextLayer.id).sort((a, b) => a.sorting - b.sorting);
|
|
188
|
+
const updatedTasks = state.tasks.map((t) => {
|
|
189
|
+
if (t.layerId !== nextLayer.id)
|
|
190
|
+
return t;
|
|
191
|
+
const index = nextTasks.findIndex((nt) => nt.id === t.id);
|
|
192
|
+
return {
|
|
193
|
+
...t,
|
|
194
|
+
layerId: currentLayer.id,
|
|
195
|
+
sorting: maxCurrentSorting + index + 1
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
return {
|
|
199
|
+
...state,
|
|
200
|
+
layers: state.layers.filter((l) => l.id !== nextLayer.id),
|
|
201
|
+
tasks: updatedTasks
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
case "RENAME_SLICE":
|
|
205
|
+
return {
|
|
206
|
+
...state,
|
|
207
|
+
slices: state.slices.map(
|
|
208
|
+
(s) => s.id === action.sliceId ? { ...s, name: action.name } : s
|
|
209
|
+
)
|
|
210
|
+
};
|
|
211
|
+
case "UNNAME_SLICE":
|
|
212
|
+
return {
|
|
213
|
+
...state,
|
|
214
|
+
slices: state.slices.map(
|
|
215
|
+
(s) => s.id === action.sliceId ? { ...s, name: null } : s
|
|
216
|
+
)
|
|
217
|
+
};
|
|
218
|
+
case "SORT_SLICES": {
|
|
219
|
+
const boxNumberMap = new Map(
|
|
220
|
+
action.slices.map((s) => [s.id, s.boxNumber])
|
|
221
|
+
);
|
|
222
|
+
return {
|
|
223
|
+
...state,
|
|
224
|
+
slices: state.slices.map((s) => ({
|
|
225
|
+
...s,
|
|
226
|
+
boxNumber: boxNumberMap.get(s.id) ?? s.boxNumber
|
|
227
|
+
}))
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
case "LOAD_STATE":
|
|
231
|
+
return action.state;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js
|
|
236
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
237
|
+
var freeGlobal_default = freeGlobal;
|
|
238
|
+
|
|
239
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.js
|
|
240
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
241
|
+
var root = freeGlobal_default || freeSelf || Function("return this")();
|
|
242
|
+
var root_default = root;
|
|
243
|
+
|
|
244
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js
|
|
245
|
+
var Symbol = root_default.Symbol;
|
|
246
|
+
var Symbol_default = Symbol;
|
|
247
|
+
|
|
248
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js
|
|
249
|
+
var objectProto = Object.prototype;
|
|
250
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
251
|
+
var nativeObjectToString = objectProto.toString;
|
|
252
|
+
var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
253
|
+
function getRawTag(value) {
|
|
254
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
255
|
+
try {
|
|
256
|
+
value[symToStringTag] = void 0;
|
|
257
|
+
var unmasked = true;
|
|
258
|
+
} catch (e) {
|
|
259
|
+
}
|
|
260
|
+
var result = nativeObjectToString.call(value);
|
|
261
|
+
if (unmasked) {
|
|
262
|
+
if (isOwn) {
|
|
263
|
+
value[symToStringTag] = tag;
|
|
264
|
+
} else {
|
|
265
|
+
delete value[symToStringTag];
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
var getRawTag_default = getRawTag;
|
|
271
|
+
|
|
272
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js
|
|
273
|
+
var objectProto2 = Object.prototype;
|
|
274
|
+
var nativeObjectToString2 = objectProto2.toString;
|
|
275
|
+
function objectToString(value) {
|
|
276
|
+
return nativeObjectToString2.call(value);
|
|
277
|
+
}
|
|
278
|
+
var objectToString_default = objectToString;
|
|
279
|
+
|
|
280
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js
|
|
281
|
+
var nullTag = "[object Null]";
|
|
282
|
+
var undefinedTag = "[object Undefined]";
|
|
283
|
+
var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
284
|
+
function baseGetTag(value) {
|
|
285
|
+
if (value == null) {
|
|
286
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
287
|
+
}
|
|
288
|
+
return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
|
|
289
|
+
}
|
|
290
|
+
var baseGetTag_default = baseGetTag;
|
|
291
|
+
|
|
292
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js
|
|
293
|
+
function isObjectLike(value) {
|
|
294
|
+
return value != null && typeof value == "object";
|
|
295
|
+
}
|
|
296
|
+
var isObjectLike_default = isObjectLike;
|
|
297
|
+
|
|
298
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js
|
|
299
|
+
var symbolTag = "[object Symbol]";
|
|
300
|
+
function isSymbol(value) {
|
|
301
|
+
return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
|
|
302
|
+
}
|
|
303
|
+
var isSymbol_default = isSymbol;
|
|
304
|
+
|
|
305
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js
|
|
306
|
+
function arrayMap(array, iteratee) {
|
|
307
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
308
|
+
while (++index < length) {
|
|
309
|
+
result[index] = iteratee(array[index], index, array);
|
|
310
|
+
}
|
|
311
|
+
return result;
|
|
312
|
+
}
|
|
313
|
+
var arrayMap_default = arrayMap;
|
|
314
|
+
|
|
315
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.js
|
|
316
|
+
var isArray = Array.isArray;
|
|
317
|
+
var isArray_default = isArray;
|
|
318
|
+
|
|
319
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js
|
|
320
|
+
var INFINITY = 1 / 0;
|
|
321
|
+
var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
|
|
322
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
323
|
+
function baseToString(value) {
|
|
324
|
+
if (typeof value == "string") {
|
|
325
|
+
return value;
|
|
326
|
+
}
|
|
327
|
+
if (isArray_default(value)) {
|
|
328
|
+
return arrayMap_default(value, baseToString) + "";
|
|
329
|
+
}
|
|
330
|
+
if (isSymbol_default(value)) {
|
|
331
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
332
|
+
}
|
|
333
|
+
var result = value + "";
|
|
334
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
335
|
+
}
|
|
336
|
+
var baseToString_default = baseToString;
|
|
337
|
+
|
|
338
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.js
|
|
339
|
+
function isObject(value) {
|
|
340
|
+
var type = typeof value;
|
|
341
|
+
return value != null && (type == "object" || type == "function");
|
|
342
|
+
}
|
|
343
|
+
var isObject_default = isObject;
|
|
344
|
+
|
|
345
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.js
|
|
346
|
+
function identity(value) {
|
|
347
|
+
return value;
|
|
348
|
+
}
|
|
349
|
+
var identity_default = identity;
|
|
350
|
+
|
|
351
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js
|
|
352
|
+
var asyncTag = "[object AsyncFunction]";
|
|
353
|
+
var funcTag = "[object Function]";
|
|
354
|
+
var genTag = "[object GeneratorFunction]";
|
|
355
|
+
var proxyTag = "[object Proxy]";
|
|
356
|
+
function isFunction(value) {
|
|
357
|
+
if (!isObject_default(value)) {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
var tag = baseGetTag_default(value);
|
|
361
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
362
|
+
}
|
|
363
|
+
var isFunction_default = isFunction;
|
|
364
|
+
|
|
365
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js
|
|
366
|
+
var coreJsData = root_default["__core-js_shared__"];
|
|
367
|
+
var coreJsData_default = coreJsData;
|
|
368
|
+
|
|
369
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js
|
|
370
|
+
var maskSrcKey = function() {
|
|
371
|
+
var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
|
|
372
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
373
|
+
}();
|
|
374
|
+
function isMasked(func) {
|
|
375
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
376
|
+
}
|
|
377
|
+
var isMasked_default = isMasked;
|
|
378
|
+
|
|
379
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js
|
|
380
|
+
var funcProto = Function.prototype;
|
|
381
|
+
var funcToString = funcProto.toString;
|
|
382
|
+
function toSource(func) {
|
|
383
|
+
if (func != null) {
|
|
384
|
+
try {
|
|
385
|
+
return funcToString.call(func);
|
|
386
|
+
} catch (e) {
|
|
387
|
+
}
|
|
388
|
+
try {
|
|
389
|
+
return func + "";
|
|
390
|
+
} catch (e) {
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return "";
|
|
394
|
+
}
|
|
395
|
+
var toSource_default = toSource;
|
|
396
|
+
|
|
397
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js
|
|
398
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
399
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
400
|
+
var funcProto2 = Function.prototype;
|
|
401
|
+
var objectProto3 = Object.prototype;
|
|
402
|
+
var funcToString2 = funcProto2.toString;
|
|
403
|
+
var hasOwnProperty2 = objectProto3.hasOwnProperty;
|
|
404
|
+
var reIsNative = RegExp(
|
|
405
|
+
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
406
|
+
);
|
|
407
|
+
function baseIsNative(value) {
|
|
408
|
+
if (!isObject_default(value) || isMasked_default(value)) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
|
|
412
|
+
return pattern.test(toSource_default(value));
|
|
413
|
+
}
|
|
414
|
+
var baseIsNative_default = baseIsNative;
|
|
415
|
+
|
|
416
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js
|
|
417
|
+
function getValue(object, key) {
|
|
418
|
+
return object == null ? void 0 : object[key];
|
|
419
|
+
}
|
|
420
|
+
var getValue_default = getValue;
|
|
421
|
+
|
|
422
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js
|
|
423
|
+
function getNative(object, key) {
|
|
424
|
+
var value = getValue_default(object, key);
|
|
425
|
+
return baseIsNative_default(value) ? value : void 0;
|
|
426
|
+
}
|
|
427
|
+
var getNative_default = getNative;
|
|
428
|
+
|
|
429
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js
|
|
430
|
+
var WeakMap = getNative_default(root_default, "WeakMap");
|
|
431
|
+
var WeakMap_default = WeakMap;
|
|
432
|
+
|
|
433
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.js
|
|
434
|
+
function apply(func, thisArg, args) {
|
|
435
|
+
switch (args.length) {
|
|
436
|
+
case 0:
|
|
437
|
+
return func.call(thisArg);
|
|
438
|
+
case 1:
|
|
439
|
+
return func.call(thisArg, args[0]);
|
|
440
|
+
case 2:
|
|
441
|
+
return func.call(thisArg, args[0], args[1]);
|
|
442
|
+
case 3:
|
|
443
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
444
|
+
}
|
|
445
|
+
return func.apply(thisArg, args);
|
|
446
|
+
}
|
|
447
|
+
var apply_default = apply;
|
|
448
|
+
|
|
449
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js
|
|
450
|
+
var HOT_COUNT = 800;
|
|
451
|
+
var HOT_SPAN = 16;
|
|
452
|
+
var nativeNow = Date.now;
|
|
453
|
+
function shortOut(func) {
|
|
454
|
+
var count = 0, lastCalled = 0;
|
|
455
|
+
return function() {
|
|
456
|
+
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
457
|
+
lastCalled = stamp;
|
|
458
|
+
if (remaining > 0) {
|
|
459
|
+
if (++count >= HOT_COUNT) {
|
|
460
|
+
return arguments[0];
|
|
461
|
+
}
|
|
462
|
+
} else {
|
|
463
|
+
count = 0;
|
|
464
|
+
}
|
|
465
|
+
return func.apply(void 0, arguments);
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
var shortOut_default = shortOut;
|
|
469
|
+
|
|
470
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.js
|
|
471
|
+
function constant(value) {
|
|
472
|
+
return function() {
|
|
473
|
+
return value;
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
var constant_default = constant;
|
|
477
|
+
|
|
478
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js
|
|
479
|
+
var defineProperty = function() {
|
|
480
|
+
try {
|
|
481
|
+
var func = getNative_default(Object, "defineProperty");
|
|
482
|
+
func({}, "", {});
|
|
483
|
+
return func;
|
|
484
|
+
} catch (e) {
|
|
485
|
+
}
|
|
486
|
+
}();
|
|
487
|
+
var defineProperty_default = defineProperty;
|
|
488
|
+
|
|
489
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js
|
|
490
|
+
var baseSetToString = !defineProperty_default ? identity_default : function(func, string) {
|
|
491
|
+
return defineProperty_default(func, "toString", {
|
|
492
|
+
"configurable": true,
|
|
493
|
+
"enumerable": false,
|
|
494
|
+
"value": constant_default(string),
|
|
495
|
+
"writable": true
|
|
496
|
+
});
|
|
497
|
+
};
|
|
498
|
+
var baseSetToString_default = baseSetToString;
|
|
499
|
+
|
|
500
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js
|
|
501
|
+
var setToString = shortOut_default(baseSetToString_default);
|
|
502
|
+
var setToString_default = setToString;
|
|
503
|
+
|
|
504
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js
|
|
505
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
506
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
507
|
+
function isIndex(value, length) {
|
|
508
|
+
var type = typeof value;
|
|
509
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
510
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
511
|
+
}
|
|
512
|
+
var isIndex_default = isIndex;
|
|
513
|
+
|
|
514
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.js
|
|
515
|
+
function eq(value, other) {
|
|
516
|
+
return value === other || value !== value && other !== other;
|
|
517
|
+
}
|
|
518
|
+
var eq_default = eq;
|
|
519
|
+
|
|
520
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js
|
|
521
|
+
var nativeMax = Math.max;
|
|
522
|
+
function overRest(func, start, transform) {
|
|
523
|
+
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
524
|
+
return function() {
|
|
525
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
526
|
+
while (++index < length) {
|
|
527
|
+
array[index] = args[start + index];
|
|
528
|
+
}
|
|
529
|
+
index = -1;
|
|
530
|
+
var otherArgs = Array(start + 1);
|
|
531
|
+
while (++index < start) {
|
|
532
|
+
otherArgs[index] = args[index];
|
|
533
|
+
}
|
|
534
|
+
otherArgs[start] = transform(array);
|
|
535
|
+
return apply_default(func, this, otherArgs);
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
var overRest_default = overRest;
|
|
539
|
+
|
|
540
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js
|
|
541
|
+
function baseRest(func, start) {
|
|
542
|
+
return setToString_default(overRest_default(func, start, identity_default), func + "");
|
|
543
|
+
}
|
|
544
|
+
var baseRest_default = baseRest;
|
|
545
|
+
|
|
546
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.js
|
|
547
|
+
var MAX_SAFE_INTEGER2 = 9007199254740991;
|
|
548
|
+
function isLength(value) {
|
|
549
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
|
|
550
|
+
}
|
|
551
|
+
var isLength_default = isLength;
|
|
552
|
+
|
|
553
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js
|
|
554
|
+
function isArrayLike(value) {
|
|
555
|
+
return value != null && isLength_default(value.length) && !isFunction_default(value);
|
|
556
|
+
}
|
|
557
|
+
var isArrayLike_default = isArrayLike;
|
|
558
|
+
|
|
559
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js
|
|
560
|
+
function isIterateeCall(value, index, object) {
|
|
561
|
+
if (!isObject_default(object)) {
|
|
562
|
+
return false;
|
|
563
|
+
}
|
|
564
|
+
var type = typeof index;
|
|
565
|
+
if (type == "number" ? isArrayLike_default(object) && isIndex_default(index, object.length) : type == "string" && index in object) {
|
|
566
|
+
return eq_default(object[index], value);
|
|
567
|
+
}
|
|
568
|
+
return false;
|
|
569
|
+
}
|
|
570
|
+
var isIterateeCall_default = isIterateeCall;
|
|
571
|
+
|
|
572
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js
|
|
573
|
+
var objectProto4 = Object.prototype;
|
|
574
|
+
function isPrototype(value) {
|
|
575
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto4;
|
|
576
|
+
return value === proto;
|
|
577
|
+
}
|
|
578
|
+
var isPrototype_default = isPrototype;
|
|
579
|
+
|
|
580
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js
|
|
581
|
+
function baseTimes(n, iteratee) {
|
|
582
|
+
var index = -1, result = Array(n);
|
|
583
|
+
while (++index < n) {
|
|
584
|
+
result[index] = iteratee(index);
|
|
585
|
+
}
|
|
586
|
+
return result;
|
|
587
|
+
}
|
|
588
|
+
var baseTimes_default = baseTimes;
|
|
589
|
+
|
|
590
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js
|
|
591
|
+
var argsTag = "[object Arguments]";
|
|
592
|
+
function baseIsArguments(value) {
|
|
593
|
+
return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
|
|
594
|
+
}
|
|
595
|
+
var baseIsArguments_default = baseIsArguments;
|
|
596
|
+
|
|
597
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js
|
|
598
|
+
var objectProto5 = Object.prototype;
|
|
599
|
+
var hasOwnProperty3 = objectProto5.hasOwnProperty;
|
|
600
|
+
var propertyIsEnumerable = objectProto5.propertyIsEnumerable;
|
|
601
|
+
var isArguments = baseIsArguments_default(function() {
|
|
602
|
+
return arguments;
|
|
603
|
+
}()) ? baseIsArguments_default : function(value) {
|
|
604
|
+
return isObjectLike_default(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
605
|
+
};
|
|
606
|
+
var isArguments_default = isArguments;
|
|
607
|
+
|
|
608
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js
|
|
609
|
+
function stubFalse() {
|
|
610
|
+
return false;
|
|
611
|
+
}
|
|
612
|
+
var stubFalse_default = stubFalse;
|
|
613
|
+
|
|
614
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js
|
|
615
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
616
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
617
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
618
|
+
var Buffer2 = moduleExports ? root_default.Buffer : void 0;
|
|
619
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
620
|
+
var isBuffer = nativeIsBuffer || stubFalse_default;
|
|
621
|
+
var isBuffer_default = isBuffer;
|
|
622
|
+
|
|
623
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js
|
|
624
|
+
var argsTag2 = "[object Arguments]";
|
|
625
|
+
var arrayTag = "[object Array]";
|
|
626
|
+
var boolTag = "[object Boolean]";
|
|
627
|
+
var dateTag = "[object Date]";
|
|
628
|
+
var errorTag = "[object Error]";
|
|
629
|
+
var funcTag2 = "[object Function]";
|
|
630
|
+
var mapTag = "[object Map]";
|
|
631
|
+
var numberTag = "[object Number]";
|
|
632
|
+
var objectTag = "[object Object]";
|
|
633
|
+
var regexpTag = "[object RegExp]";
|
|
634
|
+
var setTag = "[object Set]";
|
|
635
|
+
var stringTag = "[object String]";
|
|
636
|
+
var weakMapTag = "[object WeakMap]";
|
|
637
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
638
|
+
var dataViewTag = "[object DataView]";
|
|
639
|
+
var float32Tag = "[object Float32Array]";
|
|
640
|
+
var float64Tag = "[object Float64Array]";
|
|
641
|
+
var int8Tag = "[object Int8Array]";
|
|
642
|
+
var int16Tag = "[object Int16Array]";
|
|
643
|
+
var int32Tag = "[object Int32Array]";
|
|
644
|
+
var uint8Tag = "[object Uint8Array]";
|
|
645
|
+
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
646
|
+
var uint16Tag = "[object Uint16Array]";
|
|
647
|
+
var uint32Tag = "[object Uint32Array]";
|
|
648
|
+
var typedArrayTags = {};
|
|
649
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
650
|
+
typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
651
|
+
function baseIsTypedArray(value) {
|
|
652
|
+
return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
|
|
653
|
+
}
|
|
654
|
+
var baseIsTypedArray_default = baseIsTypedArray;
|
|
655
|
+
|
|
656
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js
|
|
657
|
+
function baseUnary(func) {
|
|
658
|
+
return function(value) {
|
|
659
|
+
return func(value);
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
var baseUnary_default = baseUnary;
|
|
663
|
+
|
|
664
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js
|
|
665
|
+
var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
666
|
+
var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
|
|
667
|
+
var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
|
|
668
|
+
var freeProcess = moduleExports2 && freeGlobal_default.process;
|
|
669
|
+
var nodeUtil = function() {
|
|
670
|
+
try {
|
|
671
|
+
var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
|
|
672
|
+
if (types) {
|
|
673
|
+
return types;
|
|
674
|
+
}
|
|
675
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
676
|
+
} catch (e) {
|
|
677
|
+
}
|
|
678
|
+
}();
|
|
679
|
+
var nodeUtil_default = nodeUtil;
|
|
680
|
+
|
|
681
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js
|
|
682
|
+
var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
|
|
683
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
|
|
684
|
+
var isTypedArray_default = isTypedArray;
|
|
685
|
+
|
|
686
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js
|
|
687
|
+
var objectProto6 = Object.prototype;
|
|
688
|
+
var hasOwnProperty4 = objectProto6.hasOwnProperty;
|
|
689
|
+
function arrayLikeKeys(value, inherited) {
|
|
690
|
+
var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length = result.length;
|
|
691
|
+
for (var key in value) {
|
|
692
|
+
if ((inherited || hasOwnProperty4.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
693
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
694
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
695
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
696
|
+
isIndex_default(key, length)))) {
|
|
697
|
+
result.push(key);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return result;
|
|
701
|
+
}
|
|
702
|
+
var arrayLikeKeys_default = arrayLikeKeys;
|
|
703
|
+
|
|
704
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js
|
|
705
|
+
function overArg(func, transform) {
|
|
706
|
+
return function(arg) {
|
|
707
|
+
return func(transform(arg));
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
var overArg_default = overArg;
|
|
711
|
+
|
|
712
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js
|
|
713
|
+
var nativeKeys = overArg_default(Object.keys, Object);
|
|
714
|
+
var nativeKeys_default = nativeKeys;
|
|
715
|
+
|
|
716
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js
|
|
717
|
+
var objectProto7 = Object.prototype;
|
|
718
|
+
var hasOwnProperty5 = objectProto7.hasOwnProperty;
|
|
719
|
+
function baseKeys(object) {
|
|
720
|
+
if (!isPrototype_default(object)) {
|
|
721
|
+
return nativeKeys_default(object);
|
|
722
|
+
}
|
|
723
|
+
var result = [];
|
|
724
|
+
for (var key in Object(object)) {
|
|
725
|
+
if (hasOwnProperty5.call(object, key) && key != "constructor") {
|
|
726
|
+
result.push(key);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
return result;
|
|
730
|
+
}
|
|
731
|
+
var baseKeys_default = baseKeys;
|
|
732
|
+
|
|
733
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keys.js
|
|
734
|
+
function keys(object) {
|
|
735
|
+
return isArrayLike_default(object) ? arrayLikeKeys_default(object) : baseKeys_default(object);
|
|
736
|
+
}
|
|
737
|
+
var keys_default = keys;
|
|
738
|
+
|
|
739
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js
|
|
740
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
741
|
+
var reIsPlainProp = /^\w*$/;
|
|
742
|
+
function isKey(value, object) {
|
|
743
|
+
if (isArray_default(value)) {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
var type = typeof value;
|
|
747
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) {
|
|
748
|
+
return true;
|
|
749
|
+
}
|
|
750
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
751
|
+
}
|
|
752
|
+
var isKey_default = isKey;
|
|
753
|
+
|
|
754
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js
|
|
755
|
+
var nativeCreate = getNative_default(Object, "create");
|
|
756
|
+
var nativeCreate_default = nativeCreate;
|
|
757
|
+
|
|
758
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js
|
|
759
|
+
function hashClear() {
|
|
760
|
+
this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
|
|
761
|
+
this.size = 0;
|
|
762
|
+
}
|
|
763
|
+
var hashClear_default = hashClear;
|
|
764
|
+
|
|
765
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js
|
|
766
|
+
function hashDelete(key) {
|
|
767
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
768
|
+
this.size -= result ? 1 : 0;
|
|
769
|
+
return result;
|
|
770
|
+
}
|
|
771
|
+
var hashDelete_default = hashDelete;
|
|
772
|
+
|
|
773
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js
|
|
774
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
775
|
+
var objectProto8 = Object.prototype;
|
|
776
|
+
var hasOwnProperty6 = objectProto8.hasOwnProperty;
|
|
777
|
+
function hashGet(key) {
|
|
778
|
+
var data = this.__data__;
|
|
779
|
+
if (nativeCreate_default) {
|
|
780
|
+
var result = data[key];
|
|
781
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
782
|
+
}
|
|
783
|
+
return hasOwnProperty6.call(data, key) ? data[key] : void 0;
|
|
784
|
+
}
|
|
785
|
+
var hashGet_default = hashGet;
|
|
786
|
+
|
|
787
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js
|
|
788
|
+
var objectProto9 = Object.prototype;
|
|
789
|
+
var hasOwnProperty7 = objectProto9.hasOwnProperty;
|
|
790
|
+
function hashHas(key) {
|
|
791
|
+
var data = this.__data__;
|
|
792
|
+
return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty7.call(data, key);
|
|
793
|
+
}
|
|
794
|
+
var hashHas_default = hashHas;
|
|
795
|
+
|
|
796
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js
|
|
797
|
+
var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
|
|
798
|
+
function hashSet(key, value) {
|
|
799
|
+
var data = this.__data__;
|
|
800
|
+
this.size += this.has(key) ? 0 : 1;
|
|
801
|
+
data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
|
|
802
|
+
return this;
|
|
803
|
+
}
|
|
804
|
+
var hashSet_default = hashSet;
|
|
805
|
+
|
|
806
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js
|
|
807
|
+
function Hash(entries) {
|
|
808
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
809
|
+
this.clear();
|
|
810
|
+
while (++index < length) {
|
|
811
|
+
var entry = entries[index];
|
|
812
|
+
this.set(entry[0], entry[1]);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
Hash.prototype.clear = hashClear_default;
|
|
816
|
+
Hash.prototype["delete"] = hashDelete_default;
|
|
817
|
+
Hash.prototype.get = hashGet_default;
|
|
818
|
+
Hash.prototype.has = hashHas_default;
|
|
819
|
+
Hash.prototype.set = hashSet_default;
|
|
820
|
+
var Hash_default = Hash;
|
|
821
|
+
|
|
822
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js
|
|
823
|
+
function listCacheClear() {
|
|
824
|
+
this.__data__ = [];
|
|
825
|
+
this.size = 0;
|
|
826
|
+
}
|
|
827
|
+
var listCacheClear_default = listCacheClear;
|
|
828
|
+
|
|
829
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js
|
|
830
|
+
function assocIndexOf(array, key) {
|
|
831
|
+
var length = array.length;
|
|
832
|
+
while (length--) {
|
|
833
|
+
if (eq_default(array[length][0], key)) {
|
|
834
|
+
return length;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
return -1;
|
|
838
|
+
}
|
|
839
|
+
var assocIndexOf_default = assocIndexOf;
|
|
840
|
+
|
|
841
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js
|
|
842
|
+
var arrayProto = Array.prototype;
|
|
843
|
+
var splice = arrayProto.splice;
|
|
844
|
+
function listCacheDelete(key) {
|
|
845
|
+
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
846
|
+
if (index < 0) {
|
|
847
|
+
return false;
|
|
848
|
+
}
|
|
849
|
+
var lastIndex = data.length - 1;
|
|
850
|
+
if (index == lastIndex) {
|
|
851
|
+
data.pop();
|
|
852
|
+
} else {
|
|
853
|
+
splice.call(data, index, 1);
|
|
854
|
+
}
|
|
855
|
+
--this.size;
|
|
856
|
+
return true;
|
|
857
|
+
}
|
|
858
|
+
var listCacheDelete_default = listCacheDelete;
|
|
859
|
+
|
|
860
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js
|
|
861
|
+
function listCacheGet(key) {
|
|
862
|
+
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
863
|
+
return index < 0 ? void 0 : data[index][1];
|
|
864
|
+
}
|
|
865
|
+
var listCacheGet_default = listCacheGet;
|
|
866
|
+
|
|
867
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js
|
|
868
|
+
function listCacheHas(key) {
|
|
869
|
+
return assocIndexOf_default(this.__data__, key) > -1;
|
|
870
|
+
}
|
|
871
|
+
var listCacheHas_default = listCacheHas;
|
|
872
|
+
|
|
873
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js
|
|
874
|
+
function listCacheSet(key, value) {
|
|
875
|
+
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
876
|
+
if (index < 0) {
|
|
877
|
+
++this.size;
|
|
878
|
+
data.push([key, value]);
|
|
879
|
+
} else {
|
|
880
|
+
data[index][1] = value;
|
|
881
|
+
}
|
|
882
|
+
return this;
|
|
883
|
+
}
|
|
884
|
+
var listCacheSet_default = listCacheSet;
|
|
885
|
+
|
|
886
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js
|
|
887
|
+
function ListCache(entries) {
|
|
888
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
889
|
+
this.clear();
|
|
890
|
+
while (++index < length) {
|
|
891
|
+
var entry = entries[index];
|
|
892
|
+
this.set(entry[0], entry[1]);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
ListCache.prototype.clear = listCacheClear_default;
|
|
896
|
+
ListCache.prototype["delete"] = listCacheDelete_default;
|
|
897
|
+
ListCache.prototype.get = listCacheGet_default;
|
|
898
|
+
ListCache.prototype.has = listCacheHas_default;
|
|
899
|
+
ListCache.prototype.set = listCacheSet_default;
|
|
900
|
+
var ListCache_default = ListCache;
|
|
901
|
+
|
|
902
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.js
|
|
903
|
+
var Map2 = getNative_default(root_default, "Map");
|
|
904
|
+
var Map_default = Map2;
|
|
905
|
+
|
|
906
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js
|
|
907
|
+
function mapCacheClear() {
|
|
908
|
+
this.size = 0;
|
|
909
|
+
this.__data__ = {
|
|
910
|
+
"hash": new Hash_default(),
|
|
911
|
+
"map": new (Map_default || ListCache_default)(),
|
|
912
|
+
"string": new Hash_default()
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
var mapCacheClear_default = mapCacheClear;
|
|
916
|
+
|
|
917
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js
|
|
918
|
+
function isKeyable(value) {
|
|
919
|
+
var type = typeof value;
|
|
920
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
921
|
+
}
|
|
922
|
+
var isKeyable_default = isKeyable;
|
|
923
|
+
|
|
924
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js
|
|
925
|
+
function getMapData(map, key) {
|
|
926
|
+
var data = map.__data__;
|
|
927
|
+
return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
928
|
+
}
|
|
929
|
+
var getMapData_default = getMapData;
|
|
930
|
+
|
|
931
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js
|
|
932
|
+
function mapCacheDelete(key) {
|
|
933
|
+
var result = getMapData_default(this, key)["delete"](key);
|
|
934
|
+
this.size -= result ? 1 : 0;
|
|
935
|
+
return result;
|
|
936
|
+
}
|
|
937
|
+
var mapCacheDelete_default = mapCacheDelete;
|
|
938
|
+
|
|
939
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js
|
|
940
|
+
function mapCacheGet(key) {
|
|
941
|
+
return getMapData_default(this, key).get(key);
|
|
942
|
+
}
|
|
943
|
+
var mapCacheGet_default = mapCacheGet;
|
|
944
|
+
|
|
945
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js
|
|
946
|
+
function mapCacheHas(key) {
|
|
947
|
+
return getMapData_default(this, key).has(key);
|
|
948
|
+
}
|
|
949
|
+
var mapCacheHas_default = mapCacheHas;
|
|
950
|
+
|
|
951
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js
|
|
952
|
+
function mapCacheSet(key, value) {
|
|
953
|
+
var data = getMapData_default(this, key), size = data.size;
|
|
954
|
+
data.set(key, value);
|
|
955
|
+
this.size += data.size == size ? 0 : 1;
|
|
956
|
+
return this;
|
|
957
|
+
}
|
|
958
|
+
var mapCacheSet_default = mapCacheSet;
|
|
959
|
+
|
|
960
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js
|
|
961
|
+
function MapCache(entries) {
|
|
962
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
963
|
+
this.clear();
|
|
964
|
+
while (++index < length) {
|
|
965
|
+
var entry = entries[index];
|
|
966
|
+
this.set(entry[0], entry[1]);
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
MapCache.prototype.clear = mapCacheClear_default;
|
|
970
|
+
MapCache.prototype["delete"] = mapCacheDelete_default;
|
|
971
|
+
MapCache.prototype.get = mapCacheGet_default;
|
|
972
|
+
MapCache.prototype.has = mapCacheHas_default;
|
|
973
|
+
MapCache.prototype.set = mapCacheSet_default;
|
|
974
|
+
var MapCache_default = MapCache;
|
|
975
|
+
|
|
976
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.js
|
|
977
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
978
|
+
function memoize(func, resolver) {
|
|
979
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
980
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
981
|
+
}
|
|
982
|
+
var memoized = function() {
|
|
983
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
984
|
+
if (cache.has(key)) {
|
|
985
|
+
return cache.get(key);
|
|
986
|
+
}
|
|
987
|
+
var result = func.apply(this, args);
|
|
988
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
989
|
+
return result;
|
|
990
|
+
};
|
|
991
|
+
memoized.cache = new (memoize.Cache || MapCache_default)();
|
|
992
|
+
return memoized;
|
|
993
|
+
}
|
|
994
|
+
memoize.Cache = MapCache_default;
|
|
995
|
+
var memoize_default = memoize;
|
|
996
|
+
|
|
997
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js
|
|
998
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
999
|
+
function memoizeCapped(func) {
|
|
1000
|
+
var result = memoize_default(func, function(key) {
|
|
1001
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1002
|
+
cache.clear();
|
|
1003
|
+
}
|
|
1004
|
+
return key;
|
|
1005
|
+
});
|
|
1006
|
+
var cache = result.cache;
|
|
1007
|
+
return result;
|
|
1008
|
+
}
|
|
1009
|
+
var memoizeCapped_default = memoizeCapped;
|
|
1010
|
+
|
|
1011
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js
|
|
1012
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1013
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
1014
|
+
var stringToPath = memoizeCapped_default(function(string) {
|
|
1015
|
+
var result = [];
|
|
1016
|
+
if (string.charCodeAt(0) === 46) {
|
|
1017
|
+
result.push("");
|
|
1018
|
+
}
|
|
1019
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1020
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
1021
|
+
});
|
|
1022
|
+
return result;
|
|
1023
|
+
});
|
|
1024
|
+
var stringToPath_default = stringToPath;
|
|
1025
|
+
|
|
1026
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.js
|
|
1027
|
+
function toString(value) {
|
|
1028
|
+
return value == null ? "" : baseToString_default(value);
|
|
1029
|
+
}
|
|
1030
|
+
var toString_default = toString;
|
|
1031
|
+
|
|
1032
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js
|
|
1033
|
+
function castPath(value, object) {
|
|
1034
|
+
if (isArray_default(value)) {
|
|
1035
|
+
return value;
|
|
1036
|
+
}
|
|
1037
|
+
return isKey_default(value, object) ? [value] : stringToPath_default(toString_default(value));
|
|
1038
|
+
}
|
|
1039
|
+
var castPath_default = castPath;
|
|
1040
|
+
|
|
1041
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js
|
|
1042
|
+
var INFINITY2 = 1 / 0;
|
|
1043
|
+
function toKey(value) {
|
|
1044
|
+
if (typeof value == "string" || isSymbol_default(value)) {
|
|
1045
|
+
return value;
|
|
1046
|
+
}
|
|
1047
|
+
var result = value + "";
|
|
1048
|
+
return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
|
|
1049
|
+
}
|
|
1050
|
+
var toKey_default = toKey;
|
|
1051
|
+
|
|
1052
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js
|
|
1053
|
+
function baseGet(object, path4) {
|
|
1054
|
+
path4 = castPath_default(path4, object);
|
|
1055
|
+
var index = 0, length = path4.length;
|
|
1056
|
+
while (object != null && index < length) {
|
|
1057
|
+
object = object[toKey_default(path4[index++])];
|
|
1058
|
+
}
|
|
1059
|
+
return index && index == length ? object : void 0;
|
|
1060
|
+
}
|
|
1061
|
+
var baseGet_default = baseGet;
|
|
1062
|
+
|
|
1063
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/get.js
|
|
1064
|
+
function get(object, path4, defaultValue) {
|
|
1065
|
+
var result = object == null ? void 0 : baseGet_default(object, path4);
|
|
1066
|
+
return result === void 0 ? defaultValue : result;
|
|
1067
|
+
}
|
|
1068
|
+
var get_default = get;
|
|
1069
|
+
|
|
1070
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js
|
|
1071
|
+
function arrayPush(array, values) {
|
|
1072
|
+
var index = -1, length = values.length, offset = array.length;
|
|
1073
|
+
while (++index < length) {
|
|
1074
|
+
array[offset + index] = values[index];
|
|
1075
|
+
}
|
|
1076
|
+
return array;
|
|
1077
|
+
}
|
|
1078
|
+
var arrayPush_default = arrayPush;
|
|
1079
|
+
|
|
1080
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.js
|
|
1081
|
+
var spreadableSymbol = Symbol_default ? Symbol_default.isConcatSpreadable : void 0;
|
|
1082
|
+
function isFlattenable(value) {
|
|
1083
|
+
return isArray_default(value) || isArguments_default(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
1084
|
+
}
|
|
1085
|
+
var isFlattenable_default = isFlattenable;
|
|
1086
|
+
|
|
1087
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js
|
|
1088
|
+
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
1089
|
+
var index = -1, length = array.length;
|
|
1090
|
+
predicate || (predicate = isFlattenable_default);
|
|
1091
|
+
result || (result = []);
|
|
1092
|
+
while (++index < length) {
|
|
1093
|
+
var value = array[index];
|
|
1094
|
+
if (depth > 0 && predicate(value)) {
|
|
1095
|
+
if (depth > 1) {
|
|
1096
|
+
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
1097
|
+
} else {
|
|
1098
|
+
arrayPush_default(result, value);
|
|
1099
|
+
}
|
|
1100
|
+
} else if (!isStrict) {
|
|
1101
|
+
result[result.length] = value;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
return result;
|
|
1105
|
+
}
|
|
1106
|
+
var baseFlatten_default = baseFlatten;
|
|
1107
|
+
|
|
1108
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js
|
|
1109
|
+
function stackClear() {
|
|
1110
|
+
this.__data__ = new ListCache_default();
|
|
1111
|
+
this.size = 0;
|
|
1112
|
+
}
|
|
1113
|
+
var stackClear_default = stackClear;
|
|
1114
|
+
|
|
1115
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js
|
|
1116
|
+
function stackDelete(key) {
|
|
1117
|
+
var data = this.__data__, result = data["delete"](key);
|
|
1118
|
+
this.size = data.size;
|
|
1119
|
+
return result;
|
|
1120
|
+
}
|
|
1121
|
+
var stackDelete_default = stackDelete;
|
|
1122
|
+
|
|
1123
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js
|
|
1124
|
+
function stackGet(key) {
|
|
1125
|
+
return this.__data__.get(key);
|
|
1126
|
+
}
|
|
1127
|
+
var stackGet_default = stackGet;
|
|
1128
|
+
|
|
1129
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js
|
|
1130
|
+
function stackHas(key) {
|
|
1131
|
+
return this.__data__.has(key);
|
|
1132
|
+
}
|
|
1133
|
+
var stackHas_default = stackHas;
|
|
1134
|
+
|
|
1135
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js
|
|
1136
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
1137
|
+
function stackSet(key, value) {
|
|
1138
|
+
var data = this.__data__;
|
|
1139
|
+
if (data instanceof ListCache_default) {
|
|
1140
|
+
var pairs = data.__data__;
|
|
1141
|
+
if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
1142
|
+
pairs.push([key, value]);
|
|
1143
|
+
this.size = ++data.size;
|
|
1144
|
+
return this;
|
|
1145
|
+
}
|
|
1146
|
+
data = this.__data__ = new MapCache_default(pairs);
|
|
1147
|
+
}
|
|
1148
|
+
data.set(key, value);
|
|
1149
|
+
this.size = data.size;
|
|
1150
|
+
return this;
|
|
1151
|
+
}
|
|
1152
|
+
var stackSet_default = stackSet;
|
|
1153
|
+
|
|
1154
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js
|
|
1155
|
+
function Stack(entries) {
|
|
1156
|
+
var data = this.__data__ = new ListCache_default(entries);
|
|
1157
|
+
this.size = data.size;
|
|
1158
|
+
}
|
|
1159
|
+
Stack.prototype.clear = stackClear_default;
|
|
1160
|
+
Stack.prototype["delete"] = stackDelete_default;
|
|
1161
|
+
Stack.prototype.get = stackGet_default;
|
|
1162
|
+
Stack.prototype.has = stackHas_default;
|
|
1163
|
+
Stack.prototype.set = stackSet_default;
|
|
1164
|
+
var Stack_default = Stack;
|
|
1165
|
+
|
|
1166
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js
|
|
1167
|
+
function arrayFilter(array, predicate) {
|
|
1168
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
1169
|
+
while (++index < length) {
|
|
1170
|
+
var value = array[index];
|
|
1171
|
+
if (predicate(value, index, array)) {
|
|
1172
|
+
result[resIndex++] = value;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
return result;
|
|
1176
|
+
}
|
|
1177
|
+
var arrayFilter_default = arrayFilter;
|
|
1178
|
+
|
|
1179
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js
|
|
1180
|
+
function stubArray() {
|
|
1181
|
+
return [];
|
|
1182
|
+
}
|
|
1183
|
+
var stubArray_default = stubArray;
|
|
1184
|
+
|
|
1185
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js
|
|
1186
|
+
var objectProto10 = Object.prototype;
|
|
1187
|
+
var propertyIsEnumerable2 = objectProto10.propertyIsEnumerable;
|
|
1188
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1189
|
+
var getSymbols = !nativeGetSymbols ? stubArray_default : function(object) {
|
|
1190
|
+
if (object == null) {
|
|
1191
|
+
return [];
|
|
1192
|
+
}
|
|
1193
|
+
object = Object(object);
|
|
1194
|
+
return arrayFilter_default(nativeGetSymbols(object), function(symbol) {
|
|
1195
|
+
return propertyIsEnumerable2.call(object, symbol);
|
|
1196
|
+
});
|
|
1197
|
+
};
|
|
1198
|
+
var getSymbols_default = getSymbols;
|
|
1199
|
+
|
|
1200
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js
|
|
1201
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1202
|
+
var result = keysFunc(object);
|
|
1203
|
+
return isArray_default(object) ? result : arrayPush_default(result, symbolsFunc(object));
|
|
1204
|
+
}
|
|
1205
|
+
var baseGetAllKeys_default = baseGetAllKeys;
|
|
1206
|
+
|
|
1207
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js
|
|
1208
|
+
function getAllKeys(object) {
|
|
1209
|
+
return baseGetAllKeys_default(object, keys_default, getSymbols_default);
|
|
1210
|
+
}
|
|
1211
|
+
var getAllKeys_default = getAllKeys;
|
|
1212
|
+
|
|
1213
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js
|
|
1214
|
+
var DataView = getNative_default(root_default, "DataView");
|
|
1215
|
+
var DataView_default = DataView;
|
|
1216
|
+
|
|
1217
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js
|
|
1218
|
+
var Promise2 = getNative_default(root_default, "Promise");
|
|
1219
|
+
var Promise_default = Promise2;
|
|
1220
|
+
|
|
1221
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.js
|
|
1222
|
+
var Set = getNative_default(root_default, "Set");
|
|
1223
|
+
var Set_default = Set;
|
|
1224
|
+
|
|
1225
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js
|
|
1226
|
+
var mapTag2 = "[object Map]";
|
|
1227
|
+
var objectTag2 = "[object Object]";
|
|
1228
|
+
var promiseTag = "[object Promise]";
|
|
1229
|
+
var setTag2 = "[object Set]";
|
|
1230
|
+
var weakMapTag2 = "[object WeakMap]";
|
|
1231
|
+
var dataViewTag2 = "[object DataView]";
|
|
1232
|
+
var dataViewCtorString = toSource_default(DataView_default);
|
|
1233
|
+
var mapCtorString = toSource_default(Map_default);
|
|
1234
|
+
var promiseCtorString = toSource_default(Promise_default);
|
|
1235
|
+
var setCtorString = toSource_default(Set_default);
|
|
1236
|
+
var weakMapCtorString = toSource_default(WeakMap_default);
|
|
1237
|
+
var getTag = baseGetTag_default;
|
|
1238
|
+
if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) {
|
|
1239
|
+
getTag = function(value) {
|
|
1240
|
+
var result = baseGetTag_default(value), Ctor = result == objectTag2 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
|
|
1241
|
+
if (ctorString) {
|
|
1242
|
+
switch (ctorString) {
|
|
1243
|
+
case dataViewCtorString:
|
|
1244
|
+
return dataViewTag2;
|
|
1245
|
+
case mapCtorString:
|
|
1246
|
+
return mapTag2;
|
|
1247
|
+
case promiseCtorString:
|
|
1248
|
+
return promiseTag;
|
|
1249
|
+
case setCtorString:
|
|
1250
|
+
return setTag2;
|
|
1251
|
+
case weakMapCtorString:
|
|
1252
|
+
return weakMapTag2;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
return result;
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
var getTag_default = getTag;
|
|
1259
|
+
|
|
1260
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js
|
|
1261
|
+
var Uint8Array = root_default.Uint8Array;
|
|
1262
|
+
var Uint8Array_default = Uint8Array;
|
|
1263
|
+
|
|
1264
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js
|
|
1265
|
+
var HASH_UNDEFINED3 = "__lodash_hash_undefined__";
|
|
1266
|
+
function setCacheAdd(value) {
|
|
1267
|
+
this.__data__.set(value, HASH_UNDEFINED3);
|
|
1268
|
+
return this;
|
|
1269
|
+
}
|
|
1270
|
+
var setCacheAdd_default = setCacheAdd;
|
|
1271
|
+
|
|
1272
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js
|
|
1273
|
+
function setCacheHas(value) {
|
|
1274
|
+
return this.__data__.has(value);
|
|
1275
|
+
}
|
|
1276
|
+
var setCacheHas_default = setCacheHas;
|
|
1277
|
+
|
|
1278
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js
|
|
1279
|
+
function SetCache(values) {
|
|
1280
|
+
var index = -1, length = values == null ? 0 : values.length;
|
|
1281
|
+
this.__data__ = new MapCache_default();
|
|
1282
|
+
while (++index < length) {
|
|
1283
|
+
this.add(values[index]);
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd_default;
|
|
1287
|
+
SetCache.prototype.has = setCacheHas_default;
|
|
1288
|
+
var SetCache_default = SetCache;
|
|
1289
|
+
|
|
1290
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js
|
|
1291
|
+
function arraySome(array, predicate) {
|
|
1292
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
1293
|
+
while (++index < length) {
|
|
1294
|
+
if (predicate(array[index], index, array)) {
|
|
1295
|
+
return true;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
return false;
|
|
1299
|
+
}
|
|
1300
|
+
var arraySome_default = arraySome;
|
|
1301
|
+
|
|
1302
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js
|
|
1303
|
+
function cacheHas(cache, key) {
|
|
1304
|
+
return cache.has(key);
|
|
1305
|
+
}
|
|
1306
|
+
var cacheHas_default = cacheHas;
|
|
1307
|
+
|
|
1308
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js
|
|
1309
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1310
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
1311
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
1312
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
1313
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
1314
|
+
return false;
|
|
1315
|
+
}
|
|
1316
|
+
var arrStacked = stack.get(array);
|
|
1317
|
+
var othStacked = stack.get(other);
|
|
1318
|
+
if (arrStacked && othStacked) {
|
|
1319
|
+
return arrStacked == other && othStacked == array;
|
|
1320
|
+
}
|
|
1321
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache_default() : void 0;
|
|
1322
|
+
stack.set(array, other);
|
|
1323
|
+
stack.set(other, array);
|
|
1324
|
+
while (++index < arrLength) {
|
|
1325
|
+
var arrValue = array[index], othValue = other[index];
|
|
1326
|
+
if (customizer) {
|
|
1327
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
1328
|
+
}
|
|
1329
|
+
if (compared !== void 0) {
|
|
1330
|
+
if (compared) {
|
|
1331
|
+
continue;
|
|
1332
|
+
}
|
|
1333
|
+
result = false;
|
|
1334
|
+
break;
|
|
1335
|
+
}
|
|
1336
|
+
if (seen) {
|
|
1337
|
+
if (!arraySome_default(other, function(othValue2, othIndex) {
|
|
1338
|
+
if (!cacheHas_default(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
1339
|
+
return seen.push(othIndex);
|
|
1340
|
+
}
|
|
1341
|
+
})) {
|
|
1342
|
+
result = false;
|
|
1343
|
+
break;
|
|
1344
|
+
}
|
|
1345
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
1346
|
+
result = false;
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
stack["delete"](array);
|
|
1351
|
+
stack["delete"](other);
|
|
1352
|
+
return result;
|
|
1353
|
+
}
|
|
1354
|
+
var equalArrays_default = equalArrays;
|
|
1355
|
+
|
|
1356
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js
|
|
1357
|
+
function mapToArray(map) {
|
|
1358
|
+
var index = -1, result = Array(map.size);
|
|
1359
|
+
map.forEach(function(value, key) {
|
|
1360
|
+
result[++index] = [key, value];
|
|
1361
|
+
});
|
|
1362
|
+
return result;
|
|
1363
|
+
}
|
|
1364
|
+
var mapToArray_default = mapToArray;
|
|
1365
|
+
|
|
1366
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js
|
|
1367
|
+
function setToArray(set) {
|
|
1368
|
+
var index = -1, result = Array(set.size);
|
|
1369
|
+
set.forEach(function(value) {
|
|
1370
|
+
result[++index] = value;
|
|
1371
|
+
});
|
|
1372
|
+
return result;
|
|
1373
|
+
}
|
|
1374
|
+
var setToArray_default = setToArray;
|
|
1375
|
+
|
|
1376
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js
|
|
1377
|
+
var COMPARE_PARTIAL_FLAG2 = 1;
|
|
1378
|
+
var COMPARE_UNORDERED_FLAG2 = 2;
|
|
1379
|
+
var boolTag2 = "[object Boolean]";
|
|
1380
|
+
var dateTag2 = "[object Date]";
|
|
1381
|
+
var errorTag2 = "[object Error]";
|
|
1382
|
+
var mapTag3 = "[object Map]";
|
|
1383
|
+
var numberTag2 = "[object Number]";
|
|
1384
|
+
var regexpTag2 = "[object RegExp]";
|
|
1385
|
+
var setTag3 = "[object Set]";
|
|
1386
|
+
var stringTag2 = "[object String]";
|
|
1387
|
+
var symbolTag2 = "[object Symbol]";
|
|
1388
|
+
var arrayBufferTag2 = "[object ArrayBuffer]";
|
|
1389
|
+
var dataViewTag3 = "[object DataView]";
|
|
1390
|
+
var symbolProto2 = Symbol_default ? Symbol_default.prototype : void 0;
|
|
1391
|
+
var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
|
|
1392
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
1393
|
+
switch (tag) {
|
|
1394
|
+
case dataViewTag3:
|
|
1395
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
1396
|
+
return false;
|
|
1397
|
+
}
|
|
1398
|
+
object = object.buffer;
|
|
1399
|
+
other = other.buffer;
|
|
1400
|
+
case arrayBufferTag2:
|
|
1401
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array_default(object), new Uint8Array_default(other))) {
|
|
1402
|
+
return false;
|
|
1403
|
+
}
|
|
1404
|
+
return true;
|
|
1405
|
+
case boolTag2:
|
|
1406
|
+
case dateTag2:
|
|
1407
|
+
case numberTag2:
|
|
1408
|
+
return eq_default(+object, +other);
|
|
1409
|
+
case errorTag2:
|
|
1410
|
+
return object.name == other.name && object.message == other.message;
|
|
1411
|
+
case regexpTag2:
|
|
1412
|
+
case stringTag2:
|
|
1413
|
+
return object == other + "";
|
|
1414
|
+
case mapTag3:
|
|
1415
|
+
var convert = mapToArray_default;
|
|
1416
|
+
case setTag3:
|
|
1417
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
|
|
1418
|
+
convert || (convert = setToArray_default);
|
|
1419
|
+
if (object.size != other.size && !isPartial) {
|
|
1420
|
+
return false;
|
|
1421
|
+
}
|
|
1422
|
+
var stacked = stack.get(object);
|
|
1423
|
+
if (stacked) {
|
|
1424
|
+
return stacked == other;
|
|
1425
|
+
}
|
|
1426
|
+
bitmask |= COMPARE_UNORDERED_FLAG2;
|
|
1427
|
+
stack.set(object, other);
|
|
1428
|
+
var result = equalArrays_default(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1429
|
+
stack["delete"](object);
|
|
1430
|
+
return result;
|
|
1431
|
+
case symbolTag2:
|
|
1432
|
+
if (symbolValueOf) {
|
|
1433
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
return false;
|
|
1437
|
+
}
|
|
1438
|
+
var equalByTag_default = equalByTag;
|
|
1439
|
+
|
|
1440
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js
|
|
1441
|
+
var COMPARE_PARTIAL_FLAG3 = 1;
|
|
1442
|
+
var objectProto11 = Object.prototype;
|
|
1443
|
+
var hasOwnProperty8 = objectProto11.hasOwnProperty;
|
|
1444
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1445
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = getAllKeys_default(object), objLength = objProps.length, othProps = getAllKeys_default(other), othLength = othProps.length;
|
|
1446
|
+
if (objLength != othLength && !isPartial) {
|
|
1447
|
+
return false;
|
|
1448
|
+
}
|
|
1449
|
+
var index = objLength;
|
|
1450
|
+
while (index--) {
|
|
1451
|
+
var key = objProps[index];
|
|
1452
|
+
if (!(isPartial ? key in other : hasOwnProperty8.call(other, key))) {
|
|
1453
|
+
return false;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
var objStacked = stack.get(object);
|
|
1457
|
+
var othStacked = stack.get(other);
|
|
1458
|
+
if (objStacked && othStacked) {
|
|
1459
|
+
return objStacked == other && othStacked == object;
|
|
1460
|
+
}
|
|
1461
|
+
var result = true;
|
|
1462
|
+
stack.set(object, other);
|
|
1463
|
+
stack.set(other, object);
|
|
1464
|
+
var skipCtor = isPartial;
|
|
1465
|
+
while (++index < objLength) {
|
|
1466
|
+
key = objProps[index];
|
|
1467
|
+
var objValue = object[key], othValue = other[key];
|
|
1468
|
+
if (customizer) {
|
|
1469
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1470
|
+
}
|
|
1471
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1472
|
+
result = false;
|
|
1473
|
+
break;
|
|
1474
|
+
}
|
|
1475
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
1476
|
+
}
|
|
1477
|
+
if (result && !skipCtor) {
|
|
1478
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1479
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1480
|
+
result = false;
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
stack["delete"](object);
|
|
1484
|
+
stack["delete"](other);
|
|
1485
|
+
return result;
|
|
1486
|
+
}
|
|
1487
|
+
var equalObjects_default = equalObjects;
|
|
1488
|
+
|
|
1489
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js
|
|
1490
|
+
var COMPARE_PARTIAL_FLAG4 = 1;
|
|
1491
|
+
var argsTag3 = "[object Arguments]";
|
|
1492
|
+
var arrayTag2 = "[object Array]";
|
|
1493
|
+
var objectTag3 = "[object Object]";
|
|
1494
|
+
var objectProto12 = Object.prototype;
|
|
1495
|
+
var hasOwnProperty9 = objectProto12.hasOwnProperty;
|
|
1496
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1497
|
+
var objIsArr = isArray_default(object), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag2 : getTag_default(object), othTag = othIsArr ? arrayTag2 : getTag_default(other);
|
|
1498
|
+
objTag = objTag == argsTag3 ? objectTag3 : objTag;
|
|
1499
|
+
othTag = othTag == argsTag3 ? objectTag3 : othTag;
|
|
1500
|
+
var objIsObj = objTag == objectTag3, othIsObj = othTag == objectTag3, isSameTag = objTag == othTag;
|
|
1501
|
+
if (isSameTag && isBuffer_default(object)) {
|
|
1502
|
+
if (!isBuffer_default(other)) {
|
|
1503
|
+
return false;
|
|
1504
|
+
}
|
|
1505
|
+
objIsArr = true;
|
|
1506
|
+
objIsObj = false;
|
|
1507
|
+
}
|
|
1508
|
+
if (isSameTag && !objIsObj) {
|
|
1509
|
+
stack || (stack = new Stack_default());
|
|
1510
|
+
return objIsArr || isTypedArray_default(object) ? equalArrays_default(object, other, bitmask, customizer, equalFunc, stack) : equalByTag_default(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1511
|
+
}
|
|
1512
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG4)) {
|
|
1513
|
+
var objIsWrapped = objIsObj && hasOwnProperty9.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty9.call(other, "__wrapped__");
|
|
1514
|
+
if (objIsWrapped || othIsWrapped) {
|
|
1515
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1516
|
+
stack || (stack = new Stack_default());
|
|
1517
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
if (!isSameTag) {
|
|
1521
|
+
return false;
|
|
1522
|
+
}
|
|
1523
|
+
stack || (stack = new Stack_default());
|
|
1524
|
+
return equalObjects_default(object, other, bitmask, customizer, equalFunc, stack);
|
|
1525
|
+
}
|
|
1526
|
+
var baseIsEqualDeep_default = baseIsEqualDeep;
|
|
1527
|
+
|
|
1528
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js
|
|
1529
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1530
|
+
if (value === other) {
|
|
1531
|
+
return true;
|
|
1532
|
+
}
|
|
1533
|
+
if (value == null || other == null || !isObjectLike_default(value) && !isObjectLike_default(other)) {
|
|
1534
|
+
return value !== value && other !== other;
|
|
1535
|
+
}
|
|
1536
|
+
return baseIsEqualDeep_default(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1537
|
+
}
|
|
1538
|
+
var baseIsEqual_default = baseIsEqual;
|
|
1539
|
+
|
|
1540
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js
|
|
1541
|
+
var COMPARE_PARTIAL_FLAG5 = 1;
|
|
1542
|
+
var COMPARE_UNORDERED_FLAG3 = 2;
|
|
1543
|
+
function baseIsMatch(object, source, matchData, customizer) {
|
|
1544
|
+
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
1545
|
+
if (object == null) {
|
|
1546
|
+
return !length;
|
|
1547
|
+
}
|
|
1548
|
+
object = Object(object);
|
|
1549
|
+
while (index--) {
|
|
1550
|
+
var data = matchData[index];
|
|
1551
|
+
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1552
|
+
return false;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
while (++index < length) {
|
|
1556
|
+
data = matchData[index];
|
|
1557
|
+
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1558
|
+
if (noCustomizer && data[2]) {
|
|
1559
|
+
if (objValue === void 0 && !(key in object)) {
|
|
1560
|
+
return false;
|
|
1561
|
+
}
|
|
1562
|
+
} else {
|
|
1563
|
+
var stack = new Stack_default();
|
|
1564
|
+
if (customizer) {
|
|
1565
|
+
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
1566
|
+
}
|
|
1567
|
+
if (!(result === void 0 ? baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG5 | COMPARE_UNORDERED_FLAG3, customizer, stack) : result)) {
|
|
1568
|
+
return false;
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
return true;
|
|
1573
|
+
}
|
|
1574
|
+
var baseIsMatch_default = baseIsMatch;
|
|
1575
|
+
|
|
1576
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js
|
|
1577
|
+
function isStrictComparable(value) {
|
|
1578
|
+
return value === value && !isObject_default(value);
|
|
1579
|
+
}
|
|
1580
|
+
var isStrictComparable_default = isStrictComparable;
|
|
1581
|
+
|
|
1582
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js
|
|
1583
|
+
function getMatchData(object) {
|
|
1584
|
+
var result = keys_default(object), length = result.length;
|
|
1585
|
+
while (length--) {
|
|
1586
|
+
var key = result[length], value = object[key];
|
|
1587
|
+
result[length] = [key, value, isStrictComparable_default(value)];
|
|
1588
|
+
}
|
|
1589
|
+
return result;
|
|
1590
|
+
}
|
|
1591
|
+
var getMatchData_default = getMatchData;
|
|
1592
|
+
|
|
1593
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js
|
|
1594
|
+
function matchesStrictComparable(key, srcValue) {
|
|
1595
|
+
return function(object) {
|
|
1596
|
+
if (object == null) {
|
|
1597
|
+
return false;
|
|
1598
|
+
}
|
|
1599
|
+
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
1600
|
+
};
|
|
1601
|
+
}
|
|
1602
|
+
var matchesStrictComparable_default = matchesStrictComparable;
|
|
1603
|
+
|
|
1604
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js
|
|
1605
|
+
function baseMatches(source) {
|
|
1606
|
+
var matchData = getMatchData_default(source);
|
|
1607
|
+
if (matchData.length == 1 && matchData[0][2]) {
|
|
1608
|
+
return matchesStrictComparable_default(matchData[0][0], matchData[0][1]);
|
|
1609
|
+
}
|
|
1610
|
+
return function(object) {
|
|
1611
|
+
return object === source || baseIsMatch_default(object, source, matchData);
|
|
1612
|
+
};
|
|
1613
|
+
}
|
|
1614
|
+
var baseMatches_default = baseMatches;
|
|
1615
|
+
|
|
1616
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js
|
|
1617
|
+
function baseHasIn(object, key) {
|
|
1618
|
+
return object != null && key in Object(object);
|
|
1619
|
+
}
|
|
1620
|
+
var baseHasIn_default = baseHasIn;
|
|
1621
|
+
|
|
1622
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js
|
|
1623
|
+
function hasPath(object, path4, hasFunc) {
|
|
1624
|
+
path4 = castPath_default(path4, object);
|
|
1625
|
+
var index = -1, length = path4.length, result = false;
|
|
1626
|
+
while (++index < length) {
|
|
1627
|
+
var key = toKey_default(path4[index]);
|
|
1628
|
+
if (!(result = object != null && hasFunc(object, key))) {
|
|
1629
|
+
break;
|
|
1630
|
+
}
|
|
1631
|
+
object = object[key];
|
|
1632
|
+
}
|
|
1633
|
+
if (result || ++index != length) {
|
|
1634
|
+
return result;
|
|
1635
|
+
}
|
|
1636
|
+
length = object == null ? 0 : object.length;
|
|
1637
|
+
return !!length && isLength_default(length) && isIndex_default(key, length) && (isArray_default(object) || isArguments_default(object));
|
|
1638
|
+
}
|
|
1639
|
+
var hasPath_default = hasPath;
|
|
1640
|
+
|
|
1641
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js
|
|
1642
|
+
function hasIn(object, path4) {
|
|
1643
|
+
return object != null && hasPath_default(object, path4, baseHasIn_default);
|
|
1644
|
+
}
|
|
1645
|
+
var hasIn_default = hasIn;
|
|
1646
|
+
|
|
1647
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js
|
|
1648
|
+
var COMPARE_PARTIAL_FLAG6 = 1;
|
|
1649
|
+
var COMPARE_UNORDERED_FLAG4 = 2;
|
|
1650
|
+
function baseMatchesProperty(path4, srcValue) {
|
|
1651
|
+
if (isKey_default(path4) && isStrictComparable_default(srcValue)) {
|
|
1652
|
+
return matchesStrictComparable_default(toKey_default(path4), srcValue);
|
|
1653
|
+
}
|
|
1654
|
+
return function(object) {
|
|
1655
|
+
var objValue = get_default(object, path4);
|
|
1656
|
+
return objValue === void 0 && objValue === srcValue ? hasIn_default(object, path4) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
var baseMatchesProperty_default = baseMatchesProperty;
|
|
1660
|
+
|
|
1661
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js
|
|
1662
|
+
function baseProperty(key) {
|
|
1663
|
+
return function(object) {
|
|
1664
|
+
return object == null ? void 0 : object[key];
|
|
1665
|
+
};
|
|
1666
|
+
}
|
|
1667
|
+
var baseProperty_default = baseProperty;
|
|
1668
|
+
|
|
1669
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js
|
|
1670
|
+
function basePropertyDeep(path4) {
|
|
1671
|
+
return function(object) {
|
|
1672
|
+
return baseGet_default(object, path4);
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
var basePropertyDeep_default = basePropertyDeep;
|
|
1676
|
+
|
|
1677
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/property.js
|
|
1678
|
+
function property(path4) {
|
|
1679
|
+
return isKey_default(path4) ? baseProperty_default(toKey_default(path4)) : basePropertyDeep_default(path4);
|
|
1680
|
+
}
|
|
1681
|
+
var property_default = property;
|
|
1682
|
+
|
|
1683
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js
|
|
1684
|
+
function baseIteratee(value) {
|
|
1685
|
+
if (typeof value == "function") {
|
|
1686
|
+
return value;
|
|
1687
|
+
}
|
|
1688
|
+
if (value == null) {
|
|
1689
|
+
return identity_default;
|
|
1690
|
+
}
|
|
1691
|
+
if (typeof value == "object") {
|
|
1692
|
+
return isArray_default(value) ? baseMatchesProperty_default(value[0], value[1]) : baseMatches_default(value);
|
|
1693
|
+
}
|
|
1694
|
+
return property_default(value);
|
|
1695
|
+
}
|
|
1696
|
+
var baseIteratee_default = baseIteratee;
|
|
1697
|
+
|
|
1698
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js
|
|
1699
|
+
function createBaseFor(fromRight) {
|
|
1700
|
+
return function(object, iteratee, keysFunc) {
|
|
1701
|
+
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
1702
|
+
while (length--) {
|
|
1703
|
+
var key = props[fromRight ? length : ++index];
|
|
1704
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
return object;
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
var createBaseFor_default = createBaseFor;
|
|
1712
|
+
|
|
1713
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js
|
|
1714
|
+
var baseFor = createBaseFor_default();
|
|
1715
|
+
var baseFor_default = baseFor;
|
|
1716
|
+
|
|
1717
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseForOwn.js
|
|
1718
|
+
function baseForOwn(object, iteratee) {
|
|
1719
|
+
return object && baseFor_default(object, iteratee, keys_default);
|
|
1720
|
+
}
|
|
1721
|
+
var baseForOwn_default = baseForOwn;
|
|
1722
|
+
|
|
1723
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createBaseEach.js
|
|
1724
|
+
function createBaseEach(eachFunc, fromRight) {
|
|
1725
|
+
return function(collection, iteratee) {
|
|
1726
|
+
if (collection == null) {
|
|
1727
|
+
return collection;
|
|
1728
|
+
}
|
|
1729
|
+
if (!isArrayLike_default(collection)) {
|
|
1730
|
+
return eachFunc(collection, iteratee);
|
|
1731
|
+
}
|
|
1732
|
+
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
|
|
1733
|
+
while (fromRight ? index-- : ++index < length) {
|
|
1734
|
+
if (iteratee(iterable[index], index, iterable) === false) {
|
|
1735
|
+
break;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
return collection;
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
var createBaseEach_default = createBaseEach;
|
|
1742
|
+
|
|
1743
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseEach.js
|
|
1744
|
+
var baseEach = createBaseEach_default(baseForOwn_default);
|
|
1745
|
+
var baseEach_default = baseEach;
|
|
1746
|
+
|
|
1747
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMap.js
|
|
1748
|
+
function baseMap(collection, iteratee) {
|
|
1749
|
+
var index = -1, result = isArrayLike_default(collection) ? Array(collection.length) : [];
|
|
1750
|
+
baseEach_default(collection, function(value, key, collection2) {
|
|
1751
|
+
result[++index] = iteratee(value, key, collection2);
|
|
1752
|
+
});
|
|
1753
|
+
return result;
|
|
1754
|
+
}
|
|
1755
|
+
var baseMap_default = baseMap;
|
|
1756
|
+
|
|
1757
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSortBy.js
|
|
1758
|
+
function baseSortBy(array, comparer) {
|
|
1759
|
+
var length = array.length;
|
|
1760
|
+
array.sort(comparer);
|
|
1761
|
+
while (length--) {
|
|
1762
|
+
array[length] = array[length].value;
|
|
1763
|
+
}
|
|
1764
|
+
return array;
|
|
1765
|
+
}
|
|
1766
|
+
var baseSortBy_default = baseSortBy;
|
|
1767
|
+
|
|
1768
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_compareAscending.js
|
|
1769
|
+
function compareAscending(value, other) {
|
|
1770
|
+
if (value !== other) {
|
|
1771
|
+
var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol_default(value);
|
|
1772
|
+
var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol_default(other);
|
|
1773
|
+
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
1774
|
+
return 1;
|
|
1775
|
+
}
|
|
1776
|
+
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
|
1777
|
+
return -1;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
return 0;
|
|
1781
|
+
}
|
|
1782
|
+
var compareAscending_default = compareAscending;
|
|
1783
|
+
|
|
1784
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_compareMultiple.js
|
|
1785
|
+
function compareMultiple(object, other, orders) {
|
|
1786
|
+
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
1787
|
+
while (++index < length) {
|
|
1788
|
+
var result = compareAscending_default(objCriteria[index], othCriteria[index]);
|
|
1789
|
+
if (result) {
|
|
1790
|
+
if (index >= ordersLength) {
|
|
1791
|
+
return result;
|
|
1792
|
+
}
|
|
1793
|
+
var order = orders[index];
|
|
1794
|
+
return result * (order == "desc" ? -1 : 1);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
return object.index - other.index;
|
|
1798
|
+
}
|
|
1799
|
+
var compareMultiple_default = compareMultiple;
|
|
1800
|
+
|
|
1801
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseOrderBy.js
|
|
1802
|
+
function baseOrderBy(collection, iteratees, orders) {
|
|
1803
|
+
if (iteratees.length) {
|
|
1804
|
+
iteratees = arrayMap_default(iteratees, function(iteratee) {
|
|
1805
|
+
if (isArray_default(iteratee)) {
|
|
1806
|
+
return function(value) {
|
|
1807
|
+
return baseGet_default(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
return iteratee;
|
|
1811
|
+
});
|
|
1812
|
+
} else {
|
|
1813
|
+
iteratees = [identity_default];
|
|
1814
|
+
}
|
|
1815
|
+
var index = -1;
|
|
1816
|
+
iteratees = arrayMap_default(iteratees, baseUnary_default(baseIteratee_default));
|
|
1817
|
+
var result = baseMap_default(collection, function(value, key, collection2) {
|
|
1818
|
+
var criteria = arrayMap_default(iteratees, function(iteratee) {
|
|
1819
|
+
return iteratee(value);
|
|
1820
|
+
});
|
|
1821
|
+
return { "criteria": criteria, "index": ++index, "value": value };
|
|
1822
|
+
});
|
|
1823
|
+
return baseSortBy_default(result, function(object, other) {
|
|
1824
|
+
return compareMultiple_default(object, other, orders);
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
var baseOrderBy_default = baseOrderBy;
|
|
1828
|
+
|
|
1829
|
+
// node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/sortBy.js
|
|
1830
|
+
var sortBy = baseRest_default(function(collection, iteratees) {
|
|
1831
|
+
if (collection == null) {
|
|
1832
|
+
return [];
|
|
1833
|
+
}
|
|
1834
|
+
var length = iteratees.length;
|
|
1835
|
+
if (length > 1 && isIterateeCall_default(collection, iteratees[0], iteratees[1])) {
|
|
1836
|
+
iteratees = [];
|
|
1837
|
+
} else if (length > 2 && isIterateeCall_default(iteratees[0], iteratees[1], iteratees[2])) {
|
|
1838
|
+
iteratees = [iteratees[0]];
|
|
1839
|
+
}
|
|
1840
|
+
return baseOrderBy_default(collection, baseFlatten_default(iteratees, 1), []);
|
|
1841
|
+
});
|
|
1842
|
+
var sortBy_default = sortBy;
|
|
1843
|
+
|
|
1844
|
+
// cli/show.ts
|
|
1845
|
+
function showBoard(state, boxId) {
|
|
1846
|
+
const { project, slices, layers, tasks } = state;
|
|
1847
|
+
const sortedSlices = sortBy_default(slices, "boxNumber");
|
|
1848
|
+
const filteredSlices = boxId ? sortedSlices.filter((s) => s.id === boxId) : sortedSlices;
|
|
1849
|
+
console.log(`Project: ${project.name} (id: ${project.id})`);
|
|
1850
|
+
console.log();
|
|
1851
|
+
for (const slice of filteredSlices) {
|
|
1852
|
+
const sliceName = slice.name || "(untitled)";
|
|
1853
|
+
console.log(`Box ${slice.boxNumber}: ${sliceName} (id: ${slice.id})`);
|
|
1854
|
+
const sliceLayers = sortBy_default(
|
|
1855
|
+
layers.filter((l) => l.sliceId === slice.id),
|
|
1856
|
+
"sorting"
|
|
1857
|
+
);
|
|
1858
|
+
for (const layer2 of sliceLayers) {
|
|
1859
|
+
const layerName = layer2.name || "(unnamed)";
|
|
1860
|
+
const statusTag = layer2.status === "done" ? " [done]" : "";
|
|
1861
|
+
const layerLabel = sliceLayers.length > 1 ? `Layer: ${layerName}` : "Layer";
|
|
1862
|
+
console.log(` ${layerLabel} (id: ${layer2.id})${statusTag}`);
|
|
1863
|
+
const layerTasks = sortBy_default(
|
|
1864
|
+
tasks.filter((t) => t.layerId === layer2.id),
|
|
1865
|
+
"sorting"
|
|
1866
|
+
);
|
|
1867
|
+
if (layerTasks.length === 0) {
|
|
1868
|
+
console.log(" (no tasks)");
|
|
1869
|
+
} else {
|
|
1870
|
+
for (const task2 of layerTasks) {
|
|
1871
|
+
const check = task2.done ? "x" : " ";
|
|
1872
|
+
console.log(` [${check}] ${task2.name} (id: ${task2.id})`);
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
console.log();
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
function showBoardJson(state) {
|
|
1880
|
+
const sorted = {
|
|
1881
|
+
...state,
|
|
1882
|
+
slices: sortBy_default(state.slices, "boxNumber")
|
|
1883
|
+
};
|
|
1884
|
+
console.log(JSON.stringify(sorted, null, 2));
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
// cli/apply.ts
|
|
1888
|
+
function resolveFilePath(file, json) {
|
|
1889
|
+
const filePath = path.resolve(file);
|
|
1890
|
+
if (!fs.existsSync(filePath)) {
|
|
1891
|
+
fail(`File not found: ${filePath}`, json);
|
|
1892
|
+
}
|
|
1893
|
+
return filePath;
|
|
1894
|
+
}
|
|
1895
|
+
function loadState(filePath) {
|
|
1896
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
1897
|
+
return deserialize(content);
|
|
1898
|
+
}
|
|
1899
|
+
function saveState(filePath, state) {
|
|
1900
|
+
fs.writeFileSync(filePath, serialize(state));
|
|
1901
|
+
}
|
|
1902
|
+
function applyAction(filePath, action) {
|
|
1903
|
+
const state = loadState(filePath);
|
|
1904
|
+
const newState = boardReducer(state, action);
|
|
1905
|
+
saveState(filePath, newState);
|
|
1906
|
+
return newState;
|
|
1907
|
+
}
|
|
1908
|
+
function output(state, json, message) {
|
|
1909
|
+
if (json) {
|
|
1910
|
+
showBoardJson(state);
|
|
1911
|
+
} else {
|
|
1912
|
+
console.log(message);
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
function fail(message, json) {
|
|
1916
|
+
if (json) {
|
|
1917
|
+
console.log(JSON.stringify({ error: message }));
|
|
1918
|
+
} else {
|
|
1919
|
+
console.error(`Error: ${message}`);
|
|
1920
|
+
}
|
|
1921
|
+
process.exit(1);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
// cli/server.ts
|
|
1925
|
+
import fs2 from "fs";
|
|
1926
|
+
import http from "http";
|
|
1927
|
+
import path2 from "path";
|
|
1928
|
+
import { fileURLToPath } from "url";
|
|
1929
|
+
import getPort from "get-port";
|
|
1930
|
+
import open from "open";
|
|
1931
|
+
var MIME_TYPES = {
|
|
1932
|
+
".html": "text/html",
|
|
1933
|
+
".js": "application/javascript",
|
|
1934
|
+
".css": "text/css",
|
|
1935
|
+
".json": "application/json",
|
|
1936
|
+
".png": "image/png",
|
|
1937
|
+
".jpg": "image/jpeg",
|
|
1938
|
+
".svg": "image/svg+xml",
|
|
1939
|
+
".ico": "image/x-icon",
|
|
1940
|
+
".woff": "font/woff",
|
|
1941
|
+
".woff2": "font/woff2"
|
|
1942
|
+
};
|
|
1943
|
+
function getDistPath() {
|
|
1944
|
+
const currentDir = path2.dirname(fileURLToPath(import.meta.url));
|
|
1945
|
+
return path2.resolve(currentDir, "..", "..", "dist");
|
|
1946
|
+
}
|
|
1947
|
+
function serveStaticFile(res, distPath, urlPath) {
|
|
1948
|
+
const filePath = path2.join(distPath, urlPath);
|
|
1949
|
+
const safePath = path2.resolve(filePath);
|
|
1950
|
+
if (!safePath.startsWith(distPath)) {
|
|
1951
|
+
res.writeHead(403);
|
|
1952
|
+
res.end("Forbidden");
|
|
1953
|
+
return;
|
|
1954
|
+
}
|
|
1955
|
+
if (!fs2.existsSync(safePath) || fs2.statSync(safePath).isDirectory()) {
|
|
1956
|
+
return false;
|
|
1957
|
+
}
|
|
1958
|
+
const ext = path2.extname(safePath);
|
|
1959
|
+
const contentType = MIME_TYPES[ext] || "application/octet-stream";
|
|
1960
|
+
res.writeHead(200, { "Content-Type": contentType });
|
|
1961
|
+
fs2.createReadStream(safePath).pipe(res);
|
|
1962
|
+
return true;
|
|
1963
|
+
}
|
|
1964
|
+
function readRequestBody(req) {
|
|
1965
|
+
return new Promise((resolve, reject) => {
|
|
1966
|
+
const chunks = [];
|
|
1967
|
+
req.on("data", (chunk) => chunks.push(chunk));
|
|
1968
|
+
req.on("end", () => resolve(Buffer.concat(chunks).toString()));
|
|
1969
|
+
req.on("error", reject);
|
|
1970
|
+
});
|
|
1971
|
+
}
|
|
1972
|
+
async function startServer(filePath) {
|
|
1973
|
+
const absoluteFilePath = path2.resolve(filePath);
|
|
1974
|
+
const distPath = getDistPath();
|
|
1975
|
+
if (!fs2.existsSync(distPath)) {
|
|
1976
|
+
console.error(
|
|
1977
|
+
"Error: dist/ directory not found. Run `pnpm run build` first."
|
|
1978
|
+
);
|
|
1979
|
+
process.exit(1);
|
|
1980
|
+
}
|
|
1981
|
+
const server = http.createServer(async (req, res) => {
|
|
1982
|
+
const url2 = req.url || "/";
|
|
1983
|
+
if (url2 === "/api/project" && req.method === "GET") {
|
|
1984
|
+
const content = fs2.readFileSync(absoluteFilePath, "utf-8");
|
|
1985
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
1986
|
+
res.end(content);
|
|
1987
|
+
return;
|
|
1988
|
+
}
|
|
1989
|
+
if (url2 === "/api/project" && req.method === "POST") {
|
|
1990
|
+
const body = await readRequestBody(req);
|
|
1991
|
+
fs2.writeFileSync(absoluteFilePath, body);
|
|
1992
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
1993
|
+
res.end('{"ok":true}');
|
|
1994
|
+
return;
|
|
1995
|
+
}
|
|
1996
|
+
if (serveStaticFile(res, distPath, url2))
|
|
1997
|
+
return;
|
|
1998
|
+
const indexPath = path2.join(distPath, "index.html");
|
|
1999
|
+
if (fs2.existsSync(indexPath)) {
|
|
2000
|
+
res.writeHead(200, { "Content-Type": "text/html" });
|
|
2001
|
+
fs2.createReadStream(indexPath).pipe(res);
|
|
2002
|
+
return;
|
|
2003
|
+
}
|
|
2004
|
+
res.writeHead(404);
|
|
2005
|
+
res.end("Not Found");
|
|
2006
|
+
});
|
|
2007
|
+
const port = await getPort();
|
|
2008
|
+
const url = `http://localhost:${port}`;
|
|
2009
|
+
server.listen(port, () => {
|
|
2010
|
+
console.log(`
|
|
2011
|
+
Vertical is running at ${url}`);
|
|
2012
|
+
console.log(` Editing: ${absoluteFilePath}`);
|
|
2013
|
+
console.log(" Press Ctrl+C to stop\n");
|
|
2014
|
+
open(url);
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
// cli/index.ts
|
|
2019
|
+
function getDirname() {
|
|
2020
|
+
if (typeof __dirname !== "undefined")
|
|
2021
|
+
return __dirname;
|
|
2022
|
+
if (typeof import.meta !== "undefined" && import.meta.url) {
|
|
2023
|
+
return dirname(fileURLToPath2(import.meta.url));
|
|
2024
|
+
}
|
|
2025
|
+
throw new Error("Cannot determine directory path in current environment");
|
|
2026
|
+
}
|
|
2027
|
+
var packageJson = JSON.parse(
|
|
2028
|
+
fs3.readFileSync(
|
|
2029
|
+
path3.resolve(getDirname(), "..", "..", "package.json"),
|
|
2030
|
+
"utf8"
|
|
2031
|
+
)
|
|
2032
|
+
);
|
|
2033
|
+
var program = new Command();
|
|
2034
|
+
program.name("itsvertical").description(
|
|
2035
|
+
"Tickets pile up, scopes get done. Project work isn't linear, it's Vertical."
|
|
2036
|
+
).version(packageJson.version);
|
|
2037
|
+
program.command("new").description("Create a new .vertical project file").argument("<path>", "File path for the new .vertical file").argument("<name>", "Project name").option("--json", "Output as JSON").action((fileDest, name, options) => {
|
|
2038
|
+
const filePath = path3.resolve(fileDest);
|
|
2039
|
+
if (fs3.existsSync(filePath)) {
|
|
2040
|
+
fail(`File already exists: ${filePath}`, options.json);
|
|
2041
|
+
}
|
|
2042
|
+
const dir = path3.dirname(filePath);
|
|
2043
|
+
if (!fs3.existsSync(dir)) {
|
|
2044
|
+
fs3.mkdirSync(dir, { recursive: true });
|
|
2045
|
+
}
|
|
2046
|
+
const state = createBlankProject(name);
|
|
2047
|
+
fs3.writeFileSync(filePath, serialize(state));
|
|
2048
|
+
output(state, Boolean(options.json), `Created: ${filePath}`);
|
|
2049
|
+
});
|
|
2050
|
+
program.command("open").description("Open an existing .vertical file in the browser").argument("<file>", "Path to the .vertical file").action(async (file) => {
|
|
2051
|
+
const filePath = resolveFilePath(file);
|
|
2052
|
+
await startServer(filePath);
|
|
2053
|
+
});
|
|
2054
|
+
program.command("show").description("Print the board to the terminal").argument("<file>", "Path to the .vertical file").option("--json", "Output as JSON").option("--box <slice-id>", "Show only a specific box").action((file, options) => {
|
|
2055
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2056
|
+
const state = loadState(filePath);
|
|
2057
|
+
if (options.box) {
|
|
2058
|
+
const slice = state.slices.find((s) => s.id === options.box);
|
|
2059
|
+
if (!slice) {
|
|
2060
|
+
fail(`Box not found: ${options.box}`, options.json);
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
if (options.json) {
|
|
2064
|
+
showBoardJson(state);
|
|
2065
|
+
} else {
|
|
2066
|
+
showBoard(state, options.box);
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
2069
|
+
program.command("rename").description("Rename the project").argument("<file>", "Path to the .vertical file").argument("<name>", "New project name").option("--json", "Output as JSON").action((file, name, options) => {
|
|
2070
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2071
|
+
const state = applyAction(filePath, { type: "RENAME_PROJECT", name });
|
|
2072
|
+
output(state, Boolean(options.json), `Project renamed to: ${name}`);
|
|
2073
|
+
});
|
|
2074
|
+
var task = program.command("task").description("Manage tasks");
|
|
2075
|
+
task.command("add").description("Add a task to a layer").argument("<file>", "Path to the .vertical file").argument("<layer-id>", "Layer ID to add the task to").argument("<name>", "Task name").option("--json", "Output as JSON").option("--after <task-id>", "Insert after a specific task").action(
|
|
2076
|
+
(file, layerId, name, options) => {
|
|
2077
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2078
|
+
const current = loadState(filePath);
|
|
2079
|
+
const id = crypto.randomUUID();
|
|
2080
|
+
if (options.after) {
|
|
2081
|
+
const afterTask = current.tasks.find((t) => t.id === options.after);
|
|
2082
|
+
if (!afterTask) {
|
|
2083
|
+
fail(`Task not found: ${options.after}`, options.json);
|
|
2084
|
+
}
|
|
2085
|
+
const nextTask = current.tasks.filter(
|
|
2086
|
+
(t) => t.layerId === afterTask.layerId && t.sorting > afterTask.sorting
|
|
2087
|
+
).sort((a, b) => a.sorting - b.sorting)[0];
|
|
2088
|
+
const sorting2 = nextTask ? (afterTask.sorting + nextTask.sorting) / 2 : afterTask.sorting + 1;
|
|
2089
|
+
const state2 = applyAction(filePath, {
|
|
2090
|
+
type: "CREATE_TASK",
|
|
2091
|
+
id,
|
|
2092
|
+
layerId: afterTask.layerId,
|
|
2093
|
+
name,
|
|
2094
|
+
sorting: sorting2
|
|
2095
|
+
});
|
|
2096
|
+
output(state2, Boolean(options.json), `Task created (id: ${id})`);
|
|
2097
|
+
return;
|
|
2098
|
+
}
|
|
2099
|
+
const layerTasks = current.tasks.filter((t) => t.layerId === layerId).sort((a, b) => a.sorting - b.sorting);
|
|
2100
|
+
const sorting = layerTasks.length > 0 ? layerTasks[layerTasks.length - 1].sorting + 1 : 1;
|
|
2101
|
+
const state = applyAction(filePath, {
|
|
2102
|
+
type: "CREATE_TASK",
|
|
2103
|
+
id,
|
|
2104
|
+
layerId,
|
|
2105
|
+
name,
|
|
2106
|
+
sorting
|
|
2107
|
+
});
|
|
2108
|
+
output(state, Boolean(options.json), `Task created (id: ${id})`);
|
|
2109
|
+
}
|
|
2110
|
+
);
|
|
2111
|
+
task.command("done").description("Mark a task as done").argument("<file>", "Path to the .vertical file").argument("<task-id>", "Task ID").option("--json", "Output as JSON").action((file, taskId, options) => {
|
|
2112
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2113
|
+
const state = applyAction(filePath, {
|
|
2114
|
+
type: "SET_TASK_DONE",
|
|
2115
|
+
taskId,
|
|
2116
|
+
done: true
|
|
2117
|
+
});
|
|
2118
|
+
output(state, Boolean(options.json), `Task marked as done (id: ${taskId})`);
|
|
2119
|
+
});
|
|
2120
|
+
task.command("undone").description("Mark a task as not done").argument("<file>", "Path to the .vertical file").argument("<task-id>", "Task ID").option("--json", "Output as JSON").action((file, taskId, options) => {
|
|
2121
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2122
|
+
const state = applyAction(filePath, {
|
|
2123
|
+
type: "SET_TASK_DONE",
|
|
2124
|
+
taskId,
|
|
2125
|
+
done: false
|
|
2126
|
+
});
|
|
2127
|
+
output(
|
|
2128
|
+
state,
|
|
2129
|
+
Boolean(options.json),
|
|
2130
|
+
`Task marked as not done (id: ${taskId})`
|
|
2131
|
+
);
|
|
2132
|
+
});
|
|
2133
|
+
task.command("rename").description("Rename a task").argument("<file>", "Path to the .vertical file").argument("<task-id>", "Task ID").argument("<name>", "New task name").option("--json", "Output as JSON").action((file, taskId, name, options) => {
|
|
2134
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2135
|
+
const state = applyAction(filePath, {
|
|
2136
|
+
type: "RENAME_TASK",
|
|
2137
|
+
taskId,
|
|
2138
|
+
name
|
|
2139
|
+
});
|
|
2140
|
+
output(state, Boolean(options.json), `Task renamed (id: ${taskId})`);
|
|
2141
|
+
});
|
|
2142
|
+
task.command("delete").description("Delete a task").argument("<file>", "Path to the .vertical file").argument("<task-id>", "Task ID").option("--json", "Output as JSON").action((file, taskId, options) => {
|
|
2143
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2144
|
+
const state = applyAction(filePath, { type: "DELETE_TASK", taskId });
|
|
2145
|
+
output(state, Boolean(options.json), `Task deleted (id: ${taskId})`);
|
|
2146
|
+
});
|
|
2147
|
+
task.command("move").description("Move a task to another layer").argument("<file>", "Path to the .vertical file").argument("<task-id>", "Task ID").argument("<target-layer-id>", "Target layer ID").option("--json", "Output as JSON").action(
|
|
2148
|
+
(file, taskId, targetLayerId, options) => {
|
|
2149
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2150
|
+
const current = loadState(filePath);
|
|
2151
|
+
const layerTasks = current.tasks.filter((t) => t.layerId === targetLayerId).sort((a, b) => a.sorting - b.sorting);
|
|
2152
|
+
const sorting = layerTasks.length > 0 ? layerTasks[layerTasks.length - 1].sorting + 1 : 1;
|
|
2153
|
+
const state = applyAction(filePath, {
|
|
2154
|
+
type: "MOVE_TASK",
|
|
2155
|
+
taskId,
|
|
2156
|
+
layerId: targetLayerId,
|
|
2157
|
+
sorting
|
|
2158
|
+
});
|
|
2159
|
+
output(state, Boolean(options.json), `Task moved (id: ${taskId})`);
|
|
2160
|
+
}
|
|
2161
|
+
);
|
|
2162
|
+
var box = program.command("box").description("Manage boxes (slices)");
|
|
2163
|
+
box.command("rename").description("Rename a box").argument("<file>", "Path to the .vertical file").argument("<slice-id>", "Slice ID").argument("<name>", "New box name").option("--json", "Output as JSON").action(
|
|
2164
|
+
(file, sliceId, name, options) => {
|
|
2165
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2166
|
+
const state = applyAction(filePath, {
|
|
2167
|
+
type: "RENAME_SLICE",
|
|
2168
|
+
sliceId,
|
|
2169
|
+
name
|
|
2170
|
+
});
|
|
2171
|
+
output(state, Boolean(options.json), `Box renamed (id: ${sliceId})`);
|
|
2172
|
+
}
|
|
2173
|
+
);
|
|
2174
|
+
box.command("clear").description("Clear the name of a box").argument("<file>", "Path to the .vertical file").argument("<slice-id>", "Slice ID").option("--json", "Output as JSON").action((file, sliceId, options) => {
|
|
2175
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2176
|
+
const state = applyAction(filePath, { type: "UNNAME_SLICE", sliceId });
|
|
2177
|
+
output(state, Boolean(options.json), `Box name cleared (id: ${sliceId})`);
|
|
2178
|
+
});
|
|
2179
|
+
box.command("swap").description("Swap the positions of two boxes").argument("<file>", "Path to the .vertical file").argument("<slice-id-1>", "First slice ID").argument("<slice-id-2>", "Second slice ID").option("--json", "Output as JSON").action(
|
|
2180
|
+
(file, sliceId1, sliceId2, options) => {
|
|
2181
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2182
|
+
const current = loadState(filePath);
|
|
2183
|
+
const slice1 = current.slices.find((s) => s.id === sliceId1);
|
|
2184
|
+
const slice2 = current.slices.find((s) => s.id === sliceId2);
|
|
2185
|
+
if (!slice1 || !slice2) {
|
|
2186
|
+
fail("One or both slice IDs not found", options.json);
|
|
2187
|
+
}
|
|
2188
|
+
const state = applyAction(filePath, {
|
|
2189
|
+
type: "SORT_SLICES",
|
|
2190
|
+
slices: current.slices.map((s) => {
|
|
2191
|
+
if (s.id === sliceId1)
|
|
2192
|
+
return { id: s.id, boxNumber: slice2.boxNumber };
|
|
2193
|
+
if (s.id === sliceId2)
|
|
2194
|
+
return { id: s.id, boxNumber: slice1.boxNumber };
|
|
2195
|
+
return { id: s.id, boxNumber: s.boxNumber };
|
|
2196
|
+
})
|
|
2197
|
+
});
|
|
2198
|
+
output(
|
|
2199
|
+
state,
|
|
2200
|
+
Boolean(options.json),
|
|
2201
|
+
`Boxes swapped (${sliceId1} <-> ${sliceId2})`
|
|
2202
|
+
);
|
|
2203
|
+
}
|
|
2204
|
+
);
|
|
2205
|
+
var layer = program.command("layer").description("Manage layers");
|
|
2206
|
+
layer.command("split").description("Split a layer at a task (tasks after it go to the new layer)").argument("<file>", "Path to the .vertical file").argument("<task-id>", "Task ID to split at").option("--json", "Output as JSON").action((file, taskId, options) => {
|
|
2207
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2208
|
+
const current = loadState(filePath);
|
|
2209
|
+
const foundTask = current.tasks.find((t) => t.id === taskId);
|
|
2210
|
+
if (!foundTask) {
|
|
2211
|
+
fail(`Task not found: ${taskId}`, options.json);
|
|
2212
|
+
}
|
|
2213
|
+
const currentLayer = current.layers.find((l) => l.id === foundTask.layerId);
|
|
2214
|
+
if (!currentLayer) {
|
|
2215
|
+
fail(`Layer not found for task: ${taskId}`, options.json);
|
|
2216
|
+
}
|
|
2217
|
+
const nextLayer = current.layers.filter(
|
|
2218
|
+
(l) => l.sliceId === currentLayer.sliceId && l.sorting > currentLayer.sorting
|
|
2219
|
+
).sort((a, b) => a.sorting - b.sorting)[0];
|
|
2220
|
+
const newLayerSorting = nextLayer ? (currentLayer.sorting + nextLayer.sorting) / 2 : currentLayer.sorting + 1;
|
|
2221
|
+
const newLayerId = crypto.randomUUID();
|
|
2222
|
+
const state = applyAction(filePath, {
|
|
2223
|
+
type: "SPLIT_LAYER",
|
|
2224
|
+
taskId,
|
|
2225
|
+
newLayerId,
|
|
2226
|
+
currentLayerId: currentLayer.id,
|
|
2227
|
+
sliceId: currentLayer.sliceId,
|
|
2228
|
+
taskSorting: foundTask.sorting,
|
|
2229
|
+
newLayerSorting
|
|
2230
|
+
});
|
|
2231
|
+
output(
|
|
2232
|
+
state,
|
|
2233
|
+
Boolean(options.json),
|
|
2234
|
+
`Layer split. New layer created (id: ${newLayerId})`
|
|
2235
|
+
);
|
|
2236
|
+
});
|
|
2237
|
+
layer.command("merge").description("Merge a layer with the next one (unsplit)").argument("<file>", "Path to the .vertical file").argument("<layer-id>", "Layer ID").option("--json", "Output as JSON").action((file, layerId, options) => {
|
|
2238
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2239
|
+
const state = applyAction(filePath, { type: "UNSPLIT_LAYER", layerId });
|
|
2240
|
+
output(state, Boolean(options.json), `Layer merged (id: ${layerId})`);
|
|
2241
|
+
});
|
|
2242
|
+
layer.command("rename").description("Rename a layer").argument("<file>", "Path to the .vertical file").argument("<layer-id>", "Layer ID").argument("<name>", "New layer name").option("--json", "Output as JSON").action(
|
|
2243
|
+
(file, layerId, name, options) => {
|
|
2244
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2245
|
+
const state = applyAction(filePath, {
|
|
2246
|
+
type: "RENAME_LAYER",
|
|
2247
|
+
layerId,
|
|
2248
|
+
name
|
|
2249
|
+
});
|
|
2250
|
+
output(state, Boolean(options.json), `Layer renamed (id: ${layerId})`);
|
|
2251
|
+
}
|
|
2252
|
+
);
|
|
2253
|
+
layer.command("clear").description("Clear the name of a layer").argument("<file>", "Path to the .vertical file").argument("<layer-id>", "Layer ID").option("--json", "Output as JSON").action((file, layerId, options) => {
|
|
2254
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2255
|
+
const state = applyAction(filePath, { type: "UNNAME_LAYER", layerId });
|
|
2256
|
+
output(state, Boolean(options.json), `Layer name cleared (id: ${layerId})`);
|
|
2257
|
+
});
|
|
2258
|
+
layer.command("status").description("Set the status of a layer").argument("<file>", "Path to the .vertical file").argument("<layer-id>", "Layer ID").argument("<status>", '"done" or "none"').option("--json", "Output as JSON").action(
|
|
2259
|
+
(file, layerId, status, options) => {
|
|
2260
|
+
const filePath = resolveFilePath(file, options.json);
|
|
2261
|
+
const resolvedStatus = status === "done" ? "done" : null;
|
|
2262
|
+
const state = applyAction(filePath, {
|
|
2263
|
+
type: "SET_LAYER_STATUS",
|
|
2264
|
+
layerId,
|
|
2265
|
+
status: resolvedStatus
|
|
2266
|
+
});
|
|
2267
|
+
output(
|
|
2268
|
+
state,
|
|
2269
|
+
Boolean(options.json),
|
|
2270
|
+
`Layer status set to ${status} (id: ${layerId})`
|
|
2271
|
+
);
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2274
|
+
if (process.argv.length === 2) {
|
|
2275
|
+
program.outputHelp();
|
|
2276
|
+
} else {
|
|
2277
|
+
program.parse(process.argv);
|
|
2278
|
+
}
|
|
2279
|
+
/*! Bundled license information:
|
|
2280
|
+
|
|
2281
|
+
lodash-es/lodash.js:
|
|
2282
|
+
(**
|
|
2283
|
+
* @license
|
|
2284
|
+
* Lodash (Custom Build) <https://lodash.com/>
|
|
2285
|
+
* Build: `lodash modularize exports="es" -o ./`
|
|
2286
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
2287
|
+
* Released under MIT license <https://lodash.com/license>
|
|
2288
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2289
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2290
|
+
*)
|
|
2291
|
+
*/
|