@player-ui/beacon-plugin 0.11.3--canary.649.23399 → 0.11.3--canary.662.23451

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.
@@ -1190,48 +1190,6 @@ var BeaconPlugin = function() {
1190
1190
  }
1191
1191
  return typeof expr === "object" && expr !== null && !Array.isArray(expr) && "value" in expr;
1192
1192
  };
1193
- var isPromiselike = function isPromiselike(value) {
1194
- var // Check for standard Promise constructor name
1195
- _value_constructor;
1196
- return value != null && typeof value === "object" && typeof value.then === "function" && // Additional safeguards against false positives
1197
- (_instanceof(value, Promise) || ((_value_constructor = value.constructor) === null || _value_constructor === void 0 ? void 0 : _value_constructor.name) === "Promise" || // Verify it has other Promise-like methods to reduce false positives
1198
- typeof value.catch === "function" && typeof value.finally === "function");
1199
- };
1200
- var makePromiseAwareBinaryOp = function makePromiseAwareBinaryOp(operation) {
1201
- return function(a, b) {
1202
- if (isPromiselike(a) || isPromiselike(b)) {
1203
- return Promise.all([
1204
- Promise.resolve(a),
1205
- Promise.resolve(b)
1206
- ]).then(function(param) {
1207
- var _param = _sliced_to_array(param, 2), resolvedA = _param[0], resolvedB = _param[1];
1208
- return operation(resolvedA, resolvedB);
1209
- });
1210
- }
1211
- return operation(a, b);
1212
- };
1213
- };
1214
- var makePromiseAwareUnaryOp = function makePromiseAwareUnaryOp(operation) {
1215
- return function(a) {
1216
- if (isPromiselike(a)) {
1217
- return a.then(function(resolved) {
1218
- return operation(resolved);
1219
- });
1220
- }
1221
- return operation(a);
1222
- };
1223
- };
1224
- var handleConditionalBranching = function handleConditionalBranching(testValue, getTrueBranch, getFalseBranch, resolveNode) {
1225
- if (isPromiselike(testValue)) {
1226
- return testValue.then(function(resolved) {
1227
- var branch2 = resolved ? getTrueBranch() : getFalseBranch();
1228
- var branchResult = resolveNode(branch2);
1229
- return isPromiselike(branchResult) ? branchResult : Promise.resolve(branchResult);
1230
- });
1231
- }
1232
- var branch = testValue ? getTrueBranch() : getFalseBranch();
1233
- return resolveNode(branch);
1234
- };
1235
1193
  var parse2 = function parse2(schema) {
1236
1194
  var _loop = function() {
1237
1195
  var next = parseQueue.shift();
@@ -3638,9 +3596,6 @@ var BeaconPlugin = function() {
3638
3596
  },
3639
3597
  setDataVal: function() {
3640
3598
  return setDataVal;
3641
- },
3642
- waitFor: function() {
3643
- return waitFor;
3644
3599
  }
3645
3600
  });
3646
3601
  var setDataVal = function(_context, binding, value) {
@@ -3668,33 +3623,12 @@ var BeaconPlugin = function() {
3668
3623
  return null;
3669
3624
  };
3670
3625
  conditional.resolveParams = false;
3671
- var waitFor = function() {
3672
- var _ref = _async_to_generator(function(ctx, promise) {
3673
- return _ts_generator(this, function(_state) {
3674
- switch(_state.label){
3675
- case 0:
3676
- return [
3677
- 4,
3678
- promise
3679
- ];
3680
- case 1:
3681
- return [
3682
- 2,
3683
- _state.sent()
3684
- ];
3685
- }
3686
- });
3687
- });
3688
- return function waitFor(ctx, promise) {
3689
- return _ref.apply(this, arguments);
3690
- };
3691
- }();
3692
3626
  var andandOperator = function(ctx, a, b) {
3693
- return LogicalOperators.and(ctx, a, b);
3627
+ return ctx.evaluate(a) && ctx.evaluate(b);
3694
3628
  };
3695
3629
  andandOperator.resolveParams = false;
3696
3630
  var ororOperator = function(ctx, a, b) {
3697
- return LogicalOperators.or(ctx, a, b);
3631
+ return ctx.evaluate(a) || ctx.evaluate(b);
3698
3632
  };
3699
3633
  ororOperator.resolveParams = false;
3700
3634
  var DEFAULT_BINARY_OPERATORS = {
@@ -3714,35 +3648,34 @@ var BeaconPlugin = function() {
3714
3648
  "%": function(a, b) {
3715
3649
  return a % b;
3716
3650
  },
3717
- // Promise-aware comparison operators
3718
3651
  // eslint-disable-next-line
3719
- "==": makePromiseAwareBinaryOp(function(a, b) {
3652
+ "==": function(a, b) {
3720
3653
  return a == b;
3721
- }),
3654
+ },
3722
3655
  // eslint-disable-next-line
3723
- "!=": makePromiseAwareBinaryOp(function(a, b) {
3656
+ "!=": function(a, b) {
3724
3657
  return a != b;
3725
- }),
3726
- ">": makePromiseAwareBinaryOp(function(a, b) {
3658
+ },
3659
+ ">": function(a, b) {
3727
3660
  return a > b;
3728
- }),
3729
- ">=": makePromiseAwareBinaryOp(function(a, b) {
3661
+ },
3662
+ ">=": function(a, b) {
3730
3663
  return a >= b;
3731
- }),
3732
- "<": makePromiseAwareBinaryOp(function(a, b) {
3664
+ },
3665
+ "<": function(a, b) {
3733
3666
  return a < b;
3734
- }),
3735
- "<=": makePromiseAwareBinaryOp(function(a, b) {
3667
+ },
3668
+ "<=": function(a, b) {
3736
3669
  return a <= b;
3737
- }),
3738
- "!==": makePromiseAwareBinaryOp(function(a, b) {
3739
- return a !== b;
3740
- }),
3741
- "===": makePromiseAwareBinaryOp(function(a, b) {
3742
- return a === b;
3743
- }),
3670
+ },
3744
3671
  "&&": andandOperator,
3745
3672
  "||": ororOperator,
3673
+ "!==": function(a, b) {
3674
+ return a !== b;
3675
+ },
3676
+ "===": function(a, b) {
3677
+ return a === b;
3678
+ },
3746
3679
  // eslint-disable-next-line
3747
3680
  "|": function(a, b) {
3748
3681
  return a | b;
@@ -3773,70 +3706,8 @@ var BeaconPlugin = function() {
3773
3706
  "+": function(a) {
3774
3707
  return Number(a);
3775
3708
  },
3776
- "!": makePromiseAwareUnaryOp(function(a) {
3709
+ "!": function(a) {
3777
3710
  return !a;
3778
- })
3779
- };
3780
- var PromiseCollectionHandler = {
3781
- /**
3782
- * Handle array with potential Promise elements
3783
- */ handleArray: function handleArray(items) {
3784
- var hasPromises = items.some(function(item) {
3785
- return isPromiselike(item);
3786
- });
3787
- return hasPromises ? Promise.all(items) : items;
3788
- },
3789
- /**
3790
- * Handle object with potential Promise keys/values
3791
- */ handleObject: function handleObject(attributes, resolveNode) {
3792
- var resolvedAttributes = {};
3793
- var promises = [];
3794
- var hasPromises = false;
3795
- attributes.forEach(function(attr) {
3796
- var key = resolveNode(attr.key);
3797
- var value = resolveNode(attr.value);
3798
- if (isPromiselike(key) || isPromiselike(value)) {
3799
- hasPromises = true;
3800
- var keyPromise = Promise.resolve(key);
3801
- var valuePromise = Promise.resolve(value);
3802
- promises.push(Promise.all([
3803
- keyPromise,
3804
- valuePromise
3805
- ]).then(function(param) {
3806
- var _param = _sliced_to_array(param, 2), resolvedKey = _param[0], resolvedValue = _param[1];
3807
- resolvedAttributes[resolvedKey] = resolvedValue;
3808
- }));
3809
- } else {
3810
- resolvedAttributes[key] = value;
3811
- }
3812
- });
3813
- return hasPromises ? Promise.all(promises).then(function() {
3814
- return resolvedAttributes;
3815
- }) : resolvedAttributes;
3816
- }
3817
- };
3818
- var LogicalOperators = {
3819
- and: function(ctx, leftNode, rightNode) {
3820
- var leftResult = ctx.evaluate(leftNode);
3821
- if (isPromiselike(leftResult)) {
3822
- return leftResult.then(function(awaitedLeft) {
3823
- if (!awaitedLeft) return awaitedLeft;
3824
- var rightResult = ctx.evaluate(rightNode);
3825
- return isPromiselike(rightResult) ? rightResult : Promise.resolve(rightResult);
3826
- });
3827
- }
3828
- return leftResult && ctx.evaluate(rightNode);
3829
- },
3830
- or: function(ctx, leftNode, rightNode) {
3831
- var leftResult = ctx.evaluate(leftNode);
3832
- if (isPromiselike(leftResult)) {
3833
- return leftResult.then(function(awaitedLeft) {
3834
- if (awaitedLeft) return awaitedLeft;
3835
- var rightResult = ctx.evaluate(rightNode);
3836
- return isPromiselike(rightResult) ? rightResult : Promise.resolve(rightResult);
3837
- });
3838
- }
3839
- return leftResult || ctx.evaluate(rightNode);
3840
3711
  }
3841
3712
  };
3842
3713
  var ExpressionEvaluator = /*#__PURE__*/ function() {
@@ -3857,12 +3728,7 @@ var BeaconPlugin = function() {
3857
3728
  this.operators = {
3858
3729
  binary: new Map(Object.entries(DEFAULT_BINARY_OPERATORS)),
3859
3730
  unary: new Map(Object.entries(DEFAULT_UNARY_OPERATORS)),
3860
- expressions: new Map(_to_consumable_array(Object.entries(evaluator_functions_exports)).concat([
3861
- [
3862
- "await",
3863
- waitFor
3864
- ]
3865
- ]))
3731
+ expressions: new Map(Object.entries(evaluator_functions_exports))
3866
3732
  };
3867
3733
  this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
3868
3734
  evaluate: function(expr) {
@@ -3872,12 +3738,7 @@ var BeaconPlugin = function() {
3872
3738
  return _this._execAST(node, _this.defaultHookOptions);
3873
3739
  }
3874
3740
  });
3875
- this.hooks.resolve.tap("ExpressionEvaluator", function(result, node, options) {
3876
- if (options.async) {
3877
- return _this._resolveNodeAsync(result, node, options);
3878
- }
3879
- return _this._resolveNode(result, node, options);
3880
- });
3741
+ this.hooks.resolve.tap("ExpressionEvaluator", this._resolveNode.bind(this));
3881
3742
  this.evaluate = this.evaluate.bind(this);
3882
3743
  }
3883
3744
  _create_class(ExpressionEvaluator, [
@@ -3915,14 +3776,6 @@ var BeaconPlugin = function() {
3915
3776
  return this._execString(String(expression), resolvedOpts);
3916
3777
  }
3917
3778
  },
3918
- {
3919
- key: "evaluateAsync",
3920
- value: function evaluateAsync(expr, options) {
3921
- return this.evaluate(expr, _object_spread_props(_object_spread({}, options), {
3922
- async: true
3923
- }));
3924
- }
3925
- },
3926
3779
  {
3927
3780
  key: "addExpressionFunction",
3928
3781
  value: function addExpressionFunction(name, handler) {
@@ -3968,10 +3821,8 @@ var BeaconPlugin = function() {
3968
3821
  var matches = exp.match(/^@\[(.*)\]@$/);
3969
3822
  var matchedExp = exp;
3970
3823
  if (matches) {
3971
- var _Array_from = _sliced_to_array(Array.from(matches), 2), matched = _Array_from[1];
3972
- if (matched) {
3973
- matchedExp = matched;
3974
- }
3824
+ var ref;
3825
+ ref = _sliced_to_array(Array.from(matches), 2), matchedExp = ref[1], ref;
3975
3826
  }
3976
3827
  var storedAST;
3977
3828
  try {
@@ -4038,7 +3889,14 @@ var BeaconPlugin = function() {
4038
3889
  return;
4039
3890
  }
4040
3891
  if (node.type === "Object") {
4041
- return PromiseCollectionHandler.handleObject(node.attributes, resolveNode);
3892
+ var attributes = node.attributes;
3893
+ var resolvedAttributes = {};
3894
+ attributes.forEach(function(attr) {
3895
+ var key = resolveNode(attr.key);
3896
+ var value = resolveNode(attr.value);
3897
+ resolvedAttributes[key] = value;
3898
+ });
3899
+ return resolvedAttributes;
4042
3900
  }
4043
3901
  if (node.type === "CallExpression") {
4044
3902
  var expressionName = node.callTarget.name;
@@ -4089,18 +3947,13 @@ var BeaconPlugin = function() {
4089
3947
  return;
4090
3948
  }
4091
3949
  if (node.type === "ConditionalExpression") {
4092
- var testResult = resolveNode(node.test);
4093
- return handleConditionalBranching(testResult, function() {
4094
- return node.consequent;
4095
- }, function() {
4096
- return node.alternate;
4097
- }, resolveNode);
3950
+ var result = resolveNode(node.test) ? node.consequent : node.alternate;
3951
+ return resolveNode(result);
4098
3952
  }
4099
3953
  if (node.type === "ArrayExpression") {
4100
- var results = node.elements.map(function(ele) {
3954
+ return node.elements.map(function(ele) {
4101
3955
  return resolveNode(ele);
4102
3956
  });
4103
- return PromiseCollectionHandler.handleArray(results);
4104
3957
  }
4105
3958
  if (node.type === "Modification") {
4106
3959
  var operation = this.operators.binary.get(node.operator);
@@ -4130,459 +3983,6 @@ var BeaconPlugin = function() {
4130
3983
  return resolveNode(node.left);
4131
3984
  }
4132
3985
  }
4133
- },
4134
- {
4135
- key: "_resolveNodeAsync",
4136
- value: function _resolveNodeAsync(_currentValue, node, options) {
4137
- var _this = this;
4138
- return _async_to_generator(function() {
4139
- var resolveNode, model, expressionContext, operator, _tmp, _tmp1, operator1, _tmp2, _tmp3, attributes, resolvedAttributes, expressionName, operator2, args, obj, prop, value, value1, testResult, result, branchResult, operation, newValue, _tmp4, _tmp5;
4140
- return _ts_generator(this, function(_state) {
4141
- switch(_state.label){
4142
- case 0:
4143
- resolveNode = options.resolveNode, model = options.model;
4144
- expressionContext = _object_spread_props(_object_spread({}, options), {
4145
- evaluate: function(expr) {
4146
- return _this.evaluate(expr, options);
4147
- }
4148
- });
4149
- if (!(node.type === "BinaryExpression" || node.type === "LogicalExpression")) return [
4150
- 3,
4151
- 7
4152
- ];
4153
- operator = _this.operators.binary.get(node.operator);
4154
- if (!operator) return [
4155
- 3,
4156
- 6
4157
- ];
4158
- if (!("resolveParams" in operator)) return [
4159
- 3,
4160
- 3
4161
- ];
4162
- if (operator.resolveParams === false) {
4163
- return [
4164
- 2,
4165
- operator(expressionContext, node.left, node.right)
4166
- ];
4167
- }
4168
- _tmp = [
4169
- expressionContext
4170
- ];
4171
- return [
4172
- 4,
4173
- resolveNode(node.left)
4174
- ];
4175
- case 1:
4176
- _tmp = _tmp.concat([
4177
- _state.sent()
4178
- ]);
4179
- return [
4180
- 4,
4181
- resolveNode(node.right)
4182
- ];
4183
- case 2:
4184
- return [
4185
- 2,
4186
- operator.apply(void 0, _tmp.concat([
4187
- _state.sent()
4188
- ]))
4189
- ];
4190
- case 3:
4191
- return [
4192
- 4,
4193
- resolveNode(node.left)
4194
- ];
4195
- case 4:
4196
- _tmp1 = [
4197
- _state.sent()
4198
- ];
4199
- return [
4200
- 4,
4201
- resolveNode(node.right)
4202
- ];
4203
- case 5:
4204
- return [
4205
- 2,
4206
- operator.apply(void 0, _tmp1.concat([
4207
- _state.sent()
4208
- ]))
4209
- ];
4210
- case 6:
4211
- return [
4212
- 2
4213
- ];
4214
- case 7:
4215
- if (!(node.type === "UnaryExpression")) return [
4216
- 3,
4217
- 14
4218
- ];
4219
- operator1 = _this.operators.unary.get(node.operator);
4220
- if (!operator1) return [
4221
- 3,
4222
- 13
4223
- ];
4224
- if (!("resolveParams" in operator1)) return [
4225
- 3,
4226
- 11
4227
- ];
4228
- _tmp2 = [
4229
- expressionContext
4230
- ];
4231
- if (!(operator1.resolveParams === false)) return [
4232
- 3,
4233
- 8
4234
- ];
4235
- _tmp3 = node.argument;
4236
- return [
4237
- 3,
4238
- 10
4239
- ];
4240
- case 8:
4241
- return [
4242
- 4,
4243
- resolveNode(node.argument)
4244
- ];
4245
- case 9:
4246
- _tmp3 = _state.sent();
4247
- _state.label = 10;
4248
- case 10:
4249
- return [
4250
- 2,
4251
- operator1.apply(void 0, _tmp2.concat([
4252
- _tmp3
4253
- ]))
4254
- ];
4255
- case 11:
4256
- return [
4257
- 4,
4258
- resolveNode(node.argument)
4259
- ];
4260
- case 12:
4261
- return [
4262
- 2,
4263
- operator1.apply(void 0, [
4264
- _state.sent()
4265
- ])
4266
- ];
4267
- case 13:
4268
- return [
4269
- 2
4270
- ];
4271
- case 14:
4272
- if (!(node.type === "Object")) return [
4273
- 3,
4274
- 16
4275
- ];
4276
- attributes = node.attributes;
4277
- resolvedAttributes = {};
4278
- return [
4279
- 4,
4280
- Promise.all(attributes.map(function() {
4281
- var _ref = _async_to_generator(function(attr) {
4282
- var key, value;
4283
- return _ts_generator(this, function(_state) {
4284
- switch(_state.label){
4285
- case 0:
4286
- return [
4287
- 4,
4288
- resolveNode(attr.key)
4289
- ];
4290
- case 1:
4291
- key = _state.sent();
4292
- return [
4293
- 4,
4294
- resolveNode(attr.value)
4295
- ];
4296
- case 2:
4297
- value = _state.sent();
4298
- resolvedAttributes[key] = value;
4299
- return [
4300
- 2
4301
- ];
4302
- }
4303
- });
4304
- });
4305
- return function(attr) {
4306
- return _ref.apply(this, arguments);
4307
- };
4308
- }()))
4309
- ];
4310
- case 15:
4311
- _state.sent();
4312
- return [
4313
- 2,
4314
- resolvedAttributes
4315
- ];
4316
- case 16:
4317
- if (!(node.type === "CallExpression")) return [
4318
- 3,
4319
- 18
4320
- ];
4321
- expressionName = node.callTarget.name;
4322
- operator2 = _this.operators.expressions.get(expressionName);
4323
- if (!operator2) {
4324
- throw new Error("Unknown expression function: ".concat(expressionName));
4325
- }
4326
- if ("resolveParams" in operator2 && operator2.resolveParams === false) {
4327
- return [
4328
- 2,
4329
- operator2.apply(void 0, [
4330
- expressionContext
4331
- ].concat(_to_consumable_array(node.args)))
4332
- ];
4333
- }
4334
- return [
4335
- 4,
4336
- Promise.all(node.args.map(function() {
4337
- var _ref = _async_to_generator(function(n) {
4338
- return _ts_generator(this, function(_state) {
4339
- switch(_state.label){
4340
- case 0:
4341
- return [
4342
- 4,
4343
- resolveNode(n)
4344
- ];
4345
- case 1:
4346
- return [
4347
- 2,
4348
- _state.sent()
4349
- ];
4350
- }
4351
- });
4352
- });
4353
- return function(n) {
4354
- return _ref.apply(this, arguments);
4355
- };
4356
- }()))
4357
- ];
4358
- case 17:
4359
- args = _state.sent();
4360
- return [
4361
- 2,
4362
- operator2.apply(void 0, [
4363
- expressionContext
4364
- ].concat(_to_consumable_array(args)))
4365
- ];
4366
- case 18:
4367
- if (node.type === "ModelRef") {
4368
- return [
4369
- 2,
4370
- model.get(node.ref, {
4371
- context: {
4372
- model: options.model
4373
- }
4374
- })
4375
- ];
4376
- }
4377
- if (!(node.type === "MemberExpression")) return [
4378
- 3,
4379
- 21
4380
- ];
4381
- return [
4382
- 4,
4383
- resolveNode(node.object)
4384
- ];
4385
- case 19:
4386
- obj = _state.sent();
4387
- return [
4388
- 4,
4389
- resolveNode(node.property)
4390
- ];
4391
- case 20:
4392
- prop = _state.sent();
4393
- return [
4394
- 2,
4395
- obj[prop]
4396
- ];
4397
- case 21:
4398
- if (!(node.type === "Assignment")) return [
4399
- 3,
4400
- 26
4401
- ];
4402
- if (!(node.left.type === "ModelRef")) return [
4403
- 3,
4404
- 23
4405
- ];
4406
- return [
4407
- 4,
4408
- resolveNode(node.right)
4409
- ];
4410
- case 22:
4411
- value = _state.sent();
4412
- model.set([
4413
- [
4414
- node.left.ref,
4415
- value
4416
- ]
4417
- ]);
4418
- return [
4419
- 2,
4420
- value
4421
- ];
4422
- case 23:
4423
- if (!(node.left.type === "Identifier")) return [
4424
- 3,
4425
- 25
4426
- ];
4427
- return [
4428
- 4,
4429
- resolveNode(node.right)
4430
- ];
4431
- case 24:
4432
- value1 = _state.sent();
4433
- _this.vars[node.left.name] = value1;
4434
- return [
4435
- 2,
4436
- value1
4437
- ];
4438
- case 25:
4439
- return [
4440
- 2
4441
- ];
4442
- case 26:
4443
- if (!(node.type === "ConditionalExpression")) return [
4444
- 3,
4445
- 29
4446
- ];
4447
- return [
4448
- 4,
4449
- resolveNode(node.test)
4450
- ];
4451
- case 27:
4452
- testResult = _state.sent();
4453
- result = testResult ? node.consequent : node.alternate;
4454
- return [
4455
- 4,
4456
- resolveNode(result)
4457
- ];
4458
- case 28:
4459
- branchResult = _state.sent();
4460
- return [
4461
- 2,
4462
- branchResult
4463
- ];
4464
- case 29:
4465
- if (node.type === "ArrayExpression") {
4466
- return [
4467
- 2,
4468
- Promise.all(node.elements.map(function() {
4469
- var _ref = _async_to_generator(function(ele) {
4470
- return _ts_generator(this, function(_state) {
4471
- switch(_state.label){
4472
- case 0:
4473
- return [
4474
- 4,
4475
- resolveNode(ele)
4476
- ];
4477
- case 1:
4478
- return [
4479
- 2,
4480
- _state.sent()
4481
- ];
4482
- }
4483
- });
4484
- });
4485
- return function(ele) {
4486
- return _ref.apply(this, arguments);
4487
- };
4488
- }()))
4489
- ];
4490
- }
4491
- if (!(node.type === "Modification")) return [
4492
- 3,
4493
- 39
4494
- ];
4495
- operation = _this.operators.binary.get(node.operator);
4496
- if (!operation) return [
4497
- 3,
4498
- 38
4499
- ];
4500
- if (!("resolveParams" in operation)) return [
4501
- 3,
4502
- 34
4503
- ];
4504
- if (!(operation.resolveParams === false)) return [
4505
- 3,
4506
- 30
4507
- ];
4508
- newValue = operation(expressionContext, node.left, node.right);
4509
- return [
4510
- 3,
4511
- 33
4512
- ];
4513
- case 30:
4514
- _tmp4 = [
4515
- expressionContext
4516
- ];
4517
- return [
4518
- 4,
4519
- resolveNode(node.left)
4520
- ];
4521
- case 31:
4522
- _tmp4 = _tmp4.concat([
4523
- _state.sent()
4524
- ]);
4525
- return [
4526
- 4,
4527
- resolveNode(node.right)
4528
- ];
4529
- case 32:
4530
- newValue = operation.apply(void 0, _tmp4.concat([
4531
- _state.sent()
4532
- ]));
4533
- _state.label = 33;
4534
- case 33:
4535
- return [
4536
- 3,
4537
- 37
4538
- ];
4539
- case 34:
4540
- return [
4541
- 4,
4542
- resolveNode(node.left)
4543
- ];
4544
- case 35:
4545
- _tmp5 = [
4546
- _state.sent()
4547
- ];
4548
- return [
4549
- 4,
4550
- resolveNode(node.right)
4551
- ];
4552
- case 36:
4553
- newValue = operation.apply(void 0, _tmp5.concat([
4554
- _state.sent()
4555
- ]));
4556
- _state.label = 37;
4557
- case 37:
4558
- if (node.left.type === "ModelRef") {
4559
- model.set([
4560
- [
4561
- node.left.ref,
4562
- newValue
4563
- ]
4564
- ]);
4565
- } else if (node.left.type === "Identifier") {
4566
- _this.vars[node.left.name] = newValue;
4567
- }
4568
- return [
4569
- 2,
4570
- newValue
4571
- ];
4572
- case 38:
4573
- return [
4574
- 2,
4575
- resolveNode(node.left)
4576
- ];
4577
- case 39:
4578
- return [
4579
- 2,
4580
- _this._resolveNode(_currentValue, node, options)
4581
- ];
4582
- }
4583
- });
4584
- })();
4585
- }
4586
3986
  }
4587
3987
  ]);
4588
3988
  return ExpressionEvaluator;
@@ -8007,56 +7407,15 @@ var BeaconPlugin = function() {
8007
7407
  validationController.reset();
8008
7408
  }
8009
7409
  });
8010
- flow.hooks.afterTransition.tap("player", function() {
8011
- var _ref = _async_to_generator(function(flowInstance) {
8012
- var _flowInstance_currentState, value, exp, result, e;
8013
- return _ts_generator(this, function(_state) {
8014
- switch(_state.label){
8015
- case 0:
8016
- value = (_flowInstance_currentState = flowInstance.currentState) === null || _flowInstance_currentState === void 0 ? void 0 : _flowInstance_currentState.value;
8017
- if (!(value && value.state_type === "ACTION")) return [
8018
- 3,
8019
- 4
8020
- ];
8021
- exp = value.exp;
8022
- _state.label = 1;
8023
- case 1:
8024
- _state.trys.push([
8025
- 1,
8026
- 3,
8027
- ,
8028
- 4
8029
- ]);
8030
- return [
8031
- 4,
8032
- expressionEvaluator.evaluateAsync(exp)
8033
- ];
8034
- case 2:
8035
- result = _state.sent();
8036
- flowController === null || flowController === void 0 ? void 0 : flowController.transition(String(result));
8037
- return [
8038
- 3,
8039
- 4
8040
- ];
8041
- case 3:
8042
- e = _state.sent();
8043
- flowResultDeferred.reject(e);
8044
- return [
8045
- 3,
8046
- 4
8047
- ];
8048
- case 4:
8049
- expressionEvaluator.reset();
8050
- return [
8051
- 2
8052
- ];
8053
- }
8054
- });
8055
- });
8056
- return function(flowInstance) {
8057
- return _ref.apply(this, arguments);
8058
- };
8059
- }());
7410
+ flow.hooks.afterTransition.tap("player", function(flowInstance) {
7411
+ var _flowInstance_currentState;
7412
+ var value = (_flowInstance_currentState = flowInstance.currentState) === null || _flowInstance_currentState === void 0 ? void 0 : _flowInstance_currentState.value;
7413
+ if (value && value.state_type === "ACTION") {
7414
+ var exp = value.exp;
7415
+ flowController === null || flowController === void 0 ? void 0 : flowController.transition(String(expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp)));
7416
+ }
7417
+ expressionEvaluator.reset();
7418
+ });
8060
7419
  });
8061
7420
  this.hooks.dataController.call(dataController);
8062
7421
  validationController.setOptions({