sealights-protractor-plugin 1.0.0 → 2.0.0
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/README.md +0 -1
- package/package.json +26 -29
- package/tsOutputs/lib/contracts.d.ts +5 -0
- package/tsOutputs/{src → lib}/contracts.js +0 -0
- package/tsOutputs/{src → lib}/contracts.js.map +1 -1
- package/tsOutputs/lib/index.d.ts +1 -0
- package/tsOutputs/{src → lib}/index.js +9 -8
- package/tsOutputs/lib/index.js.map +1 -0
- package/tsOutputs/src/cli-args-parser.js +0 -15
- package/tsOutputs/src/cli-args-parser.js.map +0 -1
- package/tsOutputs/src/index.js.map +0 -1
- package/tsOutputs/src/sealights-integration.js +0 -120
- package/tsOutputs/src/sealights-integration.js.map +0 -1
- package/tsOutputs/src/utils.js +0 -21
- package/tsOutputs/src/utils.js.map +0 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sealights-protractor-plugin",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "> TODO: description",
|
|
5
|
+
"author": "Roni Segal <roni@sealights.io>",
|
|
6
|
+
"homepage": "https://github.com/RoniSegal/SL.OnPremis.Plugins.JavaScript#readme",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"main": "tsOutputs/lib/index.js",
|
|
9
|
+
"directories": {
|
|
10
|
+
"lib": "lib",
|
|
11
|
+
"test": "tests"
|
|
10
12
|
},
|
|
11
13
|
"files": [
|
|
12
|
-
"tsOutputs/
|
|
14
|
+
"tsOutputs/lib"
|
|
13
15
|
],
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/RoniSegal/SL.OnPremis.Plugins.JavaScript.git"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc -p .",
|
|
22
|
+
"test": "mocha ./tsOutputs/test",
|
|
23
|
+
"update-driver": "webdriver-manager update"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/RoniSegal/SL.OnPremis.Plugins.JavaScript/issues"
|
|
27
|
+
},
|
|
17
28
|
"dependencies": {
|
|
18
|
-
"
|
|
29
|
+
"mocha": "^9.1.3",
|
|
19
30
|
"protractor": "^5.2.2",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
31
|
+
"sealights-plugins-common": "^2.0.0",
|
|
32
|
+
"typescript": "^4.4.4"
|
|
22
33
|
},
|
|
23
|
-
"
|
|
24
|
-
"@types/chai": "^4.2.21",
|
|
25
|
-
"@types/chai-as-promised": "^7.1.4",
|
|
26
|
-
"@types/mocha": "^8.2.3",
|
|
27
|
-
"@types/sinon": "^10.0.2",
|
|
28
|
-
"chai": "^4.3.4",
|
|
29
|
-
"chai-as-promised": "^7.1.1",
|
|
30
|
-
"chromedriver": "^91.0.1",
|
|
31
|
-
"mocha": "^7.2.0",
|
|
32
|
-
"node-testing-server": "^1.5.2",
|
|
33
|
-
"sinon": "^11.1.1",
|
|
34
|
-
"ts-node": "^10.1.0",
|
|
35
|
-
"typescript": "^4.3.5",
|
|
36
|
-
"webdriver-manager": "^12.1.8"
|
|
37
|
-
}
|
|
34
|
+
"gitHead": "c92ef90c7419700b60ca3af8f7f2babc10edc48c"
|
|
38
35
|
}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../lib/contracts.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,kCAAc,CAAA;IACd,8BAAW,CAAA;IACX,gCAAa,CAAA;AACjB,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,9 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const protractor_1 = require("protractor");
|
|
13
|
-
const sealights_integration_1 = require("./sealights-integration");
|
|
14
13
|
const contracts_1 = require("./contracts");
|
|
15
|
-
const
|
|
14
|
+
const sealights_plugins_common_1 = require("sealights-plugins-common");
|
|
16
15
|
const sendFootprintsScript = 'if(window && window.$SealightsAgent && window.$SealightsAgent.sendAllFootprints){' +
|
|
17
16
|
'window.$SealightsAgent.sendAllFootprints().' +
|
|
18
17
|
'then(arguments[arguments.length - 1])' +
|
|
@@ -23,16 +22,17 @@ const originalSeleniumMethods = new Map();
|
|
|
23
22
|
function runScriptSafe() {
|
|
24
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
24
|
try {
|
|
25
|
+
sealights_plugins_common_1.logger.info('About to send footprints from browser');
|
|
26
26
|
yield protractor_1.browser.executeAsyncScript(sendFootprintsScript);
|
|
27
27
|
}
|
|
28
28
|
catch (e) {
|
|
29
|
-
|
|
29
|
+
sealights_plugins_common_1.logger.lifecycle(`Unable to send footprints from browser, Error '${e.message}'`);
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
module.exports = {
|
|
34
34
|
name: 'sealights-protractor-plugin',
|
|
35
|
-
sealightsIntegration:
|
|
35
|
+
sealightsIntegration: sealights_plugins_common_1.SealightsIntegration,
|
|
36
36
|
setup: function () {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
Object.values(contracts_1.SeleniumMethods).forEach(method => {
|
|
@@ -44,15 +44,16 @@ module.exports = {
|
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
yield
|
|
49
|
-
yield this.sealightsIntegration.taskStart();
|
|
47
|
+
const instance = yield sealights_plugins_common_1.SealightsIntegration.getInstance();
|
|
48
|
+
yield instance.startExecution();
|
|
50
49
|
});
|
|
51
50
|
},
|
|
52
51
|
teardown: function () {
|
|
53
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
53
|
yield runScriptSafe();
|
|
55
|
-
yield
|
|
54
|
+
const instance = yield sealights_plugins_common_1.SealightsIntegration.getInstance();
|
|
55
|
+
yield instance.endExecution();
|
|
56
|
+
yield instance.stopAgent();
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAAwD;AACxD,2CAA4C;AAC5C,uEAAsE;AAEtE,MAAM,oBAAoB,GAAG,oFAAoF;IAC7G,6CAA6C;IAC7C,uCAAuC;IACvC,UAAU;IACV,oCAAoC;IACpC,GAAG,CAAC;AACR,MAAM,uBAAuB,GAAmC,IAAI,GAAG,EAAE,CAAC;AAE1E,SAAe,aAAa;;QACxB,IAAI;YACA,iCAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAA;YACpD,MAAM,oBAAiB,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;SACpE;QAAC,OAAO,CAAC,EAAE;YACR,iCAAM,CAAC,SAAS,CAAC,kDAAkD,CAAC,CAAC,OAAO,GAAG,CAAC,CAAA;SACnF;IACL,CAAC;CAAA;AAED,MAAM,CAAC,OAAO,GAAG;IACZ,IAAI,EAAE,6BAA6B;IACnC,oBAAoB,EAAE,+CAAoB;IAE3C,KAAK,EAAE;;YACF,MAAM,CAAC,MAAM,CAAC,2BAAe,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAC5C,uBAAuB,CAAC,MAAM,CAAC,GAAG,oBAAiB,CAAC,MAAM,CAAC,CAAC;gBAC5D,oBAAiB,CAAC,MAAM,CAAC,GAAG;;wBACxB,MAAM,aAAa,EAAE,CAAC;wBACtB,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;oBACjE,CAAC;iBAAA,CAAA;YACL,CAAC,CAAC,CAAC;YACJ,MAAM,QAAQ,GAAG,MAAM,+CAAoB,CAAC,WAAW,EAAE,CAAC;YAC1D,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;QACpC,CAAC;KAAA;IAGD,QAAQ,EAAE;;YACN,MAAM,aAAa,EAAE,CAAC;YACtB,MAAM,QAAQ,GAAG,MAAM,+CAAoB,CAAC,WAAW,EAAE,CAAC;YAC1D,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;YAC9B,MAAM,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC/B,CAAC;KAAA;CACJ,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSLArgs = void 0;
|
|
4
|
-
const minimist = require('minimist');
|
|
5
|
-
function getSLArgs() {
|
|
6
|
-
const args = minimist(process.argv.slice(2));
|
|
7
|
-
const slKeys = Object.keys(args).filter(key => key.indexOf('sl-') === 0);
|
|
8
|
-
const slArgs = {};
|
|
9
|
-
slKeys.forEach(key => {
|
|
10
|
-
slArgs[key.replace('sl-', '').toLowerCase()] = args[key];
|
|
11
|
-
});
|
|
12
|
-
return slArgs;
|
|
13
|
-
}
|
|
14
|
-
exports.getSLArgs = getSLArgs;
|
|
15
|
-
//# sourceMappingURL=cli-args-parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-args-parser.js","sourceRoot":"","sources":["../../src/cli-args-parser.ts"],"names":[],"mappings":";;;AAMA,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAA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CAAC,MAAM,CAAC,2BAAe,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAC5C,uBAAuB,CAAC,MAAM,CAAC,GAAG,oBAAiB,CAAC,MAAM,CAAC,CAAC;gBAC5D,oBAAiB,CAAC,MAAM,CAAC,GAAG;;wBACxB,MAAM,aAAa,EAAE,CAAC;wBACtB,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;oBACjE,CAAC;iBAAA,CAAA;YACL,CAAC,CAAC,CAAC;YACJ,IAAI,CAAC,oBAAoB,GAAG,IAAI,4CAAoB,CAAC,2BAAS,EAAE,CAAC,CAAA;YACjE,MAAM,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE,CAAC;YAC/C,MAAM,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,CAAC;QAChD,CAAC;KAAA;IAGD,QAAQ,EAAE;;YACN,MAAM,aAAa,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;QAC/C,CAAC;KAAA;CACJ,CAAA"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file copied from sl-testcafe-plugin
|
|
4
|
-
* Til end August 21 it should be moved to a plugin-common repo
|
|
5
|
-
*/
|
|
6
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
-
};
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.SealightsIntegration = void 0;
|
|
23
|
-
const slnodejs_1 = require("slnodejs");
|
|
24
|
-
const utils_1 = require("./utils");
|
|
25
|
-
class SealightsIntegration {
|
|
26
|
-
constructor(slArgs) {
|
|
27
|
-
this.slArgs = slArgs;
|
|
28
|
-
}
|
|
29
|
-
tryInitAgent() {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
try {
|
|
32
|
-
this.agent = yield slnodejs_1.createTiaAgent(this.slArgs);
|
|
33
|
-
yield this.agent.start();
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
// eslint-disable-next-line no-console
|
|
37
|
-
console.log(`Error while initializing Sealights agent ${e.message}`);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
taskStart() {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
yield this.agent.startExecution();
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
getExcludedTests() {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
return yield this.agent.getExcludedTests();
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
taskDone() {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
yield this.agent.endExecution();
|
|
54
|
-
yield this.agent.stop();
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
testStart(name, fixtureName, duration) {
|
|
58
|
-
const fullName = utils_1.buildTestFullName(name, fixtureName);
|
|
59
|
-
const startTime = slnodejs_1.getSystemDateValueOf() - duration;
|
|
60
|
-
this.agent.testStart(fullName, fixtureName, startTime);
|
|
61
|
-
}
|
|
62
|
-
testDone(name, fixtureName, testRunInfo, coverage) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const errors = testRunInfo.errs;
|
|
65
|
-
const hasErrors = !!errors.length;
|
|
66
|
-
const result = testRunInfo.skipped ? 'skipped' : (hasErrors ? 'failed' : 'passed');
|
|
67
|
-
const fullName = utils_1.buildTestFullName(name, fixtureName);
|
|
68
|
-
const duration = testRunInfo.durationMs;
|
|
69
|
-
this.testStart(name, fixtureName, duration);
|
|
70
|
-
this.agent.testEnd(fullName, fixtureName, duration, result, coverage);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
getBuildSessionId() {
|
|
74
|
-
return this.agent.agentConfig.buildSessionId.value;
|
|
75
|
-
}
|
|
76
|
-
static runAgentMethodSafe(defaultResult) {
|
|
77
|
-
return function (target, propertyKey, descriptor) {
|
|
78
|
-
const method = descriptor.value;
|
|
79
|
-
descriptor.value = function (...args) {
|
|
80
|
-
if (!this.agent)
|
|
81
|
-
return defaultResult;
|
|
82
|
-
try {
|
|
83
|
-
let result = method.apply(this, args);
|
|
84
|
-
// If method is asynchronous error does not thrown but rejected promise returned
|
|
85
|
-
if (result && result instanceof Promise) {
|
|
86
|
-
return result.catch((error) => {
|
|
87
|
-
return this.handleAgentError(error, method.name, defaultResult);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
return result;
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
return this.handleAgentError(error, method.name, defaultResult);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
handleAgentError(e, methodName, defaultResult) {
|
|
99
|
-
// eslint-disable-next-line no-console
|
|
100
|
-
console.log(`Error while executing method '${methodName}', Err: '${e.message}'`);
|
|
101
|
-
return defaultResult;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
__decorate([
|
|
105
|
-
SealightsIntegration.runAgentMethodSafe()
|
|
106
|
-
], SealightsIntegration.prototype, "taskStart", null);
|
|
107
|
-
__decorate([
|
|
108
|
-
SealightsIntegration.runAgentMethodSafe({})
|
|
109
|
-
], SealightsIntegration.prototype, "getExcludedTests", null);
|
|
110
|
-
__decorate([
|
|
111
|
-
SealightsIntegration.runAgentMethodSafe()
|
|
112
|
-
], SealightsIntegration.prototype, "taskDone", null);
|
|
113
|
-
__decorate([
|
|
114
|
-
SealightsIntegration.runAgentMethodSafe()
|
|
115
|
-
], SealightsIntegration.prototype, "testDone", null);
|
|
116
|
-
__decorate([
|
|
117
|
-
SealightsIntegration.runAgentMethodSafe()
|
|
118
|
-
], SealightsIntegration.prototype, "getBuildSessionId", null);
|
|
119
|
-
exports.SealightsIntegration = SealightsIntegration;
|
|
120
|
-
//# sourceMappingURL=sealights-integration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sealights-integration.js","sourceRoot":"","sources":["../../src/sealights-integration.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;AAEH,uCAA6F;AAC7F,mCAA0C;AAE1C,MAAa,oBAAoB;IAI/B,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEY,YAAY;;YACvB,IAAI;gBACF,IAAI,CAAC,KAAK,GAAG,MAAM,yBAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC/C,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;aAC1B;YAAC,OAAO,CAAC,EAAE;gBACV,sCAAsC;gBAC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CAAC,kBAAkB,EAAE;qDAGzC;AAGD;IADC,oBAAoB,CAAC,kBAAkB,CAAC,EAAE,CAAC;4DAG3C;AAGD;IADC,oBAAoB,CAAC,kBAAkB,EAAE;oDAIzC;AASD;IADC,oBAAoB,CAAC,kBAAkB,EAAE;oDASzC;AAGD;IADC,oBAAoB,CAAC,kBAAkB,EAAE;6DAGzC;AAtDH,oDAmFC"}
|
package/tsOutputs/src/utils.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAggregatedCoverageForTest = exports.buildTestFullName = void 0;
|
|
4
|
-
const istanbul_lib_coverage_1 = require("istanbul-lib-coverage");
|
|
5
|
-
function buildTestFullName(testName, fixtureName) {
|
|
6
|
-
return `${fixtureName} - ${testName}`;
|
|
7
|
-
}
|
|
8
|
-
exports.buildTestFullName = buildTestFullName;
|
|
9
|
-
/**
|
|
10
|
-
* Testcafe allows running tests in multiple browsers so each test may have several coverage objects.
|
|
11
|
-
* This method aggregate them to one by using 'merge' from 'istanbul-lib-coverage'
|
|
12
|
-
* If there is only single coverage object it will be returned as is.
|
|
13
|
-
*/
|
|
14
|
-
function getAggregatedCoverageForTest(coverageForTest = [{}]) {
|
|
15
|
-
const aggregated = coverageForTest.shift();
|
|
16
|
-
const coverageMap = istanbul_lib_coverage_1.createCoverageMap(aggregated);
|
|
17
|
-
coverageForTest.forEach(coverage => coverageMap.merge(coverage));
|
|
18
|
-
return aggregated;
|
|
19
|
-
}
|
|
20
|
-
exports.getAggregatedCoverageForTest = getAggregatedCoverageForTest;
|
|
21
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA,iEAAoE;AACpE,SAAgB,iBAAiB,CAAC,QAAgB,EAAE,WAAmB;IACnE,OAAO,GAAG,WAAW,MAAM,QAAQ,EAAE,CAAC;AAC1C,CAAC;AAFD,8CAEC;AAED;;;;GAIG;AACH,SAAgB,4BAA4B,CAAC,kBAAiC,CAAc,EAAE,CAAC;IAC3F,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC;IAC3C,MAAM,WAAW,GAAG,yCAAiB,CAAC,UAAU,CAAC,CAAC;IAClD,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,UAAU,CAAC;AACtB,CAAC;AALD,oEAKC"}
|