id
stringlengths 1
6
| tokens
sequence | labels
sequence |
---|---|---|
400 | [
"format",
"/**\n * There are some env vars which affect transformations, so the Metro/Babel cache should be invalidated when at least one of them changed.\n *\n * If any issues found with such approach, we can fallback to the implementation which always invalidates caches, but also makes bundling significantly slower:\n * export default function getCacheKey() { return Math.random().toString(36); }\n */",
"import",
"{",
"default",
"as",
"flipperEnv",
"}",
"from",
"'./flipper-env'",
";",
"import",
"fs",
"from",
"'fs-extra'",
";",
"import",
"path",
"from",
"'path'",
";",
"let",
"selfChecksum",
";",
"function",
"getSelfChecksum",
"(",
")",
"{",
"if",
"(",
"!",
"selfChecksum",
")",
"{",
"selfChecksum",
"=",
"fs",
".",
"readFileSync",
"(",
"path",
".",
"resolve",
"(",
"__dirname",
",",
"'..'",
",",
"'lib'",
",",
"'checksum.txt'",
")",
")",
".",
"toString",
"(",
")",
";",
"}",
"return",
"selfChecksum",
";",
"}",
"export",
"default",
"function",
"getCacheKey",
"(",
")",
"{",
"const",
"key",
"=",
"[",
"getSelfChecksum",
"(",
")",
",",
"...",
"Object",
".",
"entries",
"(",
"flipperEnv",
")",
".",
"sort",
"(",
"(",
"[",
"name1",
",",
"_value1",
"]",
",",
"[",
"name2",
",",
"_value2",
"]",
")",
"=>",
"name1",
".",
"localeCompare",
"(",
"name2",
")",
")",
".",
"map",
"(",
"(",
"[",
"name",
",",
"value",
"]",
")",
"=>",
"`${",
"name",
"}=${",
"value",
"}`",
")",
",",
"]",
".",
"join",
"(",
"'|'",
")",
";",
"return",
"key",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
401 | [
"format",
"import",
"{",
"variableDeclarator",
",",
"variableDeclaration",
",",
"identifier",
",",
"callExpression",
",",
"stringLiteral",
",",
"memberExpression",
",",
"Identifier",
",",
"Program",
",",
"}",
"from",
"'@babel/types'",
";",
"import",
"{",
"NodePath",
"}",
"from",
"'@babel/traverse'",
";",
"module",
".",
"exports",
"=",
"(",
")",
"=>",
"(",
"{",
"name",
":",
"'infinity-import-react'",
",",
"visitor",
":",
"{",
"Program",
":",
"{",
"exit",
"(",
"path",
",",
"state",
")",
"{",
"if",
"(",
"state",
".",
"get",
"(",
"'NEEDS_REACT'",
")",
")",
"{",
"path",
".",
"unshiftContainer",
"(",
"'body'",
",",
"[",
"variableDeclaration",
"(",
"'var'",
",",
"[",
"variableDeclarator",
"(",
"identifier",
"(",
"'React'",
")",
",",
"callExpression",
"(",
"identifier",
"(",
"'require'",
")",
",",
"[",
"stringLiteral",
"(",
"'react'",
")",
"]",
")",
")",
",",
"]",
")",
",",
"]",
")",
";",
"}",
"}",
",",
"}",
",",
"ReferencedIdentifier",
"(",
"path",
",",
"state",
")",
"{",
"if",
"(",
"path",
".",
"node",
".",
"name",
"===",
"'React'",
"&&",
"!",
"path",
".",
"scope",
".",
"getBinding",
"(",
"'React'",
")",
")",
"{",
"state",
".",
"set",
"(",
"'NEEDS_REACT'",
",",
"true",
")",
";",
"}",
"if",
"(",
"path",
".",
"node",
".",
"name",
"===",
"'Buffer'",
"&&",
"!",
"path",
".",
"scope",
".",
"getBinding",
"(",
"'Buffer'",
")",
")",
"{",
"path",
".",
"replaceWith",
"(",
"memberExpression",
"(",
"callExpression",
"(",
"identifier",
"(",
"'require'",
")",
",",
"[",
"stringLiteral",
"(",
"'buffer'",
")",
"]",
")",
",",
"identifier",
"(",
"'Buffer'",
")",
")",
")",
";",
"}",
"}",
",",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
224,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
224,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
402 | [
"format",
"import",
"{",
"default",
"as",
"generate",
"}",
"from",
"'@babel/generator'",
";",
"import",
"{",
"parse",
",",
"ParserPlugin",
"}",
"from",
"'@babel/parser'",
";",
"import",
"{",
"transformFromAstSync",
"}",
"from",
"'@babel/core'",
";",
"import",
"{",
"default",
"as",
"flipperEnv",
"}",
"from",
"'./flipper-env'",
";",
"import",
"{",
"resolve",
"}",
"from",
"'path'",
";",
"const",
"jsParsePlugins",
"=",
"[",
"'jsx'",
",",
"[",
"'flow'",
",",
"{",
"all",
":",
"true",
"}",
"]",
",",
"'classProperties'",
",",
"'objectRestSpread'",
",",
"'optionalChaining'",
",",
"'nullishCoalescingOperator'",
",",
"]",
";",
"const",
"tsParsePluins",
"=",
"[",
"'jsx'",
",",
"'typescript'",
",",
"'classProperties'",
",",
"'optionalChaining'",
",",
"'nullishCoalescingOperator'",
",",
"]",
";",
"const",
"commonJsPlugin",
"=",
"[",
"require",
"(",
"'@babel/plugin-transform-modules-commonjs'",
")",
",",
"{",
"strictMode",
":",
"false",
",",
"}",
",",
"]",
";",
"const",
"classPropertiesPlugin",
"=",
"require",
"(",
"'@babel/plugin-proposal-class-properties'",
")",
";",
"const",
"optionalChainingPlugin",
"=",
"require",
"(",
"'@babel/plugin-proposal-optional-chaining'",
")",
";",
"const",
"coalescingOperatorPlugin",
"=",
"require",
"(",
"'@babel/plugin-proposal-nullish-coalescing-operator'",
")",
";",
"const",
"objectRestSpreadPlugin",
"=",
"require",
"(",
"'@babel/plugin-proposal-object-rest-spread'",
")",
";",
"const",
"flowStripTypesPlugin",
"=",
"require",
"(",
"'@babel/plugin-transform-flow-strip-types'",
")",
";",
"const",
"dynamicRequiresPlugin",
"=",
"require",
"(",
"'./dynamic-requires'",
")",
";",
"const",
"typeScriptPlugin",
"=",
"require",
"(",
"'@babel/plugin-transform-typescript'",
")",
";",
"const",
"emotionPlugin",
"=",
"require",
"(",
"'@emotion/babel-plugin'",
")",
";",
"const",
"tsTransformPlugins",
"=",
"[",
"typeScriptPlugin",
",",
"classPropertiesPlugin",
",",
"commonJsPlugin",
",",
"optionalChainingPlugin",
",",
"coalescingOperatorPlugin",
",",
"[",
"emotionPlugin",
",",
"{",
"autoLabel",
":",
"'always'",
",",
"sourceMap",
":",
"false",
"}",
"]",
",",
"]",
";",
"const",
"jsTransformPlugins",
"=",
"[",
"commonJsPlugin",
",",
"objectRestSpreadPlugin",
",",
"classPropertiesPlugin",
",",
"flowStripTypesPlugin",
",",
"optionalChainingPlugin",
",",
"coalescingOperatorPlugin",
",",
"dynamicRequiresPlugin",
",",
"[",
"emotionPlugin",
",",
"{",
"autoLabel",
":",
"'always'",
",",
"sourceMap",
":",
"false",
"}",
"]",
",",
"]",
";",
"export",
"default",
"function",
"transform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"presets",
",",
"plugins",
",",
"}",
")",
"{",
"filename",
"=",
"resolve",
"(",
"options",
".",
"projectRoot",
",",
"filename",
")",
";",
"presets",
"=",
"presets",
"??",
"[",
"require",
"(",
"'@babel/preset-react'",
")",
"]",
";",
"plugins",
"=",
"plugins",
"??",
"[",
"]",
";",
"const",
"isTypeScript",
"=",
"filename",
".",
"endsWith",
"(",
"'.tsx'",
")",
"||",
"filename",
".",
"endsWith",
"(",
"'.ts'",
")",
";",
"const",
"ast",
"=",
"parse",
"(",
"src",
",",
"{",
"sourceFilename",
":",
"filename",
",",
"plugins",
":",
"isTypeScript",
"?",
"tsParsePluins",
":",
"jsParsePlugins",
",",
"sourceType",
":",
"'module'",
",",
"}",
")",
";",
"const",
"transformed",
"=",
"transformFromAstSync",
"(",
"ast",
",",
"src",
",",
"{",
"ast",
":",
"true",
",",
"babelrc",
":",
"!",
"filename",
".",
"includes",
"(",
"'node_modules'",
")",
",",
"code",
":",
"false",
",",
"comments",
":",
"false",
",",
"compact",
":",
"false",
",",
"root",
":",
"options",
".",
"projectRoot",
",",
"filename",
",",
"plugins",
":",
"[",
"...",
"(",
"isTypeScript",
"?",
"tsTransformPlugins",
":",
"jsTransformPlugins",
")",
",",
"...",
"plugins",
",",
"]",
",",
"presets",
",",
"sourceMaps",
":",
"true",
",",
"retainLines",
":",
"!",
"!",
"flipperEnv",
".",
"FLIPPER_TEST_RUNNER",
",",
"}",
")",
";",
"if",
"(",
"!",
"transformed",
")",
"{",
"throw",
"new",
"Error",
"(",
"'Failed to transform'",
")",
";",
"}",
"const",
"result",
"=",
"generate",
"(",
"transformed",
".",
"ast",
"!",
",",
"{",
"filename",
",",
"sourceFileName",
":",
"filename",
",",
"sourceMaps",
":",
"true",
",",
"retainLines",
":",
"!",
"!",
"flipperEnv",
".",
"FLIPPER_TEST_RUNNER",
",",
"}",
",",
"src",
")",
";",
"return",
"{",
"ast",
":",
"transformed",
".",
"ast",
",",
"code",
":",
"result",
".",
"code",
",",
"filename",
",",
"map",
":",
"result",
".",
"map",
",",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
403 | [
"format",
"import",
"{",
"default",
"as",
"doTransform",
"}",
"from",
"'./transform'",
";",
"const",
"presets",
"=",
"[",
"require",
"(",
"'@babel/preset-react'",
")",
"]",
";",
"const",
"plugins",
"=",
"[",
"require",
"(",
"'./electron-requires'",
")",
",",
"require",
"(",
"'./plugin-flipper-requires'",
")",
",",
"require",
"(",
"'./fb-stubs'",
")",
",",
"]",
";",
"export",
"default",
"function",
"transform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"}",
")",
"{",
"return",
"doTransform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"presets",
",",
"plugins",
"}",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
404 | [
"format",
"import",
"{",
"CallExpression",
",",
"Identifier",
",",
"isStringLiteral",
"}",
"from",
"'@babel/types'",
";",
"import",
"{",
"NodePath",
"}",
"from",
"'@babel/traverse'",
";",
"import",
"{",
"resolve",
",",
"dirname",
"}",
"from",
"'path'",
";",
"import",
"{",
"tryReplaceFlipperRequire",
",",
"tryReplaceGlobalReactUsage",
",",
"}",
"from",
"'./replace-flipper-requires'",
";",
"const",
"EXCLUDE_PATHS",
"=",
"[",
"'/node_modules/react-devtools-core/'",
",",
"'relay-devtools/DevtoolsUI'",
",",
"]",
";",
"function",
"isExcludedPath",
"(",
"path",
")",
"{",
"for",
"(",
"const",
"epath",
"of",
"EXCLUDE_PATHS",
")",
"{",
"if",
"(",
"path",
".",
"indexOf",
"(",
"epath",
")",
">",
"-",
"1",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"module",
".",
"exports",
"=",
"(",
")",
"=>",
"(",
"{",
"visitor",
":",
"{",
"CallExpression",
"(",
"path",
",",
"state",
")",
"{",
"if",
"(",
"isExcludedPath",
"(",
"state",
".",
"file",
".",
"opts",
".",
"filename",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"tryReplaceFlipperRequire",
"(",
"path",
")",
")",
"{",
"const",
"node",
"=",
"path",
".",
"node",
";",
"const",
"args",
"=",
"node",
".",
"arguments",
"||",
"[",
"]",
";",
"if",
"(",
"node",
".",
"callee",
".",
"type",
"===",
"'Identifier'",
"&&",
"node",
".",
"callee",
".",
"name",
"===",
"'require'",
"&&",
"args",
".",
"length",
"===",
"1",
"&&",
"isStringLiteral",
"(",
"args",
"[",
"0",
"]",
")",
"&&",
"args",
"[",
"0",
"]",
".",
"value",
".",
"indexOf",
"(",
"'/'",
")",
">",
"-",
"1",
"&&",
"state",
".",
"file",
".",
"opts",
".",
"filename",
".",
"startsWith",
"(",
"state",
".",
"file",
".",
"opts",
".",
"root",
")",
"&&",
"!",
"resolve",
"(",
"dirname",
"(",
"state",
".",
"file",
".",
"opts",
".",
"filename",
")",
",",
"args",
"[",
"0",
"]",
".",
"value",
")",
".",
"startsWith",
"(",
"state",
".",
"file",
".",
"opts",
".",
"root",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"`Plugins cannot require files from outside their folder. `",
"+",
"`Attempted to require \"${",
"args",
"[",
"0",
"]",
".",
"value",
"}\" `",
"+",
"`from file \"${",
"state",
".",
"file",
".",
"opts",
".",
"filename",
"}\" resolved to `",
"+",
"`\"${",
"resolve",
"(",
"dirname",
"(",
"state",
".",
"file",
".",
"opts",
".",
"filename",
")",
",",
"args",
"[",
"0",
"]",
".",
"value",
")",
"}\" `",
"+",
"`which isn't inside plugin dir \"${",
"state",
".",
"file",
".",
"opts",
".",
"root",
"}\".`",
")",
";",
"}",
"}",
"}",
",",
"Identifier",
"(",
"path",
",",
"state",
")",
"{",
"if",
"(",
"isExcludedPath",
"(",
"state",
".",
"file",
".",
"opts",
".",
"filename",
")",
")",
"{",
"return",
";",
"}",
"tryReplaceGlobalReactUsage",
"(",
"path",
")",
";",
"}",
",",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
224,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
224,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
405 | [
"format",
"import",
"{",
"default",
"as",
"doTransform",
"}",
"from",
"'./transform'",
";",
"import",
"{",
"default",
"as",
"getCacheKey",
"}",
"from",
"'./get-cache-key'",
";",
"const",
"presets",
"=",
"[",
"require",
"(",
"'@babel/preset-react'",
")",
"]",
";",
"const",
"plugins",
"=",
"[",
"require",
"(",
"'./electron-requires'",
")",
",",
"require",
"(",
"'./import-react'",
")",
",",
"require",
"(",
"'./app-flipper-requires'",
")",
",",
"require",
"(",
"'./fb-stubs'",
")",
",",
"]",
";",
"module",
".",
"exports",
"=",
"{",
"transform",
",",
"getCacheKey",
",",
"}",
";",
"function",
"transform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"}",
")",
"{",
"return",
"doTransform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"presets",
",",
"plugins",
"}",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
406 | [
"format",
"import",
"{",
"default",
"as",
"doTransform",
"}",
"from",
"'./transform'",
";",
"import",
"{",
"default",
"as",
"getCacheKey",
"}",
"from",
"'./get-cache-key'",
";",
"import",
"{",
"default",
"as",
"flipperEnv",
"}",
"from",
"'./flipper-env'",
";",
"const",
"presets",
"=",
"[",
"[",
"require",
"(",
"'@babel/preset-env'",
")",
",",
"{",
"targets",
":",
"{",
"electron",
":",
"flipperEnv",
".",
"FLIPPER_ELECTRON_VERSION",
"}",
"}",
",",
"]",
",",
"]",
";",
"const",
"plugins",
"=",
"[",
"require",
"(",
"'./electron-requires-main'",
")",
",",
"require",
"(",
"'./fb-stubs'",
")",
"]",
";",
"module",
".",
"exports",
"=",
"{",
"transform",
",",
"getCacheKey",
",",
"}",
";",
"function",
"transform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"}",
")",
"{",
"return",
"doTransform",
"(",
"{",
"filename",
",",
"options",
",",
"src",
",",
"presets",
",",
"plugins",
"}",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
407 | [
"import",
"type",
"{",
"Store",
",",
"Event",
",",
"Filter",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"Scope",
"}",
"from",
"'../effector/unit.h'",
";",
"import",
"type",
"{",
"StateRef",
",",
"Node",
",",
"Cmd",
"}",
"from",
"'../effector/index.h'",
";",
"import",
"type",
"{",
"ElementBlock",
",",
"ListBlock",
",",
"UsingBlock",
",",
"LF",
",",
"RouteBlock",
",",
"RecItemBlock",
",",
"RecBlock",
",",
"BlockBlock",
",",
"BlockItemBlock",
",",
"}",
"from",
"'./relation.h'",
";",
"import",
"type",
"{",
"Op",
",",
"OpGroup",
",",
"AsyncValue",
"}",
"from",
"'./plan/index.h'",
";",
"export",
"type",
"Template",
"=",
"{",
"id",
":",
"number",
";",
"name",
":",
"string",
";",
"plain",
":",
"StateRef",
"[",
"]",
";",
"closure",
":",
"StateRef",
"[",
"]",
";",
"watch",
":",
"any",
"[",
"]",
";",
"nameMap",
":",
"Record",
"<",
"string",
",",
"any",
">",
";",
"pages",
":",
"Leaf",
"[",
"]",
";",
"childTemplates",
":",
"Template",
"[",
"]",
";",
"loader",
":",
"Filter",
";",
"upward",
":",
"Filter",
";",
"parent",
":",
"Template",
"|",
"null",
";",
"node",
":",
"Node",
";",
"draft",
":",
"NodeDraft",
";",
"api",
":",
"Record",
"<",
"string",
",",
"Event",
"<",
"any",
">",
">",
";",
"trigger",
":",
"{",
"mount",
":",
"Event",
"<",
"Leaf",
">",
";",
"}",
";",
"isSvgRoot",
":",
"boolean",
";",
"namespace",
":",
"NSType",
";",
"env",
":",
"Env",
";",
"deferredInit",
"?",
":",
"(",
"(",
")",
"=>",
"void",
")",
"|",
"null",
";",
"isBlock",
":",
"boolean",
";",
"handlers",
":",
"TemplateHandlers",
";",
"}",
";",
"export",
"type",
"DOMProperty",
"=",
"string",
"|",
"number",
"|",
"null",
"|",
"boolean",
";",
"export",
"type",
"PropertyMap",
"=",
"{",
"[",
"field",
"]",
":",
"StoreOrData",
"<",
"DOMProperty",
">",
";",
"}",
";",
"export",
"type",
"StylePropertyMap",
"=",
"Partial",
"<",
"{",
"[",
"K",
"in",
"keyof",
"CSSStyleDeclaration",
"]",
":",
"StoreOrData",
"<",
"DOMProperty",
">",
";",
"}",
">",
";",
"export",
"type",
"NSType",
"=",
"'html'",
"|",
"'svg'",
"|",
"'foreignObject'",
";",
"export",
"type",
"DOMElement",
"=",
"HTMLElement",
"|",
"SVGElement",
";",
"export",
"type",
"StoreOrData",
"<",
"T",
">",
"=",
"Store",
"<",
"T",
">",
"|",
"T",
";",
"export",
"type",
"HandlerRecord",
"=",
"{",
"options",
":",
"{",
"prevent",
":",
"boolean",
";",
"stop",
":",
"boolean",
";",
"}",
";",
"domConfig",
":",
"{",
"passive",
":",
"boolean",
";",
"capture",
":",
"boolean",
";",
"}",
";",
"map",
":",
"Partial",
"<",
"{",
"[",
"K",
"in",
"keyof",
"HTMLElementEventMap",
"]",
":",
"Event",
"<",
"HTMLElementEventMap",
"[",
"K",
"]",
">",
";",
"}",
">",
";",
"}",
";",
"export",
"type",
"StaticOperationDef",
"=",
"{",
"type",
":",
"'attr'",
";",
"field",
":",
"string",
";",
"value",
":",
"DOMProperty",
";",
"}",
"|",
"{",
"type",
":",
"'data'",
";",
"field",
":",
"string",
";",
"value",
":",
"DOMProperty",
";",
"}",
"|",
"{",
"type",
":",
"'style'",
";",
"field",
":",
"string",
";",
"value",
":",
"DOMProperty",
";",
"}",
"|",
"{",
"type",
":",
"'styleVar'",
";",
"field",
":",
"string",
";",
"value",
":",
"DOMProperty",
";",
"}",
";",
"export",
"type",
"OperationDef",
"=",
"{",
"type",
":",
"'visible'",
";",
"value",
":",
"Store",
"<",
"boolean",
">",
";",
"}",
"|",
"{",
"type",
":",
"'attr'",
";",
"field",
":",
"string",
";",
"value",
":",
"Store",
"<",
"DOMProperty",
">",
";",
"}",
"|",
"{",
"type",
":",
"'data'",
";",
"field",
":",
"string",
";",
"value",
":",
"Store",
"<",
"DOMProperty",
">",
";",
"}",
"|",
"{",
"type",
":",
"'style'",
";",
"field",
":",
"string",
";",
"value",
":",
"Store",
"<",
"DOMProperty",
">",
";",
"}",
"|",
"{",
"type",
":",
"'styleVar'",
";",
"field",
":",
"string",
";",
"value",
":",
"Store",
"<",
"DOMProperty",
">",
";",
"}",
"|",
"{",
"type",
":",
"'staticText'",
";",
"value",
":",
"string",
";",
"childIndex",
":",
"number",
";",
"}",
"|",
"{",
"type",
":",
"'dynamicText'",
";",
"value",
":",
"Store",
"<",
"DOMProperty",
">",
";",
"childIndex",
":",
"number",
";",
"}",
"|",
"{",
"type",
":",
"'handler'",
";",
"for",
":",
"string",
";",
"handler",
":",
"Event",
"<",
"any",
">",
";",
"options",
":",
"{",
"prevent",
":",
"boolean",
";",
"stop",
":",
"boolean",
";",
"}",
";",
"domConfig",
":",
"{",
"passive",
":",
"boolean",
";",
"capture",
":",
"boolean",
";",
"}",
";",
"}",
";",
"/** operation family for things represented as <el \"thing\"=\"value\" /> */",
"export",
"type",
"PropertyOperationDef",
"=",
"Extract",
"<",
"OperationDef",
",",
"{",
"type",
":",
"PropertyOperationKind",
";",
"}",
">",
";",
"export",
"type",
"PropertyOperationKind",
"=",
"'attr'",
"|",
"'data'",
"|",
"'style'",
"|",
"'styleVar'",
";",
"export",
"type",
"Env",
"=",
"{",
"document",
":",
"Document",
";",
"}",
";",
"export",
"type",
"LeafDataRoute",
"=",
"{",
"type",
":",
"'route'",
";",
"block",
":",
"RouteBlock",
";",
"ops",
":",
"{",
"}",
";",
"initialized",
":",
"boolean",
";",
"pendingInit",
":",
"{",
"value",
":",
"any",
";",
"}",
"|",
"null",
";",
"}",
";",
"export",
"type",
"LeafDataElement",
"=",
"{",
"type",
":",
"'element'",
";",
"block",
":",
"ElementBlock",
";",
"ops",
":",
"{",
"visible",
":",
"Op",
";",
"}",
";",
"needToCallNode",
":",
"boolean",
";",
"}",
";",
"export",
"type",
"LeafDataBlock",
"=",
"{",
"type",
":",
"'block'",
";",
"block",
":",
"BlockBlock",
";",
"}",
";",
"export",
"type",
"LeafDataBlockItem",
"=",
"{",
"type",
":",
"'block item'",
";",
"block",
":",
"BlockItemBlock",
";",
"}",
";",
"export",
"type",
"LeafDataRec",
"=",
"{",
"type",
":",
"'rec'",
";",
"block",
":",
"RecBlock",
";",
"}",
";",
"export",
"type",
"LeafDataRecItem",
"=",
"{",
"type",
":",
"'rec item'",
";",
"block",
":",
"RecItemBlock",
";",
"}",
";",
"export",
"type",
"LeafDataListItem",
"=",
"{",
"type",
":",
"'list item'",
";",
"block",
":",
"LF",
";",
"listDraft",
":",
"ListType",
";",
"}",
";",
"export",
"type",
"LeafDataList",
"=",
"{",
"type",
":",
"'list'",
";",
"draft",
":",
"ListType",
";",
"block",
":",
"ListBlock",
";",
"records",
":",
"ListItemType",
"[",
"]",
";",
"pendingUpdate",
":",
"any",
"[",
"]",
"|",
"null",
";",
"}",
";",
"export",
"type",
"LeafDataUsing",
"=",
"{",
"type",
":",
"'using'",
";",
"draft",
":",
"UsingDraft",
";",
"element",
":",
"DOMElement",
";",
"block",
":",
"UsingBlock",
";",
"}",
";",
"export",
"type",
"LeafData",
"=",
"LeafDataUsing",
"|",
"LeafDataElement",
"|",
"LeafDataList",
"|",
"LeafDataListItem",
"|",
"LeafDataRoute",
"|",
"LeafDataRec",
"|",
"LeafDataRecItem",
"|",
"LeafDataBlock",
"|",
"LeafDataBlockItem",
";",
"export",
"type",
"Leaf",
"=",
"{",
"parent",
":",
"Leaf",
"|",
"null",
";",
"draft",
":",
"NodeDraft",
";",
"data",
":",
"LeafData",
";",
"svgRoot",
":",
"SVGSVGElement",
"|",
"null",
";",
"hydration",
":",
"boolean",
";",
"root",
":",
"Root",
";",
"mountNode",
":",
"DOMElement",
";",
"id",
":",
"number",
";",
"fullID",
":",
"string",
";",
"reg",
":",
"{",
"[",
"id",
"]",
":",
"StateRef",
";",
"}",
";",
"template",
":",
"Template",
";",
"}",
";",
"export",
"type",
"Root",
"=",
"{",
"scope",
"?",
":",
"Scope",
";",
"env",
":",
"Env",
";",
"activeSpawns",
":",
"Set",
"<",
"string",
">",
";",
"childSpawns",
":",
"Record",
"<",
"string",
",",
"{",
"[",
"id",
"]",
":",
"Leaf",
"[",
"]",
";",
"}",
">",
";",
"leafOps",
":",
"Record",
"<",
"string",
",",
"{",
"group",
":",
"OpGroup",
";",
"domSubtree",
":",
"OpGroup",
";",
"}",
">",
";",
"}",
";",
"export",
"type",
"BindingsDraft",
"=",
"{",
"childTemplates",
":",
"Template",
"[",
"]",
";",
"childCount",
":",
"number",
";",
"inParentIndex",
":",
"number",
";",
"}",
";",
"export",
"type",
"BlockDraft",
"=",
"{",
"type",
":",
"'block'",
";",
"childTemplates",
":",
"Template",
"[",
"]",
";",
"childCount",
":",
"number",
";",
"inParentIndex",
":",
"0",
";",
"}",
";",
"export",
"type",
"BlockItemDraft",
"=",
"BindingsDraft",
"&",
"{",
"type",
":",
"'blockItem'",
";",
"itemOf",
":",
"Template",
";",
"}",
";",
"export",
"type",
"RecDraft",
"=",
"{",
"type",
":",
"'rec'",
";",
"childTemplates",
":",
"Template",
"[",
"]",
";",
"childCount",
":",
"number",
";",
"inParentIndex",
":",
"0",
";",
"}",
";",
"export",
"type",
"RecItemDraft",
"=",
"BindingsDraft",
"&",
"{",
"type",
":",
"'recItem'",
";",
"}",
";",
"export",
"type",
"RouteDraft",
"=",
"BindingsDraft",
"&",
"{",
"type",
":",
"'route'",
";",
"}",
";",
"export",
"type",
"ListType",
"=",
"BindingsDraft",
"&",
"{",
"type",
":",
"'list'",
";",
"key",
":",
"{",
"type",
":",
"'index'",
";",
"}",
"|",
"{",
"type",
":",
"'key'",
";",
"key",
":",
"string",
";",
"}",
";",
"itemVisible",
"?",
":",
"Store",
"<",
"boolean",
">",
";",
"}",
";",
"export",
"type",
"ListItemType",
"=",
"{",
"type",
":",
"'listItem'",
";",
"key",
":",
"string",
";",
"index",
":",
"number",
";",
"active",
":",
"boolean",
";",
"asyncValue",
":",
"AsyncValue",
";",
"leafData",
":",
"LeafDataListItem",
";",
"instance",
"?",
":",
"Leaf",
";",
"}",
";",
"export",
"type",
"ElementDraft",
"=",
"BindingsDraft",
"&",
"{",
"type",
":",
"'element'",
";",
"tag",
":",
"string",
";",
"stencil",
":",
"DOMElement",
";",
"seq",
":",
"OperationDef",
"[",
"]",
";",
"staticSeq",
":",
"StaticOperationDef",
"[",
"]",
";",
"attr",
":",
"PropertyMap",
"[",
"]",
";",
"data",
":",
"PropertyMap",
"[",
"]",
";",
"text",
":",
"Array",
"<",
"{",
"index",
":",
"number",
";",
"value",
":",
"StoreOrData",
"<",
"DOMProperty",
">",
";",
"}",
">",
";",
"style",
":",
"StylePropertyMap",
"[",
"]",
";",
"styleVar",
":",
"PropertyMap",
"[",
"]",
";",
"visible",
"?",
":",
"Store",
"<",
"boolean",
">",
";",
"node",
":",
"Array",
"<",
"(",
"node",
":",
"DOMElement",
")",
"=>",
"(",
"(",
")",
"=>",
"void",
")",
"|",
"void",
">",
";",
"handler",
":",
"HandlerRecord",
"[",
"]",
";",
"opsAmount",
":",
"number",
";",
"}",
";",
"export",
"type",
"UsingDraft",
"=",
"BindingsDraft",
"&",
"{",
"type",
":",
"'using'",
";",
"}",
";",
"export",
"type",
"NodeDraft",
"=",
"ElementDraft",
"|",
"UsingDraft",
"|",
"ListType",
"|",
"ListItemType",
"|",
"RouteDraft",
"|",
"RecDraft",
"|",
"RecItemDraft",
"|",
"BlockDraft",
"|",
"BlockItemDraft",
";",
"export",
"type",
"TemplateHandlers",
"=",
"{",
"storeBase",
"(",
"template",
",",
"plainState",
")",
":",
"void",
";",
"storeOnMap",
"(",
"template",
",",
"plainState",
",",
"seq",
",",
"fromRef",
")",
":",
"void",
";",
"storeMap",
"(",
"template",
",",
"plainState",
",",
"linkNode",
")",
":",
"void",
";",
"storeWatch",
"(",
"template",
",",
"plainState",
",",
"fn",
")",
":",
"true",
";",
"eventPrepend",
"(",
"template",
",",
"contramapped",
")",
":",
"void",
";",
"combineBase",
"(",
"template",
",",
"rawShape",
",",
"isFresh",
")",
":",
"void",
";",
"combineField",
"(",
"template",
",",
"childRef",
",",
"linkNode",
")",
":",
"void",
";",
"splitBase",
"(",
"template",
",",
"lastValues",
")",
":",
"void",
";",
"splitMatchStore",
"(",
"template",
",",
"storeRef",
",",
"linkNode",
")",
":",
"void",
";",
"sampleSource",
"(",
"template",
",",
"hasSource",
",",
"sourceState",
",",
"clockState",
")",
":",
"void",
";",
"sampleTarget",
"(",
"template",
",",
"target",
")",
":",
"void",
";",
"sampleSourceLoader",
"(",
"template",
")",
":",
"Filter",
";",
"sampleSourceUpward",
"(",
"template",
",",
"isUpward",
")",
":",
"Filter",
"|",
"false",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
24,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
24,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
4670,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
24,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
24,
null,
null,
null,
null,
null,
null,
963,
null,
4670,
null,
4670,
null,
4670,
null,
null,
null,
null,
null,
null,
963,
null,
24,
null,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
963,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null
] |
408 | [
"const",
"idCount",
"=",
"(",
")",
"=>",
"{",
"let",
"id",
"=",
"0",
";",
"return",
"(",
")",
"=>",
"`${",
"++",
"id",
"}`",
";",
"}",
";",
"export",
"const",
"nextUnitID",
"=",
"idCount",
"(",
")",
";",
"export",
"const",
"nextStepID",
"=",
"idCount",
"(",
")",
";",
"export",
"const",
"nextNodeID",
"=",
"idCount",
"(",
")",
";"
] | [
null,
2,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null
] |
409 | [
"export",
"function",
"forIn",
"<",
"T",
">",
"(",
"obj",
",",
"cb",
")",
"{",
"for",
"(",
"const",
"key",
"in",
"obj",
")",
"{",
"cb",
"(",
"obj",
"[",
"key",
"]",
",",
"key",
")",
";",
"}",
"}",
"export",
"const",
"includes",
"=",
"<",
"T",
">",
"(",
"list",
",",
"item",
")",
"=>",
"list",
".",
"includes",
"(",
"item",
")",
";",
"export",
"const",
"removeItem",
"=",
"<",
"T",
">",
"(",
"list",
",",
"item",
")",
"=>",
"{",
"const",
"pos",
"=",
"list",
".",
"indexOf",
"(",
"item",
")",
";",
"if",
"(",
"pos",
"!==",
"-",
"1",
")",
"{",
"list",
".",
"splice",
"(",
"pos",
",",
"1",
")",
";",
"}",
"}",
";",
"export",
"const",
"add",
"=",
"<",
"T",
">",
"(",
"list",
",",
"item",
")",
"=>",
"list",
".",
"push",
"(",
"item",
")",
";",
"export",
"function",
"forEach",
"<",
"T",
">",
"(",
"list",
",",
"fn",
")",
";",
"export",
"function",
"forEach",
"<",
"K",
",",
"T",
">",
"(",
"list",
",",
"fn",
")",
";",
"export",
"function",
"forEach",
"<",
"T",
">",
"(",
"list",
",",
"fn",
")",
";",
"export",
"function",
"forEach",
"(",
"list",
",",
"fn",
")",
"{",
"list",
".",
"forEach",
"(",
"fn",
")",
";",
"}"
] | [
null,
null,
4,
null,
null,
null,
null,
17,
null,
4,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
5,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
5,
null,
11,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
5,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
5,
null,
4,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
19,
null,
4,
null,
null,
null,
null,
4,
null,
null,
null,
null,
30,
null,
4,
null,
null,
null,
null,
6,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
410 | [
"import",
"type",
"{",
"StateRef",
",",
"StateRefOp",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"nextStepID",
"}",
"from",
"'./id'",
";",
"import",
"{",
"add",
"}",
"from",
"'./collection'",
";",
"export",
"const",
"createStateRef",
"=",
"(",
"current",
"?",
")",
":",
"StateRef",
"=>",
"(",
"{",
"id",
":",
"nextStepID",
"(",
")",
",",
"current",
",",
"}",
")",
";",
"export",
"const",
"readRef",
"=",
"(",
"{",
"current",
"}",
")",
"=>",
"current",
";",
"export",
"const",
"addRefOp",
"=",
"(",
"ref",
",",
"op",
")",
"=>",
"{",
"if",
"(",
"!",
"ref",
".",
"before",
")",
"ref",
".",
"before",
"=",
"[",
"]",
";",
"add",
"(",
"ref",
".",
"before",
"!",
",",
"op",
"as",
"any",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
411 | [
"import",
"type",
"{",
"Node",
",",
"StateRef",
",",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"Scope",
",",
"Store",
",",
"CommonUnit",
",",
"Domain",
"}",
"from",
"'./unit.h'",
";",
"export",
"const",
"getGraph",
"=",
"(",
"graph",
")",
":",
"Node",
"=>",
"(",
"graph",
"as",
"{",
"graphite",
":",
"Node",
";",
"}",
")",
".",
"graphite",
"||",
"graph",
";",
"export",
"const",
"getOwners",
"=",
"(",
"node",
")",
"=>",
"node",
".",
"family",
".",
"owners",
";",
"export",
"const",
"getLinks",
"=",
"(",
"node",
")",
"=>",
"node",
".",
"family",
".",
"links",
";",
"export",
"const",
"getStoreState",
"=",
"(",
"store",
")",
":",
"StateRef",
"=>",
"store",
".",
"stateRef",
";",
"export",
"const",
"getValue",
"=",
"stack",
"=>",
"stack",
".",
"value",
";",
"export",
"const",
"getSubscribers",
"=",
"(",
"store",
")",
"=>",
"store",
".",
"subscribers",
";",
"export",
"const",
"getParent",
"=",
"unit",
"=>",
"unit",
".",
"parent",
";",
"export",
"const",
"getForkPage",
"=",
"(",
"val",
")",
":",
"Scope",
"|",
"void",
"=>",
"val",
".",
"scope",
";",
"export",
"const",
"getMeta",
"=",
"(",
"unit",
",",
"field",
")",
"=>",
"getGraph",
"(",
"unit",
")",
".",
"meta",
"[",
"field",
"]",
";",
"export",
"const",
"setMeta",
"=",
"(",
"unit",
",",
"field",
",",
"value",
")",
"=>",
"(",
"getGraph",
"(",
"unit",
")",
".",
"meta",
"[",
"field",
"]",
"=",
"value",
")",
";",
"export",
"const",
"getCompositeName",
"=",
"(",
"unit",
")",
"=>",
"unit",
".",
"compositeName",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
37598,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37598,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37598,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37599,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
412 | [
"export",
"const",
"STORE",
"=",
"'store'",
";",
"export",
"const",
"EVENT",
"=",
"'event'",
";",
"export",
"const",
"EFFECT",
"=",
"'effect'",
";",
"export",
"const",
"DOMAIN",
"=",
"'domain'",
";",
"export",
"const",
"SCOPE",
"=",
"'scope'",
";",
"export",
"const",
"SAMPLER",
"=",
"'sampler'",
";",
"export",
"const",
"CROSSLINK",
"=",
"'crosslink'",
";",
"export",
"const",
"MAP",
"=",
"'map'",
";",
"export",
"const",
"STACK",
"=",
"'stack'",
";",
"export",
"const",
"BARRIER",
"=",
"'barrier'",
";",
"export",
"const",
"VALUE",
"=",
"'value'",
";",
"export",
"const",
"SAMPLE",
"=",
"'sample'",
";",
"export",
"const",
"FILTER",
"=",
"'filter'",
";",
"export",
"const",
"REG_A",
"=",
"'a'",
";"
] | [
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null
] |
413 | [
"import",
"type",
"{",
"Leaf",
"}",
"from",
"'../forest/index.h'",
";",
"import",
"type",
"{",
"Node",
",",
"NodeUnit",
",",
"StateRef",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"readRef",
"}",
"from",
"'./stateRef'",
";",
"import",
"{",
"getForkPage",
",",
"getGraph",
",",
"getMeta",
",",
"getParent",
",",
"getValue",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"STORE",
",",
"EFFECT",
",",
"SAMPLER",
",",
"STACK",
",",
"BARRIER",
",",
"VALUE",
",",
"REG_A",
",",
"MAP",
"}",
"from",
"'./tag'",
";",
"import",
"type",
"{",
"Scope",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"add",
",",
"forEach",
"}",
"from",
"'./collection'",
";",
"/** Names of priority groups */",
"type",
"PriorityTag",
"=",
"'child'",
"|",
"'pure'",
"|",
"'read'",
"|",
"'barrier'",
"|",
"'sampler'",
"|",
"'effect'",
";",
"export",
"type",
"BarrierPriorityTag",
"=",
"'read'",
"|",
"'barrier'",
"|",
"'sampler'",
"|",
"'effect'",
";",
"/**\n * Position in the current branch,\n * including call stack, priority type\n * and index of next step in the executed Node\n */",
"type",
"Layer",
"=",
"{",
"idx",
":",
"number",
";",
"stack",
":",
"Stack",
";",
"type",
":",
"PriorityTag",
";",
"id",
":",
"number",
";",
"}",
";",
"/** Call stack */",
"export",
"type",
"Stack",
"=",
"{",
"value",
";",
"a",
";",
"b",
";",
"c",
"?",
";",
"parent",
":",
"Stack",
"|",
"null",
";",
"node",
":",
"Node",
";",
"page",
":",
"Leaf",
"|",
"null",
";",
"scope",
"?",
":",
"Scope",
"|",
"null",
"|",
"void",
";",
"}",
";",
"/** Queue as linked list or skew heap */",
"type",
"QueueItem",
"=",
"{",
"/** node value */",
"v",
":",
"Layer",
";",
"/** left node. always null in queue but used in skew heap */",
"l",
":",
"QueueItem",
"|",
"null",
";",
"/** right node */",
"r",
":",
"QueueItem",
"|",
"null",
";",
"}",
";",
"type",
"QueueBucket",
"=",
"{",
"first",
":",
"QueueItem",
"|",
"null",
";",
"last",
":",
"QueueItem",
"|",
"null",
";",
"size",
":",
"number",
";",
"}",
";",
"/** Dedicated local metadata */",
"type",
"Local",
"=",
"{",
"fail",
":",
"boolean",
";",
"scope",
":",
"{",
"[",
"key",
"]",
";",
"}",
";",
"}",
";",
"let",
"heap",
"=",
"null",
";",
"const",
"merge",
"=",
"(",
"a",
",",
"b",
")",
":",
"QueueItem",
"|",
"null",
"=>",
"{",
"if",
"(",
"!",
"a",
")",
"return",
"b",
";",
"if",
"(",
"!",
"b",
")",
"return",
"a",
";",
"let",
"ret",
";",
"if",
"(",
"/**\n * if both nodes has the same PriorityType\n * and first node is created after second one\n */",
"(",
"a",
".",
"v",
".",
"type",
"===",
"b",
".",
"v",
".",
"type",
"&&",
"a",
".",
"v",
".",
"id",
">",
"b",
".",
"v",
".",
"id",
")",
"||",
"getPriority",
"(",
"a",
".",
"v",
".",
"type",
")",
">",
"getPriority",
"(",
"b",
".",
"v",
".",
"type",
")",
")",
"{",
"ret",
"=",
"a",
";",
"a",
"=",
"b",
";",
"b",
"=",
"ret",
";",
"}",
"ret",
"=",
"merge",
"(",
"a",
".",
"r",
",",
"b",
")",
";",
"a",
".",
"r",
"=",
"a",
".",
"l",
";",
"a",
".",
"l",
"=",
"ret",
";",
"return",
"a",
";",
"}",
";",
"/** queue buckets for each PriorityType */",
"const",
"queue",
"=",
"[",
"]",
";",
"let",
"ix",
"=",
"0",
";",
"while",
"(",
"ix",
"<",
"6",
")",
"{",
"/**\n * although \"sampler\" and \"barrier\" are using heap instead of linked list,\n * their buckets are still useful: they maintains size of heap queue\n */",
"add",
"(",
"queue",
",",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"size",
":",
"0",
"}",
")",
";",
"ix",
"+=",
"1",
";",
"}",
"const",
"deleteMin",
"=",
"(",
")",
"=>",
"{",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"6",
";",
"i",
"++",
")",
"{",
"const",
"list",
"=",
"queue",
"[",
"i",
"]",
";",
"if",
"(",
"list",
".",
"size",
">",
"0",
")",
"{",
"/**\n * bucket 3 is for \"barrier\" PriorityType (used in combine)\n * bucket 4 is for \"sampler\" PriorityType (used in sample and guard)\n */",
"if",
"(",
"i",
"===",
"3",
"||",
"i",
"===",
"4",
")",
"{",
"list",
".",
"size",
"-=",
"1",
";",
"const",
"value",
"=",
"heap",
"!",
".",
"v",
";",
"heap",
"=",
"merge",
"(",
"heap",
"!",
".",
"l",
",",
"heap",
"!",
".",
"r",
")",
";",
"return",
"value",
";",
"}",
"if",
"(",
"list",
".",
"size",
"===",
"1",
")",
"{",
"list",
".",
"last",
"=",
"null",
";",
"}",
"const",
"item",
"=",
"list",
".",
"first",
";",
"list",
".",
"first",
"=",
"item",
"!",
".",
"r",
";",
"list",
".",
"size",
"-=",
"1",
";",
"return",
"item",
"!",
".",
"v",
";",
"}",
"}",
"}",
";",
"const",
"pushFirstHeapItem",
"=",
"(",
"type",
",",
"page",
",",
"node",
",",
"parent",
",",
"value",
",",
"scope",
"?",
")",
"=>",
"pushHeap",
"(",
"0",
",",
"{",
"a",
":",
"null",
",",
"b",
":",
"null",
",",
"node",
",",
"parent",
",",
"value",
",",
"page",
",",
"scope",
",",
"}",
",",
"type",
")",
";",
"const",
"pushHeap",
"=",
"(",
"idx",
",",
"stack",
",",
"type",
",",
"id",
"=",
"0",
")",
"=>",
"{",
"const",
"priority",
"=",
"getPriority",
"(",
"type",
")",
";",
"const",
"bucket",
"=",
"queue",
"[",
"priority",
"]",
";",
"const",
"item",
"=",
"{",
"v",
":",
"{",
"idx",
",",
"stack",
",",
"type",
",",
"id",
",",
"}",
",",
"l",
":",
"null",
",",
"r",
":",
"null",
",",
"}",
";",
"/**\n * bucket 3 is for \"barrier\" PriorityType (used in combine)\n * bucket 4 is for \"sampler\" PriorityType (used in sample and guard)\n */",
"if",
"(",
"priority",
"===",
"3",
"||",
"priority",
"===",
"4",
")",
"{",
"heap",
"=",
"merge",
"(",
"heap",
",",
"item",
")",
";",
"}",
"else",
"{",
"if",
"(",
"bucket",
".",
"size",
"===",
"0",
")",
"{",
"bucket",
".",
"first",
"=",
"item",
";",
"}",
"else",
"{",
"bucket",
".",
"last",
"!",
".",
"r",
"=",
"item",
";",
"}",
"bucket",
".",
"last",
"=",
"item",
";",
"}",
"bucket",
".",
"size",
"+=",
"1",
";",
"}",
";",
"const",
"getPriority",
"=",
"(",
"t",
")",
"=>",
"{",
"switch",
"(",
"t",
")",
"{",
"case",
"'child'",
":",
"return",
"0",
";",
"case",
"'pure'",
":",
"return",
"1",
";",
"case",
"'read'",
":",
"return",
"2",
";",
"case",
"BARRIER",
":",
"return",
"3",
";",
"case",
"SAMPLER",
":",
"return",
"4",
";",
"case",
"EFFECT",
":",
"return",
"5",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
";",
"const",
"barriers",
"=",
"new",
"Set",
"<",
"string",
"|",
"number",
">",
"(",
")",
";",
"let",
"isRoot",
"=",
"true",
";",
"export",
"let",
"isWatch",
"=",
"false",
";",
"export",
"let",
"isPure",
"=",
"false",
";",
"export",
"let",
"currentPage",
"=",
"null",
";",
"export",
"let",
"forkPage",
";",
"export",
"const",
"setForkPage",
"=",
"(",
"newForkPage",
")",
"=>",
"{",
"forkPage",
"=",
"newForkPage",
";",
"}",
";",
"export",
"const",
"setCurrentPage",
"=",
"(",
"newPage",
")",
"=>",
"{",
"currentPage",
"=",
"newPage",
";",
"}",
";",
"const",
"getPageForRef",
"=",
"(",
"page",
",",
"id",
")",
"=>",
"{",
"if",
"(",
"page",
")",
"{",
"while",
"(",
"page",
"&&",
"!",
"page",
".",
"reg",
"[",
"id",
"]",
")",
"{",
"page",
"=",
"getParent",
"(",
"page",
")",
";",
"}",
"if",
"(",
"page",
")",
"return",
"page",
";",
"}",
"return",
"null",
";",
"}",
";",
"export",
"const",
"getPageRef",
"=",
"(",
"page",
",",
"forkPage",
",",
"node",
",",
"ref",
",",
"isGetState",
"?",
")",
"=>",
"{",
"const",
"pageForRef",
"=",
"getPageForRef",
"(",
"page",
",",
"ref",
".",
"id",
")",
";",
"if",
"(",
"pageForRef",
")",
"return",
"pageForRef",
".",
"reg",
"[",
"ref",
".",
"id",
"]",
";",
"if",
"(",
"forkPage",
")",
"{",
"initRefInScope",
"(",
"forkPage",
"!",
",",
"ref",
",",
"isGetState",
")",
";",
"return",
"forkPage",
".",
"reg",
"[",
"ref",
".",
"id",
"]",
";",
"}",
"return",
"ref",
";",
"}",
";",
"export",
"function",
"launch",
"(",
"config",
")",
";",
"export",
"function",
"launch",
"(",
"unit",
",",
"payload",
"?",
",",
"upsert",
"?",
")",
";",
"export",
"function",
"launch",
"(",
"unit",
",",
"payload",
"?",
",",
"upsert",
"?",
")",
"{",
"let",
"pageForLaunch",
"=",
"currentPage",
";",
"let",
"stackForLaunch",
"=",
"null",
";",
"let",
"forkPageForLaunch",
"=",
"forkPage",
";",
"if",
"(",
"unit",
".",
"target",
")",
"{",
"payload",
"=",
"unit",
".",
"params",
";",
"upsert",
"=",
"unit",
".",
"defer",
";",
"pageForLaunch",
"=",
"'page'",
"in",
"unit",
"?",
"unit",
".",
"page",
":",
"pageForLaunch",
";",
"if",
"(",
"unit",
"[",
"STACK",
"]",
")",
"stackForLaunch",
"=",
"unit",
"[",
"STACK",
"]",
";",
"forkPageForLaunch",
"=",
"getForkPage",
"(",
"unit",
")",
"||",
"forkPageForLaunch",
";",
"unit",
"=",
"unit",
".",
"target",
";",
"}",
"if",
"(",
"forkPageForLaunch",
"&&",
"forkPage",
"&&",
"forkPageForLaunch",
"!==",
"forkPage",
")",
"{",
"forkPage",
"=",
"null",
";",
"}",
"if",
"(",
"Array",
".",
"isArray",
"(",
"unit",
")",
")",
"{",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"unit",
".",
"length",
";",
"i",
"++",
")",
"{",
"pushFirstHeapItem",
"(",
"'pure'",
",",
"pageForLaunch",
",",
"getGraph",
"(",
"unit",
"[",
"i",
"]",
")",
",",
"stackForLaunch",
",",
"payload",
"[",
"i",
"]",
",",
"forkPageForLaunch",
")",
";",
"}",
"}",
"else",
"{",
"pushFirstHeapItem",
"(",
"'pure'",
",",
"pageForLaunch",
",",
"getGraph",
"(",
"unit",
")",
",",
"stackForLaunch",
",",
"payload",
",",
"forkPageForLaunch",
")",
";",
"}",
"if",
"(",
"upsert",
"&&",
"!",
"isRoot",
")",
"return",
";",
"/** main execution code */",
"const",
"lastStartedState",
"=",
"{",
"isRoot",
",",
"currentPage",
",",
"scope",
":",
"forkPage",
",",
"isWatch",
",",
"isPure",
",",
"}",
";",
"isRoot",
"=",
"false",
";",
"let",
"stop",
";",
"let",
"skip",
";",
"let",
"node",
";",
"let",
"value",
";",
"let",
"page",
";",
"let",
"reg",
";",
"kernelLoop",
":",
"while",
"(",
"(",
"value",
"=",
"deleteMin",
"(",
")",
")",
")",
"{",
"const",
"{",
"idx",
",",
"stack",
",",
"type",
"}",
"=",
"value",
";",
"node",
"=",
"stack",
".",
"node",
";",
"currentPage",
"=",
"page",
"=",
"stack",
".",
"page",
";",
"forkPage",
"=",
"getForkPage",
"(",
"stack",
")",
";",
"if",
"(",
"page",
")",
"reg",
"=",
"page",
".",
"reg",
";",
"else",
"if",
"(",
"forkPage",
")",
"reg",
"=",
"forkPage",
".",
"reg",
";",
"const",
"hasPageReg",
"=",
"!",
"!",
"page",
";",
"const",
"hasScopeReg",
"=",
"!",
"!",
"forkPage",
";",
"const",
"local",
"=",
"{",
"fail",
":",
"false",
",",
"scope",
":",
"node",
".",
"scope",
",",
"}",
";",
"stop",
"=",
"skip",
"=",
"false",
";",
"for",
"(",
"let",
"stepn",
"=",
"idx",
";",
"stepn",
"<",
"node",
".",
"seq",
".",
"length",
"&&",
"!",
"stop",
";",
"stepn",
"++",
")",
"{",
"const",
"step",
"=",
"node",
".",
"seq",
"[",
"stepn",
"]",
";",
"if",
"(",
"step",
".",
"order",
")",
"{",
"const",
"{",
"priority",
",",
"barrierID",
"}",
"=",
"step",
".",
"order",
";",
"const",
"id",
"=",
"barrierID",
"?",
"page",
"?",
"`${",
"page",
".",
"fullID",
"}_${",
"barrierID",
"}`",
":",
"barrierID",
":",
"0",
";",
"if",
"(",
"stepn",
"!==",
"idx",
"||",
"type",
"!==",
"priority",
")",
"{",
"if",
"(",
"barrierID",
")",
"{",
"if",
"(",
"!",
"barriers",
".",
"has",
"(",
"id",
")",
")",
"{",
"barriers",
".",
"add",
"(",
"id",
")",
";",
"pushHeap",
"(",
"stepn",
",",
"stack",
",",
"priority",
",",
"barrierID",
")",
";",
"}",
"}",
"else",
"{",
"pushHeap",
"(",
"stepn",
",",
"stack",
",",
"priority",
")",
";",
"}",
"continue",
"kernelLoop",
";",
"}",
"barrierID",
"&&",
"barriers",
".",
"delete",
"(",
"id",
")",
";",
"}",
"switch",
"(",
"step",
".",
"type",
")",
"{",
"case",
"'mov'",
":",
"{",
"const",
"data",
"=",
"step",
".",
"data",
";",
"let",
"value",
";",
"switch",
"(",
"data",
".",
"from",
")",
"{",
"case",
"STACK",
":",
"value",
"=",
"getValue",
"(",
"stack",
")",
";",
"break",
";",
"case",
"REG_A",
":",
"case",
"'b'",
":",
"value",
"=",
"stack",
"[",
"data",
".",
"from",
"]",
";",
"break",
";",
"case",
"VALUE",
":",
"value",
"=",
"data",
".",
"store",
";",
"break",
";",
"case",
"STORE",
":",
"if",
"(",
"reg",
"&&",
"!",
"reg",
"[",
"data",
".",
"store",
".",
"id",
"]",
")",
"{",
"if",
"(",
"hasPageReg",
")",
"{",
"const",
"pageForRef",
"=",
"getPageForRef",
"(",
"page",
",",
"data",
".",
"store",
".",
"id",
")",
";",
"stack",
".",
"page",
"=",
"page",
"=",
"pageForRef",
";",
"if",
"(",
"pageForRef",
")",
"{",
"reg",
"=",
"pageForRef",
".",
"reg",
";",
"}",
"else",
"if",
"(",
"hasScopeReg",
")",
"{",
"initRefInScope",
"(",
"forkPage",
"!",
",",
"data",
".",
"store",
",",
"false",
",",
"true",
",",
"data",
".",
"softRead",
")",
";",
"reg",
"=",
"forkPage",
"!",
".",
"reg",
";",
"}",
"else",
"{",
"reg",
"=",
"undefined",
";",
"}",
"}",
"else",
"if",
"(",
"hasScopeReg",
")",
"{",
"/** StateRef in Scope.reg created only when needed */",
"initRefInScope",
"(",
"forkPage",
"!",
",",
"data",
".",
"store",
",",
"false",
",",
"true",
",",
"data",
".",
"softRead",
")",
";",
"}",
"else",
"{",
"}",
"}",
"value",
"=",
"readRef",
"(",
"reg",
"?",
"reg",
"[",
"data",
".",
"store",
".",
"id",
"]",
"||",
"data",
".",
"store",
":",
"data",
".",
"store",
")",
";",
"break",
";",
"}",
"switch",
"(",
"data",
".",
"to",
")",
"{",
"case",
"STACK",
":",
"stack",
".",
"value",
"=",
"value",
";",
"break",
";",
"case",
"REG_A",
":",
"case",
"'b'",
":",
"stack",
"[",
"data",
".",
"to",
"]",
"=",
"value",
";",
"break",
";",
"case",
"STORE",
":",
"getPageRef",
"(",
"page",
",",
"forkPage",
",",
"node",
",",
"data",
".",
"target",
")",
".",
"current",
"=",
"value",
";",
"break",
";",
"}",
"break",
";",
"}",
"case",
"'compute'",
":",
"const",
"data",
"=",
"step",
".",
"data",
";",
"if",
"(",
"data",
".",
"fn",
")",
"{",
"isWatch",
"=",
"getMeta",
"(",
"node",
",",
"'op'",
")",
"===",
"'watch'",
";",
"isPure",
"=",
"data",
".",
"pure",
";",
"const",
"computationResult",
"=",
"data",
".",
"safe",
"?",
"(",
"0",
"as",
"any",
",",
"data",
".",
"fn",
")",
"(",
"getValue",
"(",
"stack",
")",
",",
"local",
".",
"scope",
",",
"stack",
")",
":",
"tryRun",
"(",
"local",
",",
"data",
".",
"fn",
",",
"stack",
")",
";",
"if",
"(",
"data",
".",
"filter",
")",
"{",
"/**\n * handled edge case: if step.fn will throw,\n * tryRun will return null\n * thereby forcing that branch to stop\n */",
"skip",
"=",
"!",
"computationResult",
";",
"}",
"else",
"{",
"stack",
".",
"value",
"=",
"computationResult",
";",
"}",
"isWatch",
"=",
"lastStartedState",
".",
"isWatch",
";",
"isPure",
"=",
"lastStartedState",
".",
"isPure",
";",
"}",
"break",
";",
"}",
"stop",
"=",
"local",
".",
"fail",
"||",
"skip",
";",
"}",
"if",
"(",
"!",
"stop",
")",
"{",
"const",
"finalValue",
"=",
"getValue",
"(",
"stack",
")",
";",
"forEach",
"(",
"node",
".",
"next",
",",
"nextNode",
"=>",
"{",
"pushFirstHeapItem",
"(",
"'child'",
",",
"page",
",",
"nextNode",
",",
"stack",
",",
"finalValue",
",",
"getForkPage",
"(",
"stack",
")",
")",
";",
"}",
")",
";",
"const",
"forkPage",
"=",
"getForkPage",
"(",
"stack",
")",
";",
"if",
"(",
"forkPage",
")",
"{",
"if",
"(",
"getMeta",
"(",
"node",
",",
"'needFxCounter'",
")",
")",
"pushFirstHeapItem",
"(",
"'child'",
",",
"page",
",",
"forkPage",
".",
"fxCount",
",",
"stack",
",",
"finalValue",
",",
"forkPage",
")",
";",
"if",
"(",
"getMeta",
"(",
"node",
",",
"'storeChange'",
")",
")",
"pushFirstHeapItem",
"(",
"'child'",
",",
"page",
",",
"forkPage",
".",
"storeChange",
",",
"stack",
",",
"finalValue",
",",
"forkPage",
")",
";",
"const",
"additionalLinks",
"=",
"forkPage",
".",
"additionalLinks",
"[",
"node",
".",
"id",
"]",
";",
"if",
"(",
"additionalLinks",
")",
"{",
"forEach",
"(",
"additionalLinks",
",",
"nextNode",
"=>",
"{",
"pushFirstHeapItem",
"(",
"'child'",
",",
"page",
",",
"nextNode",
",",
"stack",
",",
"finalValue",
",",
"forkPage",
")",
";",
"}",
")",
";",
"}",
"}",
"}",
"}",
"isRoot",
"=",
"lastStartedState",
".",
"isRoot",
";",
"currentPage",
"=",
"lastStartedState",
".",
"currentPage",
";",
"forkPage",
"=",
"getForkPage",
"(",
"lastStartedState",
")",
";",
"}",
"export",
"const",
"initRefInScope",
"=",
"(",
"scope",
",",
"sourceRef",
",",
"isGetState",
"?",
",",
"isKernelCall",
"?",
",",
"softRead",
"?",
")",
"=>",
"{",
"const",
"refsMap",
"=",
"scope",
".",
"reg",
";",
"const",
"sid",
"=",
"sourceRef",
".",
"sid",
";",
"if",
"(",
"refsMap",
"[",
"sourceRef",
".",
"id",
"]",
")",
"return",
";",
"const",
"ref",
"=",
"{",
"id",
":",
"sourceRef",
".",
"id",
",",
"current",
":",
"sourceRef",
".",
"current",
",",
"}",
";",
"if",
"(",
"sid",
"&&",
"sid",
"in",
"scope",
".",
"sidValuesMap",
"&&",
"!",
"(",
"sid",
"in",
"scope",
".",
"sidIdMap",
")",
")",
"{",
"ref",
".",
"current",
"=",
"scope",
".",
"sidValuesMap",
"[",
"sid",
"]",
";",
"}",
"else",
"{",
"if",
"(",
"sourceRef",
".",
"before",
"&&",
"!",
"softRead",
")",
"{",
"let",
"isFresh",
"=",
"false",
";",
"const",
"needToAssign",
"=",
"isGetState",
"||",
"!",
"sourceRef",
".",
"noInit",
"||",
"isKernelCall",
";",
"forEach",
"(",
"sourceRef",
".",
"before",
",",
"cmd",
"=>",
"{",
"switch",
"(",
"cmd",
".",
"type",
")",
"{",
"case",
"MAP",
":",
"{",
"const",
"from",
"=",
"cmd",
".",
"from",
";",
"if",
"(",
"from",
"||",
"cmd",
".",
"fn",
")",
"{",
"if",
"(",
"from",
")",
"initRefInScope",
"(",
"scope",
",",
"from",
",",
"isGetState",
",",
"isKernelCall",
")",
";",
"const",
"value",
"=",
"from",
"&&",
"refsMap",
"[",
"from",
".",
"id",
"]",
".",
"current",
";",
"if",
"(",
"needToAssign",
")",
"{",
"ref",
".",
"current",
"=",
"cmd",
".",
"fn",
"?",
"cmd",
".",
"fn",
"(",
"value",
")",
":",
"value",
";",
"}",
"}",
"break",
";",
"}",
"case",
"'field'",
":",
"{",
"if",
"(",
"!",
"isFresh",
")",
"{",
"isFresh",
"=",
"true",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"ref",
".",
"current",
")",
")",
"{",
"ref",
".",
"current",
"=",
"[",
"...",
"ref",
".",
"current",
"]",
";",
"}",
"else",
"{",
"ref",
".",
"current",
"=",
"{",
"...",
"ref",
".",
"current",
"}",
";",
"}",
"}",
"initRefInScope",
"(",
"scope",
",",
"cmd",
".",
"from",
",",
"isGetState",
",",
"isKernelCall",
")",
";",
"if",
"(",
"needToAssign",
")",
"{",
"const",
"from",
"=",
"refsMap",
"[",
"cmd",
".",
"from",
".",
"id",
"]",
";",
"ref",
".",
"current",
"[",
"cmd",
".",
"field",
"]",
"=",
"refsMap",
"[",
"from",
".",
"id",
"]",
".",
"current",
";",
"}",
"break",
";",
"}",
"}",
"}",
")",
";",
"}",
"}",
"if",
"(",
"sid",
")",
"scope",
".",
"sidIdMap",
"[",
"sid",
"]",
"=",
"sourceRef",
".",
"id",
";",
"refsMap",
"[",
"sourceRef",
".",
"id",
"]",
"=",
"ref",
";",
"}",
";",
"/** try catch for external functions */",
"const",
"tryRun",
"=",
"(",
"local",
",",
"fn",
",",
"stack",
")",
"=>",
"{",
"try",
"{",
"return",
"fn",
"(",
"getValue",
"(",
"stack",
")",
",",
"local",
".",
"scope",
",",
"stack",
")",
";",
"}",
"catch",
"(",
"err",
")",
"{",
"console",
".",
"error",
"(",
"err",
")",
";",
"local",
".",
"fail",
"=",
"true",
";",
"}",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3542,
null,
null,
null,
null,
3542,
null,
null,
3542,
null,
3542,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
269,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
269,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3542,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
0,
null,
4077,
null,
24,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
3,
null,
349,
null,
0,
null,
3,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
3542,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4077,
null,
null,
4077,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
24,
null,
4670,
null,
8,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
6,
null,
null,
null,
null,
4,
null,
37598,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
8,
null,
null,
24,
null,
null,
269,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
9177,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
18789,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
6,
null,
4670,
null,
8,
null,
null,
8,
null,
null,
8,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9177,
null,
33,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
414 | [
"import",
"{",
"kind",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"DOMAIN",
",",
"STORE",
",",
"EVENT",
",",
"EFFECT",
",",
"SCOPE",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"isObject",
",",
"isFunction",
"}",
"from",
"'./is'",
";",
"import",
"{",
"Domain",
",",
"Effect",
",",
"Event",
",",
"Scope",
",",
"Store",
"}",
"from",
"'./unit.h'",
";",
"export",
"const",
"unit",
"=",
"obj",
"=>",
"(",
"isFunction",
"(",
"obj",
")",
"||",
"isObject",
"(",
"obj",
")",
")",
"&&",
"'kind'",
"in",
"obj",
";",
"const",
"is",
"=",
"(",
"type",
")",
"=>",
"obj",
"=>",
"unit",
"(",
"obj",
")",
"&&",
"obj",
".",
"kind",
"===",
"type",
";",
"export",
"const",
"store",
"=",
"is",
"(",
"STORE",
")",
"as",
"(",
"value",
")",
"=>",
"value",
"is",
"Store",
"<",
"unknown",
">",
";",
"export",
"const",
"event",
"=",
"is",
"(",
"EVENT",
")",
"as",
"(",
"value",
")",
"=>",
"value",
"is",
"Event",
"<",
"unknown",
">",
";",
"export",
"const",
"effect",
"=",
"is",
"(",
"EFFECT",
")",
"as",
"(",
"value",
")",
"=>",
"value",
"is",
"Effect",
"<",
"unknown",
",",
"unknown",
",",
"unknown",
">",
";",
"export",
"const",
"domain",
"=",
"is",
"(",
"DOMAIN",
")",
"as",
"(",
"value",
")",
"=>",
"value",
"is",
"Domain",
";",
"export",
"const",
"scope",
"=",
"is",
"(",
"SCOPE",
")",
"as",
"(",
"value",
")",
"=>",
"value",
"is",
"Scope",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
46478,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
415 | [
"export",
"function",
"assert",
"(",
"condition",
",",
"message",
")",
"{",
"if",
"(",
"!",
"condition",
")",
"throw",
"Error",
"(",
"message",
")",
";",
"}",
"export",
"const",
"deprecate",
"=",
"(",
"condition",
",",
"subject",
",",
"suggestion",
"?",
")",
"=>",
"!",
"condition",
"&&",
"console",
".",
"error",
"(",
"`${",
"subject",
"} is deprecated${",
"suggestion",
"?",
"`, use ${",
"suggestion",
"} instead`",
":",
"''",
"}`",
")",
";"
] | [
null,
null,
8,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
416 | [
"import",
"{",
"getParent",
",",
"getMeta",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"type",
"{",
"Template",
"}",
"from",
"'../forest/index.h'",
";",
"type",
"RegionStack",
"=",
"{",
"parent",
":",
"RegionStack",
"|",
"null",
";",
"value",
";",
"template",
";",
"sidRoot",
"?",
":",
"string",
";",
"}",
";",
"export",
"let",
"regionStack",
"=",
"null",
";",
"export",
"const",
"readTemplate",
"=",
"(",
")",
":",
"Template",
"|",
"null",
"=>",
"regionStack",
"&&",
"regionStack",
".",
"template",
";",
"export",
"const",
"readSidRoot",
"=",
"(",
"sid",
"?",
")",
"=>",
"{",
"if",
"(",
"sid",
"&&",
"regionStack",
"&&",
"regionStack",
".",
"sidRoot",
")",
"sid",
"=",
"`${",
"regionStack",
".",
"sidRoot",
"}|${",
"sid",
"}`",
";",
"return",
"sid",
";",
"}",
";",
"export",
"function",
"withRegion",
"(",
"unit",
",",
"cb",
")",
"{",
"regionStack",
"=",
"{",
"parent",
":",
"regionStack",
",",
"value",
":",
"unit",
",",
"template",
":",
"getMeta",
"(",
"unit",
",",
"'template'",
")",
"||",
"readTemplate",
"(",
")",
",",
"sidRoot",
":",
"getMeta",
"(",
"unit",
",",
"'sidRoot'",
")",
"||",
"(",
"regionStack",
"&&",
"regionStack",
".",
"sidRoot",
")",
",",
"}",
";",
"try",
"{",
"return",
"cb",
"(",
")",
";",
"}",
"finally",
"{",
"regionStack",
"=",
"getParent",
"(",
"regionStack",
")",
";",
"}",
"}",
"export",
"const",
"withFactory",
"=",
"(",
"{",
"sid",
",",
"name",
",",
"loc",
",",
"method",
",",
"fn",
",",
"}",
")",
"=>",
"{",
"const",
"sidNode",
"=",
"createNode",
"(",
"{",
"meta",
":",
"{",
"sidRoot",
":",
"readSidRoot",
"(",
"sid",
")",
",",
"name",
",",
"loc",
",",
"method",
"}",
",",
"}",
")",
";",
"return",
"withRegion",
"(",
"sidNode",
",",
"fn",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
417 | [
"import",
"type",
"{",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"getGraph",
",",
"getOwners",
",",
"getLinks",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"DOMAIN",
",",
"CROSSLINK",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"add",
",",
"forEach",
"}",
"from",
"'./collection'",
";",
"export",
"const",
"own",
"=",
"(",
"ownerUnit",
",",
"links",
")",
"=>",
"{",
"const",
"owner",
"=",
"getGraph",
"(",
"ownerUnit",
")",
";",
"forEach",
"(",
"links",
",",
"_link",
"=>",
"{",
"const",
"link",
"=",
"getGraph",
"(",
"_link",
")",
";",
"if",
"(",
"owner",
".",
"family",
".",
"type",
"!==",
"DOMAIN",
")",
"link",
".",
"family",
".",
"type",
"=",
"CROSSLINK",
";",
"add",
"(",
"getOwners",
"(",
"link",
")",
",",
"owner",
")",
";",
"add",
"(",
"getLinks",
"(",
"owner",
")",
",",
"link",
")",
";",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
37598,
null,
5,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37598,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
418 | [
"import",
"type",
"{",
"Node",
",",
"NodeUnit",
",",
"Cmd",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"getGraph",
",",
"getOwners",
",",
"getLinks",
",",
"getValue",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"nextNodeID",
"}",
"from",
"'./id'",
";",
"import",
"{",
"CROSSLINK",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"regionStack",
"}",
"from",
"'./region'",
";",
"import",
"{",
"own",
"}",
"from",
"'./own'",
";",
"import",
"{",
"add",
",",
"forEach",
"}",
"from",
"'./collection'",
";",
"export",
"const",
"arrifyNodes",
"=",
"(",
"list",
"=",
"[",
"]",
")",
":",
"Node",
"[",
"]",
"=>",
"(",
"Array",
".",
"isArray",
"(",
"list",
")",
"?",
"list",
":",
"[",
"list",
"]",
")",
".",
"flat",
"(",
")",
".",
"map",
"(",
"getGraph",
")",
";",
"export",
"function",
"createNode",
"(",
"{",
"node",
"=",
"[",
"]",
",",
"from",
",",
"source",
",",
"parent",
"=",
"from",
"||",
"source",
",",
"to",
",",
"target",
",",
"child",
"=",
"to",
"||",
"target",
",",
"scope",
"=",
"{",
"}",
",",
"meta",
"=",
"{",
"}",
",",
"family",
":",
"familyRaw",
"=",
"{",
"type",
":",
"'regular'",
"}",
",",
"regional",
",",
"}",
"=",
"{",
"}",
")",
"{",
"const",
"sources",
"=",
"arrifyNodes",
"(",
"parent",
")",
";",
"const",
"links",
"=",
"arrifyNodes",
"(",
"familyRaw",
".",
"links",
")",
";",
"const",
"owners",
"=",
"arrifyNodes",
"(",
"familyRaw",
".",
"owners",
")",
";",
"const",
"seq",
"=",
"[",
"]",
";",
"forEach",
"(",
"node",
",",
"item",
"=>",
"item",
"&&",
"add",
"(",
"seq",
",",
"item",
")",
")",
";",
"const",
"result",
"=",
"{",
"id",
":",
"nextNodeID",
"(",
")",
",",
"seq",
",",
"next",
":",
"arrifyNodes",
"(",
"child",
")",
",",
"meta",
",",
"scope",
",",
"family",
":",
"{",
"type",
":",
"familyRaw",
".",
"type",
"||",
"CROSSLINK",
",",
"links",
",",
"owners",
",",
"}",
",",
"}",
";",
"forEach",
"(",
"links",
",",
"link",
"=>",
"add",
"(",
"getOwners",
"(",
"link",
")",
",",
"result",
")",
")",
";",
"forEach",
"(",
"owners",
",",
"owner",
"=>",
"add",
"(",
"getLinks",
"(",
"owner",
")",
",",
"result",
")",
")",
";",
"forEach",
"(",
"sources",
",",
"source",
"=>",
"add",
"(",
"source",
".",
"next",
",",
"result",
")",
")",
";",
"if",
"(",
"regional",
"&&",
"regionStack",
")",
"{",
"own",
"(",
"getValue",
"(",
"regionStack",
")",
",",
"[",
"result",
"]",
")",
";",
"}",
"return",
"result",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
419 | [
"export",
"*",
"as",
"is",
"from",
"'./validate'",
";",
"import",
"{",
"forEach",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"assert",
",",
"deprecate",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"arrifyNodes",
"}",
"from",
"'./createNode'",
";",
"import",
"type",
"{",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"getMeta",
"}",
"from",
"'./getter'",
";",
"export",
"const",
"isObject",
"=",
"value",
"=>",
"typeof",
"value",
"===",
"'object'",
"&&",
"value",
"!==",
"null",
";",
"export",
"const",
"isFunction",
"=",
"value",
"=>",
"typeof",
"value",
"===",
"'function'",
";",
"export",
"const",
"isVoid",
"=",
"value",
"=>",
"value",
"===",
"undefined",
";",
"export",
"const",
"assertObject",
"=",
"value",
"=>",
"assert",
"(",
"isObject",
"(",
"value",
")",
"||",
"isFunction",
"(",
"value",
")",
",",
"'expect first argument be an object'",
")",
";",
"const",
"assertNodeSetItem",
"=",
"(",
"value",
",",
"method",
",",
"valueName",
",",
"reason",
")",
"=>",
"assert",
"(",
"!",
"(",
"(",
"!",
"isObject",
"(",
"value",
")",
"&&",
"!",
"isFunction",
"(",
"value",
")",
")",
"||",
"(",
"!",
"(",
"'family'",
"in",
"value",
")",
"&&",
"!",
"(",
"'graphite'",
"in",
"value",
")",
")",
")",
",",
"`${",
"method",
"}: expect ${",
"valueName",
"} to be a unit (store, event or effect)${",
"reason",
"}`",
")",
";",
"export",
"const",
"assertNodeSet",
"=",
"(",
"value",
",",
"method",
",",
"valueName",
")",
"=>",
"{",
"if",
"(",
"Array",
".",
"isArray",
"(",
"value",
")",
")",
"{",
"forEach",
"(",
"value",
",",
"(",
"item",
",",
"i",
")",
"=>",
"assertNodeSetItem",
"(",
"item",
",",
"method",
",",
"`${",
"i",
"} item of ${",
"valueName",
"}`",
",",
"''",
")",
")",
";",
"}",
"else",
"{",
"assertNodeSetItem",
"(",
"value",
",",
"method",
",",
"valueName",
",",
"' or array of units'",
")",
";",
"}",
"}",
";",
"export",
"const",
"assertTarget",
"=",
"(",
"method",
",",
"target",
",",
"targetField",
"=",
"'target'",
")",
"=>",
"forEach",
"(",
"arrifyNodes",
"(",
"target",
")",
",",
"item",
"=>",
"deprecate",
"(",
"!",
"getMeta",
"(",
"item",
",",
"'derived'",
")",
",",
"`${",
"method",
"}: derived unit in \"${",
"targetField",
"}\"`",
",",
"`createEvent/createStore`",
")",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
2,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
2,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
420 | [
"import",
"type",
"{",
"Store",
",",
"CommonUnit",
",",
"Domain",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"is",
"}",
"from",
"'./is'",
";",
"import",
"{",
"getParent",
",",
"getCompositeName",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"forIn",
"}",
"from",
"'./collection'",
";",
"export",
"function",
"unitObjectName",
"(",
"objOrArr",
",",
"method",
"=",
"'combine'",
")",
"{",
"let",
"name",
"=",
"method",
"+",
"'('",
";",
"let",
"comma",
"=",
"''",
";",
"let",
"i",
"=",
"0",
";",
"forIn",
"(",
"objOrArr",
",",
"unit",
"=>",
"{",
"if",
"(",
"i",
"<",
"25",
")",
"{",
"if",
"(",
"unit",
"!=",
"null",
")",
"{",
"name",
"+=",
"comma",
";",
"name",
"+=",
"is",
".",
"unit",
"(",
"unit",
")",
"?",
"getCompositeName",
"(",
"unit",
"as",
"CommonUnit",
"|",
"Domain",
")",
".",
"fullName",
":",
"unit",
".",
"toString",
"(",
")",
";",
"}",
"i",
"+=",
"1",
";",
"comma",
"=",
"', '",
";",
"}",
"}",
")",
";",
"return",
"name",
"+",
"')'",
";",
"}",
"export",
"function",
"setStoreName",
"<",
"State",
">",
"(",
"store",
",",
"rawName",
")",
"{",
"store",
".",
"shortName",
"=",
"rawName",
";",
"Object",
".",
"assign",
"(",
"getCompositeName",
"(",
"store",
")",
",",
"createName",
"(",
"rawName",
",",
"getParent",
"(",
"store",
")",
")",
")",
";",
"}",
"export",
"type",
"CompositeName",
"=",
"{",
"shortName",
":",
"string",
";",
"fullName",
":",
"string",
";",
"path",
":",
"string",
"[",
"]",
";",
"}",
";",
"export",
"function",
"createName",
"(",
"name",
",",
"parent",
"?",
")",
"{",
"let",
"path",
";",
"let",
"fullName",
";",
"const",
"shortName",
"=",
"name",
";",
"if",
"(",
"!",
"parent",
")",
"{",
"path",
"=",
"name",
".",
"length",
"===",
"0",
"?",
"[",
"]",
":",
"[",
"name",
"]",
";",
"fullName",
"=",
"name",
";",
"}",
"else",
"{",
"const",
"composite",
"=",
"getCompositeName",
"(",
"parent",
")",
";",
"if",
"(",
"name",
".",
"length",
"===",
"0",
")",
"{",
"path",
"=",
"composite",
".",
"path",
";",
"fullName",
"=",
"composite",
".",
"fullName",
";",
"}",
"else",
"{",
"path",
"=",
"composite",
".",
"path",
".",
"concat",
"(",
"[",
"name",
"]",
")",
";",
"fullName",
"=",
"composite",
".",
"fullName",
".",
"length",
"===",
"0",
"?",
"name",
":",
"''",
"+",
"composite",
".",
"fullName",
"+",
"'/'",
"+",
"name",
";",
"}",
"}",
"return",
"{",
"shortName",
",",
"fullName",
",",
"path",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
2,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
46,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37599,
null,
2,
null,
555,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37599,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
421 | [
"import",
"type",
"{",
"Subscription",
",",
"Subscriber",
",",
"Node",
",",
"kind",
",",
"StateRef",
",",
"Unit",
",",
"Config",
",",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"CompositeName",
"}",
"from",
"'./naming'",
";",
"export",
"interface",
"Event",
"<",
"E",
">",
"extends",
"Unit",
"{",
"(",
"payload",
")",
":",
"E",
";",
"id",
":",
"string",
";",
"kind",
":",
"kind",
";",
"getType",
"(",
")",
":",
"string",
";",
"create",
"(",
"payload",
",",
"args",
")",
":",
"E",
";",
"watch",
"(",
"watcher",
")",
":",
"Subscription",
";",
"map",
"<",
"T",
">",
"(",
"fn",
")",
":",
"Event",
"<",
"T",
">",
";",
"filter",
"(",
"config",
")",
":",
"Event",
"<",
"E",
">",
";",
"filter",
"<",
"T",
">",
"(",
"fn",
")",
":",
"Event",
"<",
"T",
">",
";",
"filterMap",
"<",
"T",
">",
"(",
"fn",
")",
":",
"Event",
"<",
"T",
">",
";",
"prepend",
"<",
"Before",
">",
"(",
"fn",
")",
":",
"Event",
"<",
"Before",
">",
";",
"subscribe",
"(",
"subscriber",
")",
":",
"Subscription",
";",
"thru",
"<",
"U",
">",
"(",
"fn",
")",
":",
"U",
";",
"getType",
"(",
")",
":",
"string",
";",
"shortName",
":",
"string",
";",
"graphite",
":",
"Node",
";",
"compositeName",
":",
"CompositeName",
";",
"}",
"export",
"interface",
"Store",
"<",
"State",
">",
"extends",
"Unit",
"{",
"subscribers",
":",
"Map",
"<",
"CommonUnit",
",",
"Subscription",
">",
";",
"id",
":",
"string",
";",
"stateRef",
":",
"StateRef",
";",
"reset",
"(",
"...",
"units",
")",
":",
"Store",
"<",
"State",
">",
";",
"getState",
"(",
")",
":",
"State",
";",
"setState",
"(",
"newState",
")",
":",
"void",
";",
"map",
":",
"(",
"(",
"<",
"T",
">",
"(",
"fn",
":",
"(",
"_",
":",
"State",
",",
"lastState",
"?",
":",
"T",
")",
"=>",
"T",
",",
"_",
":",
"void",
")",
"=>",
"Store",
"<",
"T",
">",
")",
"&",
"(",
"<",
"T",
">",
"(",
"fn",
":",
"(",
"_",
":",
"State",
",",
"lastState",
":",
"T",
")",
"=>",
"T",
",",
"firstState",
":",
"T",
")",
"=>",
"Store",
"<",
"T",
">",
")",
")",
";",
"on",
"<",
"E",
">",
"(",
"event",
",",
"handler",
")",
":",
"Store",
"<",
"State",
">",
";",
"off",
"(",
"unit",
")",
":",
"void",
";",
"subscribe",
"(",
"listener",
")",
":",
"Subscription",
";",
"thru",
"<",
"U",
">",
"(",
"fn",
")",
":",
"U",
";",
"watch",
":",
"(",
"(",
"<",
"E",
">",
"(",
"watcher",
":",
"(",
"state",
":",
"State",
",",
"payload",
":",
"E",
")",
"=>",
"any",
",",
"_",
":",
"void",
")",
"=>",
"Subscription",
")",
"&",
"(",
"<",
"E",
">",
"(",
"trigger",
":",
"CommonUnit",
"<",
"E",
">",
",",
"watcher",
":",
"(",
"state",
":",
"State",
",",
"payload",
":",
"E",
")",
"=>",
"any",
")",
"=>",
"Subscription",
")",
")",
";",
"kind",
":",
"kind",
";",
"defaultState",
":",
"State",
";",
"defaultConfig",
":",
"Config",
"&",
"{",
"updateFilter",
"?",
":",
"(",
"update",
":",
"State",
",",
"current",
":",
"State",
")",
"=>",
"boolean",
";",
"}",
";",
"defaultShape",
"?",
":",
"Object",
";",
"shortName",
":",
"string",
";",
"sid",
":",
"string",
"|",
"null",
";",
"graphite",
":",
"Node",
";",
"updates",
":",
"Event",
"<",
"State",
">",
";",
"compositeName",
":",
"CompositeName",
";",
"}",
"export",
"interface",
"Effect",
"<",
"Params",
",",
"Done",
",",
"Fail",
"=",
"Error",
">",
"extends",
"Unit",
"{",
"(",
"payload",
")",
":",
"Promise",
"<",
"Done",
">",
";",
"done",
":",
"Event",
"<",
"{",
"params",
":",
"Params",
";",
"result",
":",
"Done",
";",
"}",
">",
";",
"fail",
":",
"Event",
"<",
"{",
"params",
":",
"Params",
";",
"error",
":",
"Fail",
";",
"}",
">",
";",
"doneData",
":",
"Event",
"<",
"Done",
">",
";",
"failData",
":",
"Event",
"<",
"Fail",
">",
";",
"finally",
":",
"Event",
"<",
"{",
"status",
":",
"'done'",
";",
"params",
":",
"Params",
";",
"result",
":",
"Done",
";",
"}",
"|",
"{",
"status",
":",
"'fail'",
";",
"params",
":",
"Params",
";",
"error",
":",
"Fail",
";",
"}",
">",
";",
"id",
":",
"string",
";",
"use",
":",
"{",
"(",
"handler",
")",
":",
"Effect",
"<",
"Params",
",",
"Done",
",",
"Fail",
">",
";",
"getCurrent",
"(",
")",
":",
"(",
"params",
":",
"Params",
")",
"=>",
"Promise",
"<",
"Done",
">",
";",
"}",
";",
"create",
"(",
"payload",
",",
"args",
")",
":",
"Params",
";",
"inFlight",
":",
"Store",
"<",
"number",
">",
";",
"pending",
":",
"Store",
"<",
"boolean",
">",
";",
"watch",
"(",
"watcher",
")",
":",
"Subscription",
";",
"prepend",
"<",
"Before",
">",
"(",
"fn",
")",
":",
"Event",
"<",
"Before",
">",
";",
"subscribe",
"(",
"subscriber",
")",
":",
"Subscription",
";",
"getType",
"(",
")",
":",
"string",
";",
"kind",
":",
"kind",
";",
"shortName",
":",
"string",
";",
"graphite",
":",
"Node",
";",
"compositeName",
":",
"CompositeName",
";",
"}",
"export",
"interface",
"Domain",
"extends",
"Unit",
"{",
"id",
":",
"string",
";",
"onCreateEvent",
"(",
"hook",
")",
":",
"Subscription",
";",
"onCreateEffect",
"(",
"hook",
")",
":",
"Subscription",
";",
"onCreateStore",
"(",
"hook",
")",
":",
"Subscription",
";",
"onCreateDomain",
"(",
"hook",
")",
":",
"Subscription",
";",
"event",
"<",
"Payload",
">",
"(",
"name",
"?",
",",
"config",
"?",
")",
":",
"Event",
"<",
"Payload",
">",
";",
"effect",
"<",
"Params",
",",
"Done",
",",
"Fail",
">",
"(",
"name",
"?",
",",
"config",
"?",
")",
":",
"Effect",
"<",
"Params",
",",
"Done",
",",
"Fail",
">",
";",
"domain",
"(",
"name",
"?",
")",
":",
"Domain",
";",
"store",
"<",
"State",
">",
"(",
"defaultState",
",",
"config",
"?",
")",
":",
"Store",
"<",
"State",
">",
";",
"history",
":",
"{",
"events",
":",
"Set",
"<",
"Event",
"<",
"any",
">",
">",
";",
"effects",
":",
"Set",
"<",
"Effect",
"<",
"any",
",",
"any",
">",
">",
";",
"stores",
":",
"Set",
"<",
"Store",
"<",
"any",
">",
">",
";",
"domains",
":",
"Set",
"<",
"Domain",
">",
";",
"}",
";",
"compositeName",
":",
"CompositeName",
";",
"getType",
"(",
")",
":",
"string",
";",
"kind",
":",
"kind",
";",
"graphite",
":",
"Node",
";",
"}",
"export",
"interface",
"Scope",
"extends",
"Unit",
"{",
"kind",
":",
"kind",
";",
"graphite",
":",
"Node",
";",
"reg",
":",
"Record",
"<",
"string",
",",
"StateRef",
">",
";",
"cloneOf",
"?",
":",
"Domain",
";",
"getState",
"<",
"T",
">",
"(",
"store",
")",
":",
"T",
";",
"getState",
"(",
"ref",
")",
":",
"unknown",
";",
"/** value could be set only for stores with sid (they can be created by createStore, restore and combine) */",
"sidValuesMap",
":",
"Record",
"<",
"string",
",",
"any",
">",
";",
"sidIdMap",
":",
"Record",
"<",
"string",
",",
"string",
">",
";",
"additionalLinks",
":",
"Record",
"<",
"string",
",",
"Node",
"[",
"]",
">",
";",
"handlers",
":",
"Record",
"<",
"string",
",",
"(",
"params",
":",
"unknown",
")",
"=>",
"any",
">",
";",
"fxCount",
":",
"Node",
";",
"storeChange",
":",
"Node",
";",
"}",
"export",
"type",
"CommonUnit",
"<",
"T",
"=",
"any",
">",
"=",
"Event",
"<",
"T",
">",
"|",
"Effect",
"<",
"T",
",",
"any",
",",
"any",
">",
"|",
"Store",
"<",
"T",
">",
";",
"export",
"type",
"DataCarrier",
"=",
"CommonUnit",
"|",
"Node",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
304,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
304,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
422 | [
"export",
"const",
"observableSymbol",
"=",
"(",
"typeof",
"Symbol",
"!==",
"'undefined'",
"&&",
"Symbol",
".",
"observable",
")",
"||",
"'@@observable'",
";"
] | [
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
423 | [
"import",
"type",
"{",
"Stack",
"}",
"from",
"'./kernel'",
";",
"export",
"const",
"callStackAReg",
"=",
"(",
"stack",
",",
"{",
"fn",
"}",
",",
"{",
"a",
"}",
")",
"=>",
"fn",
"(",
"stack",
",",
"a",
")",
";",
"export",
"const",
"callARegStack",
"=",
"(",
"stack",
",",
"{",
"fn",
"}",
",",
"{",
"a",
"}",
")",
"=>",
"fn",
"(",
"a",
",",
"stack",
")",
";",
"export",
"const",
"callStack",
"=",
"(",
"stack",
",",
"{",
"fn",
"}",
",",
"_",
")",
"=>",
"fn",
"(",
"stack",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
424 | [
"import",
"type",
"{",
"StateRef",
",",
"Compute",
",",
"MovValueToRegister",
",",
"MovValueToStore",
",",
"MovStoreToRegister",
",",
"MovStoreToStore",
",",
"MovRegisterToStore",
",",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"nextStepID",
"}",
"from",
"'./id'",
";",
"import",
"{",
"EFFECT",
",",
"REG_A",
",",
"SAMPLER",
",",
"STACK",
",",
"STORE",
"}",
"from",
"'./tag'",
";",
"import",
"type",
"{",
"BarrierPriorityTag",
",",
"Stack",
"}",
"from",
"'./kernel'",
";",
"import",
"{",
"callStack",
"}",
"from",
"'./caller'",
";",
"const",
"cmd",
"=",
"(",
"type",
",",
"data",
",",
"priority",
"?",
",",
"batch",
"?",
")",
"=>",
"{",
"const",
"result",
"=",
"{",
"id",
":",
"nextStepID",
"(",
")",
",",
"type",
",",
"data",
",",
"}",
";",
"if",
"(",
"priority",
")",
"{",
"result",
".",
"order",
"=",
"{",
"priority",
"}",
";",
"if",
"(",
"batch",
")",
"result",
".",
"order",
".",
"barrierID",
"=",
"++",
"nextBarrierID",
";",
"}",
"return",
"result",
";",
"}",
";",
"let",
"nextBarrierID",
"=",
"0",
";",
"export",
"const",
"mov",
"=",
"(",
"{",
"from",
"=",
"STORE",
",",
"store",
",",
"target",
",",
"to",
"=",
"target",
"?",
"STORE",
":",
"STACK",
",",
"batch",
",",
"priority",
",",
"}",
")",
"=>",
"cmd",
"(",
"'mov'",
",",
"{",
"from",
",",
"store",
",",
"to",
",",
"target",
"}",
",",
"priority",
",",
"batch",
")",
";",
"export",
"const",
"compute",
"=",
"(",
"{",
"fn",
",",
"batch",
",",
"priority",
",",
"safe",
"=",
"false",
",",
"filter",
"=",
"false",
",",
"pure",
"=",
"false",
",",
"}",
")",
":",
"Compute",
"=>",
"cmd",
"(",
"'compute'",
",",
"{",
"fn",
",",
"safe",
",",
"filter",
",",
"pure",
"}",
",",
"priority",
",",
"batch",
")",
";",
"export",
"const",
"filter",
"=",
"(",
"{",
"fn",
",",
"pure",
",",
"}",
")",
"=>",
"compute",
"(",
"{",
"fn",
",",
"filter",
":",
"true",
",",
"pure",
"}",
")",
";",
"export",
"const",
"run",
"=",
"(",
"{",
"fn",
"}",
")",
"=>",
"compute",
"(",
"{",
"fn",
",",
"priority",
":",
"EFFECT",
"}",
")",
";",
"export",
"const",
"calc",
"=",
"(",
"fn",
",",
"filter",
"?",
",",
"isEffect",
"?",
")",
"=>",
"compute",
"(",
"{",
"fn",
",",
"safe",
":",
"true",
",",
"filter",
",",
"priority",
":",
"isEffect",
"&&",
"EFFECT",
"}",
")",
";",
"/**\n * `read(ref, true, true)`: **reg.stack** with **sampler** batch\n *\n * `read(ref, true, false)`: **reg.stack** without batch\n *\n * `read(ref, false, true)`: **reg.a** with **sampler** batch\n *\n * `read(ref, false, false)`: **reg.a** without batch\n *\n */",
"export",
"const",
"read",
"=",
"(",
"store",
",",
"toStack",
"?",
",",
"samplerPriority",
"?",
")",
"=>",
"mov",
"(",
"{",
"store",
",",
"to",
":",
"toStack",
"?",
"STACK",
":",
"REG_A",
",",
"priority",
":",
"samplerPriority",
"&&",
"SAMPLER",
",",
"batch",
":",
"true",
",",
"}",
")",
";",
"export",
"const",
"userFnCall",
"=",
"(",
"fn",
"=",
"callStack",
",",
"isFilter",
"?",
")",
"=>",
"compute",
"(",
"{",
"fn",
",",
"pure",
":",
"true",
",",
"filter",
":",
"isFilter",
"}",
")",
";",
"export",
"const",
"step",
"=",
"{",
"mov",
",",
"compute",
",",
"filter",
",",
"run",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
2,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
425 | [
"import",
"{",
"forIn",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"assertObject",
",",
"isObject",
",",
"isVoid",
"}",
"from",
"'./is'",
";",
"export",
"function",
"processArgsToConfig",
"(",
"arg",
",",
"singleArgument",
")",
";",
"export",
"function",
"processArgsToConfig",
"(",
"args",
")",
";",
"export",
"function",
"processArgsToConfig",
"(",
"args",
",",
"singleArgument",
"?",
")",
"{",
"const",
"rawConfig",
"=",
"singleArgument",
"?",
"args",
":",
"args",
"[",
"0",
"]",
";",
"assertObject",
"(",
"rawConfig",
")",
";",
"let",
"metadata",
"=",
"rawConfig",
".",
"or",
";",
"if",
"(",
"rawConfig",
".",
"and",
")",
"{",
"args",
"=",
"rawConfig",
".",
"and",
";",
"}",
"return",
"[",
"args",
",",
"metadata",
"]",
";",
"}",
"/**\nprocessed fields:\n\n'name',\n'sid',\n'loc',\n'handler',\n'updateFilter',\n'parent',\n'serialize',\n'named',\n'derived',\n*/",
"export",
"const",
"flattenConfig",
"=",
"(",
"part",
",",
"config",
"=",
"{",
"}",
")",
"=>",
"{",
"if",
"(",
"isObject",
"(",
"part",
")",
")",
"{",
"flattenConfig",
"(",
"part",
".",
"or",
",",
"config",
")",
";",
"forIn",
"(",
"part",
",",
"(",
"value",
",",
"field",
")",
"=>",
"{",
"if",
"(",
"!",
"isVoid",
"(",
"value",
")",
"&&",
"field",
"!==",
"'or'",
"&&",
"field",
"!==",
"'and'",
")",
"{",
"config",
"[",
"field",
"]",
"=",
"value",
";",
"}",
"}",
")",
";",
"flattenConfig",
"(",
"part",
".",
"and",
",",
"config",
")",
";",
"}",
"return",
"config",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
8,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
426 | [
"import",
"{",
"Node",
",",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"getGraph",
",",
"getOwners",
",",
"getLinks",
",",
"getSubscribers",
",",
"getMeta",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"is",
"}",
"from",
"'./is'",
";",
"import",
"{",
"removeItem",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"CROSSLINK",
"}",
"from",
"'./tag'",
";",
"const",
"removeFromNode",
"=",
"(",
"currentNode",
",",
"targetNode",
")",
"=>",
"{",
"removeItem",
"(",
"currentNode",
".",
"next",
",",
"targetNode",
")",
";",
"removeItem",
"(",
"getOwners",
"(",
"currentNode",
")",
",",
"targetNode",
")",
";",
"removeItem",
"(",
"getLinks",
"(",
"currentNode",
")",
",",
"targetNode",
")",
";",
"}",
";",
"const",
"clearNodeNormalized",
"=",
"(",
"targetNode",
",",
"deep",
",",
"isDomainUnit",
")",
"=>",
"{",
"targetNode",
".",
"next",
".",
"length",
"=",
"0",
";",
"targetNode",
".",
"seq",
".",
"length",
"=",
"0",
";",
"targetNode",
".",
"scope",
"=",
"null",
";",
"let",
"currentNode",
";",
"let",
"list",
"=",
"getLinks",
"(",
"targetNode",
")",
";",
"while",
"(",
"(",
"currentNode",
"=",
"list",
".",
"pop",
"(",
")",
")",
")",
"{",
"removeFromNode",
"(",
"currentNode",
",",
"targetNode",
")",
";",
"if",
"(",
"deep",
"||",
"(",
"isDomainUnit",
"&&",
"getMeta",
"(",
"targetNode",
",",
"'op'",
")",
"!==",
"'sample'",
")",
"||",
"currentNode",
".",
"family",
".",
"type",
"===",
"CROSSLINK",
")",
"{",
"clearNodeNormalized",
"(",
"currentNode",
",",
"deep",
",",
"getMeta",
"(",
"currentNode",
",",
"'op'",
")",
"!==",
"'on'",
"&&",
"isDomainUnit",
")",
";",
"}",
"}",
"list",
"=",
"getOwners",
"(",
"targetNode",
")",
";",
"while",
"(",
"(",
"currentNode",
"=",
"list",
".",
"pop",
"(",
")",
")",
")",
"{",
"removeFromNode",
"(",
"currentNode",
",",
"targetNode",
")",
";",
"if",
"(",
"isDomainUnit",
"&&",
"currentNode",
".",
"family",
".",
"type",
"===",
"CROSSLINK",
")",
"{",
"clearNodeNormalized",
"(",
"currentNode",
",",
"deep",
",",
"getMeta",
"(",
"currentNode",
",",
"'op'",
")",
"!==",
"'on'",
"&&",
"isDomainUnit",
")",
";",
"}",
"}",
"}",
";",
"const",
"clearMap",
"=",
"(",
"map",
")",
"=>",
"map",
".",
"clear",
"(",
")",
";",
"export",
"const",
"clearNode",
"=",
"(",
"graphite",
",",
"{",
"deep",
",",
"}",
"=",
"{",
"}",
")",
"=>",
"{",
"let",
"isDomainUnit",
"=",
"false",
";",
"if",
"(",
"graphite",
".",
"ownerSet",
")",
"graphite",
".",
"ownerSet",
".",
"delete",
"(",
"graphite",
")",
";",
"if",
"(",
"is",
".",
"store",
"(",
"graphite",
")",
")",
"{",
"clearMap",
"(",
"getSubscribers",
"(",
"graphite",
")",
")",
";",
"}",
"else",
"if",
"(",
"is",
".",
"domain",
"(",
"graphite",
")",
")",
"{",
"isDomainUnit",
"=",
"true",
";",
"const",
"history",
"=",
"graphite",
".",
"history",
";",
"clearMap",
"(",
"history",
".",
"events",
")",
";",
"clearMap",
"(",
"history",
".",
"effects",
")",
";",
"clearMap",
"(",
"history",
".",
"stores",
")",
";",
"clearMap",
"(",
"history",
".",
"domains",
")",
";",
"}",
"clearNodeNormalized",
"(",
"getGraph",
"(",
"graphite",
")",
",",
"!",
"!",
"deep",
",",
"isDomainUnit",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
24,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
24,
null,
8,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
37598,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
427 | [
"import",
"type",
"{",
"Subscription",
",",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"clearNode",
"}",
"from",
"'./clearNode'",
";",
"export",
"const",
"createSubscription",
"=",
"(",
"node",
")",
":",
"Subscription",
"=>",
"{",
"const",
"result",
"=",
"(",
")",
"=>",
"clearNode",
"(",
"node",
")",
";",
"result",
".",
"unsubscribe",
"=",
"result",
";",
"return",
"result",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
157,
null,
null,
37598,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
428 | [
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"type",
"{",
"Subscription",
",",
"NodeUnit",
",",
"Cmd",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"createSubscription",
"}",
"from",
"'./subscription'",
";",
"import",
"{",
"assertNodeSet",
",",
"assertTarget",
"}",
"from",
"'./is'",
";",
"export",
"const",
"createLinkNode",
"=",
"(",
"parent",
",",
"child",
",",
"node",
"?",
",",
"op",
"?",
",",
"scopeFn",
"?",
")",
"=>",
"createNode",
"(",
"{",
"node",
",",
"parent",
",",
"child",
",",
"scope",
":",
"{",
"fn",
":",
"scopeFn",
"}",
",",
"meta",
":",
"{",
"op",
"}",
",",
"family",
":",
"{",
"owners",
":",
"[",
"parent",
",",
"child",
"]",
",",
"links",
":",
"child",
"}",
",",
"regional",
":",
"true",
",",
"}",
")",
";",
"export",
"const",
"forward",
"=",
"(",
"opts",
")",
":",
"Subscription",
"=>",
"{",
"const",
"method",
"=",
"'forward'",
";",
"const",
"[",
"{",
"from",
",",
"to",
"}",
",",
"config",
"]",
"=",
"processArgsToConfig",
"(",
"opts",
",",
"true",
")",
";",
"assertNodeSet",
"(",
"from",
",",
"method",
",",
"'\"from\"'",
")",
";",
"assertNodeSet",
"(",
"to",
",",
"method",
",",
"'\"to\"'",
")",
";",
"assertTarget",
"(",
"method",
",",
"to",
",",
"'to'",
")",
";",
"return",
"createSubscription",
"(",
"createNode",
"(",
"{",
"parent",
":",
"from",
",",
"child",
":",
"to",
",",
"meta",
":",
"{",
"op",
":",
"method",
",",
"config",
"}",
",",
"family",
":",
"{",
"}",
",",
"regional",
":",
"true",
",",
"}",
")",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
13,
null,
null,
2,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
157,
null,
null,
6,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
429 | [
"import",
"{",
"run",
"}",
"from",
"'./step'",
";",
"import",
"{",
"callStack",
"}",
"from",
"'./caller'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"{",
"Subscription",
",",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"createSubscription",
"}",
"from",
"'./subscription'",
";",
"import",
"{",
"assert",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"isFunction",
"}",
"from",
"'./is'",
";",
"export",
"const",
"watchUnit",
"=",
"(",
"unit",
",",
"handler",
")",
":",
"Subscription",
"=>",
"{",
"assert",
"(",
"isFunction",
"(",
"handler",
")",
",",
"'.watch argument should be a function'",
")",
";",
"return",
"createSubscription",
"(",
"createNode",
"(",
"{",
"scope",
":",
"{",
"fn",
":",
"handler",
"}",
",",
"node",
":",
"[",
"run",
"(",
"{",
"fn",
":",
"callStack",
"}",
")",
"]",
",",
"parent",
":",
"unit",
",",
"meta",
":",
"{",
"op",
":",
"'watch'",
"}",
",",
"family",
":",
"{",
"owners",
":",
"unit",
"}",
",",
"regional",
":",
"true",
",",
"}",
")",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
157,
null,
null,
37598,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
430 | [
"import",
"{",
"readTemplate",
"}",
"from",
"'./region'",
";",
"import",
"type",
"{",
"Template",
",",
"TemplateHandlers",
"}",
"from",
"'../forest/index.h'",
";",
"export",
"function",
"applyTemplate",
"<",
"K",
"extends",
"keyof",
"TemplateHandlers",
">",
"(",
"method",
",",
"...",
"args",
")",
"{",
"const",
"template",
"=",
"readTemplate",
"(",
")",
";",
"if",
"(",
"template",
")",
"{",
"const",
"fn",
"=",
"template",
".",
"handlers",
"[",
"method",
"]",
";",
"if",
"(",
"fn",
")",
"return",
"fn",
"(",
"template",
",",
"...",
"args",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
68,
null,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
431 | [
"import",
"{",
"observableSymbol",
"}",
"from",
"'./observable'",
";",
"import",
"{",
"is",
",",
"isObject",
",",
"isFunction",
",",
"assertObject",
",",
"assertNodeSet",
",",
"isVoid",
",",
"}",
"from",
"'./is'",
";",
"import",
"type",
"{",
"Store",
",",
"Event",
",",
"CommonUnit",
",",
"Effect",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"calc",
",",
"mov",
",",
"read",
",",
"userFnCall",
"}",
"from",
"'./step'",
";",
"import",
"{",
"createStateRef",
",",
"readRef",
",",
"addRefOp",
"}",
"from",
"'./stateRef'",
";",
"import",
"{",
"nextUnitID",
"}",
"from",
"'./id'",
";",
"import",
"{",
"callStackAReg",
",",
"callARegStack",
",",
"callStack",
"}",
"from",
"'./caller'",
";",
"import",
"{",
"own",
"}",
"from",
"'./own'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"{",
"launch",
",",
"currentPage",
",",
"forkPage",
",",
"setCurrentPage",
",",
"initRefInScope",
",",
"isPure",
",",
"}",
"from",
"'./kernel'",
";",
"import",
"type",
"{",
"Subscriber",
",",
"Config",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"createName",
"}",
"from",
"'./naming'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"import",
"{",
"watchUnit",
"}",
"from",
"'./watch'",
";",
"import",
"{",
"createSubscription",
"}",
"from",
"'./subscription'",
";",
"import",
"{",
"readTemplate",
",",
"readSidRoot",
"}",
"from",
"'./region'",
";",
"import",
"{",
"getSubscribers",
",",
"getStoreState",
",",
"getGraph",
",",
"getParent",
",",
"setMeta",
",",
"getMeta",
",",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"assert",
",",
"deprecate",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"DOMAIN",
",",
"STORE",
",",
"EVENT",
",",
"MAP",
",",
"FILTER",
",",
"STACK",
",",
"REG_A",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"applyTemplate",
"}",
"from",
"'./template'",
";",
"import",
"{",
"forEach",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"flattenConfig",
"}",
"from",
"'./config'",
";",
"import",
"type",
"{",
"Template",
"}",
"from",
"'../forest/index.h'",
";",
"export",
"const",
"applyParentHook",
"=",
"(",
"source",
",",
"target",
",",
"hookType",
"=",
"EVENT",
")",
"=>",
"{",
"if",
"(",
"getParent",
"(",
"source",
")",
")",
"getParent",
"(",
"source",
")",
".",
"hooks",
"[",
"hookType",
"]",
"(",
"target",
")",
";",
"}",
";",
"export",
"const",
"initUnit",
"=",
"(",
"kind",
",",
"unit",
",",
"configA",
",",
"configB",
"?",
")",
"=>",
"{",
"const",
"isDomain",
"=",
"kind",
"===",
"DOMAIN",
";",
"const",
"id",
"=",
"nextUnitID",
"(",
")",
";",
"const",
"config",
"=",
"flattenConfig",
"(",
"{",
"or",
":",
"configB",
",",
"and",
":",
"typeof",
"configA",
"===",
"'string'",
"?",
"{",
"name",
":",
"configA",
"}",
":",
"configA",
",",
"}",
")",
";",
"const",
"{",
"parent",
"=",
"null",
",",
"sid",
"=",
"null",
",",
"named",
"=",
"null",
"}",
"=",
"config",
";",
"const",
"name",
"=",
"named",
"?",
"named",
":",
"config",
".",
"name",
"||",
"(",
"isDomain",
"?",
"''",
":",
"id",
")",
";",
"const",
"compositeName",
"=",
"createName",
"(",
"name",
",",
"parent",
")",
";",
"const",
"meta",
"=",
"{",
"op",
":",
"(",
"unit",
".",
"kind",
"=",
"kind",
")",
",",
"name",
":",
"(",
"unit",
".",
"shortName",
"=",
"name",
")",
",",
"sid",
":",
"(",
"unit",
".",
"sid",
"=",
"readSidRoot",
"(",
"sid",
")",
")",
",",
"named",
",",
"unitId",
":",
"(",
"unit",
".",
"id",
"=",
"id",
")",
",",
"serialize",
":",
"config",
".",
"serialize",
",",
"derived",
":",
"config",
".",
"derived",
",",
"}",
";",
"unit",
".",
"parent",
"=",
"parent",
";",
"unit",
".",
"compositeName",
"=",
"compositeName",
";",
"unit",
".",
"defaultConfig",
"=",
"config",
";",
"unit",
".",
"thru",
"=",
"(",
"fn",
")",
"=>",
"{",
"deprecate",
"(",
"false",
",",
"'thru'",
",",
"'js pipe'",
")",
";",
"return",
"fn",
"(",
"unit",
")",
";",
"}",
";",
"unit",
".",
"getType",
"=",
"(",
")",
"=>",
"compositeName",
".",
"fullName",
";",
"if",
"(",
"!",
"isDomain",
")",
"{",
"unit",
".",
"subscribe",
"=",
"(",
"observer",
")",
"=>",
"{",
"assertObject",
"(",
"observer",
")",
";",
"return",
"unit",
".",
"watch",
"(",
"isFunction",
"(",
"observer",
")",
"?",
"observer",
":",
"upd",
"=>",
"observer",
".",
"next",
"&&",
"observer",
".",
"next",
"(",
"upd",
")",
")",
";",
"}",
";",
"unit",
"[",
"observableSymbol",
"]",
"=",
"(",
")",
"=>",
"unit",
";",
"const",
"template",
"=",
"readTemplate",
"(",
")",
";",
"if",
"(",
"template",
")",
"meta",
".",
"nativeTemplate",
"=",
"template",
";",
"}",
"return",
"meta",
";",
"}",
";",
"export",
"const",
"createNamedEvent",
"=",
"(",
"named",
")",
"=>",
"createEvent",
"(",
"{",
"named",
"}",
")",
";",
"const",
"deriveEvent",
"=",
"(",
"event",
",",
"op",
",",
"fn",
",",
"node",
")",
"=>",
"{",
"let",
"config",
";",
"if",
"(",
"isObject",
"(",
"fn",
")",
")",
"{",
"config",
"=",
"fn",
";",
"fn",
"=",
"fn",
".",
"fn",
";",
"}",
"const",
"mapped",
"=",
"createEvent",
"(",
"{",
"name",
":",
"`${",
"event",
".",
"shortName",
"} → *`",
",",
"derived",
":",
"true",
",",
"and",
":",
"config",
",",
"}",
")",
";",
"createLinkNode",
"(",
"event",
",",
"mapped",
",",
"node",
",",
"op",
",",
"fn",
")",
";",
"return",
"mapped",
";",
"}",
";",
"function",
"callCreate",
"<",
"T",
">",
"(",
"unit",
",",
"template",
",",
"payload",
",",
"args",
")",
"{",
"const",
"oldPage",
"=",
"currentPage",
";",
"let",
"page",
"=",
"null",
";",
"if",
"(",
"template",
")",
"{",
"page",
"=",
"currentPage",
";",
"while",
"(",
"page",
"&&",
"page",
".",
"template",
"!==",
"template",
")",
"{",
"page",
"=",
"getParent",
"(",
"page",
")",
";",
"}",
"}",
"setCurrentPage",
"(",
"page",
")",
";",
"const",
"result",
"=",
"unit",
".",
"create",
"(",
"payload",
",",
"args",
")",
";",
"setCurrentPage",
"(",
"oldPage",
")",
";",
"return",
"result",
";",
"}",
"export",
"function",
"createEvent",
"<",
"Payload",
"=",
"any",
">",
"(",
"nameOrConfig",
"?",
",",
"maybeConfig",
"?",
")",
"{",
"const",
"event",
"=",
"(",
"(",
"payload",
",",
"...",
"args",
")",
"=>",
"{",
"deprecate",
"(",
"!",
"getMeta",
"(",
"event",
",",
"'derived'",
")",
",",
"'call of derived event'",
",",
"'createEvent'",
")",
";",
"deprecate",
"(",
"!",
"isPure",
",",
"'unit call from pure function'",
",",
"'operators like sample'",
")",
";",
"if",
"(",
"currentPage",
")",
"{",
"return",
"callCreate",
"(",
"event",
",",
"template",
",",
"payload",
",",
"args",
")",
";",
"}",
"return",
"event",
".",
"create",
"(",
"payload",
",",
"args",
")",
";",
"}",
")",
"as",
"Event",
"<",
"Payload",
">",
";",
"const",
"template",
"=",
"readTemplate",
"(",
")",
";",
"return",
"Object",
".",
"assign",
"(",
"event",
",",
"{",
"graphite",
":",
"createNode",
"(",
"{",
"meta",
":",
"initUnit",
"(",
"EVENT",
",",
"event",
",",
"nameOrConfig",
",",
"maybeConfig",
")",
",",
"regional",
":",
"true",
",",
"}",
")",
",",
"create",
"(",
"params",
",",
"_",
")",
"{",
"launch",
"(",
"{",
"target",
":",
"event",
",",
"params",
",",
"scope",
":",
"forkPage",
"!",
"}",
")",
";",
"return",
"params",
";",
"}",
",",
"watch",
":",
"(",
"fn",
")",
"=>",
"watchUnit",
"(",
"event",
",",
"fn",
")",
",",
"map",
":",
"(",
"fn",
")",
"=>",
"deriveEvent",
"(",
"event",
",",
"MAP",
",",
"fn",
",",
"[",
"userFnCall",
"(",
")",
"]",
")",
",",
"filter",
":",
"(",
"fn",
")",
"=>",
"deriveEvent",
"(",
"event",
",",
"FILTER",
",",
"fn",
".",
"fn",
"?",
"fn",
":",
"fn",
".",
"fn",
",",
"[",
"userFnCall",
"(",
"callStack",
",",
"true",
")",
",",
"]",
")",
",",
"filterMap",
":",
"(",
"fn",
")",
"=>",
"deriveEvent",
"(",
"event",
",",
"'filterMap'",
",",
"fn",
",",
"[",
"userFnCall",
"(",
")",
",",
"calc",
"(",
"value",
"=>",
"!",
"isVoid",
"(",
"value",
")",
",",
"true",
")",
",",
"]",
")",
",",
"prepend",
"(",
"fn",
")",
"{",
"const",
"contramapped",
"=",
"createEvent",
"(",
"'* → '",
"+",
"event",
".",
"shortName",
",",
"{",
"parent",
":",
"getParent",
"(",
"event",
")",
",",
"}",
")",
";",
"applyTemplate",
"(",
"'eventPrepend'",
",",
"getGraph",
"(",
"contramapped",
")",
")",
";",
"createLinkNode",
"(",
"contramapped",
",",
"event",
",",
"[",
"userFnCall",
"(",
")",
"]",
",",
"'prepend'",
",",
"fn",
")",
";",
"applyParentHook",
"(",
"event",
",",
"contramapped",
")",
";",
"return",
"contramapped",
";",
"}",
",",
"}",
")",
";",
"}",
"export",
"function",
"createStore",
"<",
"State",
">",
"(",
"defaultState",
",",
"props",
"?",
")",
"{",
"const",
"plainState",
"=",
"createStateRef",
"(",
"defaultState",
")",
";",
"const",
"updates",
"=",
"createNamedEvent",
"(",
"'updates'",
")",
";",
"applyTemplate",
"(",
"'storeBase'",
",",
"plainState",
")",
";",
"const",
"plainStateId",
"=",
"plainState",
".",
"id",
";",
"const",
"store",
"=",
"{",
"subscribers",
":",
"new",
"Map",
"(",
")",
",",
"updates",
",",
"defaultState",
",",
"stateRef",
":",
"plainState",
",",
"getState",
"(",
")",
"{",
"let",
"targetRef",
"=",
"plainState",
";",
"let",
"reachedPage",
";",
"if",
"(",
"currentPage",
")",
"{",
"let",
"page",
"=",
"currentPage",
";",
"while",
"(",
"page",
"&&",
"!",
"page",
".",
"reg",
"[",
"plainStateId",
"]",
")",
"{",
"page",
"=",
"getParent",
"(",
"page",
")",
";",
"}",
"if",
"(",
"page",
")",
"reachedPage",
"=",
"page",
";",
"}",
"if",
"(",
"!",
"reachedPage",
"&&",
"forkPage",
")",
"{",
"initRefInScope",
"(",
"forkPage",
",",
"plainState",
",",
"true",
")",
";",
"reachedPage",
"=",
"forkPage",
";",
"}",
"if",
"(",
"reachedPage",
")",
"targetRef",
"=",
"reachedPage",
".",
"reg",
"[",
"plainStateId",
"]",
";",
"return",
"readRef",
"(",
"targetRef",
")",
";",
"}",
",",
"setState",
":",
"(",
"state",
")",
"=>",
"launch",
"(",
"{",
"target",
":",
"store",
",",
"params",
":",
"state",
",",
"defer",
":",
"true",
",",
"scope",
":",
"forkPage",
"!",
",",
"}",
")",
",",
"reset",
"(",
"...",
"units",
")",
"{",
"forEach",
"(",
"units",
",",
"unit",
"=>",
"store",
".",
"on",
"(",
"unit",
",",
"(",
")",
"=>",
"store",
".",
"defaultState",
")",
")",
";",
"return",
"store",
";",
"}",
",",
"on",
"(",
"nodeSet",
",",
"fn",
")",
"{",
"assertNodeSet",
"(",
"nodeSet",
",",
"'.on'",
",",
"'first argument'",
")",
";",
"deprecate",
"(",
"!",
"getMeta",
"(",
"store",
",",
"'derived'",
")",
",",
"'.on in derived store'",
",",
"'createStore'",
")",
";",
"forEach",
"(",
"Array",
".",
"isArray",
"(",
"nodeSet",
")",
"?",
"nodeSet",
":",
"[",
"nodeSet",
"]",
",",
"trigger",
"=>",
"{",
"store",
".",
"off",
"(",
"trigger",
")",
";",
"getSubscribers",
"(",
"store",
")",
".",
"set",
"(",
"trigger",
",",
"createSubscription",
"(",
"updateStore",
"(",
"trigger",
",",
"store",
",",
"'on'",
",",
"callARegStack",
",",
"fn",
")",
")",
")",
";",
"}",
")",
";",
"return",
"store",
";",
"}",
",",
"off",
"(",
"unit",
")",
"{",
"const",
"currentSubscription",
"=",
"getSubscribers",
"(",
"store",
")",
".",
"get",
"(",
"unit",
")",
";",
"if",
"(",
"currentSubscription",
")",
"{",
"currentSubscription",
"(",
")",
";",
"getSubscribers",
"(",
"store",
")",
".",
"delete",
"(",
"unit",
")",
";",
"}",
"return",
"store",
";",
"}",
",",
"map",
"(",
"fn",
",",
"firstState",
"?",
")",
"{",
"let",
"config",
";",
"if",
"(",
"isObject",
"(",
"fn",
")",
")",
"{",
"config",
"=",
"fn",
";",
"fn",
"=",
"(",
"fn",
"as",
"unknown",
"as",
"{",
"fn",
":",
"(",
"value",
":",
"any",
")",
"=>",
"any",
";",
"}",
")",
".",
"fn",
";",
"}",
"deprecate",
"(",
"isVoid",
"(",
"firstState",
")",
",",
"'second argument of store.map'",
",",
"'updateFilter'",
")",
";",
"let",
"lastResult",
";",
"const",
"storeState",
"=",
"store",
".",
"getState",
"(",
")",
";",
"const",
"template",
"=",
"readTemplate",
"(",
")",
";",
"if",
"(",
"template",
")",
"{",
"lastResult",
"=",
"null",
";",
"}",
"else",
"if",
"(",
"!",
"isVoid",
"(",
"storeState",
")",
")",
"{",
"lastResult",
"=",
"fn",
"(",
"storeState",
",",
"firstState",
")",
";",
"}",
"const",
"innerStore",
"=",
"createStore",
"(",
"lastResult",
",",
"{",
"name",
":",
"`${",
"store",
".",
"shortName",
"} → *`",
",",
"derived",
":",
"true",
",",
"and",
":",
"config",
",",
"}",
")",
";",
"const",
"linkNode",
"=",
"updateStore",
"(",
"store",
",",
"innerStore",
",",
"MAP",
",",
"callStackAReg",
",",
"fn",
")",
";",
"addRefOp",
"(",
"getStoreState",
"(",
"innerStore",
")",
",",
"{",
"type",
":",
"MAP",
",",
"fn",
",",
"from",
":",
"plainState",
",",
"}",
")",
";",
"getStoreState",
"(",
"innerStore",
")",
".",
"noInit",
"=",
"true",
";",
"applyTemplate",
"(",
"'storeMap'",
",",
"plainState",
",",
"linkNode",
")",
";",
"return",
"innerStore",
";",
"}",
",",
"watch",
"(",
"eventOrFn",
",",
"fn",
"?",
")",
"{",
"if",
"(",
"!",
"fn",
"||",
"!",
"is",
".",
"unit",
"(",
"eventOrFn",
")",
")",
"{",
"const",
"subscription",
"=",
"watchUnit",
"(",
"store",
",",
"eventOrFn",
")",
";",
"if",
"(",
"!",
"applyTemplate",
"(",
"'storeWatch'",
",",
"plainState",
",",
"eventOrFn",
")",
")",
"{",
"eventOrFn",
"(",
"store",
".",
"getState",
"(",
")",
")",
";",
"}",
"return",
"subscription",
";",
"}",
"assert",
"(",
"isFunction",
"(",
"fn",
")",
",",
"'second argument should be a function'",
")",
";",
"return",
"eventOrFn",
".",
"watch",
"(",
"payload",
"=>",
"fn",
"(",
"store",
".",
"getState",
"(",
")",
",",
"payload",
")",
")",
";",
"}",
",",
"}",
"as",
"unknown",
"as",
"Store",
"<",
"State",
">",
";",
"const",
"meta",
"=",
"initUnit",
"(",
"STORE",
",",
"store",
",",
"props",
")",
";",
"const",
"updateFilter",
"=",
"store",
".",
"defaultConfig",
".",
"updateFilter",
";",
"store",
".",
"graphite",
"=",
"createNode",
"(",
"{",
"scope",
":",
"{",
"state",
":",
"plainState",
",",
"fn",
":",
"updateFilter",
"}",
",",
"node",
":",
"[",
"calc",
"(",
"(",
"upd",
",",
"_",
",",
"stack",
")",
"=>",
"{",
"if",
"(",
"stack",
".",
"scope",
"&&",
"!",
"stack",
".",
"scope",
".",
"reg",
"[",
"plainState",
".",
"id",
"]",
")",
"{",
"stack",
".",
"b",
"=",
"true",
";",
"}",
"return",
"upd",
";",
"}",
")",
",",
"read",
"(",
"plainState",
")",
",",
"calc",
"(",
"(",
"upd",
",",
"_",
",",
"{",
"a",
",",
"b",
"}",
")",
"=>",
"!",
"isVoid",
"(",
"upd",
")",
"&&",
"(",
"upd",
"!==",
"a",
"||",
"b",
")",
",",
"true",
")",
",",
"updateFilter",
"&&",
"userFnCall",
"(",
"callStackAReg",
",",
"true",
")",
",",
"mov",
"(",
"{",
"from",
":",
"STACK",
",",
"target",
":",
"plainState",
"}",
")",
",",
"]",
",",
"child",
":",
"updates",
",",
"meta",
",",
"regional",
":",
"true",
",",
"}",
")",
";",
"const",
"sid",
"=",
"getMeta",
"(",
"store",
",",
"'sid'",
")",
";",
"if",
"(",
"sid",
")",
"{",
"if",
"(",
"getMeta",
"(",
"store",
",",
"'serialize'",
")",
"!==",
"'ignore'",
")",
"setMeta",
"(",
"store",
",",
"'storeChange'",
",",
"true",
")",
";",
"plainState",
".",
"sid",
"=",
"sid",
";",
"}",
"assert",
"(",
"getMeta",
"(",
"store",
",",
"'derived'",
")",
"||",
"!",
"isVoid",
"(",
"defaultState",
")",
",",
"\"current state can't be undefined, use null instead\"",
")",
";",
"own",
"(",
"store",
",",
"[",
"updates",
"]",
")",
";",
"return",
"store",
";",
"}",
"const",
"updateStore",
"=",
"(",
"from",
",",
"store",
",",
"op",
",",
"caller",
",",
"fn",
")",
"=>",
"{",
"const",
"storeRef",
"=",
"getStoreState",
"(",
"store",
")",
";",
"const",
"reader",
"=",
"mov",
"(",
"{",
"store",
":",
"storeRef",
",",
"to",
":",
"REG_A",
",",
"priority",
":",
"'read'",
",",
"}",
")",
";",
"if",
"(",
"op",
"===",
"MAP",
")",
"reader",
".",
"data",
".",
"softRead",
"=",
"true",
";",
"const",
"node",
"=",
"[",
"reader",
",",
"userFnCall",
"(",
"caller",
")",
"]",
";",
"applyTemplate",
"(",
"'storeOnMap'",
",",
"storeRef",
",",
"node",
",",
"is",
".",
"store",
"(",
"from",
")",
"&&",
"getStoreState",
"(",
"from",
")",
")",
";",
"return",
"createLinkNode",
"(",
"from",
",",
"store",
",",
"node",
",",
"op",
",",
"fn",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
396,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
963,
null,
11,
null,
5,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
845,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
845,
null,
845,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
33,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
38,
null,
87,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
38,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
5,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
0,
null,
null,
null,
157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
38,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
0,
null,
46,
null,
2,
null,
null,
null,
33,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
432 | [
"import",
"type",
"{",
"Store",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"createStore",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"createStateRef",
",",
"addRefOp",
"}",
"from",
"'./stateRef'",
";",
"import",
"{",
"mov",
",",
"calc",
",",
"read",
",",
"userFnCall",
"}",
"from",
"'./step'",
";",
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"import",
"{",
"getStoreState",
",",
"setMeta",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"is",
",",
"isFunction",
",",
"isObject",
",",
"isVoid",
"}",
"from",
"'./is'",
";",
"import",
"{",
"unitObjectName",
"}",
"from",
"'./naming'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"import",
"{",
"assert",
",",
"deprecate",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"readTemplate",
"}",
"from",
"'./region'",
";",
"import",
"{",
"forIn",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"BARRIER",
",",
"MAP",
",",
"REG_A",
",",
"VALUE",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"applyTemplate",
"}",
"from",
"'./template'",
";",
"import",
"type",
"{",
"Config",
"}",
"from",
"'./index.h'",
";",
"export",
"function",
"combine",
"(",
"...",
"args",
")",
"{",
"let",
"handler",
";",
"let",
"stores",
";",
"let",
"config",
";",
"[",
"args",
",",
"config",
"]",
"=",
"processArgsToConfig",
"(",
"args",
")",
";",
"const",
"rawHandler",
"=",
"args",
"[",
"args",
".",
"length",
"-",
"1",
"]",
";",
"if",
"(",
"isFunction",
"(",
"rawHandler",
")",
")",
"{",
"stores",
"=",
"args",
".",
"slice",
"(",
"0",
",",
"-",
"1",
")",
";",
"handler",
"=",
"rawHandler",
";",
"}",
"else",
"{",
"stores",
"=",
"args",
";",
"}",
"let",
"structStoreShape",
";",
"let",
"shapeReady",
";",
"if",
"(",
"stores",
".",
"length",
"===",
"1",
")",
"{",
"const",
"obj",
"=",
"stores",
"[",
"0",
"]",
";",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"obj",
")",
")",
"{",
"structStoreShape",
"=",
"obj",
";",
"shapeReady",
"=",
"true",
";",
"}",
"}",
"let",
"noArraySpread",
";",
"if",
"(",
"!",
"shapeReady",
")",
"{",
"structStoreShape",
"=",
"stores",
";",
"if",
"(",
"handler",
")",
"{",
"noArraySpread",
"=",
"true",
";",
"const",
"fn",
"=",
"handler",
";",
"handler",
"=",
"list",
"=>",
"fn",
"(",
"...",
"list",
")",
";",
"}",
"}",
"assert",
"(",
"isObject",
"(",
"structStoreShape",
")",
",",
"'shape should be an object'",
")",
";",
"return",
"storeCombination",
"(",
"Array",
".",
"isArray",
"(",
"structStoreShape",
")",
",",
"!",
"noArraySpread",
",",
"structStoreShape",
",",
"config",
",",
"handler",
")",
";",
"}",
"const",
"storeCombination",
"=",
"(",
"isArray",
",",
"needSpread",
",",
"obj",
",",
"config",
"?",
",",
"fn",
"?",
")",
"=>",
"{",
"const",
"clone",
"=",
"isArray",
"?",
"list",
"=>",
"list",
".",
"slice",
"(",
")",
":",
"obj",
"=>",
"(",
"{",
"...",
"obj",
"}",
")",
";",
"const",
"defaultState",
"=",
"isArray",
"?",
"[",
"]",
":",
"{",
"}",
";",
"const",
"stateNew",
"=",
"clone",
"(",
"defaultState",
")",
";",
"const",
"rawShape",
"=",
"createStateRef",
"(",
"stateNew",
")",
";",
"const",
"isFresh",
"=",
"createStateRef",
"(",
"true",
")",
";",
"rawShape",
".",
"type",
"=",
"isArray",
"?",
"'list'",
":",
"'shape'",
";",
"rawShape",
".",
"noInit",
"=",
"true",
";",
"applyTemplate",
"(",
"'combineBase'",
",",
"rawShape",
",",
"isFresh",
")",
";",
"const",
"store",
"=",
"createStore",
"(",
"stateNew",
",",
"{",
"name",
":",
"unitObjectName",
"(",
"obj",
")",
",",
"derived",
":",
"true",
",",
"and",
":",
"config",
",",
"}",
")",
";",
"const",
"storeStateRef",
"=",
"getStoreState",
"(",
"store",
")",
";",
"storeStateRef",
".",
"noInit",
"=",
"true",
";",
"setMeta",
"(",
"store",
",",
"'isCombine'",
",",
"true",
")",
";",
"const",
"node",
"=",
"[",
"calc",
"(",
"(",
"upd",
",",
"_",
",",
"stack",
")",
"=>",
"{",
"if",
"(",
"stack",
".",
"scope",
"&&",
"!",
"stack",
".",
"scope",
".",
"reg",
"[",
"rawShape",
".",
"id",
"]",
")",
"{",
"stack",
".",
"c",
"=",
"true",
";",
"}",
"return",
"upd",
";",
"}",
")",
",",
"read",
"(",
"rawShape",
")",
",",
"mov",
"(",
"{",
"store",
":",
"isFresh",
",",
"to",
":",
"'b'",
"}",
")",
",",
"calc",
"(",
"(",
"upd",
",",
"{",
"key",
"}",
",",
"reg",
")",
"=>",
"{",
"if",
"(",
"reg",
".",
"c",
"||",
"upd",
"!==",
"reg",
".",
"a",
"[",
"key",
"]",
")",
"{",
"if",
"(",
"needSpread",
"&&",
"reg",
".",
"b",
")",
"{",
"reg",
".",
"a",
"=",
"clone",
"(",
"reg",
".",
"a",
")",
";",
"}",
"reg",
".",
"a",
"[",
"key",
"]",
"=",
"upd",
";",
"return",
"true",
";",
"}",
"}",
",",
"true",
")",
",",
"mov",
"(",
"{",
"from",
":",
"REG_A",
",",
"target",
":",
"rawShape",
"}",
")",
",",
"mov",
"(",
"{",
"from",
":",
"VALUE",
",",
"store",
":",
"false",
",",
"target",
":",
"isFresh",
"}",
")",
",",
"mov",
"(",
"{",
"from",
":",
"VALUE",
",",
"store",
":",
"true",
",",
"target",
":",
"isFresh",
",",
"priority",
":",
"BARRIER",
",",
"batch",
":",
"true",
",",
"}",
")",
",",
"read",
"(",
"rawShape",
",",
"true",
")",
",",
"fn",
"&&",
"userFnCall",
"(",
")",
",",
"]",
";",
"forIn",
"(",
"obj",
",",
"(",
"child",
",",
"key",
")",
"=>",
"{",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"child",
")",
")",
"{",
"assert",
"(",
"!",
"is",
".",
"unit",
"(",
"child",
")",
"&&",
"!",
"isVoid",
"(",
"child",
")",
",",
"`combine expects a store in a field ${",
"key",
"}`",
")",
";",
"stateNew",
"[",
"key",
"]",
"=",
"defaultState",
"[",
"key",
"]",
"=",
"child",
";",
"return",
";",
"}",
"defaultState",
"[",
"key",
"]",
"=",
"child",
".",
"defaultState",
";",
"stateNew",
"[",
"key",
"]",
"=",
"child",
".",
"getState",
"(",
")",
";",
"const",
"linkNode",
"=",
"createLinkNode",
"(",
"child",
",",
"store",
",",
"node",
",",
"'combine'",
",",
"fn",
")",
";",
"linkNode",
".",
"scope",
".",
"key",
"=",
"key",
";",
"const",
"childRef",
"=",
"getStoreState",
"(",
"child",
")",
";",
"addRefOp",
"(",
"rawShape",
",",
"{",
"type",
":",
"'field'",
",",
"field",
":",
"key",
",",
"from",
":",
"childRef",
"}",
")",
";",
"applyTemplate",
"(",
"'combineField'",
",",
"childRef",
",",
"linkNode",
")",
";",
"}",
")",
";",
"store",
".",
"defaultShape",
"=",
"obj",
";",
"addRefOp",
"(",
"storeStateRef",
",",
"{",
"type",
":",
"MAP",
",",
"from",
":",
"rawShape",
",",
"fn",
",",
"}",
")",
";",
"if",
"(",
"!",
"readTemplate",
"(",
")",
")",
"{",
"store",
".",
"defaultState",
"=",
"fn",
"?",
"(",
"storeStateRef",
".",
"current",
"=",
"fn",
"(",
"stateNew",
")",
")",
":",
"defaultState",
";",
"}",
"return",
"store",
";",
"}",
";",
"export",
"function",
"createStoreObject",
"(",
"...",
"args",
")",
"{",
"deprecate",
"(",
"false",
",",
"'createStoreObject'",
",",
"'combine'",
")",
";",
"return",
"combine",
"(",
"...",
"args",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
8,
null,
8,
null,
null,
null,
87,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
433 | [
"export",
"function",
"createDefer",
"(",
")",
"{",
"const",
"result",
"=",
"{",
"}",
"as",
"{",
"rs",
":",
"(",
"value",
")",
"=>",
"any",
";",
"rj",
":",
"(",
"value",
")",
"=>",
"any",
";",
"req",
":",
"Promise",
"<",
"any",
">",
";",
"}",
";",
"result",
".",
"req",
"=",
"new",
"Promise",
"(",
"(",
"rs",
",",
"rj",
")",
"=>",
"{",
"result",
".",
"rs",
"=",
"rs",
";",
"result",
".",
"rj",
"=",
"rj",
";",
"}",
")",
";",
"result",
".",
"req",
".",
"catch",
"(",
"err",
"=>",
"{",
"}",
")",
";",
"return",
"result",
";",
"}"
] | [
null,
null,
6,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
434 | [
"import",
"type",
"{",
"Unit",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"Effect",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"calc",
",",
"run",
"}",
"from",
"'./step'",
";",
"import",
"{",
"getForkPage",
",",
"getGraph",
",",
"getMeta",
",",
"getParent",
",",
"setMeta",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"own",
"}",
"from",
"'./own'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"{",
"launch",
",",
"setForkPage",
",",
"forkPage",
",",
"isWatch",
",",
"Stack",
"}",
"from",
"'./kernel'",
";",
"import",
"{",
"createNamedEvent",
",",
"createStore",
",",
"createEvent",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"createDefer",
"}",
"from",
"'./defer'",
";",
"import",
"{",
"isObject",
",",
"isFunction",
"}",
"from",
"'./is'",
";",
"import",
"{",
"assert",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"EFFECT",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"add",
"}",
"from",
"'./collection'",
";",
"export",
"function",
"createEffect",
"<",
"Payload",
",",
"Done",
",",
"Fail",
"=",
"Error",
">",
"(",
"nameOrConfig",
",",
"maybeConfig",
"?",
")",
"{",
"const",
"instance",
"=",
"createEvent",
"(",
"isFunction",
"(",
"nameOrConfig",
")",
"?",
"{",
"handler",
":",
"nameOrConfig",
"}",
":",
"nameOrConfig",
",",
"maybeConfig",
")",
"as",
"unknown",
"as",
"Effect",
"<",
"Payload",
",",
"Done",
",",
"Fail",
">",
";",
"const",
"node",
"=",
"getGraph",
"(",
"instance",
")",
";",
"setMeta",
"(",
"node",
",",
"'op'",
",",
"(",
"instance",
".",
"kind",
"=",
"EFFECT",
")",
")",
";",
"instance",
".",
"use",
"=",
"(",
"fn",
")",
"=>",
"{",
"assert",
"(",
"isFunction",
"(",
"fn",
")",
",",
"'.use argument should be a function'",
")",
";",
"runner",
".",
"scope",
".",
"handler",
"=",
"fn",
";",
"return",
"instance",
";",
"}",
";",
"instance",
".",
"use",
".",
"getCurrent",
"=",
"(",
")",
"=>",
"runner",
".",
"scope",
".",
"handler",
";",
"const",
"anyway",
"=",
"(",
"instance",
".",
"finally",
"=",
"createNamedEvent",
"(",
"'finally'",
")",
")",
";",
"const",
"done",
"=",
"(",
"instance",
".",
"done",
"=",
"(",
"anyway",
"as",
"any",
")",
".",
"filterMap",
"(",
"{",
"named",
":",
"'done'",
",",
"fn",
"(",
"{",
"status",
",",
"params",
",",
"result",
"}",
")",
"{",
"if",
"(",
"status",
"===",
"'done'",
")",
"return",
"{",
"params",
",",
"result",
"}",
";",
"}",
",",
"}",
")",
")",
";",
"const",
"fail",
"=",
"(",
"instance",
".",
"fail",
"=",
"(",
"anyway",
"as",
"any",
")",
".",
"filterMap",
"(",
"{",
"named",
":",
"'fail'",
",",
"fn",
"(",
"{",
"status",
",",
"params",
",",
"error",
"}",
")",
"{",
"if",
"(",
"status",
"===",
"'fail'",
")",
"return",
"{",
"params",
",",
"error",
"}",
";",
"}",
",",
"}",
")",
")",
";",
"const",
"doneData",
"=",
"(",
"instance",
".",
"doneData",
"=",
"done",
".",
"map",
"(",
"{",
"named",
":",
"'doneData'",
",",
"fn",
":",
"(",
"{",
"result",
"}",
")",
"=>",
"result",
",",
"}",
")",
")",
";",
"const",
"failData",
"=",
"(",
"instance",
".",
"failData",
"=",
"fail",
".",
"map",
"(",
"{",
"named",
":",
"'failData'",
",",
"fn",
":",
"(",
"{",
"error",
"}",
")",
"=>",
"error",
",",
"}",
")",
")",
";",
"const",
"runner",
"=",
"createNode",
"(",
"{",
"scope",
":",
"{",
"handlerId",
":",
"getMeta",
"(",
"node",
",",
"'sid'",
")",
",",
"handler",
":",
"instance",
".",
"defaultConfig",
".",
"handler",
"||",
"(",
"(",
")",
"=>",
"assert",
"(",
"false",
",",
"`no handler used in ${",
"instance",
".",
"getType",
"(",
")",
"}`",
")",
")",
",",
"}",
",",
"node",
":",
"[",
"calc",
"(",
"(",
"upd",
",",
"scope_",
",",
"stack",
")",
"=>",
"{",
"const",
"scope",
"=",
"scope_",
"as",
"any",
";",
"let",
"handler",
"=",
"scope",
".",
"handler",
";",
"if",
"(",
"getForkPage",
"(",
"stack",
")",
")",
"{",
"const",
"handler_",
"=",
"getForkPage",
"(",
"stack",
")",
"!",
".",
"handlers",
"[",
"scope",
".",
"handlerId",
"]",
";",
"if",
"(",
"handler_",
")",
"handler",
"=",
"handler_",
";",
"}",
"upd",
".",
"handler",
"=",
"handler",
";",
"return",
"upd",
";",
"}",
",",
"false",
",",
"true",
")",
",",
"calc",
"(",
"(",
"{",
"params",
",",
"req",
",",
"handler",
",",
"args",
"=",
"[",
"params",
"]",
"}",
",",
"_",
",",
"stack",
")",
"=>",
"{",
"const",
"onResolve",
"=",
"onSettled",
"(",
"params",
",",
"req",
",",
"true",
",",
"anyway",
",",
"stack",
")",
";",
"const",
"onReject",
"=",
"onSettled",
"(",
"params",
",",
"req",
",",
"false",
",",
"anyway",
",",
"stack",
")",
";",
"const",
"[",
"ok",
",",
"result",
"]",
"=",
"runFn",
"(",
"handler",
",",
"onReject",
",",
"args",
")",
";",
"if",
"(",
"ok",
")",
"{",
"if",
"(",
"isObject",
"(",
"result",
")",
"&&",
"isFunction",
"(",
"result",
".",
"then",
")",
")",
"{",
"result",
".",
"then",
"(",
"onResolve",
",",
"onReject",
")",
";",
"}",
"else",
"{",
"onResolve",
"(",
"result",
")",
";",
"}",
"}",
"}",
",",
"false",
",",
"true",
")",
",",
"]",
",",
"meta",
":",
"{",
"op",
":",
"'fx'",
",",
"fx",
":",
"'runner'",
"}",
",",
"}",
")",
";",
"node",
".",
"scope",
".",
"runner",
"=",
"runner",
";",
"add",
"(",
"node",
".",
"seq",
",",
"calc",
"(",
"(",
"params",
",",
"{",
"runner",
"}",
",",
"stack",
")",
"=>",
"{",
"const",
"upd",
"=",
"getParent",
"(",
"stack",
")",
"?",
"{",
"params",
",",
"req",
":",
"{",
"rs",
"(",
"data",
")",
"{",
"}",
",",
"rj",
"(",
"data",
")",
"{",
"}",
"}",
"}",
":",
"params",
";",
"launch",
"(",
"{",
"target",
":",
"runner",
",",
"params",
":",
"upd",
",",
"defer",
":",
"true",
",",
"scope",
":",
"getForkPage",
"(",
"stack",
")",
",",
"}",
")",
";",
"return",
"upd",
".",
"params",
";",
"}",
",",
"false",
",",
"true",
")",
")",
";",
"instance",
".",
"create",
"=",
"(",
"params",
")",
"=>",
"{",
"const",
"req",
"=",
"createDefer",
"(",
")",
";",
"const",
"payload",
"=",
"{",
"params",
",",
"req",
"}",
";",
"if",
"(",
"forkPage",
")",
"{",
"if",
"(",
"!",
"isWatch",
")",
"{",
"const",
"savedFork",
"=",
"forkPage",
";",
"req",
".",
"req",
".",
"finally",
"(",
"(",
")",
"=>",
"{",
"setForkPage",
"(",
"savedFork",
")",
";",
"}",
")",
".",
"catch",
"(",
"(",
")",
"=>",
"{",
"}",
")",
";",
"}",
"launch",
"(",
"{",
"target",
":",
"instance",
",",
"params",
":",
"payload",
",",
"scope",
":",
"forkPage",
"}",
")",
";",
"}",
"else",
"{",
"launch",
"(",
"instance",
",",
"payload",
")",
";",
"}",
"return",
"req",
".",
"req",
";",
"}",
";",
"const",
"inFlight",
"=",
"(",
"instance",
".",
"inFlight",
"=",
"createStore",
"(",
"0",
",",
"{",
"named",
":",
"'inFlight'",
"}",
")",
".",
"on",
"(",
"instance",
",",
"x",
"=>",
"x",
"+",
"1",
")",
".",
"on",
"(",
"anyway",
",",
"x",
"=>",
"x",
"-",
"1",
")",
")",
";",
"setMeta",
"(",
"anyway",
",",
"'needFxCounter'",
",",
"'dec'",
")",
";",
"setMeta",
"(",
"instance",
",",
"'needFxCounter'",
",",
"true",
")",
";",
"const",
"pending",
"=",
"(",
"instance",
".",
"pending",
"=",
"inFlight",
".",
"map",
"(",
"{",
"fn",
":",
"amount",
"=>",
"amount",
">",
"0",
",",
"named",
":",
"'pending'",
",",
"}",
")",
")",
";",
"own",
"(",
"instance",
",",
"[",
"anyway",
",",
"done",
",",
"fail",
",",
"doneData",
",",
"failData",
",",
"pending",
",",
"inFlight",
"]",
")",
";",
"return",
"instance",
";",
"}",
"export",
"const",
"runFn",
"=",
"(",
"fn",
",",
"onReject",
",",
"args",
")",
":",
"[",
"boolean",
",",
"any",
"]",
"=>",
"{",
"try",
"{",
"return",
"[",
"true",
",",
"fn",
"(",
"...",
"args",
")",
"]",
";",
"}",
"catch",
"(",
"err",
")",
"{",
"onReject",
"(",
"err",
")",
";",
"return",
"[",
"false",
",",
"null",
"]",
";",
"}",
"}",
";",
"export",
"const",
"onSettled",
"=",
"(",
"params",
",",
"req",
",",
"ok",
",",
"anyway",
",",
"stack",
")",
"=>",
"data",
"=>",
"launch",
"(",
"{",
"target",
":",
"[",
"anyway",
",",
"sidechain",
"]",
",",
"params",
":",
"[",
"ok",
"?",
"{",
"status",
":",
"'done'",
",",
"params",
",",
"result",
":",
"data",
"}",
":",
"{",
"status",
":",
"'fail'",
",",
"params",
",",
"error",
":",
"data",
"}",
",",
"{",
"value",
":",
"data",
",",
"fn",
":",
"ok",
"?",
"req",
".",
"rs",
":",
"req",
".",
"rj",
"}",
",",
"]",
",",
"defer",
":",
"true",
",",
"page",
":",
"stack",
".",
"page",
",",
"scope",
":",
"getForkPage",
"(",
"stack",
")",
",",
"}",
")",
";",
"const",
"sidechain",
"=",
"createNode",
"(",
"{",
"node",
":",
"[",
"run",
"(",
"{",
"fn",
":",
"(",
"{",
"fn",
",",
"value",
"}",
")",
"=>",
"fn",
"(",
"value",
")",
"}",
")",
"]",
",",
"meta",
":",
"{",
"op",
":",
"'fx'",
",",
"fx",
":",
"'sidechain'",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
614,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
614,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
845,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
33,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
435 | [
"import",
"type",
"{",
"Domain",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"combine",
"}",
"from",
"'./combine'",
";",
"import",
"{",
"createEffect",
",",
"onSettled",
",",
"runFn",
"}",
"from",
"'./createEffect'",
";",
"import",
"{",
"applyParentHook",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"import",
"{",
"getGraph",
",",
"getParent",
",",
"getStoreState",
",",
"setMeta",
",",
"getCompositeName",
",",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"own",
"}",
"from",
"'./own'",
";",
"import",
"{",
"is",
"}",
"from",
"'./is'",
";",
"import",
"{",
"read",
",",
"calc",
"}",
"from",
"'./step'",
";",
"import",
"{",
"launch",
"}",
"from",
"'./kernel'",
";",
"import",
"{",
"EFFECT",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"createName",
"}",
"from",
"'./naming'",
";",
"export",
"function",
"attach",
"(",
"config",
")",
"{",
"let",
"injected",
";",
"[",
"config",
",",
"injected",
"]",
"=",
"processArgsToConfig",
"(",
"config",
",",
"true",
")",
";",
"let",
"{",
"source",
",",
"effect",
",",
"mapParams",
"}",
"=",
"config",
";",
"const",
"attached",
"=",
"createEffect",
"(",
"config",
",",
"injected",
")",
";",
"setMeta",
"(",
"attached",
",",
"'attached'",
",",
"true",
")",
";",
"const",
"{",
"runner",
"}",
"=",
"getGraph",
"(",
"attached",
")",
".",
"scope",
";",
"let",
"runnerSteps",
";",
"const",
"runnerFnStep",
"=",
"calc",
"(",
"(",
"upd",
",",
"_",
",",
"stack",
")",
"=>",
"{",
"const",
"{",
"params",
",",
"req",
",",
"handler",
"}",
"=",
"upd",
";",
"const",
"anyway",
"=",
"attached",
".",
"finally",
";",
"const",
"rj",
"=",
"onSettled",
"(",
"params",
",",
"req",
",",
"false",
",",
"anyway",
",",
"stack",
")",
";",
"const",
"sourceData",
"=",
"stack",
".",
"a",
";",
"const",
"isEffectHandler",
"=",
"is",
".",
"effect",
"(",
"handler",
")",
";",
"let",
"ok",
"=",
"true",
";",
"let",
"computedParams",
";",
"if",
"(",
"mapParams",
")",
"{",
";",
"[",
"ok",
",",
"computedParams",
"]",
"=",
"runFn",
"(",
"mapParams",
",",
"rj",
",",
"[",
"params",
",",
"sourceData",
"]",
")",
";",
"}",
"else",
"{",
"computedParams",
"=",
"source",
"&&",
"isEffectHandler",
"?",
"sourceData",
":",
"params",
";",
"}",
"if",
"(",
"ok",
")",
"{",
"if",
"(",
"isEffectHandler",
")",
"{",
"launch",
"(",
"{",
"target",
":",
"handler",
"as",
"any",
",",
"params",
":",
"{",
"params",
":",
"computedParams",
",",
"req",
":",
"{",
"rs",
":",
"onSettled",
"(",
"params",
",",
"req",
",",
"true",
",",
"anyway",
",",
"stack",
")",
",",
"rj",
"}",
",",
"}",
",",
"page",
":",
"stack",
".",
"page",
",",
"defer",
":",
"true",
",",
"}",
")",
";",
"}",
"else",
"{",
"upd",
".",
"args",
"=",
"[",
"sourceData",
",",
"computedParams",
"]",
";",
"return",
"true",
";",
"}",
"}",
"}",
",",
"true",
",",
"true",
")",
";",
"if",
"(",
"source",
")",
"{",
"let",
"state",
";",
"if",
"(",
"is",
".",
"store",
"(",
"source",
")",
")",
"{",
"state",
"=",
"source",
";",
"own",
"(",
"state",
",",
"[",
"attached",
"]",
")",
";",
"}",
"else",
"{",
"state",
"=",
"combine",
"(",
"source",
")",
";",
"own",
"(",
"attached",
",",
"[",
"state",
"]",
")",
";",
"}",
"runnerSteps",
"=",
"[",
"read",
"(",
"getStoreState",
"(",
"state",
")",
")",
",",
"runnerFnStep",
"]",
";",
"}",
"else",
"{",
"runnerSteps",
"=",
"[",
"runnerFnStep",
"]",
";",
"}",
"runner",
".",
"seq",
".",
"splice",
"(",
"1",
",",
"0",
",",
"...",
"runnerSteps",
")",
";",
"attached",
".",
"use",
"(",
"effect",
")",
";",
"const",
"parentDomain",
"=",
"getParent",
"(",
"effect",
")",
";",
"if",
"(",
"parentDomain",
")",
"{",
"Object",
".",
"assign",
"(",
"getCompositeName",
"(",
"attached",
")",
",",
"createName",
"(",
"attached",
".",
"shortName",
",",
"parentDomain",
")",
")",
";",
"attached",
".",
"defaultConfig",
".",
"parent",
"=",
"parentDomain",
";",
"}",
"applyParentHook",
"(",
"effect",
",",
"attached",
",",
"EFFECT",
")",
";",
"return",
"attached",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
614,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
614,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
20786,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
436 | [
"import",
"type",
"{",
"Store",
",",
"Event",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"createEvent",
",",
"applyParentHook",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"forIn",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"getParent",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"export",
"function",
"createApi",
"(",
"...",
"args",
")",
"{",
"let",
"[",
"[",
"store",
",",
"setters",
"]",
",",
"metadata",
"]",
"=",
"processArgsToConfig",
"(",
"args",
")",
";",
"const",
"result",
"=",
"{",
"}",
";",
"forIn",
"(",
"setters",
",",
"(",
"fn",
",",
"key",
")",
"=>",
"{",
"const",
"event",
"=",
"(",
"result",
"[",
"key",
"]",
"=",
"createEvent",
"(",
"key",
",",
"{",
"parent",
":",
"getParent",
"(",
"store",
")",
",",
"config",
":",
"metadata",
",",
"}",
")",
")",
";",
"store",
".",
"on",
"(",
"event",
",",
"fn",
")",
";",
"applyParentHook",
"(",
"store",
",",
"event",
")",
";",
"}",
")",
";",
"return",
"result",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
437 | [
"import",
"type",
"{",
"Domain",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"own",
"}",
"from",
"'./own'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"type",
"{",
"Config",
",",
"NodeUnit",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"createEvent",
",",
"createStore",
",",
"createNamedEvent",
",",
"initUnit",
",",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"createEffect",
"}",
"from",
"'./createEffect'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"import",
"{",
"add",
",",
"forEach",
",",
"forIn",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"getGraph",
",",
"getParent",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"DOMAIN",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"launch",
"}",
"from",
"'./kernel'",
";",
"import",
"{",
"calc",
"}",
"from",
"'./step'",
";",
"export",
"function",
"createDomain",
"(",
"nameOrConfig",
",",
"maybeConfig",
"?",
")",
"{",
"const",
"node",
"=",
"createNode",
"(",
"{",
"family",
":",
"{",
"type",
":",
"DOMAIN",
"}",
",",
"regional",
":",
"true",
"}",
")",
";",
"const",
"result",
"=",
"{",
"history",
":",
"{",
"}",
",",
"graphite",
":",
"node",
",",
"hooks",
":",
"{",
"}",
",",
"}",
";",
"node",
".",
"meta",
"=",
"initUnit",
"(",
"DOMAIN",
",",
"result",
",",
"nameOrConfig",
",",
"maybeConfig",
")",
";",
"forIn",
"(",
"{",
"Event",
":",
"createEvent",
",",
"Effect",
":",
"createEffect",
",",
"Store",
":",
"createStore",
",",
"Domain",
":",
"createDomain",
",",
"}",
",",
"(",
"factory",
",",
"tag",
")",
"=>",
"{",
"const",
"lowerCaseTag",
"=",
"tag",
".",
"toLowerCase",
"(",
")",
";",
"const",
"trigger",
"=",
"createNamedEvent",
"(",
"`on${",
"tag",
"}`",
")",
";",
"result",
".",
"hooks",
"[",
"lowerCaseTag",
"]",
"=",
"trigger",
";",
"const",
"acc",
"=",
"new",
"Set",
"<",
"any",
">",
"(",
")",
";",
"result",
".",
"history",
"[",
"`${",
"lowerCaseTag",
"}s`",
"]",
"=",
"acc",
";",
"trigger",
".",
"create",
"=",
"res",
"=>",
"{",
"launch",
"(",
"trigger",
",",
"res",
")",
";",
"return",
"res",
";",
"}",
";",
"add",
"(",
"getGraph",
"(",
"trigger",
")",
".",
"seq",
",",
"calc",
"(",
"(",
"upd",
",",
"_",
",",
"stack",
")",
"=>",
"{",
"stack",
".",
"scope",
"=",
"null",
";",
"return",
"upd",
";",
"}",
")",
")",
";",
"trigger",
".",
"watch",
"(",
"data",
"=>",
"{",
"own",
"(",
"result",
",",
"[",
"data",
"]",
")",
";",
"acc",
".",
"add",
"(",
"data",
")",
";",
"if",
"(",
"!",
"data",
".",
"ownerSet",
")",
"data",
".",
"ownerSet",
"=",
"acc",
";",
"if",
"(",
"!",
"getParent",
"(",
"data",
")",
")",
"data",
".",
"parent",
"=",
"result",
";",
"}",
")",
";",
"own",
"(",
"result",
",",
"[",
"trigger",
"]",
")",
";",
"result",
"[",
"`onCreate${",
"tag",
"}`",
"]",
"=",
"(",
"hook",
")",
"=>",
"{",
"forEach",
"(",
"acc",
",",
"hook",
")",
";",
"return",
"trigger",
".",
"watch",
"(",
"hook",
")",
";",
"}",
";",
"result",
"[",
"`create${",
"tag",
"}`",
"]",
"=",
"result",
"[",
"lowerCaseTag",
"]",
"=",
"(",
"nameOrConfig",
",",
"config",
"?",
")",
"=>",
"trigger",
"(",
"factory",
"(",
"nameOrConfig",
",",
"{",
"parent",
":",
"result",
",",
"or",
":",
"config",
"}",
")",
")",
";",
"}",
")",
";",
"const",
"parent",
"=",
"getParent",
"(",
"result",
")",
";",
"if",
"(",
"parent",
")",
"{",
"forIn",
"(",
"result",
".",
"hooks",
",",
"(",
"from",
",",
"key",
")",
"=>",
"createLinkNode",
"(",
"from",
",",
"parent",
".",
"hooks",
"[",
"key",
"]",
")",
")",
";",
"}",
"return",
"result",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
555,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
87,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37598,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
438 | [
"import",
"{",
"observableSymbol",
"}",
"from",
"'./observable'",
";",
"import",
"type",
"{",
"Event",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"createEvent",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"assertObject",
"}",
"from",
"'./is'",
";",
"import",
"{",
"assert",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"createSubscription",
"}",
"from",
"'./subscription'",
";",
"export",
"function",
"fromObservable",
"<",
"T",
">",
"(",
"observable",
")",
"{",
"assertObject",
"(",
"observable",
")",
";",
"const",
"observableItem",
"=",
"observableSymbol",
"in",
"observable",
"?",
"observable",
"[",
"observableSymbol",
"]",
"(",
")",
":",
"observable",
";",
"assert",
"(",
"observableItem",
".",
"subscribe",
",",
"'expect observable to have .subscribe'",
")",
";",
"const",
"event",
"=",
"createEvent",
"<",
"T",
">",
"(",
")",
";",
"const",
"disposer",
"=",
"createSubscription",
"(",
"event",
")",
";",
"observableItem",
".",
"subscribe",
"(",
"{",
"next",
":",
"event",
",",
"error",
":",
"disposer",
",",
"complete",
":",
"disposer",
",",
"}",
")",
";",
"return",
"event",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
439 | [
"import",
"type",
"{",
"Store",
",",
"Event",
",",
"Effect",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"createEvent",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"import",
"{",
"unitObjectName",
"}",
"from",
"'./naming'",
";",
"import",
"{",
"assertNodeSet",
"}",
"from",
"'./is'",
";",
"export",
"function",
"merge",
"<",
"T",
">",
"(",
"units",
",",
"config",
"?",
")",
"{",
"assertNodeSet",
"(",
"units",
",",
"'merge'",
",",
"'first argument'",
")",
";",
"const",
"result",
"=",
"createEvent",
"(",
"{",
"name",
":",
"unitObjectName",
"(",
"units",
",",
"'merge'",
")",
",",
"derived",
":",
"true",
",",
"and",
":",
"config",
",",
"}",
")",
";",
"createLinkNode",
"(",
"units",
",",
"result",
",",
"[",
"]",
",",
"'merge'",
")",
";",
"return",
"result",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
13,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
440 | [
"import",
"type",
"{",
"Cmd",
",",
"StateRef",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"CommonUnit",
",",
"DataCarrier",
"}",
"from",
"'./unit.h'",
";",
"import",
"{",
"combine",
"}",
"from",
"'./combine'",
";",
"import",
"{",
"mov",
",",
"userFnCall",
",",
"read",
",",
"calc",
"}",
"from",
"'./step'",
";",
"import",
"{",
"createStateRef",
",",
"readRef",
"}",
"from",
"'./stateRef'",
";",
"import",
"{",
"callStackAReg",
"}",
"from",
"'./caller'",
";",
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"import",
"{",
"getStoreState",
",",
"getGraph",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"assertNodeSet",
",",
"assertTarget",
",",
"is",
",",
"isObject",
",",
"isVoid",
",",
"isFunction",
",",
"}",
"from",
"'./is'",
";",
"import",
"{",
"createStore",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"createEvent",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"{",
"assert",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"forEach",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"SAMPLE",
",",
"STACK",
",",
"VALUE",
"}",
"from",
"'./tag'",
";",
"import",
"{",
"merge",
"}",
"from",
"'./merge'",
";",
"import",
"{",
"applyTemplate",
"}",
"from",
"'./template'",
";",
"import",
"{",
"own",
"}",
"from",
"'./own'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"const",
"sampleConfigFields",
"=",
"[",
"'source'",
",",
"'clock'",
",",
"'target'",
"]",
";",
"const",
"fieldErrorMessage",
"=",
"(",
"method",
",",
"field",
")",
"=>",
"method",
"+",
"`: ${",
"field",
"} should be defined`",
";",
"export",
"function",
"validateSampleConfig",
"(",
"config",
",",
"method",
")",
"{",
"let",
"atLeastOneFieldExists",
"=",
"false",
";",
"forEach",
"(",
"sampleConfigFields",
",",
"field",
"=>",
"{",
"if",
"(",
"field",
"in",
"config",
")",
"{",
"assert",
"(",
"config",
"[",
"field",
"]",
"!=",
"null",
",",
"fieldErrorMessage",
"(",
"method",
",",
"field",
")",
")",
";",
"atLeastOneFieldExists",
"=",
"true",
";",
"}",
"}",
")",
";",
"return",
"atLeastOneFieldExists",
";",
"}",
"export",
"function",
"sample",
"(",
"...",
"args",
")",
"{",
"let",
"target",
";",
"let",
"name",
";",
"let",
"[",
"[",
"source",
",",
"clock",
",",
"fn",
"]",
",",
"metadata",
"]",
"=",
"processArgsToConfig",
"(",
"args",
")",
";",
"let",
"sid",
";",
"let",
"batched",
"=",
"true",
";",
"let",
"filter",
";",
"/** config case */",
"if",
"(",
"isVoid",
"(",
"clock",
")",
"&&",
"isObject",
"(",
"source",
")",
"&&",
"validateSampleConfig",
"(",
"source",
",",
"SAMPLE",
")",
")",
"{",
"clock",
"=",
"source",
".",
"clock",
";",
"fn",
"=",
"source",
".",
"fn",
";",
"batched",
"=",
"!",
"source",
".",
"greedy",
";",
"filter",
"=",
"source",
".",
"filter",
";",
"/** optional target & name accepted only from config */",
"target",
"=",
"source",
".",
"target",
";",
"name",
"=",
"source",
".",
"name",
";",
"sid",
"=",
"source",
".",
"sid",
";",
"source",
"=",
"source",
".",
"source",
";",
"}",
"return",
"createSampling",
"(",
"SAMPLE",
",",
"clock",
",",
"source",
",",
"filter",
",",
"target",
",",
"fn",
",",
"name",
",",
"metadata",
",",
"batched",
",",
"true",
",",
"false",
",",
"sid",
")",
";",
"}",
"export",
"const",
"createSampling",
"=",
"(",
"method",
",",
"clock",
",",
"source",
",",
"filter",
",",
"target",
",",
"fn",
",",
"name",
",",
"metadata",
",",
"batched",
",",
"targetMayBeStore",
",",
"filterRequired",
",",
"sid",
"?",
")",
"=>",
"{",
"const",
"isUpward",
"=",
"!",
"!",
"target",
";",
"assert",
"(",
"!",
"isVoid",
"(",
"source",
")",
"||",
"!",
"isVoid",
"(",
"clock",
")",
",",
"fieldErrorMessage",
"(",
"method",
",",
"'either source or clock'",
")",
")",
";",
"let",
"sourceIsClock",
"=",
"false",
";",
"if",
"(",
"isVoid",
"(",
"source",
")",
")",
"{",
"sourceIsClock",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"!",
"is",
".",
"unit",
"(",
"source",
")",
")",
"{",
"source",
"=",
"combine",
"(",
"source",
")",
";",
"}",
"if",
"(",
"isVoid",
"(",
"clock",
")",
")",
"{",
"/** still undefined! */",
"clock",
"=",
"source",
";",
"}",
"else",
"{",
"assertNodeSet",
"(",
"clock",
",",
"method",
",",
"'clock'",
")",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"clock",
")",
")",
"{",
"clock",
"=",
"merge",
"(",
"clock",
"as",
"CommonUnit",
"[",
"]",
")",
";",
"}",
"}",
"if",
"(",
"sourceIsClock",
")",
"{",
"source",
"=",
"clock",
";",
"}",
"if",
"(",
"!",
"metadata",
"&&",
"!",
"name",
")",
"name",
"=",
"source",
".",
"shortName",
";",
"let",
"filterType",
"=",
"'none'",
";",
"if",
"(",
"filterRequired",
"||",
"filter",
")",
"{",
"if",
"(",
"is",
".",
"unit",
"(",
"filter",
")",
")",
"{",
"filterType",
"=",
"'unit'",
";",
"}",
"else",
"{",
"assert",
"(",
"isFunction",
"(",
"filter",
")",
",",
"'`filter` should be function or unit'",
")",
";",
"filterType",
"=",
"'fn'",
";",
"}",
"}",
"if",
"(",
"target",
")",
"{",
"assertNodeSet",
"(",
"target",
",",
"method",
",",
"'target'",
")",
";",
"assertTarget",
"(",
"method",
",",
"target",
")",
";",
"}",
"else",
"{",
"if",
"(",
"filterType",
"===",
"'none'",
"&&",
"targetMayBeStore",
"&&",
"is",
".",
"store",
"(",
"source",
")",
"&&",
"is",
".",
"store",
"(",
"clock",
")",
")",
"{",
"const",
"initialState",
"=",
"fn",
"?",
"fn",
"(",
"readRef",
"(",
"getStoreState",
"(",
"source",
")",
")",
",",
"readRef",
"(",
"getStoreState",
"(",
"clock",
")",
")",
")",
":",
"readRef",
"(",
"getStoreState",
"(",
"source",
")",
")",
";",
"target",
"=",
"createStore",
"(",
"initialState",
",",
"{",
"name",
",",
"sid",
",",
"or",
":",
"metadata",
"}",
")",
";",
"}",
"else",
"{",
"target",
"=",
"createEvent",
"(",
"{",
"name",
",",
"derived",
":",
"true",
",",
"or",
":",
"metadata",
"}",
")",
";",
"applyTemplate",
"(",
"'sampleTarget'",
",",
"getGraph",
"(",
"target",
")",
")",
";",
"}",
"}",
"const",
"clockState",
"=",
"createStateRef",
"(",
")",
";",
"let",
"filterNodes",
"=",
"[",
"]",
";",
"if",
"(",
"filterType",
"===",
"'unit'",
")",
"{",
"const",
"[",
"filterRef",
",",
"hasFilter",
"]",
"=",
"syncSourceState",
"(",
"filter",
"as",
"DataCarrier",
",",
"target",
",",
"clock",
",",
"clockState",
",",
"method",
")",
";",
"filterNodes",
"=",
"[",
"...",
"readAndFilter",
"(",
"hasFilter",
")",
",",
"...",
"readAndFilter",
"(",
"filterRef",
")",
"]",
";",
"}",
"const",
"[",
"sourceRef",
",",
"hasSource",
"]",
"=",
"syncSourceState",
"(",
"source",
",",
"target",
",",
"clock",
",",
"clockState",
",",
"method",
")",
";",
"own",
"(",
"source",
",",
"[",
"createLinkNode",
"(",
"clock",
",",
"target",
",",
"[",
"applyTemplate",
"(",
"'sampleSourceLoader'",
")",
",",
"mov",
"(",
"{",
"from",
":",
"STACK",
",",
"target",
":",
"clockState",
"}",
")",
",",
"...",
"readAndFilter",
"(",
"hasSource",
")",
",",
"read",
"(",
"sourceRef",
",",
"true",
",",
"batched",
")",
",",
"...",
"filterNodes",
",",
"read",
"(",
"clockState",
")",
",",
"filterType",
"===",
"'fn'",
"&&",
"userFnCall",
"(",
"(",
"src",
",",
"_",
",",
"{",
"a",
"}",
")",
"=>",
"filter",
"(",
"src",
",",
"a",
")",
",",
"true",
")",
",",
"fn",
"&&",
"userFnCall",
"(",
"callStackAReg",
")",
",",
"applyTemplate",
"(",
"'sampleSourceUpward'",
",",
"isUpward",
")",
",",
"]",
",",
"method",
",",
"fn",
")",
",",
"]",
")",
";",
"return",
"target",
";",
"}",
";",
"const",
"readAndFilter",
"=",
"(",
"state",
")",
"=>",
"[",
"read",
"(",
"state",
")",
",",
"calc",
"(",
"(",
"upd",
",",
"scope",
",",
"{",
"a",
"}",
")",
"=>",
"a",
",",
"true",
")",
",",
"]",
";",
"const",
"syncSourceState",
"=",
"(",
"source",
",",
"target",
",",
"clock",
",",
"clockState",
",",
"method",
")",
"=>",
"{",
"const",
"isSourceStore",
"=",
"is",
".",
"store",
"(",
"source",
")",
";",
"const",
"sourceRef",
"=",
"isSourceStore",
"?",
"getStoreState",
"(",
"source",
")",
":",
"createStateRef",
"(",
")",
";",
"const",
"hasSource",
"=",
"createStateRef",
"(",
"isSourceStore",
")",
";",
"if",
"(",
"!",
"isSourceStore",
")",
"{",
"createNode",
"(",
"{",
"parent",
":",
"source",
",",
"node",
":",
"[",
"mov",
"(",
"{",
"from",
":",
"STACK",
",",
"target",
":",
"sourceRef",
"}",
")",
",",
"mov",
"(",
"{",
"from",
":",
"VALUE",
",",
"store",
":",
"true",
",",
"target",
":",
"hasSource",
"}",
")",
",",
"]",
",",
"family",
":",
"{",
"owners",
":",
"[",
"source",
",",
"target",
",",
"clock",
"]",
",",
"links",
":",
"target",
"}",
",",
"meta",
":",
"{",
"op",
":",
"method",
"}",
",",
"regional",
":",
"true",
",",
"}",
")",
";",
"}",
"applyTemplate",
"(",
"'sampleSource'",
",",
"hasSource",
",",
"sourceRef",
",",
"clockState",
")",
";",
"return",
"[",
"sourceRef",
",",
"hasSource",
"]",
"as",
"const",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
2,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
8,
null,
8,
null,
8,
null,
2,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
4670,
null,
2,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
441 | [
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"import",
"{",
"validateSampleConfig",
",",
"createSampling",
"}",
"from",
"'./sample'",
";",
"export",
"function",
"guard",
"(",
"...",
"args",
")",
"{",
"let",
"[",
"[",
"source",
",",
"config",
"]",
",",
"metadata",
"]",
"=",
"processArgsToConfig",
"(",
"args",
")",
";",
"if",
"(",
"!",
"config",
")",
"{",
"config",
"=",
"source",
";",
"source",
"=",
"config",
".",
"source",
";",
"}",
"validateSampleConfig",
"(",
"config",
",",
"'guard'",
")",
";",
"return",
"createSampling",
"(",
"'guard'",
",",
"config",
".",
"clock",
",",
"source",
",",
"config",
".",
"filter",
",",
"config",
".",
"target",
",",
"null",
",",
"config",
".",
"name",
",",
"metadata",
",",
"!",
"config",
".",
"greedy",
",",
"false",
",",
"true",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
442 | [
"import",
"{",
"createStore",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"is",
"}",
"from",
"'./is'",
";",
"import",
"{",
"forIn",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"getParent",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"import",
"{",
"deprecate",
"}",
"from",
"'./throw'",
";",
"export",
"function",
"restore",
"(",
"obj",
",",
"defaultState",
",",
"config",
"?",
")",
"{",
"if",
"(",
"is",
".",
"store",
"(",
"obj",
")",
")",
"{",
"deprecate",
"(",
"false",
",",
"'restore($store)'",
")",
";",
"return",
"obj",
";",
"}",
"if",
"(",
"is",
".",
"event",
"(",
"obj",
")",
"||",
"is",
".",
"effect",
"(",
"obj",
")",
")",
"{",
"const",
"domain",
"=",
"getParent",
"(",
"obj",
")",
";",
"const",
"result",
"=",
"createStore",
"(",
"defaultState",
",",
"{",
"parent",
":",
"domain",
",",
"name",
":",
"obj",
".",
"shortName",
",",
"and",
":",
"config",
",",
"}",
")",
";",
"createLinkNode",
"(",
"is",
".",
"effect",
"(",
"obj",
")",
"?",
"obj",
".",
"doneData",
":",
"obj",
",",
"result",
")",
";",
"if",
"(",
"domain",
")",
"domain",
".",
"hooks",
".",
"store",
"(",
"result",
")",
";",
"return",
"result",
";",
"}",
"const",
"result",
"=",
"Array",
".",
"isArray",
"(",
"obj",
")",
"?",
"[",
"]",
":",
"{",
"}",
";",
"forIn",
"(",
"obj",
",",
"(",
"value",
",",
"key",
")",
"=>",
"(",
"result",
"[",
"key",
"]",
"=",
"is",
".",
"store",
"(",
"value",
")",
"?",
"value",
":",
"createStore",
"(",
"value",
",",
"{",
"name",
":",
"key",
"}",
")",
")",
")",
";",
"return",
"result",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
443 | [
"import",
"type",
"{",
"DataCarrier",
"}",
"from",
"'./unit.h'",
";",
"import",
"type",
"{",
"Cmd",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"is",
",",
"isFunction",
",",
"isObject",
",",
"assertTarget",
"}",
"from",
"'./is'",
";",
"import",
"{",
"add",
",",
"forIn",
",",
"includes",
"}",
"from",
"'./collection'",
";",
"import",
"{",
"addRefOp",
",",
"createStateRef",
"}",
"from",
"'./stateRef'",
";",
"import",
"{",
"createLinkNode",
"}",
"from",
"'./forward'",
";",
"import",
"{",
"processArgsToConfig",
"}",
"from",
"'./config'",
";",
"import",
"{",
"compute",
",",
"userFnCall",
",",
"calc",
",",
"read",
"}",
"from",
"'./step'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'./createNode'",
";",
"import",
"{",
"launch",
",",
"Stack",
"}",
"from",
"'./kernel'",
";",
"import",
"{",
"getStoreState",
"}",
"from",
"'./getter'",
";",
"import",
"{",
"assert",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"createEvent",
"}",
"from",
"'./createUnit'",
";",
"import",
"{",
"applyTemplate",
"}",
"from",
"'./template'",
";",
"import",
"{",
"createSampling",
"}",
"from",
"'./sample'",
";",
"const",
"launchCase",
"=",
"(",
"scopeTargets",
",",
"field",
",",
"data",
",",
"stack",
")",
"=>",
"{",
"const",
"target",
"=",
"scopeTargets",
"[",
"field",
"]",
";",
"if",
"(",
"target",
")",
"{",
"launch",
"(",
"{",
"target",
",",
"params",
":",
"Array",
".",
"isArray",
"(",
"target",
")",
"?",
"target",
".",
"map",
"(",
"(",
")",
"=>",
"data",
")",
":",
"data",
",",
"defer",
":",
"true",
",",
"stack",
",",
"}",
")",
";",
"}",
"}",
";",
"export",
"function",
"split",
"(",
"...",
"args",
")",
"{",
"const",
"METHOD",
"=",
"'split'",
";",
"let",
"targets",
";",
"let",
"clock",
";",
"let",
"[",
"[",
"source",
",",
"match",
"]",
",",
"metadata",
"]",
"=",
"processArgsToConfig",
"(",
"args",
")",
";",
"const",
"configForm",
"=",
"!",
"match",
";",
"if",
"(",
"configForm",
")",
"{",
"targets",
"=",
"source",
".",
"cases",
";",
"match",
"=",
"source",
".",
"match",
";",
"clock",
"=",
"source",
".",
"clock",
";",
"source",
"=",
"source",
".",
"source",
";",
"}",
"const",
"matchIsUnit",
"=",
"is",
".",
"store",
"(",
"match",
")",
";",
"const",
"matchIsFunction",
"=",
"!",
"is",
".",
"unit",
"(",
"match",
")",
"&&",
"isFunction",
"(",
"match",
")",
";",
"const",
"matchIsShape",
"=",
"!",
"matchIsUnit",
"&&",
"!",
"matchIsFunction",
"&&",
"isObject",
"(",
"match",
")",
";",
"if",
"(",
"!",
"targets",
"!",
")",
"targets",
"=",
"{",
"}",
";",
"if",
"(",
"!",
"configForm",
")",
"{",
"assert",
"(",
"matchIsShape",
",",
"'match should be an object'",
")",
";",
"forIn",
"(",
"match",
",",
"(",
"_",
",",
"key",
")",
"=>",
"(",
"targets",
"[",
"key",
"]",
"=",
"createEvent",
"(",
"{",
"derived",
":",
"true",
",",
"and",
":",
"metadata",
",",
"}",
")",
")",
")",
";",
"targets",
".",
"__",
"=",
"createEvent",
"(",
"{",
"derived",
":",
"true",
",",
"and",
":",
"metadata",
"}",
")",
";",
"}",
"else",
"{",
"forIn",
"(",
"targets",
",",
"(",
"target",
",",
"field",
")",
"=>",
"assertTarget",
"(",
"METHOD",
",",
"target",
",",
"`cases.${",
"field",
"}`",
")",
")",
";",
"}",
"const",
"owners",
"=",
"new",
"Set",
"(",
"(",
"[",
"]",
"as",
"DataCarrier",
"[",
"]",
")",
".",
"concat",
"(",
"source",
",",
"clock",
"||",
"[",
"]",
",",
"Object",
".",
"values",
"(",
"targets",
")",
")",
")",
";",
"const",
"caseNames",
"=",
"Object",
".",
"keys",
"(",
"matchIsUnit",
"||",
"matchIsFunction",
"?",
"targets",
":",
"match",
")",
";",
"let",
"splitterSeq",
";",
"if",
"(",
"matchIsUnit",
"||",
"matchIsFunction",
")",
"{",
"if",
"(",
"matchIsUnit",
")",
"owners",
".",
"add",
"(",
"match",
")",
";",
"splitterSeq",
"=",
"[",
"matchIsUnit",
"&&",
"read",
"(",
"getStoreState",
"(",
"match",
")",
",",
"false",
",",
"true",
")",
",",
"compute",
"(",
"{",
"safe",
":",
"matchIsUnit",
",",
"filter",
":",
"true",
",",
"pure",
":",
"!",
"matchIsUnit",
",",
"fn",
"(",
"data",
",",
"scopeTargets",
",",
"stack",
")",
"{",
"const",
"value",
"=",
"String",
"(",
"matchIsUnit",
"?",
"stack",
".",
"a",
":",
"match",
"(",
"data",
")",
")",
";",
"launchCase",
"(",
"scopeTargets",
",",
"includes",
"(",
"caseNames",
",",
"value",
")",
"?",
"value",
":",
"'__'",
",",
"data",
",",
"stack",
")",
";",
"}",
",",
"}",
")",
",",
"]",
";",
"}",
"else",
"if",
"(",
"matchIsShape",
")",
"{",
"const",
"lastValues",
"=",
"createStateRef",
"(",
"{",
"}",
")",
";",
"lastValues",
".",
"type",
"=",
"'shape'",
";",
"const",
"units",
"=",
"[",
"]",
"as",
"string",
"[",
"]",
";",
"let",
"needBarrier",
";",
"forIn",
"(",
"match",
",",
"(",
"storeOrFn",
",",
"key",
")",
"=>",
"{",
"if",
"(",
"is",
".",
"unit",
"(",
"storeOrFn",
")",
")",
"{",
"needBarrier",
"=",
"true",
";",
"add",
"(",
"units",
",",
"key",
")",
";",
"owners",
".",
"add",
"(",
"storeOrFn",
")",
";",
"const",
"updater",
"=",
"createLinkNode",
"(",
"storeOrFn",
",",
"[",
"]",
",",
"[",
"read",
"(",
"lastValues",
")",
",",
"calc",
"(",
"(",
"upd",
",",
"_",
",",
"{",
"a",
"}",
")",
"=>",
"(",
"a",
"[",
"key",
"]",
"=",
"upd",
")",
")",
"]",
")",
";",
"if",
"(",
"is",
".",
"store",
"(",
"storeOrFn",
")",
")",
"{",
"lastValues",
".",
"current",
"[",
"key",
"]",
"=",
"storeOrFn",
".",
"getState",
"(",
")",
";",
"const",
"storeRef",
"=",
"getStoreState",
"(",
"storeOrFn",
")",
";",
"addRefOp",
"(",
"lastValues",
",",
"{",
"from",
":",
"storeRef",
",",
"field",
":",
"key",
",",
"type",
":",
"'field'",
"}",
")",
";",
"applyTemplate",
"(",
"'splitMatchStore'",
",",
"storeRef",
",",
"updater",
")",
";",
"}",
"}",
"}",
")",
";",
"if",
"(",
"needBarrier",
"!",
")",
"{",
"applyTemplate",
"(",
"'splitBase'",
",",
"lastValues",
")",
";",
"}",
"splitterSeq",
"=",
"[",
"needBarrier",
"!",
"&&",
"read",
"(",
"lastValues",
",",
"false",
",",
"true",
")",
",",
"userFnCall",
"(",
"(",
"data",
",",
"scopeTargets",
",",
"stack",
")",
"=>",
"{",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"caseNames",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"caseName",
"=",
"caseNames",
"[",
"i",
"]",
";",
"const",
"caseValue",
"=",
"includes",
"(",
"units",
",",
"caseName",
")",
"?",
"stack",
".",
"a",
"[",
"caseName",
"]",
":",
"match",
"[",
"caseName",
"]",
"(",
"data",
")",
";",
"if",
"(",
"caseValue",
")",
"{",
"launchCase",
"(",
"scopeTargets",
",",
"caseName",
",",
"data",
",",
"stack",
")",
";",
"return",
";",
"}",
"}",
"launchCase",
"(",
"scopeTargets",
",",
"'__'",
",",
"data",
",",
"stack",
")",
";",
"}",
",",
"true",
")",
",",
"]",
";",
"}",
"else",
"{",
"assert",
"(",
"false",
",",
"'expect match to be unit, function or object'",
")",
";",
"}",
"const",
"splitterNode",
"=",
"createNode",
"(",
"{",
"meta",
":",
"{",
"op",
":",
"METHOD",
"}",
",",
"parent",
":",
"clock",
"?",
"[",
"]",
":",
"source",
",",
"scope",
":",
"targets",
",",
"node",
":",
"splitterSeq",
"!",
",",
"family",
":",
"{",
"owners",
":",
"Array",
".",
"from",
"(",
"owners",
")",
"}",
",",
"regional",
":",
"true",
",",
"}",
")",
";",
"if",
"(",
"clock",
")",
"{",
"createSampling",
"(",
"METHOD",
",",
"clock",
",",
"source",
",",
"null",
",",
"splitterNode",
",",
"null",
",",
"METHOD",
",",
"metadata",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"}",
"if",
"(",
"!",
"configForm",
")",
"return",
"targets",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
17,
null,
2,
null,
null,
null,
349,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
5,
null,
null,
null,
2,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
6,
null,
349,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
444 | [
"import",
"{",
"add",
"}",
"from",
"'../collection'",
";",
"import",
"{",
"createDefer",
"}",
"from",
"'../defer'",
";",
"import",
"{",
"is",
"}",
"from",
"'../is'",
";",
"import",
"{",
"launch",
",",
"forkPage",
"}",
"from",
"'../kernel'",
";",
"import",
"type",
"{",
"Scope",
"}",
"from",
"'../unit.h'",
";",
"export",
"function",
"allSettled",
"(",
"start",
",",
"{",
"scope",
",",
"params",
":",
"ctx",
"}",
")",
"{",
"if",
"(",
"!",
"is",
".",
"unit",
"(",
"start",
")",
")",
"return",
"Promise",
".",
"reject",
"(",
"Error",
"(",
"'first argument should be unit'",
")",
")",
";",
"const",
"defer",
"=",
"createDefer",
"(",
")",
";",
"defer",
".",
"parentFork",
"=",
"forkPage",
";",
"const",
"{",
"fxCount",
"}",
"=",
"scope",
";",
"add",
"(",
"fxCount",
".",
"scope",
".",
"defers",
",",
"defer",
")",
";",
"const",
"launchUnits",
"=",
"[",
"start",
"]",
";",
"const",
"launchParams",
"=",
"[",
"]",
"as",
"Array",
"<",
"{",
"params",
";",
"req",
";",
"}",
"|",
"null",
">",
";",
"add",
"(",
"launchParams",
",",
"is",
".",
"effect",
"(",
"start",
")",
"?",
"{",
"params",
":",
"ctx",
",",
"req",
":",
"{",
"rs",
"(",
"value",
")",
"{",
"defer",
".",
"value",
"=",
"{",
"status",
":",
"'done'",
",",
"value",
"}",
";",
"}",
",",
"rj",
"(",
"value",
")",
"{",
"defer",
".",
"value",
"=",
"{",
"status",
":",
"'fail'",
",",
"value",
"}",
";",
"}",
",",
"}",
",",
"}",
":",
"ctx",
")",
";",
"add",
"(",
"launchUnits",
",",
"fxCount",
")",
";",
"add",
"(",
"launchParams",
",",
"null",
")",
";",
"launch",
"(",
"{",
"target",
":",
"launchUnits",
",",
"params",
":",
"launchParams",
",",
"scope",
",",
"}",
")",
";",
"return",
"defer",
".",
"req",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
445 | [
"import",
"{",
"getMeta",
",",
"getOwners",
",",
"getLinks",
"}",
"from",
"'../getter'",
";",
"import",
"{",
"is",
"}",
"from",
"'../is'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../throw'",
";",
"import",
"type",
"{",
"Store",
"}",
"from",
"'../unit.h'",
";",
"import",
"type",
"{",
"Node",
"}",
"from",
"'../index.h'",
";",
"import",
"{",
"add",
",",
"forEach",
",",
"includes",
"}",
"from",
"'../collection'",
";",
"import",
"{",
"STORE",
"}",
"from",
"'../tag'",
";",
"export",
"function",
"traverseStores",
"(",
"root",
",",
"fn",
")",
"{",
"const",
"list",
"=",
"[",
"]",
"as",
"Node",
"[",
"]",
";",
"(",
"function",
"visit",
"(",
"node",
")",
"{",
"if",
"(",
"includes",
"(",
"list",
",",
"node",
")",
")",
"return",
";",
"add",
"(",
"list",
",",
"node",
")",
";",
"if",
"(",
"getMeta",
"(",
"node",
",",
"'op'",
")",
"===",
"STORE",
"&&",
"getMeta",
"(",
"node",
",",
"'sid'",
")",
")",
"{",
"fn",
"(",
"node",
",",
"getMeta",
"(",
"node",
",",
"'sid'",
")",
")",
";",
"}",
"forEach",
"(",
"node",
".",
"next",
",",
"visit",
")",
";",
"forEach",
"(",
"getOwners",
"(",
"node",
")",
",",
"visit",
")",
";",
"forEach",
"(",
"getLinks",
"(",
"node",
")",
",",
"visit",
")",
";",
"}",
")",
"(",
"root",
")",
";",
"}",
"export",
"function",
"normalizeValues",
"(",
"values",
",",
"assertEach",
"?",
")",
"{",
"if",
"(",
"Array",
".",
"isArray",
"(",
"values",
")",
")",
"values",
"=",
"new",
"Map",
"(",
"values",
")",
";",
"if",
"(",
"values",
"instanceof",
"Map",
")",
"{",
"const",
"result",
"=",
"{",
"}",
"as",
"Record",
"<",
"string",
",",
"any",
">",
";",
"forEach",
"(",
"values",
",",
"(",
"value",
",",
"key",
")",
"=>",
"{",
"assert",
"(",
"is",
".",
"unit",
"(",
"key",
")",
",",
"'Map key should be a unit'",
")",
";",
"if",
"(",
"assertEach",
")",
"assertEach",
"(",
"key",
",",
"value",
")",
";",
"assert",
"(",
"key",
".",
"sid",
",",
"'unit should have a sid'",
")",
";",
"assert",
"(",
"!",
"(",
"key",
".",
"sid",
"!",
"in",
"result",
")",
",",
"'duplicate sid found'",
")",
";",
"result",
"[",
"key",
".",
"sid",
"!",
"]",
"=",
"value",
";",
"}",
")",
";",
"return",
"result",
";",
"}",
"return",
"values",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
24,
null,
4,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
446 | [
"import",
"{",
"getForkPage",
",",
"getGraph",
",",
"getMeta",
",",
"getParent",
"}",
"from",
"'../getter'",
";",
"import",
"{",
"setForkPage",
",",
"getPageRef",
",",
"currentPage",
"}",
"from",
"'../kernel'",
";",
"import",
"{",
"createNode",
"}",
"from",
"'../createNode'",
";",
"import",
"{",
"calc",
",",
"compute",
"}",
"from",
"'../step'",
";",
"import",
"type",
"{",
"Domain",
",",
"Scope",
"}",
"from",
"'../unit.h'",
";",
"import",
"type",
"{",
"StateRef",
"}",
"from",
"'../index.h'",
";",
"import",
"{",
"forEach",
"}",
"from",
"'../collection'",
";",
"import",
"{",
"DOMAIN",
",",
"SAMPLER",
",",
"SCOPE",
"}",
"from",
"'../tag'",
";",
"export",
"function",
"createScope",
"(",
"unit",
"?",
")",
"{",
"const",
"forkInFlightCounter",
"=",
"createNode",
"(",
"{",
"scope",
":",
"{",
"defers",
":",
"[",
"]",
",",
"inFlight",
":",
"0",
",",
"fxID",
":",
"0",
",",
"}",
",",
"node",
":",
"[",
"calc",
"(",
"(",
"_",
",",
"scope",
",",
"stack",
")",
"=>",
"{",
"if",
"(",
"!",
"getParent",
"(",
"stack",
")",
")",
"{",
"scope",
".",
"fxID",
"+=",
"1",
";",
"return",
";",
"}",
"if",
"(",
"getMeta",
"(",
"getParent",
"(",
"stack",
")",
".",
"node",
",",
"'needFxCounter'",
")",
"===",
"'dec'",
")",
"{",
"scope",
".",
"inFlight",
"-=",
"1",
";",
"}",
"else",
"{",
"scope",
".",
"inFlight",
"+=",
"1",
";",
"scope",
".",
"fxID",
"+=",
"1",
";",
"}",
"}",
")",
",",
"compute",
"(",
"{",
"priority",
":",
"SAMPLER",
",",
"batch",
":",
"true",
"}",
")",
",",
"calc",
"(",
"(",
"_",
",",
"scope",
")",
"=>",
"{",
"const",
"{",
"defers",
",",
"fxID",
"}",
"=",
"scope",
";",
"if",
"(",
"scope",
".",
"inFlight",
">",
"0",
"||",
"defers",
".",
"length",
"===",
"0",
")",
"return",
";",
"Promise",
".",
"resolve",
"(",
")",
".",
"then",
"(",
"(",
")",
"=>",
"{",
"if",
"(",
"scope",
".",
"fxID",
"!==",
"fxID",
")",
"return",
";",
"forEach",
"(",
"defers",
".",
"splice",
"(",
"0",
",",
"defers",
".",
"length",
")",
",",
"defer",
"=>",
"{",
"setForkPage",
"(",
"defer",
".",
"parentFork",
")",
";",
"defer",
".",
"rs",
"(",
"defer",
".",
"value",
")",
";",
"}",
")",
";",
"}",
")",
";",
"}",
",",
"false",
",",
"true",
")",
",",
"]",
",",
"}",
")",
";",
"const",
"page",
"=",
"{",
"}",
"as",
"Record",
"<",
"string",
",",
"StateRef",
">",
";",
"const",
"storeChange",
"=",
"createNode",
"(",
"{",
"node",
":",
"[",
"calc",
"(",
"(",
"value",
",",
"__",
",",
"stack",
")",
"=>",
"{",
"const",
"storeStack",
"=",
"getParent",
"(",
"stack",
")",
";",
"if",
"(",
"storeStack",
"&&",
"getParent",
"(",
"storeStack",
")",
")",
"{",
"const",
"storeNode",
"=",
"storeStack",
".",
"node",
";",
"if",
"(",
"!",
"getMeta",
"(",
"storeNode",
",",
"'isCombine'",
")",
"||",
"getMeta",
"(",
"getParent",
"(",
"storeStack",
")",
".",
"node",
",",
"'op'",
")",
"!==",
"'combine'",
")",
"{",
"const",
"forkPage",
"=",
"getForkPage",
"(",
"stack",
")",
"!",
";",
"const",
"id",
"=",
"storeNode",
".",
"scope",
".",
"state",
".",
"id",
";",
"const",
"sid",
"=",
"getMeta",
"(",
"storeNode",
",",
"'sid'",
")",
";",
"forkPage",
".",
"sidIdMap",
"[",
"sid",
"]",
"=",
"id",
";",
"forkPage",
".",
"sidValuesMap",
"[",
"sid",
"]",
"=",
"value",
";",
"}",
"}",
"}",
")",
",",
"]",
",",
"}",
")",
";",
"const",
"resultScope",
"=",
"{",
"cloneOf",
":",
"unit",
",",
"reg",
":",
"page",
",",
"sidValuesMap",
":",
"{",
"}",
",",
"sidIdMap",
":",
"{",
"}",
",",
"getState",
"(",
"store",
")",
"{",
"if",
"(",
"'current'",
"in",
"store",
")",
"{",
"return",
"getPageRef",
"(",
"currentPage",
",",
"resultScope",
",",
"null",
",",
"store",
")",
".",
"current",
";",
"}",
"const",
"node",
"=",
"getGraph",
"(",
"store",
")",
";",
"return",
"getPageRef",
"(",
"currentPage",
",",
"resultScope",
",",
"node",
",",
"node",
".",
"scope",
".",
"state",
",",
"true",
")",
".",
"current",
";",
"}",
",",
"kind",
":",
"SCOPE",
",",
"graphite",
":",
"createNode",
"(",
"{",
"family",
":",
"{",
"type",
":",
"DOMAIN",
",",
"links",
":",
"[",
"forkInFlightCounter",
",",
"storeChange",
"]",
",",
"}",
",",
"meta",
":",
"{",
"unit",
":",
"'fork'",
"}",
",",
"scope",
":",
"{",
"forkInFlightCounter",
"}",
",",
"}",
")",
",",
"additionalLinks",
":",
"{",
"}",
",",
"handlers",
":",
"{",
"}",
",",
"fxCount",
":",
"forkInFlightCounter",
",",
"storeChange",
",",
"}",
";",
"return",
"resultScope",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
555,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
349,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
447 | [
"import",
"{",
"is",
"}",
"from",
"'../is'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../throw'",
";",
"import",
"type",
"{",
"Domain",
"}",
"from",
"'../unit.h'",
";",
"import",
"{",
"normalizeValues",
"}",
"from",
"'./util'",
";",
"import",
"{",
"createScope",
"}",
"from",
"'./createScope'",
";",
"export",
"function",
"fork",
"(",
"domainOrConfig",
"?",
",",
"optiionalConfig",
"?",
")",
"{",
"let",
"config",
"=",
"domainOrConfig",
"as",
"any",
";",
"let",
"domain",
";",
"if",
"(",
"is",
".",
"domain",
"(",
"domainOrConfig",
")",
")",
"{",
"domain",
"=",
"domainOrConfig",
";",
"config",
"=",
"optiionalConfig",
";",
"}",
"const",
"scope",
"=",
"createScope",
"(",
"domain",
"!",
")",
";",
"if",
"(",
"config",
")",
"{",
"if",
"(",
"config",
".",
"values",
")",
"{",
"const",
"valuesSidMap",
"=",
"normalizeValues",
"(",
"config",
".",
"values",
",",
"unit",
"=>",
"assert",
"(",
"is",
".",
"store",
"(",
"unit",
")",
",",
"'Values map can contain only stores as keys'",
")",
")",
";",
"Object",
".",
"assign",
"(",
"scope",
".",
"sidValuesMap",
",",
"valuesSidMap",
")",
";",
"}",
"if",
"(",
"config",
".",
"handlers",
")",
"{",
"scope",
".",
"handlers",
"=",
"normalizeValues",
"(",
"config",
".",
"handlers",
",",
"unit",
"=>",
"assert",
"(",
"is",
".",
"effect",
"(",
"unit",
")",
",",
"`Handlers map can contain only effects as keys`",
")",
")",
";",
"}",
"}",
"return",
"scope",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
555,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
448 | [
"import",
"{",
"is",
",",
"isObject",
"}",
"from",
"'../is'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../throw'",
";",
"import",
"{",
"launch",
"}",
"from",
"'../kernel'",
";",
"import",
"type",
"{",
"Domain",
",",
"Scope",
"}",
"from",
"'../unit.h'",
";",
"import",
"type",
"{",
"Node",
"}",
"from",
"'../index.h'",
";",
"import",
"{",
"add",
",",
"includes",
"}",
"from",
"'../collection'",
";",
"import",
"{",
"normalizeValues",
",",
"traverseStores",
"}",
"from",
"'./util'",
";",
"import",
"{",
"getGraph",
"}",
"from",
"'../getter'",
";",
"/**\n hydrate state on client\n\n const root = createDomain()\n hydrate(root, {\n values: window.__initialState__\n})\n\n */",
"export",
"function",
"hydrate",
"(",
"domain",
",",
"{",
"values",
"}",
")",
"{",
"assert",
"(",
"isObject",
"(",
"values",
")",
",",
"'values property should be an object'",
")",
";",
"const",
"normalizedValues",
"=",
"normalizeValues",
"(",
"values",
")",
";",
"const",
"valuesSidList",
"=",
"Object",
".",
"getOwnPropertyNames",
"(",
"normalizedValues",
")",
";",
"const",
"storeNodes",
"=",
"[",
"]",
";",
"const",
"storeValues",
"=",
"[",
"]",
";",
"let",
"forkPage",
";",
"let",
"traverseTarget",
";",
"let",
"needToAssign",
";",
"if",
"(",
"is",
".",
"scope",
"(",
"domain",
")",
")",
"{",
"forkPage",
"=",
"domain",
";",
"needToAssign",
"=",
"true",
";",
"assert",
"(",
"forkPage",
".",
"cloneOf",
",",
"'scope should be created from domain'",
")",
";",
"traverseTarget",
"=",
"getGraph",
"(",
"forkPage",
".",
"cloneOf",
")",
";",
"}",
"else",
"if",
"(",
"is",
".",
"domain",
"(",
"domain",
")",
")",
"{",
"traverseTarget",
"=",
"getGraph",
"(",
"domain",
")",
";",
"}",
"else",
"{",
"assert",
"(",
"false",
",",
"'first argument of hydrate should be domain or scope'",
")",
";",
"}",
"traverseStores",
"(",
"traverseTarget",
"!",
",",
"(",
"node",
",",
"sid",
")",
"=>",
"{",
"if",
"(",
"includes",
"(",
"valuesSidList",
",",
"sid",
")",
")",
"{",
"add",
"(",
"storeNodes",
",",
"node",
")",
";",
"add",
"(",
"storeValues",
",",
"normalizedValues",
"[",
"sid",
"]",
")",
";",
"}",
"}",
")",
";",
"launch",
"(",
"{",
"target",
":",
"storeNodes",
",",
"params",
":",
"storeValues",
",",
"scope",
":",
"forkPage",
"!",
",",
"}",
")",
";",
"if",
"(",
"needToAssign",
")",
"{",
"Object",
".",
"assign",
"(",
"forkPage",
"!",
".",
"sidValuesMap",
",",
"normalizedValues",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
449 | [
"import",
"{",
"createDefer",
"}",
"from",
"'../defer'",
";",
"import",
"{",
"is",
"}",
"from",
"'../is'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../throw'",
";",
"import",
"{",
"launch",
",",
"forkPage",
"}",
"from",
"'../kernel'",
";",
"import",
"type",
"{",
"Scope",
"}",
"from",
"'../unit.h'",
";",
"/** bind event to scope */",
"export",
"function",
"scopeBind",
"(",
"unit",
",",
"{",
"scope",
"}",
"=",
"{",
"}",
")",
"{",
"assert",
"(",
"scope",
"||",
"forkPage",
",",
"'scopeBind cannot be called outside of forked .watch'",
")",
";",
"const",
"savedForkPage",
"=",
"scope",
"||",
"forkPage",
"!",
";",
"return",
"is",
".",
"effect",
"(",
"unit",
")",
"?",
"params",
"=>",
"{",
"const",
"req",
"=",
"createDefer",
"(",
")",
";",
"launch",
"(",
"{",
"target",
":",
"unit",
",",
"params",
":",
"{",
"params",
",",
"req",
",",
"}",
",",
"scope",
":",
"savedForkPage",
",",
"}",
")",
";",
"return",
"req",
".",
"req",
";",
"}",
":",
"params",
"=>",
"{",
"launch",
"(",
"{",
"target",
":",
"unit",
",",
"params",
",",
"scope",
":",
"savedForkPage",
"}",
")",
";",
"return",
"params",
";",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
450 | [
"import",
"type",
"{",
"Scope",
",",
"Store",
"}",
"from",
"'../unit.h'",
";",
"import",
"{",
"forIn",
",",
"includes",
"}",
"from",
"'../collection'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../throw'",
";",
"import",
"{",
"traverseStores",
"}",
"from",
"'./util'",
";",
"import",
"{",
"getGraph",
",",
"getMeta",
"}",
"from",
"'../getter'",
";",
"/**\n serialize state on server\n */",
"export",
"function",
"serialize",
"(",
"scope",
",",
"config",
"=",
"{",
"}",
")",
"{",
"const",
"ignoredStores",
"=",
"config",
".",
"ignore",
"?",
"config",
".",
"ignore",
".",
"map",
"(",
"(",
"{",
"sid",
"}",
")",
"=>",
"sid",
")",
":",
"[",
"]",
";",
"const",
"result",
"=",
"{",
"}",
"as",
"Record",
"<",
"string",
",",
"any",
">",
";",
"forIn",
"(",
"scope",
".",
"sidValuesMap",
",",
"(",
"value",
",",
"sid",
")",
"=>",
"{",
"if",
"(",
"includes",
"(",
"ignoredStores",
",",
"sid",
")",
")",
"return",
";",
"const",
"id",
"=",
"scope",
".",
"sidIdMap",
"[",
"sid",
"]",
";",
"if",
"(",
"id",
"&&",
"id",
"in",
"scope",
".",
"reg",
")",
"{",
"result",
"[",
"sid",
"]",
"=",
"scope",
".",
"reg",
"[",
"id",
"]",
".",
"current",
";",
"}",
"else",
"{",
"result",
"[",
"sid",
"]",
"=",
"value",
";",
"}",
"}",
")",
";",
"if",
"(",
"'onlyChanges'",
"in",
"config",
"&&",
"!",
"config",
".",
"onlyChanges",
")",
"{",
"assert",
"(",
"scope",
".",
"cloneOf",
",",
"'scope should be created from domain'",
")",
";",
"traverseStores",
"(",
"getGraph",
"(",
"scope",
".",
"cloneOf",
")",
",",
"(",
"node",
",",
"sid",
")",
"=>",
"{",
"if",
"(",
"!",
"(",
"sid",
"in",
"result",
")",
"&&",
"!",
"includes",
"(",
"ignoredStores",
",",
"sid",
")",
"&&",
"!",
"getMeta",
"(",
"node",
",",
"'isCombine'",
")",
"&&",
"getMeta",
"(",
"node",
",",
"'serialize'",
")",
"!==",
"'ignore'",
")",
"result",
"[",
"sid",
"]",
"=",
"scope",
".",
"getState",
"(",
"node",
"as",
"any",
")",
";",
"}",
")",
";",
"}",
"return",
"result",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
145,
null,
6,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
451 | [
"export",
"const",
"throwError",
"=",
"(",
"message",
")",
"=>",
"{",
"throw",
"Error",
"(",
"message",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
452 | [
"import",
"{",
"Store",
",",
"clearNode",
",",
"step",
",",
"createNode",
",",
"Scope",
",",
"Node",
"}",
"from",
"'effector'",
";",
"export",
"function",
"createWatch",
"<",
"T",
">",
"(",
"store",
",",
"fn",
",",
"scope",
"?",
")",
"{",
"const",
"seq",
"=",
"[",
"step",
".",
"run",
"(",
"{",
"fn",
":",
"value",
"=>",
"fn",
"(",
"value",
")",
"}",
")",
"]",
";",
"if",
"(",
"scope",
")",
"{",
"const",
"node",
"=",
"createNode",
"(",
"{",
"node",
":",
"seq",
"}",
")",
";",
"const",
"id",
"=",
"(",
"store",
"as",
"any",
")",
".",
"graphite",
".",
"id",
";",
"const",
"scopeLinks",
"=",
"(",
"scope",
"as",
"any",
")",
".",
"additionalLinks",
";",
"const",
"links",
"=",
"scopeLinks",
"[",
"id",
"]",
"||",
"[",
"]",
";",
"scopeLinks",
"[",
"id",
"]",
"=",
"links",
";",
"links",
".",
"push",
"(",
"node",
")",
";",
"return",
"(",
")",
"=>",
"{",
"const",
"idx",
"=",
"links",
".",
"indexOf",
"(",
"node",
")",
";",
"if",
"(",
"idx",
"!==",
"-",
"1",
")",
"links",
".",
"splice",
"(",
"idx",
",",
"1",
")",
";",
"clearNode",
"(",
"node",
")",
";",
"}",
";",
"}",
"else",
"{",
"const",
"node",
"=",
"createNode",
"(",
"{",
"node",
":",
"seq",
",",
"parent",
":",
"[",
"store",
"]",
",",
"family",
":",
"{",
"owners",
":",
"store",
"}",
",",
"}",
")",
";",
"return",
"(",
")",
"=>",
"{",
"clearNode",
"(",
"node",
")",
";",
"}",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
46,
null,
null,
null,
145,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
453 | [
"export",
"function",
"withDisplayName",
"(",
"name",
",",
"Component",
")",
"{",
"Component",
".",
"displayName",
"=",
"name",
";",
"return",
"Component",
";",
"}"
] | [
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
454 | [
"import",
"{",
"Store",
",",
"is",
",",
"Scope",
"}",
"from",
"'effector'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"useIsomorphicLayoutEffect",
"}",
"from",
"'./useIsomorphicLayoutEffect'",
";",
"import",
"{",
"throwError",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"createWatch",
"}",
"from",
"'./createWatch'",
";",
"import",
"{",
"withDisplayName",
"}",
"from",
"'./withDisplayName'",
";",
"const",
"stateReader",
"=",
"<",
"T",
">",
"(",
"store",
",",
"scope",
"?",
")",
"=>",
"scope",
"?",
"scope",
".",
"getState",
"(",
"store",
")",
":",
"store",
".",
"getState",
"(",
")",
";",
"const",
"basicUpdateFilter",
"=",
"<",
"T",
">",
"(",
"upd",
",",
"oldValue",
")",
"=>",
"upd",
"!==",
"oldValue",
";",
"const",
"createNotifier",
"=",
"(",
")",
"=>",
"React",
".",
"useReducer",
"(",
"(",
"n",
",",
"action",
")",
"=>",
"n",
"+",
"1",
",",
"0",
")",
"[",
"1",
"]",
";",
"export",
"function",
"useStoreBase",
"<",
"State",
">",
"(",
"store",
",",
"scope",
"?",
")",
"{",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"store",
")",
")",
"throwError",
"(",
"'expect useStore argument to be a store'",
")",
";",
"const",
"currentValue",
"=",
"stateReader",
"(",
"store",
",",
"scope",
")",
";",
"const",
"inc",
"=",
"createNotifier",
"(",
")",
";",
"const",
"currentStore",
"=",
"React",
".",
"useRef",
"(",
"{",
"store",
",",
"value",
":",
"currentValue",
",",
"pending",
":",
"false",
",",
"}",
")",
";",
"useIsomorphicLayoutEffect",
"(",
"(",
")",
"=>",
"{",
"const",
"stop",
"=",
"createWatch",
"(",
"store",
",",
"upd",
"=>",
"{",
"const",
"ref",
"=",
"currentStore",
".",
"current",
";",
"if",
"(",
"!",
"ref",
".",
"pending",
")",
"{",
"ref",
".",
"value",
"=",
"upd",
";",
"ref",
".",
"pending",
"=",
"true",
";",
"inc",
"(",
")",
";",
"ref",
".",
"pending",
"=",
"false",
";",
"}",
"}",
",",
"scope",
")",
";",
"const",
"newValue",
"=",
"stateReader",
"(",
"store",
",",
"scope",
")",
";",
"const",
"ref",
"=",
"currentStore",
".",
"current",
";",
"if",
"(",
"ref",
".",
"store",
"===",
"store",
"&&",
"ref",
".",
"value",
"!==",
"newValue",
")",
"{",
"ref",
".",
"value",
"=",
"newValue",
";",
"ref",
".",
"pending",
"=",
"true",
";",
"inc",
"(",
")",
";",
"ref",
".",
"pending",
"=",
"false",
";",
"}",
"ref",
".",
"store",
"=",
"store",
";",
"return",
"stop",
";",
"}",
",",
"[",
"store",
",",
"scope",
"]",
")",
";",
"return",
"currentValue",
";",
"}",
"export",
"function",
"useStoreMapBase",
"<",
"State",
",",
"Result",
",",
"Keys",
"extends",
"ReadonlyArray",
"<",
"any",
">",
">",
"(",
"[",
"configOrStore",
",",
"separateFn",
"]",
",",
"scope",
"?",
")",
"{",
"let",
"fn",
";",
"let",
"updateFilter",
"=",
"basicUpdateFilter",
";",
"let",
"store",
";",
"let",
"keys",
";",
"if",
"(",
"separateFn",
")",
"{",
"fn",
"=",
"separateFn",
";",
"store",
"=",
"configOrStore",
"as",
"Store",
"<",
"State",
">",
";",
"keys",
"=",
"[",
"]",
"as",
"unknown",
"as",
"Keys",
";",
"}",
"else",
"{",
"fn",
"=",
"(",
"configOrStore",
"as",
"any",
")",
".",
"fn",
";",
"store",
"=",
"(",
"configOrStore",
"as",
"any",
")",
".",
"store",
";",
"keys",
"=",
"(",
"configOrStore",
"as",
"any",
")",
".",
"keys",
";",
"updateFilter",
"=",
"(",
"configOrStore",
"as",
"any",
")",
".",
"updateFilter",
"||",
"basicUpdateFilter",
";",
"}",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"store",
")",
")",
"throwError",
"(",
"'useStoreMap expects a store'",
")",
";",
"if",
"(",
"!",
"Array",
".",
"isArray",
"(",
"keys",
")",
")",
"throwError",
"(",
"'useStoreMap expects an array as keys'",
")",
";",
"if",
"(",
"typeof",
"fn",
"!==",
"'function'",
")",
"throwError",
"(",
"'useStoreMap expects a function'",
")",
";",
"const",
"result",
"=",
"React",
".",
"useRef",
"<",
"{",
"fn",
":",
"(",
"state",
":",
"State",
",",
"keys",
":",
"Keys",
")",
"=>",
"Result",
";",
"upd",
":",
"(",
"update",
":",
"Result",
",",
"current",
":",
"Result",
")",
"=>",
"boolean",
";",
"val",
":",
"Result",
";",
"init",
":",
"boolean",
";",
"store",
":",
"Store",
"<",
"State",
">",
";",
"active",
":",
"boolean",
";",
"}",
">",
"(",
"{",
"}",
"as",
"any",
")",
";",
"const",
"refState",
"=",
"result",
".",
"current",
";",
"refState",
".",
"fn",
"=",
"fn",
";",
"refState",
".",
"upd",
"=",
"updateFilter",
";",
"refState",
".",
"init",
"=",
"refState",
".",
"store",
"===",
"store",
";",
"refState",
".",
"store",
"=",
"store",
";",
"refState",
".",
"active",
"=",
"true",
";",
"useIsomorphicLayoutEffect",
"(",
"(",
")",
"=>",
"(",
")",
"=>",
"{",
"if",
"(",
"result",
".",
"current",
")",
"{",
"result",
".",
"current",
".",
"active",
"=",
"false",
";",
"}",
"}",
",",
"[",
"]",
")",
";",
"const",
"inc",
"=",
"createNotifier",
"(",
")",
";",
"const",
"deps",
"=",
"[",
"scope",
",",
"...",
"keys",
"]",
";",
"const",
"stop",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"{",
"updateRef",
"(",
"stateReader",
"(",
"store",
",",
"scope",
")",
",",
"keys",
",",
"result",
".",
"current",
")",
";",
"return",
"createWatch",
"(",
"store",
",",
"val",
"=>",
"updateRef",
"(",
"val",
",",
"keys",
",",
"result",
".",
"current",
",",
"inc",
")",
",",
"scope",
")",
";",
"}",
",",
"deps",
")",
";",
"useIsomorphicLayoutEffect",
"(",
"(",
")",
"=>",
"(",
")",
"=>",
"stop",
"(",
")",
",",
"deps",
")",
";",
"return",
"refState",
".",
"val",
";",
"}",
"function",
"updateRef",
"<",
"State",
",",
"Keys",
",",
"Result",
">",
"(",
"sourceValue",
",",
"keys",
",",
"refState",
",",
"inc",
"?",
")",
"{",
"const",
"newValue",
"=",
"refState",
".",
"fn",
"(",
"sourceValue",
",",
"keys",
")",
";",
"if",
"(",
"!",
"refState",
".",
"init",
")",
"{",
"refState",
".",
"val",
"=",
"newValue",
";",
"refState",
".",
"init",
"=",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"newValue",
"!==",
"undefined",
"&&",
"basicUpdateFilter",
"(",
"newValue",
",",
"refState",
".",
"val",
")",
"&&",
"refState",
".",
"upd",
"(",
"newValue",
",",
"refState",
".",
"val",
")",
")",
"{",
"refState",
".",
"val",
"=",
"newValue",
";",
"inc",
"&&",
"refState",
".",
"active",
"&&",
"inc",
"(",
")",
";",
"}",
"}",
"}",
"export",
"function",
"useListBase",
"<",
"T",
">",
"(",
"list",
",",
"renderItem",
",",
"scope",
"?",
")",
"{",
"let",
"keys",
"=",
"[",
"]",
"as",
"any",
"[",
"]",
";",
"let",
"fn",
";",
"let",
"getKey",
";",
"if",
"(",
"typeof",
"renderItem",
"===",
"'object'",
"&&",
"renderItem",
"!==",
"null",
")",
"{",
"if",
"(",
"renderItem",
".",
"keys",
")",
"keys",
"=",
"renderItem",
".",
"keys",
";",
"fn",
"=",
"renderItem",
".",
"fn",
";",
"if",
"(",
"renderItem",
".",
"getKey",
")",
"getKey",
"=",
"renderItem",
".",
"getKey",
";",
"}",
"else",
"{",
"fn",
"=",
"renderItem",
";",
"}",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"list",
")",
")",
"throwError",
"(",
"'expect useList first argument to be a store'",
")",
";",
"if",
"(",
"typeof",
"fn",
"!==",
"'function'",
")",
"throwError",
"(",
"\"expect useList's renderItem to be a function\"",
")",
";",
"if",
"(",
"!",
"Array",
".",
"isArray",
"(",
"keys",
")",
")",
"throwError",
"(",
"\"expect useList's keys to be an array\"",
")",
";",
"const",
"Item",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"{",
"const",
"Item",
"=",
"withDisplayName",
"(",
"`${",
"list",
".",
"shortName",
"||",
"'Unknown'",
"}.Item`",
",",
"(",
"props",
")",
"=>",
"{",
"const",
"{",
"index",
",",
"keys",
",",
"keyVal",
",",
"value",
"}",
"=",
"props",
";",
"const",
"isKeyed",
"=",
"!",
"!",
"fnRef",
".",
"current",
"[",
"1",
"]",
";",
"if",
"(",
"isKeyed",
")",
"{",
"return",
"fnRef",
".",
"current",
"[",
"0",
"]",
"(",
"value",
",",
"keyVal",
"as",
"any",
")",
";",
"}",
"const",
"item",
"=",
"useStoreMapBase",
"(",
"[",
"{",
"store",
":",
"list",
",",
"keys",
":",
"[",
"index",
",",
"...",
"keys",
"]",
",",
"fn",
":",
"(",
"list",
",",
"keys",
")",
"=>",
"list",
"[",
"keys",
"[",
"0",
"]",
"]",
",",
"}",
",",
"]",
",",
"scope",
")",
";",
"return",
"fnRef",
".",
"current",
"[",
"0",
"]",
"(",
"item",
",",
"index",
")",
";",
"}",
")",
";",
"return",
"React",
".",
"memo",
"(",
"Item",
")",
";",
"}",
",",
"[",
"list",
",",
"scope",
",",
"!",
"!",
"getKey",
"!",
"]",
")",
";",
"const",
"fnRef",
"=",
"React",
".",
"useRef",
"(",
"[",
"fn",
",",
"getKey",
"!",
"]",
"as",
"const",
")",
";",
"fnRef",
".",
"current",
"=",
"[",
"fn",
",",
"getKey",
"!",
"]",
";",
"const",
"keysSelfMemo",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"keys",
",",
"keys",
")",
";",
"if",
"(",
"getKey",
"!",
")",
"{",
"return",
"useStoreBase",
"(",
"list",
",",
"scope",
")",
".",
"map",
"(",
"value",
"=>",
"{",
"const",
"key",
"=",
"fnRef",
".",
"current",
"[",
"1",
"]",
"(",
"value",
")",
";",
"return",
"React",
".",
"createElement",
"(",
"Item",
",",
"{",
"keyVal",
":",
"key",
",",
"key",
",",
"keys",
":",
"keysSelfMemo",
",",
"value",
",",
"}",
")",
";",
"}",
")",
";",
"}",
"else",
"{",
"const",
"length",
"=",
"useStoreMapBase",
"(",
"[",
"{",
"store",
":",
"list",
",",
"keys",
":",
"[",
"list",
"]",
",",
"fn",
":",
"list",
"=>",
"list",
".",
"length",
",",
"}",
",",
"]",
",",
"scope",
")",
";",
"return",
"Array",
".",
"from",
"(",
"{",
"length",
"}",
",",
"(",
"_",
",",
"i",
")",
"=>",
"React",
".",
"createElement",
"(",
"Item",
",",
"{",
"index",
":",
"i",
",",
"key",
":",
"i",
",",
"keys",
":",
"keysSelfMemo",
",",
"}",
")",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
46,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
11,
null,
11,
null,
null,
null,
null,
null,
null,
null,
1812,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
38,
null,
null,
null,
null,
46,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
38,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1812,
null,
null,
null,
null,
null,
null,
35,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
38,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
38,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
123,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
455 | [
"import",
"{",
"Event",
",",
"Store",
"}",
"from",
"'effector'",
";",
"import",
"{",
"useStoreBase",
",",
"useStoreMapBase",
",",
"useListBase",
"}",
"from",
"'./apiBase'",
";",
"/**\nbind event to scope\n\nworks like React.useCallback, but for scopes\n*/",
"export",
"function",
"useEvent",
"<",
"T",
">",
"(",
"event",
")",
"{",
"return",
"event",
";",
"}",
"export",
"function",
"useStore",
"<",
"State",
">",
"(",
"store",
")",
"{",
"return",
"useStoreBase",
"(",
"store",
")",
";",
"}",
"export",
"function",
"useStoreMap",
"<",
"State",
",",
"Result",
",",
"Keys",
"extends",
"ReadonlyArray",
"<",
"any",
">",
">",
"(",
"configOrStore",
",",
"separateFn",
"?",
")",
"{",
"return",
"useStoreMapBase",
"(",
"[",
"configOrStore",
",",
"separateFn",
"]",
")",
";",
"}",
"export",
"function",
"useList",
"<",
"T",
">",
"(",
"list",
",",
"renderItem",
")",
"{",
"return",
"useListBase",
"(",
"list",
",",
"renderItem",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
38,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
123,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
456 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Store",
",",
"is",
",",
"combine",
",",
"createEvent",
"}",
"from",
"'effector'",
";",
"import",
"{",
"useStore",
"}",
"from",
"'./nossr'",
";",
"import",
"{",
"useIsomorphicLayoutEffect",
"}",
"from",
"'./useIsomorphicLayoutEffect'",
";",
"import",
"{",
"StoreView",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"withDisplayName",
"}",
"from",
"'./withDisplayName'",
";",
"import",
"{",
"throwError",
"}",
"from",
"'./throw'",
";",
"export",
"function",
"createComponent",
"<",
"Props",
",",
"State",
">",
"(",
"shape",
",",
"renderProp",
")",
"{",
"let",
"store",
";",
"if",
"(",
"is",
".",
"store",
"(",
"shape",
")",
")",
"{",
"store",
"=",
"shape",
";",
"}",
"else",
"{",
"if",
"(",
"typeof",
"shape",
"===",
"'object'",
"&&",
"shape",
"!==",
"null",
")",
"{",
"store",
"=",
"combine",
"(",
"shape",
")",
";",
"}",
"else",
"throwError",
"(",
"'shape should be a store or object with stores'",
")",
";",
"}",
"let",
"storeName",
"=",
"'Unknown'",
";",
"if",
"(",
"store",
"&&",
"store",
".",
"shortName",
")",
"{",
"storeName",
"=",
"store",
".",
"shortName",
";",
"}",
"const",
"mounted",
"=",
"createEvent",
"<",
"any",
">",
"(",
")",
";",
"const",
"unmounted",
"=",
"createEvent",
"<",
"any",
">",
"(",
")",
";",
"function",
"RenderComponent",
"(",
"props",
")",
"{",
"const",
"propsRef",
"=",
"React",
".",
"useRef",
"(",
"props",
")",
";",
"const",
"state",
"=",
"useStore",
"(",
"store",
")",
";",
"useIsomorphicLayoutEffect",
"(",
"(",
")",
"=>",
"{",
"mounted",
"(",
"{",
"props",
":",
"propsRef",
".",
"current",
",",
"state",
":",
"store",
".",
"getState",
"(",
")",
"}",
")",
";",
"return",
"(",
")",
"=>",
"{",
"unmounted",
"(",
"{",
"props",
":",
"propsRef",
".",
"current",
",",
"state",
":",
"store",
".",
"getState",
"(",
")",
"}",
")",
";",
"}",
";",
"}",
",",
"[",
"]",
")",
";",
"const",
"result",
"=",
"renderProp",
"(",
"props",
",",
"state",
")",
";",
"propsRef",
".",
"current",
"=",
"props",
";",
"return",
"result",
";",
"}",
"RenderComponent",
".",
"mounted",
"=",
"mounted",
";",
"RenderComponent",
".",
"unmounted",
"=",
"unmounted",
";",
"return",
"withDisplayName",
"(",
"`${",
"storeName",
"}.View`",
",",
"RenderComponent",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37600,
null,
null,
null,
null,
null,
null,
null,
null,
154,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
32,
null,
null,
null,
35,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
194,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
457 | [
"import",
"{",
"Store",
"}",
"from",
"'effector'",
";",
"import",
"{",
"StoreConsumer",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"createComponent",
"}",
"from",
"'./createComponent'",
";",
"export",
"function",
"createStoreConsumer",
"<",
"State",
">",
"(",
"store",
")",
"{",
"return",
"createComponent",
"(",
"store",
",",
"(",
"{",
"children",
"}",
",",
"state",
")",
"=>",
"children",
"(",
"state",
")",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
458 | [
"export",
"const",
"deprecate",
"=",
"(",
"method",
")",
"=>",
"console",
".",
"error",
"(",
"`${",
"method",
"} is deprecated`",
")",
";"
] | [
null,
null,
4,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
459 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Store",
"}",
"from",
"'effector'",
";",
"import",
"{",
"useStore",
"}",
"from",
"'./nossr'",
";",
"import",
"{",
"withDisplayName",
"}",
"from",
"'./withDisplayName'",
";",
"import",
"{",
"deprecate",
"}",
"from",
"'./deprecate'",
";",
"export",
"const",
"createContextComponent",
"=",
"<",
"Props",
",",
"State",
",",
"Context",
">",
"(",
"store",
",",
"context",
",",
"renderProp",
")",
":",
"React",
".",
"ComponentType",
"<",
"Props",
">",
"=>",
"{",
"deprecate",
"(",
"'createContextComponent'",
")",
";",
"return",
"withDisplayName",
"(",
"`${",
"store",
".",
"shortName",
"||",
"'Unknown'",
"}.ContextComponent`",
",",
"(",
"props",
")",
"=>",
"{",
"const",
"ctx",
"=",
"React",
".",
"useContext",
"(",
"context",
")",
";",
"const",
"state",
"=",
"useStore",
"(",
"store",
")",
";",
"return",
"renderProp",
"(",
"props",
",",
"state",
",",
"ctx",
")",
";",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
257,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
2998,
null,
154,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
31,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
460 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Store",
"}",
"from",
"'effector'",
";",
"import",
"{",
"useStore",
"}",
"from",
"'./nossr'",
";",
"import",
"{",
"withDisplayName",
"}",
"from",
"'./withDisplayName'",
";",
"export",
"const",
"connect",
"=",
"<",
"State",
">",
"(",
"Component",
")",
"=>",
"(",
"store",
")",
"=>",
"{",
"let",
"View",
"=",
"Component",
";",
"if",
"(",
"typeof",
"Component",
"!==",
"'function'",
")",
"{",
"View",
"=",
"store",
";",
"store",
"=",
"Component",
"as",
"any",
";",
"}",
"const",
"wrappedComponentName",
"=",
"View",
".",
"displayName",
"||",
"View",
".",
"name",
"||",
"'Unknown'",
";",
"return",
"withDisplayName",
"(",
"`Connect(${",
"wrappedComponentName",
"})`",
",",
"(",
"props",
")",
"=>",
"React",
".",
"createElement",
"(",
"View",
",",
"{",
"...",
"props",
",",
"...",
"useStore",
"(",
"store",
")",
"}",
")",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
434,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
461 | [
"import",
"type",
"{",
"ComponentType",
"}",
"from",
"'react'",
";",
"import",
"type",
"{",
"Store",
"}",
"from",
"'effector'",
";",
"import",
"{",
"connect",
"}",
"from",
"'./connect'",
";",
"import",
"{",
"deprecate",
"}",
"from",
"'./deprecate'",
";",
"export",
"const",
"createReactState",
"=",
"(",
"store",
",",
"View",
")",
"=>",
"{",
"deprecate",
"(",
"'createReactState'",
")",
";",
"return",
"connect",
"(",
"View",
")",
"(",
"store",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
257,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
462 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"createStore",
",",
"launch",
",",
"Store",
",",
"Domain",
",",
"createEvent",
"}",
"from",
"'effector'",
";",
"import",
"{",
"Gate",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"useIsomorphicLayoutEffect",
"}",
"from",
"'./useIsomorphicLayoutEffect'",
";",
"import",
"{",
"withDisplayName",
"}",
"from",
"'./withDisplayName'",
";",
"export",
"function",
"useGate",
"<",
"Props",
">",
"(",
"GateComponent",
",",
"props",
"=",
"{",
"}",
"as",
"any",
")",
"{",
"const",
"propsRef",
"=",
"React",
".",
"useRef",
"<",
"{",
"value",
":",
"any",
";",
"count",
":",
"number",
";",
"}",
">",
"(",
"{",
"value",
":",
"null",
",",
"count",
":",
"0",
",",
"}",
")",
";",
"useIsomorphicLayoutEffect",
"(",
"(",
")",
"=>",
"{",
"GateComponent",
".",
"open",
"(",
"propsRef",
".",
"current",
".",
"value",
")",
";",
"return",
"(",
")",
"=>",
"GateComponent",
".",
"close",
"(",
"propsRef",
".",
"current",
".",
"value",
")",
"as",
"any",
";",
"}",
",",
"[",
"GateComponent",
"]",
")",
";",
"if",
"(",
"!",
"shallowCompare",
"(",
"propsRef",
".",
"current",
".",
"value",
",",
"props",
")",
")",
"{",
"propsRef",
".",
"current",
".",
"value",
"=",
"props",
";",
"propsRef",
".",
"current",
".",
"count",
"+=",
"1",
";",
"}",
"useIsomorphicLayoutEffect",
"(",
"(",
")",
"=>",
"{",
"GateComponent",
".",
"set",
"(",
"propsRef",
".",
"current",
".",
"value",
")",
";",
"}",
",",
"[",
"propsRef",
".",
"current",
".",
"count",
"]",
")",
";",
"}",
"function",
"shallowCompare",
"(",
"a",
",",
"b",
")",
"{",
"if",
"(",
"a",
"===",
"b",
")",
"return",
"true",
";",
"if",
"(",
"typeof",
"a",
"===",
"'object'",
"&&",
"a",
"!==",
"null",
"&&",
"typeof",
"b",
"===",
"'object'",
"&&",
"b",
"!==",
"null",
")",
"{",
"const",
"aKeys",
"=",
"Object",
".",
"keys",
"(",
"a",
")",
";",
"const",
"bKeys",
"=",
"Object",
".",
"keys",
"(",
"b",
")",
";",
"if",
"(",
"aKeys",
".",
"length",
"!==",
"bKeys",
".",
"length",
")",
"return",
"false",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"aKeys",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"key",
"=",
"aKeys",
"[",
"i",
"]",
";",
"if",
"(",
"a",
"[",
"key",
"]",
"!==",
"b",
"[",
"key",
"]",
")",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"export",
"function",
"createGateImplementation",
"<",
"State",
">",
"(",
"{",
"name",
"=",
"'gate'",
",",
"domain",
",",
"defaultState",
",",
"hook",
":",
"useGateHook",
",",
"}",
")",
"{",
"const",
"fullName",
"=",
"`${",
"domain",
"?",
"`${",
"domain",
".",
"compositeName",
".",
"fullName",
"}/`",
":",
"''",
"}${",
"name",
"}`",
";",
"const",
"set",
"=",
"createEvent",
"<",
"State",
">",
"(",
"`${",
"fullName",
"}.set`",
")",
";",
"const",
"open",
"=",
"createEvent",
"<",
"State",
">",
"(",
"`${",
"fullName",
"}.open`",
")",
";",
"const",
"close",
"=",
"createEvent",
"<",
"State",
">",
"(",
"`${",
"fullName",
"}.close`",
")",
";",
"const",
"status",
"=",
"createStore",
"(",
"Boolean",
"(",
"false",
")",
",",
"{",
"name",
":",
"`${",
"fullName",
"}.status`",
",",
"}",
")",
".",
"on",
"(",
"open",
",",
"(",
")",
"=>",
"Boolean",
"(",
"true",
")",
")",
".",
"on",
"(",
"close",
",",
"(",
")",
"=>",
"Boolean",
"(",
"false",
")",
")",
";",
"const",
"state",
"=",
"createStore",
"(",
"defaultState",
"as",
"State",
",",
"{",
"name",
":",
"`${",
"fullName",
"}.state`",
",",
"}",
")",
".",
"on",
"(",
"set",
",",
"(",
"_",
",",
"state",
")",
"=>",
"state",
")",
".",
"reset",
"(",
"close",
")",
";",
"if",
"(",
"domain",
")",
"{",
"const",
"{",
"hooks",
"}",
"=",
"domain",
"as",
"any",
";",
"launch",
"(",
"{",
"target",
":",
"[",
"hooks",
".",
"store",
",",
"hooks",
".",
"store",
",",
"hooks",
".",
"event",
",",
"hooks",
".",
"event",
",",
"hooks",
".",
"event",
",",
"]",
"as",
"any",
",",
"params",
":",
"[",
"status",
",",
"state",
",",
"open",
",",
"close",
",",
"set",
"]",
",",
"}",
")",
";",
"}",
"function",
"GateComponent",
"(",
"props",
")",
"{",
"useGateHook",
"(",
"GateComponent",
"as",
"any",
",",
"props",
")",
";",
"return",
"null",
";",
"}",
"GateComponent",
".",
"open",
"=",
"open",
";",
"GateComponent",
".",
"close",
"=",
"close",
";",
"GateComponent",
".",
"status",
"=",
"status",
";",
"GateComponent",
".",
"state",
"=",
"state",
";",
"GateComponent",
".",
"set",
"=",
"set",
";",
"return",
"withDisplayName",
"(",
"`Gate:${",
"fullName",
"}`",
",",
"GateComponent",
")",
";",
"}",
"export",
"function",
"createGate",
"<",
"Props",
">",
"(",
"name",
"=",
"'gate'",
",",
"defaultState",
"=",
"{",
"}",
"as",
"any",
")",
"{",
"let",
"domain",
";",
"if",
"(",
"typeof",
"name",
"===",
"'object'",
"&&",
"name",
"!==",
"null",
")",
"{",
"if",
"(",
"'defaultState'",
"in",
"name",
")",
"{",
"defaultState",
"=",
"name",
".",
"defaultState",
";",
"}",
"if",
"(",
"name",
".",
"domain",
")",
"domain",
"=",
"name",
".",
"domain",
";",
"name",
"=",
"name",
".",
"name",
";",
"}",
"return",
"createGateImplementation",
"(",
"{",
"name",
",",
"domain",
",",
"defaultState",
",",
"hook",
":",
"useGate",
",",
"}",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
8716,
null,
32,
null,
null,
null,
null,
null,
null,
null,
null,
35,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8716,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
463 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Domain",
",",
"is",
",",
"Scope",
",",
"Store",
",",
"scopeBind",
"}",
"from",
"'effector'",
";",
"import",
"{",
"useStoreBase",
",",
"useStoreMapBase",
",",
"useListBase",
"}",
"from",
"'./apiBase'",
";",
"import",
"{",
"withDisplayName",
"}",
"from",
"'./withDisplayName'",
";",
"import",
"{",
"useGate",
"as",
"commonUseGate",
",",
"createGateImplementation",
"}",
"from",
"'./createGate'",
";",
"import",
"type",
"{",
"Gate",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"throwError",
"}",
"from",
"'./throw'",
";",
"import",
"{",
"deprecate",
"}",
"from",
"'./deprecate'",
";",
"const",
"ScopeContext",
"=",
"React",
".",
"createContext",
"(",
"null",
"as",
"Scope",
"|",
"null",
")",
";",
"export",
"const",
"{",
"Provider",
"}",
"=",
"ScopeContext",
";",
"function",
"getScope",
"(",
")",
"{",
"const",
"scope",
"=",
"React",
".",
"useContext",
"(",
"ScopeContext",
")",
";",
"if",
"(",
"!",
"scope",
")",
"throwError",
"(",
"'No scope found, consider adding <Provider> to app root'",
")",
";",
"return",
"scope",
"as",
"Scope",
";",
"}",
"export",
"function",
"createGate",
"<",
"Props",
">",
"(",
"config",
"=",
"{",
"}",
")",
"{",
"return",
"createGateImplementation",
"(",
"{",
"domain",
":",
"config",
".",
"domain",
",",
"name",
":",
"config",
".",
"name",
",",
"defaultState",
":",
"'defaultState'",
"in",
"config",
"?",
"config",
".",
"defaultState",
":",
"{",
"}",
",",
"hook",
":",
"useGate",
",",
"}",
")",
";",
"}",
"export",
"function",
"useGate",
"<",
"Props",
">",
"(",
"GateComponent",
",",
"props",
"=",
"{",
"}",
"as",
"any",
")",
"{",
"const",
"[",
"open",
",",
"close",
",",
"set",
"]",
"=",
"useEvent",
"(",
"[",
"GateComponent",
".",
"open",
",",
"GateComponent",
".",
"close",
",",
"GateComponent",
".",
"set",
",",
"]",
")",
";",
"const",
"ForkedGate",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"(",
"{",
"open",
",",
"close",
",",
"set",
",",
"}",
"as",
"Gate",
"<",
"Props",
">",
")",
",",
"[",
"GateComponent",
",",
"open",
"]",
")",
";",
"commonUseGate",
"(",
"ForkedGate",
",",
"props",
")",
";",
"}",
"export",
"function",
"createStoreConsumer",
"(",
"store",
")",
"{",
"return",
"(",
"props",
")",
"=>",
"{",
"const",
"state",
"=",
"useStore",
"(",
"store",
")",
";",
"return",
"props",
".",
"children",
"(",
"state",
")",
";",
"}",
";",
"}",
"export",
"const",
"createContextComponent",
"=",
"(",
"store",
",",
"context",
",",
"renderProp",
")",
"=>",
"{",
"deprecate",
"(",
"'createContextComponent'",
")",
";",
"return",
"(",
"props",
")",
"=>",
"{",
"const",
"ctx",
"=",
"React",
".",
"useContext",
"(",
"context",
")",
";",
"const",
"state",
"=",
"useStore",
"(",
"store",
")",
";",
"return",
"renderProp",
"(",
"props",
",",
"state",
",",
"ctx",
")",
";",
"}",
";",
"}",
";",
"export",
"const",
"createComponent",
"=",
"(",
"shape",
")",
"=>",
"throwError",
"(",
"'not implemented'",
")",
";",
"export",
"const",
"createReactState",
"=",
"(",
"store",
",",
"Component",
")",
"=>",
"{",
"deprecate",
"(",
"'createReactState'",
")",
";",
"return",
"connect",
"(",
"Component",
")",
"(",
"store",
")",
";",
"}",
";",
"export",
"const",
"connect",
"=",
"(",
"Component",
")",
"=>",
"(",
"store",
")",
"=>",
"{",
"let",
"View",
"=",
"Component",
";",
"if",
"(",
"typeof",
"Component",
"!==",
"'function'",
")",
"{",
"View",
"=",
"store",
";",
"store",
"=",
"Component",
"as",
"any",
";",
"}",
"const",
"wrappedComponentName",
"=",
"View",
".",
"displayName",
"||",
"View",
".",
"name",
"||",
"'Unknown'",
";",
"return",
"withDisplayName",
"(",
"`Connect(${",
"wrappedComponentName",
"})`",
",",
"(",
"props",
")",
"=>",
"React",
".",
"createElement",
"(",
"View",
",",
"{",
"...",
"props",
",",
"...",
"(",
"useStore",
"(",
"store",
")",
"as",
"any",
")",
"}",
")",
")",
";",
"}",
";",
"/** useStore wrapper for scopes */",
"export",
"function",
"useStore",
"<",
"T",
">",
"(",
"store",
")",
"{",
"return",
"useStoreBase",
"(",
"store",
",",
"getScope",
"(",
")",
")",
";",
"}",
"/** useList wrapper for scopes */",
"export",
"function",
"useList",
"(",
"store",
",",
"opts",
")",
"{",
"return",
"useListBase",
"(",
"store",
",",
"opts",
",",
"getScope",
"(",
")",
")",
";",
"}",
"/** useStoreMap wrapper for scopes */",
"export",
"function",
"useStoreMap",
"(",
"configOrStore",
",",
"separateFn",
")",
"{",
"const",
"scope",
"=",
"getScope",
"(",
")",
";",
"if",
"(",
"separateFn",
")",
"return",
"useStoreMapBase",
"(",
"[",
"configOrStore",
",",
"separateFn",
"]",
",",
"scope",
")",
";",
"return",
"useStoreMapBase",
"(",
"[",
"{",
"store",
":",
"configOrStore",
".",
"store",
",",
"keys",
":",
"configOrStore",
".",
"keys",
",",
"fn",
":",
"configOrStore",
".",
"fn",
",",
"updateFilter",
":",
"configOrStore",
".",
"updateFilter",
",",
"}",
",",
"]",
",",
"scope",
")",
";",
"}",
"/**\nbind event to scope\n\nworks like React.useCallback, but for scopes\n*/",
"export",
"function",
"useEvent",
"(",
"eventObject",
")",
"{",
"const",
"scope",
"=",
"getScope",
"(",
")",
";",
"const",
"isShape",
"=",
"!",
"is",
".",
"unit",
"(",
"eventObject",
")",
"&&",
"typeof",
"eventObject",
"===",
"'object'",
";",
"const",
"events",
"=",
"isShape",
"?",
"eventObject",
":",
"{",
"event",
":",
"eventObject",
"}",
";",
"return",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"{",
"if",
"(",
"is",
".",
"unit",
"(",
"eventObject",
")",
")",
"{",
"return",
"scopeBind",
"(",
"eventObject",
",",
"{",
"scope",
"}",
")",
";",
"}",
"const",
"shape",
"=",
"Array",
".",
"isArray",
"(",
"eventObject",
")",
"?",
"[",
"]",
":",
"(",
"{",
"}",
"as",
"any",
")",
";",
"for",
"(",
"const",
"key",
"in",
"eventObject",
")",
"{",
"shape",
"[",
"key",
"]",
"=",
"scopeBind",
"(",
"eventObject",
"[",
"key",
"]",
",",
"{",
"scope",
"}",
")",
";",
"}",
"return",
"shape",
";",
"}",
",",
"[",
"scope",
",",
"...",
"Object",
".",
"keys",
"(",
"events",
")",
",",
"...",
"Object",
".",
"values",
"(",
"events",
")",
"]",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
31,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
8716,
null,
32,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8716,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
145,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
464 | [
"import",
"{",
"Scope",
",",
"Store",
"}",
"from",
"\"effector\"",
";",
"export",
"function",
"stateReader",
"<",
"T",
">",
"(",
"store",
",",
"scope",
"?",
")",
"{",
"return",
"scope",
"?",
"scope",
".",
"getState",
"(",
"store",
")",
":",
"store",
".",
"getState",
"(",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
46,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
465 | [
"import",
"{",
"Scope",
"}",
"from",
"\"effector\"",
";",
"import",
"{",
"getCurrentInstance",
",",
"inject",
"}",
"from",
"\"vue-next\"",
";",
"export",
"function",
"getScope",
"(",
")",
"{",
"let",
"scope",
";",
"let",
"ctx",
"=",
"getCurrentInstance",
"(",
")",
";",
"let",
"scopeName",
"=",
"ctx",
"?.",
"appContext",
".",
"config",
".",
"globalProperties",
".",
"scopeName",
";",
"if",
"(",
"scopeName",
")",
"{",
"scope",
"=",
"inject",
"(",
"scopeName",
")",
";",
"}",
"return",
"{",
"scopeName",
",",
"scope",
",",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
145,
null,
null,
3739,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
466 | [
"export",
"const",
"throwError",
"=",
"(",
"message",
")",
"=>",
"{",
"throw",
"Error",
"(",
"message",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
467 | [
"import",
"{",
"is",
",",
"Store",
"}",
"from",
"\"effector\"",
";",
"import",
"{",
"onUnmounted",
",",
"readonly",
",",
"shallowRef",
"}",
"from",
"\"vue-next\"",
";",
"import",
"{",
"createWatch",
"}",
"from",
"\"./lib/create-watch\"",
";",
"import",
"{",
"stateReader",
"}",
"from",
"\"./lib/state-reader\"",
";",
"import",
"{",
"getScope",
"}",
"from",
"\"./lib/get-scope\"",
";",
"import",
"{",
"throwError",
"}",
"from",
"\"./lib/throw\"",
";",
"export",
"function",
"useStore",
"<",
"T",
">",
"(",
"store",
")",
"{",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"store",
")",
")",
"throwError",
"(",
"\"expect useStore argument to be a store\"",
")",
";",
"let",
"{",
"scope",
"}",
"=",
"getScope",
"(",
")",
";",
"let",
"state",
"=",
"stateReader",
"(",
"store",
",",
"scope",
")",
";",
"let",
"_",
"=",
"shallowRef",
"(",
"state",
")",
";",
"let",
"stop",
"=",
"createWatch",
"(",
"store",
",",
"(",
"value",
")",
"=>",
"{",
"_",
".",
"value",
"=",
"shallowRef",
"(",
"value",
")",
".",
"value",
";",
"}",
",",
"scope",
")",
";",
"onUnmounted",
"(",
"(",
")",
"=>",
"{",
"stop",
"(",
")",
";",
"}",
")",
";",
"return",
"readonly",
"(",
"_",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
133,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
18790,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
468 | [
"import",
"{",
"isReactive",
",",
"toRaw",
",",
"unref",
"}",
"from",
"'vue-next'",
";",
"export",
"function",
"unwrapProxy",
"<",
"T",
">",
"(",
"payload",
")",
"{",
"const",
"data",
"=",
"unref",
"(",
"payload",
")",
";",
"const",
"raw",
"=",
"isReactive",
"(",
"data",
")",
"?",
"toRaw",
"(",
"data",
")",
":",
"data",
";",
"return",
"raw",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
11,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
469 | [
"function",
"find",
"(",
"list",
",",
"f",
")",
"{",
"return",
"list",
".",
"filter",
"(",
"f",
")",
"[",
"0",
"]",
";",
"}",
"export",
"function",
"deepCopy",
"<",
"T",
">",
"(",
"obj",
",",
"cache",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"obj",
"===",
"null",
"||",
"typeof",
"obj",
"!==",
"'object'",
")",
"{",
"return",
"obj",
";",
"}",
"const",
"hit",
"=",
"find",
"(",
"cache",
",",
"c",
"=>",
"c",
".",
"original",
"===",
"obj",
")",
";",
"if",
"(",
"hit",
")",
"{",
"return",
"hit",
".",
"copy",
";",
"}",
"const",
"copy",
"=",
"Array",
".",
"isArray",
"(",
"obj",
")",
"?",
"[",
"]",
":",
"{",
"}",
";",
"cache",
".",
"push",
"(",
"{",
"original",
":",
"obj",
",",
"copy",
",",
"}",
")",
";",
"Object",
".",
"keys",
"(",
"obj",
")",
".",
"forEach",
"(",
"key",
"=>",
"{",
"copy",
"[",
"key",
"]",
"=",
"deepCopy",
"(",
"obj",
"[",
"key",
"]",
",",
"cache",
")",
";",
"}",
")",
";",
"return",
"copy",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
470 | [
"import",
"{",
"Store",
",",
"is",
"}",
"from",
"\"effector\"",
";",
"import",
"{",
"onUnmounted",
",",
"ref",
",",
"watch",
"}",
"from",
"\"vue-next\"",
";",
"import",
"{",
"unwrapProxy",
"}",
"from",
"\"./lib/unwrapProxy\"",
";",
"import",
"{",
"deepCopy",
"}",
"from",
"\"./lib/deepCopy\"",
";",
"import",
"{",
"stateReader",
"}",
"from",
"\"./lib/state-reader\"",
";",
"import",
"{",
"createWatch",
"}",
"from",
"\"./lib/create-watch\"",
";",
"import",
"{",
"getScope",
"}",
"from",
"\"./lib/get-scope\"",
";",
"export",
"function",
"useVModel",
"<",
"T",
">",
"(",
"store",
")",
"{",
"if",
"(",
"!",
"is",
".",
"store",
"(",
"store",
")",
")",
"throw",
"Error",
"(",
"\"expect useVModel argument to be a store\"",
")",
";",
"let",
"{",
"scope",
"}",
"=",
"getScope",
"(",
")",
";",
"let",
"_",
"=",
"ref",
"(",
"deepCopy",
"(",
"stateReader",
"(",
"store",
",",
"scope",
")",
")",
")",
";",
"let",
"isSelfUpdate",
"=",
"false",
";",
"let",
"fromEvent",
"=",
"false",
";",
"let",
"stop",
"=",
"createWatch",
"(",
"store",
",",
"(",
"payload",
")",
"=>",
"{",
"if",
"(",
"isSelfUpdate",
")",
"{",
"return",
";",
"}",
"fromEvent",
"=",
"true",
";",
"_",
".",
"value",
"=",
"ref",
"(",
"deepCopy",
"(",
"payload",
")",
")",
".",
"value",
";",
"}",
",",
"scope",
")",
";",
"onUnmounted",
"(",
"(",
")",
"=>",
"{",
"stop",
"(",
")",
";",
"}",
")",
";",
"watch",
"(",
"(",
")",
"=>",
"_",
".",
"value",
",",
"(",
"value",
")",
"=>",
"{",
"isSelfUpdate",
"=",
"true",
";",
"if",
"(",
"!",
"fromEvent",
")",
"{",
"let",
"raw",
"=",
"ref",
"(",
"unwrapProxy",
"(",
"value",
")",
")",
".",
"value",
";",
"store",
".",
"setState",
"(",
"deepCopy",
"(",
"raw",
")",
")",
";",
"}",
"fromEvent",
"=",
"false",
";",
"isSelfUpdate",
"=",
"false",
";",
"}",
",",
"{",
"deep",
":",
"true",
",",
"immediate",
":",
"false",
"}",
")",
";",
"return",
"_",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
8,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
471 | [
"import",
"{",
"computed",
",",
"ComputedRef",
",",
"onMounted",
",",
"onUnmounted",
",",
"watch",
",",
"WatchStopHandle",
"}",
"from",
"'vue-next'",
";",
"import",
"{",
"createApi",
",",
"launch",
",",
"createStore",
"}",
"from",
"'effector'",
";",
"import",
"{",
"Gate",
",",
"GateConfig",
"}",
"from",
"'./composition.h'",
";",
"import",
"{",
"deepCopy",
"}",
"from",
"'./lib/deepCopy'",
";",
"import",
"{",
"unwrapProxy",
"}",
"from",
"'./lib/unwrapProxy'",
";",
"export",
"function",
"useGate",
"<",
"Props",
">",
"(",
"GateComponent",
",",
"cb",
"?",
")",
"{",
"let",
"unwatch",
";",
"let",
"_",
";",
"if",
"(",
"cb",
")",
"{",
"_",
"=",
"computed",
"(",
"cb",
")",
";",
"unwatch",
"=",
"watch",
"(",
"_",
",",
"(",
"value",
")",
"=>",
"{",
"const",
"raw",
"=",
"unwrapProxy",
"(",
"value",
")",
";",
"GateComponent",
".",
"set",
"(",
"deepCopy",
"(",
"raw",
")",
")",
";",
"}",
",",
"{",
"deep",
":",
"true",
",",
"immediate",
":",
"true",
",",
"}",
")",
";",
"}",
"onMounted",
"(",
"(",
")",
"=>",
"{",
"const",
"raw",
"=",
"unwrapProxy",
"(",
"_",
")",
";",
"GateComponent",
".",
"open",
"(",
"deepCopy",
"(",
"raw",
")",
")",
";",
"}",
")",
";",
"onUnmounted",
"(",
"(",
")",
"=>",
"{",
"const",
"raw",
"=",
"unwrapProxy",
"(",
"_",
")",
";",
"GateComponent",
".",
"close",
"(",
"deepCopy",
"(",
"raw",
")",
")",
";",
"if",
"(",
"unwatch",
")",
"{",
"unwatch",
"(",
")",
";",
"}",
"}",
")",
";",
"}",
"export",
"function",
"createGate",
"<",
"Props",
">",
"(",
"config",
"?",
")",
"{",
"const",
"state",
"=",
"createStore",
"(",
"config",
"?.",
"defaultState",
"??",
"null",
",",
"{",
"named",
":",
"'state'",
"}",
")",
";",
"const",
"status",
"=",
"createStore",
"(",
"Boolean",
"(",
"false",
")",
",",
"{",
"named",
":",
"'status'",
"}",
")",
";",
"const",
"{",
"set",
"}",
"=",
"createApi",
"(",
"state",
",",
"{",
"set",
":",
"(",
"_",
",",
"state",
")",
"=>",
"state",
",",
"}",
")",
";",
"const",
"{",
"open",
",",
"close",
"}",
"=",
"createApi",
"(",
"status",
",",
"{",
"open",
":",
"(",
")",
"=>",
"Boolean",
"(",
"true",
")",
",",
"close",
":",
"(",
")",
"=>",
"Boolean",
"(",
"false",
")",
",",
"}",
")",
";",
"function",
"GateComponent",
"(",
"props",
")",
"{",
"useGate",
"(",
"GateComponent",
"as",
"any",
",",
"(",
")",
"=>",
"props",
")",
";",
"}",
"GateComponent",
".",
"open",
"=",
"open",
";",
"GateComponent",
".",
"close",
"=",
"close",
";",
"GateComponent",
".",
"status",
"=",
"status",
";",
"GateComponent",
".",
"state",
"=",
"state",
";",
"GateComponent",
".",
"set",
"=",
"set",
";",
"state",
".",
"reset",
"(",
"close",
")",
";",
"if",
"(",
"config",
"?.",
"domain",
")",
"{",
"const",
"{",
"hooks",
"}",
"=",
"config",
".",
"domain",
";",
"launch",
"(",
"{",
"target",
":",
"[",
"hooks",
".",
"store",
",",
"hooks",
".",
"store",
",",
"hooks",
".",
"event",
",",
"hooks",
".",
"event",
",",
"hooks",
".",
"event",
",",
"]",
"as",
"any",
",",
"params",
":",
"[",
"status",
",",
"state",
",",
"open",
",",
"close",
",",
"set",
"]",
",",
"}",
")",
";",
"}",
"return",
"GateComponent",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
8716,
null,
32,
null,
null,
null,
null,
9940,
null,
null,
469,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
32,
null,
null,
null,
null,
32,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
469,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
469,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8716,
null,
null,
null,
null,
0,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
32,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
32,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
472 | [
"import",
"Vue",
",",
"{",
"VueConstructor",
",",
"ComponentOptions",
"}",
"from",
"'vue'",
";",
"import",
"{",
"createEvent",
",",
"restore",
",",
"is",
",",
"combine",
",",
"Store",
",",
"withRegion",
",",
"clearNode",
",",
"forward",
",",
"Unit",
"}",
"from",
"'effector'",
";",
"export",
"interface",
"EffectorVue",
"extends",
"Vue",
"{",
"$watchAsStore",
":",
"typeof",
"watchAsStore",
";",
"$store",
":",
"typeof",
"store",
";",
"}",
"export",
"const",
"VueEffector",
"=",
"(",
"vue",
",",
"options",
")",
"=>",
"{",
"vue",
".",
"mixin",
"(",
"effectorMixin",
")",
";",
"vue",
".",
"prototype",
".",
"$watchAsStore",
"=",
"watchAsStore",
";",
"vue",
".",
"prototype",
".",
"$store",
"=",
"store",
";",
"}",
";",
"const",
"effectorMixin",
"=",
"{",
"beforeCreate",
"(",
")",
"{",
"let",
"shape",
"=",
"this",
".",
"$options",
".",
"effector",
";",
"if",
"(",
"typeof",
"shape",
"===",
"\"function\"",
")",
"{",
"shape",
"=",
"shape",
".",
"call",
"(",
"this",
")",
";",
"}",
"if",
"(",
"!",
"shape",
")",
"return",
";",
"if",
"(",
"!",
"this",
".",
"$options",
".",
"computed",
")",
"this",
".",
"$options",
".",
"computed",
"=",
"{",
"}",
";",
"let",
"obj",
"=",
"{",
"}",
";",
"if",
"(",
"is",
".",
"store",
"(",
"shape",
")",
")",
"{",
"obj",
"=",
"{",
"state",
":",
"shape",
"}",
";",
"}",
"else",
"if",
"(",
"typeof",
"shape",
"===",
"'object'",
")",
"{",
"obj",
"=",
"{",
"...",
"shape",
"}",
";",
"}",
"else",
"{",
"throw",
"Error",
"(",
"'property should be Store'",
")",
";",
"}",
"this",
".",
"__clear",
"=",
"createEvent",
"(",
")",
";",
"withRegion",
"(",
"this",
".",
"__clear",
",",
"(",
")",
"=>",
"{",
"const",
"state",
"=",
"{",
"}",
";",
"let",
"nextID",
"=",
"0",
";",
"for",
"(",
"const",
"key",
"in",
"obj",
")",
"{",
"const",
"v",
"=",
"obj",
"[",
"key",
"]",
";",
"if",
"(",
"is",
".",
"store",
"(",
"v",
")",
")",
"{",
"state",
"[",
"key",
"]",
"=",
"v",
";",
"}",
"else",
"if",
"(",
"is",
".",
"event",
"(",
"v",
")",
"||",
"is",
".",
"effect",
"(",
"v",
")",
")",
"{",
"state",
"[",
"key",
"]",
"=",
"restore",
"(",
"v",
".",
"map",
"(",
"(",
")",
"=>",
"++",
"nextID",
")",
",",
"null",
")",
";",
"}",
"else",
"{",
"throw",
"Error",
"(",
"`Effector property ${",
"key",
"} should be Store or Unit (will be transform to Store<number>)`",
")",
";",
"}",
"}",
"const",
"store",
"=",
"combine",
"(",
"state",
")",
";",
"for",
"(",
"const",
"key",
"in",
"store",
".",
"defaultState",
")",
"{",
"Vue",
".",
"util",
".",
"defineReactive",
"(",
"this",
",",
"key",
",",
"store",
".",
"defaultState",
"[",
"key",
"]",
")",
";",
"}",
"store",
".",
"watch",
"(",
"value",
"=>",
"{",
"for",
"(",
"const",
"key",
"in",
"value",
")",
"{",
"this",
"[",
"key",
"]",
"=",
"value",
"[",
"key",
"]",
";",
"}",
"}",
")",
";",
"for",
"(",
"const",
"key",
"in",
"state",
")",
"{",
"const",
"updated",
"=",
"createEvent",
"(",
")",
";",
"forward",
"(",
"{",
"from",
":",
"updated",
",",
"to",
":",
"state",
"[",
"key",
"]",
"}",
")",
";",
"this",
".",
"$options",
".",
"computed",
"[",
"key",
"]",
"=",
"{",
"get",
":",
"(",
")",
"=>",
"this",
"[",
"key",
"]",
",",
"set",
":",
"updated",
"}",
";",
"}",
"}",
")",
";",
"}",
",",
"beforeDestroy",
"(",
")",
"{",
"if",
"(",
"this",
".",
"__clear",
")",
"{",
"clearNode",
"(",
"this",
".",
"__clear",
")",
";",
"}",
"}",
"}",
";",
"export",
"function",
"createComponent",
"<",
"S",
">",
"(",
"options",
",",
"store",
"?",
")",
"{",
"return",
"Vue",
".",
"extend",
"(",
"Object",
".",
"assign",
"(",
"{",
"}",
",",
"options",
",",
"store",
"&&",
"{",
"effector",
":",
"(",
")",
"=>",
"store",
"}",
")",
")",
";",
"}",
"function",
"watchAsStore",
"(",
"this",
",",
"expOrFn",
",",
"options",
"=",
"{",
"immediate",
":",
"true",
",",
"}",
")",
"{",
"const",
"update",
"=",
"createEvent",
"<",
"{",
"oldValue",
":",
"any",
";",
"newValue",
":",
"any",
";",
"}",
">",
"(",
")",
";",
"const",
"store",
"=",
"restore",
"(",
"update",
",",
"{",
"}",
"as",
"any",
")",
";",
"const",
"watch",
"=",
"(",
")",
"=>",
"{",
"this",
".",
"$watch",
"(",
"expOrFn",
",",
"(",
"newValue",
",",
"oldValue",
")",
"=>",
"{",
"update",
"(",
"{",
"oldValue",
",",
"newValue",
"}",
")",
";",
"}",
",",
"options",
")",
";",
"}",
";",
"if",
"(",
"this",
".",
"_data",
")",
"{",
"watch",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"$once",
"(",
"'hook:created'",
",",
"watch",
")",
";",
"}",
"return",
"store",
";",
"}",
"function",
"store",
"<",
"State",
">",
"(",
"this",
",",
"expOrFn",
")",
"{",
"return",
"this",
".",
"$watchAsStore",
"(",
"expOrFn",
")",
".",
"map",
"(",
"(",
"{",
"newValue",
"}",
")",
"=>",
"newValue",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
1954,
null,
60,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2756,
null,
null,
4,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
545,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1965,
null,
null,
null,
null,
null,
null,
208,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
0,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
473 | [
"import",
"{",
"Scope",
"}",
"from",
"\"effector\"",
";",
"import",
"{",
"Plugin",
"}",
"from",
"\"vue-next\"",
";",
"export",
"function",
"VueSSRPlugin",
"(",
"options",
")",
"{",
"return",
"{",
"install",
"(",
"app",
")",
"{",
"let",
"scopeName",
"=",
"options",
".",
"scopeName",
"??",
"\"root\"",
";",
"app",
".",
"config",
".",
"globalProperties",
".",
"scopeName",
"=",
"scopeName",
";",
"app",
".",
"provide",
"(",
"app",
".",
"config",
".",
"globalProperties",
".",
"scopeName",
",",
"options",
".",
"scope",
")",
";",
"}",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
283,
null,
6,
null,
null,
null,
null,
4,
null,
189,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
474 | [
"import",
"{",
"Event",
",",
"scopeBind",
"}",
"from",
"\"effector\"",
";",
"import",
"{",
"getScope",
"}",
"from",
"\"../lib/get-scope\"",
";",
"export",
"function",
"useEvent",
"<",
"T",
">",
"(",
"event",
")",
"{",
"let",
"{",
"scope",
"}",
"=",
"getScope",
"(",
")",
";",
"if",
"(",
"scope",
")",
"{",
"return",
"scopeBind",
"(",
"event",
",",
"{",
"scope",
"}",
")",
";",
"}",
"return",
"event",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
475 | [
"export",
"const",
"USE_PERF",
"=",
"true",
";",
"export",
"const",
"TASK_DEADLINE",
"=",
"1000",
";"
] | [
null,
null,
8,
null,
null,
null,
null,
null,
3,
null,
null,
null
] |
476 | [
"export",
"let",
"now",
";",
"if",
"(",
"typeof",
"performance",
"!==",
"'undefined'",
"&&",
"performance",
".",
"now",
")",
"{",
"now",
"=",
"(",
")",
"=>",
"performance",
".",
"now",
"(",
")",
";",
"}",
"else",
"if",
"(",
"typeof",
"process",
"!==",
"'undefined'",
"&&",
"process",
".",
"hrtime",
")",
"{",
"now",
"=",
"(",
")",
"=>",
"{",
"const",
"hr",
"=",
"process",
".",
"hrtime",
"(",
")",
";",
"return",
"(",
"hr",
"[",
"0",
"]",
"*",
"1e9",
"+",
"hr",
"[",
"1",
"]",
")",
"/",
"1e6",
";",
"}",
";",
"}",
"else",
"{",
"now",
"=",
"(",
")",
"=>",
"Date",
".",
"now",
"(",
")",
";",
"}"
] | [
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
477 | [
"import",
"{",
"USE_PERF",
"}",
"from",
"'./env'",
";",
"import",
"{",
"now",
"}",
"from",
"'./now'",
";",
"type",
"Bucket",
"=",
"{",
"calls",
":",
"number",
";",
"time",
":",
"number",
";",
"label",
":",
"string",
";",
"childTime",
":",
"number",
";",
"}",
";",
"export",
"const",
"measures",
"=",
"new",
"Map",
"<",
"string",
",",
"Bucket",
">",
"(",
")",
";",
"const",
"bucketStack",
"=",
"[",
"]",
";",
"const",
"startMeasure",
"=",
"(",
"label",
")",
"=>",
"{",
"let",
"bucket",
"=",
"measures",
".",
"get",
"(",
"label",
")",
";",
"if",
"(",
"!",
"bucket",
")",
"{",
"bucket",
"=",
"{",
"calls",
":",
"0",
",",
"time",
":",
"0",
",",
"label",
",",
"childTime",
":",
"0",
",",
"}",
";",
"measures",
".",
"set",
"(",
"label",
",",
"bucket",
")",
";",
"}",
"bucket",
".",
"calls",
"+=",
"1",
";",
"bucketStack",
".",
"push",
"(",
"{",
"bucket",
",",
"pendingStart",
":",
"now",
"(",
")",
"}",
")",
";",
"}",
";",
"const",
"endMeasure",
"=",
"(",
"label",
")",
"=>",
"{",
"const",
"bucket",
"=",
"measures",
".",
"get",
"(",
"label",
")",
"!",
";",
"const",
"pendingStart",
"=",
"bucketStack",
".",
"pop",
"(",
")",
"!",
".",
"pendingStart",
";",
"const",
"time",
"=",
"now",
"(",
")",
"-",
"pendingStart",
";",
"bucket",
".",
"time",
"+=",
"time",
";",
"if",
"(",
"bucketStack",
".",
"length",
">",
"0",
")",
"{",
"const",
"parent",
"=",
"bucketStack",
"[",
"bucketStack",
".",
"length",
"-",
"1",
"]",
".",
"bucket",
";",
"parent",
".",
"childTime",
"+=",
"time",
";",
"}",
"}",
";",
"export",
"{",
"startMeasure",
"as",
"perfStart",
",",
"endMeasure",
"as",
"perfEnd",
"}",
";",
"export",
"let",
"beginMark",
";",
"export",
"let",
"endMark",
";",
"if",
"(",
"USE_PERF",
"&&",
"typeof",
"performance",
"!==",
"'undefined'",
"&&",
"performance",
".",
"mark",
")",
"{",
"beginMark",
"=",
"label",
"=>",
"{",
"performance",
".",
"mark",
"(",
"'☄️ '",
"+",
"label",
"+",
"' start'",
")",
";",
"startMeasure",
"(",
"label",
")",
";",
"}",
";",
"endMark",
"=",
"label",
"=>",
"{",
"endMeasure",
"(",
"label",
")",
";",
"try",
"{",
"performance",
".",
"measure",
"(",
"'☄️ '",
"+",
"label",
",",
"'☄️ '",
"+",
"label",
"+",
"' start'",
")",
";",
"}",
"catch",
"(",
"err",
")",
"{",
"}",
"performance",
".",
"clearMarks",
"(",
"'☄️ '",
"+",
"label",
"+",
"' start'",
")",
";",
"performance",
".",
"clearMeasures",
"(",
"'☄️ '",
"+",
"label",
")",
";",
"}",
";",
"}",
"else",
"{",
"beginMark",
"=",
"label",
"=>",
"{",
"startMeasure",
"(",
"label",
")",
";",
"}",
";",
"endMark",
"=",
"label",
"=>",
"{",
"endMeasure",
"(",
"label",
")",
";",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13,
null,
null,
null,
null,
null,
4,
null,
null,
2,
null,
null,
null,
null,
948,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
2,
null,
null,
null,
null,
948,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
948,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
478 | [
"export",
"const",
"raf",
"=",
"typeof",
"requestAnimationFrame",
"!==",
"'undefined'",
"?",
"requestAnimationFrame",
":",
"(",
"cb",
")",
"=>",
"setTimeout",
"(",
"cb",
",",
"0",
")",
";",
"export",
"const",
"cancelRaf",
"=",
"typeof",
"cancelAnimationFrame",
"!==",
"'undefined'",
"?",
"cancelAnimationFrame",
":",
"clearTimeout",
";"
] | [
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
33,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
479 | [
"import",
"{",
"TASK_DEADLINE",
"}",
"from",
"'../platform/env'",
";",
"import",
"{",
"now",
"}",
"from",
"'../platform/now'",
";",
"import",
"{",
"beginMark",
",",
"endMark",
"}",
"from",
"'../platform/mark'",
";",
"import",
"{",
"raf",
"}",
"from",
"'../platform/raf'",
";",
"import",
"type",
"{",
"Op",
",",
"OpPriorityQueue",
",",
"OpGroup",
",",
"AsyncValue",
",",
"Linkable",
",",
"}",
"from",
"'./index.h'",
";",
"function",
"addItemToQueue",
"(",
"queue",
",",
"item",
")",
"{",
"if",
"(",
"queue",
".",
"last",
")",
"{",
"item",
".",
"cursor",
".",
"prev",
"=",
"queue",
".",
"last",
";",
"queue",
".",
"last",
".",
"cursor",
".",
"next",
"=",
"item",
";",
"queue",
".",
"last",
"=",
"item",
";",
"}",
"else",
"{",
"queue",
".",
"first",
"=",
"queue",
".",
"last",
"=",
"item",
";",
"}",
"}",
"function",
"removeItemFromQueue",
"(",
"queue",
",",
"item",
")",
"{",
"if",
"(",
"item",
".",
"cursor",
".",
"prev",
")",
"{",
"item",
".",
"cursor",
".",
"prev",
".",
"cursor",
".",
"next",
"=",
"item",
".",
"cursor",
".",
"next",
";",
"}",
"if",
"(",
"item",
".",
"cursor",
".",
"next",
")",
"{",
"item",
".",
"cursor",
".",
"next",
".",
"cursor",
".",
"prev",
"=",
"item",
".",
"cursor",
".",
"prev",
";",
"}",
"if",
"(",
"queue",
".",
"last",
"===",
"item",
")",
"{",
"queue",
".",
"last",
"=",
"item",
".",
"cursor",
".",
"prev",
";",
"}",
"if",
"(",
"queue",
".",
"first",
"===",
"item",
")",
"{",
"queue",
".",
"first",
"=",
"item",
".",
"cursor",
".",
"next",
";",
"}",
"item",
".",
"cursor",
".",
"prev",
"=",
"null",
";",
"item",
".",
"cursor",
".",
"next",
"=",
"null",
";",
"}",
"function",
"removeOpGroupFromQueue",
"(",
"group",
",",
"priority",
")",
"{",
"if",
"(",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
")",
"{",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
"!",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
"=",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
";",
"}",
"if",
"(",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
")",
"{",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
"!",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
"=",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
";",
"}",
"if",
"(",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
"===",
"group",
")",
"{",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
"=",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
";",
"}",
"if",
"(",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"first",
"===",
"group",
")",
"{",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"first",
"=",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
";",
"}",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
"=",
"null",
";",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
"=",
"null",
";",
"}",
"function",
"removeOpFromQueue",
"(",
"op",
")",
"{",
"op",
".",
"status",
"=",
"'active'",
";",
"removeItemFromQueue",
"(",
"getOpQueue",
"(",
"op",
")",
",",
"op",
")",
";",
"}",
"function",
"addOpGroupToQueue",
"(",
"group",
",",
"priority",
")",
"{",
"if",
"(",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
")",
"{",
"group",
".",
"cursor",
"[",
"priority",
"]",
".",
"prev",
"=",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
";",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
"!",
".",
"cursor",
"[",
"priority",
"]",
".",
"next",
"=",
"group",
";",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
"=",
"group",
";",
"}",
"else",
"{",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"first",
"=",
"group",
".",
"queue",
"[",
"priority",
"]",
".",
"last",
"=",
"group",
";",
"}",
"}",
"function",
"getOpQueue",
"(",
"op",
")",
"{",
"return",
"op",
".",
"group",
".",
"activeChilds",
"[",
"op",
".",
"priority",
"]",
";",
"}",
"export",
"function",
"forceSetOpValue",
"(",
"value",
",",
"op",
")",
"{",
"op",
".",
"value",
".",
"active",
"=",
"op",
".",
"value",
".",
"pending",
"=",
"value",
";",
"if",
"(",
"op",
".",
"status",
"===",
"'active'",
")",
"return",
";",
"removeOpFromQueue",
"(",
"op",
")",
";",
"}",
"export",
"function",
"pushOpToQueue",
"(",
"value",
",",
"op",
")",
"{",
"if",
"(",
"op",
".",
"value",
".",
"active",
"===",
"value",
")",
"{",
"op",
".",
"value",
".",
"pending",
"=",
"value",
";",
"if",
"(",
"op",
".",
"status",
"===",
"'pending'",
")",
"{",
"removeOpFromQueue",
"(",
"op",
")",
";",
"if",
"(",
"!",
"getOpQueue",
"(",
"op",
")",
".",
"first",
")",
"{",
"removeOpGroupFromQueue",
"(",
"op",
".",
"group",
",",
"op",
".",
"priority",
")",
";",
"}",
"}",
"return",
";",
"}",
"if",
"(",
"op",
".",
"status",
"===",
"'active'",
")",
"{",
"op",
".",
"status",
"=",
"'pending'",
";",
"if",
"(",
"!",
"getOpQueue",
"(",
"op",
")",
".",
"first",
")",
"{",
"addOpGroupToQueue",
"(",
"op",
".",
"group",
",",
"op",
".",
"priority",
")",
";",
"}",
"addItemToQueue",
"(",
"getOpQueue",
"(",
"op",
")",
",",
"op",
")",
";",
"}",
"op",
".",
"value",
".",
"pending",
"=",
"value",
";",
"if",
"(",
"!",
"op",
".",
"group",
".",
"queue",
".",
"rafID",
")",
"{",
"op",
".",
"group",
".",
"queue",
".",
"rafID",
"=",
"raf",
"(",
"op",
".",
"group",
".",
"queue",
".",
"execQueue",
")",
";",
"}",
"}",
"function",
"execQueue",
"(",
"queue",
")",
"{",
"beginMark",
"(",
"'execQueue'",
")",
";",
"const",
"start",
"=",
"now",
"(",
")",
";",
"let",
"interrupted",
"=",
"false",
";",
"let",
"group",
";",
"let",
"op",
";",
"quant",
":",
"{",
"while",
"(",
"queue",
".",
"props",
".",
"first",
"||",
"queue",
".",
"tree",
".",
"first",
"||",
"queue",
".",
"data",
".",
"first",
")",
"{",
"if",
"(",
"now",
"(",
")",
"-",
"start",
">=",
"TASK_DEADLINE",
")",
"{",
"interrupted",
"=",
"true",
";",
"break",
"quant",
";",
"}",
"const",
"hasPropsTasks",
"=",
"!",
"!",
"queue",
".",
"props",
".",
"first",
";",
"if",
"(",
"hasPropsTasks",
")",
"beginMark",
"(",
"'props'",
")",
";",
"while",
"(",
"(",
"group",
"=",
"queue",
".",
"props",
".",
"first",
")",
")",
"{",
"while",
"(",
"(",
"op",
"=",
"group",
".",
"activeChilds",
".",
"props",
".",
"first",
")",
")",
"{",
"if",
"(",
"now",
"(",
")",
"-",
"start",
">=",
"TASK_DEADLINE",
")",
"{",
"interrupted",
"=",
"true",
";",
"endMark",
"(",
"'props'",
")",
";",
"break",
"quant",
";",
"}",
"op",
".",
"runOp",
"(",
"op",
".",
"value",
".",
"pending",
")",
";",
"op",
".",
"value",
".",
"active",
"=",
"op",
".",
"value",
".",
"pending",
";",
"removeOpFromQueue",
"(",
"op",
")",
";",
"}",
"removeOpGroupFromQueue",
"(",
"group",
",",
"'props'",
")",
";",
"}",
"if",
"(",
"hasPropsTasks",
")",
"endMark",
"(",
"'props'",
")",
";",
"const",
"hasTreeTasks",
"=",
"!",
"!",
"queue",
".",
"tree",
".",
"first",
";",
"if",
"(",
"hasTreeTasks",
")",
"beginMark",
"(",
"'tree'",
")",
";",
"while",
"(",
"(",
"group",
"=",
"queue",
".",
"tree",
".",
"first",
")",
")",
"{",
"while",
"(",
"(",
"op",
"=",
"group",
".",
"activeChilds",
".",
"tree",
".",
"first",
")",
")",
"{",
"if",
"(",
"now",
"(",
")",
"-",
"start",
">=",
"TASK_DEADLINE",
")",
"{",
"interrupted",
"=",
"true",
";",
"endMark",
"(",
"'tree'",
")",
";",
"break",
"quant",
";",
"}",
"op",
".",
"runOp",
"(",
"op",
".",
"value",
".",
"pending",
")",
";",
"op",
".",
"value",
".",
"active",
"=",
"op",
".",
"value",
".",
"pending",
";",
"removeOpFromQueue",
"(",
"op",
")",
";",
"}",
"removeOpGroupFromQueue",
"(",
"group",
",",
"'tree'",
")",
";",
"}",
"if",
"(",
"hasTreeTasks",
")",
"endMark",
"(",
"'tree'",
")",
";",
"const",
"hasDataTasks",
"=",
"!",
"!",
"queue",
".",
"data",
".",
"first",
";",
"if",
"(",
"hasDataTasks",
")",
"beginMark",
"(",
"'data'",
")",
";",
"while",
"(",
"(",
"group",
"=",
"queue",
".",
"data",
".",
"first",
")",
")",
"{",
"while",
"(",
"(",
"op",
"=",
"group",
".",
"activeChilds",
".",
"data",
".",
"first",
")",
")",
"{",
"if",
"(",
"now",
"(",
")",
"-",
"start",
">=",
"TASK_DEADLINE",
")",
"{",
"interrupted",
"=",
"true",
";",
"endMark",
"(",
"'data'",
")",
";",
"break",
"quant",
";",
"}",
"op",
".",
"runOp",
"(",
"op",
".",
"value",
".",
"pending",
")",
";",
"op",
".",
"value",
".",
"active",
"=",
"op",
".",
"value",
".",
"pending",
";",
"removeOpFromQueue",
"(",
"op",
")",
";",
"}",
"removeOpGroupFromQueue",
"(",
"group",
",",
"'data'",
")",
";",
"}",
"if",
"(",
"hasDataTasks",
")",
"endMark",
"(",
"'data'",
")",
";",
"}",
"}",
"endMark",
"(",
"'execQueue'",
")",
";",
"if",
"(",
"interrupted",
")",
"{",
"queue",
".",
"rafID",
"=",
"raf",
"(",
"queue",
".",
"execQueue",
")",
";",
"}",
"else",
"{",
"queue",
".",
"rafID",
"=",
"null",
";",
"if",
"(",
"queue",
".",
"onDrain",
")",
"{",
"const",
"rs",
"=",
"queue",
".",
"onDrain",
";",
"queue",
".",
"onDrain",
"=",
"null",
";",
"rs",
"(",
")",
";",
"}",
"}",
"}",
"export",
"function",
"createOp",
"(",
"{",
"value",
",",
"runOp",
",",
"group",
",",
"priority",
",",
"}",
")",
"{",
"return",
"{",
"value",
":",
"{",
"active",
":",
"value",
",",
"pending",
":",
"value",
",",
"}",
",",
"runOp",
",",
"status",
":",
"'active'",
",",
"priority",
",",
"group",
",",
"cursor",
":",
"{",
"prev",
":",
"null",
",",
"next",
":",
"null",
",",
"}",
",",
"}",
";",
"}",
"export",
"function",
"createOpQueue",
"(",
"{",
"onComplete",
",",
"}",
")",
"{",
"const",
"queue",
"=",
"{",
"props",
":",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"}",
",",
"tree",
":",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"}",
",",
"data",
":",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"}",
",",
"rafID",
":",
"null",
",",
"execQueue",
"(",
")",
"{",
"}",
",",
"onDrain",
":",
"onComplete",
",",
"}",
";",
"queue",
".",
"execQueue",
"=",
"execQueue",
".",
"bind",
"(",
"null",
",",
"queue",
")",
";",
"return",
"queue",
";",
"}",
"export",
"function",
"createOpGroup",
"(",
"queue",
")",
"{",
"return",
"{",
"ops",
":",
"[",
"]",
",",
"queue",
",",
"activeChilds",
":",
"{",
"props",
":",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"}",
",",
"tree",
":",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"}",
",",
"data",
":",
"{",
"first",
":",
"null",
",",
"last",
":",
"null",
",",
"}",
",",
"}",
",",
"cursor",
":",
"{",
"props",
":",
"{",
"prev",
":",
"null",
",",
"next",
":",
"null",
",",
"}",
",",
"tree",
":",
"{",
"prev",
":",
"null",
",",
"next",
":",
"null",
",",
"}",
",",
"data",
":",
"{",
"prev",
":",
"null",
",",
"next",
":",
"null",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
"export",
"function",
"createAsyncValue",
"(",
"{",
"value",
",",
"group",
",",
"onInit",
",",
"onChange",
",",
"}",
")",
"{",
"const",
"change",
"=",
"createOp",
"(",
"{",
"value",
",",
"group",
",",
"runOp",
"(",
"value",
")",
"{",
"item",
".",
"status",
"=",
"'A'",
";",
"onChange",
"(",
"value",
")",
";",
"}",
",",
"priority",
":",
"'data'",
",",
"}",
")",
";",
"const",
"item",
"=",
"{",
"status",
":",
"'IA'",
",",
"value",
":",
"change",
".",
"value",
",",
"ops",
":",
"{",
"init",
":",
"createOp",
"(",
"{",
"value",
":",
"false",
",",
"group",
",",
"runOp",
"(",
"value",
")",
"{",
"item",
".",
"status",
"=",
"'A'",
";",
"onInit",
"(",
"item",
".",
"value",
".",
"active",
")",
";",
"}",
",",
"priority",
":",
"'data'",
",",
"}",
")",
",",
"change",
",",
"terminate",
":",
"createOp",
"(",
"{",
"value",
":",
"false",
",",
"group",
",",
"runOp",
"(",
"value",
")",
"{",
"item",
".",
"status",
"=",
"'T'",
";",
"}",
",",
"priority",
":",
"'data'",
",",
"}",
")",
",",
"}",
",",
"}",
";",
"pushOpToQueue",
"(",
"true",
",",
"item",
".",
"ops",
".",
"init",
")",
";",
"return",
"item",
";",
"}",
"export",
"function",
"stopAsyncValue",
"(",
"item",
")",
"{",
"switch",
"(",
"item",
".",
"status",
")",
"{",
"case",
"'I'",
":",
"case",
"'T'",
":",
"case",
"'AT'",
":",
"return",
";",
"case",
"'A'",
":",
"item",
".",
"status",
"=",
"'AT'",
";",
"pushOpToQueue",
"(",
"true",
",",
"item",
".",
"ops",
".",
"terminate",
")",
";",
"break",
";",
"case",
"'AA'",
":",
"item",
".",
"status",
"=",
"'AT'",
";",
"pushOpToQueue",
"(",
"true",
",",
"item",
".",
"ops",
".",
"terminate",
")",
";",
"pushOpToQueue",
"(",
"item",
".",
"value",
".",
"active",
",",
"item",
".",
"ops",
".",
"change",
")",
";",
"break",
";",
"case",
"'IA'",
":",
"item",
".",
"status",
"=",
"'T'",
";",
"pushOpToQueue",
"(",
"false",
",",
"item",
".",
"ops",
".",
"init",
")",
";",
"break",
";",
"}",
"}",
"export",
"function",
"updateAsyncValue",
"(",
"value",
",",
"item",
")",
"{",
"switch",
"(",
"item",
".",
"status",
")",
"{",
"case",
"'I'",
":",
"case",
"'T'",
":",
"return",
";",
"case",
"'A'",
":",
"if",
"(",
"item",
".",
"value",
".",
"active",
"!==",
"value",
")",
"{",
"item",
".",
"status",
"=",
"'AA'",
";",
"pushOpToQueue",
"(",
"value",
",",
"item",
".",
"ops",
".",
"change",
")",
";",
"}",
"break",
";",
"case",
"'AA'",
":",
"if",
"(",
"item",
".",
"value",
".",
"active",
"===",
"value",
")",
"{",
"item",
".",
"status",
"=",
"'A'",
";",
"pushOpToQueue",
"(",
"value",
",",
"item",
".",
"ops",
".",
"change",
")",
";",
"}",
"else",
"if",
"(",
"item",
".",
"value",
".",
"pending",
"!==",
"value",
")",
"{",
"item",
".",
"value",
".",
"pending",
"=",
"value",
";",
"}",
"break",
";",
"case",
"'IA'",
":",
"item",
".",
"value",
".",
"active",
"=",
"item",
".",
"value",
".",
"pending",
"=",
"value",
";",
"break",
";",
"case",
"'AT'",
":",
"break",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
6,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
6,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
0,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
0,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
0,
null,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
480 | [
"import",
"type",
"{",
"DOMElement",
",",
"StaticOperationDef",
"}",
"from",
"'./index.h'",
";",
"const",
"defMap",
"=",
"{",
"attr",
":",
"applyAttr",
",",
"data",
":",
"applyDataAttr",
",",
"style",
":",
"applyStyle",
",",
"styleVar",
":",
"applyStyleVar",
",",
"}",
";",
"export",
"function",
"escapeTag",
"(",
"value",
")",
"{",
"value",
"=",
"String",
"(",
"value",
")",
";",
"switch",
"(",
"value",
")",
"{",
"case",
"'__proto__'",
":",
"case",
"'__defineGetter__'",
":",
"case",
"'__defineSetter__'",
":",
"case",
"'constructor'",
":",
"case",
"'prototype'",
":",
"case",
"'hasOwnProperty'",
":",
"case",
"'toString'",
":",
"case",
"'valueOf'",
":",
"case",
"'setProperty'",
":",
"case",
"'removeProperty'",
":",
"return",
"'forbidden'",
";",
"default",
":",
"return",
"value",
".",
"replace",
"(",
"/[^a-zA-Z0-9\\-_]/g",
",",
"''",
")",
";",
"}",
"}",
"export",
"function",
"applyStaticOps",
"(",
"element",
",",
"defs",
")",
"{",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"defs",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"{",
"type",
",",
"field",
",",
"value",
"}",
"=",
"defs",
"[",
"i",
"]",
";",
"defMap",
"[",
"type",
"]",
"(",
"element",
",",
"field",
",",
"value",
")",
";",
"}",
"}",
"export",
"function",
"isFalse",
"(",
"val",
")",
"{",
"return",
"(",
"val",
"!==",
"''",
"&&",
"val",
"!==",
"0",
"&&",
"val",
"!==",
"'0'",
"&&",
"(",
"val",
"===",
"false",
"||",
"val",
"===",
"undefined",
"||",
"val",
"===",
"null",
")",
")",
";",
"}",
"export",
"function",
"applyStyleVar",
"(",
"element",
",",
"field",
",",
"value",
")",
"{",
"if",
"(",
"isFalse",
"(",
"value",
")",
")",
"{",
"element",
".",
"style",
".",
"removeProperty",
"(",
"`--${",
"field",
"}`",
")",
";",
"}",
"else",
"{",
"element",
".",
"style",
".",
"setProperty",
"(",
"`--${",
"field",
"}`",
",",
"`${",
"value",
"}`",
")",
";",
"}",
"}",
"export",
"function",
"applyStyle",
"(",
"element",
",",
"field",
",",
"value",
")",
"{",
"if",
"(",
"isFalse",
"(",
"value",
")",
")",
"{",
"delete",
"element",
".",
"style",
"[",
"field",
"as",
"any",
"]",
";",
"}",
"else",
"{",
"element",
".",
"style",
"[",
"field",
"as",
"any",
"]",
"=",
"`${",
"value",
"}`",
";",
"}",
"}",
"export",
"function",
"applyDataAttr",
"(",
"element",
",",
"field",
",",
"value",
")",
"{",
"if",
"(",
"isFalse",
"(",
"value",
")",
")",
"{",
"delete",
"element",
".",
"dataset",
"[",
"field",
"]",
";",
"}",
"else",
"{",
"element",
".",
"dataset",
"[",
"field",
"]",
"=",
"`${",
"value",
"}`",
";",
"}",
"}",
"export",
"function",
"applyAttr",
"(",
"element",
",",
"field",
",",
"value",
")",
"{",
"if",
"(",
"isFalse",
"(",
"value",
")",
")",
"{",
"switch",
"(",
"field",
")",
"{",
"case",
"'value'",
":",
"delete",
"element",
".",
"value",
";",
"break",
";",
"case",
"'checked'",
":",
"element",
".",
"checked",
"=",
"false",
";",
"break",
";",
"case",
"'spellcheck'",
":",
"if",
"(",
"value",
"===",
"false",
")",
"{",
"element",
".",
"setAttribute",
"(",
"'spellcheck'",
",",
"'false'",
")",
";",
"return",
";",
"}",
"break",
";",
"}",
"element",
".",
"removeAttribute",
"(",
"field",
")",
";",
"}",
"else",
"{",
"switch",
"(",
"field",
")",
"{",
"case",
"'value'",
":",
"element",
".",
"value",
"=",
"`${",
"value",
"}`",
";",
"break",
";",
"case",
"'checked'",
":",
"element",
".",
"checked",
"=",
"`${",
"value",
"}`",
";",
"break",
";",
"}",
"element",
".",
"setAttribute",
"(",
"field",
",",
"`${",
"value",
"}`",
")",
";",
"}",
"}",
"export",
"function",
"applyText",
"(",
"textNode",
",",
"text",
")",
"{",
"textNode",
".",
"replaceData",
"(",
"0",
",",
"(",
"textNode",
".",
"textContent",
"||",
"''",
")",
".",
"length",
",",
"String",
"(",
"text",
")",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
5,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
549,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
481 | [
"import",
"type",
"{",
"StateRef",
",",
"StateRefOp",
",",
"Node",
",",
"Cmd",
"}",
"from",
"'../effector/index.h'",
";",
"import",
"type",
"{",
"TemplateHandlers",
",",
"Template",
"}",
"from",
"'./index.h'",
";",
"const",
"addRefOp",
"=",
"(",
"ref",
",",
"op",
")",
"=>",
"{",
"if",
"(",
"!",
"ref",
".",
"before",
")",
"ref",
".",
"before",
"=",
"[",
"]",
";",
"ref",
".",
"before",
"!",
".",
"push",
"(",
"op",
"as",
"any",
")",
";",
"}",
";",
"const",
"includes",
"=",
"<",
"T",
">",
"(",
"arr",
",",
"value",
")",
"=>",
"arr",
".",
"includes",
"(",
"value",
")",
";",
"export",
"const",
"handlers",
"=",
"{",
"storeBase",
"(",
"template",
",",
"plainState",
")",
"{",
"template",
".",
"plain",
".",
"push",
"(",
"plainState",
")",
";",
"}",
",",
"storeOnMap",
"(",
"template",
",",
"plainState",
",",
"seq",
",",
"fromRef",
")",
"{",
"seq",
".",
"unshift",
"(",
"template",
".",
"loader",
")",
";",
"seq",
".",
"push",
"(",
"template",
".",
"upward",
")",
";",
"if",
"(",
"fromRef",
")",
"{",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"plain",
",",
"fromRef",
")",
")",
"{",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"closure",
",",
"fromRef",
")",
")",
"{",
"template",
".",
"closure",
".",
"push",
"(",
"fromRef",
")",
";",
"}",
"addRefOp",
"(",
"plainState",
",",
"{",
"type",
":",
"'closure'",
",",
"of",
":",
"fromRef",
",",
"}",
")",
";",
"}",
"}",
"else",
"{",
"}",
"}",
",",
"storeMap",
"(",
"template",
",",
"plainState",
",",
"linkNode",
")",
"{",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"plain",
",",
"plainState",
")",
"&&",
"!",
"includes",
"(",
"linkNode",
".",
"seq",
",",
"template",
".",
"loader",
")",
")",
"{",
"linkNode",
".",
"seq",
".",
"unshift",
"(",
"template",
".",
"loader",
")",
";",
"}",
"}",
",",
"storeWatch",
"(",
"template",
",",
"plainState",
",",
"fn",
")",
"{",
"template",
".",
"watch",
".",
"push",
"(",
"{",
"of",
":",
"plainState",
",",
"fn",
"}",
")",
";",
"return",
"true",
";",
"}",
",",
"eventPrepend",
"(",
"template",
",",
"contramapped",
")",
"{",
"contramapped",
".",
"seq",
".",
"push",
"(",
"template",
".",
"upward",
")",
";",
"}",
",",
"combineBase",
"(",
"template",
",",
"rawShape",
",",
"isFresh",
")",
"{",
"template",
".",
"plain",
".",
"push",
"(",
"rawShape",
",",
"isFresh",
")",
";",
"}",
",",
"combineField",
"(",
"template",
",",
"childRef",
",",
"linkNode",
")",
"{",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"plain",
",",
"childRef",
")",
")",
"{",
"linkNode",
".",
"seq",
".",
"unshift",
"(",
"template",
".",
"loader",
")",
";",
"}",
"}",
",",
"splitBase",
"(",
"template",
",",
"lastValues",
")",
"{",
"template",
".",
"plain",
".",
"push",
"(",
"lastValues",
")",
";",
"}",
",",
"splitMatchStore",
"(",
"template",
",",
"storeRef",
",",
"linkNode",
")",
"{",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"plain",
",",
"storeRef",
")",
")",
"{",
"linkNode",
".",
"seq",
".",
"unshift",
"(",
"template",
".",
"loader",
")",
";",
"}",
"}",
",",
"sampleSource",
"(",
"template",
",",
"hasSource",
",",
"sourceRef",
",",
"clockState",
")",
"{",
"if",
"(",
"hasSource",
".",
"current",
")",
"{",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"plain",
",",
"sourceRef",
")",
"&&",
"!",
"includes",
"(",
"template",
".",
"closure",
",",
"sourceRef",
")",
")",
"{",
"template",
".",
"closure",
".",
"push",
"(",
"sourceRef",
")",
";",
"}",
"}",
"else",
"{",
"template",
".",
"plain",
".",
"push",
"(",
"sourceRef",
")",
";",
"}",
"template",
".",
"plain",
".",
"push",
"(",
"hasSource",
")",
";",
"if",
"(",
"!",
"includes",
"(",
"template",
".",
"plain",
",",
"clockState",
")",
")",
"{",
"template",
".",
"plain",
".",
"push",
"(",
"clockState",
")",
";",
"}",
"}",
",",
"sampleTarget",
"(",
"template",
",",
"target",
")",
"{",
"target",
".",
"seq",
".",
"push",
"(",
"template",
".",
"loader",
")",
";",
"}",
",",
"sampleSourceLoader",
":",
"(",
"template",
")",
"=>",
"template",
".",
"loader",
",",
"sampleSourceUpward",
":",
"(",
"template",
",",
"isUpward",
")",
"=>",
"isUpward",
"&&",
"template",
".",
"upward",
",",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
4670,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
5,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
20787,
null,
null,
4,
null,
963,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
963,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
4670,
null,
4670,
null,
4670,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
24,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
963,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
482 | [
"import",
"{",
"Store",
",",
"Event",
",",
"launch",
",",
"step",
",",
"createNode",
",",
"withRegion",
",",
"restore",
",",
"createEvent",
",",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"Scope",
"}",
"from",
"'../effector/unit.h'",
";",
"import",
"type",
"{",
"StateRef",
"}",
"from",
"'../effector/index.h'",
";",
"import",
"type",
"{",
"Stack",
"}",
"from",
"'../effector/kernel'",
";",
"import",
"type",
"{",
"Leaf",
",",
"NSType",
",",
"DOMElement",
",",
"LeafData",
",",
"Template",
",",
"NodeDraft",
",",
"Root",
",",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"OpGroup",
"}",
"from",
"'./plan/index.h'",
";",
"import",
"{",
"handlers",
"}",
"from",
"'./templateHandlers'",
";",
"let",
"templateID",
"=",
"0",
";",
"let",
"spawnID",
"=",
"0",
";",
"export",
"let",
"currentTemplate",
"=",
"null",
";",
"export",
"let",
"currentLeaf",
"=",
"null",
";",
"export",
"function",
"createTemplate",
"<",
"Api",
"extends",
"{",
"[",
"method",
"]",
":",
"any",
";",
"}",
">",
"(",
"config",
")",
";",
"export",
"function",
"createTemplate",
"(",
"config",
")",
";",
"export",
"function",
"createTemplate",
"<",
"Api",
"extends",
"{",
"[",
"method",
"]",
":",
"any",
";",
"}",
">",
"(",
"{",
"fn",
",",
"state",
":",
"values",
"=",
"{",
"}",
",",
"defer",
"=",
"false",
",",
"name",
"=",
"''",
",",
"draft",
",",
"isSvgRoot",
",",
"namespace",
",",
"env",
",",
"isBlock",
"=",
"false",
",",
"}",
")",
"{",
"const",
"parent",
"=",
"currentTemplate",
";",
"const",
"template",
"=",
"{",
"id",
":",
"++",
"templateID",
",",
"name",
",",
"plain",
":",
"[",
"]",
",",
"watch",
":",
"[",
"]",
",",
"nameMap",
":",
"{",
"}",
",",
"pages",
":",
"[",
"]",
",",
"closure",
":",
"[",
"]",
",",
"childTemplates",
":",
"[",
"]",
",",
"handlers",
",",
"upward",
":",
"step",
".",
"filter",
"(",
"{",
"fn",
"(",
"upd",
",",
"scope",
",",
"stack",
")",
"{",
"if",
"(",
"!",
"stack",
".",
"page",
")",
"{",
"if",
"(",
"stack",
".",
"parent",
"&&",
"stack",
".",
"parent",
".",
"page",
")",
"{",
"stack",
".",
"page",
"=",
"stack",
".",
"parent",
".",
"page",
";",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"if",
"(",
"!",
"stack",
".",
"page",
".",
"root",
".",
"activeSpawns",
".",
"has",
"(",
"stack",
".",
"page",
".",
"fullID",
")",
")",
"{",
"console",
".",
"count",
"(",
"'inactive page upward'",
")",
";",
"return",
"false",
";",
"}",
"const",
"stackTemplates",
"=",
"[",
"stack",
".",
"page",
".",
"template",
"]",
";",
"const",
"stackPages",
"=",
"[",
"stack",
".",
"page",
"]",
";",
"{",
"let",
"currentStackPage",
"=",
"stack",
".",
"page",
".",
"parent",
";",
"while",
"(",
"currentStackPage",
")",
"{",
"stackPages",
".",
"push",
"(",
"currentStackPage",
")",
";",
"stackTemplates",
".",
"push",
"(",
"currentStackPage",
".",
"template",
")",
";",
"currentStackPage",
"=",
"currentStackPage",
".",
"parent",
";",
"}",
"}",
"stack",
".",
"node",
".",
"next",
".",
"forEach",
"(",
"node",
"=>",
"{",
"/**\n * node.meta.nativeTemplate is used in units\n * it represents template in which unit was created (belongs to)\n */",
"const",
"targetTemplate",
"=",
"node",
".",
"meta",
".",
"nativeTemplate",
";",
"if",
"(",
"targetTemplate",
")",
"{",
"if",
"(",
"stackTemplates",
".",
"includes",
"(",
"targetTemplate",
")",
")",
"{",
"const",
"page",
"=",
"stackPages",
"[",
"stackTemplates",
".",
"indexOf",
"(",
"targetTemplate",
")",
"]",
";",
"launch",
"(",
"{",
"target",
":",
"node",
",",
"params",
":",
"upd",
",",
"defer",
":",
"true",
",",
"page",
",",
"stack",
",",
"scope",
":",
"stack",
".",
"scope",
",",
"}",
")",
";",
"}",
"else",
"{",
"console",
".",
"error",
"(",
"'context drift'",
",",
"{",
"stack",
",",
"node",
"}",
")",
";",
"}",
"}",
"else",
"{",
"launch",
"(",
"{",
"target",
":",
"node",
",",
"params",
":",
"upd",
",",
"defer",
":",
"true",
",",
"page",
":",
"stack",
".",
"page",
",",
"stack",
",",
"scope",
":",
"stack",
".",
"scope",
",",
"}",
")",
";",
"}",
"}",
")",
";",
"return",
"false",
";",
"}",
",",
"}",
")",
",",
"loader",
":",
"step",
".",
"filter",
"(",
"{",
"fn",
"(",
"upd",
",",
"scope",
",",
"stack",
")",
"{",
"if",
"(",
"stack",
".",
"parent",
")",
"{",
"const",
"forkId",
"=",
"stack",
".",
"scope",
"?",
"stack",
".",
"scope",
".",
"graphite",
".",
"id",
":",
"null",
";",
"if",
"(",
"stack",
".",
"page",
")",
"{",
"if",
"(",
"!",
"stack",
".",
"page",
".",
"root",
".",
"activeSpawns",
".",
"has",
"(",
"stack",
".",
"page",
".",
"fullID",
")",
")",
"{",
"console",
".",
"count",
"(",
"'inactive page loader'",
")",
";",
"return",
"false",
";",
"}",
"if",
"(",
"stack",
".",
"page",
".",
"template",
"===",
"template",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"stack",
".",
"page",
".",
"root",
".",
"childSpawns",
"[",
"stack",
".",
"page",
".",
"fullID",
"]",
"[",
"template",
".",
"id",
"]",
")",
"{",
"const",
"fullID",
"=",
"stack",
".",
"page",
"!",
".",
"fullID",
";",
"stack",
".",
"page",
".",
"root",
".",
"childSpawns",
"[",
"fullID",
"]",
"[",
"template",
".",
"id",
"]",
".",
"forEach",
"(",
"page",
"=>",
"{",
"if",
"(",
"forkId",
")",
"{",
"if",
"(",
"!",
"page",
".",
"root",
".",
"scope",
"||",
"forkId",
"!==",
"page",
".",
"root",
".",
"scope",
".",
"graphite",
".",
"id",
")",
"return",
";",
"}",
"launch",
"(",
"{",
"params",
":",
"upd",
",",
"target",
":",
"stack",
".",
"node",
",",
"page",
",",
"defer",
":",
"true",
",",
"scope",
":",
"stack",
".",
"scope",
",",
"}",
")",
";",
"}",
")",
";",
"}",
"else",
"{",
"const",
"fullID",
"=",
"stack",
".",
"page",
".",
"fullID",
";",
"const",
"isRecTemplate",
"=",
"stack",
".",
"page",
".",
"template",
".",
"name",
"===",
"'rec'",
";",
"template",
".",
"pages",
".",
"forEach",
"(",
"page",
"=>",
"{",
"if",
"(",
"forkId",
")",
"{",
"if",
"(",
"!",
"page",
".",
"root",
".",
"scope",
"||",
"forkId",
"!==",
"page",
".",
"root",
".",
"scope",
".",
"graphite",
".",
"id",
")",
"return",
";",
"}",
"if",
"(",
"page",
".",
"fullID",
"===",
"fullID",
"||",
"page",
".",
"fullID",
".",
"startsWith",
"(",
"`${",
"fullID",
"}_`",
")",
")",
"{",
"let",
"validTarget",
"=",
"true",
";",
"if",
"(",
"isRecTemplate",
")",
"{",
"const",
"recID",
"=",
"stack",
".",
"page",
"!",
".",
"template",
".",
"id",
";",
"let",
"parentPage",
"=",
"page",
".",
"parent",
";",
"while",
"(",
"parentPage",
")",
"{",
"if",
"(",
"parentPage",
"===",
"stack",
".",
"page",
")",
"{",
"break",
";",
"}",
"if",
"(",
"parentPage",
".",
"template",
".",
"id",
"===",
"recID",
")",
"{",
"validTarget",
"=",
"false",
";",
"break",
";",
"}",
"parentPage",
"=",
"parentPage",
".",
"parent",
";",
"}",
"}",
"if",
"(",
"validTarget",
")",
"{",
"launch",
"(",
"{",
"params",
":",
"upd",
",",
"target",
":",
"stack",
".",
"node",
",",
"page",
",",
"defer",
":",
"true",
",",
"scope",
":",
"stack",
".",
"scope",
",",
"}",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"fullID",
".",
"startsWith",
"(",
"`${",
"page",
".",
"fullID",
"}_`",
")",
")",
"{",
"launch",
"(",
"{",
"params",
":",
"upd",
",",
"target",
":",
"stack",
".",
"node",
",",
"page",
":",
"stack",
".",
"page",
",",
"defer",
":",
"true",
",",
"scope",
":",
"stack",
".",
"scope",
",",
"}",
")",
";",
"}",
"else",
"{",
"}",
"}",
"}",
")",
";",
"}",
"}",
"else",
"{",
"template",
".",
"pages",
".",
"forEach",
"(",
"page",
"=>",
"{",
"if",
"(",
"forkId",
")",
"{",
"if",
"(",
"!",
"page",
".",
"root",
".",
"scope",
"||",
"forkId",
"!==",
"page",
".",
"root",
".",
"scope",
".",
"graphite",
".",
"id",
")",
"return",
";",
"}",
"launch",
"(",
"{",
"params",
":",
"upd",
",",
"target",
":",
"stack",
".",
"node",
",",
"page",
",",
"defer",
":",
"true",
",",
"scope",
":",
"stack",
".",
"scope",
",",
"}",
")",
";",
"}",
")",
";",
"}",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
",",
"}",
")",
",",
"parent",
",",
"node",
":",
"null",
"as",
"any",
",",
"api",
":",
"null",
"as",
"any",
",",
"trigger",
":",
"{",
"mount",
":",
"createEvent",
"<",
"Leaf",
">",
"(",
"{",
"named",
":",
"'mount'",
"}",
")",
",",
"}",
",",
"draft",
",",
"isSvgRoot",
",",
"namespace",
",",
"env",
",",
"isBlock",
":",
"isBlock",
"||",
"!",
"!",
"(",
"parent",
"&&",
"parent",
".",
"isBlock",
")",
",",
"}",
";",
"if",
"(",
"parent",
")",
"{",
"parent",
".",
"childTemplates",
".",
"push",
"(",
"template",
")",
";",
"}",
"const",
"node",
"=",
"createNode",
"(",
"{",
"meta",
":",
"{",
"template",
",",
"}",
",",
"}",
")",
";",
"template",
".",
"node",
"=",
"node",
";",
"currentTemplate",
"=",
"template",
";",
"if",
"(",
"!",
"defer",
")",
"{",
"withRegion",
"(",
"node",
",",
"(",
")",
"=>",
"{",
"const",
"state",
"=",
"restore",
"(",
"values",
")",
";",
"template",
".",
"api",
"=",
"fn",
"(",
"state",
",",
"template",
".",
"trigger",
")",
";",
"template",
".",
"nameMap",
"=",
"state",
";",
"}",
")",
";",
"}",
"else",
"{",
"template",
".",
"deferredInit",
"=",
"(",
")",
"=>",
"{",
"const",
"prevTemplate",
"=",
"currentTemplate",
";",
"currentTemplate",
"=",
"template",
";",
"template",
".",
"deferredInit",
"=",
"null",
";",
"try",
"{",
"withRegion",
"(",
"node",
",",
"(",
")",
"=>",
"{",
"const",
"state",
"=",
"restore",
"(",
"values",
")",
";",
"template",
".",
"api",
"=",
"fn",
"(",
"state",
",",
"template",
".",
"trigger",
")",
";",
"template",
".",
"nameMap",
"=",
"state",
";",
"}",
")",
";",
"}",
"finally",
"{",
"currentTemplate",
"=",
"prevTemplate",
";",
"}",
"}",
";",
"}",
"currentTemplate",
"=",
"parent",
";",
"return",
"template",
";",
"}",
"function",
"getCurrent",
"(",
"ref",
",",
"forkPage",
"?",
")",
"{",
"let",
"result",
";",
"if",
"(",
"forkPage",
")",
"result",
"=",
"forkPage",
".",
"getState",
"(",
"ref",
")",
";",
"else",
"result",
"=",
"ref",
".",
"current",
";",
"switch",
"(",
"ref",
".",
"type",
")",
"{",
"case",
"'list'",
":",
"return",
"[",
"...",
"result",
"]",
";",
"case",
"'shape'",
":",
"return",
"{",
"...",
"result",
"}",
";",
"default",
":",
"return",
"result",
";",
"}",
"}",
"function",
"findRef",
"(",
"ref",
",",
"targetLeaf",
",",
"forkPage",
"?",
")",
"{",
"let",
"currentLeaf",
"=",
"targetLeaf",
";",
"while",
"(",
"currentLeaf",
"&&",
"!",
"regRef",
"(",
"currentLeaf",
",",
"ref",
")",
")",
"{",
"currentLeaf",
"=",
"currentLeaf",
".",
"parent",
";",
"}",
"if",
"(",
"!",
"currentLeaf",
")",
"{",
"if",
"(",
"forkPage",
")",
"{",
"forkPage",
".",
"getState",
"(",
"ref",
")",
";",
"return",
"forkPage",
".",
"reg",
"[",
"ref",
".",
"id",
"]",
";",
"}",
"return",
"ref",
";",
"}",
"return",
"regRef",
"(",
"currentLeaf",
",",
"ref",
")",
";",
"}",
"function",
"findRefValue",
"(",
"ref",
",",
"targetLeaf",
",",
"forkPage",
"?",
")",
"{",
"return",
"findRef",
"(",
"ref",
",",
"targetLeaf",
",",
"forkPage",
")",
".",
"current",
";",
"}",
"function",
"ensureLeafHasRef",
"(",
"ref",
",",
"leaf",
")",
"{",
"if",
"(",
"!",
"regRef",
"(",
"leaf",
",",
"ref",
")",
")",
"{",
"leaf",
".",
"reg",
"[",
"ref",
".",
"id",
"]",
"=",
"findRef",
"(",
"ref",
",",
"leaf",
".",
"parent",
",",
"leaf",
".",
"root",
".",
"scope",
")",
";",
"}",
"}",
"const",
"regRef",
"=",
"(",
"page",
",",
"ref",
")",
"=>",
"page",
".",
"reg",
"[",
"ref",
".",
"id",
"]",
";",
"function",
"addMapItems",
"<",
"T",
">",
"(",
"values",
",",
"id",
",",
"record",
")",
"{",
"if",
"(",
"!",
"(",
"id",
"in",
"record",
")",
")",
"{",
"record",
"[",
"id",
"]",
"=",
"[",
"]",
";",
"}",
"record",
"[",
"id",
"]",
".",
"push",
"(",
"...",
"values",
")",
";",
"}",
"export",
"function",
"spawn",
"(",
"template",
",",
"{",
"values",
"=",
"{",
"}",
",",
"parentLeaf",
",",
"mountNode",
",",
"svgRoot",
",",
"leafData",
",",
"opGroup",
",",
"domSubtree",
",",
"hydration",
",",
"root",
",",
"}",
")",
"{",
"const",
"page",
"=",
"{",
"}",
"as",
"Record",
"<",
"string",
",",
"StateRef",
">",
";",
"const",
"leaf",
"=",
"{",
"draft",
":",
"template",
".",
"draft",
",",
"svgRoot",
",",
"data",
":",
"leafData",
",",
"parent",
":",
"parentLeaf",
",",
"hydration",
",",
"mountNode",
",",
"root",
",",
"id",
":",
"++",
"spawnID",
",",
"fullID",
":",
"''",
",",
"reg",
":",
"page",
",",
"template",
",",
"}",
";",
"template",
".",
"pages",
".",
"push",
"(",
"leaf",
")",
";",
"const",
"previousSpawn",
"=",
"currentLeaf",
";",
"currentLeaf",
"=",
"leaf",
";",
"if",
"(",
"parentLeaf",
")",
"{",
"addMapItems",
"(",
"[",
"leaf",
"]",
",",
"template",
".",
"id",
",",
"root",
".",
"childSpawns",
"[",
"parentLeaf",
".",
"fullID",
"]",
")",
";",
"}",
"if",
"(",
"parentLeaf",
")",
"{",
"leaf",
".",
"fullID",
"=",
"`${",
"parentLeaf",
".",
"fullID",
"}_${",
"leaf",
".",
"id",
"}`",
";",
"}",
"else",
"{",
"leaf",
".",
"fullID",
"=",
"`${",
"leaf",
".",
"id",
"}`",
";",
"}",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
"=",
"{",
"}",
";",
"root",
".",
"activeSpawns",
".",
"add",
"(",
"leaf",
".",
"fullID",
")",
";",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
"=",
"{",
"group",
":",
"opGroup",
",",
"domSubtree",
"}",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"template",
".",
"closure",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"ref",
"=",
"template",
".",
"closure",
"[",
"i",
"]",
";",
"let",
"closureRef",
"=",
"ref",
";",
"let",
"parent",
"=",
"leaf",
".",
"parent",
";",
"findClosure",
":",
"while",
"(",
"parent",
")",
"{",
"if",
"(",
"regRef",
"(",
"parent",
",",
"ref",
")",
")",
"{",
"closureRef",
"=",
"regRef",
"(",
"parent",
",",
"ref",
")",
";",
"break",
"findClosure",
";",
"}",
"parent",
"=",
"parent",
".",
"parent",
";",
"}",
"if",
"(",
"!",
"parent",
"&&",
"root",
".",
"scope",
")",
"{",
"root",
".",
"scope",
".",
"getState",
"(",
"ref",
")",
";",
"closureRef",
"=",
"root",
".",
"scope",
".",
"reg",
"[",
"ref",
".",
"id",
"]",
";",
"}",
"page",
"[",
"ref",
".",
"id",
"]",
"=",
"closureRef",
";",
"}",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"template",
".",
"plain",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"ref",
"=",
"template",
".",
"plain",
"[",
"i",
"]",
";",
"const",
"next",
"=",
"{",
"id",
":",
"ref",
".",
"id",
",",
"current",
":",
"getCurrent",
"(",
"ref",
",",
"root",
".",
"scope",
")",
",",
"}",
";",
"page",
"[",
"ref",
".",
"id",
"]",
"=",
"next",
";",
"}",
"for",
"(",
"const",
"name",
"in",
"values",
")",
"{",
"const",
"id",
"=",
"template",
".",
"nameMap",
"[",
"name",
"]",
".",
"stateRef",
".",
"id",
";",
"page",
"[",
"id",
"]",
"=",
"{",
"id",
",",
"current",
":",
"values",
"[",
"name",
"]",
",",
"}",
";",
"}",
"function",
"execRef",
"(",
"ref",
")",
"{",
"if",
"(",
"ref",
".",
"before",
")",
"{",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"ref",
".",
"before",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"cmd",
"=",
"ref",
".",
"before",
"[",
"i",
"]",
";",
"switch",
"(",
"cmd",
".",
"type",
")",
"{",
"case",
"'map'",
":",
"{",
"const",
"from",
"=",
"cmd",
".",
"from",
";",
"if",
"(",
"!",
"cmd",
".",
"fn",
"&&",
"!",
"from",
")",
"break",
";",
"let",
"value",
";",
"if",
"(",
"from",
")",
"{",
"ensureLeafHasRef",
"(",
"from",
",",
"leaf",
")",
";",
"value",
"=",
"page",
"[",
"from",
".",
"id",
"]",
".",
"current",
";",
"}",
"page",
"[",
"ref",
".",
"id",
"]",
".",
"current",
"=",
"cmd",
".",
"fn",
"?",
"cmd",
".",
"fn",
"(",
"value",
")",
":",
"value",
";",
"break",
";",
"}",
"case",
"'field'",
":",
"{",
"const",
"from",
"=",
"cmd",
".",
"from",
";",
"ensureLeafHasRef",
"(",
"from",
",",
"leaf",
")",
";",
"page",
"[",
"ref",
".",
"id",
"]",
".",
"current",
"[",
"cmd",
".",
"field",
"]",
"=",
"page",
"[",
"from",
".",
"id",
"]",
".",
"current",
";",
"break",
";",
"}",
"case",
"'closure'",
":",
"ensureLeafHasRef",
"(",
"cmd",
".",
"of",
",",
"leaf",
")",
";",
"break",
";",
"}",
"}",
"}",
"}",
"template",
".",
"closure",
".",
"forEach",
"(",
"execRef",
")",
";",
"template",
".",
"plain",
".",
"forEach",
"(",
"execRef",
")",
";",
"function",
"runWatchersFrom",
"(",
"list",
",",
"state",
",",
"page",
")",
"{",
"state",
".",
"stop",
"=",
"true",
";",
"let",
"val",
";",
"try",
"{",
"while",
"(",
"state",
".",
"i",
"<",
"list",
".",
"length",
")",
"{",
"val",
"=",
"list",
"[",
"state",
".",
"i",
"]",
";",
"state",
".",
"i",
"++",
";",
"val",
".",
"fn",
"(",
"page",
"[",
"val",
".",
"of",
".",
"id",
"]",
"?",
"page",
"[",
"val",
".",
"of",
".",
"id",
"]",
".",
"current",
":",
"findRefValue",
"(",
"val",
".",
"of",
",",
"leaf",
".",
"parent",
",",
"leaf",
".",
"root",
".",
"scope",
")",
")",
";",
"}",
"}",
"catch",
"(",
"err",
")",
"{",
"console",
".",
"error",
"(",
"err",
")",
";",
"state",
".",
"stop",
"=",
"false",
";",
"}",
"}",
"const",
"state",
"=",
"{",
"i",
":",
"0",
",",
"stop",
":",
"false",
"}",
";",
"while",
"(",
"!",
"state",
".",
"stop",
")",
"{",
"runWatchersFrom",
"(",
"template",
".",
"watch",
",",
"state",
",",
"page",
")",
";",
"}",
"if",
"(",
"parentLeaf",
")",
"{",
"for",
"(",
"const",
"id",
"in",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
")",
"{",
"addMapItems",
"(",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
"[",
"id",
"]",
",",
"id",
",",
"root",
".",
"childSpawns",
"[",
"parentLeaf",
".",
"fullID",
"]",
")",
";",
"}",
"}",
"if",
"(",
"mountQueue",
")",
"{",
"mountQueue",
".",
"steps",
".",
"push",
"(",
"{",
"target",
":",
"template",
".",
"trigger",
".",
"mount",
",",
"params",
":",
"leaf",
",",
"defer",
":",
"true",
",",
"page",
":",
"leaf",
",",
"scope",
":",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"else",
"{",
"mountQueue",
"=",
"{",
"parent",
":",
"mountQueue",
",",
"steps",
":",
"[",
"{",
"target",
":",
"template",
".",
"trigger",
".",
"mount",
",",
"params",
":",
"leaf",
",",
"defer",
":",
"true",
",",
"page",
":",
"leaf",
",",
"scope",
":",
"root",
".",
"scope",
",",
"}",
",",
"]",
",",
"}",
";",
"let",
"step",
";",
"do",
"{",
"while",
"(",
"(",
"step",
"=",
"mountQueue",
".",
"steps",
".",
"shift",
"(",
")",
")",
")",
"{",
"mountQueue",
"=",
"{",
"parent",
":",
"mountQueue",
",",
"steps",
":",
"[",
"]",
",",
"}",
";",
"launch",
"(",
"step",
")",
";",
"}",
"}",
"while",
"(",
"(",
"mountQueue",
"=",
"mountQueue",
".",
"parent",
")",
")",
";",
"}",
"currentLeaf",
"=",
"previousSpawn",
";",
"return",
"leaf",
";",
"}",
"type",
"MountQueue",
"=",
"{",
"parent",
":",
"MountQueue",
"|",
"null",
";",
"steps",
":",
"any",
"[",
"]",
";",
"}",
";",
"let",
"mountQueue",
"=",
"null",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
963,
null,
6,
null,
null,
null,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
483 | [
"import",
"type",
"{",
"DOMElement",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"ElementBlock",
",",
"TextBlock",
",",
"UsingBlock",
",",
"Block",
",",
"BlockBlock",
",",
"}",
"from",
"'./relation.h'",
";",
"export",
"function",
"findParentDOMElement",
"(",
"block",
")",
"{",
"let",
"parent",
"=",
"block",
".",
"parent",
";",
"while",
"(",
"parent",
".",
"type",
"!==",
"'element'",
"&&",
"parent",
".",
"type",
"!==",
"'using'",
")",
"{",
"parent",
"=",
"parent",
".",
"parent",
";",
"}",
"if",
"(",
"parent",
")",
"return",
"parent",
".",
"value",
";",
"return",
"null",
";",
"}",
"function",
"findLastVisibleChildBlock",
"(",
"block",
")",
"{",
"if",
"(",
"!",
"block",
".",
"visible",
")",
"return",
"null",
";",
"switch",
"(",
"block",
".",
"type",
")",
"{",
"case",
"'text'",
":",
"case",
"'element'",
":",
"return",
"block",
";",
"case",
"'LF'",
":",
"case",
"'route'",
":",
"case",
"'rec'",
":",
"case",
"'recItem'",
":",
"case",
"'block'",
":",
"case",
"'blockItem'",
":",
"{",
"for",
"(",
"let",
"i",
"=",
"block",
".",
"child",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"const",
"child",
"=",
"block",
".",
"child",
"[",
"i",
"]",
";",
"const",
"visibleChild",
"=",
"findLastVisibleChildBlock",
"(",
"child",
")",
";",
"if",
"(",
"visibleChild",
")",
"return",
"visibleChild",
";",
"}",
"return",
"null",
";",
"}",
"case",
"'list'",
":",
"{",
"let",
"child",
"=",
"block",
".",
"lastChild",
";",
"if",
"(",
"!",
"child",
")",
"return",
"null",
";",
"while",
"(",
"child",
")",
"{",
"const",
"visibleChild",
"=",
"findLastVisibleChildBlock",
"(",
"child",
")",
";",
"if",
"(",
"visibleChild",
")",
"return",
"visibleChild",
";",
"child",
"=",
"child",
".",
"left",
";",
"}",
"return",
"null",
";",
"}",
"default",
":",
"{",
"const",
"_",
"=",
"block",
";",
"return",
"null",
";",
"}",
"}",
"}",
"export",
"function",
"findPreviousVisibleSiblingBlock",
"(",
"block",
")",
"{",
"switch",
"(",
"block",
".",
"type",
")",
"{",
"case",
"'using'",
":",
"return",
"null",
";",
"case",
"'LF'",
":",
"{",
"let",
"sibling",
"=",
"block",
".",
"left",
";",
"while",
"(",
"sibling",
")",
"{",
"const",
"visibleChild",
"=",
"findLastVisibleChildBlock",
"(",
"sibling",
")",
";",
"if",
"(",
"visibleChild",
")",
"return",
"visibleChild",
";",
"sibling",
"=",
"sibling",
".",
"left",
";",
"}",
"return",
"findPreviousVisibleSiblingBlock",
"(",
"block",
".",
"parent",
")",
";",
"}",
"case",
"'element'",
":",
"case",
"'text'",
":",
"case",
"'route'",
":",
"case",
"'rec'",
":",
"case",
"'recItem'",
":",
"case",
"'block'",
":",
"case",
"'blockItem'",
":",
"case",
"'list'",
":",
"{",
"const",
"parentFragment",
"=",
"block",
".",
"parent",
";",
"for",
"(",
"let",
"i",
"=",
"block",
".",
"index",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"const",
"sibling",
"=",
"parentFragment",
".",
"child",
"[",
"i",
"]",
";",
"if",
"(",
"!",
"sibling",
")",
"continue",
";",
"const",
"visibleChild",
"=",
"findLastVisibleChildBlock",
"(",
"sibling",
")",
";",
"if",
"(",
"visibleChild",
")",
"return",
"visibleChild",
";",
"}",
"switch",
"(",
"parentFragment",
".",
"type",
")",
"{",
"case",
"'element'",
":",
"case",
"'using'",
":",
"return",
"null",
";",
"}",
"return",
"findPreviousVisibleSiblingBlock",
"(",
"parentFragment",
")",
";",
"}",
"default",
":",
"{",
"const",
"_",
"=",
"block",
";",
"return",
"null",
";",
"}",
"}",
"}",
"export",
"function",
"findPreviousVisibleSibling",
"(",
"block",
")",
"{",
"const",
"child",
"=",
"findPreviousVisibleSiblingBlock",
"(",
"block",
")",
";",
"if",
"(",
"child",
")",
"return",
"child",
".",
"value",
";",
"return",
"null",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2867,
null,
1882,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1882,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
173,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1882,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
484 | [
"export",
"function",
"assert",
"(",
"condition",
",",
"msg",
")",
"{",
"if",
"(",
"!",
"condition",
")",
"throw",
"Error",
"(",
"msg",
")",
";",
"}",
"export",
"function",
"assertClosure",
"(",
"currentActor",
",",
"methodName",
")",
"{",
"if",
"(",
"!",
"currentActor",
")",
"throw",
"Error",
"(",
"`${",
"methodName",
"}() called outside from using() closure`",
")",
";",
"}"
] | [
null,
null,
8,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
485 | [
"import",
"{",
"launch",
",",
"createEvent",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"DOMElement",
",",
"Leaf",
",",
"BindingsDraft",
",",
"LeafData",
",",
"Env",
",",
"LeafDataElement",
",",
"Template",
",",
"}",
"from",
"'./index.h'",
";",
"import",
"type",
"{",
"ElementBlock",
",",
"ListBlock",
",",
"TextBlock",
",",
"RouteBlock",
",",
"FragmentParent",
",",
"RecItemBlock",
",",
"RecBlock",
",",
"BlockBlock",
",",
"BlockItemBlock",
",",
"}",
"from",
"'./relation.h'",
";",
"import",
"{",
"createOpGroup",
",",
"createOp",
"}",
"from",
"'./plan'",
";",
"import",
"{",
"spawn",
",",
"currentTemplate",
"}",
"from",
"'./template'",
";",
"import",
"{",
"findParentDOMElement",
",",
"findPreviousVisibleSibling",
"}",
"from",
"'./search'",
";",
"import",
"{",
"applyStaticOps",
"}",
"from",
"'./bindings'",
";",
"import",
"{",
"assert",
"}",
"from",
"'./assert'",
";",
"export",
"function",
"setInParentIndex",
"(",
"template",
")",
"{",
"if",
"(",
"!",
"currentTemplate",
")",
"return",
";",
"const",
"{",
"draft",
"}",
"=",
"template",
";",
"if",
"(",
"draft",
".",
"type",
"===",
"'listItem'",
")",
"return",
";",
"if",
"(",
"draft",
".",
"type",
"===",
"'rec'",
")",
"return",
";",
"switch",
"(",
"currentTemplate",
".",
"draft",
".",
"type",
")",
"{",
"case",
"'element'",
":",
"case",
"'using'",
":",
"case",
"'route'",
":",
"case",
"'list'",
":",
"case",
"'rec'",
":",
"case",
"'recItem'",
":",
"case",
"'block'",
":",
"case",
"'blockItem'",
":",
"draft",
".",
"inParentIndex",
"=",
"currentTemplate",
".",
"draft",
".",
"childCount",
";",
"currentTemplate",
".",
"draft",
".",
"childCount",
"+=",
"1",
";",
"currentTemplate",
".",
"draft",
".",
"childTemplates",
".",
"push",
"(",
"template",
")",
";",
"break",
";",
"default",
":",
"console",
".",
"warn",
"(",
"`unexpected currentTemplate type ${",
"currentTemplate",
".",
"draft",
".",
"type",
"}`",
")",
";",
"}",
"}",
"export",
"function",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
",",
"leaf",
",",
"node",
",",
"svgRoot",
",",
"values",
",",
"}",
")",
"{",
"draft",
".",
"childTemplates",
".",
"forEach",
"(",
"actor",
"=>",
"{",
"mountChild",
"(",
"{",
"parentBlockFragment",
",",
"leaf",
",",
"node",
",",
"svgRoot",
",",
"values",
",",
"actor",
",",
"}",
")",
";",
"}",
")",
";",
"}",
"const",
"fragmentParentTypes",
"=",
"[",
"'LF'",
",",
"'using'",
",",
"'element'",
",",
"'recItem'",
",",
"'rec'",
",",
"'block'",
",",
"'blockItem'",
",",
"'route'",
",",
"]",
";",
"export",
"function",
"mountChild",
"(",
"{",
"parentBlockFragment",
",",
"leaf",
",",
"node",
"=",
"leaf",
".",
"mountNode",
",",
"actor",
",",
"svgRoot",
",",
"values",
",",
"}",
")",
"{",
"assert",
"(",
"fragmentParentTypes",
".",
"includes",
"(",
"parentBlockFragment",
".",
"type",
")",
",",
"`incorrect parent ${",
"parentBlockFragment",
".",
"type",
"}`",
")",
";",
"let",
"leafData",
";",
"const",
"{",
"draft",
"}",
"=",
"actor",
";",
"const",
"{",
"queue",
"}",
"=",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"group",
";",
"const",
"opGroup",
"=",
"createOpGroup",
"(",
"queue",
")",
";",
"const",
"parentDomSubtree",
"=",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"domSubtree",
";",
"let",
"domSubtree",
"=",
"parentDomSubtree",
";",
"switch",
"(",
"draft",
".",
"type",
")",
"{",
"case",
"'route'",
":",
"{",
"const",
"routeBlock",
"=",
"{",
"type",
":",
"'route'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"visible",
":",
"false",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"routeBlock",
";",
"leafData",
"=",
"{",
"type",
":",
"'route'",
",",
"block",
":",
"routeBlock",
",",
"ops",
":",
"{",
"}",
",",
"initialized",
":",
"false",
",",
"pendingInit",
":",
"null",
",",
"}",
";",
"break",
";",
"}",
"case",
"'element'",
":",
"{",
"let",
"element",
";",
"if",
"(",
"actor",
".",
"isBlock",
")",
"{",
"let",
"env",
";",
"let",
"type",
";",
"let",
"currentLeaf",
"=",
"leaf",
";",
"while",
"(",
"currentLeaf",
"&&",
"(",
"!",
"type",
"||",
"!",
"env",
")",
")",
"{",
"if",
"(",
"currentLeaf",
".",
"template",
".",
"env",
")",
"env",
"=",
"currentLeaf",
".",
"template",
".",
"env",
";",
"const",
"{",
"draft",
"}",
"=",
"currentLeaf",
";",
"if",
"(",
"draft",
".",
"type",
"===",
"'element'",
")",
"{",
"if",
"(",
"draft",
".",
"tag",
"===",
"'svg'",
")",
"{",
"type",
"=",
"'svg'",
";",
"}",
"else",
"if",
"(",
"draft",
".",
"tag",
"===",
"'foreignObject'",
")",
"{",
"type",
"=",
"'html'",
";",
"}",
"}",
"currentLeaf",
"=",
"currentLeaf",
".",
"parent",
"!",
";",
"}",
"if",
"(",
"!",
"type",
")",
"type",
"=",
"'html'",
";",
"if",
"(",
"env",
")",
"{",
"element",
"=",
"type",
"===",
"'svg'",
"?",
"env",
".",
"document",
".",
"createElementNS",
"(",
"'http://www.w3.org/2000/svg'",
",",
"draft",
".",
"tag",
")",
":",
"env",
".",
"document",
".",
"createElement",
"(",
"draft",
".",
"tag",
")",
";",
"applyStaticOps",
"(",
"element",
",",
"draft",
".",
"staticSeq",
")",
";",
"}",
"}",
"else",
"{",
"element",
"=",
"draft",
".",
"stencil",
".",
"cloneNode",
"(",
")",
"as",
"DOMElement",
";",
"}",
"const",
"elementBlock",
"=",
"{",
"type",
":",
"'element'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"value",
":",
"element",
"!",
",",
"visible",
":",
"false",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"elementBlock",
";",
"leafData",
"=",
"{",
"type",
":",
"'element'",
",",
"block",
":",
"elementBlock",
",",
"ops",
":",
"{",
"visible",
":",
"createOp",
"(",
"{",
"value",
":",
"false",
",",
"priority",
":",
"'tree'",
",",
"runOp",
"(",
"value",
")",
"{",
"if",
"(",
"leaf",
".",
"hydration",
")",
"{",
"}",
"if",
"(",
"value",
")",
"{",
"appendChild",
"(",
"elementBlock",
")",
";",
"const",
"leafData_",
"=",
"leafData",
"as",
"LeafDataElement",
";",
"if",
"(",
"leafData_",
".",
"needToCallNode",
")",
"{",
"leafData_",
".",
"needToCallNode",
"=",
"false",
";",
"launch",
"(",
"{",
"target",
":",
"onMount",
",",
"params",
":",
"{",
"element",
":",
"elementBlock",
".",
"value",
",",
"fns",
":",
"draft",
".",
"node",
",",
"}",
",",
"page",
":",
"childSpawn",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"elementBlock",
".",
"visible",
"=",
"true",
";",
"}",
"else",
"{",
"elementBlock",
".",
"value",
".",
"remove",
"(",
")",
";",
"elementBlock",
".",
"visible",
"=",
"false",
";",
"}",
"}",
",",
"group",
":",
"parentDomSubtree",
",",
"}",
")",
",",
"}",
",",
"needToCallNode",
":",
"draft",
".",
"node",
".",
"length",
">",
"0",
",",
"}",
";",
"domSubtree",
"=",
"createOpGroup",
"(",
"queue",
")",
";",
"break",
";",
"}",
"case",
"'list'",
":",
"{",
"const",
"listBlock",
"=",
"{",
"type",
":",
"'list'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"lastChild",
":",
"null",
",",
"visible",
":",
"true",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"listBlock",
";",
"leafData",
"=",
"{",
"type",
":",
"'list'",
",",
"draft",
",",
"block",
":",
"listBlock",
",",
"records",
":",
"[",
"]",
",",
"pendingUpdate",
":",
"null",
",",
"}",
";",
"break",
";",
"}",
"case",
"'using'",
":",
"case",
"'listItem'",
":",
"break",
";",
"case",
"'rec'",
":",
"{",
"const",
"recBlock",
"=",
"{",
"type",
":",
"'rec'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"visible",
":",
"true",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"recBlock",
";",
"leafData",
"=",
"{",
"type",
":",
"'rec'",
",",
"block",
":",
"recBlock",
",",
"}",
";",
"break",
";",
"}",
"case",
"'recItem'",
":",
"{",
"const",
"recItemBlock",
"=",
"{",
"type",
":",
"'recItem'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"visible",
":",
"true",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"recItemBlock",
";",
"leafData",
"=",
"{",
"type",
":",
"'rec item'",
",",
"block",
":",
"recItemBlock",
",",
"}",
";",
"break",
";",
"}",
"case",
"'block'",
":",
"{",
"const",
"block",
"=",
"{",
"type",
":",
"'block'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"visible",
":",
"true",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"block",
";",
"leafData",
"=",
"{",
"type",
":",
"'block'",
",",
"block",
",",
"}",
";",
"break",
";",
"}",
"case",
"'blockItem'",
":",
"{",
"const",
"block",
"=",
"{",
"type",
":",
"'blockItem'",
",",
"parent",
":",
"parentBlockFragment",
",",
"child",
":",
"[",
"]",
",",
"visible",
":",
"true",
",",
"index",
":",
"draft",
".",
"inParentIndex",
",",
"}",
";",
"parentBlockFragment",
".",
"child",
"[",
"draft",
".",
"inParentIndex",
"]",
"=",
"block",
";",
"leafData",
"=",
"{",
"type",
":",
"'block item'",
",",
"block",
":",
"block",
",",
"}",
";",
"break",
";",
"}",
"default",
":",
"{",
"console",
".",
"warn",
"(",
"`unexpected draft type ${",
"draft",
".",
"type",
"}`",
")",
";",
"}",
"}",
"const",
"childSpawn",
"=",
"spawn",
"(",
"actor",
",",
"{",
"values",
",",
"parentLeaf",
":",
"leaf",
",",
"mountNode",
":",
"node",
",",
"svgRoot",
":",
"svgRoot",
"?",
"svgRoot",
":",
"leaf",
".",
"svgRoot",
",",
"leafData",
",",
"opGroup",
",",
"domSubtree",
",",
"hydration",
":",
"leaf",
".",
"hydration",
",",
"root",
":",
"leaf",
".",
"root",
",",
"}",
")",
";",
"}",
"export",
"function",
"appendChild",
"(",
"block",
")",
"{",
"const",
"visibleSibling",
"=",
"findPreviousVisibleSibling",
"(",
"block",
")",
";",
"if",
"(",
"visibleSibling",
")",
"{",
"visibleSibling",
".",
"after",
"(",
"block",
".",
"value",
")",
";",
"}",
"else",
"{",
"const",
"parent",
"=",
"findParentDOMElement",
"(",
"block",
")",
";",
"parent",
"!",
".",
"prepend",
"(",
"block",
".",
"value",
")",
";",
"}",
"block",
".",
"visible",
"=",
"true",
";",
"}",
"export",
"const",
"onMount",
"=",
"createEvent",
"<",
"{",
"fns",
":",
"Array",
"<",
"(",
"node",
":",
"DOMElement",
")",
"=>",
"(",
"(",
")",
"=>",
"void",
")",
"|",
"void",
">",
";",
"element",
":",
"DOMElement",
";",
"}",
">",
"(",
"{",
"named",
":",
"'onMount'",
"}",
")",
";",
"onMount",
".",
"watch",
"(",
"(",
"{",
"fns",
",",
"element",
"}",
")",
"=>",
"{",
"fns",
".",
"forEach",
"(",
"fn",
"=>",
"{",
"fn",
"(",
"element",
")",
";",
"}",
")",
";",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
963,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
486 | [
"import",
"{",
"Store",
",",
"Event",
",",
"sample",
"}",
"from",
"'effector'",
";",
"export",
"function",
"mutualSample",
"<",
"Mount",
",",
"State",
",",
"T",
">",
"(",
"{",
"mount",
",",
"state",
",",
"onMount",
",",
"onState",
",",
"}",
")",
"{",
"return",
"{",
"onMount",
":",
"sample",
"(",
"{",
"source",
":",
"state",
",",
"clock",
":",
"mount",
",",
"fn",
":",
"onMount",
",",
"greedy",
":",
"true",
",",
"}",
")",
",",
"onState",
":",
"sample",
"(",
"{",
"source",
":",
"mount",
",",
"clock",
":",
"state",
",",
"fn",
":",
"onState",
",",
"greedy",
":",
"true",
",",
"}",
")",
",",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
487 | [
"export",
"function",
"forIn",
"<",
"T",
"extends",
"Record",
"<",
"string",
",",
"unknown",
">",
">",
"(",
"obj",
",",
"cb",
")",
"{",
"for",
"(",
"const",
"key",
"in",
"obj",
")",
"{",
"cb",
"(",
"obj",
"[",
"key",
"]",
",",
"key",
"as",
"any",
")",
";",
"}",
"}"
] | [
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
4,
null,
null,
null,
null,
null,
506,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
488 | [
"import",
"{",
"Event",
",",
"is",
"}",
"from",
"'effector'",
";",
"import",
"{",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../assert'",
";",
"export",
"function",
"handler",
"(",
"map",
")",
";",
"export",
"function",
"handler",
"(",
"options",
",",
"map",
")",
";",
"export",
"function",
"handler",
"(",
"options",
",",
"map",
"?",
")",
"{",
"if",
"(",
"!",
"currentTemplate",
")",
"return",
";",
"const",
"draft",
"=",
"currentTemplate",
".",
"draft",
";",
"assert",
"(",
"draft",
".",
"type",
"===",
"'element'",
",",
"`\"handler\" extension can be used only with element nodes, got \"${",
"draft",
".",
"type",
"}\"`",
")",
";",
"if",
"(",
"map",
"===",
"undefined",
")",
"{",
"map",
"=",
"options",
";",
"options",
"=",
"{",
"}",
";",
"}",
"for",
"(",
"const",
"key",
"in",
"map",
")",
"{",
"assert",
"(",
"is",
".",
"unit",
"(",
"map",
"[",
"key",
"]",
")",
",",
"`handler for \"${",
"key",
"}\" should be event`",
")",
";",
"}",
"const",
"{",
"passive",
"=",
"false",
",",
"capture",
"=",
"false",
",",
"prevent",
"=",
"false",
",",
"stop",
"=",
"false",
",",
"}",
"=",
"options",
";",
"draft",
".",
"handler",
".",
"push",
"(",
"{",
"options",
":",
"{",
"prevent",
",",
"stop",
",",
"}",
",",
"domConfig",
":",
"{",
"passive",
":",
"prevent",
"?",
"false",
":",
"passive",
",",
"capture",
",",
"}",
",",
"map",
",",
"}",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
20,
null,
null,
null,
null,
4,
null,
6,
null,
20,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
489 | [
"import",
"type",
"{",
"Store",
",",
"Event",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"PropertyMap",
",",
"StoreOrData",
",",
"DOMProperty",
",",
"StylePropertyMap",
",",
"}",
"from",
"'../index.h'",
";",
"import",
"{",
"escapeTag",
"}",
"from",
"'../bindings'",
";",
"import",
"{",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"assertClosure",
"}",
"from",
"'../assert'",
";",
"import",
"{",
"handler",
"}",
"from",
"'./handler'",
";",
"export",
"function",
"spec",
"(",
"config",
")",
"{",
"assertClosure",
"(",
"currentTemplate",
",",
"'spec'",
")",
";",
"const",
"draft",
"=",
"currentTemplate",
".",
"draft",
";",
"switch",
"(",
"draft",
".",
"type",
")",
"{",
"case",
"'list'",
":",
"if",
"(",
"config",
".",
"visible",
")",
"draft",
".",
"itemVisible",
"=",
"config",
".",
"visible",
";",
"return",
";",
"case",
"'listItem'",
":",
"case",
"'using'",
":",
"case",
"'route'",
":",
"case",
"'rec'",
":",
"case",
"'recItem'",
":",
"case",
"'block'",
":",
"case",
"'blockItem'",
":",
"return",
";",
"}",
"if",
"(",
"config",
".",
"attr",
")",
"draft",
".",
"attr",
".",
"push",
"(",
"config",
".",
"attr",
")",
";",
"if",
"(",
"config",
".",
"data",
")",
"draft",
".",
"data",
".",
"push",
"(",
"config",
".",
"data",
")",
";",
"if",
"(",
"'text'",
"in",
"config",
")",
"{",
"const",
"text",
"=",
"config",
".",
"text",
";",
"const",
"firstIndex",
"=",
"draft",
".",
"childCount",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"text",
")",
")",
"{",
"draft",
".",
"text",
".",
"push",
"(",
"...",
"text",
".",
"map",
"(",
"(",
"value",
",",
"i",
")",
"=>",
"(",
"{",
"index",
":",
"i",
"+",
"firstIndex",
",",
"value",
",",
"}",
")",
")",
")",
";",
"draft",
".",
"childCount",
"+=",
"text",
".",
"length",
";",
"}",
"else",
"{",
"draft",
".",
"text",
".",
"push",
"(",
"{",
"index",
":",
"firstIndex",
",",
"value",
":",
"text",
"!",
",",
"}",
")",
";",
"draft",
".",
"childCount",
"+=",
"1",
";",
"}",
"}",
"if",
"(",
"config",
".",
"style",
")",
"{",
"const",
"escaped",
"=",
"{",
"}",
"as",
"StylePropertyMap",
";",
"for",
"(",
"const",
"field",
"in",
"config",
".",
"style",
")",
"{",
"escaped",
"[",
"escapeTag",
"(",
"field",
")",
"]",
"=",
"config",
".",
"style",
"[",
"field",
"]",
";",
"}",
"draft",
".",
"style",
".",
"push",
"(",
"escaped",
")",
";",
"}",
"if",
"(",
"config",
".",
"styleVar",
")",
"draft",
".",
"styleVar",
".",
"push",
"(",
"config",
".",
"styleVar",
")",
";",
"if",
"(",
"config",
".",
"visible",
")",
"draft",
".",
"visible",
"=",
"config",
".",
"visible",
";",
"if",
"(",
"config",
".",
"handler",
")",
"{",
"const",
"handlerDef",
"=",
"config",
".",
"handler",
";",
"if",
"(",
"typeof",
"handlerDef",
".",
"on",
"===",
"'object'",
")",
"{",
"handler",
"(",
"handlerDef",
".",
"config",
"||",
"{",
"}",
",",
"handlerDef",
".",
"on",
")",
";",
"}",
"else",
"{",
"handler",
"(",
"handlerDef",
")",
";",
"}",
"}",
"if",
"(",
"config",
".",
"ɔ",
")",
"{",
"spec",
"(",
"config",
".",
"ɔ",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
20,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
490 | [
"import",
"{",
"Store",
",",
"Event",
",",
"is",
",",
"launch",
",",
"createEvent",
",",
"sample",
",",
"merge",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"StateRef",
"}",
"from",
"'../../effector/index.h'",
";",
"import",
"type",
"{",
"DOMElement",
",",
"ElementDraft",
",",
"NSType",
",",
"PropertyMap",
",",
"StoreOrData",
",",
"DOMProperty",
",",
"StylePropertyMap",
",",
"Leaf",
",",
"LeafDataElement",
",",
"Template",
",",
"HandlerRecord",
",",
"PropertyOperationDef",
",",
"PropertyOperationKind",
",",
"}",
"from",
"'../index.h'",
";",
"import",
"type",
"{",
"ElementBlock",
",",
"TextBlock",
"}",
"from",
"'../relation.h'",
";",
"import",
"{",
"pushOpToQueue",
",",
"forceSetOpValue",
",",
"createOp",
"}",
"from",
"'../plan'",
";",
"import",
"{",
"applyStyle",
",",
"applyStyleVar",
",",
"applyDataAttr",
",",
"applyAttr",
",",
"applyText",
",",
"applyStaticOps",
",",
"}",
"from",
"'../bindings'",
";",
"import",
"{",
"createTemplate",
",",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"findParentDOMElement",
",",
"findPreviousVisibleSibling",
",",
"findPreviousVisibleSiblingBlock",
",",
"}",
"from",
"'../search'",
";",
"import",
"{",
"appendChild",
",",
"onMount",
"as",
"onMountSync",
",",
"mountChildTemplates",
",",
"setInParentIndex",
",",
"}",
"from",
"'../mountChild'",
";",
"import",
"{",
"assertClosure",
"}",
"from",
"'../assert'",
";",
"import",
"{",
"mutualSample",
"}",
"from",
"'../mutualSample'",
";",
"import",
"{",
"forIn",
"}",
"from",
"'../forIn'",
";",
"import",
"{",
"spec",
"}",
"from",
"'./spec'",
";",
"function",
"createPropsOp",
"<",
"T",
",",
"S",
">",
"(",
"draft",
",",
"{",
"initCtx",
",",
"runOp",
",",
"hooks",
":",
"{",
"onMount",
",",
"onState",
"}",
",",
"}",
")",
"{",
"const",
"opID",
"=",
"draft",
".",
"opsAmount",
"++",
";",
"onMount",
".",
"watch",
"(",
"(",
"{",
"value",
",",
"leaf",
"}",
")",
"=>",
"{",
"const",
"op",
"=",
"createOp",
"(",
"{",
"value",
",",
"priority",
":",
"'props'",
",",
"runOp",
"(",
"value",
")",
"{",
"runOp",
"(",
"value",
",",
"ctx",
")",
";",
"}",
",",
"group",
":",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"group",
",",
"}",
")",
";",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"group",
".",
"ops",
"[",
"opID",
"]",
"=",
"op",
";",
"const",
"ctx",
"=",
"initCtx",
"(",
"value",
",",
"leaf",
")",
";",
"}",
")",
";",
"onState",
".",
"watch",
"(",
"(",
"{",
"value",
",",
"leaf",
"}",
")",
"=>",
"{",
"pushOpToQueue",
"(",
"value",
",",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"group",
".",
"ops",
"[",
"opID",
"]",
")",
";",
"}",
")",
";",
"}",
"const",
"syncOperations",
"=",
"[",
"{",
"type",
":",
"'attr'",
",",
"field",
":",
"'value'",
"}",
",",
"{",
"type",
":",
"'attr'",
",",
"field",
":",
"'checked'",
"}",
",",
"{",
"type",
":",
"'attr'",
",",
"field",
":",
"'min'",
"}",
",",
"{",
"type",
":",
"'attr'",
",",
"field",
":",
"'max'",
"}",
",",
"]",
";",
"const",
"propertyOperationBinding",
"=",
"{",
"attr",
":",
"applyAttr",
",",
"data",
":",
"applyDataAttr",
",",
"style",
":",
"applyStyle",
",",
"styleVar",
":",
"applyStyleVar",
",",
"}",
";",
"const",
"readElement",
"=",
"(",
"leaf",
")",
"=>",
"(",
"leaf",
".",
"data",
"as",
"LeafDataElement",
")",
".",
"block",
".",
"value",
";",
"/** operation family for things represented as <el \"thing\"=\"value\" /> */",
"function",
"propertyMapToOpDef",
"(",
"draft",
",",
"type",
",",
"ops",
")",
"{",
"draft",
"[",
"type",
"]",
".",
"forEach",
"(",
"record",
"=>",
"{",
"forIn",
"(",
"record",
"as",
"unknown",
"as",
"PropertyMap",
",",
"(",
"value",
",",
"key",
")",
"=>",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"'data'",
":",
"case",
"'styleVar'",
":",
"ops",
"[",
"type",
"]",
"[",
"key",
"]",
"=",
"value",
";",
"break",
";",
"case",
"'attr'",
":",
"ops",
".",
"attr",
"[",
"key",
"===",
"'xlink:href'",
"?",
"'href'",
":",
"key",
"]",
"=",
"value",
";",
"break",
";",
"case",
"'style'",
":",
"if",
"(",
"key",
".",
"startsWith",
"(",
"'--'",
")",
")",
"{",
"ops",
".",
"styleVar",
"[",
"key",
".",
"slice",
"(",
"2",
")",
"]",
"=",
"value",
";",
"}",
"else",
"{",
"ops",
".",
"style",
"[",
"key",
"]",
"=",
"value",
";",
"}",
"break",
";",
"}",
"}",
")",
";",
"}",
")",
";",
"}",
"function",
"installTextNode",
"(",
"leaf",
",",
"value",
",",
"childIndex",
")",
"{",
"const",
"parentBlock",
"=",
"leaf",
".",
"data",
".",
"block",
"as",
"ElementBlock",
";",
"const",
"textBlock",
"=",
"{",
"type",
":",
"'text'",
",",
"parent",
":",
"parentBlock",
",",
"visible",
":",
"false",
",",
"index",
":",
"childIndex",
",",
"value",
":",
"null",
",",
"}",
";",
"parentBlock",
".",
"child",
"[",
"childIndex",
"]",
"=",
"textBlock",
";",
"if",
"(",
"leaf",
".",
"hydration",
")",
"{",
"const",
"siblingBlock",
"=",
"findPreviousVisibleSiblingBlock",
"(",
"textBlock",
")",
";",
"if",
"(",
"siblingBlock",
")",
"{",
"switch",
"(",
"siblingBlock",
".",
"type",
")",
"{",
"case",
"'text'",
":",
"{",
"textBlock",
".",
"value",
"=",
"leaf",
".",
"root",
".",
"env",
".",
"document",
".",
"createTextNode",
"(",
"value",
")",
";",
"siblingBlock",
".",
"value",
".",
"after",
"(",
"textBlock",
".",
"value",
")",
";",
"break",
";",
"}",
"case",
"'element'",
":",
"{",
"textBlock",
".",
"value",
"=",
"siblingBlock",
".",
"value",
".",
"nextSibling",
"!",
"as",
"Text",
";",
"applyText",
"(",
"textBlock",
".",
"value",
",",
"value",
")",
";",
"break",
";",
"}",
"}",
"}",
"else",
"{",
"const",
"parentElement",
"=",
"findParentDOMElement",
"(",
"textBlock",
")",
";",
"textBlock",
".",
"value",
"=",
"parentElement",
"!",
".",
"firstChild",
"!",
"as",
"Text",
";",
"applyText",
"(",
"textBlock",
".",
"value",
",",
"value",
")",
";",
"}",
"textBlock",
".",
"visible",
"=",
"true",
";",
"}",
"else",
"{",
"textBlock",
".",
"value",
"=",
"leaf",
".",
"root",
".",
"env",
".",
"document",
".",
"createTextNode",
"(",
"value",
")",
";",
"appendChild",
"(",
"textBlock",
")",
";",
"}",
"return",
"textBlock",
";",
"}",
"function",
"processStoreRef",
"(",
"store",
")",
"{",
"const",
"ref",
"=",
"store",
".",
"stateRef",
";",
"const",
"templ",
"=",
"currentTemplate",
"!",
";",
"if",
"(",
"!",
"templ",
".",
"plain",
".",
"includes",
"(",
"ref",
")",
"&&",
"!",
"templ",
".",
"closure",
".",
"includes",
"(",
"ref",
")",
")",
"{",
"templ",
".",
"closure",
".",
"push",
"(",
"ref",
")",
";",
"}",
"}",
"export",
"function",
"h",
"(",
"tag",
")",
";",
"export",
"function",
"h",
"(",
"tag",
",",
"cb",
")",
";",
"export",
"function",
"h",
"(",
"tag",
",",
"spec",
")",
";",
"export",
"function",
"h",
"(",
"tag",
",",
"opts",
"?",
")",
"{",
"let",
"hasCb",
"=",
"false",
";",
"let",
"hasOpts",
"=",
"false",
";",
"let",
"cb",
";",
"if",
"(",
"typeof",
"opts",
"===",
"'function'",
")",
"{",
"hasCb",
"=",
"true",
";",
"cb",
"=",
"opts",
";",
"}",
"else",
"{",
"if",
"(",
"opts",
")",
"{",
"hasOpts",
"=",
"true",
";",
"if",
"(",
"opts",
".",
"fn",
")",
"{",
"hasCb",
"=",
"true",
";",
"cb",
"=",
"opts",
".",
"fn",
";",
"}",
"if",
"(",
"opts",
".",
"ɔ",
")",
"{",
"if",
"(",
"typeof",
"opts",
".",
"ɔ",
"===",
"'function'",
")",
"{",
"hasCb",
"=",
"true",
";",
"cb",
"=",
"opts",
".",
"ɔ",
";",
"}",
"else",
"if",
"(",
"typeof",
"opts",
".",
"ɔ",
".",
"fn",
"===",
"'function'",
")",
"{",
"hasCb",
"=",
"true",
";",
"cb",
"=",
"opts",
".",
"ɔ",
".",
"fn",
";",
"}",
"}",
"}",
"}",
"assertClosure",
"(",
"currentTemplate",
",",
"'h'",
")",
";",
"const",
"env",
"=",
"currentTemplate",
".",
"env",
";",
"const",
"parentNS",
"=",
"currentTemplate",
".",
"namespace",
";",
"let",
"ns",
"=",
"parentNS",
";",
"let",
"type",
"=",
"'html'",
";",
"ns",
"=",
"type",
"=",
"parentNS",
"===",
"'svg'",
"?",
"'svg'",
":",
"'html'",
";",
"if",
"(",
"tag",
"===",
"'svg'",
")",
"{",
"type",
"=",
"'svg'",
";",
"ns",
"=",
"'svg'",
";",
"}",
"let",
"node",
";",
"if",
"(",
"!",
"currentTemplate",
".",
"isBlock",
")",
"{",
"node",
"=",
"type",
"===",
"'svg'",
"?",
"env",
".",
"document",
".",
"createElementNS",
"(",
"'http://www.w3.org/2000/svg'",
",",
"tag",
")",
":",
"env",
".",
"document",
".",
"createElement",
"(",
"tag",
")",
";",
"}",
"const",
"stencil",
"=",
"node",
"!",
";",
"const",
"draft",
"=",
"{",
"type",
":",
"'element'",
",",
"tag",
",",
"attr",
":",
"[",
"]",
",",
"data",
":",
"[",
"]",
",",
"text",
":",
"[",
"]",
",",
"style",
":",
"[",
"]",
",",
"styleVar",
":",
"[",
"]",
",",
"handler",
":",
"[",
"]",
",",
"stencil",
",",
"seq",
":",
"[",
"]",
",",
"staticSeq",
":",
"[",
"]",
",",
"childTemplates",
":",
"[",
"]",
",",
"childCount",
":",
"0",
",",
"inParentIndex",
":",
"-",
"1",
",",
"opsAmount",
":",
"1",
",",
"node",
":",
"[",
"]",
",",
"}",
";",
"if",
"(",
"parentNS",
"===",
"'foreignObject'",
")",
"{",
"draft",
".",
"attr",
".",
"push",
"(",
"{",
"xmlns",
":",
"'http://www.w3.org/1999/xhtml'",
",",
"}",
")",
";",
"ns",
"=",
"'html'",
";",
"}",
"else",
"if",
"(",
"tag",
"===",
"'svg'",
")",
"{",
"draft",
".",
"attr",
".",
"push",
"(",
"{",
"xmlns",
":",
"'http://www.w3.org/2000/svg'",
",",
"}",
")",
";",
"ns",
"=",
"'svg'",
";",
"}",
"else",
"if",
"(",
"tag",
"===",
"'foreignObject'",
")",
"{",
"ns",
"=",
"'foreignObject'",
";",
"}",
"const",
"elementTemplate",
"=",
"createTemplate",
"(",
"{",
"name",
":",
"'element'",
",",
"draft",
",",
"isSvgRoot",
":",
"tag",
"===",
"'svg'",
",",
"namespace",
":",
"ns",
",",
"fn",
"(",
"_",
",",
"{",
"mount",
"}",
")",
"{",
"const",
"domElementCreated",
"=",
"createEvent",
"<",
"Leaf",
">",
"(",
"{",
"named",
":",
"'domElementCreated'",
"}",
")",
";",
"if",
"(",
"hasCb",
")",
"{",
"cb",
"(",
")",
";",
"}",
"if",
"(",
"hasOpts",
")",
"{",
"spec",
"(",
"opts",
")",
";",
"}",
"if",
"(",
"is",
".",
"unit",
"(",
"draft",
".",
"visible",
")",
")",
"{",
"draft",
".",
"seq",
".",
"push",
"(",
"{",
"type",
":",
"'visible'",
",",
"value",
":",
"draft",
".",
"visible",
"}",
")",
";",
"processStoreRef",
"(",
"draft",
".",
"visible",
")",
";",
"}",
"const",
"ops",
"=",
"{",
"attr",
":",
"{",
"}",
",",
"data",
":",
"{",
"}",
",",
"style",
":",
"{",
"}",
",",
"styleVar",
":",
"{",
"}",
",",
"}",
";",
"propertyMapToOpDef",
"(",
"draft",
",",
"'attr'",
",",
"ops",
")",
";",
"propertyMapToOpDef",
"(",
"draft",
",",
"'data'",
",",
"ops",
")",
";",
"propertyMapToOpDef",
"(",
"draft",
",",
"'style'",
",",
"ops",
")",
";",
"propertyMapToOpDef",
"(",
"draft",
",",
"'styleVar'",
",",
"ops",
")",
";",
"forIn",
"(",
"ops",
",",
"(",
"opsMap",
",",
"type",
")",
"=>",
"{",
"forIn",
"(",
"opsMap",
"as",
"unknown",
"as",
"PropertyMap",
",",
"(",
"value",
",",
"field",
")",
"=>",
"{",
"if",
"(",
"is",
".",
"unit",
"(",
"value",
")",
")",
"{",
"draft",
".",
"seq",
".",
"push",
"(",
"{",
"type",
",",
"field",
",",
"value",
"}",
")",
";",
"processStoreRef",
"(",
"value",
")",
";",
"}",
"else",
"{",
"draft",
".",
"staticSeq",
".",
"push",
"(",
"{",
"type",
",",
"field",
",",
"value",
"}",
")",
";",
"}",
"}",
")",
";",
"}",
")",
";",
"draft",
".",
"text",
".",
"forEach",
"(",
"item",
"=>",
"{",
"if",
"(",
"item",
".",
"value",
"===",
"null",
")",
"return",
";",
"if",
"(",
"is",
".",
"unit",
"(",
"item",
".",
"value",
")",
")",
"{",
"draft",
".",
"seq",
".",
"push",
"(",
"{",
"type",
":",
"'dynamicText'",
",",
"value",
":",
"item",
".",
"value",
",",
"childIndex",
":",
"item",
".",
"index",
",",
"}",
")",
";",
"processStoreRef",
"(",
"item",
".",
"value",
")",
";",
"}",
"else",
"{",
"draft",
".",
"seq",
".",
"push",
"(",
"{",
"type",
":",
"'staticText'",
",",
"value",
":",
"String",
"(",
"item",
".",
"value",
")",
",",
"childIndex",
":",
"item",
".",
"index",
",",
"}",
")",
";",
"}",
"}",
")",
";",
"draft",
".",
"handler",
".",
"forEach",
"(",
"item",
"=>",
"{",
"forIn",
"(",
"item",
".",
"map",
",",
"(",
"handler",
",",
"key",
")",
"=>",
"{",
"draft",
".",
"seq",
".",
"push",
"(",
"{",
"type",
":",
"'handler'",
",",
"for",
":",
"key",
",",
"handler",
",",
"options",
":",
"item",
".",
"options",
",",
"domConfig",
":",
"item",
".",
"domConfig",
",",
"}",
")",
";",
"}",
")",
";",
"}",
")",
";",
"if",
"(",
"stencil",
")",
"applyStaticOps",
"(",
"stencil",
",",
"draft",
".",
"staticSeq",
")",
";",
"draft",
".",
"seq",
".",
"forEach",
"(",
"item",
"=>",
"{",
"switch",
"(",
"item",
".",
"type",
")",
"{",
"case",
"'visible'",
":",
"{",
"const",
"{",
"onMount",
",",
"onState",
"}",
"=",
"mutualSample",
"(",
"{",
"mount",
",",
"state",
":",
"item",
".",
"value",
",",
"onMount",
":",
"(",
"value",
",",
"leaf",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
",",
"hydration",
":",
"leaf",
".",
"hydration",
",",
"}",
")",
",",
"onState",
":",
"(",
"leaf",
",",
"value",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
",",
"hydration",
":",
"false",
"}",
")",
",",
"}",
")",
";",
"onMount",
".",
"watch",
"(",
"(",
"{",
"leaf",
",",
"value",
",",
"hydration",
"}",
")",
"=>",
"{",
"const",
"leafData",
"=",
"leaf",
".",
"data",
"as",
"LeafDataElement",
";",
"const",
"visibleOp",
"=",
"leafData",
".",
"ops",
".",
"visible",
";",
"const",
"parentBlock",
"=",
"leafData",
".",
"block",
";",
"if",
"(",
"hydration",
")",
"{",
"forceSetOpValue",
"(",
"value",
",",
"visibleOp",
")",
";",
"if",
"(",
"value",
")",
"{",
"const",
"visibleSibling",
"=",
"findPreviousVisibleSibling",
"(",
"parentBlock",
")",
";",
"let",
"foundElement",
";",
"if",
"(",
"visibleSibling",
")",
"{",
"foundElement",
"=",
"visibleSibling",
".",
"nextSibling",
"!",
"as",
"DOMElement",
";",
"}",
"else",
"{",
"foundElement",
"=",
"findParentDOMElement",
"(",
"parentBlock",
")",
"!",
".",
"firstChild",
"!",
"as",
"DOMElement",
";",
"}",
"if",
"(",
"foundElement",
".",
"nodeName",
"===",
"'#text'",
")",
"{",
"const",
"emptyText",
"=",
"foundElement",
";",
"foundElement",
"=",
"foundElement",
".",
"nextSibling",
"!",
"as",
"DOMElement",
";",
"emptyText",
".",
"remove",
"(",
")",
";",
"}",
"parentBlock",
".",
"value",
"=",
"foundElement",
";",
"parentBlock",
".",
"visible",
"=",
"true",
";",
"}",
"}",
"const",
"svgRoot",
"=",
"elementTemplate",
".",
"isSvgRoot",
"?",
"(",
"parentBlock",
".",
"value",
"as",
"SVGSVGElement",
")",
":",
"null",
";",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"parentBlock",
",",
"leaf",
",",
"node",
":",
"parentBlock",
".",
"value",
",",
"svgRoot",
",",
"}",
")",
";",
"if",
"(",
"value",
")",
"{",
"if",
"(",
"leafData",
".",
"needToCallNode",
")",
"{",
"leafData",
".",
"needToCallNode",
"=",
"false",
";",
"launch",
"(",
"{",
"target",
":",
"onMountSync",
",",
"params",
":",
"{",
"element",
":",
"leafData",
".",
"block",
".",
"value",
",",
"fns",
":",
"draft",
".",
"node",
",",
"}",
",",
"page",
":",
"leaf",
",",
"defer",
":",
"true",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"}",
"launch",
"(",
"{",
"target",
":",
"domElementCreated",
",",
"params",
":",
"leaf",
",",
"defer",
":",
"true",
",",
"page",
":",
"leaf",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
")",
";",
"merge",
"(",
"[",
"onState",
",",
"onMount",
"]",
")",
".",
"watch",
"(",
"(",
"{",
"leaf",
",",
"value",
",",
"hydration",
"}",
")",
"=>",
"{",
"const",
"leafData",
"=",
"leaf",
".",
"data",
"as",
"LeafDataElement",
";",
"const",
"visibleOp",
"=",
"leafData",
".",
"ops",
".",
"visible",
";",
"if",
"(",
"!",
"hydration",
")",
"{",
"pushOpToQueue",
"(",
"value",
",",
"visibleOp",
")",
";",
"}",
"}",
")",
";",
"break",
";",
"}",
"case",
"'attr'",
":",
"case",
"'data'",
":",
"case",
"'style'",
":",
"case",
"'styleVar'",
":",
"{",
"const",
"fn",
"=",
"propertyOperationBinding",
"[",
"item",
".",
"type",
"]",
";",
"const",
"immediate",
"=",
"syncOperations",
".",
"some",
"(",
"(",
"{",
"type",
",",
"field",
"}",
")",
"=>",
"item",
".",
"type",
"===",
"type",
"&&",
"item",
".",
"field",
"===",
"field",
")",
";",
"const",
"hooks",
"=",
"mutualSample",
"(",
"{",
"mount",
":",
"domElementCreated",
",",
"state",
":",
"item",
".",
"value",
",",
"onMount",
":",
"(",
"value",
",",
"leaf",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
"}",
")",
",",
"onState",
":",
"(",
"leaf",
",",
"value",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
"}",
")",
",",
"}",
")",
";",
"if",
"(",
"immediate",
")",
"{",
"merge",
"(",
"[",
"hooks",
".",
"onState",
",",
"hooks",
".",
"onMount",
"]",
")",
".",
"watch",
"(",
"(",
"{",
"leaf",
",",
"value",
"}",
")",
"=>",
"{",
"fn",
"(",
"readElement",
"(",
"leaf",
")",
",",
"item",
".",
"field",
",",
"value",
")",
";",
"}",
")",
";",
"}",
"else",
"{",
"createPropsOp",
"(",
"draft",
",",
"{",
"initCtx",
"(",
"value",
",",
"leaf",
")",
"{",
"const",
"element",
"=",
"readElement",
"(",
"leaf",
")",
";",
"fn",
"(",
"element",
",",
"item",
".",
"field",
",",
"value",
")",
";",
"return",
"element",
";",
"}",
",",
"runOp",
"(",
"value",
",",
"element",
")",
"{",
"fn",
"(",
"element",
",",
"item",
".",
"field",
",",
"value",
")",
";",
"}",
",",
"hooks",
",",
"}",
")",
";",
"}",
"break",
";",
"}",
"case",
"'dynamicText'",
":",
"createPropsOp",
"(",
"draft",
",",
"{",
"initCtx",
"(",
"value",
",",
"leaf",
")",
"{",
"return",
"installTextNode",
"(",
"leaf",
",",
"value",
",",
"item",
".",
"childIndex",
")",
";",
"}",
",",
"runOp",
"(",
"value",
",",
"ctx",
")",
"{",
"applyText",
"(",
"ctx",
".",
"value",
",",
"value",
")",
";",
"}",
",",
"hooks",
":",
"mutualSample",
"(",
"{",
"mount",
":",
"domElementCreated",
",",
"state",
":",
"item",
".",
"value",
",",
"onMount",
":",
"(",
"value",
",",
"leaf",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
":",
"String",
"(",
"value",
")",
"}",
")",
",",
"onState",
":",
"(",
"leaf",
",",
"value",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
":",
"String",
"(",
"value",
")",
"}",
")",
",",
"}",
")",
",",
"}",
")",
";",
"break",
";",
"case",
"'staticText'",
":",
"domElementCreated",
".",
"watch",
"(",
"leaf",
"=>",
"{",
"installTextNode",
"(",
"leaf",
",",
"item",
".",
"value",
",",
"item",
".",
"childIndex",
")",
";",
"}",
")",
";",
"break",
";",
"case",
"'handler'",
":",
"{",
"const",
"handlerTemplate",
"=",
"item",
".",
"handler",
".",
"graphite",
".",
"meta",
".",
"nativeTemplate",
"||",
"null",
";",
"domElementCreated",
".",
"watch",
"(",
"leaf",
"=>",
"{",
"let",
"page",
"=",
"null",
";",
"if",
"(",
"handlerTemplate",
")",
"{",
"let",
"handlerPageFound",
"=",
"false",
";",
"let",
"currentPage",
"=",
"leaf",
";",
"while",
"(",
"!",
"handlerPageFound",
"&&",
"currentPage",
")",
"{",
"if",
"(",
"currentPage",
".",
"template",
"===",
"handlerTemplate",
")",
"{",
"handlerPageFound",
"=",
"true",
";",
"page",
"=",
"currentPage",
";",
"}",
"else",
"{",
"currentPage",
"=",
"currentPage",
".",
"parent",
";",
"}",
"}",
"}",
"else",
"{",
"page",
"=",
"null",
";",
"}",
"readElement",
"(",
"leaf",
")",
".",
"addEventListener",
"(",
"item",
".",
"for",
",",
"value",
"=>",
"{",
"if",
"(",
"item",
".",
"options",
".",
"prevent",
")",
"value",
".",
"preventDefault",
"(",
")",
";",
"if",
"(",
"item",
".",
"options",
".",
"stop",
")",
"value",
".",
"stopPropagation",
"(",
")",
";",
"launch",
"(",
"{",
"target",
":",
"item",
".",
"handler",
",",
"params",
":",
"value",
",",
"page",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
",",
"item",
".",
"domConfig",
")",
";",
"}",
")",
";",
"break",
";",
"}",
"}",
"}",
")",
";",
"mount",
".",
"watch",
"(",
"leaf",
"=>",
"{",
"const",
"leafData",
"=",
"leaf",
".",
"data",
"as",
"LeafDataElement",
";",
"if",
"(",
"!",
"draft",
".",
"visible",
")",
"{",
"const",
"visibleOp",
"=",
"leafData",
".",
"ops",
".",
"visible",
";",
"const",
"parentBlock",
"=",
"leafData",
".",
"block",
";",
"if",
"(",
"leaf",
".",
"hydration",
")",
"{",
"forceSetOpValue",
"(",
"true",
",",
"visibleOp",
")",
";",
"const",
"visibleSibling",
"=",
"findPreviousVisibleSibling",
"(",
"parentBlock",
")",
";",
"let",
"foundElement",
";",
"if",
"(",
"visibleSibling",
")",
"{",
"foundElement",
"=",
"visibleSibling",
".",
"nextSibling",
"!",
"as",
"DOMElement",
";",
"}",
"else",
"{",
"foundElement",
"=",
"findParentDOMElement",
"(",
"parentBlock",
")",
"!",
".",
"firstChild",
"!",
"as",
"DOMElement",
";",
"}",
"if",
"(",
"foundElement",
".",
"nodeName",
"===",
"'#text'",
")",
"{",
"const",
"emptyText",
"=",
"foundElement",
";",
"foundElement",
"=",
"foundElement",
".",
"nextSibling",
"!",
"as",
"DOMElement",
";",
"emptyText",
".",
"remove",
"(",
")",
";",
"}",
"parentBlock",
".",
"value",
"=",
"foundElement",
";",
"parentBlock",
".",
"visible",
"=",
"true",
";",
"}",
"const",
"svgRoot",
"=",
"elementTemplate",
".",
"isSvgRoot",
"?",
"(",
"parentBlock",
".",
"value",
"as",
"SVGSVGElement",
")",
":",
"null",
";",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"parentBlock",
",",
"leaf",
",",
"node",
":",
"parentBlock",
".",
"value",
",",
"svgRoot",
",",
"}",
")",
";",
"launch",
"(",
"{",
"target",
":",
"domElementCreated",
",",
"params",
":",
"leaf",
",",
"defer",
":",
"true",
",",
"page",
":",
"leaf",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"if",
"(",
"leaf",
".",
"hydration",
")",
"{",
"if",
"(",
"leafData",
".",
"needToCallNode",
")",
"{",
"leafData",
".",
"needToCallNode",
"=",
"false",
";",
"launch",
"(",
"{",
"target",
":",
"onMountSync",
",",
"params",
":",
"{",
"element",
":",
"leafData",
".",
"block",
".",
"value",
",",
"fns",
":",
"draft",
".",
"node",
",",
"}",
",",
"page",
":",
"leaf",
",",
"defer",
":",
"true",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"}",
"else",
"{",
"pushOpToQueue",
"(",
"true",
",",
"visibleOp",
")",
";",
"}",
"}",
"}",
")",
";",
"}",
",",
"env",
",",
"}",
")",
";",
"setInParentIndex",
"(",
"elementTemplate",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
491 | [
"import",
"type",
"{",
"Leaf",
",",
"LeafDataRoute",
",",
"RouteDraft",
",",
"RecDraft",
",",
"LeafDataRec",
",",
"BlockDraft",
",",
"BlockItemDraft",
",",
"LeafDataBlock",
",",
"LeafDataBlockItem",
",",
"LeafDataUsing",
",",
"LeafDataListItem",
",",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"mountChild",
",",
"mountChildTemplates",
"}",
"from",
"'./mountChild'",
";",
"export",
"const",
"mountFn",
"=",
"{",
"using",
"(",
"leaf",
")",
"{",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataUsing",
";",
"const",
"block",
"=",
"data",
".",
"block",
";",
"mountChildTemplates",
"(",
"data",
".",
"draft",
",",
"{",
"parentBlockFragment",
":",
"block",
",",
"leaf",
",",
"}",
")",
";",
"}",
",",
"routeItem",
"(",
"leaf",
")",
"{",
"const",
"draft",
"=",
"leaf",
".",
"draft",
"as",
"RouteDraft",
";",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataRoute",
";",
"data",
".",
"block",
".",
"visible",
"=",
"true",
";",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"data",
".",
"block",
",",
"leaf",
",",
"}",
")",
";",
"}",
",",
"block",
"(",
"leaf",
")",
"{",
"const",
"draft",
"=",
"leaf",
".",
"draft",
"as",
"BlockDraft",
";",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataBlock",
";",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"data",
".",
"block",
",",
"leaf",
",",
"}",
")",
";",
"}",
",",
"blockItem",
"(",
"leaf",
")",
"{",
"const",
"draft",
"=",
"leaf",
".",
"draft",
"as",
"BlockItemDraft",
";",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataBlockItem",
";",
"mountChild",
"(",
"{",
"parentBlockFragment",
":",
"data",
".",
"block",
",",
"leaf",
",",
"actor",
":",
"draft",
".",
"itemOf",
",",
"}",
")",
";",
"}",
",",
"rec",
"(",
"leaf",
")",
"{",
"const",
"draft",
"=",
"leaf",
".",
"draft",
"as",
"RecDraft",
";",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataRec",
";",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"data",
".",
"block",
",",
"leaf",
",",
"}",
")",
";",
"}",
",",
"listItem",
"(",
"leaf",
")",
"{",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataListItem",
";",
"const",
"block",
"=",
"data",
".",
"block",
";",
"block",
".",
"visible",
"=",
"true",
";",
"block",
".",
"childInitialized",
"=",
"true",
";",
"mountChildTemplates",
"(",
"data",
".",
"listDraft",
",",
"{",
"parentBlockFragment",
":",
"block",
",",
"leaf",
",",
"}",
")",
";",
"}",
",",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
4,
null,
4077,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
492 | [
"import",
"type",
"{",
"Scope",
"}",
"from",
"'../../effector/unit.h'",
";",
"import",
"type",
"{",
"DOMElement",
",",
"NSType",
",",
"UsingDraft",
",",
"Leaf",
",",
"Root",
",",
"Template",
",",
"}",
"from",
"'../index.h'",
";",
"import",
"type",
"{",
"UsingBlock",
"}",
"from",
"'../relation.h'",
";",
"import",
"{",
"createOpGroup",
",",
"createOpQueue",
"}",
"from",
"'../plan'",
";",
"import",
"{",
"createTemplate",
",",
"spawn",
",",
"currentLeaf",
"}",
"from",
"'../template'",
";",
"import",
"{",
"assert",
"}",
"from",
"'../assert'",
";",
"import",
"{",
"mountFn",
"}",
"from",
"'../mountFn'",
";",
"function",
"getDefaultEnv",
"(",
")",
"{",
"if",
"(",
"typeof",
"document",
"!==",
"'undefined'",
")",
"return",
"{",
"document",
"}",
";",
"throw",
"Error",
"(",
"'your environment has no document'",
")",
";",
"}",
"export",
"function",
"using",
"(",
"node",
",",
"cb",
")",
";",
"export",
"function",
"using",
"(",
"node",
",",
"opts",
")",
";",
"export",
"function",
"using",
"(",
"node",
",",
"opts",
")",
"{",
"let",
"cb",
";",
"let",
"onComplete",
";",
"let",
"env",
";",
"let",
"hydrate",
";",
"let",
"onRoot",
";",
"let",
"scope",
";",
"if",
"(",
"typeof",
"opts",
"===",
"'function'",
")",
"{",
"cb",
"=",
"opts",
";",
"env",
"=",
"getDefaultEnv",
"(",
")",
";",
"hydrate",
"=",
"false",
";",
"}",
"else",
"if",
"(",
"opts",
")",
"{",
"cb",
"=",
"opts",
".",
"fn",
";",
"env",
"=",
"opts",
".",
"env",
"?",
"opts",
".",
"env",
":",
"getDefaultEnv",
"(",
")",
";",
"hydrate",
"=",
"opts",
".",
"hydrate",
";",
"onComplete",
"=",
"opts",
".",
"onComplete",
";",
"onRoot",
"=",
"opts",
".",
"onRoot",
";",
"scope",
"=",
"opts",
".",
"scope",
";",
"}",
"else",
"throw",
"Error",
"(",
"'using() second argument is missing'",
")",
";",
"assert",
"(",
"node",
",",
"'using() first argument is missing'",
")",
";",
"const",
"root",
"=",
"{",
"scope",
":",
"scope",
"!",
",",
"env",
",",
"activeSpawns",
":",
"new",
"Set",
"(",
")",
",",
"childSpawns",
":",
"{",
"}",
",",
"leafOps",
":",
"{",
"}",
",",
"}",
";",
"const",
"namespaceURI",
"=",
"node",
".",
"namespaceURI",
";",
"const",
"tag",
"=",
"node",
".",
"tagName",
".",
"toLowerCase",
"(",
")",
";",
"const",
"ns",
"=",
"namespaceURI",
"===",
"'http://www.w3.org/2000/svg'",
"?",
"'svg'",
":",
"tag",
"===",
"'foreignobject'",
"?",
"'foreignObject'",
":",
"'html'",
";",
"const",
"draft",
"=",
"{",
"type",
":",
"'using'",
",",
"childTemplates",
":",
"[",
"]",
",",
"childCount",
":",
"0",
",",
"inParentIndex",
":",
"-",
"1",
",",
"}",
";",
"const",
"usingTemplate",
"=",
"createTemplate",
"(",
"{",
"name",
":",
"'using'",
",",
"draft",
",",
"isSvgRoot",
":",
"tag",
"===",
"'svg'",
",",
"namespace",
":",
"ns",
",",
"fn",
"(",
"_",
",",
"{",
"mount",
"}",
")",
"{",
"cb",
"(",
")",
";",
"mount",
".",
"watch",
"(",
"mountFn",
".",
"using",
")",
";",
"}",
",",
"env",
",",
"}",
")",
";",
"const",
"usingBlock",
"=",
"{",
"type",
":",
"'using'",
",",
"child",
":",
"[",
"]",
",",
"value",
":",
"node",
",",
"}",
";",
"const",
"queue",
"=",
"createOpQueue",
"(",
"{",
"onComplete",
"}",
")",
";",
"const",
"rootLeaf",
"=",
"spawn",
"(",
"usingTemplate",
",",
"{",
"parentLeaf",
":",
"currentLeaf",
"||",
"null",
",",
"mountNode",
":",
"node",
",",
"svgRoot",
":",
"usingTemplate",
".",
"isSvgRoot",
"?",
"(",
"node",
"as",
"SVGSVGElement",
")",
":",
"currentLeaf",
"?",
"currentLeaf",
".",
"svgRoot",
":",
"null",
",",
"leafData",
":",
"{",
"type",
":",
"'using'",
",",
"draft",
",",
"element",
":",
"node",
",",
"block",
":",
"usingBlock",
",",
"}",
",",
"opGroup",
":",
"createOpGroup",
"(",
"queue",
")",
",",
"domSubtree",
":",
"createOpGroup",
"(",
"queue",
")",
",",
"hydration",
":",
"hydrate",
",",
"root",
",",
"}",
")",
";",
"if",
"(",
"onRoot",
")",
"{",
"onRoot",
"(",
"{",
"template",
":",
"usingTemplate",
",",
"leaf",
":",
"rootLeaf",
",",
"}",
")",
";",
"}",
"if",
"(",
"queue",
".",
"onDrain",
"&&",
"!",
"queue",
".",
"rafID",
")",
"{",
"const",
"rs",
"=",
"queue",
".",
"onDrain",
";",
"queue",
".",
"onDrain",
"=",
"null",
";",
"rs",
"(",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
null,
null,
null,
null,
null,
4,
null,
2867,
null,
6,
null,
null,
null,
null,
4,
null,
2867,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
6,
null,
null,
8,
null,
null,
4,
null,
null,
145,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
495,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
42367,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
493 | [
"import",
"{",
"launch",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"Leaf",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"pushOpToQueue",
"}",
"from",
"'./plan'",
";",
"export",
"function",
"iterateChildLeafs",
"(",
"leaf",
",",
"cb",
")",
"{",
"const",
"childSpawns",
"=",
"leaf",
".",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
";",
"for",
"(",
"const",
"key",
"in",
"childSpawns",
")",
"{",
"const",
"childs",
"=",
"childSpawns",
"[",
"key",
"]",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"childs",
".",
"length",
";",
"i",
"++",
")",
"{",
"cb",
"(",
"childs",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"export",
"function",
"changeChildLeafsVisible",
"(",
"visible",
",",
"leaf",
")",
"{",
"const",
"childLeafIterator",
"=",
"(",
"child",
")",
"=>",
"{",
"const",
"data",
"=",
"child",
".",
"data",
";",
"if",
"(",
"visible",
"&&",
"data",
".",
"type",
"===",
"'list'",
"&&",
"data",
".",
"pendingUpdate",
")",
"{",
"const",
"update",
"=",
"data",
".",
"pendingUpdate",
";",
"data",
".",
"pendingUpdate",
"=",
"null",
";",
"launch",
"(",
"{",
"target",
":",
"child",
".",
"template",
".",
"api",
".",
"pendingUpdate",
",",
"params",
":",
"update",
",",
"defer",
":",
"true",
",",
"page",
":",
"child",
",",
"scope",
":",
"child",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"if",
"(",
"visible",
"&&",
"data",
".",
"type",
"===",
"'route'",
")",
"{",
"if",
"(",
"data",
".",
"pendingInit",
")",
"{",
"const",
"update",
"=",
"data",
".",
"pendingInit",
".",
"value",
";",
"data",
".",
"pendingInit",
"=",
"null",
";",
"launch",
"(",
"{",
"target",
":",
"child",
".",
"template",
".",
"api",
".",
"pendingInit",
",",
"params",
":",
"update",
",",
"defer",
":",
"true",
",",
"page",
":",
"child",
",",
"scope",
":",
"child",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"else",
"if",
"(",
"!",
"data",
".",
"block",
".",
"visible",
")",
"return",
";",
"}",
"switch",
"(",
"data",
".",
"type",
")",
"{",
"case",
"'element'",
":",
"pushOpToQueue",
"(",
"visible",
",",
"data",
".",
"ops",
".",
"visible",
")",
";",
"break",
";",
"case",
"'route'",
":",
"case",
"'list'",
":",
"case",
"'list item'",
":",
"iterateChildLeafs",
"(",
"child",
",",
"childLeafIterator",
")",
";",
"break",
";",
"default",
":",
"console",
".",
"log",
"(",
"'unsupported type'",
",",
"data",
".",
"type",
")",
";",
"}",
"}",
";",
"iterateChildLeafs",
"(",
"leaf",
",",
"childLeafIterator",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
4,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
8,
null,
4077,
null,
null,
null,
4,
null,
null,
4077,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
494 | [
"import",
"type",
"{",
"Leaf",
"}",
"from",
"'./index.h'",
";",
"import",
"{",
"pushOpToQueue",
"}",
"from",
"'./plan'",
";",
"import",
"{",
"iterateChildLeafs",
"}",
"from",
"'./iterateChildLeafs'",
";",
"function",
"unmountChildLeafsNoEvent",
"(",
"leaf",
")",
"{",
"leaf",
".",
"root",
".",
"activeSpawns",
".",
"delete",
"(",
"leaf",
".",
"fullID",
")",
";",
"iterateChildLeafs",
"(",
"leaf",
",",
"unmountLeafTree",
")",
";",
"}",
"function",
"unmountOwnSpawn",
"(",
"leaf",
")",
"{",
"removeItem",
"(",
"leaf",
",",
"leaf",
".",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"parent",
"!",
".",
"fullID",
"]",
"[",
"leaf",
".",
"template",
".",
"id",
"]",
")",
";",
"removeItem",
"(",
"leaf",
",",
"leaf",
".",
"template",
".",
"pages",
")",
";",
"}",
"export",
"function",
"unmountLeafTree",
"(",
"leaf",
")",
"{",
"const",
"{",
"data",
",",
"root",
"}",
"=",
"leaf",
";",
"switch",
"(",
"data",
".",
"type",
")",
"{",
"case",
"'element'",
":",
"{",
"removeItem",
"(",
"leaf",
",",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"parent",
"!",
".",
"fullID",
"]",
"[",
"leaf",
".",
"template",
".",
"id",
"]",
")",
";",
"function",
"halt",
"(",
"leaf",
")",
"{",
"root",
".",
"activeSpawns",
".",
"delete",
"(",
"leaf",
".",
"fullID",
")",
";",
"const",
"childSpawns",
"=",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
";",
"delete",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
";",
"delete",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
";",
"removeItem",
"(",
"leaf",
",",
"leaf",
".",
"template",
".",
"pages",
")",
";",
"for",
"(",
"const",
"id",
"in",
"childSpawns",
")",
"{",
"childSpawns",
"[",
"id",
"]",
".",
"forEach",
"(",
"halt",
")",
";",
"}",
"}",
"halt",
"(",
"leaf",
")",
";",
"const",
"visibleOp",
"=",
"data",
".",
"ops",
".",
"visible",
";",
"pushOpToQueue",
"(",
"false",
",",
"visibleOp",
")",
";",
"break",
";",
"}",
"case",
"'list'",
":",
"{",
"const",
"records",
"=",
"data",
".",
"records",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"records",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"item",
"=",
"records",
"[",
"i",
"]",
";",
"if",
"(",
"item",
".",
"instance",
")",
"{",
"unmountLeafTree",
"(",
"item",
".",
"instance",
")",
";",
"}",
"item",
".",
"active",
"=",
"false",
";",
"}",
"leaf",
".",
"root",
".",
"activeSpawns",
".",
"delete",
"(",
"leaf",
".",
"fullID",
")",
";",
"unmountOwnSpawn",
"(",
"leaf",
")",
";",
"break",
";",
"}",
"case",
"'list item'",
":",
"{",
"const",
"listItemBlock",
"=",
"data",
".",
"block",
";",
"removeItem",
"(",
"listItemBlock",
",",
"listItemBlock",
".",
"parent",
".",
"child",
")",
";",
"const",
"leftBlock",
"=",
"listItemBlock",
".",
"left",
";",
"const",
"rightBlock",
"=",
"listItemBlock",
".",
"right",
";",
"if",
"(",
"leftBlock",
")",
"{",
"leftBlock",
".",
"right",
"=",
"rightBlock",
";",
"if",
"(",
"!",
"rightBlock",
"&&",
"listItemBlock",
".",
"parent",
".",
"lastChild",
"===",
"listItemBlock",
")",
"{",
"listItemBlock",
".",
"parent",
".",
"lastChild",
"=",
"leftBlock",
";",
"}",
"}",
"if",
"(",
"rightBlock",
")",
"{",
"rightBlock",
".",
"left",
"=",
"leftBlock",
";",
"}",
"if",
"(",
"!",
"leftBlock",
"&&",
"!",
"rightBlock",
"&&",
"listItemBlock",
".",
"parent",
".",
"lastChild",
"===",
"listItemBlock",
")",
"{",
"listItemBlock",
".",
"parent",
".",
"lastChild",
"=",
"null",
";",
"}",
"listItemBlock",
".",
"left",
"=",
"null",
";",
"listItemBlock",
".",
"right",
"=",
"null",
";",
"unmountChildLeafsNoEvent",
"(",
"leaf",
")",
";",
"unmountOwnSpawn",
"(",
"leaf",
")",
";",
"break",
";",
"}",
"case",
"'route'",
":",
"unmountChildLeafsNoEvent",
"(",
"leaf",
")",
";",
"unmountOwnSpawn",
"(",
"leaf",
")",
";",
"break",
";",
"case",
"'block'",
":",
"case",
"'block item'",
":",
"case",
"'rec'",
":",
"case",
"'rec item'",
":",
"unmountChildLeafsNoEvent",
"(",
"leaf",
")",
";",
"break",
";",
"case",
"'using'",
":",
"break",
";",
"default",
":",
"{",
"const",
"_",
"=",
"data",
";",
"}",
"}",
"delete",
"root",
".",
"childSpawns",
"[",
"leaf",
".",
"fullID",
"]",
";",
"delete",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
";",
"}",
"function",
"removeItem",
"<",
"T",
">",
"(",
"item",
",",
"list",
"?",
")",
"{",
"if",
"(",
"!",
"list",
")",
"return",
";",
"const",
"index",
"=",
"list",
".",
"indexOf",
"(",
"item",
")",
";",
"if",
"(",
"index",
"!==",
"-",
"1",
")",
"{",
"list",
".",
"splice",
"(",
"index",
",",
"1",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2106,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
11,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
495 | [
"import",
"type",
"{",
"Store",
"}",
"from",
"'effector'",
";",
"export",
"function",
"remap",
"<",
"T",
"extends",
"{",
"[",
"field",
"]",
":",
"any",
";",
"}",
",",
"S",
"extends",
"keyof",
"T",
">",
"(",
"store",
",",
"key",
")",
";",
"export",
"function",
"remap",
"<",
"T",
"extends",
"{",
"[",
"field",
"]",
":",
"any",
";",
"}",
",",
"S",
"extends",
"{",
"[",
"field",
"]",
":",
"keyof",
"T",
";",
"}",
"|",
"{",
"[",
"field",
"]",
":",
"keyof",
"T",
";",
"}",
">",
"(",
"store",
",",
"shape",
")",
";",
"export",
"function",
"remap",
"(",
"store",
",",
"shape",
")",
"{",
"if",
"(",
"Array",
".",
"isArray",
"(",
"shape",
")",
")",
"{",
"return",
"shape",
".",
"map",
"(",
"key",
"=>",
"store",
".",
"map",
"(",
"value",
"=>",
"value",
"[",
"key",
"]",
")",
")",
";",
"}",
"if",
"(",
"typeof",
"shape",
"===",
"'object'",
"&&",
"shape",
"!==",
"null",
")",
"{",
"const",
"result",
"=",
"{",
"}",
"as",
"any",
";",
"for",
"(",
"const",
"key",
"in",
"shape",
")",
"{",
"const",
"projectedKey",
"=",
"shape",
"[",
"key",
"]",
";",
"result",
"[",
"key",
"]",
"=",
"store",
".",
"map",
"(",
"typeof",
"projectedKey",
"===",
"'function'",
"?",
"value",
"=>",
"projectedKey",
"(",
"value",
")",
":",
"value",
"=>",
"value",
"[",
"projectedKey",
"]",
")",
";",
"}",
"return",
"result",
";",
"}",
"return",
"store",
".",
"map",
"(",
"value",
"=>",
"value",
"[",
"shape",
"]",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
208,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
208,
null,
null,
null,
null,
6,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
496 | [
"import",
"{",
"Store",
",",
"Event",
",",
"is",
",",
"launch",
",",
"createStore",
",",
"createEvent",
",",
"sample",
",",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"ListItemType",
",",
"ListType",
",",
"LeafDataList",
",",
"Leaf",
"}",
"from",
"'../index.h'",
";",
"import",
"type",
"{",
"LF",
"}",
"from",
"'../relation.h'",
";",
"import",
"{",
"beginMark",
",",
"endMark",
"}",
"from",
"'../platform/mark'",
";",
"import",
"{",
"createOpGroup",
",",
"createAsyncValue",
",",
"stopAsyncValue",
",",
"updateAsyncValue",
",",
"}",
"from",
"'../plan'",
";",
"import",
"{",
"createTemplate",
",",
"spawn",
",",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"mountChildTemplates",
",",
"setInParentIndex",
"}",
"from",
"'../mountChild'",
";",
"import",
"{",
"unmountLeafTree",
"}",
"from",
"'../unmount'",
";",
"import",
"{",
"assertClosure",
"}",
"from",
"'../assert'",
";",
"import",
"{",
"mountFn",
"}",
"from",
"'../mountFn'",
";",
"import",
"{",
"mutualSample",
"}",
"from",
"'../mutualSample'",
";",
"import",
"{",
"changeChildLeafsVisible",
"}",
"from",
"'../iterateChildLeafs'",
";",
"import",
"{",
"remap",
"}",
"from",
"'./remap'",
";",
"export",
"function",
"list",
"<",
"T",
",",
"K",
"extends",
"keyof",
"T",
">",
"(",
"config",
")",
";",
"export",
"function",
"list",
"<",
"T",
">",
"(",
"config",
")",
";",
"export",
"function",
"list",
"<",
"T",
">",
"(",
"source",
",",
"fn",
")",
";",
"export",
"function",
"list",
"<",
"T",
">",
"(",
"opts",
",",
"maybeFn",
"?",
")",
"{",
"assertClosure",
"(",
"currentTemplate",
",",
"'list'",
")",
";",
"if",
"(",
"typeof",
"maybeFn",
"===",
"'function'",
")",
"{",
"if",
"(",
"is",
".",
"unit",
"(",
"opts",
")",
")",
"{",
"opts",
"=",
"{",
"source",
":",
"opts",
",",
"fn",
":",
"maybeFn",
"}",
";",
"}",
"else",
"{",
"opts",
".",
"fn",
"=",
"maybeFn",
";",
"}",
"}",
"const",
"{",
"fn",
":",
"cb",
",",
"key",
",",
"source",
",",
"fields",
"=",
"[",
"]",
"}",
"=",
"opts",
";",
"const",
"getID",
"=",
"key",
"!==",
"undefined",
"?",
"typeof",
"key",
"===",
"'function'",
"?",
"key",
":",
"(",
"item",
",",
"i",
")",
"=>",
"item",
"[",
"key",
"]",
":",
"(",
"item",
",",
"i",
")",
"=>",
"i",
";",
"const",
"draft",
"=",
"{",
"type",
":",
"'list'",
",",
"key",
":",
"is",
".",
"store",
"(",
"opts",
")",
"?",
"{",
"type",
":",
"'index'",
"}",
":",
"{",
"type",
":",
"'key'",
",",
"key",
":",
"opts",
".",
"key",
"}",
",",
"childTemplates",
":",
"[",
"]",
",",
"childCount",
":",
"0",
",",
"inParentIndex",
":",
"-",
"1",
",",
"}",
";",
"const",
"{",
"env",
",",
"namespace",
"}",
"=",
"currentTemplate",
";",
"const",
"listTemplate",
"=",
"createTemplate",
"(",
"{",
"name",
":",
"'list'",
",",
"draft",
",",
"isSvgRoot",
":",
"false",
",",
"namespace",
",",
"fn",
"(",
"_",
",",
"{",
"mount",
"}",
")",
"{",
"const",
"listItemTemplate",
"=",
"createTemplate",
"<",
"{",
"itemUpdater",
":",
"any",
";",
"}",
">",
"(",
"{",
"name",
":",
"'list item'",
",",
"state",
":",
"{",
"id",
":",
"-",
"1",
",",
"store",
":",
"null",
"}",
",",
"draft",
",",
"isSvgRoot",
":",
"false",
",",
"namespace",
",",
"fn",
"(",
"{",
"id",
",",
"store",
"}",
",",
"{",
"mount",
"}",
")",
"{",
"cb",
"(",
"{",
"store",
",",
"key",
":",
"id",
",",
"fields",
":",
"remap",
"(",
"store",
",",
"fields",
")",
"}",
")",
";",
"const",
"itemUpdater",
"=",
"createEvent",
"<",
"any",
">",
"(",
"{",
"named",
":",
"'itemUpdater'",
"}",
")",
";",
"store",
".",
"on",
"(",
"itemUpdater",
",",
"(",
"_",
",",
"e",
")",
"=>",
"e",
")",
";",
"if",
"(",
"draft",
".",
"itemVisible",
")",
"{",
"const",
"{",
"onMount",
":",
"mountAndVisible",
",",
"onState",
":",
"onVisibleChanges",
"}",
"=",
"mutualSample",
"(",
"{",
"mount",
",",
"state",
":",
"draft",
".",
"itemVisible",
",",
"onMount",
":",
"(",
"visible",
",",
"leaf",
")",
"=>",
"(",
"{",
"visible",
",",
"leaf",
"}",
")",
",",
"onState",
":",
"(",
"leaf",
",",
"visible",
")",
"=>",
"(",
"{",
"visible",
",",
"leaf",
"}",
")",
",",
"}",
")",
";",
"mountAndVisible",
".",
"watch",
"(",
"(",
"{",
"visible",
",",
"leaf",
"}",
")",
"=>",
"{",
"const",
"parentBlock",
"=",
"leaf",
".",
"data",
".",
"block",
"as",
"LF",
";",
"parentBlock",
".",
"visible",
"=",
"visible",
";",
"parentBlock",
".",
"childInitialized",
"=",
"visible",
";",
"if",
"(",
"visible",
")",
"{",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"parentBlock",
",",
"leaf",
",",
"}",
")",
";",
"}",
"}",
")",
";",
"onVisibleChanges",
".",
"watch",
"(",
"(",
"{",
"visible",
",",
"leaf",
"}",
")",
"=>",
"{",
"const",
"parentBlock",
"=",
"leaf",
".",
"data",
".",
"block",
"as",
"LF",
";",
"parentBlock",
".",
"visible",
"=",
"visible",
";",
"if",
"(",
"!",
"parentBlock",
".",
"childInitialized",
")",
"{",
"if",
"(",
"visible",
")",
"{",
"parentBlock",
".",
"childInitialized",
"=",
"true",
";",
"mountChildTemplates",
"(",
"draft",
",",
"{",
"parentBlockFragment",
":",
"parentBlock",
",",
"leaf",
",",
"}",
")",
";",
"}",
"return",
";",
"}",
"changeChildLeafsVisible",
"(",
"visible",
",",
"leaf",
")",
";",
"}",
")",
";",
"}",
"else",
"{",
"mount",
".",
"watch",
"(",
"mountFn",
".",
"listItem",
")",
";",
"}",
"return",
"{",
"itemUpdater",
",",
"}",
";",
"}",
",",
"env",
",",
"}",
")",
";",
"const",
"updates",
"=",
"createStore",
"<",
"ListItemType",
"[",
"]",
">",
"(",
"[",
"]",
")",
";",
"const",
"mappedUpdates",
"=",
"source",
".",
"map",
"(",
"(",
"x",
")",
"=>",
"x",
")",
";",
"const",
"mountData",
"=",
"sample",
"(",
"{",
"source",
":",
"source",
"as",
"Store",
"<",
"T",
"[",
"]",
">",
",",
"clock",
":",
"mount",
",",
"fn",
":",
"(",
"data",
",",
"leaf",
")",
"=>",
"{",
"return",
"{",
"updates",
":",
"data",
",",
"leaf",
",",
"hydration",
":",
"leaf",
".",
"hydration",
",",
"}",
";",
"}",
",",
"greedy",
":",
"true",
",",
"}",
")",
";",
"const",
"pendingUpdate",
"=",
"createEvent",
"<",
"T",
"[",
"]",
">",
"(",
")",
";",
"const",
"parentNodeUpdateSpawn",
"=",
"sample",
"(",
"{",
"source",
":",
"mountData",
",",
"clock",
":",
"[",
"mappedUpdates",
",",
"pendingUpdate",
"]",
"as",
"[",
"Store",
"<",
"T",
"[",
"]",
">",
",",
"Event",
"<",
"T",
"[",
"]",
">",
"]",
",",
"fn",
":",
"(",
"{",
"leaf",
"}",
",",
"updates",
")",
"=>",
"(",
"{",
"updates",
",",
"leaf",
",",
"hydration",
":",
"false",
",",
"}",
")",
",",
"greedy",
":",
"true",
",",
"}",
")",
";",
"sample",
"(",
"{",
"source",
":",
"updates",
",",
"clock",
":",
"[",
"mountData",
",",
"parentNodeUpdateSpawn",
"]",
",",
"greedy",
":",
"true",
",",
"fn",
"(",
"records",
",",
"{",
"updates",
":",
"input",
",",
"leaf",
",",
"hydration",
"}",
")",
"{",
"const",
"listData",
"=",
"leaf",
".",
"data",
"as",
"LeafDataList",
";",
"let",
"curLeaf",
"=",
"leaf",
";",
"while",
"(",
"curLeaf",
")",
"{",
"if",
"(",
"curLeaf",
".",
"data",
".",
"type",
"===",
"'route'",
"&&",
"!",
"curLeaf",
".",
"data",
".",
"block",
".",
"visible",
")",
"{",
"listData",
".",
"pendingUpdate",
"=",
"input",
";",
"return",
";",
"}",
"curLeaf",
"=",
"curLeaf",
".",
"parent",
";",
"}",
"const",
"parentBlock",
"=",
"listData",
".",
"block",
";",
"beginMark",
"(",
"'list update ['",
"+",
"source",
".",
"shortName",
"+",
"']'",
")",
";",
"const",
"skipNode",
"=",
"Array",
"(",
"input",
".",
"length",
")",
".",
"fill",
"(",
"false",
")",
";",
"const",
"keys",
"=",
"input",
".",
"map",
"(",
"getID",
")",
";",
"const",
"resultRecords",
"=",
"[",
"]",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"records",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"record",
"=",
"records",
"[",
"i",
"]",
";",
"const",
"index",
"=",
"keys",
".",
"indexOf",
"(",
"record",
".",
"key",
")",
";",
"if",
"(",
"index",
"!==",
"-",
"1",
")",
"{",
"resultRecords",
".",
"push",
"(",
"record",
")",
";",
"skipNode",
"[",
"index",
"]",
"=",
"true",
";",
"updateAsyncValue",
"(",
"input",
"[",
"index",
"]",
",",
"record",
".",
"asyncValue",
")",
";",
"}",
"else",
"{",
"record",
".",
"active",
"=",
"false",
";",
"if",
"(",
"record",
".",
"instance",
")",
"{",
"unmountLeafTree",
"(",
"record",
".",
"instance",
")",
";",
"}",
"stopAsyncValue",
"(",
"record",
".",
"asyncValue",
")",
";",
"}",
"}",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"input",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"skipNode",
"[",
"i",
"]",
")",
"continue",
";",
"const",
"value",
"=",
"input",
"[",
"i",
"]",
";",
"const",
"id",
"=",
"keys",
"[",
"i",
"]",
";",
"const",
"group",
"=",
"createOpGroup",
"(",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"group",
".",
"queue",
")",
";",
"const",
"listItemBlock",
"=",
"{",
"type",
":",
"'LF'",
",",
"parent",
":",
"parentBlock",
",",
"child",
":",
"[",
"]",
",",
"childInitialized",
":",
"false",
",",
"visible",
":",
"false",
",",
"left",
":",
"null",
",",
"right",
":",
"null",
",",
"}",
";",
"const",
"item",
"=",
"{",
"type",
":",
"'listItem'",
",",
"key",
":",
"id",
"as",
"string",
",",
"index",
":",
"id",
"as",
"number",
",",
"active",
":",
"true",
",",
"leafData",
":",
"{",
"type",
":",
"'list item'",
",",
"block",
":",
"listItemBlock",
",",
"listDraft",
":",
"draft",
",",
"}",
",",
"asyncValue",
":",
"createAsyncValue",
"(",
"{",
"value",
",",
"group",
",",
"onChange",
"(",
"value",
")",
"{",
"if",
"(",
"item",
".",
"instance",
")",
"{",
"launch",
"(",
"{",
"target",
":",
"item",
".",
"instance",
".",
"template",
".",
"api",
".",
"itemUpdater",
",",
"params",
":",
"value",
",",
"defer",
":",
"true",
",",
"page",
":",
"item",
".",
"instance",
",",
"scope",
":",
"item",
".",
"instance",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"}",
",",
"onInit",
"(",
"value",
")",
"{",
"if",
"(",
"!",
"item",
".",
"active",
")",
"return",
";",
"if",
"(",
"hydration",
")",
"return",
";",
"item",
".",
"instance",
"=",
"spawn",
"(",
"listItemTemplate",
",",
"{",
"values",
":",
"{",
"id",
",",
"store",
":",
"value",
",",
"}",
",",
"parentLeaf",
":",
"leaf",
",",
"mountNode",
":",
"leaf",
".",
"mountNode",
",",
"svgRoot",
":",
"leaf",
".",
"svgRoot",
",",
"leafData",
":",
"item",
".",
"leafData",
",",
"opGroup",
":",
"group",
",",
"domSubtree",
":",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"domSubtree",
",",
"hydration",
",",
"root",
":",
"leaf",
".",
"root",
",",
"}",
")",
";",
"}",
",",
"}",
")",
",",
"}",
";",
"const",
"inParentIndex",
"=",
"resultRecords",
".",
"length",
";",
"resultRecords",
".",
"push",
"(",
"item",
")",
";",
"const",
"leftSibling",
"=",
"inParentIndex",
">",
"0",
"?",
"resultRecords",
"[",
"inParentIndex",
"-",
"1",
"]",
".",
"leafData",
":",
"null",
";",
"parentBlock",
".",
"child",
".",
"push",
"(",
"listItemBlock",
")",
";",
"if",
"(",
"leftSibling",
")",
"{",
"const",
"leftBlock",
"=",
"leftSibling",
".",
"block",
";",
"listItemBlock",
".",
"left",
"=",
"leftBlock",
";",
"const",
"rightBlock",
"=",
"leftBlock",
".",
"right",
";",
"if",
"(",
"rightBlock",
")",
"{",
"rightBlock",
".",
"left",
"=",
"listItemBlock",
";",
"listItemBlock",
".",
"right",
"=",
"rightBlock",
";",
"}",
"else",
"{",
"parentBlock",
".",
"lastChild",
"=",
"listItemBlock",
";",
"}",
"leftBlock",
".",
"right",
"=",
"listItemBlock",
";",
"}",
"else",
"{",
"parentBlock",
".",
"lastChild",
"=",
"listItemBlock",
";",
"}",
"if",
"(",
"hydration",
")",
"{",
"item",
".",
"instance",
"=",
"spawn",
"(",
"listItemTemplate",
",",
"{",
"values",
":",
"{",
"id",
",",
"store",
":",
"value",
",",
"}",
",",
"parentLeaf",
":",
"leaf",
",",
"mountNode",
":",
"leaf",
".",
"mountNode",
",",
"svgRoot",
":",
"leaf",
".",
"svgRoot",
",",
"leafData",
":",
"item",
".",
"leafData",
",",
"opGroup",
":",
"group",
",",
"domSubtree",
":",
"leaf",
".",
"root",
".",
"leafOps",
"[",
"leaf",
".",
"fullID",
"]",
".",
"domSubtree",
",",
"hydration",
",",
"root",
":",
"leaf",
".",
"root",
",",
"}",
")",
";",
"}",
"}",
"endMark",
"(",
"'list update ['",
"+",
"source",
".",
"shortName",
"+",
"']'",
")",
";",
"if",
"(",
"resultRecords",
".",
"length",
"===",
"0",
")",
"{",
"parentBlock",
".",
"lastChild",
"=",
"null",
";",
"}",
"listData",
".",
"records",
"=",
"resultRecords",
";",
"return",
"resultRecords",
";",
"}",
",",
"target",
":",
"updates",
",",
"}",
")",
";",
"return",
"{",
"pendingUpdate",
"}",
";",
"}",
",",
"env",
",",
"}",
")",
";",
"setInParentIndex",
"(",
"listTemplate",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
4,
null,
null,
null,
null,
6,
null,
null,
null,
null,
4,
null,
null,
null,
null,
46,
null,
4,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
3,
null,
null,
null,
null,
null,
9383,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
46,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
37,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
4077,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
497 | [
"import",
"type",
"{",
"DOMElement",
"}",
"from",
"'../index.h'",
";",
"import",
"{",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"assertClosure",
"}",
"from",
"'../assert'",
";",
"export",
"function",
"node",
"(",
"cb",
")",
"{",
"assertClosure",
"(",
"currentTemplate",
",",
"'node'",
")",
";",
"const",
"draft",
"=",
"currentTemplate",
".",
"draft",
";",
"switch",
"(",
"draft",
".",
"type",
")",
"{",
"case",
"'list'",
":",
"case",
"'listItem'",
":",
"case",
"'using'",
":",
"case",
"'route'",
":",
"case",
"'rec'",
":",
"case",
"'recItem'",
":",
"case",
"'block'",
":",
"case",
"'blockItem'",
":",
"console",
".",
"error",
"(",
"'node() hook supported only in h() nodes'",
")",
";",
"return",
";",
"}",
"draft",
".",
"node",
".",
"push",
"(",
"cb",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
498 | [
"import",
"{",
"Store",
",",
"is",
",",
"launch",
",",
"createEvent",
",",
"sample",
",",
"merge",
",",
"combine",
"}",
"from",
"'effector'",
";",
"import",
"type",
"{",
"Leaf",
",",
"LeafDataRoute",
",",
"RouteDraft",
"}",
"from",
"'../index.h'",
";",
"import",
"{",
"createTemplate",
",",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"mountChild",
",",
"setInParentIndex",
"}",
"from",
"'../mountChild'",
";",
"import",
"{",
"assertClosure",
"}",
"from",
"'../assert'",
";",
"import",
"{",
"mountFn",
"}",
"from",
"'../mountFn'",
";",
"import",
"{",
"mutualSample",
"}",
"from",
"'../mutualSample'",
";",
"import",
"{",
"changeChildLeafsVisible",
"}",
"from",
"'../iterateChildLeafs'",
";",
"export",
"function",
"route",
"<",
"T",
">",
"(",
"config",
")",
";",
"export",
"function",
"route",
"<",
"T",
",",
"S",
"extends",
"T",
">",
"(",
"config",
")",
";",
"export",
"function",
"route",
"<",
"T",
">",
"(",
"config",
")",
";",
"export",
"function",
"route",
"<",
"T",
">",
"(",
"{",
"source",
",",
"visible",
",",
"fn",
",",
"}",
")",
"{",
"assertClosure",
"(",
"currentTemplate",
",",
"'route'",
")",
";",
"const",
"draft",
"=",
"{",
"type",
":",
"'route'",
",",
"childTemplates",
":",
"[",
"]",
",",
"childCount",
":",
"0",
",",
"inParentIndex",
":",
"-",
"1",
",",
"}",
";",
"const",
"{",
"env",
",",
"namespace",
"}",
"=",
"currentTemplate",
";",
"const",
"routeTemplate",
"=",
"createTemplate",
"(",
"{",
"name",
":",
"'route'",
",",
"isSvgRoot",
":",
"false",
",",
"namespace",
",",
"env",
",",
"draft",
",",
"fn",
"(",
"_",
",",
"{",
"mount",
"}",
")",
"{",
"let",
"state",
";",
"if",
"(",
"is",
".",
"store",
"(",
"visible",
")",
")",
"{",
"state",
"=",
"combine",
"(",
"{",
"value",
":",
"source",
",",
"visible",
"}",
")",
";",
"}",
"else",
"{",
"const",
"visibleFn",
"=",
"visible",
"as",
"(",
"value",
":",
"T",
")",
"=>",
"boolean",
";",
"state",
"=",
"source",
".",
"map",
"(",
"value",
"=>",
"(",
"{",
"value",
",",
"visible",
":",
"visibleFn",
"(",
"value",
")",
",",
"}",
")",
")",
";",
"}",
"const",
"childDraft",
"=",
"{",
"type",
":",
"'route'",
",",
"childTemplates",
":",
"[",
"]",
",",
"childCount",
":",
"0",
",",
"inParentIndex",
":",
"-",
"1",
",",
"}",
";",
"const",
"routeItemTemplate",
"=",
"createTemplate",
"(",
"{",
"name",
":",
"'route item'",
",",
"isSvgRoot",
":",
"false",
",",
"namespace",
",",
"env",
",",
"draft",
":",
"childDraft",
",",
"state",
":",
"{",
"store",
":",
"null",
"}",
",",
"fn",
"(",
"{",
"store",
"}",
",",
"{",
"mount",
"}",
")",
"{",
"const",
"itemUpdater",
"=",
"createEvent",
"<",
"any",
">",
"(",
"{",
"named",
":",
"'itemUpdater'",
"}",
")",
";",
"store",
".",
"on",
"(",
"itemUpdater",
",",
"(",
"_",
",",
"upd",
")",
"=>",
"upd",
")",
";",
"fn",
"(",
"{",
"store",
"}",
")",
";",
"const",
"onValueUpdate",
"=",
"sample",
"(",
"{",
"source",
":",
"mount",
",",
"clock",
":",
"state",
",",
"fn",
":",
"(",
"leaf",
",",
"{",
"visible",
",",
"value",
"}",
")",
"=>",
"(",
"{",
"leaf",
",",
"visible",
",",
"value",
",",
"}",
")",
",",
"greedy",
":",
"true",
",",
"}",
")",
";",
"mount",
".",
"watch",
"(",
"mountFn",
".",
"routeItem",
")",
";",
"onValueUpdate",
".",
"watch",
"(",
"(",
"{",
"leaf",
",",
"visible",
",",
"value",
"}",
")",
"=>",
"{",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataRoute",
";",
"data",
".",
"block",
".",
"visible",
"=",
"visible",
";",
"if",
"(",
"visible",
")",
"{",
"launch",
"(",
"{",
"target",
":",
"itemUpdater",
",",
"params",
":",
"value",
",",
"defer",
":",
"true",
",",
"page",
":",
"leaf",
",",
"scope",
":",
"leaf",
".",
"root",
".",
"scope",
",",
"}",
")",
";",
"}",
"if",
"(",
"visible",
")",
"{",
"let",
"curLeaf",
"=",
"leaf",
".",
"parent",
";",
"while",
"(",
"curLeaf",
")",
"{",
"if",
"(",
"curLeaf",
".",
"data",
".",
"type",
"===",
"'route'",
"&&",
"!",
"curLeaf",
".",
"data",
".",
"block",
".",
"visible",
")",
"{",
"return",
";",
"}",
"curLeaf",
"=",
"curLeaf",
".",
"parent",
";",
"}",
"}",
"changeChildLeafsVisible",
"(",
"visible",
",",
"leaf",
")",
";",
"}",
")",
";",
"}",
",",
"}",
")",
";",
"setInParentIndex",
"(",
"routeItemTemplate",
")",
";",
"const",
"{",
"onMount",
",",
"onState",
":",
"onVisibleChange",
"}",
"=",
"mutualSample",
"(",
"{",
"mount",
",",
"state",
",",
"onMount",
":",
"(",
"{",
"visible",
",",
"value",
"}",
",",
"leaf",
")",
"=>",
"(",
"{",
"leaf",
",",
"visible",
",",
"value",
",",
"}",
")",
",",
"onState",
":",
"(",
"leaf",
",",
"{",
"visible",
",",
"value",
"}",
")",
"=>",
"(",
"{",
"leaf",
",",
"visible",
",",
"value",
",",
"}",
")",
",",
"}",
")",
";",
"const",
"pendingInit",
"=",
"createEvent",
"<",
"T",
">",
"(",
")",
";",
"const",
"pendingInitWithData",
"=",
"sample",
"(",
"{",
"source",
":",
"mount",
",",
"clock",
":",
"pendingInit",
",",
"greedy",
":",
"true",
",",
"fn",
":",
"(",
"leaf",
",",
"value",
")",
"=>",
"(",
"{",
"leaf",
",",
"value",
",",
"visible",
":",
"true",
"}",
")",
",",
"}",
")",
";",
"merge",
"(",
"[",
"onMount",
",",
"onVisibleChange",
",",
"pendingInitWithData",
"]",
")",
".",
"watch",
"(",
"(",
"{",
"leaf",
",",
"visible",
",",
"value",
"}",
")",
"=>",
"{",
"const",
"data",
"=",
"leaf",
".",
"data",
"as",
"LeafDataRoute",
";",
"data",
".",
"block",
".",
"visible",
"=",
"visible",
";",
"/** stop pending route initialization if route become invisible */",
"if",
"(",
"!",
"visible",
"&&",
"!",
"data",
".",
"initialized",
"&&",
"data",
".",
"pendingInit",
")",
"{",
"data",
".",
"pendingInit",
"=",
"null",
";",
"return",
";",
"}",
"if",
"(",
"visible",
"&&",
"!",
"data",
".",
"initialized",
")",
"{",
"let",
"curLeaf",
"=",
"leaf",
".",
"parent",
";",
"while",
"(",
"curLeaf",
")",
"{",
"if",
"(",
"curLeaf",
".",
"data",
".",
"type",
"===",
"'route'",
"&&",
"!",
"curLeaf",
".",
"data",
".",
"block",
".",
"visible",
")",
"{",
"data",
".",
"pendingInit",
"=",
"{",
"value",
"}",
";",
"return",
";",
"}",
"curLeaf",
"=",
"curLeaf",
".",
"parent",
";",
"}",
"}",
"if",
"(",
"visible",
"&&",
"!",
"data",
".",
"initialized",
")",
"{",
"mountChild",
"(",
"{",
"parentBlockFragment",
":",
"data",
".",
"block",
",",
"leaf",
",",
"actor",
":",
"routeItemTemplate",
",",
"values",
":",
"{",
"store",
":",
"value",
"}",
",",
"}",
")",
";",
"data",
".",
"initialized",
"=",
"true",
";",
"}",
"}",
")",
";",
"return",
"{",
"pendingInit",
"}",
";",
"}",
",",
"}",
")",
";",
"setInParentIndex",
"(",
"routeTemplate",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
6,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
4,
null,
null,
null,
null,
6,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
499 | [
"import",
"{",
"Store",
",",
"is",
"}",
"from",
"'effector'",
";",
"import",
"{",
"currentTemplate",
"}",
"from",
"'../template'",
";",
"import",
"{",
"assert",
",",
"assertClosure",
"}",
"from",
"'../assert'",
";",
"import",
"{",
"route",
"}",
"from",
"'./route'",
";",
"export",
"function",
"variant",
"<",
"T",
",",
"K",
"extends",
"keyof",
"T",
">",
"(",
"{",
"source",
",",
"cases",
",",
"key",
",",
"}",
")",
"{",
"assertClosure",
"(",
"currentTemplate",
",",
"'variant'",
")",
";",
"assert",
"(",
"is",
".",
"unit",
"(",
"source",
")",
",",
"'variant({source}) should be unit'",
")",
";",
"let",
"keyReader",
";",
"if",
"(",
"typeof",
"key",
"===",
"'function'",
")",
"keyReader",
"=",
"key",
";",
"else",
"if",
"(",
"key",
"==",
"null",
")",
"keyReader",
"=",
"(",
"value",
")",
"=>",
"String",
"(",
"value",
")",
";",
"else",
"keyReader",
"=",
"(",
"value",
")",
"=>",
"String",
"(",
"value",
"[",
"key",
"]",
")",
";",
"let",
"defaultCase",
"=",
"false",
";",
"for",
"(",
"const",
"caseName",
"in",
"cases",
")",
"{",
"if",
"(",
"caseName",
"===",
"'__'",
")",
"{",
"defaultCase",
"=",
"true",
";",
"continue",
";",
"}",
"route",
"(",
"{",
"source",
",",
"visible",
":",
"value",
"=>",
"keyReader",
"(",
"value",
")",
"===",
"caseName",
",",
"fn",
":",
"cases",
"[",
"caseName",
"]",
",",
"}",
")",
";",
"}",
"if",
"(",
"defaultCase",
")",
"{",
"const",
"nonDefaultCases",
"=",
"Object",
".",
"keys",
"(",
"cases",
")",
";",
"route",
"(",
"{",
"source",
",",
"visible",
":",
"value",
"=>",
"!",
"nonDefaultCases",
".",
"includes",
"(",
"keyReader",
"(",
"value",
")",
")",
",",
"fn",
":",
"cases",
".",
"__",
",",
"}",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |