diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml
index d2671f9806da..eaab5894c5ad 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -52,6 +52,8 @@ env:
-pl -:nifi-py4j-integration-tests
-pl -:nifi-server-nar
-pl -:nifi-ui
+ -pl -:nifi-jolt-nar
+ -pl -:nifi-jolt-transform-json-ui
MAVEN_VERIFY_COMMAND: >-
verify
--show-version
diff --git a/nifi-assembly/LICENSE b/nifi-assembly/LICENSE
index c76f7cc30e4b..4a577cde3931 100644
--- a/nifi-assembly/LICENSE
+++ b/nifi-assembly/LICENSE
@@ -2866,4 +2866,7 @@ The binary distribution of this product bundles 'Py4J' under a BSD license.
OTHER DEALINGS IN THE SOFTWARE.
For the binary distribution of nifi-ui see its 3rdpartylicenses.txt
+for additional license and notice information.
+
+For the binary distribution of nifi-jolt-transform-json-ui see its 3rdpartylicenses.txt
for additional license and notice information.
\ No newline at end of file
diff --git a/nifi-assembly/NOTICE b/nifi-assembly/NOTICE
index 2539a830858e..9bf93c3a8f79 100644
--- a/nifi-assembly/NOTICE
+++ b/nifi-assembly/NOTICE
@@ -2574,4 +2574,7 @@ The following binary components are provided under the SIL Open Font License 1.1
(SIL OFL 1.1) FontAwesome (4.7.0 - https://fontawesome.com/license/free)
For the binary distribution of nifi-ui see its 3rdpartylicenses.txt
+for additional license and notice information.
+
+For the binary distribution of nifi-jolt-transform-json-ui see its 3rdpartylicenses.txt
for additional license and notice information.
\ No newline at end of file
diff --git a/nifi-code-coverage/pom.xml b/nifi-code-coverage/pom.xml
index c08361df3bbf..6f6ac3307af4 100644
--- a/nifi-code-coverage/pom.xml
+++ b/nifi-code-coverage/pom.xml
@@ -1288,12 +1288,6 @@
nifi-sql-reporting-tasks2.0.0-SNAPSHOT
-
- org.apache.nifi
- nifi-jolt-transform-json-ui
- 2.0.0-SNAPSHOT
- war
- org.apache.nifinifi-standard-content-viewer
diff --git a/nifi-commons/nifi-web-servlet-shared/src/main/java/org/apache/nifi/web/servlet/filter/QueryStringToFragmentFilter.java b/nifi-commons/nifi-web-servlet-shared/src/main/java/org/apache/nifi/web/servlet/filter/QueryStringToFragmentFilter.java
new file mode 100644
index 000000000000..e6f9a967c807
--- /dev/null
+++ b/nifi-commons/nifi-web-servlet-shared/src/main/java/org/apache/nifi/web/servlet/filter/QueryStringToFragmentFilter.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.web.servlet.filter;
+
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.nifi.web.servlet.shared.RequestUriBuilder;
+
+import java.io.IOException;
+import java.net.URI;
+
+public class QueryStringToFragmentFilter implements Filter {
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
+ final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+ final String queryString = httpServletRequest.getQueryString();
+
+ if (queryString != null) {
+ // Some NiFi front ends use hash based routing, so they don't need to know the baseHref. With hash based
+ // routing query parameters are implemented within the URL fragment. Because of this any query parameters on the
+ // original URL are not considered. This filter captures those and adds them to the fragment.
+ final RequestUriBuilder requestUriBuilder = RequestUriBuilder.fromHttpServletRequest(httpServletRequest).path(httpServletRequest.getContextPath()).fragment("/?" + queryString);
+ final URI redirectUri = requestUriBuilder.build();
+
+ final HttpServletResponse httpServletResponse = (HttpServletResponse) response;
+ httpServletResponse.sendRedirect(redirectUri.toString());
+ } else {
+ filterChain.doFilter(request, response);
+ }
+ }
+}
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/pom.xml b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/pom.xml
index abb38955f2cd..30fea02f512c 100644
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/pom.xml
+++ b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/pom.xml
@@ -21,13 +21,10 @@ language governing permissions and limitations under the License. -->
war
- ${basedir}/src/main/frontend
- ${project.build.directory}/frontend-working-directory
- ${project.build.directory}/${project.build.finalName}/assets
+ ${project.build.directory}/nifi-jolt-transform-json-ui-working-directory
-
org.apache.nifinifi-framework-api
@@ -51,10 +48,6 @@ language governing permissions and limitations under the License. -->
nifi-jolt-utils2.0.0-SNAPSHOT
-
- jakarta.servlet
- jakarta.servlet-api
- jakarta.ws.rsjakarta.ws.rs-api
@@ -71,18 +64,6 @@ language governing permissions and limitations under the License. -->
org.glassfish.jersey.injectjersey-hk2
-
- org.apache.commons
- commons-lang3
-
-
- com.fasterxml.jackson.core
- jackson-core
-
-
- com.fasterxml.jackson.core
- jackson-annotations
- org.glassfish.jersey.test-framework.providersjersey-test-framework-provider-inmemory
@@ -94,93 +75,54 @@ language governing permissions and limitations under the License. -->
+
+ org.apache.nifi
+ nifi-web-servlet-shared
+ 2.0.0-SNAPSHOT
+
+
+ org.apache.nifi
+ nifi-frontend
+ 2.0.0-SNAPSHOT
+
+
org.apache.maven.plugins
- maven-resources-plugin
-
-
- copy-client-side-deps
- prepare-package
-
- copy-resources
-
-
- ${frontend.assets}
-
-
- ${frontend.working.dir}/node_modules
- false
-
- **/*.js
- **/*.css
-
- font-awesome/fonts/**/*
- font-awesome/README.md
-
-
-
-
-
-
- copy-package-json
- generate-sources
-
- copy-resources
-
-
- ${frontend.working.dir}
-
-
- ${frontend.dependency.configs}
- false
-
- package.json
- package-lock.json
-
-
-
-
-
-
-
-
- com.github.eirslett
- frontend-maven-plugin
- ${frontend.mvn.plugin.version}
-
- ${frontend.working.dir}
-
+ maven-dependency-plugin
- install-node-and-npm
-
- install-node-and-npm
-
+ unpack-nifi-jolt-transform-json-uigenerate-resources
-
- ${node.version}
-
-
-
- npm install
- npm
+ unpack-dependencies
- --cache-min Infinity install
- ${frontend.working.dir}
+ org.apache.nifi
+ nifi-frontend
+ true
+ false
+ ${nifi.jolt.ui.working.dir}
+ nifi-jolt-transform-ui/**/*
+
- org.apache.maven.pluginsmaven-war-plugin
+
+ ${nifi.jolt.ui.working.dir}/nifi-jolt-transform-ui
+ **/*
+ src/main/webapp/META-INFMETA-INF
@@ -190,21 +132,7 @@ language governing permissions and limitations under the License. -->
true
-
-
-
- org.apache.rat
- apache-rat-plugin
-
-
- nbactions.xml
- src/main/frontend/package.json
- src/main/frontend/package-lock.json
- src/main/webapp/js/codemirror/
- src/main/webapp/css/main.css
- src/main/webapp/js/js-beautify/*
- src/main/webapp/fonts/**/*
-
+ WEB-INF/lib/nifi-frontend*.jar
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/frontend/package-lock.json b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/frontend/package-lock.json
deleted file mode 100644
index 4af2e88d8782..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/frontend/package-lock.json
+++ /dev/null
@@ -1,158 +0,0 @@
-{
- "name": "nifi-jolt-transform-json-ui",
- "lockfileVersion": 3,
- "requires": true,
- "//": "limitations under the License.",
- "packages": {
- "": {
- "name": "nifi-jolt-transform-json-ui",
- "license": "Apache-2.0",
- "dependencies": {
- "angular": "1.8.3",
- "angular-animate": "1.8.3",
- "angular-aria": "1.8.3",
- "angular-material": "1.1.26",
- "angular-messages": "1.8.3",
- "angular-ui-codemirror": "^0.3.0",
- "angular-ui-router": "^0.2.18",
- "font-awesome": "4.7.0",
- "jsonlint": "1.6.3"
- }
- },
- "node_modules/angular": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz",
- "integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw==",
- "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward."
- },
- "node_modules/angular-animate": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.8.3.tgz",
- "integrity": "sha512-/LtTKvy5sD6MZbV0v+nHgOIpnFF0mrUp+j5WIxVprVhcrJriYpuCZf4S7Owj1o76De/J0eRzANUozNJ6hVepnQ==",
- "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward."
- },
- "node_modules/angular-aria": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/angular-aria/-/angular-aria-1.8.3.tgz",
- "integrity": "sha512-qTXclmTW/KGw5JNKKQPcCKKq6hCBZ39jYINmLgMsjUHBAoxULaMRRTaRj/L2VTOjKvK5f9enkx+EUqRqzXDSFQ==",
- "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward."
- },
- "node_modules/angular-material": {
- "version": "1.1.26",
- "resolved": "https://registry.npmjs.org/angular-material/-/angular-material-1.1.26.tgz",
- "integrity": "sha512-DBLsoOP1D1E14EQsECZYabt3Jh1PpvsG8k1aZgaP/Ml57n4stpClzLhCsuTNbtB/pqq9CL8XtpCfB6fhVRWqIQ==",
- "deprecated": "For the actively supported Angular Material, see https://www.npmjs.com/package/@angular/material. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward.",
- "peerDependencies": {
- "angular": "^1.7.2",
- "angular-animate": "^1.7.2",
- "angular-aria": "^1.7.2",
- "angular-messages": "^1.7.2"
- }
- },
- "node_modules/angular-messages": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/angular-messages/-/angular-messages-1.8.3.tgz",
- "integrity": "sha512-f/ywtg32lqzX8FnXkBJOyn13lbCbo333/xy/5TTFcsH/gZdXoiuERj+dLTOs8xHCkOeFQhFx0VD0DgtMgSag7A=="
- },
- "node_modules/angular-ui-codemirror": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/angular-ui-codemirror/-/angular-ui-codemirror-0.3.0.tgz",
- "integrity": "sha1-5ChvxQ85PypuaXwb8xcEJOEsu2A="
- },
- "node_modules/angular-ui-router": {
- "version": "0.2.18",
- "resolved": "https://registry.npmjs.org/angular-ui-router/-/angular-ui-router-0.2.18.tgz",
- "integrity": "sha1-Ha1wQVxz1wRv0uEw3wPWL7dGQ2A=",
- "deprecated": "This npm package 'angular-ui-router' has been renamed to '@uirouter/angularjs'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/",
- "dependencies": {
- "angular": "^1.0.8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz",
- "integrity": "sha512-3iF4FIKdxaVYT3JqQuY3Wat/T2t7TRbbQ94Fu50ZUCbLy4TFbTzr90NOHQodQkNqmeEGCw8WbeP78WNi6SKYUA==",
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/chalk": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
- "integrity": "sha512-sQfYDlfv2DGVtjdoQqxS0cEZDroyG8h6TamA6rvxwlrU5BaSLDx9xhatBYl2pxZ7gmpNaPFVwBtdGdu5rQ+tYQ==",
- "dependencies": {
- "ansi-styles": "~1.0.0",
- "has-color": "~0.1.0",
- "strip-ansi": "~0.1.0"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/font-awesome": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz",
- "integrity": "sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==",
- "engines": {
- "node": ">=0.10.3"
- }
- },
- "node_modules/has-color": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
- "integrity": "sha512-kaNz5OTAYYmt646Hkqw50/qyxP2vFnTVu5AQ1Zmk22Kk5+4Qx6BpO8+u7IKsML5fOsFk0ZT0AcCJNYwcvaLBvw==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/jsonlint": {
- "version": "1.6.3",
- "resolved": "https://registry.npmjs.org/jsonlint/-/jsonlint-1.6.3.tgz",
- "integrity": "sha512-jMVTMzP+7gU/IyC6hvKyWpUU8tmTkK5b3BPNuMI9U8Sit+YAWLlZwB6Y6YrdCxfg2kNz05p3XY3Bmm4m26Nv3A==",
- "dependencies": {
- "JSV": "^4.0.x",
- "nomnom": "^1.5.x"
- },
- "bin": {
- "jsonlint": "lib/cli.js"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/JSV": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz",
- "integrity": "sha512-ZJ6wx9xaKJ3yFUhq5/sk82PJMuUyLk277I8mQeyDgCTjGdjWJIvPfaU5LIXaMuaN2UO1X3kZH4+lgphublZUHw==",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/nomnom": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz",
- "integrity": "sha512-5s0JxqhDx9/rksG2BTMVN1enjWSvPidpoSgViZU4ZXULyTe+7jxcCRLB6f42Z0l1xYJpleCBtSyY6Lwg3uu5CQ==",
- "deprecated": "Package no longer supported. Contact support@npmjs.com for more info.",
- "dependencies": {
- "chalk": "~0.4.0",
- "underscore": "~1.6.0"
- }
- },
- "node_modules/strip-ansi": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
- "integrity": "sha512-behete+3uqxecWlDAm5lmskaSaISA+ThQ4oNNBDTBJt0x2ppR6IPqfZNuj6BLaLJ/Sji4TPZlcRyOis8wXQTLg==",
- "bin": {
- "strip-ansi": "cli.js"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/underscore": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
- "integrity": "sha512-z4o1fvKUojIWh9XuaVLUDdf86RQiq13AC1dmHbTpoyuu+bquHms76v16CjycCbec87J7z0k//SiQVk0sMdFmpQ=="
- }
- }
-}
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/frontend/package.json b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/frontend/package.json
deleted file mode 100644
index 1b2e52cdc0c1..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/frontend/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "//": "Licensed to the Apache Software Foundation (ASF) under one or more",
- "//": "contributor license agreements. See the NOTICE file distributed with",
- "//": "this work for additional information regarding copyright ownership.",
- "//": "The ASF licenses this file to You under the Apache License, Version 2.0",
- "//": "(the \"License\"); you may not use this file except in compliance with",
- "//": "the License. You may obtain a copy of the License at",
- "//": "",
- "//": "http://www.apache.org/licenses/LICENSE-2.0",
- "//": "",
- "//": "Unless required by applicable law or agreed to in writing, software",
- "//": "distributed under the License is distributed on an \"AS IS\" BASIS,",
- "//": "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
- "//": "See the License for the specific language governing permissions and",
- "//": "limitations under the License.",
- "name": "nifi-jolt-transform-json-ui",
- "license": "Apache-2.0",
- "dependencies": {
- "angular-ui-codemirror": "^0.3.0",
- "angular-ui-router": "^0.3.2",
- "font-awesome": "4.7.0",
- "jsonlint": "1.6.3",
- "angular": "1.8.3",
- "angular-animate": "1.8.3",
- "angular-aria": "1.8.3",
- "angular-material": "1.1.26",
- "angular-messages": "1.8.3"
- },
- "description": "Apache NiFi Jolt Transform JSON UI 3rd party client side resources.",
- "repository": {
- "type": "git",
- "url": "https://github.com/apache/nifi"
- }
-}
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/LICENSE b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/LICENSE
index a021214bbcb7..e36efb2880c5 100644
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/LICENSE
+++ b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/LICENSE
@@ -237,72 +237,6 @@ licenses.
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
-This product bundles 'AngularUI Codemirror' which is available under an MIT license.
-
- Copyright (c) 2012 the AngularUI Team, http://angular-ui.github.com
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-This product bundles 'AngularUI Router' which is available under an MIT license.
-
- Copyright (c) 2013-2015 The AngularUI Team, Karsten Sperling
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-This product bundles 'js-beautify' which is available under an MIT license.
-
- Copyright (c) 2007-2013 Einar Lielmanis and contributors.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
The binary distribution of this product bundles 'Bouncy Castle JDK 1.5'
under an MIT style license.
@@ -326,153 +260,5 @@ This product bundles 'js-beautify' which is available under an MIT license.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-This product bundles 'Fontello' which is available under an MIT license.
-
- Copyright (C) 2011 by Vitaly Puzrin
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-This product bundles 'jsonlint' which is available under an MIT license.
-
- Copyright (C) 2012 Zachary Carter
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-This product bundles 'Angular' which is available under an MIT license.
-
- Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-This product bundles 'Angular Material' which is available under an MIT license.
-
- Copyright (c) 2014-2016 Google, Inc. http://angularjs.org
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-This product bundles 'Angular Aria' which is available under an MIT license.
-
- Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
-This product bundles 'Angular Animate' which is available under an MIT license.
-
- Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-
-This product bundles 'Angular Messages' which is available under an MIT license.
-
- Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\ No newline at end of file
+For the binary distribution of nifi-jolt-transform-json-ui see its 3rdpartylicenses.txt
+for additional license and notice information.
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/NOTICE b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/NOTICE
index b82d518e7dde..7a833c5baed7 100644
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/NOTICE
+++ b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/resources/META-INF/NOTICE
@@ -63,5 +63,6 @@ SIL OFL 1.1
The following binary components are provided under the SIL Open Font License 1.1
(SIL OFL 1.1) FontAwesome (4.7.0 - https://fontawesome.com/license/free)
-
+For the binary distribution of nifi-jolt-transform-json-ui see its 3rdpartylicenses.txt
+for additional license and notice information.
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/jsp/index.jsp b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/jsp/index.jsp
deleted file mode 100644
index 1a3fa477e798..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/jsp/index.jsp
+++ /dev/null
@@ -1,72 +0,0 @@
-<%--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
---%>
-<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/web.xml b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/web.xml
index e04c59e6ed30..4e61df0b44da 100644
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/web.xml
+++ b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/web.xml
@@ -35,19 +35,19 @@
/api/*
-
- index
- /WEB-INF/jsp/index.jsp
-
+
+
+ FragmentFilter
+ org.apache.nifi.web.servlet.filter.QueryStringToFragmentFilter
+
+
+ FragmentFilter
+
+
- index
- /configure
+ default
+
-
-
- configure
-
-
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/app.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/app.js
deleted file mode 100644
index 4a127605df3b..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/app.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var AppRun = function($rootScope,$state,$http){
-
- // Set CSRF Cookie and Header names to match Spring Security configuration in StandardCookieCsrfTokenRepository
- $http.defaults.xsrfCookieName = '__Secure-Request-Token';
- $http.defaults.xsrfHeaderName = 'Request-Token';
-
- $rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error){
- event.preventDefault();
- $state.go('error');
- });
-
-};
-
-var AppConfig = function ($urlRouterProvider,$mdThemingProvider) {
-
- $urlRouterProvider.otherwise(function($injector,$location){
- var urlComponents = $location.absUrl().split("?");
- return '/main?' + urlComponents[1];
- });
-
- //Define app palettes
- $mdThemingProvider.definePalette('basePalette', {
- '50': '728E9B',
- '100': '728E9B',
- '200': '004849', /* link-color */
- '300': '775351', /* value-color */
- '400': '728E9B',
- '500': '728E9B', /* base-color */
- '600': '728E9B',
- '700': '728E9B',
- '800': '728E9B',
- '900': 'rgba(249,250,251,0.97)', /* tint base-color 96% */
- 'A100': '728E9B',
- 'A200': '728E9B',
- 'A400': '728E9B',
- 'A700': '728E9B',
- 'contrastDefaultColor': 'light',
- 'contrastDarkColors': ['A100'],
- 'contrastLightColors': undefined
- });
- $mdThemingProvider.definePalette('tintPalette', {
- '50': '728E9B',
- '100': '728E9B',
- '200': 'CCDADB', /* tint link-color 20% */
- '300': '728E9B',
- '400': 'AABBC3', /* tint base-color 40% */
- '500': '728E9B',
- '600': 'C7D2D7', /* tint base-color 60% */
- '700': '728E9B',
- '800': 'E3E8EB', /* tint base-color 80% */
- '900': '728E9B',
- 'A100': '728E9B',
- 'A200': '728E9B',
- 'A400': '728E9B',
- 'A700': '728E9B',
- 'contrastDefaultColor': 'light',
- 'contrastDarkColors': ['A100'],
- 'contrastLightColors': undefined
- });
- $mdThemingProvider.definePalette('warnPalette', {
- '50': 'BA554A',
- '100': 'BA554A',
- '200': 'BA554A',
- '300': 'BA554A',
- '400': 'BA554A',
- '500': 'BA554A', /* warn-color */
- '600': 'BA554A',
- '700': 'BA554A',
- '800': 'BA554A',
- '900': 'BA554A',
- 'A100': 'BA554A',
- 'A200': 'BA554A',
- 'A400': 'BA554A',
- 'A700': 'BA554A',
- 'contrastDefaultColor': 'light',
- 'contrastDarkColors': ['A100'],
- 'contrastLightColors': undefined
- });
- $mdThemingProvider.theme("default").primaryPalette("basePalette", {
- "default": "500",
- "hue-1": "200",
- "hue-2": "300",
- "hue-3": "900"
- }).accentPalette("tintPalette", {
- "default": "200",
- "hue-1": "400",
- "hue-2": "600",
- "hue-3": "800"
- }).warnPalette("warnPalette", {
- "default": "500"
- });
-
-};
-
-AppRun.$inject = ['$rootScope','$state','$http'];
-
-AppConfig.$inject = ['$urlRouterProvider','$mdThemingProvider'];
-
-angular.module('standardUI', ['ui.codemirror','ui.router','ngMaterial'])
- .run(AppRun)
- .config(AppConfig);
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/error/error.state.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/error/error.state.js
deleted file mode 100644
index ff4cf302d5bf..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/error/error.state.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var ErrorState = function($stateProvider) {
-
- $stateProvider
- .state('error', {
- url: "/error",
- templateUrl: "app/components/error/error.view.html"
- })
-};
-
-ErrorState.$inject = ['$stateProvider'];
-angular.module('standardUI').config(ErrorState);
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/error/error.view.html b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/error/error.view.html
deleted file mode 100644
index 8908e67cad49..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/error/error.view.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
An error has occurred loading the editor.
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/processor/processor.service.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/processor/processor.service.js
deleted file mode 100644
index 70c6e2a91b27..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/components/processor/processor.service.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var ProcessorService = function ProcessorService($http) {
-
- return {
- 'setProperties': setProperties,
- 'getType': getType,
- 'getDetails' : getDetails
- };
-
- function setProperties(processorId,revisionId,clientId,disconnectedNodeAcknowledged,properties){
- var urlParams = 'processorId='+processorId+'&revisionId='+revisionId+'&clientId='+clientId+'&disconnectedNodeAcknowledged='+disconnectedNodeAcknowledged;
- return $http({url: 'api/standard/processor/properties?'+urlParams,method:'PUT',data:properties});
- }
-
- function getType(id) {
- return $http({
- url: 'api/standard/processor/details?processorId=' + id,
- method: 'GET',
- transformResponse: [function (data) {
- var obj = JSON.parse(data)
- var type = obj['type'];
- return type;
- }]
- });
- }
-
- function getDetails(id) {
- return $http({ url: 'api/standard/processor/details?processorId=' + id, method: 'GET'});
- }
-
-};
-
-ProcessorService.$inject = ['$http'];
-
-angular.module('standardUI').factory('ProcessorService', ProcessorService);
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/main/main.controller.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/main/main.controller.js
deleted file mode 100644
index 6f092f737eac..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/main/main.controller.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var MainController = function ($scope, $state, ProcessorService) {
-
- ProcessorService.getType($state.params.id).then(function(response){
- var type = response.data
- var stateName = type.substring(type.lastIndexOf(".") + 1, type.length).toLowerCase();
- var result = $state.go(stateName,$state.params);
-
- }).catch(function(response) {
- $state.go('error');
- });
-
-};
-
-MainController.$inject = ['$scope','$state','ProcessorService'];
-
-angular.module('standardUI').controller('MainController', MainController);
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/main/main.state.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/main/main.state.js
deleted file mode 100644
index 643452540612..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/main/main.state.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var MainState = function($stateProvider) {
-
- $stateProvider
- .state('main', {
- url: "/main?id&revision&clientId&editable&disconnectedNodeAcknowledged",
- controller: 'MainController'
- })
-};
-
-MainState.$inject = ['$stateProvider'];
-
-angular.module('standardUI').config(MainState);
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.controller.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.controller.js
deleted file mode 100644
index 9eabd58bb4de..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.controller.js
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-'use strict';
-
-var TransformJsonController = function ($scope, $state, $q, $mdDialog, $timeout, TransformJsonService, ProcessorService, details) {
-
- $scope.processorId = '';
- $scope.clientId = '';
- $scope.revisionId = '';
- $scope.editable = false;
- $scope.disconnectedNodeAcknowledged = false;
- $scope.specEditor = {};
- $scope.inputEditor = {};
- $scope.jsonInput = '';
- $scope.jsonOutput = '';
- $scope.sortOutput = false;
- $scope.validObj = {};
- $scope.error = '';
- $scope.disableCSS = '';
- $scope.saveStatus = '';
- $scope.specUpdated = false;
- $scope.variables = {};
- $scope.joltVariables = {};
-
- $scope.convertToArray= function (map){
- var labelValueArray = [];
- angular.forEach(map, function(value, key){
- labelValueArray.push({'label' : value, 'value' : key});
- });
- return labelValueArray;
- };
-
- $scope.getJsonSpec = function(details){
- if(details['properties']['Jolt Specification'] != null && details['properties']['Jolt Specification'] != "") {
- return details['properties']['Jolt Specification'];
- }
- else return '';
- };
-
- $scope.getTransform = function(details){
- return details['properties']['Jolt Transform'] ? details['properties']['Jolt Transform'] :
- details['descriptors']['Jolt Transform']['defaultValue'] ;
- };
-
- $scope.getCustomClass = function(details){
- if(details['properties']['Custom Transformation Class Name'] != null && details['properties']['Custom Transformation Class Name'] != "") {
- return details['properties']['Custom Transformation Class Name'];
- }
- else return '';
- };
-
- $scope.getCustomModules = function(details){
- if(details['properties']['Custom Module Directory'] != null && details['properties']['Custom Module Directory'] != "") {
- return details['properties']['Custom Module Directory'];
- }
- else return '';
- };
-
- $scope.getTransformOptions = function(details){
- return $scope.convertToArray(details['descriptors']['Jolt Transform']['allowableValues']);
- };
-
- $scope.populateScopeWithDetails = function(details){
- $scope.jsonSpec = $scope.getJsonSpec(details);
- $scope.transform = $scope.getTransform(details);
- $scope.transformOptions = $scope.getTransformOptions(details);
- $scope.customClass = $scope.getCustomClass(details);
- $scope.modules = $scope.getCustomModules(details);
- };
-
- $scope.populateScopeWithDetails(details.data);
-
- $scope.clearValidation = function(){
- $scope.validObj = {};
- };
-
- $scope.clearError = function(){
- $scope.error = '';
- };
-
- $scope.clearSave = function(){
- if($scope.saveStatus != ''){
- $scope.saveStatus = '';
- }
- };
-
- $scope.clearMessages = function(){
- $scope.clearSave();
- $scope.clearError();
- $scope.clearValidation();
- };
-
- $scope.showError = function(message,detail){
- $scope.error = message;
- console.log('Error received:', detail);
- };
-
- $scope.initEditors = function(_editor) {
-
- _editor.setOption('extraKeys',{
-
- // We're not enabling search, so repurpose Shift-Ctrl-F for auto-format / beautify
- 'Shift-Ctrl-F': function(cm){
- var jsonValue = js_beautify(cm.getDoc().getValue(), {
- 'indent_size': 1,
- 'indent_char': '\t'
- });
- cm.getDoc().setValue(jsonValue)
- }
-
- });
-
- };
-
- $scope.initSpecEditor = function(_editor){
- $scope.initEditors(_editor);
- $scope.specEditor = _editor;
- _editor.on('update',function(cm){
- if($scope.transform == 'jolt-transform-sort'){
- $scope.toggleEditorErrors(_editor,'hide');
- }
- });
-
- _editor.on('change',function(cm,changeObj){
-
- if(!($scope.transform == 'jolt-transform-sort' && changeObj.text.toString() == "")){
- $scope.clearMessages();
- if(changeObj.text.toString() != changeObj.removed.toString()){
- $scope.specUpdated = true;
- }
- }
- });
-
- };
-
- $scope.initInputEditor = function(_editor){
- $scope.initEditors(_editor);
- $scope.inputEditor = _editor;
-
- _editor.on('change',function(cm,changeObj){
- $scope.clearMessages();
- });
-
- _editor.clearGutter('CodeMirror-lint-markers');
- };
-
- $scope.editorProperties = {
- lineNumbers: true,
- gutters: ['CodeMirror-lint-markers'],
- mode: 'application/json',
- lint: true,
- value: $scope.jsonSpec,
- onLoad: $scope.initSpecEditor
- };
-
- $scope.inputProperties = {
- lineNumbers: true,
- gutters: ['CodeMirror-lint-markers'],
- mode: 'application/json',
- lint: true,
- value: "",
- onLoad: $scope.initInputEditor
- };
-
- $scope.outputProperties = {
- lineNumbers: true,
- gutters: ['CodeMirror-lint-markers'],
- mode: 'application/json',
- lint: false,
- readOnly: true
- };
-
- $scope.formatEditor = function(editor){
-
- var jsonValue = js_beautify(editor.getDoc().getValue(), {
- 'indent_size': 1,
- 'indent_char': '\t'
- });
- editor.getDoc().setValue(jsonValue);
-
- };
-
- $scope.hasJsonErrors = function(input, transform){
- try{
- jsonlint.parse(input);
- }catch(e){
- return true;
- }
- return false;
- };
-
- $scope.toggleEditorErrors = function(editor,toggle){
- var display = editor.display.wrapper;
- var errors = display.getElementsByClassName("CodeMirror-lint-marker-error");
-
- if(toggle == 'hide'){
-
- angular.forEach(errors,function(error){
- var element = angular.element(error);
- element.addClass('hide');
- });
-
- var markErrors = display.getElementsByClassName("CodeMirror-lint-mark-error");
- angular.forEach(markErrors,function(error){
- var element = angular.element(error);
- element.addClass('CodeMirror-lint-mark-error-hide');
- element.removeClass('CodeMirror-lint-mark-error');
- });
-
- }else{
-
- angular.forEach(errors,function(error){
- var element = angular.element(error);
- element.removeClass('hide');
- });
-
- var markErrors = display.getElementsByClassName("CodeMirror-lint-mark-error-hide");
- angular.forEach(markErrors,function(error){
- var element = angular.element(error);
- element.addClass('CodeMirror-lint-mark-error');
- element.removeClass('CodeMirror-lint-mark-error-hide');
- });
-
- }
-
- };
-
- $scope.toggleEditor = function(editor,transform,specUpdated){
-
- if(transform == 'jolt-transform-sort'){
- editor.setOption("readOnly","nocursor");
- $scope.disableCSS = "trans";
- $scope.toggleEditorErrors(editor,'hide');
- }
- else{
- editor.setOption("readOnly",false);
- $scope.disableCSS = "";
- $scope.toggleEditorErrors(editor,'show');
- }
-
- $scope.specUpdated = specUpdated;
-
- $scope.clearMessages();
-
- }
-
- $scope.getJoltSpec = function(transform,jsonSpec,jsonInput){
-
- return {
- "transform": transform,
- "specification" : jsonSpec,
- "input" : jsonInput,
- "customClass" : $scope.customClass,
- "modules": $scope.modules,
- "expressionLanguageAttributes":$scope.joltVariables
- };
- };
-
- $scope.getProperties = function(transform,jsonSpec){
-
- return {
- "Jolt Transform" : transform != "" ? transform : null,
- "Jolt Specification": jsonSpec != "" ? jsonSpec : null
- };
-
- };
-
- $scope.getSpec = function(transform,jsonSpec){
- if(transform != 'jolt-transform-sort'){
- return jsonSpec;
- }else{
- return null;
- }
- };
-
- $scope.validateJson = function(jsonInput,jsonSpec,transform){
-
- var deferred = $q.defer();
-
- $scope.clearError();
-
- if( transform == 'jolt-transform-sort' ||!$scope.hasJsonErrors(jsonSpec,transform) ){
- var joltSpec = $scope.getJoltSpec(transform,jsonSpec,jsonInput);
-
- TransformJsonService.validate(joltSpec).then(function(response){
- $scope.validObj = response.data;
- deferred.resolve($scope.validObj);
- }).catch(function(response) {
- $scope.showError("Error occurred during validation",response.statusText)
- deferred.reject($scope.error);
- });
-
- }else{
- $scope.validObj = {"valid":false,"message":"JSON Spec provided is not valid JSON format"};
- deferred.resolve($scope.validObj);
- }
-
- return deferred.promise;
-
- };
-
- $scope.transformJson = function(jsonInput,jsonSpec,transform){
-
-
- if( !$scope.hasJsonErrors(jsonInput,transform) ){
-
- $scope.validateJson(jsonInput,jsonSpec,transform).then(function(response){
-
- var validObj = response;
-
- if(validObj.valid == true){
-
- var joltSpec = $scope.getJoltSpec(transform,jsonSpec,jsonInput);
-
- TransformJsonService.execute(joltSpec).then(function(response){
-
- $scope.jsonOutput = js_beautify(response.data, {
- 'indent_size': 1,
- 'indent_char': '\t'
- });
-
- })
- .catch(function(response) {
- $scope.showError("Error occurred during transformation",response.statusText)
- });
-
- }
-
- });
-
- }else{
- $scope.validObj = {"valid":false,"message":"JSON Input provided is not valid JSON format"};
- }
- };
-
- $scope.saveSpec = function(jsonInput,jsonSpec,transform,processorId,clientId,disconnectedNodeAcknowledged,revisionId){
-
- $scope.clearError();
-
- var properties = $scope.getProperties(transform,jsonSpec);
-
- ProcessorService.setProperties(processorId,revisionId,clientId,disconnectedNodeAcknowledged,properties)
- .then(function(response) {
- var details = response.data;
- $scope.populateScopeWithDetails(details);
- $scope.saveStatus = "Changes saved successfully";
- $scope.specUpdated = false;
- })
- .catch(function(response) {
- $scope.showError("Error occurred during save properties",response.statusText);
- });
-
- };
-
- $scope.addVariable = function(variables,key,value){
- if(key != '' && value != ''){
- variables[key] = value;
- }
-
- $timeout(function() {
- var scroller = document.getElementById("variableList");
- scroller.scrollTop = scroller.scrollHeight;
- }, 0, false);
- }
-
- $scope.deleteVariable = function(variables,key){
- delete variables[key];
- }
-
- $scope.saveVariables = function(variables){
- angular.copy($scope.variables,$scope.joltVariables);
- $scope.cancelDialog();
- }
-
- $scope.cancelDialog = function(){
- $mdDialog.cancel();
- }
-
- $scope.showVariableDialog = function(ev) {
- angular.copy($scope.joltVariables, $scope.variables);
- $mdDialog.show({
- locals: {parent: $scope},
- controller: angular.noop,
- controllerAs: 'dialogCtl',
- bindToController: true,
- templateUrl: 'app/transformjson/variable-dialog-template.html',
- targetEvent: ev,
- clickOutsideToClose: false
- });
-
- };
-
- $scope.initController = function(params){
- $scope.processorId = params.id;
- $scope.clientId = params.clientId;
- $scope.revisionId = params.revision;
- $scope.disconnectedNodeAcknowledged = params.disconnectedNodeAcknowledged === 'true';
- $scope.editable = params.editable === 'true';
-
- var jsonSpec = $scope.getSpec($scope.transform,$scope.jsonSpec);
- if(jsonSpec != null && jsonSpec != ""){
- setTimeout(function(){
- $scope.$apply(function(){
- $scope.validateJson($scope.jsonInput,jsonSpec,$scope.transform);
- });
- });
- }
- };
-
- $scope.$watch("specEditor", function (newValue, oldValue ) {
- $scope.toggleEditor(newValue,$scope.transform,false);
- });
-
- $scope.initController($state.params);
-
-};
-
-TransformJsonController.$inject = ['$scope', '$state', '$q','$mdDialog','$timeout','TransformJsonService', 'ProcessorService','details'];
-angular.module('standardUI').controller('TransformJsonController', TransformJsonController);
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.service.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.service.js
deleted file mode 100644
index 1e8bdcb7341b..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.service.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-'use strict';
-
-var TransformJsonService = function TransformJsonService($http) {
-
- return {
- 'validate': validate,
- 'execute' : execute
- };
-
-
- function validate(spec){
- return $http({ url:'api/standard/transformjson/validate',method:'POST', data:spec });
- }
-
- function execute(spec){
- return $http({ url:'api/standard/transformjson/execute',method:'POST', data:spec,
- transformResponse: [function (data) {
- return data;
- }]});
- }
-
-};
-
-TransformJsonService.$inject = ['$http'];
-angular.module('standardUI').factory('TransformJsonService', TransformJsonService);
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.state.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.state.js
deleted file mode 100644
index 9195e1ca36de..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.state.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-'use strict';
-
-var TransformJsonState = function($stateProvider) {
-
- $stateProvider
- .state('jolttransformjson', {
- url: "/transformjson?id&revision&clientId&editable&disconnectedNodeAcknowledged",
- templateUrl: "app/transformjson/transformjson.view.html",
- controller: 'TransformJsonController',
- resolve: {
- details: ['ProcessorService','$stateParams',
- function (ProcessorService,$stateParams) {
- return ProcessorService.getDetails($stateParams.id);
- }
- ]
- }
- })
-
-};
-
-TransformJsonState.$inject = ['$stateProvider'];
-
-angular.module('standardUI').config(TransformJsonState);
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.view.html b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.view.html
deleted file mode 100644
index 60849ba6517a..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/transformjson.view.html
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/variable-dialog-template.html b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/variable-dialog-template.html
deleted file mode 100644
index 1ba033550ff7..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/app/transformjson/variable-dialog-template.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
Attributes
-
-
-
-
-
-
- Enter attributes and values to reference within your specification for testing input. These attribute values will only be available for testing and not when executing the actual flow:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Attribute - Values:
-
-
-
-
{{key}}
-
{{value}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/css/common-ui.css b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/css/common-ui.css
deleted file mode 100644
index f07bfd38d67e..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/css/common-ui.css
+++ /dev/null
@@ -1,734 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-@font-face {
- font-family: 'Roboto';
- font-style: normal;
- font-weight: 300;
- src: local('Roboto Light'),
- local('Roboto-Light'),
- url('../fonts/Roboto/Roboto-Light.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto';
- font-style: italic;
- font-weight: 300;
- src: local('Roboto LightItalic'),
- local('Roboto-LightItalic'),
- url('../fonts/Roboto/Roboto-LightItalic.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto';
- font-style: normal;
- font-weight: normal;
- src: local('Roboto Regular'),
- local('Roboto-Regular'),
- url('../fonts/Roboto/Roboto-Regular.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto';
- font-style: normal;
- font-weight: 500;
- src: local('Roboto Medium'),
- local('Roboto-Medium'),
- url('../fonts/Roboto/Roboto-Medium.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto';
- font-style: normal;
- font-weight: bold;
- src: local('Roboto Bold'),
- local('Roboto-Bold'),
- url('../fonts/Roboto/Roboto-Bold.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto';
- font-style: italic;
- font-weight: normal;
- src: local('Roboto Italic'),
- local('Roboto-Italic'),
- url('../fonts/Roboto/Roboto-Italic.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto Slab';
- font-style: normal;
- font-weight: normal;
- src: local('RobotoSlab Regular'),
- local('RobotoSlab-Regular'),
- url('../fonts/Roboto_Slab/RobotoSlab-Regular.ttf') format('truetype');
-}
-
-@font-face {
- font-family: 'Roboto Slab';
- font-style: normal;
- font-weight: bold;
- src: local('RobotoSlab Bold'),
- local('RobotoSlab-Bold'),
- url('../fonts/Roboto_Slab/RobotoSlab-Bold.ttf') format('truetype');
-}
-
-/*remove margin from font awesome*/
-i[class^="fa-"]:before, i[class*=" fa-"]:before {
- margin: -1px;
-}
-
-/*remove margin from flowfont*/
-i[class^="icon-"]:before, i[class*=" icon-"]:before {
- margin: -2px;
-}
-
-/*shift rotated font awesome icons*/
-.fa-rotate-90 {
- left: -2px !important;
-}
-
-body {
- display: block;
- font-family: Roboto, sans-serif;
- overflow: hidden;
- color: #262626;
-}
-
-body.md-default-theme, body, html.md-default-theme, html {
- background-color: white;
-}
-
-button {
- border-radius: 0;
-}
-
-.value-color {
- color: #775351;
-}
-
-ul.links li {
- float: left;
- display: block;
- margin-left: 10px;
- padding: 4px;
- text-align: center;
- font-size: 11px;
- font-weight: normal;
- text-decoration: none;
-}
-
-ul.links span.header-link-over {
- color: #264c58;
- text-decoration: underline;
-}
-
-/*
- General Styles
-*/
-
-.unselectable {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.clear {
- clear: both;
-}
-
-.pointer {
- cursor: pointer !important;
-}
-
-.hidden {
- display: none;
-}
-
-.blank, .unset, .sensitive {
- font-weight: normal !important;
- color: #a8a8a8 !important;
-}
-
-.required {
- font-weight: bold !important;
-}
-
-.ellipsis {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.ellipsis.multiline {
- white-space: normal;
-}
-
-.table-cell {
- overflow: hidden;
- white-space: nowrap;
- line-height: normal;
- float: left;
- margin-top: 4px;
-}
-
-label {
- font-family: 'Roboto Slab', serif;
- font-size: 12px;
- color: #262626; /*base-font-color*/
- letter-spacing: 0.05rem;
- display: block;
- margin-bottom: 2px;
-}
-
-/* placeholder styles */
-
-*::placeholder {
- color: #728e9b;
-}
-*::-webkit-input-placeholder {
- color: #728e9b;
-}
-*:-moz-placeholder {
- color: #728e9b;
-}
-*::-moz-placeholder {
- color: #728e9b;
-}
-*:-ms-input-placeholder {
- color: #728e9b;
-}
-
-input[type=text], input[type=password] {
- background-color: #eaeef0;
- border: 1px solid #eaeef0;
- font-family: Roboto, sans-serif;
- font-size: 13px;
- padding: 0px 10px 0px 10px;
- resize: none;
- height: 32px;
- width: 100%;
- -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
- -moz-box-sizing: border-box; /* Firefox, other Gecko */
- box-sizing: border-box;
- color: #262626;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-input:focus, textarea:focus {
- background-color: #fff;
- border: 1px solid #004849; /*link-color*/
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
- outline: none;
-}
-
-textarea {
- background-color: #eaeef0;
- border: 1px solid #eaeef0;
- font-family: Roboto, sans-serif;
- font-size: 13px !important;
- padding: 10px 10px;
- resize: vertical;
- height: 32px;
- width: 100%;
- -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
- -moz-box-sizing: border-box; /* Firefox, other Gecko */
- box-sizing: border-box;
- color: #262626;
- white-space: pre-wrap;
- overflow-y: auto;
- overflow-x: hidden;
- text-overflow: ellipsis;
-}
-
-textarea[disabled] {
- background: #b2b8c1;
- color: #dbdee2;
- border: 1px solid #b2b8c1;
-}
-
-ul.property-info {
- list-style-type: disc;
- margin-left: 10px;
-}
-
-ul.property-info li {
- padding: 0px 0px;
- margin-left: 10px;
-}
-
-div.nf-checkbox {
- cursor: pointer;
- width: 12px;
- height: 12px;
- float: left;
- margin-right: 4px;
-}
-
-.nf-checkbox-label {
- cursor: pointer;
-}
-
-div.nf-checkbox.disabled {
- opacity: .5;
- cursor: not-allowed;
-}
-
-div.checkbox-unchecked {
- background: transparent url(../images/inputCheckbox.png) no-repeat scroll top left;
-}
-
-div.checkbox-checked {
- background: transparent url(../images/inputCheckbox.png) no-repeat scroll top right;
-}
-
-div.ajax-loading {
- background-image: url(../images/iconLoading.gif);
-}
-
-div.ajax-complete:before {
- font-family: FontAwesome;
- content: "\f00c";
- font-size: 16px;
- color: #70B59A;
-}
-
-div.ajax-error:before {
- font-family: FontAwesome;
- content: "\f00d";
- font-size: 16px;
- color: #D18686;
-}
-
-.refresh-button {
- float: left;
-}
-
-.ui-draggable .dialog-header {
- cursor: move;
-}
-
-span.link:focus {
- outline: none;
-}
-
-span.link {
- cursor: pointer;
- color: #004849; /*link-color*/
- font-weight: normal;
- display: inline-block;
- border-bottom: 1px solid #CCDADB;
- font-size: 13px;
- font-family: Roboto;
-}
-
-span.link-over {
- border-bottom: 1px solid #004849;
-}
-
-span.link-bold {
- font-weight: bold;
- border-bottom: none;
-}
-
-button {
- height: 28px;
- width: 28px;
- border: 1px solid #CCDADB; /*tint link-color 80%*/
- background-color: rgba(249, 250, 251, 0.97);
- color: #004849;
-}
-
-button.refresh-button {
- font-size: 16px;
-}
-
-button:hover {
- border: 1px solid #004849; /*link-color*/
-}
-
-button:disabled {
- color: #CCDADB !important; /*tint link-color 80%*/
- cursor: not-allowed;
- border: 1px solid #CCDADB; /*tint link-color 80%*/
-}
-
-/* angular material override */
-
-button:focus {
- outline: none;
-}
-
-div:focus {
- outline: none;
-}
-
-input:focus {
- background-color: #fff;
- border: 1px solid #004849; /*link-color*/
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
- outline: none;
-}
-
-/* filter controls */
-
-.filter-controls {
- position: absolute;
- top: 10px;
-}
-
-.filter-container {
- height: 32px;
- width: 100%;
- float: left;
-}
-
-.filter {
- margin-right: 3px;
- float: left;
-}
-
-input.filter {
- width: 173px;
-}
-
-.filter-type,
-.filter-status-dropdown {
- float: left;
- width: 148px;
-}
-
-.filter-status {
- margin-top: 10px;
- color: #775351;
- font-family: Roboto;
- font-size: 13px;
- font-weight: 500;
- margin-bottom: 5px;
-}
-
-.setting-field.summary-filter-primary-node-container {
- display: inline-block;
- margin-left: 10px;
- margin-top: 8px;
- width: auto;
-}
-
-/* overlay icon styles */
-
-.stop-configure-icon.fa-stop {
- display : inline-block;
- font-size: 15px;
- position : relative;
- top : -1px;
-}
-
-.stop-configure-icon::after {
- content : "\f013";
- font-size: 14px;
- position : relative;
- top : 0px;
- left : -8px;
- color : #ffffff;
- -webkit-text-stroke-width : 1px;
- -webkit-text-stroke-color : #004849;
-
-}
-
-*.stop-configure-icon + span {
- display : inline-block;
- padding : 0px 0px 0px 0px;
- margin-left : -10px;
-}
-
-/* buttons */
-
-button.fa {
- color: #004849;
- font-size: 16px;
- cursor: pointer;
- line-height: 25px;
-}
-
-button.icon {
- color: #004849;
- font-size: 16px;
-}
-
-div.button-icon span {
- padding-left: 5px;
- vertical-align: middle;
- font-style: normal;
- font-family: Roboto;
- font-size: 11px;
-}
-
-div.button-icon {
- float: left !important;
- margin-left: 0;
- font-size: 18px !important;
-}
-
-div.button.auto-width,
-div.button-icon.auto-width {
- width : auto !important;
-}
-
-div.button {
- height: 32px;
- width: 90px;
- padding: 0 8px;
- text-transform: uppercase;
- font-weight: 500;
- font-size: 11px;
- line-height: 33px;
- text-align: center;
- border: 0px;
- float: right;
- position: relative;
- background: #728E9B;
- color: #fff;
- cursor: pointer;
-}
-
-div.button.disabled-button {
- color: #a8a8a8 !important;
- cursor: not-allowed;
- opacity: 0.7;
-}
-
-div.button:hover:not(.disabled-button) {
- background-color: #004849;
-}
-
-div.secondary-button {
- height: 32px;
- width: 90px;
- padding: 0 8px;
- text-transform: uppercase;
- font-weight: 500;
- font-size: 11px;
- line-height: 33px;
- text-align: center;
- border: 0px;
- float: right;
- position: relative;
- background: #E3E8EB;
- color: #004849;
- cursor:pointer
-}
-
-div.secondary-button:hover {
- background-color: #C7D2D7;
-}
-
-/* tooltips */
-
-.qtip-nifi {
- border: 0px !important;
- border-radius: 2px;
- background-color: rgba(0, 0, 0, 0.54) !important;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
- font-family: Roboto;
- font-weight: 500;
- font-size: 13px;
- color: #fff !important;
-}
-
-div.nifi-tooltip {
- border: 0px !important;
- border-radius: 2px;
- background-color: rgba(0, 0, 0, 0.80) !important;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
- font-family: Roboto;
- font-weight: 500;
- font-size: 13px;
- color: #fff !important;
- max-width: 500px;
- word-wrap: break-word;
-}
-
-.scrollable {
- border-bottom: 1px solid #d0dbe0;
-}
-
-/*context menu */
-
-.context-menu {
- display: none;
- position: absolute;
- z-index: 10006;
- font-size: 13px;
- padding:3px 0;
- background-color:rgba(249,250,251,0.97); /*tint base-color 96%*/
- border:1px solid #004849; /*link-color*/
- box-shadow: 0 3px 6px rgba(0,0,0,0.3);
- width: 215px;
- max-height: inherit;
- color:#004849
-}
-
-div.context-menu-item {
- cursor: pointer;
- height: 20px;
- padding-top: 4px;
- padding-left: 4px;
-}
-
-div.context-menu-item.hover {
- background-color:#C7D2D7; /*tint base-color 60%*/
- box-shadow:0 1px 1px rgba(0,0,0,0.15);
-}
-
-.context-menu-item-img {
- float: left;
- width: 16px;
- height: 16px;
- background-size: cover;
-}
-
-.context-menu-item-img.fa {
- position: relative;
- top: 2px;
- left: 2px;
-}
-
-.context-menu-item-img.icon {
- position: relative;
- top: 1px;
- left: 3px;
-}
-
-div.context-menu-item-text {
- margin-left: 4px;
- line-height: 16px;
- float: left;
- color: #262626;
-}
-
-div.context-menu-group-item-img {
- float: right;
- width: 16px;
- height: 16px;
- background-size: cover;
- font-size: 14px;
-}
-
-div.context-menu-item-separator {
- height: 1px;
- background-color: #C7D2D7;
- margin-top: 3px;
- margin-bottom: 3px;
-}
-
-/* search */
-
-li.search-no-matches {
- padding: 4px;
- font-weight: bold;
- color: #aaa;
- font-style: italic;
-}
-
-/* progress bars */
-
-md-progress-linear > div {
- background-color: #eaeef0 !important;
-}
-
-.setting {
- margin-bottom: 15px;
-}
-
-.setting-name {
- font-size: 12px;
- font-weight: 500;
- font-family: Roboto Slab;
- text-transform: capitalize;
- padding-bottom: 4px;
- color: #262626;
-}
-
-.setting-name .fa {
- color: #004849;
- margin-left: 5px;
-}
-
-.setting-field .fa {
- color: #004849;
- margin-left: 5px;
- line-height: 22px;
-}
-
-.setting-field {
- line-height: normal;
- width: 100%;
- color: #775351;
- font-size: 13px;
- font-weight: 500;
-}
-
-.setting-header {
- color: #728e9b;
- font-size: 12pt;
- font-family: 'Roboto Slab';
- font-style: normal;
- font-weight: bold;
- padding-bottom: 20px;
- text-overflow: ellipsis;
-}
-
-.CodeMirror {
- border: 1px solid #aaa;
- font-family: monospace;
- background-color: #fff;
- cursor: default;
- line-height: normal;
-}
-
-/* jquery ui autocomplete override */
-
-.ui-autocomplete {
- overflow: auto !important;
- border: 1px solid #aaaaaa !important;
- font-size: 12px !important;
- font-family: Roboto !important;
-}
-
-.ui-menu .ui-menu-item a {
- display: block;
- border: 1px solid transparent;
- line-height: 1.5;
- margin: 0 !important;
- color: #333 !important;
-}
-
-.ui-menu .ui-menu-item a.ui-state-active {
- background: #D4E0E5 !important;
- border: 1px solid #999999;
-}
-
-/* jquery ui slider override */
-
-.ui-slider-handle.ui-state-active {
- background: #fff !important;
-}
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/css/main.css b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/css/main.css
deleted file mode 100644
index 1569b1ca932f..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/css/main.css
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-body {
- font-family: Verdana, Arial, Helvetica, sans-serif;
-}
-
-
-
-div.code-mirror-editor.trans {
- opacity: 0.4;
- filter: alpha(opacity=40); /* For IE8 and earlier */
-}
-
-.large-label {
- color: #728e9b;
- font-size: 12pt;
- font-family: 'Roboto Slab';
- font-style: normal;
- font-weight: bold;
- padding-bottom: 10px;
- text-overflow: ellipsis;
- float: left;
-}
-
-
-.CodeMirror {
- border: 1px solid #eee;
- height: 30vh;
-}
-
-.info {
- font-style: italic;
- font-size: 75%;
-}
-
-
-div.scrollable{
- overflow-x: hidden;
- overflow-y: auto;
- height: 200px;
- border-color: rgba(0,0,0,0.12);
- border-style: solid;
- border-width: 1px 0 1px 0;
-}
-
-#mainView{
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- padding: 22px;
- overflow: auto;
-}
-
-#addButton {
- font-size: 60%;
-}
-
-#variableList {
- word-wrap: break-word;
-}
-
-.primary-button , .secondary-button {
- height: 32px;
- width: 90px;
- padding: 0 8px;
- text-transform: uppercase;
- font-weight: 500;
- font-size: 11px;
- line-height: 33px;
- text-align: center;
- border: 0;
- position: relative;
- color: #fff;
- cursor: pointer;
-}
-
-.primary-button{
- background: #728e9b;
-}
-
-.primary-button:hover:not(.disabled-button){
- background: rgb(0,72,73);
-}
-
-.secondary-button{
- background: rgb(227, 232, 235); color: rgb(0, 72, 73);
-
-}
-
-.secondary-button:hover:not(.disabled-button){
- background: rgb(199, 210, 215);
- border-color: rgb(199, 210, 215);
- color: rgb(0, 72, 73);
-}
-
-button.small-button {
- height: 100%;
- width: 28px;
-}
-
-div.md-toolbar-tools{
- height: 35px;
- padding: 0 0px;
-}
-
-.md-subheader .md-subheader-inner{
- padding: 0px 0px 16px 0px;
-}
-
-md-toolbar {
- min-height: 30px;
-}
-
-md-list-item.md-2-line{
- padding: 0px 0px 16px 0px;
- margin-top: 10px;
- margin-bottom: 10px;
- min-height: 30px;
-}
-
-button.modal-button {
- width: 28px;
-}
-
-.modal-header-label {
- color: #fff;
- font-size: 18px;
- font-family: Roboto Slab;
- font-style: normal;
- font-weight: bold;
- line-height: 56px;
- padding-left: 20px;
- text-overflow: ellipsis;
-}
-
-.modal-label {
- font-size: 14px;
- font-weight: 500;
- font-family: Roboto Slab;
- text-transform: capitalize;
- padding-bottom: 4px;
- color: #262626;
-}
-
-md-dialog .md-actions, md-dialog md-dialog-actions {
- padding-right: 0px;
- min-height: 0px;
-}
-
-md-option {
- height: 32px;
- padding: 0px 10px 0px 10px;
- background-color:rgb(255, 255, 255);
- border-color: rgb(234, 238, 240)
-}
-
-md-select .md-select-value {
- font-size: 9pt;
- font-style: normal;
- font-weight: normal;
- background-color:rgb(234, 238, 240);
- border-bottom-color: rgb(234, 238, 240);
-}
-
-md-option .md-text{
- font-size: 9pt;
- font-style: normal;
- font-weight: normal;
- color: rgb(38, 38, 38);
-}
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/LICENSE.txt b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/LICENSE.txt
deleted file mode 100755
index d64569567334..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Bold.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Bold.ttf
deleted file mode 100755
index a355c27cde02..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Bold.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Italic.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Italic.ttf
deleted file mode 100755
index ff6046d5bfa7..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Italic.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Light.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Light.ttf
deleted file mode 100755
index 94c6bcc67e09..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Light.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-LightItalic.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-LightItalic.ttf
deleted file mode 100755
index 04cc00230202..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-LightItalic.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Medium.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Medium.ttf
deleted file mode 100755
index 39c63d746179..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Medium.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Regular.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Regular.ttf
deleted file mode 100755
index 8c082c8de090..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto/Roboto-Regular.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/LICENSE.txt b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/LICENSE.txt
deleted file mode 100755
index d64569567334..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/RobotoSlab-Bold.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/RobotoSlab-Bold.ttf
deleted file mode 100755
index df5d1df27304..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/RobotoSlab-Bold.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/RobotoSlab-Regular.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/RobotoSlab-Regular.ttf
deleted file mode 100755
index eb52a7907362..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/Roboto_Slab/RobotoSlab-Regular.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.css b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.css
deleted file mode 100644
index 47a8014dab42..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.css
+++ /dev/null
@@ -1,87 +0,0 @@
-@font-face {
- font-family: 'flowfont';
- src: url('./flowfont.eot?8516181');
- src: url('./flowfont.eot?8516181#iefix') format('embedded-opentype'),
- url('./flowfont.woff2?8516181') format('woff2'),
- url('./flowfont.woff?8516181') format('woff'),
- url('./flowfont.ttf?8516181') format('truetype'),
- url('./flowfont.svg?8516181#flowfont') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
-/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
-/*
-@media screen and (-webkit-min-device-pixel-ratio:0) {
- @font-face {
- font-family: 'flowfont';
- src: url('../font/flowfont.svg?8516181#flowfont') format('svg');
- }
-}
-*/
-[class^="icon-"]:before, [class*=" icon-"]:before {
- font-family: "flowfont";
- font-style: normal;
- font-weight: normal;
- speak: never;
-
- display: inline-block;
- text-decoration: inherit;
- width: 1em;
- margin-right: .2em;
- text-align: center;
- /* opacity: .8; */
-
- /* For safety - reset parent styles, that can break glyph codes*/
- font-variant: normal;
- text-transform: none;
-
- /* fix buttons height, for twitter bootstrap */
- line-height: 1em;
-
- /* Animation center compensation - margins should be symmetric */
- /* remove if not needed */
- margin-left: .2em;
-
- /* you can be more comfortable with increased icons size */
- /* font-size: 120%; */
-
- /* Font smoothing. That was taken from TWBS */
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-
- /* Uncomment for 3D effect */
- /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
-}
-
-.icon-funnel-add:before { content: '\e800'; } /* '' */
-.icon-counter:before { content: '\e801'; } /* '' */
-.icon-enable-false:before { content: '\e802'; } /* '' */
-.icon-funnel:before { content: '\e803'; } /* '' */
-.icon-group:before { content: '\e804'; } /* '' */
-.icon-group-remote:before { content: '\e805'; } /* '' */
-.icon-label:before { content: '\e806'; } /* '' */
-.icon-processor:before { content: '\e807'; } /* '' */
-.icon-provenance:before { content: '\e808'; } /* '' */
-.icon-template:before { content: '\e809'; } /* '' */
-.icon-transmit-false:before { content: '\e80a'; } /* '' */
-.icon-zoom-actual:before { content: '\e80b'; } /* '' */
-.icon-zoom-fit:before { content: '\e80c'; } /* '' */
-.icon-label-add:before { content: '\e80d'; } /* '' */
-.icon-template-add:before { content: '\e80e'; } /* '' */
-.icon-group-add:before { content: '\e80f'; } /* '' */
-.icon-template-import:before { content: '\e810'; } /* '' */
-.icon-template-save:before { content: '\e811'; } /* '' */
-.icon-group-remote-add:before { content: '\e812'; } /* '' */
-.icon-port-out-add:before { content: '\e813'; } /* '' */
-.icon-port-in-add:before { content: '\e814'; } /* '' */
-.icon-processor-add:before { content: '\e815'; } /* '' */
-.icon-lineage:before { content: '\e816'; } /* '' */
-.icon-import-from-registry-add:before { content: '\e81d'; } /* '' */
-.icon-import-from-registry:before { content: '\e81e'; } /* '' */
-.icon-port-in:before { content: '\e832'; } /* '' */
-.icon-port-out:before { content: '\e833'; } /* '' */
-.icon-connect:before { content: '\e834'; } /* '' */
-.icon-connect-add:before { content: '\e835'; } /* '' */
-.icon-threads:before { content: '\e83f'; } /* '' */
-.icon-drop:before { content: '\e888'; } /* '' */
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.eot b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.eot
deleted file mode 100644
index f0d0fe0410a6..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.eot and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.svg b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.svg
deleted file mode 100644
index 5427d628116a..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.svg
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.ttf b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.ttf
deleted file mode 100644
index c16425cc281b..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.ttf and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.woff b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.woff
deleted file mode 100644
index 799454c3b28c..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.woff and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.woff2 b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.woff2
deleted file mode 100644
index 1917ea71cdff..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/fonts/flowfont/flowfont.woff2 and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/images/iconLoading.gif b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/images/iconLoading.gif
deleted file mode 100755
index 4cb019f162ad..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/images/iconLoading.gif and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/images/inputCheckbox.png b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/images/inputCheckbox.png
deleted file mode 100644
index 564b73bab3f7..000000000000
Binary files a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/images/inputCheckbox.png and /dev/null differ
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/LICENSE b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/LICENSE
deleted file mode 100644
index d21bbea5a633..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2014 by Marijn Haverbeke and others
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/json-lint.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/json-lint.js
deleted file mode 100644
index 9dbb616b3b44..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/json-lint.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Depends on jsonlint.js from https://github.com/zaach/jsonlint
-
-// declare global: jsonlint
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("lint", "json", function(text) {
- var found = [];
- jsonlint.parseError = function(str, hash) {
- var loc = hash.loc;
- found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
- to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
- message: str});
- };
- try { jsonlint.parse(text); }
- catch(e) {}
- return found;
-});
-
-});
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/lint.css b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/lint.css
deleted file mode 100644
index 414a9a0e0666..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/lint.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/* The lint marker gutter */
-.CodeMirror-lint-markers {
- width: 16px;
-}
-
-.CodeMirror-lint-tooltip {
- background-color: infobackground;
- border: 1px solid black;
- border-radius: 4px 4px 4px 4px;
- color: infotext;
- font-family: monospace;
- font-size: 10pt;
- overflow: hidden;
- padding: 2px 5px;
- position: fixed;
- white-space: pre;
- white-space: pre-wrap;
- z-index: 100;
- max-width: 600px;
- opacity: 0;
- transition: opacity .4s;
- -moz-transition: opacity .4s;
- -webkit-transition: opacity .4s;
- -o-transition: opacity .4s;
- -ms-transition: opacity .4s;
-}
-
-.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
- background-position: left bottom;
- background-repeat: repeat-x;
-}
-
-.CodeMirror-lint-mark-error {
- background-image:
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
- ;
-}
-
-.CodeMirror-lint-mark-warning {
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
- background-position: center center;
- background-repeat: no-repeat;
- cursor: pointer;
- display: inline-block;
- height: 16px;
- width: 16px;
- vertical-align: middle;
- position: relative;
-}
-
-.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
- padding-left: 18px;
- background-position: top left;
- background-repeat: no-repeat;
-}
-
-.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-multiple {
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
- background-repeat: no-repeat;
- background-position: right bottom;
- width: 100%; height: 100%;
-}
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/lint.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/lint.js
deleted file mode 100644
index e3a452766d31..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/addon/lint/lint.js
+++ /dev/null
@@ -1,239 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
- var GUTTER_ID = "CodeMirror-lint-markers";
-
- function showTooltip(e, content) {
- var tt = document.createElement("div");
- tt.className = "CodeMirror-lint-tooltip";
- tt.appendChild(content.cloneNode(true));
- document.body.appendChild(tt);
-
- function position(e) {
- if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
- tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
- tt.style.left = (e.clientX + 5) + "px";
- }
- CodeMirror.on(document, "mousemove", position);
- position(e);
- if (tt.style.opacity != null) tt.style.opacity = 1;
- return tt;
- }
- function rm(elt) {
- if (elt.parentNode) elt.parentNode.removeChild(elt);
- }
- function hideTooltip(tt) {
- if (!tt.parentNode) return;
- if (tt.style.opacity == null) rm(tt);
- tt.style.opacity = 0;
- setTimeout(function() { rm(tt); }, 600);
- }
-
- function showTooltipFor(e, content, node) {
- var tooltip = showTooltip(e, content);
- function hide() {
- CodeMirror.off(node, "mouseout", hide);
- if (tooltip) { hideTooltip(tooltip); tooltip = null; }
- }
- var poll = setInterval(function() {
- if (tooltip) for (var n = node;; n = n.parentNode) {
- if (n && n.nodeType == 11) n = n.host;
- if (n == document.body) return;
- if (!n) { hide(); break; }
- }
- if (!tooltip) return clearInterval(poll);
- }, 400);
- CodeMirror.on(node, "mouseout", hide);
- }
-
- function LintState(cm, options, hasGutter) {
- this.marked = [];
- this.options = options;
- this.timeout = null;
- this.hasGutter = hasGutter;
- this.onMouseOver = function(e) { onMouseOver(cm, e); };
- this.waitingFor = 0
- }
-
- function parseOptions(_cm, options) {
- if (options instanceof Function) return {getAnnotations: options};
- if (!options || options === true) options = {};
- return options;
- }
-
- function clearMarks(cm) {
- var state = cm.state.lint;
- if (state.hasGutter) cm.clearGutter(GUTTER_ID);
- for (var i = 0; i < state.marked.length; ++i)
- state.marked[i].clear();
- state.marked.length = 0;
- }
-
- function makeMarker(labels, severity, multiple, tooltips) {
- var marker = document.createElement("div"), inner = marker;
- marker.className = "CodeMirror-lint-marker-" + severity;
- if (multiple) {
- inner = marker.appendChild(document.createElement("div"));
- inner.className = "CodeMirror-lint-marker-multiple";
- }
-
- if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) {
- showTooltipFor(e, labels, inner);
- });
-
- return marker;
- }
-
- function getMaxSeverity(a, b) {
- if (a == "error") return a;
- else return b;
- }
-
- function groupByLine(annotations) {
- var lines = [];
- for (var i = 0; i < annotations.length; ++i) {
- var ann = annotations[i], line = ann.from.line;
- (lines[line] || (lines[line] = [])).push(ann);
- }
- return lines;
- }
-
- function annotationTooltip(ann) {
- var severity = ann.severity;
- if (!severity) severity = "error";
- var tip = document.createElement("div");
- tip.className = "CodeMirror-lint-message-" + severity;
- tip.appendChild(document.createTextNode(ann.message));
- return tip;
- }
-
- function lintAsync(cm, getAnnotations, passOptions) {
- var state = cm.state.lint
- var id = ++state.waitingFor
- function abort() {
- id = -1
- cm.off("change", abort)
- }
- cm.on("change", abort)
- getAnnotations(cm.getValue(), function(annotations, arg2) {
- cm.off("change", abort)
- if (state.waitingFor != id) return
- if (arg2 && annotations instanceof CodeMirror) annotations = arg2
- updateLinting(cm, annotations)
- }, passOptions, cm);
- }
-
- function startLinting(cm) {
- var state = cm.state.lint, options = state.options;
- var passOptions = options.options || options; // Support deprecated passing of `options` property in options
- var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
- if (!getAnnotations) return;
- if (options.async || getAnnotations.async) {
- lintAsync(cm, getAnnotations, passOptions)
- } else {
- updateLinting(cm, getAnnotations(cm.getValue(), passOptions, cm));
- }
- }
-
- function updateLinting(cm, annotationsNotSorted) {
- clearMarks(cm);
- var state = cm.state.lint, options = state.options;
-
- var annotations = groupByLine(annotationsNotSorted);
-
- for (var line = 0; line < annotations.length; ++line) {
- var anns = annotations[line];
- if (!anns) continue;
-
- var maxSeverity = null;
- var tipLabel = state.hasGutter && document.createDocumentFragment();
-
- for (var i = 0; i < anns.length; ++i) {
- var ann = anns[i];
- var severity = ann.severity;
- if (!severity) severity = "error";
- maxSeverity = getMaxSeverity(maxSeverity, severity);
-
- if (options.formatAnnotation) ann = options.formatAnnotation(ann);
- if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
-
- if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
- className: "CodeMirror-lint-mark-" + severity,
- __annotation: ann
- }));
- }
-
- if (state.hasGutter)
- cm.setGutterMarker(line, GUTTER_ID, makeMarker(tipLabel, maxSeverity, anns.length > 1,
- state.options.tooltips));
- }
- if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
- }
-
- function onChange(cm) {
- var state = cm.state.lint;
- if (!state) return;
- clearTimeout(state.timeout);
- state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500);
- }
-
- function popupTooltips(annotations, e) {
- var target = e.target || e.srcElement;
- var tooltip = document.createDocumentFragment();
- for (var i = 0; i < annotations.length; i++) {
- var ann = annotations[i];
- tooltip.appendChild(annotationTooltip(ann));
- }
- showTooltipFor(e, tooltip, target);
- }
-
- function onMouseOver(cm, e) {
- var target = e.target || e.srcElement;
- if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
- var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
- var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
-
- var annotations = [];
- for (var i = 0; i < spans.length; ++i) {
- var ann = spans[i].__annotation;
- if (ann) annotations.push(ann);
- }
- if (annotations.length) popupTooltips(annotations, e);
- }
-
- CodeMirror.defineOption("lint", false, function(cm, val, old) {
- if (old && old != CodeMirror.Init) {
- clearMarks(cm);
- if (cm.state.lint.options.lintOnChange !== false)
- cm.off("change", onChange);
- CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
- clearTimeout(cm.state.lint.timeout);
- delete cm.state.lint;
- }
-
- if (val) {
- var gutters = cm.getOption("gutters"), hasLintGutter = false;
- for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
- var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
- if (state.options.lintOnChange !== false)
- cm.on("change", onChange);
- if (state.options.tooltips != false)
- CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
-
- startLinting(cm);
- }
- });
-
- CodeMirror.defineExtension("performLint", function() {
- if (this.state.lint) startLinting(this);
- });
-});
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js
deleted file mode 100644
index 262fea7a8513..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* CodeMirror - Minified & Bundled
- Generated on 2/22/2015 with http://codemirror.net/doc/compress.html
- Version: 4.8
-
- CodeMirror Library:
- - codemirror.js
- Modes:
- - javascript.js
- - xml.js
- Add-ons:
- - brace-fold.js
- - comment-fold.js
- - foldcode.js
- - foldgutter.js
- - markdown-fold.js
- - matchbrackets.js
- - show-hint.js
- - xml-fold.js
- */
-
-!function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof define&&define.amd)return define([],a);this.CodeMirror=a()}}(function(){"use strict";function w(a,b){if(!(this instanceof w))return new w(a,b);this.options=b=b?Qg(b):{},Qg(ie,b,!1),J(b);var c=b.value;"string"==typeof c&&(c=new Lf(c,b.mode)),this.doc=c;var f=this.display=new x(a,c);f.wrapper.CodeMirror=this,F(this),D(this),b.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),b.autofocus&&!o&&_c(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Gg,keySeq:null},d&&11>e&&setTimeout(Rg($c,this,!0),20),cd(this),ih(),Ac(this),this.curOp.forceUpdate=!0,Pf(this,c),b.autofocus&&!o||bh()==f.input?setTimeout(Rg(Hd,this),20):Id(this);for(var g in je)je.hasOwnProperty(g)&&je[g](this,b[g],le);P(this);for(var h=0;he&&(c.gutters.style.zIndex=-1,c.scroller.style.paddingRight=0),n&&(g.style.width="0px"),f||(c.scroller.draggable=!0),k&&(c.inputDiv.style.height="1px",c.inputDiv.style.position="absolute"),d&&8>e&&(c.scrollbarH.style.minHeight=c.scrollbarV.style.minWidth="18px"),a&&(a.appendChild?a.appendChild(c.wrapper):a(c.wrapper)),c.viewFrom=c.viewTo=b.first,c.view=[],c.externalMeasured=null,c.viewOffset=0,c.lastWrapHeight=c.lastWrapWidth=0,c.updateLineNumbers=null,c.lineNumWidth=c.lineNumInnerWidth=c.lineNumChars=null,c.prevInput="",c.alignWidgets=!1,c.pollingFast=!1,c.poll=new Gg,c.cachedCharWidth=c.cachedTextHeight=c.cachedPaddingH=null,c.inaccurateSelection=!1,c.maxLine=null,c.maxLineLength=0,c.maxLineChanged=!1,c.wheelDX=c.wheelDY=c.wheelStartX=c.wheelStartY=null,c.shift=!1,c.selForContextMenu=null}function y(a){a.doc.mode=w.getMode(a.options,a.doc.modeOption),z(a)}function z(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Tb(a,100),a.state.modeGen++,a.curOp&&Pc(a)}function A(a){a.options.lineWrapping?(eh(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth=""):(dh(a.display.wrapper,"CodeMirror-wrap"),I(a)),C(a),Pc(a),kc(a),setTimeout(function(){M(a)},100)}function B(a){var b=wc(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/xc(a.display)-3);return function(e){if(ef(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;gb.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function J(a){var b=Ng(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function K(a){return a.display.scroller.clientHeight-a.display.wrapper.clientHeightb.clientWidth;f&&b.scrollWidth<=b.clientWidth+1&&d>0&&!b.hScrollbarTakesSpace&&(f=!1);var g=e>b.clientHeight;if(g?(c.scrollbarV.style.display="block",c.scrollbarV.style.bottom=f?d+"px":"0",c.scrollbarV.firstChild.style.height=Math.max(0,e-b.clientHeight+(b.barHeight||c.scrollbarV.clientHeight))+"px"):(c.scrollbarV.style.display="",c.scrollbarV.firstChild.style.height="0"),f?(c.scrollbarH.style.display="block",c.scrollbarH.style.right=g?d+"px":"0",c.scrollbarH.firstChild.style.width=b.scrollWidth-b.clientWidth+(b.barWidth||c.scrollbarH.clientWidth)+"px"):(c.scrollbarH.style.display="",c.scrollbarH.firstChild.style.width="0"),f&&g?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=c.scrollbarFiller.style.width=d+"px"):c.scrollbarFiller.style.display="",f&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d+"px",c.gutterFiller.style.width=c.gutters.offsetWidth+"px"):c.gutterFiller.style.display="",!a.state.checkedOverlayScrollbar&&b.clientHeight>0){if(0===d){var h=p&&!l?"12px":"18px";c.scrollbarV.style.minWidth=c.scrollbarH.style.minHeight=h;var i=function(b){pg(b)!=c.scrollbarV&&pg(b)!=c.scrollbarH&&Kc(a,gd)(b)};rg(c.scrollbarV,"mousedown",i),rg(c.scrollbarH,"mousedown",i)}a.state.checkedOverlayScrollbar=!0}}function N(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Xb(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=Vf(b,d),g=Vf(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;if(f>h)return{from:h,to:Vf(b,Wf(Qf(b,h))+a.wrapper.clientHeight)};if(Math.min(i,b.lastLine())>=g)return{from:Vf(b,Wf(Qf(b,i))-a.wrapper.clientHeight),to:i}}return{from:f,to:Math.max(g,f+1)}}function O(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=R(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&0==Vc(a))return!1;P(a)&&(Rc(a),b.dims=$(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFromg&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),v&&(f=cf(a.doc,f),g=df(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Uc(a,f,g),c.viewOffset=Wf(Qf(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Vc(a);if(!h&&0==i&&!b.force&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=bh();return i>4&&(c.lineDiv.style.display="none"),_(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),j&&bh()!=j&&j.offsetHeight&&j.focus(),$g(c.cursorDiv),$g(c.selectionDiv),h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Tb(a,400)),c.updateLineNumbers=null,!0}function U(a,b){for(var c=b.force,d=b.viewport,e=!0;;e=!1){if(e&&a.options.lineWrapping&&b.oldScrollerWidth!=a.display.scroller.clientWidth)c=!0;else if(c=!1,d&&null!=d.top&&(d={top:Math.min(a.doc.height+Yb(a.display)-Bg-a.display.scroller.clientHeight,d.top)}),b.visible=N(a.display,a.doc,d),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break;if(!T(a,b))break;Y(a);var f=L(a);Pb(a),W(a,f),M(a,f)}vg(a,"update",a),(a.display.viewFrom!=b.oldViewFrom||a.display.viewTo!=b.oldViewTo)&&vg(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo)}function V(a,b){var c=new S(a,b);if(T(a,c)){Y(a),U(a,c);var d=L(a);Pb(a),W(a,d),M(a,d)}}function W(a,b){a.display.sizer.style.minHeight=a.display.heightForcer.style.top=b.docHeight+"px",a.display.gutters.style.height=Math.max(b.docHeight,b.clientHeight-Bg)+"px"}function X(a,b){a.display.sizer.offsetWidth+a.display.gutters.offsetWidthe){var i=g.node.offsetTop+g.node.offsetHeight;h=i-c,c=i}else{var j=g.node.getBoundingClientRect();h=j.bottom-j.top}var k=g.line.height-h;if(2>h&&(h=wc(b)),(k>.001||-.001>k)&&(Tf(g.line,h),Z(g.line),g.rest))for(var l=0;l=b&&m.lineNumber;m.changes&&(Ng(m.changes,"gutter")>-1&&(o=!1),ab(a,m,k,c)),o&&($g(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(Q(a.options,k)))),h=m.node.nextSibling}else{var n=ib(a,m,k,c);g.insertBefore(n,h)}k+=m.size}for(;h;)h=i(h)}function ab(a,b,c,d){for(var e=0;ee&&(a.node.style.zIndex=2)),a.node}function cb(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=bb(a);a.background=c.insertBefore(Yg("div",null,b),c.firstChild)}}function db(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):zf(a,b)}function eb(a,b){var c=b.text.className,d=db(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,fb(b)):c&&(b.text.className=c)}function fb(a){cb(a),a.line.wrapClass?bb(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function gb(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=bb(b),g=b.gutter=f.insertBefore(Yg("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px"),b.text);if(b.line.gutterClass&&(g.className+=" "+b.line.gutterClass),!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Yg("div",Q(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),e)for(var h=0;h=0){var g=qb(f.from(),e.from()),h=pb(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;b>=d&&--b,a.splice(--d,2,new sb(i?h:g,i?g:h))}}return new rb(a,b)}function ub(a,b){return new rb([new sb(a,b||a)],0)}function vb(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function wb(a,b){if(b.linec?mb(c,Qf(a,c).text.length):xb(b,Qf(a,b.line).text.length)}function xb(a,b){var c=a.ch;return null==c||c>b?mb(a.line,b):0>c?mb(a.line,0):a}function yb(a,b){return b>=a.first&&b=f.ch:j.to>f.ch))){if(d&&(tg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(0>g?-1:1);if(0==nb(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?wb(a,mb(l.line-1)):null:l.ch>h.text.length&&(l=l.lineb&&(b=0),b=Math.round(b),d=Math.round(d),f.appendChild(Yg("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?i-a:c)+"px; height: "+(d-b)+"px"))}function k(b,c,d){function m(c,d){return pc(a,mb(b,c),"div",f,d)}var k,l,f=Qf(e,b),g=f.text.length;return xh(Xf(f),c||0,null==d?g:d,function(a,b,e){var n,o,p,f=m(a,"left");if(a==b)n=f,o=p=f.left;else{if(n=m(b-1,"right"),"rtl"==e){var q=f;f=n,n=q}o=f.left,p=n.right}null==c&&0==a&&(o=h),n.top-f.top>3&&(j(o,f.top,null,f.bottom),o=h,f.bottoml.bottom||n.bottom==l.bottom&&n.right>l.right)&&(l=n),h+1>o&&(o=h),j(o,n.top,p-o,n.bottom)}),{start:k,end:l}}var d=a.display,e=a.doc,f=document.createDocumentFragment(),g=Zb(a.display),h=g.left,i=d.lineSpace.offsetWidth-g.right,l=b.from(),m=b.to();if(l.line==m.line)k(l.line,l.ch,m.ch);else{var n=Qf(e,l.line),o=Qf(e,m.line),p=af(n)==af(o),q=k(l.line,l.ch,p?n.text.length+1:null).end,r=k(m.line,p?0:null,m.ch).start;p&&(q.top0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Tb(a,b){a.doc.mode.startState&&a.doc.frontier=a.display.viewTo)){var c=+new Date+a.options.workTime,d=re(b.mode,Wb(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=tf(a,f,d,!0);f.styles=h.styles;var i=f.styleClasses,j=h.classes;j?f.styleClasses=j:i&&(f.styleClasses=null);for(var k=!g||g.length!=f.styles.length||i!=j&&(!i||!j||i.bgClass!=j.bgClass||i.textClass!=j.textClass),l=0;!k&&lc?(Tb(a,a.options.workDelay),!0):void 0}),e.length&&Jc(a,function(){for(var b=0;bg;--h){if(h<=f.first)return f.first;var i=Qf(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Hg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Wb(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Vb(a,b,c),g=f>d.first&&Qf(d,f-1).stateAfter;return g=g?re(d.mode,g):se(d.mode),d.iter(f,b,function(c){vf(a,c.text,g);var h=f==b-1||0==f%5||f>=e.viewFrom&&f2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function _b(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;dc)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function ac(a,b){b=af(b);var c=Uf(b),d=a.display.externalMeasured=new Nc(a.doc,b,c);d.lineN=c;var e=d.built=zf(a,d);return d.text=e.pre,_g(a.display.lineMeasure,e.pre),d}function bc(a,b,c,d){return ec(a,dc(a,b),c,d)}function cc(a,b){if(b>=a.display.viewFrom&&b=c.lineN&&bc?(i=0,j=1,k="left"):n>c?(i=c-m,j=i+1):(l==g.length-3||c==n&&g[l+3]>c)&&(j=n-m,i=j-1,c>=n&&(k="right")),null!=i){if(h=g[l+2],m==n&&f==(h.insertLeft?"left":"right")&&(k=f),"left"==f&&0==i)for(;l&&g[l-2]==g[l-3]&&g[l-1].insertLeft;)h=g[(l-=3)+2],k="left";if("right"==f&&i==n-m)for(;ll;l++){for(;i&&Xg(b.line.text.charAt(m+i));)--i;for(;n>m+j&&Xg(b.line.text.charAt(m+j));)++j;if(d&&9>e&&0==i&&j==n-m)o=h.parentNode.getBoundingClientRect();else if(d&&a.options.lineWrapping){var p=Zg(h,i,j).getClientRects();o=p.length?p["right"==f?p.length-1:0]:fc}else o=Zg(h,i,j).getBoundingClientRect()||fc;if(o.left||o.right||0==i)break;j=i,i-=1,k="right"}d&&11>e&&(o=hc(a.display.measure,o))}else{i>0&&(k=f="right");var p;o=a.options.lineWrapping&&(p=h.getClientRects()).length>1?p["right"==f?p.length-1:0]:h.getBoundingClientRect()}if(d&&9>e&&!i&&(!o||!o.left&&!o.right)){var q=h.parentNode.getClientRects()[0];o=q?{left:q.left,right:q.left+xc(a.display),top:q.top,bottom:q.bottom}:fc}for(var r=o.top-b.rect.top,s=o.bottom-b.rect.top,t=(r+s)/2,u=b.view.measure.heights,l=0;lc.from?g(a-1):g(a,d)}d=d||Qf(a.doc,b.line),e||(e=dc(a,d));var i=Xf(d),j=b.ch;if(!i)return g(j);var k=Hh(i,j),l=h(j,k);return null!=Gh&&(l.other=h(j,Gh)),l}function rc(a,b){var c=0,b=wb(a.doc,b);a.options.lineWrapping||(c=xc(a.display)*b.ch);var d=Qf(a.doc,b.line),e=Wf(d)+Xb(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function sc(a,b,c,d){var e=mb(a,b);return e.xRel=d,c&&(e.outside=!0),e}function tc(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return sc(d.first,0,!0,-1);var e=Vf(d,c),f=d.first+d.size-1;if(e>f)return sc(d.first+d.size-1,Qf(d,f).text.length,!0,1);0>b&&(b=0);for(var g=Qf(d,e);;){var h=uc(a,g,e,b,c),i=$e(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=Uf(g=j.to.line)}}function uc(a,b,c,d,e){function j(d){var e=qc(a,mb(c,d),"line",b,i);return g=!0,f>e.bottom?e.left-h:fq)return sc(c,n,r,1);for(;;){if(k?n==m||n==Jh(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);Xg(b.text.charAt(s));)++s;var u=sc(c,s,s==m?p:r,-1>t?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=Jh(b,w,1)}var y=j(w);y>d?(n=w,q=y,(r=g)&&(q+=1e3),l=v):(m=w,o=y,p=g,l-=v)}}function wc(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==vc){vc=Yg("pre");for(var b=0;49>b;++b)vc.appendChild(document.createTextNode("x")),vc.appendChild(Yg("br"));vc.appendChild(document.createTextNode("x"))}_g(a.measure,vc);var c=vc.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),$g(a.measure),c||1}function xc(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Yg("span","xxxxxxxxxx"),c=Yg("pre",[b]);_g(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function Ac(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++zc},yc?yc.ops.push(a.curOp):a.curOp.ownsGroup=yc={ops:[a.curOp],delayedCallbacks:[]}}function Bc(a){var b=a.delayedCallbacks,c=0;do{for(;c=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new S(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Fc(a){a.updatedDisplay=a.mustUpdate&&T(a.cm,a.update)}function Gc(a){var b=a.cm,c=b.display;a.updatedDisplay&&Y(b),a.barMeasure=L(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=bc(b,c.maxLine,c.maxLine.text.length).left+3,a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo+Bg-c.scroller.clientWidth)),(a.updatedDisplay||a.selectionChanged)&&(a.newSelectionNodes=Nb(b))}function Hc(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft1&&M(b),a.updatedDisplay&&U(b,a.update),null==c.wheelStartX||null==a.scrollTop&&null==a.scrollLeft&&!a.scrollToPos||(c.wheelStartX=c.wheelStartY=null),null!=a.scrollTop&&(c.scroller.scrollTop!=a.scrollTop||a.forceScroll)){var e=Math.max(0,Math.min(c.scroller.scrollHeight-c.scroller.clientHeight,a.scrollTop));c.scroller.scrollTop=c.scrollbarV.scrollTop=d.scrollTop=e}if(null!=a.scrollLeft&&(c.scroller.scrollLeft!=a.scrollLeft||a.forceScroll)){var g=Math.max(0,Math.min(c.scroller.scrollWidth-c.scroller.clientWidth,a.scrollLeft));c.scroller.scrollLeft=c.scrollbarH.scrollLeft=d.scrollLeft=g,O(b)}if(a.scrollToPos){var h=Zd(b,wb(d,a.scrollToPos.from),wb(d,a.scrollToPos.to),a.scrollToPos.margin);a.scrollToPos.isCursor&&b.state.focused&&Yd(b,h)}var i=a.maybeHiddenMarkers,j=a.maybeUnhiddenMarkers;if(i)for(var k=0;ka.barMeasure.clientWidth&&a.barMeasure.scrollWidthf;f=e){var g=new Nc(a.doc,Qf(a.doc,f),f);e=f+g.size,d.push(g)}return d}function Pc(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&cb)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)v&&cf(a.doc,b)e.viewFrom?Rc(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Rc(a);else if(b<=e.viewFrom){var f=Tc(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Rc(a)}else if(c>=e.viewTo){var f=Tc(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Rc(a)}else{var g=Tc(a,b,b,-1),h=Tc(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Oc(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Rc(a)}var i=e.externalMeasured;i&&(c=e.lineN&&b=d.viewTo)){var f=d.view[Sc(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Ng(g,c)&&g.push(c)}}}function Rc(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Sc(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;db)return d}function Tc(a,b,c,d){var f,e=Sc(a,b),g=a.display.view;if(!v||c==a.doc.first+a.doc.size)return{index:e,lineN:c};for(var h=0,i=a.display.viewFrom;e>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(e==g.length-1)return null;f=i+g[e].size-b,e++}else f=i-b;b+=f,c+=f}for(;cf(a.doc,c)!=c;){if(e==(0>d?0:g.length-1))return null;c+=d*g[e-(0>d?1:0)].size,e+=d}return{index:e,lineN:c}}function Uc(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Oc(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Oc(a,b,d.viewFrom).concat(d.view):d.viewFromc&&(d.view=d.view.slice(0,Sc(a,c)))),d.viewTo=c}function Vc(a){for(var b=a.display.view,c=0,d=0;d=9&&a.display.inputHasSelection===g||p&&/[\uf700-\uf7ff]/.test(g))return $c(a),!1;var h=!a.curOp;h&&Ac(a),a.display.shift=!1,8203!=g.charCodeAt(0)||f.sel!=a.display.selForContextMenu||c||(c="\u200b");for(var i=0,j=Math.min(c.length,g.length);j>i&&c.charCodeAt(i)==g.charCodeAt(i);)++i;var k=g.slice(i),l=rh(k),m=null;a.state.pasteIncoming&&f.sel.ranges.length>1&&(Yc&&Yc.join("\n")==k?m=0==f.sel.ranges.length%Yc.length&&Og(Yc,rh):l.length==f.sel.ranges.length&&(m=Og(l,function(a){return[a]})));for(var n=f.sel.ranges.length-1;n>=0;n--){var o=f.sel.ranges[n],q=o.from(),r=o.to();i-1){de(a,v.line,"smart");break}}else u.electricInput&&u.electricInput.test(Qf(f,v.line).text.slice(0,v.ch))&&de(a,v.line,"smart")}}return be(a),a.curOp.updateInput=s,a.curOp.typing=!0,g.length>1e3||g.indexOf("\n")>-1?b.value=a.display.prevInput="":a.display.prevInput=g,h&&Cc(a),a.state.pasteIncoming=a.state.cutIncoming=!1,!0}function $c(a,b){var c,f,g=a.doc;if(a.somethingSelected()){a.display.prevInput="";var h=g.sel.primary();c=th&&(h.to().line-h.from().line>100||(f=a.getSelection()).length>1e3);var i=c?"-":f||a.getSelection();a.display.input.value=i,a.state.focused&&Mg(a.display.input),d&&e>=9&&(a.display.inputHasSelection=i)}else b||(a.display.prevInput=a.display.input.value="",d&&e>=9&&(a.display.inputHasSelection=null));a.display.inaccurateSelection=c}function _c(a){"nocursor"==a.options.readOnly||o&&bh()==a.display.input||a.display.input.focus()}function ad(a){a.state.focused||(_c(a),Hd(a))}function bd(a){return a.options.readOnly||a.doc.cantEdit}function cd(a){function c(){a.state.focused&&setTimeout(Rg(_c,a),0)}function g(b){xg(a,b)||og(b)}function h(c){if(a.somethingSelected())Yc=a.getSelections(),b.inaccurateSelection&&(b.prevInput="",b.inaccurateSelection=!1,b.input.value=Yc.join("\n"),Mg(b.input));else{for(var d=[],e=[],f=0;fe?rg(b.scroller,"dblclick",Kc(a,function(b){if(!xg(a,b)){var c=fd(a,b);if(c&&!nd(a,b)&&!ed(a.display,b)){lg(b);var d=a.findWordAt(c);Bb(a.doc,d.anchor,d.head)}}})):rg(b.scroller,"dblclick",function(b){xg(a,b)||lg(b)}),rg(b.lineSpace,"selectstart",function(a){ed(b,a)||lg(a)}),t||rg(b.scroller,"contextmenu",function(b){Jd(a,b)}),rg(b.scroller,"scroll",function(){b.scroller.clientHeight&&(rd(a,b.scroller.scrollTop),sd(a,b.scroller.scrollLeft,!0),tg(a,"scroll",a))}),rg(b.scrollbarV,"scroll",function(){b.scroller.clientHeight&&rd(a,b.scrollbarV.scrollTop)}),rg(b.scrollbarH,"scroll",function(){b.scroller.clientHeight&&sd(a,b.scrollbarH.scrollLeft)}),rg(b.scroller,"mousewheel",function(b){vd(a,b)}),rg(b.scroller,"DOMMouseScroll",function(b){vd(a,b)}),rg(b.scrollbarH,"mousedown",c),rg(b.scrollbarV,"mousedown",c),rg(b.wrapper,"scroll",function(){b.wrapper.scrollTop=b.wrapper.scrollLeft=0}),rg(b.input,"keyup",function(b){Fd.call(a,b)}),rg(b.input,"input",function(){d&&e>=9&&a.display.inputHasSelection&&(a.display.inputHasSelection=null),Xc(a)}),rg(b.input,"keydown",Kc(a,Dd)),rg(b.input,"keypress",Kc(a,Gd)),rg(b.input,"focus",Rg(Hd,a)),rg(b.input,"blur",Rg(Id,a)),a.options.dragDrop&&(rg(b.scroller,"dragstart",function(b){qd(a,b)}),rg(b.scroller,"dragenter",g),rg(b.scroller,"dragover",g),rg(b.scroller,"drop",Kc(a,pd))),rg(b.scroller,"paste",function(c){ed(b,c)||(a.state.pasteIncoming=!0,_c(a),Xc(a))}),rg(b.input,"paste",function(){if(f&&!a.state.fakedLastChar&&!(new Date-a.state.lastMiddleDown<200)){var c=b.input.selectionStart,d=b.input.selectionEnd;b.input.value+="$",b.input.selectionEnd=d,b.input.selectionStart=c,a.state.fakedLastChar=!0}a.state.pasteIncoming=!0,Xc(a)}),rg(b.input,"cut",h),rg(b.input,"copy",h),k&&rg(b.sizer,"mouseup",function(){bh()==b.input&&b.input.blur(),_c(a)})}function dd(a){var b=a.display;(b.lastWrapHeight!=b.wrapper.clientHeight||b.lastWrapWidth!=b.wrapper.clientWidth)&&(b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,a.setSize())}function ed(a,b){for(var c=pg(b);c!=a.wrapper;c=c.parentNode)if(!c||c.ignoreEvents||c.parentNode==a.sizer&&c!=a.mover)return!0}function fd(a,b,c,d){var e=a.display;if(!c){var f=pg(b);if(f==e.scrollbarH||f==e.scrollbarV||f==e.scrollbarFiller||f==e.gutterFiller)return null}var g,h,i=e.lineSpace.getBoundingClientRect();try{g=b.clientX-i.left,h=b.clientY-i.top}catch(b){return null}var k,j=tc(a,g,h);if(d&&1==j.xRel&&(k=Qf(a.doc,j.line).text).length==j.ch){var l=Hg(k,k.length,a.options.tabSize)-k.length;j=mb(j.line,Math.max(0,Math.round((g-Zb(a.display).left)/xc(a.display))-l))}return j}function gd(a){if(!xg(this,a)){var b=this,c=b.display;if(c.shift=a.shiftKey,ed(c,a))return f||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)),void 0;if(!nd(b,a)){var d=fd(b,a);switch(window.focus(),qg(a)){case 1:d?jd(b,a,d):pg(a)==c.scroller&&lg(a);break;case 2:f&&(b.state.lastMiddleDown=+new Date),d&&Bb(b.doc,d),setTimeout(Rg(_c,b),20),lg(a);break;case 3:t&&Jd(b,a)}}}}function jd(a,b,c){setTimeout(Rg(ad,a),0);var e,d=+new Date;id&&id.time>d-400&&0==nb(id.pos,c)?e="triple":hd&&hd.time>d-400&&0==nb(hd.pos,c)?(e="double",id={time:d,pos:c}):(e="single",hd={time:d,pos:c});var f=a.doc.sel,g=p?b.metaKey:b.ctrlKey;a.options.dragDrop&&kh&&!bd(a)&&"single"==e&&f.contains(c)>-1&&f.somethingSelected()?kd(a,b,c,g):ld(a,b,c,e,g)}function kd(a,b,c,g){var h=a.display,i=Kc(a,function(j){f&&(h.scroller.draggable=!1),a.state.draggingText=!1,sg(document,"mouseup",i),sg(h.scroller,"drop",i),Math.abs(b.clientX-j.clientX)+Math.abs(b.clientY-j.clientY)<10&&(lg(j),g||Bb(a.doc,c),_c(a),d&&9==e&&setTimeout(function(){document.body.focus(),_c(a)},20))});f&&(h.scroller.draggable=!0),a.state.draggingText=i,h.scroller.dragDrop&&h.scroller.dragDrop(),rg(document,"mouseup",i),rg(h.scroller,"drop",i)}function ld(a,b,c,d,e){function n(b){if(0!=nb(m,b))if(m=b,"rect"==d){for(var e=[],f=a.options.tabSize,k=Hg(Qf(g,c.line).text,c.ch,f),l=Hg(Qf(g,b.line).text,b.ch,f),n=Math.min(k,l),o=Math.max(k,l),p=Math.min(c.line,b.line),q=Math.min(a.lastLine(),Math.max(c.line,b.line));q>=p;p++){var r=Qf(g,p).text,s=Ig(r,n,f);n==o?e.push(new sb(mb(p,s),mb(p,s))):r.length>s&&e.push(new sb(mb(p,s),mb(p,Ig(r,o,f))))}e.length||e.push(new sb(c,c)),Hb(g,tb(j.ranges.slice(0,i).concat(e),i),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=h,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new sb(mb(b.line,0),wb(g,mb(b.line+1,0)));nb(w.anchor,u)>0?(v=w.head,u=qb(t.from(),w.anchor)):(v=w.anchor,u=pb(t.to(),w.head))}var e=j.ranges.slice(0);e[i]=new sb(wb(g,u),v),Hb(g,tb(e,i),Eg)}}function q(b){var c=++p,e=fd(a,b,!0,"rect"==d);if(e)if(0!=nb(e,m)){ad(a),n(e);var h=N(f,g);(e.line>=h.to||e.lineo.bottom?20:0;i&&setTimeout(Kc(a,function(){p==c&&(f.scroller.scrollTop+=i,q(b))}),50)}}function r(b){p=1/0,lg(b),_c(a),sg(document,"mousemove",s),sg(document,"mouseup",t),g.history.lastSelOrigin=null}var f=a.display,g=a.doc;lg(b);var h,i,j=g.sel;if(e&&!b.shiftKey?(i=g.sel.contains(c),h=i>-1?g.sel.ranges[i]:new sb(c,c)):h=g.sel.primary(),b.altKey)d="rect",e||(h=new sb(c,c)),c=fd(a,b,!0,!0),i=-1;else if("double"==d){var k=a.findWordAt(c);h=a.display.shift||g.extend?Ab(g,h,k.anchor,k.head):k}else if("triple"==d){var l=new sb(mb(c.line,0),wb(g,mb(c.line+1,0)));h=a.display.shift||g.extend?Ab(g,h,l.anchor,l.head):l}else h=Ab(g,h,c);e?i>-1?Db(g,i,h,Eg):(i=g.sel.ranges.length,Hb(g,tb(g.sel.ranges.concat([h]),i),{scroll:!1,origin:"*mouse"})):(i=0,Hb(g,new rb([h],0),Eg),j=g.sel);var m=c,o=f.wrapper.getBoundingClientRect(),p=0,s=Kc(a,function(a){qg(a)?q(a):r(a)}),t=Kc(a,r);rg(document,"mousemove",s),rg(document,"mouseup",t)}function md(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&lg(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!zg(a,c))return ng(b);g-=i.top-h.viewOffset;for(var j=0;j=f){var l=Vf(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),ng(b)}}}function nd(a,b){return md(a,b,"gutterClick",!0,vg)}function pd(a){var b=this;if(!xg(b,a)&&!ed(b.display,a)){lg(a),d&&(od=+new Date);var c=fd(b,a,!0),e=a.dataTransfer.files;if(c&&!bd(b))if(e&&e.length&&window.FileReader&&window.File)for(var f=e.length,g=Array(f),h=0,i=function(a,d){var e=new FileReader;e.onload=Kc(b,function(){if(g[d]=e.result,++h==f){c=wb(b.doc,c);var a={from:c,to:c,text:rh(g.join("\n")),origin:"paste"};Rd(b.doc,a),Gb(b.doc,ub(c,Ld(a)))}}),e.readAsText(a)},j=0;f>j;++j)i(e[j],j);else{if(b.state.draggingText&&b.doc.sel.contains(c)>-1)return b.state.draggingText(a),setTimeout(Rg(_c,b),20),void 0;try{var g=a.dataTransfer.getData("Text");if(g){if(b.state.draggingText&&!(p?a.metaKey:a.ctrlKey))var k=b.listSelections();if(Ib(b.doc,ub(c,c)),k)for(var j=0;jh.clientWidth||e&&h.scrollHeight>h.clientHeight){if(e&&p&&f)a:for(var j=c.target,k=g.view;j!=h;j=j.parentNode)for(var l=0;lm?n=Math.max(0,n+m-50):o=Math.min(b.doc.height,o+m+50),V(b,{top:n,bottom:o})}20>td&&(null==g.wheelStartX?(g.wheelStartX=h.scrollLeft,g.wheelStartY=h.scrollTop,g.wheelDX=d,g.wheelDY=e,setTimeout(function(){if(null!=g.wheelStartX){var a=h.scrollLeft-g.wheelStartX,b=h.scrollTop-g.wheelStartY,c=b&&g.wheelDY&&b/g.wheelDY||a&&g.wheelDX&&a/g.wheelDX;g.wheelStartX=g.wheelStartY=null,c&&(ud=(ud*td+c)/(td+1),++td)}},200)):(g.wheelDX+=d,g.wheelDY+=e))}}function wd(a,b,c){if("string"==typeof b&&(b=te[b],!b))return!1;a.display.pollingFast&&Zc(a)&&(a.display.pollingFast=!1);var d=a.display.shift,e=!1;try{bd(a)&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Cg}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function xd(a,b,c){for(var d=0;de&&27==a.keyCode&&(a.returnValue=!1);var c=a.keyCode;b.display.shift=16==c||a.shiftKey;var f=Ad(b,a);i&&(Cd=f?c:null,!f&&88==c&&!th&&(p?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),18!=c||/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)||Ed(b)}}function Ed(a){function c(a){18!=a.keyCode&&a.altKey||(dh(b,"CodeMirror-crosshair"),sg(document,"keyup",c),sg(document,"mouseover",c))}var b=a.display.lineDiv;eh(b,"CodeMirror-crosshair"),rg(document,"keyup",c),rg(document,"mouseover",c)}function Fd(a){16==a.keyCode&&(this.doc.sel.shift=!1),xg(this,a)}function Gd(a){var b=this;if(!(xg(b,a)||a.ctrlKey&&!a.altKey||p&&a.metaKey)){var c=a.keyCode,f=a.charCode;if(i&&c==Cd)return Cd=null,lg(a),void 0;if(!(i&&(!a.which||a.which<10)||k)||!Ad(b,a)){var g=String.fromCharCode(null==f?c:f);Bd(b,a,g)||(d&&e>=9&&(b.display.inputHasSelection=null),Xc(b))}}}function Hd(a){"nocursor"!=a.options.readOnly&&(a.state.focused||(tg(a,"focus",a),a.state.focused=!0,eh(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||($c(a),f&&setTimeout(Rg($c,a,!0),0))),Wc(a),Sb(a))}function Id(a){a.state.focused&&(tg(a,"blur",a),a.state.focused=!1,dh(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150)}function Jd(a,b){function m(){if(null!=c.input.selectionStart){var b=a.somethingSelected(),d=c.input.value="\u200b"+(b?c.input.value:"");c.prevInput=b?"":"\u200b",c.input.selectionStart=1,c.input.selectionEnd=d.length,c.selForContextMenu=a.doc.sel}}function n(){if(c.inputDiv.style.position="relative",c.input.style.cssText=k,d&&9>e&&(c.scrollbarV.scrollTop=c.scroller.scrollTop=h),Wc(a),null!=c.input.selectionStart){(!d||d&&9>e)&&m();var b=0,f=function(){c.selForContextMenu==a.doc.sel&&0==c.input.selectionStart?Kc(a,te.selectAll)(a):b++<10?c.detectingSelectAll=setTimeout(f,500):$c(a)};c.detectingSelectAll=setTimeout(f,200)}}if(!xg(a,b,"contextmenu")){var c=a.display;if(!ed(c,b)&&!Kd(a,b)){var g=fd(a,b),h=c.scroller.scrollTop;if(g&&!i){var j=a.options.resetSelectionOnContextMenu;j&&-1==a.doc.sel.contains(g)&&Kc(a,Hb)(a.doc,ub(g),Dg);var k=c.input.style.cssText;if(c.inputDiv.style.position="absolute",c.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(b.clientY-5)+"px; left: "+(b.clientX-5)+"px; z-index: 1000; background: "+(d?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",f)var l=window.scrollY;if(_c(a),f&&window.scrollTo(null,l),$c(a),a.somethingSelected()||(c.input.value=c.prevInput=" "),c.selForContextMenu=a.doc.sel,clearTimeout(c.detectingSelectAll),d&&e>=9&&m(),t){og(b);var o=function(){sg(window,"mouseup",o),setTimeout(n,20)};rg(window,"mouseup",o)}else setTimeout(n,50)}}}}function Kd(a,b){return zg(a,"gutterContextMenu")?md(a,b,"gutterContextMenu",!1,tg):!1}function Md(a,b){if(nb(a,b.from)<0)return a;if(nb(a,b.to)<=0)return Ld(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Ld(b).ch-b.to.ch),mb(c,d)}function Nd(a,b){for(var c=[],d=0;d=0;--e)Sd(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else Sd(a,b)}}function Sd(a,b){if(1!=b.text.length||""!=b.text[0]||0!=nb(b.from,b.to)){var c=Nd(a,b);ag(a,b,c,a.cm?a.cm.curOp.id:0/0),Vd(a,b,c,Pe(a,b));var d=[];Of(a,function(a,c){c||-1!=Ng(d,a.history)||(kg(a.history,b),d.push(a.history)),Vd(a,b,null,Pe(a,b))})}}function Td(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var e,d=a.history,f=a.sel,g="undo"==b?d.done:d.undone,h="undo"==b?d.undone:d.done,i=0;i=0;--i){var l=e.changes[i];if(l.origin=b,k&&!Qd(a,l,!1))return g.length=0,void 0;j.push(Zf(a,l));var m=i?Nd(a,l):Lg(g);Vd(a,l,m,Re(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Ld(l)});var n=[];Of(a,function(a,b){b||-1!=Ng(n,a.history)||(kg(a.history,l),n.push(a.history)),Vd(a,l,null,Re(a,l))})}}}}function Ud(a,b){if(0!=b&&(a.first+=b,a.sel=new rb(Og(a.sel.ranges,function(a){return new sb(mb(a.anchor.line+b,a.anchor.ch),mb(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Pc(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;da.lastLine())){if(b.from.linef&&(b={from:b.from,to:mb(f,Qf(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Rf(a,b.from,b.to),c||(c=Nd(a,b)),a.cm?Wd(a.cm,b,d):Hf(a,b,d),Ib(a,c,Dg)}}function Wd(a,b,c){var d=a.doc,e=a.display,f=b.from,g=b.to,h=!1,i=f.line;a.options.lineWrapping||(i=Uf(af(Qf(d,f.line))),d.iter(i,g.line+1,function(a){return a==e.maxLine?(h=!0,!0):void 0})),d.sel.contains(b.from,b.to)>-1&&yg(a),Hf(d,b,c,B(a)),a.options.lineWrapping||(d.iter(i,f.line+b.text.length,function(a){var b=H(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,h=!1)}),h&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,f.line),Tb(a,400);var j=b.text.length-(g.line-f.line)-1;f.line!=g.line||1!=b.text.length||Gf(a.doc,b)?Pc(a,f.line,g.line+1,j):Qc(a,f.line,"text");var k=zg(a,"changes"),l=zg(a,"change");if(l||k){var m={from:f,to:g,text:b.text,removed:b.removed,origin:b.origin};l&&vg(a,"change",a,m),k&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(m)}a.display.selForContextMenu=null}function Xd(a,b,c,d,e){if(d||(d=c),nb(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=rh(b)),Rd(a,{from:c,to:d,text:b,origin:e})}function Yd(a,b){if(!xg(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!m){var f=Yg("div","\u200b",null,"position: absolute; top: "+(b.top-c.viewOffset-Xb(a.display))+"px; height: "+(b.bottom-b.top+Bg)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Zd(a,b,c,d){null==d&&(d=0);for(var e=0;5>e;e++){var f=!1,g=qc(a,b),h=c&&c!=b?qc(a,c):g,i=_d(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(rd(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(sd(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)return g}}function $d(a,b,c,d,e){var f=_d(a,b,c,d,e);null!=f.scrollTop&&rd(a,f.scrollTop),null!=f.scrollLeft&&sd(a,f.scrollLeft)}function _d(a,b,c,d,e){var f=a.display,g=wc(a.display);0>c&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=f.scroller.clientHeight-Bg,j={};e-c>i&&(e=c+i);var k=a.doc.height+Yb(f),l=g>c,m=e>k-g;if(h>c)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=f.scroller.clientWidth-Bg-f.gutters.offsetWidth,q=d-b>p;return q&&(d=b+p),10>b?j.scrollLeft=0:o>b?j.scrollLeft=Math.max(0,b-(q?0:10)):d>p+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function ae(a,b,c){(null!=b||null!=c)&&ce(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function be(a){ce(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?mb(b.line,b.ch-1):b,d=mb(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function ce(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=rc(a,b.from),d=rc(a,b.to),e=_d(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function de(a,b,c,d){var f,e=a.doc;null==c&&(c="add"),"smart"==c&&(e.mode.indent?f=Wb(a,b):c="prev");var g=a.options.tabSize,h=Qf(e,b),i=Hg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var k,j=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(k=e.mode.indent(f,h.text.slice(j.length),h.text),k==Cg||k>150)){if(!d)return;c="prev"}}else k=0,c="not";"prev"==c?k=b>e.first?Hg(Qf(e,b-1).text,null,g):0:"add"==c?k=i+a.options.indentUnit:"subtract"==c?k=i-a.options.indentUnit:"number"==typeof c&&(k=i+c),k=Math.max(0,k);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(k/g);n;--n)m+=g,l+=" ";if(k>m&&(l+=Kg(k-m)),l!=j)Xd(e,l,mb(b,0),mb(b,j.length),"+input");else for(var n=0;n=0;b--)Xd(a.doc,"",d[b].from,d[b].to,"+delete");be(a)})}function ge(a,b,c,d,e){function k(){var b=f+c;return b=a.first+a.size?j=!1:(f=b,i=Qf(a,b))}function l(a){var b=(e?Jh:Kh)(i,g,c,!0);if(null==b){if(a||!k())return j=!1;g=e?(0>c?Bh:Ah)(i):0>c?i.text.length:0}else g=b;return!0}var f=b.line,g=b.ch,h=c,i=Qf(a,f),j=!0;if("char"==d)l();else if("column"==d)l(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(0>c)||l(!p);p=!1){var q=i.text.charAt(g)||"\n",r=Ug(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){0>c&&(c=1,l());break}if(r&&(m=r),c>0&&!l(!p))break}var s=Mb(a,mb(f,g),h,!0);return j||(s.hitSide=!0),s}function he(a,b,c,d){var g,e=a.doc,f=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);g=b.top+c*(h-(0>c?1.5:.5)*wc(a.display))}else"line"==d&&(g=c>0?b.bottom+3:b.top-3);for(;;){var i=tc(a,f,g);if(!i.outside)break;if(0>c?0>=g:g>=e.height){i.hitSide=!0;break}g+=5*c}return i}function ke(a,b,c,d){w.defaults[a]=b,c&&(je[a]=d?function(a,b,d){d!=le&&c(a,b,d)}:c)}function ve(a){for(var c,d,e,f,b=a.split(/-(?!$)/),a=b[b.length-1],g=0;g0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Yg("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||(f.widgetNode.ignoreEvents=!0),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(_e(a,b.line,b,c,f)||b.line!=c.line&&_e(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");
-v=!0}f.addToHistory&&ag(a,{from:b,to:c,origin:"markText"},a.sel,0/0);var j,h=b.line,i=a.cm;if(a.iter(h,c.line+1,function(a){i&&f.collapsed&&!i.options.lineWrapping&&af(a)==i.display.maxLine&&(j=!0),f.collapsed&&h!=b.line&&Tf(a,0),Me(a,new Je(f,h==b.line?b.ch:null,h==c.line?c.ch:null)),++h}),f.collapsed&&a.iter(b.line,c.line+1,function(b){ef(a,b)&&Tf(b,0)}),f.clearOnEnter&&rg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(u=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++Ce,f.atomic=!0),i){if(j&&(i.curOp.updateMaxLine=!0),f.collapsed)Pc(i,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle)for(var k=b.line;k<=c.line;k++)Qc(i,k,"text");f.atomic&&Kb(i.doc),vg(i,"markerAdded",i,f)}return f}function Fe(a,b,c,d,e){d=Qg(d),d.shared=!1;var f=[De(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Of(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(De(a,wb(a,b),wb(a,c),d,e));for(var i=0;i=b:f.to>b);(e||(e=[])).push(new Je(g,f.from,i?null:f.to))}}return e}function Oe(a,b,c){if(a)for(var e,d=0;d=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;ll;++l)o.push(q);o.push(i)}return o}function Qe(a){for(var b=0;b0)){var k=[i,1],l=nb(j.from,h.from),m=nb(j.to,h.to);(0>l||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function Te(a){var b=a.markedSpans;if(b){for(var c=0;c=0&&0>=l||0>=k&&l>=0)&&(0>=k&&(nb(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(nb(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function af(a){for(var b;b=Ze(a);)a=b.find(-1,!0).line;return a}function bf(a){for(var b,c;b=$e(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function cf(a,b){var c=Qf(a,b),d=af(c);return c==d?b:Uf(d)}function df(a,b){if(b>a.lastLine())return b;var d,c=Qf(a,b);if(!ef(a,c))return b;for(;d=$e(c);)c=d.find(1,!0).line;return Uf(c)+1}function ef(a,b){var c=v&&b.markedSpans;if(c)for(var d,e=0;ee;e++){d&&(d[0]=w.innerMode(a,c).mode);var f=a.token(b,c);if(b.pos>b.start)return f}throw new Error("Mode "+a.name+" failed to advance stream.")}function rf(a,b,c,d){function e(a){return{start:k.start,end:k.pos,string:k.current(),type:h||null,state:a?re(f.mode,j):j}}var h,f=a.doc,g=f.mode;b=wb(f,b);var l,i=Qf(f,b.line),j=Wb(a,b.line,c),k=new Ae(i.text,a.options.tabSize);for(d&&(l=[]);(d||k.posa.options.maxHighlightLength?(h=!1,g&&vf(a,b,d,k.pos),k.pos=b.length,l=null):l=of(qf(c,k,d,m),f),m){var n=m[0].name;n&&(l="m-"+(l?n+" "+l:n))}h&&j==l||(ij;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;i>c;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function uf(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=tf(a,b,b.stateAfter=Wb(a,Uf(b)));b.styles=d.styles,d.classes?b.styleClasses=d.classes:b.styleClasses&&(b.styleClasses=null),c===a.doc.frontier&&a.doc.frontier++}return b.styles}function vf(a,b,c,d){var e=a.doc.mode,f=new Ae(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&pf(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)qf(e,f,c),f.start=f.pos}function yf(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?xf:wf;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function zf(a,b){var c=Yg("span",null,null,f?"padding-right: .1px":null),e={pre:Yg("pre",[c]),content:c,col:0,pos:0,cm:a};b.measure={};for(var g=0;g<=(b.rest?b.rest.length:0);g++){var i,h=g?b.rest[g-1]:b.line;e.pos=0,e.addToken=Bf,(d||f)&&a.getOption("lineWrapping")&&(e.addToken=Cf(e.addToken)),qh(a.display.measure)&&(i=Xf(h))&&(e.addToken=Df(e.addToken,i)),e.map=[];var j=b!=a.display.externalMeasured&&Uf(h);Ff(h,e,uf(a,h,j)),h.styleClasses&&(h.styleClasses.bgClass&&(e.bgClass=fh(h.styleClasses.bgClass,e.bgClass||"")),h.styleClasses.textClass&&(e.textClass=fh(h.styleClasses.textClass,e.textClass||""))),0==e.map.length&&e.map.push(0,0,e.content.appendChild(oh(a.display.measure))),0==g?(b.measure.map=e.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(e.map),(b.measure.caches||(b.measure.caches=[])).push({}))}return f&&/\bcm-tab\b/.test(e.content.lastChild.className)&&(e.content.className="cm-tab-wrap-hack"),tg(a,"renderLine",a,b.line,e.pre),e.pre.className&&(e.textClass=fh(e.pre.className,e.textClass||"")),e}function Af(a){var b=Yg("span","\u2022","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b}function Bf(a,b,c,f,g,h){if(b){var i=a.cm.options.specialChars,j=!1;if(i.test(b))for(var k=document.createDocumentFragment(),l=0;;){i.lastIndex=l;var m=i.exec(b),n=m?m.index-l:b.length-l;if(n){var o=document.createTextNode(b.slice(l,l+n));d&&9>e?k.appendChild(Yg("span",[o])):k.appendChild(o),a.map.push(a.pos,a.pos+n,o),a.col+=n,a.pos+=n}if(!m)break;if(l+=n+1," "==m[0]){var p=a.cm.options.tabSize,q=p-a.col%p,o=k.appendChild(Yg("span",Kg(q),"cm-tab"));a.col+=q}else{var o=a.cm.options.specialCharPlaceholder(m[0]);d&&9>e?k.appendChild(Yg("span",[o])):k.appendChild(o),a.col+=1}a.map.push(a.pos,a.pos+1,o),a.pos++}else{a.col+=b.length;var k=document.createTextNode(b);a.map.push(a.pos,a.pos+b.length,k),d&&9>e&&(j=!0),a.pos+=b.length}if(c||f||g||j){var r=c||"";f&&(r+=f),g&&(r+=g);var s=Yg("span",[k],r);return h&&(s.title=h),a.content.appendChild(s)}a.content.appendChild(k)}}function Cf(a){function b(a){for(var b=" ",c=0;ci&&l.from<=i)break}if(l.to>=j)return a(c,d,e,f,g,h);a(c,d.slice(0,l.to-i),e,f,null,h),f=null,d=d.slice(l.to-i),i=l.to}}}function Ef(a,b,c,d){var e=!d&&c.widgetNode;e&&(a.map.push(a.pos,a.pos+b,e),a.content.appendChild(e)),a.pos+=b}function Ff(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var k,m,n,o,p,q,h=e.length,i=0,g=1,j="",l=0;;){if(l==i){m=n=o=p="",q=null,l=1/0;for(var r=[],s=0;si)?(null!=t.to&&l>t.to&&(l=t.to,n=""),u.className&&(m+=" "+u.className),u.startStyle&&t.from==i&&(o+=" "+u.startStyle),u.endStyle&&t.to==l&&(n+=" "+u.endStyle),u.title&&!p&&(p=u.title),u.collapsed&&(!q||Xe(q.marker,u)<0)&&(q=t)):t.from>i&&l>t.from&&(l=t.from),"bookmark"==u.type&&t.from==i&&u.widgetNode&&r.push(u)}if(q&&(q.from||0)==i&&(Ef(b,(null==q.to?h+1:q.to)-i,q.marker,null==q.from),null==q.to))return;if(!q&&r.length)for(var s=0;s=h)break;for(var v=Math.min(h,l);;){if(j){var w=i+j.length;if(!q){var x=w>v?j.slice(0,v-i):j;b.addToken(b,x,k?k+m:m,o,i+x.length==l?n:"",p)}if(w>=v){j=j.slice(v-i),i=v;break}i=w,o=""}j=e.slice(f,f=c[g++]),k=yf(c[g++],b.cm.options)}}else for(var g=1;g1&&a.remove(g.line+1,n-1),a.insert(g.line+1,p)}vg(a,"change",a,b)}function If(a){this.lines=a,this.parent=null;for(var b=0,c=0;bb||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(f>b){c=e;break}b-=f}return c.lines[b]}function Rf(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function Sf(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function Tf(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function Uf(a){if(null==a.parent)return null;for(var b=a.parent,c=Ng(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function Vf(a,b){var c=a.first;a:do{for(var d=0;db){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;db)break;b-=h}return c+d}function Wf(a){a=af(a);for(var b=0,c=a.parent,d=0;d1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Lg(a.done)):void 0}function ag(a,b,c,d){var e=a.history;e.undone.length=0;var g,f=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>f-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(g=_f(e,e.lastOp==d))){var h=Lg(g.changes);0==nb(b.from,b.to)&&0==nb(b.from,h.to)?h.to=Ld(b):g.changes.push(Zf(a,b))}else{var i=Lg(e.done);for(i&&i.ranges||dg(a.sel,e.done),g={changes:[Zf(a,b)],generation:e.generation},e.done.push(g);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=f,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||tg(a,"historyAdded")}function bg(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function cg(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||bg(a,f,Lg(e.done),b))?e.done[e.done.length-1]=b:dg(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&$f(e.undone)}function dg(a,b){var c=Lg(b);c&&c.ranges&&c.equals(a)||b.push(a)}function eg(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function fg(a){if(!a)return null;for(var c,b=0;b-1&&(Lg(h)[l]=j[l],delete j[l])}}}return e}function ig(a,b,c,d){c0}function Ag(a){a.prototype.on=function(a,b){rg(this,a,b)},a.prototype.off=function(a,b){sg(this,a,b)}}function Gg(){this.id=null}function Ig(a,b,c){for(var d=0,e=0;;){var f=a.indexOf(" ",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Kg(a){for(;Jg.length<=a;)Jg.push(Lg(Jg)+" ");return Jg[a]}function Lg(a){return a[a.length-1]}function Ng(a,b){for(var c=0;c-1&&Tg(a)?!0:b.test(a):Tg(a)}function Vg(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Xg(a){return a.charCodeAt(0)>=768&&Wg.test(a)}function Yg(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function _g(a,b){return $g(a).appendChild(b)}function ah(a,b){if(a.contains)return a.contains(b);for(;b=b.parentNode;)if(b==a)return!0}function bh(){return document.activeElement}function ch(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function fh(a,b){for(var c=a.split(" "),d=0;d2&&!(d&&8>e))}return nh?Yg("span","\u200b"):Yg("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px")}function qh(a){if(null!=ph)return ph;var b=_g(a,document.createTextNode("A\u062eA")),c=Zg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Zg(b,1,2).getBoundingClientRect();return ph=d.right-c.right<3}function vh(a){if(null!=uh)return uh;var b=_g(a,Yg("span","x")),c=b.getBoundingClientRect(),d=Zg(b,0,1).getBoundingClientRect();return uh=Math.abs(c.left-d.left)>1}function xh(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function yh(a){return a.level%2?a.to:a.from}function zh(a){return a.level%2?a.from:a.to}function Ah(a){var b=Xf(a);return b?yh(b[0]):0}function Bh(a){var b=Xf(a);return b?zh(Lg(b)):a.text.length}function Ch(a,b){var c=Qf(a.doc,b),d=af(c);d!=c&&(b=Uf(d));var e=Xf(d),f=e?e[0].level%2?Bh(d):Ah(d):0;return mb(b,f)}function Dh(a,b){for(var c,d=Qf(a.doc,b);c=$e(d);)d=c.find(1,!0).line,b=null;var e=Xf(d),f=e?e[0].level%2?Ah(d):Bh(d):d.text.length;return mb(null==b?Uf(d):b,f)}function Eh(a,b){var c=Ch(a,b.line),d=Qf(a.doc,c.line),e=Xf(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return mb(c.line,g?0:f)}return c}function Fh(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function Hh(a,b){Gh=null;for(var d,c=0;cb)return c;if(e.from==b||e.to==b){if(null!=d)return Fh(a,e.level,a[d].level)?(e.from!=e.to&&(Gh=d),c):(e.from!=e.to&&(Gh=c),d);d=c}}return d}function Ih(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Xg(a.text.charAt(b)));return b}function Jh(a,b,c,d){var e=Xf(a);if(!e)return Kh(a,b,c,d);for(var f=Hh(e,b),g=e[f],h=Ih(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?Ih(a,g.to,-1,d):Ih(a,g.from,1,d)}}function Kh(a,b,c,d){var e=b+c;if(d)for(;e>0&&Xg(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var a=/gecko\/\d/i.test(navigator.userAgent),b=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),d=b||c,e=d&&(b?document.documentMode||6:c[1]),f=/WebKit\//.test(navigator.userAgent),g=f&&/Qt\/\d+\.\d+/.test(navigator.userAgent),h=/Chrome\//.test(navigator.userAgent),i=/Opera\//.test(navigator.userAgent),j=/Apple Computer/.test(navigator.vendor),k=/KHTML\//.test(navigator.userAgent),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),m=/PhantomJS/.test(navigator.userAgent),n=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),o=n||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),p=n||/Mac/.test(navigator.platform),q=/win/i.test(navigator.platform),r=i&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);r&&(r=Number(r[1])),r&&r>=15&&(i=!1,f=!0);var s=p&&(g||i&&(null==r||12.11>r)),t=a||d&&e>=9,u=!1,v=!1,mb=w.Pos=function(a,b){return this instanceof mb?(this.line=a,this.ch=b,void 0):new mb(a,b)},nb=w.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch};rb.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b=0&&nb(a,d.to())<=0)return c}return-1}},sb.prototype={from:function(){return qb(this.anchor,this.head)},to:function(){return pb(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var vc,hd,id,fc={left:0,right:0,top:0,bottom:0},yc=null,zc=0,Yc=null,od=0,td=0,ud=null;d?ud=-.53:a?ud=15:h?ud=-.7:j&&(ud=-1/3);var yd=new Gg,Cd=null,Ld=w.changeEnd=function(a){return a.text?mb(a.from.line+a.text.length-1,Lg(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};w.prototype={constructor:w,focus:function(){window.focus(),_c(this),Xc(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,je.hasOwnProperty(a)&&Kc(this,je[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](ze(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;cc&&(de(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&be(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;c>i;++i)de(this,i,a);var j=this.doc.sel.ranges;0==f.ch&&b.length==j.length&&j[d].from().ch>0&&Db(this.doc,d,new sb(f,j[d].to()),Dg)}}}),getTokenAt:function(a,b){return rf(this,a,b)},getLineTokens:function(a,b){return rf(this,mb(a),b,!0)},getTokenTypeAt:function(a){a=wb(this.doc,a);var f,b=uf(this,Qf(this.doc,a.line)),c=0,d=(b.length-1)/2,e=a.ch;if(0==e)f=b[2];else for(;;){var g=c+d>>1;if((g?b[2*g-1]:0)>=e)d=g;else{if(!(b[2*g+1]h?f:0==h?null:f.slice(0,h-1)},getModeAt:function(a){var b=this.doc.mode;return b.innerMode?w.innerMode(b,this.getTokenAt(a).state).mode:b},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!qe.hasOwnProperty(b))return qe;var d=qe[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;fd&&(a=d,c=!0);var e=Qf(this.doc,a);return nc(this,e,{top:0,left:0},b||"page").top+(c?this.doc.height-Wf(e):0)},defaultTextHeight:function(){return wc(this.display)},defaultCharWidth:function(){return xc(this.display)},setGutterMarker:Lc(function(a,b,c){return ee(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Vg(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Lc(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Qc(b,d,"gutter"),Vg(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),addLineWidget:Lc(function(a,b,c){return kf(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){if("number"==typeof a){if(!yb(this.doc,a))return null;var b=a;if(a=Qf(this.doc,a),!a)return null}else{var b=Uf(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=qc(this,wb(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);
-("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&$d(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Lc(Dd),triggerOnKeyPress:Lc(Gd),triggerOnKeyUp:Fd,execCommand:function(a){return te.hasOwnProperty(a)?te[a](this):void 0},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);for(var f=0,g=wb(this.doc,a);b>f&&(g=ge(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Lc(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?ge(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},Fg)}),deleteH:Lc(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):fe(this,function(c){var e=ge(d,c.head,a,b,!1);return 0>a?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=wb(this.doc,a);b>g;++g){var i=qc(this,h,"div");if(null==f?f=i.left:i.left=f,h=he(this,i,e,c),h.hitSide)break}return h},moveV:Lc(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return 0>a?g.from():g.to();var h=qc(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=he(c,h,a,b);return"page"==b&&g==d.sel.primary()&&ae(c,null,pc(c,i,"div").top-h.top),i},Fg),e.length)for(var g=0;g0&&h(c.charAt(d-1));)--d;for(;e.5)&&C(this),tg(this,"refresh",this)}),swapDoc:Lc(function(a){var b=this.doc;return b.cm=null,Pf(this,a),kc(this),$c(this),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,vg(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ag(w);var ie=w.defaults={},je=w.optionHandlers={},le=w.Init={toString:function(){return"CodeMirror.Init"}};ke("value","",function(a,b){a.setValue(b)},!0),ke("mode",null,function(a,b){a.doc.modeOption=b,y(a)},!0),ke("indentUnit",2,y,!0),ke("indentWithTabs",!1),ke("smartIndent",!0),ke("tabSize",4,function(a){z(a),kc(a),Pc(a)},!0),ke("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(a,b){a.options.specialChars=new RegExp(b.source+(b.test(" ")?"":"| "),"g"),a.refresh()},!0),ke("specialCharPlaceholder",Af,function(a){a.refresh()},!0),ke("electricChars",!0),ke("rtlMoveVisually",!q),ke("wholeLineUpdateBefore",!0),ke("theme","default",function(a){D(a),E(a)},!0),ke("keyMap","default",function(a,b,c){var d=ze(b),e=c!=w.Init&&ze(c);e&&e.detach&&e.detach(a,d),d.attach&&d.attach(a,e||null)}),ke("extraKeys",null),ke("lineWrapping",!1,A,!0),ke("gutters",[],function(a){J(a.options),E(a)},!0),ke("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?R(a.display)+"px":"0",a.refresh()},!0),ke("coverGutterNextToScrollbar",!1,M,!0),ke("lineNumbers",!1,function(a){J(a.options),E(a)},!0),ke("firstLineNumber",1,E,!0),ke("lineNumberFormatter",function(a){return a},E,!0),ke("showCursorWhenSelecting",!1,Pb,!0),ke("resetSelectionOnContextMenu",!0),ke("readOnly",!1,function(a,b){"nocursor"==b?(Id(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||$c(a))}),ke("disableInput",!1,function(a,b){b||$c(a)},!0),ke("dragDrop",!0),ke("cursorBlinkRate",530),ke("cursorScrollMargin",0),ke("cursorHeight",1,Pb,!0),ke("singleCursorHeightPerLine",!0,Pb,!0),ke("workTime",100),ke("workDelay",100),ke("flattenSpans",!0,z,!0),ke("addModeClass",!1,z,!0),ke("pollInterval",100),ke("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),ke("historyEventDelay",1250),ke("viewportMargin",10,function(a){a.refresh()},!0),ke("maxHighlightLength",1e4,z,!0),ke("moveInputWithCursor",!0,function(a,b){b||(a.display.inputDiv.style.top=a.display.inputDiv.style.left=0)}),ke("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),ke("autofocus",null);var me=w.modes={},ne=w.mimeModes={};w.defineMode=function(a,b){w.defaults.mode||"null"==a||(w.defaults.mode=a),arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),me[a]=b},w.defineMIME=function(a,b){ne[a]=b},w.resolveMode=function(a){if("string"==typeof a&&ne.hasOwnProperty(a))a=ne[a];else if(a&&"string"==typeof a.name&&ne.hasOwnProperty(a.name)){var b=ne[a.name];"string"==typeof b&&(b={name:b}),a=Pg(b,a),a.name=b.name}else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return w.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}},w.getMode=function(a,b){var b=w.resolveMode(b),c=me[b.name];if(!c)return w.getMode(a,"text/plain");var d=c(a,b);if(oe.hasOwnProperty(b.name)){var e=oe[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var f in b.modeProps)d[f]=b.modeProps[f];return d},w.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),w.defineMIME("text/plain","null");var oe=w.modeExtensions={};w.extendMode=function(a,b){var c=oe.hasOwnProperty(a)?oe[a]:oe[a]={};Qg(b,c)},w.defineExtension=function(a,b){w.prototype[a]=b},w.defineDocExtension=function(a,b){Lf.prototype[a]=b},w.defineOption=ke;var pe=[];w.defineInitHook=function(a){pe.push(a)};var qe=w.helpers={};w.registerHelper=function(a,b,c){qe.hasOwnProperty(a)||(qe[a]=w[a]={_global:[]}),qe[a][b]=c},w.registerGlobalHelper=function(a,b,c,d){w.registerHelper(a,b,d),qe[a]._global.push({pred:c,val:d})};var re=w.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},se=w.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};w.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var te=w.commands={selectAll:function(a){a.setSelection(mb(a.firstLine(),0),mb(a.lastLine()),Dg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Dg)},killLine:function(a){fe(a,function(b){if(b.empty()){var c=Qf(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line0)e=new mb(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),mb(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Qf(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),mb(e.line-1,g.length-1),mb(e.line,1),"+transpose")}c.push(new sb(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Jc(a,function(){for(var b=a.listSelections().length,c=0;b>c;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0),be(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},ue=w.keyMap={};ue.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ue.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ue.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ue.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ue["default"]=p?ue.macDefault:ue.pcDefault,w.normalizeKeyMap=function(a){var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(/^(name|fallthrough|(de|at)tach)$/.test(c))continue;if("..."==d){delete a[c];continue}for(var e=Og(c.split(" "),ve),f=0;f=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(f&&b!==!1&&(this.pos+=f[0].length),f)}var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);return d(e)==d(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var Be=w.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a};Ag(Be),Be.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&Ac(a),zg(this,"clear")){var c=this.find();c&&vg(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;fa.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Pc(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Kb(a.doc)),a&&vg(a,"markerCleared",a,this),b&&Cc(a),this.parent&&this.parent.clear()}},Be.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;ec;++c){var e=this.lines[c];this.height-=e.height,nf(e),vg(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;da;++a)if(c(this.lines[a]))return!0}},Jf.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;ca){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof If))){var h=[];this.collapse(h),this.children=[new If(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b=a){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new If(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Jf(b);if(a.parent){a.size-=c.size,a.height-=c.height;var e=Ng(a.parent.children,a);a.parent.children.splice(e+1,0,c)}else{var d=new Jf(a.children);d.parent=a,a.children=[d,c],a=d}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;da){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var Kf=0,Lf=w.Doc=function(a,b,c){if(!(this instanceof Lf))return new Lf(a,b,c);null==c&&(c=0),Jf.call(this,[new If([new lf("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var d=mb(c,0);this.sel=ub(d),this.history=new Yf(null),this.id=++Kf,this.modeOption=b,"string"==typeof a&&(a=rh(a)),Hf(this,{from:d,to:d,text:a}),Hb(this,ub(d),Dg)};Lf.prototype=Pg(Jf.prototype,{constructor:Lf,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d=0;f--)Rd(this,d[f]);h?Gb(this,h):this.cm&&be(this.cm)}),undo:Mc(function(){Td(this,"undo")}),redo:Mc(function(){Td(this,"redo")}),undoSelection:Mc(function(){Td(this,"undo",!0)}),redoSelection:Mc(function(){Td(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=wb(this,a),b=wb(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;hi.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da?(b=a,!0):(a-=e,++c,void 0)}),wb(this,mb(c,b))},indexFromPos:function(a){a=wb(this,a);var b=a.ch;return a.lineb&&(b=a.from),null!=a.to&&a.toh||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Jg=[""],Mg=function(a){a.select()};n?Mg=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:d&&(Mg=function(a){try{a.select()}catch(b){}}),[].indexOf&&(Ng=function(a,b){return a.indexOf(b)}),[].map&&(Og=function(a,b){return a.map(b)});var Zg,Sg=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Tg=w.isWordChar=function(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Sg.test(a))},Wg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Zg=document.createRange?function(a,b,c){var d=document.createRange();return d.setEnd(a,c),d.setStart(a,b),d}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d},d&&11>e&&(bh=function(){try{return document.activeElement}catch(a){return document.body}});var lh,nh,ph,dh=w.rmClass=function(a,b){var c=a.className,d=ch(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},eh=w.addClass=function(a,b){var c=a.className;ch(b).test(c)||(a.className+=(c?" ":"")+b)},hh=!1,kh=function(){if(d&&9>e)return!1;var a=Yg("div");return"draggable"in a||"dragDrop"in a}(),rh=w.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},sh=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},th=function(){var a=Yg("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),uh=null,wh={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};w.keyNames=wh,function(){for(var a=0;10>a;a++)wh[a+48]=wh[a+96]=String(a);for(var a=65;90>=a;a++)wh[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)wh[a+111]=wh[a+63235]="F"+a}();var Gh,Lh=function(){function c(c){return 247>=c?a.charAt(c):c>=1424&&1524>=c?"R":c>=1536&&1773>=c?b.charAt(c-1536):c>=1774&&2220>=c?"r":c>=8192&&8203>=c?"w":8204==c?"b":"L"}function j(a,b,c){this.level=a,this.from=b,this.to=c}var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",b="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/,i="L";return function(a){if(!d.test(a))return!1;for(var m,b=a.length,k=[],l=0;b>l;++l)k.push(m=c(a.charCodeAt(l)));for(var l=0,n=i;b>l;++l){var m=k[l];"m"==m?k[l]=n:n=m}for(var l=0,o=i;b>l;++l){var m=k[l];"1"==m&&"r"==o?k[l]="n":f.test(m)&&(o=m,"r"==m&&(k[l]="R"))}for(var l=1,n=k[0];b-1>l;++l){var m=k[l];"+"==m&&"1"==n&&"1"==k[l+1]?k[l]="1":","!=m||n!=k[l+1]||"1"!=n&&"n"!=n||(k[l]=n),n=m}for(var l=0;b>l;++l){var m=k[l];if(","==m)k[l]="N";else if("%"==m){for(var p=l+1;b>p&&"%"==k[p];++p);for(var q=l&&"!"==k[l-1]||b>p&&"1"==k[p]?"1":"N",r=l;p>r;++r)k[r]=q;l=p-1}}for(var l=0,o=i;b>l;++l){var m=k[l];"L"==o&&"1"==m?k[l]="L":f.test(m)&&(o=m)}for(var l=0;b>l;++l)if(e.test(k[l])){for(var p=l+1;b>p&&e.test(k[p]);++p);for(var s="L"==(l?k[l-1]:i),t="L"==(b>p?k[p]:i),q=s||t?"L":"R",r=l;p>r;++r)k[r]=q;l=p-1}for(var v,u=[],l=0;b>l;)if(g.test(k[l])){var w=l;for(++l;b>l&&g.test(k[l]);++l);u.push(new j(0,w,l))}else{var x=l,y=u.length;for(++l;b>l&&"L"!=k[l];++l);for(var r=x;l>r;)if(h.test(k[r])){r>x&&u.splice(y,0,new j(1,x,r));var z=r;for(++r;l>r&&h.test(k[r]);++r);u.splice(y,0,new j(2,z,r)),x=r}else++r;l>x&&u.splice(y,0,new j(1,x,l))}return 1==u[0].level&&(v=a.match(/^\s+/))&&(u[0].from=v[0].length,u.unshift(new j(0,0,v[0].length))),1==Lg(u).level&&(v=a.match(/\s+$/))&&(Lg(u).to-=v[0].length,u.push(new j(0,b-v[0].length,b))),u[0].level!=Lg(u).level&&u.push(new j(u[0].level,b,b)),u}}();return w.version="4.8.0",w}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("javascript",function(b,c){function m(a){for(var c,b=!1,d=!1;null!=(c=a.next());){if(!b){if("/"==c&&!d)return;"["==c?d=!0:d&&"]"==c&&(d=!1)}b=!b&&"\\"==c}}function p(a,b,c){return n=a,o=c,b}function q(a,b){var c=a.next();if('"'==c||"'"==c)return b.tokenize=r(c),b.tokenize(a,b);if("."==c&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==c&&a.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(c))return p(c);if("="==c&&a.eat(">"))return p("=>","operator");if("0"==c&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),p("number","number");if(/\d/.test(c))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),p("number","number");if("/"==c)return a.eat("*")?(b.tokenize=s,s(a,b)):a.eat("/")?(a.skipToEnd(),p("comment","comment")):"operator"==b.lastType||"keyword c"==b.lastType||"sof"==b.lastType||/^[\[{}\(,;:]$/.test(b.lastType)?(m(a),a.eatWhile(/[gimy]/),p("regexp","string-2")):(a.eatWhile(k),p("operator","operator",a.current()));if("`"==c)return b.tokenize=t,t(a,b);if("#"==c)return a.skipToEnd(),p("error","error");if(k.test(c))return a.eatWhile(k),p("operator","operator",a.current());if(i.test(c)){a.eatWhile(i);var d=a.current(),e=j.propertyIsEnumerable(d)&&j[d];return e&&"."!=b.lastType?p(e.type,e.style,d):p("variable","variable",d)}}function r(a){return function(b,c){var e,d=!1;if(f&&"@"==b.peek()&&b.match(l))return c.tokenize=q,p("jsonld-keyword","meta");for(;null!=(e=b.next())&&(e!=a||d);)d=!d&&"\\"==e;return d||(c.tokenize=q),p("string","string")}}function s(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=q;break}c="*"==d}return p("comment","comment")}function t(a,b){for(var d,c=!1;null!=(d=a.next());){if(!c&&("`"==d||"$"==d&&a.eat("{"))){b.tokenize=q;break}c=!c&&"\\"==d}return p("quasi","string-2",a.current())}function v(a,b){b.fatArrowAt&&(b.fatArrowAt=null);var c=a.string.indexOf("=>",a.start);if(!(0>c)){for(var d=0,e=!1,f=c-1;f>=0;--f){var g=a.string.charAt(f),h=u.indexOf(g);if(h>=0&&3>h){if(!d){++f;break}if(0==--d)break}else if(h>=3&&6>h)++d;else if(i.test(g))e=!0;else if(e&&!d){++f;break}}e&&!d&&(b.fatArrowAt=f)}}function x(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function y(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0;for(var d=a.context;d;d=d.prev)for(var c=d.vars;c;c=c.next)if(c.name==b)return!0}function z(a,b,c,d,e){var f=a.cc;for(A.state=a,A.stream=e,A.marked=null,A.cc=f,A.style=b,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var h=f.length?f.pop():g?L:K;if(h(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return A.marked?A.marked:"variable"==c&&y(a,d)?"variable-2":b}}}function B(){for(var a=arguments.length-1;a>=0;a--)A.cc.push(arguments[a])}function C(){return B.apply(null,arguments),!0}function D(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var d=A.state;if(d.context){if(A.marked="def",b(d.localVars))return;d.localVars={name:a,next:d.localVars}}else{if(b(d.globalVars))return;c.globalVars&&(d.globalVars={name:a,next:d.globalVars})}}function F(){A.state.context={prev:A.state.context,vars:A.state.localVars},A.state.localVars=E}function G(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function H(a,b){var c=function(){var c=A.state,d=c.indented;if("stat"==c.lexical.type)d=c.lexical.indented;else for(var e=c.lexical;e&&")"==e.type&&e.align;e=e.prev)d=e.indented;c.lexical=new x(d,A.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function I(){var a=A.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function J(a){function b(c){return c==a?C():";"==a?B():C(b)}return b}function K(a,b){return"var"==a?C(H("vardef",b.length),eb,J(";"),I):"keyword a"==a?C(H("form"),L,K,I):"keyword b"==a?C(H("form"),K,I):"{"==a?C(H("}"),bb,I):";"==a?C():"if"==a?("else"==A.state.lexical.info&&A.state.cc[A.state.cc.length-1]==I&&A.state.cc.pop()(),C(H("form"),L,K,I,jb)):"function"==a?C(pb):"for"==a?C(H("form"),kb,K,I):"variable"==a?C(H("stat"),W):"switch"==a?C(H("form"),L,H("}","switch"),J("{"),bb,I,I):"case"==a?C(L,J(":")):"default"==a?C(J(":")):"catch"==a?C(H("form"),F,J("("),qb,J(")"),K,I,G):"module"==a?C(H("form"),F,vb,G,I):"class"==a?C(H("form"),rb,I):"export"==a?C(H("form"),wb,I):"import"==a?C(H("form"),xb,I):B(H("stat"),L,J(";"),I)}function L(a){return N(a,!1)}function M(a){return N(a,!0)}function N(a,b){if(A.state.fatArrowAt==A.stream.start){var c=b?V:U;if("("==a)return C(F,H(")"),_(fb,")"),I,J("=>"),c,G);if("variable"==a)return B(F,fb,J("=>"),c,G)}var d=b?R:Q;return w.hasOwnProperty(a)?C(d):"function"==a?C(pb,d):"keyword c"==a?C(b?P:O):"("==a?C(H(")"),O,Cb,J(")"),I,d):"operator"==a||"spread"==a?C(b?M:L):"["==a?C(H("]"),Ab,I,d):"{"==a?ab(Y,"}",null,d):"quasi"==a?B(S,d):C()}function O(a){return a.match(/[;\}\)\],]/)?B():B(L)}function P(a){return a.match(/[;\}\)\],]/)?B():B(M)}function Q(a,b){return","==a?C(L):R(a,b,!1)}function R(a,b,c){var d=0==c?Q:R,e=0==c?L:M;return"=>"==a?C(F,c?V:U,G):"operator"==a?/\+\+|--/.test(b)?C(d):"?"==b?C(L,J(":"),e):C(e):"quasi"==a?B(S,d):";"!=a?"("==a?ab(M,")","call",d):"."==a?C(X,d):"["==a?C(H("]"),O,J("]"),I,d):void 0:void 0}function S(a,b){return"quasi"!=a?B():"${"!=b.slice(b.length-2)?C(S):C(L,T)}function T(a){return"}"==a?(A.marked="string-2",A.state.tokenize=t,C(S)):void 0}function U(a){return v(A.stream,A.state),B("{"==a?K:L)}function V(a){return v(A.stream,A.state),B("{"==a?K:M)}function W(a){return":"==a?C(I,K):B(Q,J(";"),I)}function X(a){return"variable"==a?(A.marked="property",C()):void 0}function Y(a,b){return"variable"==a||"keyword"==A.style?(A.marked="property","get"==b||"set"==b?C(Z):C($)):"number"==a||"string"==a?(A.marked=f?"property":A.style+" property",C($)):"jsonld-keyword"==a?C($):"["==a?C(L,J("]"),$):void 0}function Z(a){return"variable"!=a?B($):(A.marked="property",C(pb))}function $(a){return":"==a?C(M):"("==a?B(pb):void 0}function _(a,b){function c(d){if(","==d){var e=A.state.lexical;return"call"==e.info&&(e.pos=(e.pos||0)+1),C(a,c)}return d==b?C():C(J(b))}return function(d){return d==b?C():B(a,c)}}function ab(a,b,c){for(var d=3;d!?|~^]/,l=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,u="([{}])",w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},A={state:null,column:null,marked:null,cc:null},E={name:"this",next:{name:"arguments"}};return I.lex=!0,{startState:function(a){var b={tokenize:q,lastType:"sof",cc:[],lexical:new x((a||0)-d,0,"block",!1),localVars:c.localVars,context:c.localVars&&{vars:c.localVars},indented:0};return c.globalVars&&"object"==typeof c.globalVars&&(b.globalVars=c.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),v(a,b)),b.tokenize!=s&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==n?c:(b.lastType="operator"!=n||"++"!=o&&"--"!=o?n:"incdec",z(b,c,n,o,a))},indent:function(b,f){if(b.tokenize==s)return a.Pass;if(b.tokenize!=q)return 0;var g=f&&f.charAt(0),h=b.lexical;if(!/^\s*else\b/.test(f))for(var i=b.cc.length-1;i>=0;--i){var j=b.cc[i];if(j==I)h=h.prev;else if(j!=jb)break}"stat"==h.type&&"}"==g&&(h=h.prev),e&&")"==h.type&&"stat"==h.prev.type&&(h=h.prev);var k=h.type,l=g==k;return"vardef"==k?h.indented+("operator"==b.lastType||","==b.lastType?h.info+1:0):"form"==k&&"{"==g?h.indented:"form"==k?h.indented+d:"stat"==k?h.indented+("operator"==b.lastType||","==b.lastType?e||d:0):"switch"!=h.info||l||0==c.doubleIndentSwitch?h.align?h.column+(l?0:1):h.indented+(l?0:d):h.indented+(/^(?:case|default)\b/.test(f)?d:2*d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:g?null:"/*",blockCommentEnd:g?null:"*/",lineComment:g?null:"//",fold:"brace",helperType:g?"json":"javascript",jsonldMode:f,jsonMode:g}}),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("xml",function(b,c){function k(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d)return a.eat("!")?a.eat("[")?a.match("CDATA[")?c(n("atom","]]>")):null:a.match("--")?c(n("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(o(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=n("meta","?>"),"meta"):(i=a.eat("/")?"closeTag":"openTag",b.tokenize=l,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function l(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=k,i=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return i="equals",null;if("<"==c){b.tokenize=k,b.state=s,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=m(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=l;break}return"string"};return b.isInAttribute=!0,b}function n(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=k;break}c.next()}return a}}function o(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=o(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=k;break}return c.tokenize=o(a-1),c.tokenize(b,c)}}return"meta"}}function p(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(g.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function q(a){a.context&&(a.context=a.context.prev)}function r(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!g.contextGrabbers.hasOwnProperty(c)||!g.contextGrabbers[c].hasOwnProperty(b))return;q(a)}}function s(a,b,c){return"openTag"==a?(c.tagStart=b.column(),t):"closeTag"==a?u:s}function t(a,b,c){return"word"==a?(c.tagName=b.current(),j="tag",x):(j="error",t)}function u(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&g.implicitlyClosed.hasOwnProperty(c.context.tagName)&&q(c),c.context&&c.context.tagName==d?(j="tag",v):(j="tag error",w)}return j="error",w}function v(a,b,c){return"endTag"!=a?(j="error",v):(q(c),s)}function w(a,b,c){return j="error",v(a,b,c)}function x(a,b,c){if("word"==a)return j="attribute",y;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||g.autoSelfClosers.hasOwnProperty(d)?r(c,d):(r(c,d),c.context=new p(c,d,e==c.indented)),s}return j="error",x}function y(a,b,c){return"equals"==a?z:(g.allowMissing||(j="error"),x(a,b,c))}function z(a,b,c){return"string"==a?A:"word"==a&&g.allowUnquoted?(j="string",x):(j="error",x(a,b,c))}function A(a,b,c){return"string"==a?A:x(a,b,c)}var d=b.indentUnit,e=c.multilineTagIndentFactor||1,f=c.multilineTagIndentPastTag;null==f&&(f=!0);var i,j,g=c.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},h=c.alignCDATA;return{startState:function(){return{tokenize:k,state:s,indented:0,tagName:null,tagStart:null,context:null}},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;i=null;var c=b.tokenize(a,b);return(c||i)&&"comment"!=c&&(j=null,b.state=b.state(i||c,a,b),j&&(c="error"==j?c+" error":j)),c},indent:function(b,c,i){var j=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+d;if(j&&j.noIndent)return a.Pass;if(b.tokenize!=l&&b.tokenize!=k)return i?i.match(/^(\s*)/)[0].length:0;if(b.tagName)return f?b.tagStart+b.tagName.length+2:b.tagStart+d*e;if(h&&/$/,blockCommentStart:"",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml"}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("fold","brace",function(b,c){function h(f){for(var h=c.ch,i=0;;){var j=0>=h?-1:e.lastIndexOf(f,h-1);if(-1!=j){if(1==i&&j=o;++o)for(var p=b.getLine(o),q=o==d?f:0;;){var r=p.indexOf(i,q),s=p.indexOf(j,q);if(0>r&&(r=p.length),0>s&&(s=p.length),q=Math.min(r,s),q==p.length)break;if(b.getTokenTypeAt(a.Pos(o,q+1))==g)if(q==r)++k;else if(!--k){m=o,n=q;break a}++q}if(null!=m&&(d!=m||n!=f))return{from:a.Pos(d,f),to:a.Pos(m,n)}}}),a.registerHelper("fold","import",function(b,c){function d(c){if(cb.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));if(/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"keyword"!=d.type||"import"!=d.string)return null;for(var e=c,f=Math.min(b.lastLine(),c+10);f>=e;++e){var g=b.getLine(e),h=g.indexOf(";");if(-1!=h)return{startCh:d.end,end:a.Pos(e,h)}}}var f,c=c.line,e=d(c);if(!e||d(c-1)||(f=d(c-2))&&f.end.line==c-1)return null;for(var g=e.end;;){var h=d(g.line+1);if(null==h)break;g=h.end}return{from:b.clipPos(a.Pos(c,e.startCh+1)),to:g}}),a.registerHelper("fold","include",function(b,c){function d(c){if(cb.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));return/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"meta"==d.type&&"#include"==d.string.slice(0,8)?d.start+8:void 0}var c=c.line,e=d(c);if(null==e||null!=d(c-1))return null;for(var f=c;;){var g=d(f+1);if(null==g)break;++f}return{from:a.Pos(c,e+1),to:b.clipPos(a.Pos(f))}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerGlobalHelper("fold","comment",function(a){return a.blockCommentStart&&a.blockCommentEnd},function(b,c){var d=b.getModeAt(c),e=d.blockCommentStart,f=d.blockCommentEnd;if(e&&f){for(var i,g=c.line,h=b.getLine(g),j=c.ch,k=0;;){var l=0>=j?-1:h.lastIndexOf(e,j-1);if(-1!=l){if(1==k&&l=q;++q)for(var r=b.getLine(q),s=q==g?i:0;;){var t=r.indexOf(e,s),u=r.indexOf(f,s);if(0>t&&(t=r.length),0>u&&(u=r.length),s=Math.min(t,u),s==r.length)break;if(s==t)++m;else if(!--m){o=q,p=s;break a}++s}if(null!=o&&(g!=o||p!=i))return{from:a.Pos(g,i),to:a.Pos(o,p)}}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,d,f,g){function j(a){var c=h(b,d);if(!c||c.to.line-c.from.lineb.firstLine();)d=a.Pos(d.line-1,0),k=j(!1);if(k&&!k.cleared&&"unfold"!==g){var l=c(b,f);a.on(l,"mousedown",function(b){m.clear(),a.e_preventDefault(b)});var m=b.markText(k.from,k.to,{replacedWith:l,clearOnEnter:!0,__isFold:!0});m.on("clear",function(c,d){a.signal(b,"unfold",b,c,d)}),a.signal(b,"fold",b,k.from,k.to)}}function c(a,b){var c=e(a,b,"widget");if("string"==typeof c){var d=document.createTextNode(c);c=document.createElement("span"),c.appendChild(d),c.className="CodeMirror-foldmarker"}return c}function e(a,b,c){if(b&&void 0!==b[c])return b[c];var e=a.options.foldOptions;return e&&void 0!==e[c]?e[c]:d[c]}a.newFoldFunction=function(a,c){return function(d,e){b(d,e,{rangeFinder:a,widget:c})}},a.defineExtension("foldCode",function(a,c,d){b(this,a,c,d)}),a.defineExtension("isFolded",function(a){for(var b=this.findMarksAt(a),c=0;c=c;c++)b.foldCode(a.Pos(c,0),null,"fold")})},a.commands.unfoldAll=function(b){b.operation(function(){for(var c=b.firstLine(),d=b.lastLine();d>=c;c++)b.foldCode(a.Pos(c,0),null,"unfold")})},a.registerHelper("fold","combine",function(){var a=Array.prototype.slice.call(arguments,0);return function(b,c){for(var d=0;d20||b.from-c.to>20?h(a):a.operation(function(){c.fromb.to&&(g(a,b.to,c.to),b.to=c.to)})},c.updateViewportTimeSpan||400)}function l(a,b){var c=a.state.foldGutter,d=b.line;d>=c.from&&dk&&!(f(k+1,h,l)<=i);)++k,h=l,l=b.getLine(k+2);return{from:a.Pos(c.line,g.length),to:a.Pos(k,b.getLine(k).length)}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function e(a,b,e,g){var h=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&d[h.text.charAt(i)]||d[h.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(e&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(c(b.line,i+1)),m=f(a,c(b.line,i+(k>0?1:0)),k,l||null,g);return null==m?null:{from:c(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function f(a,b,e,f,g){for(var h=g&&g.maxScanLineLength||1e4,i=g&&g.maxScanLines||1e3,j=[],k=g&&g.bracketRegex?g.bracketRegex:/[(){}[\]]/,l=e>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=e){var n=a.getLine(m);if(n){var o=e>0?0:n.length-1,p=e>0?n.length:-1;if(!(n.length>h))for(m==b.line&&(o=b.ch-(0>e?1:0));o!=p;o+=e){var q=n.charAt(o);if(k.test(q)&&(void 0===f||a.getTokenTypeAt(c(m,o+1))==f)){var r=d[q];if(">"==r.charAt(1)==e>0)j.push(q);else{if(!j.length)return{pos:c(m,o),ch:q};j.pop()}}}}}return m-e==(e>0?a.lastLine():a.firstLine())?!1:null}function g(a,d,f){for(var g=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},h=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",i),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",i))}),a.defineExtension("matchBrackets",function(){g(this,!0)}),a.defineExtension("findMatchingBracket",function(a,b,c){return e(this,a,b,c)}),a.defineExtension("scanForBracket",function(a,b,c,d){return f(this,a,b,c,d)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function d(a,b){this.cm=a,this.options=this.buildOptions(b),this.widget=this.onClose=null}function e(a){return"string"==typeof a?a:a.text}function f(a,b){function f(a,d){var f;f="string"!=typeof d?function(a){return d(a,b)}:c.hasOwnProperty(d)?c[d]:d,e[a]=f}var c={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},d=a.options.customKeys,e=d?{}:c;if(d)for(var g in d)d.hasOwnProperty(g)&&f(g,d[g]);var h=a.options.extraKeys;if(h)for(var g in h)h.hasOwnProperty(g)&&f(g,h[g]);return e}function g(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function h(d,h){this.completion=d,this.data=h;var i=this,j=d.cm,k=this.hints=document.createElement("ul");k.className="CodeMirror-hints",this.selectedHint=h.selectedHint||0;for(var l=h.list,m=0;m0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();h.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.left-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=f(d,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){d.close()},pick:function(){i.pick()},data:h})),d.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){d.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),b=j.getWrapperElement().getBoundingClientRect(),c=s+D.top-a.top,e=c-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=b.top||e>=b.bottom?d.close():(k.style.top=c+"px",k.style.left=r+D.left-a.left+"px",void 0)}),a.on(k,"dblclick",function(a){var b=g(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var b=g(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),d.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(h,"select",l[0],k.firstChild),!0}var b="CodeMirror-hint",c="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(b){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var c=this.state.completionActive=new d(this,b),e=c.options.hint;if(e)return a.signal(this,"startCompletion",this),e.async?(e(this,function(a){c.showHints(a)},c.options),void 0):c.showHints(e(this,c.options))}}),d.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.widget&&this.widget.close(),this.onClose&&this.onClose(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,c){var d=b.list[c];d.hint?d.hint(this.cm,b,d):this.cm.replaceRange(e(d),d.from||b.from,d.to||b.to,"complete"),a.signal(b,"pick",d),this.close()},showHints:function(a){return a&&a.list.length&&this.active()?(this.options.completeSingle&&1==a.list.length?this.pick(a,0):this.showWidget(a),void 0):this.close()},showWidget:function(b){function l(){e||(e=!0,d.close(),d.cm.off("cursorActivity",p),b&&a.signal(b,"close"))}function m(){if(!e){a.signal(b,"update");var c=d.options.hint;c.async?c(d.cm,n,d.options):n(c(d.cm,d.options))}}function n(a){if(b=a,!e){if(!b||!b.list.length)return l();d.widget&&d.widget.close(),d.widget=new h(d,b)}}function o(){c&&(k(c),c=0)}function p(){o();var a=d.cm.getCursor(),b=d.cm.getLine(a.line);a.line!=g.line||b.length-a.ch!=i-g.ch||a.ch=this.data.list.length?b=d?this.data.list.length-1:0:0>b&&(b=d?0:this.data.list.length-1),this.selectedHint!=b){var e=this.hints.childNodes[this.selectedHint];e.className=e.className.replace(" "+c,""),e=this.hints.childNodes[this.selectedHint=b],e.className+=" "+c,e.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=e.offsetTop+e.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],e)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var e,d=b.getHelpers(b.getCursor(),"hint");if(d.length)for(var f=0;f,]/,closeOnUnfocus:!0,completeOnSingleClick:!1,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function c(a,b){return a.line-b.line||a.ch-b.ch}function g(a,b,c,d){this.line=b,this.ch=c,this.cm=a,this.text=a.getLine(b),this.min=d?d.from:a.firstLine(),this.max=d?d.to-1:a.lastLine()}function h(a,c){var d=a.cm.getTokenTypeAt(b(a.line,c));return d&&/\btag\b/.test(d)}function i(a){return a.line>=a.max?void 0:(a.ch=0,a.text=a.cm.getLine(++a.line),!0)}function j(a){return a.line<=a.min?void 0:(a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0)}function k(a){for(;;){var b=a.text.indexOf(">",a.ch);if(-1==b){if(i(a))continue;return}{if(h(a,b+1)){var c=a.text.lastIndexOf("/",b),d=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,d?"selfClose":"regular"}a.ch=b+1}}}function l(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(-1==b){if(j(a))continue;return}if(h(a,b+1)){f.lastIndex=b,a.ch=b;var c=f.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function m(a){for(;;){f.lastIndex=a.ch;var b=f.exec(a.text);if(!b){if(i(a))continue;return}{if(h(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function n(a){for(;;){var b=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(-1==b){if(j(a))continue;return}{if(h(a,b+1)){var c=a.text.lastIndexOf("/",b),d=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,d?"selfClose":"regular"}a.ch=b}}}function o(a,c){for(var d=[];;){var f,e=m(a),g=a.line,h=a.ch-(e?e[0].length:0);if(!e||!(f=k(a)))return;if("selfClose"!=f)if(e[1]){for(var i=d.length-1;i>=0;--i)if(d[i]==e[2]){d.length=i;break}if(0>i&&(!c||c==e[2]))return{tag:e[2],from:b(g,h),to:b(a.line,a.ch)}}else d.push(e[2])}}function p(a,c){for(var d=[];;){var e=n(a);if(!e)return;if("selfClose"!=e){var f=a.line,g=a.ch,h=l(a);if(!h)return;if(h[1])d.push(h[2]);else{for(var i=d.length-1;i>=0;--i)if(d[i]==h[2]){d.length=i;break}if(0>i&&(!c||c==h[2]))return{tag:h[2],from:b(a.line,a.ch),to:b(f,g)}}}else l(a)}}var b=a.Pos,d="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",e=d+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",f=new RegExp("<(/?)(["+d+"]["+e+"]*)","g");a.registerHelper("fold","xml",function(a,c){for(var d=new g(a,c.line,0);;){var f,e=m(d);if(!e||d.line!=c.line||!(f=k(d)))return;if(!e[1]&&"selfClose"!=f){var c=b(d.line,d.ch),h=o(d,e[2]);return h&&{from:c,to:h.from}}}}),a.findMatchingTag=function(a,d,e){var f=new g(a,d.line,d.ch,e);if(-1!=f.text.indexOf(">")||-1!=f.text.indexOf("<")){var h=k(f),i=h&&b(f.line,f.ch),j=h&&l(f);if(h&&j&&!(c(f,d)>0)){var m={from:b(f.line,f.ch),to:i,tag:j[2]};return"selfClose"==h?{open:m,close:null,at:"open"}:j[1]?{open:p(f,j[2]),close:m,at:"close"}:(f=new g(a,i.line,i.ch,e),{open:m,close:o(f,j[2]),at:"open"})}}},a.findEnclosingTag=function(a,b,c){for(var d=new g(a,b.line,b.ch,c);;){var e=p(d);if(!e)break;var f=new g(a,b.line,b.ch,c),h=o(f,e.tag);if(h)return{open:e,close:h}}},a.scanForClosingTag=function(a,b,c,d){var e=new g(a,b.line,b.ch,d?{from:0,to:d}:null);return o(e,c)}});
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/lib/codemirror.css b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/lib/codemirror.css
deleted file mode 100644
index e2d4ec2048c4..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/codemirror/lib/codemirror.css
+++ /dev/null
@@ -1,318 +0,0 @@
-/* BASICS */
-
-.CodeMirror {
- /* Set height, width, borders, and global font properties here */
- font-family: monospace;
- height: 300px;
-}
-.CodeMirror-scroll {
- /* Set scrolling behaviour here */
- overflow: auto;
-}
-
-/* PADDING */
-
-.CodeMirror-lines {
- padding: 4px 0; /* Vertical padding around content */
-}
-.CodeMirror pre {
- padding: 0 4px; /* Horizontal padding of content */
-}
-
-.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
- background-color: white; /* The little square between H and V scrollbars */
-}
-
-/* GUTTER */
-
-.CodeMirror-gutters {
- border-right: 1px solid #ddd;
- background-color: #f7f7f7;
- white-space: nowrap;
-}
-.CodeMirror-linenumbers {}
-.CodeMirror-linenumber {
- padding: 0 3px 0 5px;
- min-width: 20px;
- text-align: right;
- color: #999;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-
-.CodeMirror-guttermarker { color: black; }
-.CodeMirror-guttermarker-subtle { color: #999; }
-
-/* CURSOR */
-
-.CodeMirror div.CodeMirror-cursor {
- border-left: 1px solid black;
-}
-/* Shown when moving in bi-directional text */
-.CodeMirror div.CodeMirror-secondarycursor {
- border-left: 1px solid silver;
-}
-.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
- width: auto;
- border: 0;
- background: #7e7;
-}
-.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
- z-index: 1;
-}
-
-.cm-animate-fat-cursor {
- width: auto;
- border: 0;
- -webkit-animation: blink 1.06s steps(1) infinite;
- -moz-animation: blink 1.06s steps(1) infinite;
- animation: blink 1.06s steps(1) infinite;
-}
-@-moz-keyframes blink {
- 0% { background: #7e7; }
- 50% { background: none; }
- 100% { background: #7e7; }
-}
-@-webkit-keyframes blink {
- 0% { background: #7e7; }
- 50% { background: none; }
- 100% { background: #7e7; }
-}
-@keyframes blink {
- 0% { background: #7e7; }
- 50% { background: none; }
- 100% { background: #7e7; }
-}
-
-/* Can style cursor different in overwrite (non-insert) mode */
-div.CodeMirror-overwrite div.CodeMirror-cursor {}
-
-.cm-tab { display: inline-block; text-decoration: inherit; }
-
-.CodeMirror-ruler {
- border-left: 1px solid #ccc;
- position: absolute;
-}
-
-/* DEFAULT THEME */
-
-.cm-s-default .cm-keyword {color: #708;}
-.cm-s-default .cm-atom {color: #219;}
-.cm-s-default .cm-number {color: #164;}
-.cm-s-default .cm-def {color: #00f;}
-.cm-s-default .cm-variable,
-.cm-s-default .cm-punctuation,
-.cm-s-default .cm-property,
-.cm-s-default .cm-operator {}
-.cm-s-default .cm-variable-2 {color: #05a;}
-.cm-s-default .cm-variable-3 {color: #085;}
-.cm-s-default .cm-comment {color: #a50;}
-.cm-s-default .cm-string {color: #a11;}
-.cm-s-default .cm-string-2 {color: #f50;}
-.cm-s-default .cm-meta {color: #555;}
-.cm-s-default .cm-qualifier {color: #555;}
-.cm-s-default .cm-builtin {color: #30a;}
-.cm-s-default .cm-bracket {color: #997;}
-.cm-s-default .cm-tag {color: #170;}
-.cm-s-default .cm-attribute {color: #00c;}
-.cm-s-default .cm-header {color: blue;}
-.cm-s-default .cm-quote {color: #090;}
-.cm-s-default .cm-hr {color: #999;}
-.cm-s-default .cm-link {color: #00c;}
-
-.cm-negative {color: #d44;}
-.cm-positive {color: #292;}
-.cm-header, .cm-strong {font-weight: bold;}
-.cm-em {font-style: italic;}
-.cm-link {text-decoration: underline;}
-.cm-strikethrough {text-decoration: line-through;}
-
-.cm-s-default .cm-error {color: #f00;}
-.cm-invalidchar {color: #f00;}
-
-/* Default styles for common addons */
-
-div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
-div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
-.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
-.CodeMirror-activeline-background {background: #e8f2ff;}
-
-/* STOP */
-
-/* The rest of this file contains styles related to the mechanics of
- the editor. You probably shouldn't touch them. */
-
-.CodeMirror {
- line-height: 1;
- position: relative;
- overflow: hidden;
- background: white;
- color: black;
-}
-
-.CodeMirror-scroll {
- /* 30px is the magic margin used to hide the element's real scrollbars */
- /* See overflow: hidden in .CodeMirror */
- margin-bottom: -30px; margin-right: -30px;
- padding-bottom: 30px;
- height: 100%;
- outline: none; /* Prevent dragging from highlighting the element */
- position: relative;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-.CodeMirror-sizer {
- position: relative;
- border-right: 30px solid transparent;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-
-/* The fake, visible scrollbars. Used to force redraw during scrolling
- before actuall scrolling happens, thus preventing shaking and
- flickering artifacts. */
-.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
- position: absolute;
- z-index: 6;
- display: none;
-}
-.CodeMirror-vscrollbar {
- right: 0; top: 0;
- overflow-x: hidden;
- overflow-y: scroll;
-}
-.CodeMirror-hscrollbar {
- bottom: 0; left: 0;
- overflow-y: hidden;
- overflow-x: scroll;
-}
-.CodeMirror-scrollbar-filler {
- right: 0; bottom: 0;
-}
-.CodeMirror-gutter-filler {
- left: 0; bottom: 0;
-}
-
-.CodeMirror-gutters {
- position: absolute; left: 0; top: 0;
- padding-bottom: 30px;
- z-index: 3;
-}
-.CodeMirror-gutter {
- white-space: normal;
- height: 100%;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- padding-bottom: 30px;
- margin-bottom: -32px;
- display: inline-block;
- /* Hack to make IE7 behave */
- *zoom:1;
- *display:inline;
-}
-.CodeMirror-gutter-wrapper {
- position: absolute;
- z-index: 4;
- height: 100%;
-}
-.CodeMirror-gutter-elt {
- position: absolute;
- cursor: default;
- z-index: 4;
-}
-
-.CodeMirror-lines {
- cursor: text;
- min-height: 1px; /* prevents collapsing before first draw */
-}
-.CodeMirror pre {
- /* Reset some styles that the rest of the page might have set */
- -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
- border-width: 0;
- background: transparent;
- font-family: inherit;
- font-size: inherit;
- margin: 0;
- white-space: pre;
- word-wrap: normal;
- line-height: inherit;
- color: inherit;
- z-index: 2;
- position: relative;
- overflow: visible;
-}
-.CodeMirror-wrap pre {
- word-wrap: break-word;
- white-space: pre-wrap;
- word-break: normal;
-}
-
-.CodeMirror-linebackground {
- position: absolute;
- left: 0; right: 0; top: 0; bottom: 0;
- z-index: 0;
-}
-
-.CodeMirror-linewidget {
- position: relative;
- z-index: 2;
- overflow: auto;
-}
-
-.CodeMirror-widget {}
-
-.CodeMirror-wrap .CodeMirror-scroll {
- overflow-x: hidden;
-}
-
-.CodeMirror-measure {
- position: absolute;
- width: 100%;
- height: 0;
- overflow: hidden;
- visibility: hidden;
-}
-.CodeMirror-measure pre { position: static; }
-
-.CodeMirror div.CodeMirror-cursor {
- position: absolute;
- border-right: none;
- width: 0;
-}
-
-div.CodeMirror-cursors {
- visibility: hidden;
- position: relative;
- z-index: 3;
-}
-.CodeMirror-focused div.CodeMirror-cursors {
- visibility: visible;
-}
-
-.CodeMirror-selected { background: #d9d9d9; }
-.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
-.CodeMirror-crosshair { cursor: crosshair; }
-
-.cm-searching {
- background: #ffa;
- background: rgba(255, 255, 0, .4);
-}
-
-/* IE7 hack to prevent it from returning funny offsetTops on the spans */
-.CodeMirror span { *vertical-align: text-bottom; }
-
-/* Used to force a border model for a node */
-.cm-force-border { padding-right: .1px; }
-
-@media print {
- /* Hide the cursor when printing */
- .CodeMirror div.CodeMirror-cursors {
- visibility: hidden;
- }
-}
-
-/* See issue #2901 */
-.cm-tab-wrap-hack:after { content: ''; }
-
-/* Help users use markselection to safely style text background */
-span.CodeMirror-selectedtext { background: none; }
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/js-beautify/LICENSE b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/js-beautify/LICENSE
deleted file mode 100644
index 51da26828d83..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/js-beautify/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2007-2013 Einar Lielmanis and contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/js-beautify/beautify.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/js-beautify/beautify.js
deleted file mode 100644
index 6e9985b91260..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/js-beautify/beautify.js
+++ /dev/null
@@ -1,2333 +0,0 @@
-/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
-/*
-
- The MIT License (MIT)
-
- Copyright (c) 2007-2013 Einar Lielmanis and contributors.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- JS Beautifier
----------------
-
-
- Written by Einar Lielmanis,
- http://jsbeautifier.org/
-
- Originally converted to javascript by Vital,
- "End braces on own line" added by Chris J. Shull,
- Parsing improvements for brace-less statements by Liam Newman
-
-
- Usage:
- js_beautify(js_source_text);
- js_beautify(js_source_text, options);
-
- The options are:
- indent_size (default 4) - indentation size,
- indent_char (default space) - character to indent with,
- preserve_newlines (default true) - whether existing line breaks should be preserved,
- max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk,
-
- jslint_happy (default false) - if true, then jslint-stricter mode is enforced.
-
- jslint_happy !jslint_happy
- ---------------------------------
- function () function()
-
- switch () { switch() {
- case 1: case 1:
- break; break;
- } }
-
- space_after_anon_function (default false) - should the space before an anonymous function's parens be added, "function()" vs "function ()",
- NOTE: This option is overriden by jslint_happy (i.e. if jslint_happy is true, space_after_anon_function is true by design)
-
- brace_style (default "collapse") - "collapse-preserve-inline" | "collapse" | "expand" | "end-expand" | "none"
- put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
-
- space_before_conditional (default true) - should the space before conditional statement be added, "if(true)" vs "if (true)",
-
- unescape_strings (default false) - should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"
-
- wrap_line_length (default unlimited) - lines should wrap at next opportunity after this number of characters.
- NOTE: This is not a hard limit. Lines will continue until a point where a newline would
- be preserved if it were present.
-
- end_with_newline (default false) - end output with a newline
-
-
- e.g
-
- js_beautify(js_source_text, {
- 'indent_size': 1,
- 'indent_char': '\t'
- });
-
-*/
-
-// Object.values polyfill found here:
-// http://tokenposts.blogspot.com.au/2012/04/javascript-objectkeys-browser.html
-if (!Object.values) {
- Object.values = function(o) {
- if (o !== Object(o)) {
- throw new TypeError('Object.values called on a non-object');
- }
- var k = [],
- p;
- for (p in o) {
- if (Object.prototype.hasOwnProperty.call(o, p)) {
- k.push(o[p]);
- }
- }
- return k;
- };
-}
-
-(function() {
-
- var acorn = {};
- (function(exports) {
- /* jshint curly: false */
- // This section of code is taken from acorn.
- //
- // Acorn was written by Marijn Haverbeke and released under an MIT
- // license. The Unicode regexps (for identifiers and whitespace) were
- // taken from [Esprima](http://esprima.org) by Ariya Hidayat.
- //
- // Git repositories for Acorn are available at
- //
- // http://marijnhaverbeke.nl/git/acorn
- // https://github.com/marijnh/acorn.git
-
- // ## Character categories
-
- // Big ugly regular expressions that match characters in the
- // whitespace, identifier, and identifier-start categories. These
- // are only applied when a character is found to actually have a
- // code point above 128.
-
- var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line
- var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
- var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
- var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
- var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-
- // Whether a single character denotes a newline.
-
- exports.newline = /[\n\r\u2028\u2029]/;
-
- // Matches a whole line break (where CRLF is considered a single
- // line break). Used to count lines.
-
- // in javascript, these two differ
- // in python they are the same, different methods are called on them
- exports.lineBreak = new RegExp('\r\n|' + exports.newline.source);
- exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
-
-
- // Test whether a given character code starts an identifier.
-
- exports.isIdentifierStart = function(code) {
- // permit $ (36) and @ (64). @ is used in ES7 decorators.
- if (code < 65) return code === 36 || code === 64;
- // 65 through 91 are uppercase letters.
- if (code < 91) return true;
- // permit _ (95).
- if (code < 97) return code === 95;
- // 97 through 123 are lowercase letters.
- if (code < 123) return true;
- return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
- };
-
- // Test whether a given character is part of an identifier.
-
- exports.isIdentifierChar = function(code) {
- if (code < 48) return code === 36;
- if (code < 58) return true;
- if (code < 65) return false;
- if (code < 91) return true;
- if (code < 97) return code === 95;
- if (code < 123) return true;
- return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
- };
- })(acorn);
- /* jshint curly: true */
-
- function in_array(what, arr) {
- for (var i = 0; i < arr.length; i += 1) {
- if (arr[i] === what) {
- return true;
- }
- }
- return false;
- }
-
- function trim(s) {
- return s.replace(/^\s+|\s+$/g, '');
- }
-
- function ltrim(s) {
- return s.replace(/^\s+/g, '');
- }
-
- // function rtrim(s) {
- // return s.replace(/\s+$/g, '');
- // }
-
- function js_beautify(js_source_text, options) {
- "use strict";
- var beautifier = new Beautifier(js_source_text, options);
- return beautifier.beautify();
- }
-
- function sanitizeOperatorPosition(opPosition) {
- opPosition = opPosition || OPERATOR_POSITION.before_newline;
-
- var validPositionValues = Object.values(OPERATOR_POSITION);
-
- if (!in_array(opPosition, validPositionValues)) {
- throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n" +
- validPositionValues +
- "\nYou passed in: '" + opPosition + "'");
- }
-
- return opPosition;
- }
-
- var OPERATOR_POSITION = {
- before_newline: 'before-newline',
- after_newline: 'after-newline',
- preserve_newline: 'preserve-newline',
- };
-
- var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline];
-
- var MODE = {
- BlockStatement: 'BlockStatement', // 'BLOCK'
- Statement: 'Statement', // 'STATEMENT'
- ObjectLiteral: 'ObjectLiteral', // 'OBJECT',
- ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]',
- ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)',
- Conditional: 'Conditional', //'(COND-EXPRESSION)',
- Expression: 'Expression' //'(EXPRESSION)'
- };
-
- function Beautifier(js_source_text, options) {
- "use strict";
- var output;
- var tokens = [],
- token_pos;
- var Tokenizer;
- var current_token;
- var last_type, last_last_text, indent_string;
- var flags, previous_flags, flag_store;
- var prefix;
-
- var handlers, opt;
- var baseIndentString = '';
-
- handlers = {
- 'TK_START_EXPR': handle_start_expr,
- 'TK_END_EXPR': handle_end_expr,
- 'TK_START_BLOCK': handle_start_block,
- 'TK_END_BLOCK': handle_end_block,
- 'TK_WORD': handle_word,
- 'TK_RESERVED': handle_word,
- 'TK_SEMICOLON': handle_semicolon,
- 'TK_STRING': handle_string,
- 'TK_EQUALS': handle_equals,
- 'TK_OPERATOR': handle_operator,
- 'TK_COMMA': handle_comma,
- 'TK_BLOCK_COMMENT': handle_block_comment,
- 'TK_COMMENT': handle_comment,
- 'TK_DOT': handle_dot,
- 'TK_UNKNOWN': handle_unknown,
- 'TK_EOF': handle_eof
- };
-
- function create_flags(flags_base, mode) {
- var next_indent_level = 0;
- if (flags_base) {
- next_indent_level = flags_base.indentation_level;
- if (!output.just_added_newline() &&
- flags_base.line_indent_level > next_indent_level) {
- next_indent_level = flags_base.line_indent_level;
- }
- }
-
- var next_flags = {
- mode: mode,
- parent: flags_base,
- last_text: flags_base ? flags_base.last_text : '', // last token text
- last_word: flags_base ? flags_base.last_word : '', // last 'TK_WORD' passed
- declaration_statement: false,
- declaration_assignment: false,
- multiline_frame: false,
- inline_frame: false,
- if_block: false,
- else_block: false,
- do_block: false,
- do_while: false,
- import_block: false,
- in_case_statement: false, // switch(..){ INSIDE HERE }
- in_case: false, // we're on the exact line with "case 0:"
- case_body: false, // the indented case-action block
- indentation_level: next_indent_level,
- line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level,
- start_line_index: output.get_line_number(),
- ternary_depth: 0
- };
- return next_flags;
- }
-
- // Some interpreters have unexpected results with foo = baz || bar;
- options = options ? options : {};
- opt = {};
-
- // compatibility
- if (options.braces_on_own_line !== undefined) { //graceful handling of deprecated option
- opt.brace_style = options.braces_on_own_line ? "expand" : "collapse";
- }
- opt.brace_style = options.brace_style ? options.brace_style : (opt.brace_style ? opt.brace_style : "collapse");
-
- // graceful handling of deprecated option
- if (opt.brace_style === "expand-strict") {
- opt.brace_style = "expand";
- }
-
- opt.indent_size = options.indent_size ? parseInt(options.indent_size, 10) : 4;
- opt.indent_char = options.indent_char ? options.indent_char : ' ';
- opt.eol = options.eol ? options.eol : 'auto';
- opt.preserve_newlines = (options.preserve_newlines === undefined) ? true : options.preserve_newlines;
- opt.break_chained_methods = (options.break_chained_methods === undefined) ? false : options.break_chained_methods;
- opt.max_preserve_newlines = (options.max_preserve_newlines === undefined) ? 0 : parseInt(options.max_preserve_newlines, 10);
- opt.space_in_paren = (options.space_in_paren === undefined) ? false : options.space_in_paren;
- opt.space_in_empty_paren = (options.space_in_empty_paren === undefined) ? false : options.space_in_empty_paren;
- opt.jslint_happy = (options.jslint_happy === undefined) ? false : options.jslint_happy;
- opt.space_after_anon_function = (options.space_after_anon_function === undefined) ? false : options.space_after_anon_function;
- opt.keep_array_indentation = (options.keep_array_indentation === undefined) ? false : options.keep_array_indentation;
- opt.space_before_conditional = (options.space_before_conditional === undefined) ? true : options.space_before_conditional;
- opt.unescape_strings = (options.unescape_strings === undefined) ? false : options.unescape_strings;
- opt.wrap_line_length = (options.wrap_line_length === undefined) ? 0 : parseInt(options.wrap_line_length, 10);
- opt.e4x = (options.e4x === undefined) ? false : options.e4x;
- opt.end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
- opt.comma_first = (options.comma_first === undefined) ? false : options.comma_first;
- opt.operator_position = sanitizeOperatorPosition(options.operator_position);
-
- // For testing of beautify ignore:start directive
- opt.test_output_raw = (options.test_output_raw === undefined) ? false : options.test_output_raw;
-
- // force opt.space_after_anon_function to true if opt.jslint_happy
- if (opt.jslint_happy) {
- opt.space_after_anon_function = true;
- }
-
- if (options.indent_with_tabs) {
- opt.indent_char = '\t';
- opt.indent_size = 1;
- }
-
- if (opt.eol === 'auto') {
- opt.eol = '\n';
- if (js_source_text && acorn.lineBreak.test(js_source_text || '')) {
- opt.eol = js_source_text.match(acorn.lineBreak)[0];
- }
- }
-
- opt.eol = opt.eol.replace(/\\r/, '\r').replace(/\\n/, '\n');
-
- //----------------------------------
- indent_string = '';
- while (opt.indent_size > 0) {
- indent_string += opt.indent_char;
- opt.indent_size -= 1;
- }
-
- var preindent_index = 0;
- if (js_source_text && js_source_text.length) {
- while ((js_source_text.charAt(preindent_index) === ' ' ||
- js_source_text.charAt(preindent_index) === '\t')) {
- baseIndentString += js_source_text.charAt(preindent_index);
- preindent_index += 1;
- }
- js_source_text = js_source_text.substring(preindent_index);
- }
-
- last_type = 'TK_START_BLOCK'; // last token type
- last_last_text = ''; // pre-last token text
- output = new Output(indent_string, baseIndentString);
-
- // If testing the ignore directive, start with output disable set to true
- output.raw = opt.test_output_raw;
-
-
- // Stack of parsing/formatting states, including MODE.
- // We tokenize, parse, and output in an almost purely a forward-only stream of token input
- // and formatted output. This makes the beautifier less accurate than full parsers
- // but also far more tolerant of syntax errors.
- //
- // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type
- // MODE.BlockStatement on the the stack, even though it could be object literal. If we later
- // encounter a ":", we'll switch to to MODE.ObjectLiteral. If we then see a ";",
- // most full parsers would die, but the beautifier gracefully falls back to
- // MODE.BlockStatement and continues on.
- flag_store = [];
- set_mode(MODE.BlockStatement);
-
- this.beautify = function() {
-
- /*jshint onevar:true */
- var local_token, sweet_code;
- Tokenizer = new tokenizer(js_source_text, opt, indent_string);
- tokens = Tokenizer.tokenize();
- token_pos = 0;
-
- function get_local_token() {
- local_token = get_token();
- return local_token;
- }
-
- while (get_local_token()) {
- for (var i = 0; i < local_token.comments_before.length; i++) {
- // The cleanest handling of inline comments is to treat them as though they aren't there.
- // Just continue formatting and the behavior should be logical.
- // Also ignore unknown tokens. Again, this should result in better behavior.
- handle_token(local_token.comments_before[i]);
- }
- handle_token(local_token);
-
- last_last_text = flags.last_text;
- last_type = local_token.type;
- flags.last_text = local_token.text;
-
- token_pos += 1;
- }
-
- sweet_code = output.get_code();
- if (opt.end_with_newline) {
- sweet_code += '\n';
- }
-
- if (opt.eol !== '\n') {
- sweet_code = sweet_code.replace(/[\n]/g, opt.eol);
- }
-
- return sweet_code;
- };
-
- function handle_token(local_token) {
- var newlines = local_token.newlines;
- var keep_whitespace = opt.keep_array_indentation && is_array(flags.mode);
-
- if (keep_whitespace) {
- for (var i = 0; i < newlines; i += 1) {
- print_newline(i > 0);
- }
- } else {
- if (opt.max_preserve_newlines && newlines > opt.max_preserve_newlines) {
- newlines = opt.max_preserve_newlines;
- }
-
- if (opt.preserve_newlines) {
- if (local_token.newlines > 1) {
- print_newline();
- for (var j = 1; j < newlines; j += 1) {
- print_newline(true);
- }
- }
- }
- }
-
- current_token = local_token;
- handlers[current_token.type]();
- }
-
- // we could use just string.split, but
- // IE doesn't like returning empty strings
- function split_linebreaks(s) {
- //return s.split(/\x0d\x0a|\x0a/);
-
- s = s.replace(acorn.allLineBreaks, '\n');
- var out = [],
- idx = s.indexOf("\n");
- while (idx !== -1) {
- out.push(s.substring(0, idx));
- s = s.substring(idx + 1);
- idx = s.indexOf("\n");
- }
- if (s.length) {
- out.push(s);
- }
- return out;
- }
-
- var newline_restricted_tokens = ['break', 'contiue', 'return', 'throw'];
-
- function allow_wrap_or_preserved_newline(force_linewrap) {
- force_linewrap = (force_linewrap === undefined) ? false : force_linewrap;
-
- // Never wrap the first token on a line
- if (output.just_added_newline()) {
- return;
- }
-
- var shouldPreserveOrForce = (opt.preserve_newlines && current_token.wanted_newline) || force_linewrap;
- var operatorLogicApplies = in_array(flags.last_text, Tokenizer.positionable_operators) || in_array(current_token.text, Tokenizer.positionable_operators);
-
- if (operatorLogicApplies) {
- var shouldPrintOperatorNewline = (
- in_array(flags.last_text, Tokenizer.positionable_operators) &&
- in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)
- ) ||
- in_array(current_token.text, Tokenizer.positionable_operators);
- shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline;
- }
-
- if (shouldPreserveOrForce) {
- print_newline(false, true);
- } else if (opt.wrap_line_length) {
- if (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens)) {
- // These tokens should never have a newline inserted
- // between them and the following expression.
- return;
- }
- var proposed_line_length = output.current_line.get_character_count() + current_token.text.length +
- (output.space_before_token ? 1 : 0);
- if (proposed_line_length >= opt.wrap_line_length) {
- print_newline(false, true);
- }
- }
- }
-
- function print_newline(force_newline, preserve_statement_flags) {
- if (!preserve_statement_flags) {
- if (flags.last_text !== ';' && flags.last_text !== ',' && flags.last_text !== '=' && last_type !== 'TK_OPERATOR') {
- while (flags.mode === MODE.Statement && !flags.if_block && !flags.do_block) {
- restore_mode();
- }
- }
- }
-
- if (output.add_new_line(force_newline)) {
- flags.multiline_frame = true;
- }
- }
-
- function print_token_line_indentation() {
- if (output.just_added_newline()) {
- if (opt.keep_array_indentation && is_array(flags.mode) && current_token.wanted_newline) {
- output.current_line.push(current_token.whitespace_before);
- output.space_before_token = false;
- } else if (output.set_indent(flags.indentation_level)) {
- flags.line_indent_level = flags.indentation_level;
- }
- }
- }
-
- function print_token(printable_token) {
- if (output.raw) {
- output.add_raw_token(current_token);
- return;
- }
-
- if (opt.comma_first && last_type === 'TK_COMMA' &&
- output.just_added_newline()) {
- if (output.previous_line.last() === ',') {
- var popped = output.previous_line.pop();
- // if the comma was already at the start of the line,
- // pull back onto that line and reprint the indentation
- if (output.previous_line.is_empty()) {
- output.previous_line.push(popped);
- output.trim(true);
- output.current_line.pop();
- output.trim();
- }
-
- // add the comma in front of the next token
- print_token_line_indentation();
- output.add_token(',');
- output.space_before_token = true;
- }
- }
-
- printable_token = printable_token || current_token.text;
- print_token_line_indentation();
- output.add_token(printable_token);
- }
-
- function indent() {
- flags.indentation_level += 1;
- }
-
- function deindent() {
- if (flags.indentation_level > 0 &&
- ((!flags.parent) || flags.indentation_level > flags.parent.indentation_level)) {
- flags.indentation_level -= 1;
-
- }
- }
-
- function set_mode(mode) {
- if (flags) {
- flag_store.push(flags);
- previous_flags = flags;
- } else {
- previous_flags = create_flags(null, mode);
- }
-
- flags = create_flags(previous_flags, mode);
- }
-
- function is_array(mode) {
- return mode === MODE.ArrayLiteral;
- }
-
- function is_expression(mode) {
- return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]);
- }
-
- function restore_mode() {
- if (flag_store.length > 0) {
- previous_flags = flags;
- flags = flag_store.pop();
- if (previous_flags.mode === MODE.Statement) {
- output.remove_redundant_indentation(previous_flags);
- }
- }
- }
-
- function start_of_object_property() {
- return flags.parent.mode === MODE.ObjectLiteral && flags.mode === MODE.Statement && (
- (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set'])));
- }
-
- function start_of_statement() {
- if (
- (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') ||
- (last_type === 'TK_RESERVED' && flags.last_text === 'do') ||
- (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['return', 'throw']) && !current_token.wanted_newline) ||
- (last_type === 'TK_RESERVED' && flags.last_text === 'else' && !(current_token.type === 'TK_RESERVED' && current_token.text === 'if')) ||
- (last_type === 'TK_END_EXPR' && (previous_flags.mode === MODE.ForInitializer || previous_flags.mode === MODE.Conditional)) ||
- (last_type === 'TK_WORD' && flags.mode === MODE.BlockStatement &&
- !flags.in_case &&
- !(current_token.text === '--' || current_token.text === '++') &&
- last_last_text !== 'function' &&
- current_token.type !== 'TK_WORD' && current_token.type !== 'TK_RESERVED') ||
- (flags.mode === MODE.ObjectLiteral && (
- (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set']))))
- ) {
-
- set_mode(MODE.Statement);
- indent();
-
- if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') {
- flags.declaration_statement = true;
- }
-
- // Issue #276:
- // If starting a new statement with [if, for, while, do], push to a new line.
- // if (a) if (b) if(c) d(); else e(); else f();
- if (!start_of_object_property()) {
- allow_wrap_or_preserved_newline(
- current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['do', 'for', 'if', 'while']));
- }
-
- return true;
- }
- return false;
- }
-
- function all_lines_start_with(lines, c) {
- for (var i = 0; i < lines.length; i++) {
- var line = trim(lines[i]);
- if (line.charAt(0) !== c) {
- return false;
- }
- }
- return true;
- }
-
- function each_line_matches_indent(lines, indent) {
- var i = 0,
- len = lines.length,
- line;
- for (; i < len; i++) {
- line = lines[i];
- // allow empty lines to pass through
- if (line && line.indexOf(indent) !== 0) {
- return false;
- }
- }
- return true;
- }
-
- function is_special_word(word) {
- return in_array(word, ['case', 'return', 'do', 'if', 'throw', 'else']);
- }
-
- function get_token(offset) {
- var index = token_pos + (offset || 0);
- return (index < 0 || index >= tokens.length) ? null : tokens[index];
- }
-
- function handle_start_expr() {
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- }
-
- var next_mode = MODE.Expression;
- if (current_token.text === '[') {
-
- if (last_type === 'TK_WORD' || flags.last_text === ')') {
- // this is array index specifier, break immediately
- // a[x], fn()[x]
- if (last_type === 'TK_RESERVED' && in_array(flags.last_text, Tokenizer.line_starters)) {
- output.space_before_token = true;
- }
- set_mode(next_mode);
- print_token();
- indent();
- if (opt.space_in_paren) {
- output.space_before_token = true;
- }
- return;
- }
-
- next_mode = MODE.ArrayLiteral;
- if (is_array(flags.mode)) {
- if (flags.last_text === '[' ||
- (flags.last_text === ',' && (last_last_text === ']' || last_last_text === '}'))) {
- // ], [ goes to new line
- // }, [ goes to new line
- if (!opt.keep_array_indentation) {
- print_newline();
- }
- }
- }
-
- } else {
- if (last_type === 'TK_RESERVED' && flags.last_text === 'for') {
- next_mode = MODE.ForInitializer;
- } else if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['if', 'while'])) {
- next_mode = MODE.Conditional;
- } else {
- // next_mode = MODE.Expression;
- }
- }
-
- if (flags.last_text === ';' || last_type === 'TK_START_BLOCK') {
- print_newline();
- } else if (last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK' || flags.last_text === '.') {
- // TODO: Consider whether forcing this is required. Review failing tests when removed.
- allow_wrap_or_preserved_newline(current_token.wanted_newline);
- // do nothing on (( and )( and ][ and ]( and .(
- } else if (!(last_type === 'TK_RESERVED' && current_token.text === '(') && last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR') {
- output.space_before_token = true;
- } else if ((last_type === 'TK_RESERVED' && (flags.last_word === 'function' || flags.last_word === 'typeof')) ||
- (flags.last_text === '*' && last_last_text === 'function')) {
- // function() vs function ()
- if (opt.space_after_anon_function) {
- output.space_before_token = true;
- }
- } else if (last_type === 'TK_RESERVED' && (in_array(flags.last_text, Tokenizer.line_starters) || flags.last_text === 'catch')) {
- if (opt.space_before_conditional) {
- output.space_before_token = true;
- }
- }
-
- // Should be a space between await and an IIFE
- if (current_token.text === '(' && last_type === 'TK_RESERVED' && flags.last_word === 'await') {
- output.space_before_token = true;
- }
-
- // Support of this kind of newline preservation.
- // a = (b &&
- // (c || d));
- if (current_token.text === '(') {
- if (last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
- if (!start_of_object_property()) {
- allow_wrap_or_preserved_newline();
- }
- }
- }
-
- // Support preserving wrapped arrow function expressions
- // a.b('c',
- // () => d.e
- // )
- if (current_token.text === '(' && last_type !== 'TK_WORD' && last_type !== 'TK_RESERVED') {
- allow_wrap_or_preserved_newline();
- }
-
- set_mode(next_mode);
- print_token();
- if (opt.space_in_paren) {
- output.space_before_token = true;
- }
-
- // In all cases, if we newline while inside an expression it should be indented.
- indent();
- }
-
- function handle_end_expr() {
- // statements inside expressions are not valid syntax, but...
- // statements must all be closed when their container closes
- while (flags.mode === MODE.Statement) {
- restore_mode();
- }
-
- if (flags.multiline_frame) {
- allow_wrap_or_preserved_newline(current_token.text === ']' && is_array(flags.mode) && !opt.keep_array_indentation);
- }
-
- if (opt.space_in_paren) {
- if (last_type === 'TK_START_EXPR' && !opt.space_in_empty_paren) {
- // () [] no inner space in empty parens like these, ever, ref #320
- output.trim();
- output.space_before_token = false;
- } else {
- output.space_before_token = true;
- }
- }
- if (current_token.text === ']' && opt.keep_array_indentation) {
- print_token();
- restore_mode();
- } else {
- restore_mode();
- print_token();
- }
- output.remove_redundant_indentation(previous_flags);
-
- // do {} while () // no statement required after
- if (flags.do_while && previous_flags.mode === MODE.Conditional) {
- previous_flags.mode = MODE.Expression;
- flags.do_block = false;
- flags.do_while = false;
-
- }
- }
-
- function handle_start_block() {
- // Check if this is should be treated as a ObjectLiteral
- var next_token = get_token(1);
- var second_token = get_token(2);
- if (second_token && (
- (in_array(second_token.text, [':', ',']) && in_array(next_token.type, ['TK_STRING', 'TK_WORD', 'TK_RESERVED'])) ||
- (in_array(next_token.text, ['get', 'set']) && in_array(second_token.type, ['TK_WORD', 'TK_RESERVED']))
- )) {
- // We don't support TypeScript,but we didn't break it for a very long time.
- // We'll try to keep not breaking it.
- if (!in_array(last_last_text, ['class', 'interface'])) {
- set_mode(MODE.ObjectLiteral);
- } else {
- set_mode(MODE.BlockStatement);
- }
- } else if (last_type === 'TK_OPERATOR' && flags.last_text === '=>') {
- // arrow function: (param1, paramN) => { statements }
- set_mode(MODE.BlockStatement);
- } else if (in_array(last_type, ['TK_EQUALS', 'TK_START_EXPR', 'TK_COMMA', 'TK_OPERATOR']) ||
- (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['return', 'throw', 'import']))
- ) {
- // Detecting shorthand function syntax is difficult by scanning forward,
- // so check the surrounding context.
- // If the block is being returned, imported, passed as arg,
- // assigned with = or assigned in a nested object, treat as an ObjectLiteral.
- set_mode(MODE.ObjectLiteral);
- } else {
- set_mode(MODE.BlockStatement);
- }
-
- var empty_braces = !next_token.comments_before.length && next_token.text === '}';
- var empty_anonymous_function = empty_braces && flags.last_word === 'function' &&
- last_type === 'TK_END_EXPR';
-
-
- if (opt.brace_style === "expand" ||
- (opt.brace_style === "none" && current_token.wanted_newline)) {
- if (last_type !== 'TK_OPERATOR' &&
- (empty_anonymous_function ||
- last_type === 'TK_EQUALS' ||
- (last_type === 'TK_RESERVED' && is_special_word(flags.last_text) && flags.last_text !== 'else'))) {
- output.space_before_token = true;
- } else {
- print_newline(false, true);
- }
- } else { // collapse
- if (opt.brace_style === 'collapse-preserve-inline') {
- // search forward for a newline wanted inside this block
- var index = 0;
- var check_token = null;
- flags.inline_frame = true;
- do {
- index += 1;
- check_token = get_token(index);
- if (check_token.wanted_newline) {
- flags.inline_frame = false;
- break;
- }
- } while (check_token.type !== 'TK_EOF' &&
- !(check_token.type === 'TK_END_BLOCK' && check_token.opened === current_token));
- }
-
- if (is_array(previous_flags.mode) && (last_type === 'TK_START_EXPR' || last_type === 'TK_COMMA')) {
- // if we're preserving inline,
- // allow newline between comma and next brace.
- if (last_type === 'TK_COMMA' || opt.space_in_paren) {
- output.space_before_token = true;
- }
-
- if (opt.brace_style === 'collapse-preserve-inline' &&
- (last_type === 'TK_COMMA' || (last_type === 'TK_START_EXPR' && flags.inline_frame))) {
- allow_wrap_or_preserved_newline();
- previous_flags.multiline_frame = previous_flags.multiline_frame || flags.multiline_frame;
- flags.multiline_frame = false;
- }
- } else if (last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR') {
- if (last_type === 'TK_START_BLOCK') {
- print_newline();
- } else {
- output.space_before_token = true;
- }
- }
- }
- print_token();
- indent();
- }
-
- function handle_end_block() {
- // statements must all be closed when their container closes
- while (flags.mode === MODE.Statement) {
- restore_mode();
- }
- var empty_braces = last_type === 'TK_START_BLOCK';
-
- if (opt.brace_style === "expand") {
- if (!empty_braces) {
- print_newline();
- }
- } else {
- // skip {}
- if (!empty_braces) {
- if (flags.inline_frame) {
- output.space_before_token = true;
- } else if (is_array(flags.mode) && opt.keep_array_indentation) {
- // we REALLY need a newline here, but newliner would skip that
- opt.keep_array_indentation = false;
- print_newline();
- opt.keep_array_indentation = true;
-
- } else {
- print_newline();
- }
- }
- }
- restore_mode();
- print_token();
- }
-
- function handle_word() {
- if (current_token.type === 'TK_RESERVED') {
- if (in_array(current_token.text, ['set', 'get']) && flags.mode !== MODE.ObjectLiteral) {
- current_token.type = 'TK_WORD';
- } else if (in_array(current_token.text, ['as', 'from']) && !flags.import_block) {
- current_token.type = 'TK_WORD';
- } else if (flags.mode === MODE.ObjectLiteral) {
- var next_token = get_token(1);
- if (next_token.text === ':') {
- current_token.type = 'TK_WORD';
- }
- }
- }
-
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- } else if (current_token.wanted_newline && !is_expression(flags.mode) &&
- (last_type !== 'TK_OPERATOR' || (flags.last_text === '--' || flags.last_text === '++')) &&
- last_type !== 'TK_EQUALS' &&
- (opt.preserve_newlines || !(last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const', 'set', 'get'])))) {
-
- print_newline();
- }
-
- if (flags.do_block && !flags.do_while) {
- if (current_token.type === 'TK_RESERVED' && current_token.text === 'while') {
- // do {} ## while ()
- output.space_before_token = true;
- print_token();
- output.space_before_token = true;
- flags.do_while = true;
- return;
- } else {
- // do {} should always have while as the next word.
- // if we don't see the expected while, recover
- print_newline();
- flags.do_block = false;
- }
- }
-
- // if may be followed by else, or not
- // Bare/inline ifs are tricky
- // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e();
- if (flags.if_block) {
- if (!flags.else_block && (current_token.type === 'TK_RESERVED' && current_token.text === 'else')) {
- flags.else_block = true;
- } else {
- while (flags.mode === MODE.Statement) {
- restore_mode();
- }
- flags.if_block = false;
- flags.else_block = false;
- }
- }
-
- if (current_token.type === 'TK_RESERVED' && (current_token.text === 'case' || (current_token.text === 'default' && flags.in_case_statement))) {
- print_newline();
- if (flags.case_body || opt.jslint_happy) {
- // switch cases following one another
- deindent();
- flags.case_body = false;
- }
- print_token();
- flags.in_case = true;
- flags.in_case_statement = true;
- return;
- }
-
- if (current_token.type === 'TK_RESERVED' && current_token.text === 'function') {
- if (in_array(flags.last_text, ['}', ';']) || (output.just_added_newline() && !in_array(flags.last_text, ['[', '{', ':', '=', ',']))) {
- // make sure there is a nice clean space of at least one blank line
- // before a new function definition
- if (!output.just_added_blankline() && !current_token.comments_before.length) {
- print_newline();
- print_newline(true);
- }
- }
- if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD') {
- if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set', 'new', 'return', 'export', 'async'])) {
- output.space_before_token = true;
- } else if (last_type === 'TK_RESERVED' && flags.last_text === 'default' && last_last_text === 'export') {
- output.space_before_token = true;
- } else {
- print_newline();
- }
- } else if (last_type === 'TK_OPERATOR' || flags.last_text === '=') {
- // foo = function
- output.space_before_token = true;
- } else if (!flags.multiline_frame && (is_expression(flags.mode) || is_array(flags.mode))) {
- // (function
- } else {
- print_newline();
- }
- }
-
- if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
- if (!start_of_object_property()) {
- allow_wrap_or_preserved_newline();
- }
- }
-
- if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['function', 'get', 'set'])) {
- print_token();
- flags.last_word = current_token.text;
- return;
- }
-
- prefix = 'NONE';
-
- if (last_type === 'TK_END_BLOCK') {
-
- if (!(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally', 'from']))) {
- prefix = 'NEWLINE';
- } else {
- if (opt.brace_style === "expand" ||
- opt.brace_style === "end-expand" ||
- (opt.brace_style === "none" && current_token.wanted_newline)) {
- prefix = 'NEWLINE';
- } else {
- prefix = 'SPACE';
- output.space_before_token = true;
- }
- }
- } else if (last_type === 'TK_SEMICOLON' && flags.mode === MODE.BlockStatement) {
- // TODO: Should this be for STATEMENT as well?
- prefix = 'NEWLINE';
- } else if (last_type === 'TK_SEMICOLON' && is_expression(flags.mode)) {
- prefix = 'SPACE';
- } else if (last_type === 'TK_STRING') {
- prefix = 'NEWLINE';
- } else if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' ||
- (flags.last_text === '*' && last_last_text === 'function')) {
- prefix = 'SPACE';
- } else if (last_type === 'TK_START_BLOCK') {
- if (flags.inline_frame) {
- prefix = 'SPACE';
- } else {
- prefix = 'NEWLINE';
- }
- } else if (last_type === 'TK_END_EXPR') {
- output.space_before_token = true;
- prefix = 'NEWLINE';
- }
-
- if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, Tokenizer.line_starters) && flags.last_text !== ')') {
- if (flags.last_text === 'else' || flags.last_text === 'export') {
- prefix = 'SPACE';
- } else {
- prefix = 'NEWLINE';
- }
-
- }
-
- if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally'])) {
- if (!(last_type === 'TK_END_BLOCK' && previous_flags.mode === MODE.BlockStatement) ||
- opt.brace_style === "expand" ||
- opt.brace_style === "end-expand" ||
- (opt.brace_style === "none" && current_token.wanted_newline)) {
- print_newline();
- } else {
- output.trim(true);
- var line = output.current_line;
- // If we trimmed and there's something other than a close block before us
- // put a newline back in. Handles '} // comment' scenario.
- if (line.last() !== '}') {
- print_newline();
- }
- output.space_before_token = true;
- }
- } else if (prefix === 'NEWLINE') {
- if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
- // no newline between 'return nnn'
- output.space_before_token = true;
- } else if (last_type !== 'TK_END_EXPR') {
- if ((last_type !== 'TK_START_EXPR' || !(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['var', 'let', 'const']))) && flags.last_text !== ':') {
- // no need to force newline on 'var': for (var x = 0...)
- if (current_token.type === 'TK_RESERVED' && current_token.text === 'if' && flags.last_text === 'else') {
- // no newline for } else if {
- output.space_before_token = true;
- } else {
- print_newline();
- }
- }
- } else if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, Tokenizer.line_starters) && flags.last_text !== ')') {
- print_newline();
- }
- } else if (flags.multiline_frame && is_array(flags.mode) && flags.last_text === ',' && last_last_text === '}') {
- print_newline(); // }, in lists get a newline treatment
- } else if (prefix === 'SPACE') {
- output.space_before_token = true;
- }
- print_token();
- flags.last_word = current_token.text;
-
- if (current_token.type === 'TK_RESERVED') {
- if (current_token.text === 'do') {
- flags.do_block = true;
- } else if (current_token.text === 'if') {
- flags.if_block = true;
- } else if (current_token.text === 'import') {
- flags.import_block = true;
- } else if (flags.import_block && current_token.type === 'TK_RESERVED' && current_token.text === 'from') {
- flags.import_block = false;
- }
- }
- }
-
- function handle_semicolon() {
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- // Semicolon can be the start (and end) of a statement
- output.space_before_token = false;
- }
- while (flags.mode === MODE.Statement && !flags.if_block && !flags.do_block) {
- restore_mode();
- }
-
- // hacky but effective for the moment
- if (flags.import_block) {
- flags.import_block = false;
- }
- print_token();
- }
-
- function handle_string() {
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- // One difference - strings want at least a space before
- output.space_before_token = true;
- } else if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' || flags.inline_frame) {
- output.space_before_token = true;
- } else if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
- if (!start_of_object_property()) {
- allow_wrap_or_preserved_newline();
- }
- } else {
- print_newline();
- }
- print_token();
- }
-
- function handle_equals() {
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- }
-
- if (flags.declaration_statement) {
- // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done
- flags.declaration_assignment = true;
- }
- output.space_before_token = true;
- print_token();
- output.space_before_token = true;
- }
-
- function handle_comma() {
- print_token();
- output.space_before_token = true;
- if (flags.declaration_statement) {
- if (is_expression(flags.parent.mode)) {
- // do not break on comma, for(var a = 1, b = 2)
- flags.declaration_assignment = false;
- }
-
- if (flags.declaration_assignment) {
- flags.declaration_assignment = false;
- print_newline(false, true);
- } else if (opt.comma_first) {
- // for comma-first, we want to allow a newline before the comma
- // to turn into a newline after the comma, which we will fixup later
- allow_wrap_or_preserved_newline();
- }
- } else if (flags.mode === MODE.ObjectLiteral ||
- (flags.mode === MODE.Statement && flags.parent.mode === MODE.ObjectLiteral)) {
- if (flags.mode === MODE.Statement) {
- restore_mode();
- }
-
- if (!flags.inline_frame) {
- print_newline();
- }
- } else if (opt.comma_first) {
- // EXPR or DO_BLOCK
- // for comma-first, we want to allow a newline before the comma
- // to turn into a newline after the comma, which we will fixup later
- allow_wrap_or_preserved_newline();
- }
- }
-
- function handle_operator() {
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- }
-
- if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
- // "return" had a special handling in TK_WORD. Now we need to return the favor
- output.space_before_token = true;
- print_token();
- return;
- }
-
- // hack for actionscript's import .*;
- if (current_token.text === '*' && last_type === 'TK_DOT') {
- print_token();
- return;
- }
-
- if (current_token.text === '::') {
- // no spaces around exotic namespacing syntax operator
- print_token();
- return;
- }
-
- // Allow line wrapping between operators when operator_position is
- // set to before or preserve
- if (last_type === 'TK_OPERATOR' && in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) {
- allow_wrap_or_preserved_newline();
- }
-
- if (current_token.text === ':' && flags.in_case) {
- flags.case_body = true;
- indent();
- print_token();
- print_newline();
- flags.in_case = false;
- return;
- }
-
- var space_before = true;
- var space_after = true;
- var in_ternary = false;
- var isGeneratorAsterisk = current_token.text === '*' && last_type === 'TK_RESERVED' && flags.last_text === 'function';
- var isUnary = in_array(current_token.text, ['-', '+']) && (
- in_array(last_type, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) ||
- in_array(flags.last_text, Tokenizer.line_starters) ||
- flags.last_text === ','
- );
-
- if (current_token.text === ':') {
- if (flags.ternary_depth === 0) {
- // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant.
- space_before = false;
- } else {
- flags.ternary_depth -= 1;
- in_ternary = true;
- }
- } else if (current_token.text === '?') {
- flags.ternary_depth += 1;
- }
-
- // let's handle the operator_position option prior to any conflicting logic
- if (!isUnary && !isGeneratorAsterisk && opt.preserve_newlines && in_array(current_token.text, Tokenizer.positionable_operators)) {
- var isColon = current_token.text === ':';
- var isTernaryColon = (isColon && in_ternary);
- var isOtherColon = (isColon && !in_ternary);
-
- switch (opt.operator_position) {
- case OPERATOR_POSITION.before_newline:
- // if the current token is : and it's not a ternary statement then we set space_before to false
- output.space_before_token = !isOtherColon;
-
- print_token();
-
- if (!isColon || isTernaryColon) {
- allow_wrap_or_preserved_newline();
- }
-
- output.space_before_token = true;
- return;
-
- case OPERATOR_POSITION.after_newline:
- // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement,
- // then print a newline.
-
- output.space_before_token = true;
-
- if (!isColon || isTernaryColon) {
- if (get_token(1).wanted_newline) {
- print_newline(false, true);
- } else {
- allow_wrap_or_preserved_newline();
- }
- } else {
- output.space_before_token = false;
- }
-
- print_token();
-
- output.space_before_token = true;
- return;
-
- case OPERATOR_POSITION.preserve_newline:
- if (!isOtherColon) {
- allow_wrap_or_preserved_newline();
- }
-
- // if we just added a newline, or the current token is : and it's not a ternary statement,
- // then we set space_before to false
- space_before = !(output.just_added_newline() || isOtherColon);
-
- output.space_before_token = space_before;
- print_token();
- output.space_before_token = true;
- return;
- }
- }
-
- if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) {
- // unary operators (and binary +/- pretending to be unary) special cases
-
- space_before = false;
- space_after = false;
-
- // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1
- // if there is a newline between -- or ++ and anything else we should preserve it.
- if (current_token.wanted_newline && (current_token.text === '--' || current_token.text === '++')) {
- print_newline(false, true);
- }
-
- if (flags.last_text === ';' && is_expression(flags.mode)) {
- // for (;; ++i)
- // ^^^
- space_before = true;
- }
-
- if (last_type === 'TK_RESERVED') {
- space_before = true;
- } else if (last_type === 'TK_END_EXPR') {
- space_before = !(flags.last_text === ']' && (current_token.text === '--' || current_token.text === '++'));
- } else if (last_type === 'TK_OPERATOR') {
- // a++ + ++b;
- // a - -b
- space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(flags.last_text, ['--', '-', '++', '+']);
- // + and - are not unary when preceeded by -- or ++ operator
- // a-- + b
- // a * +b
- // a - -b
- if (in_array(current_token.text, ['+', '-']) && in_array(flags.last_text, ['--', '++'])) {
- space_after = true;
- }
- }
-
-
- if (((flags.mode === MODE.BlockStatement && !flags.inline_frame) || flags.mode === MODE.Statement) &&
- (flags.last_text === '{' || flags.last_text === ';')) {
- // { foo; --i }
- // foo(); --bar;
- print_newline();
- }
- } else if (isGeneratorAsterisk) {
- space_before = false;
- space_after = false;
- }
- output.space_before_token = output.space_before_token || space_before;
- print_token();
- output.space_before_token = space_after;
- }
-
- function handle_block_comment() {
- if (output.raw) {
- output.add_raw_token(current_token);
- if (current_token.directives && current_token.directives.preserve === 'end') {
- // If we're testing the raw output behavior, do not allow a directive to turn it off.
- output.raw = opt.test_output_raw;
- }
- return;
- }
-
- if (current_token.directives) {
- print_newline(false, true);
- print_token();
- if (current_token.directives.preserve === 'start') {
- output.raw = true;
- }
- print_newline(false, true);
- return;
- }
-
- // inline block
- if (!acorn.newline.test(current_token.text) && !current_token.wanted_newline) {
- output.space_before_token = true;
- print_token();
- output.space_before_token = true;
- return;
- }
-
- var lines = split_linebreaks(current_token.text);
- var j; // iterator for this case
- var javadoc = false;
- var starless = false;
- var lastIndent = current_token.whitespace_before;
- var lastIndentLength = lastIndent.length;
-
- // block comment starts with a new line
- print_newline(false, true);
- if (lines.length > 1) {
- javadoc = all_lines_start_with(lines.slice(1), '*');
- starless = each_line_matches_indent(lines.slice(1), lastIndent);
- }
-
- // first line always indented
- print_token(lines[0]);
- for (j = 1; j < lines.length; j++) {
- print_newline(false, true);
- if (javadoc) {
- // javadoc: reformat and re-indent
- print_token(' ' + ltrim(lines[j]));
- } else if (starless && lines[j].length > lastIndentLength) {
- // starless: re-indent non-empty content, avoiding trim
- print_token(lines[j].substring(lastIndentLength));
- } else {
- // normal comments output raw
- output.add_token(lines[j]);
- }
- }
-
- // for comments of more than one line, make sure there's a new line after
- print_newline(false, true);
- }
-
- function handle_comment() {
- if (current_token.wanted_newline) {
- print_newline(false, true);
- } else {
- output.trim(true);
- }
-
- output.space_before_token = true;
- print_token();
- print_newline(false, true);
- }
-
- function handle_dot() {
- if (start_of_statement()) {
- // The conditional starts the statement if appropriate.
- }
-
- if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
- output.space_before_token = true;
- } else {
- // allow preserved newlines before dots in general
- // force newlines on dots after close paren when break_chained - for bar().baz()
- allow_wrap_or_preserved_newline(flags.last_text === ')' && opt.break_chained_methods);
- }
-
- print_token();
- }
-
- function handle_unknown() {
- print_token();
-
- if (current_token.text[current_token.text.length - 1] === '\n') {
- print_newline();
- }
- }
-
- function handle_eof() {
- // Unwind any open statements
- while (flags.mode === MODE.Statement) {
- restore_mode();
- }
- }
- }
-
-
- function OutputLine(parent) {
- var _character_count = 0;
- // use indent_count as a marker for lines that have preserved indentation
- var _indent_count = -1;
-
- var _items = [];
- var _empty = true;
-
- this.set_indent = function(level) {
- _character_count = parent.baseIndentLength + level * parent.indent_length;
- _indent_count = level;
- };
-
- this.get_character_count = function() {
- return _character_count;
- };
-
- this.is_empty = function() {
- return _empty;
- };
-
- this.last = function() {
- if (!this._empty) {
- return _items[_items.length - 1];
- } else {
- return null;
- }
- };
-
- this.push = function(input) {
- _items.push(input);
- _character_count += input.length;
- _empty = false;
- };
-
- this.pop = function() {
- var item = null;
- if (!_empty) {
- item = _items.pop();
- _character_count -= item.length;
- _empty = _items.length === 0;
- }
- return item;
- };
-
- this.remove_indent = function() {
- if (_indent_count > 0) {
- _indent_count -= 1;
- _character_count -= parent.indent_length;
- }
- };
-
- this.trim = function() {
- while (this.last() === ' ') {
- _items.pop();
- _character_count -= 1;
- }
- _empty = _items.length === 0;
- };
-
- this.toString = function() {
- var result = '';
- if (!this._empty) {
- if (_indent_count >= 0) {
- result = parent.indent_cache[_indent_count];
- }
- result += _items.join('');
- }
- return result;
- };
- }
-
- function Output(indent_string, baseIndentString) {
- baseIndentString = baseIndentString || '';
- this.indent_cache = [baseIndentString];
- this.baseIndentLength = baseIndentString.length;
- this.indent_length = indent_string.length;
- this.raw = false;
-
- var lines = [];
- this.baseIndentString = baseIndentString;
- this.indent_string = indent_string;
- this.previous_line = null;
- this.current_line = null;
- this.space_before_token = false;
-
- this.add_outputline = function() {
- this.previous_line = this.current_line;
- this.current_line = new OutputLine(this);
- lines.push(this.current_line);
- };
-
- // initialize
- this.add_outputline();
-
-
- this.get_line_number = function() {
- return lines.length;
- };
-
- // Using object instead of string to allow for later expansion of info about each line
- this.add_new_line = function(force_newline) {
- if (this.get_line_number() === 1 && this.just_added_newline()) {
- return false; // no newline on start of file
- }
-
- if (force_newline || !this.just_added_newline()) {
- if (!this.raw) {
- this.add_outputline();
- }
- return true;
- }
-
- return false;
- };
-
- this.get_code = function() {
- var sweet_code = lines.join('\n').replace(/[\r\n\t ]+$/, '');
- return sweet_code;
- };
-
- this.set_indent = function(level) {
- // Never indent your first output indent at the start of the file
- if (lines.length > 1) {
- while (level >= this.indent_cache.length) {
- this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string);
- }
-
- this.current_line.set_indent(level);
- return true;
- }
- this.current_line.set_indent(0);
- return false;
- };
-
- this.add_raw_token = function(token) {
- for (var x = 0; x < token.newlines; x++) {
- this.add_outputline();
- }
- this.current_line.push(token.whitespace_before);
- this.current_line.push(token.text);
- this.space_before_token = false;
- };
-
- this.add_token = function(printable_token) {
- this.add_space_before_token();
- this.current_line.push(printable_token);
- };
-
- this.add_space_before_token = function() {
- if (this.space_before_token && !this.just_added_newline()) {
- this.current_line.push(' ');
- }
- this.space_before_token = false;
- };
-
- this.remove_redundant_indentation = function(frame) {
- // This implementation is effective but has some issues:
- // - can cause line wrap to happen too soon due to indent removal
- // after wrap points are calculated
- // These issues are minor compared to ugly indentation.
-
- if (frame.multiline_frame ||
- frame.mode === MODE.ForInitializer ||
- frame.mode === MODE.Conditional) {
- return;
- }
-
- // remove one indent from each line inside this section
- var index = frame.start_line_index;
-
- var output_length = lines.length;
- while (index < output_length) {
- lines[index].remove_indent();
- index++;
- }
- };
-
- this.trim = function(eat_newlines) {
- eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
-
- this.current_line.trim(indent_string, baseIndentString);
-
- while (eat_newlines && lines.length > 1 &&
- this.current_line.is_empty()) {
- lines.pop();
- this.current_line = lines[lines.length - 1];
- this.current_line.trim();
- }
-
- this.previous_line = lines.length > 1 ? lines[lines.length - 2] : null;
- };
-
- this.just_added_newline = function() {
- return this.current_line.is_empty();
- };
-
- this.just_added_blankline = function() {
- if (this.just_added_newline()) {
- if (lines.length === 1) {
- return true; // start of the file and newline = blank
- }
-
- var line = lines[lines.length - 2];
- return line.is_empty();
- }
- return false;
- };
- }
-
-
- var Token = function(type, text, newlines, whitespace_before, parent) {
- this.type = type;
- this.text = text;
- this.comments_before = [];
- this.newlines = newlines || 0;
- this.wanted_newline = newlines > 0;
- this.whitespace_before = whitespace_before || '';
- this.parent = parent || null;
- this.opened = null;
- this.directives = null;
- };
-
- function tokenizer(input, opts) {
-
- var whitespace = "\n\r\t ".split('');
- var digit = /[0-9]/;
- var digit_bin = /[01]/;
- var digit_oct = /[01234567]/;
- var digit_hex = /[0123456789abcdefABCDEF]/;
-
- this.positionable_operators = '!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||'.split(' ');
- var punct = this.positionable_operators.concat(
- // non-positionable operators - these do not follow operator position settings
- '! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~'.split(' '));
-
- // words which should always start on new line.
- this.line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(',');
- var reserved_words = this.line_starters.concat(['do', 'in', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as']);
-
- // /* ... */ comment ends with nearest */ or end of file
- var block_comment_pattern = /([\s\S]*?)((?:\*\/)|$)/g;
-
- // comment ends just before nearest linefeed or end of file
- var comment_pattern = /([^\n\r\u2028\u2029]*)/g;
-
- var directives_block_pattern = /\/\* beautify( \w+[:]\w+)+ \*\//g;
- var directive_pattern = / (\w+)[:](\w+)/g;
- var directives_end_ignore_pattern = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g;
-
- var template_pattern = /((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;
-
- var n_newlines, whitespace_before_token, in_html_comment, tokens, parser_pos;
- var input_length;
-
- this.tokenize = function() {
- // cache the source's length.
- input_length = input.length;
- parser_pos = 0;
- in_html_comment = false;
- tokens = [];
-
- var next, last;
- var token_values;
- var open = null;
- var open_stack = [];
- var comments = [];
-
- while (!(last && last.type === 'TK_EOF')) {
- token_values = tokenize_next();
- next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token);
- while (next.type === 'TK_COMMENT' || next.type === 'TK_BLOCK_COMMENT' || next.type === 'TK_UNKNOWN') {
- if (next.type === 'TK_BLOCK_COMMENT') {
- next.directives = token_values[2];
- }
- comments.push(next);
- token_values = tokenize_next();
- next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token);
- }
-
- if (comments.length) {
- next.comments_before = comments;
- comments = [];
- }
-
- if (next.type === 'TK_START_BLOCK' || next.type === 'TK_START_EXPR') {
- next.parent = last;
- open_stack.push(open);
- open = next;
- } else if ((next.type === 'TK_END_BLOCK' || next.type === 'TK_END_EXPR') &&
- (open && (
- (next.text === ']' && open.text === '[') ||
- (next.text === ')' && open.text === '(') ||
- (next.text === '}' && open.text === '{')))) {
- next.parent = open.parent;
- next.opened = open;
-
- open = open_stack.pop();
- }
-
- tokens.push(next);
- last = next;
- }
-
- return tokens;
- };
-
- function get_directives(text) {
- if (!text.match(directives_block_pattern)) {
- return null;
- }
-
- var directives = {};
- directive_pattern.lastIndex = 0;
- var directive_match = directive_pattern.exec(text);
-
- while (directive_match) {
- directives[directive_match[1]] = directive_match[2];
- directive_match = directive_pattern.exec(text);
- }
-
- return directives;
- }
-
- function tokenize_next() {
- var resulting_string;
- var whitespace_on_this_line = [];
-
- n_newlines = 0;
- whitespace_before_token = '';
-
- if (parser_pos >= input_length) {
- return ['', 'TK_EOF'];
- }
-
- var last_token;
- if (tokens.length) {
- last_token = tokens[tokens.length - 1];
- } else {
- // For the sake of tokenizing we can pretend that there was on open brace to start
- last_token = new Token('TK_START_BLOCK', '{');
- }
-
-
- var c = input.charAt(parser_pos);
- parser_pos += 1;
-
- while (in_array(c, whitespace)) {
-
- if (acorn.newline.test(c)) {
- if (!(c === '\n' && input.charAt(parser_pos - 2) === '\r')) {
- n_newlines += 1;
- whitespace_on_this_line = [];
- }
- } else {
- whitespace_on_this_line.push(c);
- }
-
- if (parser_pos >= input_length) {
- return ['', 'TK_EOF'];
- }
-
- c = input.charAt(parser_pos);
- parser_pos += 1;
- }
-
- if (whitespace_on_this_line.length) {
- whitespace_before_token = whitespace_on_this_line.join('');
- }
-
- if (digit.test(c) || (c === '.' && digit.test(input.charAt(parser_pos)))) {
- var allow_decimal = true;
- var allow_e = true;
- var local_digit = digit;
-
- if (c === '0' && parser_pos < input_length && /[XxOoBb]/.test(input.charAt(parser_pos))) {
- // switch to hex/oct/bin number, no decimal or e, just hex/oct/bin digits
- allow_decimal = false;
- allow_e = false;
- if (/[Bb]/.test(input.charAt(parser_pos))) {
- local_digit = digit_bin;
- } else if (/[Oo]/.test(input.charAt(parser_pos))) {
- local_digit = digit_oct;
- } else {
- local_digit = digit_hex;
- }
- c += input.charAt(parser_pos);
- parser_pos += 1;
- } else if (c === '.') {
- // Already have a decimal for this literal, don't allow another
- allow_decimal = false;
- } else {
- // we know this first loop will run. It keeps the logic simpler.
- c = '';
- parser_pos -= 1;
- }
-
- // Add the digits
- while (parser_pos < input_length && local_digit.test(input.charAt(parser_pos))) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
-
- if (allow_decimal && parser_pos < input_length && input.charAt(parser_pos) === '.') {
- c += input.charAt(parser_pos);
- parser_pos += 1;
- allow_decimal = false;
- } else if (allow_e && parser_pos < input_length && /[Ee]/.test(input.charAt(parser_pos))) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
-
- if (parser_pos < input_length && /[+-]/.test(input.charAt(parser_pos))) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
- }
-
- allow_e = false;
- allow_decimal = false;
- }
- }
-
- return [c, 'TK_WORD'];
- }
-
- if (acorn.isIdentifierStart(input.charCodeAt(parser_pos - 1))) {
- if (parser_pos < input_length) {
- while (acorn.isIdentifierChar(input.charCodeAt(parser_pos))) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
- if (parser_pos === input_length) {
- break;
- }
- }
- }
-
- if (!(last_token.type === 'TK_DOT' ||
- (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['set', 'get']))) &&
- in_array(c, reserved_words)) {
- if (c === 'in') { // hack for 'in' operator
- return [c, 'TK_OPERATOR'];
- }
- return [c, 'TK_RESERVED'];
- }
-
- return [c, 'TK_WORD'];
- }
-
- if (c === '(' || c === '[') {
- return [c, 'TK_START_EXPR'];
- }
-
- if (c === ')' || c === ']') {
- return [c, 'TK_END_EXPR'];
- }
-
- if (c === '{') {
- return [c, 'TK_START_BLOCK'];
- }
-
- if (c === '}') {
- return [c, 'TK_END_BLOCK'];
- }
-
- if (c === ';') {
- return [c, 'TK_SEMICOLON'];
- }
-
- if (c === '/') {
- var comment = '';
- var comment_match;
- // peek for comment /* ... */
- if (input.charAt(parser_pos) === '*') {
- parser_pos += 1;
- block_comment_pattern.lastIndex = parser_pos;
- comment_match = block_comment_pattern.exec(input);
- comment = '/*' + comment_match[0];
- parser_pos += comment_match[0].length;
- var directives = get_directives(comment);
- if (directives && directives.ignore === 'start') {
- directives_end_ignore_pattern.lastIndex = parser_pos;
- comment_match = directives_end_ignore_pattern.exec(input);
- comment += comment_match[0];
- parser_pos += comment_match[0].length;
- }
- comment = comment.replace(acorn.allLineBreaks, '\n');
- return [comment, 'TK_BLOCK_COMMENT', directives];
- }
- // peek for comment // ...
- if (input.charAt(parser_pos) === '/') {
- parser_pos += 1;
- comment_pattern.lastIndex = parser_pos;
- comment_match = comment_pattern.exec(input);
- comment = '//' + comment_match[0];
- parser_pos += comment_match[0].length;
- return [comment, 'TK_COMMENT'];
- }
-
- }
-
- var startXmlRegExp = /^<([-a-zA-Z:0-9_.]+|{.+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{.+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.+?}))*\s*(\/?)\s*>/;
-
- if (c === '`' || c === "'" || c === '"' || // string
- (
- (c === '/') || // regexp
- (opts.e4x && c === "<" && input.slice(parser_pos - 1).match(startXmlRegExp)) // xml
- ) && ( // regex and xml can only appear in specific locations during parsing
- (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) ||
- (last_token.type === 'TK_END_EXPR' && last_token.text === ')' &&
- last_token.parent && last_token.parent.type === 'TK_RESERVED' && in_array(last_token.parent.text, ['if', 'while', 'for'])) ||
- (in_array(last_token.type, ['TK_COMMENT', 'TK_START_EXPR', 'TK_START_BLOCK',
- 'TK_END_BLOCK', 'TK_OPERATOR', 'TK_EQUALS', 'TK_EOF', 'TK_SEMICOLON', 'TK_COMMA'
- ]))
- )) {
-
- var sep = c,
- esc = false,
- has_char_escapes = false;
-
- resulting_string = c;
-
- if (sep === '/') {
- //
- // handle regexp
- //
- var in_char_class = false;
- while (parser_pos < input_length &&
- ((esc || in_char_class || input.charAt(parser_pos) !== sep) &&
- !acorn.newline.test(input.charAt(parser_pos)))) {
- resulting_string += input.charAt(parser_pos);
- if (!esc) {
- esc = input.charAt(parser_pos) === '\\';
- if (input.charAt(parser_pos) === '[') {
- in_char_class = true;
- } else if (input.charAt(parser_pos) === ']') {
- in_char_class = false;
- }
- } else {
- esc = false;
- }
- parser_pos += 1;
- }
- } else if (opts.e4x && sep === '<') {
- //
- // handle e4x xml literals
- //
-
- var xmlRegExp = /<(\/?)([-a-zA-Z:0-9_.]+|{.+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{.+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.+?}))*\s*(\/?)\s*>/g;
- var xmlStr = input.slice(parser_pos - 1);
- var match = xmlRegExp.exec(xmlStr);
- if (match && match.index === 0) {
- var rootTag = match[2];
- var depth = 0;
- while (match) {
- var isEndTag = !!match[1];
- var tagName = match[2];
- var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === "![CDATA[");
- if (tagName === rootTag && !isSingletonTag) {
- if (isEndTag) {
- --depth;
- } else {
- ++depth;
- }
- }
- if (depth <= 0) {
- break;
- }
- match = xmlRegExp.exec(xmlStr);
- }
- var xmlLength = match ? match.index + match[0].length : xmlStr.length;
- xmlStr = xmlStr.slice(0, xmlLength);
- parser_pos += xmlLength - 1;
- xmlStr = xmlStr.replace(acorn.allLineBreaks, '\n');
- return [xmlStr, "TK_STRING"];
- }
- } else {
- //
- // handle string
- //
- var parse_string = function(delimiter, allow_unescaped_newlines, start_sub) {
- // Template strings can travers lines without escape characters.
- // Other strings cannot
- var current_char;
- while (parser_pos < input_length) {
- current_char = input.charAt(parser_pos);
- if (!(esc || (current_char !== delimiter &&
- (allow_unescaped_newlines || !acorn.newline.test(current_char))))) {
- break;
- }
-
- // Handle \r\n linebreaks after escapes or in template strings
- if ((esc || allow_unescaped_newlines) && acorn.newline.test(current_char)) {
- if (current_char === '\r' && input.charAt(parser_pos + 1) === '\n') {
- parser_pos += 1;
- current_char = input.charAt(parser_pos);
- }
- resulting_string += '\n';
- } else {
- resulting_string += current_char;
- }
- if (esc) {
- if (current_char === 'x' || current_char === 'u') {
- has_char_escapes = true;
- }
- esc = false;
- } else {
- esc = current_char === '\\';
- }
-
- parser_pos += 1;
-
- if (start_sub && resulting_string.indexOf(start_sub, resulting_string.length - start_sub.length) !== -1) {
- if (delimiter === '`') {
- parse_string('}', allow_unescaped_newlines, '`');
- } else {
- parse_string('`', allow_unescaped_newlines, '${');
- }
- }
- }
- };
-
- if (sep === '`') {
- parse_string('`', true, '${');
- } else {
- parse_string(sep);
- }
- }
-
- if (has_char_escapes && opts.unescape_strings) {
- resulting_string = unescape_string(resulting_string);
- }
-
- if (parser_pos < input_length && input.charAt(parser_pos) === sep) {
- resulting_string += sep;
- parser_pos += 1;
-
- if (sep === '/') {
- // regexps may have modifiers /regexp/MOD , so fetch those, too
- // Only [gim] are valid, but if the user puts in garbage, do what we can to take it.
- while (parser_pos < input_length && acorn.isIdentifierStart(input.charCodeAt(parser_pos))) {
- resulting_string += input.charAt(parser_pos);
- parser_pos += 1;
- }
- }
- }
- return [resulting_string, 'TK_STRING'];
- }
-
- if (c === '#') {
-
- if (tokens.length === 0 && input.charAt(parser_pos) === '!') {
- // shebang
- resulting_string = c;
- while (parser_pos < input_length && c !== '\n') {
- c = input.charAt(parser_pos);
- resulting_string += c;
- parser_pos += 1;
- }
- return [trim(resulting_string) + '\n', 'TK_UNKNOWN'];
- }
-
-
-
- // Spidermonkey-specific sharp variables for circular references
- // https://developer.mozilla.org/En/Sharp_variables_in_JavaScript
- // http://mxr.mozilla.org/mozilla-central/source/js/src/jsscan.cpp around line 1935
- var sharp = '#';
- if (parser_pos < input_length && digit.test(input.charAt(parser_pos))) {
- do {
- c = input.charAt(parser_pos);
- sharp += c;
- parser_pos += 1;
- } while (parser_pos < input_length && c !== '#' && c !== '=');
- if (c === '#') {
- //
- } else if (input.charAt(parser_pos) === '[' && input.charAt(parser_pos + 1) === ']') {
- sharp += '[]';
- parser_pos += 2;
- } else if (input.charAt(parser_pos) === '{' && input.charAt(parser_pos + 1) === '}') {
- sharp += '{}';
- parser_pos += 2;
- }
- return [sharp, 'TK_WORD'];
- }
- }
-
- if (c === '<' && (input.charAt(parser_pos) === '?' || input.charAt(parser_pos) === '%')) {
- template_pattern.lastIndex = parser_pos - 1;
- var template_match = template_pattern.exec(input);
- if (template_match) {
- c = template_match[0];
- parser_pos += c.length - 1;
- c = c.replace(acorn.allLineBreaks, '\n');
- return [c, 'TK_STRING'];
- }
- }
-
- if (c === '<' && input.substring(parser_pos - 1, parser_pos + 3) === '') {
- in_html_comment = false;
- parser_pos += 2;
- return ['-->', 'TK_COMMENT'];
- }
-
- if (c === '.') {
- return [c, 'TK_DOT'];
- }
-
- if (in_array(c, punct)) {
- while (parser_pos < input_length && in_array(c + input.charAt(parser_pos), punct)) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
- if (parser_pos >= input_length) {
- break;
- }
- }
-
- if (c === ',') {
- return [c, 'TK_COMMA'];
- } else if (c === '=') {
- return [c, 'TK_EQUALS'];
- } else {
- return [c, 'TK_OPERATOR'];
- }
- }
-
- return [c, 'TK_UNKNOWN'];
- }
-
-
- function unescape_string(s) {
- var esc = false,
- out = '',
- pos = 0,
- s_hex = '',
- escaped = 0,
- c;
-
- while (esc || pos < s.length) {
-
- c = s.charAt(pos);
- pos++;
-
- if (esc) {
- esc = false;
- if (c === 'x') {
- // simple hex-escape \x24
- s_hex = s.substr(pos, 2);
- pos += 2;
- } else if (c === 'u') {
- // unicode-escape, \u2134
- s_hex = s.substr(pos, 4);
- pos += 4;
- } else {
- // some common escape, e.g \n
- out += '\\' + c;
- continue;
- }
- if (!s_hex.match(/^[0123456789abcdefABCDEF]+$/)) {
- // some weird escaping, bail out,
- // leaving whole string intact
- return s;
- }
-
- escaped = parseInt(s_hex, 16);
-
- if (escaped >= 0x00 && escaped < 0x20) {
- // leave 0x00...0x1f escaped
- if (c === 'x') {
- out += '\\x' + s_hex;
- } else {
- out += '\\u' + s_hex;
- }
- continue;
- } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) {
- // single-quote, apostrophe, backslash - escape these
- out += '\\' + String.fromCharCode(escaped);
- } else if (c === 'x' && escaped > 0x7e && escaped <= 0xff) {
- // we bail out on \x7f..\xff,
- // leaving whole string escaped,
- // as it's probably completely binary
- return s;
- } else {
- out += String.fromCharCode(escaped);
- }
- } else if (c === '\\') {
- esc = true;
- } else {
- out += c;
- }
- }
- return out;
- }
- }
-
-
- if (typeof define === "function" && define.amd) {
- // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )
- define([], function() {
- return { js_beautify: js_beautify };
- });
- } else if (typeof exports !== "undefined") {
- // Add support for CommonJS. Just put this file somewhere on your require.paths
- // and you will be able to `var js_beautify = require("beautify").js_beautify`.
- exports.js_beautify = js_beautify;
- } else if (typeof window !== "undefined") {
- // If we're running a web page and don't have either of the above, add our one global
- window.js_beautify = js_beautify;
- } else if (typeof global !== "undefined") {
- // If we don't even have window, try global.
- global.js_beautify = js_beautify;
- }
-
-}());
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-authorization-storage.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-authorization-storage.js
deleted file mode 100644
index 1847c09fe159..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-authorization-storage.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* global define, module, require, exports */
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define([], function () {
- return (nf.AuthorizationStorage = factory());
- });
- } else if (typeof exports === 'object' && typeof module === 'object') {
- module.exports = (nf.AuthorizationStorage = factory());
- } else {
- nf.AuthorizationStorage = factory();
- }
-}(this, function () {
- var TOKEN_ITEM_KEY = 'Access-Token-Expiration';
-
- var REQUEST_TOKEN_PATTERN = new RegExp('Request-Token=([^;]+)');
-
- return {
- /**
- * Get Request Token from document cookies
- *
- * @return Request Token string or null when not found
- */
- getRequestToken: function () {
- var requestToken = null;
- var requestTokenMatcher = REQUEST_TOKEN_PATTERN.exec(document.cookie);
- if (requestTokenMatcher) {
- requestToken = requestTokenMatcher[1];
- }
- return requestToken;
- },
-
- /**
- * Get Token from Session Storage
- *
- * @return Bearer Token string
- */
- getToken: function () {
- return sessionStorage.getItem(TOKEN_ITEM_KEY);
- },
-
- /**
- * Has Token returns the status of whether Session Storage contains the Token
- *
- * @return Boolean status of whether Session Storage contains the Token
- */
- hasToken: function () {
- var token = this.getToken();
- return typeof token === 'string';
- },
-
- /**
- * Remove Token from Session Storage
- *
- */
- removeToken: function () {
- sessionStorage.removeItem(TOKEN_ITEM_KEY);
- },
-
- /**
- * Set Token in Session Storage
- *
- * @param token Token String
- */
- setToken: function (token) {
- sessionStorage.setItem(TOKEN_ITEM_KEY, token);
- }
- };
-}));
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-namespace.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-namespace.js
deleted file mode 100644
index 7301e37f122b..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-namespace.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// register the nf namespace
-var nf;
-if (!nf)
- nf = {};
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-storage.js b/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-storage.js
deleted file mode 100644
index 155b84461c67..000000000000
--- a/nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/js/nf/nf-storage.js
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* global define, module, require, exports */
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define([], function () {
- return (nf.Storage = factory());
- });
- } else if (typeof exports === 'object' && typeof module === 'object') {
- module.exports = (nf.Storage = factory());
- } else {
- nf.Storage = factory();
- }
-}(this, function () {
-
- var disconnectionAcknowledged = false;
-
- // Store items for two days before being eligible for removal.
- var MILLIS_PER_DAY = 86400000;
- var TWO_DAYS = MILLIS_PER_DAY * 2;
-
- var isUndefined = function (obj) {
- return typeof obj === 'undefined';
- };
-
- var isNull = function (obj) {
- return obj === null;
- };
-
- var isDefinedAndNotNull = function (obj) {
- return !isUndefined(obj) && !isNull(obj);
- };
-
- /**
- * Checks the expiration for the specified entry.
- *
- * @param {object} entry
- * @returns {boolean}
- */
- var checkExpiration = function (entry) {
- if (isDefinedAndNotNull(entry.expires)) {
- // get the expiration
- var expires = new Date(entry.expires);
- var now = new Date();
-
- // return whether the expiration date has passed
- return expires.valueOf() < now.valueOf();
- } else {
- return false;
- }
- };
-
- /**
- * Gets an enty for the key. The entry expiration is not checked.
- *
- * @param {string} key
- */
- var getEntry = function (key) {
- try {
- // parse the entry
- var entry = JSON.parse(localStorage.getItem(key));
-
- // ensure the entry and item are present
- if (isDefinedAndNotNull(entry)) {
- return entry;
- } else {
- return null;
- }
- } catch (e) {
- return null;
- }
- };
-
- return {
- /**
- * Initializes the storage. Items will be persisted for two days. Once the scripts runs
- * thereafter, all eligible items will be removed. This strategy does not support persistence.
- */
- init: function () {
- for (var i = 0; i < localStorage.length; i++) {
- try {
- // get the next item
- var key = localStorage.key(i);
-
- // attempt to get the item which will expire if necessary
- this.getItem(key);
- } catch (e) {
- }
- }
- },
-
- acknowledgeDisconnection: function () {
- disconnectionAcknowledged = true;
- },
-
- resetDisconnectionAcknowledgement: function () {
- disconnectionAcknowledged = false;
- },
-
- isDisconnectionAcknowledged: function () {
- return disconnectionAcknowledged;
- },
-
- /**
- * Stores the specified item.
- *
- * @param {string} key
- * @param {object} item
- * @param {integer} expires
- */
- setItem: function (key, item, expires) {
- // calculate the expiration
- expires = isDefinedAndNotNull(expires) ? expires : new Date().valueOf() + TWO_DAYS;
-
- // create the entry
- var entry = {
- expires: expires,
- item: item
- };
-
- // store the item
- localStorage.setItem(key, JSON.stringify(entry));
- },
-
- /**
- * Returns whether there is an entry for this key. This will not check the expiration. If
- * the entry is expired, it will return null on a subsequent getItem invocation.
- *
- * @param {string} key
- * @returns {boolean}
- */
- hasItem: function (key) {
- return getEntry(key) !== null;
- },
-
- /**
- * Gets the item with the specified key. If an item with this key does
- * not exist, null is returned. If an item exists but cannot be parsed
- * or is malformed/unrecognized, null is returned.
- *
- * @param {type} key
- */
- getItem: function (key) {
- var entry = getEntry(key);
- if (entry === null) {
- return null;
- }
-
- // if the entry is expired, drop it and return null
- if (checkExpiration(entry)) {
- this.removeItem(key);
- return null;
- }
-
- // if the entry has the specified field return its value
- if (isDefinedAndNotNull(entry['item'])) {
- return entry['item'];
- } else {
- return null;
- }
- },
-
- /**
- * Gets the expiration for the specified item. This will not check the expiration. If
- * the entry is expired, it will return null on a subsequent getItem invocation.
- *
- * @param {string} key
- * @returns {integer}
- */
- getItemExpiration: function (key) {
- var entry = getEntry(key);
- if (entry === null) {
- return null;
- }
-
- // if the entry has the specified field return its value
- if (isDefinedAndNotNull(entry['expires'])) {
- return entry['expires'];
- } else {
- return null;
- }
- },
-
- /**
- * Removes the item with the specified key.
- *
- * @param {type} key
- */
- removeItem: function (key) {
- localStorage.removeItem(key);
- }
- };
-}));
\ No newline at end of file
diff --git a/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/web.xml b/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/web.xml
index 80e769fc3aad..0418cf5d0a18 100644
--- a/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/web.xml
+++ b/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/web.xml
@@ -40,10 +40,6 @@
worksheet
- /configure
+
-
-
- configure
-
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java
index 79ac0548e951..66977cb17f48 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java
@@ -156,7 +156,7 @@ public ControllerServiceDTO populateRemainingControllerServiceContent(final Cont
final List uiExtensions = uiExtensionMapping.getUiExtension(controllerService.getType(), bundle.getGroup(), bundle.getArtifact(), bundle.getVersion());
for (final UiExtension uiExtension : uiExtensions) {
if (UiExtensionType.ControllerServiceConfiguration.equals(uiExtension.getExtensionType())) {
- controllerService.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath(), "configure"));
+ controllerService.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath()));
}
}
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterProviderResource.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterProviderResource.java
index 37892bfb90d4..44bec487e0fe 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterProviderResource.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterProviderResource.java
@@ -217,7 +217,7 @@ public ParameterProviderDTO populateRemainingParameterProviderContent(final Para
final List uiExtensions = uiExtensionMapping.getUiExtension(parameterProvider.getType(), bundle.getGroup(), bundle.getArtifact(), bundle.getVersion());
for (final UiExtension uiExtension : uiExtensions) {
if (UiExtensionType.ParameterProviderConfiguration.equals(uiExtension.getExtensionType())) {
- parameterProvider.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath(), "configure"));
+ parameterProvider.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath()));
}
}
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessorResource.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessorResource.java
index f70bd98b80bc..01aeaf282c3f 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessorResource.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessorResource.java
@@ -173,7 +173,7 @@ public ProcessorDTO populateRemainingProcessorContent(ProcessorDTO processor) {
final List uiExtensions = uiExtensionMapping.getUiExtension(processor.getType(), bundle.getGroup(), bundle.getArtifact(), bundle.getVersion());
for (final UiExtension uiExtension : uiExtensions) {
if (UiExtensionType.ProcessorConfiguration.equals(uiExtension.getExtensionType())) {
- config.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath(), "configure"));
+ config.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath()));
}
}
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
index bf900575b5a6..e884454cd37f 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
@@ -149,7 +149,7 @@ public ReportingTaskDTO populateRemainingReportingTaskContent(final ReportingTas
final List uiExtensions = uiExtensionMapping.getUiExtension(reportingTask.getType(), bundle.getGroup(), bundle.getArtifact(), bundle.getVersion());
for (final UiExtension uiExtension : uiExtensions) {
if (UiExtensionType.ReportingTaskConfiguration.equals(uiExtension.getExtensionType())) {
- reportingTask.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath(), "configure"));
+ reportingTask.setCustomUiUrl(generateExternalUiUri(uiExtension.getContextPath()));
}
}
}
diff --git a/nifi-frontend/pom.xml b/nifi-frontend/pom.xml
index 8e7bf11f30e5..d5179e5720f3 100644
--- a/nifi-frontend/pom.xml
+++ b/nifi-frontend/pom.xml
@@ -152,6 +152,25 @@
+
+ bundle-built-nifi-jolt-transform-ui-app
+ prepare-package
+
+ copy-resources
+
+
+ ${project.build.outputDirectory}/nifi-jolt-transform-ui
+
+
+ ${project.build.directory}/${project.build.finalName}/nifi-jolt-transform-ui
+ false
+
+ **/*
+
+
+
+
+
diff --git a/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.module.ts b/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.module.ts
index 2906667ecad6..b15074aba1b1 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.module.ts
+++ b/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.module.ts
@@ -53,7 +53,6 @@ if (disableAnimations !== 'true' && disableAnimations !== 'false') {
routerState: RouterState.Minimal,
navigationActionTiming: NavigationActionTiming.PostActivation
}),
-
EffectsModule.forRoot(),
StoreDevtoolsModule.instrument({
maxAge: 25,
diff --git a/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/pages/jolt-transform-json-ui/service/jolt-transform-json-ui.service.ts b/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/pages/jolt-transform-json-ui/service/jolt-transform-json-ui.service.ts
index e5b22d5b716f..ff5690b8f353 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/pages/jolt-transform-json-ui/service/jolt-transform-json-ui.service.ts
+++ b/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/pages/jolt-transform-json-ui/service/jolt-transform-json-ui.service.ts
@@ -34,7 +34,7 @@ export class JoltTransformJsonUiService {
saveProperties(request: SavePropertiesRequest): Observable {
const params = new HttpParams()
.set('processorId', request.processorId)
- .set('revision', request.revision)
+ .set('revisionId', request.revision)
.set('clientId', request.clientId)
.set('disconnectedNodeAcknowledged', request.disconnectedNodeAcknowledged);
diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/connection/create-connection/create-connection.component.spec.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/connection/create-connection/create-connection.component.spec.ts
index 4ae2d92043d0..0825a9af71e6 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/connection/create-connection/create-connection.component.spec.ts
+++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/connection/create-connection/create-connection.component.spec.ts
@@ -254,7 +254,7 @@ describe('CreateConnection', () => {
concurrentlySchedulableTaskCount: 1,
autoTerminatedRelationships: [],
comments: '',
- customUiUrl: '/nifi-update-attribute-ui-2.0.0-SNAPSHOT/configure',
+ customUiUrl: '/nifi-update-attribute-ui-2.0.0-SNAPSHOT',
lossTolerant: false,
defaultConcurrentTasks: {
TIMER_DRIVEN: '1',
diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/advanced-ui/advanced-ui.component.html b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/advanced-ui/advanced-ui.component.html
index a9c53a197de0..7880b0c78604 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/advanced-ui/advanced-ui.component.html
+++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/advanced-ui/advanced-ui.component.html
@@ -19,7 +19,7 @@
-