@player-ui/markdown-plugin 0.16.0--canary.812.32412 → 0.16.0--canary.866.36538
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.
|
@@ -118,6 +118,7 @@ function _inherits(subClass, superClass) {
|
|
|
118
118
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
119
119
|
}
|
|
120
120
|
function _instanceof(left, right) {
|
|
121
|
+
"@swc/helpers - instanceof";
|
|
121
122
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
122
123
|
return !!right[Symbol.hasInstance](left);
|
|
123
124
|
} else {
|
|
@@ -201,12 +202,22 @@ function _object_spread_props(target, source) {
|
|
|
201
202
|
}
|
|
202
203
|
function _object_without_properties(source, excluded) {
|
|
203
204
|
if (source == null) return {};
|
|
204
|
-
var target =
|
|
205
|
-
|
|
205
|
+
var target = {}, sourceKeys, key, i;
|
|
206
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
207
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
208
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
209
|
+
key = sourceKeys[i];
|
|
210
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
211
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
212
|
+
target[key] = source[key];
|
|
213
|
+
}
|
|
214
|
+
return target;
|
|
215
|
+
}
|
|
216
|
+
target = _object_without_properties_loose(source, excluded);
|
|
206
217
|
if (Object.getOwnPropertySymbols) {
|
|
207
|
-
|
|
208
|
-
for(i = 0; i <
|
|
209
|
-
key =
|
|
218
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
219
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
220
|
+
key = sourceKeys[i];
|
|
210
221
|
if (excluded.indexOf(key) >= 0) continue;
|
|
211
222
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
212
223
|
target[key] = source[key];
|
|
@@ -216,12 +227,11 @@ function _object_without_properties(source, excluded) {
|
|
|
216
227
|
}
|
|
217
228
|
function _object_without_properties_loose(source, excluded) {
|
|
218
229
|
if (source == null) return {};
|
|
219
|
-
var target = {};
|
|
220
|
-
var sourceKeys = Object.keys(source);
|
|
221
|
-
var key, i;
|
|
230
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
222
231
|
for(i = 0; i < sourceKeys.length; i++){
|
|
223
232
|
key = sourceKeys[i];
|
|
224
233
|
if (excluded.indexOf(key) >= 0) continue;
|
|
234
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
225
235
|
target[key] = source[key];
|
|
226
236
|
}
|
|
227
237
|
return target;
|
|
@@ -303,9 +313,17 @@ function _ts_generator(thisArg, body) {
|
|
|
303
313
|
},
|
|
304
314
|
trys: [],
|
|
305
315
|
ops: []
|
|
306
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
307
|
-
return
|
|
308
|
-
|
|
316
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
317
|
+
return d(g, "next", {
|
|
318
|
+
value: verb(0)
|
|
319
|
+
}), d(g, "throw", {
|
|
320
|
+
value: verb(1)
|
|
321
|
+
}), d(g, "return", {
|
|
322
|
+
value: verb(2)
|
|
323
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
324
|
+
value: function() {
|
|
325
|
+
return this;
|
|
326
|
+
}
|
|
309
327
|
}), g;
|
|
310
328
|
function verb(n) {
|
|
311
329
|
return function(v) {
|
|
@@ -432,7 +450,7 @@ var MarkdownPlugin = function() {
|
|
|
432
450
|
};
|
|
433
451
|
var createObjectMatcher = function createObjectMatcher(partialObj) {
|
|
434
452
|
var pairs = traverseObj(partialObj);
|
|
435
|
-
var matchFunction = function(searchObj) {
|
|
453
|
+
var matchFunction = function matchFunction(searchObj) {
|
|
436
454
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
437
455
|
try {
|
|
438
456
|
for(var _iterator = Array.from(pairs)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -462,7 +480,7 @@ var MarkdownPlugin = function() {
|
|
|
462
480
|
return matchFunction;
|
|
463
481
|
};
|
|
464
482
|
var createBasicMatcher = function createBasicMatcher(seed) {
|
|
465
|
-
var matcher = function(match) {
|
|
483
|
+
var matcher = function matcher(match) {
|
|
466
484
|
return seed === match;
|
|
467
485
|
};
|
|
468
486
|
matcher.count = 1;
|
|
@@ -530,21 +548,21 @@ var MarkdownPlugin = function() {
|
|
|
530
548
|
return middleware;
|
|
531
549
|
}
|
|
532
550
|
return {
|
|
533
|
-
get: function(binding, options) {
|
|
551
|
+
get: function get(binding, options) {
|
|
534
552
|
var resolvedOptions = options !== null && options !== void 0 ? options : defaultOptions;
|
|
535
553
|
if (middleware.get) {
|
|
536
554
|
return middleware.get(binding, resolvedOptions, next);
|
|
537
555
|
}
|
|
538
556
|
return next === null || next === void 0 ? void 0 : next.get(binding, resolvedOptions);
|
|
539
557
|
},
|
|
540
|
-
set: function(transaction, options) {
|
|
558
|
+
set: function set(transaction, options) {
|
|
541
559
|
var resolvedOptions = options !== null && options !== void 0 ? options : defaultOptions;
|
|
542
560
|
if (middleware.set) {
|
|
543
561
|
return middleware.set(transaction, resolvedOptions, next);
|
|
544
562
|
}
|
|
545
563
|
return next === null || next === void 0 ? void 0 : next.set(transaction, resolvedOptions);
|
|
546
564
|
},
|
|
547
|
-
delete: function(binding, options) {
|
|
565
|
+
delete: function _delete(binding, options) {
|
|
548
566
|
var resolvedOptions = options !== null && options !== void 0 ? options : defaultOptions;
|
|
549
567
|
if (middleware.delete) {
|
|
550
568
|
return middleware.delete(binding, resolvedOptions, next);
|
|
@@ -568,15 +586,15 @@ var MarkdownPlugin = function() {
|
|
|
568
586
|
return model;
|
|
569
587
|
}
|
|
570
588
|
return {
|
|
571
|
-
get: function(binding, options) {
|
|
589
|
+
get: function get(binding, options) {
|
|
572
590
|
var _createModelWithOptions;
|
|
573
591
|
return (_createModelWithOptions = createModelWithOptions(options)) === null || _createModelWithOptions === void 0 ? void 0 : _createModelWithOptions.get(binding, options);
|
|
574
592
|
},
|
|
575
|
-
set: function(transaction, options) {
|
|
593
|
+
set: function set(transaction, options) {
|
|
576
594
|
var _createModelWithOptions;
|
|
577
595
|
return (_createModelWithOptions = createModelWithOptions(options)) === null || _createModelWithOptions === void 0 ? void 0 : _createModelWithOptions.set(transaction, options);
|
|
578
596
|
},
|
|
579
|
-
delete: function(binding, options) {
|
|
597
|
+
delete: function _delete(binding, options) {
|
|
580
598
|
var _createModelWithOptions;
|
|
581
599
|
return (_createModelWithOptions = createModelWithOptions(options)) === null || _createModelWithOptions === void 0 ? void 0 : _createModelWithOptions.delete(binding, options);
|
|
582
600
|
}
|
|
@@ -650,13 +668,13 @@ var MarkdownPlugin = function() {
|
|
|
650
668
|
return ch0 === OCURL_CODE && ch1 === OCURL_CODE;
|
|
651
669
|
};
|
|
652
670
|
var parseExpression = function parseExpression(expr, options) {
|
|
653
|
-
var
|
|
654
|
-
var strictMode = (
|
|
671
|
+
var _ref;
|
|
672
|
+
var strictMode = (_ref = options === null || options === void 0 ? void 0 : options.strict) !== null && _ref !== void 0 ? _ref : true;
|
|
655
673
|
var charAtFunc = expr.charAt;
|
|
656
674
|
var charCodeAtFunc = expr.charCodeAt;
|
|
657
675
|
var length = expr.length;
|
|
658
676
|
var index2 = 0;
|
|
659
|
-
var getLocation = function(startChar) {
|
|
677
|
+
var getLocation = function getLocation(startChar) {
|
|
660
678
|
return {
|
|
661
679
|
start: {
|
|
662
680
|
character: startChar
|
|
@@ -1423,17 +1441,17 @@ var MarkdownPlugin = function() {
|
|
|
1423
1441
|
return _object_spread_props(_object_spread({}, resolverOptions), {
|
|
1424
1442
|
data: {
|
|
1425
1443
|
model: resolverOptions.model,
|
|
1426
|
-
formatValue: function(ref, value) {
|
|
1444
|
+
formatValue: function formatValue(ref, value) {
|
|
1427
1445
|
if (resolverOptions.formatValue) {
|
|
1428
1446
|
return resolverOptions.formatValue(ref, value);
|
|
1429
1447
|
}
|
|
1430
1448
|
return value;
|
|
1431
1449
|
},
|
|
1432
|
-
format: function(bindingLike, value) {
|
|
1450
|
+
format: function format(bindingLike, value) {
|
|
1433
1451
|
return resolverOptions.format ? resolverOptions.format(isBinding(bindingLike) ? bindingLike : resolverOptions.parseBinding(bindingLike), value) : value;
|
|
1434
1452
|
}
|
|
1435
1453
|
},
|
|
1436
|
-
evaluate: function(exp) {
|
|
1454
|
+
evaluate: function evaluate(exp) {
|
|
1437
1455
|
return resolverOptions.evaluator.evaluate(exp, resolverOptions);
|
|
1438
1456
|
}
|
|
1439
1457
|
});
|
|
@@ -1495,6 +1513,412 @@ var MarkdownPlugin = function() {
|
|
|
1495
1513
|
});
|
|
1496
1514
|
return batchTxn;
|
|
1497
1515
|
};
|
|
1516
|
+
var pointerToBinding = function pointerToBinding(pointer) {
|
|
1517
|
+
if (!pointer || pointer === "/") return "";
|
|
1518
|
+
var absolute = pointer.startsWith("/");
|
|
1519
|
+
var raw = absolute ? pointer.slice(1) : pointer;
|
|
1520
|
+
var segments = raw.split("/").map(decodeSegment);
|
|
1521
|
+
var out = "";
|
|
1522
|
+
for(var i = 0; i < segments.length; i++){
|
|
1523
|
+
var seg = segments[i];
|
|
1524
|
+
if (NUMERIC_SEGMENT.test(seg)) {
|
|
1525
|
+
out += "[".concat(seg, "]");
|
|
1526
|
+
} else {
|
|
1527
|
+
out += i === 0 ? seg : ".".concat(seg);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
return out;
|
|
1531
|
+
};
|
|
1532
|
+
var bindingToSegments = function bindingToSegments(binding) {
|
|
1533
|
+
if (!binding) return [];
|
|
1534
|
+
var segments = [];
|
|
1535
|
+
var parts = binding.split(".");
|
|
1536
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1537
|
+
try {
|
|
1538
|
+
for(var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1539
|
+
var part = _step.value;
|
|
1540
|
+
var match = part.match(/^([^[]+)((?:\[\d+\])*)$/);
|
|
1541
|
+
if (!match) {
|
|
1542
|
+
segments.push(part);
|
|
1543
|
+
continue;
|
|
1544
|
+
}
|
|
1545
|
+
var _match = _sliced_to_array(match, 3), name = _match[1], arrays = _match[2];
|
|
1546
|
+
if (name) segments.push(name);
|
|
1547
|
+
if (arrays) {
|
|
1548
|
+
var _segments;
|
|
1549
|
+
var _arrays_match;
|
|
1550
|
+
var arrayMatches = (_arrays_match = arrays.match(/\[\d+\]/g)) !== null && _arrays_match !== void 0 ? _arrays_match : [];
|
|
1551
|
+
(_segments = segments).push.apply(_segments, _to_consumable_array(arrayMatches));
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
} catch (err) {
|
|
1555
|
+
_didIteratorError = true;
|
|
1556
|
+
_iteratorError = err;
|
|
1557
|
+
} finally{
|
|
1558
|
+
try {
|
|
1559
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1560
|
+
_iterator.return();
|
|
1561
|
+
}
|
|
1562
|
+
} finally{
|
|
1563
|
+
if (_didIteratorError) {
|
|
1564
|
+
throw _iteratorError;
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
return segments;
|
|
1569
|
+
};
|
|
1570
|
+
var interpolatePointers = function interpolatePointers(input) {
|
|
1571
|
+
return input.replace(/\$\{([^}]+)\}/g, function(_, pointer) {
|
|
1572
|
+
return "{{".concat(pointerToBinding(pointer), "}}");
|
|
1573
|
+
});
|
|
1574
|
+
};
|
|
1575
|
+
var translateFunctionCall = function translateFunctionCall(call, logger) {
|
|
1576
|
+
if (call.call === "formatString") {
|
|
1577
|
+
var _call_args;
|
|
1578
|
+
var value = (_call_args = call.args) === null || _call_args === void 0 ? void 0 : _call_args.value;
|
|
1579
|
+
if (typeof value === "string") return interpolatePointers(value);
|
|
1580
|
+
logger === null || logger === void 0 ? void 0 : logger.warn("[a2ui] formatString received non-string 'value' arg; emitting expression form");
|
|
1581
|
+
}
|
|
1582
|
+
var argList = renderArgList(call.args);
|
|
1583
|
+
if (call.call === "formatString") {
|
|
1584
|
+
return "@[formatString(".concat(argList, ")]@");
|
|
1585
|
+
}
|
|
1586
|
+
return "@[".concat(call.call, "(").concat(argList, ")]@");
|
|
1587
|
+
};
|
|
1588
|
+
var renderArgList = function renderArgList(args) {
|
|
1589
|
+
if (!args) return "";
|
|
1590
|
+
return Object.values(args).map(renderArg).join(", ");
|
|
1591
|
+
};
|
|
1592
|
+
var newBuilder = function newBuilder() {
|
|
1593
|
+
return {
|
|
1594
|
+
schema: {
|
|
1595
|
+
ROOT: {}
|
|
1596
|
+
},
|
|
1597
|
+
knownTypes: /* @__PURE__ */ new Set([
|
|
1598
|
+
"ROOT"
|
|
1599
|
+
])
|
|
1600
|
+
};
|
|
1601
|
+
};
|
|
1602
|
+
var findBoundPath = function findBoundPath(component, logger) {
|
|
1603
|
+
var lookupProp = INPUT_BINDING_PROPS[component.component];
|
|
1604
|
+
if (lookupProp) {
|
|
1605
|
+
var prop = component[lookupProp];
|
|
1606
|
+
if (isPathRef(prop)) return prop.path;
|
|
1607
|
+
}
|
|
1608
|
+
var pathRefs = collectPathRefs(component);
|
|
1609
|
+
if (pathRefs.length === 1) return pathRefs[0];
|
|
1610
|
+
if (pathRefs.length > 1) {
|
|
1611
|
+
logger === null || logger === void 0 ? void 0 : logger.warn("[a2ui] Component '".concat(component.id, "' (").concat(component.component, ") has checks but multiple {path} refs; skipping schema synthesis for this component"));
|
|
1612
|
+
} else {
|
|
1613
|
+
logger === null || logger === void 0 ? void 0 : logger.warn("[a2ui] Component '".concat(component.id, "' (").concat(component.component, ") has checks but no bound path could be determined; skipping"));
|
|
1614
|
+
}
|
|
1615
|
+
return void 0;
|
|
1616
|
+
};
|
|
1617
|
+
var collectPathRefs = function collectPathRefs(component) {
|
|
1618
|
+
var found = [];
|
|
1619
|
+
var walk = function walk1(v) {
|
|
1620
|
+
if (!v || (typeof v === "undefined" ? "undefined" : _type_of(v)) !== "object") return;
|
|
1621
|
+
if (Array.isArray(v)) {
|
|
1622
|
+
v.forEach(walk);
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1625
|
+
if (isPathRef(v)) {
|
|
1626
|
+
found.push(v.path);
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
Object.values(v).forEach(walk);
|
|
1630
|
+
};
|
|
1631
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1632
|
+
try {
|
|
1633
|
+
for(var _iterator = Object.entries(component)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1634
|
+
var _step_value = _sliced_to_array(_step.value, 2), k = _step_value[0], v = _step_value[1];
|
|
1635
|
+
if (k === "id" || k === "component" || k === "checks" || k === "action") {
|
|
1636
|
+
continue;
|
|
1637
|
+
}
|
|
1638
|
+
walk(v);
|
|
1639
|
+
}
|
|
1640
|
+
} catch (err) {
|
|
1641
|
+
_didIteratorError = true;
|
|
1642
|
+
_iteratorError = err;
|
|
1643
|
+
} finally{
|
|
1644
|
+
try {
|
|
1645
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1646
|
+
_iterator.return();
|
|
1647
|
+
}
|
|
1648
|
+
} finally{
|
|
1649
|
+
if (_didIteratorError) {
|
|
1650
|
+
throw _iteratorError;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
return found;
|
|
1655
|
+
};
|
|
1656
|
+
var translateCheck = function translateCheck(check, logger) {
|
|
1657
|
+
var _check_args;
|
|
1658
|
+
var type = CHECK_TO_VALIDATOR[check.call];
|
|
1659
|
+
if (!type) {
|
|
1660
|
+
logger === null || logger === void 0 ? void 0 : logger.warn("[a2ui] Unknown validation check '".concat(check.call, "'; dropping"));
|
|
1661
|
+
return void 0;
|
|
1662
|
+
}
|
|
1663
|
+
var ref = {
|
|
1664
|
+
type: type,
|
|
1665
|
+
severity: "error"
|
|
1666
|
+
};
|
|
1667
|
+
if (check.message) ref.message = check.message;
|
|
1668
|
+
if (check.call === "regex" && ((_check_args = check.args) === null || _check_args === void 0 ? void 0 : _check_args.pattern)) {
|
|
1669
|
+
ref.regex = unwrapLiteral(check.args.pattern);
|
|
1670
|
+
}
|
|
1671
|
+
if (check.call === "length") {
|
|
1672
|
+
var _check_args1, _check_args2;
|
|
1673
|
+
if (((_check_args1 = check.args) === null || _check_args1 === void 0 ? void 0 : _check_args1.min) !== void 0) ref.min = unwrapLiteral(check.args.min);
|
|
1674
|
+
if (((_check_args2 = check.args) === null || _check_args2 === void 0 ? void 0 : _check_args2.max) !== void 0) ref.max = unwrapLiteral(check.args.max);
|
|
1675
|
+
}
|
|
1676
|
+
return ref;
|
|
1677
|
+
};
|
|
1678
|
+
var unwrapLiteral = function unwrapLiteral(value) {
|
|
1679
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null) {
|
|
1680
|
+
return value;
|
|
1681
|
+
}
|
|
1682
|
+
return value;
|
|
1683
|
+
};
|
|
1684
|
+
var installAtPath = function installAtPath(builder, binding, leafType, validations, logger) {
|
|
1685
|
+
var segments = bindingToSegments(binding).filter(function(s) {
|
|
1686
|
+
return !s.startsWith("[");
|
|
1687
|
+
});
|
|
1688
|
+
if (segments.length === 0) {
|
|
1689
|
+
logger === null || logger === void 0 ? void 0 : logger.warn("[a2ui] Cannot install schema validation at empty path; skipping");
|
|
1690
|
+
return;
|
|
1691
|
+
}
|
|
1692
|
+
var currentNode = builder.schema.ROOT;
|
|
1693
|
+
var ownerPath = [];
|
|
1694
|
+
for(var i = 0; i < segments.length - 1; i++){
|
|
1695
|
+
var seg = segments[i];
|
|
1696
|
+
ownerPath.push(seg);
|
|
1697
|
+
var typeName = "".concat(TYPE_PREFIX).concat(ownerPath.join("_"));
|
|
1698
|
+
var existing = currentNode[seg];
|
|
1699
|
+
if (!existing) {
|
|
1700
|
+
currentNode[seg] = {
|
|
1701
|
+
type: typeName
|
|
1702
|
+
};
|
|
1703
|
+
} else if (existing.type !== typeName) {}
|
|
1704
|
+
var ref = currentNode[seg].type;
|
|
1705
|
+
if (!builder.schema[ref]) {
|
|
1706
|
+
builder.schema[ref] = {};
|
|
1707
|
+
builder.knownTypes.add(ref);
|
|
1708
|
+
}
|
|
1709
|
+
currentNode = builder.schema[ref];
|
|
1710
|
+
}
|
|
1711
|
+
var leafSeg = segments[segments.length - 1];
|
|
1712
|
+
var existingLeaf = currentNode[leafSeg];
|
|
1713
|
+
if (existingLeaf) {
|
|
1714
|
+
var _existingLeaf_validation;
|
|
1715
|
+
var merged = _object_spread_props(_object_spread({}, existingLeaf), {
|
|
1716
|
+
type: pickLeafType(existingLeaf.type, leafType),
|
|
1717
|
+
validation: _to_consumable_array((_existingLeaf_validation = existingLeaf.validation) !== null && _existingLeaf_validation !== void 0 ? _existingLeaf_validation : []).concat(_to_consumable_array(validations))
|
|
1718
|
+
});
|
|
1719
|
+
currentNode[leafSeg] = merged;
|
|
1720
|
+
} else {
|
|
1721
|
+
currentNode[leafSeg] = {
|
|
1722
|
+
type: leafType,
|
|
1723
|
+
validation: validations
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
};
|
|
1727
|
+
var pickLeafType = function pickLeafType(existing, incoming) {
|
|
1728
|
+
if (incoming !== "string") return incoming;
|
|
1729
|
+
return existing;
|
|
1730
|
+
};
|
|
1731
|
+
var defaultLeafType = function defaultLeafType(component, checks) {
|
|
1732
|
+
if (component.component === "CheckBox") return "boolean";
|
|
1733
|
+
if (checks.some(function(c) {
|
|
1734
|
+
return c.call === "numeric";
|
|
1735
|
+
})) return "number";
|
|
1736
|
+
return "string";
|
|
1737
|
+
};
|
|
1738
|
+
var synthesizeSchema = function synthesizeSchema(components, logger) {
|
|
1739
|
+
var builder = newBuilder();
|
|
1740
|
+
var found = false;
|
|
1741
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1742
|
+
try {
|
|
1743
|
+
for(var _iterator = components[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1744
|
+
var component = _step.value;
|
|
1745
|
+
if (!component.checks || component.checks.length === 0) continue;
|
|
1746
|
+
var pointer = findBoundPath(component, logger);
|
|
1747
|
+
if (!pointer) continue;
|
|
1748
|
+
var binding = pointerToBinding(pointer);
|
|
1749
|
+
if (!binding) continue;
|
|
1750
|
+
var validations = component.checks.map(function(c) {
|
|
1751
|
+
return translateCheck(c, logger);
|
|
1752
|
+
}).filter(function(v) {
|
|
1753
|
+
return v !== void 0;
|
|
1754
|
+
});
|
|
1755
|
+
if (validations.length === 0) continue;
|
|
1756
|
+
installAtPath(builder, binding, defaultLeafType(component, component.checks), validations, logger);
|
|
1757
|
+
found = true;
|
|
1758
|
+
}
|
|
1759
|
+
} catch (err) {
|
|
1760
|
+
_didIteratorError = true;
|
|
1761
|
+
_iteratorError = err;
|
|
1762
|
+
} finally{
|
|
1763
|
+
try {
|
|
1764
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1765
|
+
_iterator.return();
|
|
1766
|
+
}
|
|
1767
|
+
} finally{
|
|
1768
|
+
if (_didIteratorError) {
|
|
1769
|
+
throw _iteratorError;
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
return found ? builder.schema : void 0;
|
|
1774
|
+
};
|
|
1775
|
+
var resolveAndInline = function resolveAndInline(id, ctx, templateScope) {
|
|
1776
|
+
var component = ctx.byId.get(id);
|
|
1777
|
+
if (!component) {
|
|
1778
|
+
throw new Error("[a2ui] Component reference '".concat(id, "' could not be resolved in the snapshot."));
|
|
1779
|
+
}
|
|
1780
|
+
return inlineComponent(component, ctx, templateScope);
|
|
1781
|
+
};
|
|
1782
|
+
var wrapInlined = function wrapInlined(asset) {
|
|
1783
|
+
return {
|
|
1784
|
+
asset: asset
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1787
|
+
var scopedBinding = function scopedBinding(pointer, scope) {
|
|
1788
|
+
if (!pointer || pointer === "/") return scope !== null && scope !== void 0 ? scope : "";
|
|
1789
|
+
if (pointer.startsWith("/")) return pointerToBinding(pointer);
|
|
1790
|
+
if (!scope) return pointerToBinding(pointer);
|
|
1791
|
+
var relative = pointerToBinding(pointer);
|
|
1792
|
+
return relative ? "".concat(scope, "._index_.").concat(relative) : "".concat(scope, "._index_");
|
|
1793
|
+
};
|
|
1794
|
+
var scopedPointer = function scopedPointer(pointer, scope) {
|
|
1795
|
+
if (pointer.startsWith("/")) return pointer;
|
|
1796
|
+
return "/".concat(scope, "/_index_/").concat(pointer);
|
|
1797
|
+
};
|
|
1798
|
+
var translateAction = function translateAction(action, ctx) {
|
|
1799
|
+
if ("event" in action) {
|
|
1800
|
+
var _action_event = action.event, name = _action_event.name, context = _action_event.context;
|
|
1801
|
+
ctx.eventNames.add(name);
|
|
1802
|
+
var result = {
|
|
1803
|
+
value: name
|
|
1804
|
+
};
|
|
1805
|
+
if (context && Object.keys(context).length > 0) {
|
|
1806
|
+
result.exp = buildContextWriteExpressions(context);
|
|
1807
|
+
}
|
|
1808
|
+
return result;
|
|
1809
|
+
}
|
|
1810
|
+
return {
|
|
1811
|
+
exp: translateFunctionCall(action.functionCall, ctx.logger)
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
var buildContextWriteExpressions = function buildContextWriteExpressions(context) {
|
|
1815
|
+
return Object.entries(context).map(function(param) {
|
|
1816
|
+
var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
|
|
1817
|
+
var lhs = "{{".concat(A2UI_EVENT_CONTEXT_NAMESPACE, ".").concat(key, "}}");
|
|
1818
|
+
return "".concat(lhs, " = ").concat(renderRhs(value));
|
|
1819
|
+
});
|
|
1820
|
+
};
|
|
1821
|
+
var buildNavigation = function buildNavigation(surfaceId, eventNames) {
|
|
1822
|
+
var view = {
|
|
1823
|
+
state_type: "VIEW",
|
|
1824
|
+
ref: surfaceId,
|
|
1825
|
+
transitions: {
|
|
1826
|
+
"*": "END_Done"
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
var endStates = {
|
|
1830
|
+
END_Done: {
|
|
1831
|
+
state_type: "END",
|
|
1832
|
+
outcome: "done"
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1836
|
+
try {
|
|
1837
|
+
for(var _iterator = eventNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1838
|
+
var name = _step.value;
|
|
1839
|
+
var endName = "END_".concat(name);
|
|
1840
|
+
view.transitions[name] = endName;
|
|
1841
|
+
endStates[endName] = {
|
|
1842
|
+
state_type: "END",
|
|
1843
|
+
outcome: name
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
} catch (err) {
|
|
1847
|
+
_didIteratorError = true;
|
|
1848
|
+
_iteratorError = err;
|
|
1849
|
+
} finally{
|
|
1850
|
+
try {
|
|
1851
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1852
|
+
_iterator.return();
|
|
1853
|
+
}
|
|
1854
|
+
} finally{
|
|
1855
|
+
if (_didIteratorError) {
|
|
1856
|
+
throw _iteratorError;
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
var flow3 = _object_spread({
|
|
1861
|
+
startState: "VIEW_1",
|
|
1862
|
+
VIEW_1: view
|
|
1863
|
+
}, endStates);
|
|
1864
|
+
return {
|
|
1865
|
+
BEGIN: "FLOW_1",
|
|
1866
|
+
FLOW_1: flow3
|
|
1867
|
+
};
|
|
1868
|
+
};
|
|
1869
|
+
var adaptA2UIToFlow = function adaptA2UIToFlow(snapshot, logger) {
|
|
1870
|
+
var _snapshot_data;
|
|
1871
|
+
if (!snapshot || !Array.isArray(snapshot.components)) {
|
|
1872
|
+
throw new Error("[a2ui] snapshot.components must be an array");
|
|
1873
|
+
}
|
|
1874
|
+
var byId = /* @__PURE__ */ new Map();
|
|
1875
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1876
|
+
try {
|
|
1877
|
+
for(var _iterator = snapshot.components[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1878
|
+
var component = _step.value;
|
|
1879
|
+
if (!(component === null || component === void 0 ? void 0 : component.id)) {
|
|
1880
|
+
throw new Error("[a2ui] every component must have an id");
|
|
1881
|
+
}
|
|
1882
|
+
byId.set(component.id, component);
|
|
1883
|
+
}
|
|
1884
|
+
} catch (err) {
|
|
1885
|
+
_didIteratorError = true;
|
|
1886
|
+
_iteratorError = err;
|
|
1887
|
+
} finally{
|
|
1888
|
+
try {
|
|
1889
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1890
|
+
_iterator.return();
|
|
1891
|
+
}
|
|
1892
|
+
} finally{
|
|
1893
|
+
if (_didIteratorError) {
|
|
1894
|
+
throw _iteratorError;
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
var root = byId.get("root");
|
|
1899
|
+
if (!root) {
|
|
1900
|
+
throw new Error("[a2ui] snapshot must contain a component with id 'root'");
|
|
1901
|
+
}
|
|
1902
|
+
var ctx = {
|
|
1903
|
+
byId: byId,
|
|
1904
|
+
inProgress: /* @__PURE__ */ new Set(),
|
|
1905
|
+
eventNames: /* @__PURE__ */ new Set(),
|
|
1906
|
+
logger: logger
|
|
1907
|
+
};
|
|
1908
|
+
var rootAsset = inlineComponent(root, ctx);
|
|
1909
|
+
rootAsset.id = snapshot.surfaceId;
|
|
1910
|
+
var schema = synthesizeSchema(snapshot.components, logger);
|
|
1911
|
+
var flow3 = {
|
|
1912
|
+
id: snapshot.surfaceId,
|
|
1913
|
+
views: [
|
|
1914
|
+
rootAsset
|
|
1915
|
+
],
|
|
1916
|
+
data: (_snapshot_data = snapshot.data) !== null && _snapshot_data !== void 0 ? _snapshot_data : {},
|
|
1917
|
+
navigation: buildNavigation(snapshot.surfaceId, ctx.eventNames)
|
|
1918
|
+
};
|
|
1919
|
+
if (schema) flow3.schema = schema;
|
|
1920
|
+
return flow3;
|
|
1921
|
+
};
|
|
1498
1922
|
var toString = function toString(value, options) {
|
|
1499
1923
|
var settings = options || emptyOptions;
|
|
1500
1924
|
var includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
|
|
@@ -5854,27 +6278,27 @@ var MarkdownPlugin = function() {
|
|
|
5854
6278
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5855
6279
|
var __getProtoOf = Object.getPrototypeOf;
|
|
5856
6280
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5857
|
-
var __commonJS = function(cb, mod) {
|
|
6281
|
+
var __commonJS = function __commonJS(cb, mod) {
|
|
5858
6282
|
return function __require() {
|
|
5859
6283
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
5860
6284
|
exports: {}
|
|
5861
6285
|
}).exports, mod), mod.exports;
|
|
5862
6286
|
};
|
|
5863
6287
|
};
|
|
5864
|
-
var __export = function(target, all2) {
|
|
6288
|
+
var __export = function __export(target, all2) {
|
|
5865
6289
|
for(var name in all2)__defProp(target, name, {
|
|
5866
6290
|
get: all2[name],
|
|
5867
6291
|
enumerable: true
|
|
5868
6292
|
});
|
|
5869
6293
|
};
|
|
5870
|
-
var __copyProps = function(to, from, except, desc) {
|
|
6294
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
5871
6295
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
5872
6296
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5873
6297
|
try {
|
|
5874
6298
|
var _loop = function() {
|
|
5875
6299
|
var key = _step.value;
|
|
5876
6300
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
5877
|
-
get: function() {
|
|
6301
|
+
get: function get() {
|
|
5878
6302
|
return from[key];
|
|
5879
6303
|
},
|
|
5880
6304
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -5898,7 +6322,7 @@ var MarkdownPlugin = function() {
|
|
|
5898
6322
|
}
|
|
5899
6323
|
return to;
|
|
5900
6324
|
};
|
|
5901
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
6325
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
5902
6326
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
5903
6327
|
// file that has been converted to a CommonJS file using a Babel-
|
|
5904
6328
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -5908,7 +6332,7 @@ var MarkdownPlugin = function() {
|
|
|
5908
6332
|
enumerable: true
|
|
5909
6333
|
}) : target, mod);
|
|
5910
6334
|
};
|
|
5911
|
-
var __toCommonJS = function(mod) {
|
|
6335
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
5912
6336
|
return __copyProps(__defProp({}, "__esModule", {
|
|
5913
6337
|
value: true
|
|
5914
6338
|
}), mod);
|
|
@@ -6010,7 +6434,7 @@ var MarkdownPlugin = function() {
|
|
|
6010
6434
|
function toError(err) {
|
|
6011
6435
|
try {
|
|
6012
6436
|
return _instanceof(err, Error) ? err : new Error("Value that is not an instance of Error was thrown: ".concat(err));
|
|
6013
|
-
} catch (
|
|
6437
|
+
} catch (unused) {
|
|
6014
6438
|
return new Error("Failed to stringify non-instance of Error that was thrown.This is possibly due to the fact that toString() method of the valuedoesn't return a primitive value.");
|
|
6015
6439
|
}
|
|
6016
6440
|
}
|
|
@@ -6067,7 +6491,7 @@ var MarkdownPlugin = function() {
|
|
|
6067
6491
|
}
|
|
6068
6492
|
return out;
|
|
6069
6493
|
}
|
|
6070
|
-
function
|
|
6494
|
+
function isObject2(o) {
|
|
6071
6495
|
return o != null && (typeof o === "undefined" ? "undefined" : _type_of(o)) === "object";
|
|
6072
6496
|
}
|
|
6073
6497
|
function addLast2(array, val) {
|
|
@@ -6140,7 +6564,7 @@ var MarkdownPlugin = function() {
|
|
|
6140
6564
|
if (idx === path.length - 1) {
|
|
6141
6565
|
newValue = val;
|
|
6142
6566
|
} else {
|
|
6143
|
-
var nestedObj =
|
|
6567
|
+
var nestedObj = isObject2(obj) && isObject2(obj[key]) ? obj[key] : typeof path[idx + 1] === "number" ? [] : {};
|
|
6144
6568
|
newValue = doSetIn(nestedObj, path, val, idx + 1);
|
|
6145
6569
|
}
|
|
6146
6570
|
return set2(obj, key, newValue);
|
|
@@ -6270,7 +6694,7 @@ var MarkdownPlugin = function() {
|
|
|
6270
6694
|
var key = keys[j];
|
|
6271
6695
|
if (fAddDefaults && out[key] !== void 0) continue;
|
|
6272
6696
|
var nextVal = obj[key];
|
|
6273
|
-
if (fDeep &&
|
|
6697
|
+
if (fDeep && isObject2(out[key]) && isObject2(nextVal)) {
|
|
6274
6698
|
nextVal = doMerge(fAddDefaults, fDeep, out[key], nextVal);
|
|
6275
6699
|
}
|
|
6276
6700
|
if (nextVal === void 0 || nextVal === out[key]) continue;
|
|
@@ -6311,7 +6735,7 @@ var MarkdownPlugin = function() {
|
|
|
6311
6735
|
var require_p_defer = __commonJS({
|
|
6312
6736
|
"../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/p-defer@3.0.0/node_modules/p-defer/index.js": function(exports, module) {
|
|
6313
6737
|
"use strict";
|
|
6314
|
-
var pDefer = function() {
|
|
6738
|
+
var pDefer = function pDefer() {
|
|
6315
6739
|
var deferred2 = {};
|
|
6316
6740
|
deferred2.promise = new Promise(function(resolve, reject) {
|
|
6317
6741
|
deferred2.resolve = resolve;
|
|
@@ -6420,7 +6844,7 @@ var MarkdownPlugin = function() {
|
|
|
6420
6844
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/markdown/core/src/index.ts
|
|
6421
6845
|
var src_exports = {};
|
|
6422
6846
|
__export(src_exports, {
|
|
6423
|
-
MarkdownPlugin: function() {
|
|
6847
|
+
MarkdownPlugin: function MarkdownPlugin1() {
|
|
6424
6848
|
return MarkdownPlugin;
|
|
6425
6849
|
}
|
|
6426
6850
|
});
|
|
@@ -6866,7 +7290,7 @@ var MarkdownPlugin = function() {
|
|
|
6866
7290
|
}
|
|
6867
7291
|
return pairs;
|
|
6868
7292
|
}
|
|
6869
|
-
var createSortedArray = function() {
|
|
7293
|
+
var createSortedArray = function createSortedArray() {
|
|
6870
7294
|
return new import_sorted_array.default([], function(c) {
|
|
6871
7295
|
return c.matcher.count;
|
|
6872
7296
|
});
|
|
@@ -6962,38 +7386,38 @@ var MarkdownPlugin = function() {
|
|
|
6962
7386
|
}();
|
|
6963
7387
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+player@0.0.0/node_modules/@player-ui/player/dist/index.mjs
|
|
6964
7388
|
var __defProp2 = Object.defineProperty;
|
|
6965
|
-
var __export2 = function(target, all2) {
|
|
7389
|
+
var __export2 = function __export2(target, all2) {
|
|
6966
7390
|
for(var name in all2)__defProp2(target, name, {
|
|
6967
7391
|
get: all2[name],
|
|
6968
7392
|
enumerable: true
|
|
6969
7393
|
});
|
|
6970
7394
|
};
|
|
6971
|
-
var toValue = function(value) {
|
|
7395
|
+
var toValue = function toValue(value) {
|
|
6972
7396
|
return {
|
|
6973
7397
|
name: "Value",
|
|
6974
7398
|
value: value
|
|
6975
7399
|
};
|
|
6976
7400
|
};
|
|
6977
|
-
var toExpression = function(value) {
|
|
7401
|
+
var toExpression = function toExpression(value) {
|
|
6978
7402
|
return {
|
|
6979
7403
|
name: "Expression",
|
|
6980
7404
|
value: value
|
|
6981
7405
|
};
|
|
6982
7406
|
};
|
|
6983
|
-
var toPath = function(path) {
|
|
7407
|
+
var toPath = function toPath(path) {
|
|
6984
7408
|
return {
|
|
6985
7409
|
name: "PathNode",
|
|
6986
7410
|
path: path
|
|
6987
7411
|
};
|
|
6988
7412
|
};
|
|
6989
|
-
var toQuery = function(key, value) {
|
|
7413
|
+
var toQuery = function toQuery(key, value) {
|
|
6990
7414
|
return {
|
|
6991
7415
|
name: "Query",
|
|
6992
7416
|
key: key,
|
|
6993
7417
|
value: value
|
|
6994
7418
|
};
|
|
6995
7419
|
};
|
|
6996
|
-
var toConcatenatedNode = function(values) {
|
|
7420
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
6997
7421
|
if (values.length === 1) {
|
|
6998
7422
|
return values[0];
|
|
6999
7423
|
}
|
|
@@ -7011,7 +7435,7 @@ var MarkdownPlugin = function() {
|
|
|
7011
7435
|
var SINGLE_QUOTE = "'";
|
|
7012
7436
|
var DOUBLE_QUOTE = '"';
|
|
7013
7437
|
var BACK_TICK = "`";
|
|
7014
|
-
var isIdentifierChar = function(char) {
|
|
7438
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
7015
7439
|
if (!char) {
|
|
7016
7440
|
return false;
|
|
7017
7441
|
}
|
|
@@ -7031,10 +7455,10 @@ var MarkdownPlugin = function() {
|
|
|
7031
7455
|
charCode === 125;
|
|
7032
7456
|
return !matches;
|
|
7033
7457
|
};
|
|
7034
|
-
var parse = function(path) {
|
|
7458
|
+
var parse = function parse(path) {
|
|
7035
7459
|
var index2 = 1;
|
|
7036
7460
|
var ch = path.charAt(0);
|
|
7037
|
-
var next = function(expected) {
|
|
7461
|
+
var next = function next(expected) {
|
|
7038
7462
|
if (expected && ch !== expected) {
|
|
7039
7463
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
7040
7464
|
}
|
|
@@ -7042,12 +7466,12 @@ var MarkdownPlugin = function() {
|
|
|
7042
7466
|
index2 += 1;
|
|
7043
7467
|
return ch;
|
|
7044
7468
|
};
|
|
7045
|
-
var whitespace = function() {
|
|
7469
|
+
var whitespace = function whitespace() {
|
|
7046
7470
|
while(ch === " "){
|
|
7047
7471
|
next();
|
|
7048
7472
|
}
|
|
7049
7473
|
};
|
|
7050
|
-
var identifier = function() {
|
|
7474
|
+
var identifier = function identifier() {
|
|
7051
7475
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7052
7476
|
if (!isIdentifierChar(ch)) {
|
|
7053
7477
|
return;
|
|
@@ -7073,7 +7497,7 @@ var MarkdownPlugin = function() {
|
|
|
7073
7497
|
return toValue(value);
|
|
7074
7498
|
}
|
|
7075
7499
|
};
|
|
7076
|
-
var expression = function() {
|
|
7500
|
+
var expression = function expression() {
|
|
7077
7501
|
if (ch === BACK_TICK) {
|
|
7078
7502
|
next(BACK_TICK);
|
|
7079
7503
|
var exp = ch;
|
|
@@ -7089,7 +7513,7 @@ var MarkdownPlugin = function() {
|
|
|
7089
7513
|
}
|
|
7090
7514
|
}
|
|
7091
7515
|
};
|
|
7092
|
-
var regex = function(match) {
|
|
7516
|
+
var regex = function regex(match) {
|
|
7093
7517
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
7094
7518
|
return;
|
|
7095
7519
|
}
|
|
@@ -7104,7 +7528,7 @@ var MarkdownPlugin = function() {
|
|
|
7104
7528
|
return toValue(value);
|
|
7105
7529
|
}
|
|
7106
7530
|
};
|
|
7107
|
-
var nestedPath = function() {
|
|
7531
|
+
var nestedPath = function nestedPath() {
|
|
7108
7532
|
if (ch === OPEN_CURL) {
|
|
7109
7533
|
next(OPEN_CURL);
|
|
7110
7534
|
next(OPEN_CURL);
|
|
@@ -7114,12 +7538,12 @@ var MarkdownPlugin = function() {
|
|
|
7114
7538
|
return modelRef;
|
|
7115
7539
|
}
|
|
7116
7540
|
};
|
|
7117
|
-
var simpleSegment = function() {
|
|
7541
|
+
var simpleSegment = function simpleSegment() {
|
|
7118
7542
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7119
|
-
var
|
|
7543
|
+
var _ref, _nestedPath;
|
|
7120
7544
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
7121
7545
|
};
|
|
7122
|
-
var segment = function() {
|
|
7546
|
+
var segment = function segment() {
|
|
7123
7547
|
var segments = [];
|
|
7124
7548
|
var nextSegment = simpleSegment();
|
|
7125
7549
|
while(nextSegment !== void 0){
|
|
@@ -7131,7 +7555,7 @@ var MarkdownPlugin = function() {
|
|
|
7131
7555
|
}
|
|
7132
7556
|
return toConcatenatedNode(segments);
|
|
7133
7557
|
};
|
|
7134
|
-
var optionallyQuotedSegment = function() {
|
|
7558
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
7135
7559
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7136
7560
|
whitespace();
|
|
7137
7561
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -7143,7 +7567,7 @@ var MarkdownPlugin = function() {
|
|
|
7143
7567
|
}
|
|
7144
7568
|
return simpleSegment(allowBoolValue);
|
|
7145
7569
|
};
|
|
7146
|
-
var equals = function() {
|
|
7570
|
+
var equals = function equals() {
|
|
7147
7571
|
if (ch !== EQUALS) {
|
|
7148
7572
|
return false;
|
|
7149
7573
|
}
|
|
@@ -7152,7 +7576,7 @@ var MarkdownPlugin = function() {
|
|
|
7152
7576
|
}
|
|
7153
7577
|
return true;
|
|
7154
7578
|
};
|
|
7155
|
-
var parseBracket = function() {
|
|
7579
|
+
var parseBracket = function parseBracket() {
|
|
7156
7580
|
if (ch === OPEN_BRACKET) {
|
|
7157
7581
|
next(OPEN_BRACKET);
|
|
7158
7582
|
whitespace();
|
|
@@ -7174,7 +7598,7 @@ var MarkdownPlugin = function() {
|
|
|
7174
7598
|
return value;
|
|
7175
7599
|
}
|
|
7176
7600
|
};
|
|
7177
|
-
var parseSegmentAndBrackets = function() {
|
|
7601
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
7178
7602
|
var parsed = [];
|
|
7179
7603
|
var firstSegment = segment();
|
|
7180
7604
|
if (firstSegment) {
|
|
@@ -7191,7 +7615,7 @@ var MarkdownPlugin = function() {
|
|
|
7191
7615
|
}
|
|
7192
7616
|
return parsed;
|
|
7193
7617
|
};
|
|
7194
|
-
var parsePath = function() {
|
|
7618
|
+
var parsePath = function parsePath() {
|
|
7195
7619
|
var parts = [];
|
|
7196
7620
|
var nextSegment = parseSegmentAndBrackets();
|
|
7197
7621
|
while(nextSegment !== void 0){
|
|
@@ -7302,6 +7726,7 @@ var MarkdownPlugin = function() {
|
|
|
7302
7726
|
return _BindingInstance;
|
|
7303
7727
|
}();
|
|
7304
7728
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
7729
|
+
var _context_updates;
|
|
7305
7730
|
var context = {
|
|
7306
7731
|
updates: {},
|
|
7307
7732
|
path: []
|
|
@@ -7341,8 +7766,8 @@ var MarkdownPlugin = function() {
|
|
|
7341
7766
|
}
|
|
7342
7767
|
}
|
|
7343
7768
|
function resolveNode(_node) {
|
|
7344
|
-
var
|
|
7345
|
-
var resolvedNode = (
|
|
7769
|
+
var _ref;
|
|
7770
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
7346
7771
|
switch(resolvedNode.name){
|
|
7347
7772
|
case "Expression":
|
|
7348
7773
|
case "PathNode":
|
|
@@ -7378,7 +7803,6 @@ var MarkdownPlugin = function() {
|
|
|
7378
7803
|
}
|
|
7379
7804
|
}
|
|
7380
7805
|
bindingPathNode.path.forEach(resolveNode);
|
|
7381
|
-
var _context_updates;
|
|
7382
7806
|
return {
|
|
7383
7807
|
path: context.path,
|
|
7384
7808
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -7387,13 +7811,13 @@ var MarkdownPlugin = function() {
|
|
|
7387
7811
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
7388
7812
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
7389
7813
|
var DEFAULT_OPTIONS = {
|
|
7390
|
-
get: function() {
|
|
7814
|
+
get: function get() {
|
|
7391
7815
|
throw new Error("Not Implemented");
|
|
7392
7816
|
},
|
|
7393
|
-
set: function() {
|
|
7817
|
+
set: function set() {
|
|
7394
7818
|
throw new Error("Not Implemented");
|
|
7395
7819
|
},
|
|
7396
|
-
evaluate: function() {
|
|
7820
|
+
evaluate: function evaluate() {
|
|
7397
7821
|
throw new Error("Not Implemented");
|
|
7398
7822
|
}
|
|
7399
7823
|
};
|
|
@@ -7416,18 +7840,18 @@ var MarkdownPlugin = function() {
|
|
|
7416
7840
|
* representation of that path.
|
|
7417
7841
|
*/ key: "normalizePath",
|
|
7418
7842
|
value: function normalizePath(path, resolveOptions) {
|
|
7843
|
+
var _this_parseCache_path;
|
|
7419
7844
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
7420
7845
|
return {
|
|
7421
7846
|
path: path.split("."),
|
|
7422
7847
|
updates: void 0
|
|
7423
7848
|
};
|
|
7424
7849
|
}
|
|
7425
|
-
var _this_parseCache_path;
|
|
7426
7850
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
7427
7851
|
this.parseCache[path] = ast;
|
|
7428
7852
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
7429
|
-
var
|
|
7430
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
7853
|
+
var _ref;
|
|
7854
|
+
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((_ref = ast === null || ast === void 0 ? void 0 : ast.error) !== null && _ref !== void 0 ? _ref : "Unknown Error."));
|
|
7431
7855
|
}
|
|
7432
7856
|
try {
|
|
7433
7857
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -7460,14 +7884,14 @@ var MarkdownPlugin = function() {
|
|
|
7460
7884
|
var updates = {};
|
|
7461
7885
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
7462
7886
|
var normalizeConfig = {
|
|
7463
|
-
getValue: function(path) {
|
|
7887
|
+
getValue: function getValue(path) {
|
|
7464
7888
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
7465
7889
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
7466
7890
|
},
|
|
7467
|
-
evaluate: function(exp) {
|
|
7891
|
+
evaluate: function evaluate(exp) {
|
|
7468
7892
|
return options.evaluate(exp);
|
|
7469
7893
|
},
|
|
7470
|
-
convertToPath: function(path) {
|
|
7894
|
+
convertToPath: function convertToPath(path) {
|
|
7471
7895
|
if (path === void 0) {
|
|
7472
7896
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
7473
7897
|
}
|
|
@@ -7532,9 +7956,9 @@ var MarkdownPlugin = function() {
|
|
|
7532
7956
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
7533
7957
|
value: function getDependencies(name) {
|
|
7534
7958
|
if (name !== void 0) {
|
|
7959
|
+
var _ref;
|
|
7535
7960
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
7536
|
-
|
|
7537
|
-
return (_this_namedDependencySets_name_readDeps = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.readDeps) !== null && _this_namedDependencySets_name_readDeps !== void 0 ? _this_namedDependencySets_name_readDeps : /* @__PURE__ */ new Set();
|
|
7961
|
+
return (_ref = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.readDeps) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
7538
7962
|
}
|
|
7539
7963
|
return this.readDeps;
|
|
7540
7964
|
}
|
|
@@ -7556,9 +7980,9 @@ var MarkdownPlugin = function() {
|
|
|
7556
7980
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
7557
7981
|
value: function getModified(name) {
|
|
7558
7982
|
if (name !== void 0) {
|
|
7983
|
+
var _ref;
|
|
7559
7984
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
7560
|
-
|
|
7561
|
-
return (_this_namedDependencySets_name_writeDeps = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.writeDeps) !== null && _this_namedDependencySets_name_writeDeps !== void 0 ? _this_namedDependencySets_name_writeDeps : /* @__PURE__ */ new Set();
|
|
7985
|
+
return (_ref = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.writeDeps) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
7562
7986
|
}
|
|
7563
7987
|
return this.writeDeps;
|
|
7564
7988
|
}
|
|
@@ -7880,19 +8304,19 @@ var MarkdownPlugin = function() {
|
|
|
7880
8304
|
var thisStr = "this";
|
|
7881
8305
|
var evaluator_functions_exports = {};
|
|
7882
8306
|
__export2(evaluator_functions_exports, {
|
|
7883
|
-
conditional: function() {
|
|
8307
|
+
conditional: function conditional1() {
|
|
7884
8308
|
return conditional;
|
|
7885
8309
|
},
|
|
7886
|
-
deleteDataVal: function() {
|
|
8310
|
+
deleteDataVal: function deleteDataVal1() {
|
|
7887
8311
|
return deleteDataVal;
|
|
7888
8312
|
},
|
|
7889
|
-
getDataVal: function() {
|
|
8313
|
+
getDataVal: function getDataVal1() {
|
|
7890
8314
|
return getDataVal;
|
|
7891
8315
|
},
|
|
7892
|
-
setDataVal: function() {
|
|
8316
|
+
setDataVal: function setDataVal1() {
|
|
7893
8317
|
return setDataVal;
|
|
7894
8318
|
},
|
|
7895
|
-
waitFor: function() {
|
|
8319
|
+
waitFor: function waitFor1() {
|
|
7896
8320
|
return waitFor;
|
|
7897
8321
|
}
|
|
7898
8322
|
});
|
|
@@ -7904,7 +8328,7 @@ var MarkdownPlugin = function() {
|
|
|
7904
8328
|
};
|
|
7905
8329
|
return promise;
|
|
7906
8330
|
}
|
|
7907
|
-
var setDataVal = function(_context, binding, value) {
|
|
8331
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
7908
8332
|
_context.model.set([
|
|
7909
8333
|
[
|
|
7910
8334
|
binding,
|
|
@@ -7912,13 +8336,13 @@ var MarkdownPlugin = function() {
|
|
|
7912
8336
|
]
|
|
7913
8337
|
]);
|
|
7914
8338
|
};
|
|
7915
|
-
var getDataVal = function(_context, binding) {
|
|
8339
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
7916
8340
|
return _context.model.get(binding);
|
|
7917
8341
|
};
|
|
7918
|
-
var deleteDataVal = function(_context, binding) {
|
|
8342
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
7919
8343
|
return _context.model.delete(binding);
|
|
7920
8344
|
};
|
|
7921
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
8345
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
7922
8346
|
var testResult = ctx.evaluate(condition);
|
|
7923
8347
|
if (isAwaitable(testResult)) {
|
|
7924
8348
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -7940,14 +8364,14 @@ var MarkdownPlugin = function() {
|
|
|
7940
8364
|
return null;
|
|
7941
8365
|
};
|
|
7942
8366
|
conditional.resolveParams = false;
|
|
7943
|
-
var waitFor = function(ctx, promise) {
|
|
8367
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
7944
8368
|
return makeAwaitable(promise);
|
|
7945
8369
|
};
|
|
7946
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
8370
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
7947
8371
|
return LogicalOperators.and(ctx, a, b, async);
|
|
7948
8372
|
};
|
|
7949
8373
|
andandOperator.resolveParams = false;
|
|
7950
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
8374
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
7951
8375
|
return LogicalOperators.or(ctx, a, b, async);
|
|
7952
8376
|
};
|
|
7953
8377
|
ororOperator.resolveParams = false;
|
|
@@ -8073,7 +8497,7 @@ var MarkdownPlugin = function() {
|
|
|
8073
8497
|
}
|
|
8074
8498
|
};
|
|
8075
8499
|
var LogicalOperators = {
|
|
8076
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
8500
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
8077
8501
|
var leftResult = ctx.evaluate(leftNode);
|
|
8078
8502
|
if (async && isAwaitable(leftResult)) {
|
|
8079
8503
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -8084,7 +8508,7 @@ var MarkdownPlugin = function() {
|
|
|
8084
8508
|
}
|
|
8085
8509
|
return leftResult && ctx.evaluate(rightNode);
|
|
8086
8510
|
},
|
|
8087
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
8511
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
8088
8512
|
var leftResult = ctx.evaluate(leftNode);
|
|
8089
8513
|
if (async && isAwaitable(leftResult)) {
|
|
8090
8514
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -8122,10 +8546,10 @@ var MarkdownPlugin = function() {
|
|
|
8122
8546
|
]))
|
|
8123
8547
|
};
|
|
8124
8548
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
8125
|
-
evaluate: function(expr) {
|
|
8549
|
+
evaluate: function evaluate(expr) {
|
|
8126
8550
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
8127
8551
|
},
|
|
8128
|
-
resolveNode: function(node2) {
|
|
8552
|
+
resolveNode: function resolveNode(node2) {
|
|
8129
8553
|
return _this._execAST(node2, _this.defaultHookOptions);
|
|
8130
8554
|
}
|
|
8131
8555
|
});
|
|
@@ -8145,12 +8569,12 @@ var MarkdownPlugin = function() {
|
|
|
8145
8569
|
key: "evaluate",
|
|
8146
8570
|
value: function evaluate(expr, options) {
|
|
8147
8571
|
var _this = this;
|
|
8572
|
+
var _this_hooks_beforeEvaluate_call;
|
|
8148
8573
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
8149
|
-
resolveNode: function(node2) {
|
|
8574
|
+
resolveNode: function resolveNode(node2) {
|
|
8150
8575
|
return _this._execAST(node2, resolvedOpts);
|
|
8151
8576
|
}
|
|
8152
8577
|
}));
|
|
8153
|
-
var _this_hooks_beforeEvaluate_call;
|
|
8154
8578
|
var expression = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
8155
8579
|
while(isObjectExpression(expression)){
|
|
8156
8580
|
expression = expression.value;
|
|
@@ -8274,11 +8698,11 @@ var MarkdownPlugin = function() {
|
|
|
8274
8698
|
key: "_resolveNode",
|
|
8275
8699
|
value: function _resolveNode(_currentValue, node2, options) {
|
|
8276
8700
|
var _this = this;
|
|
8277
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
8278
8701
|
var _options_async;
|
|
8702
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
8279
8703
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
8280
8704
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
8281
|
-
evaluate: function(expr) {
|
|
8705
|
+
evaluate: function evaluate(expr) {
|
|
8282
8706
|
return _this.evaluate(expr, options);
|
|
8283
8707
|
}
|
|
8284
8708
|
});
|
|
@@ -8612,7 +9036,7 @@ var MarkdownPlugin = function() {
|
|
|
8612
9036
|
]);
|
|
8613
9037
|
return ProxyLogger;
|
|
8614
9038
|
}();
|
|
8615
|
-
var identify = function(val) {
|
|
9039
|
+
var identify = function identify(val) {
|
|
8616
9040
|
return val;
|
|
8617
9041
|
};
|
|
8618
9042
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -8700,6 +9124,7 @@ var MarkdownPlugin = function() {
|
|
|
8700
9124
|
{
|
|
8701
9125
|
key: "getApparentType",
|
|
8702
9126
|
value: function getApparentType(binding) {
|
|
9127
|
+
var _schemaType_validation, _baseType_validation;
|
|
8703
9128
|
var schemaType = this.getType(binding);
|
|
8704
9129
|
if (schemaType === void 0) {
|
|
8705
9130
|
return void 0;
|
|
@@ -8708,7 +9133,6 @@ var MarkdownPlugin = function() {
|
|
|
8708
9133
|
if (baseType === void 0) {
|
|
8709
9134
|
return schemaType;
|
|
8710
9135
|
}
|
|
8711
|
-
var _schemaType_validation, _baseType_validation;
|
|
8712
9136
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
8713
9137
|
validation: _to_consumable_array((_schemaType_validation = schemaType.validation) !== null && _schemaType_validation !== void 0 ? _schemaType_validation : []).concat(_to_consumable_array((_baseType_validation = baseType.validation) !== null && _baseType_validation !== void 0 ? _baseType_validation : []))
|
|
8714
9138
|
});
|
|
@@ -8857,10 +9281,10 @@ var MarkdownPlugin = function() {
|
|
|
8857
9281
|
{
|
|
8858
9282
|
key: "get",
|
|
8859
9283
|
value: function get(binding, options, next) {
|
|
9284
|
+
var _ref;
|
|
8860
9285
|
var _this_shouldIncludeInvalid, _this;
|
|
8861
9286
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
8862
|
-
|
|
8863
|
-
if ((_this_shouldIncludeInvalid1 = (_this_shouldIncludeInvalid = (_this = this).shouldIncludeInvalid) === null || _this_shouldIncludeInvalid === void 0 ? void 0 : _this_shouldIncludeInvalid.call(_this, options)) !== null && _this_shouldIncludeInvalid1 !== void 0 ? _this_shouldIncludeInvalid1 : (options === null || options === void 0 ? void 0 : options.includeInvalid) === true) {
|
|
9287
|
+
if ((_ref = (_this_shouldIncludeInvalid = (_this = this).shouldIncludeInvalid) === null || _this_shouldIncludeInvalid === void 0 ? void 0 : _this_shouldIncludeInvalid.call(_this, options)) !== null && _ref !== void 0 ? _ref : (options === null || options === void 0 ? void 0 : options.includeInvalid) === true) {
|
|
8864
9288
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
8865
9289
|
if (shadowBinding === binding) {
|
|
8866
9290
|
val = shadowValue;
|
|
@@ -8958,11 +9382,12 @@ var MarkdownPlugin = function() {
|
|
|
8958
9382
|
templateDepth: 0
|
|
8959
9383
|
};
|
|
8960
9384
|
var _this = this;
|
|
9385
|
+
var _this_hooks_onCreateASTNode_call;
|
|
8961
9386
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
8962
9387
|
if (parsedNode || parsedNode === null) {
|
|
8963
9388
|
return parsedNode;
|
|
8964
9389
|
}
|
|
8965
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
9390
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
8966
9391
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
8967
9392
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
8968
9393
|
return {
|
|
@@ -9032,30 +9457,29 @@ var MarkdownPlugin = function() {
|
|
|
9032
9457
|
child.value.parent = parent;
|
|
9033
9458
|
});
|
|
9034
9459
|
}
|
|
9035
|
-
var _this_hooks_onCreateASTNode_call;
|
|
9036
9460
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
9037
9461
|
}
|
|
9038
9462
|
}
|
|
9039
9463
|
]);
|
|
9040
9464
|
return Parser;
|
|
9041
9465
|
}();
|
|
9042
|
-
var withContext = function(model) {
|
|
9466
|
+
var withContext = function withContext(model) {
|
|
9043
9467
|
return {
|
|
9044
|
-
get: function(binding, options) {
|
|
9468
|
+
get: function get(binding, options) {
|
|
9045
9469
|
return model.get(binding, _object_spread({
|
|
9046
9470
|
context: {
|
|
9047
9471
|
model: model
|
|
9048
9472
|
}
|
|
9049
9473
|
}, options));
|
|
9050
9474
|
},
|
|
9051
|
-
set: function(transaction, options) {
|
|
9475
|
+
set: function set(transaction, options) {
|
|
9052
9476
|
return model.set(transaction, _object_spread({
|
|
9053
9477
|
context: {
|
|
9054
9478
|
model: model
|
|
9055
9479
|
}
|
|
9056
9480
|
}, options));
|
|
9057
9481
|
},
|
|
9058
|
-
delete: function(binding, options) {
|
|
9482
|
+
delete: function _delete(binding, options) {
|
|
9059
9483
|
return model.delete(binding, _object_spread({
|
|
9060
9484
|
context: {
|
|
9061
9485
|
model: model
|
|
@@ -9094,16 +9518,16 @@ var MarkdownPlugin = function() {
|
|
|
9094
9518
|
{
|
|
9095
9519
|
key: "update",
|
|
9096
9520
|
value: function update(dataChanges, nodeChanges) {
|
|
9521
|
+
var _ref;
|
|
9097
9522
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
9098
9523
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
9099
9524
|
this.idCache.clear();
|
|
9100
9525
|
var prevASTMap = new Map(this.ASTMap);
|
|
9101
9526
|
this.ASTMap.clear();
|
|
9102
9527
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
9103
|
-
var _nodeChanges_values;
|
|
9104
9528
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
9105
9529
|
try {
|
|
9106
|
-
for(var _iterator = ((
|
|
9530
|
+
for(var _iterator = ((_ref = nodeChanges === null || nodeChanges === void 0 ? void 0 : nodeChanges.values()) !== null && _ref !== void 0 ? _ref : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
9107
9531
|
var node2 = _step.value;
|
|
9108
9532
|
var current = node2;
|
|
9109
9533
|
while(current){
|
|
@@ -9186,6 +9610,7 @@ var MarkdownPlugin = function() {
|
|
|
9186
9610
|
key: "computeTree",
|
|
9187
9611
|
value: function computeTree(node2, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
9188
9612
|
var _this = this;
|
|
9613
|
+
var _this_hooks_beforeResolve_call;
|
|
9189
9614
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
9190
9615
|
dependencyModel.trackSubset("core");
|
|
9191
9616
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -9193,7 +9618,7 @@ var MarkdownPlugin = function() {
|
|
|
9193
9618
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
9194
9619
|
model: depModelWithParser
|
|
9195
9620
|
}),
|
|
9196
|
-
evaluate: function(exp) {
|
|
9621
|
+
evaluate: function evaluate(exp) {
|
|
9197
9622
|
return _this.options.evaluator.evaluate(exp, {
|
|
9198
9623
|
model: depModelWithParser
|
|
9199
9624
|
});
|
|
@@ -9209,14 +9634,14 @@ var MarkdownPlugin = function() {
|
|
|
9209
9634
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
9210
9635
|
updated: false
|
|
9211
9636
|
});
|
|
9212
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
9637
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
9213
9638
|
var resolvedASTLocal = resolvedNode.node;
|
|
9214
9639
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
9215
9640
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
9216
9641
|
updated: false
|
|
9217
9642
|
});
|
|
9218
9643
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
9219
|
-
var handleChildNode = function(childNode) {
|
|
9644
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
9220
9645
|
var _prevASTMap_get;
|
|
9221
9646
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
9222
9647
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -9241,7 +9666,6 @@ var MarkdownPlugin = function() {
|
|
|
9241
9666
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node2)), {
|
|
9242
9667
|
parent: partiallyResolvedParent
|
|
9243
9668
|
});
|
|
9244
|
-
var _this_hooks_beforeResolve_call;
|
|
9245
9669
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
9246
9670
|
type: "empty"
|
|
9247
9671
|
};
|
|
@@ -9301,7 +9725,7 @@ var MarkdownPlugin = function() {
|
|
|
9301
9725
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
9302
9726
|
}
|
|
9303
9727
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
9304
|
-
getDependencies: function(scope) {
|
|
9728
|
+
getDependencies: function getDependencies(scope) {
|
|
9305
9729
|
return dependencyModel.getDependencies(scope);
|
|
9306
9730
|
}
|
|
9307
9731
|
}));
|
|
@@ -9611,7 +10035,7 @@ var MarkdownPlugin = function() {
|
|
|
9611
10035
|
]);
|
|
9612
10036
|
return TemplatePlugin;
|
|
9613
10037
|
}();
|
|
9614
|
-
var createPatternMatcher = function(start, end) {
|
|
10038
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
9615
10039
|
return function(testStr) {
|
|
9616
10040
|
var startLocation = testStr.indexOf(start);
|
|
9617
10041
|
if (startLocation === -1) {
|
|
@@ -9651,18 +10075,18 @@ var MarkdownPlugin = function() {
|
|
|
9651
10075
|
});
|
|
9652
10076
|
return newNode;
|
|
9653
10077
|
}
|
|
9654
|
-
var findBasePath = function(node2, resolver2) {
|
|
10078
|
+
var findBasePath = function findBasePath1(node2, resolver2) {
|
|
9655
10079
|
var parentNode = node2.parent;
|
|
9656
10080
|
if (!parentNode) {
|
|
9657
10081
|
return [];
|
|
9658
10082
|
}
|
|
9659
10083
|
if ("children" in parentNode) {
|
|
10084
|
+
var _ref;
|
|
9660
10085
|
var _parentNode_children_find, _parentNode_children;
|
|
9661
10086
|
var original = resolver2.getSourceNode(node2);
|
|
9662
|
-
|
|
9663
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
10087
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
9664
10088
|
return child.value === original;
|
|
9665
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
10089
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
9666
10090
|
}
|
|
9667
10091
|
if (parentNode.type !== "multi-node") {
|
|
9668
10092
|
return [];
|
|
@@ -9687,9 +10111,9 @@ var MarkdownPlugin = function() {
|
|
|
9687
10111
|
var _node2_parent, _node2_parent_parent, _node2_parent1, _node2_parent_parent1, _node2_parent2, _node2_parent_parent_value;
|
|
9688
10112
|
var propsToSkip;
|
|
9689
10113
|
if (node2.type === "asset" || node2.type === "view") {
|
|
10114
|
+
var _ref;
|
|
9690
10115
|
var _node2_plugins_stringResolver, _node2_plugins, _node2_value;
|
|
9691
|
-
|
|
9692
|
-
propsToSkip = new Set((_node2_plugins_stringResolver_propertiesToSkip = (_node2_plugins = node2.plugins) === null || _node2_plugins === void 0 ? void 0 : (_node2_plugins_stringResolver = _node2_plugins.stringResolver) === null || _node2_plugins_stringResolver === void 0 ? void 0 : _node2_plugins_stringResolver.propertiesToSkip) !== null && _node2_plugins_stringResolver_propertiesToSkip !== void 0 ? _node2_plugins_stringResolver_propertiesToSkip : [
|
|
10116
|
+
propsToSkip = new Set((_ref = (_node2_plugins = node2.plugins) === null || _node2_plugins === void 0 ? void 0 : (_node2_plugins_stringResolver = _node2_plugins.stringResolver) === null || _node2_plugins_stringResolver === void 0 ? void 0 : _node2_plugins_stringResolver.propertiesToSkip) !== null && _ref !== void 0 ? _ref : [
|
|
9693
10117
|
"exp"
|
|
9694
10118
|
]);
|
|
9695
10119
|
if ((_node2_value = node2.value) === null || _node2_value === void 0 ? void 0 : _node2_value.id) {
|
|
@@ -10110,11 +10534,11 @@ var MarkdownPlugin = function() {
|
|
|
10110
10534
|
this.stateStore.clear();
|
|
10111
10535
|
view.hooks.resolver.tap("asset-transform", function(resolver2) {
|
|
10112
10536
|
var lastUpdatedNode;
|
|
10113
|
-
var updateState = function(node2) {
|
|
10537
|
+
var updateState = function updateState(node2) {
|
|
10114
10538
|
lastUpdatedNode = node2;
|
|
10115
10539
|
view.update(/* @__PURE__ */ new Set());
|
|
10116
10540
|
};
|
|
10117
|
-
var getStore = function(node2, stepKey) {
|
|
10541
|
+
var getStore = function getStore(node2, stepKey) {
|
|
10118
10542
|
var store;
|
|
10119
10543
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
10120
10544
|
var storedState = _this.stateStore.get(node2);
|
|
@@ -10128,10 +10552,10 @@ var MarkdownPlugin = function() {
|
|
|
10128
10552
|
_this.stateStore.set(node2, store);
|
|
10129
10553
|
}
|
|
10130
10554
|
return {
|
|
10131
|
-
useSharedState: function(key) {
|
|
10555
|
+
useSharedState: function useSharedState(key) {
|
|
10132
10556
|
return store.useSharedState(key);
|
|
10133
10557
|
},
|
|
10134
|
-
useLocalState: function(initialState) {
|
|
10558
|
+
useLocalState: function useLocalState(initialState) {
|
|
10135
10559
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
10136
10560
|
}
|
|
10137
10561
|
};
|
|
@@ -10493,7 +10917,7 @@ var MarkdownPlugin = function() {
|
|
|
10493
10917
|
return options;
|
|
10494
10918
|
}
|
|
10495
10919
|
tracked.delete(node2);
|
|
10496
|
-
var track = function(binding) {
|
|
10920
|
+
var track = function track(binding) {
|
|
10497
10921
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
10498
10922
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
10499
10923
|
if (tracked.has(node2)) {
|
|
@@ -10519,7 +10943,7 @@ var MarkdownPlugin = function() {
|
|
|
10519
10943
|
};
|
|
10520
10944
|
return _object_spread_props(_object_spread({}, options), {
|
|
10521
10945
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
10522
|
-
get: function(binding, getOptions) {
|
|
10946
|
+
get: function get(binding, getOptions) {
|
|
10523
10947
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
10524
10948
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
10525
10949
|
track(binding);
|
|
@@ -10531,14 +10955,14 @@ var MarkdownPlugin = function() {
|
|
|
10531
10955
|
return firstFieldEOW;
|
|
10532
10956
|
},
|
|
10533
10957
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
10958
|
+
var _ref;
|
|
10534
10959
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
10535
10960
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
10536
10961
|
track(binding);
|
|
10537
10962
|
}
|
|
10538
|
-
|
|
10539
|
-
return (_options_validation__getValidationForBinding_getAll = (_options_validation = options.validation) === null || _options_validation === void 0 ? void 0 : (_options_validation__getValidationForBinding = _options_validation._getValidationForBinding(binding)) === null || _options_validation__getValidationForBinding === void 0 ? void 0 : _options_validation__getValidationForBinding.getAll(getOptions)) !== null && _options_validation__getValidationForBinding_getAll !== void 0 ? _options_validation__getValidationForBinding_getAll : [];
|
|
10963
|
+
return (_ref = (_options_validation = options.validation) === null || _options_validation === void 0 ? void 0 : (_options_validation__getValidationForBinding = _options_validation._getValidationForBinding(binding)) === null || _options_validation__getValidationForBinding === void 0 ? void 0 : _options_validation__getValidationForBinding.getAll(getOptions)) !== null && _ref !== void 0 ? _ref : [];
|
|
10540
10964
|
},
|
|
10541
|
-
getChildren: function(type) {
|
|
10965
|
+
getChildren: function getChildren(type) {
|
|
10542
10966
|
var _lastComputedBindingTree_get;
|
|
10543
10967
|
var validations = new Array();
|
|
10544
10968
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node2)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -10550,7 +10974,7 @@ var MarkdownPlugin = function() {
|
|
|
10550
10974
|
});
|
|
10551
10975
|
return validations;
|
|
10552
10976
|
},
|
|
10553
|
-
getValidationsForSection: function() {
|
|
10977
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
10554
10978
|
var _lastSectionBindingTree_get;
|
|
10555
10979
|
var validations = new Array();
|
|
10556
10980
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node2)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -10562,7 +10986,7 @@ var MarkdownPlugin = function() {
|
|
|
10562
10986
|
});
|
|
10563
10987
|
return validations;
|
|
10564
10988
|
},
|
|
10565
|
-
register: function(registerOptions) {
|
|
10989
|
+
register: function register(registerOptions) {
|
|
10566
10990
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
10567
10991
|
if (!sections.has(node2)) {
|
|
10568
10992
|
sections.set(node2, /* @__PURE__ */ new Set());
|
|
@@ -10707,10 +11131,10 @@ var MarkdownPlugin = function() {
|
|
|
10707
11131
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
10708
11132
|
var _this = this;
|
|
10709
11133
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
11134
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
10710
11135
|
if (originalValue.state === "dismissed") {
|
|
10711
11136
|
return originalValue;
|
|
10712
11137
|
}
|
|
10713
|
-
var _originalValue_value_blocking;
|
|
10714
11138
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
10715
11139
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
10716
11140
|
"value",
|
|
@@ -10732,7 +11156,6 @@ var MarkdownPlugin = function() {
|
|
|
10732
11156
|
}
|
|
10733
11157
|
}
|
|
10734
11158
|
var response = runner(obj.value);
|
|
10735
|
-
var _response_message, _obj_value_displayTarget;
|
|
10736
11159
|
var newState = {
|
|
10737
11160
|
type: obj.type,
|
|
10738
11161
|
value: obj.value,
|
|
@@ -10817,14 +11240,14 @@ var MarkdownPlugin = function() {
|
|
|
10817
11240
|
var _this = this;
|
|
10818
11241
|
return [
|
|
10819
11242
|
{
|
|
10820
|
-
set: function(transaction, options, next) {
|
|
10821
|
-
var
|
|
10822
|
-
return (
|
|
11243
|
+
set: function set(transaction, options, next) {
|
|
11244
|
+
var _ref;
|
|
11245
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
10823
11246
|
},
|
|
10824
|
-
get: function(binding, options, next) {
|
|
11247
|
+
get: function get(binding, options, next) {
|
|
10825
11248
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
10826
11249
|
},
|
|
10827
|
-
delete: function(binding, options, next) {
|
|
11250
|
+
delete: function _delete(binding, options, next) {
|
|
10828
11251
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
10829
11252
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
10830
11253
|
}
|
|
@@ -10887,11 +11310,11 @@ var MarkdownPlugin = function() {
|
|
|
10887
11310
|
{
|
|
10888
11311
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
10889
11312
|
provider: {
|
|
10890
|
-
getValidationsForBinding: function(binding) {
|
|
11313
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
10891
11314
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
10892
11315
|
return (_this_viewValidationProvider = _this.viewValidationProvider) === null || _this_viewValidationProvider === void 0 ? void 0 : (_this_viewValidationProvider_getValidationsForBinding = _this_viewValidationProvider.getValidationsForBinding) === null || _this_viewValidationProvider_getValidationsForBinding === void 0 ? void 0 : _this_viewValidationProvider_getValidationsForBinding.call(_this_viewValidationProvider, binding);
|
|
10893
11316
|
},
|
|
10894
|
-
getValidationsForView: function() {
|
|
11317
|
+
getValidationsForView: function getValidationsForView() {
|
|
10895
11318
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
10896
11319
|
return (_this_viewValidationProvider = _this.viewValidationProvider) === null || _this_viewValidationProvider === void 0 ? void 0 : (_this_viewValidationProvider_getValidationsForView = _this_viewValidationProvider.getValidationsForView) === null || _this_viewValidationProvider_getValidationsForView === void 0 ? void 0 : _this_viewValidationProvider_getValidationsForView.call(_this_viewValidationProvider);
|
|
10897
11320
|
}
|
|
@@ -10918,7 +11341,7 @@ var MarkdownPlugin = function() {
|
|
|
10918
11341
|
}
|
|
10919
11342
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
10920
11343
|
callbacks: {
|
|
10921
|
-
onAdd: function(binding) {
|
|
11344
|
+
onAdd: function onAdd(binding) {
|
|
10922
11345
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
10923
11346
|
return;
|
|
10924
11347
|
}
|
|
@@ -10962,11 +11385,11 @@ var MarkdownPlugin = function() {
|
|
|
10962
11385
|
var _this_options;
|
|
10963
11386
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
10964
11387
|
var _vals;
|
|
11388
|
+
var _ref;
|
|
10965
11389
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
10966
|
-
|
|
10967
|
-
(_vals = vals).push.apply(_vals, _to_consumable_array((_provider_provider_getValidationsForBinding_map = (_provider_provider_getValidationsForBinding1 = (_provider_provider = provider.provider).getValidationsForBinding) === null || _provider_provider_getValidationsForBinding1 === void 0 ? void 0 : (_provider_provider_getValidationsForBinding = _provider_provider_getValidationsForBinding1.call(_provider_provider, binding)) === null || _provider_provider_getValidationsForBinding === void 0 ? void 0 : _provider_provider_getValidationsForBinding.map(function(valObj) {
|
|
11390
|
+
(_vals = vals).push.apply(_vals, _to_consumable_array((_ref = (_provider_provider_getValidationsForBinding1 = (_provider_provider = provider.provider).getValidationsForBinding) === null || _provider_provider_getValidationsForBinding1 === void 0 ? void 0 : (_provider_provider_getValidationsForBinding = _provider_provider_getValidationsForBinding1.call(_provider_provider, binding)) === null || _provider_provider_getValidationsForBinding === void 0 ? void 0 : _provider_provider_getValidationsForBinding.map(function(valObj) {
|
|
10968
11391
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
10969
|
-
})) !== null &&
|
|
11392
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
10970
11393
|
return vals;
|
|
10971
11394
|
}, []);
|
|
10972
11395
|
if (possibleValidations.length === 0) {
|
|
@@ -11007,10 +11430,10 @@ var MarkdownPlugin = function() {
|
|
|
11007
11430
|
key: "validationRunner",
|
|
11008
11431
|
value: function validationRunner(validationObj, binding) {
|
|
11009
11432
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
11433
|
+
var _validationObj_handler;
|
|
11010
11434
|
if (!context) {
|
|
11011
11435
|
throw new Error("No context provided to validation runner");
|
|
11012
11436
|
}
|
|
11013
|
-
var _validationObj_handler;
|
|
11014
11437
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
11015
11438
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
11016
11439
|
var model = {
|
|
@@ -11024,7 +11447,7 @@ var MarkdownPlugin = function() {
|
|
|
11024
11447
|
delete: context.model.delete
|
|
11025
11448
|
};
|
|
11026
11449
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
11027
|
-
evaluate: function(exp) {
|
|
11450
|
+
evaluate: function evaluate(exp) {
|
|
11028
11451
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
11029
11452
|
model: model
|
|
11030
11453
|
};
|
|
@@ -11062,7 +11485,7 @@ var MarkdownPlugin = function() {
|
|
|
11062
11485
|
var _this = this;
|
|
11063
11486
|
var isNavigationTrigger = trigger === "navigation";
|
|
11064
11487
|
var lastActiveBindings = this.activeBindings;
|
|
11065
|
-
var updateValidations = function(dismissValidations) {
|
|
11488
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
11066
11489
|
_this.getBindings().forEach(function(binding) {
|
|
11067
11490
|
var _this_validations_get;
|
|
11068
11491
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -11107,9 +11530,9 @@ var MarkdownPlugin = function() {
|
|
|
11107
11530
|
{
|
|
11108
11531
|
key: "getBindings",
|
|
11109
11532
|
value: function getBindings() {
|
|
11533
|
+
var _ref;
|
|
11110
11534
|
var _this_tracker;
|
|
11111
|
-
|
|
11112
|
-
return (_this_tracker_getBindings = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _this_tracker_getBindings !== void 0 ? _this_tracker_getBindings : /* @__PURE__ */ new Set();
|
|
11535
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
11113
11536
|
}
|
|
11114
11537
|
},
|
|
11115
11538
|
{
|
|
@@ -11158,10 +11581,10 @@ var MarkdownPlugin = function() {
|
|
|
11158
11581
|
value: function forView(parser) {
|
|
11159
11582
|
var _this = this;
|
|
11160
11583
|
return {
|
|
11161
|
-
_getValidationForBinding: function(binding) {
|
|
11584
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
11162
11585
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
11163
11586
|
},
|
|
11164
|
-
getAll: function() {
|
|
11587
|
+
getAll: function getAll() {
|
|
11165
11588
|
var bindings = _this.getBindings();
|
|
11166
11589
|
if (bindings.size === 0) {
|
|
11167
11590
|
return void 0;
|
|
@@ -11188,13 +11611,13 @@ var MarkdownPlugin = function() {
|
|
|
11188
11611
|
getValidationsForSection: function getValidationsForSection() {
|
|
11189
11612
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
11190
11613
|
},
|
|
11191
|
-
track: function() {
|
|
11614
|
+
track: function track() {
|
|
11192
11615
|
throw new Error("Tracking should be provided by the view plugin");
|
|
11193
11616
|
},
|
|
11194
|
-
register: function() {
|
|
11617
|
+
register: function register() {
|
|
11195
11618
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
11196
11619
|
},
|
|
11197
|
-
type: function(binding) {
|
|
11620
|
+
type: function type(binding) {
|
|
11198
11621
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
11199
11622
|
}
|
|
11200
11623
|
};
|
|
@@ -11203,9 +11626,9 @@ var MarkdownPlugin = function() {
|
|
|
11203
11626
|
]);
|
|
11204
11627
|
return ValidationController;
|
|
11205
11628
|
}();
|
|
11206
|
-
var mergeSets = function(setA, setB) {
|
|
11207
|
-
var
|
|
11208
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
11629
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
11630
|
+
var _ref, _ref1;
|
|
11631
|
+
return /* @__PURE__ */ new Set(_to_consumable_array((_ref = setA === null || setA === void 0 ? void 0 : setA.values()) !== null && _ref !== void 0 ? _ref : []).concat(_to_consumable_array((_ref1 = setB === null || setB === void 0 ? void 0 : setB.values()) !== null && _ref1 !== void 0 ? _ref1 : [])));
|
|
11209
11632
|
};
|
|
11210
11633
|
var ViewController = /*#__PURE__*/ function() {
|
|
11211
11634
|
function ViewController(initialViews, options) {
|
|
@@ -11232,7 +11655,7 @@ var MarkdownPlugin = function() {
|
|
|
11232
11655
|
}
|
|
11233
11656
|
});
|
|
11234
11657
|
});
|
|
11235
|
-
var update = function(updates) {
|
|
11658
|
+
var update = function update(updates) {
|
|
11236
11659
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
11237
11660
|
if (_this1.currentView) {
|
|
11238
11661
|
if (_this1.optimizeUpdates) {
|
|
@@ -11243,10 +11666,10 @@ var MarkdownPlugin = function() {
|
|
|
11243
11666
|
}
|
|
11244
11667
|
};
|
|
11245
11668
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
11246
|
-
var
|
|
11669
|
+
var _ref;
|
|
11247
11670
|
update(new Set(updates.map(function(t2) {
|
|
11248
11671
|
return t2.binding;
|
|
11249
|
-
})), (
|
|
11672
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
11250
11673
|
});
|
|
11251
11674
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
11252
11675
|
var parentBinding = binding.parent();
|
|
@@ -11281,8 +11704,8 @@ var MarkdownPlugin = function() {
|
|
|
11281
11704
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
11282
11705
|
this.pendingUpdate.scheduled = true;
|
|
11283
11706
|
(0, import_queue_microtask2.default)(function() {
|
|
11284
|
-
var _this_currentView;
|
|
11285
11707
|
var _this_pendingUpdate;
|
|
11708
|
+
var _this_currentView;
|
|
11286
11709
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
11287
11710
|
_this.pendingUpdate = void 0;
|
|
11288
11711
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -11607,10 +12030,10 @@ var MarkdownPlugin = function() {
|
|
|
11607
12030
|
{
|
|
11608
12031
|
key: "getConstants",
|
|
11609
12032
|
value: function getConstants(key, namespace, fallback) {
|
|
12033
|
+
var _ref, _ref1;
|
|
11610
12034
|
var _this_tempStore_get, _this_store_get;
|
|
11611
12035
|
var path = new BindingInstance(key);
|
|
11612
|
-
|
|
11613
|
-
return (_ref = (_this_tempStore_get_get = (_this_tempStore_get = this.tempStore.get(namespace)) === null || _this_tempStore_get === void 0 ? void 0 : _this_tempStore_get.get(path)) !== null && _this_tempStore_get_get !== void 0 ? _this_tempStore_get_get : (_this_store_get = this.store.get(namespace)) === null || _this_store_get === void 0 ? void 0 : _this_store_get.get(path)) !== null && _ref !== void 0 ? _ref : fallback;
|
|
12036
|
+
return (_ref = (_ref1 = (_this_tempStore_get = this.tempStore.get(namespace)) === null || _this_tempStore_get === void 0 ? void 0 : _this_tempStore_get.get(path)) !== null && _ref1 !== void 0 ? _ref1 : (_this_store_get = this.store.get(namespace)) === null || _this_store_get === void 0 ? void 0 : _this_store_get.get(path)) !== null && _ref !== void 0 ? _ref : fallback;
|
|
11614
12037
|
}
|
|
11615
12038
|
},
|
|
11616
12039
|
{
|
|
@@ -11651,7 +12074,7 @@ var MarkdownPlugin = function() {
|
|
|
11651
12074
|
value: function apply(player) {
|
|
11652
12075
|
var _this = this;
|
|
11653
12076
|
var expressionEvaluator;
|
|
11654
|
-
var handleEval = function(exp) {
|
|
12077
|
+
var handleEval = function handleEval(exp) {
|
|
11655
12078
|
if (exp) {
|
|
11656
12079
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
11657
12080
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -11672,7 +12095,7 @@ var MarkdownPlugin = function() {
|
|
|
11672
12095
|
return handleEval(exp);
|
|
11673
12096
|
});
|
|
11674
12097
|
flow3.hooks.resolveTransitionNode.intercept({
|
|
11675
|
-
call: function(nextState) {
|
|
12098
|
+
call: function call(nextState) {
|
|
11676
12099
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
11677
12100
|
handleEval(nextState.onStart);
|
|
11678
12101
|
}
|
|
@@ -11685,13 +12108,13 @@ var MarkdownPlugin = function() {
|
|
|
11685
12108
|
]);
|
|
11686
12109
|
return FlowExpPlugin;
|
|
11687
12110
|
}();
|
|
11688
|
-
var createFormatFunction = function(schema) {
|
|
11689
|
-
var handler = function(ctx, value, formatName) {
|
|
12111
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
12112
|
+
var handler = function handler(ctx, value, formatName) {
|
|
12113
|
+
var _ref;
|
|
11690
12114
|
var _schema_getFormatterForType;
|
|
11691
|
-
|
|
11692
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
12115
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
11693
12116
|
type: formatName
|
|
11694
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
12117
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
11695
12118
|
};
|
|
11696
12119
|
return handler;
|
|
11697
12120
|
};
|
|
@@ -11743,8 +12166,234 @@ var MarkdownPlugin = function() {
|
|
|
11743
12166
|
ref: Symbol("not-started"),
|
|
11744
12167
|
status: "not-started"
|
|
11745
12168
|
};
|
|
11746
|
-
var
|
|
11747
|
-
var
|
|
12169
|
+
var A2UI_EVENT_CONTEXT_NAMESPACE = "agent.event.context";
|
|
12170
|
+
var NUMERIC_SEGMENT = /^(0|[1-9]\d*)$/;
|
|
12171
|
+
var decodeSegment = function decodeSegment(segment) {
|
|
12172
|
+
return segment.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
12173
|
+
};
|
|
12174
|
+
var isObject = function isObject(v) {
|
|
12175
|
+
return (typeof v === "undefined" ? "undefined" : _type_of(v)) === "object" && v !== null && !Array.isArray(v);
|
|
12176
|
+
};
|
|
12177
|
+
var isPathRef = function isPathRef(v) {
|
|
12178
|
+
return isObject(v) && typeof v.path === "string" && Object.keys(v).length === 1;
|
|
12179
|
+
};
|
|
12180
|
+
var isFunctionCall = function isFunctionCall(v) {
|
|
12181
|
+
return isObject(v) && typeof v.call === "string";
|
|
12182
|
+
};
|
|
12183
|
+
function renderArg(value) {
|
|
12184
|
+
if (value === null) return "null";
|
|
12185
|
+
if (value === void 0) return "null";
|
|
12186
|
+
if (typeof value === "boolean") return String(value);
|
|
12187
|
+
if (typeof value === "number") return String(value);
|
|
12188
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
12189
|
+
if (Array.isArray(value)) {
|
|
12190
|
+
return "[".concat(value.map(renderArg).join(", "), "]");
|
|
12191
|
+
}
|
|
12192
|
+
if (isPathRef(value)) {
|
|
12193
|
+
return "{{".concat(pointerToBinding(value.path), "}}");
|
|
12194
|
+
}
|
|
12195
|
+
if (isFunctionCall(value)) {
|
|
12196
|
+
var inner = translateFunctionCall(value);
|
|
12197
|
+
return inner.replace(/^@\[/, "").replace(/\]@$/, "");
|
|
12198
|
+
}
|
|
12199
|
+
return JSON.stringify(value);
|
|
12200
|
+
}
|
|
12201
|
+
var INPUT_BINDING_PROPS = {
|
|
12202
|
+
TextField: "text",
|
|
12203
|
+
CheckBox: "checked",
|
|
12204
|
+
DateTimeInput: "value",
|
|
12205
|
+
ChoicePicker: "value",
|
|
12206
|
+
Slider: "value"
|
|
12207
|
+
};
|
|
12208
|
+
var CHECK_TO_VALIDATOR = {
|
|
12209
|
+
required: "required",
|
|
12210
|
+
regex: "regex",
|
|
12211
|
+
email: "email",
|
|
12212
|
+
length: "length",
|
|
12213
|
+
numeric: "numeric"
|
|
12214
|
+
};
|
|
12215
|
+
var TYPE_PREFIX = "T_";
|
|
12216
|
+
var STRUCTURAL_KEYS = /* @__PURE__ */ new Set([
|
|
12217
|
+
"id",
|
|
12218
|
+
"component",
|
|
12219
|
+
"child",
|
|
12220
|
+
"children",
|
|
12221
|
+
"checks",
|
|
12222
|
+
"action"
|
|
12223
|
+
]);
|
|
12224
|
+
function inlineComponent(component, ctx, templateScope) {
|
|
12225
|
+
if (ctx.inProgress.has(component.id)) {
|
|
12226
|
+
throw new Error("[a2ui] Component cycle detected at id '".concat(component.id, "'. A2UI requires the component graph to be a tree."));
|
|
12227
|
+
}
|
|
12228
|
+
ctx.inProgress.add(component.id);
|
|
12229
|
+
var asset = {
|
|
12230
|
+
id: component.id,
|
|
12231
|
+
type: component.component
|
|
12232
|
+
};
|
|
12233
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
12234
|
+
try {
|
|
12235
|
+
for(var _iterator = Object.entries(component)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
12236
|
+
var _step_value = _sliced_to_array(_step.value, 2), key = _step_value[0], value = _step_value[1];
|
|
12237
|
+
if (STRUCTURAL_KEYS.has(key)) continue;
|
|
12238
|
+
asset[key] = translatePropValue(value, templateScope, ctx, key);
|
|
12239
|
+
}
|
|
12240
|
+
} catch (err) {
|
|
12241
|
+
_didIteratorError = true;
|
|
12242
|
+
_iteratorError = err;
|
|
12243
|
+
} finally{
|
|
12244
|
+
try {
|
|
12245
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
12246
|
+
_iterator.return();
|
|
12247
|
+
}
|
|
12248
|
+
} finally{
|
|
12249
|
+
if (_didIteratorError) {
|
|
12250
|
+
throw _iteratorError;
|
|
12251
|
+
}
|
|
12252
|
+
}
|
|
12253
|
+
}
|
|
12254
|
+
if (typeof component.child === "string") {
|
|
12255
|
+
var childId = component.child;
|
|
12256
|
+
asset.child = wrapInlined(resolveAndInline(childId, ctx, templateScope));
|
|
12257
|
+
}
|
|
12258
|
+
if (component.children) {
|
|
12259
|
+
if (Array.isArray(component.children)) {
|
|
12260
|
+
asset.children = component.children.map(function(id) {
|
|
12261
|
+
return wrapInlined(resolveAndInline(id, ctx, templateScope));
|
|
12262
|
+
});
|
|
12263
|
+
} else {
|
|
12264
|
+
var _component_children = component.children, path = _component_children.path, componentId = _component_children.componentId;
|
|
12265
|
+
var data = scopedBinding(path, templateScope);
|
|
12266
|
+
var templateComponent = ctx.byId.get(componentId);
|
|
12267
|
+
if (!templateComponent) {
|
|
12268
|
+
throw new Error("[a2ui] Templated children reference unknown componentId '".concat(componentId, "' on component '").concat(component.id, "'."));
|
|
12269
|
+
}
|
|
12270
|
+
var templated = inlineComponent(_object_spread_props(_object_spread({}, templateComponent), {
|
|
12271
|
+
id: "".concat(templateComponent.id, "-_index_")
|
|
12272
|
+
}), ctx, data);
|
|
12273
|
+
asset.template = [
|
|
12274
|
+
{
|
|
12275
|
+
data: data,
|
|
12276
|
+
output: "children",
|
|
12277
|
+
value: {
|
|
12278
|
+
asset: templated
|
|
12279
|
+
}
|
|
12280
|
+
}
|
|
12281
|
+
];
|
|
12282
|
+
}
|
|
12283
|
+
}
|
|
12284
|
+
if (component.action) {
|
|
12285
|
+
Object.assign(asset, translateAction(component.action, ctx));
|
|
12286
|
+
}
|
|
12287
|
+
ctx.inProgress.delete(component.id);
|
|
12288
|
+
return asset;
|
|
12289
|
+
}
|
|
12290
|
+
var CHILD_KEY_RE = /(?:^|[a-z])Child$|^child$/;
|
|
12291
|
+
var CHILDREN_KEY_RE = /(?:^|[a-z])Children$|^children$/;
|
|
12292
|
+
function translatePropValue(value, templateScope, ctx, parentKey) {
|
|
12293
|
+
if (value === null || value === void 0) return value;
|
|
12294
|
+
if (parentKey && CHILD_KEY_RE.test(parentKey) && typeof value === "string") {
|
|
12295
|
+
return wrapInlined(resolveAndInline(value, ctx, templateScope));
|
|
12296
|
+
}
|
|
12297
|
+
if (parentKey && CHILDREN_KEY_RE.test(parentKey)) {
|
|
12298
|
+
if (Array.isArray(value) && value.every(function(v) {
|
|
12299
|
+
return typeof v === "string";
|
|
12300
|
+
})) {
|
|
12301
|
+
return value.map(function(id) {
|
|
12302
|
+
return wrapInlined(resolveAndInline(id, ctx, templateScope));
|
|
12303
|
+
});
|
|
12304
|
+
}
|
|
12305
|
+
if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null && !Array.isArray(value) && "componentId" in value) {
|
|
12306
|
+
var _ctx_logger;
|
|
12307
|
+
(_ctx_logger = ctx.logger) === null || _ctx_logger === void 0 ? void 0 : _ctx_logger.warn("[a2ui] Templated children are only supported at top-level 'children'; '".concat(parentKey, "' will be left unresolved."));
|
|
12308
|
+
}
|
|
12309
|
+
}
|
|
12310
|
+
if ((typeof value === "undefined" ? "undefined" : _type_of(value)) !== "object") return value;
|
|
12311
|
+
if (Array.isArray(value)) {
|
|
12312
|
+
return value.map(function(v) {
|
|
12313
|
+
return translatePropValue(v, templateScope, ctx, void 0);
|
|
12314
|
+
});
|
|
12315
|
+
}
|
|
12316
|
+
if (isPathRef(value)) {
|
|
12317
|
+
return scopedBinding(value.path, templateScope);
|
|
12318
|
+
}
|
|
12319
|
+
if (isFunctionCall(value)) {
|
|
12320
|
+
if (templateScope) {
|
|
12321
|
+
return translateFunctionCall(rewritePathsInCall(value, templateScope), ctx.logger);
|
|
12322
|
+
}
|
|
12323
|
+
return translateFunctionCall(value, ctx.logger);
|
|
12324
|
+
}
|
|
12325
|
+
var out = {};
|
|
12326
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
12327
|
+
try {
|
|
12328
|
+
for(var _iterator = Object.entries(value)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
12329
|
+
var _step_value = _sliced_to_array(_step.value, 2), k = _step_value[0], v = _step_value[1];
|
|
12330
|
+
out[k] = translatePropValue(v, templateScope, ctx, k);
|
|
12331
|
+
}
|
|
12332
|
+
} catch (err) {
|
|
12333
|
+
_didIteratorError = true;
|
|
12334
|
+
_iteratorError = err;
|
|
12335
|
+
} finally{
|
|
12336
|
+
try {
|
|
12337
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
12338
|
+
_iterator.return();
|
|
12339
|
+
}
|
|
12340
|
+
} finally{
|
|
12341
|
+
if (_didIteratorError) {
|
|
12342
|
+
throw _iteratorError;
|
|
12343
|
+
}
|
|
12344
|
+
}
|
|
12345
|
+
}
|
|
12346
|
+
return out;
|
|
12347
|
+
}
|
|
12348
|
+
function rewritePathsInCall(value, scope) {
|
|
12349
|
+
if (!value || (typeof value === "undefined" ? "undefined" : _type_of(value)) !== "object") return value;
|
|
12350
|
+
if (Array.isArray(value)) {
|
|
12351
|
+
return value.map(function(v) {
|
|
12352
|
+
return rewritePathsInCall(v, scope);
|
|
12353
|
+
});
|
|
12354
|
+
}
|
|
12355
|
+
if (isPathRef(value)) {
|
|
12356
|
+
return {
|
|
12357
|
+
path: scopedPointer(value.path, scope)
|
|
12358
|
+
};
|
|
12359
|
+
}
|
|
12360
|
+
if (isFunctionCall(value)) {
|
|
12361
|
+
return _object_spread_props(_object_spread({}, value), {
|
|
12362
|
+
args: value.args ? Object.fromEntries(Object.entries(value.args).map(function(param) {
|
|
12363
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
|
12364
|
+
return [
|
|
12365
|
+
k,
|
|
12366
|
+
rewritePathsInCall(v, scope)
|
|
12367
|
+
];
|
|
12368
|
+
})) : value.args
|
|
12369
|
+
});
|
|
12370
|
+
}
|
|
12371
|
+
return Object.fromEntries(Object.entries(value).map(function(param) {
|
|
12372
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
|
12373
|
+
return [
|
|
12374
|
+
k,
|
|
12375
|
+
rewritePathsInCall(v, scope)
|
|
12376
|
+
];
|
|
12377
|
+
}));
|
|
12378
|
+
}
|
|
12379
|
+
function renderRhs(value) {
|
|
12380
|
+
if (value === null || value === void 0) return "null";
|
|
12381
|
+
if (typeof value === "boolean") return String(value);
|
|
12382
|
+
if (typeof value === "number") return String(value);
|
|
12383
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
12384
|
+
if (Array.isArray(value)) {
|
|
12385
|
+
return "[".concat(value.map(renderRhs).join(", "), "]");
|
|
12386
|
+
}
|
|
12387
|
+
if (isPathRef(value)) {
|
|
12388
|
+
return "{{".concat(pointerToBinding(value.path), "}}");
|
|
12389
|
+
}
|
|
12390
|
+
if (isFunctionCall(value)) {
|
|
12391
|
+
return translateFunctionCall(value).replace(/^@\[/, "").replace(/\]@$/, "");
|
|
12392
|
+
}
|
|
12393
|
+
return JSON.stringify(value);
|
|
12394
|
+
}
|
|
12395
|
+
var PLAYER_VERSION = true ? "0.16.0--canary.866.36538" : "unknown";
|
|
12396
|
+
var COMMIT = true ? "0186f1bd04fda238cbc62b8d293c8048ab26efc2" : "unknown";
|
|
11748
12397
|
var _Player = /*#__PURE__*/ function() {
|
|
11749
12398
|
function _Player2(config) {
|
|
11750
12399
|
var _this = this;
|
|
@@ -11859,13 +12508,13 @@ var MarkdownPlugin = function() {
|
|
|
11859
12508
|
var expressionEvaluator;
|
|
11860
12509
|
var dataController;
|
|
11861
12510
|
var pathResolver = new BindingParser({
|
|
11862
|
-
get: function(binding) {
|
|
12511
|
+
get: function get(binding) {
|
|
11863
12512
|
return dataController.get(binding);
|
|
11864
12513
|
},
|
|
11865
|
-
set: function(transaction) {
|
|
12514
|
+
set: function set(transaction) {
|
|
11866
12515
|
return dataController.set(transaction);
|
|
11867
12516
|
},
|
|
11868
|
-
evaluate: function(expression) {
|
|
12517
|
+
evaluate: function evaluate(expression) {
|
|
11869
12518
|
return expressionEvaluator.evaluate(expression);
|
|
11870
12519
|
}
|
|
11871
12520
|
});
|
|
@@ -12009,23 +12658,23 @@ var MarkdownPlugin = function() {
|
|
|
12009
12658
|
transition: flowController.transition,
|
|
12010
12659
|
model: dataController,
|
|
12011
12660
|
utils: {
|
|
12012
|
-
findPlugin: function(pluginSymbol) {
|
|
12661
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
12013
12662
|
return _this.findPlugin(pluginSymbol);
|
|
12014
12663
|
}
|
|
12015
12664
|
},
|
|
12016
12665
|
logger: this.logger,
|
|
12017
12666
|
flowController: flowController,
|
|
12018
12667
|
schema: schema,
|
|
12019
|
-
format: function(binding, value) {
|
|
12668
|
+
format: function format(binding, value) {
|
|
12020
12669
|
var formatter = schema.getFormatter(binding);
|
|
12021
12670
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
12022
12671
|
},
|
|
12023
|
-
formatValue: function(ref, value) {
|
|
12672
|
+
formatValue: function formatValue(ref, value) {
|
|
12024
12673
|
var formatter = schema.getFormatterForType(ref);
|
|
12025
12674
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
12026
12675
|
},
|
|
12027
12676
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
12028
|
-
type: function(b) {
|
|
12677
|
+
type: function type(b) {
|
|
12029
12678
|
return schema.getType(parseBinding(b));
|
|
12030
12679
|
}
|
|
12031
12680
|
}),
|
|
@@ -12037,7 +12686,7 @@ var MarkdownPlugin = function() {
|
|
|
12037
12686
|
});
|
|
12038
12687
|
this.hooks.viewController.call(viewController);
|
|
12039
12688
|
return {
|
|
12040
|
-
start: function() {
|
|
12689
|
+
start: function start() {
|
|
12041
12690
|
flowController.start().then(function(endState) {
|
|
12042
12691
|
var flowResult = {
|
|
12043
12692
|
endState: resolveStrings(endState, false),
|
|
@@ -12072,15 +12721,16 @@ var MarkdownPlugin = function() {
|
|
|
12072
12721
|
},
|
|
12073
12722
|
{
|
|
12074
12723
|
key: "start",
|
|
12075
|
-
value: function start(payload) {
|
|
12724
|
+
value: function start(payload, options) {
|
|
12076
12725
|
return _async_to_generator(function() {
|
|
12077
|
-
var _this,
|
|
12726
|
+
var _this, _ref, flow3, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
12078
12727
|
return _ts_generator(this, function(_state) {
|
|
12079
12728
|
switch(_state.label){
|
|
12080
12729
|
case 0:
|
|
12081
12730
|
_this = this;
|
|
12082
|
-
|
|
12083
|
-
|
|
12731
|
+
flow3 = (options === null || options === void 0 ? void 0 : options.format) === "a2ui" ? adaptA2UIToFlow(payload, this.logger) : payload;
|
|
12732
|
+
ref = Symbol((_ref = flow3 === null || flow3 === void 0 ? void 0 : flow3.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
12733
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
12084
12734
|
if (_this.state.ref !== ref) {
|
|
12085
12735
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
12086
12736
|
return newState;
|
|
@@ -12100,7 +12750,7 @@ var MarkdownPlugin = function() {
|
|
|
12100
12750
|
,
|
|
12101
12751
|
4
|
|
12102
12752
|
]);
|
|
12103
|
-
_this_setupFlow = this.setupFlow(
|
|
12753
|
+
_this_setupFlow = this.setupFlow(flow3), state = _this_setupFlow.state, start = _this_setupFlow.start;
|
|
12104
12754
|
this.setState(_object_spread({
|
|
12105
12755
|
ref: ref
|
|
12106
12756
|
}, state));
|
|
@@ -12135,7 +12785,7 @@ var MarkdownPlugin = function() {
|
|
|
12135
12785
|
errorState = {
|
|
12136
12786
|
status: "error",
|
|
12137
12787
|
ref: ref,
|
|
12138
|
-
flow:
|
|
12788
|
+
flow: flow3,
|
|
12139
12789
|
error: error
|
|
12140
12790
|
};
|
|
12141
12791
|
maybeUpdateState(errorState);
|
|
@@ -14286,7 +14936,7 @@ var MarkdownPlugin = function() {
|
|
|
14286
14936
|
zwj: "\u200D",
|
|
14287
14937
|
zwnj: "\u200C"
|
|
14288
14938
|
};
|
|
14289
|
-
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/decode-named-character-reference@1.
|
|
14939
|
+
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.js
|
|
14290
14940
|
var own = {}.hasOwnProperty;
|
|
14291
14941
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
14292
14942
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
@@ -14297,7 +14947,7 @@ var MarkdownPlugin = function() {
|
|
|
14297
14947
|
var asciiDigit = regexCheck(/\d/);
|
|
14298
14948
|
var asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
|
|
14299
14949
|
var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
|
|
14300
|
-
var unicodePunctuation = regexCheck(RegExp("\\
|
|
14950
|
+
var unicodePunctuation = regexCheck(RegExp("[\\u0021-\\u0023\\u0025-\\u002A\\u002C-\\u002F\\u003A-\\u003B\\u003F-\\u0040\\u005B-\\u005D\\u005F\\u007B\\u007D\\u00A1\\u00A7\\u00AB\\u00B6-\\u00B7\\u00BB\\u00BF\\u037E\\u0387\\u055A-\\u055F\\u0589-\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3-\\u05F4\\u0609-\\u060A\\u060C-\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964-\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A-\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9-\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B-\\u169C\\u16EB-\\u16ED\\u1735-\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944-\\u1945\\u1A1E-\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B4E-\\u1B4F\\u1B5A-\\u1B60\\u1B7D-\\u1B7F\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E-\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D-\\u207E\\u208D-\\u208E\\u2308-\\u230B\\u2329-\\u232A\\u2768-\\u2775\\u27C5-\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC-\\u29FD\\u2CF9-\\u2CFC\\u2CFE-\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52-\\u2E5D\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE-\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE-\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E-\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE-\\uA9DF\\uAA5C-\\uAA5F\\uAADE-\\uAADF\\uAAF0-\\uAAF1\\uABEB\\uFD3E-\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A-\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A-\\uFF1B\\uFF1F-\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65\\u{10100}-\\u{10102}\\u{1039F}\\u{103D0}\\u{1056F}\\u{10857}\\u{1091F}\\u{1093F}\\u{10A50}-\\u{10A58}\\u{10A7F}\\u{10AF0}-\\u{10AF6}\\u{10B39}-\\u{10B3F}\\u{10B99}-\\u{10B9C}\\u{10D6E}\\u{10EAD}\\u{10ED0}\\u{10F55}-\\u{10F59}\\u{10F86}-\\u{10F89}\\u{11047}-\\u{1104D}\\u{110BB}-\\u{110BC}\\u{110BE}-\\u{110C1}\\u{11140}-\\u{11143}\\u{11174}-\\u{11175}\\u{111C5}-\\u{111C8}\\u{111CD}\\u{111DB}\\u{111DD}-\\u{111DF}\\u{11238}-\\u{1123D}\\u{112A9}\\u{113D4}-\\u{113D5}\\u{113D7}-\\u{113D8}\\u{1144B}-\\u{1144F}\\u{1145A}-\\u{1145B}\\u{1145D}\\u{114C6}\\u{115C1}-\\u{115D7}\\u{11641}-\\u{11643}\\u{11660}-\\u{1166C}\\u{116B9}\\u{1173C}-\\u{1173E}\\u{1183B}\\u{11944}-\\u{11946}\\u{119E2}\\u{11A3F}-\\u{11A46}\\u{11A9A}-\\u{11A9C}\\u{11A9E}-\\u{11AA2}\\u{11B00}-\\u{11B09}\\u{11BE1}\\u{11C41}-\\u{11C45}\\u{11C70}-\\u{11C71}\\u{11EF7}-\\u{11EF8}\\u{11F43}-\\u{11F4F}\\u{11FFF}\\u{12470}-\\u{12474}\\u{12FF1}-\\u{12FF2}\\u{16A6E}-\\u{16A6F}\\u{16AF5}\\u{16B37}-\\u{16B3B}\\u{16B44}\\u{16D6D}-\\u{16D6F}\\u{16E97}-\\u{16E9A}\\u{16FE2}\\u{1BC9F}\\u{1DA87}-\\u{1DA8B}\\u{1E5FF}\\u{1E95E}-\\u{1E95F}]|[\\u0024\\u002B\\u003C-\\u003E\\u005E\\u0060\\u007C\\u007E\\u00A2-\\u00A6\\u00A8-\\u00A9\\u00AC\\u00AE-\\u00B1\\u00B4\\u00B8\\u00D7\\u00F7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384-\\u0385\\u03F6\\u0482\\u058D-\\u058F\\u0606-\\u0608\\u060B\\u060E-\\u060F\\u06DE\\u06E9\\u06FD-\\u06FE\\u07F6\\u07FE-\\u07FF\\u0888\\u09F2-\\u09F3\\u09FA-\\u09FB\\u0AF1\\u0B70\\u0BF3-\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0E3F\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FCF\\u0FD5-\\u0FD8\\u109E-\\u109F\\u1390-\\u1399\\u166D\\u17DB\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD-\\u1FFE\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u20A0-\\u20C1\\u2100-\\u2101\\u2103-\\u2106\\u2108-\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A-\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F\\u218A-\\u218B\\u2190-\\u2307\\u230C-\\u2328\\u232B-\\u2429\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u2767\\u2794-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2B73\\u2B76-\\u2BFF\\u2CE5-\\u2CEA\\u2E50-\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3004\\u3012-\\u3013\\u3020\\u3036-\\u3037\\u303E-\\u303F\\u309B-\\u309C\\u3190-\\u3191\\u3196-\\u319F\\u31C0-\\u31E5\\u31EF\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA700-\\uA716\\uA720-\\uA721\\uA789-\\uA78A\\uA828-\\uA82B\\uA836-\\uA839\\uAA77-\\uAA79\\uAB5B\\uAB6A-\\uAB6B\\uFB29\\uFBB2-\\uFBD2\\uFD40-\\uFD4F\\uFD90-\\uFD91\\uFDC8-\\uFDCF\\uFDFC-\\uFDFF\\uFE62\\uFE64-\\uFE66\\uFE69\\uFF04\\uFF0B\\uFF1C-\\uFF1E\\uFF3E\\uFF40\\uFF5C\\uFF5E\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFFC-\\uFFFD\\u{10137}-\\u{1013F}\\u{10179}-\\u{10189}\\u{1018C}-\\u{1018E}\\u{10190}-\\u{1019C}\\u{101A0}\\u{101D0}-\\u{101FC}\\u{10877}-\\u{10878}\\u{10AC8}\\u{10D8E}-\\u{10D8F}\\u{10ED1}-\\u{10ED8}\\u{1173F}\\u{11FD5}-\\u{11FF1}\\u{16B3C}-\\u{16B3F}\\u{16B45}\\u{1BC9C}\\u{1CC00}-\\u{1CCEF}\\u{1CCFA}-\\u{1CCFC}\\u{1CD00}-\\u{1CEB3}\\u{1CEBA}-\\u{1CED0}\\u{1CEE0}-\\u{1CEF0}\\u{1CF50}-\\u{1CFC3}\\u{1D000}-\\u{1D0F5}\\u{1D100}-\\u{1D126}\\u{1D129}-\\u{1D164}\\u{1D16A}-\\u{1D16C}\\u{1D183}-\\u{1D184}\\u{1D18C}-\\u{1D1A9}\\u{1D1AE}-\\u{1D1EA}\\u{1D200}-\\u{1D241}\\u{1D245}\\u{1D300}-\\u{1D356}\\u{1D6C1}\\u{1D6DB}\\u{1D6FB}\\u{1D715}\\u{1D735}\\u{1D74F}\\u{1D76F}\\u{1D789}\\u{1D7A9}\\u{1D7C3}\\u{1D800}-\\u{1D9FF}\\u{1DA37}-\\u{1DA3A}\\u{1DA6D}-\\u{1DA74}\\u{1DA76}-\\u{1DA83}\\u{1DA85}-\\u{1DA86}\\u{1E14F}\\u{1E2FF}\\u{1ECAC}\\u{1ECB0}\\u{1ED2E}\\u{1EEF0}-\\u{1EEF1}\\u{1F000}-\\u{1F02B}\\u{1F030}-\\u{1F093}\\u{1F0A0}-\\u{1F0AE}\\u{1F0B1}-\\u{1F0BF}\\u{1F0C1}-\\u{1F0CF}\\u{1F0D1}-\\u{1F0F5}\\u{1F10D}-\\u{1F1AD}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}-\\u{1F251}\\u{1F260}-\\u{1F265}\\u{1F300}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6EC}\\u{1F6F0}-\\u{1F6FC}\\u{1F700}-\\u{1F7D9}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F800}-\\u{1F80B}\\u{1F810}-\\u{1F847}\\u{1F850}-\\u{1F859}\\u{1F860}-\\u{1F887}\\u{1F890}-\\u{1F8AD}\\u{1F8B0}-\\u{1F8BB}\\u{1F8C0}-\\u{1F8C1}\\u{1F8D0}-\\u{1F8D8}\\u{1F900}-\\u{1FA57}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBEF}\\u{1FBFA}]", "u"));
|
|
14301
14951
|
var unicodeWhitespace = regexCheck(/\s/);
|
|
14302
14952
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
|
|
14303
14953
|
var content = {
|
|
@@ -14766,31 +15416,31 @@ var MarkdownPlugin = function() {
|
|
|
14766
15416
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/micromark@4.0.2/node_modules/micromark/lib/constructs.js
|
|
14767
15417
|
var constructs_exports = {};
|
|
14768
15418
|
__export(constructs_exports, {
|
|
14769
|
-
attentionMarkers: function() {
|
|
15419
|
+
attentionMarkers: function attentionMarkers1() {
|
|
14770
15420
|
return attentionMarkers;
|
|
14771
15421
|
},
|
|
14772
|
-
contentInitial: function() {
|
|
15422
|
+
contentInitial: function contentInitial1() {
|
|
14773
15423
|
return contentInitial;
|
|
14774
15424
|
},
|
|
14775
|
-
disable: function() {
|
|
15425
|
+
disable: function disable1() {
|
|
14776
15426
|
return disable;
|
|
14777
15427
|
},
|
|
14778
|
-
document: function() {
|
|
15428
|
+
document: function document() {
|
|
14779
15429
|
return document2;
|
|
14780
15430
|
},
|
|
14781
|
-
flow: function() {
|
|
15431
|
+
flow: function flow() {
|
|
14782
15432
|
return flow2;
|
|
14783
15433
|
},
|
|
14784
|
-
flowInitial: function() {
|
|
15434
|
+
flowInitial: function flowInitial1() {
|
|
14785
15435
|
return flowInitial;
|
|
14786
15436
|
},
|
|
14787
|
-
insideSpan: function() {
|
|
15437
|
+
insideSpan: function insideSpan1() {
|
|
14788
15438
|
return insideSpan;
|
|
14789
15439
|
},
|
|
14790
|
-
string: function() {
|
|
15440
|
+
string: function string() {
|
|
14791
15441
|
return string2;
|
|
14792
15442
|
},
|
|
14793
|
-
text: function() {
|
|
15443
|
+
text: function text() {
|
|
14794
15444
|
return text2;
|
|
14795
15445
|
}
|
|
14796
15446
|
});
|
|
@@ -14846,7 +15496,7 @@ var MarkdownPlugin = function() {
|
|
|
14846
15496
|
}
|
|
14847
15497
|
}
|
|
14848
15498
|
}
|
|
14849
|
-
var textTransformer = function(param) {
|
|
15499
|
+
var textTransformer = function textTransformer(param) {
|
|
14850
15500
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers;
|
|
14851
15501
|
var value = astNode.value;
|
|
14852
15502
|
return mappers.text({
|
|
@@ -14854,7 +15504,7 @@ var MarkdownPlugin = function() {
|
|
|
14854
15504
|
value: value
|
|
14855
15505
|
});
|
|
14856
15506
|
};
|
|
14857
|
-
var emphasisTransformer = function(param) {
|
|
15507
|
+
var emphasisTransformer = function emphasisTransformer(param) {
|
|
14858
15508
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14859
15509
|
if (mappers.emphasis) {
|
|
14860
15510
|
var children = astNode.children;
|
|
@@ -14873,7 +15523,7 @@ var MarkdownPlugin = function() {
|
|
|
14873
15523
|
}
|
|
14874
15524
|
return swapMarkdownType(asset);
|
|
14875
15525
|
};
|
|
14876
|
-
var strongTransformer = function(param) {
|
|
15526
|
+
var strongTransformer = function strongTransformer(param) {
|
|
14877
15527
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14878
15528
|
if (mappers.strong) {
|
|
14879
15529
|
var children = astNode.children;
|
|
@@ -14892,7 +15542,7 @@ var MarkdownPlugin = function() {
|
|
|
14892
15542
|
}
|
|
14893
15543
|
return swapMarkdownType(asset);
|
|
14894
15544
|
};
|
|
14895
|
-
var paragraphTransformer = function(param) {
|
|
15545
|
+
var paragraphTransformer = function paragraphTransformer(param) {
|
|
14896
15546
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14897
15547
|
var children = astNode.children;
|
|
14898
15548
|
if (children.every(function(param) {
|
|
@@ -14914,7 +15564,7 @@ var MarkdownPlugin = function() {
|
|
|
14914
15564
|
}
|
|
14915
15565
|
return swapMarkdownType(asset);
|
|
14916
15566
|
};
|
|
14917
|
-
var listTransformer = function(param) {
|
|
15567
|
+
var listTransformer = function listTransformer(param) {
|
|
14918
15568
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14919
15569
|
if (mappers.list) {
|
|
14920
15570
|
var children = astNode.children, ordered = astNode.ordered, start = astNode.start;
|
|
@@ -14935,7 +15585,7 @@ var MarkdownPlugin = function() {
|
|
|
14935
15585
|
}
|
|
14936
15586
|
return swapMarkdownType(asset);
|
|
14937
15587
|
};
|
|
14938
|
-
var listItemTransformer = function(param) {
|
|
15588
|
+
var listItemTransformer = function listItemTransformer(param) {
|
|
14939
15589
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14940
15590
|
var children = astNode.children;
|
|
14941
15591
|
var value = children.map(function(node2) {
|
|
@@ -14952,7 +15602,7 @@ var MarkdownPlugin = function() {
|
|
|
14952
15602
|
value: value
|
|
14953
15603
|
});
|
|
14954
15604
|
};
|
|
14955
|
-
var linkTransformer = function(param) {
|
|
15605
|
+
var linkTransformer = function linkTransformer(param) {
|
|
14956
15606
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14957
15607
|
if (mappers.link) {
|
|
14958
15608
|
var children = astNode.children, url = astNode.url;
|
|
@@ -14972,7 +15622,7 @@ var MarkdownPlugin = function() {
|
|
|
14972
15622
|
}
|
|
14973
15623
|
return swapMarkdownType(asset);
|
|
14974
15624
|
};
|
|
14975
|
-
var imageTransformer = function(param) {
|
|
15625
|
+
var imageTransformer = function imageTransformer(param) {
|
|
14976
15626
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers;
|
|
14977
15627
|
if (mappers.image) {
|
|
14978
15628
|
var title = astNode.title, url = astNode.url, alt = astNode.alt;
|
|
@@ -14984,7 +15634,7 @@ var MarkdownPlugin = function() {
|
|
|
14984
15634
|
}
|
|
14985
15635
|
return swapMarkdownType(asset);
|
|
14986
15636
|
};
|
|
14987
|
-
var blockquoteTransformer = function(param) {
|
|
15637
|
+
var blockquoteTransformer = function blockquoteTransformer(param) {
|
|
14988
15638
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
14989
15639
|
if (mappers.blockquote) {
|
|
14990
15640
|
var children = astNode.children;
|
|
@@ -15003,7 +15653,7 @@ var MarkdownPlugin = function() {
|
|
|
15003
15653
|
}
|
|
15004
15654
|
return swapMarkdownType(asset);
|
|
15005
15655
|
};
|
|
15006
|
-
var inlineCodeTransformer = function(param) {
|
|
15656
|
+
var inlineCodeTransformer = function inlineCodeTransformer(param) {
|
|
15007
15657
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers;
|
|
15008
15658
|
if (mappers.inlineCode) {
|
|
15009
15659
|
var value = astNode.value;
|
|
@@ -15014,7 +15664,7 @@ var MarkdownPlugin = function() {
|
|
|
15014
15664
|
}
|
|
15015
15665
|
return swapMarkdownType(asset);
|
|
15016
15666
|
};
|
|
15017
|
-
var codeTransformer = function(param) {
|
|
15667
|
+
var codeTransformer = function codeTransformer(param) {
|
|
15018
15668
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers;
|
|
15019
15669
|
if (mappers.code) {
|
|
15020
15670
|
var value = astNode.value, lang = astNode.lang;
|
|
@@ -15026,7 +15676,7 @@ var MarkdownPlugin = function() {
|
|
|
15026
15676
|
}
|
|
15027
15677
|
return swapMarkdownType(asset);
|
|
15028
15678
|
};
|
|
15029
|
-
var horizontalRuleTransformer = function(param) {
|
|
15679
|
+
var horizontalRuleTransformer = function horizontalRuleTransformer(param) {
|
|
15030
15680
|
var asset = param.asset, mappers = param.mappers;
|
|
15031
15681
|
if (mappers.horizontalRule) {
|
|
15032
15682
|
return mappers.horizontalRule({
|
|
@@ -15036,7 +15686,7 @@ var MarkdownPlugin = function() {
|
|
|
15036
15686
|
}
|
|
15037
15687
|
return swapMarkdownType(asset);
|
|
15038
15688
|
};
|
|
15039
|
-
var headingTransformer = function(param) {
|
|
15689
|
+
var headingTransformer = function headingTransformer(param) {
|
|
15040
15690
|
var astNode = param.astNode, asset = param.asset, mappers = param.mappers, transformers2 = param.transformers;
|
|
15041
15691
|
if (mappers.heading) {
|
|
15042
15692
|
var children = astNode.children, depth = astNode.depth;
|