@kizahasi/flocon-script
Advanced tools
Comparing version 0.8.1-beta.3 to 0.8.1-beta.4
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fExpression = void 0; | ||
exports.fExpression = exports.fProperty = exports.fMemberExpression = void 0; | ||
const fPattern_1 = require("./fPattern"); | ||
const fStatement_1 = require("./fStatement"); | ||
@@ -15,5 +16,8 @@ const range_1 = require("./range"); | ||
if (e.type === 'SpreadElement') { | ||
throw new ScriptError_1.ScriptError('SpreadElement is not supported', (0, range_1.toRange)(expression)); | ||
return { | ||
isSpread: true, | ||
argument: fExpression(e.argument), | ||
}; | ||
} | ||
return fExpression(e); | ||
return { isSpread: false, expression: fExpression(e) }; | ||
}), | ||
@@ -23,8 +27,3 @@ }; | ||
function fArrowFuntionExpression(expression) { | ||
const params = expression.params.map(param => { | ||
if (param.type !== 'Identifier') { | ||
throw new ScriptError_1.ScriptError(`'${param.type}' is not supported`, (0, range_1.toRange)(expression)); | ||
} | ||
return param; | ||
}); | ||
const params = expression.params.map(param => (0, fPattern_1.fPattern)(param)); | ||
let body; | ||
@@ -43,9 +42,4 @@ if (expression.body.type === 'BlockStatement') { | ||
} | ||
function fAssignmentOperator(operator, range) { | ||
switch (operator) { | ||
case '=': | ||
return operator; | ||
default: | ||
throw new ScriptError_1.ScriptError(`'${operator}' is not supported`, range); | ||
} | ||
function fAssignmentOperator(operator) { | ||
return operator; | ||
} | ||
@@ -66,3 +60,3 @@ function fAssignmentExpression(expression) { | ||
...expression, | ||
operator: fAssignmentOperator(expression.operator, (0, range_1.toRange)(expression)), | ||
operator: fAssignmentOperator(expression.operator), | ||
left, | ||
@@ -154,2 +148,3 @@ right: fExpression(expression.right), | ||
} | ||
exports.fMemberExpression = fMemberExpression; | ||
function fNewExpression(expression) { | ||
@@ -167,5 +162,5 @@ return { | ||
if (prop.type === 'SpreadElement') { | ||
throw new ScriptError_1.ScriptError("'SpreadElement' is not supported", (0, range_1.toRange)(expression)); | ||
return { isSpread: true, argument: fExpression(prop.argument) }; | ||
} | ||
return fProperty(prop); | ||
return { isSpread: false, property: fProperty(prop) }; | ||
}), | ||
@@ -209,2 +204,3 @@ }; | ||
} | ||
exports.fProperty = fProperty; | ||
function fSimpleCallExpression(expression) { | ||
@@ -233,2 +229,19 @@ return { | ||
} | ||
function fUpdateExpression(expression) { | ||
switch (expression.argument.type) { | ||
case 'Identifier': | ||
return { | ||
...expression, | ||
argument: expression.argument, | ||
}; | ||
case 'MemberExpression': | ||
return { | ||
...expression, | ||
argument: fMemberExpression(expression.argument), | ||
}; | ||
default: | ||
// ここに来る状況があるかどうか不明 | ||
throw new ScriptError_1.ScriptError('Invalid update expression argument', (0, range_1.toRange)(expression)); | ||
} | ||
} | ||
function fExpression(expression) { | ||
@@ -266,2 +279,4 @@ switch (expression.type) { | ||
return fUnaryExpression(expression); | ||
case 'UpdateExpression': | ||
return fUpdateExpression(expression); | ||
default: | ||
@@ -272,2 +287,2 @@ throw new ScriptError_1.ScriptError(`'${expression.type}' is not supported`, (0, range_1.toRange)(expression)); | ||
exports.fExpression = fExpression; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZkV4cHJlc3Npb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZkV4cHJlc3Npb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBdUJBLDZDQUFnRTtBQUNoRSxtQ0FBeUM7QUFDekMsK0NBQTRDO0FBSzVDLFNBQVMsZ0JBQWdCLENBQUMsVUFBMkI7SUFDakQsT0FBTztRQUNILEdBQUcsVUFBVTtRQUNiLFFBQVEsRUFBRSxVQUFVLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRTtZQUNsQyxJQUFJLENBQUMsSUFBSSxJQUFJLEVBQUU7Z0JBQ1gsT0FBTyxDQUFDLENBQUM7YUFDWjtZQUNELElBQUksQ0FBQyxDQ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mVzc2lvbihleHByZXNzaW9uOiBFeHByZXNzaW9uKTogRkV4cHJlc3Npb24ge1xuICAgIHN3aXRjaCAoZXhwcmVzc2lvbi50eXBlKSB7XG4gICAgICAgIGNhc2UgJ0FycmF5RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkFycmF5RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnQXJyb3dGdW5jdGlvbkV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZBcnJvd0Z1bnRpb25FeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdBc3NpZ25tZW50RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkFzc2lnbm1lbnRFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdCaW5hcnlFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmQmluYXJ5RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnQ2FsbEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZTaW1wbGVDYWxsRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnQ2hhaW5FeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmQ2hhaW5FeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdDb25kaXRpb25hbEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZDb25kaXRpb25hbEV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ0lkZW50aWZpZXInOlxuICAgICAgICAgICAgcmV0dXJuIGV4cHJlc3Npb247XG4gICAgICAgIGNhc2UgJ0xpdGVyYWwnOlxuICAgICAgICAgICAgcmV0dXJuIGZMaXRlcmFsKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdMb2dpY2FsRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkxvZ2ljYWxFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdNZW1iZXJFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmTWVtYmVyRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnTmV3RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZk5ld0V4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ09iamVjdEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZPYmplY3RFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdUaGlzRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZXhwcmVzc2lvbjtcbiAgICAgICAgY2FzZSAnVW5hcnlFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmVW5hcnlFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgdGhyb3cgbmV3IFNjcmlwdEVycm9yKGAnJHtleHByZXNzaW9uLnR5cGV9JyBpcyBub3Qgc3VwcG9ydGVkYCwgdG9SYW5nZShleHByZXNzaW9uKSk7XG4gICAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZkV4cHJlc3Npb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZkV4cHJlc3Npb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBd0JBLHlDQUFnRDtBQUNoRCw2Q0FBZ0U7QUFDaEUsbUNBQXlDO0FBQ3pDLCtDQUE0QztBQWU1QyxTQUFTLGdCQUFnQixDQUFDLFVBQTJCO0lBQ2pELE9BQU87UUFDSCxHQUFH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hwcmVzc2lvbjtcbiAgICAgIH1cbiAgICB8IHtcbiAgICAgICAgICBpc1NwcmVhZDogdHJ1ZTtcbiAgICAgICAgICBhcmd1bWVudDogRkV4cHJlc3Npb247XG4gICAgICB9O1xuXG5leHBvcnQgdHlwZSBGQXJyYXlFeHByZXNzaW9uID0gT21pdDxBcnJheUV4cHJlc3Npb24sICdlbGVtZW50cyc+ICYge1xuICAgIGVsZW1lbnRzOiBBcnJheTxGQXJyYXlFeHByZXNzaW9uRWxlbWVudCB8IG51bGw+O1xufTtcbmZ1bmN0aW9uIGZBcnJheUV4cHJlc3Npb24oZXhwcmVzc2lvbjogQXJyYXlFeHByZXNzaW9uKTogRkFycmF5RXhwcmVzc2lvbiB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4uZXhwcmVzc2lvbixcbiAgICAgICAgZWxlbWVudHM6IGV4cHJlc3Npb24uZWxlbWVudHMubWFwKGUgPT4ge1xuICAgICAgICAgICAgaWYgKGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGUudHlwZSA9PT0gJ1NwcmVhZEVsZW1lbnQnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgaXNTcHJlYWQ6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIGFyZ3VtZW50OiBmRXhwcmVzc2lvbihlLmFyZ3VtZW50KSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgaXNTcHJlYWQ6IGZhbHNlLCBleHByZXNzaW9uOiBmRXhwcmVzc2lvbihlKSB9O1xuICAgICAgICB9KSxcbiAgICB9O1xufVxuXG5leHBvcnQgdHlwZSBGQXJyb3dGdW5jdGlvbkV4cHJlc3Npb24gPSBPbWl0PEFycm93RnVuY3Rpb25FeHByZXNzaW9uLCAnYm9keScgfCAncGFyYW1zJz4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gcmV0dXJuIHtcbiAgICAgICAgLi4uZXhwcmVzc2lvbixcbiAgICAgICAgb3BlcmF0b3I6IGZVbmFyeU9wZXJhdG9yKGV4cHJlc3Npb24ub3BlcmF0b3IsIHRvUmFuZ2UoZXhwcmVzc2lvbikpLFxuICAgICAgICBhcmd1bWVudDogZkV4cHJlc3Npb24oZXhwcmVzc2lvbi5hcmd1bWVudCksXG4gICAgfTtcbn1cblxuZXhwb3J0IHR5cGUgRlVwZGF0ZUV4cHJlc3Npb24gPSBPbWl0PFVwZGF0ZUV4cHJlc3Npb24sICdhcmd1bWVudCc+ICYge1xuICAgIGFyZ3VtZW50OiBGSWRlbnRpZmllciB8IEZNZW1iZXJFeHByZXNzaW9uO1xufTtcbmZ1bmN0aW9uIGZVcGRhdGVFeHByZXNzaW9uKGV4cHJlc3Npb246IFVwZGF0ZUV4cHJlc3Npb24pOiBGVXBkYXRlRXhwcmVzc2lvbiB7XG4gICAgc3dpdGNoIChleHByZXNzaW9uLmFyZ3VtZW50LnR5cGUpIHtcbiAgICAgICAgY2FzZSAnSWRlbnRpZmllcic6XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLmV4cHJlc3Npb24sXG4gICAgICAgICAgICAgICAgYXJndW1lbnQ6IGV4cHJlc3Npb24uYXJndW1lbnQsXG4gICAgICAgICAgICB9O1xuICAgICAgICBjYXNlICdNZW1iZXJFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLi4uZXhwcmVzc2lvbixcbiAgICAgICAgICAgICAgICBhcmd1bWVudDogZk1lbWJlckV4cHJlc3Npb24oZXhwcmVzc2lvbi5hcmd1bWVudCksXG4gICAgICAgICAgICB9O1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgLy8g44GT44GT44Gr5p2l44KL54q25rOB44GM44GC44KL44GL44Gp44GG44GL5LiN5piOXG4gICAgICAgICAgICB0aHJvdyBuZXcgU2NyaXB0R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cbiAgICAgICAgICAgIHJldHVybiBmQXNzaWdubWVudEV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ0JpbmFyeUV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZCaW5hcnlFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdDYWxsRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZlNpbXBsZUNhbGxFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdDaGFpbkV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZDaGFpbkV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ0NvbmRpdGlvbmFsRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkNvbmRpdGlvbmFsRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnSWRlbnRpZmllcic6XG4gICAgICAgICAgICByZXR1cm4gZXhwcmVzc2lvbjtcbiAgICAgICAgY2FzZSAnTGl0ZXJhbCc6XG4gICAgICAgICAgICByZXR1cm4gZkxpdGVyYWwoZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ0xvZ2ljYWxFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmTG9naWNhbEV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ01lbWJlckV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZNZW1iZXJFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdOZXdFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmTmV3RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnT2JqZWN0RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZk9iamVjdEV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ1RoaXNFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBleHByZXNzaW9uO1xuICAgICAgICBjYXNlICdVbmFyeUV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZVbmFyeUV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ1VwZGF0ZUV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZVcGRhdGVFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgdGhyb3cgbmV3IFNjcmlwdEVycm9yKGAnJHtleHByZXNzaW9uLnR5cGV9JyBpcyBub3Qgc3VwcG9ydGVkYCwgdG9SYW5nZShleHByZXNzaW9uKSk7XG4gICAgfVxufVxuIl19 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fFStatement = exports.fBlockStatement = void 0; | ||
exports.fStatement = exports.fBlockStatement = void 0; | ||
const fExpression_1 = require("./fExpression"); | ||
const fPattern_1 = require("./fPattern"); | ||
const range_1 = require("./range"); | ||
@@ -10,3 +11,3 @@ const ScriptError_1 = require("./ScriptError"); | ||
...statement, | ||
body: statement.body.map(x => fFStatement(x)), | ||
body: statement.body.map(x => fStatement(x)), | ||
}; | ||
@@ -26,7 +27,5 @@ } | ||
const declarations = statement.declarations.map(d => { | ||
if (d.id.type !== 'Identifier') { | ||
throw new ScriptError_1.ScriptError(`'${d.id.type}' is not supported`, (0, range_1.toRange)(d.id)); | ||
} | ||
return { | ||
...d, | ||
id: (0, fPattern_1.fPattern)(d.id), | ||
init: d.init == null ? d.init : (0, fExpression_1.fExpression)(d.init), | ||
@@ -41,3 +40,3 @@ }; | ||
}; | ||
function fFStatement(statement) { | ||
function fStatement(statement) { | ||
switch (statement.type) { | ||
@@ -47,7 +46,41 @@ case 'BlockStatement': | ||
case 'BreakStatement': | ||
if (statement.label != null) { | ||
throw new ScriptError_1.ScriptError('labels are not supported'); | ||
} | ||
return statement; | ||
case 'ContinueStatement': | ||
if (statement.label != null) { | ||
throw new ScriptError_1.ScriptError('labels are not supported'); | ||
} | ||
return statement; | ||
case 'ExpressionStatement': | ||
return fExpressionStatement(statement); | ||
case 'ForOfStatement': | ||
return { | ||
...statement, | ||
left: statement.left.type === 'VariableDeclaration' | ||
? fVariableDeclaration(statement.left) | ||
: (0, fPattern_1.fPattern)(statement.left), | ||
right: (0, fExpression_1.fExpression)(statement.right), | ||
body: fStatement(statement.body), | ||
}; | ||
case 'ForStatement': { | ||
let init; | ||
if (statement.init == null) { | ||
init = statement.init; | ||
} | ||
else if (statement.init.type === 'VariableDeclaration') { | ||
init = fVariableDeclaration(statement.init); | ||
} | ||
else { | ||
init = (0, fExpression_1.fExpression)(statement.init); | ||
} | ||
return { | ||
...statement, | ||
init, | ||
test: statement.test == null ? statement.test : (0, fExpression_1.fExpression)(statement.test), | ||
update: statement.update == null ? statement.update : (0, fExpression_1.fExpression)(statement.update), | ||
body: fStatement(statement.body), | ||
}; | ||
} | ||
case 'IfStatement': | ||
@@ -58,4 +91,4 @@ return { | ||
? statement.alternate | ||
: fFStatement(statement.alternate), | ||
consequent: fFStatement(statement.consequent), | ||
: fStatement(statement.alternate), | ||
consequent: fStatement(statement.consequent), | ||
test: (0, fExpression_1.fExpression)(statement.test), | ||
@@ -70,3 +103,3 @@ }; | ||
}; | ||
case 'SwitchStatement': | ||
case 'SwitchStatement': { | ||
return { | ||
@@ -76,3 +109,3 @@ ...statement, | ||
...c, | ||
consequent: c.consequent.map(s => fFStatement(s)), | ||
consequent: c.consequent.map(s => fStatement(s)), | ||
test: c.test == null ? c.test : (0, fExpression_1.fExpression)(c.test), | ||
@@ -82,2 +115,3 @@ })), | ||
}; | ||
} | ||
case 'VariableDeclaration': | ||
@@ -89,3 +123,3 @@ return fVariableDeclaration(statement); | ||
} | ||
exports.fFStatement = fFStatement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ICAgICAgYWx0ZXJuYXRlOlxuICAgICAgICAgICAgICAgICAgICBzdGF0ZW1lbnQuYWx0ZXJuYXRlID09IG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgID8gc3RhdGVtZW50LmFsdGVybmF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBmRlN0YXRlbWVudChzdGF0ZW1lbnQuYWx0ZXJuYXRlKSxcbiAgICAgICAgICAgICAgICBjb25zZXF1ZW50OiBmRlN0YXRlbWVudChzdGF0ZW1lbnQuY29uc2VxdWVudCksXG4gICAgICAgICAgICAgICAgdGVzdDogZkV4cHJlc3Npb24oc3RhdGVtZW50LnRlc3QpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgY2FzZSAnUmV0dXJuU3RhdGVtZW50JzpcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVtZW50LFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50OlxuICAgICAgICAgICAgICAgICAgICBzdGF0ZW1lbnQuYXJndW1lbnQgPT0gbnVsbFxuICAgICAgICAgICAgICAgICAgICAgICAgPyBzdGF0ZW1lbnQuYXJndW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIDogZkV4cHJlc3Npb24oc3RhdGVtZW50LmFyZ3VtZW50KSxcbiAgICAgICAgICAgIH07XG4gICAgICAgIGNhc2UgJ1N3aXRjaFN0YXRlbWVudCc6XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlbWVudCxcbiAgICAgICAgICAgICAgICBjYXNlczogc3RhdGVtZW50LmNhc2VzLm1hcChjID0+ICh7XG4gICAgICAgICAgICAgICAgICAgIC4uLmMsXG4gICAgICAgICAgICAgICAgICAgIGNvbnNlcXVlbnQ6IGMuY29uc2VxdWVudC5tYXAocyA9PiBmRlN0YXRlbWVudChzKSksXG4gICAgICAgICAgICAgICAgICAgIHRlc3Q6IGMudGVzdCA9PSBudWxsID8gYy50ZXN0IDogZkV4cHJlc3Npb24oYy50ZXN0KSxcbiAgICAgICAgICAgICAgICB9KSksXG4gICAgICAgICAgICAgICAgZGlzY3JpbWluYW50OiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQuZGlzY3JpbWluYW50KSxcbiAgICAgICAgICAgIH07XG4gICAgICAgIGNhc2UgJ1ZhcmlhYmxlRGVjbGFyYXRpb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZWYXJpYWJsZURlY2xhcmF0aW9uKHN0YXRlbWVudCk7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoYCcke3N0YXRlbWVudC50eXBlfScgaXMgbm90IHN1cHBvcnRlZGAsIHRvUmFuZ2Uoc3RhdGVtZW50KSk7XG4gICAgfVxufVxuIl19 | ||
exports.fStatement = fStatement; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZlN0YXRlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mU3RhdGVtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWdCQSwrQ0FBeUQ7QUFDekQseUNBQWdEO0FBQ2hELG1DQUFrQztBQUNsQywrQ0FBNEM7QUFZNUMsU0FBZ0IsZUFBZSxDQUFDLFNBQXlCO0lBQ3JELE9BQU87UUFDSCxHQUFHLFNBQVM7UUFDWixJQUFJLEVBQUUsU0FBUyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUM7S0FDL0MsQ0FBQztBQUNOLENBQUM7QUFMRCwwQ0FLQztBQU1ELE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxTQUE4QixFQUFFLEVBQUU7SUFDNUQsT0FBTztRQUNILEdBQUcsU0FBUztRQUNaLFVBQVUsRUFBR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jYXNlICdCbG9ja1N0YXRlbWVudCc6XG4gICAgICAgICAgICByZXR1cm4gZkJsb2NrU3RhdGVtZW50KHN0YXRlbWVudCk7XG4gICAgICAgIGNhc2UgJ0JyZWFrU3RhdGVtZW50JzpcbiAgICAgICAgICAgIGlmIChzdGF0ZW1lbnQubGFiZWwgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcignbGFiZWxzIGFyZSBub3Qgc3VwcG9ydGVkJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGVtZW50O1xuICAgICAgICBjYXNlICdDb250aW51ZVN0YXRlbWVudCc6XG4gICAgICAgICAgICBpZiAoc3RhdGVtZW50LmxhYmVsICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoJ2xhYmVscyBhcmUgbm90IHN1cHBvcnRlZCcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YXRlbWVudDtcbiAgICAgICAgY2FzZSAnRXhwcmVzc2lvblN0YXRlbWVudCc6XG4gICAgICAgICAgICByZXR1cm4gZkV4cHJlc3Npb25TdGF0ZW1lbnQoc3RhdGVtZW50KTtcbiAgICAgICAgY2FzZSAnRm9yT2ZTdGF0ZW1lbnQnOlxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgbGVmdDpcbiAgICAgICAgICAgICAgICAgICAgc3RhdGVtZW50LmxlZnQudHlwZSA9PT0gJ1ZhcmlhYmxlRGVjbGFyYXRpb24nXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGZWYXJpYWJsZURlY2xhcmF0aW9uKHN0YXRlbWVudC5sZWZ0KVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBmUGF0dGVybihzdGF0ZW1lbnQubGVmdCksXG4gICAgICAgICAgICAgICAgcmlnaHQ6IGZFeHByZXNzaW9uKHN0YXRlbWVudC5yaWdodCksXG4gICAgICAgICAgICAgICAgYm9keTogZlN0YXRlbWVudChzdGF0ZW1lbnQuYm9keSksXG4gICAgICAgICAgICB9O1xuICAgICAgICBjYXNlICdGb3JTdGF0ZW1lbnQnOiB7XG4gICAgICAgICAgICBsZXQgaW5pdDogRkZvclN0YXRlbWVudFsnaW5pdCddO1xuICAgICAgICAgICAgaWYgKHN0YXRlbWVudC5pbml0ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpbml0ID0gc3RhdGVtZW50LmluaXQ7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXRlbWVudC5pbml0LnR5cGUgPT09ICdWYXJpYWJsZURlY2xhcmF0aW9uJykge1xuICAgICAgICAgICAgICAgIGluaXQgPSBmVmFyaWFibGVEZWNsYXJhdGlvbihzdGF0ZW1lbnQuaW5pdCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGluaXQgPSBmRXhwcmVzc2lvbihzdGF0ZW1lbnQuaW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlbWVudCxcbiAgICAgICAgICAgICAgICBpbml0LFxuICAgICAgICAgICAgICAgIHRlc3Q6IHN0YXRlbWVudC50ZXN0ID09IG51bGwgPyBzdGF0ZW1lbnQudGVzdCA6IGZFeHByZXNzaW9uKHN0YXRlbWVudC50ZXN0KSxcbiAgICAgICAgICAgICAgICB1cGRhdGU6IHN0YXRlbWVudC51cGRhdGUgPT0gbnVsbCA/IHN0YXRlbWVudC51cGRhdGUgOiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQudXBkYXRlKSxcbiAgICAgICAgICAgICAgICBib2R5OiBmU3RhdGVtZW50KHN0YXRlbWVudC5ib2R5KSxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSAnSWZTdGF0ZW1lbnQnOlxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgYWx0ZXJuYXRlOlxuICAgICAgICAgICAgICAgICAgICBzdGF0ZW1lbnQuYWx0ZXJuYXRlID09IG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgID8gc3RhdGVtZW50LmFsdGVybmF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBmU3RhdGVtZW50KHN0YXRlbWVudC5hbHRlcm5hdGUpLFxuICAgICAgICAgICAgICAgIGNvbnNlcXVlbnQ6IGZTdGF0ZW1lbnQoc3RhdGVtZW50LmNvbnNlcXVlbnQpLFxuICAgICAgICAgICAgICAgIHRlc3Q6IGZFeHByZXNzaW9uKHN0YXRlbWVudC50ZXN0KSxcbiAgICAgICAgICAgIH07XG4gICAgICAgIGNhc2UgJ1JldHVyblN0YXRlbWVudCc6XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlbWVudCxcbiAgICAgICAgICAgICAgICBhcmd1bWVudDpcbiAgICAgICAgICAgICAgICAgICAgc3RhdGVtZW50LmFyZ3VtZW50ID09IG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgID8gc3RhdGVtZW50LmFyZ3VtZW50XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGZFeHByZXNzaW9uKHN0YXRlbWVudC5hcmd1bWVudCksXG4gICAgICAgICAgICB9O1xuICAgICAgICBjYXNlICdTd2l0Y2hTdGF0ZW1lbnQnOiB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlbWVudCxcbiAgICAgICAgICAgICAgICBjYXNlczogc3RhdGVtZW50LmNhc2VzLm1hcChjID0+ICh7XG4gICAgICAgICAgICAgICAgICAgIC4uLmMsXG4gICAgICAgICAgICAgICAgICAgIGNvbnNlcXVlbnQ6IGMuY29uc2VxdWVudC5tYXAocyA9PiBmU3RhdGVtZW50KHMpKSxcbiAgICAgICAgICAgICAgICAgICAgdGVzdDogYy50ZXN0ID09IG51bGwgPyBjLnRlc3QgOiBmRXhwcmVzc2lvbihjLnRlc3QpLFxuICAgICAgICAgICAgICAgIH0pKSxcbiAgICAgICAgICAgICAgICBkaXNjcmltaW5hbnQ6IGZFeHByZXNzaW9uKHN0YXRlbWVudC5kaXNjcmltaW5hbnQpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBjYXNlICdWYXJpYWJsZURlY2xhcmF0aW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmVmFyaWFibGVEZWNsYXJhdGlvbihzdGF0ZW1lbnQpO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgdGhyb3cgbmV3IFNjcmlwdEVycm9yKGAnJHtzdGF0ZW1lbnQudHlwZX0nIGlzIG5vdCBzdXBwb3J0ZWRgLCB0b1JhbmdlKHN0YXRlbWVudCkpO1xuICAgIH1cbn1cbiJdfQ== |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ScriptError = exports.toTypeName = exports.FType = exports.FSymbol = exports.FString = exports.FRecord = exports.FObject = exports.FNumber = exports.FMap = exports.FFunction = exports.FBoolean = exports.FTypedArray = exports.FArray = exports.toFValue = exports.beginCast = exports.symbolClass = exports.mapClass = exports.arrayClass = exports.test = exports.exec = void 0; | ||
exports.ScriptError = exports.toTypeName = exports.FType = exports.FSymbol = exports.FString = exports.FRecord = exports.FObject = exports.FNumber = exports.FMap = exports.FFunction = exports.FBoolean = exports.FTypedArray = exports.FArray = exports.toFValue = exports.beginCast = exports.symbolClass = exports.mapClass = exports.createConsoleClass = exports.arrayClass = exports.test = exports.exec = void 0; | ||
var main_1 = require("./main"); | ||
@@ -9,2 +9,4 @@ Object.defineProperty(exports, "exec", { enumerable: true, get: function () { return main_1.exec; } }); | ||
Object.defineProperty(exports, "arrayClass", { enumerable: true, get: function () { return Array_1.arrayClass; } }); | ||
var console_1 = require("./builtIn/console"); | ||
Object.defineProperty(exports, "createConsoleClass", { enumerable: true, get: function () { return console_1.createConsoleClass; } }); | ||
var Map_1 = require("./builtIn/Map"); | ||
@@ -43,2 +45,2 @@ Object.defineProperty(exports, "mapClass", { enumerable: true, get: function () { return Map_1.mapClass; } }); | ||
Object.defineProperty(exports, "ScriptError", { enumerable: true, get: function () { return ScriptError_1.ScriptError; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0JBQW9DO0FBQTNCLDRGQUFBLElBQUksT0FBQTtBQUFFLDRGQUFBLElBQUksT0FBQTtBQUNuQix5Q0FBNkM7QUFBcEMsbUdBQUEsVUFBVSxPQUFBO0FBQ25CLHFDQUF5QztBQUFoQywrRkFBQSxRQUFRLE9BQUE7QUFDakIsMkNBQStDO0FBQXRDLHFHQUFBLFdBQVcsT0FBQTtBQVdwQiwyQ0FBK0M7QUFBdEMsaUdBQUEsU0FBUyxPQUFBO0FBQ2xCLG1EQUFrRDtBQUF6QyxvR0FBQSxRQUFRLE9BQUE7QUFDakIsK0NBQTJEO0FBQWxELGdHQUFBLE1BQU0sT0FBQTtBQUFFLHFHQUFBLFdBQVcsT0FBQTtBQUM1QixtREFBa0Q7QUFBekMsb0dBQUEsUUFBUSxPQUFBO0FBQ2pCLHFEQUFvRDtBQUEzQyxzR0FBQSxTQUFTLE9BQUE7QUFDbEIsMkNBQTBDO0FBQWpDLDRGQUFBLElBQUksT0FBQTtBQUNiLGlEQUFnRDtBQUF2QyxrR0FBQSxPQUFPLE9BQUE7QUFDaEIsaURBQWdEO0FBQXZDLGtHQUFBLE9BQU8sT0FBQTtBQUNoQixpREFBZ0Q7QUFBdkMsa0dBQUEsT0FBTyxPQUFBO0FBQ2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YWx1ZS9GVHlwZSc7XG5leHBvcnQgeyBGVmFsdWUgfSBmcm9tICcuL3NjcmlwdFZhbHVlL0ZWYWx1ZSc7XG5leHBvcnQgeyB0b1R5cGVOYW1lIH0gZnJvbSAnLi9zY3JpcHRWYWx1ZS90b1R5cGVOYW1lJztcblxuZXhwb3J0IHsgU2NyaXB0RXJyb3IgfSBmcm9tICcuL1NjcmlwdEVycm9yJztcbiJdfQ== |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compareToNumberOrString = exports.compareToBoolean = exports.compareToNumber = void 0; | ||
const toJObject_1 = require("../utils/toJObject"); | ||
const FBoolean_1 = require("./FBoolean"); | ||
@@ -9,2 +10,5 @@ const FNumber_1 = require("./FNumber"); | ||
const compare = (left, right, hint, comparer) => { | ||
if (hint === 'JObject') { | ||
return comparer((0, toJObject_1.toJObject)(left), (0, toJObject_1.toJObject)(right)); | ||
} | ||
return comparer((0, toPrimitive_1.toPrimitive)(left, hint), (0, toPrimitive_1.toPrimitive)(right, hint)); | ||
@@ -28,2 +32,2 @@ }; | ||
exports.compareToNumberOrString = compareToNumberOrString; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zY3JpcHRWYWx1ZS9jb21wYXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlDQUFzQztBQUN0Qyx1Q0FBb0M7QUFDcEMsdUNBQW9DO0FBRXBDLCtDQUE0QztBQUU1QyxNQUFNLE9BQU8sR0FBRyxDQUNaLElBQVksRUFDWixLQUFhLEVBQ2IsSUFBcUMsRUFDckMsUUFBOEMsRUFDN0MsRUFBRTtJQUNILE9BQU8sUUFBUSxDQUFDLElBQUEseUJBQVcsRUFBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLEVBQUUsSUFBQSx5Q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||
return this.source.map(x => this.convert(x)); | ||
} | ||
iterate() { | ||
return (0, mapIterator_1.mapIterator)(this.source[Symbol.iterator](), x => this.convert(x)); | ||
} | ||
static isValidIndex(index) { | ||
@@ -55,3 +58,3 @@ if (index == null || typeof index === 'symbol') { | ||
const predicate = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false); | ||
const raw = this.iterate().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
const raw = this.iterateAsArray().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
return FArray.create(raw); | ||
@@ -63,3 +66,3 @@ }); | ||
const predicate = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false); | ||
const raw = this.iterate().find((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
const raw = this.iterateAsArray().find((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
return raw; | ||
@@ -71,3 +74,3 @@ }); | ||
const callbackfn = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false); | ||
this.iterate().forEach((value, index) => callbackfn([value, new FNumber_1.FNumber(index)])); | ||
this.iterateAsArray().forEach((value, index) => callbackfn([value, new FNumber_1.FNumber(index)])); | ||
return undefined; | ||
@@ -79,3 +82,3 @@ }); | ||
const mapping = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false); | ||
const raw = this.iterate().map((value, index) => mapping([value, new FNumber_1.FNumber(index)])); | ||
const raw = this.iterateAsArray().map((value, index) => mapping([value, new FNumber_1.FNumber(index)])); | ||
return FArray.create(raw); | ||
@@ -131,3 +134,3 @@ }); | ||
toPrimitiveAsString() { | ||
return this.iterate() | ||
return this.iterateAsArray() | ||
.map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsString()) | ||
@@ -137,7 +140,7 @@ .toString(); | ||
toPrimitiveAsNumber() { | ||
return +this.iterate().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber()); | ||
return +this.iterateAsArray().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber()); | ||
} | ||
// 正確な型が表現できないのでunknown[]としている | ||
toJObject() { | ||
return this.iterate().map(x => (x == null ? x : x.toJObject())); | ||
return this.iterateAsArray().map(x => (x == null ? x : x.toJObject())); | ||
} | ||
@@ -152,2 +155,2 @@ } | ||
exports.FTypedArray = FTypedArray; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZBcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxnREFBNkM7QUFDN0Msc0RBQW1EO0FBQ25ELGlDQUFtQztBQUNuQywyQ0FBd0M7QUFDeEMsMkNBQXdDO0FBQ3hDLHVDQUFvQztBQUNwQyxtQ0FBZ0M7QUFFaEMscURBQWtEO0FBQ2xELDJEQUF3RDtBQUd4RCxNQUFhLE1BQU07SUFDZixZQUNxQixNQUFpQixFQUNqQixPQUFtQyxFQUNuQyxXQUFxRTtRQUZyRSxXQUFNLEdBQU4sTUFBTSxDQUFXO1FBQ2pCLFlBQU8sR0FBUCxPQUFPLENBQTRCO1FBQ25DLGdCQUFXLEdBQVgsV0FBVyxDQUEwRDtJQUN2RixDQUFDO0lBRUksTUFBTSxDQUFDLHFCQUFxQixDQUFDLEtBQWMsRUFBRSxPQUE0QjtRQUM3RSxJQUFJLEtBQUssRUFBRTtZQUNQLE1BQU0seUJBQVcsQ0FBQyxtQkFBbUIsQ0FBQyxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsS0FBSy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dGUgc3RhdGljIGlzVmFsaWRJbmRleChpbmRleDogc3RyaW5nIHwgc3ltYm9sIHwgdW5kZWZpbmVkKTogYm9vbGVhbiB7XG4gICAgICAgIGlmIChpbmRleCA9PSBudWxsIHx8IHR5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaW5kZXggPT09ICcwJyB8fCAvXlsxLTldWzAtOV0qJC8udGVzdChpbmRleCk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldCh7IHByb3BlcnR5LCBhc3RJbmZvIH06IEdldFBhcmFtcyk6IEZWYWx1ZSB7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdHJ5VG9Qcm9wZXJ0eU5hbWUocHJvcGVydHkpO1xuICAgICAgICBpZiAoRkFycmF5LmlzVmFsaWRJbmRleChpbmRleCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvdW5kID0gdGhpcy5zb3VyY2VbaW5kZXggYXMgdW5rbm93biBhcyBudW1iZXJdO1xuICAgICAgICAgICAgaWYgKGZvdW5kID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChmb3VuZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgcHJvcGVydHlOYW1lID0gaW5kZXg7XG4gICAgICAgIHN3aXRjaCAocHJvcGVydHlOYW1lKSB7XG4gICAgICAgICAgICBjYXNlICdmaWx0ZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZWRpY2F0ZSA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMuaXRlcmF0ZSgpLmZpbHRlcigodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmaW5kJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVkaWNhdGUgPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYXcgPSB0aGlzLml0ZXJhdGUoKS5maW5kKCh2YWx1ZSwgaW5kZXgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmVkaWNhdGUoW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKT8udG9KT2JqZWN0KClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJhdztcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2ZvckVhY2gnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrZm4gPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLml0ZXJhdGUoKS5mb3JFYWNoKCh2YWx1ZSwgaW5kZXgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ21hcCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWFwcGluZyA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMuaXRlcmF0ZSgpLm1hcCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyhbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwb3AnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwdXNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLmZvckVhY2goYXJnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UucHVzaChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ3NoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICd1bnNoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLnJlZHVjZVJpZ2h0PHZvaWQ+KChzZWVkLCBhcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UudW5zaGlmdChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRk51bWJlcih0aGlzLnNvdXJjZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSBTeW1ib2wuaXRlcmF0b3I6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gdGhpcy5zb3VyY2VbU3ltYm9sLml0ZXJhdG9yXSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkl0ZXJhdG9yLmNyZWF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ZlQXNOdW1iZXIoKSk7XG4gICAgfVxuXG4gICAgLy8g5q2j56K644Gq5Z6L44GM6KGo54++44Gn44GN44Gq44GE44Gu44GndW5rbm93bltd44Go44GX44Gm44GE44KLXG4gICAgcHVibGljIHRvSk9iamVjdCgpOiB1bmtub3duW10ge1xuICAgICAgICByZXR1cm4gdGhpcy5pdGVyYXRlKCkubWFwKHggPT4gKHggPT0gbnVsbCA/IHggOiB4LnRvSk9iamVjdCgpKSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRlR5cGVkQXJyYXk8VD4gZXh0ZW5kcyBGQXJyYXkge1xuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICAgICAgc291cmNlOiBUW10sXG4gICAgICAgIGNvbnZlcnQ6ICh2YWx1ZTogVCkgPT4gRlZhbHVlLFxuICAgICAgICBjb252ZXJ0QmFjazogKHZhbHVlOiBGVmFsdWUsIGFzdEluZm86IEFzdEluZm8gfCB1bmRlZmluZWQpID0+IFRcbiAgICApIHtcbiAgICAgICAgc3VwZXIoc291cmNlLCB2YWx1ZSA9PiBjb252ZXJ0KHZhbHVlIGFzIFQpLCBjb252ZXJ0QmFjayk7XG4gICAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZBcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxnREFBNkM7QUFDN0Msc0RBQW1EO0FBQ25ELGlDQUFtQztBQUNuQywyQ0FBd0M7QUFDeEMsMkNBQXdDO0FBQ3hDLHVDQUFvQztBQUNwQyxtQ0FBZ0M7QUFFaEMscURBQWtEO0FBQ2xELDJEQUF3RDtBQUd4RCxNQUFhLE1BQU07SUFDZixZQUNxQixNQUFpQixFQUNqQixPQUFtQyxFQUNuQyx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KHsgcHJvcGVydHksIGFzdEluZm8gfTogR2V0UGFyYW1zKTogRlZhbHVlIHtcbiAgICAgICAgY29uc3QgaW5kZXggPSB0cnlUb1Byb3BlcnR5TmFtZShwcm9wZXJ0eSk7XG4gICAgICAgIGlmIChGQXJyYXkuaXNWYWxpZEluZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgY29uc3QgZm91bmQgPSB0aGlzLnNvdXJjZVtpbmRleCBhcyB1bmtub3duIGFzIG51bWJlcl07XG4gICAgICAgICAgICBpZiAoZm91bmQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KGZvdW5kKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBwcm9wZXJ0eU5hbWUgPSBpbmRleDtcbiAgICAgICAgc3dpdGNoIChwcm9wZXJ0eU5hbWUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2ZpbHRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlZGljYXRlID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZpbHRlcigodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmaW5kJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVkaWNhdGUgPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYXcgPSB0aGlzLml0ZXJhdGVBc0FycmF5KCkuZmluZCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByYXc7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmb3JFYWNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZvckVhY2goKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnbWFwJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXBwaW5nID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLm1hcCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyhbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwb3AnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwdXNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLmZvckVhY2goYXJnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UucHVzaChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ3NoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICd1bnNoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLnJlZHVjZVJpZ2h0PHZvaWQ+KChzZWVkLCBhcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UudW5zaGlmdChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRk51bWJlcih0aGlzLnNvdXJjZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSBTeW1ib2wuaXRlcmF0b3I6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gdGhpcy5zb3VyY2VbU3ltYm9sLml0ZXJhdG9yXSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkl0ZXJhdG9yLmNyZWF0ZShtYXBJdGVyYXRvcihzb3VyY2UsIHggPT4gdGhpcy5jb252ZXJ0KHgpKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0KHsgcHJvcGVydHksIG5ld1ZhbHVlLCBhc3RJbmZvIH06IFNldFBhcmFtcyk6IHZvaWQge1xuICAgICAgICBjb25zdCBpbmRleCA9IHRvUHJvcGVydHlOYW1lKHByb3BlcnR5LCBhc3RJbmZvKTtcbiAgICAgICAgaWYgKEZBcnJheS5pc1ZhbGlkSW5kZXgoaW5kZXgpKSB7XG4gICAgICAgICAgICB0aGlzLnNvdXJjZVtpbmRleCBhcyB1bmtub3duIGFzIG51bWJlcl0gPSB0aGlzLmNvbnZlcnRCYWNrKG5ld1ZhbHVlLCBhc3RJbmZvKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoXG4gICAgICAgICAgICBgXCIke3R5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcgPyAnc3ltYm9sJyA6IGluZGV4fVwiIGlzIG5vdCBzdXBwb3J0ZWRgLFxuICAgICAgICAgICAgYXN0SW5mbz8ucmFuZ2VcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgdG9QcmltaXRpdmVBc1N0cmluZygpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5pdGVyYXRlQXNBcnJheSgpXG4gICAgICAgICAgICAubWFwKHggPT4geD8udG9QcmltaXRpdmVBc1N0cmluZygpKVxuICAgICAgICAgICAgLnRvU3RyaW5nKCk7XG4gICAgfVxuXG4gICAgcHVibGljIHRvUHJpbWl0aXZlQXNOdW1iZXIoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuICt0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4geD8udG9QcmltaXRpdmVBc051bWJlcigpKTtcbiAgICB9XG5cbiAgICAvLyDmraPnorrjgarlnovjgYzooajnj77jgafjgY3jgarjgYTjga7jgad1bmtub3duW13jgajjgZfjgabjgYTjgotcbiAgICBwdWJsaWMgdG9KT2JqZWN0KCk6IHVua25vd25bXSB7XG4gICAgICAgIHJldHVybiB0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4gKHggPT0gbnVsbCA/IHggOiB4LnRvSk9iamVjdCgpKSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRlR5cGVkQXJyYXk8VD4gZXh0ZW5kcyBGQXJyYXkge1xuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICAgICAgc291cmNlOiBUW10sXG4gICAgICAgIGNvbnZlcnQ6ICh2YWx1ZTogVCkgPT4gRlZhbHVlLFxuICAgICAgICBjb252ZXJ0QmFjazogKHZhbHVlOiBGVmFsdWUsIGFzdEluZm86IEFzdEluZm8gfCB1bmRlZmluZWQpID0+IFRcbiAgICApIHtcbiAgICAgICAgc3VwZXIoc291cmNlLCB2YWx1ZSA9PiBjb252ZXJ0KHZhbHVlIGFzIFQpLCBjb252ZXJ0QmFjayk7XG4gICAgfVxufVxuIl19 |
@@ -57,2 +57,5 @@ "use strict"; | ||
} | ||
iterate() { | ||
return (0, mapIterator_1.mapIterator)(this.source, x => this.convertValue(x)); | ||
} | ||
toPrimitiveAsString() { | ||
@@ -70,2 +73,2 @@ // JavaScriptでは例えば配列由来なら'[object Array Iterator]'となる(ChromeとFirefoxで確認)が、ここでは実装を簡略化するためにすべてIteratorとしている | ||
exports.FIterator = FIterator; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkl0ZXJhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZJdGVyYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1Q0FBb0M7QUFDcEMsZ0RBQTZDO0FBQzdDLDJDQUF3QztBQUN4QyxtQ0FBZ0M7QUFHaEMseUNBQXNDO0FBQ3RDLHVDQUFvQztBQUNwQyx1Q0FBb0M7QUFDcEMsa0RBQStDO0FBQy9DLHNEQUFtRDtBQUVuRCxNQUFhLFNBQVUsU0FBUSxpQkFBTztJQUNsQyxZQUNxQixNQUFpQyxFQUNqQyxZQUF3QztRQUV6RCxLQUFLLEVBQUUsQ0FBQztRQUhTLFdBQU0s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VlKG5leHQudmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXN0SW5mbyxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5zZXQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk6IG5ldyBGU3RyaW5nKCdkb25lJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZTogbmV4dC5kb25lID09PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiBuZXcgRkJvb2xlYW4obmV4dC5kb25lKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzdEluZm8sXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIHNldENvcmUocGFyYW1zOiBTZXRDb3JlUGFyYW1zKTogdm9pZCB7XG4gICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcignWW91IGNhbm5vdCBzZXQgYW55IHZhbHVlIHRvIEl0ZXJhdG9yJywgcGFyYW1zLmFzdEluZm8/LnJhbmdlKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgdG9QcmltaXRpdmVBc1N0cmluZygpOiBzdHJpbmcge1xuICAgICAgICAvLyBKYXZhU2NyaXB044Gn44Gv5L6L44GI44Gw6YWN5YiX55Sx5p2l44Gq44KJJ1tvYmplY3QgQXJyYXkgSXRlcmF0b3JdJ+OBqOOBquOCi++8iENocm9tZeOBqEZpcmVmb3jjgafnorroqo3vvInjgYzjgIHjgZPjgZPjgafjga/lrp/oo4XjgpLnsKHnlaXljJbjgZnjgovjgZ/jgoHjgavjgZnjgbnjgaZJdGVyYXRvcuOBqOOBl+OBpuOBhOOCi1xuICAgICAgICByZXR1cm4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Jvcihhc3RJbmZvPy5yYW5nZSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwdWJsaWMgc3RhdGljIGNyZWF0ZShzb3VyY2U6IEl0ZXJhYmxlSXRlcmF0b3I8RlZhbHVlPik6IEZJdGVyYXRvciB7XG4gICAgICAgIHJldHVybiBuZXcgRkl0ZXJhdG9yKHNvdXJjZSwgeCA9PiB4IGFzIEZWYWx1ZSk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldCB0eXBlKCk6IHR5cGVvZiBGVHlwZS5PYmplY3Qge1xuICAgICAgICByZXR1cm4gRlR5cGUuT2JqZWN0O1xuICAgIH1cblxuICAgIHB1YmxpYyBvdmVycmlkZSBnZXRDb3JlKHBhcmFtczogR2V0Q29yZVBhcmFtcyk6IEZWYWx1ZSB7XG4gICAgICAgIGNvbnN0IHsga2V5LCBhc3RJbmZvIH0gPSBwYXJhbXM7XG4gICAgICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgICAgICBjYXNlICduZXh0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZJdGVyYXRvci5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXh0ID0gdGhpcy5zb3VyY2UubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSBuZXcgRlJlY29yZCgpO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuc2V0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiBuZXcgRlN0cmluZygndmFsdWUnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlOiB0aGlzLmNvbnZlcnRWYWx1ZShuZXh0LnZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzdEluZm8sXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuc2V0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiBuZXcgRlN0cmluZygnZG9uZScpLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFsdWU6IG5leHQuZG9uZSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogbmV3IEZCb29sZWFuKG5leHQuZG9uZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBhc3RJbmZvLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cblxuICAgIHB1YmxpYyBvdmVycmlkZSBzZXRDb3JlKHBhcmFtczogU2V0Q29yZVBhcmFtcyk6IHZvaWQge1xuICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoJ1lvdSBjYW5ub3Qgc2V0IGFueSB2YWx1ZSB0byBJdGVyYXRvcicsIHBhcmFtcy5hc3RJbmZvPy5yYW5nZSk7XG4gICAgfVxuXG4gICAgcHVibGljIGl0ZXJhdGUoKTogSXRlcmFibGVJdGVyYXRvcjxGVmFsdWU+IHtcbiAgICAgICAgcmV0dXJuIG1hcEl0ZXJhdG9yKHRoaXMuc291cmNlLCB4ID0+IHRoaXMuY29udmVydFZhbHVlKHgpKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgdG9QcmltaXRpdmVBc1N0cmluZygpOiBzdHJpbmcge1xuICAgICAgICAvLyBKYXZhU2NyaXB044Gn44Gv5L6L44GI44Gw6YWN5YiX55Sx5p2l44Gq44KJJ1tvYmplY3QgQXJyYXkgSXRlcmF0b3JdJ+OBqOOBquOCi++8iENocm9tZeOBqEZpcmVmb3jjgafnorroqo3vvInjgYzjgIHjgZPjgZPjgafjga/lrp/oo4XjgpLnsKHnlaXljJbjgZnjgovjgZ/jgoHjgavjgZnjgbnjgaZJdGVyYXRvcuOBqOOBl+OBpuOBhOOCi1xuICAgICAgICByZXR1cm4gJ1tvYmplY3QgSXRlcmF0b3JdJztcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgdG9QcmltaXRpdmVBc051bWJlcigpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTmFOO1xuICAgIH1cblxuICAgIHB1YmxpYyBvdmVycmlkZSB0b0pPYmplY3QoKTogSXRlcmFibGVJdGVyYXRvcjx1bmtub3duPiB7XG4gICAgICAgIHJldHVybiBtYXBJdGVyYXRvcih0aGlzLnNvdXJjZSwgeCA9PiB0b0pPYmplY3QodGhpcy5jb252ZXJ0VmFsdWUoeCkpKTtcbiAgICB9XG59XG4iXX0= |
@@ -12,2 +12,4 @@ "use strict"; | ||
const FNumber_1 = require("./FNumber"); | ||
const FArray_1 = require("./FArray"); | ||
const mapIterator_1 = require("../utils/mapIterator"); | ||
class FMap extends FObject_1.FObject { | ||
@@ -95,2 +97,9 @@ constructor(source, convertValue, convertValueBack) { | ||
} | ||
iterate() { | ||
return (0, mapIterator_1.mapIterator)(this.source[Symbol.iterator](), ([keySource, valueSource]) => { | ||
const key = (0, toFValue_1.toFValue)(keySource); | ||
const value = this.convertValue(valueSource); | ||
return FArray_1.FArray.create([key, value]); | ||
}); | ||
} | ||
toPrimitiveAsString() { | ||
@@ -113,2 +122,2 @@ return '[object Map]'; | ||
exports.FMap = FMap; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRk1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zY3JpcHRWYWx1ZS9GTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHVDQUFvQztBQUNwQyxnREFBNkM7QUFDN0MsaUNBQW1DO0FBQ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FzdEluZm8/LnJhbmdlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHB1YmxpYyBzdGF0aWMgY3JlYXRlKHNvdXJjZTogTWFwPEtleSwgRlZhbHVlPik6IEZNYXAge1xuICAgICAgICByZXR1cm4gbmV3IEZNYXAoXG4gICAgICAgICAgICBzb3VyY2UsXG4gICAgICAgICAgICB4ID0+IHggYXMgRlZhbHVlLFxuICAgICAgICAgICAgeCA9PiB4XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBjb252ZXJ0S2V5QmFjayhzb3VyY2U6IEZWYWx1ZSwgYXN0SW5mbzogQXN0SW5mbyB8IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gYmVnaW5DYXN0KHNvdXJjZSwgYXN0SW5mbylcbiAgICAgICAgICAgIC5hZGRCb29sZWFuKClcbiAgICAgICAgICAgIC5hZGROdW1iZXIoKVxuICAgICAgICAgICAgLmFkZFN0cmluZygpXG4gICAgICAgICAgICAuYWRkU3ltYm9sKClcbiAgICAgICAgICAgIC5hZGROdWxsKClcbiAgICAgICAgICAgIC5hZGRVbmRlZmluZWQoKVxuICAgICAgICAgICAgLmNhc3QoKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0IHR5cGUoKTogdHlwZW9mIEZUeXBlLk9iamVjdCB7XG4gICAgICAgIHJldHVybiBGVHlwZS5PYmplY3Q7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIGdldENvcmUocGFyYW1zOiBHZXRDb3JlUGFyYW1zKTogRlZhbHVlIHtcbiAgICAgICAgY29uc3QgeyBrZXksIGFzdEluZm8gfSA9IHBhcmFtcztcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICAgIGNhc2UgJ2NsZWFyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2RlbGV0ZSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGTWFwLnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IHRoaXMuY29udmVydEtleUJhY2soYXJnc1swXSwgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLmRlbGV0ZShrZXkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZCb29sZWFuKHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmb3JFYWNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2FsbGJhY2tmbiA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlLmZvckVhY2goKHZhbHVlLCBrZXkpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuKFt0aGlzLmNvbnZlcnRWYWx1ZSh2YWx1ZSksIHRvRlZhbHVlKGtleSldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZ2V0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLnNvdXJjZS5nZXQoa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydFZhbHVlKHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2hhcyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGTWFwLnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IHRoaXMuY29udmVydEtleUJhY2soYXJnc1swXSwgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gdGhpcy5zb3VyY2UuaGFzKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkJvb2xlYW4odmFsdWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnc2l6ZSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGTnVtYmVyKHRoaXMuc291cmNlLnNpemUpO1xuICAgICAgICAgICAgY2FzZSAnc2V0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLmNvbnZlcnRWYWx1ZUJhY2soYXJnc1sxXSwgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlLnNldChrZXksIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cblxuICAgIHB1YmxpYyBvdmVycmlkZSBzZXRDb3JlKHBhcmFtczogU2V0Q29yZVBhcmFtcyk6IHZvaWQge1xuICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoJ1lvdSBjYW5ub3Qgc2V0IGFueSB2YWx1ZSB0byBNYXAnLCBwYXJhbXMuYXN0SW5mbz8ucmFuZ2UpO1xuICAgIH1cblxuICAgIHB1YmxpYyBvdmVycmlkZSB0b1ByaW1pdGl2ZUFzU3RyaW5nKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiAnW29iamVjdCBNYXBdJztcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgdG9QcmltaXRpdmVBc051bWJlcigpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTmFOO1xuICAgIH1cblxuICAgIC8vIOato+eiuuOBquWei+OBjOihqOePvuOBp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dW5rbm93blxuICAgICkge1xuICAgICAgICBzdXBlcigpO1xuICAgIH1cblxuICAgIHByaXZhdGUgc3RhdGljIHByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldzogYm9vbGVhbiwgYXN0SW5mbzogQXN0SW5mbyB8IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoaXNOZXcpIHtcbiAgICAgICAgICAgIHRocm93IFNjcmlwdEVycm9yLm5vdENvbnN0cnVjdG9yRXJyb3IoYXN0SW5mbz8ucmFuZ2UpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBjcmVhdGUoc291cmNlOiBNYXA8S2V5LCBGVmFsdWU+KTogRk1hcCB7XG4gICAgICAgIHJldHVybiBuZXcgRk1hcChcbiAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgIHggPT4geCBhcyBGVmFsdWUsXG4gICAgICAgICAgICB4ID0+IHhcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGNvbnZlcnRLZXlCYWNrKHNvdXJjZTogRlZhbHVlLCBhc3RJbmZvOiBBc3RJbmZvIHwgdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBiZWdpbkNhc3Qoc291cmNlLCBhc3RJbmZvKVxuICAgICAgICAgICAgLmFkZEJvb2xlYW4oKVxuICAgICAgICAgICAgLmFkZE51bWJlcigpXG4gICAgICAgICAgICAuYWRkU3RyaW5nKClcbiAgICAgICAgICAgIC5hZGRTeW1ib2woKVxuICAgICAgICAgICAgLmFkZE51bGwoKVxuICAgICAgICAgICAgLmFkZFVuZGVmaW5lZCgpXG4gICAgICAgICAgICAuY2FzdCgpO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgdHlwZSgpOiB0eXBlb2YgRlR5cGUuT2JqZWN0IHtcbiAgICAgICAgcmV0dXJuIEZUeXBlLk9iamVjdDtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgZ2V0Q29yZShwYXJhbXM6IEdldENvcmVQYXJhbXMpOiBGVmFsdWUge1xuICAgICAgICBjb25zdCB7IGtleSwgYXN0SW5mbyB9ID0gcGFyYW1zO1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgICAgY2FzZSAnY2xlYXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNvdXJjZS5jbGVhcigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZGVsZXRlJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5zb3VyY2UuZGVsZXRlKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkJvb2xlYW4ocmVzdWx0KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2ZvckVhY2gnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UuZm9yRWFjaCgodmFsdWUsIGtleSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3RoaXMuY29udmVydFZhbHVlKHZhbHVlKSwgdG9GVmFsdWUoa2V5KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdnZXQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLmNvbnZlcnRLZXlCYWNrKGFyZ3NbMF0sIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuc291cmNlLmdldChrZXkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0VmFsdWUodmFsdWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnaGFzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLnNvdXJjZS5oYXMoa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGQm9vbGVhbih2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdzaXplJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2Uuc2l6ZSk7XG4gICAgICAgICAgICBjYXNlICdzZXQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLmNvbnZlcnRLZXlCYWNrKGFyZ3NbMF0sIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuY29udmVydFZhbHVlQmFjayhhcmdzWzFdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2Uuc2V0KGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIHNldENvcmUocGFyYW1zOiBTZXRDb3JlUGFyYW1zKTogdm9pZCB7XG4gICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcignWW91IGNhbm5vdCBzZXQgYW55IHZhbHVlIHRvIE1hcCcsIHBhcmFtcy5hc3RJbmZvPy5yYW5nZSk7XG4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252ZXJ0ZWQgOiBjb252ZXJ0ZWQudG9KT2JqZWN0KCkpO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG59XG4iXX0= |
@@ -5,3 +5,5 @@ "use strict"; | ||
const util_1 = require("@kizahasi/util"); | ||
const __1 = require(".."); | ||
const FObject_1 = require("./FObject"); | ||
const symbolNotSupportedMessage = 'Symbol keys are not supported'; | ||
// Mapに変換することで、外界から受け取ったオブジェクトに対する破壊的な操作を起こせないようにしている。 | ||
@@ -12,17 +14,29 @@ class FRecord extends FObject_1.FObject { | ||
if (base != null) { | ||
this.raw = new Map(base.raw); | ||
this.source = new Map(base.source); | ||
} | ||
else { | ||
this.raw = new Map(); | ||
this.source = new Map(); | ||
} | ||
} | ||
getCore({ key }) { | ||
return this.raw.get(key.toString()); | ||
getCore({ key, astInfo }) { | ||
if (typeof key === 'symbol') { | ||
throw new __1.ScriptError(symbolNotSupportedMessage, astInfo === null || astInfo === void 0 ? void 0 : astInfo.range); | ||
} | ||
return this.source.get(key.toString()); | ||
} | ||
setCore({ key, newValue }) { | ||
this.raw.set(key.toString(), newValue); | ||
setCore({ key, newValue, astInfo }) { | ||
if (typeof key === 'symbol') { | ||
throw new __1.ScriptError(symbolNotSupportedMessage, astInfo === null || astInfo === void 0 ? void 0 : astInfo.range); | ||
} | ||
this.source.set(key.toString(), newValue); | ||
} | ||
clone() { | ||
return new FRecord(this); | ||
} | ||
forEach(callbackfn) { | ||
this.source.forEach(callbackfn); | ||
} | ||
toJObject() { | ||
const result = new Map(); | ||
this.raw.forEach((value, key) => { | ||
this.source.forEach((value, key) => { | ||
result.set(key, value === null || value === void 0 ? void 0 : value.toJObject()); | ||
@@ -34,2 +48,2 @@ }); | ||
exports.FRecord = FRecord; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRlJlY29yZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4u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HZhbHVlOiBGVmFsdWUsIGtleTogc3RyaW5nKSA9PiB2b2lkKSB7XG4gICAgICAgIHRoaXMuc291cmNlLmZvckVhY2goY2FsbGJhY2tmbik7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIHRvSk9iamVjdCgpOiB1bmtub3duIHtcbiAgICAgICAgY29uc3QgcmVzdWx0ID0gbmV3IE1hcDxzdHJpbmcsIHVua25vd24+KCk7XG4gICAgICAgIHRoaXMuc291cmNlLmZvckVhY2goKHZhbHVlLCBrZXkpID0+IHtcbiAgICAgICAgICAgIHJlc3VsdC5zZXQoa2V5LCB2YWx1ZT8udG9KT2JqZWN0KCkpO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIG1hcFRvUmVjb3JkKHJlc3VsdCk7XG4gICAgfVxufVxuIl19 |
@@ -5,2 +5,3 @@ "use strict"; | ||
const ScriptError_1 = require("../ScriptError"); | ||
const mapIterator_1 = require("../utils/mapIterator"); | ||
const FFunction_1 = require("./FFunction"); | ||
@@ -37,2 +38,5 @@ const FType_1 = require("./FType"); | ||
} | ||
iterate() { | ||
return (0, mapIterator_1.mapIterator)(this.raw[Symbol.iterator](), x => new FString(x)); | ||
} | ||
toPrimitiveAsString() { | ||
@@ -49,2 +53,2 @@ return this.raw.toString(); | ||
exports.FString = FString; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRlN0cmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zY3JpcHRWYWx1ZS9GU3RyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGdEQUE2QztBQUM3QywyQ0FBd0M7QUFDeEMsbUNBQWdDO0FBRWhDLDJEQUF3RDtBQUd4RCxNQUFhLE9BQU87SUFDaEIsWUFBbUMsR0FBVztRQUFYLFFBQUcsR0FBSCxHQUFHLENBQVE7SUFBRyxDQUFDO0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1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHNldCh7IGFzdEluZm8gfTogU2V0UGFyYW1zKTogdm9pZCB7XG4gICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcignWW91IGNhbm5vdCBzZXQgYW55IHZhbHVlIHRvIFN0cmluZycsIGFzdEluZm8/LnJhbmdlKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgaXRlcmF0ZSgpOiBJdGVyYWJsZUl0ZXJhdG9yPEZWYWx1ZT4ge1xuICAgICAgICByZXR1cm4gbWFwSXRlcmF0b3IodGhpcy5yYXdbU3ltYm9sLml0ZXJhdG9yXSgpLCB4ID0+IG5ldyBGU3RyaW5nKHgpKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgdG9QcmltaXRpdmVBc1N0cmluZygpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucmF3LnRvU3RyaW5nKCk7XG4gICAgfVxuXG4gICAgcHVibGljIHRvUHJpbWl0aXZlQXNOdW1iZXIoKSB7XG4gICAgICAgIHJldHVybiArdGhpcy5yYXc7XG4gICAgfVxuXG4gICAgcHVibGljIHRvSk9iamVjdCgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5yYXc7XG4gICAgfVxufVxuIl19 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2NyaXB0VmFsdWUvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZ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cmFtcztcblxuZXhwb3J0IHR5cGUgRk9iamVjdEJhc2UgPSB7XG4gICAgZ2V0KHBhcmFtczogR2V0UGFyYW1zKTogRlZhbHVlO1xuICAgIHNldChwYXJhbXM6IFNldFBhcmFtcyk6IHZvaWQ7XG4gICAgdG9QcmltaXRpdmVBc051bWJlcigpOiBudW1iZXI7XG4gICAgdG9QcmltaXRpdmVBc1N0cmluZygpOiBzdHJpbmc7XG4gICAgdG9QcmltaXRpdmVBc0RlZmF1bHQ/KCk6IG51bWJlciB8IHN0cmluZztcblxuICAgIC8vIGl0ZXJhdGXlj6/og73jgarloLTlkIjjga/lrp/oo4XjgZnjgovjgILlrp/oo4XjgZfjgarjgYTloLTlkIjjga9pdGVyYXRl5LiN5Y+v6IO944Go5Yik5pat44GV44KM44KL44CCXG4gICAgaXRlcmF0ZT8oKTogSXRlcmFibGVJdGVyYXRvcjxGVmFsdWU+O1xufTtcbiJdfQ== |
@@ -0,1 +1,2 @@ | ||
import { fPattern } from './fPattern'; | ||
import { fBlockStatement } from './fStatement'; | ||
@@ -12,5 +13,8 @@ import { toRange } from './range'; | ||
if (e.type === 'SpreadElement') { | ||
throw new ScriptError('SpreadElement is not supported', toRange(expression)); | ||
return { | ||
isSpread: true, | ||
argument: fExpression(e.argument), | ||
}; | ||
} | ||
return fExpression(e); | ||
return { isSpread: false, expression: fExpression(e) }; | ||
}), | ||
@@ -20,8 +24,3 @@ }; | ||
function fArrowFuntionExpression(expression) { | ||
const params = expression.params.map(param => { | ||
if (param.type !== 'Identifier') { | ||
throw new ScriptError(`'${param.type}' is not supported`, toRange(expression)); | ||
} | ||
return param; | ||
}); | ||
const params = expression.params.map(param => fPattern(param)); | ||
let body; | ||
@@ -40,9 +39,4 @@ if (expression.body.type === 'BlockStatement') { | ||
} | ||
function fAssignmentOperator(operator, range) { | ||
switch (operator) { | ||
case '=': | ||
return operator; | ||
default: | ||
throw new ScriptError(`'${operator}' is not supported`, range); | ||
} | ||
function fAssignmentOperator(operator) { | ||
return operator; | ||
} | ||
@@ -63,3 +57,3 @@ function fAssignmentExpression(expression) { | ||
...expression, | ||
operator: fAssignmentOperator(expression.operator, toRange(expression)), | ||
operator: fAssignmentOperator(expression.operator), | ||
left, | ||
@@ -137,3 +131,3 @@ right: fExpression(expression.right), | ||
} | ||
function fMemberExpression(expression) { | ||
export function fMemberExpression(expression) { | ||
if (expression.object.type === 'Super') { | ||
@@ -164,9 +158,9 @@ throw new ScriptError("'Super' is not supported", toRange(expression)); | ||
if (prop.type === 'SpreadElement') { | ||
throw new ScriptError("'SpreadElement' is not supported", toRange(expression)); | ||
return { isSpread: true, argument: fExpression(prop.argument) }; | ||
} | ||
return fProperty(prop); | ||
return { isSpread: false, property: fProperty(prop) }; | ||
}), | ||
}; | ||
} | ||
function fProperty(property) { | ||
export function fProperty(property) { | ||
let key; | ||
@@ -229,2 +223,19 @@ switch (property.key.type) { | ||
} | ||
function fUpdateExpression(expression) { | ||
switch (expression.argument.type) { | ||
case 'Identifier': | ||
return { | ||
...expression, | ||
argument: expression.argument, | ||
}; | ||
case 'MemberExpression': | ||
return { | ||
...expression, | ||
argument: fMemberExpression(expression.argument), | ||
}; | ||
default: | ||
// ここに来る状況があるかどうか不明 | ||
throw new ScriptError('Invalid update expression argument', toRange(expression)); | ||
} | ||
} | ||
export function fExpression(expression) { | ||
@@ -262,2 +273,4 @@ switch (expression.type) { | ||
return fUnaryExpression(expression); | ||
case 'UpdateExpression': | ||
return fUpdateExpression(expression); | ||
default: | ||
@@ -267,2 +280,2 @@ throw new ScriptError(`'${expression.type}' is not supported`, toRange(expression)); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZkV4cHJlc3Npb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZkV4cHJlc3Npb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJBLE9BQU8sRUFBRSxlQUFlLEVBQW1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uICAgIGxldCBrZXk6IEZJZGVudGlmaWVyIHwgRkxpdGVyYWw7XG4gICAgc3dpdGNoIChwcm9wZXJ0eS5rZXkudHlwZSkge1xuICAgICAgICBjYXNlICdJZGVudGlmaWVyJzpcbiAgICAgICAgICAgIGtleSA9IHByb3BlcnR5LmtleTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICdMaXRlcmFsJzpcbiAgICAgICAgICAgIGtleSA9IGZMaXRlcmFsKHByb3BlcnR5LmtleSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihgJyR7cHJvcGVydHkua2V5fScgaXMgbm90IHN1cHBvcnRlZGAsIHRvUmFuZ2UocHJvcGVydHkua2V5KSk7XG4gICAgfVxuICAgIHN3aXRjaCAocHJvcGVydHkudmFsdWUudHlwZSkge1xuICAgICAgICBjYXNlICdBcnJheVBhdHRlcm4nOlxuICAgICAgICBjYXNlICdPYmplY3RQYXR0ZXJuJzpcbiAgICAgICAgY2FzZSAnUmVzdEVsZW1lbnQnOlxuICAgICAgICBjYXNlICdBc3NpZ25tZW50UGF0dGVybic6IHtcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihcbiAgICAgICAgICAgICAgICBgJyR7cHJvcGVydHkudmFsdWUudHlwZX0nIGlzIG5vdCBzdXBwb3J0ZWRgLFxuICAgICAgICAgICAgICAgIHRvUmFuZ2UocHJvcGVydHkudmFsdWUpXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBicmVhaztcbiAgICB9XG4gICAgc3dpdGNoIChwcm9wZXJ0eS5raW5kKSB7XG4gICAgICAgIGNhc2UgJ2luaXQnOlxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3I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ICAgICAgICAgIHJldHVybiBmQ29uZGl0aW9uYWxFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdJZGVudGlmaWVyJzpcbiAgICAgICAgICAgIHJldHVybiBleHByZXNzaW9uO1xuICAgICAgICBjYXNlICdMaXRlcmFsJzpcbiAgICAgICAgICAgIHJldHVybiBmTGl0ZXJhbChleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnTG9naWNhbEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZMb2dpY2FsRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnTWVtYmVyRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZk1lbWJlckV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ05ld0V4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZOZXdFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdPYmplY3RFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmT2JqZWN0RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnVGhpc0V4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGV4cHJlc3Npb247XG4gICAgICAgIGNhc2UgJ1VuYXJ5RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZlVuYXJ5RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihgJyR7ZXhwcmVzc2lvbi50eXBlfScgaXMgbm90IHN1cHBvcnRlZGAsIHRvUmFuZ2UoZXhwcmVzc2lvbikpO1xuICAgIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZkV4cHJlc3Npb24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dGVtZW50IH0gZnJvbSAnLi9mU3RhdGVtZW50JztcbmltcG9ydCB7IFJhbmdlLCB0b1JhbmdlIH0gZnJvbSAnLi9yYW5nZSc7XG5pbXBvcnQgeyBTY3JpcHRFcnJvciB9IGZyb20gJy4vU2NyaXB0RXJyb3InO1xuXG50eXBlIEZBcnJheUV4cHJlc3Npb25FbGVtZW50ID1cbiAgICB8IHtcbiAgICAgICAgICBpc1NwcmVhZDogZmFsc2U7XG4gICAgICAgICAgZXhwcmVzc2lvbjogRkV4cHJlc3Npb247XG4gICAgICB9XG4gICAgfCB7XG4gICAgICAgICAgaXNTcHJlYWQ6IHRydWU7XG4gICAgICAgICAgYXJndW1lbnQ6IEZFeHByZXNzaW9uO1xuICAgICAgfTtcblxuZXhwb3J0IHR5cGUgRkFycmF5RXhwcmVzc2lvbiA9IE9taXQ8QXJyYXlFeHByZXNzaW9uLCAnZWxlbWVudHMnPiAmIHtcbiAgICBlbGVtZW50czogQXJyYXk8RkFycmF5RXhwcmVzc2lvbkVsZW1lbnQgfCBudWxsPjtcbn07XG5mdW5jdGlvbiBmQXJyYXlFeHByZXNzaW9uKGV4cHJlc3Npb246IEFycmF5RXhwcmVzc2lvbik6IEZBcnJheUV4cHJlc3Npb24ge1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLmV4cHJlc3Npb24sXG4gICAgICAgIGVsZW1lbnRzOiBleHByZXNzaW9uLmVsZW1lbnRzLm1hcChlID0+IHtcbiAgICAgICAgICAgIGlmIChlID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChlLnR5cGUgPT09ICdTcHJlYWRFbGVtZW50Jykge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGlzU3ByZWFkOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBhcmd1bWVudDogZkV4cHJlc3Npb24oZS5hcmd1bWVudCksXG4gICAgIC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mFsKHByb3BlcnR5LmtleSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihgJyR7cHJvcGVydHkua2V5fScgaXMgbm90IHN1cHBvcnRlZGAsIHRvUmFuZ2UocHJvcGVydHkua2V5KSk7XG4gICAgfVxuICAgIHN3aXRjaCAocHJvcGVydHkudmFsdWUudHlwZSkge1xuICAgICAgICBjYXNlICdBcnJheVBhdHRlcm4nOlxuICAgICAgICBjYXNlICdPYmplY3RQYXR0ZXJuJzpcbiAgICAgICAgY2FzZSAnUmVzdEVsZW1lbnQnOlxuICAgICAgICBjYXNlICdBc3NpZ25tZW50UGF0dGVybic6IHtcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihcbiAgICAgICAgICAgICAgICBgJyR7cHJvcGVydHkudmFsdWUudHlwZX0nIGlzIG5vdCBzdXBwb3J0ZWRgLFxuICAgICAgICAgICAgICAgIHRvUmFuZ2UocHJvcGVydHkudmFsdWUpXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBicmVhaztcbiAgICB9XG4gICAgc3dpdGNoIChwcm9wZXJ0eS5raW5kKSB7XG4gICAgICAgIGNhc2UgJ2luaXQnOlxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoYCcke3Byb3BlcnR5LmtpbmR9JyBpcyBub3Qgc3VwcG9ydGVkYCwgdG9SYW5nZShwcm9wZXJ0eS52YWx1ZSkpO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnByb3BlcnR5LFxuICAgICAgICBrZXksXG4gICAgICAgIHZhbHVlOiBmRXhwcmVzc2lvbihwcm9wZXJ0eS52YWx1ZSksXG4gICAgICAgIGtpbmQ6IHByb3BlcnR5Lmt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lvbi50eXBlKSB7XG4gICAgICAgIGNhc2UgJ0FycmF5RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkFycmF5RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnQXJyb3dGdW5jdGlvbkV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZBcnJvd0Z1bnRpb25FeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdBc3NpZ25tZW50RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkFzc2lnbm1lbnRFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdCaW5hcnlFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmQmluYXJ5RXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnQ2FsbEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZTaW1wbGVDYWxsRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnQ2hhaW5FeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmQ2hhaW5FeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdDb25kaXRpb25hbEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZDb25kaXRpb25hbEV4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ0lkZW50aWZpZXInOlxuICAgICAgICAgICAgcmV0dXJuIGV4cHJlc3Npb247XG4gICAgICAgIGNhc2UgJ0xpdGVyYWwnOlxuICAgICAgICAgICAgcmV0dXJuIGZMaXRlcmFsKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdMb2dpY2FsRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZkxvZ2ljYWxFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdNZW1iZXJFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmTWVtYmVyRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgY2FzZSAnTmV3RXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZk5ld0V4cHJlc3Npb24oZXhwcmVzc2lvbik7XG4gICAgICAgIGNhc2UgJ09iamVjdEV4cHJlc3Npb24nOlxuICAgICAgICAgICAgcmV0dXJuIGZPYmplY3RFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdUaGlzRXhwcmVzc2lvbic6XG4gICAgICAgICAgICByZXR1cm4gZXhwcmVzc2lvbjtcbiAgICAgICAgY2FzZSAnVW5hcnlFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmVW5hcnlFeHByZXNzaW9uKGV4cHJlc3Npb24pO1xuICAgICAgICBjYXNlICdVcGRhdGVFeHByZXNzaW9uJzpcbiAgICAgICAgICAgIHJldHVybiBmVXBkYXRlRXhwcmVzc2lvbihleHByZXNzaW9uKTtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihgJyR7ZXhwcmVzc2lvbi50eXBlfScgaXMgbm90IHN1cHBvcnRlZGAsIHRvUmFuZ2UoZXhwcmVzc2lvbikpO1xuICAgIH1cbn1cbiJdfQ== |
import { fExpression } from './fExpression'; | ||
import { fPattern } from './fPattern'; | ||
import { toRange } from './range'; | ||
@@ -7,3 +8,3 @@ import { ScriptError } from './ScriptError'; | ||
...statement, | ||
body: statement.body.map(x => fFStatement(x)), | ||
body: statement.body.map(x => fStatement(x)), | ||
}; | ||
@@ -22,7 +23,5 @@ } | ||
const declarations = statement.declarations.map(d => { | ||
if (d.id.type !== 'Identifier') { | ||
throw new ScriptError(`'${d.id.type}' is not supported`, toRange(d.id)); | ||
} | ||
return { | ||
...d, | ||
id: fPattern(d.id), | ||
init: d.init == null ? d.init : fExpression(d.init), | ||
@@ -37,3 +36,3 @@ }; | ||
}; | ||
export function fFStatement(statement) { | ||
export function fStatement(statement) { | ||
switch (statement.type) { | ||
@@ -43,7 +42,41 @@ case 'BlockStatement': | ||
case 'BreakStatement': | ||
if (statement.label != null) { | ||
throw new ScriptError('labels are not supported'); | ||
} | ||
return statement; | ||
case 'ContinueStatement': | ||
if (statement.label != null) { | ||
throw new ScriptError('labels are not supported'); | ||
} | ||
return statement; | ||
case 'ExpressionStatement': | ||
return fExpressionStatement(statement); | ||
case 'ForOfStatement': | ||
return { | ||
...statement, | ||
left: statement.left.type === 'VariableDeclaration' | ||
? fVariableDeclaration(statement.left) | ||
: fPattern(statement.left), | ||
right: fExpression(statement.right), | ||
body: fStatement(statement.body), | ||
}; | ||
case 'ForStatement': { | ||
let init; | ||
if (statement.init == null) { | ||
init = statement.init; | ||
} | ||
else if (statement.init.type === 'VariableDeclaration') { | ||
init = fVariableDeclaration(statement.init); | ||
} | ||
else { | ||
init = fExpression(statement.init); | ||
} | ||
return { | ||
...statement, | ||
init, | ||
test: statement.test == null ? statement.test : fExpression(statement.test), | ||
update: statement.update == null ? statement.update : fExpression(statement.update), | ||
body: fStatement(statement.body), | ||
}; | ||
} | ||
case 'IfStatement': | ||
@@ -54,4 +87,4 @@ return { | ||
? statement.alternate | ||
: fFStatement(statement.alternate), | ||
consequent: fFStatement(statement.consequent), | ||
: fStatement(statement.alternate), | ||
consequent: fStatement(statement.consequent), | ||
test: fExpression(statement.test), | ||
@@ -66,3 +99,3 @@ }; | ||
}; | ||
case 'SwitchStatement': | ||
case 'SwitchStatement': { | ||
return { | ||
@@ -72,3 +105,3 @@ ...statement, | ||
...c, | ||
consequent: c.consequent.map(s => fFStatement(s)), | ||
consequent: c.consequent.map(s => fStatement(s)), | ||
test: c.test == null ? c.test : fExpression(c.test), | ||
@@ -78,2 +111,3 @@ })), | ||
}; | ||
} | ||
case 'VariableDeclaration': | ||
@@ -85,2 +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XRlbWVudCxcbiAgICAgICAgICAgICAgICBhbHRlcm5hdGU6XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlbWVudC5hbHRlcm5hdGUgPT0gbnVsbFxuICAgICAgICAgICAgICAgICAgICAgICAgPyBzdGF0ZW1lbnQuYWx0ZXJuYXRlXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGZGU3RhdGVtZW50KHN0YXRlbWVudC5hbHRlcm5hdGUpLFxuICAgICAgICAgICAgICAgIGNvbnNlcXVlbnQ6IGZGU3RhdGVtZW50KHN0YXRlbWVudC5jb25zZXF1ZW50KSxcbiAgICAgICAgICAgICAgICB0ZXN0OiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQudGVzdCksXG4gICAgICAgICAgICB9O1xuICAgICAgICBjYXNlICdSZXR1cm5TdGF0ZW1lbnQnOlxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgYXJndW1lbnQ6XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlbWVudC5hcmd1bWVudCA9PSBudWxsXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHN0YXRlbWVudC5hcmd1bWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQuYXJndW1lbnQpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgY2FzZSAnU3dpdGNoU3RhdGVtZW50JzpcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVtZW50LFxuICAgICAgICAgICAgICAgIGNhc2VzOiBzdGF0ZW1lbnQuY2FzZXMubWFwKGMgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgLi4uYyxcbiAgICAgICAgICAgICAgICAgICAgY29uc2VxdWVudDogYy5jb25zZXF1ZW50Lm1hcChzID0+IGZGU3RhdGVtZW50KHMpKSxcbiAgICAgICAgICAgICAgICAgICAgdGVzdD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aCAoc3RhdGVtZW50LnR5cGUpIHtcbiAgICAgICAgY2FzZSAnQmxvY2tTdGF0ZW1lbnQnOlxuICAgICAgICAgICAgcmV0dXJuIGZCbG9ja1N0YXRlbWVudChzdGF0ZW1lbnQpO1xuICAgICAgICBjYXNlICdCcmVha1N0YXRlbWVudCc6XG4gICAgICAgICAgICBpZiAoc3RhdGVtZW50LmxhYmVsICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoJ2xhYmVscyBhcmUgbm90IHN1cHBvcnRlZCcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YXRlbWVudDtcbiAgICAgICAgY2FzZSAnQ29udGludWVTdGF0ZW1lbnQnOlxuICAgICAgICAgICAgaWYgKHN0YXRlbWVudC5sYWJlbCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFNjcmlwdEVycm9yKCdsYWJlbHMgYXJlIG5vdCBzdXBwb3J0ZWQnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBzdGF0ZW1lbnQ7XG4gICAgICAgIGNhc2UgJ0V4cHJlc3Npb25TdGF0ZW1lbnQnOlxuICAgICAgICAgICAgcmV0dXJuIGZFeHByZXNzaW9uU3RhdGVtZW50KHN0YXRlbWVudCk7XG4gICAgICAgIGNhc2UgJ0Zvck9mU3RhdGVtZW50JzpcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVtZW50LFxuICAgICAgICAgICAgICAgIGxlZnQ6XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlbWVudC5sZWZ0LnR5cGUgPT09ICdWYXJpYWJsZURlY2xhcmF0aW9uJ1xuICAgICAgICAgICAgICAgICAgICAgICAgPyBmVmFyaWFibGVEZWNsYXJhdGlvbihzdGF0ZW1lbnQubGVmdClcbiAgICAgICAgICAgICAgICAgICAgICAgIDogZlBhdHRlcm4oc3RhdGVtZW50LmxlZnQpLFxuICAgICAgICAgICAgICAgIHJpZ2h0OiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQucmlnaHQpLFxuICAgICAgICAgICAgICAgIGJvZHk6IGZTdGF0ZW1lbnQoc3RhdGVtZW50LmJvZHkpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgY2FzZSAnRm9yU3RhdGVtZW50Jzoge1xuICAgICAgICAgICAgbGV0IGluaXQ6IEZGb3JTdGF0ZW1lbnRbJ2luaXQnXTtcbiAgICAgICAgICAgIGlmIChzdGF0ZW1lbnQuaW5pdCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaW5pdCA9IHN0YXRlbWVudC5pbml0O1xuICAgICAgICAgICAgfSBlbHNlIGlmIChzdGF0ZW1lbnQuaW5pdC50eXBlID09PSAnVmFyaWFibGVEZWNsYXJhdGlvbicpIHtcbiAgICAgICAgICAgICAgICBpbml0ID0gZlZhcmlhYmxlRGVjbGFyYXRpb24oc3RhdGVtZW50LmluaXQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpbml0ID0gZkV4cHJlc3Npb24oc3RhdGVtZW50LmluaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgaW5pdCxcbiAgICAgICAgICAgICAgICB0ZXN0OiBzdGF0ZW1lbnQudGVzdCA9PSBudWxsID8gc3RhdGVtZW50LnRlc3QgOiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQudGVzdCksXG4gICAgICAgICAgICAgICAgdXBkYXRlOiBzdGF0ZW1lbnQudXBkYXRlID09IG51bGwgPyBzdGF0ZW1lbnQudXBkYXRlIDogZkV4cHJlc3Npb24oc3RhdGVtZW50LnVwZGF0ZSksXG4gICAgICAgICAgICAgICAgYm9keTogZlN0YXRlbWVudChzdGF0ZW1lbnQuYm9keSksXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgJ0lmU3RhdGVtZW50JzpcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVtZW50LFxuICAgICAgICAgICAgICAgIGFsdGVybmF0ZTpcbiAgICAgICAgICAgICAgICAgICAgc3RhdGVtZW50LmFsdGVybmF0ZSA9PSBudWxsXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHN0YXRlbWVudC5hbHRlcm5hdGVcbiAgICAgICAgICAgICAgICAgICAgICAgIDogZlN0YXRlbWVudChzdGF0ZW1lbnQuYWx0ZXJuYXRlKSxcbiAgICAgICAgICAgICAgICBjb25zZXF1ZW50OiBmU3RhdGVtZW50KHN0YXRlbWVudC5jb25zZXF1ZW50KSxcbiAgICAgICAgICAgICAgICB0ZXN0OiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQudGVzdCksXG4gICAgICAgICAgICB9O1xuICAgICAgICBjYXNlICdSZXR1cm5TdGF0ZW1lbnQnOlxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgYXJndW1lbnQ6XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlbWVudC5hcmd1bWVudCA9PSBudWxsXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHN0YXRlbWVudC5hcmd1bWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQuYXJndW1lbnQpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgY2FzZSAnU3dpdGNoU3RhdGVtZW50Jzoge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZW1lbnQsXG4gICAgICAgICAgICAgICAgY2FzZXM6IHN0YXRlbWVudC5jYXNlcy5tYXAoYyA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAuLi5jLFxuICAgICAgICAgICAgICAgICAgICBjb25zZXF1ZW50OiBjLmNvbnNlcXVlbnQubWFwKHMgPT4gZlN0YXRlbWVudChzKSksXG4gICAgICAgICAgICAgICAgICAgIHRlc3Q6IGMudGVzdCA9PSBudWxsID8gYy50ZXN0IDogZkV4cHJlc3Npb24oYy50ZXN0KSxcbiAgICAgICAgICAgICAgICB9KSksXG4gICAgICAgICAgICAgICAgZGlzY3JpbWluYW50OiBmRXhwcmVzc2lvbihzdGF0ZW1lbnQuZGlzY3JpbWluYW50KSxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSAnVmFyaWFibGVEZWNsYXJhdGlvbic6XG4gICAgICAgICAgICByZXR1cm4gZlZhcmlhYmxlRGVjbGFyYXRpb24oc3RhdGVtZW50KTtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcihgJyR7c3RhdGVtZW50LnR5cGV9JyBpcyBub3Qgc3VwcG9ydGVkYCwgdG9SYW5nZShzdGF0ZW1lbnQpKTtcbiAgICB9XG59XG4iXX0= |
export { exec, test } from './main'; | ||
export { arrayClass } from './builtIn/Array'; | ||
export { createConsoleClass } from './builtIn/console'; | ||
export { mapClass } from './builtIn/Map'; | ||
@@ -19,2 +20,2 @@ export { symbolClass } from './builtIn/Symbol'; | ||
export { ScriptError } from './ScriptError'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUM7QUFDcEMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxRQUFRLEVBQUU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lwdEVycm9yJztcbiJdfQ== |
@@ -0,1 +1,2 @@ | ||
import { toJObject } from '../utils/toJObject'; | ||
import { FBoolean } from './FBoolean'; | ||
@@ -6,2 +7,5 @@ import { FNumber } from './FNumber'; | ||
const compare = (left, right, hint, comparer) => { | ||
if (hint === 'JObject') { | ||
return comparer(toJObject(left), toJObject(right)); | ||
} | ||
return comparer(toPrimitive(left, hint), toPrimitive(right, hint)); | ||
@@ -22,2 +26,2 @@ }; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zY3JpcHRWYWx1ZS9jb21wYXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFDdEMsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUNwQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRXBDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFNUMsTUFBTSxPQUFPLEdBQUcsQ0FDWixJQUFZLEVBQ1osS0FBYSxFQUNiLElBQXFDLEVBQ3JDLFFBQThDLEVBQzdDLEVBQUU7SUFDSCxPQUFPLFFBQVEsQ0FBQyxXQUFXLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxFQUFFLFdBQVcsQ0FBQyxLQUFLLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztBQUN2RSxDQUFDLENBQUM7QUFFRixNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsQ0FDM0IsSUFBWSxFQUNaLEtBQWEsRUFDYixJQUFxQyxFQUNyQyxRQUEyQyxFQUM3QyxFQUFFO0lBQ0EsT0FBTyxJQUFJLE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lKGxlZnQsIHJpZ2h0LCBoaW50LCBjb21wYXJlcikpO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbXBhcmVUb0Jvb2xlYW4gPSAoXG4gICAgbGVmdDogRlZhbHVlLFxuICAgIHJpZ2h0OiBGVmFsdWUsXG4gICAgaGludDogJ2RlZmF1bHQnIHwgJ3N0cmluZycgfCAnbnVtYmVyJyB8ICdKT2JqZWN0JyxcbiAgICBjb21wYXJlcjogKGxlZnQ6IGFueSwgcmlnaHQ6IGFueSkgPT4gYm9vbGVhblxuKSA9PiB7XG4gICAgcmV0dXJuIG5ldyBGQm9vbGVhbihjb21wYXJlKGxlZnQsIHJpZ2h0LCBoaW50LCBjb21wYXJlcikpO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbXBhcmVUb051bWJlck9yU3RyaW5nID0gKFxuICAgIGxlZnQ6IEZWYWx1ZSxcbiAgICByaWdodDogRlZhbHVlLFxuICAgIGhpbnQ6ICdkZWZhdWx0JyxcbiAgICBjb21wYXJlcjogKGxlZnQ6IGFueSwgcmlnaHQ6IGFueSkgPT4gbnVtYmVyIHwgc3RyaW5nXG4pID0+IHtcbiAgICBjb25zdCByID0gY29tcGFyZShsZWZ0LCByaWdodCwgaGludCwgY29tcGFyZXIpO1xuICAgIGlmICh0eXBlb2YgciA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBGTnVtYmVyKHIpO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IEZTdHJpbmcocik7XG59O1xuIl19 |
@@ -27,5 +27,8 @@ import { ScriptError } from '../ScriptError'; | ||
} | ||
iterate() { | ||
iterateAsArray() { | ||
return this.source.map(x => this.convert(x)); | ||
} | ||
iterate() { | ||
return mapIterator(this.source[Symbol.iterator](), x => this.convert(x)); | ||
} | ||
static isValidIndex(index) { | ||
@@ -52,3 +55,3 @@ if (index == null || typeof index === 'symbol') { | ||
const predicate = beginCast(args[0], astInfo).addFunction().cast()(false); | ||
const raw = this.iterate().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
const raw = this.iterateAsArray().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
return FArray.create(raw); | ||
@@ -60,3 +63,3 @@ }); | ||
const predicate = beginCast(args[0], astInfo).addFunction().cast()(false); | ||
const raw = this.iterate().find((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
const raw = this.iterateAsArray().find((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); }); | ||
return raw; | ||
@@ -68,3 +71,3 @@ }); | ||
const callbackfn = beginCast(args[0], astInfo).addFunction().cast()(false); | ||
this.iterate().forEach((value, index) => callbackfn([value, new FNumber(index)])); | ||
this.iterateAsArray().forEach((value, index) => callbackfn([value, new FNumber(index)])); | ||
return undefined; | ||
@@ -76,3 +79,3 @@ }); | ||
const mapping = beginCast(args[0], astInfo).addFunction().cast()(false); | ||
const raw = this.iterate().map((value, index) => mapping([value, new FNumber(index)])); | ||
const raw = this.iterateAsArray().map((value, index) => mapping([value, new FNumber(index)])); | ||
return FArray.create(raw); | ||
@@ -128,3 +131,3 @@ }); | ||
toPrimitiveAsString() { | ||
return this.iterate() | ||
return this.iterateAsArray() | ||
.map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsString()) | ||
@@ -134,7 +137,7 @@ .toString(); | ||
toPrimitiveAsNumber() { | ||
return +this.iterate().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber()); | ||
return +this.iterateAsArray().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber()); | ||
} | ||
// 正確な型が表現できないのでunknown[]としている | ||
toJObject() { | ||
return this.iterate().map(x => (x == null ? x : x.toJObject())); | ||
return this.iterateAsArray().map(x => (x == null ? x : x.toJObject())); | ||
}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mRleDogc3RyaW5nIHwgc3ltYm9sIHwgdW5kZWZpbmVkKTogYm9vbGVhbiB7XG4gICAgICAgIGlmIChpbmRleCA9PSBudWxsIHx8IHR5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaW5kZXggPT09ICcwJyB8fCAvXlsxLTldWzAtOV0qJC8udGVzdChpbmRleCk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldCh7IHByb3BlcnR5LCBhc3RJbmZvIH06IEdldFBhcmFtcyk6IEZWYWx1ZSB7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdHJ5VG9Qcm9wZXJ0eU5hbWUocHJvcGVydHkpO1xuICAgICAgICBpZiAoRkFycmF5LmlzVmFsaWRJbmRleChpbmRleCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvdW5kID0gdGhpcy5zb3VyY2VbaW5kZXggYXMgdW5rbm93biBhcyBudW1iZXJdO1xuICAgICAgICAgICAgaWYgKGZvdW5kID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChmb3VuZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgcHJvcGVydHlOYW1lID0gaW5kZXg7XG4gICAgICAgIHN3aXRjaCAocHJvcGVydHlOYW1lKSB7XG4gICAgICAgICAgICBjYXNlICdmaWx0ZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZWRpY2F0ZSA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMuaXRlcmF0ZSgpLmZpbHRlcigodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmaW5kJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVkaWNhdGUgPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYXcgPSB0aGlzLml0ZXJhdGUoKS5maW5kKCh2YWx1ZSwgaW5kZXgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmVkaWNhdGUoW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKT8udG9KT2JqZWN0KClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJhdztcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2ZvckVhY2gnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrZm4gPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLml0ZXJhdGUoKS5mb3JFYWNoKCh2YWx1ZSwgaW5kZXgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ21hcCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWFwcGluZyA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMuaXRlcmF0ZSgpLm1hcCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyhbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwb3AnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwdXNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLmZvckVhY2goYXJnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UucHVzaChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ3NoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICd1bnNoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLnJlZHVjZVJpZ2h0PHZvaWQ+KChzZWVkLCBhcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UudW5zaGlmdChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRk51bWJlcih0aGlzLnNvdXJjZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSBTeW1ib2wuaXRlcmF0b3I6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gdGhpcy5zb3VyY2VbU3ltYm9sLml0ZXJhdG9yXSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkl0ZXJhdG9yLmNyZWF0ZShtYXBJdGVyYXRvcihzb3VyY2UsIH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ICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpbmRleCA9PT0gJzAnIHx8IC9eWzEtOV1bMC05XSokLy50ZXN0KGluZGV4KTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0KHsgcHJvcGVydHksIGFzdEluZm8gfTogR2V0UGFyYW1zKTogRlZhbHVlIHtcbiAgICAgICAgY29uc3QgaW5kZXggPSB0cnlUb1Byb3BlcnR5TmFtZShwcm9wZXJ0eSk7XG4gICAgICAgIGlmIChGQXJyYXkuaXNWYWxpZEluZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgY29uc3QgZm91bmQgPSB0aGlzLnNvdXJjZVtpbmRleCBhcyB1bmtub3duIGFzIG51bWJlcl07XG4gICAgICAgICAgICBpZiAoZm91bmQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KGZvdW5kKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBwcm9wZXJ0eU5hbWUgPSBpbmRleDtcbiAgICAgICAgc3dpdGNoIChwcm9wZXJ0eU5hbWUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2ZpbHRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlZGljYXRlID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZpbHRlcigodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmaW5kJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVkaWNhdGUgPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYXcgPSB0aGlzLml0ZXJhdGVBc0FycmF5KCkuZmluZCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByYXc7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmb3JFYWNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZvckVhY2goKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnbWFwJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXBwaW5nID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLm1hcCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyhbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwb3AnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwdXNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLmZvckVhY2goYXJnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UucHVzaChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ3NoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICd1bnNoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLnJlZHVjZVJpZ2h0PHZvaWQ+KChzZWVkLCBhcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UudW5zaGlmdChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRk51bWJlcih0aGlzLnNvdXJjZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSBTeW1ib2wuaXRlcmF0b3I6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gdGhpcy5zb3VyY2VbU3ltYm9sLml0ZXJhdG9yXSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkl0ZXJhdG9yLmNyZWF0ZShtYXBJdGVyYXRvcihzb3VyY2UsIHggPT4gdGhpcy5jb252ZXJ0KHgpKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0KHsgcHJvcGVydHksIG5ld1ZhbHVlLCBhc3RJbmZvIH06IFNldFBhcmFtcyk6IHZvaWQge1xuICAgICAgICBjb25zdCBpbmRleCA9IHRvUHJvcGVydHlOYW1lKHByb3BlcnR5LCBhc3RJbmZvKTtcbiAgICAgICAgaWYgKEZBcnJheS5pc1ZhbGlkSW5kZXgoaW5kZXgpKSB7XG4gICAgICAgICAgICB0aGlzLnNvdXJjZVtpbmRleCBhcyB1bmtub3duIGFzIG51bWJlcl0gPSB0aGlzLmNvbnZlcnRCYWNrKG5ld1ZhbHVlLCBhc3RJbmZvKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aHJvdyBuZXcgU2NyaXB0RXJyb3IoXG4gICAgICAgICAgICBgXCIke3R5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcgPyAnc3ltYm9sJyA6IGluZGV4fVwiIGlzIG5vdCBzdXBwb3J0ZWRgLFxuICAgICAgICAgICAgYXN0SW5mbz8ucmFuZ2VcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgdG9QcmltaXRpdmVBc1N0cmluZygpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5pdGVyYXRlQXNBcnJheSgpXG4gICAgICAgICAgICAubWFwKHggPT4geD8udG9QcmltaXRpdmVBc1N0cmluZygpKVxuICAgICAgICAgICAgLnRvU3RyaW5nKCk7XG4gICAgfVxuXG4gICAgcHVibGljIHRvUHJpbWl0aXZlQXNOdW1iZXIoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuICt0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4geD8udG9QcmltaXRpdmVBc051bWJlcigpKTtcbiAgICB9XG5cbiAgICAvLyDmraPnorrjgarlnovjgYzooajnj77jgafjgY3jgarjgYTjga7jgad1bmtub3duW13jgajjgZfjgabjgYTjgotcbiAgICBwdWJsaWMgdG9KT2JqZWN0KCk6IHVua25vd25bXSB7XG4gICAgICAgIHJldHVybiB0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4gKHggPT0gbnVsbCA/IHggOiB4LnRvSk9iamVjdCgpKSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRlR5cGVkQXJyYXk8VD4gZXh0ZW5kcyBGQXJyYXkge1xuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICAgICAgc291cmNlOiBUW10sXG4gICAgICAgIGNvbnZlcnQ6ICh2YWx1ZTogVCkgPT4gRlZhbHVlLFxuICAgICAgICBjb252ZXJ0QmFjazogKHZhbHVlOiBGVmFsdWUsIGFzdEluZm86IEFzdEluZm8gfCB1bmRlZmluZWQpID0+IFRcbiAgICApIHtcbiAgICAgICAgc3VwZXIoc291cmNlLCB2YWx1ZSA9PiBjb252ZXJ0KHZhbHVlIGFzIFQpLCBjb252ZXJ0QmFjayk7XG4gICAgfVxufVxuIl19 |
@@ -54,2 +54,5 @@ import { FObject } from './FObject'; | ||
} | ||
iterate() { | ||
return mapIterator(this.source, x => this.convertValue(x)); | ||
} | ||
toPrimitiveAsString() { | ||
@@ -66,2 +69,2 @@ // JavaScriptでは例えば配列由来なら'[object Array Iterator]'となる(ChromeとFirefoxで確認)が、ここでは実装を簡略化するためにすべてIteratorとしている | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkl0ZXJhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZJdGVyYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQ3BDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM3QyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1B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uIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGSXRlcmF0b3IucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV4dCA9IHRoaXMuc291cmNlLm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gbmV3IEZSZWNvcmQoKTtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnNldCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eTogbmV3IEZTdHJpbmcoJ3ZhbHVlJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZTogdGhpcy5jb252ZXJ0VmFsdWUobmV4dC52YWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBhc3RJbmZvLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnNldCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eTogbmV3IEZTdHJpbmcoJ2RvbmUnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlOiBuZXh0LmRvbmUgPT09IHVuZGVmaW5lZCA/IHVuZGVmaW5lZCA6IG5ldyBGQm9vbGVhbihuZXh0LmRvbmUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXN0SW5mbyxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgc2V0Q29yZShwYXJhbXM6IFNldENvcmVQYXJhbXMpOiB2b2lkIHtcbiAgICAgICAgdGhyb3cgbmV3IFNjcmlwdEV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GVHlwZS5PYmplY3Q7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIGdldENvcmUocGFyYW1zOiBHZXRDb3JlUGFyYW1zKTogRlZhbHVlIHtcbiAgICAgICAgY29uc3QgeyBrZXksIGFzdEluZm8gfSA9IHBhcmFtcztcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICAgIGNhc2UgJ25leHQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkl0ZXJhdG9yLnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5leHQgPSB0aGlzLnNvdXJjZS5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IG5ldyBGUmVjb3JkKCk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5zZXQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk6IG5ldyBGU3RyaW5nKCd2YWx1ZScpLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFsdWU6IHRoaXMuY29udmVydFZhbHVlKG5leHQudmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXN0SW5mbyxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5zZXQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk6IG5ldyBGU3RyaW5nKCdkb25lJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZTogbmV4dC5kb25lID09PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiBuZXcgRkJvb2xlYW4obmV4dC5kb25lKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzdEluZm8sXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuIC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IHtcbiAgICAgICAgcmV0dXJuIG1hcEl0ZXJhdG9yKHRoaXMuc291cmNlLCB4ID0+IHRvSk9iamVjdCh0aGlzLmNvbnZlcnRWYWx1ZSh4KSkpO1xuICAgIH1cbn1cbiJdfQ== |
@@ -9,2 +9,4 @@ import { FObject } from './FObject'; | ||
import { FNumber } from './FNumber'; | ||
import { FArray } from './FArray'; | ||
import { mapIterator } from '../utils/mapIterator'; | ||
export class FMap extends FObject { | ||
@@ -92,2 +94,9 @@ constructor(source, convertValue, convertValueBack) { | ||
} | ||
iterate() { | ||
return mapIterator(this.source[Symbol.iterator](), ([keySource, valueSource]) => { | ||
const key = toFValue(keySource); | ||
const value = this.convertValue(valueSource); | ||
return FArray.create([key, value]); | ||
}); | ||
} | ||
toPrimitiveAsString() { | ||
@@ -109,2 +118,2 @@ return '[object Map]'; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRk1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zY3JpcHRWYWx1ZS9GTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDcEMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxRQUFRLENBQUM7QUFDbkMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUN4QyxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBR2hDLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFDdEMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUN0QyxPQUFPLEVBQUUsT0FBTy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ogRk1hcCB7XG4gICAgICAgIHJldHVybiBuZXcgRk1hcChcbiAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgIHggPT4geCBhcyBGVmFsdWUsXG4gICAgICAgICAgICB4ID0+IHhcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGNvbnZlcnRLZXlCYWNrKHNvdXJjZTogRlZhbHVlLCBhc3RJbmZvOiBBc3RJbmZvIHwgdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBiZWdpbkNhc3Qoc291cmNlLCBhc3RJbmZvKVxuICAgICAgICAgICAgLmFkZEJvb2xlYW4oKVxuICAgICAgICAgICAgLmFkZE51bWJlcigpXG4gICAgICAgICAgICAuYWRkU3RyaW5nKClcbiAgICAgICAgICAgIC5hZGRTeW1ib2woKVxuICAgICAgICAgICAgLmFkZE51bGwoKVxuICAgICAgICAgICAgLmFkZFVuZGVmaW5lZCgpXG4gICAgICAgICAgICAuY2FzdCgpO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgdHlwZSgpOiB0eXBlb2YgRlR5cGUuT2JqZWN0IHtcbiAgICAgICAgcmV0dXJuIEZUeXBlLk9iamVjdDtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgZ2V0Q29yZShwYXJhbXM6IEdldENvcmVQYXJhbXMpOiBGVmFsdWUge1xuICAgICAgICBjb25zdCB7IGtleSwgYXN0SW5mbyB9ID0gcGFyYW1zO1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgICAgY2FzZSAnY2xlYXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNvdXJjZS5jbGVhcigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZGVsZXRlJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5zb3VyY2UuZGVsZXRlKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkJvb2xlYW4ocmVzdWx0KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2ZvckVhY2gnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UuZm9yRWFjaCgodmFsdWUsIGtleSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3RoaXMuY29udmVydFZhbHVlKHZhbHVlKSwgdG9GVmFsdWUoa2V5KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdnZXQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLmNvbnZlcnRLZXlCYWNrKGFyZ3NbMF0sIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuc291cmNlLmdldChrZXkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0VmFsdWUodmFsdWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnaGFzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLnNvdXJjZS5oYXMoa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGQm9vbGVhbih2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdzaXplJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2Uuc2l6ZSk7XG4gICAgICAgICAgICBjYXNlICdzZXQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLmNvbnZlcnRLZXlCYWNrKGFyZ3NbMF0sIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuY29udmVydFZhbHVlQmFjayhhcmdzWzFdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2Uuc2V0KGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIHNldENvcmUocGFyYW1zOiBTZXRDb3JlUGFyYW1zKTogdm9pZCB7XG4gICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcignWW91IGNhbm5vdCBzZXQgYW55IHZhbHVlIHRvIE1hcCcsIHBhcmFtcy5hc3RJbmZvPy5yYW5nZSk7XG4gICAgfVxuXG4gICAgcHVibGljIG92ZXJyaWRlIHRvUHJpbWl0aXZlQXNTdHJpbmcoKTogc3RyaW5nIHtcbiAgICAgICAgcmV0dXJuICdbb2JqZWN0IE1hcF0nO1xuICAgIH1cblxuICAgIHB1YmxpYyBvdmVycmlkZSB0b1ByaW1pdGl2ZUFzTnVtYmVyKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiBOYU47XG4gICAgfVxuXG4gICAgLy8g5q2j56K644Gq5Z6L44GM6KGo54++44Gn44GN44Gq44GE44Gu44GndmFsdWXjga91bmtub3du44Go44GX44Gm44GE44KLXG4gICAgcHVibGljIG92ZXJyaWRlIHRvSk9iamVjdCgpOiB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RlIHJlYWRvbmx5IHNvdXJjZTogTWFwPEtleSwgdW5rbm93bj4sXG4gICAgICAgIHByaXZhdGUgcmVhZG9ubHkgY29udmVydFZhbHVlOiAodmFsdWU6IHVua25vd24pID0+IEZWYWx1ZSxcbiAgICAgICAgcHJpdmF0ZSByZWFkb25seSBjb252ZXJ0VmFsdWVCYWNrOiAodmFsdWU6IEZWYWx1ZSwgYXN0SW5mbzogQXN0SW5mbyB8IHVuZGVmaW5lZCkgPT4gdW5rbm93blxuICAgICkge1xuICAgICAgICBzdXBlcigpO1xuICAgIH1cblxuICAgIHByaXZhdGUgc3RhdGljIHByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldzogYm9vbGVhbiwgYXN0SW5mbzogQXN0SW5mbyB8IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoaXNOZXcpIHtcbiAgICAgICAgICAgIHRocm93IFNjcmlwdEVycm9yLm5vdENvbnN0cnVjdG9yRXJyb3IoYXN0SW5mbz8ucmFuZ2UpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBjcmVhdGUoc291cmNlOiBNYXA8S2V5LCBGVmFsdWU+KTogRk1hcCB7XG4gICAgICAgIHJldHVybiBuZXcgRk1hcChcbiAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgIHggPT4geCBhcyBGVmFsdWUsXG4gICAgICAgICAgICB4ID0+IHhcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGNvbnZlcnRLZXlCYWNrKHNvdXJjZTogRlZhbHVlLCBhc3RJbmZvOiBBc3RJbmZvIHwgdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBiZWdpbkNhc3Qoc291cmNlLCBhc3RJbmZvKVxuICAgICAgICAgICAgLmFkZEJvb2xlYW4oKVxuICAgICAgICAgICAgLmFkZE51bWJlcigpXG4gICAgICAgICAgICAuYWRkU3RyaW5nKClcbiAgICAgICAgICAgIC5hZGRTeW1ib2woKVxuICAgICAgICAgICAgLmFkZE51bGwoKVxuICAgICAgICAgICAgLmFkZFVuZGVmaW5lZCgpXG4gICAgICAgICAgICAuY2FzdCgpO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgdHlwZSgpOiB0eXBlb2YgRlR5cGUuT2JqZWN0IHtcbiAgICAgICAgcmV0dXJuIEZUeXBlLk9iamVjdDtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgZ2V0Q29yZShwYXJhbXM6IEdldENvcmVQYXJhbXMpOiBGVmFsdWUge1xuICAgICAgICBjb25zdCB7IGtleSwgYXN0SW5mbyB9ID0gcGFyYW1zO1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgICAgY2FzZSAnY2xlYXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNvdXJjZS5jbGVhcigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZGVsZXRlJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5zb3VyY2UuZGVsZXRlKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkJvb2xlYW4ocmVzdWx0KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2ZvckVhY2gnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UuZm9yRWFjaCgodmFsdWUsIGtleSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3RoaXMuY29udmVydFZhbHVlKHZhbHVlKSwgdG9GVmFsdWUoa2V5KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdnZXQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLmNvbnZlcnRLZXlCYWNrKGFyZ3NbMF0sIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuc291cmNlLmdldChrZXkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0VmFsdWUodmFsdWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnaGFzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZNYXAucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5jb252ZXJ0S2V5QmFjayhhcmdzWzBdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLnNvdXJjZS5oYXMoa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGQm9vbGVhbih2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdzaXplJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2Uuc2l6ZSk7XG4gICAgICAgICAgICBjYXNlICdzZXQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRk1hcC5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLmNvbnZlcnRLZXlCYWNrKGFyZ3NbMF0sIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuY29udmVydFZhbHVlQmFjayhhcmdzWzFdLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2Uuc2V0KGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAg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gICAgICAgIGNvbnN0IHJlc3VsdCA9IG5ldyBNYXA8S2V5LCB1bmtub3duPigpO1xuICAgICAgICB0aGlzLnNvdXJjZS5mb3JFYWNoKCh2YWx1ZSwga2V5KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBjb252ZXJ0ZWQgPSB0aGlzLmNvbnZlcnRWYWx1ZSh2YWx1ZSk7XG4gICAgICAgICAgICByZXN1bHQuc2V0KGtleSwgY29udmVydGVkID09IG51bGwgPyBjb252ZXJ0ZWQgOiBjb252ZXJ0ZWQudG9KT2JqZWN0KCkpO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG59XG4iXX0= |
import { mapToRecord } from '@kizahasi/util'; | ||
import { ScriptError } from '..'; | ||
import { FObject } from './FObject'; | ||
const symbolNotSupportedMessage = 'Symbol keys are not supported'; | ||
// Mapに変換することで、外界から受け取ったオブジェクトに対する破壊的な操作を起こせないようにしている。 | ||
@@ -8,17 +10,29 @@ export class FRecord extends FObject { | ||
if (base != null) { | ||
this.raw = new Map(base.raw); | ||
this.source = new Map(base.source); | ||
} | ||
else { | ||
this.raw = new Map(); | ||
this.source = new Map(); | ||
} | ||
} | ||
getCore({ key }) { | ||
return this.raw.get(key.toString()); | ||
getCore({ key, astInfo }) { | ||
if (typeof key === 'symbol') { | ||
throw new ScriptError(symbolNotSupportedMessage, astInfo === null || astInfo === void 0 ? void 0 : astInfo.range); | ||
} | ||
return this.source.get(key.toString()); | ||
} | ||
setCore({ key, newValue }) { | ||
this.raw.set(key.toString(), newValue); | ||
setCore({ key, newValue, astInfo }) { | ||
if (typeof key === 'symbol') { | ||
throw new ScriptError(symbolNotSupportedMessage, astInfo === null || astInfo === void 0 ? void 0 : astInfo.range); | ||
} | ||
this.source.set(key.toString(), newValue); | ||
} | ||
clone() { | ||
return new FRecord(this); | ||
} | ||
forEach(callbackfn) { | ||
this.source.forEach(callbackfn); | ||
} | ||
toJObject() { | ||
const result = new Map(); | ||
this.raw.forEach((value, key) => { | ||
this.source.forEach((value, key) => { | ||
result.set(key, value === null || value === void 0 ? void 0 : value.toJObject()); | ||
@@ -29,2 +43,2 @@ }); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRlJlY29yZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zY3JpcHRWYWx1ZS9GUmVjb3JkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM3QyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBSXBDLHNEQUFzRDtBQUN0RCxNQUFNLE9BQU8sT0FBUSxTQUFRLE9BQU87SUFHaEMsWUFBbUIsSUFBYztRQUM3QixLQUFLLEVBQUUsQ0FBQztRQUNSLElBQUksSUFBSSxJQUFJLElBQUksRUFBRTtZQUNkLElBQUksQ0FBQyxHQUFHLEdBQUcsSUFBSSxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO1NBQ2hDO2FBQU07WUFDSCxJQUFJLENBQUMsR0FBRyxHQUFHLElBQUksR0FBRyxFQUFFLENBQUM7U0FDeEI7SUFDTCxDQUFDO0lBRWtCLE9BQU8sQ0FBQyxFQUFFLEdBQUcsRUFBaUI7UUFDN0MsT0FBTyxJQUFJLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztJQUN4QyxDQUFDO0lBRWtCLE9BQU8sQ0FBQyxFQUFFLEdBQUcsRUFBRSxRQUFRLEVBQWlCO1FBQ3ZELElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxRQUFRLEVBQUUsRUFBRSxRQUFRLENBQUMsQ0FBQztJQU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BTZXRDb3JlUGFyYW1zKTogdm9pZCB7XG4gICAgICAgIGlmICh0eXBlb2Yga2V5ID09PSAnc3ltYm9sJykge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFNjcmlwdEVycm9yKHN5bWJvbE5vdFN1cHBvcnRlZE1lc3NhZ2UsIGFzdEluZm8/LnJhbmdlKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNvdXJjZS5zZXQoa2V5LnRvU3RyaW5nKCksIG5ld1ZhbHVlKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgY2xvbmUoKTogRlJlY29yZCB7XG4gICAgICAgIHJldHVybiBuZXcgRlJlY29yZCh0aGlzKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZm9yRWFjaChjYWxsYmFja2ZuOiAodmFsdWU6IEZWYWx1ZSwga2V5OiBzdHJpbmcpID0+IHZvaWQpIHtcbiAgICAgICAgdGhpcy5zb3VyY2UuZm9yRWFjaChjYWxsYmFja2ZuKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgb3ZlcnJpZGUgdG9KT2JqZWN0KCk6IHVua25vd24ge1xuICAgICAgICBjb25zdCByZXN1bHQgPSBuZXcgTWFwPHN0cmluZywgdW5rbm93bj4oKTtcbiAgICAgICAgdGhpcy5zb3VyY2UuZm9yRWFjaCgodmFsdWUsIGtleSkgPT4ge1xuICAgICAgICAgICAgcmVzdWx0LnNldChrZXksIHZhbHVlPy50b0pPYmplY3QoKSk7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gbWFwVG9SZWNvcmQocmVzdWx0KTtcbiAgICB9XG59XG4iXX0= |
import { ScriptError } from '../ScriptError'; | ||
import { mapIterator } from '../utils/mapIterator'; | ||
import { FFunction } from './FFunction'; | ||
@@ -33,2 +34,5 @@ import { FType } from './FType'; | ||
} | ||
iterate() { | ||
return mapIterator(this.raw[Symbol.iterator](), x => new FString(x)); | ||
} | ||
toPrimitiveAsString() { | ||
@@ -44,2 +48,2 @@ return this.raw.toString(); | ||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FzdEluZm8gfCB1bmRlZmluZWQpIHtcbiAgICAgICAgaWYgKGlzTmV3KSB7XG4gICAgICAgICAgICB0aHJvdyBTY3JpcHRFcnJvci5ub3RDb25zdHJ1Y3RvckVycm9yKGFzdEluZm8/LnJhbmdlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgdHlwZSgpOiB0eXBlb2YgRlR5cGUuU3RyaW5nIHtcbiAgICAgICAgcmV0dXJuIEZUeXBlLlN0cmluZztcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0KHsgcHJvcGVydHksIGFzdEluZm8gfTogR2V0UGFyYW1zKTogRlZhbHVlIHtcbiAgICAgICAgY29uc3QgcHJvcGVydHlOYW1lID0gdHJ5VG9Qcm9wZXJ0eU5hbWUocHJvcGVydHkpO1xuICAgICAgICBzd2l0Y2ggKHByb3BlcnR5TmFtZSkge1xuICAgICAgICAgICAgLy8gVE9ETzog44KC44Gj44Go5a6f6KOF44GZ44KLXG4gICAgICAgICAgICBjYXNlICd0b1N0cmluZyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGU3RyaW5nLnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHNldCh7IGFzdEluZm8gfTogU2V0UGFyYW1zKTogdm9pZCB7XG4gICAgICAgIHRocm93IG5ldyBTY3JpcHRFcnJvcignWW91IGNhbm5vdCBzZXQgYW55IHZhbHVlIHRvIFN0cmluZycsIGFzdEluZm8/LnJhbmdlKTtcbiAgICB9XG5cbiAgICBwdWJsa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go5Yik5pat44GV44KM44KL44CCXG4gICAgaXRlcmF0ZT8oKTogSXRlcmFibGVJdGVyYXRvcjxGVmFsdWU+O1xufTtcbiJdfQ== |
@@ -1,12 +0,20 @@ | ||
import { ArrayExpression, ArrowFunctionExpression, AssignmentExpression, AssignmentOperator, BaseCallExpression, BinaryExpression, BinaryOperator, ChainExpression, ConditionalExpression, Expression, Identifier, Literal, LogicalExpression, MemberExpression, NewExpression, ObjectExpression, Property, SimpleCallExpression, ThisExpression, UnaryExpression, UnaryOperator } from 'estree'; | ||
import { ArrayExpression, ArrowFunctionExpression, AssignmentExpression, AssignmentOperator, BaseCallExpression, BinaryExpression, BinaryOperator, ChainExpression, ConditionalExpression, Expression, Identifier, Literal, LogicalExpression, MemberExpression, NewExpression, ObjectExpression, Property, SimpleCallExpression, ThisExpression, UnaryExpression, UnaryOperator, UpdateExpression } from 'estree'; | ||
import { FPattern } from './fPattern'; | ||
import { FBlockStatement } from './fStatement'; | ||
import { Range } from './range'; | ||
declare type FArrayExpressionElement = { | ||
isSpread: false; | ||
expression: FExpression; | ||
} | { | ||
isSpread: true; | ||
argument: FExpression; | ||
}; | ||
export declare type FArrayExpression = Omit<ArrayExpression, 'elements'> & { | ||
elements: Array<FExpression | null>; | ||
elements: Array<FArrayExpressionElement | null>; | ||
}; | ||
export declare type FArrowFunctionExpression = Omit<ArrowFunctionExpression, 'body' | 'params'> & { | ||
body: FBlockStatement | FExpression; | ||
params: Array<FIdentifier>; | ||
params: Array<FPattern>; | ||
}; | ||
declare function fAssignmentOperator(operator: AssignmentOperator, range: Range | undefined): "="; | ||
declare function fAssignmentOperator(operator: AssignmentOperator): AssignmentOperator; | ||
export declare type FAssignmentOperator = ReturnType<typeof fAssignmentOperator>; | ||
@@ -22,3 +30,3 @@ export declare type FAssignmentExpression = Omit<AssignmentExpression, 'operator' | 'left' | 'right'> & { | ||
}; | ||
declare function fBinaryOperator(operator: BinaryOperator, range: Range | undefined): "-" | "+" | "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "*" | "/" | "%" | "**" | "|" | "^" | "&"; | ||
declare function fBinaryOperator(operator: BinaryOperator, range: Range | undefined): "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&"; | ||
export declare type FBinaryOperator = ReturnType<typeof fBinaryOperator>; | ||
@@ -49,2 +57,3 @@ export declare type FBinaryExpression = Omit<BinaryExpression, 'operator' | 'left' | 'right'> & { | ||
}; | ||
export declare function fMemberExpression(expression: MemberExpression): FMemberExpression; | ||
export declare type FNewExpression = Omit<NewExpression, 'callee' | 'arguments'> & { | ||
@@ -54,4 +63,11 @@ callee: FExpression; | ||
}; | ||
declare type FObjectExpressionElement = { | ||
isSpread: false; | ||
property: FProperty; | ||
} | { | ||
isSpread: true; | ||
argument: FExpression; | ||
}; | ||
export declare type FObjectExpression = Omit<ObjectExpression, 'properties'> & { | ||
properties: Array<FProperty>; | ||
properties: Array<FObjectExpressionElement>; | ||
}; | ||
@@ -63,2 +79,3 @@ export declare type FProperty = Omit<Property, 'key' | 'value' | 'kind'> & { | ||
}; | ||
export declare function fProperty(property: Property): FProperty; | ||
export declare type FSimpleCallExpression = Omit<SimpleCallExpression, 'callee' | 'arguments'> & { | ||
@@ -69,3 +86,3 @@ callee: FExpression; | ||
export declare type FThisExpression = ThisExpression; | ||
declare function fUnaryOperator(operator: UnaryOperator, range: Range | undefined): "-" | "+" | "!" | "~" | "typeof"; | ||
declare function fUnaryOperator(operator: UnaryOperator, range: Range | undefined): "+" | "-" | "!" | "~" | "typeof"; | ||
export declare type FUnaryOperator = ReturnType<typeof fUnaryOperator>; | ||
@@ -76,4 +93,7 @@ export declare type FUnaryExpression = Omit<UnaryExpression, 'operator' | 'argument'> & { | ||
}; | ||
export declare type FExpression = FArrayExpression | FArrowFunctionExpression | FAssignmentExpression | FBinaryExpression | FChainExpression | FConditionalExpression | FIdentifier | FLiteral | FLogicalExpression | FMemberExpression | FNewExpression | FObjectExpression | FThisExpression | FSimpleCallExpression | FUnaryExpression; | ||
export declare type FUpdateExpression = Omit<UpdateExpression, 'argument'> & { | ||
argument: FIdentifier | FMemberExpression; | ||
}; | ||
export declare type FExpression = FArrayExpression | FArrowFunctionExpression | FAssignmentExpression | FBinaryExpression | FChainExpression | FConditionalExpression | FIdentifier | FLiteral | FLogicalExpression | FMemberExpression | FNewExpression | FObjectExpression | FThisExpression | FSimpleCallExpression | FUnaryExpression | FUpdateExpression; | ||
export declare function fExpression(expression: Expression): FExpression; | ||
export {}; |
@@ -1,3 +0,4 @@ | ||
import { BlockStatement, BreakStatement, ContinueStatement, Directive, ExpressionStatement, IfStatement, ModuleDeclaration, ReturnStatement, Statement, SwitchCase, SwitchStatement, VariableDeclaration } from 'estree'; | ||
import { BlockStatement, BreakStatement, ContinueStatement, Directive, ExpressionStatement, ForOfStatement, ForStatement, IfStatement, ModuleDeclaration, ReturnStatement, Statement, SwitchCase, SwitchStatement, VariableDeclaration } from 'estree'; | ||
import { FExpression } from './fExpression'; | ||
import { FPattern } from './fPattern'; | ||
export declare type FBlockStatement = Omit<BlockStatement, 'body'> & { | ||
@@ -8,2 +9,3 @@ body: Array<FStatement>; | ||
declare type FBreakStatement = Omit<BreakStatement, 'label'>; | ||
declare type FContinueStatement = Omit<ContinueStatement, 'label'>; | ||
declare const fExpressionStatement: (statement: ExpressionStatement) => { | ||
@@ -18,2 +20,14 @@ expression: FExpression; | ||
declare type FExpressionStatement = ReturnType<typeof fExpressionStatement>; | ||
declare type ForLeft = FPattern | FVariableDeclaration; | ||
declare type FForOfStatement = Omit<ForOfStatement, 'left' | 'right' | 'body'> & { | ||
left: ForLeft; | ||
right: FExpression; | ||
body: FStatement; | ||
}; | ||
declare type FForStatement = Omit<ForStatement, 'init' | 'test' | 'update' | 'body'> & { | ||
init: FVariableDeclaration | FExpression | null | undefined; | ||
test: FExpression | null | undefined; | ||
update: FExpression | null | undefined; | ||
body: FStatement; | ||
}; | ||
declare type FIfStatement = Omit<IfStatement, 'alternate' | 'consequent' | 'test'> & { | ||
@@ -31,3 +45,3 @@ alternate?: FStatement | null; | ||
}; | ||
declare type FSwitchStatement = Omit<SwitchStatement, 'alternate' | 'consequent' | 'test'> & { | ||
declare type FSwitchStatement = Omit<SwitchStatement, 'discriminant' | 'cases'> & { | ||
discriminant: FExpression; | ||
@@ -39,5 +53,5 @@ cases: Array<FSwitchCase>; | ||
declarations: { | ||
id: FPattern; | ||
init: FExpression | null | undefined; | ||
type: "VariableDeclarator"; | ||
id: import("estree").Pattern; | ||
leadingComments?: import("estree").Comment[] | undefined; | ||
@@ -54,5 +68,5 @@ trailingComments?: import("estree").Comment[] | undefined; | ||
}; | ||
declare type FVariableDeclaration = ReturnType<typeof fVariableDeclaration>; | ||
export declare type FStatement = FBlockStatement | FBreakStatement | ContinueStatement | FIfStatement | FExpressionStatement | FReturnStatement | FSwitchStatement | FVariableDeclaration; | ||
export declare function fFStatement(statement: Directive | Statement | ModuleDeclaration): FStatement; | ||
export declare type FVariableDeclaration = ReturnType<typeof fVariableDeclaration>; | ||
export declare type FStatement = FBlockStatement | FBreakStatement | FContinueStatement | FIfStatement | FExpressionStatement | FForOfStatement | FForStatement | FReturnStatement | FSwitchStatement | FVariableDeclaration; | ||
export declare function fStatement(statement: Directive | Statement | ModuleDeclaration): FStatement; | ||
export {}; |
export { exec, test } from './main'; | ||
export { arrayClass } from './builtIn/Array'; | ||
export { createConsoleClass } from './builtIn/console'; | ||
export { mapClass } from './builtIn/Map'; | ||
@@ -4,0 +5,0 @@ export { symbolClass } from './builtIn/Symbol'; |
@@ -6,3 +6,3 @@ import { FBoolean } from './FBoolean'; | ||
export declare const compareToNumber: (left: FValue, right: FValue, hint: 'default' | 'string' | 'number', comparer: (left: any, right: any) => number) => FNumber; | ||
export declare const compareToBoolean: (left: FValue, right: FValue, hint: 'default' | 'string' | 'number', comparer: (left: any, right: any) => boolean) => FBoolean; | ||
export declare const compareToBoolean: (left: FValue, right: FValue, hint: 'default' | 'string' | 'number' | 'JObject', comparer: (left: any, right: any) => boolean) => FBoolean; | ||
export declare const compareToNumberOrString: (left: FValue, right: FValue, hint: 'default', comparer: (left: any, right: any) => number | string) => FNumber | FString; |
@@ -12,3 +12,4 @@ import { FType } from './FType'; | ||
get type(): typeof FType.Array; | ||
iterate(): FValue[]; | ||
private iterateAsArray; | ||
iterate(): IterableIterator<FValue>; | ||
private static isValidIndex; | ||
@@ -15,0 +16,0 @@ get({ property, astInfo }: GetParams): FValue; |
@@ -14,2 +14,3 @@ import { FObject } from './FObject'; | ||
setCore(params: SetCoreParams): void; | ||
iterate(): IterableIterator<FValue>; | ||
toPrimitiveAsString(): string; | ||
@@ -16,0 +17,0 @@ toPrimitiveAsNumber(): number; |
@@ -17,2 +17,3 @@ import { FObject } from './FObject'; | ||
setCore(params: SetCoreParams): void; | ||
iterate(): IterableIterator<FValue>; | ||
toPrimitiveAsString(): string; | ||
@@ -19,0 +20,0 @@ toPrimitiveAsNumber(): number; |
@@ -5,7 +5,9 @@ import { FObject } from './FObject'; | ||
export declare class FRecord extends FObject { | ||
private readonly raw; | ||
readonly source: Map<string, FValue>; | ||
constructor(base?: FRecord); | ||
protected getCore({ key }: GetCoreParams): FValue; | ||
protected setCore({ key, newValue }: SetCoreParams): void; | ||
protected getCore({ key, astInfo }: GetCoreParams): FValue; | ||
protected setCore({ key, newValue, astInfo }: SetCoreParams): void; | ||
clone(): FRecord; | ||
forEach(callbackfn: (value: FValue, key: string) => void): void; | ||
toJObject(): unknown; | ||
} |
@@ -11,2 +11,3 @@ import { FType } from './FType'; | ||
set({ astInfo }: SetParams): void; | ||
iterate(): IterableIterator<FValue>; | ||
toPrimitiveAsString(): string; | ||
@@ -13,0 +14,0 @@ toPrimitiveAsNumber(): number; |
@@ -32,2 +32,3 @@ import { Range } from '../range'; | ||
toPrimitiveAsDefault?(): number | string; | ||
iterate?(): IterableIterator<FValue>; | ||
}; |
{ | ||
"version": "0.8.1-beta.3", | ||
"version": "0.8.1-beta.4", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/cjs/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
747056
129
5463