source: trip-planner-front/node_modules/@angular/compiler-cli/src/metadata/index_writer.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 7.9 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8(function (factory) {
9 if (typeof module === "object" && typeof module.exports === "object") {
10 var v = factory(require, exports);
11 if (v !== undefined) module.exports = v;
12 }
13 else if (typeof define === "function" && define.amd) {
14 define("@angular/compiler-cli/src/metadata/index_writer", ["require", "exports", "tslib"], factory);
15 }
16})(function (require, exports) {
17 "use strict";
18 Object.defineProperty(exports, "__esModule", { value: true });
19 exports.privateEntriesToIndex = void 0;
20 var tslib_1 = require("tslib");
21 var INDEX_HEADER = "/**\n * Generated bundle index. Do not edit.\n */\n";
22 function privateEntriesToIndex(index, privates) {
23 var e_1, _a, e_2, _b;
24 var results = [INDEX_HEADER];
25 // Export all of the index symbols.
26 results.push("export * from '" + index + "';", '');
27 // Simplify the exports
28 var exports = new Map();
29 try {
30 for (var privates_1 = tslib_1.__values(privates), privates_1_1 = privates_1.next(); !privates_1_1.done; privates_1_1 = privates_1.next()) {
31 var entry = privates_1_1.value;
32 var entries = exports.get(entry.module);
33 if (!entries) {
34 entries = [];
35 exports.set(entry.module, entries);
36 }
37 entries.push(entry);
38 }
39 }
40 catch (e_1_1) { e_1 = { error: e_1_1 }; }
41 finally {
42 try {
43 if (privates_1_1 && !privates_1_1.done && (_a = privates_1.return)) _a.call(privates_1);
44 }
45 finally { if (e_1) throw e_1.error; }
46 }
47 var compareEntries = compare(function (e) { return e.name; });
48 var compareModules = compare(function (e) { return e[0]; });
49 var orderedExports = Array.from(exports)
50 .map(function (_a) {
51 var _b = tslib_1.__read(_a, 2), module = _b[0], entries = _b[1];
52 return [module, entries.sort(compareEntries)];
53 })
54 .sort(compareModules);
55 try {
56 for (var orderedExports_1 = tslib_1.__values(orderedExports), orderedExports_1_1 = orderedExports_1.next(); !orderedExports_1_1.done; orderedExports_1_1 = orderedExports_1.next()) {
57 var _c = tslib_1.__read(orderedExports_1_1.value, 2), module_1 = _c[0], entries = _c[1];
58 var symbols = entries.map(function (e) { return e.name + " as " + e.privateName; });
59 results.push("export {" + symbols + "} from '" + module_1 + "';");
60 }
61 }
62 catch (e_2_1) { e_2 = { error: e_2_1 }; }
63 finally {
64 try {
65 if (orderedExports_1_1 && !orderedExports_1_1.done && (_b = orderedExports_1.return)) _b.call(orderedExports_1);
66 }
67 finally { if (e_2) throw e_2.error; }
68 }
69 return results.join('\n');
70 }
71 exports.privateEntriesToIndex = privateEntriesToIndex;
72 function compare(select) {
73 return function (a, b) {
74 var ak = select(a);
75 var bk = select(b);
76 return ak > bk ? 1 : ak < bk ? -1 : 0;
77 };
78 }
79});
80//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXhfd3JpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29tcGlsZXItY2xpL3NyYy9tZXRhZGF0YS9pbmRleF93cml0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7OztJQUlILElBQU0sWUFBWSxHQUFHLHFEQUdwQixDQUFDO0lBSUYsU0FBZ0IscUJBQXFCLENBQUMsS0FBYSxFQUFFLFFBQThCOztRQUNqRixJQUFNLE9BQU8sR0FBYSxDQUFDLFlBQVksQ0FBQyxDQUFDO1FBRXpDLG1DQUFtQztRQUNuQyxPQUFPLENBQUMsSUFBSSxDQUFDLG9CQUFrQixLQUFLLE9BQUksRUFBRSxFQUFFLENBQUMsQ0FBQztRQUU5Qyx1QkFBdUI7UUFDdkIsSUFBTSxPQUFPLEdBQUcsSUFBSSxHQUFHLEVBQWdDLENBQUM7O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zID0gY29tcGFyZSgoZTogQnVuZGxlUHJpdmF0ZUVudHJ5KSA9PiBlLm5hbWUpO1xuICBjb25zdCBjb21wYXJlTW9kdWxlcyA9IGNvbXBhcmUoKGU6IE1hcEVudHJ5KSA9PiBlWzBdKTtcbiAgY29uc3Qgb3JkZXJlZEV4cG9ydHMgPVxuICAgICAgQXJyYXkuZnJvbShleHBvcnRzKVxuICAgICAgICAgIC5tYXAoKFttb2R1bGUsIGVudHJpZXNdKSA9PiA8TWFwRW50cnk+W21vZHVsZSwgZW50cmllcy5zb3J0KGNvbXBhcmVFbnRyaWVzKV0pXG4gICAgICAgICAgLnNvcnQoY29tcGFyZU1vZHVsZXMpO1xuXG4gIGZvciAoY29uc3QgW21vZHVsZSwgZW50cmllc10gb2Ygb3JkZXJlZEV4cG9ydHMpIHtcbiAgICBsZXQgc3ltYm9scyA9IGVudHJpZXMubWFwKGUgPT4gYCR7ZS5uYW1lfSBhcyAke2UucHJpdmF0ZU5hbWV9YCk7XG4gICAgcmVzdWx0cy5wdXNoKGBleHBvcnQgeyR7c3ltYm9sc319IGZyb20gJyR7bW9kdWxlfSc7YCk7XG4gIH1cblxuICByZXR1cm4gcmVzdWx0cy5qb2luKCdcXG4nKTtcbn1cblxuZnVuY3Rpb24gY29tcGFyZTxFLCBUPihzZWxlY3Q6IChlOiBFKSA9PiBUKTogKGE6IEUsIGI6IEUpID0+IG51bWJlciB7XG4gIHJldHVybiAoYSwgYikgPT4ge1xuICAgIGNvbnN0IGFrID0gc2VsZWN0KGEpO1xuICAgIGNvbnN0IGJrID0gc2VsZWN0KGIpO1xuICAgIHJldHVybiBhayA+IGJrID8gMSA6IGFrIDwgYmsgPyAtMSA6IDA7XG4gIH07XG59XG4iXX0=
Note: See TracBrowser for help on using the repository browser.