@paulirish/trace_engine 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/platform/{array-utilities.js → ArrayUtilities.js} +1 -1
- package/core/platform/ArrayUtilities.js.map +1 -0
- package/core/platform/{brand.js → Brand.js} +1 -1
- package/core/platform/{brand.js.map → Brand.js.map} +1 -1
- package/core/platform/{dom-utilities.js → DOMUtilities.js} +1 -1
- package/core/platform/DOMUtilities.js.map +1 -0
- package/core/platform/{date-utilities.js → DateUtilities.js} +1 -1
- package/core/platform/DateUtilities.js.map +1 -0
- package/core/platform/DevToolsPath.d.ts +1 -1
- package/core/platform/DevToolsPath.js.map +1 -1
- package/core/platform/{keyboard-utilities.js → KeyboardUtilities.js} +1 -1
- package/core/platform/KeyboardUtilities.js.map +1 -0
- package/core/platform/{map-utilities.js → MapUtilities.js} +1 -1
- package/core/platform/MapUtilities.js.map +1 -0
- package/core/platform/{number-utilities.js → NumberUtilities.js} +1 -1
- package/core/platform/NumberUtilities.js.map +1 -0
- package/core/platform/{promise-utilities.js → PromiseUtilities.js} +1 -1
- package/core/platform/PromiseUtilities.js.map +1 -0
- package/core/platform/{set-utilities.js → SetUtilities.js} +1 -1
- package/core/platform/SetUtilities.js.map +1 -0
- package/core/platform/{string-utilities.js → StringUtilities.js} +4 -4
- package/core/platform/StringUtilities.js.map +1 -0
- package/core/platform/Timing.d.ts +1 -1
- package/core/platform/Timing.js.map +1 -1
- package/core/platform/{typescript-utilities.js → TypescriptUtilities.js} +1 -1
- package/core/platform/TypescriptUtilities.js.map +1 -0
- package/core/platform/UIString.d.ts +1 -1
- package/core/platform/UIString.js.map +1 -1
- package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/core/platform/platform-tsconfig.json +12 -18
- package/core/platform/platform.d.ts +12 -13
- package/core/platform/platform.js +16 -17
- package/core/platform/platform.js.map +1 -1
- package/generated/protocol.d.ts +90 -29
- package/models/cpu_profile/cpu_profile-tsconfig.json +1 -2
- package/models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/EntriesFilter.d.ts +4 -0
- package/models/trace/EntriesFilter.js +29 -6
- package/models/trace/EntriesFilter.js.map +1 -1
- package/models/trace/ModelImpl.d.ts +3 -0
- package/models/trace/ModelImpl.js +10 -2
- package/models/trace/ModelImpl.js.map +1 -1
- package/models/trace/Processor.d.ts +3 -1
- package/models/trace/Processor.js +50 -5
- package/models/trace/Processor.js.map +1 -1
- package/models/trace/TracingManager.js.map +1 -1
- package/models/trace/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/extras/FetchNodes.d.ts +10 -3
- package/models/trace/extras/FetchNodes.js +14 -1
- package/models/trace/extras/FetchNodes.js.map +1 -1
- package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/extras/extras-tsconfig.json +1 -2
- package/models/trace/handlers/NetworkRequestsHandler.js +5 -0
- package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
- package/models/trace/handlers/RendererHandler.js +2 -1
- package/models/trace/handlers/RendererHandler.js.map +1 -1
- package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/handlers/handlers-tsconfig.json +1 -2
- package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/helpers/helpers-tsconfig.json +1 -2
- package/models/trace/insights/InsightRunners.d.ts +1 -0
- package/models/trace/insights/InsightRunners.js +5 -0
- package/models/trace/insights/InsightRunners.js.map +1 -0
- package/models/trace/insights/RenderBlocking.d.ts +6 -0
- package/models/trace/insights/RenderBlocking.js +42 -0
- package/models/trace/insights/RenderBlocking.js.map +1 -0
- package/models/trace/insights/bundle-tsconfig.json +1 -0
- package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +43 -0
- package/models/trace/insights/insights-tsconfig.json +45 -0
- package/models/trace/insights/insights.d.ts +2 -0
- package/models/trace/insights/insights.js +6 -0
- package/models/trace/insights/insights.js.map +1 -0
- package/models/trace/insights/types.d.ts +45 -0
- package/models/trace/insights/types.js +8 -0
- package/models/trace/insights/types.js.map +1 -0
- package/models/trace/root-causes/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/root-causes/root-causes-tsconfig.json +1 -2
- package/models/trace/trace-tsconfig.json +4 -2
- package/models/trace/trace.d.ts +2 -1
- package/models/trace/trace.js +2 -1
- package/models/trace/trace.js.map +1 -1
- package/models/trace/types/Timing.js +0 -3
- package/models/trace/types/Timing.js.map +1 -1
- package/models/trace/types/TraceEvents.d.ts +24 -0
- package/models/trace/types/TraceEvents.js.map +1 -1
- package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +1 -2
- package/models/trace/types/types-tsconfig.json +1 -2
- package/package.json +6 -8
- package/LICENSE +0 -27
- package/PAUL.readme.md +0 -5
- package/README.md +0 -156
- package/analyze-trace.mjs +0 -184
- package/core/platform/array-utilities.js.map +0 -1
- package/core/platform/date-utilities.js.map +0 -1
- package/core/platform/dcheck-tsconfig.json +0 -8
- package/core/platform/dcheck.d.ts +0 -4
- package/core/platform/dcheck.js +0 -5
- package/core/platform/dom-utilities.js.map +0 -1
- package/core/platform/keyboard-utilities.js.map +0 -1
- package/core/platform/map-utilities.js.map +0 -1
- package/core/platform/number-utilities.js.map +0 -1
- package/core/platform/promise-utilities.js.map +0 -1
- package/core/platform/set-utilities.js.map +0 -1
- package/core/platform/string-utilities.js.map +0 -1
- package/core/platform/typescript-utilities.js.map +0 -1
- package/test/invalid-animation-events.json.gz +0 -0
- package/test/test-trace-engine.mjs +0 -52
- /package/core/platform/{array-utilities.d.ts → ArrayUtilities.d.ts} +0 -0
- /package/core/platform/{brand.d.ts → Brand.d.ts} +0 -0
- /package/core/platform/{dom-utilities.d.ts → DOMUtilities.d.ts} +0 -0
- /package/core/platform/{date-utilities.d.ts → DateUtilities.d.ts} +0 -0
- /package/core/platform/{keyboard-utilities.d.ts → KeyboardUtilities.d.ts} +0 -0
- /package/core/platform/{map-utilities.d.ts → MapUtilities.d.ts} +0 -0
- /package/core/platform/{number-utilities.d.ts → NumberUtilities.d.ts} +0 -0
- /package/core/platform/{promise-utilities.d.ts → PromiseUtilities.d.ts} +0 -0
- /package/core/platform/{set-utilities.d.ts → SetUtilities.d.ts} +0 -0
- /package/core/platform/{string-utilities.d.ts → StringUtilities.d.ts} +0 -0
- /package/core/platform/{typescript-utilities.d.ts → TypescriptUtilities.d.ts} +0 -0
|
@@ -196,4 +196,4 @@ export function nearestIndexFromEnd(arr, predicate) {
|
|
|
196
196
|
export function arrayDoesNotContainNullOrUndefined(arr) {
|
|
197
197
|
return !arr.includes(null) && !arr.includes(undefined);
|
|
198
198
|
}
|
|
199
|
-
//# sourceMappingURL=
|
|
199
|
+
//# sourceMappingURL=ArrayUtilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/ArrayUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,KAAU,EAAE,OAAU,EAAE,SAAmB,EAAW,EAAE;IACvF,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,OAAO,KAAK,CAAC;KACd;IACD,IAAI,SAAS,EAAE;QACb,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;KACb;IACD,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;QACpD,IAAI,KAAK,CAAC,CAAC,CAAC,K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AAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1D;aAAM;YACL,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC5D;KACF,QAAQ,KAAK,KAAK,IAAI,EAAE;IAEzB,kEAAkE;IAClE,iEAAiE;IACjE,aAAa;IACb,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;QACzB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CAAI,GAAQ,EAAE,SAAoC;IACzF,OAAO,YAAY,CAAC,GAAG,EAAE,SAAS,iDAA+B,CAAC;AACpE,CAAC;AAED;;;;;;;;GAQG;AAEH,MAAM,UAAU,mBAAmB,CAAI,GAAiB,EAAE,SAAoC;IAC5F,OAAO,YAAY,CAAC,GAAG,EAAE,SAAS,qCAAyB,CAAC;AAC9D,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,kCAAkC,CAAI,GAAyB;IAC7E,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACzD,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const removeElement = <T>(array: T[], element: T, firstOnly?: boolean): boolean => {\n let index = array.indexOf(element);\n if (index === -1) {\n return false;\n }\n if (firstOnly) {\n array.splice(index, 1);\n return true;\n }\n for (let i = index + 1, n = array.length; i < n; ++i) {\n if (array[i] !== element) {\n array[index++] = array[i];\n }\n }\n array.length = index;\n return true;\n};\n\ntype NumberComparator = (a: number, b: number) => number;\n\nfunction swap(array: number[], i1: number, i2: number): void {\n const temp = array[i1];\n array[i1] = array[i2];\n array[i2] = temp;\n}\n\nfunction partition(\n array: number[], comparator: NumberComparator, left: number, right: number, pivotIndex: number): number {\n const pivotValue = array[pivotIndex];\n swap(array, right, pivotIndex);\n let storeIndex = left;\n for (let i = left; i < right; ++i) {\n if (comparator(array[i], pivotValue) < 0) {\n swap(array, storeIndex, i);\n ++storeIndex;\n }\n }\n swap(array, right, storeIndex);\n return storeIndex;\n}\n\nfunction quickSortRange(\n array: number[], comparator: NumberComparator, left: number, right: number, sortWindowLeft: number,\n sortWindowRight: number): void {\n if (right <= left) {\n return;\n }\n const pivotIndex = Math.floor(Math.random() * (right - left)) + left;\n const pivotNewIndex = partition(array, comparator, left, right, pivotIndex);\n if (sortWindowLeft < pivotNewIndex) {\n quickSortRange(array, comparator, left, pivotNewIndex - 1, sortWindowLeft, sortWindowRight);\n }\n if (pivotNewIndex < sortWindowRight) {\n quickSortRange(array, comparator, pivotNewIndex + 1, right, sortWindowLeft, sortWindowRight);\n }\n}\n\nexport function sortRange(\n array: number[], comparator: NumberComparator, leftBound: number, rightBound: number, sortWindowLeft: number,\n sortWindowRight: number): number[] {\n if (leftBound === 0 && rightBound === (array.length - 1) && sortWindowLeft === 0 && sortWindowRight >= rightBound) {\n array.sort(comparator);\n } else {\n quickSortRange(array, comparator, leftBound, rightBound, sortWindowLeft, sortWindowRight);\n }\n return array;\n}\nexport const binaryIndexOf = <T, S>(array: T[], value: S, comparator: (a: S, b: T) => number): number => {\n const index = lowerBound(array, value, comparator);\n return index < array.length && comparator(value, array[index]) === 0 ? index : -1;\n};\n\nfunction mergeOrIntersect<T>(\n array1: T[], array2: T[], comparator: (a: T, b: T) => number, mergeNotIntersect: boolean): T[] {\n const result = [];\n let i = 0;\n let j = 0;\n while (i < array1.length && j < array2.length) {\n const compareValue = comparator(array1[i], array2[j]);\n if (mergeNotIntersect || !compareValue) {\n result.push(compareValue <= 0 ? array1[i] : array2[j]);\n }\n if (compareValue <= 0) {\n i++;\n }\n if (compareValue >= 0) {\n j++;\n }\n }\n if (mergeNotIntersect) {\n while (i < array1.length) {\n result.push(array1[i++]);\n }\n while (j < array2.length) {\n result.push(array2[j++]);\n }\n }\n return result;\n}\n\nexport const intersectOrdered = <T>(array1: T[], array2: T[], comparator: (a: T, b: T) => number): T[] => {\n return mergeOrIntersect(array1, array2, comparator, false);\n};\n\nexport const mergeOrdered = <T>(array1: T[], array2: T[], comparator: (a: T, b: T) => number): T[] => {\n return mergeOrIntersect(array1, array2, comparator, true);\n};\n\nexport const DEFAULT_COMPARATOR = (a: string|number, b: string|number): -1|0|1 => {\n return a < b ? -1 : (a > b ? 1 : 0);\n};\n\n/**\n * Returns the index of the element closest to the needle that is equal to or\n * greater than it. Assumes that the provided array is sorted.\n *\n * If no element is found, the right bound is returned.\n *\n * Uses the provided comparator function to determine if two items are equal or\n * if one is greater than the other. If you are working with strings or\n * numbers, you can use ArrayUtilities.DEFAULT_COMPARATOR. Otherwise, you\n * should define one that takes the needle element and an element from the\n * array and returns a positive or negative number to indicate which is greater\n * than the other.\n *\n * When specified, |left| (inclusive) and |right| (exclusive) indices\n * define the search window.\n */\nexport function lowerBound<T>(\n array: Uint32Array|Int32Array, needle: T, comparator: (needle: T, b: number) => number, left?: number,\n right?: number): number;\nexport function lowerBound<S, T>(\n array: S[], needle: T, comparator: (needle: T, b: S) => number, left?: number, right?: number): number;\nexport function lowerBound<S, T>(\n array: readonly S[], needle: T, comparator: (needle: T, b: S) => number, left?: number, right?: number): number;\nexport function lowerBound<S, T, A extends S[]>(\n array: A, needle: T, comparator: (needle: T, b: S) => number, left?: number, right?: number): number {\n let l = left || 0;\n let r = right !== undefined ? right : array.length;\n while (l < r) {\n const m = (l + r) >> 1;\n if (comparator(needle, array[m]) > 0) {\n l = m + 1;\n } else {\n r = m;\n }\n }\n return r;\n}\n\n/**\n * Returns the index of the element closest to the needle that is greater than\n * it. Assumes that the provided array is sorted.\n *\n * If no element is found, the right bound is returned.\n *\n * Uses the provided comparator function to determine if two items are equal or\n * if one is greater than the other. If you are working with strings or\n * numbers, you can use ArrayUtilities.DEFAULT_COMPARATOR. Otherwise, you\n * should define one that takes the needle element and an element from the\n * array and returns a positive or negative number to indicate which is greater\n * than the other.\n *\n * When specified, |left| (inclusive) and |right| (exclusive) indices\n * define the search window.\n */\nexport function upperBound<T>(\n array: Uint32Array, needle: T, comparator: (needle: T, b: number) => number, left?: number, right?: number): number;\nexport function upperBound<S, T>(\n array: S[], needle: T, comparator: (needle: T, b: S) => number, left?: number, right?: number): number;\nexport function upperBound<S, T, A extends S[]>(\n array: A, needle: T, comparator: (needle: T, b: S) => number, left?: number, right?: number): number {\n let l = left || 0;\n let r = right !== undefined ? right : array.length;\n while (l < r) {\n const m = (l + r) >> 1;\n if (comparator(needle, array[m]) >= 0) {\n l = m + 1;\n } else {\n r = m;\n }\n }\n return r;\n}\n\nconst enum NearestSearchStart {\n BEGINNING = 'BEGINNING',\n END = 'END',\n}\n/**\n * Obtains the first or last item in the array that satisfies the predicate function.\n * So, for example, if the array were arr = [2, 4, 6, 8, 10], and you are looking for\n * the last item arr[i] such that arr[i] < 5 you would be returned 1, because\n * array[1] is 4, the last item in the array that satisfies the\n * predicate function.\n *\n * If instead you were looking for the first item in the same array that satisfies\n * arr[i] > 5 you would be returned 2 because array[2] = 6.\n *\n * Please note: this presupposes that the array is already ordered.\n */\nfunction nearestIndex<T>(\n arr: readonly T[], predicate: (arrayItem: T) => boolean, searchStart: NearestSearchStart): number|null {\n const searchFromEnd = searchStart === NearestSearchStart.END;\n if (arr.length === 0) {\n return null;\n }\n\n let left = 0;\n let right = arr.length - 1;\n let pivot = 0;\n let matchesPredicate = false;\n let moveToTheRight = false;\n let middle = 0;\n do {\n middle = left + (right - left) / 2;\n pivot = searchFromEnd ? Math.ceil(middle) : Math.floor(middle);\n matchesPredicate = predicate(arr[pivot]);\n moveToTheRight = matchesPredicate === searchFromEnd;\n if (moveToTheRight) {\n left = Math.min(right, pivot + (left === pivot ? 1 : 0));\n } else {\n right = Math.max(left, pivot + (right === pivot ? -1 : 0));\n }\n } while (right !== left);\n\n // Special-case: the indexed item doesn't pass the predicate. This\n // occurs when none of the items in the array are a match for the\n // predicate.\n if (!predicate(arr[left])) {\n return null;\n }\n return left;\n}\n\n/**\n * Obtains the first item in the array that satisfies the predicate function.\n * So, for example, if the array was arr = [2, 4, 6, 8, 10], and you are looking for\n * the first item arr[i] such that arr[i] > 5 you would be returned 2, because\n * array[2] is 6, the first item in the array that satisfies the\n * predicate function.\n *\n * Please note: this presupposes that the array is already ordered.\n */\nexport function nearestIndexFromBeginning<T>(arr: T[], predicate: (arrayItem: T) => boolean): number|null {\n return nearestIndex(arr, predicate, NearestSearchStart.BEGINNING);\n}\n\n/**\n * Obtains the last item in the array that satisfies the predicate function.\n * So, for example, if the array was arr = [2, 4, 6, 8, 10], and you are looking for\n * the last item arr[i] such that arr[i] < 5 you would be returned 1, because\n * arr[1] is 4, the last item in the array that satisfies the\n * predicate function.\n *\n * Please note: this presupposes that the array is already ordered.\n */\n\nexport function nearestIndexFromEnd<T>(arr: readonly T[], predicate: (arrayItem: T) => boolean): number|null {\n return nearestIndex(arr, predicate, NearestSearchStart.END);\n}\n\n// Type guard for ensuring that `arr` does not contain null or undefined\nexport function arrayDoesNotContainNullOrUndefined<T>(arr: (T|null|undefined)[]): arr is T[] {\n return !arr.includes(null) && !arr.includes(undefined);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"Brand.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/Brand.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Helper type to introduce new branded types.\n *\n * `Base` is the underlying data type and `Tag` must be unique symbol/string.\n *\n * Usage:\n * ```\n * type LineNumber = Brand<number, \"LineNumber\">;\n * type RawUrl = Brand<string, \"RawUrl\">;\n * ```\n */\nexport type Brand<Base, Tag> = Base&{_tag: Tag};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DOMUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/DOMUtilities.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAa;IAC7C,IAAI,aAAa,GAAiB,GAAG,CAAC,aAAa,CAAC;IACpD,OAAO,aAAa,IAAI,aAAa,CAAC,UAAU,IAAI,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE;QAC1F,aAAa,GAAG,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;KACxD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,IAAU;IACtD,IAAI,UAAU,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAC/C,OAAO,UAAU,EAAE;QACjB,IAAI,UAAU,YAAY,UAAU,EAAE;YACpC,OAAO,UAAU,CAAC;SACnB;QACD,UAAU,GAAG,UAAU,CAAC,sBAAsB,EAAE,CAAC;KAClD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,WAAW,CACvB,QAAc,EAAE,MAAc,EAAE,cAAsB,EAAE,cAAoB,EAAE,SAAkB;IAClG,IAAI,SAAS,CAAC;IACd,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,OAAO,CAAC;IACZ,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,IAAI,CAAC,cAAc,EAAE;QACnB,cAAc,GAAG,QAAQ,CAAC;KAC3B;IAED,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,MAAM,EAAE;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AC,CAAC;IACxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAElC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * `document.activeElement` will not enter shadow roots to find the element\n * that has focus; use this method if you need to traverse through any shadow\n * roots to find the actual, specific focused element.\n */\nexport function deepActiveElement(doc: Document): Element|null {\n let activeElement: Element|null = doc.activeElement;\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\n\nexport function getEnclosingShadowRootForNode(node: Node): Node|null {\n let parentNode = node.parentNodeOrShadowHost();\n while (parentNode) {\n if (parentNode instanceof ShadowRoot) {\n return parentNode;\n }\n parentNode = parentNode.parentNodeOrShadowHost();\n }\n return null;\n}\n\nexport function rangeOfWord(\n rootNode: Node, offset: number, stopCharacters: string, stayWithinNode: Node, direction?: string): Range {\n let startNode;\n let startOffset = 0;\n let endNode;\n let endOffset = 0;\n\n if (!stayWithinNode) {\n stayWithinNode = rootNode;\n }\n\n if (!direction || direction === 'backward' || direction === 'both') {\n let node: Node|null = rootNode;\n while (node) {\n if (node === stayWithinNode) {\n if (!startNode) {\n startNode = stayWithinNode;\n }\n break;\n }\n\n if (node.nodeType === Node.TEXT_NODE && node.nodeValue !== null) {\n const start = (node === rootNode ? (offset - 1) : (node.nodeValue.length - 1));\n for (let i = start; i >= 0; --i) {\n if (stopCharacters.indexOf(node.nodeValue[i]) !== -1) {\n startNode = node;\n startOffset = i + 1;\n break;\n }\n }\n }\n\n if (startNode) {\n break;\n }\n\n node = node.traversePreviousNode(stayWithinNode);\n }\n\n if (!startNode) {\n startNode = stayWithinNode;\n startOffset = 0;\n }\n } else {\n startNode = rootNode;\n startOffset = offset;\n }\n\n if (!direction || direction === 'forward' || direction === 'both') {\n let node: (Node|null)|Node = rootNode;\n while (node) {\n if (node === stayWithinNode) {\n if (!endNode) {\n endNode = stayWithinNode;\n }\n break;\n }\n\n if (node.nodeType === Node.TEXT_NODE && node.nodeValue !== null) {\n const start = (node === rootNode ? offset : 0);\n for (let i = start; i < node.nodeValue.length; ++i) {\n if (stopCharacters.indexOf(node.nodeValue[i]) !== -1) {\n endNode = node;\n endOffset = i;\n break;\n }\n }\n }\n\n if (endNode) {\n break;\n }\n\n node = node.traverseNextNode(stayWithinNode);\n }\n\n if (!endNode) {\n endNode = stayWithinNode;\n endOffset = stayWithinNode.nodeType === Node.TEXT_NODE ? stayWithinNode.nodeValue?.length || 0 :\n stayWithinNode.childNodes.length;\n }\n } else {\n endNode = rootNode;\n endOffset = offset;\n }\n\n if (!rootNode.ownerDocument) {\n throw new Error('No `ownerDocument` found for rootNode');\n }\n const result = rootNode.ownerDocument.createRange();\n result.setStart(startNode, startOffset);\n result.setEnd(endNode, endOffset);\n\n return result;\n}\n"]}
|
|
@@ -11,4 +11,4 @@ export const toISO8601Compact = (date) => {
|
|
|
11
11
|
return date.getFullYear() + leadZero(date.getMonth() + 1) + leadZero(date.getDate()) + 'T' +
|
|
12
12
|
leadZero(date.getHours()) + leadZero(date.getMinutes()) + leadZero(date.getSeconds());
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=DateUtilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/DateUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAU,EAAW,EAAE;IAC7C,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAU,EAAE;IACrD,SAAS,QAAQ,CAAC,CAAS;QACzB,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG;QACtF,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAC5F,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const isValid = (date: Date): boolean => {\n return !isNaN(date.getTime());\n};\n\nexport const toISO8601Compact = (date: Date): string => {\n function leadZero(x: number): string {\n return (x > 9 ? '' : '0') + x;\n }\n return date.getFullYear() + leadZero(date.getMonth() + 1) + leadZero(date.getDate()) + 'T' +\n leadZero(date.getHours()) + leadZero(date.getMinutes()) + leadZero(date.getSeconds());\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevToolsPath.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/DevToolsPath.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAU7B,MAAM,CAAC,MAAM,cAAc,GAAG,EAAe,CAAC;AAS9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAmB,CAAC;AAQtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAuB,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {type Brand} from './
|
|
1
|
+
{"version":3,"file":"DevToolsPath.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/DevToolsPath.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAU7B,MAAM,CAAC,MAAM,cAAc,GAAG,EAAe,CAAC;AAS9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAmB,CAAC;AAQtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAuB,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {type Brand} from './Brand.js';\n\n/**\n * File paths in DevTools that are represented as URLs\n * @example\n * “file:///Hello%20World/file/js”\n */\nexport type UrlString = Brand<string, 'UrlString'>;\nexport const EmptyUrlString = '' as UrlString;\n\n/**\n * File paths in DevTools that are represented as unencoded absolute\n * or relative paths\n * @example\n * “/Hello World/file.js”\n */\nexport type RawPathString = Brand<string, 'RawPathString'>;\nexport const EmptyRawPathString = '' as RawPathString;\n\n/**\n * File paths in DevTools that are represented as encoded paths\n * @example\n * “/Hello%20World/file.js”\n */\nexport type EncodedPathString = Brand<string, 'EncodedPathString'>;\nexport const EmptyEncodedPathString = '' as EncodedPathString;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/KeyboardUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAc7B,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;AACjC,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AACnC,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAW;;;;;CAK3C,CAAC,CAAC;AAEH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,UAAU,CAAC,GAAG,CAAC,GAAe,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAoB;IACpD,OAAO,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC;AACpD,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const enum ArrowKey {\n UP = 'ArrowUp',\n DOWN = 'ArrowDown',\n LEFT = 'ArrowLeft',\n RIGHT = 'ArrowRight',\n}\n\nexport const enum PageKey {\n UP = 'PageUp',\n DOWN = 'PageDown',\n}\n\nexport const ENTER_KEY = 'Enter';\nexport const ESCAPE_KEY = 'Escape';\nexport const TAB_KEY = 'Tab';\n\nexport const ARROW_KEYS = new Set<ArrowKey>([\n ArrowKey.UP,\n ArrowKey.DOWN,\n ArrowKey.LEFT,\n ArrowKey.RIGHT,\n]);\n\nexport function keyIsArrowKey(key: string): key is ArrowKey {\n return ARROW_KEYS.has(key as ArrowKey);\n}\n\nexport function isEscKey(event: KeyboardEvent): boolean {\n return event.key === 'Escape';\n}\n\nexport function isEnterOrSpaceKey(event: KeyboardEvent): boolean {\n return event.key === 'Enter' || event.key === ' ';\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/MapUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,UAAe,GAAc;IAClD,MAAM,MAAM,GAAG,IAAI,QAAQ,EAAQ,CAAC;IACpC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI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QACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,SAAS,CAAC,GAAM;QACd,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,SAAS;QACP,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED,WAAW;QACT,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;SAC9B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC1B,GAA4B,EAAE,GAAM,EAAE,mBAAmC;IAC3E,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,CAAC,KAAK,EAAE;QACV,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACjC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KACrB;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const inverse = function<K, V>(map: Map<K, V>): Multimap<V, K> {\n const result = new Multimap<V, K>();\n for (const [key, value] of map.entries()) {\n result.set(value, key);\n }\n return result;\n};\n\nexport class Multimap<K, V> {\n private map = new Map<K, Set<V>>();\n\n set(key: K, value: V): void {\n let set = this.map.get(key);\n if (!set) {\n set = new Set();\n this.map.set(key, set);\n }\n set.add(value);\n }\n\n get(key: K): Set<V> {\n return this.map.get(key) || new Set();\n }\n\n has(key: K): boolean {\n return this.map.has(key);\n }\n\n hasValue(key: K, value: V): boolean {\n const set = this.map.get(key);\n if (!set) {\n return false;\n }\n return set.has(value);\n }\n\n get size(): number {\n return this.map.size;\n }\n\n delete(key: K, value: V): boolean {\n const values = this.get(key);\n if (!values) {\n return false;\n }\n const result = values.delete(value);\n if (!values.size) {\n this.map.delete(key);\n }\n return result;\n }\n\n deleteAll(key: K): void {\n this.map.delete(key);\n }\n\n keysArray(): K[] {\n return [...this.map.keys()];\n }\n\n valuesArray(): V[] {\n const result = [];\n for (const set of this.map.values()) {\n result.push(...set.values());\n }\n return result;\n }\n\n clear(): void {\n this.map.clear();\n }\n}\n\n/**\n * Gets value for key, assigning a default if value is falsy.\n */\nexport function getWithDefault<K extends {}, V>(\n map: WeakMap<K, V>|Map<K, V>, key: K, defaultValueFactory: (key?: K) => V): V {\n let value = map.get(key);\n if (!value) {\n value = defaultValueFactory(key);\n map.set(key, value);\n }\n\n return value;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/NumberUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE;IACrE,IAAI,aAAa,GAAG,GAAG,CAAC;IACxB,IAAI,GAAG,GAAG,GAAG,EAAE;QACb,aAAa,GAAG,GAAG,CAAC;KACrB;SAAM,IAAI,GAAG,GAAG,GAAG,EAAE;QACpB,aAAa,GAAG,GAAG,CAAC;KACrB;IACD,OAAO,aAAa,CAAC;AACvB,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AAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,cAAc,CAAC;IAC1B,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;QACpB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;KACnC,CAAE,+BAA+B;IAClC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const clamp = (num: number, min: number, max: number): number => {\n let clampedNumber = num;\n if (num < min) {\n clampedNumber = min;\n } else if (num > max) {\n clampedNumber = max;\n }\n return clampedNumber;\n};\n\nexport const mod = (m: number, n: number): number => {\n return ((m % n) + n) % n;\n};\n\nexport const bytesToString = (bytes: number): string => {\n if (bytes < 1000) {\n return `${bytes.toFixed(0)}\\xA0B`;\n }\n\n const kilobytes = bytes / 1000;\n if (kilobytes < 100) {\n return `${kilobytes.toFixed(1)}\\xA0kB`;\n }\n if (kilobytes < 1000) {\n return `${kilobytes.toFixed(0)}\\xA0kB`;\n }\n\n const megabytes = kilobytes / 1000;\n if (megabytes < 100) {\n return `${megabytes.toFixed(1)}\\xA0MB`;\n }\n return `${megabytes.toFixed(0)}\\xA0MB`;\n};\n\nexport const toFixedIfFloating = (value: string): string => {\n if (!value || Number.isNaN(Number(value))) {\n return value;\n }\n const number = Number(value);\n return number % 1 ? number.toFixed(3) : String(number);\n};\n\n/**\n * Rounds a number (including float) down.\n */\nexport const floor = (value: number, precision: number = 0): number => {\n const mult = Math.pow(10, precision);\n return Math.floor(value * mult) / mult;\n};\n\n/**\n * Computes the great common divisor for two numbers.\n * If the numbers are floats, they will be rounded to an integer.\n */\nexport const greatestCommonDivisor = (a: number, b: number): number => {\n a = Math.round(a);\n b = Math.round(b);\n while (b !== 0) {\n const t = b;\n b = a % b;\n a = t;\n }\n return a;\n};\n\nconst commonRatios = new Map([\n ['8∶5', '16∶10'],\n]);\n\nexport const aspectRatio = (width: number, height: number): string => {\n const divisor = greatestCommonDivisor(width, height);\n if (divisor !== 0) {\n width /= divisor;\n height /= divisor;\n }\n const result = `${width}∶${height}`;\n return commonRatios.get(result) || result;\n};\n\nexport const withThousandsSeparator = function(num: number): string {\n let str = String(num);\n const re = /(\\d+)(\\d{3})/;\n while (str.match(re)) {\n str = str.replace(re, '$1\\xA0$2');\n } // \\xa0 is a non-breaking space\n return str;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromiseUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/PromiseUtilities.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAKlC,IAAI,OAA2C,CAAC;IAChD,IAAI,MAAgC,CAAC;IACrC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,GAAG,GAAG,CAAC;QACd,MAAM,GAAG,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;IACH,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAC,CAAC;AACpC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Returns a new pending promise together with it's resolve and reject functions.\n *\n * Polyfill for https://github.com/tc39/proposal-promise-with-resolvers.\n */\nexport function promiseWithResolvers<T = unknown>(): {\n promise: Promise<T>,\n resolve: (value: T|PromiseLike<T>) => void,\n reject: (error?: Error) => void,\n} {\n let resolve!: (value: T|PromiseLike<T>) => void;\n let reject!: (error?: Error) => void;\n const promise = new Promise<T>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return {promise, resolve, reject};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/SetUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,MAAM,GAAG,UAAY,GAAW,EAAE,QAAqB;IAClE,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;QAC3B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACf;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,UAAY,IAAY,EAAE,IAAY;IAC3D,IAAI,IAAI,KAAK,IAAI,EAAE;QACjB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IACD,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACnB,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const addAll = function<T>(set: Set<T>, iterable: Iterable<T>): void {\n for (const item of iterable) {\n set.add(item);\n }\n};\n\nexport const isEqual = function<T>(setA: Set<T>, setB: Set<T>): boolean {\n if (setA === setB) {\n return true;\n }\n if (setA.size !== setB.size) {\n return false;\n }\n for (const item of setA) {\n if (!setB.has(item)) {\n return false;\n }\n }\n return true;\n};\n"]}
|
|
@@ -458,8 +458,8 @@ class LowerCaseStringTag {
|
|
|
458
458
|
export const toLowerCaseString = function (input) {
|
|
459
459
|
return input.toLowerCase();
|
|
460
460
|
};
|
|
461
|
-
const WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b)|[A-Za-z][0-9]+[a-z]|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g;
|
|
462
|
-
// <---1
|
|
461
|
+
const WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b|_)|[A-Za-z][0-9]+[a-z]|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g;
|
|
462
|
+
// <---1---><------------2-----------> <--------3--------> <-----4----> <------5-----> <-----6----> <7>
|
|
463
463
|
// 1: two or more consecutive uppercase letters. This is useful for identifying acronyms
|
|
464
464
|
// 2: lookahead assertion that matches a word boundary
|
|
465
465
|
// 3: numeronym: single letter followed by number and another letter
|
|
@@ -470,7 +470,7 @@ const WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b)|[A-Za-z][0-9]+[a-z]|[A-Z]?[a-z]+
|
|
|
470
470
|
// This is makes more sense conceptually and allows accounting for all possible word variants.
|
|
471
471
|
// Making dot a part of a word prevent us from handling acronyms or numeronyms after the word
|
|
472
472
|
// correctly without making the RegExp prohibitively complicated.
|
|
473
|
-
// https://regex101.com/r/
|
|
473
|
+
// https://regex101.com/r/Plutm2/1
|
|
474
474
|
export const toKebabCase = function (input) {
|
|
475
475
|
return (input.match?.(WORD)?.map(w => w.toLowerCase()).join('-').replaceAll('-.-', '.') || input);
|
|
476
476
|
};
|
|
@@ -510,4 +510,4 @@ export const concatBase64 = function (lhs, rhs) {
|
|
|
510
510
|
const lhsToDecode = lhs.substring(lhs.length - 4);
|
|
511
511
|
return lhsLeaveAsIs + window.btoa(window.atob(lhsToDecode) + window.atob(rhs));
|
|
512
512
|
};
|
|
513
|
-
//# sourceMappingURL=
|
|
513
|
+
//# sourceMappingURL=StringUtilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/StringUtilities.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,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AAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClD,OAAO,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const escapeCharacters = (inputString: string, charsToEscape: string): string => {\n let foundChar = false;\n for (let i = 0; i < charsToEscape.length; ++i) {\n if (inputString.indexOf(charsToEscape.charAt(i)) !== -1) {\n foundChar = true;\n break;\n }\n }\n\n if (!foundChar) {\n return String(inputString);\n }\n\n let result = '';\n for (let i = 0; i < inputString.length; ++i) {\n if (charsToEscape.indexOf(inputString.charAt(i)) !== -1) {\n result += '\\\\';\n }\n result += inputString.charAt(i);\n }\n\n return result;\n};\n\nconst toHexadecimal = (charCode: number, padToLength: number): string => {\n return charCode.toString(16).toUpperCase().padStart(padToLength, '0');\n};\n\n// Remember to update the third group in the regexps patternsToEscape and\n// patternsToEscapePlusSingleQuote when adding new entries in this map.\nconst escapedReplacements = new Map([\n ['\\b', '\\\\b'],\n ['\\f', '\\\\f'],\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\t', '\\\\t'],\n ['\\v', '\\\\v'],\n ['\\'', '\\\\\\''],\n ['\\\\', '\\\\\\\\'],\n ['<!--', '\\\\x3C!--'],\n ['<script', '\\\\x3Cscript'],\n ['</script', '\\\\x3C/script'],\n]);\n\nexport const formatAsJSLiteral = (content: string): string => {\n const patternsToEscape = /(\\\\|<(?:!--|\\/?script))|(\\p{Control})|(\\p{Surrogate})/gu;\n const patternsToEscapePlusSingleQuote = /(\\\\|'|<(?:!--|\\/?script))|(\\p{Control})|(\\p{Surrogate})/gu;\n const escapePattern = (match: string, pattern: string, controlChar: string, loneSurrogate: string): string => {\n if (controlChar) {\n if (escapedReplacements.has(controlChar)) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/13086\n return escapedReplacements.get(controlChar);\n }\n const twoDigitHex = toHexadecimal(controlChar.charCodeAt(0), 2);\n return '\\\\x' + twoDigitHex;\n }\n if (loneSurrogate) {\n const fourDigitHex = toHexadecimal(loneSurrogate.charCodeAt(0), 4);\n return '\\\\u' + fourDigitHex;\n }\n if (pattern) {\n return escapedReplacements.get(pattern) || '';\n }\n return match;\n };\n\n let escapedContent = '';\n let quote = '';\n if (!content.includes('\\'')) {\n quote = '\\'';\n escapedContent = content.replaceAll(patternsToEscape, escapePattern);\n } else if (!content.includes('\"')) {\n quote = '\"';\n escapedContent = content.replaceAll(patternsToEscape, escapePattern);\n } else if (!content.includes('`') && !content.includes('${')) {\n quote = '`';\n escapedContent = content.replaceAll(patternsToEscape, escapePattern);\n } else {\n quote = '\\'';\n escapedContent = content.replaceAll(patternsToEscapePlusSingleQuote, escapePattern);\n }\n return `${quote}${escapedContent}${quote}`;\n};\n\n/**\n * This implements a subset of the sprintf() function described in the Single UNIX\n * Specification. It supports the %s, %f, %d, and %% formatting specifiers, and\n * understands the %m$d notation to select the m-th parameter for this substitution,\n * as well as the optional precision for %s, %f, and %d.\n *\n * @param fmt format string.\n * @param args parameters to the format string.\n * @returns the formatted output string.\n */\nexport const sprintf = (fmt: string, ...args: unknown[]): string => {\n let argIndex = 0;\n const RE = /%(?:(\\d+)\\$)?(?:\\.(\\d*))?([%dfs])/g;\n return fmt.replaceAll(RE, (_: string, index?: string, precision?: string, specifier?: string) => {\n if (specifier === '%') {\n return '%';\n }\n if (index !== undefined) {\n argIndex = parseInt(index, 10) - 1;\n if (argIndex < 0) {\n throw new RangeError(`Invalid parameter index ${argIndex + 1}`);\n }\n }\n if (argIndex >= args.length) {\n throw new RangeError(`Expected at least ${argIndex + 1} format parameters, but only ${args.length} where given.`);\n }\n if (specifier === 's') {\n const argValue = String(args[argIndex++]);\n if (precision !== undefined) {\n return argValue.substring(0, Number(precision));\n }\n return argValue;\n }\n let argValue = Number(args[argIndex++]);\n if (isNaN(argValue)) {\n argValue = 0;\n }\n if (specifier === 'd') {\n return String(Math.floor(argValue)).padStart(Number(precision), '0');\n }\n if (precision !== undefined) {\n return argValue.toFixed(Number(precision));\n }\n return String(argValue);\n });\n};\n\nexport const toBase64 = (inputString: string): string => {\n /* note to the reader: we can't use btoa here because we need to\n * support Unicode correctly. See the test cases for this function and\n * also\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem\n */\n\n function encodeBits(b: number): number {\n return b < 26 ? b + 65 : b < 52 ? b + 71 : b < 62 ? b - 4 : b === 62 ? 43 : b === 63 ? 47 : 65;\n }\n const encoder = new TextEncoder();\n const data = encoder.encode(inputString.toString());\n const n = data.length;\n let encoded = '';\n if (n === 0) {\n return encoded;\n }\n let shift;\n let v = 0;\n for (let i = 0; i < n; i++) {\n shift = i % 3;\n v |= data[i] << (16 >>> shift & 24);\n if (shift === 2) {\n encoded += String.fromCharCode(\n encodeBits(v >>> 18 & 63), encodeBits(v >>> 12 & 63), encodeBits(v >>> 6 & 63), encodeBits(v & 63));\n v = 0;\n }\n }\n if (shift === 0) {\n encoded += String.fromCharCode(encodeBits(v >>> 18 & 63), encodeBits(v >>> 12 & 63), 61, 61);\n } else if (shift === 1) {\n encoded += String.fromCharCode(encodeBits(v >>> 18 & 63), encodeBits(v >>> 12 & 63), encodeBits(v >>> 6 & 63), 61);\n }\n return encoded;\n};\n\nexport const findIndexesOfSubString = (inputString: string, searchString: string): number[] => {\n const matches = [];\n let i = inputString.indexOf(searchString);\n while (i !== -1) {\n matches.push(i);\n i = inputString.indexOf(searchString, i + searchString.length);\n }\n return matches;\n};\n\nexport const findLineEndingIndexes = (inputString: string): number[] => {\n const endings = findIndexesOfSubString(inputString, '\\n');\n endings.push(inputString.length);\n return endings;\n};\n\nexport const isWhitespace = (inputString: string): boolean => {\n return /^\\s*$/.test(inputString);\n};\n\nexport const trimURL = (url: string, baseURLDomain?: string): string => {\n let result = url.replace(/^(https|http|file):\\/\\//i, '');\n if (baseURLDomain) {\n if (result.toLowerCase().startsWith(baseURLDomain.toLowerCase())) {\n result = result.substr(baseURLDomain.length);\n }\n }\n return result;\n};\n\nexport const collapseWhitespace = (inputString: string): string => {\n return inputString.replace(/[\\s\\xA0]+/g, ' ');\n};\n\nexport const reverse = (inputString: string): string => {\n return inputString.split('').reverse().join('');\n};\n\nexport const replaceControlCharacters = (inputString: string): string => {\n // Replace C0 and C1 control character sets with replacement character.\n // Do not replace '\\t', \\n' and '\\r'.\n return inputString.replace(/[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\x80-\\x9F]/g, '\\uFFFD');\n};\n\nexport const countWtf8Bytes = (inputString: string): number => {\n let count = 0;\n for (let i = 0; i < inputString.length; i++) {\n const c = inputString.charCodeAt(i);\n if (c <= 0x7F) {\n count++;\n } else if (c <= 0x07FF) {\n count += 2;\n } else if (c < 0xD800 || 0xDFFF < c) {\n count += 3;\n } else {\n if (c <= 0xDBFF && i + 1 < inputString.length) {\n // The current character is a leading surrogate, and there is a\n // next character.\n const next = inputString.charCodeAt(i + 1);\n if (0xDC00 <= next && next <= 0xDFFF) {\n // The next character is a trailing surrogate, meaning this\n // is a surrogate pair.\n count += 4;\n i++;\n continue;\n }\n }\n count += 3;\n }\n }\n return count;\n};\n\nexport const stripLineBreaks = (inputStr: string): string => {\n return inputStr.replace(/(\\r)?\\n/g, '');\n};\n\nconst EXTENDED_KEBAB_CASE_REGEXP = /^([a-z0-9]+(?:-[a-z0-9]+)*\\.)*[a-z0-9]+(?:-[a-z0-9]+)*$/;\n\n/**\n * Tests if the `inputStr` is following the extended Kebab Case naming convetion,\n * where words are separated with either a dash (`-`) or a dot (`.`), and all\n * characters must be lower-case alphanumeric.\n *\n * For example, it will yield `true` for `'my.amazing-string.literal'`, but `false`\n * for `'Another.AmazingLiteral'` or '`another_amazing_literal'`.\n *\n * @param inputStr the input string to test.\n * @return `true` if the `inputStr` follows the extended Kebab Case convention.\n */\nexport const isExtendedKebabCase = (inputStr: string): boolean => {\n return EXTENDED_KEBAB_CASE_REGEXP.test(inputStr);\n};\n\nexport const toTitleCase = (inputStr: string): string => {\n return inputStr.substring(0, 1).toUpperCase() + inputStr.substring(1);\n};\n\nexport const removeURLFragment = (inputStr: string): string => {\n const url = new URL(inputStr);\n url.hash = '';\n return url.toString();\n};\n\nconst SPECIAL_REGEX_CHARACTERS = '^[]{}()\\\\.^$*+?|-,';\n\nexport const regexSpecialCharacters = function(): string {\n return SPECIAL_REGEX_CHARACTERS;\n};\n\nexport const filterRegex = function(query: string): RegExp {\n let regexString = '^(?:.*\\\\0)?'; // Start from beginning or after a \\0\n for (let i = 0; i < query.length; ++i) {\n let c = query.charAt(i);\n if (SPECIAL_REGEX_CHARACTERS.indexOf(c) !== -1) {\n c = '\\\\' + c;\n }\n regexString += '[^\\\\0' + c + ']*' + c;\n }\n return new RegExp(regexString, 'i');\n};\n\nexport const createSearchRegex = function(\n query: string, caseSensitive: boolean, isRegex: boolean, matchWholeWord: boolean = false): RegExp {\n const regexFlags = caseSensitive ? 'g' : 'gi';\n let regexObject;\n\n if (isRegex) {\n try {\n regexObject = new RegExp(query, regexFlags);\n } catch (e) {\n // Silent catch.\n }\n }\n\n if (!regexObject) {\n regexObject = createPlainTextSearchRegex(query, regexFlags);\n }\n\n if (matchWholeWord && regexObject) {\n regexObject = new RegExp(`\\\\b${regexObject.source}\\\\b`, regexFlags);\n }\n\n return regexObject;\n};\n\nexport const caseInsensetiveComparator = function(a: string, b: string): number {\n a = a.toUpperCase();\n b = b.toUpperCase();\n if (a === b) {\n return 0;\n }\n return a > b ? 1 : -1;\n};\n\nexport const hashCode = function(string?: string): number {\n if (!string) {\n return 0;\n }\n // Hash algorithm for substrings is described in \"Über die Komplexität der Multiplikation in\n // eingeschränkten Branchingprogrammmodellen\" by Woelfe.\n // http://opendatastructures.org/versions/edition-0.1d/ods-java/node33.html#SECTION00832000000000000000\n const p = ((1 << 30) * 4 - 5); // prime: 2^32 - 5\n const z = 0x5033d967; // 32 bits from random.org\n const z2 = 0x59d2f15d; // random odd 32 bit number\n let s = 0;\n let zi = 1;\n for (let i = 0; i < string.length; i++) {\n const xi = string.charCodeAt(i) * z2;\n s = (s + zi * xi) % p;\n zi = (zi * z) % p;\n }\n s = (s + zi * (p - 1)) % p;\n return Math.abs(s | 0);\n};\n\nexport const compare = (a: string, b: string): number => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n return 0;\n};\n\nexport const trimMiddle = (str: string, maxLength: number): string => {\n if (str.length <= maxLength) {\n return String(str);\n }\n let leftHalf = maxLength >> 1;\n let rightHalf = maxLength - leftHalf - 1;\n if ((str.codePointAt(str.length - rightHalf - 1) as number) >= 0x10000) {\n --rightHalf;\n ++leftHalf;\n }\n if (leftHalf > 0 && (str.codePointAt(leftHalf - 1) as number) >= 0x10000) {\n --leftHalf;\n }\n return str.substr(0, leftHalf) + '…' + str.substr(str.length - rightHalf, rightHalf);\n};\n\nexport const trimEndWithMaxLength = (str: string, maxLength: number): string => {\n if (str.length <= maxLength) {\n return String(str);\n }\n return str.substr(0, maxLength - 1) + '…';\n};\n\nexport const escapeForRegExp = (str: string): string => {\n return escapeCharacters(str, SPECIAL_REGEX_CHARACTERS);\n};\n\nexport const naturalOrderComparator = (a: string, b: string): number => {\n const chunk = /^\\d+|^\\D+/;\n let chunka, chunkb, anum, bnum;\n while (true) {\n if (a) {\n if (!b) {\n return 1;\n }\n } else {\n if (b) {\n return -1;\n }\n return 0;\n }\n chunka = (a.match(chunk) as string[])[0];\n chunkb = (b.match(chunk) as string[])[0];\n anum = !Number.isNaN(Number(chunka));\n bnum = !Number.isNaN(Number(chunkb));\n if (anum && !bnum) {\n return -1;\n }\n if (bnum && !anum) {\n return 1;\n }\n if (anum && bnum) {\n const diff = Number(chunka) - Number(chunkb);\n if (diff) {\n return diff;\n }\n if (chunka.length !== chunkb.length) {\n if (!Number(chunka) && !Number(chunkb)) { // chunks are strings of all 0s (special case)\n return chunka.length - chunkb.length;\n }\n return chunkb.length - chunka.length;\n }\n } else if (chunka !== chunkb) {\n return (chunka < chunkb) ? -1 : 1;\n }\n a = a.substring(chunka.length);\n b = b.substring(chunkb.length);\n }\n};\n\nexport const base64ToSize = function(content: string|null): number {\n if (!content) {\n return 0;\n }\n let size = content.length * 3 / 4;\n if (content[content.length - 1] === '=') {\n size--;\n }\n if (content.length > 1 && content[content.length - 2] === '=') {\n size--;\n }\n return size;\n};\n\nexport const SINGLE_QUOTE = '\\'';\nexport const DOUBLE_QUOTE = '\"';\nconst BACKSLASH = '\\\\';\n\nexport const findUnclosedCssQuote = function(str: string): string {\n let unmatchedQuote = '';\n for (let i = 0; i < str.length; ++i) {\n const char = str[i];\n if (char === BACKSLASH) {\n i++;\n continue;\n }\n if (char === SINGLE_QUOTE || char === DOUBLE_QUOTE) {\n if (unmatchedQuote === char) {\n unmatchedQuote = '';\n } else if (unmatchedQuote === '') {\n unmatchedQuote = char;\n }\n }\n }\n return unmatchedQuote;\n};\n\nexport const countUnmatchedLeftParentheses = (str: string): number => {\n let unmatchedCount = 0;\n for (const c of str) {\n if (c === '(') {\n unmatchedCount++;\n } else if (c === ')' && unmatchedCount > 0) {\n unmatchedCount--;\n }\n }\n return unmatchedCount;\n};\n\nexport const createPlainTextSearchRegex = function(query: string, flags?: string): RegExp {\n // This should be kept the same as the one in StringUtil.cpp.\n let regex = '';\n for (let i = 0; i < query.length; ++i) {\n const c = query.charAt(i);\n if (regexSpecialCharacters().indexOf(c) !== -1) {\n regex += '\\\\';\n }\n regex += c;\n }\n return new RegExp(regex, flags || '');\n};\n\nclass LowerCaseStringTag {\n private lowerCaseStringTag: (string|undefined);\n}\n\nexport type LowerCaseString = string&LowerCaseStringTag;\n\nexport const toLowerCaseString = function(input: string): LowerCaseString {\n return input.toLowerCase() as LowerCaseString;\n};\n\nconst WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\\b|_)|[A-Za-z][0-9]+[a-z]|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g;\n// <---1---><------------2-----------> <--------3--------> <-----4----> <------5-----> <-----6----> <7>\n// 1: two or more consecutive uppercase letters. This is useful for identifying acronyms\n// 2: lookahead assertion that matches a word boundary\n// 3: numeronym: single letter followed by number and another letter\n// 4: word starting with an optional uppercase letter\n// 5: single digit followed by word to handle '3D' or '2px' (this might be controverial)\n// 6: single uppercase letter or number\n// 7: a dot character. We extract it into a separate word and remove dashes around it later.\n// This is makes more sense conceptually and allows accounting for all possible word variants.\n// Making dot a part of a word prevent us from handling acronyms or numeronyms after the word\n// correctly without making the RegExp prohibitively complicated.\n// https://regex101.com/r/Plutm2/1\nexport const toKebabCase = function(input: string): Lowercase<string> {\n return (input.match?.(WORD)?.map(w => w.toLowerCase()).join('-').replaceAll('-.-', '.') || input) as\n Lowercase<string>;\n};\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function toKebabCaseKeys(settingValue: {\n [x: string]: any,\n}): {[x: string]: any} {\n const result: {\n [x: string]: any,\n } = {};\n for (const [key, value] of Object.entries(settingValue)) {\n result[toKebabCase(key)] = value;\n }\n return result;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// Replaces the last ocurrence of parameter `search` with parameter `replacement` in `input`\nexport const replaceLast = function(input: string, search: string, replacement: string): string {\n const replacementStartIndex = input.lastIndexOf(search);\n if (replacementStartIndex === -1) {\n return input;\n }\n\n return input.slice(0, replacementStartIndex) + input.slice(replacementStartIndex).replace(search, replacement);\n};\n\nexport const stringifyWithPrecision = function stringifyWithPrecision(s: number, precision = 2): string {\n if (precision === 0) {\n return s.toFixed(0);\n }\n const string = s.toFixed(precision).replace(/\\.?0*$/, '');\n return string === '-0' ? '0' : string;\n};\n\n/**\n * Somewhat efficiently concatenates 2 base64 encoded strings.\n */\nexport const concatBase64 = function(lhs: string, rhs: string): string {\n if (lhs.length === 0 || !lhs.endsWith('=')) {\n // Empty string or no padding, we can straight-up concatenate.\n return lhs + rhs;\n }\n const lhsLeaveAsIs = lhs.substring(0, lhs.length - 4);\n const lhsToDecode = lhs.substring(lhs.length - 4);\n return lhsLeaveAsIs + window.btoa(window.atob(lhsToDecode) + window.atob(rhs));\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timing.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/Timing.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAQ7B,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC9C,OAAO,CAAC,CAAC,GAAG,IAAI,CAAiB,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,CAAe;IACnD,OAAO,CAAC,CAAC,GAAG,IAAI,CAAY,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,CAAe;IACxD,OAAO,CAAC,CAAC,GAAG,IAAI,CAAiB,CAAC;AACpC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {type Brand} from './
|
|
1
|
+
{"version":3,"file":"Timing.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/Timing.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAQ7B,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC9C,OAAO,CAAC,CAAC,GAAG,IAAI,CAAiB,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,CAAe;IACnD,OAAO,CAAC,CAAC,GAAG,IAAI,CAAY,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,CAAe;IACxD,OAAO,CAAC,CAAC,GAAG,IAAI,CAAiB,CAAC;AACpC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {type Brand} from './Brand.js';\n\nexport type Seconds = Brand<number, 'Seconds'>;\nexport type MilliSeconds = Brand<number, 'MilliSeconds'>;\nexport type MicroSeconds = Brand<number, 'MicroSeconds'>;\n\nexport function secondsToMilliSeconds(x: Seconds): MilliSeconds {\n return (x * 1000) as MilliSeconds;\n}\n\nexport function milliSecondsToSeconds(x: MilliSeconds): Seconds {\n return (x / 1000) as Seconds;\n}\n\nexport function microSecondsToMilliSeconds(x: MicroSeconds): MilliSeconds {\n return (x / 1000) as MilliSeconds;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypescriptUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/TypescriptUtilities.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAI,GAAM,EAAE,OAAgB;IAClE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;QACrC,MAAM,IAAI,KAAK,CAAC,6DAA6D,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KACrH;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAW,EAAE,OAAe;IACtD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAI,aAAgB;IACjD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * This is useful to keep TypeScript happy in a test - if you have a value\n * that's potentially `null` you can use this function to assert that it isn't,\n * and satisfy TypeScript that the value is present.\n */\nexport function assertNotNullOrUndefined<T>(val: T, message?: string): asserts val is NonNullable<T> {\n if (val === null || val === undefined) {\n throw new Error(`Expected given value to not be null/undefined but it was: ${val}${message ? `\\n${message}` : ''}`);\n }\n}\n\nexport function assertNever(type: never, message: string): never {\n throw new Error(message);\n}\n\n/**\n * This is useful to check on the type-level that the unhandled cases of\n * a switch are exactly `T` (where T is usually a union type of enum values).\n * @param caseVariable\n */\nexport function assertUnhandled<T>(_caseVariable: T): T {\n return _caseVariable;\n}\n\nexport type FieldsThatExtend<Type, Selector> = {\n [Key in keyof Type]: Type[Key] extends Selector ? Key : never;\n}[keyof Type];\n\nexport type PickFieldsThatExtend<Type, Selector> = Pick<Type, FieldsThatExtend<Type, Selector>>;\n\n/**\n * Turns a Union type (a | b) into an Intersection type (a & b).\n * This is a helper type to implement the \"NoUnion\" guard.\n *\n * Adapted from https://stackoverflow.com/a/50375286.\n *\n * The tautological `T extends any` is necessary to trigger distributivity for\n * plain unions, e.g. in IntersectionFromUnion<'a'|'b'> TypeScript expands it\n * to ('a' extends any ? (arg: 'a') => void : never)\n * | ('b' extends any ? (arg: 'b') => void : never)\n *\n * The second extends clause then asks TypeScript to find a type of the form\n * `(arg: infer U) => void` that upper-bounds the union, i.e., intuitively,\n * a type that converts to each of the union members. This forces U to be the\n * intersection of 'a' and 'b' in the example.\n *\n * Please note that some intersection types are simply impossible, e.g.\n * `string & number`. There is no type that fulfills both at the same time. A\n * union of this kind is reduced to `never`.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype IntersectionFromUnion<T> = (T extends any ? (arg: T) => void : never) extends((arg: infer U) => void) ? U : never;\n\n/**\n * When writing generic code it may be desired to disallow Union types from\n * being passed. This type can be used in those cases.\n *\n * function foo<T>(argument: NoUnion<T>) {...}\n *\n * Would result in a compile error for foo<a|b>(...); invocations as `argument`\n * would be typed as `never`.\n *\n * Adapted from https://stackoverflow.com/a/50641073.\n *\n * Conditional types become distributive when receiving a union type. To\n * prevent this from happening, we use `[T] extends [IntersectionFromUnion<T>]`\n * instead of `T extends IntersectionFromUnion<T>`.\n * See: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html\n */\nexport type NoUnion<T> = [T] extends [IntersectionFromUnion<T>] ? T : never;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIString.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/UIString.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAoC7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAqB,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).\n * Copyright (C) 2009 Joseph Pecoraro\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport {type Brand} from './
|
|
1
|
+
{"version":3,"file":"UIString.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/UIString.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAoC7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAqB,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).\n * Copyright (C) 2009 Joseph Pecoraro\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport {type Brand} from './Brand.js';\n\nexport type LocalizedString = Brand<string, 'LocalizedString'>;\nexport const LocalizedEmptyString = '' as LocalizedString;\n"]}
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
34
|
"../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
35
|
"../../../../../../front_end/global_typings/request_idle_callback.d.ts",
|
|
36
|
-
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
|
-
"../../../../../../node_modules/@webgpu/types/dist/index.d.ts"
|
|
36
|
+
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
38
37
|
],
|
|
39
38
|
"references": [
|
|
40
39
|
{
|
|
@@ -29,31 +29,25 @@
|
|
|
29
29
|
"useUnknownInCatchVariables": false
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
|
+
"../../../../../../front_end/core/platform/ArrayUtilities.ts",
|
|
33
|
+
"../../../../../../front_end/core/platform/Brand.ts",
|
|
34
|
+
"../../../../../../front_end/core/platform/DOMUtilities.ts",
|
|
35
|
+
"../../../../../../front_end/core/platform/DateUtilities.ts",
|
|
32
36
|
"../../../../../../front_end/core/platform/DevToolsPath.ts",
|
|
37
|
+
"../../../../../../front_end/core/platform/KeyboardUtilities.ts",
|
|
38
|
+
"../../../../../../front_end/core/platform/MapUtilities.ts",
|
|
33
39
|
"../../../../../../front_end/core/platform/MimeType.ts",
|
|
40
|
+
"../../../../../../front_end/core/platform/NumberUtilities.ts",
|
|
41
|
+
"../../../../../../front_end/core/platform/PromiseUtilities.ts",
|
|
42
|
+
"../../../../../../front_end/core/platform/SetUtilities.ts",
|
|
43
|
+
"../../../../../../front_end/core/platform/StringUtilities.ts",
|
|
34
44
|
"../../../../../../front_end/core/platform/Timing.ts",
|
|
45
|
+
"../../../../../../front_end/core/platform/TypescriptUtilities.ts",
|
|
35
46
|
"../../../../../../front_end/core/platform/UIString.ts",
|
|
36
47
|
"../../../../../../front_end/core/platform/UserVisibleError.ts",
|
|
37
|
-
"../../../../../../front_end/core/platform/array-utilities.ts",
|
|
38
|
-
"../../../../../../front_end/core/platform/brand.ts",
|
|
39
|
-
"../../../../../../front_end/core/platform/date-utilities.ts",
|
|
40
|
-
"../../../../../../front_end/core/platform/dom-utilities.ts",
|
|
41
|
-
"../../../../../../front_end/core/platform/keyboard-utilities.ts",
|
|
42
|
-
"../../../../../../front_end/core/platform/map-utilities.ts",
|
|
43
|
-
"../../../../../../front_end/core/platform/number-utilities.ts",
|
|
44
|
-
"../../../../../../front_end/core/platform/promise-utilities.ts",
|
|
45
|
-
"../../../../../../front_end/core/platform/set-utilities.ts",
|
|
46
|
-
"../../../../../../front_end/core/platform/string-utilities.ts",
|
|
47
|
-
"../../../../../../front_end/core/platform/typescript-utilities.ts",
|
|
48
48
|
"../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
49
49
|
"../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
50
50
|
"../../../../../../front_end/global_typings/request_idle_callback.d.ts",
|
|
51
|
-
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
52
|
-
"../../../../../../node_modules/@webgpu/types/dist/index.d.ts"
|
|
53
|
-
],
|
|
54
|
-
"references": [
|
|
55
|
-
{
|
|
56
|
-
"path": "./dcheck-tsconfig.json"
|
|
57
|
-
}
|
|
51
|
+
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
58
52
|
]
|
|
59
53
|
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import * as ArrayUtilities from './
|
|
2
|
-
import * as Brand from './
|
|
3
|
-
import * as DateUtilities from './
|
|
1
|
+
import * as ArrayUtilities from './ArrayUtilities.js';
|
|
2
|
+
import * as Brand from './Brand.js';
|
|
3
|
+
import * as DateUtilities from './DateUtilities.js';
|
|
4
4
|
import * as DevToolsPath from './DevToolsPath.js';
|
|
5
|
-
import * as DOMUtilities from './
|
|
6
|
-
import * as KeyboardUtilities from './
|
|
7
|
-
import * as MapUtilities from './
|
|
5
|
+
import * as DOMUtilities from './DOMUtilities.js';
|
|
6
|
+
import * as KeyboardUtilities from './KeyboardUtilities.js';
|
|
7
|
+
import * as MapUtilities from './MapUtilities.js';
|
|
8
8
|
import * as MimeType from './MimeType.js';
|
|
9
|
-
import * as NumberUtilities from './
|
|
10
|
-
import * as PromiseUtilities from './
|
|
11
|
-
import * as SetUtilities from './
|
|
12
|
-
import * as StringUtilities from './
|
|
9
|
+
import * as NumberUtilities from './NumberUtilities.js';
|
|
10
|
+
import * as PromiseUtilities from './PromiseUtilities.js';
|
|
11
|
+
import * as SetUtilities from './SetUtilities.js';
|
|
12
|
+
import * as StringUtilities from './StringUtilities.js';
|
|
13
13
|
import * as Timing from './Timing.js';
|
|
14
|
-
import * as TypeScriptUtilities from './
|
|
14
|
+
import * as TypeScriptUtilities from './TypescriptUtilities.js';
|
|
15
15
|
import * as UIString from './UIString.js';
|
|
16
16
|
import * as UserVisibleError from './UserVisibleError.js';
|
|
17
|
-
export {
|
|
18
|
-
export { assertNever, assertNotNullOrUndefined, assertUnhandled } from './typescript-utilities.js';
|
|
17
|
+
export { assertNever, assertNotNullOrUndefined, assertUnhandled } from './TypescriptUtilities.js';
|
|
19
18
|
export { ArrayUtilities, Brand, DateUtilities, DevToolsPath, DOMUtilities, KeyboardUtilities, MapUtilities, MimeType, NumberUtilities, PromiseUtilities, SetUtilities, StringUtilities, Timing, TypeScriptUtilities, UIString, UserVisibleError, };
|
|
@@ -27,28 +27,27 @@
|
|
|
27
27
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
28
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
29
|
*/
|
|
30
|
-
import * as ArrayUtilities from './
|
|
31
|
-
import * as Brand from './
|
|
32
|
-
import * as DateUtilities from './
|
|
30
|
+
import * as ArrayUtilities from './ArrayUtilities.js';
|
|
31
|
+
import * as Brand from './Brand.js';
|
|
32
|
+
import * as DateUtilities from './DateUtilities.js';
|
|
33
33
|
import * as DevToolsPath from './DevToolsPath.js';
|
|
34
|
-
import * as DOMUtilities from './
|
|
35
|
-
import * as KeyboardUtilities from './
|
|
36
|
-
import * as MapUtilities from './
|
|
34
|
+
import * as DOMUtilities from './DOMUtilities.js';
|
|
35
|
+
import * as KeyboardUtilities from './KeyboardUtilities.js';
|
|
36
|
+
import * as MapUtilities from './MapUtilities.js';
|
|
37
37
|
import * as MimeType from './MimeType.js';
|
|
38
|
-
import * as NumberUtilities from './
|
|
39
|
-
import * as PromiseUtilities from './
|
|
40
|
-
import * as SetUtilities from './
|
|
41
|
-
import * as StringUtilities from './
|
|
38
|
+
import * as NumberUtilities from './NumberUtilities.js';
|
|
39
|
+
import * as PromiseUtilities from './PromiseUtilities.js';
|
|
40
|
+
import * as SetUtilities from './SetUtilities.js';
|
|
41
|
+
import * as StringUtilities from './StringUtilities.js';
|
|
42
42
|
import * as Timing from './Timing.js';
|
|
43
|
-
import * as TypeScriptUtilities from './
|
|
43
|
+
import * as TypeScriptUtilities from './TypescriptUtilities.js';
|
|
44
44
|
import * as UIString from './UIString.js';
|
|
45
45
|
import * as UserVisibleError from './UserVisibleError.js';
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* compiler error)
|
|
46
|
+
/* `assertNotNullOrUndefined` also need to be exposed, as TypeScript does
|
|
47
|
+
* not allow `asserts` functions to be used with qualified access (e.g.
|
|
48
|
+
* `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile
|
|
49
|
+
* error).
|
|
51
50
|
*/
|
|
52
|
-
export { assertNever, assertNotNullOrUndefined, assertUnhandled } from './
|
|
51
|
+
export { assertNever, assertNotNullOrUndefined, assertUnhandled } from './TypescriptUtilities.js';
|
|
53
52
|
export { ArrayUtilities, Brand, DateUtilities, DevToolsPath, DOMUtilities, KeyboardUtilities, MapUtilities, MimeType, NumberUtilities, PromiseUtilities, SetUtilities, StringUtilities, Timing, TypeScriptUtilities, UIString, UserVisibleError, };
|
|
54
53
|
//# sourceMappingURL=platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,cAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAChG,OAAO,EACL,cAAc,EACd,KAAK,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,GACjB,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as ArrayUtilities from './ArrayUtilities.js';\nimport * as Brand from './Brand.js';\nimport * as DateUtilities from './DateUtilities.js';\nimport * as DevToolsPath from './DevToolsPath.js';\nimport * as DOMUtilities from './DOMUtilities.js';\nimport * as KeyboardUtilities from './KeyboardUtilities.js';\nimport * as MapUtilities from './MapUtilities.js';\nimport * as MimeType from './MimeType.js';\nimport * as NumberUtilities from './NumberUtilities.js';\nimport * as PromiseUtilities from './PromiseUtilities.js';\nimport * as SetUtilities from './SetUtilities.js';\nimport * as StringUtilities from './StringUtilities.js';\nimport * as Timing from './Timing.js';\nimport * as TypeScriptUtilities from './TypescriptUtilities.js';\nimport * as UIString from './UIString.js';\nimport * as UserVisibleError from './UserVisibleError.js';\n\n/* `assertNotNullOrUndefined` also need to be exposed, as TypeScript does\n * not allow `asserts` functions to be used with qualified access (e.g.\n * `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile\n * error).\n */\nexport {assertNever, assertNotNullOrUndefined, assertUnhandled} from './TypescriptUtilities.js';\nexport {\n ArrayUtilities,\n Brand,\n DateUtilities,\n DevToolsPath,\n DOMUtilities,\n KeyboardUtilities,\n MapUtilities,\n MimeType,\n NumberUtilities,\n PromiseUtilities,\n SetUtilities,\n StringUtilities,\n Timing,\n TypeScriptUtilities,\n UIString,\n UserVisibleError,\n};\n"]}
|