Add rollup-plugin-minify-html-template-literals to node_modules
R=jacktfranklin@chromium.org
Bug: 1213034
Change-Id: I5da8225f60b53870a1c67d6b5d02a464c08f4eb2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2917088
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
diff --git a/node_modules/clean-css/lib/utils/clone-array.js b/node_modules/clean-css/lib/utils/clone-array.js
new file mode 100644
index 0000000..b95ee68
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/clone-array.js
@@ -0,0 +1,12 @@
+function cloneArray(array) {
+ var cloned = array.slice(0);
+
+ for (var i = 0, l = cloned.length; i < l; i++) {
+ if (Array.isArray(cloned[i]))
+ cloned[i] = cloneArray(cloned[i]);
+ }
+
+ return cloned;
+}
+
+module.exports = cloneArray;
diff --git a/node_modules/clean-css/lib/utils/format-position.js b/node_modules/clean-css/lib/utils/format-position.js
new file mode 100644
index 0000000..0e3713c
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/format-position.js
@@ -0,0 +1,11 @@
+function formatPosition(metadata) {
+ var line = metadata[0];
+ var column = metadata[1];
+ var source = metadata[2];
+
+ return source ?
+ source + ':' + line + ':' + column :
+ line + ':' + column;
+}
+
+module.exports = formatPosition;
diff --git a/node_modules/clean-css/lib/utils/has-protocol.js b/node_modules/clean-css/lib/utils/has-protocol.js
new file mode 100644
index 0000000..fa1b61f
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/has-protocol.js
@@ -0,0 +1,7 @@
+var NO_PROTOCOL_RESOURCE_PATTERN = /^\/\//;
+
+function hasProtocol(uri) {
+ return !NO_PROTOCOL_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = hasProtocol;
diff --git a/node_modules/clean-css/lib/utils/is-data-uri-resource.js b/node_modules/clean-css/lib/utils/is-data-uri-resource.js
new file mode 100644
index 0000000..5855811
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/is-data-uri-resource.js
@@ -0,0 +1,7 @@
+var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
+
+function isDataUriResource(uri) {
+ return DATA_URI_PATTERN.test(uri);
+}
+
+module.exports = isDataUriResource;
diff --git a/node_modules/clean-css/lib/utils/is-http-resource.js b/node_modules/clean-css/lib/utils/is-http-resource.js
new file mode 100644
index 0000000..5179c2e
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/is-http-resource.js
@@ -0,0 +1,7 @@
+var HTTP_RESOURCE_PATTERN = /^http:\/\//;
+
+function isHttpResource(uri) {
+ return HTTP_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = isHttpResource;
diff --git a/node_modules/clean-css/lib/utils/is-https-resource.js b/node_modules/clean-css/lib/utils/is-https-resource.js
new file mode 100644
index 0000000..c6938f5
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/is-https-resource.js
@@ -0,0 +1,7 @@
+var HTTPS_RESOURCE_PATTERN = /^https:\/\//;
+
+function isHttpsResource(uri) {
+ return HTTPS_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = isHttpsResource;
diff --git a/node_modules/clean-css/lib/utils/is-import.js b/node_modules/clean-css/lib/utils/is-import.js
new file mode 100644
index 0000000..72abc32
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/is-import.js
@@ -0,0 +1,7 @@
+var IMPORT_PREFIX_PATTERN = /^@import/i;
+
+function isImport(value) {
+ return IMPORT_PREFIX_PATTERN.test(value);
+}
+
+module.exports = isImport;
diff --git a/node_modules/clean-css/lib/utils/is-remote-resource.js b/node_modules/clean-css/lib/utils/is-remote-resource.js
new file mode 100644
index 0000000..fb3b61f
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/is-remote-resource.js
@@ -0,0 +1,7 @@
+var REMOTE_RESOURCE_PATTERN = /^(\w+:\/\/|\/\/)/;
+
+function isRemoteResource(uri) {
+ return REMOTE_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = isRemoteResource;
diff --git a/node_modules/clean-css/lib/utils/natural-compare.js b/node_modules/clean-css/lib/utils/natural-compare.js
new file mode 100644
index 0000000..7a52467
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/natural-compare.js
@@ -0,0 +1,31 @@
+// adapted from http://nedbatchelder.com/blog/200712.html#e20071211T054956
+
+var NUMBER_PATTERN = /([0-9]+)/;
+
+function naturalCompare(value1, value2) {
+ var keys1 = ('' + value1).split(NUMBER_PATTERN).map(tryParseInt);
+ var keys2 = ('' + value2).split(NUMBER_PATTERN).map(tryParseInt);
+ var key1;
+ var key2;
+ var compareFirst = Math.min(keys1.length, keys2.length);
+ var i, l;
+
+ for (i = 0, l = compareFirst; i < l; i++) {
+ key1 = keys1[i];
+ key2 = keys2[i];
+
+ if (key1 != key2) {
+ return key1 > key2 ? 1 : -1;
+ }
+ }
+
+ return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1);
+}
+
+function tryParseInt(value) {
+ return ('' + parseInt(value)) == value ?
+ parseInt(value) :
+ value;
+}
+
+module.exports = naturalCompare;
diff --git a/node_modules/clean-css/lib/utils/override.js b/node_modules/clean-css/lib/utils/override.js
new file mode 100644
index 0000000..e7f8494
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/override.js
@@ -0,0 +1,34 @@
+function override(source1, source2) {
+ var target = {};
+ var key1;
+ var key2;
+ var item;
+
+ for (key1 in source1) {
+ item = source1[key1];
+
+ if (Array.isArray(item)) {
+ target[key1] = item.slice(0);
+ } else if (typeof item == 'object' && item !== null) {
+ target[key1] = override(item, {});
+ } else {
+ target[key1] = item;
+ }
+ }
+
+ for (key2 in source2) {
+ item = source2[key2];
+
+ if (key2 in target && Array.isArray(item)) {
+ target[key2] = item.slice(0);
+ } else if (key2 in target && typeof item == 'object' && item !== null) {
+ target[key2] = override(target[key2], item);
+ } else {
+ target[key2] = item;
+ }
+ }
+
+ return target;
+}
+
+module.exports = override;
diff --git a/node_modules/clean-css/lib/utils/split.js b/node_modules/clean-css/lib/utils/split.js
new file mode 100644
index 0000000..c916255
--- /dev/null
+++ b/node_modules/clean-css/lib/utils/split.js
@@ -0,0 +1,50 @@
+var Marker = require('../tokenizer/marker');
+
+function split(value, separator) {
+ var openLevel = Marker.OPEN_ROUND_BRACKET;
+ var closeLevel = Marker.CLOSE_ROUND_BRACKET;
+ var level = 0;
+ var cursor = 0;
+ var lastStart = 0;
+ var lastValue;
+ var lastCharacter;
+ var len = value.length;
+ var parts = [];
+
+ if (value.indexOf(separator) == -1) {
+ return [value];
+ }
+
+ if (value.indexOf(openLevel) == -1) {
+ return value.split(separator);
+ }
+
+ while (cursor < len) {
+ if (value[cursor] == openLevel) {
+ level++;
+ } else if (value[cursor] == closeLevel) {
+ level--;
+ }
+
+ if (level === 0 && cursor > 0 && cursor + 1 < len && value[cursor] == separator) {
+ parts.push(value.substring(lastStart, cursor));
+ lastStart = cursor + 1;
+ }
+
+ cursor++;
+ }
+
+ if (lastStart < cursor + 1) {
+ lastValue = value.substring(lastStart);
+ lastCharacter = lastValue[lastValue.length - 1];
+ if (lastCharacter == separator) {
+ lastValue = lastValue.substring(0, lastValue.length - 1);
+ }
+
+ parts.push(lastValue);
+ }
+
+ return parts;
+}
+
+module.exports = split;