eligius 1.0.2 → 1.0.4
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/README.md +283 -4
- package/dist/build/generate-importer-source-code.d.ts +15 -0
- package/dist/build/index.d.ts +1 -0
- package/dist/configuration/types.d.ts +1 -1
- package/dist/diagnostics/devtool-event-lister.d.ts +7 -0
- package/dist/diagnostics/diagnostics.d.ts +4 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/types.d.ts +8 -0
- package/dist/eligius-engine.d.ts +27 -31
- package/dist/eligius.cjs.development.js +1601 -1107
- package/dist/eligius.cjs.development.js.map +1 -1
- package/dist/eligius.cjs.production.min.js +1 -1
- package/dist/eligius.cjs.production.min.js.map +1 -1
- package/dist/eligius.esm.js +1557 -1072
- package/dist/eligius.esm.js.map +1 -1
- package/dist/engine-factory.d.ts +1 -0
- package/dist/eventbus/types.d.ts +1 -1
- package/dist/importer/{webpack-resource-importer.d.ts → eligius-resource-importer.d.ts} +1 -1
- package/dist/importer/index.d.ts +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/operation/broadcast-event.d.ts +0 -1
- package/dist/operation/calc.d.ts +14 -0
- package/dist/operation/get-controller-instance.d.ts +2 -0
- package/dist/operation/helper/get-element-data.d.ts +1 -0
- package/dist/operation/helper/modify-dimensions.d.ts +4 -1
- package/dist/operation/index.d.ts +2 -0
- package/dist/operation/math.d.ts +12 -0
- package/dist/operation/metadata/add-globals-to-operation.d.ts +2 -2
- package/dist/operation/metadata/calc.d.ts +4 -0
- package/dist/operation/metadata/index.d.ts +2 -0
- package/dist/operation/metadata/math.d.ts +4 -0
- package/dist/operation/metadata/types.d.ts +17 -6
- package/dist/operation/select-element.d.ts +2 -0
- package/dist/operation/wait.d.ts +3 -0
- package/dist/schema-tools/generate-operation-schemas.d.ts +1 -0
- package/dist/schema-tools/html-tag-names.d.ts +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/{test/unit/operation → util}/apply-operation.d.ts +1 -1
- package/dist/util/camel-case-to-dash.d.ts +1 -0
- package/dist/util/dash-to-camel-case.d.ts +1 -0
- package/package.json +91 -97
- package/CHANGELOG.md +0 -16
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tsIsPresent = require('ts-is-present');
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
6
8
|
var lottie = require('lottie-web');
|
|
7
9
|
var $ = require('jquery');
|
|
8
10
|
var Mousetrap = require('mousetrap');
|
|
@@ -10,12 +12,18 @@ var uuid = require('uuid');
|
|
|
10
12
|
|
|
11
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
14
|
|
|
15
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
16
|
+
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
13
17
|
var lottie__default = /*#__PURE__*/_interopDefaultLegacy(lottie);
|
|
14
18
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
|
15
19
|
var Mousetrap__default = /*#__PURE__*/_interopDefaultLegacy(Mousetrap);
|
|
16
20
|
|
|
17
21
|
function deepCopy(original) {
|
|
18
22
|
if (tsIsPresent.isDefined(original)) {
|
|
23
|
+
if (typeof structuredClone !== 'undefined') {
|
|
24
|
+
return structuredClone(original);
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
return JSON.parse(JSON.stringify(original));
|
|
20
28
|
}
|
|
21
29
|
|
|
@@ -82,16 +90,16 @@ var Action = /*#__PURE__*/function () {
|
|
|
82
90
|
var operationInfo = operations[idx];
|
|
83
91
|
var copy = operationInfo.operationData ? deepCopy(operationInfo.operationData) : {};
|
|
84
92
|
var mergedOperationData = Object.assign(previousOperationData, copy);
|
|
85
|
-
var
|
|
93
|
+
var operationResult = operationInfo.instance.call(context, mergedOperationData);
|
|
86
94
|
|
|
87
|
-
if (isPromise(
|
|
88
|
-
|
|
95
|
+
if (isPromise(operationResult)) {
|
|
96
|
+
operationResult.then(function (resultOperationData) {
|
|
89
97
|
_this2.executeOperation(operations, ++idx, resolve, reject, resultOperationData, context);
|
|
90
98
|
})["catch"](function (error) {
|
|
91
99
|
reject(error);
|
|
92
100
|
});
|
|
93
101
|
} else {
|
|
94
|
-
this.executeOperation(operations, ++idx, resolve, reject,
|
|
102
|
+
this.executeOperation(operations, ++idx, resolve, reject, operationResult, context);
|
|
95
103
|
}
|
|
96
104
|
} else {
|
|
97
105
|
resolve(previousOperationData);
|
|
@@ -101,6 +109,351 @@ var Action = /*#__PURE__*/function () {
|
|
|
101
109
|
return Action;
|
|
102
110
|
}();
|
|
103
111
|
|
|
112
|
+
function _regeneratorRuntime() {
|
|
113
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
114
|
+
|
|
115
|
+
_regeneratorRuntime = function () {
|
|
116
|
+
return exports;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
var exports = {},
|
|
120
|
+
Op = Object.prototype,
|
|
121
|
+
hasOwn = Op.hasOwnProperty,
|
|
122
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
123
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
124
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
125
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
126
|
+
|
|
127
|
+
function define(obj, key, value) {
|
|
128
|
+
return Object.defineProperty(obj, key, {
|
|
129
|
+
value: value,
|
|
130
|
+
enumerable: !0,
|
|
131
|
+
configurable: !0,
|
|
132
|
+
writable: !0
|
|
133
|
+
}), obj[key];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
define({}, "");
|
|
138
|
+
} catch (err) {
|
|
139
|
+
define = function (obj, key, value) {
|
|
140
|
+
return obj[key] = value;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
145
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
146
|
+
generator = Object.create(protoGenerator.prototype),
|
|
147
|
+
context = new Context(tryLocsList || []);
|
|
148
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
149
|
+
var state = "suspendedStart";
|
|
150
|
+
return function (method, arg) {
|
|
151
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
152
|
+
|
|
153
|
+
if ("completed" === state) {
|
|
154
|
+
if ("throw" === method) throw arg;
|
|
155
|
+
return doneResult();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
for (context.method = method, context.arg = arg;;) {
|
|
159
|
+
var delegate = context.delegate;
|
|
160
|
+
|
|
161
|
+
if (delegate) {
|
|
162
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
163
|
+
|
|
164
|
+
if (delegateResult) {
|
|
165
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
166
|
+
return delegateResult;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
171
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
172
|
+
context.dispatchException(context.arg);
|
|
173
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
174
|
+
state = "executing";
|
|
175
|
+
var record = tryCatch(innerFn, self, context);
|
|
176
|
+
|
|
177
|
+
if ("normal" === record.type) {
|
|
178
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
179
|
+
return {
|
|
180
|
+
value: record.arg,
|
|
181
|
+
done: context.done
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}(innerFn, self, context), generator;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function tryCatch(fn, obj, arg) {
|
|
192
|
+
try {
|
|
193
|
+
return {
|
|
194
|
+
type: "normal",
|
|
195
|
+
arg: fn.call(obj, arg)
|
|
196
|
+
};
|
|
197
|
+
} catch (err) {
|
|
198
|
+
return {
|
|
199
|
+
type: "throw",
|
|
200
|
+
arg: err
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
exports.wrap = wrap;
|
|
206
|
+
var ContinueSentinel = {};
|
|
207
|
+
|
|
208
|
+
function Generator() {}
|
|
209
|
+
|
|
210
|
+
function GeneratorFunction() {}
|
|
211
|
+
|
|
212
|
+
function GeneratorFunctionPrototype() {}
|
|
213
|
+
|
|
214
|
+
var IteratorPrototype = {};
|
|
215
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
216
|
+
return this;
|
|
217
|
+
});
|
|
218
|
+
var getProto = Object.getPrototypeOf,
|
|
219
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
220
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
221
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
222
|
+
|
|
223
|
+
function defineIteratorMethods(prototype) {
|
|
224
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
225
|
+
define(prototype, method, function (arg) {
|
|
226
|
+
return this._invoke(method, arg);
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
232
|
+
function invoke(method, arg, resolve, reject) {
|
|
233
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
234
|
+
|
|
235
|
+
if ("throw" !== record.type) {
|
|
236
|
+
var result = record.arg,
|
|
237
|
+
value = result.value;
|
|
238
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
239
|
+
invoke("next", value, resolve, reject);
|
|
240
|
+
}, function (err) {
|
|
241
|
+
invoke("throw", err, resolve, reject);
|
|
242
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
243
|
+
result.value = unwrapped, resolve(result);
|
|
244
|
+
}, function (error) {
|
|
245
|
+
return invoke("throw", error, resolve, reject);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
reject(record.arg);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
var previousPromise;
|
|
253
|
+
|
|
254
|
+
this._invoke = function (method, arg) {
|
|
255
|
+
function callInvokeWithMethodAndArg() {
|
|
256
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
257
|
+
invoke(method, arg, resolve, reject);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
266
|
+
var method = delegate.iterator[context.method];
|
|
267
|
+
|
|
268
|
+
if (undefined === method) {
|
|
269
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
270
|
+
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
271
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return ContinueSentinel;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
278
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
279
|
+
var info = record.arg;
|
|
280
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function pushTryEntry(locs) {
|
|
284
|
+
var entry = {
|
|
285
|
+
tryLoc: locs[0]
|
|
286
|
+
};
|
|
287
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function resetTryEntry(entry) {
|
|
291
|
+
var record = entry.completion || {};
|
|
292
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function Context(tryLocsList) {
|
|
296
|
+
this.tryEntries = [{
|
|
297
|
+
tryLoc: "root"
|
|
298
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function values(iterable) {
|
|
302
|
+
if (iterable) {
|
|
303
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
304
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
305
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
306
|
+
|
|
307
|
+
if (!isNaN(iterable.length)) {
|
|
308
|
+
var i = -1,
|
|
309
|
+
next = function next() {
|
|
310
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
311
|
+
|
|
312
|
+
return next.value = undefined, next.done = !0, next;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
return next.next = next;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return {
|
|
320
|
+
next: doneResult
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function doneResult() {
|
|
325
|
+
return {
|
|
326
|
+
value: undefined,
|
|
327
|
+
done: !0
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
332
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
333
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
334
|
+
}, exports.mark = function (genFun) {
|
|
335
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
336
|
+
}, exports.awrap = function (arg) {
|
|
337
|
+
return {
|
|
338
|
+
__await: arg
|
|
339
|
+
};
|
|
340
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
341
|
+
return this;
|
|
342
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
343
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
344
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
345
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
346
|
+
return result.done ? result.value : iter.next();
|
|
347
|
+
});
|
|
348
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
349
|
+
return this;
|
|
350
|
+
}), define(Gp, "toString", function () {
|
|
351
|
+
return "[object Generator]";
|
|
352
|
+
}), exports.keys = function (object) {
|
|
353
|
+
var keys = [];
|
|
354
|
+
|
|
355
|
+
for (var key in object) keys.push(key);
|
|
356
|
+
|
|
357
|
+
return keys.reverse(), function next() {
|
|
358
|
+
for (; keys.length;) {
|
|
359
|
+
var key = keys.pop();
|
|
360
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
return next.done = !0, next;
|
|
364
|
+
};
|
|
365
|
+
}, exports.values = values, Context.prototype = {
|
|
366
|
+
constructor: Context,
|
|
367
|
+
reset: function (skipTempReset) {
|
|
368
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
369
|
+
},
|
|
370
|
+
stop: function () {
|
|
371
|
+
this.done = !0;
|
|
372
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
373
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
374
|
+
return this.rval;
|
|
375
|
+
},
|
|
376
|
+
dispatchException: function (exception) {
|
|
377
|
+
if (this.done) throw exception;
|
|
378
|
+
var context = this;
|
|
379
|
+
|
|
380
|
+
function handle(loc, caught) {
|
|
381
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
385
|
+
var entry = this.tryEntries[i],
|
|
386
|
+
record = entry.completion;
|
|
387
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
388
|
+
|
|
389
|
+
if (entry.tryLoc <= this.prev) {
|
|
390
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
391
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
392
|
+
|
|
393
|
+
if (hasCatch && hasFinally) {
|
|
394
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
395
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
396
|
+
} else if (hasCatch) {
|
|
397
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
398
|
+
} else {
|
|
399
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
400
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
abrupt: function (type, arg) {
|
|
406
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
407
|
+
var entry = this.tryEntries[i];
|
|
408
|
+
|
|
409
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
410
|
+
var finallyEntry = entry;
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
416
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
417
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
418
|
+
},
|
|
419
|
+
complete: function (record, afterLoc) {
|
|
420
|
+
if ("throw" === record.type) throw record.arg;
|
|
421
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
422
|
+
},
|
|
423
|
+
finish: function (finallyLoc) {
|
|
424
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
425
|
+
var entry = this.tryEntries[i];
|
|
426
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
catch: function (tryLoc) {
|
|
430
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
431
|
+
var entry = this.tryEntries[i];
|
|
432
|
+
|
|
433
|
+
if (entry.tryLoc === tryLoc) {
|
|
434
|
+
var record = entry.completion;
|
|
435
|
+
|
|
436
|
+
if ("throw" === record.type) {
|
|
437
|
+
var thrown = record.arg;
|
|
438
|
+
resetTryEntry(entry);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return thrown;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
throw new Error("illegal catch attempt");
|
|
446
|
+
},
|
|
447
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
448
|
+
return this.delegate = {
|
|
449
|
+
iterator: values(iterable),
|
|
450
|
+
resultName: resultName,
|
|
451
|
+
nextLoc: nextLoc
|
|
452
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
453
|
+
}
|
|
454
|
+
}, exports;
|
|
455
|
+
}
|
|
456
|
+
|
|
104
457
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
105
458
|
try {
|
|
106
459
|
var info = gen[key](arg);
|
|
@@ -138,7 +491,7 @@ function _asyncToGenerator(fn) {
|
|
|
138
491
|
}
|
|
139
492
|
|
|
140
493
|
function _extends() {
|
|
141
|
-
_extends = Object.assign
|
|
494
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
142
495
|
for (var i = 1; i < arguments.length; i++) {
|
|
143
496
|
var source = arguments[i];
|
|
144
497
|
|
|
@@ -151,7 +504,6 @@ function _extends() {
|
|
|
151
504
|
|
|
152
505
|
return target;
|
|
153
506
|
};
|
|
154
|
-
|
|
155
507
|
return _extends.apply(this, arguments);
|
|
156
508
|
}
|
|
157
509
|
|
|
@@ -163,11 +515,10 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
163
515
|
}
|
|
164
516
|
|
|
165
517
|
function _setPrototypeOf(o, p) {
|
|
166
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
518
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
167
519
|
o.__proto__ = p;
|
|
168
520
|
return o;
|
|
169
521
|
};
|
|
170
|
-
|
|
171
522
|
return _setPrototypeOf(o, p);
|
|
172
523
|
}
|
|
173
524
|
|
|
@@ -244,960 +595,398 @@ var TimelineAction = /*#__PURE__*/function (_EndableAction) {
|
|
|
244
595
|
return TimelineAction;
|
|
245
596
|
}(EndableAction);
|
|
246
597
|
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
598
|
+
function dashToCamelCase(input) {
|
|
599
|
+
return input.replace(/-([a-z])/g, function (g) {
|
|
600
|
+
return g[1].toUpperCase();
|
|
601
|
+
});
|
|
602
|
+
}
|
|
251
603
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
604
|
+
/**
|
|
605
|
+
* This function takes an Eligius engine configuration, a root path for the config and an arbitrary list of asset info.
|
|
606
|
+
* The asset info determines a number of subdirectories in the root path that contain the different assets used by the presentation.
|
|
607
|
+
* I.e. html, json, etc.
|
|
608
|
+
*
|
|
609
|
+
* @param config
|
|
610
|
+
* @param configPath
|
|
611
|
+
* @param assetInfo
|
|
612
|
+
*/
|
|
255
613
|
|
|
256
|
-
|
|
257
|
-
var
|
|
258
|
-
properties.forEach(function (prop, index) {
|
|
259
|
-
if (index === properties.length - 1) {
|
|
260
|
-
var parts = prop.split('+');
|
|
614
|
+
function generateImporterSourceCode(config, configPath, assetInfo) {
|
|
615
|
+
var importPaths = _gatherImportPaths(config, configPath, assetInfo);
|
|
261
616
|
|
|
262
|
-
|
|
263
|
-
prop = parts[0];
|
|
264
|
-
suffix = parts[1];
|
|
265
|
-
}
|
|
266
|
-
}
|
|
617
|
+
var importerSourceCode = _generateSourceCode(importPaths);
|
|
267
618
|
|
|
268
|
-
|
|
269
|
-
});
|
|
270
|
-
return suffix ? currentInstance + suffix : currentInstance;
|
|
619
|
+
return importerSourceCode;
|
|
271
620
|
}
|
|
272
621
|
|
|
273
|
-
function
|
|
274
|
-
var
|
|
275
|
-
|
|
622
|
+
function _generateSourceCode(importPaths) {
|
|
623
|
+
var result = importPaths.filter(function (x) {
|
|
624
|
+
return x.defaultImport;
|
|
625
|
+
}).map(function (imp) {
|
|
626
|
+
return "import " + imp.systemName + " from '" + imp.path + "';";
|
|
627
|
+
}).concat(importPaths.filter(function (x) {
|
|
628
|
+
return !x.defaultImport;
|
|
629
|
+
}).map(function (imp) {
|
|
630
|
+
var _imp$path;
|
|
631
|
+
|
|
632
|
+
return "import {" + imp.systemName + "} from '" + ((_imp$path = imp.path) != null ? _imp$path : 'eligius') + "';";
|
|
633
|
+
}));
|
|
634
|
+
result.push('const imports: Record<string, any> = {');
|
|
635
|
+
result.push.apply(result, importPaths.map(function (imp) {
|
|
636
|
+
return imp.systemName + ": { '" + imp.systemName + "': " + imp.systemName + " },";
|
|
637
|
+
}));
|
|
638
|
+
result.push('};');
|
|
639
|
+
result.push('class EligiusResourceImporter implements ISimpleResourceImporter {');
|
|
640
|
+
result.push('import(name: string): Record<string, any> {');
|
|
641
|
+
result.push('if (imports.hasOwnProperty(name)) { return imports[name]; }');
|
|
642
|
+
result.push('throw Error(`Unknown systemName: ${name}`);');
|
|
643
|
+
result.push('}}');
|
|
644
|
+
result.push('export default EligiusResourceImporter;');
|
|
645
|
+
return result.join('\n');
|
|
276
646
|
}
|
|
277
647
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
this.eventbus = eventbus;
|
|
284
|
-
}
|
|
648
|
+
function _gatherImportPaths(config, configPath, assetInfo) {
|
|
649
|
+
return [].concat(_gatherOperations(config), assetInfo.flatMap(function (info) {
|
|
650
|
+
return _gatherAssets(configPath, info.path, info.extension);
|
|
651
|
+
}), _gatherControllers(config), _gatherProviders(config), _gatherEngines(config));
|
|
652
|
+
}
|
|
285
653
|
|
|
286
|
-
|
|
654
|
+
function _gatherAssets(assetPath, subdir, extension) {
|
|
655
|
+
var entries = fs__default["default"].readdirSync(path__default["default"].join(assetPath, subdir));
|
|
656
|
+
return entries.map(function (file) {
|
|
657
|
+
var importName = "" + dashToCamelCase(path__default["default"].basename(file, extension));
|
|
658
|
+
return {
|
|
659
|
+
systemName: importName,
|
|
660
|
+
path: "./" + subdir + "/" + file,
|
|
661
|
+
defaultImport: true
|
|
662
|
+
};
|
|
663
|
+
});
|
|
664
|
+
}
|
|
287
665
|
|
|
288
|
-
|
|
289
|
-
|
|
666
|
+
function _gatherControllers(config) {
|
|
667
|
+
var _importPaths, _importPaths2, _importPaths3, _importPaths4;
|
|
290
668
|
|
|
291
|
-
|
|
292
|
-
throw new Error('Configuration incomplete: it needs to have at least one timeline provider setting');
|
|
293
|
-
}
|
|
669
|
+
var importPaths = [];
|
|
294
670
|
|
|
295
|
-
|
|
296
|
-
id: configuration.id,
|
|
297
|
-
engine: _extends({}, configuration.engine),
|
|
298
|
-
timelineProviderSettings: deepCopy(configuration.timelineProviderSettings),
|
|
299
|
-
containerSelector: configuration.containerSelector,
|
|
300
|
-
language: configuration.language,
|
|
301
|
-
layoutTemplate: configuration.layoutTemplate,
|
|
302
|
-
availableLanguages: deepCopy(configuration.availableLanguages),
|
|
303
|
-
actions: resolveActions(configuration.actions, this.importer, this.eventbus),
|
|
304
|
-
initActions: resolveActions(configuration.initActions, this.importer, this.eventbus),
|
|
305
|
-
labels: deepCopy(configuration.labels),
|
|
306
|
-
timelineFlow: deepCopy(configuration.timelineFlow),
|
|
307
|
-
timelines: resolveTimelines(configuration.timelines, this.importer, this.eventbus)
|
|
308
|
-
};
|
|
309
|
-
var eventActions = [];
|
|
671
|
+
(_importPaths = importPaths).push.apply(_importPaths, _gatherControllerImportPathsFromActions(config.initActions));
|
|
310
672
|
|
|
311
|
-
|
|
312
|
-
eventActions = resolveEventActions(configuration.eventActions, actionRegistryListener, this.importer, this.eventbus);
|
|
313
|
-
}
|
|
673
|
+
(_importPaths2 = importPaths).push.apply(_importPaths2, _gatherControllerImportPathsFromActions(config.actions));
|
|
314
674
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return _extends({}, aggr, (_extends2 = {}, _extends2[action.name] = action, _extends2));
|
|
319
|
-
}, {});
|
|
320
|
-
return [actionsLookup, resolvedConfig];
|
|
321
|
-
};
|
|
675
|
+
(_importPaths3 = importPaths).push.apply(_importPaths3, _gatherControllerImportPathsFromActions(config.timelines.flatMap(function (x) {
|
|
676
|
+
return x.timelineActions;
|
|
677
|
+
})));
|
|
322
678
|
|
|
323
|
-
|
|
324
|
-
}();
|
|
679
|
+
(_importPaths4 = importPaths).push.apply(_importPaths4, _gatherControllerImportPathsFromActions(config.eventActions));
|
|
325
680
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
return resolveActionConfiguration(config, importer);
|
|
329
|
-
});
|
|
330
|
-
return resolvedConfigs.map(function (config, index) {
|
|
331
|
-
var _eventActionConfigura = eventActionConfigurations[index],
|
|
332
|
-
eventName = _eventActionConfigura.eventName,
|
|
333
|
-
eventTopic = _eventActionConfigura.eventTopic;
|
|
334
|
-
var eventAction = new Action(config.name, config.startOperations, eventbus);
|
|
335
|
-
actionRegistryListener.registerAction(eventAction, eventName, eventTopic);
|
|
336
|
-
return eventAction;
|
|
337
|
-
});
|
|
681
|
+
importPaths = dedupe(importPaths);
|
|
682
|
+
return importPaths;
|
|
338
683
|
}
|
|
339
684
|
|
|
340
|
-
function
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
685
|
+
function _gatherProviders(config) {
|
|
686
|
+
if (config.timelineProviderSettings) {
|
|
687
|
+
return Object.values(config.timelineProviderSettings).map(function (settings) {
|
|
688
|
+
return {
|
|
689
|
+
systemName: settings.systemName
|
|
690
|
+
};
|
|
345
691
|
});
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function resolveOperation(importer, operationConfig) {
|
|
350
|
-
return {
|
|
351
|
-
id: operationConfig.id,
|
|
352
|
-
systemName: operationConfig.systemName,
|
|
353
|
-
operationData: deepCopy(operationConfig.operationData),
|
|
354
|
-
instance: importer["import"](operationConfig.systemName)[operationConfig.systemName]
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
function resolveActionConfiguration(config, importer) {
|
|
359
|
-
var resolve = resolveOperation.bind(null, importer);
|
|
360
|
-
return {
|
|
361
|
-
id: config.id,
|
|
362
|
-
name: config.name,
|
|
363
|
-
startOperations: config.startOperations.map(resolve)
|
|
364
|
-
};
|
|
365
|
-
}
|
|
692
|
+
}
|
|
366
693
|
|
|
367
|
-
|
|
368
|
-
var resolve = resolveOperation.bind(null, importer);
|
|
369
|
-
var action = resolveActionConfiguration(config, importer);
|
|
370
|
-
return _extends({}, action, {
|
|
371
|
-
endOperations: config.endOperations.map(resolve)
|
|
372
|
-
});
|
|
694
|
+
return [];
|
|
373
695
|
}
|
|
374
696
|
|
|
375
|
-
function
|
|
376
|
-
|
|
697
|
+
function _gatherEngines(config) {
|
|
698
|
+
if (config.engine) {
|
|
699
|
+
var systemName = config.engine.systemName;
|
|
700
|
+
return [{
|
|
701
|
+
systemName: systemName
|
|
702
|
+
}];
|
|
703
|
+
}
|
|
377
704
|
|
|
378
|
-
|
|
379
|
-
var duration = {
|
|
380
|
-
end: (_actionConfiguration$ = actionConfiguration.duration.end) != null ? _actionConfiguration$ : -1,
|
|
381
|
-
start: actionConfiguration.duration.start
|
|
382
|
-
};
|
|
383
|
-
var id = resolvedConfig.id,
|
|
384
|
-
name = resolvedConfig.name,
|
|
385
|
-
endOperations = resolvedConfig.endOperations,
|
|
386
|
-
startOperations = resolvedConfig.startOperations;
|
|
387
|
-
var action = new TimelineAction(name, startOperations, endOperations, duration, eventbus);
|
|
388
|
-
action.id = id;
|
|
389
|
-
return action;
|
|
705
|
+
return [];
|
|
390
706
|
}
|
|
391
707
|
|
|
392
|
-
function
|
|
393
|
-
var
|
|
394
|
-
return resolveEndableActionConfiguration(config, importer);
|
|
395
|
-
});
|
|
396
|
-
return resolvedConfigs.map(function (resolvedConfig) {
|
|
397
|
-
var name = resolvedConfig.name,
|
|
398
|
-
endOperations = resolvedConfig.endOperations,
|
|
399
|
-
startOperations = resolvedConfig.startOperations;
|
|
400
|
-
var action = new EndableAction(name, startOperations, endOperations, eventbus);
|
|
401
|
-
action.id = resolvedConfig.id;
|
|
402
|
-
return action;
|
|
403
|
-
});
|
|
404
|
-
}
|
|
708
|
+
function _gatherOperations(config) {
|
|
709
|
+
var _config$eventActions;
|
|
405
710
|
|
|
406
|
-
|
|
407
|
-
if (!tsIsPresent.isDefined(config)) {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
711
|
+
var importPaths = _gatherOperationImportPathsFromActions(config.initActions.concat(config.actions).concat((_config$eventActions = config.eventActions) != null ? _config$eventActions : []));
|
|
410
712
|
|
|
411
|
-
if (
|
|
412
|
-
config.
|
|
413
|
-
|
|
414
|
-
});
|
|
415
|
-
} else {
|
|
416
|
-
Object.keys(config).forEach(function (key) {
|
|
417
|
-
resolvePlaceholder(key, config, rootConfig, importer);
|
|
713
|
+
if (config.timelines) {
|
|
714
|
+
var timelineActions = config.timelines.flatMap(function (x) {
|
|
715
|
+
return x.timelineActions;
|
|
418
716
|
});
|
|
717
|
+
importPaths = importPaths.concat(_gatherOperationImportPathsFromActions(timelineActions));
|
|
419
718
|
}
|
|
420
|
-
}
|
|
421
719
|
|
|
422
|
-
|
|
423
|
-
var value = config[key];
|
|
424
|
-
|
|
425
|
-
if (typeof value === 'string') {
|
|
426
|
-
if (value.startsWith('config:')) {
|
|
427
|
-
var configProperty = value.substr(7, value.length);
|
|
428
|
-
config[key] = getNestedPropertyValue(configProperty, rootConfig);
|
|
429
|
-
} else if (value.startsWith('template:')) {
|
|
430
|
-
var templateKey = value.substr(9, value.length);
|
|
431
|
-
config[key] = importer["import"](templateKey)[templateKey];
|
|
432
|
-
} else if (value.startsWith('json:')) {
|
|
433
|
-
var jsonKey = value.substr(5, value.length);
|
|
434
|
-
var json = importer["import"](jsonKey)[jsonKey];
|
|
435
|
-
config[key] = json;
|
|
436
|
-
}
|
|
437
|
-
} else if (typeof value === 'object') {
|
|
438
|
-
resolvePlaceholders(config[key], rootConfig, importer);
|
|
439
|
-
}
|
|
720
|
+
return dedupe(importPaths);
|
|
440
721
|
}
|
|
441
722
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
446
|
-
*
|
|
447
|
-
* This source code is licensed under the MIT license found in the
|
|
448
|
-
* LICENSE file in the root directory of this source tree.
|
|
449
|
-
*/
|
|
450
|
-
|
|
451
|
-
(function (module) {
|
|
452
|
-
var runtime = (function (exports) {
|
|
453
|
-
|
|
454
|
-
var Op = Object.prototype;
|
|
455
|
-
var hasOwn = Op.hasOwnProperty;
|
|
456
|
-
var undefined$1; // More compressible than void 0.
|
|
457
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
458
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
459
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
460
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
461
|
-
|
|
462
|
-
function define(obj, key, value) {
|
|
463
|
-
Object.defineProperty(obj, key, {
|
|
464
|
-
value: value,
|
|
465
|
-
enumerable: true,
|
|
466
|
-
configurable: true,
|
|
467
|
-
writable: true
|
|
468
|
-
});
|
|
469
|
-
return obj[key];
|
|
470
|
-
}
|
|
471
|
-
try {
|
|
472
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
473
|
-
define({}, "");
|
|
474
|
-
} catch (err) {
|
|
475
|
-
define = function(obj, key, value) {
|
|
476
|
-
return obj[key] = value;
|
|
477
|
-
};
|
|
723
|
+
function _gatherControllerImportPathsFromActions(actionsConfig) {
|
|
724
|
+
if (!actionsConfig) {
|
|
725
|
+
return [];
|
|
478
726
|
}
|
|
479
727
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
483
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
484
|
-
var context = new Context(tryLocsList || []);
|
|
485
|
-
|
|
486
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
487
|
-
// .throw, and .return methods.
|
|
488
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
728
|
+
var operations = actionsConfig.flatMap(function (x) {
|
|
729
|
+
var _x$endOperations;
|
|
489
730
|
|
|
490
|
-
return
|
|
491
|
-
}
|
|
492
|
-
|
|
731
|
+
return [].concat(x.startOperations, (_x$endOperations = x.endOperations) != null ? _x$endOperations : []);
|
|
732
|
+
});
|
|
733
|
+
return _gatherControllerImportPaths(operations);
|
|
734
|
+
}
|
|
493
735
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
// invoked without arguments, but in all the cases we care about we
|
|
498
|
-
// already have an existing method we want to call, so there's no need
|
|
499
|
-
// to create a new function object. We can even get away with assuming
|
|
500
|
-
// the method takes exactly one argument, since that happens to be true
|
|
501
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
502
|
-
// only additional allocation required is the completion record, which
|
|
503
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
504
|
-
function tryCatch(fn, obj, arg) {
|
|
505
|
-
try {
|
|
506
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
507
|
-
} catch (err) {
|
|
508
|
-
return { type: "throw", arg: err };
|
|
509
|
-
}
|
|
736
|
+
function _gatherOperationImportPathsFromActions(actionsConfig) {
|
|
737
|
+
if (!actionsConfig) {
|
|
738
|
+
return [];
|
|
510
739
|
}
|
|
511
740
|
|
|
512
|
-
var
|
|
513
|
-
|
|
514
|
-
var GenStateExecuting = "executing";
|
|
515
|
-
var GenStateCompleted = "completed";
|
|
516
|
-
|
|
517
|
-
// Returning this object from the innerFn has the same effect as
|
|
518
|
-
// breaking out of the dispatch switch statement.
|
|
519
|
-
var ContinueSentinel = {};
|
|
520
|
-
|
|
521
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
522
|
-
// .constructor.prototype properties for functions that return Generator
|
|
523
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
524
|
-
// minifier not to mangle the names of these two functions.
|
|
525
|
-
function Generator() {}
|
|
526
|
-
function GeneratorFunction() {}
|
|
527
|
-
function GeneratorFunctionPrototype() {}
|
|
741
|
+
var operations = actionsConfig.flatMap(function (x) {
|
|
742
|
+
var _x$endOperations2;
|
|
528
743
|
|
|
529
|
-
|
|
530
|
-
// don't natively support it.
|
|
531
|
-
var IteratorPrototype = {};
|
|
532
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
533
|
-
return this;
|
|
744
|
+
return [].concat(x.startOperations, (_x$endOperations2 = x.endOperations) != null ? _x$endOperations2 : []);
|
|
534
745
|
});
|
|
746
|
+
return _gatherOperationImportPaths(operations);
|
|
747
|
+
}
|
|
535
748
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
NativeIteratorPrototype !== Op &&
|
|
540
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
541
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
542
|
-
// of the polyfill.
|
|
543
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
547
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
548
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
549
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
550
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
551
|
-
GeneratorFunction.displayName = define(
|
|
552
|
-
GeneratorFunctionPrototype,
|
|
553
|
-
toStringTagSymbol,
|
|
554
|
-
"GeneratorFunction"
|
|
555
|
-
);
|
|
556
|
-
|
|
557
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
558
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
559
|
-
function defineIteratorMethods(prototype) {
|
|
560
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
561
|
-
define(prototype, method, function(arg) {
|
|
562
|
-
return this._invoke(method, arg);
|
|
563
|
-
});
|
|
564
|
-
});
|
|
749
|
+
function _gatherControllerImportPaths(operationConfigs) {
|
|
750
|
+
if (!operationConfigs) {
|
|
751
|
+
return [];
|
|
565
752
|
}
|
|
566
753
|
|
|
567
|
-
|
|
568
|
-
var
|
|
569
|
-
return ctor
|
|
570
|
-
? ctor === GeneratorFunction ||
|
|
571
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
572
|
-
// do is to check its .name property.
|
|
573
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
574
|
-
: false;
|
|
575
|
-
};
|
|
754
|
+
return operationConfigs.filter(function (operationConfig) {
|
|
755
|
+
var _operationConfig$oper;
|
|
576
756
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
580
|
-
} else {
|
|
581
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
582
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
757
|
+
if ((_operationConfig$oper = operationConfig.operationData) != null && _operationConfig$oper.hasOwnProperty('systemName')) {
|
|
758
|
+
return operationConfig.operationData.systemName.endsWith('Controller');
|
|
583
759
|
}
|
|
584
|
-
genFun.prototype = Object.create(Gp);
|
|
585
|
-
return genFun;
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
// Within the body of any async function, `await x` is transformed to
|
|
589
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
590
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
591
|
-
// meant to be awaited.
|
|
592
|
-
exports.awrap = function(arg) {
|
|
593
|
-
return { __await: arg };
|
|
594
|
-
};
|
|
595
|
-
|
|
596
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
597
|
-
function invoke(method, arg, resolve, reject) {
|
|
598
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
599
|
-
if (record.type === "throw") {
|
|
600
|
-
reject(record.arg);
|
|
601
|
-
} else {
|
|
602
|
-
var result = record.arg;
|
|
603
|
-
var value = result.value;
|
|
604
|
-
if (value &&
|
|
605
|
-
typeof value === "object" &&
|
|
606
|
-
hasOwn.call(value, "__await")) {
|
|
607
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
608
|
-
invoke("next", value, resolve, reject);
|
|
609
|
-
}, function(err) {
|
|
610
|
-
invoke("throw", err, resolve, reject);
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
760
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
}, function(error) {
|
|
621
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
622
|
-
// into the async generator function so it can be handled there.
|
|
623
|
-
return invoke("throw", error, resolve, reject);
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
var previousPromise;
|
|
629
|
-
|
|
630
|
-
function enqueue(method, arg) {
|
|
631
|
-
function callInvokeWithMethodAndArg() {
|
|
632
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
633
|
-
invoke(method, arg, resolve, reject);
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
return previousPromise =
|
|
638
|
-
// If enqueue has been called before, then we want to wait until
|
|
639
|
-
// all previous Promises have been resolved before calling invoke,
|
|
640
|
-
// so that results are always delivered in the correct order. If
|
|
641
|
-
// enqueue has not been called before, then it is important to
|
|
642
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
643
|
-
// so that the async generator function has the opportunity to do
|
|
644
|
-
// any necessary setup in a predictable way. This predictability
|
|
645
|
-
// is why the Promise constructor synchronously invokes its
|
|
646
|
-
// executor callback, and why async functions synchronously
|
|
647
|
-
// execute code before the first await. Since we implement simple
|
|
648
|
-
// async functions in terms of async generators, it is especially
|
|
649
|
-
// important to get this right, even though it requires care.
|
|
650
|
-
previousPromise ? previousPromise.then(
|
|
651
|
-
callInvokeWithMethodAndArg,
|
|
652
|
-
// Avoid propagating failures to Promises returned by later
|
|
653
|
-
// invocations of the iterator.
|
|
654
|
-
callInvokeWithMethodAndArg
|
|
655
|
-
) : callInvokeWithMethodAndArg();
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
// Define the unified helper method that is used to implement .next,
|
|
659
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
660
|
-
this._invoke = enqueue;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
664
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
665
|
-
return this;
|
|
761
|
+
return false;
|
|
762
|
+
}).map(function (operationConfig) {
|
|
763
|
+
var systemName = operationConfig.operationData.systemName;
|
|
764
|
+
return {
|
|
765
|
+
systemName: systemName
|
|
766
|
+
};
|
|
666
767
|
});
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
// Note that simple async functions are implemented on top of
|
|
670
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
671
|
-
// the final result produced by the iterator.
|
|
672
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
673
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
674
|
-
|
|
675
|
-
var iter = new AsyncIterator(
|
|
676
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
677
|
-
PromiseImpl
|
|
678
|
-
);
|
|
679
|
-
|
|
680
|
-
return exports.isGeneratorFunction(outerFn)
|
|
681
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
682
|
-
: iter.next().then(function(result) {
|
|
683
|
-
return result.done ? result.value : iter.next();
|
|
684
|
-
});
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
688
|
-
var state = GenStateSuspendedStart;
|
|
689
|
-
|
|
690
|
-
return function invoke(method, arg) {
|
|
691
|
-
if (state === GenStateExecuting) {
|
|
692
|
-
throw new Error("Generator is already running");
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
if (state === GenStateCompleted) {
|
|
696
|
-
if (method === "throw") {
|
|
697
|
-
throw arg;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
701
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
702
|
-
return doneResult();
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
context.method = method;
|
|
706
|
-
context.arg = arg;
|
|
707
|
-
|
|
708
|
-
while (true) {
|
|
709
|
-
var delegate = context.delegate;
|
|
710
|
-
if (delegate) {
|
|
711
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
712
|
-
if (delegateResult) {
|
|
713
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
714
|
-
return delegateResult;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
if (context.method === "next") {
|
|
719
|
-
// Setting context._sent for legacy support of Babel's
|
|
720
|
-
// function.sent implementation.
|
|
721
|
-
context.sent = context._sent = context.arg;
|
|
722
|
-
|
|
723
|
-
} else if (context.method === "throw") {
|
|
724
|
-
if (state === GenStateSuspendedStart) {
|
|
725
|
-
state = GenStateCompleted;
|
|
726
|
-
throw context.arg;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
context.dispatchException(context.arg);
|
|
730
|
-
|
|
731
|
-
} else if (context.method === "return") {
|
|
732
|
-
context.abrupt("return", context.arg);
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
state = GenStateExecuting;
|
|
736
|
-
|
|
737
|
-
var record = tryCatch(innerFn, self, context);
|
|
738
|
-
if (record.type === "normal") {
|
|
739
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
740
|
-
// GenStateExecuting and loop back for another invocation.
|
|
741
|
-
state = context.done
|
|
742
|
-
? GenStateCompleted
|
|
743
|
-
: GenStateSuspendedYield;
|
|
744
|
-
|
|
745
|
-
if (record.arg === ContinueSentinel) {
|
|
746
|
-
continue;
|
|
747
|
-
}
|
|
768
|
+
}
|
|
748
769
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
} else if (record.type === "throw") {
|
|
755
|
-
state = GenStateCompleted;
|
|
756
|
-
// Dispatch the exception by looping back around to the
|
|
757
|
-
// context.dispatchException(context.arg) call above.
|
|
758
|
-
context.method = "throw";
|
|
759
|
-
context.arg = record.arg;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
};
|
|
770
|
+
function _gatherOperationImportPaths(operationConfigs) {
|
|
771
|
+
if (!operationConfigs) {
|
|
772
|
+
return [];
|
|
763
773
|
}
|
|
764
774
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
773
|
-
// method always terminates the yield* loop.
|
|
774
|
-
context.delegate = null;
|
|
775
|
-
|
|
776
|
-
if (context.method === "throw") {
|
|
777
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
778
|
-
if (delegate.iterator["return"]) {
|
|
779
|
-
// If the delegate iterator has a return method, give it a
|
|
780
|
-
// chance to clean up.
|
|
781
|
-
context.method = "return";
|
|
782
|
-
context.arg = undefined$1;
|
|
783
|
-
maybeInvokeDelegate(delegate, context);
|
|
784
|
-
|
|
785
|
-
if (context.method === "throw") {
|
|
786
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
787
|
-
// "return" to "throw", let that override the TypeError below.
|
|
788
|
-
return ContinueSentinel;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
context.method = "throw";
|
|
793
|
-
context.arg = new TypeError(
|
|
794
|
-
"The iterator does not provide a 'throw' method");
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
return ContinueSentinel;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
775
|
+
return operationConfigs.map(function (operationConfig) {
|
|
776
|
+
var systemName = operationConfig.systemName;
|
|
777
|
+
return {
|
|
778
|
+
systemName: systemName
|
|
779
|
+
};
|
|
780
|
+
});
|
|
781
|
+
}
|
|
801
782
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
return
|
|
783
|
+
function dedupe(importPaths) {
|
|
784
|
+
var lookup = {};
|
|
785
|
+
return importPaths.filter(function (imp) {
|
|
786
|
+
if (lookup[imp.systemName]) {
|
|
787
|
+
return false;
|
|
807
788
|
}
|
|
808
789
|
|
|
809
|
-
|
|
790
|
+
lookup[imp.systemName] = true;
|
|
791
|
+
return true;
|
|
792
|
+
});
|
|
793
|
+
}
|
|
810
794
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
return ContinueSentinel;
|
|
816
|
-
}
|
|
795
|
+
function getNestedValue(properties, sourceObject) {
|
|
796
|
+
if (!properties) {
|
|
797
|
+
throw Error('properties arg cannot be null');
|
|
798
|
+
}
|
|
817
799
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
context[delegate.resultName] = info.value;
|
|
800
|
+
if (!sourceObject) {
|
|
801
|
+
throw Error('sourceObject arg cannot be null');
|
|
802
|
+
}
|
|
822
803
|
|
|
823
|
-
|
|
824
|
-
|
|
804
|
+
var currentInstance = sourceObject;
|
|
805
|
+
var suffix = null;
|
|
806
|
+
properties.forEach(function (prop, index) {
|
|
807
|
+
if (index === properties.length - 1) {
|
|
808
|
+
var parts = prop.split('+');
|
|
825
809
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
830
|
-
// "return", allow the original .return call to continue in the
|
|
831
|
-
// outer generator.
|
|
832
|
-
if (context.method !== "return") {
|
|
833
|
-
context.method = "next";
|
|
834
|
-
context.arg = undefined$1;
|
|
810
|
+
if (parts.length > 1) {
|
|
811
|
+
prop = parts[0];
|
|
812
|
+
suffix = parts[1];
|
|
835
813
|
}
|
|
836
|
-
|
|
837
|
-
} else {
|
|
838
|
-
// Re-yield the result returned by the delegate method.
|
|
839
|
-
return info;
|
|
840
814
|
}
|
|
841
815
|
|
|
842
|
-
|
|
843
|
-
// the outer generator.
|
|
844
|
-
context.delegate = null;
|
|
845
|
-
return ContinueSentinel;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
849
|
-
// unified ._invoke helper method.
|
|
850
|
-
defineIteratorMethods(Gp);
|
|
851
|
-
|
|
852
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
853
|
-
|
|
854
|
-
// A Generator should always return itself as the iterator object when the
|
|
855
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
856
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
857
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
858
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
859
|
-
define(Gp, iteratorSymbol, function() {
|
|
860
|
-
return this;
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
define(Gp, "toString", function() {
|
|
864
|
-
return "[object Generator]";
|
|
816
|
+
currentInstance = currentInstance[prop];
|
|
865
817
|
});
|
|
818
|
+
return suffix ? currentInstance + suffix : currentInstance;
|
|
819
|
+
}
|
|
866
820
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
entry.catchLoc = locs[1];
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
if (2 in locs) {
|
|
875
|
-
entry.finallyLoc = locs[2];
|
|
876
|
-
entry.afterLoc = locs[3];
|
|
877
|
-
}
|
|
821
|
+
function getNestedPropertyValue(propertyChain, sourceObject) {
|
|
822
|
+
var properties = propertyChain.split('.');
|
|
823
|
+
return getNestedValue(properties, sourceObject);
|
|
824
|
+
}
|
|
878
825
|
|
|
879
|
-
|
|
826
|
+
var ConfigurationResolver = /*#__PURE__*/function () {
|
|
827
|
+
function ConfigurationResolver(importer, eventbus) {
|
|
828
|
+
this.importer = void 0;
|
|
829
|
+
this.eventbus = void 0;
|
|
830
|
+
this.importer = importer;
|
|
831
|
+
this.eventbus = eventbus;
|
|
880
832
|
}
|
|
881
833
|
|
|
882
|
-
|
|
883
|
-
var record = entry.completion || {};
|
|
884
|
-
record.type = "normal";
|
|
885
|
-
delete record.arg;
|
|
886
|
-
entry.completion = record;
|
|
887
|
-
}
|
|
834
|
+
var _proto = ConfigurationResolver.prototype;
|
|
888
835
|
|
|
889
|
-
function
|
|
890
|
-
|
|
891
|
-
// or a finally block) gives us a place to store values thrown from
|
|
892
|
-
// locations where there is no enclosing try statement.
|
|
893
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
894
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
895
|
-
this.reset(true);
|
|
896
|
-
}
|
|
836
|
+
_proto.process = function process(configuration, actionRegistryListener) {
|
|
837
|
+
resolvePlaceholders(configuration, configuration, this.importer);
|
|
897
838
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
for (var key in object) {
|
|
901
|
-
keys.push(key);
|
|
839
|
+
if (!tsIsPresent.isDefined(configuration.timelineProviderSettings)) {
|
|
840
|
+
throw new Error('Configuration incomplete: it needs to have at least one timeline provider setting');
|
|
902
841
|
}
|
|
903
|
-
keys.reverse();
|
|
904
|
-
|
|
905
|
-
// Rather than returning an object with a next method, we keep
|
|
906
|
-
// things simple and return the next function itself.
|
|
907
|
-
return function next() {
|
|
908
|
-
while (keys.length) {
|
|
909
|
-
var key = keys.pop();
|
|
910
|
-
if (key in object) {
|
|
911
|
-
next.value = key;
|
|
912
|
-
next.done = false;
|
|
913
|
-
return next;
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
842
|
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
843
|
+
var resolvedConfig = {
|
|
844
|
+
id: configuration.id,
|
|
845
|
+
engine: _extends({}, configuration.engine),
|
|
846
|
+
timelineProviderSettings: deepCopy(configuration.timelineProviderSettings),
|
|
847
|
+
containerSelector: configuration.containerSelector,
|
|
848
|
+
language: configuration.language,
|
|
849
|
+
layoutTemplate: configuration.layoutTemplate,
|
|
850
|
+
availableLanguages: deepCopy(configuration.availableLanguages),
|
|
851
|
+
actions: resolveActions(configuration.actions, this.importer, this.eventbus),
|
|
852
|
+
initActions: resolveActions(configuration.initActions, this.importer, this.eventbus),
|
|
853
|
+
labels: deepCopy(configuration.labels),
|
|
854
|
+
timelineFlow: deepCopy(configuration.timelineFlow),
|
|
855
|
+
timelines: resolveTimelines(configuration.timelines, this.importer, this.eventbus)
|
|
922
856
|
};
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
function values(iterable) {
|
|
926
|
-
if (iterable) {
|
|
927
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
928
|
-
if (iteratorMethod) {
|
|
929
|
-
return iteratorMethod.call(iterable);
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
if (typeof iterable.next === "function") {
|
|
933
|
-
return iterable;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
if (!isNaN(iterable.length)) {
|
|
937
|
-
var i = -1, next = function next() {
|
|
938
|
-
while (++i < iterable.length) {
|
|
939
|
-
if (hasOwn.call(iterable, i)) {
|
|
940
|
-
next.value = iterable[i];
|
|
941
|
-
next.done = false;
|
|
942
|
-
return next;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
next.value = undefined$1;
|
|
947
|
-
next.done = true;
|
|
948
|
-
|
|
949
|
-
return next;
|
|
950
|
-
};
|
|
857
|
+
var eventActions = [];
|
|
951
858
|
|
|
952
|
-
|
|
953
|
-
|
|
859
|
+
if (configuration.eventActions && actionRegistryListener) {
|
|
860
|
+
eventActions = resolveEventActions(configuration.eventActions, actionRegistryListener, this.importer, this.eventbus);
|
|
954
861
|
}
|
|
955
862
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
exports.values = values;
|
|
960
|
-
|
|
961
|
-
function doneResult() {
|
|
962
|
-
return { value: undefined$1, done: true };
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
Context.prototype = {
|
|
966
|
-
constructor: Context,
|
|
967
|
-
|
|
968
|
-
reset: function(skipTempReset) {
|
|
969
|
-
this.prev = 0;
|
|
970
|
-
this.next = 0;
|
|
971
|
-
// Resetting context._sent for legacy support of Babel's
|
|
972
|
-
// function.sent implementation.
|
|
973
|
-
this.sent = this._sent = undefined$1;
|
|
974
|
-
this.done = false;
|
|
975
|
-
this.delegate = null;
|
|
976
|
-
|
|
977
|
-
this.method = "next";
|
|
978
|
-
this.arg = undefined$1;
|
|
979
|
-
|
|
980
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
981
|
-
|
|
982
|
-
if (!skipTempReset) {
|
|
983
|
-
for (var name in this) {
|
|
984
|
-
// Not sure about the optimal order of these conditions:
|
|
985
|
-
if (name.charAt(0) === "t" &&
|
|
986
|
-
hasOwn.call(this, name) &&
|
|
987
|
-
!isNaN(+name.slice(1))) {
|
|
988
|
-
this[name] = undefined$1;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
},
|
|
993
|
-
|
|
994
|
-
stop: function() {
|
|
995
|
-
this.done = true;
|
|
996
|
-
|
|
997
|
-
var rootEntry = this.tryEntries[0];
|
|
998
|
-
var rootRecord = rootEntry.completion;
|
|
999
|
-
if (rootRecord.type === "throw") {
|
|
1000
|
-
throw rootRecord.arg;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
return this.rval;
|
|
1004
|
-
},
|
|
1005
|
-
|
|
1006
|
-
dispatchException: function(exception) {
|
|
1007
|
-
if (this.done) {
|
|
1008
|
-
throw exception;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
var context = this;
|
|
1012
|
-
function handle(loc, caught) {
|
|
1013
|
-
record.type = "throw";
|
|
1014
|
-
record.arg = exception;
|
|
1015
|
-
context.next = loc;
|
|
1016
|
-
|
|
1017
|
-
if (caught) {
|
|
1018
|
-
// If the dispatched exception was caught by a catch block,
|
|
1019
|
-
// then let that catch block handle the exception normally.
|
|
1020
|
-
context.method = "next";
|
|
1021
|
-
context.arg = undefined$1;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
return !! caught;
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1028
|
-
var entry = this.tryEntries[i];
|
|
1029
|
-
var record = entry.completion;
|
|
1030
|
-
|
|
1031
|
-
if (entry.tryLoc === "root") {
|
|
1032
|
-
// Exception thrown outside of any try block that could handle
|
|
1033
|
-
// it, so set the completion value of the entire function to
|
|
1034
|
-
// throw the exception.
|
|
1035
|
-
return handle("end");
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
if (entry.tryLoc <= this.prev) {
|
|
1039
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1040
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1041
|
-
|
|
1042
|
-
if (hasCatch && hasFinally) {
|
|
1043
|
-
if (this.prev < entry.catchLoc) {
|
|
1044
|
-
return handle(entry.catchLoc, true);
|
|
1045
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
1046
|
-
return handle(entry.finallyLoc);
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
} else if (hasCatch) {
|
|
1050
|
-
if (this.prev < entry.catchLoc) {
|
|
1051
|
-
return handle(entry.catchLoc, true);
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
} else if (hasFinally) {
|
|
1055
|
-
if (this.prev < entry.finallyLoc) {
|
|
1056
|
-
return handle(entry.finallyLoc);
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
} else {
|
|
1060
|
-
throw new Error("try statement without catch or finally");
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
},
|
|
1065
|
-
|
|
1066
|
-
abrupt: function(type, arg) {
|
|
1067
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1068
|
-
var entry = this.tryEntries[i];
|
|
1069
|
-
if (entry.tryLoc <= this.prev &&
|
|
1070
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
1071
|
-
this.prev < entry.finallyLoc) {
|
|
1072
|
-
var finallyEntry = entry;
|
|
1073
|
-
break;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
if (finallyEntry &&
|
|
1078
|
-
(type === "break" ||
|
|
1079
|
-
type === "continue") &&
|
|
1080
|
-
finallyEntry.tryLoc <= arg &&
|
|
1081
|
-
arg <= finallyEntry.finallyLoc) {
|
|
1082
|
-
// Ignore the finally entry if control is not jumping to a
|
|
1083
|
-
// location outside the try/catch block.
|
|
1084
|
-
finallyEntry = null;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
1088
|
-
record.type = type;
|
|
1089
|
-
record.arg = arg;
|
|
863
|
+
var actionsLookup = resolvedConfig.actions.concat(eventActions).reduce(function (aggr, action) {
|
|
864
|
+
var _extends2;
|
|
1090
865
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
866
|
+
return _extends({}, aggr, (_extends2 = {}, _extends2[action.name] = action, _extends2));
|
|
867
|
+
}, {});
|
|
868
|
+
return [actionsLookup, resolvedConfig];
|
|
869
|
+
};
|
|
1096
870
|
|
|
1097
|
-
|
|
1098
|
-
|
|
871
|
+
return ConfigurationResolver;
|
|
872
|
+
}();
|
|
1099
873
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
874
|
+
function resolveEventActions(eventActionConfigurations, actionRegistryListener, importer, eventbus) {
|
|
875
|
+
var resolvedConfigs = eventActionConfigurations.map(function (config) {
|
|
876
|
+
return resolveActionConfiguration(config, importer);
|
|
877
|
+
});
|
|
878
|
+
return resolvedConfigs.map(function (config, index) {
|
|
879
|
+
var _eventActionConfigura = eventActionConfigurations[index],
|
|
880
|
+
eventName = _eventActionConfigura.eventName,
|
|
881
|
+
eventTopic = _eventActionConfigura.eventTopic;
|
|
882
|
+
var eventAction = new Action(config.name, config.startOperations, eventbus);
|
|
883
|
+
actionRegistryListener.registerAction(eventAction, eventName, eventTopic);
|
|
884
|
+
return eventAction;
|
|
885
|
+
});
|
|
886
|
+
}
|
|
1104
887
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
this.next = afterLoc;
|
|
1114
|
-
}
|
|
888
|
+
function resolveTimelines(timelines, importer, eventbus) {
|
|
889
|
+
var resolve = resolveTimelineAction.bind(null, importer, eventbus);
|
|
890
|
+
return timelines.map(function (config) {
|
|
891
|
+
return _extends({}, config, {
|
|
892
|
+
timelineActions: config.timelineActions.map(resolve)
|
|
893
|
+
});
|
|
894
|
+
});
|
|
895
|
+
}
|
|
1115
896
|
|
|
1116
|
-
|
|
1117
|
-
|
|
897
|
+
function resolveOperation(importer, operationConfig) {
|
|
898
|
+
return {
|
|
899
|
+
id: operationConfig.id,
|
|
900
|
+
systemName: operationConfig.systemName,
|
|
901
|
+
operationData: deepCopy(operationConfig.operationData),
|
|
902
|
+
instance: importer["import"](operationConfig.systemName)[operationConfig.systemName]
|
|
903
|
+
};
|
|
904
|
+
}
|
|
1118
905
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
}
|
|
1128
|
-
},
|
|
906
|
+
function resolveActionConfiguration(config, importer) {
|
|
907
|
+
var resolve = resolveOperation.bind(null, importer);
|
|
908
|
+
return {
|
|
909
|
+
id: config.id,
|
|
910
|
+
name: config.name,
|
|
911
|
+
startOperations: config.startOperations.map(resolve)
|
|
912
|
+
};
|
|
913
|
+
}
|
|
1129
914
|
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
resetTryEntry(entry);
|
|
1138
|
-
}
|
|
1139
|
-
return thrown;
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
915
|
+
function resolveEndableActionConfiguration(config, importer) {
|
|
916
|
+
var resolve = resolveOperation.bind(null, importer);
|
|
917
|
+
var action = resolveActionConfiguration(config, importer);
|
|
918
|
+
return _extends({}, action, {
|
|
919
|
+
endOperations: config.endOperations.map(resolve)
|
|
920
|
+
});
|
|
921
|
+
}
|
|
1142
922
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
throw new Error("illegal catch attempt");
|
|
1146
|
-
},
|
|
923
|
+
function resolveTimelineAction(importer, eventbus, actionConfiguration) {
|
|
924
|
+
var _actionConfiguration$;
|
|
1147
925
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
926
|
+
var resolvedConfig = resolveEndableActionConfiguration(actionConfiguration, importer);
|
|
927
|
+
var duration = {
|
|
928
|
+
end: (_actionConfiguration$ = actionConfiguration.duration.end) != null ? _actionConfiguration$ : -1,
|
|
929
|
+
start: actionConfiguration.duration.start
|
|
930
|
+
};
|
|
931
|
+
var id = resolvedConfig.id,
|
|
932
|
+
name = resolvedConfig.name,
|
|
933
|
+
endOperations = resolvedConfig.endOperations,
|
|
934
|
+
startOperations = resolvedConfig.startOperations;
|
|
935
|
+
var action = new TimelineAction(name, startOperations, endOperations, duration, eventbus);
|
|
936
|
+
action.id = id;
|
|
937
|
+
return action;
|
|
938
|
+
}
|
|
1154
939
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
940
|
+
function resolveActions(actionConfigurations, importer, eventbus) {
|
|
941
|
+
var resolvedConfigs = actionConfigurations.map(function (config) {
|
|
942
|
+
return resolveEndableActionConfiguration(config, importer);
|
|
943
|
+
});
|
|
944
|
+
return resolvedConfigs.map(function (resolvedConfig) {
|
|
945
|
+
var name = resolvedConfig.name,
|
|
946
|
+
endOperations = resolvedConfig.endOperations,
|
|
947
|
+
startOperations = resolvedConfig.startOperations;
|
|
948
|
+
var action = new EndableAction(name, startOperations, endOperations, eventbus);
|
|
949
|
+
action.id = resolvedConfig.id;
|
|
950
|
+
return action;
|
|
951
|
+
});
|
|
952
|
+
}
|
|
1160
953
|
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
954
|
+
function resolvePlaceholders(configFragment, rootConfig, importer) {
|
|
955
|
+
if (!tsIsPresent.isDefined(configFragment)) {
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
1164
958
|
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
return exports;
|
|
1170
|
-
|
|
1171
|
-
}(
|
|
1172
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
1173
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
1174
|
-
// object. Either way, the resulting object will be used to initialize
|
|
1175
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
1176
|
-
module.exports
|
|
1177
|
-
));
|
|
1178
|
-
|
|
1179
|
-
try {
|
|
1180
|
-
regeneratorRuntime = runtime;
|
|
1181
|
-
} catch (accidentalStrictMode) {
|
|
1182
|
-
// This module should not be running in strict mode, so the above
|
|
1183
|
-
// assignment should always work unless something is misconfigured. Just
|
|
1184
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1185
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
1186
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
1187
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
1188
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
1189
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
1190
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1191
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
1192
|
-
if (typeof globalThis === "object") {
|
|
1193
|
-
globalThis.regeneratorRuntime = runtime;
|
|
959
|
+
if (Array.isArray(configFragment)) {
|
|
960
|
+
configFragment.forEach(function (item) {
|
|
961
|
+
resolvePlaceholders(item, rootConfig, importer);
|
|
962
|
+
});
|
|
1194
963
|
} else {
|
|
1195
|
-
|
|
964
|
+
Object.keys(configFragment).forEach(function (key) {
|
|
965
|
+
resolvePlaceholder(key, configFragment, rootConfig, importer);
|
|
966
|
+
});
|
|
1196
967
|
}
|
|
1197
968
|
}
|
|
1198
|
-
}(runtime));
|
|
1199
969
|
|
|
1200
|
-
|
|
970
|
+
function resolvePlaceholder(key, configFragment, rootConfig, importer) {
|
|
971
|
+
var configValue = configFragment[key];
|
|
972
|
+
|
|
973
|
+
if (typeof configValue === 'string') {
|
|
974
|
+
if (configValue.startsWith('config:')) {
|
|
975
|
+
var configProperty = configValue.substring(7, configValue.length);
|
|
976
|
+
configFragment[key] = getNestedPropertyValue(configProperty, rootConfig);
|
|
977
|
+
} else if (configValue.startsWith('template:')) {
|
|
978
|
+
var templateKey = configValue.substring(9, configValue.length);
|
|
979
|
+
var template = importer["import"](templateKey)[templateKey];
|
|
980
|
+
configFragment[key] = template;
|
|
981
|
+
} else if (configValue.startsWith('json:')) {
|
|
982
|
+
var jsonKey = configValue.substring(5, configValue.length);
|
|
983
|
+
var json = importer["import"](jsonKey)[jsonKey];
|
|
984
|
+
configFragment[key] = json;
|
|
985
|
+
}
|
|
986
|
+
} else if (typeof configValue === 'object') {
|
|
987
|
+
resolvePlaceholders(configValue, rootConfig, importer);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
1201
990
|
|
|
1202
991
|
var TimelineEventNames = function TimelineEventNames() {};
|
|
1203
992
|
TimelineEventNames.PLAY_TOGGLE_REQUEST = 'timeline-play-toggle-request';
|
|
@@ -1307,19 +1096,19 @@ var EventListenerController = /*#__PURE__*/function () {
|
|
|
1307
1096
|
return;
|
|
1308
1097
|
}
|
|
1309
1098
|
|
|
1310
|
-
var
|
|
1099
|
+
var actionOperationData = this.operationData.actionOperationData ? deepCopy(this.operationData.actionOperationData) : {};
|
|
1311
1100
|
|
|
1312
1101
|
if (event.target) {
|
|
1313
|
-
|
|
1102
|
+
actionOperationData.targetValue = event.target.value;
|
|
1314
1103
|
}
|
|
1315
1104
|
|
|
1316
|
-
this._executeAction(this.actionInstanceInfos,
|
|
1105
|
+
this._executeAction(this.actionInstanceInfos, actionOperationData, 0);
|
|
1317
1106
|
};
|
|
1318
1107
|
|
|
1319
1108
|
_proto._executeAction = /*#__PURE__*/function () {
|
|
1320
|
-
var _executeAction2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(actions, operationData, idx) {
|
|
1109
|
+
var _executeAction2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(actions, operationData, idx) {
|
|
1321
1110
|
var actionInfo, action, method, resultOperationData;
|
|
1322
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
1111
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1323
1112
|
while (1) {
|
|
1324
1113
|
switch (_context.prev = _context.next) {
|
|
1325
1114
|
case 0:
|
|
@@ -2171,6 +1960,34 @@ var ctrls = {
|
|
|
2171
1960
|
SubtitlesController: SubtitlesController
|
|
2172
1961
|
};
|
|
2173
1962
|
|
|
1963
|
+
var DevToolEventListener = /*#__PURE__*/function () {
|
|
1964
|
+
function DevToolEventListener(agent) {
|
|
1965
|
+
this.agent = void 0;
|
|
1966
|
+
this.agent = agent;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
var _proto = DevToolEventListener.prototype;
|
|
1970
|
+
|
|
1971
|
+
_proto.handleEvent = function handleEvent(eventName, eventTopic, args) {
|
|
1972
|
+
this.agent.postMessage('eligius-diagnostics-event', {
|
|
1973
|
+
eventName: eventName,
|
|
1974
|
+
eventTopic: eventTopic
|
|
1975
|
+
});
|
|
1976
|
+
};
|
|
1977
|
+
|
|
1978
|
+
return DevToolEventListener;
|
|
1979
|
+
}();
|
|
1980
|
+
|
|
1981
|
+
var Diagnostics = /*#__PURE__*/function () {
|
|
1982
|
+
function Diagnostics() {}
|
|
1983
|
+
|
|
1984
|
+
Diagnostics.send = function send(_name, _data) {};
|
|
1985
|
+
|
|
1986
|
+
return Diagnostics;
|
|
1987
|
+
}();
|
|
1988
|
+
|
|
1989
|
+
var DEV_TOOLS_KEY = '__ELIGIUS_DEV_TOOLS__';
|
|
1990
|
+
|
|
2174
1991
|
/**
|
|
2175
1992
|
* EligiusEngine, this is where the magic happens. The engine is responsible for starting and stopping
|
|
2176
1993
|
* the given timeline provider and triggering the actions associated with it.
|
|
@@ -2232,6 +2049,7 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2232
2049
|
|
|
2233
2050
|
_proto._initializeTimelineProvider = function _initializeTimelineProvider() {
|
|
2234
2051
|
var _this$configuration$t,
|
|
2052
|
+
_this$_activeTimeline,
|
|
2235
2053
|
_this = this;
|
|
2236
2054
|
|
|
2237
2055
|
if (!((_this$configuration$t = this.configuration.timelines) != null && _this$configuration$t.length)) {
|
|
@@ -2245,14 +2063,11 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2245
2063
|
throw new Error("No timeline provider configured for type " + firstTimeline.type);
|
|
2246
2064
|
}
|
|
2247
2065
|
|
|
2248
|
-
|
|
2249
|
-
this._activeTimelineProvider.destroy();
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2066
|
+
(_this$_activeTimeline = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline.destroy();
|
|
2252
2067
|
this._activeTimelineProvider = providerSettings.provider;
|
|
2253
2068
|
return new Promise( /*#__PURE__*/function () {
|
|
2254
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve) {
|
|
2255
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2069
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
|
|
2070
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2256
2071
|
while (1) {
|
|
2257
2072
|
switch (_context.prev = _context.next) {
|
|
2258
2073
|
case 0:
|
|
@@ -2291,8 +2106,8 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2291
2106
|
};
|
|
2292
2107
|
|
|
2293
2108
|
_proto._cleanUp = /*#__PURE__*/function () {
|
|
2294
|
-
var _cleanUp2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
2295
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
2109
|
+
var _cleanUp2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2110
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2296
2111
|
while (1) {
|
|
2297
2112
|
switch (_context2.prev = _context2.next) {
|
|
2298
2113
|
case 0:
|
|
@@ -2319,8 +2134,9 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2319
2134
|
}();
|
|
2320
2135
|
|
|
2321
2136
|
_proto.destroy = /*#__PURE__*/function () {
|
|
2322
|
-
var _destroy = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
2323
|
-
|
|
2137
|
+
var _destroy = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
2138
|
+
var containerSelector, container;
|
|
2139
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
2324
2140
|
while (1) {
|
|
2325
2141
|
switch (_context3.prev = _context3.next) {
|
|
2326
2142
|
case 0:
|
|
@@ -2335,12 +2151,16 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2335
2151
|
});
|
|
2336
2152
|
|
|
2337
2153
|
if (this.timelineProviders) {
|
|
2338
|
-
Object.values(this.timelineProviders).forEach(function (
|
|
2339
|
-
return
|
|
2154
|
+
Object.values(this.timelineProviders).forEach(function (providerInfo) {
|
|
2155
|
+
return providerInfo.provider.destroy();
|
|
2340
2156
|
});
|
|
2341
2157
|
}
|
|
2342
2158
|
|
|
2343
|
-
|
|
2159
|
+
containerSelector = this.configuration.containerSelector;
|
|
2160
|
+
container = $__default["default"](containerSelector);
|
|
2161
|
+
container.empty();
|
|
2162
|
+
|
|
2163
|
+
case 8:
|
|
2344
2164
|
case "end":
|
|
2345
2165
|
return _context3.stop();
|
|
2346
2166
|
}
|
|
@@ -2436,9 +2256,9 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2436
2256
|
};
|
|
2437
2257
|
|
|
2438
2258
|
_proto._executeActions = /*#__PURE__*/function () {
|
|
2439
|
-
var _executeActions2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(actions, methodName, idx) {
|
|
2259
|
+
var _executeActions2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(actions, methodName, idx) {
|
|
2440
2260
|
var action;
|
|
2441
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
2261
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2442
2262
|
while (1) {
|
|
2443
2263
|
switch (_context4.prev = _context4.next) {
|
|
2444
2264
|
case 0:
|
|
@@ -2483,12 +2303,12 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2483
2303
|
};
|
|
2484
2304
|
|
|
2485
2305
|
_proto._handleRequestTimelineUri = /*#__PURE__*/function () {
|
|
2486
|
-
var _handleRequestTimelineUri2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(uri, position, previousVideoPosition) {
|
|
2306
|
+
var _handleRequestTimelineUri2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(uri, position, previousVideoPosition) {
|
|
2487
2307
|
var _position,
|
|
2488
2308
|
_this3 = this;
|
|
2489
2309
|
|
|
2490
2310
|
var timelineConfig, newProviderSettings;
|
|
2491
|
-
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
2311
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
2492
2312
|
while (1) {
|
|
2493
2313
|
switch (_context5.prev = _context5.next) {
|
|
2494
2314
|
case 0:
|
|
@@ -2609,9 +2429,9 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2609
2429
|
};
|
|
2610
2430
|
|
|
2611
2431
|
_proto._handleRequestTimelinePosition = function _handleRequestTimelinePosition(floor, resultCallback) {
|
|
2612
|
-
var _this$
|
|
2432
|
+
var _this$_activeTimeline2;
|
|
2613
2433
|
|
|
2614
|
-
resultCallback(floor(((_this$
|
|
2434
|
+
resultCallback(floor(((_this$_activeTimeline2 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline2.getPosition()) || -1));
|
|
2615
2435
|
};
|
|
2616
2436
|
|
|
2617
2437
|
_proto._handleTimelineComplete = function _handleTimelineComplete() {
|
|
@@ -2657,19 +2477,19 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2657
2477
|
|
|
2658
2478
|
_proto._onTimeHandler = function _onTimeHandler(floor, event) {
|
|
2659
2479
|
if (!isNaN(event.position)) {
|
|
2660
|
-
var _this$
|
|
2480
|
+
var _this$_activeTimeline4;
|
|
2661
2481
|
|
|
2662
2482
|
var pos = floor(event.position);
|
|
2663
2483
|
|
|
2664
2484
|
if (this._lastPosition !== pos) {
|
|
2665
|
-
var _this$
|
|
2485
|
+
var _this$_activeTimeline3;
|
|
2666
2486
|
|
|
2667
2487
|
this._executeActionsForPosition(pos);
|
|
2668
2488
|
|
|
2669
|
-
this.eventbus.broadcast(TimelineEventNames.POSITION_UPDATE, [pos, (_this$
|
|
2489
|
+
this.eventbus.broadcast(TimelineEventNames.POSITION_UPDATE, [pos, (_this$_activeTimeline3 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline3.getDuration()]);
|
|
2670
2490
|
}
|
|
2671
2491
|
|
|
2672
|
-
this.eventbus.broadcast(TimelineEventNames.TIME_UPDATE, [event.position, (_this$
|
|
2492
|
+
this.eventbus.broadcast(TimelineEventNames.TIME_UPDATE, [event.position, (_this$_activeTimeline4 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline4.getDuration()]);
|
|
2673
2493
|
}
|
|
2674
2494
|
};
|
|
2675
2495
|
|
|
@@ -2730,29 +2550,31 @@ var EligiusEngine = /*#__PURE__*/function () {
|
|
|
2730
2550
|
|
|
2731
2551
|
var ActionRegistryEventbusListener = /*#__PURE__*/function () {
|
|
2732
2552
|
function ActionRegistryEventbusListener() {
|
|
2733
|
-
this._actionRegistry =
|
|
2553
|
+
this._actionRegistry = new Map();
|
|
2734
2554
|
}
|
|
2735
2555
|
|
|
2736
2556
|
var _proto = ActionRegistryEventbusListener.prototype;
|
|
2737
2557
|
|
|
2738
2558
|
_proto.registerAction = function registerAction(action, eventName, eventTopic) {
|
|
2559
|
+
var _this$_actionRegistry;
|
|
2560
|
+
|
|
2739
2561
|
if (eventTopic && eventTopic.length) {
|
|
2740
2562
|
eventName = eventName + ":" + eventTopic;
|
|
2741
2563
|
}
|
|
2742
2564
|
|
|
2743
|
-
if (!this._actionRegistry
|
|
2744
|
-
this._actionRegistry
|
|
2565
|
+
if (!this._actionRegistry.has(eventName)) {
|
|
2566
|
+
this._actionRegistry.set(eventName, []);
|
|
2745
2567
|
}
|
|
2746
2568
|
|
|
2747
|
-
this._actionRegistry
|
|
2569
|
+
(_this$_actionRegistry = this._actionRegistry.get(eventName)) == null ? void 0 : _this$_actionRegistry.push(action);
|
|
2748
2570
|
};
|
|
2749
2571
|
|
|
2750
2572
|
_proto.handleEvent = function handleEvent(eventName, eventTopic, args) {
|
|
2751
|
-
if (eventTopic
|
|
2573
|
+
if (eventTopic) {
|
|
2752
2574
|
eventName = eventName + ":" + eventTopic;
|
|
2753
2575
|
}
|
|
2754
2576
|
|
|
2755
|
-
var actions = this._actionRegistry
|
|
2577
|
+
var actions = this._actionRegistry.get(eventName);
|
|
2756
2578
|
|
|
2757
2579
|
if (actions) {
|
|
2758
2580
|
var operationData = {
|
|
@@ -2769,8 +2591,8 @@ var ActionRegistryEventbusListener = /*#__PURE__*/function () {
|
|
|
2769
2591
|
|
|
2770
2592
|
var Eventbus = /*#__PURE__*/function () {
|
|
2771
2593
|
function Eventbus() {
|
|
2772
|
-
this.eventHandlers =
|
|
2773
|
-
this.eventInterceptors =
|
|
2594
|
+
this.eventHandlers = new Map();
|
|
2595
|
+
this.eventInterceptors = new Map();
|
|
2774
2596
|
this.eventListeners = [];
|
|
2775
2597
|
this.clear();
|
|
2776
2598
|
}
|
|
@@ -2778,33 +2600,33 @@ var Eventbus = /*#__PURE__*/function () {
|
|
|
2778
2600
|
var _proto = Eventbus.prototype;
|
|
2779
2601
|
|
|
2780
2602
|
_proto.clear = function clear() {
|
|
2781
|
-
this.eventHandlers =
|
|
2603
|
+
this.eventHandlers = new Map();
|
|
2782
2604
|
this.eventListeners = [];
|
|
2783
|
-
this.eventInterceptors =
|
|
2605
|
+
this.eventInterceptors = new Map();
|
|
2784
2606
|
};
|
|
2785
2607
|
|
|
2786
2608
|
_proto._getEventInterceptors = function _getEventInterceptors(eventName, eventTopic) {
|
|
2787
|
-
if (eventTopic
|
|
2609
|
+
if (eventTopic) {
|
|
2788
2610
|
eventName = eventName + ":" + eventTopic;
|
|
2789
2611
|
}
|
|
2790
2612
|
|
|
2791
|
-
if (!this.eventInterceptors
|
|
2792
|
-
this.eventInterceptors
|
|
2613
|
+
if (!this.eventInterceptors.has(eventName)) {
|
|
2614
|
+
this.eventInterceptors.set(eventName, []);
|
|
2793
2615
|
}
|
|
2794
2616
|
|
|
2795
|
-
return this.eventInterceptors
|
|
2617
|
+
return this.eventInterceptors.get(eventName);
|
|
2796
2618
|
};
|
|
2797
2619
|
|
|
2798
2620
|
_proto._getEventHandlers = function _getEventHandlers(eventName, eventTopic) {
|
|
2799
|
-
if (eventTopic
|
|
2621
|
+
if (eventTopic) {
|
|
2800
2622
|
eventName = eventName + ":" + eventTopic;
|
|
2801
2623
|
}
|
|
2802
2624
|
|
|
2803
|
-
if (!this.eventHandlers
|
|
2804
|
-
this.eventHandlers
|
|
2625
|
+
if (!this.eventHandlers.has(eventName)) {
|
|
2626
|
+
this.eventHandlers.set(eventName, []);
|
|
2805
2627
|
}
|
|
2806
2628
|
|
|
2807
|
-
return this.eventHandlers
|
|
2629
|
+
return this.eventHandlers.get(eventName);
|
|
2808
2630
|
};
|
|
2809
2631
|
|
|
2810
2632
|
_proto.on = function on(eventName, eventHandler, eventTopic) {
|
|
@@ -3022,6 +2844,9 @@ var EngineFactory = /*#__PURE__*/function () {
|
|
|
3022
2844
|
this.eventbus = void 0;
|
|
3023
2845
|
this.importer = importer;
|
|
3024
2846
|
this.eventbus = eventbus || new Eventbus();
|
|
2847
|
+
|
|
2848
|
+
this._initializeDevtools(this.eventbus);
|
|
2849
|
+
|
|
3025
2850
|
this.eventbus.on(TimelineEventNames.REQUEST_INSTANCE, this._requestInstanceHandler.bind(this));
|
|
3026
2851
|
this.eventbus.on(TimelineEventNames.REQUEST_ACTION, this._requestActionHandler.bind(this));
|
|
3027
2852
|
this.eventbus.on(TimelineEventNames.REQUEST_FUNCTION, this._requestFunctionHandler.bind(this));
|
|
@@ -3030,6 +2855,20 @@ var EngineFactory = /*#__PURE__*/function () {
|
|
|
3030
2855
|
|
|
3031
2856
|
var _proto = EngineFactory.prototype;
|
|
3032
2857
|
|
|
2858
|
+
_proto._initializeDevtools = function _initializeDevtools(eventbus) {
|
|
2859
|
+
var diagnosticInfo = window[DEV_TOOLS_KEY];
|
|
2860
|
+
|
|
2861
|
+
if (diagnosticInfo) {
|
|
2862
|
+
var agent = diagnosticInfo.agent;
|
|
2863
|
+
var eventbusListener = new DevToolEventListener(agent);
|
|
2864
|
+
eventbus.registerEventlistener(eventbusListener);
|
|
2865
|
+
|
|
2866
|
+
Diagnostics.send = function (name, data) {
|
|
2867
|
+
agent.postMessage(name, data);
|
|
2868
|
+
};
|
|
2869
|
+
}
|
|
2870
|
+
};
|
|
2871
|
+
|
|
3033
2872
|
_proto.destroy = function destroy() {
|
|
3034
2873
|
this.eventbus.clear();
|
|
3035
2874
|
};
|
|
@@ -3148,33 +2987,35 @@ var EngineFactory = /*#__PURE__*/function () {
|
|
|
3148
2987
|
* @param operationData
|
|
3149
2988
|
* @returns
|
|
3150
2989
|
*/
|
|
3151
|
-
var addClass = function addClass(operationData) {
|
|
2990
|
+
var addClass$1 = function addClass(operationData) {
|
|
3152
2991
|
var selectedElement = operationData.selectedElement,
|
|
3153
2992
|
className = operationData.className;
|
|
3154
2993
|
selectedElement.addClass(className);
|
|
3155
2994
|
return operationData;
|
|
3156
2995
|
};
|
|
3157
2996
|
|
|
3158
|
-
var
|
|
2997
|
+
var controllersDataName = 'eligiusEngineControllers';
|
|
3159
2998
|
|
|
3160
2999
|
function getElementData(name, element) {
|
|
3161
3000
|
return element.data(name);
|
|
3162
3001
|
}
|
|
3163
3002
|
|
|
3164
|
-
var getElementControllers = /*#__PURE__*/getElementData.bind(null,
|
|
3003
|
+
var getElementControllers = /*#__PURE__*/getElementData.bind(null, controllersDataName);
|
|
3165
3004
|
|
|
3166
3005
|
function attachControllerToElement(element, controller) {
|
|
3167
|
-
if (!element.data(
|
|
3168
|
-
element.data(
|
|
3006
|
+
if (!element.data(controllersDataName)) {
|
|
3007
|
+
element.data(controllersDataName, []);
|
|
3169
3008
|
}
|
|
3170
3009
|
|
|
3171
3010
|
var controllers = getElementControllers(element);
|
|
3172
|
-
|
|
3011
|
+
|
|
3012
|
+
if (controllers) {
|
|
3013
|
+
controllers.push(controller);
|
|
3014
|
+
}
|
|
3173
3015
|
}
|
|
3174
3016
|
|
|
3175
3017
|
function mergeOperationData(operationData, newOperationData) {
|
|
3176
|
-
|
|
3177
|
-
return Object.assign(operationData, newOperationData);
|
|
3018
|
+
return _extends({}, operationData, newOperationData);
|
|
3178
3019
|
}
|
|
3179
3020
|
|
|
3180
3021
|
function internalResolve(resolve, operationData, newOperationData) {
|
|
@@ -3192,7 +3033,7 @@ function internalResolve(resolve, operationData, newOperationData) {
|
|
|
3192
3033
|
* @returns
|
|
3193
3034
|
*/
|
|
3194
3035
|
|
|
3195
|
-
var addControllerToElement = function addControllerToElement(operationData) {
|
|
3036
|
+
var addControllerToElement$1 = function addControllerToElement(operationData) {
|
|
3196
3037
|
var selectedElement = operationData.selectedElement,
|
|
3197
3038
|
controllerInstance = operationData.controllerInstance;
|
|
3198
3039
|
attachControllerToElement(selectedElement, controllerInstance);
|
|
@@ -3218,7 +3059,7 @@ var addControllerToElement = function addControllerToElement(operationData) {
|
|
|
3218
3059
|
* @returns
|
|
3219
3060
|
*/
|
|
3220
3061
|
|
|
3221
|
-
var animate = function animate(operationData) {
|
|
3062
|
+
var animate$1 = function animate(operationData) {
|
|
3222
3063
|
var animationEasing = operationData.animationEasing,
|
|
3223
3064
|
selectedElement = operationData.selectedElement,
|
|
3224
3065
|
animationProperties = operationData.animationProperties,
|
|
@@ -3250,7 +3091,7 @@ var animate = function animate(operationData) {
|
|
|
3250
3091
|
* @returns
|
|
3251
3092
|
*/
|
|
3252
3093
|
|
|
3253
|
-
var animateWithClass = function animateWithClass(operationData) {
|
|
3094
|
+
var animateWithClass$1 = function animateWithClass(operationData) {
|
|
3254
3095
|
var selectedElement = operationData.selectedElement,
|
|
3255
3096
|
className = operationData.className,
|
|
3256
3097
|
removeClass = operationData.removeClass;
|
|
@@ -3302,10 +3143,9 @@ function resolveEventArguments(operationData, eventArgs) {
|
|
|
3302
3143
|
* event argumetns and optional event topic.
|
|
3303
3144
|
*
|
|
3304
3145
|
* @param operationData
|
|
3305
|
-
* @returns
|
|
3306
3146
|
*/
|
|
3307
3147
|
|
|
3308
|
-
var broadcastEvent = function broadcastEvent(operationData) {
|
|
3148
|
+
var broadcastEvent$1 = function broadcastEvent(operationData) {
|
|
3309
3149
|
var eventArgs = operationData.eventArgs,
|
|
3310
3150
|
eventTopic = operationData.eventTopic,
|
|
3311
3151
|
eventName = operationData.eventName;
|
|
@@ -3321,33 +3161,6 @@ var broadcastEvent = function broadcastEvent(operationData) {
|
|
|
3321
3161
|
return operationData;
|
|
3322
3162
|
};
|
|
3323
3163
|
|
|
3324
|
-
/**
|
|
3325
|
-
* This operation removes all of the children from the specified selected element.
|
|
3326
|
-
*/
|
|
3327
|
-
var clearElement = function clearElement(operationData) {
|
|
3328
|
-
var selectedElement = operationData.selectedElement;
|
|
3329
|
-
selectedElement.empty();
|
|
3330
|
-
return operationData;
|
|
3331
|
-
};
|
|
3332
|
-
|
|
3333
|
-
/**
|
|
3334
|
-
* This operation removes all of the properties on the current operation date.
|
|
3335
|
-
* Or, if the properties property is set only removes the properties defined by that list.
|
|
3336
|
-
*/
|
|
3337
|
-
var clearOperationData = function clearOperationData(operationData) {
|
|
3338
|
-
var properties = operationData.properties;
|
|
3339
|
-
|
|
3340
|
-
if (properties) {
|
|
3341
|
-
properties.forEach(function (name) {
|
|
3342
|
-
delete operationData[name];
|
|
3343
|
-
});
|
|
3344
|
-
delete operationData.properties;
|
|
3345
|
-
return operationData;
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
return {};
|
|
3349
|
-
};
|
|
3350
|
-
|
|
3351
3164
|
var cache = [];
|
|
3352
3165
|
function resolvePropertyValues(operationData, properties) {
|
|
3353
3166
|
var copy = properties !== operationData ? deepCopy(properties) : properties;
|
|
@@ -3392,6 +3205,71 @@ function resolveProperties(properties, copy, extract) {
|
|
|
3392
3205
|
}
|
|
3393
3206
|
}
|
|
3394
3207
|
|
|
3208
|
+
var calcFunctions = {
|
|
3209
|
+
'+': function _(left, right) {
|
|
3210
|
+
return left + right;
|
|
3211
|
+
},
|
|
3212
|
+
'-': function _(left, right) {
|
|
3213
|
+
return left - right;
|
|
3214
|
+
},
|
|
3215
|
+
'*': function _(left, right) {
|
|
3216
|
+
return left * right;
|
|
3217
|
+
},
|
|
3218
|
+
'/': function _(left, right) {
|
|
3219
|
+
return left / right;
|
|
3220
|
+
},
|
|
3221
|
+
'%': function _(left, right) {
|
|
3222
|
+
return left % right;
|
|
3223
|
+
},
|
|
3224
|
+
'**': function _(left, right) {
|
|
3225
|
+
return Math.pow(left, right);
|
|
3226
|
+
}
|
|
3227
|
+
};
|
|
3228
|
+
/**
|
|
3229
|
+
* This operation calculates the given left and right hand sides using the specified operator.
|
|
3230
|
+
*
|
|
3231
|
+
* @param operationData
|
|
3232
|
+
*/
|
|
3233
|
+
|
|
3234
|
+
var calc$1 = function calc(operationData) {
|
|
3235
|
+
operationData = resolvePropertyValues(operationData, operationData);
|
|
3236
|
+
var _operationData = operationData,
|
|
3237
|
+
left = _operationData.left,
|
|
3238
|
+
right = _operationData.right,
|
|
3239
|
+
operator = _operationData.operator,
|
|
3240
|
+
_operationData$proper = _operationData.propertyName,
|
|
3241
|
+
propertyName = _operationData$proper === void 0 ? 'calculationResult' : _operationData$proper;
|
|
3242
|
+
operationData[propertyName] = calcFunctions[operator](+left, +right);
|
|
3243
|
+
return operationData;
|
|
3244
|
+
};
|
|
3245
|
+
|
|
3246
|
+
/**
|
|
3247
|
+
* This operation removes all of the children from the specified selected element.
|
|
3248
|
+
*/
|
|
3249
|
+
var clearElement$1 = function clearElement(operationData) {
|
|
3250
|
+
var selectedElement = operationData.selectedElement;
|
|
3251
|
+
selectedElement.empty();
|
|
3252
|
+
return operationData;
|
|
3253
|
+
};
|
|
3254
|
+
|
|
3255
|
+
/**
|
|
3256
|
+
* This operation removes all of the properties on the current operation date.
|
|
3257
|
+
* Or, if the properties property is set only removes the properties defined by that list.
|
|
3258
|
+
*/
|
|
3259
|
+
var clearOperationData$1 = function clearOperationData(operationData) {
|
|
3260
|
+
var properties = operationData.properties;
|
|
3261
|
+
|
|
3262
|
+
if (properties) {
|
|
3263
|
+
properties.forEach(function (name) {
|
|
3264
|
+
delete operationData[name];
|
|
3265
|
+
});
|
|
3266
|
+
delete operationData.properties;
|
|
3267
|
+
return operationData;
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
return {};
|
|
3271
|
+
};
|
|
3272
|
+
|
|
3395
3273
|
/**
|
|
3396
3274
|
* This operation creates the DOM element defined by the given properties and assigns
|
|
3397
3275
|
* the instance to the give property name on the current operation data.
|
|
@@ -3401,7 +3279,7 @@ function resolveProperties(properties, copy, extract) {
|
|
|
3401
3279
|
* @returns
|
|
3402
3280
|
*/
|
|
3403
3281
|
|
|
3404
|
-
var createElement = function createElement(operationData) {
|
|
3282
|
+
var createElement$1 = function createElement(operationData) {
|
|
3405
3283
|
operationData = resolvePropertyValues(operationData, operationData);
|
|
3406
3284
|
var _operationData = operationData,
|
|
3407
3285
|
elementName = _operationData.elementName,
|
|
@@ -3428,7 +3306,7 @@ var createElement = function createElement(operationData) {
|
|
|
3428
3306
|
* @returns
|
|
3429
3307
|
*/
|
|
3430
3308
|
|
|
3431
|
-
var customFunction = function customFunction(operationData) {
|
|
3309
|
+
var customFunction$1 = function customFunction(operationData) {
|
|
3432
3310
|
var _this = this;
|
|
3433
3311
|
|
|
3434
3312
|
var systemName = operationData.systemName;
|
|
@@ -3456,7 +3334,7 @@ var customFunction = function customFunction(operationData) {
|
|
|
3456
3334
|
* @returns
|
|
3457
3335
|
*/
|
|
3458
3336
|
|
|
3459
|
-
var endAction = function endAction(operationData) {
|
|
3337
|
+
var endAction$1 = function endAction(operationData) {
|
|
3460
3338
|
var _operationData = operationData,
|
|
3461
3339
|
actionInstance = _operationData.actionInstance,
|
|
3462
3340
|
actionOperationData = _operationData.actionOperationData;
|
|
@@ -3478,7 +3356,7 @@ var endAction = function endAction(operationData) {
|
|
|
3478
3356
|
* @param operationData
|
|
3479
3357
|
* @returns
|
|
3480
3358
|
*/
|
|
3481
|
-
var endLoop = function endLoop(operationData) {
|
|
3359
|
+
var endLoop$1 = function endLoop(operationData) {
|
|
3482
3360
|
var context = this;
|
|
3483
3361
|
|
|
3484
3362
|
if (!context.skipNextOperation) {
|
|
@@ -3498,7 +3376,7 @@ var endLoop = function endLoop(operationData) {
|
|
|
3498
3376
|
return operationData;
|
|
3499
3377
|
};
|
|
3500
3378
|
|
|
3501
|
-
var extendController = function extendController(operationData) {
|
|
3379
|
+
var extendController$1 = function extendController(operationData) {
|
|
3502
3380
|
var controllerInstance = operationData.controllerInstance,
|
|
3503
3381
|
controllerExtension = operationData.controllerExtension;
|
|
3504
3382
|
operationData.controllerInstance = Object.assign(controllerInstance, controllerExtension);
|
|
@@ -3512,7 +3390,7 @@ var extendController = function extendController(operationData) {
|
|
|
3512
3390
|
* @returns
|
|
3513
3391
|
*/
|
|
3514
3392
|
|
|
3515
|
-
var getControllerFromElement = function getControllerFromElement(operationData) {
|
|
3393
|
+
var getControllerFromElement$1 = function getControllerFromElement(operationData) {
|
|
3516
3394
|
var selectedElement = operationData.selectedElement,
|
|
3517
3395
|
controllerName = operationData.controllerName;
|
|
3518
3396
|
var controllers = getElementControllers(selectedElement);
|
|
@@ -3537,7 +3415,7 @@ var getControllerFromElement = function getControllerFromElement(operationData)
|
|
|
3537
3415
|
* @returns
|
|
3538
3416
|
*/
|
|
3539
3417
|
|
|
3540
|
-
var getControllerInstance = function getControllerInstance(operationData) {
|
|
3418
|
+
var getControllerInstance$1 = function getControllerInstance(operationData) {
|
|
3541
3419
|
var systemName = operationData.systemName,
|
|
3542
3420
|
_operationData$proper = operationData.propertyName,
|
|
3543
3421
|
propertyName = _operationData$proper === void 0 ? 'controllerInstance' : _operationData$proper;
|
|
@@ -3552,22 +3430,31 @@ var getControllerInstance = function getControllerInstance(operationData) {
|
|
|
3552
3430
|
return operationData;
|
|
3553
3431
|
};
|
|
3554
3432
|
|
|
3555
|
-
function
|
|
3556
|
-
//h[ar=8-1]
|
|
3433
|
+
function _modifyDimensionsByRatio(ratioModifier, dimensions) {
|
|
3434
|
+
var modifiedDimensions = _extends({}, dimensions); //h[ar=8-1]
|
|
3435
|
+
|
|
3436
|
+
|
|
3557
3437
|
var prefix = ratioModifier.substring(0, 1);
|
|
3558
|
-
var ratio = ratioModifier.substring(ratioModifier.indexOf('[') + 1, ratioModifier.indexOf(']') - ratioModifier.indexOf('[') - 1);
|
|
3438
|
+
var ratio = ratioModifier.substring(ratioModifier.indexOf('[') + 1, ratioModifier.indexOf(']') - (ratioModifier.indexOf('[') - 1));
|
|
3559
3439
|
var ratios = ratio.split('=')[1].split('-');
|
|
3560
3440
|
|
|
3441
|
+
if (ratios.filter(Boolean).length !== 2) {
|
|
3442
|
+
throw new Error("Badly formatted modifier, expect two ratios: " + ratio);
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3561
3445
|
if (prefix === 'h') {
|
|
3562
|
-
|
|
3446
|
+
modifiedDimensions.height = modifiedDimensions.width / +ratios[0] * +ratios[1];
|
|
3563
3447
|
} else if (prefix === 'w') {
|
|
3564
|
-
|
|
3448
|
+
modifiedDimensions.width = modifiedDimensions.height / +ratios[1] * +ratios[0];
|
|
3565
3449
|
}
|
|
3450
|
+
|
|
3451
|
+
return modifiedDimensions;
|
|
3566
3452
|
}
|
|
3567
3453
|
|
|
3568
|
-
function
|
|
3454
|
+
function _getModifierSuffix(modifier //*100h%
|
|
3455
|
+
) {
|
|
3569
3456
|
var endIdx = 1;
|
|
3570
|
-
var suffix = modifier.substring(modifier.length -
|
|
3457
|
+
var suffix = modifier.substring(modifier.length - endIdx, modifier.length);
|
|
3571
3458
|
|
|
3572
3459
|
if (suffix !== 'h' && suffix !== 'w' && suffix !== '%') {
|
|
3573
3460
|
suffix = null;
|
|
@@ -3576,12 +3463,10 @@ function getModifierSuffix(modifier) {
|
|
|
3576
3463
|
var isPercent = suffix === '%';
|
|
3577
3464
|
|
|
3578
3465
|
if (isPercent) {
|
|
3579
|
-
|
|
3580
|
-
suffix = modifier.substring(modifier.length - endIdx, 1);
|
|
3466
|
+
suffix = modifier.substring(modifier.length - endIdx, modifier.length - (endIdx + 1));
|
|
3581
3467
|
|
|
3582
3468
|
if (suffix !== 'h' && suffix !== 'w') {
|
|
3583
3469
|
suffix = null;
|
|
3584
|
-
endIdx = 1;
|
|
3585
3470
|
}
|
|
3586
3471
|
}
|
|
3587
3472
|
|
|
@@ -3589,20 +3474,22 @@ function getModifierSuffix(modifier) {
|
|
|
3589
3474
|
}
|
|
3590
3475
|
|
|
3591
3476
|
function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModifier) {
|
|
3477
|
+
var modifiedDimension = _extends({}, dimensions);
|
|
3478
|
+
|
|
3592
3479
|
switch (prefix) {
|
|
3593
3480
|
case '+':
|
|
3594
3481
|
switch (suffix) {
|
|
3595
3482
|
case 'h':
|
|
3596
|
-
|
|
3483
|
+
modifiedDimension.height += heightModifier;
|
|
3597
3484
|
break;
|
|
3598
3485
|
|
|
3599
3486
|
case 'w':
|
|
3600
|
-
|
|
3487
|
+
modifiedDimension.width += widthModifier;
|
|
3601
3488
|
break;
|
|
3602
3489
|
|
|
3603
3490
|
default:
|
|
3604
|
-
|
|
3605
|
-
|
|
3491
|
+
modifiedDimension.height += heightModifier;
|
|
3492
|
+
modifiedDimension.width += widthModifier;
|
|
3606
3493
|
}
|
|
3607
3494
|
|
|
3608
3495
|
break;
|
|
@@ -3610,16 +3497,16 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
|
|
|
3610
3497
|
case '-':
|
|
3611
3498
|
switch (suffix) {
|
|
3612
3499
|
case 'h':
|
|
3613
|
-
|
|
3500
|
+
modifiedDimension.height -= heightModifier;
|
|
3614
3501
|
break;
|
|
3615
3502
|
|
|
3616
3503
|
case 'w':
|
|
3617
|
-
|
|
3504
|
+
modifiedDimension.width -= widthModifier;
|
|
3618
3505
|
break;
|
|
3619
3506
|
|
|
3620
3507
|
default:
|
|
3621
|
-
|
|
3622
|
-
|
|
3508
|
+
modifiedDimension.height -= heightModifier;
|
|
3509
|
+
modifiedDimension.width -= widthModifier;
|
|
3623
3510
|
}
|
|
3624
3511
|
|
|
3625
3512
|
break;
|
|
@@ -3627,16 +3514,16 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
|
|
|
3627
3514
|
case '/':
|
|
3628
3515
|
switch (suffix) {
|
|
3629
3516
|
case 'h':
|
|
3630
|
-
|
|
3517
|
+
modifiedDimension.height /= heightModifier;
|
|
3631
3518
|
break;
|
|
3632
3519
|
|
|
3633
3520
|
case 'w':
|
|
3634
|
-
|
|
3521
|
+
modifiedDimension.width /= widthModifier;
|
|
3635
3522
|
break;
|
|
3636
3523
|
|
|
3637
3524
|
default:
|
|
3638
|
-
|
|
3639
|
-
|
|
3525
|
+
modifiedDimension.height /= heightModifier;
|
|
3526
|
+
modifiedDimension.width /= widthModifier;
|
|
3640
3527
|
}
|
|
3641
3528
|
|
|
3642
3529
|
break;
|
|
@@ -3644,16 +3531,16 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
|
|
|
3644
3531
|
case '*':
|
|
3645
3532
|
switch (suffix) {
|
|
3646
3533
|
case 'h':
|
|
3647
|
-
|
|
3534
|
+
modifiedDimension.height *= heightModifier;
|
|
3648
3535
|
break;
|
|
3649
3536
|
|
|
3650
3537
|
case 'w':
|
|
3651
|
-
|
|
3538
|
+
modifiedDimension.width *= widthModifier;
|
|
3652
3539
|
break;
|
|
3653
3540
|
|
|
3654
3541
|
default:
|
|
3655
|
-
|
|
3656
|
-
|
|
3542
|
+
modifiedDimension.height *= heightModifier;
|
|
3543
|
+
modifiedDimension.width *= widthModifier;
|
|
3657
3544
|
}
|
|
3658
3545
|
|
|
3659
3546
|
break;
|
|
@@ -3662,7 +3549,7 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
|
|
|
3662
3549
|
console.error("Unknown operator found: " + prefix);
|
|
3663
3550
|
}
|
|
3664
3551
|
|
|
3665
|
-
return
|
|
3552
|
+
return modifiedDimension;
|
|
3666
3553
|
}
|
|
3667
3554
|
/**
|
|
3668
3555
|
* Modifies the given dimensions using the given modifier string.
|
|
@@ -3682,6 +3569,8 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
|
|
|
3682
3569
|
|
|
3683
3570
|
|
|
3684
3571
|
function modifyDimensions(dimensions, modifier) {
|
|
3572
|
+
var clonedDimensions = _extends({}, dimensions);
|
|
3573
|
+
|
|
3685
3574
|
var ratioModifier = null;
|
|
3686
3575
|
|
|
3687
3576
|
if (modifier.indexOf('|') > -1) {
|
|
@@ -3693,25 +3582,27 @@ function modifyDimensions(dimensions, modifier) {
|
|
|
3693
3582
|
|
|
3694
3583
|
var prefix = modifier.substring(0, 1);
|
|
3695
3584
|
|
|
3696
|
-
var
|
|
3697
|
-
suffix =
|
|
3698
|
-
endIdx =
|
|
3699
|
-
isPercent =
|
|
3585
|
+
var _getModifierSuffix2 = _getModifierSuffix(modifier),
|
|
3586
|
+
suffix = _getModifierSuffix2[0],
|
|
3587
|
+
endIdx = _getModifierSuffix2[1],
|
|
3588
|
+
isPercent = _getModifierSuffix2[2];
|
|
3700
3589
|
|
|
3701
|
-
var value = parseInt(suffix !== null ? modifier.substring(1, modifier.length - endIdx - 1) : modifier.substring(1
|
|
3590
|
+
var value = parseInt(suffix !== null ? modifier.substring(1, modifier.length - (endIdx - 1)) : modifier.substring(1), 10);
|
|
3702
3591
|
var widthModifier = value;
|
|
3703
3592
|
var heightModifier = value;
|
|
3704
3593
|
|
|
3705
3594
|
if (isPercent) {
|
|
3706
|
-
widthModifier =
|
|
3707
|
-
heightModifier =
|
|
3595
|
+
widthModifier = clonedDimensions.width / 100 * value;
|
|
3596
|
+
heightModifier = clonedDimensions.height / 100 * value;
|
|
3708
3597
|
}
|
|
3709
3598
|
|
|
3710
|
-
|
|
3599
|
+
var modifiedDimension = _modifyDimensions(clonedDimensions, prefix, suffix, widthModifier, heightModifier);
|
|
3711
3600
|
|
|
3712
3601
|
if (ratioModifier) {
|
|
3713
|
-
|
|
3602
|
+
return _modifyDimensionsByRatio(ratioModifier, modifiedDimension);
|
|
3714
3603
|
}
|
|
3604
|
+
|
|
3605
|
+
return modifiedDimension;
|
|
3715
3606
|
}
|
|
3716
3607
|
|
|
3717
3608
|
/**
|
|
@@ -3733,7 +3624,7 @@ function modifyDimensions(dimensions, modifier) {
|
|
|
3733
3624
|
* @returns
|
|
3734
3625
|
*/
|
|
3735
3626
|
|
|
3736
|
-
var getElementDimensions = function getElementDimensions(operationData) {
|
|
3627
|
+
var getElementDimensions$1 = function getElementDimensions(operationData) {
|
|
3737
3628
|
var _selectedElement$inne, _selectedElement$inne2;
|
|
3738
3629
|
|
|
3739
3630
|
var selectedElement = operationData.selectedElement,
|
|
@@ -3748,7 +3639,7 @@ var getElementDimensions = function getElementDimensions(operationData) {
|
|
|
3748
3639
|
}
|
|
3749
3640
|
|
|
3750
3641
|
if (modifier) {
|
|
3751
|
-
modifyDimensions(dimensions, modifier);
|
|
3642
|
+
dimensions = modifyDimensions(dimensions, modifier);
|
|
3752
3643
|
}
|
|
3753
3644
|
|
|
3754
3645
|
operationData.dimensions = dimensions;
|
|
@@ -3763,7 +3654,7 @@ var getElementDimensions = function getElementDimensions(operationData) {
|
|
|
3763
3654
|
* @returns
|
|
3764
3655
|
*/
|
|
3765
3656
|
|
|
3766
|
-
var getImport = function getImport(operationData) {
|
|
3657
|
+
var getImport$1 = function getImport(operationData) {
|
|
3767
3658
|
var systemName = operationData.systemName;
|
|
3768
3659
|
|
|
3769
3660
|
var callBack = function callBack(instance) {
|
|
@@ -3790,7 +3681,7 @@ var addToCache = function addToCache(key, value) {
|
|
|
3790
3681
|
* @returns
|
|
3791
3682
|
*/
|
|
3792
3683
|
|
|
3793
|
-
var loadJSON = function loadJSON(operationData) {
|
|
3684
|
+
var loadJSON$1 = function loadJSON(operationData) {
|
|
3794
3685
|
var url = operationData.url,
|
|
3795
3686
|
cache = operationData.cache,
|
|
3796
3687
|
_operationData$proper = operationData.propertyName,
|
|
@@ -3804,9 +3695,9 @@ var loadJSON = function loadJSON(operationData) {
|
|
|
3804
3695
|
|
|
3805
3696
|
return new Promise(function (resolve, reject) {
|
|
3806
3697
|
fetch(url).then( /*#__PURE__*/function () {
|
|
3807
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
|
|
3698
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
|
|
3808
3699
|
var json, cacheValue;
|
|
3809
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3700
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3810
3701
|
while (1) {
|
|
3811
3702
|
switch (_context.prev = _context.next) {
|
|
3812
3703
|
case 0:
|
|
@@ -3841,7 +3732,7 @@ var loadJSON = function loadJSON(operationData) {
|
|
|
3841
3732
|
* @param operationData
|
|
3842
3733
|
* @returns
|
|
3843
3734
|
*/
|
|
3844
|
-
var log = function log(operationData) {
|
|
3735
|
+
var log$1 = function log(operationData) {
|
|
3845
3736
|
console.group('Operation info');
|
|
3846
3737
|
console.dir({
|
|
3847
3738
|
context: this
|
|
@@ -3853,13 +3744,45 @@ var log = function log(operationData) {
|
|
|
3853
3744
|
return operationData;
|
|
3854
3745
|
};
|
|
3855
3746
|
|
|
3747
|
+
/**
|
|
3748
|
+
* This operation performs the given math function of the specified arguments.
|
|
3749
|
+
*
|
|
3750
|
+
* @param operationData
|
|
3751
|
+
*/
|
|
3752
|
+
|
|
3753
|
+
var math$1 = function math(operationData) {
|
|
3754
|
+
operationData = resolvePropertyValues(operationData, operationData);
|
|
3755
|
+
operationData.args = resolveMathConstants(operationData.args);
|
|
3756
|
+
var _operationData = operationData,
|
|
3757
|
+
args = _operationData.args,
|
|
3758
|
+
functionName = _operationData.functionName,
|
|
3759
|
+
_operationData$proper = _operationData.propertyName,
|
|
3760
|
+
propertyName = _operationData$proper === void 0 ? 'mathResult' : _operationData$proper;
|
|
3761
|
+
operationData[propertyName] = Math[functionName].apply(null, args);
|
|
3762
|
+
return operationData;
|
|
3763
|
+
};
|
|
3764
|
+
|
|
3765
|
+
function resolveMathConstants(args) {
|
|
3766
|
+
return args.map(function (arg) {
|
|
3767
|
+
if (isMathProperty(arg)) {
|
|
3768
|
+
return Math[arg];
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
return arg;
|
|
3772
|
+
});
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
function isMathProperty(value) {
|
|
3776
|
+
return typeof value === 'string' && value in Math && typeof Math[value] !== 'function';
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3856
3779
|
/**
|
|
3857
3780
|
* This operation removes the spcified class name from the specified selected element.
|
|
3858
3781
|
*
|
|
3859
3782
|
* @param operationData
|
|
3860
3783
|
* @returns
|
|
3861
3784
|
*/
|
|
3862
|
-
var removeClass = function removeClass(operationData) {
|
|
3785
|
+
var removeClass$1 = function removeClass(operationData) {
|
|
3863
3786
|
var selectedElement = operationData.selectedElement,
|
|
3864
3787
|
className = operationData.className;
|
|
3865
3788
|
selectedElement.removeClass(className);
|
|
@@ -3873,7 +3796,7 @@ var removeClass = function removeClass(operationData) {
|
|
|
3873
3796
|
* @returns
|
|
3874
3797
|
*/
|
|
3875
3798
|
|
|
3876
|
-
var removeControllerFromElement = function removeControllerFromElement(operationData) {
|
|
3799
|
+
var removeControllerFromElement$1 = function removeControllerFromElement(operationData) {
|
|
3877
3800
|
var selectedElement = operationData.selectedElement,
|
|
3878
3801
|
controllerName = operationData.controllerName;
|
|
3879
3802
|
var controllers = getElementControllers(selectedElement);
|
|
@@ -3896,7 +3819,7 @@ var removeControllerFromElement = function removeControllerFromElement(operation
|
|
|
3896
3819
|
* @param operationData
|
|
3897
3820
|
* @returns
|
|
3898
3821
|
*/
|
|
3899
|
-
var removeElement = function removeElement(operationData) {
|
|
3822
|
+
var removeElement$1 = function removeElement(operationData) {
|
|
3900
3823
|
var selectedElement = operationData.selectedElement;
|
|
3901
3824
|
selectedElement.remove();
|
|
3902
3825
|
return operationData;
|
|
@@ -3908,7 +3831,7 @@ var removeElement = function removeElement(operationData) {
|
|
|
3908
3831
|
* @param operationData
|
|
3909
3832
|
* @returns
|
|
3910
3833
|
*/
|
|
3911
|
-
var removePropertiesFromOperationData = function removePropertiesFromOperationData(operationData) {
|
|
3834
|
+
var removePropertiesFromOperationData$1 = function removePropertiesFromOperationData(operationData) {
|
|
3912
3835
|
var propertyNames = operationData.propertyNames;
|
|
3913
3836
|
propertyNames.forEach(function (name) {
|
|
3914
3837
|
delete operationData[name];
|
|
@@ -3924,7 +3847,7 @@ var removePropertiesFromOperationData = function removePropertiesFromOperationDa
|
|
|
3924
3847
|
* @param operationData
|
|
3925
3848
|
* @returns
|
|
3926
3849
|
*/
|
|
3927
|
-
var reparentElement = function reparentElement(operationData) {
|
|
3850
|
+
var reparentElement$1 = function reparentElement(operationData) {
|
|
3928
3851
|
var selectedElement = operationData.selectedElement,
|
|
3929
3852
|
newParentSelector = operationData.newParentSelector;
|
|
3930
3853
|
selectedElement.remove().appendTo(newParentSelector);
|
|
@@ -3939,7 +3862,7 @@ var reparentElement = function reparentElement(operationData) {
|
|
|
3939
3862
|
* @returns
|
|
3940
3863
|
*/
|
|
3941
3864
|
|
|
3942
|
-
var requestAction = function requestAction(operationData) {
|
|
3865
|
+
var requestAction$1 = function requestAction(operationData) {
|
|
3943
3866
|
var systemName = operationData.systemName;
|
|
3944
3867
|
|
|
3945
3868
|
var resultCallback = function resultCallback(action) {
|
|
@@ -3957,7 +3880,7 @@ var requestAction = function requestAction(operationData) {
|
|
|
3957
3880
|
* @returns
|
|
3958
3881
|
*/
|
|
3959
3882
|
|
|
3960
|
-
var resizeAction = function resizeAction(operationData) {
|
|
3883
|
+
var resizeAction$1 = function resizeAction(operationData) {
|
|
3961
3884
|
var _operationData = operationData,
|
|
3962
3885
|
actionInstance = _operationData.actionInstance,
|
|
3963
3886
|
actionOperationData = _operationData.actionOperationData;
|
|
@@ -3995,7 +3918,7 @@ function findElementBySelector(root, selector, operationData, propertyName) {
|
|
|
3995
3918
|
*/
|
|
3996
3919
|
|
|
3997
3920
|
|
|
3998
|
-
var selectElement = function selectElement(operationData) {
|
|
3921
|
+
var selectElement$1 = function selectElement(operationData) {
|
|
3999
3922
|
var selector = operationData.selector,
|
|
4000
3923
|
_operationData$proper = operationData.propertyName,
|
|
4001
3924
|
propertyName = _operationData$proper === void 0 ? 'selectedElement' : _operationData$proper,
|
|
@@ -4026,7 +3949,7 @@ var selectElement = function selectElement(operationData) {
|
|
|
4026
3949
|
* @param operationData
|
|
4027
3950
|
* @returns
|
|
4028
3951
|
*/
|
|
4029
|
-
var setElementAttributes = function setElementAttributes(operationData) {
|
|
3952
|
+
var setElementAttributes$1 = function setElementAttributes(operationData) {
|
|
4030
3953
|
var attributes = operationData.attributes,
|
|
4031
3954
|
selectedElement = operationData.selectedElement;
|
|
4032
3955
|
Object.entries(attributes).forEach(function (_ref) {
|
|
@@ -4049,7 +3972,7 @@ var setElementAttributes = function setElementAttributes(operationData) {
|
|
|
4049
3972
|
* @param operationData
|
|
4050
3973
|
* @returns
|
|
4051
3974
|
*/
|
|
4052
|
-
var setElementContent = function setElementContent(operationData) {
|
|
3975
|
+
var setElementContent$1 = function setElementContent(operationData) {
|
|
4053
3976
|
var _operationData$insert = operationData.insertionType,
|
|
4054
3977
|
insertionType = _operationData$insert === void 0 ? 'overwrite' : _operationData$insert,
|
|
4055
3978
|
selectedElement = operationData.selectedElement,
|
|
@@ -4081,7 +4004,7 @@ var setElementContent = function setElementContent(operationData) {
|
|
|
4081
4004
|
* @returns
|
|
4082
4005
|
*/
|
|
4083
4006
|
|
|
4084
|
-
var setOperationData = function setOperationData(operationData) {
|
|
4007
|
+
var setOperationData$1 = function setOperationData(operationData) {
|
|
4085
4008
|
var _operationData = operationData,
|
|
4086
4009
|
_operationData$overri = _operationData.override,
|
|
4087
4010
|
override = _operationData$overri === void 0 ? false : _operationData$overri,
|
|
@@ -4109,7 +4032,7 @@ var setOperationData = function setOperationData(operationData) {
|
|
|
4109
4032
|
* @returns
|
|
4110
4033
|
*/
|
|
4111
4034
|
|
|
4112
|
-
var setStyle = function setStyle(operationData) {
|
|
4035
|
+
var setStyle$1 = function setStyle(operationData) {
|
|
4113
4036
|
var _operationData$proper = operationData.propertyName,
|
|
4114
4037
|
propertyName = _operationData$proper === void 0 ? 'selectedElement' : _operationData$proper;
|
|
4115
4038
|
var properties = resolvePropertyValues(operationData, operationData.properties);
|
|
@@ -4129,7 +4052,7 @@ var setStyle = function setStyle(operationData) {
|
|
|
4129
4052
|
* @returns
|
|
4130
4053
|
*/
|
|
4131
4054
|
|
|
4132
|
-
var startAction = function startAction(operationData) {
|
|
4055
|
+
var startAction$1 = function startAction(operationData) {
|
|
4133
4056
|
var _operationData = operationData,
|
|
4134
4057
|
actionInstance = _operationData.actionInstance,
|
|
4135
4058
|
actionOperationData = _operationData.actionOperationData;
|
|
@@ -4155,7 +4078,7 @@ var startAction = function startAction(operationData) {
|
|
|
4155
4078
|
* @param operationData
|
|
4156
4079
|
* @returns
|
|
4157
4080
|
*/
|
|
4158
|
-
var startLoop = function startLoop(operationData) {
|
|
4081
|
+
var startLoop$1 = function startLoop(operationData) {
|
|
4159
4082
|
var context = this;
|
|
4160
4083
|
var collection = operationData.collection,
|
|
4161
4084
|
_operationData$proper = operationData.propertyName,
|
|
@@ -4189,7 +4112,7 @@ var startLoop = function startLoop(operationData) {
|
|
|
4189
4112
|
* @param operationData
|
|
4190
4113
|
* @returns
|
|
4191
4114
|
*/
|
|
4192
|
-
var toggleClass = function toggleClass(operationData) {
|
|
4115
|
+
var toggleClass$1 = function toggleClass(operationData) {
|
|
4193
4116
|
var selectedElement = operationData.selectedElement,
|
|
4194
4117
|
className = operationData.className;
|
|
4195
4118
|
selectedElement.toggleClass(className);
|
|
@@ -4202,7 +4125,7 @@ var toggleClass = function toggleClass(operationData) {
|
|
|
4202
4125
|
* @param operationData
|
|
4203
4126
|
* @returns
|
|
4204
4127
|
*/
|
|
4205
|
-
var toggleElement = function toggleElement(operationData) {
|
|
4128
|
+
var toggleElement$1 = function toggleElement(operationData) {
|
|
4206
4129
|
operationData.selectedElement.toggle();
|
|
4207
4130
|
return operationData;
|
|
4208
4131
|
};
|
|
@@ -4214,52 +4137,54 @@ var toggleElement = function toggleElement(operationData) {
|
|
|
4214
4137
|
* @returns
|
|
4215
4138
|
*/
|
|
4216
4139
|
|
|
4217
|
-
var wait = function wait(operationData) {
|
|
4140
|
+
var wait$1 = function wait(operationData) {
|
|
4218
4141
|
var milliseconds = operationData.milliseconds;
|
|
4219
4142
|
return new Promise(function (resolve) {
|
|
4220
4143
|
setTimeout(function () {
|
|
4221
4144
|
internalResolve(resolve, operationData);
|
|
4222
|
-
}, milliseconds);
|
|
4223
|
-
});
|
|
4224
|
-
};
|
|
4225
|
-
|
|
4226
|
-
var ops = {
|
|
4227
|
-
__proto__: null,
|
|
4228
|
-
addClass: addClass,
|
|
4229
|
-
addControllerToElement: addControllerToElement,
|
|
4230
|
-
animate: animate,
|
|
4231
|
-
animateWithClass: animateWithClass,
|
|
4232
|
-
broadcastEvent: broadcastEvent,
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4145
|
+
}, milliseconds);
|
|
4146
|
+
});
|
|
4147
|
+
};
|
|
4148
|
+
|
|
4149
|
+
var ops = {
|
|
4150
|
+
__proto__: null,
|
|
4151
|
+
addClass: addClass$1,
|
|
4152
|
+
addControllerToElement: addControllerToElement$1,
|
|
4153
|
+
animate: animate$1,
|
|
4154
|
+
animateWithClass: animateWithClass$1,
|
|
4155
|
+
broadcastEvent: broadcastEvent$1,
|
|
4156
|
+
calc: calc$1,
|
|
4157
|
+
clearElement: clearElement$1,
|
|
4158
|
+
clearOperationData: clearOperationData$1,
|
|
4159
|
+
createElement: createElement$1,
|
|
4160
|
+
customFunction: customFunction$1,
|
|
4161
|
+
endAction: endAction$1,
|
|
4162
|
+
endLoop: endLoop$1,
|
|
4163
|
+
extendController: extendController$1,
|
|
4164
|
+
getControllerFromElement: getControllerFromElement$1,
|
|
4165
|
+
getControllerInstance: getControllerInstance$1,
|
|
4166
|
+
getElementDimensions: getElementDimensions$1,
|
|
4167
|
+
getImport: getImport$1,
|
|
4168
|
+
loadJSON: loadJSON$1,
|
|
4169
|
+
log: log$1,
|
|
4170
|
+
math: math$1,
|
|
4171
|
+
removeClass: removeClass$1,
|
|
4172
|
+
removeControllerFromElement: removeControllerFromElement$1,
|
|
4173
|
+
removeElement: removeElement$1,
|
|
4174
|
+
removePropertiesFromOperationData: removePropertiesFromOperationData$1,
|
|
4175
|
+
reparentElement: reparentElement$1,
|
|
4176
|
+
requestAction: requestAction$1,
|
|
4177
|
+
resizeAction: resizeAction$1,
|
|
4178
|
+
selectElement: selectElement$1,
|
|
4179
|
+
setElementAttributes: setElementAttributes$1,
|
|
4180
|
+
setElementContent: setElementContent$1,
|
|
4181
|
+
setOperationData: setOperationData$1,
|
|
4182
|
+
setStyle: setStyle$1,
|
|
4183
|
+
startAction: startAction$1,
|
|
4184
|
+
startLoop: startLoop$1,
|
|
4185
|
+
toggleClass: toggleClass$1,
|
|
4186
|
+
toggleElement: toggleElement$1,
|
|
4187
|
+
wait: wait$1
|
|
4263
4188
|
};
|
|
4264
4189
|
|
|
4265
4190
|
var JwPlayerTimelineProvider = /*#__PURE__*/function () {
|
|
@@ -4769,13 +4694,13 @@ var operations = ops;
|
|
|
4769
4694
|
var controllers = ctrls;
|
|
4770
4695
|
var providers = prvdrs;
|
|
4771
4696
|
var eventbus = evtb;
|
|
4772
|
-
var
|
|
4773
|
-
function
|
|
4697
|
+
var EligiusResourceImporter = /*#__PURE__*/function () {
|
|
4698
|
+
function EligiusResourceImporter() {
|
|
4774
4699
|
this.engines = new Map();
|
|
4775
4700
|
this.engines.set('EligiusEngine', EligiusEngine);
|
|
4776
4701
|
}
|
|
4777
4702
|
|
|
4778
|
-
var _proto =
|
|
4703
|
+
var _proto = EligiusResourceImporter.prototype;
|
|
4779
4704
|
|
|
4780
4705
|
_proto.getOperationNames = function getOperationNames() {
|
|
4781
4706
|
return Object.keys(operations);
|
|
@@ -4796,13 +4721,579 @@ var WebpackResourceImporter = /*#__PURE__*/function () {
|
|
|
4796
4721
|
return _ref4 = {}, _ref4[name] = value, _ref4;
|
|
4797
4722
|
};
|
|
4798
4723
|
|
|
4799
|
-
return
|
|
4724
|
+
return EligiusResourceImporter;
|
|
4800
4725
|
}();
|
|
4801
4726
|
|
|
4727
|
+
function addClass() {
|
|
4728
|
+
return {
|
|
4729
|
+
description: 'Add a class to the selected element.',
|
|
4730
|
+
dependentProperties: ['selectedElement'],
|
|
4731
|
+
properties: {
|
|
4732
|
+
className: {
|
|
4733
|
+
type: 'ParameterType:className',
|
|
4734
|
+
required: true
|
|
4735
|
+
}
|
|
4736
|
+
}
|
|
4737
|
+
};
|
|
4738
|
+
}
|
|
4739
|
+
|
|
4740
|
+
function addControllerToElement() {
|
|
4741
|
+
return {
|
|
4742
|
+
description: 'Adds the current controller to the selected element(s)',
|
|
4743
|
+
dependentProperties: ['selectedElement', 'controllerInstance']
|
|
4744
|
+
};
|
|
4745
|
+
}
|
|
4746
|
+
|
|
4747
|
+
function animate() {
|
|
4748
|
+
return {
|
|
4749
|
+
description: 'Animates the selected element with the given animation settings.',
|
|
4750
|
+
dependentProperties: ['selectedElement'],
|
|
4751
|
+
properties: {
|
|
4752
|
+
animationEasing: 'ParameterType:boolean',
|
|
4753
|
+
animationProperties: {
|
|
4754
|
+
type: 'ParameterType:object',
|
|
4755
|
+
required: true
|
|
4756
|
+
},
|
|
4757
|
+
animationDuration: {
|
|
4758
|
+
type: 'ParameterType:integer',
|
|
4759
|
+
required: true
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4762
|
+
};
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
function animateWithClass() {
|
|
4766
|
+
return {
|
|
4767
|
+
description: 'Animates the selected element by adding the given animation class.',
|
|
4768
|
+
dependentProperties: ['selectedElement'],
|
|
4769
|
+
properties: {
|
|
4770
|
+
className: {
|
|
4771
|
+
type: 'ParameterType:className',
|
|
4772
|
+
required: true
|
|
4773
|
+
},
|
|
4774
|
+
removeClass: 'ParameterType:boolean'
|
|
4775
|
+
}
|
|
4776
|
+
};
|
|
4777
|
+
}
|
|
4778
|
+
|
|
4779
|
+
function broadcastEvent() {
|
|
4780
|
+
return {
|
|
4781
|
+
description: 'Broadcasts an eventbus event with the given type, topic and optional arguments',
|
|
4782
|
+
properties: {
|
|
4783
|
+
eventArgs: 'ParameterType:array',
|
|
4784
|
+
eventTopic: 'ParameterType:eventTopic',
|
|
4785
|
+
eventName: {
|
|
4786
|
+
type: 'ParameterType:eventName',
|
|
4787
|
+
required: true
|
|
4788
|
+
}
|
|
4789
|
+
}
|
|
4790
|
+
};
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4793
|
+
function calc() {
|
|
4794
|
+
return {
|
|
4795
|
+
description: 'clears the given element',
|
|
4796
|
+
properties: {
|
|
4797
|
+
left: {
|
|
4798
|
+
type: 'ParameterType:integer',
|
|
4799
|
+
description: 'The left operand',
|
|
4800
|
+
required: true
|
|
4801
|
+
},
|
|
4802
|
+
right: {
|
|
4803
|
+
type: 'ParameterType:integer',
|
|
4804
|
+
description: 'The right operand',
|
|
4805
|
+
required: true
|
|
4806
|
+
},
|
|
4807
|
+
operator: [{
|
|
4808
|
+
value: '+',
|
|
4809
|
+
description: 'Adds the left and right operands'
|
|
4810
|
+
}, {
|
|
4811
|
+
value: '-',
|
|
4812
|
+
description: 'Subtracts the left and right operands'
|
|
4813
|
+
}, {
|
|
4814
|
+
value: '*',
|
|
4815
|
+
description: 'Multiplies the left and right operands'
|
|
4816
|
+
}, {
|
|
4817
|
+
value: '/',
|
|
4818
|
+
description: 'Divides the left and right operands'
|
|
4819
|
+
}, {
|
|
4820
|
+
value: '%',
|
|
4821
|
+
description: 'Returns the remainder left over after the left number is divided into a number of integer portions equal to the right number'
|
|
4822
|
+
}, {
|
|
4823
|
+
value: '**',
|
|
4824
|
+
description: 'Exponent: Raises a base number to the exponent power, that is, the base number multiplied by itself, exponent times.'
|
|
4825
|
+
}],
|
|
4826
|
+
propertyName: {
|
|
4827
|
+
type: 'ParameterType:string',
|
|
4828
|
+
defaultValue: 'calculationResult'
|
|
4829
|
+
}
|
|
4830
|
+
}
|
|
4831
|
+
/*outputProperties: {
|
|
4832
|
+
propertyName: {
|
|
4833
|
+
type: 'ParameterType:integer',
|
|
4834
|
+
},
|
|
4835
|
+
},*/
|
|
4836
|
+
|
|
4837
|
+
};
|
|
4838
|
+
}
|
|
4839
|
+
|
|
4840
|
+
function clearElement() {
|
|
4841
|
+
return {
|
|
4842
|
+
description: 'clears the given element',
|
|
4843
|
+
dependentProperties: ['selectedElement']
|
|
4844
|
+
};
|
|
4845
|
+
}
|
|
4846
|
+
|
|
4847
|
+
function clearOperationData() {
|
|
4848
|
+
return {
|
|
4849
|
+
description: 'clears the current operation data',
|
|
4850
|
+
properties: {
|
|
4851
|
+
properties: 'ParameterType:array'
|
|
4852
|
+
}
|
|
4853
|
+
};
|
|
4854
|
+
}
|
|
4855
|
+
|
|
4856
|
+
function createElement() {
|
|
4857
|
+
return {
|
|
4858
|
+
description: 'Creates an HTML element with the given name and optionally adds the given attributes',
|
|
4859
|
+
properties: {
|
|
4860
|
+
elementName: {
|
|
4861
|
+
type: 'ParameterType:htmlElementName',
|
|
4862
|
+
required: true
|
|
4863
|
+
},
|
|
4864
|
+
attributes: 'ParameterType:object',
|
|
4865
|
+
text: 'ParameterType:string'
|
|
4866
|
+
},
|
|
4867
|
+
outputProperties: {
|
|
4868
|
+
template: 'ParameterType:object'
|
|
4869
|
+
}
|
|
4870
|
+
};
|
|
4871
|
+
}
|
|
4872
|
+
|
|
4873
|
+
function customFunction() {
|
|
4874
|
+
return {
|
|
4875
|
+
description: 'Executes the specified custom function',
|
|
4876
|
+
properties: {
|
|
4877
|
+
systemName: {
|
|
4878
|
+
type: 'ParameterType:systemName',
|
|
4879
|
+
required: true
|
|
4880
|
+
}
|
|
4881
|
+
}
|
|
4882
|
+
};
|
|
4883
|
+
}
|
|
4884
|
+
|
|
4885
|
+
function endAction() {
|
|
4886
|
+
return {
|
|
4887
|
+
description: 'Ends the current action',
|
|
4888
|
+
dependentProperties: ['actionInstance'],
|
|
4889
|
+
properties: {
|
|
4890
|
+
actionOperationData: 'ParameterType:object'
|
|
4891
|
+
}
|
|
4892
|
+
};
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
function endLoop() {
|
|
4896
|
+
return {
|
|
4897
|
+
description: 'Ends the current loop'
|
|
4898
|
+
};
|
|
4899
|
+
}
|
|
4900
|
+
|
|
4901
|
+
function extendController() {
|
|
4902
|
+
return {
|
|
4903
|
+
description: 'Extends the current controller',
|
|
4904
|
+
dependentProperties: ['controllerInstance'],
|
|
4905
|
+
properties: {
|
|
4906
|
+
controllerExtension: 'ParameterType:object'
|
|
4907
|
+
}
|
|
4908
|
+
};
|
|
4909
|
+
}
|
|
4910
|
+
|
|
4911
|
+
function getControllerFromElement() {
|
|
4912
|
+
return {
|
|
4913
|
+
description: 'Retrieves the specified controller from the current element',
|
|
4914
|
+
dependentProperties: ['selectedElement'],
|
|
4915
|
+
properties: {
|
|
4916
|
+
controllerName: {
|
|
4917
|
+
type: 'ParameterType:controllerName',
|
|
4918
|
+
required: true
|
|
4919
|
+
}
|
|
4920
|
+
},
|
|
4921
|
+
outputProperties: {
|
|
4922
|
+
controllerInstance: 'ParameterType:object'
|
|
4923
|
+
}
|
|
4924
|
+
};
|
|
4925
|
+
}
|
|
4926
|
+
|
|
4927
|
+
function getControllerInstance() {
|
|
4928
|
+
return {
|
|
4929
|
+
description: 'Retrieves an instance of the specified controller',
|
|
4930
|
+
properties: {
|
|
4931
|
+
systemName: {
|
|
4932
|
+
type: 'ParameterType:controllerName',
|
|
4933
|
+
required: true
|
|
4934
|
+
},
|
|
4935
|
+
propertyName: {
|
|
4936
|
+
type: 'ParameterType:string',
|
|
4937
|
+
defaultValue: 'controllerInstance'
|
|
4938
|
+
}
|
|
4939
|
+
},
|
|
4940
|
+
outputProperties: {
|
|
4941
|
+
controllerInstance: 'ParameterType:object'
|
|
4942
|
+
}
|
|
4943
|
+
};
|
|
4944
|
+
}
|
|
4945
|
+
|
|
4946
|
+
function getElementDimensions() {
|
|
4947
|
+
return {
|
|
4948
|
+
description: 'Calculates the dimensions for the current element',
|
|
4949
|
+
dependentProperties: ['selectedElement'],
|
|
4950
|
+
properties: {
|
|
4951
|
+
modifier: 'ParameterType:dimensionsModifier'
|
|
4952
|
+
},
|
|
4953
|
+
outputProperties: {
|
|
4954
|
+
dimensions: 'ParameterType:dimensions'
|
|
4955
|
+
}
|
|
4956
|
+
};
|
|
4957
|
+
}
|
|
4958
|
+
|
|
4959
|
+
function getImport() {
|
|
4960
|
+
return {
|
|
4961
|
+
description: 'Retrieves a javascript import specified by the given system name',
|
|
4962
|
+
properties: {
|
|
4963
|
+
systemName: {
|
|
4964
|
+
type: 'ParameterType:systemName',
|
|
4965
|
+
required: true
|
|
4966
|
+
}
|
|
4967
|
+
},
|
|
4968
|
+
outputProperties: {
|
|
4969
|
+
importedInstance: 'ParameterType:object'
|
|
4970
|
+
}
|
|
4971
|
+
};
|
|
4972
|
+
}
|
|
4973
|
+
|
|
4974
|
+
function loadJSON() {
|
|
4975
|
+
return {
|
|
4976
|
+
description: 'Load JSON from the given url',
|
|
4977
|
+
properties: {
|
|
4978
|
+
url: {
|
|
4979
|
+
type: 'ParameterType:url',
|
|
4980
|
+
required: true
|
|
4981
|
+
},
|
|
4982
|
+
cache: 'ParameterType:boolean',
|
|
4983
|
+
propertyName: {
|
|
4984
|
+
type: 'ParameterType:string',
|
|
4985
|
+
defaultValue: 'json'
|
|
4986
|
+
}
|
|
4987
|
+
},
|
|
4988
|
+
outputProperties: {
|
|
4989
|
+
json: 'ParameterType:object'
|
|
4990
|
+
}
|
|
4991
|
+
};
|
|
4992
|
+
}
|
|
4993
|
+
|
|
4994
|
+
function log() {
|
|
4995
|
+
return {
|
|
4996
|
+
description: 'Logs the current context and operation data to the console'
|
|
4997
|
+
};
|
|
4998
|
+
}
|
|
4999
|
+
|
|
5000
|
+
function math() {
|
|
5001
|
+
return {
|
|
5002
|
+
description: 'This operation performs the given math function of the specified arguments.',
|
|
5003
|
+
properties: {
|
|
5004
|
+
args: {
|
|
5005
|
+
type: 'ParameterType:array',
|
|
5006
|
+
required: true
|
|
5007
|
+
},
|
|
5008
|
+
functionName: createMathFunctionNames(),
|
|
5009
|
+
propertyName: {
|
|
5010
|
+
type: 'ParameterType:string',
|
|
5011
|
+
defaultValue: 'mathResult'
|
|
5012
|
+
}
|
|
5013
|
+
}
|
|
5014
|
+
};
|
|
5015
|
+
}
|
|
5016
|
+
|
|
5017
|
+
function createMathFunctionNames() {
|
|
5018
|
+
return Object.getOwnPropertyNames(Math).filter(function (x) {
|
|
5019
|
+
return typeof Math[x] === 'function';
|
|
5020
|
+
}).map(function (functionName) {
|
|
5021
|
+
return {
|
|
5022
|
+
value: functionName
|
|
5023
|
+
};
|
|
5024
|
+
});
|
|
5025
|
+
}
|
|
5026
|
+
|
|
5027
|
+
function removeClass() {
|
|
5028
|
+
return {
|
|
5029
|
+
description: 'Removes the specified class from the selected element',
|
|
5030
|
+
dependentProperties: ['selectedElement'],
|
|
5031
|
+
properties: {
|
|
5032
|
+
className: {
|
|
5033
|
+
type: 'ParameterType:className',
|
|
5034
|
+
required: true
|
|
5035
|
+
}
|
|
5036
|
+
}
|
|
5037
|
+
};
|
|
5038
|
+
}
|
|
5039
|
+
|
|
5040
|
+
function removeControllerFromElement() {
|
|
5041
|
+
return {
|
|
5042
|
+
description: 'Removes the specified controller from the selected element',
|
|
5043
|
+
dependentProperties: ['selectedElement'],
|
|
5044
|
+
properties: {
|
|
5045
|
+
controllerName: {
|
|
5046
|
+
type: 'ParameterType:controllerName',
|
|
5047
|
+
required: true
|
|
5048
|
+
}
|
|
5049
|
+
}
|
|
5050
|
+
};
|
|
5051
|
+
}
|
|
5052
|
+
|
|
5053
|
+
function removeElement() {
|
|
5054
|
+
return {
|
|
5055
|
+
description: 'Removes the selected element from the DOM',
|
|
5056
|
+
dependentProperties: ['selectedElement']
|
|
5057
|
+
};
|
|
5058
|
+
}
|
|
5059
|
+
|
|
5060
|
+
function removePropertiesFromOperationData() {
|
|
5061
|
+
return {
|
|
5062
|
+
description: 'Removes the specified properties from the current operation data',
|
|
5063
|
+
properties: {
|
|
5064
|
+
propertyNames: 'ParameterType:array'
|
|
5065
|
+
}
|
|
5066
|
+
};
|
|
5067
|
+
}
|
|
5068
|
+
|
|
5069
|
+
function reparentElement() {
|
|
5070
|
+
return {
|
|
5071
|
+
description: 'Moves the selected element to the new location described by the given selector',
|
|
5072
|
+
dependentProperties: ['selectedElement'],
|
|
5073
|
+
properties: {
|
|
5074
|
+
newParentSelector: {
|
|
5075
|
+
type: 'ParameterType:selector',
|
|
5076
|
+
required: true
|
|
5077
|
+
}
|
|
5078
|
+
}
|
|
5079
|
+
};
|
|
5080
|
+
}
|
|
5081
|
+
|
|
5082
|
+
function requestAction() {
|
|
5083
|
+
return {
|
|
5084
|
+
description: 'Retrieves an instance of the specified action',
|
|
5085
|
+
properties: {
|
|
5086
|
+
systemName: {
|
|
5087
|
+
type: 'ParameterType:actionName',
|
|
5088
|
+
required: true
|
|
5089
|
+
}
|
|
5090
|
+
},
|
|
5091
|
+
outputProperties: {
|
|
5092
|
+
actionInstance: 'ParameterType:object'
|
|
5093
|
+
}
|
|
5094
|
+
};
|
|
5095
|
+
}
|
|
5096
|
+
|
|
5097
|
+
function resizeAction() {
|
|
5098
|
+
return {
|
|
5099
|
+
description: 'Triggers a resize on the current action',
|
|
5100
|
+
dependentProperties: ['actionInstance'],
|
|
5101
|
+
properties: {
|
|
5102
|
+
actionOperationData: 'ParameterType:object'
|
|
5103
|
+
}
|
|
5104
|
+
};
|
|
5105
|
+
}
|
|
5106
|
+
|
|
5107
|
+
function selectElement() {
|
|
5108
|
+
return {
|
|
5109
|
+
description: 'Selects an element using the given selector',
|
|
5110
|
+
properties: {
|
|
5111
|
+
selector: {
|
|
5112
|
+
type: 'ParameterType:selector',
|
|
5113
|
+
required: true
|
|
5114
|
+
},
|
|
5115
|
+
propertyName: 'ParameterType:string',
|
|
5116
|
+
useSelectedElementAsRoot: 'ParameterType:boolean'
|
|
5117
|
+
},
|
|
5118
|
+
outputProperties: {
|
|
5119
|
+
selectedElement: 'ParameterType:object'
|
|
5120
|
+
}
|
|
5121
|
+
};
|
|
5122
|
+
}
|
|
5123
|
+
|
|
5124
|
+
function setElementAttributes() {
|
|
5125
|
+
return {
|
|
5126
|
+
description: 'Sets the given attributes on the selected element',
|
|
5127
|
+
dependentProperties: ['selectedElement'],
|
|
5128
|
+
properties: {
|
|
5129
|
+
attributes: {
|
|
5130
|
+
type: 'ParameterType:object',
|
|
5131
|
+
required: true
|
|
5132
|
+
}
|
|
5133
|
+
}
|
|
5134
|
+
};
|
|
5135
|
+
}
|
|
5136
|
+
|
|
5137
|
+
function setElementContent() {
|
|
5138
|
+
return {
|
|
5139
|
+
description: 'Sets the given HTML content in the selected element',
|
|
5140
|
+
dependentProperties: ['selectedElement'],
|
|
5141
|
+
properties: {
|
|
5142
|
+
insertionType: [{
|
|
5143
|
+
value: 'overwrite',
|
|
5144
|
+
description: 'the contents of the selected element are replaced by the given template',
|
|
5145
|
+
"default": true
|
|
5146
|
+
}, {
|
|
5147
|
+
value: 'append',
|
|
5148
|
+
description: 'the new content will be inserted after the current content'
|
|
5149
|
+
}, {
|
|
5150
|
+
value: 'prepend',
|
|
5151
|
+
description: 'the new content will be inserted before the current content'
|
|
5152
|
+
}],
|
|
5153
|
+
template: {
|
|
5154
|
+
type: 'ParameterType:htmlContent',
|
|
5155
|
+
required: true
|
|
5156
|
+
}
|
|
5157
|
+
}
|
|
5158
|
+
};
|
|
5159
|
+
}
|
|
5160
|
+
|
|
5161
|
+
function setOperationData() {
|
|
5162
|
+
return {
|
|
5163
|
+
description: 'Sets the given properties on the current operation data',
|
|
5164
|
+
properties: {
|
|
5165
|
+
properties: {
|
|
5166
|
+
type: 'ParameterType:object',
|
|
5167
|
+
required: true
|
|
5168
|
+
},
|
|
5169
|
+
override: 'ParameterType:boolean'
|
|
5170
|
+
}
|
|
5171
|
+
};
|
|
5172
|
+
}
|
|
5173
|
+
|
|
5174
|
+
function setStyle() {
|
|
5175
|
+
return {
|
|
5176
|
+
description: 'Sets the given style properties on the selected element',
|
|
5177
|
+
properties: {
|
|
5178
|
+
properties: {
|
|
5179
|
+
type: 'ParameterType:object',
|
|
5180
|
+
required: true
|
|
5181
|
+
},
|
|
5182
|
+
propertyName: {
|
|
5183
|
+
type: 'ParameterType:string',
|
|
5184
|
+
required: false
|
|
5185
|
+
}
|
|
5186
|
+
}
|
|
5187
|
+
};
|
|
5188
|
+
}
|
|
5189
|
+
|
|
5190
|
+
function startAction() {
|
|
5191
|
+
return {
|
|
5192
|
+
description: 'Starts the selected action',
|
|
5193
|
+
dependentProperties: ['actionInstance'],
|
|
5194
|
+
properties: {
|
|
5195
|
+
actionOperationData: 'ParameterType:object'
|
|
5196
|
+
}
|
|
5197
|
+
};
|
|
5198
|
+
}
|
|
5199
|
+
|
|
5200
|
+
function startLoop() {
|
|
5201
|
+
return {
|
|
5202
|
+
description: 'Starts a loop over the given collection',
|
|
5203
|
+
properties: {
|
|
5204
|
+
collection: {
|
|
5205
|
+
type: 'ParameterType:array',
|
|
5206
|
+
required: true
|
|
5207
|
+
},
|
|
5208
|
+
propertyName: {
|
|
5209
|
+
type: 'ParameterType:string',
|
|
5210
|
+
defaultValue: 'currentItem'
|
|
5211
|
+
}
|
|
5212
|
+
}
|
|
5213
|
+
};
|
|
5214
|
+
}
|
|
5215
|
+
|
|
5216
|
+
function toggleClass() {
|
|
5217
|
+
return {
|
|
5218
|
+
description: 'Toggles the given class on the selected element',
|
|
5219
|
+
dependentProperties: ['selectedElement'],
|
|
5220
|
+
properties: {
|
|
5221
|
+
className: {
|
|
5222
|
+
type: 'ParameterType:className',
|
|
5223
|
+
required: true
|
|
5224
|
+
}
|
|
5225
|
+
}
|
|
5226
|
+
};
|
|
5227
|
+
}
|
|
5228
|
+
|
|
5229
|
+
function toggleElement() {
|
|
5230
|
+
return {
|
|
5231
|
+
description: 'Toggles the selected element',
|
|
5232
|
+
dependentProperties: ['selectedElement']
|
|
5233
|
+
};
|
|
5234
|
+
}
|
|
5235
|
+
|
|
5236
|
+
function wait() {
|
|
5237
|
+
return {
|
|
5238
|
+
description: 'Waits the given amount of milliseconds before the action continues',
|
|
5239
|
+
properties: {
|
|
5240
|
+
milliseconds: {
|
|
5241
|
+
type: 'ParameterType:integer',
|
|
5242
|
+
required: true
|
|
5243
|
+
}
|
|
5244
|
+
}
|
|
5245
|
+
};
|
|
5246
|
+
}
|
|
5247
|
+
|
|
5248
|
+
var index = {
|
|
5249
|
+
__proto__: null,
|
|
5250
|
+
addClass: addClass,
|
|
5251
|
+
addControllerToElement: addControllerToElement,
|
|
5252
|
+
animate: animate,
|
|
5253
|
+
animateWithClass: animateWithClass,
|
|
5254
|
+
broadcastEvent: broadcastEvent,
|
|
5255
|
+
calc: calc,
|
|
5256
|
+
clearElement: clearElement,
|
|
5257
|
+
clearOperationData: clearOperationData,
|
|
5258
|
+
createElement: createElement,
|
|
5259
|
+
customFunction: customFunction,
|
|
5260
|
+
endAction: endAction,
|
|
5261
|
+
endLoop: endLoop,
|
|
5262
|
+
extendController: extendController,
|
|
5263
|
+
getControllerFromElement: getControllerFromElement,
|
|
5264
|
+
getControllerInstance: getControllerInstance,
|
|
5265
|
+
getElementDimensions: getElementDimensions,
|
|
5266
|
+
getImport: getImport,
|
|
5267
|
+
loadJSON: loadJSON,
|
|
5268
|
+
log: log,
|
|
5269
|
+
math: math,
|
|
5270
|
+
removeClass: removeClass,
|
|
5271
|
+
removeControllerFromElement: removeControllerFromElement,
|
|
5272
|
+
removeElement: removeElement,
|
|
5273
|
+
removePropertiesFromOperationData: removePropertiesFromOperationData,
|
|
5274
|
+
reparentElement: reparentElement,
|
|
5275
|
+
requestAction: requestAction,
|
|
5276
|
+
resizeAction: resizeAction,
|
|
5277
|
+
selectElement: selectElement,
|
|
5278
|
+
setElementAttributes: setElementAttributes,
|
|
5279
|
+
setElementContent: setElementContent,
|
|
5280
|
+
setOperationData: setOperationData,
|
|
5281
|
+
setStyle: setStyle,
|
|
5282
|
+
startAction: startAction,
|
|
5283
|
+
startLoop: startLoop,
|
|
5284
|
+
toggleClass: toggleClass,
|
|
5285
|
+
toggleElement: toggleElement,
|
|
5286
|
+
wait: wait
|
|
5287
|
+
};
|
|
5288
|
+
|
|
4802
5289
|
exports.Action = Action;
|
|
4803
5290
|
exports.ActionRegistryEventbusListener = ActionRegistryEventbusListener;
|
|
4804
5291
|
exports.ConfigurationResolver = ConfigurationResolver;
|
|
5292
|
+
exports.DEV_TOOLS_KEY = DEV_TOOLS_KEY;
|
|
5293
|
+
exports.DevToolEventListener = DevToolEventListener;
|
|
5294
|
+
exports.Diagnostics = Diagnostics;
|
|
4805
5295
|
exports.EligiusEngine = EligiusEngine;
|
|
5296
|
+
exports.EligiusResourceImporter = EligiusResourceImporter;
|
|
4806
5297
|
exports.EndableAction = EndableAction;
|
|
4807
5298
|
exports.EngineFactory = EngineFactory;
|
|
4808
5299
|
exports.EventListenerController = EventListenerController;
|
|
@@ -4819,40 +5310,43 @@ exports.RoutingController = RoutingController;
|
|
|
4819
5310
|
exports.SubtitlesController = SubtitlesController;
|
|
4820
5311
|
exports.TimelineAction = TimelineAction;
|
|
4821
5312
|
exports.TimelineEventNames = TimelineEventNames;
|
|
4822
|
-
exports.
|
|
4823
|
-
exports.
|
|
4824
|
-
exports.
|
|
4825
|
-
exports.
|
|
4826
|
-
exports.
|
|
4827
|
-
exports.
|
|
4828
|
-
exports.clearElement = clearElement;
|
|
4829
|
-
exports.clearOperationData = clearOperationData;
|
|
4830
|
-
exports.createElement = createElement;
|
|
4831
|
-
exports.customFunction = customFunction;
|
|
4832
|
-
exports.endAction = endAction;
|
|
4833
|
-
exports.endLoop = endLoop;
|
|
4834
|
-
exports.extendController = extendController;
|
|
4835
|
-
exports.
|
|
4836
|
-
exports.
|
|
4837
|
-
exports.
|
|
4838
|
-
exports.
|
|
4839
|
-
exports.
|
|
4840
|
-
exports.
|
|
4841
|
-
exports.
|
|
4842
|
-
exports.
|
|
4843
|
-
exports.
|
|
4844
|
-
exports.
|
|
4845
|
-
exports.
|
|
4846
|
-
exports.
|
|
4847
|
-
exports.
|
|
4848
|
-
exports.
|
|
4849
|
-
exports.
|
|
4850
|
-
exports.
|
|
4851
|
-
exports.
|
|
4852
|
-
exports.
|
|
4853
|
-
exports.
|
|
4854
|
-
exports.
|
|
4855
|
-
exports.
|
|
4856
|
-
exports.
|
|
4857
|
-
exports.
|
|
5313
|
+
exports.addClass = addClass$1;
|
|
5314
|
+
exports.addControllerToElement = addControllerToElement$1;
|
|
5315
|
+
exports.animate = animate$1;
|
|
5316
|
+
exports.animateWithClass = animateWithClass$1;
|
|
5317
|
+
exports.broadcastEvent = broadcastEvent$1;
|
|
5318
|
+
exports.calc = calc$1;
|
|
5319
|
+
exports.clearElement = clearElement$1;
|
|
5320
|
+
exports.clearOperationData = clearOperationData$1;
|
|
5321
|
+
exports.createElement = createElement$1;
|
|
5322
|
+
exports.customFunction = customFunction$1;
|
|
5323
|
+
exports.endAction = endAction$1;
|
|
5324
|
+
exports.endLoop = endLoop$1;
|
|
5325
|
+
exports.extendController = extendController$1;
|
|
5326
|
+
exports.generateImporterSourceCode = generateImporterSourceCode;
|
|
5327
|
+
exports.getControllerFromElement = getControllerFromElement$1;
|
|
5328
|
+
exports.getControllerInstance = getControllerInstance$1;
|
|
5329
|
+
exports.getElementDimensions = getElementDimensions$1;
|
|
5330
|
+
exports.getImport = getImport$1;
|
|
5331
|
+
exports.loadJSON = loadJSON$1;
|
|
5332
|
+
exports.log = log$1;
|
|
5333
|
+
exports.math = math$1;
|
|
5334
|
+
exports.metadata = index;
|
|
5335
|
+
exports.removeClass = removeClass$1;
|
|
5336
|
+
exports.removeControllerFromElement = removeControllerFromElement$1;
|
|
5337
|
+
exports.removeElement = removeElement$1;
|
|
5338
|
+
exports.removePropertiesFromOperationData = removePropertiesFromOperationData$1;
|
|
5339
|
+
exports.reparentElement = reparentElement$1;
|
|
5340
|
+
exports.requestAction = requestAction$1;
|
|
5341
|
+
exports.resizeAction = resizeAction$1;
|
|
5342
|
+
exports.selectElement = selectElement$1;
|
|
5343
|
+
exports.setElementAttributes = setElementAttributes$1;
|
|
5344
|
+
exports.setElementContent = setElementContent$1;
|
|
5345
|
+
exports.setOperationData = setOperationData$1;
|
|
5346
|
+
exports.setStyle = setStyle$1;
|
|
5347
|
+
exports.startAction = startAction$1;
|
|
5348
|
+
exports.startLoop = startLoop$1;
|
|
5349
|
+
exports.toggleClass = toggleClass$1;
|
|
5350
|
+
exports.toggleElement = toggleElement$1;
|
|
5351
|
+
exports.wait = wait$1;
|
|
4858
5352
|
//# sourceMappingURL=eligius.cjs.development.js.map
|