marko 5.20.9 → 5.21.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/compiler/config.js +1 -2
- package/dist/compiler/index.js +1 -2
- package/dist/compiler/modules.js +1 -2
- package/dist/core-tags/components/init-components-tag.js +1 -2
- package/dist/core-tags/components/preferred-script-location-tag.js +1 -2
- package/dist/core-tags/components/preserve-tag/index-browser.js +1 -2
- package/dist/core-tags/components/preserve-tag/index.js +1 -2
- package/dist/core-tags/core/__flush_here_and_after__.js +1 -2
- package/dist/core-tags/core/await/AsyncValue.js +1 -2
- package/dist/core-tags/core/await/client-reorder-runtime.js +1 -2
- package/dist/core-tags/core/await/renderer.js +1 -2
- package/dist/core-tags/core/await/reorderer-renderer.js +1 -2
- package/dist/index.js +1 -2
- package/dist/loader/index-browser.js +1 -2
- package/dist/loader/index.js +1 -2
- package/dist/node-require/browser-refresh.js +1 -2
- package/dist/node-require/hot-reload.js +1 -2
- package/dist/node-require/index.js +1 -2
- package/dist/runtime/RenderResult.js +1 -2
- package/dist/runtime/components/Component.js +1 -2
- package/dist/runtime/components/ComponentDef.js +1 -2
- package/dist/runtime/components/ComponentsContext.js +1 -2
- package/dist/runtime/components/GlobalComponentsContext.js +1 -2
- package/dist/runtime/components/KeySequence.js +1 -2
- package/dist/runtime/components/ServerComponent.js +1 -2
- package/dist/runtime/components/State.js +1 -2
- package/dist/runtime/components/attach-detach.js +1 -2
- package/dist/runtime/components/beginComponent/index-browser.js +1 -2
- package/dist/runtime/components/beginComponent/index.js +1 -2
- package/dist/runtime/components/defineComponent.js +1 -2
- package/dist/runtime/components/dom-data.js +1 -2
- package/dist/runtime/components/endComponent/index-browser.js +1 -2
- package/dist/runtime/components/endComponent/index.js +1 -2
- package/dist/runtime/components/entry/index-browser.js +1 -2
- package/dist/runtime/components/entry/index.js +1 -2
- package/dist/runtime/components/event-delegation.js +1 -2
- package/dist/runtime/components/index.js +1 -2
- package/dist/runtime/components/init-components/index-browser.js +1 -2
- package/dist/runtime/components/init-components/index.js +1 -2
- package/dist/runtime/components/registry/index-browser.js +1 -2
- package/dist/runtime/components/registry/index.js +1 -2
- package/dist/runtime/components/renderer.js +1 -2
- package/dist/runtime/components/update-manager.js +1 -2
- package/dist/runtime/components/util/index-browser.js +1 -2
- package/dist/runtime/components/util/index.js +1 -2
- package/dist/runtime/createOut.js +1 -2
- package/dist/runtime/dom-insert.js +1 -2
- package/dist/runtime/events.js +1 -2
- package/dist/runtime/helpers/_change-case.js +1 -2
- package/dist/runtime/helpers/assign.js +1 -2
- package/dist/runtime/helpers/class-value.js +1 -2
- package/dist/runtime/helpers/dynamic-tag.js +1 -2
- package/dist/runtime/helpers/load-nested-tag.js +1 -2
- package/dist/runtime/helpers/merge.js +1 -2
- package/dist/runtime/helpers/render-tag.js +1 -2
- package/dist/runtime/helpers/style-value.js +1 -2
- package/dist/runtime/helpers/to-string.js +1 -2
- package/dist/runtime/html/AsyncStream.js +1 -2
- package/dist/runtime/html/BufferedWriter.js +1 -2
- package/dist/runtime/html/StringWriter.js +1 -2
- package/dist/runtime/html/create-readable/index-browser.js +1 -2
- package/dist/runtime/html/create-readable/index.js +1 -2
- package/dist/runtime/html/helpers/_dynamic-attr.js +1 -2
- package/dist/runtime/html/helpers/attr.js +1 -2
- package/dist/runtime/html/helpers/attrs.js +1 -2
- package/dist/runtime/html/helpers/class-attr.js +1 -2
- package/dist/runtime/html/helpers/data-marko.js +1 -2
- package/dist/runtime/html/helpers/escape-quotes.js +1 -2
- package/dist/runtime/html/helpers/escape-script-placeholder.js +1 -2
- package/dist/runtime/html/helpers/escape-style-placeholder.js +1 -2
- package/dist/runtime/html/helpers/escape-xml.js +1 -2
- package/dist/runtime/html/helpers/merge-attrs.js +1 -2
- package/dist/runtime/html/helpers/props-script.js +1 -2
- package/dist/runtime/html/helpers/style-attr.js +1 -2
- package/dist/runtime/html/hot-reload.js +1 -2
- package/dist/runtime/html/index.js +1 -2
- package/dist/runtime/queueMicrotask.js +1 -2
- package/dist/runtime/renderable.js +1 -2
- package/dist/runtime/setImmediate/index-browser.js +1 -2
- package/dist/runtime/setImmediate/index-worker.js +1 -2
- package/dist/runtime/setImmediate/index.js +1 -2
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +1 -2
- package/dist/runtime/vdom/VComponent.js +1 -2
- package/dist/runtime/vdom/VDocumentFragment.js +1 -2
- package/dist/runtime/vdom/VElement.js +1 -2
- package/dist/runtime/vdom/VFragment.js +1 -2
- package/dist/runtime/vdom/VNode.js +1 -2
- package/dist/runtime/vdom/VText.js +1 -2
- package/dist/runtime/vdom/helpers/attrs.js +1 -2
- package/dist/runtime/vdom/helpers/const.js +1 -2
- package/dist/runtime/vdom/helpers/v-element.js +1 -2
- package/dist/runtime/vdom/helpers/v-text.js +1 -2
- package/dist/runtime/vdom/hot-reload.js +1 -2
- package/dist/runtime/vdom/index.js +1 -2
- package/dist/runtime/vdom/morphdom/fragment.js +1 -2
- package/dist/runtime/vdom/morphdom/helpers.js +1 -2
- package/dist/runtime/vdom/morphdom/index.js +1 -2
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +1 -2
- package/dist/runtime/vdom/parse-html.js +1 -2
- package/dist/runtime/vdom/preserve-attrs.js +1 -2
- package/dist/runtime/vdom/vdom.js +1 -2
- package/dist/taglib/index.js +1 -2
- package/package.json +4 -5
- package/LICENSE +0 -21
- package/dist/compiler/config.js.map +0 -1
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/modules.js.map +0 -1
- package/dist/core-tags/components/init-components-tag.js.map +0 -1
- package/dist/core-tags/components/preferred-script-location-tag.js.map +0 -1
- package/dist/core-tags/components/preserve-tag/index-browser.js.map +0 -1
- package/dist/core-tags/components/preserve-tag/index.js.map +0 -1
- package/dist/core-tags/core/__flush_here_and_after__.js.map +0 -1
- package/dist/core-tags/core/await/AsyncValue.js.map +0 -1
- package/dist/core-tags/core/await/client-reorder-runtime.js.map +0 -1
- package/dist/core-tags/core/await/renderer.js.map +0 -1
- package/dist/core-tags/core/await/reorderer-renderer.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/loader/index-browser.js.map +0 -1
- package/dist/loader/index.js.map +0 -1
- package/dist/node-require/browser-refresh.js.map +0 -1
- package/dist/node-require/hot-reload.js.map +0 -1
- package/dist/node-require/index.js.map +0 -1
- package/dist/runtime/RenderResult.js.map +0 -1
- package/dist/runtime/components/Component.js.map +0 -1
- package/dist/runtime/components/ComponentDef.js.map +0 -1
- package/dist/runtime/components/ComponentsContext.js.map +0 -1
- package/dist/runtime/components/GlobalComponentsContext.js.map +0 -1
- package/dist/runtime/components/KeySequence.js.map +0 -1
- package/dist/runtime/components/ServerComponent.js.map +0 -1
- package/dist/runtime/components/State.js.map +0 -1
- package/dist/runtime/components/attach-detach.js.map +0 -1
- package/dist/runtime/components/beginComponent/index-browser.js.map +0 -1
- package/dist/runtime/components/beginComponent/index.js.map +0 -1
- package/dist/runtime/components/defineComponent.js.map +0 -1
- package/dist/runtime/components/dom-data.js.map +0 -1
- package/dist/runtime/components/endComponent/index-browser.js.map +0 -1
- package/dist/runtime/components/endComponent/index.js.map +0 -1
- package/dist/runtime/components/entry/index-browser.js.map +0 -1
- package/dist/runtime/components/entry/index.js.map +0 -1
- package/dist/runtime/components/event-delegation.js.map +0 -1
- package/dist/runtime/components/index.js.map +0 -1
- package/dist/runtime/components/init-components/index-browser.js.map +0 -1
- package/dist/runtime/components/init-components/index.js.map +0 -1
- package/dist/runtime/components/registry/index-browser.js.map +0 -1
- package/dist/runtime/components/registry/index.js.map +0 -1
- package/dist/runtime/components/renderer.js.map +0 -1
- package/dist/runtime/components/update-manager.js.map +0 -1
- package/dist/runtime/components/util/index-browser.js.map +0 -1
- package/dist/runtime/components/util/index.js.map +0 -1
- package/dist/runtime/createOut.js.map +0 -1
- package/dist/runtime/dom-insert.js.map +0 -1
- package/dist/runtime/events.js.map +0 -1
- package/dist/runtime/helpers/_change-case.js.map +0 -1
- package/dist/runtime/helpers/assign.js.map +0 -1
- package/dist/runtime/helpers/class-value.js.map +0 -1
- package/dist/runtime/helpers/dynamic-tag.js.map +0 -1
- package/dist/runtime/helpers/load-nested-tag.js.map +0 -1
- package/dist/runtime/helpers/merge.js.map +0 -1
- package/dist/runtime/helpers/render-tag.js.map +0 -1
- package/dist/runtime/helpers/style-value.js.map +0 -1
- package/dist/runtime/helpers/to-string.js.map +0 -1
- package/dist/runtime/html/AsyncStream.js.map +0 -1
- package/dist/runtime/html/BufferedWriter.js.map +0 -1
- package/dist/runtime/html/StringWriter.js.map +0 -1
- package/dist/runtime/html/create-readable/index-browser.js.map +0 -1
- package/dist/runtime/html/create-readable/index.js.map +0 -1
- package/dist/runtime/html/helpers/_dynamic-attr.js.map +0 -1
- package/dist/runtime/html/helpers/attr.js.map +0 -1
- package/dist/runtime/html/helpers/attrs.js.map +0 -1
- package/dist/runtime/html/helpers/class-attr.js.map +0 -1
- package/dist/runtime/html/helpers/data-marko.js.map +0 -1
- package/dist/runtime/html/helpers/escape-quotes.js.map +0 -1
- package/dist/runtime/html/helpers/escape-script-placeholder.js.map +0 -1
- package/dist/runtime/html/helpers/escape-style-placeholder.js.map +0 -1
- package/dist/runtime/html/helpers/escape-xml.js.map +0 -1
- package/dist/runtime/html/helpers/merge-attrs.js.map +0 -1
- package/dist/runtime/html/helpers/props-script.js.map +0 -1
- package/dist/runtime/html/helpers/style-attr.js.map +0 -1
- package/dist/runtime/html/hot-reload.js.map +0 -1
- package/dist/runtime/html/index.js.map +0 -1
- package/dist/runtime/queueMicrotask.js.map +0 -1
- package/dist/runtime/renderable.js.map +0 -1
- package/dist/runtime/setImmediate/index-browser.js.map +0 -1
- package/dist/runtime/setImmediate/index-worker.js.map +0 -1
- package/dist/runtime/setImmediate/index.js.map +0 -1
- package/dist/runtime/vdom/AsyncVDOMBuilder.js.map +0 -1
- package/dist/runtime/vdom/VComponent.js.map +0 -1
- package/dist/runtime/vdom/VDocumentFragment.js.map +0 -1
- package/dist/runtime/vdom/VElement.js.map +0 -1
- package/dist/runtime/vdom/VFragment.js.map +0 -1
- package/dist/runtime/vdom/VNode.js.map +0 -1
- package/dist/runtime/vdom/VText.js.map +0 -1
- package/dist/runtime/vdom/helpers/attrs.js.map +0 -1
- package/dist/runtime/vdom/helpers/const.js.map +0 -1
- package/dist/runtime/vdom/helpers/v-element.js.map +0 -1
- package/dist/runtime/vdom/helpers/v-text.js.map +0 -1
- package/dist/runtime/vdom/hot-reload.js.map +0 -1
- package/dist/runtime/vdom/index.js.map +0 -1
- package/dist/runtime/vdom/morphdom/fragment.js.map +0 -1
- package/dist/runtime/vdom/morphdom/helpers.js.map +0 -1
- package/dist/runtime/vdom/morphdom/index.js.map +0 -1
- package/dist/runtime/vdom/morphdom/specialElHandlers.js.map +0 -1
- package/dist/runtime/vdom/parse-html.js.map +0 -1
- package/dist/runtime/vdom/preserve-attrs.js.map +0 -1
- package/dist/runtime/vdom/vdom.js.map +0 -1
- package/dist/taglib/index.js.map +0 -1
package/dist/taglib/index.js
CHANGED
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.21.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
6
6
|
"dependencies": {
|
7
|
-
"@marko/compiler": "^5.
|
8
|
-
"@marko/translator-default": "^5.
|
7
|
+
"@marko/compiler": "^5.21.0",
|
8
|
+
"@marko/translator-default": "^5.21.0",
|
9
9
|
"app-module-path": "^2.2.0",
|
10
10
|
"argly": "^1.2.0",
|
11
11
|
"browser-refresh-client": "1.1.4",
|
@@ -71,6 +71,5 @@
|
|
71
71
|
"index-browser.marko",
|
72
72
|
"index.js",
|
73
73
|
"node-require.js"
|
74
|
-
]
|
75
|
-
"gitHead": "637f064c6c8c5c9767d2f6e8a645937eca874a49"
|
74
|
+
]
|
76
75
|
}
|
package/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright 2020 eBay Inc. and contributors
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/compiler/config.js"],"names":["config","g","window","global","__MARKO_CONFIG","output","writeVersionComment","ignoreUnrecognizedTags","sourceMaps","meta","process","env","MARKO_CONFIG","Object","assign","JSON","parse","module","exports"],"mappings":"aAAA,IAAIA,MAAJ;;AAEA,IAAIC,CAAC,GAAG,OAAOC,MAAP,KAAkB,WAAlB,GAAgCC,MAAhC,GAAyCD,MAAjD;;AAEA,IAAID,CAAC,CAACG,cAAN,EAAsB;AACpBJ,EAAAA,MAAM,GAAGC,CAAC,CAACG,cAAX;AACD,CAFD,MAEO;AACLJ,EAAAA,MAAM,GAAGC,CAAC,CAACG,cAAF,GAAmB;AAC1B;AACAC,IAAAA,MAAM,EAAE,MAFkB;;AAI1B;AACJ;AACA;AACA;AACIC,IAAAA,mBAAmB,EAAE,IARK;;AAU1B;AACJ;AACA;AACA;AACIC,IAAAA,sBAAsB,EAAE,KAdE;;AAgB1B;AACJ;AACA;AACA;AACA;AACA;AACIC,IAAAA,UAAU,EAAE,KAtBc;;AAwB1B;AACJ;AACA;AACA;AACA;AACIC,IAAAA,IAAI,EAAE,IA7BoB,EAA5B;;;AAgCA,MAAIC,OAAO,CAACC,GAAR,CAAYC,YAAhB,EAA8B;AAC5BC,IAAAA,MAAM,CAACC,MAAP,CAAcd,MAAd,EAAsBe,IAAI,CAACC,KAAL,CAAWN,OAAO,CAACC,GAAR,CAAYC,YAAvB,CAAtB;AACD;AACF;;AAEDK,MAAM,CAACC,OAAP,GAAiBlB,MAAjB","sourcesContent":["var config;\n\nvar g = typeof window === \"undefined\" ? global : window;\n\nif (g.__MARKO_CONFIG) {\n config = g.__MARKO_CONFIG;\n} else {\n config = g.__MARKO_CONFIG = {\n // The default output mode for compiled templates\n output: \"html\",\n\n /**\n * Whether the version should be written to the template as a comment e.g.\n * // Compiled using marko@4.0.0 - DO NOT EDIT\n */\n writeVersionComment: true,\n\n /**\n * Whether unrecognized tags should be ignored or not. This flag will\n * be enabled by default when compiling XML.\n */\n ignoreUnrecognizedTags: false,\n\n /**\n * Whether source maps should be output with the compiled templates.\n * When `true` a `map` property will be available on the compile result.\n * When `\"inline\"` the sourcemap will be inlined as a comment in the output code.\n * When `\"both\"` both of the above will be used.\n */\n sourceMaps: false,\n\n /**\n * This option inlines all of the meta data in the template.\n * You can also access this metadata via `compile(...).meta`.\n * This API is sticking around for compatibility purposes.\n */\n meta: true\n };\n\n if (process.env.MARKO_CONFIG) {\n Object.assign(config, JSON.parse(process.env.MARKO_CONFIG));\n }\n}\n\nmodule.exports = config;\n"],"file":"config.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/compiler/index.js"],"names":["compiler","require","extend","globalConfig","ok","fs","taglib","defaults","defaultOptionsExportDefinition","get","enumerable","configurable","Object","defineProperties","exports","defaultOptions","config","configure","newConfig","resultCompat","code","meta","map","options","sourceOnly","_compile","src","filename","userConfig","callback","compile","then","result","error","compileSync","compileForBrowser","output","compileFile","readFile","encoding","err","templateSrc","readFileSync","compileFileForBrowser","taglibLookup","lookup","taglibLoader","loader","taglibFinder","finder","buildTaglibLookup","buildLookup","clearCaches","_clearDefaults","clearCache","registerTaglib","filePath","registerFromFile","isVDOMSupported"],"mappings":"AAAA;;;AAGA,IAAIA,QAAQ,GAAGC,OAAO,CAAC,iBAAD,CAAtB;AACA,IAAIC,MAAM,GAAGD,OAAO,CAAC,oBAAD,CAApB;AACA,IAAIE,YAAY,GAAGF,OAAO,CAAC,UAAD,CAA1B;AACA,IAAIG,EAAE,GAAGH,OAAO,CAAC,QAAD,CAAP,CAAkBG,EAA3B;AACA,IAAIC,EAAE,GAAGJ,OAAO,CAAC,IAAD,CAAhB;AACA,IAAIK,MAAM,GAAGL,OAAO,CAAC,WAAD,CAApB;AACA,IAAIM,QAAQ,GAAGL,MAAM,CAAC,EAAD,EAAKC,YAAL,CAArB;;AAEA;;;;;;;;;;;;AAYA,IAAIK,8BAA8B,GAAG;AACnCC,EAAAA,GAAG,EAAE,YAAY;AACf,WAAON,YAAP;AACD,GAHkC;AAInCO,EAAAA,UAAU,EAAE,IAJuB;AAKnCC,EAAAA,YAAY,EAAE,KALqB,EAArC;;;AAQAC,MAAM,CAACC,gBAAP,CAAwBC,OAAxB,EAAiC;AAC/BC,EAAAA,cAAc,EAAEP,8BADe;AAE/BQ,EAAAA,MAAM,EAAER,8BAFuB,EAAjC;;;AAKA,SAASS,SAAT,CAAmBC,SAAnB,EAA8B;AAC5B,MAAI,CAACA,SAAL,EAAgB;AACdA,IAAAA,SAAS,GAAG,EAAZ;AACD;;AAEDf,EAAAA,YAAY,GAAGD,MAAM,CAAC,EAAD,EAAKK,QAAL,CAArB;AACAL,EAAA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1C,MAAM,CAAC2C,MAA9B;AACAnC,OAAO,CAACoC,iBAAR,GAA4B5C,MAAM,CAACuC,MAAP,CAAcM,WAA1C;AACArC,OAAO,CAACsC,WAAR,GAAsB,SAASA,WAAT,GAAuB;AAC3CpD,EAAAA,QAAQ,CAACqD,cAAT;AACA/C,EAAAA,MAAM,CAACgD,UAAP;AACD,CAHD;;AAKAxC,OAAO,CAACyC,cAAR,GAAyB,UAAUC,QAAV,EAAoB;AAC3CpD,EAAAA,EAAE,CAAC,OAAOoD,QAAP,KAAoB,QAArB,EAA+B,+BAA/B,CAAF;AACAlD,EAAAA,MAAM,CAACmD,gBAAP,CAAwBD,QAAxB;AACA1C,EAAAA,OAAO,CAACsC,WAAR;AACD,CAJD;;AAMAtC,OAAO,CAAC4C,eAAR,GAA0B,IAA1B","sourcesContent":["\"use strict\";\n\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar compiler = require(\"@marko/compiler\");\nvar extend = require(\"raptor-util/extend\");\nvar globalConfig = require(\"./config\");\nvar ok = require(\"assert\").ok;\nvar fs = require(\"fs\");\nvar taglib = require(\"../taglib\");\nvar defaults = extend({}, globalConfig);\n\n// eslint-disable-next-line no-constant-condition\nif (\"MARKO_DEBUG\") {\n if (\n require.main &&\n require.main.filename !== require.resolve(\"../../bin/markoc\")\n ) {\n complain(\n \"Using `marko/compiler` has been deprecated, please upgrade to the `@marko/compiler` module.\"\n );\n }\n}\n\nvar defaultOptionsExportDefinition = {\n get: function () {\n return globalConfig;\n },\n enumerable: true,\n configurable: false\n};\n\nObject.defineProperties(exports, {\n defaultOptions: defaultOptionsExportDefinition,\n config: defaultOptionsExportDefinition\n});\n\nfunction configure(newConfig) {\n if (!newConfig) {\n newConfig = {};\n }\n\n globalConfig = extend({}, defaults);\n extend(globalConfig, newConfig);\n\n compiler.configure(newConfig);\n}\n\nfunction resultCompat({ code, meta, map }, options = {}) {\n if (options.sourceOnly !== false) {\n return code;\n } else {\n return { code, meta, map };\n }\n}\n\nfunction _compile(src, filename, userConfig, callback) {\n ok(filename, '\"filename\" argument is required');\n ok(typeof filename === \"string\", '\"filename\" argument should be a string');\n var options = {};\n\n extend(options, globalConfig);\n\n if (userConfig) {\n extend(options, userConfig);\n }\n\n if (callback) {\n compiler.compile(src, filename, options).then(\n result => callback(null, resultCompat(result, options)),\n error => callback(error)\n );\n } else {\n return resultCompat(compiler.compileSync(src, filename, options), options);\n }\n}\n\nfunction compile(src, filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n options = options || {};\n options.sourceOnly = options.sourceOnly !== false;\n\n return _compile(src, filename, options, callback);\n}\n\nfunction compileForBrowser(src, filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n options = extend(\n {\n output: \"dom\",\n meta: false,\n sourceOnly: false\n },\n options\n );\n\n return compile(src, filename, options, callback);\n}\n\nfunction compileFile(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n options = options || {};\n options.sourceOnly = options.sourceOnly !== false;\n\n if (callback) {\n fs.readFile(filename, { encoding: \"utf8\" }, function (err, templateSrc) {\n if (err) {\n return callback(err);\n }\n\n _compile(templateSrc, filename, options, callback);\n });\n } else {\n let templateSrc = fs.readFileSync(filename, { encoding: \"utf8\" });\n return _compile(templateSrc, filename, options, callback);\n }\n}\n\nfunction compileFileForBrowser(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n options = extend({ output: \"dom\", meta: false, sourceOnly: false }, options);\n return compileFile(filename, options, callback);\n}\n\nexports.compileFile = compileFile;\nexports.compile = compile;\nexports.compileForBrowser = compileForBrowser;\nexports.compileFileForBrowser = compileFileForBrowser;\n\nexports.configure = configure;\n\nexports.taglibLookup = taglib.lookup;\nexports.taglibLoader = taglib.loader;\nexports.taglibFinder = taglib.finder;\nexports.buildTaglibLookup = taglib.lookup.buildLookup;\nexports.clearCaches = function clearCaches() {\n compiler._clearDefaults();\n taglib.clearCache();\n};\n\nexports.registerTaglib = function (filePath) {\n ok(typeof filePath === \"string\", '\"filePath\" should be a string');\n taglib.registerFromFile(filePath);\n exports.clearCaches();\n};\n\nexports.isVDOMSupported = true;\n"],"file":"index.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/compiler/modules.js"],"names":["window","exports","require"],"mappings":"AAAA;;AAEA,IAAI,OAAOA,MAAP,KAAkB,WAAtB,EAAmC;AACjCC,EAAAA,OAAO,CAACC,OAAR,GAAkBA,OAAlB;AACD","sourcesContent":["\"use strict\";\n\nif (typeof window === \"undefined\") {\n exports.require = require;\n}\n"],"file":"modules.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/core-tags/components/init-components-tag.js"],"names":["INIT_COMPONENTS_KEY","Symbol","addComponentsFromContext","require","getInitComponentsCode","addComponentsFromOut","source","target","sourceOut","out","targetOut","componentsContext","componentDefs","writer","get","addInitScript","state","root","script","module","exports","render","input","$global","global","undefined","on","isSync","asyncOut","beginAsync","last","timeout","onLast","next","rootOut","_parentOut","end"],"mappings":"AAAA;;AAEA,MAAMA,mBAAmB,GAAGC,MAAM,EAAlC;;AAEA,MAAMC,wBAAwB;AAC5BC,OAAO,CAAC,0BAAD,CAAP,GADF;AAEA,MAAMC,qBAAqB;AACzBD,OAAO,CAAC,0BAAD,CAAP,GADF;;AAGA,SAASE,oBAAT,CAA8BC,MAA9B,EAAsCC,MAAtC,EAA8C;AAC5C,QAAMC,SAAS,GAAGF,MAAM,CAACG,GAAP,IAAcH,MAAhC;AACA,QAAMI,SAAS,GAAGH,MAAM,IAAIC,SAA5B;AACA,QAAMG,iBAAiB,GAAGH,SAAS,GAAnC;AACA,QAAMI,aAAa,GAAGF,SAAS,CAACG,MAAV,CAAiBC,GAAjB,CAAqB,eAArB,CAAtB;AACAZ,EAAAA,wBAAwB,CAACS,iBAAD,EAAoBC,aAApB,CAAxB;AACD;;AAED,SAASG,aAAT,CAAuBF,MAAvB,EA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const addComponentsFromContext =\n require(\"../../runtime/components\").___addComponentsFromContext;\nconst getInitComponentsCode =\n require(\"../../runtime/components\").___getInitComponentsCode;\n\nfunction addComponentsFromOut(source, target) {\n const sourceOut = source.out || source;\n const targetOut = target || sourceOut;\n const componentsContext = sourceOut.___components;\n const componentDefs = targetOut.writer.get(\"componentDefs\");\n addComponentsFromContext(componentsContext, componentDefs);\n}\n\nfunction addInitScript(writer) {\n const out = writer.state.root;\n const componentDefs = writer.get(\"componentDefs\");\n writer.script(getInitComponentsCode(out, componentDefs));\n}\n\nmodule.exports = function render(input, out) {\n const $global = out.global;\n if ($global[INIT_COMPONENTS_KEY] === undefined) {\n $global[INIT_COMPONENTS_KEY] = true;\n\n out.on(\"await:finish\", addComponentsFromOut);\n out.on(\"___toString\", addInitScript);\n\n if (out.isSync() === true) {\n // Generate initialization code for any of the UI components that were\n // rendered synchronously\n addComponentsFromOut(out);\n } else {\n // Generate initialization code for any of the UI components that were\n // rendered asynchronously, but were outside an `<await>` tag\n // (each `<await>` tag will have its own component initialization block)\n const asyncOut = out.beginAsync({ last: true, timeout: -1 });\n out.onLast(function (next) {\n // Ensure we're getting init code starting from the root\n let rootOut = out;\n while (rootOut._parentOut) {\n rootOut = rootOut._parentOut;\n }\n // Write out all of the component init code from the main out\n addComponentsFromOut(rootOut, asyncOut);\n asyncOut.end();\n next();\n });\n }\n }\n};\n"],"file":"init-components-tag.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/core-tags/components/preferred-script-location-tag.js"],"names":["forceScriptTagAtThisPoint","out","writer","global","htmlSoFar","toString","undefined","clear","write","module","exports","render","input","isSync","asyncOut","beginAsync","last","timeout","onLast","next","end"],"mappings":"AAAA;;AAEA,SAASA,yBAAT,CAAmCC,GAAnC,EAAwC;AACtC,QAAMC,MAAM,GAAGD,GAAG,CAACC,MAAnB;;AAEAD,EAAAA,GAAG,CAACE,MAAJ,MAA4B,IAA5B;AACA,QAAMC,SAAS,GAAGF,MAAM,CAACG,QAAP,EAAlB;AACAJ,EAAAA,GAAG,CAACE,MAAJ,MAA4BG,SAA5B;;AAEAJ,EAAAA,MAAM,CAACK,KAAP;AACAL,EAAAA,MAAM,CAACM,KAAP,CAAaJ,SAAb;AACD;;AAEDK,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,CAAgBC,KAAhB,EAAuBX,GAAvB,EAA4B;AAC3C,MAAIA,GAAG,CAACY,MAAJ,OAAiB,IAArB,EAA2B;AACzBb,IAAAA,yBAAyB,CAACC,GAAD,CAAzB;AACD,GAFD,MAEO;AACL,UAAMa,QAAQ,GAAGb,GAAG,CAACc,UAAJ,CAAe,EAAEC,IAAI,EAAE,IAAR,EAAcC,OAAO,EAAE,CAAC,CAAxB,EAAf,CAAjB;AACAhB,IAAAA,GAAG,CAACiB,MAAJ,CAAW,UAAUC,IAAV,EAAgB;AACzBnB,MAAAA,yBAAyB,CAACc,QAAD,CAAzB;AACAA,MAAAA,QAAQ,CAACM,GAAT;AACAD,MAAAA,IAAI;AACL,KAJD;AAKD;AACF,CAXD","sourcesContent":["\"use strict\";\n\nfunction forceScriptTagAtThisPoint(out) {\n const writer = out.writer;\n\n out.global.___isLastFlush = true;\n const htmlSoFar = writer.toString();\n out.global.___isLastFlush = undefined;\n\n writer.clear();\n writer.write(htmlSoFar);\n}\n\nmodule.exports = function render(input, out) {\n if (out.isSync() === true) {\n forceScriptTagAtThisPoint(out);\n } else {\n const asyncOut = out.beginAsync({ last: true, timeout: -1 });\n out.onLast(function (next) {\n forceScriptTagAtThisPoint(asyncOut);\n asyncOut.end();\n next();\n });\n }\n};\n"],"file":"preferred-script-location-tag.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/core-tags/components/preserve-tag/index-browser.js"],"names":["module","exports","render","input","out","componentsContext","isHydrate","ownerComponent","shouldPreserve","i","referenceComponent","key","checkKey","parentComponent","id","isPreserved","Boolean","n","b","beginElement","endElement","renderBody","bf","ef"],"m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GAZD,MAYO;AACLA,IAAAA,GAAG,CAACkB,EAAJ,CAAOX,GAAP,EAAYJ,cAAZ,EAA4BC,cAA5B;;AAEA,QAAI,CAACO,WAAD,IAAgBZ,KAAK,CAACkB,UAA1B,EAAsC;AACpClB,MAAAA,KAAK,CAACkB,UAAN,CAAiBjB,GAAjB;AACD;;AAEDA,IAAAA,GAAG,CAACmB,EAAJ;AACD;AACF,CA5CD","sourcesContent":["module.exports = function render(input, out) {\n var componentsContext = out.___components;\n var isHydrate =\n componentsContext && componentsContext.___globalContext.___isHydrate;\n var ownerComponent = out.___assignedComponentDef.___component;\n var shouldPreserve = !(\"i\" in input) || input.i;\n var referenceComponent = ownerComponent;\n var key = out.___assignedKey;\n var checkKey = key;\n\n if (key[0] !== \"@\") {\n var parentComponent = componentsContext.___componentDef.___component;\n if (ownerComponent !== parentComponent) {\n referenceComponent = parentComponent;\n checkKey += \":\" + ownerComponent.id;\n }\n }\n\n var isPreserved = Boolean(\n shouldPreserve &&\n (isHydrate || referenceComponent.___keyedElements[checkKey])\n );\n\n if (input.n) {\n if (isPreserved) {\n if (input.b) {\n out.___parent.___preserveBody = true;\n } else {\n out.beginElement(\"\", null, key, ownerComponent);\n out.___parent.___preserve = true;\n out.endElement();\n }\n } else if (input.renderBody) {\n input.renderBody(out);\n }\n } else {\n out.bf(key, ownerComponent, shouldPreserve);\n\n if (!isPreserved && input.renderBody) {\n input.renderBody(out);\n }\n\n out.ef();\n }\n};\n"],"file":"index-browser.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/core-tags/components/preserve-tag/index.js"],"names":["ComponentsContext","require","getComponentsContext","module","exports","render","input","out","shouldPreserve","Boolean","i","isComponent","n","bf","renderBody","componentsContext","parentPreserved","ef"],"mappings":"aAAA,IAAIA,iBAAiB,GAAGC,OAAO,CAAC,+CAAD,CAA/B;AACA,IAAIC,oBAAoB,GAAGF,iBAAiB,GAA5C;;AAEAG,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,CAAgBC,KAAhB,EAAuBC,GAAvB,EAA4B;AAC3C,MAAIC,cAAc,GAAGC,OAAO,CAAC,EAAE,OAAOH,KAAT,KAAmBA,KAAK,CAACI,CAA1B,CAA5B;AACA,MAAIC,WAAW,GAAG,CAACL,KAAK,CAACM,CAAzB;;AAEA,MAAID,WAAJ,EAAiB;AACfJ,IAAAA,GAAG,CAACM,EAAJ,CAAON,GAAG,GAAV,EAA2BA,GAAG,GAAH,GAA3B,EAAqE,IAArE;AACD;;AAED,MAAID,KAAK,CAACQ,UAAV,EAAsB;AACpB,QAAIN,cAAJ,EAAoB;AAClB,UAAIO,iBAAiB,GAAGb,oBAAoB,CAACK,GAAD,CAA5C;AACA,UAAIS,eAAe,GAAGD,iBAAiB,GAAvC;AACAA,MAAAA,iBAAiB,GAAjB,GAAmC,IAAnC;AACAT,MAAAA,KAAK,CAACQ,UAAN,CAAiBP,GAAjB;AACAQ,MAAAA,iBAAiB,GAAjB,GAAmCC,eAAnC;AACD,KAND,MAMO;AACLV,MAAAA,KAAK,CAACQ,UAAN,CAAiBP,GAAjB;AACD;AACF;;AAED,MAAII,WAAJ,EAAiB;AACfJ,IAAAA,GAAG,CAACU,EAAJ;AACD;AACF,CAvBD","sourcesContent":["var ComponentsContext = require(\"../../../runtime/components/ComponentsContext\");\nvar getComponentsContext = ComponentsContext.___getComponentsContext;\n\nmodule.exports = function render(input, out) {\n var shouldPreserve = Boolean(!(\"i\" in input) || input.i);\n var isComponent = !input.n;\n\n if (isComponent) {\n out.bf(out.___assignedKey, out.___assignedComponentDef.___component, true);\n }\n\n if (input.renderBody) {\n if (shouldPreserve) {\n var componentsContext = getComponentsContext(out);\n var parentPreserved = componentsContext.___isPreserved;\n componentsContext.___isPreserved = true;\n input.renderBody(out);\n componentsContext.___isPreserved = parentPreserved;\n } else {\n input.renderBody(out);\n }\n }\n\n if (isComponent) {\n out.ef();\n }\n};\n"],"file":"index.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/core-tags/core/__flush_here_and_after__.js"],"names":["BufferedWriter","require","module","exports","__flushHereAndAfter__","input","out","flushed","asyncOut","beginAsync","last","nextWriter","writer","on","detachedOut","createOut","sync","renderBody","_content","toString","next","end","onLast"],"mappings":"aAAA,MAAMA,cAAc,GAAGC,OAAO,CAAC,mCAAD,CAA9B;;AAEAC,MAAM,CAACC,OAAP,GAAiB,SAASC,qBAAT,CAA+BC,KAA/B,EAAsCC,GAAtC,EAA2C;AAC1D,MAAIC,OAAO,GAAG,KAAd;AACA,QAAMC,QAAQ,GAAGF,GAAG,CAACG,UAAJ,CAAe,EAAEC,IAAI,EAAE,IAAR,EAAf,CAAjB;AACA,QAAMC,UAAU,GAAGL,GAAG,CAACM,MAAvB;;AAEAN,EAAAA,GAAG,CAACO,EAAJ,OAAsB,CAAAD,MAAM,KAAI;AAC9B,QAAIA,MAAM,YAAYZ,cAAtB,EAAsC;AACpC,UAAIO,OAAJ,EAAa;AACX,cAAMO,WAAW,GAAGR,GAAG,CAACS,SAAJ,EAApB;AACAD,QAAAA,WAAW,CAACE,IAAZ;AACAX,QAAAA,KAAK,CAACY,UAAN,CAAiBH,WAAjB;AACAF,QAAAA,MAAM,CAACM,QAAP,GAAkBJ,WAAW,CAACK,QAAZ,KAAyBP,MAAM,CAACM,QAAlD;AACD,OALD,MAKO,IAAIN,MAAM,CAACQ,IAAP,KAAgBT,UAApB,EAAgC;AACrCH,QAAAA,QAAQ,CAACQ,IAAT;AACAX,QAAAA,KAAK,CAACY,UAAN,CAAiBT,QAAjB;AACAA,QAAAA,QAAQ,CAACa,GAAT;AACAd,QAAAA,OAAO,GAAG,IAAV;AACD;AACF;AACF,GAdD;;AAgBAD,EAAAA,GAAG,CAACgB,MAAJ,CAAW,MAAM;AACf,QAAI,CAACf,OAAL,EAAc;AACZC,MAAAA,QAAQ,CAACQ,IAAT;AACAX,MAAAA,KAAK,CAACY,UAAN,CAAiBT,QAAjB;AACAA,MAAAA,QAAQ,CAACa,GAAT;AACAd,MAAAA,OAAO,GAAG,IAAV;AACD;AACF,GAPD;AAQD,CA7BD","sourcesContent":["const BufferedWriter = require(\"../../runtime/html/BufferedWriter\");\n\nmodule.exports = function __flushHereAndAfter__(input, out) {\n let flushed = false;\n const asyncOut = out.beginAsync({ last: true });\n const nextWriter = out.writer;\n\n out.on(\"___toString\", writer => {\n if (writer instanceof BufferedWriter) {\n if (flushed) {\n const detachedOut = out.createOut();\n detachedOut.sync();\n input.renderBody(detachedOut);\n writer._content = detachedOut.toString() + writer._content;\n } else if (writer.next === nextWriter) {\n asyncOut.sync();\n input.renderBody(asyncOut);\n asyncOut.end();\n flushed = true;\n }\n }\n });\n\n out.onLast(() => {\n if (!flushed) {\n asyncOut.sync();\n input.renderBody(asyncOut);\n asyncOut.end();\n flushed = true;\n }\n });\n};\n"],"file":"__flush_here_and_after__.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/core-tags/core/await/AsyncValue.js"],"names":["queueMicrotask","require","AsyncValue","undefined","notifyCallbacks","asyncValue","err","value","callbacks","i","length","callback","prototype","push","then","finalPromise","onFulfilled","bind","onRejected","done","module","exports"],"mappings":"aAAA,IAAIA,cAAc,GAAGC,OAAO,CAAC,iCAAD,CAA5B;;AAEA,SAASC,UAAT,GAAsB;AACpB;AACF;AACA;AACA;AACE,YAAgBC,SAAhB;;AAEA;AACF;AACA;AACA;AACE,YAAgBA,SAAhB;;AAEA;AACF;AACA;AACE,YAAoBA,SAApB;;AAEA;AACF;AACA;AACE,YAAkB,KAAlB;AACD;;AAED,SAASC,eAAT,CAAyBC,UAAzB,EAAqCC,GAArC,EAA0CC,KAA1C,EAAiD;AAC/C,MAAIC,SAAS,GAAGH,UAAU,GAA1B;AACA,MAAIG,SAAJ,EAAe;AACb;AACAH,IAAAA,UAAU,GAAV,GAA0BF,SAA1B;;AAEA;AACA,SAAK,IAAIM,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,SAA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CC,GAAtC,CAAD,CAAd;AACD,OANgB,CAAnB;;;AASA,UAAIS,YAAY,CAACI,IAAjB,EAAuB;AACrBJ,QAAAA,YAAY,CAACI,IAAb;AACD;AACF,KAfD,MAeO;AACL;AACA,gBAAgBZ,KAAhB;;AAEA;AACA,gBAAkB,IAAlB;;AAEA;AACAH,MAAAA,eAAe,CAAC,IAAD,EAAO,IAAP,EAAaG,KAAb,CAAf;AACD;AACF,GA3EoB,EAAvB;;;AA8EAa,MAAM,CAACC,OAAP,GAAiBnB,UAAjB","sourcesContent":["var queueMicrotask = require(\"../../../runtime/queueMicrotask\");\n\nfunction AsyncValue() {\n /**\n * The data that was provided via call to resolve(data).\n * This property is assumed to be public and available for inspection.\n */\n this.___value = undefined;\n\n /**\n * The data that was provided via call to reject(err)\n * This property is assumed to be public and available for inspection.\n */\n this.___error = undefined;\n\n /**\n * The queue of callbacks that are waiting for data\n */\n this.___callbacks = undefined;\n\n /**\n * The state of the data holder (STATE_INITIAL, STATE_RESOLVED, or STATE_REJECTED)\n */\n this.___settled = false;\n}\n\nfunction notifyCallbacks(asyncValue, err, value) {\n var callbacks = asyncValue.___callbacks;\n if (callbacks) {\n // clear out the registered callbacks (we still have reference to the original value)\n asyncValue.___callbacks = undefined;\n\n // invoke all of the callbacks and use their scope\n for (var i = 0; i < callbacks.length; i++) {\n // each callback is actually an object with \"scope and \"callback\" properties\n var callback = callbacks[i];\n callback(err, value);\n }\n }\n}\n\nAsyncValue.prototype = {\n /**\n * Adds a callback to the queue. If there is not a pending request to load data\n * and we have a \"loader\" then we will use that loader to request the data.\n * The given callback will be invoked when there is an error or resolved data\n * available.\n */\n ___done: function (callback) {\n // Do we already have data or error?\n if (this.___settled) {\n // invoke the callback immediately\n return callback(this.___error, this.___value);\n }\n\n var callbacks = this.___callbacks || (this.___callbacks = []);\n callbacks.push(callback);\n },\n\n /**\n * This method will trigger any callbacks to be notified of rejection (error).\n * If this data holder has a loader then the data holder will be returned to\n * its initial state so that any future requests to load data will trigger a\n * new load call.\n */\n ___reject: function (err) {\n if (this.___settled) {\n return;\n }\n\n // remember the error\n this.___error = err;\n\n // Go to the rejected state if we don't have a loader.\n // If we do have a loader then return to the initial state\n // (we do this so that next call to done() will trigger load\n // again in case the error was transient).\n this.___settled = true;\n\n // always notify callbacks regardless of whether or not we return to the initial state\n notifyCallbacks(this, err, null);\n },\n\n /**\n * This method will trigger any callbacks to be notified of data.\n */\n ___resolve: function (value) {\n if (this.___settled) {\n return;\n }\n\n if (value && typeof value.then === \"function\") {\n var asyncValue = this;\n\n var finalPromise = value.then(\n function onFulfilled(value) {\n queueMicrotask(asyncValue.___resolve.bind(asyncValue, value));\n },\n function onRejected(err) {\n queueMicrotask(asyncValue.___reject.bind(asyncValue, err));\n }\n );\n\n if (finalPromise.done) {\n finalPromise.done();\n }\n } else {\n // remember the state\n this.___value = value;\n\n // go to the resolved state\n this.___settled = true;\n\n // notify callbacks\n notifyCallbacks(this, null, value);\n }\n }\n};\n\nmodule.exports = AsyncValue;\n"],"file":"AsyncValue.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/core-tags/core/await/client-reorder-runtime.js"],"names":["$af","id","after","doc","sourceEl","targetEl","docFragment","childNodes","i","len","af","push","document","getElementById","createDocumentFragment","length","appendChild","item","parentNode","replaceChild","window"],"mappings":"aAAA,SAASA,GAAT;AACEC,EADF;AAEEC,KAFF;AAGEC,GAHF;AAIEC,QAJF;AAKEC,QALF;AAMEC,WANF;AAOEC,UAPF;AAQEC,CARF;AASEC,GATF;AAUEC,EAVF;AAWE;AACAA,EAAAA,EAAE,GAAGV,GAAL;;AAEA,MAAIE,KAAK,IAAI,CAACQ,EAAE,CAACR,KAAD,CAAhB,EAAyB;AACvB,KAACQ,EAAE,CAAER,KAAK,GAAGA,KAAK,GAAG,GAAlB,CAAF,KAA8BQ,EAAE,CAACR,KAAD,CAAF,GAAY,EAA1C,CAAD,EAAgDS,IAAhD,CAAqDV,EAArD;AACD,GAFD,MAEO;AACLE,IAAAA,GAAG,GAAGS,QAAN;AACAR,IAAAA,QAAQ,GAAGD,GAAG,CAACU,cAAJ,CAAmB,OAAOZ,EAA1B,CAAX;AACAI,IAAAA,QAAQ,GAAGF,GAAG,CAACU,cAAJ,CAAmB,SAASZ,EAA5B,CAAX;AACAK,IAAAA,WAAW,GAAGH,GAAG,CAACW,sBAAJ,EAAd;AACAP,IAAAA,UAAU,GAAGH,QAAQ,CAACG,UAAtB;AACAC,IAAAA,CAAC,GAAG,CAAJ;AACAC,IAAAA,GAAG,GAAGF,UAAU,CAACQ,MAAjB;;AAEA,WAAOP,CAAC,GAAGC,GAAX,EAAgBD,CAAC,EAAjB,EAAqB;AACnBF,MAAAA,WAAW,CAACU,WAAZ,CAAwBT,UAAU,CAACU,IAAX,CAAgB,CAAhB,CAAxB;AACD;;AAED,QAAIZ,QAAJ,EAAc;AACZA,MAAAA,QAAQ,CAACa,UAAT,CAAoBC,YAApB,CAAiCb,WAAjC,EAA8CD,QAA9C;AACD;;AAEDK,IAAAA,EAAE,CAACT,EAAD,CAAF,GAAS,CAAT;;AAEAC,IAAAA,KAAK,GAAGQ,EAAE,CAACT,EAAE,GAAG,GAAN,CAAV;;AAEA,QAAIC,KAAJ,EAAW;AACTM,MAAAA,CAAC,GAAG,CAAJ;AACAC,MAAAA,GAAG,GAAGP,KAAK,CAACa,MAAZ;;AAEA,aAAOP,CAAC,GAAGC,GAAX,EAAgBD,CAAC,EAAjB,EAAqB;AACnBE,QAAAA,EAAE,CAACR,KAAK,CAACM,CAAD,CAAN,CAAF;AACD;AACF;AACF;;AAED;AACD;;AAEDY,MAAM,CAACpB,GAAP,GAAaA,GAAb","sourcesContent":["function $af(\n id,\n after,\n doc,\n sourceEl,\n targetEl,\n docFragment,\n childNodes,\n i,\n len,\n af\n) {\n af = $af;\n\n if (after && !af[after]) {\n (af[(after = after + \"$\")] || (af[after] = [])).push(id);\n } else {\n doc = document;\n sourceEl = doc.getElementById(\"af\" + id);\n targetEl = doc.getElementById(\"afph\" + id);\n docFragment = doc.createDocumentFragment();\n childNodes = sourceEl.childNodes;\n i = 0;\n len = childNodes.length;\n\n for (; i < len; i++) {\n docFragment.appendChild(childNodes.item(0));\n }\n\n if (targetEl) {\n targetEl.parentNode.replaceChild(docFragment, targetEl);\n }\n\n af[id] = 1;\n\n after = af[id + \"$\"];\n\n if (after) {\n i = 0;\n len = after.length;\n\n for (; i < len; i++) {\n af(after[i]);\n }\n }\n }\n\n // sourceEl.parentNode.removeChild(sourceEl);\n}\n\nwindow.$af = $af;\n"],"file":"client-reorder-runtime.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/core-tags/core/await/renderer.js"],"names":["AsyncValue","require","safeRenderBody","renderBody","targetOut","data","err","requestData","provider","timeout","asyncValue","callback","value","length","undefined","error","errorMsg","timeoutId","setTimeout","Error","code","name","clearTimeout","LAST_OPTIONS","last","module","exports","awaitTag","input","out","clientReorder","window","isVDOM","_name","_provider","placeholderRenderer","placeholder","renderContents","asyncOut","clientReorderContext","awaitInfo","dataProvider","after","showAfter","global","instances","nextId","id","placeholderIdAttrValue","write","createOut","oldEmit","emit","event","apply","arguments","push","flush","beginAsync","beforeRenderEmitted","finished","end","asyncLastOut","onLast","oldWriter","writer","resultRenderer","then","errorRenderer","catch","renderBodyErr"],"mappings":"AAAA;;AAEA,IAAIA,UAAU,GAAGC,OAAO,CAAC,cAAD,CAAxB;;AAEA,SAASC,cAAT,CAAwBC,UAAxB,EAAoCC,SAApC,EAA+CC,IAA/C,EAAqD;AACnD,MAAI;AACFF,IAAAA,UAAU,CAACC,SAAD,EAAYC,IAAZ,CAAV;AACD,GAFD,CAEE,OAAOC,GAAP,EAAY;AACZ,WAAOA,GAAP;AACD;AACF;;AAED,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,OAA/B,EAAwC;AACtC,MAAIC,UAAU,GAAG,IAAIV,UAAJ,EAAjB;;AAEA,MAAI,OAAOQ,QAAP,KAA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MAAAA,QAAQ,CAACuB,GAAT;AACD;AACF;;AAEDnD,EAAAA,UAAU,GAAV,CAAmBP,UAAnB;AACD,CApID;;AAsIA,SAASkC,cAAT,CAAwB/B,GAAxB,EAA6BD,IAA7B,EAAmCuB,KAAnC,EAA0CC,GAA1C,EAA+C;AAC7C,MAAIqC,cAAc,GAAGtC,KAAK,CAACuC,IAAN,IAAcvC,KAAK,CAACuC,IAAN,CAAWhE,UAA9C;AACA,MAAIiE,aAAa,GAAGxC,KAAK,CAACyC,KAAN,IAAezC,KAAK,CAACyC,KAAN,CAAYlE,UAA/C;;AAEA,MAAIG,GAAJ,EAAS;AACP,QAAIsB,KAAK,CAACyC,KAAV,EAAiB;AACf,UAAID,aAAJ,EAAmB;AACjBA,QAAAA,aAAa,CAACvC,GAAD,EAAMvB,GAAN,CAAb;AACD;AACF,KAJD,MAIO;AACLuB,MAAAA,GAAG,CAACd,KAAJ,CAAUT,GAAV;AACD;AACF,GARD,MAQO;AACL,QAAI4D,cAAJ,EAAoB;AAClB,UAAII,aAAa,GAAGpE,cAAc,CAACgE,cAAD,EAAiBrC,GAAjB,EAAsBxB,IAAtB,CAAlC;;AAEA,UAAIiE,aAAJ,EAAmB;AACjB,eAAOjC,cAAc,CAACiC,aAAD,EAAgBjE,IAAhB,EAAsBuB,KAAtB,EAA6BC,GAA7B,CAArB;AACD;AACF;AACF;AACF","sourcesContent":["\"use strict\";\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar AsyncValue = require(\"./AsyncValue\");\n\nfunction safeRenderBody(renderBody, targetOut, data) {\n try {\n renderBody(targetOut, data);\n } catch (err) {\n return err;\n }\n}\n\nfunction requestData(provider, timeout) {\n var asyncValue = new AsyncValue();\n\n if (typeof provider === \"function\") {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\n \"Passing a callback function to the <await> tag has been deprecated, please use a promise instead.\",\n { level: 1, locationIndex: 3 }\n );\n }\n\n var callback = function (err, data) {\n if (err) {\n asyncValue.___reject(err);\n } else {\n asyncValue.___resolve(data);\n }\n };\n\n var value =\n provider.length === 1\n ? // one argument so only provide callback to function call\n provider(callback)\n : // two arguments so provide args and callback to function call\n provider(null, callback);\n\n if (value !== undefined) {\n asyncValue.___resolve(value);\n }\n } else {\n // Assume the provider is a data object...\n asyncValue.___resolve(provider);\n }\n\n if (timeout == null) {\n timeout = 10000;\n }\n\n var error;\n var errorMsg = \"Timed out after \" + timeout + \"ms\";\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n // Make sure we have a meaningful stack trace in development preparing the stacktrace upfront.\n // If we create it inside the setTimeout, we will end up with a short, not meaningful, stack trace\n // We only do it in development to avoid overhead in production\n error = new Error(errorMsg);\n }\n if (timeout > 0) {\n let timeoutId = setTimeout(function () {\n timeoutId = null;\n if (!error) error = new Error(errorMsg);\n error.code = \"ERR_AWAIT_TIMEDOUT\";\n error.name = \"TimeoutError\";\n asyncValue.___reject(error);\n }, timeout);\n\n asyncValue.___done(function () {\n if (timeoutId != null) {\n clearTimeout(timeoutId);\n }\n });\n }\n\n return asyncValue;\n}\n\nconst LAST_OPTIONS = { last: true, name: \"await:finish\" };\n\nmodule.exports = function awaitTag(input, out) {\n var clientReorder =\n typeof window === \"undefined\" &&\n input.clientReorder === true &&\n !out.isVDOM;\n\n var name = input.name || input._name;\n var timeout = input.timeout;\n var provider = input._provider;\n var asyncValue = requestData(provider, timeout);\n var placeholderRenderer = input.placeholder && input.placeholder.renderBody;\n\n if (asyncValue.___settled) {\n renderContents(asyncValue.___error, asyncValue.___value, input, out);\n return;\n }\n\n var asyncOut;\n var clientReorderContext;\n\n var awaitInfo = {\n name: name,\n clientReorder: clientReorder,\n dataProvider: provider\n };\n\n if (clientReorder) {\n awaitInfo.after = input.showAfter;\n\n clientReorderContext =\n out.global.___clientReorderContext ||\n (out.global.___clientReorderContext = {\n instances: [],\n nextId: 0\n });\n\n var id = (awaitInfo.id = input.name || clientReorderContext.nextId++);\n var placeholderIdAttrValue = \"afph\" + id;\n\n if (placeholderRenderer) {\n out.write('<span id=\"' + placeholderIdAttrValue + '\">');\n placeholderRenderer(out);\n out.write(\"</span>\");\n } else {\n out.write('<noscript id=\"' + placeholderIdAttrValue + '\"></noscript>');\n }\n\n // If `client-reorder` is enabled then we asynchronously render the await instance to a new\n // \"out\" instance so that we can Write to a temporary in-memory buffer.\n asyncOut = awaitInfo.out = out.createOut();\n\n var oldEmit = asyncOut.emit;\n\n // Since we are rendering the await instance to a new and separate out,\n // we want to proxy any child events to the main AsyncWriter in case anyone is interested\n // in those events. This is also needed for the following events to be handled correctly:\n //\n // - await:begin\n // - await:beforeRender\n // - await:finish\n //\n asyncOut.emit = function (event) {\n if (event !== \"finish\" && event !== \"error\") {\n // We don't want to proxy the finish and error events since those are\n // very specific to the AsyncWriter associated with the await instance\n out.emit.apply(out, arguments);\n }\n\n oldEmit.apply(asyncOut, arguments);\n };\n\n if (clientReorderContext.instances) {\n clientReorderContext.instances.push(awaitInfo);\n }\n\n out.emit(\"await:clientReorder\", awaitInfo);\n } else {\n out.flush(); // Flush everything up to this await instance\n asyncOut = awaitInfo.out = out.beginAsync({\n timeout: 0, // We will use our code for controlling timeout\n name: name\n });\n }\n\n var beforeRenderEmitted = false;\n\n out.emit(\"await:begin\", awaitInfo);\n\n function renderBody(err, data) {\n if (awaitInfo.finished) {\n return;\n }\n\n if (err) {\n awaitInfo.error = err;\n }\n\n if (!beforeRenderEmitted) {\n beforeRenderEmitted = true;\n out.emit(\"await:beforeRender\", awaitInfo);\n }\n\n renderContents(err, data, input, asyncOut);\n\n awaitInfo.finished = true;\n\n if (clientReorder) {\n asyncOut.end();\n out.flush();\n } else {\n // When using client reordering we want to delay\n // this event until after the code to move\n // the async fragment into place has been written\n let asyncLastOut = asyncOut.beginAsync(LAST_OPTIONS);\n asyncOut.onLast(function () {\n var oldWriter = asyncOut.writer;\n // We swap out the writer so that writing will happen to our `asyncLastOut`\n // even though we are still passing along the original `asyncOut`. We have\n // to pass along the original `asyncOut` because that has contextual\n // information (such as the rendered UI components)\n asyncOut.writer = asyncLastOut.writer;\n out.emit(\"await:finish\", awaitInfo);\n asyncOut.writer = oldWriter;\n asyncLastOut.end();\n out.flush();\n });\n\n asyncOut.end();\n }\n }\n\n asyncValue.___done(renderBody);\n};\n\nfunction renderContents(err, data, input, out) {\n var resultRenderer = input.then && input.then.renderBody;\n var errorRenderer = input.catch && input.catch.renderBody;\n\n if (err) {\n if (input.catch) {\n if (errorRenderer) {\n errorRenderer(out, err);\n }\n } else {\n out.error(err);\n }\n } else {\n if (resultRenderer) {\n var renderBodyErr = safeRenderBody(resultRenderer, out, data);\n\n if (renderBodyErr) {\n return renderContents(renderBodyErr, data, input, out);\n }\n }\n }\n}\n"],"file":"renderer.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/core-tags/core/await/reorderer-renderer.js"],"names":["module","exports","input","out","isSync","global","__awaitReordererInvoked","flush","asyncOut","beginAsync","last","timeout","name","onLast","next","awaitContext","remaining","instances","length","end","handleAwait","awaitInfo","on","emit","bind","result","_afRuntime","script","write","id","toString","after","writer","err","error","forEach"],"mappings":"AAAA;;AAEAA,MAAM,CAACC,OAAP,GAAiB,UAAUC,KAAV,EAAiBC,GAAjB,EAAsB;AACrC;AACA;AACA,MAAIA,GAAG,CAACC,MAAJ,EAAJ,EAAkB;AAChB;AACD;;AAED,MAAIC,MAAM,GAAGF,GAAG,CAACE,MAAjB;;AAEA;AACA;AACA,MAAIA,MAAM,CAACC,uBAAX,EAAoC;AAClC;AACD;;AAEDD,EAAAA,MAAM,CAACC,uBAAP,GAAiC,IAAjC;;AAEA,MAAIH,GAAG,CAACE,MAAJ,GAAJ,EAAwC;AACtCF,IAAAA,GAAG,CAACI,KAAJ;AACD;;AAED,MAAIC,QAAQ,GAAGL,GAAG,CAACM,UAAJ,CAAe;AAC5BC,IAAAA,IAAI,EAAE,IADsB;AAE5BC,IAAAA,OAAO,EAAE,CAAC,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;;AAEA7B,QAAAA,GAAG,CAACoB,IAAJ,CAAS,cAAT,EAAyBF,SAAzB;;AAEAlB,QAAAA,GAAG,CAACI,KAAJ;;AAEA,YAAI,EAAES,SAAF,KAAgB,CAApB,EAAuB;AACrBR,UAAAA,QAAQ,CAACW,GAAT;AACAL,UAAAA,IAAI;AACL;AACF,OAtCH;AAuCGQ,MAAAA,EAvCH,CAuCM,OAvCN,EAuCe,UAAUW,GAAV,EAAe;AAC1BzB,QAAAA,QAAQ,CAAC0B,KAAT,CAAeD,GAAf;AACD,OAzCH;AA0CD;;AAEDlB,IAAAA,YAAY,CAACE,SAAb,CAAuBkB,OAAvB,CAA+Bf,WAA/B;;AAEAjB,IAAAA,GAAG,CAACmB,EAAJ,CAAO,qBAAP,EAA8B,UAAUD,SAAV,EAAqB;AACjDL,MAAAA,SAAS;AACTI,MAAAA,WAAW,CAACC,SAAD,CAAX;AACD,KAHD;;AAKA;AACA;AACA,WAAON,YAAY,CAACE,SAApB;AACD,GAtED;AAuED,CAlGD","sourcesContent":["\"use strict\";\n\nmodule.exports = function (input, out) {\n // We cannot call beginSync() when using renderSync(). In this case we will\n // ignore the await-reorderer tag.\n if (out.isSync()) {\n return;\n }\n\n var global = out.global;\n\n // We have already invoked an <await-reorderer>. We do not need to do this\n // work again.\n if (global.__awaitReordererInvoked) {\n return;\n }\n\n global.__awaitReordererInvoked = true;\n\n if (out.global.___clientReorderContext) {\n out.flush();\n }\n\n var asyncOut = out.beginAsync({\n last: true,\n timeout: -1,\n name: \"await-reorderer\"\n });\n\n out.onLast(function (next) {\n var awaitContext = global.___clientReorderContext;\n var remaining;\n\n // Validate that we have remaining <await> instances that need handled\n if (\n !awaitContext ||\n !awaitContext.instances ||\n !(remaining = awaitContext.instances.length)\n ) {\n asyncOut.end();\n next();\n return;\n }\n\n function handleAwait(awaitInfo) {\n awaitInfo.out\n .on(\"___toString\", out.emit.bind(out, \"___toString\"))\n .on(\"finish\", function (result) {\n if (!global._afRuntime) {\n // Minified version of ./client-reorder-runtime.js\n asyncOut.script(\n `function $af(d,a,e,l,g,h,k,b,f,c){c=$af;if(a&&!c[a])(c[a+=\"$\"]||(c[a]=[])).push(d);else{e=document;l=e.getElementById(\"af\"+d);g=e.getElementById(\"afph\"+d);h=e.createDocumentFragment();k=l.childNodes;b=0;for(f=k.length;b<f;b++)h.appendChild(k.item(0));g&&g.parentNode.replaceChild(h,g);c[d]=1;if(a=c[d+\"$\"])for(b=0,f=a.length;b<f;b++)c(a[b])}}`\n );\n global._afRuntime = true;\n }\n\n asyncOut.write(\n '<div id=\"af' +\n awaitInfo.id +\n '\" style=\"display:none\">' +\n result.toString() +\n \"</div>\"\n );\n\n asyncOut.script(\n \"$af(\" +\n (typeof awaitInfo.id === \"number\"\n ? awaitInfo.id\n : '\"' + awaitInfo.id + '\"') +\n (awaitInfo.after ? ',\"' + awaitInfo.after + '\"' : \"\") +\n \")\"\n );\n\n awaitInfo.out.writer = asyncOut.writer;\n\n out.emit(\"await:finish\", awaitInfo);\n\n out.flush();\n\n if (--remaining === 0) {\n asyncOut.end();\n next();\n }\n })\n .on(\"error\", function (err) {\n asyncOut.error(err);\n });\n }\n\n awaitContext.instances.forEach(handleAwait);\n\n out.on(\"await:clientReorder\", function (awaitInfo) {\n remaining++;\n handleAwait(awaitInfo);\n });\n\n // Now that we have a listener attached, we want to receive any additional\n // out-of-sync instances via an event\n delete awaitContext.instances;\n });\n};\n"],"file":"reorderer-renderer.js"}
|
package/dist/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["exports","createOut","require","load"],"mappings":"AAAA;;AAEAA,OAAO,CAACC,SAAR,GAAoBC,OAAO,CAAC,qBAAD,CAA3B;AACAF,OAAO,CAACG,IAAR,GAAeD,OAAO,CAAC,UAAD,CAAtB","sourcesContent":["\"use strict\";\n\nexports.createOut = require(\"./runtime/createOut\");\nexports.load = require(\"./loader\");\n"],"file":"index.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/loader/index-browser.js"],"names":["module","exports","__webpack_require__","require"],"mappings":"AAAA;AACAA,MAAM,CAACC,OAAP;AACE;AACA,OAAOC,mBAAP,KAA+B,WAA/B,GAA6CA,mBAA7C,GAAmEC,OAFrE","sourcesContent":["\"use strict\";\nmodule.exports =\n // eslint-disable-next-line no-undef\n typeof __webpack_require__ !== \"undefined\" ? __webpack_require__ : require;\n"],"file":"index-browser.js"}
|
package/dist/loader/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/loader/index.js"],"names":["nodePath","require","fs","Module","markoCompiler","cwd","process","fsOptions","encoding","requiredCompilerOptions","modules","module","exports","load","templatePath","templateSrc","options","arguments","length","doLoad","lastArg","finalOptions","Error","loadSource","compiledSrc","cached","cache","templateModule","paths","_nodeModulePaths","dirname","filename","_cache","_compile","getCachedTemplate","precompiledTemplatePath","existsSync","Object","assign","defaultOptions","resolve","template","readFileSync","compile","default"],"mappings":"AAAA;AACA,IAAIA,QAAQ,GAAGC,OAAO,CAAC,MAAD,CAAtB;AACA,IAAIC,EAAE,GAAGD,OAAO,CAAC,IAAD,CAAhB;AACA,IAAIE,MAAM,GAAGF,OAAO,CAAC,QAAD,CAAP,CAAkBE,MAA/B;AACA,IAAIC,aAAa,GAAGH,OAAO,CAAC,aAAD,CAA3B;AACA,IAAII,GAAG,GAAGC,OAAO,CAACD,GAAR,EAAV;AACA,IAAIE,SAAS,GAAG,EAAEC,QAAQ,EAAE,MAAZ,EAAhB;AACA,IAAIC,uBAAuB,GAAG,EAAEC,OAAO,EAAE,KAAX,EAA9B;;AAEAC,MAAM,CAACC,OAAP,GAAiB,SAASC,IAAT,CAAcC,YAAd,EAA4BC,WAA5B,EAAyCC,OAAzC,EAAkD;AACjE,MAAIC,SAAS,CAACC,MAAV,KAAqB,CAAzB,EAA4B;AAC1B,WAAOC,MAAM,CAACL,YAAD,CAAb;AACD,GAFD,MAEO,IAAIG,SAAS,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,GAAGrB,YAAY,GAAG,KAA7C;AACA,MAAIa,cAAc;AAChB1B,EAAAA,OAAO,CAACyB,KAAR,CAAcZ,YAAd,KAA+Bb,OAAO,CAACyB,KAAR,CAAcS,uBAAd,CADjC;;AAGA,MAAIR,cAAJ,EAAoB;AAClB,WAAOA,cAAc,CAACf,OAAtB;AACD,GAFD,MAEO,IAAIV,EAAE,CAACkC,UAAH,CAAcD,uBAAd,CAAJ,EAA4C;AACjD,WAAOlC,OAAO,CAACkC,uBAAD,CAAd;AACD;AACF;;AAED,SAAShB,MAAT,CAAgBL,YAAhB,EAA8BC,WAA9B,EAA2CC,OAA3C,EAAoD;AAClDA,EAAAA,OAAO,GAAGqB,MAAM,CAACC,MAAP;AACR,IADQ;AAERlC,EAAAA,aAAa,CAACmC,cAFN;AAGRvB,EAAAA,OAHQ;AAIRP,EAAAA,uBAJQ,CAAV;;AAMAK,EAAAA,YAAY,GAAGd,QAAQ,CAACwC,OAAT,CAAiBnC,GAAjB,EAAsBS,YAAtB,CAAf;AACA,MAAI2B,QAAQ,GAAGP,iBAAiB,CAACpB,YAAD,CAAhC;;AAEA,MAAI,CAAC2B,QAAL,EAAe;AACb,QAAI1B,WAAW,IAAI,IAAnB,EAAyB;AACvBA,MAAAA,WAAW,GAAGb,EAAE,CAACwC,YAAH,CAAgB5B,YAAhB,EAA8BP,SAA9B,CAAd;AACD;;AAED,QAAIiB,WAAW,GAAGpB,aAAa,CAACuC,OAAd,CAAsB5B,WAAtB,EAAmCD,YAAnC,EAAiDE,OAAjD,CAAlB;;AAEAyB,IAAAA,QAAQ,GAAGlB,UAAU,CAACT,YAAD,EAAeU,WAAf,CAArB;AACD;;AAED,MAAIiB,QAAQ,CAACG,OAAb,EAAsB;AACpBH,IAAAA,QAAQ,GAAGA,QAAQ,CAACG,OAApB;AACD;;AAED,SAAOH,QAAP;AACD","sourcesContent":["\"use strict\";\nvar nodePath = require(\"path\");\nvar fs = require(\"fs\");\nvar Module = require(\"module\").Module;\nvar markoCompiler = require(\"../compiler\");\nvar cwd = process.cwd();\nvar fsOptions = { encoding: \"utf8\" };\nvar requiredCompilerOptions = { modules: \"cjs\" };\n\nmodule.exports = function load(templatePath, templateSrc, options) {\n if (arguments.length === 1) {\n return doLoad(templatePath);\n } else if (arguments.length === 2) {\n // see if second argument is templateSrc (a String)\n // or options (an Object)\n var lastArg = arguments[arguments.length - 1];\n if (typeof lastArg === \"string\") {\n return doLoad(templatePath, templateSrc);\n } else {\n var finalOptions = templateSrc;\n return doLoad(templatePath, null, finalOptions);\n }\n } else if (arguments.length === 3) {\n // assume function called according to function signature\n return doLoad(templatePath, templateSrc, options);\n } else {\n throw new Error(\"Illegal arguments\");\n }\n};\n\nfunction loadSource(templatePath, compiledSrc) {\n // Short-circuit loading if the template has already been cached in the Node.js require cache\n var cached = require.cache[templatePath];\n if (cached) {\n return cached.exports;\n }\n\n var templateModule = new Module(templatePath, module);\n templateModule.paths = Module._nodeModulePaths(\n nodePath.dirname(templatePath)\n );\n templateModule.filename = templatePath;\n\n Module._cache[templatePath] = templateModule;\n\n templateModule._compile(compiledSrc, templatePath);\n\n return templateModule.exports;\n}\n\nfunction getCachedTemplate(templatePath) {\n var precompiledTemplatePath = templatePath + \".js\";\n var templateModule =\n require.cache[templatePath] || require.cache[precompiledTemplatePath];\n\n if (templateModule) {\n return templateModule.exports;\n } else if (fs.existsSync(precompiledTemplatePath)) {\n return require(precompiledTemplatePath);\n }\n}\n\nfunction doLoad(templatePath, templateSrc, options) {\n options = Object.assign(\n {},\n markoCompiler.defaultOptions,\n options,\n requiredCompilerOptions\n );\n templatePath = nodePath.resolve(cwd, templatePath);\n var template = getCachedTemplate(templatePath);\n\n if (!template) {\n if (templateSrc == null) {\n templateSrc = fs.readFileSync(templatePath, fsOptions);\n }\n\n var compiledSrc = markoCompiler.compile(templateSrc, templatePath, options);\n\n template = loadSource(templatePath, compiledSrc);\n }\n\n if (template.default) {\n template = template.default;\n }\n\n return template;\n}\n"],"file":"index.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"browser-refresh.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/node-require/hot-reload.js"],"names":["fs","require","path","compiler","exports","handleFileModified","filename","existsSync","console","log","clearCaches","cwdRelative","extname","cache","tryReload","e","error","relative","process","cwd"],"mappings":"cAAA;;AAEA,MAAMA,EAAE,GAAGC,OAAO,CAAC,IAAD,CAAlB;AACA,MAAMC,IAAI,GAAGD,OAAO,CAAC,MAAD,CAApB;AACA,MAAME,QAAQ,GAAGF,OAAO,CAAC,aAAD,CAAxB;AACAA,OAAO,CAAC,4BAAD,CAAP;;AAEAG,OAAO,CAACC,kBAAR,GAA6B,UAAUC,QAAV,EAAoB;AAC/C,MAAI,CAACN,EAAE,CAACO,UAAH,CAAcD,QAAd,CAAL,EAA8B;AAC5BE,IAAAA,OAAO,CAACC,GAAR;AACE,+DADF;AAEEH,IAAAA,QAFF;;AAIA;AACD;;AAEDH,EAAAA,QAAQ,CAACO,WAAT;AACAF,EAAAA,OAAO,CAACC,GAAR,CAAa,0BAAyBE,WAAW,CAACL,QAAD,CAAW,EAA5D;;AAEA,MAAIJ,IAAI,CAACU,OAAL,CAAaN,QAAb,MAA2B,OAA/B,EAAwC;AACtC;AACA;AACA,SAAK,MAAMA,QAAX,IAAuBL,OAAO,CAACY,KAA/B,EAAsC;AACpC,UAAIX,IAAI,CAACU,OAAL,CAAaN,QAAb,MAA2B,QAA/B,EAAyC;AACvCQ,QAAAA,SAAS,CAACR,QAAD,CAAT;AACD;AACF;AACF,GARD,MAQO;AACLQ,IAAAA,SAAS,CAACR,QAAD,CAAT;AACD;AACF,CAvBD;;AAyBA,SAASQ,SAAT,CAAmBR,QAAnB,EAA6B;AAC3B,MAAI;AACF,WAAOL,OAAO,CAACY,KAAR,CAAcP,QAAd,CAAP;AACAL,IAAAA,OAAO,CAACK,QAAD,CAAP;AACAE,IAAAA,OAAO,CAACC,GAAR;AACG,+CAA0CE,WAAW,CAACL,QAAD,CAAW,EADnE;;AAGD,GAND,CAME,OAAOS,CAAP,EAAU;AACVP,IAAAA,OAAO,CAACQ,KAAR,CAAcD,CAAd;AACD;AACF;;AAED,SAASJ,WAAT,CAAqBL,QAArB,EAA+B;AAC7B,SAAOJ,IAAI,CAACe,QAAL,CAAcC,OAAO,CAACC,GAAR,EAAd,EAA6Bb,QAA7B,CAAP;AACD","sourcesContent":["/* eslint-disable no-console */\n\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst compiler = require(\"../compiler\");\nrequire(\"../runtime/html/hot-reload\");\n\nexports.handleFileModified = function (filename) {\n if (!fs.existsSync(filename)) {\n console.log(\n \"[marko/hot-reload] WARNING cannot resolve template path: \",\n filename\n );\n return;\n }\n\n compiler.clearCaches();\n console.log(`[marko] File modified: ${cwdRelative(filename)}`);\n\n if (path.extname(filename) === \".json\") {\n // If we taglib was modified then uncache *all* templates so that they will\n // all be reloaded\n for (const filename in require.cache) {\n if (path.extname(filename) === \".marko\") {\n tryReload(filename);\n }\n }\n } else {\n tryReload(filename);\n }\n};\n\nfunction tryReload(filename) {\n try {\n delete require.cache[filename];\n require(filename);\n console.log(\n `[marko] Template successfully reloaded: ${cwdRelative(filename)}`\n );\n } catch (e) {\n console.error(e);\n }\n}\n\nfunction cwdRelative(filename) {\n return path.relative(process.cwd(), filename);\n}\n"],"file":"hot-reload.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/node-require/index.js"],"names":["path","require","resolveFrom","requiredCompilerOptions","modules","defaultCompilerOptions","sourceMaps","meta","MARKO_EXTENSIONS","Symbol","normalizeExtension","extension","charAt","compile","templatePath","markoCompiler","userCompilerOptions","compileFileSync","Object","assign","code","install","options","requireExtensions","extensions","compilerOptions","push","concat","length","markoRequireExtension","module","filename","dirname","markoCompilerModulePath","compiledSrc","_compile","forEach","exports","getExtensions"],"mappings":"AAAA;;;AAGA,MAAMA,I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ourcesContent":["\"use strict\";\n\nconst complain = \"MARKO_DEBUG\" && require(\"complain\");\nconst path = require(\"path\");\nconst resolveFrom = require(\"resolve-from\");\nconst requiredCompilerOptions = { modules: \"cjs\" };\nconst defaultCompilerOptions = {\n // eslint-disable-next-line no-constant-condition\n sourceMaps: \"MARKO_DEBUG\" ? \"inline\" : false,\n meta: true\n};\nconst MARKO_EXTENSIONS = Symbol(\"MARKO_EXTENSIONS\");\n\n// eslint-disable-next-line no-constant-condition\nif (\"MARKO_DEBUG\") {\n complain(\n 'Using \"marko/node-require\" has been replaced with \"@marko/compiler/register\".'\n );\n}\n\nfunction normalizeExtension(extension) {\n if (extension.charAt(0) !== \".\") {\n extension = \".\" + extension;\n }\n return extension;\n}\n\nfunction compile(templatePath, markoCompiler, userCompilerOptions) {\n return markoCompiler.compileFileSync(\n templatePath,\n Object.assign(\n {},\n defaultCompilerOptions,\n userCompilerOptions,\n requiredCompilerOptions\n )\n ).code;\n}\n\nfunction install(options) {\n options = options || {};\n\n var requireExtensions = options.require // options.require introduced for testing\n ? options.require.extensions\n : require.extensions;\n\n var compilerOptions = options.compilerOptions;\n\n var extensions = [];\n\n if (options.extension) {\n extensions.push(options.extension);\n }\n\n if (options.extensions) {\n extensions = extensions.concat(options.extensions);\n }\n\n if (extensions.length === 0) {\n extensions.push(\".marko\");\n }\n\n function markoRequireExtension(module, filename) {\n // Resolve the appropriate compiler relative to the location of the\n // marko template file on disk using the \"resolve-from\" module.\n var dirname = path.dirname(filename);\n var markoCompilerModulePath = resolveFrom(dirname, \"@marko/compiler\");\n var markoCompiler = require(markoCompilerModulePath);\n\n // Now use the appropriate Marko compiler to compile the Marko template\n // file to JavaScript source code:\n var compiledSrc = compile(filename, markoCompiler, compilerOptions);\n\n // Append \".js\" to the filename since that is where we write the compiled\n // source code that is being loaded. This allows stack traces to match up.\n module._compile(compiledSrc, filename);\n }\n\n requireExtensions[MARKO_EXTENSIONS] =\n requireExtensions[MARKO_EXTENSIONS] ||\n (requireExtensions[MARKO_EXTENSIONS] = []);\n\n extensions.forEach(extension => {\n extension = normalizeExtension(extension);\n requireExtensions[extension] = markoRequireExtension;\n requireExtensions[MARKO_EXTENSIONS].push(extension);\n });\n}\n\ninstall();\n\nexports.install = install;\n\nexports.getExtensions = function () {\n return require.extensions[MARKO_EXTENSIONS];\n};\n\nrequire(\"./browser-refresh\");\n"],"file":"index.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/RenderResult.js"],"names":["domInsert","require","getRootNode","el","cur","parentNode","getComponentDefs","result","componentDefs","Error","RenderResult","out","undefined","module","exports","proto","prototype","getComponent","getComponents","selector","components","forEach","componentDef","component","push","afterInsert","host","componentsContext","getNode","getOutput","toString","document","Object","defineProperty","get","getEl","renderResult","referenceEl"],"mappings":"aAAA,IAAIA,SAAS,GAAGC,OAAO,CAAC,cAAD,CAAvB;;;AAGA,SAASC,WAAT,CAAqBC,EAArB,EAAyB;AACvB,MAAIC,GAAG,GAAGD,EAAV;AACA,SAAOC,GAAG,CAACC,UAAX,EAAuBD,GAAG,GAAGA,GAAG,CAACC,UAAV;AACvB,SAAOD,GAAP;AACD;;AAED,SAASE,gBAAT,CAA0BC,MAA1B,EAAkC;AAChC,MAAIC,aAAa,GAAGD,MAAM,GAA1B;;AAEA,MAAI,CAACC,aAAL,EAAoB;AAClB,UAAMC,KAAK,CAAC,cAAD,CAAX;AACD;AACD,SAAOD,aAAP;AACD;;AAED,SAASE,YAAT,CAAsBC,GAAtB,EAA2B;AACzB,OAAKA,GAAL,GAAW,UAAcA,GAAzB;AACA,YAAqBC,SAArB;AACD;;AAEDC,MAAM,CAACC,OAAP,GAAiBJ,YAAjB;;AAEA,IAAIK,KAAK,GAAIL,YAAY,CAACM,SAAb,GAAyB;AACpCC,EAAAA,YAAY,EAAE,YAAY;AACxB,WAAO,KAAKC,aAAL,GAAqB,CAArB,CAAP;AACD,GAHmC;AAIpCA,EAAAA,aAAa,EAAE,UAAUC,QAAV,E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KAAtB,EAA6B,SAA7B,EAAwC;AACtCmB,EAAAA,GAAG,EAAE,YAAY;AACf;;;;;;AAMA,WAAO,OAAP;AACD,GATqC,EAAxC;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACAlC,SAAS;AACPe,KADO;AAEP,SAASoB,KAAT,CAAeC,YAAf,EAA6BC,WAA7B,EAA0C;AACxC,SAAOD,YAAY,CAACR,OAAb,CAAqB1B,WAAW,CAACmC,WAAD,CAAhC,CAAP;AACD,CAJM;AAKP,SAASZ,WAAT,CAAqBW,YAArB,EAAmCC,WAAnC,EAAgD;AAC9C,SAAOD,YAAY,CAACX,WAAb,CAAyBvB,WAAW,CAACmC,WAAD,CAApC,CAAP;AACD,CAPM,CAAT","sourcesContent":["var domInsert = require(\"./dom-insert\");\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\n\nfunction getRootNode(el) {\n var cur = el;\n while (cur.parentNode) cur = cur.parentNode;\n return cur;\n}\n\nfunction getComponentDefs(result) {\n var componentDefs = result.___components;\n\n if (!componentDefs) {\n throw Error(\"No component\");\n }\n return componentDefs;\n}\n\nfunction RenderResult(out) {\n this.out = this.___out = out;\n this.___components = undefined;\n}\n\nmodule.exports = RenderResult;\n\nvar proto = (RenderResult.prototype = {\n getComponent: function () {\n return this.getComponents()[0];\n },\n getComponents: function (selector) {\n if (this.___components === undefined) {\n throw Error(\"Not added to DOM\");\n }\n\n var componentDefs = getComponentDefs(this);\n\n var components = [];\n\n componentDefs.forEach(function (componentDef) {\n var component = componentDef.___component;\n if (!selector || selector(component)) {\n components.push(component);\n }\n });\n\n return components;\n },\n\n afterInsert: function (host) {\n var out = this.___out;\n var componentsContext = out.___components;\n if (componentsContext) {\n this.___components = componentsContext.___initComponents(host);\n } else {\n this.___components = null;\n }\n\n return this;\n },\n getNode: function (host) {\n return this.___out.___getNode(host);\n },\n getOutput: function () {\n return this.___out.___getOutput();\n },\n toString: function () {\n return this.___out.toString();\n },\n document: typeof document === \"object\" && document\n});\n\nObject.defineProperty(proto, \"html\", {\n get: function () {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\n 'The \"html\" property is deprecated. Please use \"toString\" instead.'\n );\n }\n return this.toString();\n }\n});\n\nObject.defineProperty(proto, \"context\", {\n get: function () {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\n 'The \"context\" property is deprecated. Please use \"out\" instead.'\n );\n }\n return this.___out;\n }\n});\n\n// Add all of the following DOM methods to Component.prototype:\n// - appendTo(referenceEl)\n// - replace(referenceEl)\n// - replaceChildrenOf(referenceEl)\n// - insertBefore(referenceEl)\n// - insertAfter(referenceEl)\n// - prependTo(referenceEl)\ndomInsert(\n proto,\n function getEl(renderResult, referenceEl) {\n return renderResult.getNode(getRootNode(referenceEl));\n },\n function afterInsert(renderResult, referenceEl) {\n return renderResult.afterInsert(getRootNode(referenceEl));\n }\n);\n"],"file":"RenderResult.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtime/components/Component.js"],"names":["domInsert","require","defaultCreateOut","getComponentsContext","componentsUtil","componentLookup","destroyNodeRecursive","EventEmitter","RenderResult","SubscriptionTracker","inherit","updateManager","morphdom","eventDelegation","domData","componentsByDOMNode","keyedElementsByComponentId","CONTEXT_KEY","hasOwnProperty","Object","prototype","slice","Array","COMPONENT_SUBSCRIBE_TO_OPTIONS","NON_COMPONENT_SUBSCRIBE_TO_OPTIONS","addDestroyListener","emit","ELEMENT_NODE","removeListener","removeEventListenerHandle","walkFragments","fragment","node","firstChild","handleCustomEventWithMethodListener","component","targetMethodName","args","extraArgs","push","concat","targetComponent","targetMethod","Error","apply","resolveKeyHelper","key","index","resolveComponentIdHelper","id","processUpdateHandlers","stateChanges","oldState","handlerMethod","handlers","propName","call","handlerMethodName","forEach","handler","propertyName","newValue","oldValue","checkInputChanged","existingComponent","oldInput","newInput","oldKeys","keys","newKeys","len","length","i","componentProto","Component","undefined","ssrKeyedElements","subscribeTo","target","TypeError","subscriptions","subscribeToOptions","eventType","customEvents","isOnce","arguments","getElId","getEl","keyedElement","el","getEls","els","getComponent","rootNode","get","getComponents","lookup","map","filter","Boolean","destroy","root","nodes","parentNode","removeChild","detached","set","removeAllListeners","isDestroyed","state","newState","setState","name","value","k","setStateDirty","replaceState","input","onInput","out","updatedInput","$global","forceUpdate","update","shouldUpdate","self","renderer","afterInsert","isHydrate","host","globalData","createOut","sync","componentsContext","globalComponentsContext","result","targetNode","remove","eventListenerHandles","scope","finalCustomEvents","customEvent","nodeType","onCreate","onRender","onUpdate","onMount","onDestroy","elId","module","exports"],"mappings":"AAAA;AACA;;;;AAIA,IAAIA,SAAS,GAAGC,OAAO,CAAC,eAAD,CAAvB;AACA,IAAIC,gBAAgB,GAAGD,OAAO,CAAC,cAAD,CAA9B;AACA,IAAIE,oBAAoB;AACtBF,OAAO,CAAC,qBAAD,CAAP,GADF;AAEA,IAAIG,cAAc,GAAGH,OAAO,CAAC,QAAD,CAA5B;AACA,IAAII,eAAe,GAAGD,cAAc,GAApC;AACA,IAAIE,oBAAoB,GAAGF,cAAc,GAAzC;AACA,IAAIG,YAAY,GAAGN,OAAO,CAAC,cAAD,CAA1B;AACA,IAAIO,YAAY,GAAGP,OAAO,CAAC,iBAAD,CAA1B;AACA,IAAIQ,mBAAmB,GAAGR,OAAO,CAAC,kBAAD,CAAjC;AACA,IAAIS,OAAO,GAAGT,OAAO,CAAC,qBAAD,CAArB;AACA,IAAIU,aAAa,GAAGV,OAAO,CAAC,kBAAD,CAA3B;AACA,IAAIW,QAAQ,GAAGX,OAAO,CAAC,kBAAD,CAAtB;AACA,IAAIY,eAAe,GAAGZ,OAAO,CAAC,oBAAD,CAA7B;AACA,IAAIa,OAAO,GAAGb,OAAO,CAAC,YAAD,CAArB;AACA,IAAIc,mBAAmB,GAAGD,OAAO,GAAjC;AACA,IAAIE,0BAA0B,GAAGF,OAAO,GAAxC;AACA,IAAIG,WAAW,GAAG,qBAAlB;;AAE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AP;AACD,CAPM,CAAT;;;AAUAzB,OAAO,CAACgE,SAAD,EAAYnE,YAAZ,CAAP;;AAEA8I,MAAM,CAACC,OAAP,GAAiB5E,SAAjB","sourcesContent":["\"use strict\";\n/* jshint newcap:false */\n\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\n\nvar domInsert = require(\"../dom-insert\");\nvar defaultCreateOut = require(\"../createOut\");\nvar getComponentsContext =\n require(\"./ComponentsContext\").___getComponentsContext;\nvar componentsUtil = require(\"./util\");\nvar componentLookup = componentsUtil.___componentLookup;\nvar destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;\nvar EventEmitter = require(\"events-light\");\nvar RenderResult = require(\"../RenderResult\");\nvar SubscriptionTracker = require(\"listener-tracker\");\nvar inherit = require(\"raptor-util/inherit\");\nvar updateManager = require(\"./update-manager\");\nvar morphdom = require(\"../vdom/morphdom\");\nvar eventDelegation = require(\"./event-delegation\");\nvar domData = require(\"./dom-data\");\nvar componentsByDOMNode = domData.___componentByDOMNode;\nvar keyedElementsByComponentId = domData.___ssrKeyedElementsByComponentId;\nvar CONTEXT_KEY = \"__subtree_context__\";\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar slice = Array.prototype.slice;\n\nvar COMPONENT_SUBSCRIBE_TO_OPTIONS;\nvar NON_COMPONENT_SUBSCRIBE_TO_OPTIONS = {\n addDestroyListener: false\n};\n\nvar emit = EventEmitter.prototype.emit;\nvar ELEMENT_NODE = 1;\n\nfunction removeListener(removeEventListenerHandle) {\n removeEventListenerHandle();\n}\n\nfunction walkFragments(fragment) {\n var node;\n\n while (fragment) {\n node = fragment.firstChild;\n\n if (!node) {\n break;\n }\n\n fragment = node.fragment;\n }\n\n return node;\n}\n\nfunction handleCustomEventWithMethodListener(\n component,\n targetMethodName,\n args,\n extraArgs\n) {\n // Remove the \"eventType\" argument\n args.push(component);\n\n if (extraArgs) {\n args = extraArgs.concat(args);\n }\n\n var targetComponent = componentLookup[component.___scope];\n var targetMethod =\n typeof targetMethodName === \"function\"\n ? targetMethodName\n : targetComponent[targetMethodName];\n if (!targetMethod) {\n throw Error(\"Method not found: \" + targetMethodName);\n }\n\n targetMethod.apply(targetComponent, args);\n}\n\nfunction resolveKeyHelper(key, index) {\n return index ? key + \"_\" + index : key;\n}\n\nfunction resolveComponentIdHelper(component, key, index) {\n return component.id + \"-\" + resolveKeyHelper(key, index);\n}\n\n/**\n * This method is used to process \"update_<stateName>\" handler functions.\n * If all of the modified state properties have a user provided update handler\n * then a rerender will be bypassed and, instead, the DOM will be updated\n * looping over and invoking the custom update handlers.\n * @return {boolean} Returns true if if the DOM was updated. False, otherwise.\n */\nfunction processUpdateHandlers(component, stateChanges, oldState) {\n var handlerMethod;\n var handlers;\n\n for (var propName in stateChanges) {\n if (hasOwnProperty.call(stateChanges, propName)) {\n var handlerMethodName = \"update_\" + propName;\n\n handlerMethod = component[handlerMethodName];\n if (handlerMethod) {\n (handlers || (handlers = [])).push([propName, handlerMethod]);\n } else {\n // This state change does not have a state handler so return false\n // to force a rerender\n return;\n }\n }\n }\n\n // If we got here then all of the changed state properties have\n // an update handler or there are no state properties that actually\n // changed.\n if (handlers) {\n // Otherwise, there are handlers for all of the changed properties\n // so apply the updates using those handlers\n\n handlers.forEach(function (handler) {\n var propertyName = handler[0];\n handlerMethod = handler[1];\n\n var newValue = stateChanges[propertyName];\n var oldValue = oldState[propertyName];\n handlerMethod.call(component, newValue, oldValue);\n });\n\n component.___emitUpdate();\n component.___reset();\n }\n\n return true;\n}\n\nfunction checkInputChanged(existingComponent, oldInput, newInput) {\n if (oldInput != newInput) {\n if (oldInput == null || newInput == null) {\n return true;\n }\n\n var oldKeys = Object.keys(oldInput);\n var newKeys = Object.keys(newInput);\n var len = oldKeys.length;\n if (len !== newKeys.length) {\n return true;\n }\n\n for (var i = len; i--; ) {\n var key = oldKeys[i];\n if (!(key in newInput && oldInput[key] === newInput[key])) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nvar componentProto;\n\n/**\n * Base component type.\n *\n * NOTE: Any methods that are prefixed with an underscore should be considered private!\n */\nfunction Component(id) {\n EventEmitter.call(this);\n this.id = id;\n this.___state = null;\n this.___rootNode = null;\n this.___subscriptions = null;\n this.___domEventListenerHandles = null;\n this.___bubblingDomEvents = null; // Used to keep track of bubbling DOM events for components rendered on the server\n this.___customEvents = null;\n this.___scope = null;\n this.___renderInput = null;\n this.___input = undefined;\n this.___mounted = false;\n this.___global = undefined;\n this.___destroyed = false;\n this.___updateQueued = false;\n this.___dirty = false;\n this.___settingInput = false;\n this.___host = undefined;\n\n var ssrKeyedElements = keyedElementsByComponentId[id];\n\n if (ssrKeyedElements) {\n this.___keyedElements = ssrKeyedElements;\n delete keyedElementsByComponentId[id];\n } else {\n this.___keyedElements = {};\n }\n}\n\nComponent.prototype = componentProto = {\n ___isComponent: true,\n\n subscribeTo: function (target) {\n if (!target) {\n throw TypeError();\n }\n\n var subscriptions =\n this.___subscriptions ||\n (this.___subscriptions = new SubscriptionTracker());\n\n var subscribeToOptions = target.___isComponent\n ? COMPONENT_SUBSCRIBE_TO_OPTIONS\n : NON_COMPONENT_SUBSCRIBE_TO_OPTIONS;\n\n return subscriptions.subscribeTo(target, subscribeToOptions);\n },\n\n emit: function (eventType) {\n var customEvents = this.___customEvents;\n var target;\n\n if (customEvents && (target = customEvents[eventType])) {\n var targetMethodName = target[0];\n var isOnce = target[1];\n var extraArgs = target[2];\n var args = slice.call(arguments, 1);\n\n handleCustomEventWithMethodListener(\n this,\n targetMethodName,\n args,\n extraArgs\n );\n\n if (isOnce) {\n delete customEvents[eventType];\n }\n }\n\n return emit.apply(this, arguments);\n },\n getElId: function (key, index) {\n if (!key) {\n return this.id;\n }\n return resolveComponentIdHelper(this, key, index);\n },\n getEl: function (key, index) {\n if (key) {\n var keyedElement =\n this.___keyedElements[\"@\" + resolveKeyHelper(key, index)];\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (\n keyedElement &&\n keyedElement.nodeType !== 1 /* Node.ELEMENT_NODE */\n ) {\n throw new Error(\n \"Using 'getEl(key)' to get a component instance is not supported, did you mean 'getComponent(key)'?\"\n );\n }\n }\n\n return keyedElement;\n } else {\n return this.el;\n }\n },\n getEls: function (key) {\n key = key + \"[]\";\n\n var els = [];\n var i = 0;\n var el;\n while ((el = this.getEl(key, i))) {\n els.push(el);\n i++;\n }\n return els;\n },\n getComponent: function (key, index) {\n var rootNode = this.___keyedElements[\"@\" + resolveKeyHelper(key, index)];\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (/\\[\\]$/.test(key)) {\n throw new Error(\n \"A repeated key[] was passed to getComponent. Use a non-repeating key if there is only one of these components.\"\n );\n }\n }\n\n return rootNode && componentsByDOMNode.get(rootNode);\n },\n getComponents: function (key) {\n var lookup = this.___keyedElements[\"@\" + key + \"[]\"];\n return lookup\n ? Object.keys(lookup)\n .map(function (key) {\n return componentsByDOMNode.get(lookup[key]);\n })\n .filter(Boolean)\n : [];\n },\n destroy: function () {\n if (this.___destroyed) {\n return;\n }\n\n var root = this.___rootNode;\n\n this.___destroyShallow();\n\n var nodes = root.nodes;\n\n nodes.forEach(function (node) {\n destroyNodeRecursive(node);\n\n if (eventDelegation.___handleNodeDetach(node) !== false) {\n node.parentNode.removeChild(node);\n }\n });\n\n root.detached = true;\n\n delete componentLookup[this.id];\n this.___keyedElements = {};\n },\n\n ___destroyShallow: function () {\n if (this.___destroyed) {\n return;\n }\n\n this.___emitDestroy();\n this.___destroyed = true;\n\n componentsByDOMNode.set(this.___rootNode, undefined);\n\n this.___rootNode = null;\n\n // Unsubscribe from all DOM events\n this.___removeDOMEventListeners();\n\n var subscriptions = this.___subscriptions;\n if (subscriptions) {\n subscriptions.removeAllListeners();\n this.___subscriptions = null;\n }\n },\n\n isDestroyed: function () {\n return this.___destroyed;\n },\n get state() {\n return this.___state;\n },\n set state(newState) {\n var state = this.___state;\n if (!state && !newState) {\n return;\n }\n\n if (!state) {\n state = this.___state = new this.___State(this);\n }\n\n state.___replace(newState || {});\n\n if (state.___dirty) {\n this.___queueUpdate();\n }\n\n if (!newState) {\n this.___state = null;\n }\n },\n setState: function (name, value) {\n var state = this.___state;\n\n if (!state) {\n state = this.___state = new this.___State(this);\n }\n if (typeof name == \"object\") {\n // Merge in the new state with the old state\n var newState = name;\n for (var k in newState) {\n if (hasOwnProperty.call(newState, k)) {\n state.___set(k, newState[k], true /* ensure:true */);\n }\n }\n } else {\n state.___set(name, value, true /* ensure:true */);\n }\n },\n\n setStateDirty: function (name, value) {\n var state = this.___state;\n\n if (arguments.length == 1) {\n value = state[name];\n }\n\n state.___set(\n name,\n value,\n true /* ensure:true */,\n true /* forceDirty:true */\n );\n },\n\n replaceState: function (newState) {\n this.___state.___replace(newState);\n },\n\n get input() {\n return this.___input;\n },\n set input(newInput) {\n if (this.___settingInput) {\n this.___input = newInput;\n } else {\n this.___setInput(newInput);\n }\n },\n\n ___setInput: function (newInput, onInput, out) {\n onInput = onInput || this.onInput;\n var updatedInput;\n\n var oldInput = this.___input;\n this.___input = undefined;\n this.___context = (out && out[CONTEXT_KEY]) || this.___context;\n\n if (onInput) {\n // We need to set a flag to preview `this.input = foo` inside\n // onInput causing infinite recursion\n this.___settingInput = true;\n updatedInput = onInput.call(this, newInput || {}, out);\n this.___settingInput = false;\n }\n\n newInput = this.___renderInput = updatedInput || newInput;\n\n if ((this.___dirty = checkInputChanged(this, oldInput, newInput))) {\n this.___queueUpdate();\n }\n\n if (this.___input === undefined) {\n this.___input = newInput;\n if (newInput && newInput.$global) {\n this.___global = newInput.$global;\n }\n }\n\n return newInput;\n },\n\n forceUpdate: function () {\n this.___dirty = true;\n this.___queueUpdate();\n },\n\n ___queueUpdate: function () {\n if (!this.___updateQueued) {\n this.___updateQueued = true;\n updateManager.___queueComponentUpdate(this);\n }\n },\n\n update: function () {\n if (this.___destroyed === true || this.___isDirty === false) {\n return;\n }\n\n var input = this.___input;\n var state = this.___state;\n\n if (this.___dirty === false && state !== null && state.___dirty === true) {\n if (processUpdateHandlers(this, state.___changes, state.___old, state)) {\n state.___dirty = false;\n }\n }\n\n if (this.___isDirty === true) {\n // The UI component is still dirty after process state handlers\n // then we should rerender\n\n if (this.shouldUpdate(input, state) !== false) {\n this.___scheduleRerender();\n }\n }\n\n this.___reset();\n },\n\n get ___isDirty() {\n return (\n this.___dirty === true ||\n (this.___state !== null && this.___state.___dirty === true)\n );\n },\n\n ___reset: function () {\n this.___dirty = false;\n this.___updateQueued = false;\n this.___renderInput = null;\n var state = this.___state;\n if (state) {\n state.___reset();\n }\n },\n\n shouldUpdate: function () {\n return true;\n },\n\n ___scheduleRerender: function () {\n var self = this;\n var renderer = self.___renderer;\n\n if (!renderer) {\n throw TypeError();\n }\n\n var input = this.___renderInput || this.___input;\n\n updateManager.___batchUpdate(function () {\n self.___rerender(input, false).afterInsert(self.___host);\n });\n\n this.___reset();\n },\n\n ___rerender: function (input, isHydrate) {\n var host = this.___host;\n var globalData = this.___global;\n var rootNode = this.___rootNode;\n var renderer = this.___renderer;\n var createOut = renderer.createOut || defaultCreateOut;\n var out = createOut(globalData);\n out.sync();\n out.___host = this.___host;\n out[CONTEXT_KEY] = this.___context;\n\n var componentsContext = getComponentsContext(out);\n var globalComponentsContext = componentsContext.___globalContext;\n globalComponentsContext.___rerenderComponent = this;\n globalComponentsContext.___isHydrate = isHydrate;\n\n renderer(input, out);\n\n var result = new RenderResult(out);\n\n var targetNode = out.___getOutput().___firstChild;\n\n morphdom(rootNode, targetNode, host, componentsContext);\n\n return result;\n },\n\n ___detach: function () {\n var root = this.___rootNode;\n root.remove();\n return root;\n },\n\n ___removeDOMEventListeners: function () {\n var eventListenerHandles = this.___domEventListenerHandles;\n if (eventListenerHandles) {\n eventListenerHandles.forEach(removeListener);\n this.___domEventListenerHandles = null;\n }\n },\n\n get ___rawState() {\n var state = this.___state;\n return state && state.___raw;\n },\n\n ___setCustomEvents: function (customEvents, scope) {\n var finalCustomEvents = (this.___customEvents = {});\n this.___scope = scope;\n\n customEvents.forEach(function (customEvent) {\n var eventType = customEvent[0];\n var targetMethodName = customEvent[1];\n var isOnce = customEvent[2];\n var extraArgs = customEvent[3];\n\n if (targetMethodName) {\n finalCustomEvents[eventType] = [targetMethodName, isOnce, extraArgs];\n }\n });\n },\n\n get el() {\n return walkFragments(this.___rootNode);\n },\n\n get els() {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\n 'The \"this.els\" attribute is deprecated. Please use \"this.getEls(key)\" instead.'\n );\n }\n return (this.___rootNode ? this.___rootNode.nodes : []).filter(function (\n el\n ) {\n return el.nodeType === ELEMENT_NODE;\n });\n },\n\n ___emit: emit,\n ___emitCreate(input, out) {\n this.onCreate && this.onCreate(input, out);\n this.___emit(\"create\", input, out);\n },\n\n ___emitRender(out) {\n this.onRender && this.onRender(out);\n this.___emit(\"render\", out);\n },\n\n ___emitUpdate() {\n this.onUpdate && this.onUpdate();\n this.___emit(\"update\");\n },\n\n ___emitMount() {\n this.onMount && this.onMount();\n this.___emit(\"mount\");\n },\n\n ___emitDestroy() {\n this.onDestroy && this.onDestroy();\n this.___emit(\"destroy\");\n }\n};\n\ncomponentProto.elId = componentProto.getElId;\ncomponentProto.___update = componentProto.update;\ncomponentProto.___destroy = componentProto.destroy;\n\n// Add all of the following DOM methods to Component.prototype:\n// - appendTo(referenceEl)\n// - replace(referenceEl)\n// - replaceChildrenOf(referenceEl)\n// - insertBefore(referenceEl)\n// - insertAfter(referenceEl)\n// - prependTo(referenceEl)\ndomInsert(\n componentProto,\n function getEl(component) {\n return component.___detach();\n },\n function afterInsert(component) {\n return component;\n }\n);\n\ninherit(Component, EventEmitter);\n\nmodule.exports = Component;\n"],"file":"Component.js"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtime/components/ComponentDef.js"],"names":["w10Noop","require","NOOP","componentUtil","attachBubblingEvent","addDelegatedEventHandler","extend","KeySequence","EMPTY_OBJECT","FLAG_WILL_RERENDER_IN_BROWSER","FLAG_HAS_RENDER_BODY","ComponentDef","component","componentId","componentsContext","id","undefined","prototype","key","elId","nestedId","String","indexOf","substring","d","eventName","handlerMethodName","isOnce","extraArgs","nk","o","types","global","registry","typeName","input","extra","state","s","componentProps","w","flags","f","renderBody","onCreate","onInput","undefinedPropNames","u","forEach","undefinedPropName","b","scope","p","customEvents","e","module","exports"],"mappings":"AAAA;;AAEA,IAAIA,OAAO,GAAGC,OAAO,CAAC,kBAAD,CAAP,CAA4BC,IAA1C;AACA,IAAIC,aAAa,GAAGF,OAAO,CAAC,QAAD,CAA3B;AACA,IAAIG,mBAAmB,GAAGD,aAAa,IAAvC;AACA,IAAIE,wBAAwB;AAC1BJ,OAAO,CAAC,oBAAD,CAAP,IADF;AAEA,IAAIK,MAAM,GAAGL,OAAO,CAAC,oBAAD,CAApB;AACA,IAAIM,WAAW,GAAGN,OAAO,CAAC,eAAD,CAAzB;AACA,IAAIO,YAAY,GAAG,EAAnB;;AAEA,IAAIC,6BAA6B,GAAG,CAApC;AACA,IAAIC,oBAAoB,GAAG,CAA3B;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAT,CAAsBC,SAAtB,EAAiCC,WAAjC,EAA8CC,iBAA9C,EAAiE;AAC/D,aAA4BA,iBAA5B,CAD+D,CAChB;AAC/C,YAAoBF,SAApB;AACA,OAAKG,EAAL,GAAUF,WAAV;;AAEA,aAAoBG,SAApB,CAL+D,CAKhC;;AAE/B,aAAqB,KAArB;;AAEA,aAAyB,KAAzB;AACA,aAAgB,CAAhB;;AAEA,aAAsB,CAAtB,CAZ+D,CAYtC;AACzB,aAAsB,IAAtB;AACD;;AAEDL,YAAY,CAACM,SAAb,GAAyB;AACvB,OAAY,UAAUC,GAAV,EAAe;AACzB,WAAO;AACL,iBAAwB,WAAsB,IAAIX,WAAJ,EAA9C,CADK;AAEMW,IAAAA,GAFN,CAAP;AAGD,GALsB;;AAOvB;AACF;AACA;AACA;AACEC,EAAAA,IAAI,EAAE,U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AN;AACD;AACF;;AAED3B,EAAAA,SAAS,GAAT,GAAqBuB,KAArB;;AAEA,MAAIC,KAAK,CAACc,CAAV,EAAa;AACXtC,IAAAA,SAAS,GAAT,GAAiCwB,KAAK,CAACc,CAAvC;AACD;;AAED,MAAIC,KAAK,GAAGf,KAAK,CAACgB,CAAlB;AACA,MAAIC,YAAY,GAAGjB,KAAK,CAACkB,CAAzB;AACA,MAAID,YAAJ,EAAkB;AAChBzC,IAAAA,SAAS,IAAT,CAA6ByC,YAA7B,EAA2CF,KAA3C;AACD;;AAEDvC,EAAAA,SAAS,GAAT,GAAsBoB,MAAtB;;AAEA,SAAO;AACLjB,IAAAA,EAAE,EAAEA,EADC;AAEL,QAAcH,SAFT;AAGL,SAAcwB,KAAK,CAACZ,CAHf;AAIL,SAAUY,KAAK,CAACM,CAAN,IAAW,CAJhB,EAAP;;AAMD,CAhED;;AAkEAa,MAAM,CAACC,OAAP,GAAiB7C,YAAjB","sourcesContent":["\"use strict\";\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar w10Noop = require(\"warp10/constants\").NOOP;\nvar componentUtil = require(\"./util\");\nvar attachBubblingEvent = componentUtil.___attachBubblingEvent;\nvar addDelegatedEventHandler =\n require(\"./event-delegation\").___addDelegatedEventHandler;\nvar extend = require(\"raptor-util/extend\");\nvar KeySequence = require(\"./KeySequence\");\nvar EMPTY_OBJECT = {};\n\nvar FLAG_WILL_RERENDER_IN_BROWSER = 1;\nvar FLAG_HAS_RENDER_BODY = 2;\n\n/**\n * A ComponentDef is used to hold the metadata collected at runtime for\n * a single component and this information is used to instantiate the component\n * later (after the rendered HTML has been added to the DOM)\n */\nfunction ComponentDef(component, componentId, componentsContext) {\n this.___componentsContext = componentsContext; // The AsyncWriter that this component is associated with\n this.___component = component;\n this.id = componentId;\n\n this.___domEvents = undefined; // An array of DOM events that need to be added (in sets of three)\n\n this.___isExisting = false;\n\n this.___renderBoundary = false;\n this.___flags = 0;\n\n this.___nextIdIndex = 0; // The unique integer to use for the next scoped ID\n this.___keySequence = null;\n}\n\nComponentDef.prototype = {\n ___nextKey: function (key) {\n return (\n this.___keySequence || (this.___keySequence = new KeySequence())\n ).___nextKey(key);\n },\n\n /**\n * This helper method generates a unique and fully qualified DOM element ID\n * that is unique within the scope of the current component.\n */\n elId: function (nestedId) {\n var id = this.id;\n\n if (nestedId == null) {\n return id;\n } else {\n if (typeof nestedId !== \"string\") {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\"Using non strings as keys is deprecated.\");\n }\n\n nestedId = String(nestedId);\n }\n\n if (nestedId.indexOf(\"#\") === 0) {\n id = \"#\" + id;\n nestedId = nestedId.substring(1);\n }\n\n return id + \"-\" + nestedId;\n }\n },\n /**\n * Returns the next auto generated unique ID for a nested DOM element or nested DOM component\n */\n ___nextComponentId: function () {\n return this.id + \"-c\" + this.___nextIdIndex++;\n },\n\n d: function (eventName, handlerMethodName, isOnce, extraArgs) {\n addDelegatedEventHandler(eventName);\n return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs);\n },\n\n get ___type() {\n return this.___component.___type;\n }\n};\n\nComponentDef.prototype.nk = ComponentDef.prototype.___nextKey;\n\nComponentDef.___deserialize = function (o, types, global, registry) {\n var id = o[0];\n var typeName = types[o[1]];\n var input = o[2] || null;\n var extra = o[3] || EMPTY_OBJECT;\n\n var state = extra.s;\n var componentProps = extra.w;\n var flags = extra.f;\n var component = registry.___createComponent(typeName, id);\n\n // Prevent newly created component from being queued for update since we area\n // just building it from the server info\n component.___updateQueued = true;\n\n if (flags & FLAG_HAS_RENDER_BODY) {\n (input || (input = {})).renderBody = w10Noop;\n }\n\n if (flags & FLAG_WILL_RERENDER_IN_BROWSER) {\n if (component.onCreate) {\n component.onCreate(input, { global: global });\n }\n if (component.onInput) {\n input = component.onInput(input, { global: global }) || input;\n }\n } else {\n if (state) {\n var undefinedPropNames = extra.u;\n if (undefinedPropNames) {\n undefinedPropNames.forEach(function (undefinedPropName) {\n state[undefinedPropName] = undefined;\n });\n }\n // We go through the setter here so that we convert the state object\n // to an instance of `State`\n component.state = state;\n }\n\n if (componentProps) {\n extend(component, componentProps);\n }\n }\n\n component.___input = input;\n\n if (extra.b) {\n component.___bubblingDomEvents = extra.b;\n }\n\n var scope = extra.p;\n var customEvents = extra.e;\n if (customEvents) {\n component.___setCustomEvents(customEvents, scope);\n }\n\n component.___global = global;\n\n return {\n id: id,\n ___component: component,\n ___domEvents: extra.d,\n ___flags: extra.f || 0\n };\n};\n\nmodule.exports = ComponentDef;\n"],"file":"ComponentDef.js"}
|