@player-ui/player 0.4.0-next.4 → 0.4.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -909,7 +909,9 @@ function isIdentifierPart(ch) {
909
909
  function isModelRefStart(ch0, ch1) {
910
910
  return ch0 === OCURL_CODE && ch1 === OCURL_CODE;
911
911
  }
912
- function parseExpression(expr) {
912
+ function parseExpression(expr, options) {
913
+ var _a;
914
+ const strictMode = (_a = options == null ? void 0 : options.strict) != null ? _a : true;
913
915
  const charAtFunc = expr.charAt;
914
916
  const charCodeAtFunc = expr.charCodeAt;
915
917
  const { length } = expr;
@@ -1303,6 +1305,9 @@ function parseExpression(expr) {
1303
1305
  }
1304
1306
  args.push(node);
1305
1307
  }
1308
+ if (charIndex !== termination) {
1309
+ throwError(`Expected ${String.fromCharCode(termination)}`, index);
1310
+ }
1306
1311
  return args;
1307
1312
  }
1308
1313
  function gobbleVariable() {
@@ -1373,28 +1378,41 @@ function parseExpression(expr) {
1373
1378
  };
1374
1379
  }
1375
1380
  const nodes = [];
1376
- while (index < length) {
1377
- const chIndex = exprICode(index);
1378
- if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
1379
- index++;
1380
- continue;
1381
+ try {
1382
+ while (index < length) {
1383
+ const chIndex = exprICode(index);
1384
+ if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
1385
+ index++;
1386
+ continue;
1387
+ }
1388
+ const node = gobbleExpression();
1389
+ if (node) {
1390
+ nodes.push(node);
1391
+ } else if (index < length) {
1392
+ throwError(`Unexpected "${exprI(index)}"`, index);
1393
+ }
1381
1394
  }
1382
- const node = gobbleExpression();
1383
- if (node) {
1384
- nodes.push(node);
1385
- } else if (index < length) {
1386
- throwError(`Unexpected "${exprI(index)}"`, index);
1395
+ if (nodes.length === 1) {
1396
+ return nodes[0];
1387
1397
  }
1398
+ return {
1399
+ __id: ExpNodeOpaqueIdentifier,
1400
+ type: "Compound",
1401
+ body: nodes,
1402
+ location: getLocation(0)
1403
+ };
1404
+ } catch (e) {
1405
+ if (strictMode || !(e instanceof Error)) {
1406
+ throw e;
1407
+ }
1408
+ return {
1409
+ __id: ExpNodeOpaqueIdentifier,
1410
+ type: "Compound",
1411
+ body: nodes,
1412
+ location: getLocation(0),
1413
+ error: e
1414
+ };
1388
1415
  }
1389
- if (nodes.length === 1) {
1390
- return nodes[0];
1391
- }
1392
- return {
1393
- __id: ExpNodeOpaqueIdentifier,
1394
- type: "Compound",
1395
- body: nodes,
1396
- location: getLocation(0)
1397
- };
1398
1416
  }
1399
1417
 
1400
1418
  const setDataVal = (_context, binding, value) => {
@@ -2276,7 +2294,13 @@ class Parser {
2276
2294
  if (!localObj) {
2277
2295
  return currentValue;
2278
2296
  }
2279
- const objEntries = Array.isArray(localObj) ? localObj.map((v, i) => [i, v]) : Object.entries(localObj);
2297
+ const objEntries = Array.isArray(localObj) ? localObj.map((v, i) => [i, v]) : [
2298
+ ...Object.entries(localObj),
2299
+ ...Object.getOwnPropertySymbols(localObj).map((s) => [
2300
+ s,
2301
+ localObj[s]
2302
+ ])
2303
+ ];
2280
2304
  const defaultValue = {
2281
2305
  children: [],
2282
2306
  value: currentValue
@@ -4421,8 +4445,8 @@ var __async = (__this, __arguments, generator) => {
4421
4445
  step((generator = generator.apply(__this, __arguments)).next());
4422
4446
  });
4423
4447
  };
4424
- const PLAYER_VERSION = "0.4.0-next.4";
4425
- const COMMIT = "e03645f7ab5fbdfab274edcc92542752712afe01";
4448
+ const PLAYER_VERSION = "0.4.0-next.5";
4449
+ const COMMIT = "a7957331b94ce0a7d50709a0d636a406b033300f";
4426
4450
  const _Player = class {
4427
4451
  constructor(config) {
4428
4452
  this.logger = new TapableLogger();
@@ -4769,6 +4793,7 @@ exports.isBinding = isBinding;
4769
4793
  exports.isExpressionNode = isExpressionNode;
4770
4794
  exports.maybeConvertToNum = maybeConvertToNum;
4771
4795
  exports.parse = parse;
4796
+ exports.parseExpression = parseExpression;
4772
4797
  exports.resolveDataRefs = resolveDataRefs;
4773
4798
  exports.resolveDataRefsInString = resolveDataRefsInString;
4774
4799
  exports.resolveExpressionsInString = resolveExpressionsInString;
package/dist/index.d.ts CHANGED
@@ -391,6 +391,11 @@ interface BaseNode<T> {
391
391
  __id: typeof ExpNodeOpaqueIdentifier;
392
392
  /** The location of the node in the source expression string */
393
393
  location?: NodeLocation;
394
+ /**
395
+ * The error that occurred while parsing this node
396
+ * This is only set if the parsing mode is set to non-strict
397
+ */
398
+ error?: Error;
394
399
  }
395
400
  /** A helper interface for nodes that container left and right children */
396
401
  interface DirectionalNode {
@@ -520,6 +525,16 @@ declare function withoutContext<T extends unknown[], Return>(fn: (...args: T) =>
520
525
  /** Get the node in the expression that's closest to the desired position */
521
526
  declare function findClosestNodeAtPosition(node: ExpressionNode, position: NodePosition): ExpressionNode | undefined;
522
527
 
528
+ /**
529
+ * An expression to AST parser based on JSEP: http://jsep.from.so/
530
+ */
531
+
532
+ /** Parse out an expression from the string */
533
+ declare function parseExpression(expr: string, options?: {
534
+ /** If true (the default), will throw on invalid expressions */
535
+ strict?: boolean;
536
+ }): ExpressionNode;
537
+
523
538
  declare type FormatOptions = Omit<Formatting.Reference, 'type'>;
524
539
  /**
525
540
  * The return types for the schema don't include options.
@@ -1636,4 +1651,4 @@ declare class FlowExpPlugin implements PlayerPlugin {
1636
1651
  apply(player: Player): void;
1637
1652
  }
1638
1653
 
1639
- export { AnyAssetType, ApplicabilityPlugin, ArrayExpressionNode, AssetTransformCorePlugin, AssignmentNode, BaseFlowState, BaseNode, BatchSetTransaction, BeforeTransformFunction, BinaryNode, BinaryOperator, BinaryOperatorAdvanced, BinaryOperatorBasic, BindingFactory, BindingInstance, BindingLike, BindingParser, BindingParserOptions, BindingTracker, Builder, CallExpressionNode, CompletedState, CompoundNode, ConditionalExpressionNode, ConsoleLogger, ConstantsController, ConstantsProvider, ControllerState, DataController, DataModelImpl, DataModelMiddleware, DataModelOptions, DataModelWithParser, DataPipeline, DependencyMiddleware, DependencyModel, DependencySets, DependencyTracker, DirectionalNode, EMPTY_NODE, ErrorState, ErrorValidationResponse, ExpNodeOpaqueIdentifier, ExpressionContext, ExpressionEvaluator, ExpressionEvaluatorFunction, ExpressionEvaluatorOptions, ExpressionHandler, ExpressionLiteralType, ExpressionNode, ExpressionNodeType, ExpressionType, FlowController, FlowExpPlugin, FlowInstance, FormatDefinition, FormatFunction, FormatHandler, FormatOptions, FormatType, Getter, HookOptions, IdentifierNode, InProgressState, LiteralNode, LocalModel, LocalStateStore, LogFn, Logger, LoggerProvider, LogicalNode, MemberExpressionNode, MiddlewareChecker, ModelRefNode, ModificationNode, NOOPDataModel, NOOP_MODEL, NOT_STARTED_STATE, NamedState, Node, NodeLocation, NodePosition, NodeType, NoopLogger, NotStartedState, ObjectNode, OperatorProcessingOptions, Options, ParseObjectOptions, Parser, PipelinedDataModel, Player, PlayerConfigOptions, PlayerFlowExecutionData, PlayerFlowState, PlayerFlowStatus, PlayerInfo, PlayerPlugin, ProxyLogger, ROOT_BINDING, RawBinding, RawBindingSegment, RawSetTransaction, RawSetType, Resolve, Resolver, SIMPLE_BINDING_REGEX, SchemaController, Severity, StatefulValidationObject, Store, StringResolverPlugin, StrongOrWeakBinding, SwitchPlugin, TapableLogger, TemplatePlugin, ThisNode, TransformFunction, TransformFunctions, TransformRegistry, TransitionFunction, TransitionOptions, UnaryNode, UnaryOperator, Updates, ValidationBindingTrackerViewPlugin, ValidationController, ValidationMiddleware, ValidationObject, ValidationProvider, ValidationResponse, ValidatorContext, ValidatorFunction, ValidatorRegistry, ViewController, ViewControllerOptions, ViewInstance, ViewPlugin, WarningValidationResponse, caresAboutDataChanges, constructModelForPipeline, findClosestNodeAtPosition, findInArray, findNextExp, getBindingSegments, isBinding, isExpressionNode, maybeConvertToNum, parse, resolveDataRefs, resolveDataRefsInString, resolveExpressionsInString, severities, toModel, toNodeResolveOptions, withParser, withoutContext };
1654
+ export { AnyAssetType, ApplicabilityPlugin, ArrayExpressionNode, AssetTransformCorePlugin, AssignmentNode, BaseFlowState, BaseNode, BatchSetTransaction, BeforeTransformFunction, BinaryNode, BinaryOperator, BinaryOperatorAdvanced, BinaryOperatorBasic, BindingFactory, BindingInstance, BindingLike, BindingParser, BindingParserOptions, BindingTracker, Builder, CallExpressionNode, CompletedState, CompoundNode, ConditionalExpressionNode, ConsoleLogger, ConstantsController, ConstantsProvider, ControllerState, DataController, DataModelImpl, DataModelMiddleware, DataModelOptions, DataModelWithParser, DataPipeline, DependencyMiddleware, DependencyModel, DependencySets, DependencyTracker, DirectionalNode, EMPTY_NODE, ErrorState, ErrorValidationResponse, ExpNodeOpaqueIdentifier, ExpressionContext, ExpressionEvaluator, ExpressionEvaluatorFunction, ExpressionEvaluatorOptions, ExpressionHandler, ExpressionLiteralType, ExpressionNode, ExpressionNodeType, ExpressionType, FlowController, FlowExpPlugin, FlowInstance, FormatDefinition, FormatFunction, FormatHandler, FormatOptions, FormatType, Getter, HookOptions, IdentifierNode, InProgressState, LiteralNode, LocalModel, LocalStateStore, LogFn, Logger, LoggerProvider, LogicalNode, MemberExpressionNode, MiddlewareChecker, ModelRefNode, ModificationNode, NOOPDataModel, NOOP_MODEL, NOT_STARTED_STATE, NamedState, Node, NodeLocation, NodePosition, NodeType, NoopLogger, NotStartedState, ObjectNode, OperatorProcessingOptions, Options, ParseObjectOptions, Parser, PipelinedDataModel, Player, PlayerConfigOptions, PlayerFlowExecutionData, PlayerFlowState, PlayerFlowStatus, PlayerInfo, PlayerPlugin, ProxyLogger, ROOT_BINDING, RawBinding, RawBindingSegment, RawSetTransaction, RawSetType, Resolve, Resolver, SIMPLE_BINDING_REGEX, SchemaController, Severity, StatefulValidationObject, Store, StringResolverPlugin, StrongOrWeakBinding, SwitchPlugin, TapableLogger, TemplatePlugin, ThisNode, TransformFunction, TransformFunctions, TransformRegistry, TransitionFunction, TransitionOptions, UnaryNode, UnaryOperator, Updates, ValidationBindingTrackerViewPlugin, ValidationController, ValidationMiddleware, ValidationObject, ValidationProvider, ValidationResponse, ValidatorContext, ValidatorFunction, ValidatorRegistry, ViewController, ViewControllerOptions, ViewInstance, ViewPlugin, WarningValidationResponse, caresAboutDataChanges, constructModelForPipeline, findClosestNodeAtPosition, findInArray, findNextExp, getBindingSegments, isBinding, isExpressionNode, maybeConvertToNum, parse, parseExpression, resolveDataRefs, resolveDataRefsInString, resolveExpressionsInString, severities, toModel, toNodeResolveOptions, withParser, withoutContext };
package/dist/index.esm.js CHANGED
@@ -896,7 +896,9 @@ function isIdentifierPart(ch) {
896
896
  function isModelRefStart(ch0, ch1) {
897
897
  return ch0 === OCURL_CODE && ch1 === OCURL_CODE;
898
898
  }
899
- function parseExpression(expr) {
899
+ function parseExpression(expr, options) {
900
+ var _a;
901
+ const strictMode = (_a = options == null ? void 0 : options.strict) != null ? _a : true;
900
902
  const charAtFunc = expr.charAt;
901
903
  const charCodeAtFunc = expr.charCodeAt;
902
904
  const { length } = expr;
@@ -1290,6 +1292,9 @@ function parseExpression(expr) {
1290
1292
  }
1291
1293
  args.push(node);
1292
1294
  }
1295
+ if (charIndex !== termination) {
1296
+ throwError(`Expected ${String.fromCharCode(termination)}`, index);
1297
+ }
1293
1298
  return args;
1294
1299
  }
1295
1300
  function gobbleVariable() {
@@ -1360,28 +1365,41 @@ function parseExpression(expr) {
1360
1365
  };
1361
1366
  }
1362
1367
  const nodes = [];
1363
- while (index < length) {
1364
- const chIndex = exprICode(index);
1365
- if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
1366
- index++;
1367
- continue;
1368
+ try {
1369
+ while (index < length) {
1370
+ const chIndex = exprICode(index);
1371
+ if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
1372
+ index++;
1373
+ continue;
1374
+ }
1375
+ const node = gobbleExpression();
1376
+ if (node) {
1377
+ nodes.push(node);
1378
+ } else if (index < length) {
1379
+ throwError(`Unexpected "${exprI(index)}"`, index);
1380
+ }
1368
1381
  }
1369
- const node = gobbleExpression();
1370
- if (node) {
1371
- nodes.push(node);
1372
- } else if (index < length) {
1373
- throwError(`Unexpected "${exprI(index)}"`, index);
1382
+ if (nodes.length === 1) {
1383
+ return nodes[0];
1374
1384
  }
1385
+ return {
1386
+ __id: ExpNodeOpaqueIdentifier,
1387
+ type: "Compound",
1388
+ body: nodes,
1389
+ location: getLocation(0)
1390
+ };
1391
+ } catch (e) {
1392
+ if (strictMode || !(e instanceof Error)) {
1393
+ throw e;
1394
+ }
1395
+ return {
1396
+ __id: ExpNodeOpaqueIdentifier,
1397
+ type: "Compound",
1398
+ body: nodes,
1399
+ location: getLocation(0),
1400
+ error: e
1401
+ };
1375
1402
  }
1376
- if (nodes.length === 1) {
1377
- return nodes[0];
1378
- }
1379
- return {
1380
- __id: ExpNodeOpaqueIdentifier,
1381
- type: "Compound",
1382
- body: nodes,
1383
- location: getLocation(0)
1384
- };
1385
1403
  }
1386
1404
 
1387
1405
  const setDataVal = (_context, binding, value) => {
@@ -2263,7 +2281,13 @@ class Parser {
2263
2281
  if (!localObj) {
2264
2282
  return currentValue;
2265
2283
  }
2266
- const objEntries = Array.isArray(localObj) ? localObj.map((v, i) => [i, v]) : Object.entries(localObj);
2284
+ const objEntries = Array.isArray(localObj) ? localObj.map((v, i) => [i, v]) : [
2285
+ ...Object.entries(localObj),
2286
+ ...Object.getOwnPropertySymbols(localObj).map((s) => [
2287
+ s,
2288
+ localObj[s]
2289
+ ])
2290
+ ];
2267
2291
  const defaultValue = {
2268
2292
  children: [],
2269
2293
  value: currentValue
@@ -4408,8 +4432,8 @@ var __async = (__this, __arguments, generator) => {
4408
4432
  step((generator = generator.apply(__this, __arguments)).next());
4409
4433
  });
4410
4434
  };
4411
- const PLAYER_VERSION = "0.4.0-next.4";
4412
- const COMMIT = "e03645f7ab5fbdfab274edcc92542752712afe01";
4435
+ const PLAYER_VERSION = "0.4.0-next.5";
4436
+ const COMMIT = "a7957331b94ce0a7d50709a0d636a406b033300f";
4413
4437
  const _Player = class {
4414
4438
  constructor(config) {
4415
4439
  this.logger = new TapableLogger();
@@ -4705,5 +4729,5 @@ Player.info = {
4705
4729
  commit: COMMIT
4706
4730
  };
4707
4731
 
4708
- export { ApplicabilityPlugin, AssetTransformCorePlugin, BindingInstance, BindingParser, Builder, ConsoleLogger, ConstantsController, DataController, DependencyMiddleware, DependencyModel, DependencyTracker, EMPTY_NODE, ExpNodeOpaqueIdentifier, ExpressionEvaluator, FlowController, FlowExpPlugin, FlowInstance, LocalModel, LocalStateStore, NOOPDataModel, NOOP_MODEL, NOT_STARTED_STATE, NodeType, NoopLogger, Parser, PipelinedDataModel, Player, ProxyLogger, ROOT_BINDING, Resolver, SIMPLE_BINDING_REGEX, SchemaController, StringResolverPlugin, SwitchPlugin, TapableLogger, TemplatePlugin, ValidationBindingTrackerViewPlugin, ValidationController, ValidationMiddleware, ValidatorRegistry, ViewController, ViewInstance, caresAboutDataChanges, constructModelForPipeline, findClosestNodeAtPosition, findInArray, findNextExp, getBindingSegments, isBinding, isExpressionNode, maybeConvertToNum, parse, resolveDataRefs, resolveDataRefsInString, resolveExpressionsInString, severities, toModel, toNodeResolveOptions, withParser, withoutContext };
4732
+ export { ApplicabilityPlugin, AssetTransformCorePlugin, BindingInstance, BindingParser, Builder, ConsoleLogger, ConstantsController, DataController, DependencyMiddleware, DependencyModel, DependencyTracker, EMPTY_NODE, ExpNodeOpaqueIdentifier, ExpressionEvaluator, FlowController, FlowExpPlugin, FlowInstance, LocalModel, LocalStateStore, NOOPDataModel, NOOP_MODEL, NOT_STARTED_STATE, NodeType, NoopLogger, Parser, PipelinedDataModel, Player, ProxyLogger, ROOT_BINDING, Resolver, SIMPLE_BINDING_REGEX, SchemaController, StringResolverPlugin, SwitchPlugin, TapableLogger, TemplatePlugin, ValidationBindingTrackerViewPlugin, ValidationController, ValidationMiddleware, ValidatorRegistry, ViewController, ViewInstance, caresAboutDataChanges, constructModelForPipeline, findClosestNodeAtPosition, findInArray, findNextExp, getBindingSegments, isBinding, isExpressionNode, maybeConvertToNum, parse, parseExpression, resolveDataRefs, resolveDataRefsInString, resolveExpressionsInString, severities, toModel, toNodeResolveOptions, withParser, withoutContext };
4709
4733
  //# sourceMappingURL=index.esm.js.map
@@ -267,6 +267,7 @@ __webpack_require__.r(__webpack_exports__);
267
267
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isExpressionNode", function() { return isExpressionNode; });
268
268
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "maybeConvertToNum", function() { return maybeConvertToNum; });
269
269
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
270
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseExpression", function() { return parseExpression; });
270
271
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveDataRefs", function() { return resolveDataRefs; });
271
272
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveDataRefsInString", function() { return resolveDataRefsInString; });
272
273
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveExpressionsInString", function() { return resolveExpressionsInString; });
@@ -277,7 +278,7 @@ __webpack_require__.r(__webpack_exports__);
277
278
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withoutContext", function() { return withoutContext; });
278
279
  /* harmony import */ var _player_ui_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @player-ui/types */ "./bazel-out/k8-fastbuild/bin/core/types/dist/index.esm.js");
279
280
  /* harmony import */ var _player_ui_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_player_ui_types__WEBPACK_IMPORTED_MODULE_0__);
280
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _player_ui_types__WEBPACK_IMPORTED_MODULE_0__) if(["default","ApplicabilityPlugin","AssetTransformCorePlugin","BindingInstance","BindingParser","Builder","ConsoleLogger","ConstantsController","DataController","DependencyMiddleware","DependencyModel","DependencyTracker","EMPTY_NODE","ExpNodeOpaqueIdentifier","ExpressionEvaluator","FlowController","FlowExpPlugin","FlowInstance","LocalModel","LocalStateStore","NOOPDataModel","NOOP_MODEL","NOT_STARTED_STATE","NodeType","NoopLogger","Parser","PipelinedDataModel","Player","ProxyLogger","ROOT_BINDING","Resolver","SIMPLE_BINDING_REGEX","SchemaController","StringResolverPlugin","SwitchPlugin","TapableLogger","TemplatePlugin","ValidationBindingTrackerViewPlugin","ValidationController","ValidationMiddleware","ValidatorRegistry","ViewController","ViewInstance","caresAboutDataChanges","constructModelForPipeline","findClosestNodeAtPosition","findInArray","findNextExp","getBindingSegments","isBinding","isExpressionNode","maybeConvertToNum","parse","resolveDataRefs","resolveDataRefsInString","resolveExpressionsInString","severities","toModel","toNodeResolveOptions","withParser","withoutContext"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _player_ui_types__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
281
+ /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _player_ui_types__WEBPACK_IMPORTED_MODULE_0__) if(["default","ApplicabilityPlugin","AssetTransformCorePlugin","BindingInstance","BindingParser","Builder","ConsoleLogger","ConstantsController","DataController","DependencyMiddleware","DependencyModel","DependencyTracker","EMPTY_NODE","ExpNodeOpaqueIdentifier","ExpressionEvaluator","FlowController","FlowExpPlugin","FlowInstance","LocalModel","LocalStateStore","NOOPDataModel","NOOP_MODEL","NOT_STARTED_STATE","NodeType","NoopLogger","Parser","PipelinedDataModel","Player","ProxyLogger","ROOT_BINDING","Resolver","SIMPLE_BINDING_REGEX","SchemaController","StringResolverPlugin","SwitchPlugin","TapableLogger","TemplatePlugin","ValidationBindingTrackerViewPlugin","ValidationController","ValidationMiddleware","ValidatorRegistry","ViewController","ViewInstance","caresAboutDataChanges","constructModelForPipeline","findClosestNodeAtPosition","findInArray","findNextExp","getBindingSegments","isBinding","isExpressionNode","maybeConvertToNum","parse","parseExpression","resolveDataRefs","resolveDataRefsInString","resolveExpressionsInString","severities","toModel","toNodeResolveOptions","withParser","withoutContext"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _player_ui_types__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
281
282
  /* harmony import */ var tapable_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tapable-ts */ "./node_modules/tapable-ts/dist/hooks.mjs");
282
283
  /* harmony import */ var nested_error_stacks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! nested-error-stacks */ "./node_modules/nested-error-stacks/index.js");
283
284
  /* harmony import */ var nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nested_error_stacks__WEBPACK_IMPORTED_MODULE_2__);
@@ -1195,7 +1196,9 @@ function isIdentifierPart(ch) {
1195
1196
  function isModelRefStart(ch0, ch1) {
1196
1197
  return ch0 === OCURL_CODE && ch1 === OCURL_CODE;
1197
1198
  }
1198
- function parseExpression(expr) {
1199
+ function parseExpression(expr, options) {
1200
+ var _a;
1201
+ const strictMode = (_a = options == null ? void 0 : options.strict) != null ? _a : true;
1199
1202
  const charAtFunc = expr.charAt;
1200
1203
  const charCodeAtFunc = expr.charCodeAt;
1201
1204
  const { length } = expr;
@@ -1589,6 +1592,9 @@ function parseExpression(expr) {
1589
1592
  }
1590
1593
  args.push(node);
1591
1594
  }
1595
+ if (charIndex !== termination) {
1596
+ throwError(`Expected ${String.fromCharCode(termination)}`, index);
1597
+ }
1592
1598
  return args;
1593
1599
  }
1594
1600
  function gobbleVariable() {
@@ -1659,28 +1665,41 @@ function parseExpression(expr) {
1659
1665
  };
1660
1666
  }
1661
1667
  const nodes = [];
1662
- while (index < length) {
1663
- const chIndex = exprICode(index);
1664
- if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
1665
- index++;
1666
- continue;
1668
+ try {
1669
+ while (index < length) {
1670
+ const chIndex = exprICode(index);
1671
+ if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
1672
+ index++;
1673
+ continue;
1674
+ }
1675
+ const node = gobbleExpression();
1676
+ if (node) {
1677
+ nodes.push(node);
1678
+ } else if (index < length) {
1679
+ throwError(`Unexpected "${exprI(index)}"`, index);
1680
+ }
1667
1681
  }
1668
- const node = gobbleExpression();
1669
- if (node) {
1670
- nodes.push(node);
1671
- } else if (index < length) {
1672
- throwError(`Unexpected "${exprI(index)}"`, index);
1682
+ if (nodes.length === 1) {
1683
+ return nodes[0];
1673
1684
  }
1685
+ return {
1686
+ __id: ExpNodeOpaqueIdentifier,
1687
+ type: "Compound",
1688
+ body: nodes,
1689
+ location: getLocation(0)
1690
+ };
1691
+ } catch (e) {
1692
+ if (strictMode || !(e instanceof Error)) {
1693
+ throw e;
1694
+ }
1695
+ return {
1696
+ __id: ExpNodeOpaqueIdentifier,
1697
+ type: "Compound",
1698
+ body: nodes,
1699
+ location: getLocation(0),
1700
+ error: e
1701
+ };
1674
1702
  }
1675
- if (nodes.length === 1) {
1676
- return nodes[0];
1677
- }
1678
- return {
1679
- __id: ExpNodeOpaqueIdentifier,
1680
- type: "Compound",
1681
- body: nodes,
1682
- location: getLocation(0)
1683
- };
1684
1703
  }
1685
1704
 
1686
1705
  const setDataVal = (_context, binding, value) => {
@@ -2562,7 +2581,13 @@ class Parser {
2562
2581
  if (!localObj) {
2563
2582
  return currentValue;
2564
2583
  }
2565
- const objEntries = Array.isArray(localObj) ? localObj.map((v, i) => [i, v]) : Object.entries(localObj);
2584
+ const objEntries = Array.isArray(localObj) ? localObj.map((v, i) => [i, v]) : [
2585
+ ...Object.entries(localObj),
2586
+ ...Object.getOwnPropertySymbols(localObj).map((s) => [
2587
+ s,
2588
+ localObj[s]
2589
+ ])
2590
+ ];
2566
2591
  const defaultValue = {
2567
2592
  children: [],
2568
2593
  value: currentValue
@@ -4707,8 +4732,8 @@ var __async = (__this, __arguments, generator) => {
4707
4732
  step((generator = generator.apply(__this, __arguments)).next());
4708
4733
  });
4709
4734
  };
4710
- const PLAYER_VERSION = "0.4.0-next.4";
4711
- const COMMIT = "e03645f7ab5fbdfab274edcc92542752712afe01";
4735
+ const PLAYER_VERSION = "0.4.0-next.5";
4736
+ const COMMIT = "a7957331b94ce0a7d50709a0d636a406b033300f";
4712
4737
  const _Player = class {
4713
4738
  constructor(config) {
4714
4739
  this.logger = new TapableLogger();