@player-devtools/basic-plugin 0.0.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BasicDevtoolsPlugin.native.js +2390 -0
- package/dist/BasicDevtoolsPlugin.native.js.map +1 -0
- package/dist/cjs/index.cjs +143 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/index.legacy-esm.js +122 -0
- package/dist/index.mjs +122 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +39 -0
- package/src/__tests__/plugin.test.ts +59 -0
- package/src/helpers/__tests__/getEvaluateExpression.test.ts +114 -0
- package/src/helpers/getEvaluateExpression.ts +59 -0
- package/src/helpers/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/plugin.ts +194 -0
- package/src/types.ts +10 -0
- package/types/helpers/getEvaluateExpression.d.ts +13 -0
- package/types/helpers/index.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/types/plugin.d.ts +24 -0
- package/types/types.d.ts +11 -0
|
@@ -0,0 +1,2390 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
function _array_without_holes(arr) {
|
|
11
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
12
|
+
}
|
|
13
|
+
function _assert_this_initialized(self) {
|
|
14
|
+
if (self === void 0) {
|
|
15
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
+
}
|
|
17
|
+
return self;
|
|
18
|
+
}
|
|
19
|
+
function _class_call_check(instance, Constructor) {
|
|
20
|
+
if (!(instance instanceof Constructor)) {
|
|
21
|
+
throw new TypeError("Cannot call a class as a function");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function _defineProperties(target, props) {
|
|
25
|
+
for(var i = 0; i < props.length; i++){
|
|
26
|
+
var descriptor = props[i];
|
|
27
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
28
|
+
descriptor.configurable = true;
|
|
29
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
30
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
34
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
35
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
36
|
+
return Constructor;
|
|
37
|
+
}
|
|
38
|
+
function _define_property(obj, key, value) {
|
|
39
|
+
if (key in obj) {
|
|
40
|
+
Object.defineProperty(obj, key, {
|
|
41
|
+
value: value,
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
obj[key] = value;
|
|
48
|
+
}
|
|
49
|
+
return obj;
|
|
50
|
+
}
|
|
51
|
+
function _get(target, property, receiver) {
|
|
52
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
53
|
+
_get = Reflect.get;
|
|
54
|
+
} else {
|
|
55
|
+
_get = function get(target, property, receiver) {
|
|
56
|
+
var base = _super_prop_base(target, property);
|
|
57
|
+
if (!base) return;
|
|
58
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
59
|
+
if (desc.get) {
|
|
60
|
+
return desc.get.call(receiver || target);
|
|
61
|
+
}
|
|
62
|
+
return desc.value;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return _get(target, property, receiver || target);
|
|
66
|
+
}
|
|
67
|
+
function _get_prototype_of(o) {
|
|
68
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
69
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
70
|
+
};
|
|
71
|
+
return _get_prototype_of(o);
|
|
72
|
+
}
|
|
73
|
+
function _inherits(subClass, superClass) {
|
|
74
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
75
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
76
|
+
}
|
|
77
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
78
|
+
constructor: {
|
|
79
|
+
value: subClass,
|
|
80
|
+
writable: true,
|
|
81
|
+
configurable: true
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
85
|
+
}
|
|
86
|
+
function _instanceof(left, right) {
|
|
87
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
88
|
+
return !!right[Symbol.hasInstance](left);
|
|
89
|
+
} else {
|
|
90
|
+
return left instanceof right;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function _iterable_to_array(iter) {
|
|
94
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
95
|
+
}
|
|
96
|
+
function _iterable_to_array_limit(arr, i) {
|
|
97
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
98
|
+
if (_i == null) return;
|
|
99
|
+
var _arr = [];
|
|
100
|
+
var _n = true;
|
|
101
|
+
var _d = false;
|
|
102
|
+
var _s, _e;
|
|
103
|
+
try {
|
|
104
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
105
|
+
_arr.push(_s.value);
|
|
106
|
+
if (i && _arr.length === i) break;
|
|
107
|
+
}
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_d = true;
|
|
110
|
+
_e = err;
|
|
111
|
+
} finally{
|
|
112
|
+
try {
|
|
113
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
114
|
+
} finally{
|
|
115
|
+
if (_d) throw _e;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return _arr;
|
|
119
|
+
}
|
|
120
|
+
function _non_iterable_rest() {
|
|
121
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
122
|
+
}
|
|
123
|
+
function _non_iterable_spread() {
|
|
124
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
125
|
+
}
|
|
126
|
+
function _object_spread(target) {
|
|
127
|
+
for(var i = 1; i < arguments.length; i++){
|
|
128
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
129
|
+
var ownKeys = Object.keys(source);
|
|
130
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
131
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
132
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
ownKeys.forEach(function(key) {
|
|
136
|
+
_define_property(target, key, source[key]);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return target;
|
|
140
|
+
}
|
|
141
|
+
function ownKeys(object, enumerableOnly) {
|
|
142
|
+
var keys = Object.keys(object);
|
|
143
|
+
if (Object.getOwnPropertySymbols) {
|
|
144
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
145
|
+
if (enumerableOnly) {
|
|
146
|
+
symbols = symbols.filter(function(sym) {
|
|
147
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
keys.push.apply(keys, symbols);
|
|
151
|
+
}
|
|
152
|
+
return keys;
|
|
153
|
+
}
|
|
154
|
+
function _object_spread_props(target, source) {
|
|
155
|
+
source = source != null ? source : {};
|
|
156
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
157
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
158
|
+
} else {
|
|
159
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
160
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return target;
|
|
164
|
+
}
|
|
165
|
+
function _possible_constructor_return(self, call) {
|
|
166
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
167
|
+
return call;
|
|
168
|
+
}
|
|
169
|
+
return _assert_this_initialized(self);
|
|
170
|
+
}
|
|
171
|
+
function _set_prototype_of(o, p) {
|
|
172
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
173
|
+
o.__proto__ = p;
|
|
174
|
+
return o;
|
|
175
|
+
};
|
|
176
|
+
return _set_prototype_of(o, p);
|
|
177
|
+
}
|
|
178
|
+
function _sliced_to_array(arr, i) {
|
|
179
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
180
|
+
}
|
|
181
|
+
function _super_prop_base(object, property) {
|
|
182
|
+
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
183
|
+
object = _get_prototype_of(object);
|
|
184
|
+
if (object === null) break;
|
|
185
|
+
}
|
|
186
|
+
return object;
|
|
187
|
+
}
|
|
188
|
+
function _to_consumable_array(arr) {
|
|
189
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
190
|
+
}
|
|
191
|
+
function _type_of(obj) {
|
|
192
|
+
"@swc/helpers - typeof";
|
|
193
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
194
|
+
}
|
|
195
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
196
|
+
if (!o) return;
|
|
197
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
198
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
199
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
200
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
201
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
202
|
+
}
|
|
203
|
+
function _is_native_reflect_construct() {
|
|
204
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
205
|
+
if (Reflect.construct.sham) return false;
|
|
206
|
+
if (typeof Proxy === "function") return true;
|
|
207
|
+
try {
|
|
208
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
209
|
+
return true;
|
|
210
|
+
} catch (e) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function _create_super(Derived) {
|
|
215
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
216
|
+
return function _createSuperInternal() {
|
|
217
|
+
var Super = _get_prototype_of(Derived), result;
|
|
218
|
+
if (hasNativeReflectConstruct) {
|
|
219
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
220
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
221
|
+
} else {
|
|
222
|
+
result = Super.apply(this, arguments);
|
|
223
|
+
}
|
|
224
|
+
return _possible_constructor_return(this, result);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
var BasicDevtoolsPlugin = function() {
|
|
228
|
+
var dsetAssign = function dsetAssign(obj, keys, value) {
|
|
229
|
+
var merge = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
230
|
+
var key = keys[keys.length - 1];
|
|
231
|
+
if (!key) throw Error("Unable to assign at path containing undefined keys");
|
|
232
|
+
var _acc_key2;
|
|
233
|
+
var target = keys.slice(0, -1).reduce(function(acc, key2) {
|
|
234
|
+
return (_acc_key2 = acc[key2]) !== null && _acc_key2 !== void 0 ? _acc_key2 : acc[key2] = {};
|
|
235
|
+
}, obj);
|
|
236
|
+
target[key] = deepAssign(target[key], value, merge);
|
|
237
|
+
};
|
|
238
|
+
var die = function die(error) {
|
|
239
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
240
|
+
args[_key - 1] = arguments[_key];
|
|
241
|
+
}
|
|
242
|
+
if (false) {
|
|
243
|
+
var e = errors[error];
|
|
244
|
+
var msg = typeof e === "function" ? e.apply(null, args) : e;
|
|
245
|
+
throw new Error("[Immer] ".concat(msg));
|
|
246
|
+
}
|
|
247
|
+
throw new Error("[Immer] minified error nr: ".concat(error, ". Full error at: https://bit.ly/3cXEKWf"));
|
|
248
|
+
};
|
|
249
|
+
var isDraft = function isDraft(value) {
|
|
250
|
+
return !!value && !!value[DRAFT_STATE];
|
|
251
|
+
};
|
|
252
|
+
var isDraftable = function isDraftable(value) {
|
|
253
|
+
var _value_constructor;
|
|
254
|
+
if (!value) return false;
|
|
255
|
+
return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_value_constructor = value.constructor) === null || _value_constructor === void 0 ? void 0 : _value_constructor[DRAFTABLE]) || isMap(value) || isSet(value);
|
|
256
|
+
};
|
|
257
|
+
var isPlainObject = function isPlainObject(value) {
|
|
258
|
+
if (!value || typeof value !== "object") return false;
|
|
259
|
+
var proto = getPrototypeOf(value);
|
|
260
|
+
if (proto === null) {
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
var Ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
264
|
+
if (Ctor === Object) return true;
|
|
265
|
+
return typeof Ctor == "function" && Function.toString.call(Ctor) === objectCtorString;
|
|
266
|
+
};
|
|
267
|
+
var each = function each(obj, iter) {
|
|
268
|
+
if (getArchtype(obj) === 0) {
|
|
269
|
+
Reflect.ownKeys(obj).forEach(function(key) {
|
|
270
|
+
iter(key, obj[key], obj);
|
|
271
|
+
});
|
|
272
|
+
} else {
|
|
273
|
+
obj.forEach(function(entry, index) {
|
|
274
|
+
return iter(index, entry, obj);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
var getArchtype = function getArchtype(thing) {
|
|
279
|
+
var state = thing[DRAFT_STATE];
|
|
280
|
+
return state ? state.type_ : Array.isArray(thing) ? 1 : isMap(thing) ? 2 : isSet(thing) ? 3 : 0;
|
|
281
|
+
};
|
|
282
|
+
var has = function has(thing, prop) {
|
|
283
|
+
return getArchtype(thing) === 2 ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
|
|
284
|
+
};
|
|
285
|
+
var set = function set(thing, propOrOldValue, value) {
|
|
286
|
+
var t = getArchtype(thing);
|
|
287
|
+
if (t === 2) thing.set(propOrOldValue, value);
|
|
288
|
+
else if (t === 3) {
|
|
289
|
+
thing.add(value);
|
|
290
|
+
} else thing[propOrOldValue] = value;
|
|
291
|
+
};
|
|
292
|
+
var is = function is(x, y) {
|
|
293
|
+
if (x === y) {
|
|
294
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
295
|
+
} else {
|
|
296
|
+
return x !== x && y !== y;
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
var isMap = function isMap(target) {
|
|
300
|
+
return _instanceof(target, Map);
|
|
301
|
+
};
|
|
302
|
+
var isSet = function isSet(target) {
|
|
303
|
+
return _instanceof(target, Set);
|
|
304
|
+
};
|
|
305
|
+
var latest = function latest(state) {
|
|
306
|
+
return state.copy_ || state.base_;
|
|
307
|
+
};
|
|
308
|
+
var shallowCopy = function shallowCopy(base, strict) {
|
|
309
|
+
if (isMap(base)) {
|
|
310
|
+
return new Map(base);
|
|
311
|
+
}
|
|
312
|
+
if (isSet(base)) {
|
|
313
|
+
return new Set(base);
|
|
314
|
+
}
|
|
315
|
+
if (Array.isArray(base)) return Array.prototype.slice.call(base);
|
|
316
|
+
var isPlain = isPlainObject(base);
|
|
317
|
+
if (strict === true || strict === "class_only" && !isPlain) {
|
|
318
|
+
var descriptors = Object.getOwnPropertyDescriptors(base);
|
|
319
|
+
delete descriptors[DRAFT_STATE];
|
|
320
|
+
var keys = Reflect.ownKeys(descriptors);
|
|
321
|
+
for(var i = 0; i < keys.length; i++){
|
|
322
|
+
var key = keys[i];
|
|
323
|
+
var desc = descriptors[key];
|
|
324
|
+
if (desc.writable === false) {
|
|
325
|
+
desc.writable = true;
|
|
326
|
+
desc.configurable = true;
|
|
327
|
+
}
|
|
328
|
+
if (desc.get || desc.set) descriptors[key] = {
|
|
329
|
+
configurable: true,
|
|
330
|
+
writable: true,
|
|
331
|
+
// could live with !!desc.set as well here...
|
|
332
|
+
enumerable: desc.enumerable,
|
|
333
|
+
value: base[key]
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
return Object.create(getPrototypeOf(base), descriptors);
|
|
337
|
+
} else {
|
|
338
|
+
var proto = getPrototypeOf(base);
|
|
339
|
+
if (proto !== null && isPlain) {
|
|
340
|
+
return _object_spread({}, base);
|
|
341
|
+
}
|
|
342
|
+
var obj = Object.create(proto);
|
|
343
|
+
return Object.assign(obj, base);
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
var dontMutateFrozenCollections = function dontMutateFrozenCollections() {
|
|
347
|
+
die(2);
|
|
348
|
+
};
|
|
349
|
+
var isFrozen = function isFrozen(obj) {
|
|
350
|
+
return Object.isFrozen(obj);
|
|
351
|
+
};
|
|
352
|
+
var getPlugin = function getPlugin(pluginKey) {
|
|
353
|
+
var plugin = plugins[pluginKey];
|
|
354
|
+
if (!plugin) {
|
|
355
|
+
die(0, pluginKey);
|
|
356
|
+
}
|
|
357
|
+
return plugin;
|
|
358
|
+
};
|
|
359
|
+
var getCurrentScope = function getCurrentScope() {
|
|
360
|
+
return currentScope;
|
|
361
|
+
};
|
|
362
|
+
var createScope = function createScope(parent_, immer_) {
|
|
363
|
+
return {
|
|
364
|
+
drafts_: [],
|
|
365
|
+
parent_: parent_,
|
|
366
|
+
immer_: immer_,
|
|
367
|
+
// Whenever the modified draft contains a draft from another scope, we
|
|
368
|
+
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
369
|
+
canAutoFreeze_: true,
|
|
370
|
+
unfinalizedDrafts_: 0
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
var usePatchesInScope = function usePatchesInScope(scope, patchListener) {
|
|
374
|
+
if (patchListener) {
|
|
375
|
+
getPlugin("Patches");
|
|
376
|
+
scope.patches_ = [];
|
|
377
|
+
scope.inversePatches_ = [];
|
|
378
|
+
scope.patchListener_ = patchListener;
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
var revokeScope = function revokeScope(scope) {
|
|
382
|
+
leaveScope(scope);
|
|
383
|
+
scope.drafts_.forEach(revokeDraft);
|
|
384
|
+
scope.drafts_ = null;
|
|
385
|
+
};
|
|
386
|
+
var leaveScope = function leaveScope(scope) {
|
|
387
|
+
if (scope === currentScope) {
|
|
388
|
+
currentScope = scope.parent_;
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
var enterScope = function enterScope(immer2) {
|
|
392
|
+
return currentScope = createScope(currentScope, immer2);
|
|
393
|
+
};
|
|
394
|
+
var revokeDraft = function revokeDraft(draft) {
|
|
395
|
+
var state = draft[DRAFT_STATE];
|
|
396
|
+
if (state.type_ === 0 || state.type_ === 1) state.revoke_();
|
|
397
|
+
else state.revoked_ = true;
|
|
398
|
+
};
|
|
399
|
+
var processResult = function processResult(result, scope) {
|
|
400
|
+
scope.unfinalizedDrafts_ = scope.drafts_.length;
|
|
401
|
+
var baseDraft = scope.drafts_[0];
|
|
402
|
+
var isReplaced = result !== void 0 && result !== baseDraft;
|
|
403
|
+
if (isReplaced) {
|
|
404
|
+
if (baseDraft[DRAFT_STATE].modified_) {
|
|
405
|
+
revokeScope(scope);
|
|
406
|
+
die(4);
|
|
407
|
+
}
|
|
408
|
+
if (isDraftable(result)) {
|
|
409
|
+
result = finalize(scope, result);
|
|
410
|
+
if (!scope.parent_) maybeFreeze(scope, result);
|
|
411
|
+
}
|
|
412
|
+
if (scope.patches_) {
|
|
413
|
+
getPlugin("Patches").generateReplacementPatches_(baseDraft[DRAFT_STATE].base_, result, scope.patches_, scope.inversePatches_);
|
|
414
|
+
}
|
|
415
|
+
} else {
|
|
416
|
+
result = finalize(scope, baseDraft, []);
|
|
417
|
+
}
|
|
418
|
+
revokeScope(scope);
|
|
419
|
+
if (scope.patches_) {
|
|
420
|
+
scope.patchListener_(scope.patches_, scope.inversePatches_);
|
|
421
|
+
}
|
|
422
|
+
return result !== NOTHING ? result : void 0;
|
|
423
|
+
};
|
|
424
|
+
var finalize = function finalize(rootScope, value, path) {
|
|
425
|
+
if (isFrozen(value)) return value;
|
|
426
|
+
var state = value[DRAFT_STATE];
|
|
427
|
+
if (!state) {
|
|
428
|
+
each(value, function(key, childValue) {
|
|
429
|
+
return finalizeProperty(rootScope, state, value, key, childValue, path);
|
|
430
|
+
});
|
|
431
|
+
return value;
|
|
432
|
+
}
|
|
433
|
+
if (state.scope_ !== rootScope) return value;
|
|
434
|
+
if (!state.modified_) {
|
|
435
|
+
maybeFreeze(rootScope, state.base_, true);
|
|
436
|
+
return state.base_;
|
|
437
|
+
}
|
|
438
|
+
if (!state.finalized_) {
|
|
439
|
+
state.finalized_ = true;
|
|
440
|
+
state.scope_.unfinalizedDrafts_--;
|
|
441
|
+
var result = state.copy_;
|
|
442
|
+
var resultEach = result;
|
|
443
|
+
var isSet2 = false;
|
|
444
|
+
if (state.type_ === 3) {
|
|
445
|
+
resultEach = new Set(result);
|
|
446
|
+
result.clear();
|
|
447
|
+
isSet2 = true;
|
|
448
|
+
}
|
|
449
|
+
each(resultEach, function(key, childValue) {
|
|
450
|
+
return finalizeProperty(rootScope, state, result, key, childValue, path, isSet2);
|
|
451
|
+
});
|
|
452
|
+
maybeFreeze(rootScope, result, false);
|
|
453
|
+
if (path && rootScope.patches_) {
|
|
454
|
+
getPlugin("Patches").generatePatches_(state, path, rootScope.patches_, rootScope.inversePatches_);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return state.copy_;
|
|
458
|
+
};
|
|
459
|
+
var finalizeProperty = function finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {
|
|
460
|
+
if (false) die(5);
|
|
461
|
+
if (isDraft(childValue)) {
|
|
462
|
+
var path = rootPath && parentState && parentState.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
463
|
+
!has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
|
|
464
|
+
var res = finalize(rootScope, childValue, path);
|
|
465
|
+
set(targetObject, prop, res);
|
|
466
|
+
if (isDraft(res)) {
|
|
467
|
+
rootScope.canAutoFreeze_ = false;
|
|
468
|
+
} else return;
|
|
469
|
+
} else if (targetIsSet) {
|
|
470
|
+
targetObject.add(childValue);
|
|
471
|
+
}
|
|
472
|
+
if (isDraftable(childValue) && !isFrozen(childValue)) {
|
|
473
|
+
if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
finalize(rootScope, childValue);
|
|
477
|
+
if ((!parentState || !parentState.scope_.parent_) && (typeof prop === "undefined" ? "undefined" : _type_of(prop)) !== "symbol" && (isMap(targetObject) ? targetObject.has(prop) : Object.prototype.propertyIsEnumerable.call(targetObject, prop))) maybeFreeze(rootScope, childValue);
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
var maybeFreeze = function maybeFreeze(scope, value) {
|
|
481
|
+
var deep = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
482
|
+
if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {
|
|
483
|
+
freeze(value, deep);
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
var createProxyProxy = function createProxyProxy(base, parent) {
|
|
487
|
+
var isArray = Array.isArray(base);
|
|
488
|
+
var state = {
|
|
489
|
+
type_: isArray ? 1 : 0,
|
|
490
|
+
// Track which produce call this is associated with.
|
|
491
|
+
scope_: parent ? parent.scope_ : getCurrentScope(),
|
|
492
|
+
// True for both shallow and deep changes.
|
|
493
|
+
modified_: false,
|
|
494
|
+
// Used during finalization.
|
|
495
|
+
finalized_: false,
|
|
496
|
+
// Track which properties have been assigned (true) or deleted (false).
|
|
497
|
+
assigned_: {},
|
|
498
|
+
// The parent draft state.
|
|
499
|
+
parent_: parent,
|
|
500
|
+
// The base state.
|
|
501
|
+
base_: base,
|
|
502
|
+
// The base proxy.
|
|
503
|
+
draft_: null,
|
|
504
|
+
// set below
|
|
505
|
+
// The base copy with any updated values.
|
|
506
|
+
copy_: null,
|
|
507
|
+
// Called by the `produce` function.
|
|
508
|
+
revoke_: null,
|
|
509
|
+
isManual_: false
|
|
510
|
+
};
|
|
511
|
+
var target = state;
|
|
512
|
+
var traps = objectTraps;
|
|
513
|
+
if (isArray) {
|
|
514
|
+
target = [
|
|
515
|
+
state
|
|
516
|
+
];
|
|
517
|
+
traps = arrayTraps;
|
|
518
|
+
}
|
|
519
|
+
var _Proxy_revocable = Proxy.revocable(target, traps), revoke = _Proxy_revocable.revoke, proxy = _Proxy_revocable.proxy;
|
|
520
|
+
state.draft_ = proxy;
|
|
521
|
+
state.revoke_ = revoke;
|
|
522
|
+
return proxy;
|
|
523
|
+
};
|
|
524
|
+
var peek = function peek(draft, prop) {
|
|
525
|
+
var state = draft[DRAFT_STATE];
|
|
526
|
+
var source = state ? latest(state) : draft;
|
|
527
|
+
return source[prop];
|
|
528
|
+
};
|
|
529
|
+
var readPropFromProto = function readPropFromProto(state, source, prop) {
|
|
530
|
+
var // This is a very special case, if the prop is a getter defined by the
|
|
531
|
+
// prototype, we should invoke it with the draft as context!
|
|
532
|
+
_desc_get;
|
|
533
|
+
var desc = getDescriptorFromProto(source, prop);
|
|
534
|
+
return desc ? "value" in desc ? desc.value : (_desc_get = desc.get) === null || _desc_get === void 0 ? void 0 : _desc_get.call(state.draft_) : void 0;
|
|
535
|
+
};
|
|
536
|
+
var getDescriptorFromProto = function getDescriptorFromProto(source, prop) {
|
|
537
|
+
if (!(prop in source)) return void 0;
|
|
538
|
+
var proto = getPrototypeOf(source);
|
|
539
|
+
while(proto){
|
|
540
|
+
var desc = Object.getOwnPropertyDescriptor(proto, prop);
|
|
541
|
+
if (desc) return desc;
|
|
542
|
+
proto = getPrototypeOf(proto);
|
|
543
|
+
}
|
|
544
|
+
return void 0;
|
|
545
|
+
};
|
|
546
|
+
var prepareCopy = function prepareCopy(state) {
|
|
547
|
+
if (!state.copy_) {
|
|
548
|
+
state.copy_ = shallowCopy(state.base_, state.scope_.immer_.useStrictShallowCopy_);
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
var createProxy = function createProxy(value, parent) {
|
|
552
|
+
var draft = isMap(value) ? getPlugin("MapSet").proxyMap_(value, parent) : isSet(value) ? getPlugin("MapSet").proxySet_(value, parent) : createProxyProxy(value, parent);
|
|
553
|
+
var scope = parent ? parent.scope_ : getCurrentScope();
|
|
554
|
+
scope.drafts_.push(draft);
|
|
555
|
+
return draft;
|
|
556
|
+
};
|
|
557
|
+
var current = function current(value) {
|
|
558
|
+
if (!isDraft(value)) die(10, value);
|
|
559
|
+
return currentImpl(value);
|
|
560
|
+
};
|
|
561
|
+
var find = function find(iter, tar, key) {
|
|
562
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
563
|
+
try {
|
|
564
|
+
for(var _iterator = iter.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
565
|
+
key = _step.value;
|
|
566
|
+
if (dequal(key, tar)) return key;
|
|
567
|
+
}
|
|
568
|
+
} catch (err) {
|
|
569
|
+
_didIteratorError = true;
|
|
570
|
+
_iteratorError = err;
|
|
571
|
+
} finally{
|
|
572
|
+
try {
|
|
573
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
574
|
+
_iterator.return();
|
|
575
|
+
}
|
|
576
|
+
} finally{
|
|
577
|
+
if (_didIteratorError) {
|
|
578
|
+
throw _iteratorError;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
var generateUUID = function generateUUID() {
|
|
584
|
+
var d = /* @__PURE__ */ new Date().getTime();
|
|
585
|
+
var d2 = typeof performance !== "undefined" && performance.now && performance.now() * 1e3 || 0;
|
|
586
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
587
|
+
var r = Math.random() * 16;
|
|
588
|
+
if (d > 0) {
|
|
589
|
+
r = (d + r) % 16 | 0;
|
|
590
|
+
d = Math.floor(d / 16);
|
|
591
|
+
} else {
|
|
592
|
+
r = (d2 + r) % 16 | 0;
|
|
593
|
+
d2 = Math.floor(d2 / 16);
|
|
594
|
+
}
|
|
595
|
+
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
596
|
+
});
|
|
597
|
+
};
|
|
598
|
+
var __defProp = Object.defineProperty;
|
|
599
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
600
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
601
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
602
|
+
var __export = function(target, all) {
|
|
603
|
+
for(var name in all)__defProp(target, name, {
|
|
604
|
+
get: all[name],
|
|
605
|
+
enumerable: true
|
|
606
|
+
});
|
|
607
|
+
};
|
|
608
|
+
var __copyProps = function(to, from, except, desc) {
|
|
609
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
610
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
611
|
+
try {
|
|
612
|
+
var _loop = function() {
|
|
613
|
+
var key = _step.value;
|
|
614
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
615
|
+
get: function() {
|
|
616
|
+
return from[key];
|
|
617
|
+
},
|
|
618
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
619
|
+
});
|
|
620
|
+
};
|
|
621
|
+
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
622
|
+
} catch (err) {
|
|
623
|
+
_didIteratorError = true;
|
|
624
|
+
_iteratorError = err;
|
|
625
|
+
} finally{
|
|
626
|
+
try {
|
|
627
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
628
|
+
_iterator.return();
|
|
629
|
+
}
|
|
630
|
+
} finally{
|
|
631
|
+
if (_didIteratorError) {
|
|
632
|
+
throw _iteratorError;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return to;
|
|
638
|
+
};
|
|
639
|
+
var __toCommonJS = function(mod) {
|
|
640
|
+
return __copyProps(__defProp({}, "__esModule", {
|
|
641
|
+
value: true
|
|
642
|
+
}), mod);
|
|
643
|
+
};
|
|
644
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/plugins/basic/core/src/index.ts
|
|
645
|
+
var src_exports = {};
|
|
646
|
+
__export(src_exports, {
|
|
647
|
+
BasicDevtoolsPlugin: function() {
|
|
648
|
+
return BasicDevtoolsPlugin;
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-devtools+basic-plugin-content@0.0.0/node_modules/@player-devtools/basic-plugin-content/dist/index.mjs
|
|
652
|
+
var PLUGIN_ID = "player-ui-basic-devtools-plugin";
|
|
653
|
+
var INTERACTIONS = {
|
|
654
|
+
EVALUATE_EXPRESSION: "evaluate-expression",
|
|
655
|
+
OVERRIDE_FLOW: "override-flow"
|
|
656
|
+
};
|
|
657
|
+
var flow_default = {
|
|
658
|
+
id: "player-ui-basic-devtools-plugin",
|
|
659
|
+
views: [
|
|
660
|
+
{
|
|
661
|
+
id: "Config",
|
|
662
|
+
type: "stacked-view",
|
|
663
|
+
header: {
|
|
664
|
+
asset: {
|
|
665
|
+
id: "Config-header",
|
|
666
|
+
type: "navigation",
|
|
667
|
+
values: [
|
|
668
|
+
{
|
|
669
|
+
asset: {
|
|
670
|
+
id: "Config-header-values-0",
|
|
671
|
+
type: "action",
|
|
672
|
+
value: "Config",
|
|
673
|
+
label: {
|
|
674
|
+
asset: {
|
|
675
|
+
id: "Config-header-values-0-label",
|
|
676
|
+
type: "text",
|
|
677
|
+
value: "Config"
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
asset: {
|
|
684
|
+
id: "Config-header-values-1",
|
|
685
|
+
type: "action",
|
|
686
|
+
value: "Flow",
|
|
687
|
+
label: {
|
|
688
|
+
asset: {
|
|
689
|
+
id: "Config-header-values-1-label",
|
|
690
|
+
type: "text",
|
|
691
|
+
value: "Flow"
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
asset: {
|
|
698
|
+
id: "Config-header-values-2",
|
|
699
|
+
type: "action",
|
|
700
|
+
value: "Logs",
|
|
701
|
+
label: {
|
|
702
|
+
asset: {
|
|
703
|
+
id: "Config-header-values-2-label",
|
|
704
|
+
type: "text",
|
|
705
|
+
value: "Logs"
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
asset: {
|
|
712
|
+
id: "Config-header-values-3",
|
|
713
|
+
type: "action",
|
|
714
|
+
value: "Console",
|
|
715
|
+
label: {
|
|
716
|
+
asset: {
|
|
717
|
+
id: "Config-header-values-3-label",
|
|
718
|
+
type: "text",
|
|
719
|
+
value: "Console"
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
asset: {
|
|
726
|
+
id: "Config-header-values-4",
|
|
727
|
+
type: "action",
|
|
728
|
+
value: "Editor",
|
|
729
|
+
label: {
|
|
730
|
+
asset: {
|
|
731
|
+
id: "Config-header-values-4-label",
|
|
732
|
+
type: "text",
|
|
733
|
+
value: "Editor"
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
main: {
|
|
742
|
+
asset: {
|
|
743
|
+
id: "Config-main",
|
|
744
|
+
type: "object-inspector",
|
|
745
|
+
binding: "playerConfig",
|
|
746
|
+
label: {
|
|
747
|
+
asset: {
|
|
748
|
+
id: "Config-main-label",
|
|
749
|
+
type: "text",
|
|
750
|
+
value: "Config"
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
id: "Flow",
|
|
758
|
+
type: "stacked-view",
|
|
759
|
+
header: {
|
|
760
|
+
asset: {
|
|
761
|
+
id: "Flow-header",
|
|
762
|
+
type: "navigation",
|
|
763
|
+
values: [
|
|
764
|
+
{
|
|
765
|
+
asset: {
|
|
766
|
+
id: "Flow-header-values-0",
|
|
767
|
+
type: "action",
|
|
768
|
+
value: "Config",
|
|
769
|
+
label: {
|
|
770
|
+
asset: {
|
|
771
|
+
id: "Flow-header-values-0-label",
|
|
772
|
+
type: "text",
|
|
773
|
+
value: "Config"
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
asset: {
|
|
780
|
+
id: "Flow-header-values-1",
|
|
781
|
+
type: "action",
|
|
782
|
+
value: "Flow",
|
|
783
|
+
label: {
|
|
784
|
+
asset: {
|
|
785
|
+
id: "Flow-header-values-1-label",
|
|
786
|
+
type: "text",
|
|
787
|
+
value: "Flow"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
asset: {
|
|
794
|
+
id: "Flow-header-values-2",
|
|
795
|
+
type: "action",
|
|
796
|
+
value: "Logs",
|
|
797
|
+
label: {
|
|
798
|
+
asset: {
|
|
799
|
+
id: "Flow-header-values-2-label",
|
|
800
|
+
type: "text",
|
|
801
|
+
value: "Logs"
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
asset: {
|
|
808
|
+
id: "Flow-header-values-3",
|
|
809
|
+
type: "action",
|
|
810
|
+
value: "Console",
|
|
811
|
+
label: {
|
|
812
|
+
asset: {
|
|
813
|
+
id: "Flow-header-values-3-label",
|
|
814
|
+
type: "text",
|
|
815
|
+
value: "Console"
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
asset: {
|
|
822
|
+
id: "Flow-header-values-4",
|
|
823
|
+
type: "action",
|
|
824
|
+
value: "Editor",
|
|
825
|
+
label: {
|
|
826
|
+
asset: {
|
|
827
|
+
id: "Flow-header-values-4-label",
|
|
828
|
+
type: "text",
|
|
829
|
+
value: "Editor"
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
main: {
|
|
838
|
+
asset: {
|
|
839
|
+
id: "Flow-main",
|
|
840
|
+
type: "object-inspector",
|
|
841
|
+
filter: true,
|
|
842
|
+
binding: "flow",
|
|
843
|
+
label: {
|
|
844
|
+
asset: {
|
|
845
|
+
id: "Flow-main-label",
|
|
846
|
+
type: "text",
|
|
847
|
+
value: "Flow"
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
footer: {
|
|
853
|
+
asset: {
|
|
854
|
+
id: "Flow-footer",
|
|
855
|
+
type: "copy-to-clipboard",
|
|
856
|
+
binding: "flow",
|
|
857
|
+
label: {
|
|
858
|
+
asset: {
|
|
859
|
+
id: "Flow-footer-label",
|
|
860
|
+
type: "text",
|
|
861
|
+
value: "Copy flow to the clipboard"
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
id: "Logs",
|
|
869
|
+
type: "stacked-view",
|
|
870
|
+
header: {
|
|
871
|
+
asset: {
|
|
872
|
+
id: "Logs-header",
|
|
873
|
+
type: "navigation",
|
|
874
|
+
values: [
|
|
875
|
+
{
|
|
876
|
+
asset: {
|
|
877
|
+
id: "Logs-header-values-0",
|
|
878
|
+
type: "action",
|
|
879
|
+
value: "Config",
|
|
880
|
+
label: {
|
|
881
|
+
asset: {
|
|
882
|
+
id: "Logs-header-values-0-label",
|
|
883
|
+
type: "text",
|
|
884
|
+
value: "Config"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
asset: {
|
|
891
|
+
id: "Logs-header-values-1",
|
|
892
|
+
type: "action",
|
|
893
|
+
value: "Flow",
|
|
894
|
+
label: {
|
|
895
|
+
asset: {
|
|
896
|
+
id: "Logs-header-values-1-label",
|
|
897
|
+
type: "text",
|
|
898
|
+
value: "Flow"
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
asset: {
|
|
905
|
+
id: "Logs-header-values-2",
|
|
906
|
+
type: "action",
|
|
907
|
+
value: "Logs",
|
|
908
|
+
label: {
|
|
909
|
+
asset: {
|
|
910
|
+
id: "Logs-header-values-2-label",
|
|
911
|
+
type: "text",
|
|
912
|
+
value: "Logs"
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
asset: {
|
|
919
|
+
id: "Logs-header-values-3",
|
|
920
|
+
type: "action",
|
|
921
|
+
value: "Console",
|
|
922
|
+
label: {
|
|
923
|
+
asset: {
|
|
924
|
+
id: "Logs-header-values-3-label",
|
|
925
|
+
type: "text",
|
|
926
|
+
value: "Console"
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
asset: {
|
|
933
|
+
id: "Logs-header-values-4",
|
|
934
|
+
type: "action",
|
|
935
|
+
value: "Editor",
|
|
936
|
+
label: {
|
|
937
|
+
asset: {
|
|
938
|
+
id: "Logs-header-values-4-label",
|
|
939
|
+
type: "text",
|
|
940
|
+
value: "Editor"
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
]
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
main: {
|
|
949
|
+
asset: {
|
|
950
|
+
id: "Logs-main",
|
|
951
|
+
type: "table",
|
|
952
|
+
binding: "logs"
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
id: "Console",
|
|
958
|
+
type: "stacked-view",
|
|
959
|
+
header: {
|
|
960
|
+
asset: {
|
|
961
|
+
id: "Console-header",
|
|
962
|
+
type: "navigation",
|
|
963
|
+
values: [
|
|
964
|
+
{
|
|
965
|
+
asset: {
|
|
966
|
+
id: "Console-header-values-0",
|
|
967
|
+
type: "action",
|
|
968
|
+
value: "Config",
|
|
969
|
+
label: {
|
|
970
|
+
asset: {
|
|
971
|
+
id: "Console-header-values-0-label",
|
|
972
|
+
type: "text",
|
|
973
|
+
value: "Config"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
asset: {
|
|
980
|
+
id: "Console-header-values-1",
|
|
981
|
+
type: "action",
|
|
982
|
+
value: "Flow",
|
|
983
|
+
label: {
|
|
984
|
+
asset: {
|
|
985
|
+
id: "Console-header-values-1-label",
|
|
986
|
+
type: "text",
|
|
987
|
+
value: "Flow"
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
asset: {
|
|
994
|
+
id: "Console-header-values-2",
|
|
995
|
+
type: "action",
|
|
996
|
+
value: "Logs",
|
|
997
|
+
label: {
|
|
998
|
+
asset: {
|
|
999
|
+
id: "Console-header-values-2-label",
|
|
1000
|
+
type: "text",
|
|
1001
|
+
value: "Logs"
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
asset: {
|
|
1008
|
+
id: "Console-header-values-3",
|
|
1009
|
+
type: "action",
|
|
1010
|
+
value: "Console",
|
|
1011
|
+
label: {
|
|
1012
|
+
asset: {
|
|
1013
|
+
id: "Console-header-values-3-label",
|
|
1014
|
+
type: "text",
|
|
1015
|
+
value: "Console"
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
asset: {
|
|
1022
|
+
id: "Console-header-values-4",
|
|
1023
|
+
type: "action",
|
|
1024
|
+
value: "Editor",
|
|
1025
|
+
label: {
|
|
1026
|
+
asset: {
|
|
1027
|
+
id: "Console-header-values-4-label",
|
|
1028
|
+
type: "text",
|
|
1029
|
+
value: "Editor"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
]
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
main: {
|
|
1038
|
+
asset: {
|
|
1039
|
+
id: "Console-main",
|
|
1040
|
+
type: "console",
|
|
1041
|
+
exp: " publish('evaluate-expression', {{expression}}) ",
|
|
1042
|
+
binding: "history"
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
id: "Editor",
|
|
1048
|
+
type: "stacked-view",
|
|
1049
|
+
header: {
|
|
1050
|
+
asset: {
|
|
1051
|
+
id: "Editor-header",
|
|
1052
|
+
type: "navigation",
|
|
1053
|
+
values: [
|
|
1054
|
+
{
|
|
1055
|
+
asset: {
|
|
1056
|
+
id: "Editor-header-values-0",
|
|
1057
|
+
type: "action",
|
|
1058
|
+
value: "Config",
|
|
1059
|
+
label: {
|
|
1060
|
+
asset: {
|
|
1061
|
+
id: "Editor-header-values-0-label",
|
|
1062
|
+
type: "text",
|
|
1063
|
+
value: "Config"
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
asset: {
|
|
1070
|
+
id: "Editor-header-values-1",
|
|
1071
|
+
type: "action",
|
|
1072
|
+
value: "Flow",
|
|
1073
|
+
label: {
|
|
1074
|
+
asset: {
|
|
1075
|
+
id: "Editor-header-values-1-label",
|
|
1076
|
+
type: "text",
|
|
1077
|
+
value: "Flow"
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
asset: {
|
|
1084
|
+
id: "Editor-header-values-2",
|
|
1085
|
+
type: "action",
|
|
1086
|
+
value: "Logs",
|
|
1087
|
+
label: {
|
|
1088
|
+
asset: {
|
|
1089
|
+
id: "Editor-header-values-2-label",
|
|
1090
|
+
type: "text",
|
|
1091
|
+
value: "Logs"
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
asset: {
|
|
1098
|
+
id: "Editor-header-values-3",
|
|
1099
|
+
type: "action",
|
|
1100
|
+
value: "Console",
|
|
1101
|
+
label: {
|
|
1102
|
+
asset: {
|
|
1103
|
+
id: "Editor-header-values-3-label",
|
|
1104
|
+
type: "text",
|
|
1105
|
+
value: "Console"
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
asset: {
|
|
1112
|
+
id: "Editor-header-values-4",
|
|
1113
|
+
type: "action",
|
|
1114
|
+
value: "Editor",
|
|
1115
|
+
label: {
|
|
1116
|
+
asset: {
|
|
1117
|
+
id: "Editor-header-values-4-label",
|
|
1118
|
+
type: "text",
|
|
1119
|
+
value: "Editor"
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
]
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
main: {
|
|
1128
|
+
asset: {
|
|
1129
|
+
id: "Editor-main",
|
|
1130
|
+
type: "code-editor",
|
|
1131
|
+
binding: "flow",
|
|
1132
|
+
exp: " publish('override-flow', {{code}}) "
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
],
|
|
1137
|
+
navigation: {
|
|
1138
|
+
BEGIN: "Plugin",
|
|
1139
|
+
Plugin: {
|
|
1140
|
+
startState: "CONFIG",
|
|
1141
|
+
CONFIG: {
|
|
1142
|
+
state_type: "VIEW",
|
|
1143
|
+
ref: "Config",
|
|
1144
|
+
transitions: {
|
|
1145
|
+
Config: "CONFIG",
|
|
1146
|
+
Flow: "FLOW",
|
|
1147
|
+
Logs: "LOGS",
|
|
1148
|
+
Console: "CONSOLE",
|
|
1149
|
+
Editor: "EDITOR"
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
FLOW: {
|
|
1153
|
+
state_type: "VIEW",
|
|
1154
|
+
ref: "Flow",
|
|
1155
|
+
transitions: {
|
|
1156
|
+
Config: "CONFIG",
|
|
1157
|
+
Flow: "FLOW",
|
|
1158
|
+
Logs: "LOGS",
|
|
1159
|
+
Console: "CONSOLE",
|
|
1160
|
+
Editor: "EDITOR"
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
LOGS: {
|
|
1164
|
+
state_type: "VIEW",
|
|
1165
|
+
ref: "Logs",
|
|
1166
|
+
transitions: {
|
|
1167
|
+
Config: "CONFIG",
|
|
1168
|
+
Flow: "FLOW",
|
|
1169
|
+
Logs: "LOGS",
|
|
1170
|
+
Console: "CONSOLE",
|
|
1171
|
+
Editor: "EDITOR"
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
CONSOLE: {
|
|
1175
|
+
state_type: "VIEW",
|
|
1176
|
+
ref: "Console",
|
|
1177
|
+
transitions: {
|
|
1178
|
+
Config: "CONFIG",
|
|
1179
|
+
Flow: "FLOW",
|
|
1180
|
+
Logs: "LOGS",
|
|
1181
|
+
Console: "CONSOLE",
|
|
1182
|
+
Editor: "EDITOR"
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
EDITOR: {
|
|
1186
|
+
state_type: "VIEW",
|
|
1187
|
+
ref: "Editor",
|
|
1188
|
+
transitions: {
|
|
1189
|
+
Config: "CONFIG",
|
|
1190
|
+
Flow: "FLOW",
|
|
1191
|
+
Logs: "LOGS",
|
|
1192
|
+
Console: "CONSOLE",
|
|
1193
|
+
Editor: "EDITOR"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
schema: {
|
|
1199
|
+
ROOT: {
|
|
1200
|
+
playerConfig: {
|
|
1201
|
+
type: "RecordType"
|
|
1202
|
+
},
|
|
1203
|
+
flow: {
|
|
1204
|
+
type: "RecordType"
|
|
1205
|
+
},
|
|
1206
|
+
expression: {
|
|
1207
|
+
type: "StringType",
|
|
1208
|
+
default: "",
|
|
1209
|
+
validation: [
|
|
1210
|
+
{
|
|
1211
|
+
type: "string"
|
|
1212
|
+
}
|
|
1213
|
+
],
|
|
1214
|
+
format: {
|
|
1215
|
+
type: "string"
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
code: {
|
|
1219
|
+
type: "StringType",
|
|
1220
|
+
default: "",
|
|
1221
|
+
validation: [
|
|
1222
|
+
{
|
|
1223
|
+
type: "string"
|
|
1224
|
+
}
|
|
1225
|
+
],
|
|
1226
|
+
format: {
|
|
1227
|
+
type: "string"
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
history: {
|
|
1231
|
+
type: "historyType",
|
|
1232
|
+
isArray: true
|
|
1233
|
+
},
|
|
1234
|
+
logs: {
|
|
1235
|
+
type: "logsType",
|
|
1236
|
+
isArray: true
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
logsType: {
|
|
1240
|
+
id: {
|
|
1241
|
+
type: "StringType",
|
|
1242
|
+
default: "",
|
|
1243
|
+
validation: [
|
|
1244
|
+
{
|
|
1245
|
+
type: "string"
|
|
1246
|
+
}
|
|
1247
|
+
],
|
|
1248
|
+
format: {
|
|
1249
|
+
type: "string"
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
time: {
|
|
1253
|
+
type: "StringType",
|
|
1254
|
+
default: "",
|
|
1255
|
+
validation: [
|
|
1256
|
+
{
|
|
1257
|
+
type: "string"
|
|
1258
|
+
}
|
|
1259
|
+
],
|
|
1260
|
+
format: {
|
|
1261
|
+
type: "string"
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
type: {
|
|
1265
|
+
type: "StringType",
|
|
1266
|
+
default: "",
|
|
1267
|
+
validation: [
|
|
1268
|
+
{
|
|
1269
|
+
type: "string"
|
|
1270
|
+
}
|
|
1271
|
+
],
|
|
1272
|
+
format: {
|
|
1273
|
+
type: "string"
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
message: {
|
|
1277
|
+
type: "StringType",
|
|
1278
|
+
default: "",
|
|
1279
|
+
validation: [
|
|
1280
|
+
{
|
|
1281
|
+
type: "string"
|
|
1282
|
+
}
|
|
1283
|
+
],
|
|
1284
|
+
format: {
|
|
1285
|
+
type: "string"
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
severity: {
|
|
1289
|
+
type: "StringType",
|
|
1290
|
+
default: "",
|
|
1291
|
+
validation: [
|
|
1292
|
+
{
|
|
1293
|
+
type: "string"
|
|
1294
|
+
}
|
|
1295
|
+
],
|
|
1296
|
+
format: {
|
|
1297
|
+
type: "string"
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
binding: {
|
|
1301
|
+
type: "StringType",
|
|
1302
|
+
default: "",
|
|
1303
|
+
validation: [
|
|
1304
|
+
{
|
|
1305
|
+
type: "string"
|
|
1306
|
+
}
|
|
1307
|
+
],
|
|
1308
|
+
format: {
|
|
1309
|
+
type: "string"
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
from: {
|
|
1313
|
+
type: "StringType",
|
|
1314
|
+
default: "",
|
|
1315
|
+
validation: [
|
|
1316
|
+
{
|
|
1317
|
+
type: "string"
|
|
1318
|
+
}
|
|
1319
|
+
],
|
|
1320
|
+
format: {
|
|
1321
|
+
type: "string"
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
to: {
|
|
1325
|
+
type: "StringType",
|
|
1326
|
+
default: "",
|
|
1327
|
+
validation: [
|
|
1328
|
+
{
|
|
1329
|
+
type: "string"
|
|
1330
|
+
}
|
|
1331
|
+
],
|
|
1332
|
+
format: {
|
|
1333
|
+
type: "string"
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
state: {
|
|
1337
|
+
type: "StringType",
|
|
1338
|
+
default: "",
|
|
1339
|
+
validation: [
|
|
1340
|
+
{
|
|
1341
|
+
type: "string"
|
|
1342
|
+
}
|
|
1343
|
+
],
|
|
1344
|
+
format: {
|
|
1345
|
+
type: "string"
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
error: {
|
|
1349
|
+
type: "StringType",
|
|
1350
|
+
default: "",
|
|
1351
|
+
validation: [
|
|
1352
|
+
{
|
|
1353
|
+
type: "string"
|
|
1354
|
+
}
|
|
1355
|
+
],
|
|
1356
|
+
format: {
|
|
1357
|
+
type: "string"
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
outcome: {
|
|
1361
|
+
type: "StringType",
|
|
1362
|
+
default: "",
|
|
1363
|
+
validation: [
|
|
1364
|
+
{
|
|
1365
|
+
type: "string"
|
|
1366
|
+
}
|
|
1367
|
+
],
|
|
1368
|
+
format: {
|
|
1369
|
+
type: "string"
|
|
1370
|
+
}
|
|
1371
|
+
},
|
|
1372
|
+
metricType: {
|
|
1373
|
+
type: "StringType",
|
|
1374
|
+
default: "",
|
|
1375
|
+
validation: [
|
|
1376
|
+
{
|
|
1377
|
+
type: "string"
|
|
1378
|
+
}
|
|
1379
|
+
],
|
|
1380
|
+
format: {
|
|
1381
|
+
type: "string"
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
historyType: {
|
|
1386
|
+
id: {
|
|
1387
|
+
type: "StringType",
|
|
1388
|
+
default: "",
|
|
1389
|
+
validation: [
|
|
1390
|
+
{
|
|
1391
|
+
type: "string"
|
|
1392
|
+
}
|
|
1393
|
+
],
|
|
1394
|
+
format: {
|
|
1395
|
+
type: "string"
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
expression: {
|
|
1399
|
+
type: "StringType",
|
|
1400
|
+
default: "",
|
|
1401
|
+
validation: [
|
|
1402
|
+
{
|
|
1403
|
+
type: "string"
|
|
1404
|
+
}
|
|
1405
|
+
],
|
|
1406
|
+
format: {
|
|
1407
|
+
type: "string"
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
result: {
|
|
1411
|
+
type: "StringType",
|
|
1412
|
+
default: "",
|
|
1413
|
+
validation: [
|
|
1414
|
+
{
|
|
1415
|
+
type: "string"
|
|
1416
|
+
}
|
|
1417
|
+
],
|
|
1418
|
+
format: {
|
|
1419
|
+
type: "string"
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
severity: {
|
|
1423
|
+
type: "StringType",
|
|
1424
|
+
default: "",
|
|
1425
|
+
validation: [
|
|
1426
|
+
{
|
|
1427
|
+
type: "string"
|
|
1428
|
+
}
|
|
1429
|
+
],
|
|
1430
|
+
format: {
|
|
1431
|
+
type: "string"
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
data: {
|
|
1437
|
+
expression: "",
|
|
1438
|
+
flow: {},
|
|
1439
|
+
history: [],
|
|
1440
|
+
logs: [],
|
|
1441
|
+
playerConfig: {}
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1444
|
+
var PLUGIN_VERSION = true ? "0.0.2-next.0" : "unstamped";
|
|
1445
|
+
var BasicPluginData = {
|
|
1446
|
+
id: PLUGIN_ID,
|
|
1447
|
+
name: "Standard Devtools",
|
|
1448
|
+
description: "Standard Player UI Devtools",
|
|
1449
|
+
version: PLUGIN_VERSION,
|
|
1450
|
+
flow: flow_default
|
|
1451
|
+
};
|
|
1452
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-devtools+utils@0.0.0/node_modules/@player-devtools/utils/dist/index.mjs
|
|
1453
|
+
function deepAssign(target, source) {
|
|
1454
|
+
var merge = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
1455
|
+
if (Array.isArray(target) && Array.isArray(source)) {
|
|
1456
|
+
while(!merge && target.length > source.length)target.pop();
|
|
1457
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1458
|
+
try {
|
|
1459
|
+
for(var _iterator = source.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1460
|
+
var _step_value = _sliced_to_array(_step.value, 2), index = _step_value[0], item = _step_value[1];
|
|
1461
|
+
target[index] = deepAssign(target[index], item, merge);
|
|
1462
|
+
}
|
|
1463
|
+
} catch (err) {
|
|
1464
|
+
_didIteratorError = true;
|
|
1465
|
+
_iteratorError = err;
|
|
1466
|
+
} finally{
|
|
1467
|
+
try {
|
|
1468
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1469
|
+
_iterator.return();
|
|
1470
|
+
}
|
|
1471
|
+
} finally{
|
|
1472
|
+
if (_didIteratorError) {
|
|
1473
|
+
throw _iteratorError;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
} else if (target && typeof target === "object" && source && typeof source === "object") {
|
|
1478
|
+
var record = target;
|
|
1479
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
1480
|
+
if (!merge) try {
|
|
1481
|
+
for(var _iterator1 = Object.keys(target)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
1482
|
+
var key = _step1.value;
|
|
1483
|
+
if (!(key in source)) delete record[key];
|
|
1484
|
+
}
|
|
1485
|
+
} catch (err) {
|
|
1486
|
+
_didIteratorError1 = true;
|
|
1487
|
+
_iteratorError1 = err;
|
|
1488
|
+
} finally{
|
|
1489
|
+
try {
|
|
1490
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
1491
|
+
_iterator1.return();
|
|
1492
|
+
}
|
|
1493
|
+
} finally{
|
|
1494
|
+
if (_didIteratorError1) {
|
|
1495
|
+
throw _iteratorError1;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
1500
|
+
try {
|
|
1501
|
+
for(var _iterator2 = Object.entries(source)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
|
|
1502
|
+
var _step_value1 = _sliced_to_array(_step2.value, 2), key1 = _step_value1[0], item1 = _step_value1[1];
|
|
1503
|
+
record[key1] = deepAssign(record[key1], item1, merge);
|
|
1504
|
+
}
|
|
1505
|
+
} catch (err) {
|
|
1506
|
+
_didIteratorError2 = true;
|
|
1507
|
+
_iteratorError2 = err;
|
|
1508
|
+
} finally{
|
|
1509
|
+
try {
|
|
1510
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
1511
|
+
_iterator2.return();
|
|
1512
|
+
}
|
|
1513
|
+
} finally{
|
|
1514
|
+
if (_didIteratorError2) {
|
|
1515
|
+
throw _iteratorError2;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
} else {
|
|
1520
|
+
return source;
|
|
1521
|
+
}
|
|
1522
|
+
return target;
|
|
1523
|
+
}
|
|
1524
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/immer@10.1.3/node_modules/immer/dist/immer.mjs
|
|
1525
|
+
var NOTHING = Symbol.for("immer-nothing");
|
|
1526
|
+
var DRAFTABLE = Symbol.for("immer-draftable");
|
|
1527
|
+
var DRAFT_STATE = Symbol.for("immer-state");
|
|
1528
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
1529
|
+
var objectCtorString = Object.prototype.constructor.toString();
|
|
1530
|
+
function freeze(obj) {
|
|
1531
|
+
var deep = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
1532
|
+
if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj)) return obj;
|
|
1533
|
+
if (getArchtype(obj) > 1) {
|
|
1534
|
+
Object.defineProperties(obj, {
|
|
1535
|
+
set: {
|
|
1536
|
+
value: dontMutateFrozenCollections
|
|
1537
|
+
},
|
|
1538
|
+
add: {
|
|
1539
|
+
value: dontMutateFrozenCollections
|
|
1540
|
+
},
|
|
1541
|
+
clear: {
|
|
1542
|
+
value: dontMutateFrozenCollections
|
|
1543
|
+
},
|
|
1544
|
+
delete: {
|
|
1545
|
+
value: dontMutateFrozenCollections
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
Object.freeze(obj);
|
|
1550
|
+
if (deep) Object.values(obj).forEach(function(value) {
|
|
1551
|
+
return freeze(value, true);
|
|
1552
|
+
});
|
|
1553
|
+
return obj;
|
|
1554
|
+
}
|
|
1555
|
+
var plugins = {};
|
|
1556
|
+
var currentScope;
|
|
1557
|
+
var objectTraps = {
|
|
1558
|
+
get: function get(state, prop) {
|
|
1559
|
+
if (prop === DRAFT_STATE) return state;
|
|
1560
|
+
var source = latest(state);
|
|
1561
|
+
if (!has(source, prop)) {
|
|
1562
|
+
return readPropFromProto(state, source, prop);
|
|
1563
|
+
}
|
|
1564
|
+
var value = source[prop];
|
|
1565
|
+
if (state.finalized_ || !isDraftable(value)) {
|
|
1566
|
+
return value;
|
|
1567
|
+
}
|
|
1568
|
+
if (value === peek(state.base_, prop)) {
|
|
1569
|
+
prepareCopy(state);
|
|
1570
|
+
return state.copy_[prop] = createProxy(value, state);
|
|
1571
|
+
}
|
|
1572
|
+
return value;
|
|
1573
|
+
},
|
|
1574
|
+
has: function has(state, prop) {
|
|
1575
|
+
return prop in latest(state);
|
|
1576
|
+
},
|
|
1577
|
+
ownKeys: function ownKeys(state) {
|
|
1578
|
+
return Reflect.ownKeys(latest(state));
|
|
1579
|
+
},
|
|
1580
|
+
set: function set(state, prop, value) {
|
|
1581
|
+
var _desc;
|
|
1582
|
+
var desc = getDescriptorFromProto(latest(state), prop);
|
|
1583
|
+
if ((_desc = desc) === null || _desc === void 0 ? void 0 : _desc.set) {
|
|
1584
|
+
desc.set.call(state.draft_, value);
|
|
1585
|
+
return true;
|
|
1586
|
+
}
|
|
1587
|
+
if (!state.modified_) {
|
|
1588
|
+
var _current2;
|
|
1589
|
+
var current2 = peek(latest(state), prop);
|
|
1590
|
+
var currentState = (_current2 = current2) === null || _current2 === void 0 ? void 0 : _current2[DRAFT_STATE];
|
|
1591
|
+
if (currentState && currentState.base_ === value) {
|
|
1592
|
+
state.copy_[prop] = value;
|
|
1593
|
+
state.assigned_[prop] = false;
|
|
1594
|
+
return true;
|
|
1595
|
+
}
|
|
1596
|
+
if (is(value, current2) && (value !== void 0 || has(state.base_, prop))) return true;
|
|
1597
|
+
prepareCopy(state);
|
|
1598
|
+
markChanged(state);
|
|
1599
|
+
}
|
|
1600
|
+
if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'
|
|
1601
|
+
(value !== void 0 || prop in state.copy_) || // special case: NaN
|
|
1602
|
+
Number.isNaN(value) && Number.isNaN(state.copy_[prop])) return true;
|
|
1603
|
+
state.copy_[prop] = value;
|
|
1604
|
+
state.assigned_[prop] = true;
|
|
1605
|
+
return true;
|
|
1606
|
+
},
|
|
1607
|
+
deleteProperty: function deleteProperty(state, prop) {
|
|
1608
|
+
if (peek(state.base_, prop) !== void 0 || prop in state.base_) {
|
|
1609
|
+
state.assigned_[prop] = false;
|
|
1610
|
+
prepareCopy(state);
|
|
1611
|
+
markChanged(state);
|
|
1612
|
+
} else {
|
|
1613
|
+
delete state.assigned_[prop];
|
|
1614
|
+
}
|
|
1615
|
+
if (state.copy_) {
|
|
1616
|
+
delete state.copy_[prop];
|
|
1617
|
+
}
|
|
1618
|
+
return true;
|
|
1619
|
+
},
|
|
1620
|
+
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
1621
|
+
// the same guarantee in ES5 mode.
|
|
1622
|
+
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(state, prop) {
|
|
1623
|
+
var owner = latest(state);
|
|
1624
|
+
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
1625
|
+
if (!desc) return desc;
|
|
1626
|
+
return {
|
|
1627
|
+
writable: true,
|
|
1628
|
+
configurable: state.type_ !== 1 || prop !== "length",
|
|
1629
|
+
enumerable: desc.enumerable,
|
|
1630
|
+
value: owner[prop]
|
|
1631
|
+
};
|
|
1632
|
+
},
|
|
1633
|
+
defineProperty: function defineProperty() {
|
|
1634
|
+
die(11);
|
|
1635
|
+
},
|
|
1636
|
+
getPrototypeOf: function getPrototypeOf1(state) {
|
|
1637
|
+
return getPrototypeOf(state.base_);
|
|
1638
|
+
},
|
|
1639
|
+
setPrototypeOf: function setPrototypeOf() {
|
|
1640
|
+
die(12);
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
var arrayTraps = {};
|
|
1644
|
+
each(objectTraps, function(key, fn) {
|
|
1645
|
+
arrayTraps[key] = function() {
|
|
1646
|
+
arguments[0] = arguments[0][0];
|
|
1647
|
+
return fn.apply(this, arguments);
|
|
1648
|
+
};
|
|
1649
|
+
});
|
|
1650
|
+
arrayTraps.deleteProperty = function(state, prop) {
|
|
1651
|
+
if (false) die(13);
|
|
1652
|
+
return arrayTraps.set.call(this, state, prop, void 0);
|
|
1653
|
+
};
|
|
1654
|
+
arrayTraps.set = function(state, prop, value) {
|
|
1655
|
+
if (false) die(14);
|
|
1656
|
+
return objectTraps.set.call(this, state[0], prop, value, state[0]);
|
|
1657
|
+
};
|
|
1658
|
+
function markChanged(state) {
|
|
1659
|
+
if (!state.modified_) {
|
|
1660
|
+
state.modified_ = true;
|
|
1661
|
+
if (state.parent_) {
|
|
1662
|
+
markChanged(state.parent_);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
var Immer2 = /*#__PURE__*/ function() {
|
|
1667
|
+
function Immer2(config) {
|
|
1668
|
+
var _this = this;
|
|
1669
|
+
_class_call_check(this, Immer2);
|
|
1670
|
+
var _config, _config1;
|
|
1671
|
+
this.autoFreeze_ = true;
|
|
1672
|
+
this.useStrictShallowCopy_ = false;
|
|
1673
|
+
this.produce = function(base, recipe, patchListener) {
|
|
1674
|
+
if (typeof base === "function" && typeof recipe !== "function") {
|
|
1675
|
+
var defaultBase = recipe;
|
|
1676
|
+
recipe = base;
|
|
1677
|
+
var self = _this;
|
|
1678
|
+
return function curriedProduce() {
|
|
1679
|
+
var base2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultBase;
|
|
1680
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
1681
|
+
args[_key - 1] = arguments[_key];
|
|
1682
|
+
}
|
|
1683
|
+
var _this = this;
|
|
1684
|
+
var _recipe;
|
|
1685
|
+
return self.produce(base2, function(draft) {
|
|
1686
|
+
return (_recipe = recipe).call.apply(_recipe, [
|
|
1687
|
+
_this,
|
|
1688
|
+
draft
|
|
1689
|
+
].concat(_to_consumable_array(args)));
|
|
1690
|
+
});
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
if (typeof recipe !== "function") die(6);
|
|
1694
|
+
if (patchListener !== void 0 && typeof patchListener !== "function") die(7);
|
|
1695
|
+
var result;
|
|
1696
|
+
if (isDraftable(base)) {
|
|
1697
|
+
var scope = enterScope(_this);
|
|
1698
|
+
var proxy = createProxy(base, void 0);
|
|
1699
|
+
var hasError = true;
|
|
1700
|
+
try {
|
|
1701
|
+
result = recipe(proxy);
|
|
1702
|
+
hasError = false;
|
|
1703
|
+
} finally{
|
|
1704
|
+
if (hasError) revokeScope(scope);
|
|
1705
|
+
else leaveScope(scope);
|
|
1706
|
+
}
|
|
1707
|
+
usePatchesInScope(scope, patchListener);
|
|
1708
|
+
return processResult(result, scope);
|
|
1709
|
+
} else if (!base || typeof base !== "object") {
|
|
1710
|
+
result = recipe(base);
|
|
1711
|
+
if (result === void 0) result = base;
|
|
1712
|
+
if (result === NOTHING) result = void 0;
|
|
1713
|
+
if (_this.autoFreeze_) freeze(result, true);
|
|
1714
|
+
if (patchListener) {
|
|
1715
|
+
var p = [];
|
|
1716
|
+
var ip = [];
|
|
1717
|
+
getPlugin("Patches").generateReplacementPatches_(base, result, p, ip);
|
|
1718
|
+
patchListener(p, ip);
|
|
1719
|
+
}
|
|
1720
|
+
return result;
|
|
1721
|
+
} else die(1, base);
|
|
1722
|
+
};
|
|
1723
|
+
this.produceWithPatches = function(base, recipe) {
|
|
1724
|
+
if (typeof base === "function") {
|
|
1725
|
+
return function(state) {
|
|
1726
|
+
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
1727
|
+
args[_key - 1] = arguments[_key];
|
|
1728
|
+
}
|
|
1729
|
+
return _this.produceWithPatches(state, function(draft) {
|
|
1730
|
+
return base.apply(void 0, [
|
|
1731
|
+
draft
|
|
1732
|
+
].concat(_to_consumable_array(args)));
|
|
1733
|
+
});
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
var patches, inversePatches;
|
|
1737
|
+
var result = _this.produce(base, recipe, function(p, ip) {
|
|
1738
|
+
patches = p;
|
|
1739
|
+
inversePatches = ip;
|
|
1740
|
+
});
|
|
1741
|
+
return [
|
|
1742
|
+
result,
|
|
1743
|
+
patches,
|
|
1744
|
+
inversePatches
|
|
1745
|
+
];
|
|
1746
|
+
};
|
|
1747
|
+
if (typeof ((_config = config) === null || _config === void 0 ? void 0 : _config.autoFreeze) === "boolean") this.setAutoFreeze(config.autoFreeze);
|
|
1748
|
+
if (typeof ((_config1 = config) === null || _config1 === void 0 ? void 0 : _config1.useStrictShallowCopy) === "boolean") this.setUseStrictShallowCopy(config.useStrictShallowCopy);
|
|
1749
|
+
}
|
|
1750
|
+
_create_class(Immer2, [
|
|
1751
|
+
{
|
|
1752
|
+
key: "createDraft",
|
|
1753
|
+
value: function createDraft(base) {
|
|
1754
|
+
if (!isDraftable(base)) die(8);
|
|
1755
|
+
if (isDraft(base)) base = current(base);
|
|
1756
|
+
var scope = enterScope(this);
|
|
1757
|
+
var proxy = createProxy(base, void 0);
|
|
1758
|
+
proxy[DRAFT_STATE].isManual_ = true;
|
|
1759
|
+
leaveScope(scope);
|
|
1760
|
+
return proxy;
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
key: "finishDraft",
|
|
1765
|
+
value: function finishDraft(draft, patchListener) {
|
|
1766
|
+
var state = draft && draft[DRAFT_STATE];
|
|
1767
|
+
if (!state || !state.isManual_) die(9);
|
|
1768
|
+
var scope = state.scope_;
|
|
1769
|
+
usePatchesInScope(scope, patchListener);
|
|
1770
|
+
return processResult(void 0, scope);
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
/**
|
|
1775
|
+
* Pass true to automatically freeze all copies created by Immer.
|
|
1776
|
+
*
|
|
1777
|
+
* By default, auto-freezing is enabled.
|
|
1778
|
+
*/ key: "setAutoFreeze",
|
|
1779
|
+
value: function setAutoFreeze(value) {
|
|
1780
|
+
this.autoFreeze_ = value;
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
/**
|
|
1785
|
+
* Pass true to enable strict shallow copy.
|
|
1786
|
+
*
|
|
1787
|
+
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
|
|
1788
|
+
*/ key: "setUseStrictShallowCopy",
|
|
1789
|
+
value: function setUseStrictShallowCopy(value) {
|
|
1790
|
+
this.useStrictShallowCopy_ = value;
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
key: "applyPatches",
|
|
1795
|
+
value: function applyPatches(base, patches) {
|
|
1796
|
+
var i;
|
|
1797
|
+
for(i = patches.length - 1; i >= 0; i--){
|
|
1798
|
+
var patch = patches[i];
|
|
1799
|
+
if (patch.path.length === 0 && patch.op === "replace") {
|
|
1800
|
+
base = patch.value;
|
|
1801
|
+
break;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
if (i > -1) {
|
|
1805
|
+
patches = patches.slice(i + 1);
|
|
1806
|
+
}
|
|
1807
|
+
var applyPatchesImpl = getPlugin("Patches").applyPatches_;
|
|
1808
|
+
if (isDraft(base)) {
|
|
1809
|
+
return applyPatchesImpl(base, patches);
|
|
1810
|
+
}
|
|
1811
|
+
return this.produce(base, function(draft) {
|
|
1812
|
+
return applyPatchesImpl(draft, patches);
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
]);
|
|
1817
|
+
return Immer2;
|
|
1818
|
+
}();
|
|
1819
|
+
function currentImpl(value) {
|
|
1820
|
+
if (!isDraftable(value) || isFrozen(value)) return value;
|
|
1821
|
+
var state = value[DRAFT_STATE];
|
|
1822
|
+
var copy;
|
|
1823
|
+
if (state) {
|
|
1824
|
+
if (!state.modified_) return state.base_;
|
|
1825
|
+
state.finalized_ = true;
|
|
1826
|
+
copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
|
|
1827
|
+
} else {
|
|
1828
|
+
copy = shallowCopy(value, true);
|
|
1829
|
+
}
|
|
1830
|
+
each(copy, function(key, childValue) {
|
|
1831
|
+
set(copy, key, currentImpl(childValue));
|
|
1832
|
+
});
|
|
1833
|
+
if (state) {
|
|
1834
|
+
state.finalized_ = false;
|
|
1835
|
+
}
|
|
1836
|
+
return copy;
|
|
1837
|
+
}
|
|
1838
|
+
var immer = new Immer2();
|
|
1839
|
+
var produce = immer.produce;
|
|
1840
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dequal@2.0.3/node_modules/dequal/dist/index.mjs
|
|
1841
|
+
var has2 = Object.prototype.hasOwnProperty;
|
|
1842
|
+
function dequal(foo, bar) {
|
|
1843
|
+
var ctor, len, tmp;
|
|
1844
|
+
if (foo === bar) return true;
|
|
1845
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
1846
|
+
if (ctor === Date) return foo.getTime() === bar.getTime();
|
|
1847
|
+
if (ctor === RegExp) return foo.toString() === bar.toString();
|
|
1848
|
+
if (ctor === Array) {
|
|
1849
|
+
if ((len = foo.length) === bar.length) {
|
|
1850
|
+
while(len-- && dequal(foo[len], bar[len]));
|
|
1851
|
+
}
|
|
1852
|
+
return len === -1;
|
|
1853
|
+
}
|
|
1854
|
+
if (ctor === Set) {
|
|
1855
|
+
if (foo.size !== bar.size) {
|
|
1856
|
+
return false;
|
|
1857
|
+
}
|
|
1858
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1859
|
+
try {
|
|
1860
|
+
for(var _iterator = foo[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1861
|
+
len = _step.value;
|
|
1862
|
+
tmp = len;
|
|
1863
|
+
if (tmp && typeof tmp === "object") {
|
|
1864
|
+
tmp = find(bar, tmp);
|
|
1865
|
+
if (!tmp) return false;
|
|
1866
|
+
}
|
|
1867
|
+
if (!bar.has(tmp)) return false;
|
|
1868
|
+
}
|
|
1869
|
+
} catch (err) {
|
|
1870
|
+
_didIteratorError = true;
|
|
1871
|
+
_iteratorError = err;
|
|
1872
|
+
} finally{
|
|
1873
|
+
try {
|
|
1874
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1875
|
+
_iterator.return();
|
|
1876
|
+
}
|
|
1877
|
+
} finally{
|
|
1878
|
+
if (_didIteratorError) {
|
|
1879
|
+
throw _iteratorError;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
return true;
|
|
1884
|
+
}
|
|
1885
|
+
if (ctor === Map) {
|
|
1886
|
+
if (foo.size !== bar.size) {
|
|
1887
|
+
return false;
|
|
1888
|
+
}
|
|
1889
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
1890
|
+
try {
|
|
1891
|
+
for(var _iterator1 = foo[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
1892
|
+
len = _step1.value;
|
|
1893
|
+
tmp = len[0];
|
|
1894
|
+
if (tmp && typeof tmp === "object") {
|
|
1895
|
+
tmp = find(bar, tmp);
|
|
1896
|
+
if (!tmp) return false;
|
|
1897
|
+
}
|
|
1898
|
+
if (!dequal(len[1], bar.get(tmp))) {
|
|
1899
|
+
return false;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
} catch (err) {
|
|
1903
|
+
_didIteratorError1 = true;
|
|
1904
|
+
_iteratorError1 = err;
|
|
1905
|
+
} finally{
|
|
1906
|
+
try {
|
|
1907
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
1908
|
+
_iterator1.return();
|
|
1909
|
+
}
|
|
1910
|
+
} finally{
|
|
1911
|
+
if (_didIteratorError1) {
|
|
1912
|
+
throw _iteratorError1;
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
return true;
|
|
1917
|
+
}
|
|
1918
|
+
if (ctor === ArrayBuffer) {
|
|
1919
|
+
foo = new Uint8Array(foo);
|
|
1920
|
+
bar = new Uint8Array(bar);
|
|
1921
|
+
} else if (ctor === DataView) {
|
|
1922
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
1923
|
+
while(len-- && foo.getInt8(len) === bar.getInt8(len));
|
|
1924
|
+
}
|
|
1925
|
+
return len === -1;
|
|
1926
|
+
}
|
|
1927
|
+
if (ArrayBuffer.isView(foo)) {
|
|
1928
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
1929
|
+
while(len-- && foo[len] === bar[len]);
|
|
1930
|
+
}
|
|
1931
|
+
return len === -1;
|
|
1932
|
+
}
|
|
1933
|
+
if (!ctor || typeof foo === "object") {
|
|
1934
|
+
len = 0;
|
|
1935
|
+
for(ctor in foo){
|
|
1936
|
+
if (has2.call(foo, ctor) && ++len && !has2.call(bar, ctor)) return false;
|
|
1937
|
+
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
|
1938
|
+
}
|
|
1939
|
+
return Object.keys(bar).length === len;
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
return foo !== foo && bar !== bar;
|
|
1943
|
+
}
|
|
1944
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-devtools+plugin@0.0.0/node_modules/@player-devtools/plugin/dist/index.mjs
|
|
1945
|
+
var useStateReducer = function(reducer2, initialState) {
|
|
1946
|
+
var state = initialState;
|
|
1947
|
+
var subscribers = /* @__PURE__ */ new Set();
|
|
1948
|
+
return {
|
|
1949
|
+
getState: function() {
|
|
1950
|
+
return state;
|
|
1951
|
+
},
|
|
1952
|
+
/** Subscribe to state changes; returns an unsubscribe function. */ subscribe: function subscribe(subscriber) {
|
|
1953
|
+
subscribers.add(subscriber);
|
|
1954
|
+
subscriber(state);
|
|
1955
|
+
return function() {
|
|
1956
|
+
return subscribers.delete(subscriber);
|
|
1957
|
+
};
|
|
1958
|
+
},
|
|
1959
|
+
/** Dispatch an action through the reducer, then run side-effects. */ dispatch: function dispatch(action) {
|
|
1960
|
+
var prevState = state;
|
|
1961
|
+
var nextState = reducer2(prevState, action);
|
|
1962
|
+
if (nextState !== prevState) {
|
|
1963
|
+
state = nextState;
|
|
1964
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1965
|
+
try {
|
|
1966
|
+
for(var _iterator = subscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1967
|
+
var sub = _step.value;
|
|
1968
|
+
sub(state);
|
|
1969
|
+
}
|
|
1970
|
+
} catch (err) {
|
|
1971
|
+
_didIteratorError = true;
|
|
1972
|
+
_iteratorError = err;
|
|
1973
|
+
} finally{
|
|
1974
|
+
try {
|
|
1975
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1976
|
+
_iterator.return();
|
|
1977
|
+
}
|
|
1978
|
+
} finally{
|
|
1979
|
+
if (_didIteratorError) {
|
|
1980
|
+
throw _iteratorError;
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
};
|
|
1987
|
+
};
|
|
1988
|
+
var containsInteraction = function(interactions, interaction) {
|
|
1989
|
+
return interactions.filter(function(i) {
|
|
1990
|
+
return dequal(i, interaction);
|
|
1991
|
+
}).length > 0;
|
|
1992
|
+
};
|
|
1993
|
+
var reducer = function(state, transaction) {
|
|
1994
|
+
switch(transaction.type){
|
|
1995
|
+
case "PLAYER_DEVTOOLS_PLAYER_INIT":
|
|
1996
|
+
return produce(state, function(draft) {
|
|
1997
|
+
var payload = transaction.payload;
|
|
1998
|
+
dsetAssign(draft, [
|
|
1999
|
+
"plugins"
|
|
2000
|
+
], payload.plugins);
|
|
2001
|
+
var message = {
|
|
2002
|
+
type: "PLAYER_DEVTOOLS_PLAYER_INIT",
|
|
2003
|
+
payload: payload
|
|
2004
|
+
};
|
|
2005
|
+
draft.messages.push(message);
|
|
2006
|
+
});
|
|
2007
|
+
case "PLAYER_DEVTOOLS_PLUGIN_DATA_CHANGE":
|
|
2008
|
+
return produce(state, function(draft) {
|
|
2009
|
+
var payload = transaction.payload;
|
|
2010
|
+
if (!payload.data) return state;
|
|
2011
|
+
try {
|
|
2012
|
+
dsetAssign(draft, [
|
|
2013
|
+
"plugins",
|
|
2014
|
+
transaction.payload.pluginID,
|
|
2015
|
+
"flow",
|
|
2016
|
+
"data"
|
|
2017
|
+
], transaction.payload.data);
|
|
2018
|
+
} catch (e) {
|
|
2019
|
+
console.error("error setting data:", transaction.payload.data);
|
|
2020
|
+
}
|
|
2021
|
+
var message = {
|
|
2022
|
+
type: "PLAYER_DEVTOOLS_PLUGIN_DATA_CHANGE",
|
|
2023
|
+
payload: payload
|
|
2024
|
+
};
|
|
2025
|
+
draft.messages.push(message);
|
|
2026
|
+
});
|
|
2027
|
+
case "PLAYER_DEVTOOLS_PLUGIN_INTERACTION":
|
|
2028
|
+
return produce(state, function(draft) {
|
|
2029
|
+
if (containsInteraction(draft.interactions, transaction)) return state;
|
|
2030
|
+
dsetAssign(draft, [
|
|
2031
|
+
"interactions"
|
|
2032
|
+
], _to_consumable_array(draft.interactions).concat([
|
|
2033
|
+
transaction
|
|
2034
|
+
]));
|
|
2035
|
+
});
|
|
2036
|
+
case "PLAYER_DEVTOOLS_SELECTED_PLAYER_CHANGE":
|
|
2037
|
+
{
|
|
2038
|
+
var playerID = transaction.payload.playerID;
|
|
2039
|
+
if (!playerID) return state;
|
|
2040
|
+
return produce(state, function(draft) {
|
|
2041
|
+
dsetAssign(draft, [
|
|
2042
|
+
"currentPlayer"
|
|
2043
|
+
], playerID);
|
|
2044
|
+
});
|
|
2045
|
+
}
|
|
2046
|
+
default:
|
|
2047
|
+
return state;
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
2050
|
+
var INTERACTIONS2 = {
|
|
2051
|
+
PLAYER_SELECTED: "player-selected"
|
|
2052
|
+
};
|
|
2053
|
+
var PLUGIN_INACTIVE_WARNING = "The plugin has been registered, but the Player development tools are not active. If you are working in a production environment, it is recommended to remove the plugin. To activate, enable through the browser extension popup for web or configure the FlipperClient for mobile.";
|
|
2054
|
+
var NOOP_ID = -1;
|
|
2055
|
+
var genDataChangeTransaction = function(param) {
|
|
2056
|
+
var playerID = param.playerID, data = param.data, pluginID = param.pluginID;
|
|
2057
|
+
return {
|
|
2058
|
+
id: NOOP_ID,
|
|
2059
|
+
type: "PLAYER_DEVTOOLS_PLUGIN_DATA_CHANGE",
|
|
2060
|
+
payload: {
|
|
2061
|
+
pluginID: pluginID,
|
|
2062
|
+
data: data
|
|
2063
|
+
},
|
|
2064
|
+
sender: playerID,
|
|
2065
|
+
context: "player",
|
|
2066
|
+
target: "player",
|
|
2067
|
+
timestamp: Date.now(),
|
|
2068
|
+
_messenger_: true
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
var INITIAL_STATE = {
|
|
2072
|
+
messages: [],
|
|
2073
|
+
plugins: {},
|
|
2074
|
+
interactions: [],
|
|
2075
|
+
currentPlayer: ""
|
|
2076
|
+
};
|
|
2077
|
+
var DevtoolsPlugin = /*#__PURE__*/ function() {
|
|
2078
|
+
function DevtoolsPlugin(options) {
|
|
2079
|
+
var _this = this;
|
|
2080
|
+
_class_call_check(this, DevtoolsPlugin);
|
|
2081
|
+
this.options = options;
|
|
2082
|
+
this.name = "DevtoolsPlugin";
|
|
2083
|
+
this.loggedWarning = false;
|
|
2084
|
+
this.store = useStateReducer(reducer, INITIAL_STATE);
|
|
2085
|
+
this.lastProcessedInteraction = 0;
|
|
2086
|
+
this.store.subscribe(function(param) {
|
|
2087
|
+
var interactions = param.interactions;
|
|
2088
|
+
var _interactions_length;
|
|
2089
|
+
if (_this.lastProcessedInteraction < ((_interactions_length = interactions.length) !== null && _interactions_length !== void 0 ? _interactions_length : 0)) {
|
|
2090
|
+
interactions.slice(_this.lastProcessedInteraction).forEach(_this.processInteraction.bind(_this));
|
|
2091
|
+
}
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
_create_class(DevtoolsPlugin, [
|
|
2095
|
+
{
|
|
2096
|
+
key: "pluginID",
|
|
2097
|
+
get: function get() {
|
|
2098
|
+
return this.options.pluginData.id;
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
key: "playerID",
|
|
2103
|
+
get: function get() {
|
|
2104
|
+
return this.options.playerID;
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
key: "registerMessenger",
|
|
2109
|
+
value: function registerMessenger(messenger) {
|
|
2110
|
+
var lastMessageIndex = -1;
|
|
2111
|
+
return this.store.subscribe(function(param) {
|
|
2112
|
+
var messages = param.messages;
|
|
2113
|
+
var start = lastMessageIndex + 1;
|
|
2114
|
+
if (messages.length > start) {
|
|
2115
|
+
var newlyAdded = messages.slice(start);
|
|
2116
|
+
lastMessageIndex = messages.length - 1;
|
|
2117
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2118
|
+
try {
|
|
2119
|
+
for(var _iterator = newlyAdded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
2120
|
+
var msg = _step.value;
|
|
2121
|
+
messenger.sendMessage(msg);
|
|
2122
|
+
}
|
|
2123
|
+
} catch (err) {
|
|
2124
|
+
_didIteratorError = true;
|
|
2125
|
+
_iteratorError = err;
|
|
2126
|
+
} finally{
|
|
2127
|
+
try {
|
|
2128
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2129
|
+
_iterator.return();
|
|
2130
|
+
}
|
|
2131
|
+
} finally{
|
|
2132
|
+
if (_didIteratorError) {
|
|
2133
|
+
throw _iteratorError;
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
key: "dispatchPlayerInit",
|
|
2143
|
+
value: function dispatchPlayerInit() {
|
|
2144
|
+
var transaction = {
|
|
2145
|
+
id: -1,
|
|
2146
|
+
type: "PLAYER_DEVTOOLS_PLAYER_INIT",
|
|
2147
|
+
payload: {
|
|
2148
|
+
plugins: _define_property({}, this.pluginID, this.options.pluginData)
|
|
2149
|
+
},
|
|
2150
|
+
sender: this.options.playerID,
|
|
2151
|
+
context: "player",
|
|
2152
|
+
target: "player",
|
|
2153
|
+
timestamp: Date.now(),
|
|
2154
|
+
_messenger_: true
|
|
2155
|
+
};
|
|
2156
|
+
this.store.dispatch(transaction);
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
// By default, we'll only write to the keys defined in data -- if undefined, data will be cleared
|
|
2161
|
+
key: "dispatchDataUpdate",
|
|
2162
|
+
value: function dispatchDataUpdate(data) {
|
|
2163
|
+
var _this = this;
|
|
2164
|
+
var _state_plugins_this_pluginID_flow, _state_plugins_this_pluginID;
|
|
2165
|
+
var state = this.store.getState();
|
|
2166
|
+
var _produce = produce(this.store.getState(), function(draft) {
|
|
2167
|
+
if (!data) dsetAssign(draft, [
|
|
2168
|
+
"plugins",
|
|
2169
|
+
_this.pluginID,
|
|
2170
|
+
"flow",
|
|
2171
|
+
"data"
|
|
2172
|
+
], data);
|
|
2173
|
+
else Object.entries(data).forEach(function(param) {
|
|
2174
|
+
var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
|
|
2175
|
+
dsetAssign(draft, [
|
|
2176
|
+
"plugins",
|
|
2177
|
+
_this.pluginID,
|
|
2178
|
+
"flow",
|
|
2179
|
+
"data",
|
|
2180
|
+
key
|
|
2181
|
+
], value);
|
|
2182
|
+
});
|
|
2183
|
+
}), plugins2 = _produce.plugins;
|
|
2184
|
+
var newData = plugins2[this.pluginID].flow.data;
|
|
2185
|
+
if (dequal((_state_plugins_this_pluginID = state.plugins[this.pluginID]) === null || _state_plugins_this_pluginID === void 0 ? void 0 : (_state_plugins_this_pluginID_flow = _state_plugins_this_pluginID.flow) === null || _state_plugins_this_pluginID_flow === void 0 ? void 0 : _state_plugins_this_pluginID_flow.data, newData)) return;
|
|
2186
|
+
var transaction = genDataChangeTransaction({
|
|
2187
|
+
playerID: this.playerID,
|
|
2188
|
+
pluginID: this.pluginID,
|
|
2189
|
+
data: newData
|
|
2190
|
+
});
|
|
2191
|
+
this.store.dispatch(transaction);
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
key: "checkIfDevtoolsIsActive",
|
|
2196
|
+
value: function checkIfDevtoolsIsActive() {
|
|
2197
|
+
var isActive = this.options.handler.checkIfDevtoolsIsActive();
|
|
2198
|
+
if (!isActive && !this.loggedWarning) {
|
|
2199
|
+
var _this_options_handler_log, _this_options_handler;
|
|
2200
|
+
(_this_options_handler_log = (_this_options_handler = this.options.handler).log) === null || _this_options_handler_log === void 0 ? void 0 : _this_options_handler_log.call(_this_options_handler, PLUGIN_INACTIVE_WARNING);
|
|
2201
|
+
this.loggedWarning = true;
|
|
2202
|
+
}
|
|
2203
|
+
return isActive;
|
|
2204
|
+
}
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
key: "processInteraction",
|
|
2208
|
+
value: function processInteraction(interaction) {
|
|
2209
|
+
this.options.handler.processInteraction(interaction);
|
|
2210
|
+
var _interaction_payload = interaction.payload, type = _interaction_payload.type, payload = _interaction_payload.payload;
|
|
2211
|
+
if (type === INTERACTIONS2.PLAYER_SELECTED && payload) {
|
|
2212
|
+
this.store.dispatch({
|
|
2213
|
+
id: -1,
|
|
2214
|
+
type: "PLAYER_DEVTOOLS_SELECTED_PLAYER_CHANGE",
|
|
2215
|
+
payload: {
|
|
2216
|
+
playerID: payload
|
|
2217
|
+
},
|
|
2218
|
+
sender: this.playerID,
|
|
2219
|
+
context: "player",
|
|
2220
|
+
target: this.playerID,
|
|
2221
|
+
timestamp: Date.now(),
|
|
2222
|
+
_messenger_: true
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2225
|
+
this.lastProcessedInteraction += 1;
|
|
2226
|
+
}
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
key: "apply",
|
|
2230
|
+
value: function apply(player) {
|
|
2231
|
+
if (!this.checkIfDevtoolsIsActive()) return;
|
|
2232
|
+
this.dispatchPlayerInit();
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
]);
|
|
2236
|
+
return DevtoolsPlugin;
|
|
2237
|
+
}();
|
|
2238
|
+
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/plugins/basic/core/src/plugin.ts
|
|
2239
|
+
var BasicDevtoolsPlugin = /*#__PURE__*/ function(DevtoolsPlugin) {
|
|
2240
|
+
_inherits(BasicDevtoolsPlugin, DevtoolsPlugin);
|
|
2241
|
+
var _super = _create_super(BasicDevtoolsPlugin);
|
|
2242
|
+
function BasicDevtoolsPlugin(options) {
|
|
2243
|
+
_class_call_check(this, BasicDevtoolsPlugin);
|
|
2244
|
+
var _this;
|
|
2245
|
+
_this = _super.call(this, _object_spread_props(_object_spread({}, options), {
|
|
2246
|
+
pluginData: BasicPluginData
|
|
2247
|
+
}));
|
|
2248
|
+
_this.name = "BasicDevtoolsPlugin";
|
|
2249
|
+
_this.data = {};
|
|
2250
|
+
_this.playerConfig = {};
|
|
2251
|
+
_this.logs = [];
|
|
2252
|
+
return _this;
|
|
2253
|
+
}
|
|
2254
|
+
_create_class(BasicDevtoolsPlugin, [
|
|
2255
|
+
{
|
|
2256
|
+
key: "apply",
|
|
2257
|
+
value: function apply(player) {
|
|
2258
|
+
var _this = this;
|
|
2259
|
+
this.logger = new WeakRef(player.logger);
|
|
2260
|
+
if (!this.checkIfDevtoolsIsActive()) return;
|
|
2261
|
+
this.options.pluginData.flow.data.playerConfig = {
|
|
2262
|
+
version: player.getVersion(),
|
|
2263
|
+
plugins: player.getPlugins().map(function(plugin) {
|
|
2264
|
+
return plugin.name;
|
|
2265
|
+
})
|
|
2266
|
+
};
|
|
2267
|
+
_get(_get_prototype_of(BasicDevtoolsPlugin.prototype), "apply", this).call(this, player);
|
|
2268
|
+
this.playerConfig = {
|
|
2269
|
+
version: player.getVersion(),
|
|
2270
|
+
plugins: player.getPlugins().map(function(plugin) {
|
|
2271
|
+
return plugin.name;
|
|
2272
|
+
})
|
|
2273
|
+
};
|
|
2274
|
+
this.dispatchDataUpdate({
|
|
2275
|
+
playerConfig: this.playerConfig
|
|
2276
|
+
});
|
|
2277
|
+
player.hooks.dataController.tap(this.name, function(dataController) {
|
|
2278
|
+
dataController.hooks.onUpdate.tap(_this.name, function(updates) {
|
|
2279
|
+
_this.data = produce(_this.data, function(draft) {
|
|
2280
|
+
updates.forEach(function(param) {
|
|
2281
|
+
var binding = param.binding, newValue = param.newValue;
|
|
2282
|
+
dsetAssign(draft, [
|
|
2283
|
+
"data"
|
|
2284
|
+
].concat(_to_consumable_array(binding.asArray())), newValue);
|
|
2285
|
+
});
|
|
2286
|
+
});
|
|
2287
|
+
_this.dispatchDataUpdate({
|
|
2288
|
+
data: _this.data
|
|
2289
|
+
});
|
|
2290
|
+
});
|
|
2291
|
+
});
|
|
2292
|
+
player.logger.hooks.log.tap(this.name, function(severity, message) {
|
|
2293
|
+
_this.logs = _to_consumable_array(_this.logs).concat([
|
|
2294
|
+
{
|
|
2295
|
+
severity: severity,
|
|
2296
|
+
message: message
|
|
2297
|
+
}
|
|
2298
|
+
]);
|
|
2299
|
+
_this.dispatchDataUpdate({
|
|
2300
|
+
logs: _this.logs
|
|
2301
|
+
});
|
|
2302
|
+
});
|
|
2303
|
+
player.hooks.onStart.tap(this.name, function(f) {
|
|
2304
|
+
_this.flow = JSON.parse(JSON.stringify(f));
|
|
2305
|
+
_this.dispatchDataUpdate({
|
|
2306
|
+
flow: _this.flow
|
|
2307
|
+
});
|
|
2308
|
+
});
|
|
2309
|
+
player.hooks.view.tap(this.name, function(view) {
|
|
2310
|
+
_this.view = new WeakRef(view);
|
|
2311
|
+
});
|
|
2312
|
+
player.hooks.expressionEvaluator.tap(this.name, function(evaluator) {
|
|
2313
|
+
_this.expressionEvaluator = new WeakRef(evaluator);
|
|
2314
|
+
});
|
|
2315
|
+
this.overrideFlow = player.start.bind(player);
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
key: "evaluateExpression",
|
|
2320
|
+
value: function evaluateExpression(expression) {
|
|
2321
|
+
var _this_expressionEvaluator;
|
|
2322
|
+
var evaluator = (_this_expressionEvaluator = this.expressionEvaluator) === null || _this_expressionEvaluator === void 0 ? void 0 : _this_expressionEvaluator.deref();
|
|
2323
|
+
if (!evaluator) {
|
|
2324
|
+
return {
|
|
2325
|
+
id: generateUUID(),
|
|
2326
|
+
severity: "error",
|
|
2327
|
+
result: "Expression evaluator not available",
|
|
2328
|
+
expression: expression
|
|
2329
|
+
};
|
|
2330
|
+
}
|
|
2331
|
+
try {
|
|
2332
|
+
evaluator.hooks.onError.intercept({
|
|
2333
|
+
call: function(error) {
|
|
2334
|
+
throw error;
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
var evaluatorResult = evaluator.evaluate(expression);
|
|
2338
|
+
return {
|
|
2339
|
+
id: generateUUID(),
|
|
2340
|
+
result: evaluatorResult,
|
|
2341
|
+
expression: expression
|
|
2342
|
+
};
|
|
2343
|
+
} catch (error) {
|
|
2344
|
+
var message = _instanceof(error, Error) ? error.message : String(error !== null && error !== void 0 ? error : "Something went wrong");
|
|
2345
|
+
return {
|
|
2346
|
+
id: generateUUID(),
|
|
2347
|
+
severity: "error",
|
|
2348
|
+
result: message,
|
|
2349
|
+
expression: expression
|
|
2350
|
+
};
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
key: "processInteraction",
|
|
2356
|
+
value: function processInteraction(interaction) {
|
|
2357
|
+
_get(_get_prototype_of(BasicDevtoolsPlugin.prototype), "processInteraction", this).call(this, interaction);
|
|
2358
|
+
var _interaction_payload = interaction.payload, type = _interaction_payload.type, payload = _interaction_payload.payload;
|
|
2359
|
+
if (type === INTERACTIONS.EVALUATE_EXPRESSION && this.expressionEvaluator && payload) {
|
|
2360
|
+
var _this_store_getState_plugins_this_pluginID_flow_data, _this_store_getState_plugins_this_pluginID_flow, _this_store_getState_plugins_this_pluginID, _this_store_getState_plugins, _this_store_getState;
|
|
2361
|
+
var result = this.evaluateExpression(payload);
|
|
2362
|
+
var current2 = ((_this_store_getState = this.store.getState()) === null || _this_store_getState === void 0 ? void 0 : (_this_store_getState_plugins = _this_store_getState.plugins) === null || _this_store_getState_plugins === void 0 ? void 0 : (_this_store_getState_plugins_this_pluginID = _this_store_getState_plugins[this.pluginID]) === null || _this_store_getState_plugins_this_pluginID === void 0 ? void 0 : (_this_store_getState_plugins_this_pluginID_flow = _this_store_getState_plugins_this_pluginID.flow) === null || _this_store_getState_plugins_this_pluginID_flow === void 0 ? void 0 : (_this_store_getState_plugins_this_pluginID_flow_data = _this_store_getState_plugins_this_pluginID_flow.data) === null || _this_store_getState_plugins_this_pluginID_flow_data === void 0 ? void 0 : _this_store_getState_plugins_this_pluginID_flow_data.history) || [];
|
|
2363
|
+
this.dispatchDataUpdate({
|
|
2364
|
+
history: _to_consumable_array(current2).concat([
|
|
2365
|
+
result
|
|
2366
|
+
])
|
|
2367
|
+
});
|
|
2368
|
+
return;
|
|
2369
|
+
}
|
|
2370
|
+
if (type === INTERACTIONS.OVERRIDE_FLOW && payload && this.overrideFlow) {
|
|
2371
|
+
var newFlow;
|
|
2372
|
+
try {
|
|
2373
|
+
newFlow = JSON.parse(payload);
|
|
2374
|
+
} catch (e) {
|
|
2375
|
+
var _this_logger_deref, _this_logger;
|
|
2376
|
+
(_this_logger = this.logger) === null || _this_logger === void 0 ? void 0 : (_this_logger_deref = _this_logger.deref()) === null || _this_logger_deref === void 0 ? void 0 : _this_logger_deref.error(this.name, "Error parsing new flow", e);
|
|
2377
|
+
}
|
|
2378
|
+
if (newFlow) {
|
|
2379
|
+
this.overrideFlow(newFlow);
|
|
2380
|
+
}
|
|
2381
|
+
return;
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
]);
|
|
2386
|
+
return BasicDevtoolsPlugin;
|
|
2387
|
+
}(DevtoolsPlugin);
|
|
2388
|
+
return __toCommonJS(src_exports);
|
|
2389
|
+
}();
|
|
2390
|
+
//# sourceMappingURL=index.global.js.map
|