@anov/3d 0.0.91 → 0.0.93
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/dist/factory/3d.js +14 -11
- package/dist/factory/3d.js.map +1 -1
- package/dist/factory/unit/cylinder.js +40 -10
- package/dist/factory/unit/cylinder.js.map +1 -1
- package/dist/factory/unit/districtLine.d.ts +2 -0
- package/dist/factory/unit/districtLine.js +13 -0
- package/dist/factory/unit/districtLine.js.map +1 -1
- package/dist/factory/unit/handle.js +7 -0
- package/dist/factory/unit/handle.js.map +1 -1
- package/dist/factory/unit/index.js +7 -0
- package/dist/factory/unit/index.js.map +1 -1
- package/dist/factory/unit/inspection/index.js +2 -2
- package/dist/factory/unit/inspection/index.js.map +1 -1
- package/dist/factory/unit/slice.d.ts +12 -0
- package/dist/factory/unit/slice.js +122 -0
- package/dist/factory/unit/slice.js.map +1 -0
- package/dist/module/environment/index.d.ts +3 -1
- package/dist/module/environment/index.js +8 -7
- package/dist/module/environment/index.js.map +1 -1
- package/dist/module/environment/time/index.d.ts +1 -3
- package/dist/module/environment/time/index.js +10 -11
- package/dist/module/environment/time/index.js.map +1 -1
- package/dist/module/scene/index.d.ts +5 -2
- package/dist/module/scene/index.js +10 -1
- package/dist/module/scene/index.js.map +1 -1
- package/dist/sdkEntry.js +5 -6
- package/dist/sdkEntry.js.map +1 -1
- package/package.json +2 -2
- package/dist/factory/unit/point.d.ts +0 -10
- package/dist/factory/unit/point.js +0 -72
- package/dist/factory/unit/point.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Grow","MessageType","sendToMessage","EMessageStatus","factoryGlobalObject","Scene","grow","opt","Promise","res","Object","assign","onGrowInitCompleted","console","log","Event","Success","onGrowInStart","onGrowInCompleted","onGrowOutStart","onGrowOutCompleted","success","in","message","out","params","
|
|
1
|
+
{"version":3,"names":["Grow","MessageType","sendToMessage","EMessageStatus","factoryGlobalObject","Scene","app","grow","opt","Promise","res","Object","assign","onGrowInitCompleted","console","log","Event","Success","onGrowInStart","onGrowInCompleted","onGrowOutStart","onGrowOutCompleted","success","in","message","out","params","name","environment","skyControl","disabledSun","enabledSun","factory3D","toggleTag"],"sources":["../../../src/module/scene/index.ts"],"sourcesContent":["import type { Vector3 } from '@anov/3d-core'\nimport type { GrowOption } from '@anov/3d-ability'\nimport { EEaseType, ESceneGrowType, Grow } from '@anov/3d-ability'\nimport { MessageType, sendToMessage } from '../../utils/messageFn'\nimport { EMessageStatus } from '../../messageStatus'\nimport factoryGlobalObject from '../../factory/globalControl'\nimport type { BaseModule } from '../../utils/abstract'\nimport type Anov3D from '../../sdkEntry'\n\nexport class Scene implements BaseModule {\n app: Anov3D\n\n private grow: Grow\n private opt: GrowOption\n\n constructor(app: Anov3D) {\n this.app = app\n this.grow = null\n this.opt = {}\n }\n\n // [API:场景进出场初始化]\n growInit(opt?: GrowOption) {\n return new Promise ((res) => {\n Object.assign(this.opt, opt || {},\n {\n onGrowInitCompleted: () => {\n console.log('------:onGrowInitCompleted')\n sendToMessage(MessageType.Event, 'onGrowInitCompleted', EMessageStatus.Success)\n },\n onGrowInStart: () => {\n console.log('------:onGrowInStart')\n\n // opt.onGrowInStart && opt.onGrowInStart()\n sendToMessage(MessageType.Event, 'onGrowInStart', EMessageStatus.Success)\n },\n onGrowInCompleted: () => {\n console.log('------:onGrowInCompleted')\n\n // opt.onGrowInCompleted && opt.onGrowInCompleted()\n sendToMessage(MessageType.Event, 'onGrowInCompleted', EMessageStatus.Success)\n },\n onGrowOutStart: () => {\n // opt.onGrowOutStart && opt.onGrowOutStart()\n console.log('------:onGrowOutStart')\n sendToMessage(MessageType.Event, 'onGrowOutStart', EMessageStatus.Success)\n },\n onGrowOutCompleted: () => {\n // opt.onGrowOutCompleted && opt.onGrowOutCompleted()\n console.log('------:onGrowOutCompleted')\n sendToMessage(MessageType.Event, 'onGrowOutCompleted', EMessageStatus.Success)\n },\n })\n this.grow = new Grow(this.opt)\n res({ success: true })\n })\n }\n\n // [API:场景进出场动画]\n growIn() {\n return new Promise ((res) => {\n // 未初始化,不处理\n if (this.grow)\n this.grow.in(() => { res({ success: true }) })\n else res({ message: ' not scene grow init' })\n })\n }\n\n // [API:场景进出场动画]\n growOut() {\n return new Promise ((res) => {\n // 未初始化,不处理\n if (this.grow)\n this.grow.out(() => { res({ success: true }) })\n else res({ message: ' not scene grow init' })\n })\n }\n\n // temporary solution by lM\n toPage(params: any) {\n console.log('params:', params)\n\n if (params.name === 'Person') {\n // @ts-ignore\n this.app.environment.skyControl.disabledSun()\n }\n\n else {\n // @ts-ignore\n this.app.environment.skyControl.enabledSun()\n }\n\n factoryGlobalObject.factory3D.toggleTag(params.name)\n }\n}\n"],"mappings":";;;;;;;AAEA,SAAoCA,IAAI,QAAQ,kBAAkB;AAClE,SAASC,WAAW,EAAEC,aAAa;AACnC,SAASC,cAAc;AACvB,OAAOC,mBAAmB;AAI1B,WAAaC,KAAK;EAMhB,eAAYC,GAAW,EAAE;IAAA;IAAA;IAAA;IAAA;IACvB,IAAI,CAACA,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,IAAI,GAAG,IAAI;IAChB,IAAI,CAACC,GAAG,GAAG,CAAC,CAAC;EACf;;EAEA;EAAA;IAAA;IAAA,OACA,kBAASA,GAAgB,EAAE;MAAA;MACzB,OAAO,IAAIC,OAAO,CAAE,UAACC,GAAG,EAAK;QAC3BC,MAAM,CAACC,MAAM,CAAC,KAAI,CAACJ,GAAG,EAAEA,GAAG,IAAI,CAAC,CAAC,EAC/B;UACEK,mBAAmB,EAAE,+BAAM;YACzBC,OAAO,CAACC,GAAG,CAAC,4BAA4B,CAAC;YACzCb,aAAa,CAACD,WAAW,CAACe,KAAK,EAAE,qBAAqB,EAAEb,cAAc,CAACc,OAAO,CAAC;UACjF,CAAC;UACDC,aAAa,EAAE,yBAAM;YACnBJ,OAAO,CAACC,GAAG,CAAC,sBAAsB,CAAC;;YAEnC;YACAb,aAAa,CAACD,WAAW,C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AACA,IAAI,CAACkB,GAAG,CAAC,YAAM;UAAEf,GAAG,CAAC;YAAEY,OAAO,EAAE;UAAK,CAAC,CAAC;QAAC,CAAC,CAAC,MAC5CZ,GAAG,CAAC;UAAEc,OAAO,EAAE;QAAuB,CAAC,CAAC;MAC/C,CAAC,CAAC;IACJ;;IAEA;EAAA;IAAA;IAAA,OACA,gBAAOE,MAAW,EAAE;MAClBZ,OAAO,CAACC,GAAG,CAAC,SAAS,EAAEW,MAAM,CAAC;MAE9B,IAAIA,MAAM,CAACC,IAAI,KAAK,QAAQ,EAAE;QAC5B;QACA,IAAI,CAACrB,GAAG,CAACsB,WAAW,CAACC,UAAU,CAACC,WAAW,EAAE;MAC/C,CAAC,MAEI;QACH;QACA,IAAI,CAACxB,GAAG,CAACsB,WAAW,CAACC,UAAU,CAACE,UAAU,EAAE;MAC9C;MAEA3B,mBAAmB,CAAC4B,SAAS,CAACC,SAAS,CAACP,MAAM,CAACC,IAAI,CAAC;IACtD;EAAC;EAAA;AAAA"}
|
package/dist/sdkEntry.js
CHANGED
|
@@ -13,6 +13,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
13
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
14
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
15
|
import { HeatMap } from '@anov/3d-ability';
|
|
16
|
+
import Environment from "./module/environment";
|
|
16
17
|
import Camera from "./module/camera";
|
|
17
18
|
import { Scene } from "./module/scene";
|
|
18
19
|
import { provide } from "./utils/abstract";
|
|
@@ -22,12 +23,10 @@ import Develop from "./module/develop";
|
|
|
22
23
|
var App = (_dec = provide([{
|
|
23
24
|
name: 'camera',
|
|
24
25
|
module: Camera
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// },
|
|
30
|
-
{
|
|
26
|
+
}, {
|
|
27
|
+
name: 'environment',
|
|
28
|
+
module: Environment
|
|
29
|
+
}, {
|
|
31
30
|
name: 'scene',
|
|
32
31
|
module: Scene
|
|
33
32
|
}, {
|
package/dist/sdkEntry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HeatMap","Camera","Scene","provide","Anov3DCore","Factory","Develop","App","name","module"],"sources":["../src/sdkEntry.ts"],"sourcesContent":["import { HeatMap } from '@anov/3d-ability'\nimport Environment from './module/environment'\nimport Camera from './module/camera'\nimport { Scene } from './module/scene'\nimport { provide } from './utils/abstract'\nimport Anov3DCore from './anov3d'\nimport Factory from './factory/unit/handle'\nimport Develop from './module/develop'\n\nexport type Override<P, S> = Omit<P, keyof S> & S\n\n@provide(\n [\n {\n name: 'camera',\n module: Camera,\n },\n
|
|
1
|
+
{"version":3,"names":["HeatMap","Environment","Camera","Scene","provide","Anov3DCore","Factory","Develop","App","name","module"],"sources":["../src/sdkEntry.ts"],"sourcesContent":["import { HeatMap } from '@anov/3d-ability'\nimport Environment from './module/environment'\nimport Camera from './module/camera'\nimport { Scene } from './module/scene'\nimport { provide } from './utils/abstract'\nimport Anov3DCore from './anov3d'\nimport Factory from './factory/unit/handle'\nimport Develop from './module/develop'\n\nexport type Override<P, S> = Omit<P, keyof S> & S\n\n@provide(\n [\n {\n name: 'camera',\n module: Camera,\n },\n {\n name: 'environment',\n module: Environment,\n },\n {\n name: 'scene',\n module: Scene,\n },\n {\n name: 'heatMap',\n module: HeatMap,\n },\n {\n name: 'factory', // 工厂案例,非通用能力\n module: Factory,\n },\n {\n name: 'develop',\n module: Develop,\n },\n ],\n)\nclass App extends Anov3DCore {}\n\nexport default App\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAASA,OAAO,QAAQ,kBAAkB;AAC1C,OAAOC,WAAW;AAClB,OAAOC,MAAM;AACb,SAASC,KAAK;AACd,SAASC,OAAO;AAChB,OAAOC,UAAU;AACjB,OAAOC,OAAO;AACd,OAAOC,OAAO;AAAwB,IAgChCC,GAAG,WA5BRJ,OAAO,CACN,CACE;EACEK,IAAI,EAAE,QAAQ;EACdC,MAAM,EAAER;AACV,CAAC,EACD;EACEO,IAAI,EAAE,aAAa;EACnBC,MAAM,EAAET;AACV,CAAC,EACD;EACEQ,IAAI,EAAE,OAAO;EACbC,MAAM,EAAEP;AACV,CAAC,EACD;EACEM,IAAI,EAAE,SAAS;EACfC,MAAM,EAAEV;AACV,CAAC,EACD;EACES,IAAI,EAAE,SAAS;EAAE;EACjBC,MAAM,EAAEJ;AACV,CAAC,EACD;EACEG,IAAI,EAAE,SAAS;EACfC,MAAM,EAAEH;AACV,CAAC,CACF,CACF;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;AAAA,EACiBF,UAAU;AAE5B,eAAeG,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anov/3d",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.93",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"localforage": "^1.10.0",
|
|
23
23
|
"resize-observer-polyfill": "^1.5.1",
|
|
24
24
|
"uuid": "^9.0.1",
|
|
25
|
-
"@anov/3d-ability": "^0.0.
|
|
25
|
+
"@anov/3d-ability": "^0.0.14",
|
|
26
26
|
"@anov/3d-core": "^0.0.13"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import { AdditiveBlending, BufferAttribute, BufferGeometry, Color, Group, Points, ShaderMaterial } from '@anov/3d-core';
|
|
9
|
-
import { EPoiType, Poi } from '@anov/3d-ability';
|
|
10
|
-
// import vertexShader from './glsl/point/vertex.glsl'
|
|
11
|
-
// import fragmentShader from './glsl/point/fragment.glsl'
|
|
12
|
-
|
|
13
|
-
var data = {
|
|
14
|
-
重整装置区: [{
|
|
15
|
-
id: 2,
|
|
16
|
-
name: 'xxx',
|
|
17
|
-
position: [15.23, -0.00, 158.30]
|
|
18
|
-
}]
|
|
19
|
-
};
|
|
20
|
-
var PointManage = /*#__PURE__*/function () {
|
|
21
|
-
function PointManage(gobal) {
|
|
22
|
-
_classCallCheck(this, PointManage);
|
|
23
|
-
_defineProperty(this, "pointGroupMap", new Map());
|
|
24
|
-
_defineProperty(this, "scene", void 0);
|
|
25
|
-
_defineProperty(this, "gobal", void 0);
|
|
26
|
-
_defineProperty(this, "peoplePoi", void 0);
|
|
27
|
-
this.gobal = gobal;
|
|
28
|
-
this.scene = gobal.scene.scene;
|
|
29
|
-
}
|
|
30
|
-
_createClass(PointManage, [{
|
|
31
|
-
key: "generatePoint",
|
|
32
|
-
value: function generatePoint() {
|
|
33
|
-
var _this = this;
|
|
34
|
-
var _loop = function _loop() {
|
|
35
|
-
var group = new Group();
|
|
36
|
-
data[key].forEach(function (item) {
|
|
37
|
-
var geometry = new BufferGeometry();
|
|
38
|
-
geometry.setAttribute('position', new BufferAttribute(new Float32Array(item.position), 3));
|
|
39
|
-
var point = new Points(geometry, new ShaderMaterial({
|
|
40
|
-
vertexShader: "attribute float size;\n\n void main() {\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_PointSize = 20.0;\n gl_Position = projectionMatrix * mvPosition;\n }",
|
|
41
|
-
fragmentShader: "uniform vec3 color;\n\n void main() {\n float r = 0.0, delta = 0.0, alpha = 1.0;\n vec2 cxy = 2.0 * gl_PointCoord - 1.0;\n r = dot(cxy, cxy);\n delta = fwidth(r);\n alpha = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);\n if(r > 1.0)\n discard;\n gl_FragColor = vec4(color, alpha);\n }",
|
|
42
|
-
uniforms: {
|
|
43
|
-
color: {
|
|
44
|
-
value: new Color('yellow')
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
transparent: true,
|
|
48
|
-
depthWrite: false,
|
|
49
|
-
depthTest: false,
|
|
50
|
-
blending: AdditiveBlending
|
|
51
|
-
}));
|
|
52
|
-
_this.gobal.interactionManager.add(point);
|
|
53
|
-
point.addEventListener('mouseover', function () {
|
|
54
|
-
var poi = new Poi(EPoiType.Line);
|
|
55
|
-
_this.peoplePoi = poi.create(item.name);
|
|
56
|
-
_this.peoplePoi.position.copy(point.position);
|
|
57
|
-
_this.scene.add(_this.peoplePoi);
|
|
58
|
-
});
|
|
59
|
-
group.add(point);
|
|
60
|
-
});
|
|
61
|
-
_this.scene.add(group);
|
|
62
|
-
_this.pointGroupMap.set(key, group);
|
|
63
|
-
};
|
|
64
|
-
for (var key in data) {
|
|
65
|
-
_loop();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}]);
|
|
69
|
-
return PointManage;
|
|
70
|
-
}();
|
|
71
|
-
export default PointManage;
|
|
72
|
-
//# sourceMappingURL=point.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["AdditiveBlending","BufferAttribute","BufferGeometry","Color","Group","Points","ShaderMaterial","EPoiType","Poi","data","重整装置区","id","name","position","PointManage","gobal","Map","scene","group","key","forEach","item","geometry","setAttribute","Float32Array","point","vertexShader","fragmentShader","uniforms","color","value","transparent","depthWrite","depthTest","blending","interactionManager","add","addEventListener","poi","Line","peoplePoi","create","copy","pointGroupMap","set"],"sources":["../../../src/factory/unit/point.ts"],"sourcesContent":["import type { Object3D, Scene } from '@anov/3d-core'\nimport { AdditiveBlending, BufferAttribute, BufferGeometry, Color, Group, Points, ShaderMaterial } from '@anov/3d-core'\nimport { EPoiType, Poi } from '@anov/3d-ability'\nimport type Factory3D from '../3d'\n\n// import vertexShader from './glsl/point/vertex.glsl'\n// import fragmentShader from './glsl/point/fragment.glsl'\n\nconst data = {\n 重整装置区: [\n {\n id: 2,\n name: 'xxx',\n position: [15.23, -0.00, 158.30],\n },\n ],\n}\n\nclass PointManage {\n private pointGroupMap: Map<string, Group> = new Map()\n private scene: Scene\n private gobal: Factory3D\n private peoplePoi: Object3D\n\n constructor(gobal: Factory3D) {\n this.gobal = gobal\n this.scene = gobal.scene.scene\n }\n\n generatePoint() {\n for (const key in data) {\n const group = new Group()\n\n data[key].forEach((item) => {\n const geometry = new BufferGeometry()\n geometry.setAttribute('position', new BufferAttribute(new Float32Array(item.position), 3))\n\n const point = new Points(geometry,\n new ShaderMaterial({\n vertexShader: `attribute float size;\n\n void main() {\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_PointSize = 20.0;\n gl_Position = projectionMatrix * mvPosition;\n }`,\n fragmentShader: `uniform vec3 color;\n\n void main() {\n float r = 0.0, delta = 0.0, alpha = 1.0;\n vec2 cxy = 2.0 * gl_PointCoord - 1.0;\n r = dot(cxy, cxy);\n delta = fwidth(r);\n alpha = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);\n if(r > 1.0)\n discard;\n gl_FragColor = vec4(color, alpha);\n }`,\n uniforms: {\n color: { value: new Color('yellow') },\n },\n transparent: true,\n depthWrite: false,\n depthTest: false,\n blending: AdditiveBlending,\n }),\n )\n this.gobal.interactionManager.add(point)\n\n point.addEventListener('mouseover', () => {\n const poi = new Poi(EPoiType.Line)\n this.peoplePoi = poi.create(item.name)\n this.peoplePoi.position.copy(point.position)\n this.scene.add(this.peoplePoi)\n })\n group.add(point)\n })\n\n this.scene.add(group)\n this.pointGroupMap.set(key, group)\n }\n }\n}\n\nexport default PointManage"],"mappings":";;;;;;;AACA,SAASA,gBAAgB,EAAEC,eAAe,EAAEC,cAAc,EAAEC,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAEC,cAAc,QAAQ,eAAe;AACvH,SAASC,QAAQ,EAAEC,GAAG,QAAQ,kBAAkB;AAGhD;AACA;;AAEA,IAAMC,IAAI,GAAG;EACXC,KAAK,EAAE,CACL;IACEC,EAAE,EAAE,CAAC;IACLC,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM;EACjC,CAAC;AAEL,CAAC;AAAA,IAEKC,WAAW;EAMf,qBAAYC,KAAgB,EAAE;IAAA;IAAA,uCALc,IAAIC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