@loaders.gl/tile-converter 4.2.0-alpha.3 → 4.2.0-alpha.5

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.
Files changed (144) hide show
  1. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts +3 -3
  2. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
  3. package/dist/3d-tiles-converter/3d-tiles-converter.js +329 -293
  4. package/dist/3d-tiles-converter/helpers/b3dm-converter.js +257 -200
  5. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +14 -5
  6. package/dist/3d-tiles-converter/helpers/load-i3s.js +106 -75
  7. package/dist/3d-tiles-converter/helpers/texture-atlas.js +44 -21
  8. package/dist/3d-tiles-converter/json-templates/tileset.js +32 -33
  9. package/dist/constants.js +0 -1
  10. package/dist/converter-cli.js +255 -234
  11. package/dist/converter.min.cjs +80 -90
  12. package/dist/deps-installer/deps-installer.js +73 -59
  13. package/dist/i3s-converter/helpers/attribute-metadata-info.js +207 -153
  14. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts +1 -1
  15. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
  16. package/dist/i3s-converter/helpers/batch-ids-extensions.js +145 -103
  17. package/dist/i3s-converter/helpers/coordinate-converter.js +100 -65
  18. package/dist/i3s-converter/helpers/create-scene-server-path.js +14 -9
  19. package/dist/i3s-converter/helpers/feature-attributes.js +168 -105
  20. package/dist/i3s-converter/helpers/geometry-attributes.d.ts +1 -1
  21. package/dist/i3s-converter/helpers/geometry-attributes.d.ts.map +1 -1
  22. package/dist/i3s-converter/helpers/geometry-attributes.js +204 -212
  23. package/dist/i3s-converter/helpers/geometry-converter.d.ts +2 -2
  24. package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
  25. package/dist/i3s-converter/helpers/geometry-converter.js +1148 -829
  26. package/dist/i3s-converter/helpers/gltf-attributes.d.ts +1 -1
  27. package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +1 -1
  28. package/dist/i3s-converter/helpers/gltf-attributes.js +111 -97
  29. package/dist/i3s-converter/helpers/load-3d-tiles.js +103 -66
  30. package/dist/i3s-converter/helpers/node-debug.js +98 -54
  31. package/dist/i3s-converter/helpers/node-index-document.d.ts +3 -3
  32. package/dist/i3s-converter/helpers/node-index-document.d.ts.map +1 -1
  33. package/dist/i3s-converter/helpers/node-index-document.js +248 -177
  34. package/dist/i3s-converter/helpers/node-pages.d.ts +1 -1
  35. package/dist/i3s-converter/helpers/node-pages.d.ts.map +1 -1
  36. package/dist/i3s-converter/helpers/node-pages.js +299 -194
  37. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts +1 -1
  38. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts.map +1 -1
  39. package/dist/i3s-converter/helpers/preprocess-3d-tiles.js +92 -60
  40. package/dist/i3s-converter/helpers/progress.js +134 -83
  41. package/dist/i3s-converter/helpers/tileset-traversal.d.ts +1 -1
  42. package/dist/i3s-converter/helpers/tileset-traversal.d.ts.map +1 -1
  43. package/dist/i3s-converter/helpers/tileset-traversal.js +24 -13
  44. package/dist/i3s-converter/i3s-converter.d.ts +7 -7
  45. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  46. package/dist/i3s-converter/i3s-converter.js +1044 -898
  47. package/dist/i3s-converter/json-templates/geometry-definitions.js +70 -79
  48. package/dist/i3s-converter/json-templates/layers.js +120 -121
  49. package/dist/i3s-converter/json-templates/metadata.js +19 -20
  50. package/dist/i3s-converter/json-templates/node.js +73 -71
  51. package/dist/i3s-converter/json-templates/scene-server.js +25 -26
  52. package/dist/i3s-converter/json-templates/shared-resources.js +107 -108
  53. package/dist/i3s-converter/json-templates/store.js +96 -94
  54. package/dist/i3s-converter/types.js +35 -23
  55. package/dist/i3s-server/app.js +15 -12
  56. package/dist/i3s-server/bin/www.js +14 -7
  57. package/dist/i3s-server/controllers/index-controller.js +18 -15
  58. package/dist/i3s-server/controllers/slpk-controller.js +22 -11
  59. package/dist/i3s-server/routes/index.js +9 -8
  60. package/dist/i3s-server/routes/slpk-router.js +18 -17
  61. package/dist/i3s-server/utils/create-scene-server.js +15 -10
  62. package/dist/i3s-server/utils/server-utils.js +49 -32
  63. package/dist/index.cjs +292 -851
  64. package/dist/index.cjs.map +7 -0
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +0 -1
  68. package/dist/lib/json-schemas/conversion-dump-json-schema.js +243 -421
  69. package/dist/lib/utils/cli-utils.js +63 -36
  70. package/dist/lib/utils/compress-util.js +20 -15
  71. package/dist/lib/utils/conversion-dump.d.ts +1 -1
  72. package/dist/lib/utils/conversion-dump.d.ts.map +1 -1
  73. package/dist/lib/utils/conversion-dump.js +209 -187
  74. package/dist/lib/utils/file-utils.js +122 -74
  75. package/dist/lib/utils/geometry-utils.js +13 -7
  76. package/dist/lib/utils/lod-conversion-utils.js +65 -33
  77. package/dist/lib/utils/queue.js +12 -13
  78. package/dist/lib/utils/statistic-utills.d.ts +6 -23
  79. package/dist/lib/utils/statistic-utills.js +64 -59
  80. package/dist/lib/utils/write-queue.d.ts +2 -2
  81. package/dist/lib/utils/write-queue.d.ts.map +1 -1
  82. package/dist/lib/utils/write-queue.js +68 -86
  83. package/dist/pgm-loader.js +17 -13
  84. package/dist/slpk-extractor/slpk-extractor.js +59 -50
  85. package/dist/slpk-extractor-cli.js +82 -59
  86. package/package.json +18 -18
  87. package/dist/3d-tiles-converter/3d-tiles-converter.js.map +0 -1
  88. package/dist/3d-tiles-converter/helpers/b3dm-converter.js.map +0 -1
  89. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js.map +0 -1
  90. package/dist/3d-tiles-converter/helpers/load-i3s.js.map +0 -1
  91. package/dist/3d-tiles-converter/helpers/texture-atlas.js.map +0 -1
  92. package/dist/3d-tiles-converter/json-templates/tileset.js.map +0 -1
  93. package/dist/constants.js.map +0 -1
  94. package/dist/converter-cli.js.map +0 -1
  95. package/dist/deps-installer/deps-installer.js.map +0 -1
  96. package/dist/i3s-converter/helpers/attribute-metadata-info.js.map +0 -1
  97. package/dist/i3s-converter/helpers/batch-ids-extensions.js.map +0 -1
  98. package/dist/i3s-converter/helpers/coordinate-converter.js.map +0 -1
  99. package/dist/i3s-converter/helpers/create-scene-server-path.js.map +0 -1
  100. package/dist/i3s-converter/helpers/feature-attributes.js.map +0 -1
  101. package/dist/i3s-converter/helpers/geometry-attributes.js.map +0 -1
  102. package/dist/i3s-converter/helpers/geometry-converter.js.map +0 -1
  103. package/dist/i3s-converter/helpers/gltf-attributes.js.map +0 -1
  104. package/dist/i3s-converter/helpers/load-3d-tiles.js.map +0 -1
  105. package/dist/i3s-converter/helpers/node-debug.js.map +0 -1
  106. package/dist/i3s-converter/helpers/node-index-document.js.map +0 -1
  107. package/dist/i3s-converter/helpers/node-pages.js.map +0 -1
  108. package/dist/i3s-converter/helpers/preprocess-3d-tiles.js.map +0 -1
  109. package/dist/i3s-converter/helpers/progress.js.map +0 -1
  110. package/dist/i3s-converter/helpers/tileset-traversal.js.map +0 -1
  111. package/dist/i3s-converter/i3s-converter.js.map +0 -1
  112. package/dist/i3s-converter/json-templates/geometry-definitions.js.map +0 -1
  113. package/dist/i3s-converter/json-templates/layers.js.map +0 -1
  114. package/dist/i3s-converter/json-templates/metadata.js.map +0 -1
  115. package/dist/i3s-converter/json-templates/node.js.map +0 -1
  116. package/dist/i3s-converter/json-templates/scene-server.js.map +0 -1
  117. package/dist/i3s-converter/json-templates/shared-resources.js.map +0 -1
  118. package/dist/i3s-converter/json-templates/store.js.map +0 -1
  119. package/dist/i3s-converter/types.js.map +0 -1
  120. package/dist/i3s-server/README.md +0 -63
  121. package/dist/i3s-server/app.js.map +0 -1
  122. package/dist/i3s-server/bin/www.js.map +0 -1
  123. package/dist/i3s-server/certs/cert.pem +0 -19
  124. package/dist/i3s-server/certs/key.pem +0 -27
  125. package/dist/i3s-server/controllers/index-controller.js.map +0 -1
  126. package/dist/i3s-server/controllers/slpk-controller.js.map +0 -1
  127. package/dist/i3s-server/routes/index.js.map +0 -1
  128. package/dist/i3s-server/routes/slpk-router.js.map +0 -1
  129. package/dist/i3s-server/utils/create-scene-server.js.map +0 -1
  130. package/dist/i3s-server/utils/server-utils.js.map +0 -1
  131. package/dist/index.js.map +0 -1
  132. package/dist/lib/json-schemas/conversion-dump-json-schema.js.map +0 -1
  133. package/dist/lib/utils/cli-utils.js.map +0 -1
  134. package/dist/lib/utils/compress-util.js.map +0 -1
  135. package/dist/lib/utils/conversion-dump.js.map +0 -1
  136. package/dist/lib/utils/file-utils.js.map +0 -1
  137. package/dist/lib/utils/geometry-utils.js.map +0 -1
  138. package/dist/lib/utils/lod-conversion-utils.js.map +0 -1
  139. package/dist/lib/utils/queue.js.map +0 -1
  140. package/dist/lib/utils/statistic-utills.js.map +0 -1
  141. package/dist/lib/utils/write-queue.js.map +0 -1
  142. package/dist/pgm-loader.js.map +0 -1
  143. package/dist/slpk-extractor/slpk-extractor.js.map +0 -1
  144. package/dist/slpk-extractor-cli.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import type { Tiles3DTileContent } from '@loaders.gl/3d-tiles';
2
2
  import { Matrix4, Vector3 } from '@math.gl/core';
3
3
  import { BoundingSphere, OrientedBoundingBox } from '@math.gl/culling';
4
- import { GLTFAttributesData } from '../types';
4
+ import { GLTFAttributesData } from "../types.js";
5
5
  /**
6
6
  * Prepare attributes for conversion to avoid binary data breaking in worker thread.
7
7
  * @param tileContent - 3DTiles tile content
@@ -1 +1 @@
1
- {"version":3,"file":"gltf-attributes.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/gltf-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,OAAO,EAAc,OAAO,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD,kBAAkB,CAyCpB;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,OAAO,CAAA;CAAC,CAkCrD"}
1
+ {"version":3,"file":"gltf-attributes.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/gltf-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,OAAO,EAAc,OAAO,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAC,kBAAkB,EAAC,oBAAiB;AAE5C;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD,kBAAkB,CAyCpB;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,OAAO,CAAA;CAAC,CAkCrD"}
@@ -1,110 +1,124 @@
1
1
  import { Matrix4, Vector3 } from '@math.gl/core';
2
2
  import { Ellipsoid } from '@math.gl/geospatial';
3
+ /**
4
+ * Prepare attributes for conversion to avoid binary data breaking in worker thread.
5
+ * @param tileContent - 3DTiles tile content
6
+ * @param tileTransform - transformation matrix of the tile, calculated recursively multiplying
7
+ * transform of all parent tiles and transform of the current tile
8
+ * @param boundingVolume - initialized bounding volume of the source tile
9
+ * @returns 3DTiles content data, prepared for conversion
10
+ */
3
11
  export function prepareDataForAttributesConversion(tileContent, tileTransform, boundingVolume) {
4
- var _tileContent$gltf, _tileContent$gltf$sce, _tileContent$gltf2, _tileContent$gltf2$sc, _tileContent$gltf2$sc2, _tileContent$gltf3, _tileContent$gltf4, _tileContent$gltf4$im;
5
- let nodes = ((_tileContent$gltf = tileContent.gltf) === null || _tileContent$gltf === void 0 ? void 0 : (_tileContent$gltf$sce = _tileContent$gltf.scene) === null || _tileContent$gltf$sce === void 0 ? void 0 : _tileContent$gltf$sce.nodes) || ((_tileContent$gltf2 = tileContent.gltf) === null || _tileContent$gltf2 === void 0 ? void 0 : (_tileContent$gltf2$sc = _tileContent$gltf2.scenes) === null || _tileContent$gltf2$sc === void 0 ? void 0 : (_tileContent$gltf2$sc2 = _tileContent$gltf2$sc[0]) === null || _tileContent$gltf2$sc2 === void 0 ? void 0 : _tileContent$gltf2$sc2.nodes) || ((_tileContent$gltf3 = tileContent.gltf) === null || _tileContent$gltf3 === void 0 ? void 0 : _tileContent$gltf3.nodes) || [];
6
- const images = ((_tileContent$gltf4 = tileContent.gltf) === null || _tileContent$gltf4 === void 0 ? void 0 : (_tileContent$gltf4$im = _tileContent$gltf4.images) === null || _tileContent$gltf4$im === void 0 ? void 0 : _tileContent$gltf4$im.map(imageObject => {
7
- var _imageObject$image;
8
- if (imageObject !== null && imageObject !== void 0 && (_imageObject$image = imageObject.image) !== null && _imageObject$image !== void 0 && _imageObject$image.compressed) {
9
- return null;
10
- } else {
11
- var _imageObject$image2;
12
- const data = imageObject === null || imageObject === void 0 ? void 0 : (_imageObject$image2 = imageObject.image) === null || _imageObject$image2 === void 0 ? void 0 : _imageObject$image2.data;
13
- const dataCopy = new Uint8Array(data.length);
14
- dataCopy.set(data);
15
- return {
16
- data: dataCopy,
17
- compressed: false,
18
- height: imageObject.image.height,
19
- width: imageObject.image.width,
20
- components: imageObject.image.components,
21
- mimeType: imageObject.mimeType
22
- };
23
- }
24
- })) || [];
25
- prepareNodes(nodes);
26
- const {
27
- cartographicOrigin,
28
- modelMatrix: cartesianModelMatrix
29
- } = calculateTransformProps(tileContent, tileTransform, boundingVolume);
30
- return {
31
- nodes,
32
- images,
33
- cartographicOrigin,
34
- cartesianModelMatrix
35
- };
12
+ let nodes = tileContent.gltf?.scene?.nodes ||
13
+ tileContent.gltf?.scenes?.[0]?.nodes ||
14
+ tileContent.gltf?.nodes ||
15
+ [];
16
+ const images = tileContent.gltf?.images?.map((imageObject) => {
17
+ // Need data only for uncompressed images because we can't get batchIds from compressed textures.
18
+ if (imageObject?.image?.compressed) {
19
+ return null;
20
+ }
21
+ else {
22
+ const data = imageObject?.image?.data;
23
+ const dataCopy = new Uint8Array(data.length);
24
+ dataCopy.set(data);
25
+ return {
26
+ data: dataCopy,
27
+ compressed: false,
28
+ height: imageObject.image.height,
29
+ width: imageObject.image.width,
30
+ components: imageObject.image.components,
31
+ mimeType: imageObject.mimeType
32
+ };
33
+ }
34
+ }) || [];
35
+ prepareNodes(nodes);
36
+ const { cartographicOrigin, modelMatrix: cartesianModelMatrix } = calculateTransformProps(tileContent, tileTransform, boundingVolume);
37
+ return {
38
+ nodes,
39
+ images,
40
+ cartographicOrigin,
41
+ cartesianModelMatrix
42
+ };
36
43
  }
44
+ /**
45
+ * Keep only values for glTF attributes to pass data to worker thread.
46
+ * @param attributes - geometry attributes
47
+ * @returns attributes with only `value` item
48
+ */
37
49
  function getB3DMAttributesWithoutBufferView(attributes) {
38
- const attributesWithoutBufferView = {};
39
- for (const attributeName in attributes) {
40
- attributesWithoutBufferView[attributeName] = {
41
- value: attributes[attributeName].value
42
- };
43
- }
44
- return attributesWithoutBufferView;
50
+ const attributesWithoutBufferView = {};
51
+ for (const attributeName in attributes) {
52
+ attributesWithoutBufferView[attributeName] = {
53
+ value: attributes[attributeName].value
54
+ };
55
+ }
56
+ return attributesWithoutBufferView;
45
57
  }
58
+ /**
59
+ * Calculate transformation properties to transform vertex attributes (POSITION, NORMAL, etc.)
60
+ * from METER_OFFSET coorditantes to LNGLAT_OFFSET coordinates
61
+ * @param tileContent - 3DTiles tile content
62
+ * @param tileTransform - transformation matrix of the tile, calculated recursively multiplying
63
+ * transform of all parent tiles and transform of the current tile
64
+ * @param boundingVolume - initialized bounding volume of the source tile
65
+ * @returns modelMatrix - transformation matrix to transform coordinates to cartographic coordinates
66
+ * cartographicOrigin - tile origin coordinates to calculate offsets
67
+ */
46
68
  export function calculateTransformProps(tileContent, tileTransform, boundingVolume) {
47
- const {
48
- rtcCenter,
49
- gltfUpAxis
50
- } = tileContent;
51
- const {
52
- center
53
- } = boundingVolume;
54
- let modelMatrix = new Matrix4(tileTransform);
55
- if (rtcCenter) {
56
- modelMatrix.translate(rtcCenter);
57
- }
58
- switch (gltfUpAxis) {
59
- case 'Z':
60
- break;
61
- case 'Y':
62
- const rotationY = new Matrix4().rotateX(Math.PI / 2);
63
- modelMatrix = modelMatrix.multiplyRight(rotationY);
64
- break;
65
- case 'X':
66
- const rotationX = new Matrix4().rotateY(-Math.PI / 2);
67
- modelMatrix = modelMatrix.multiplyRight(rotationX);
68
- break;
69
- default:
70
- break;
71
- }
72
- const cartesianOrigin = new Vector3(center);
73
- const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(cartesianOrigin, new Vector3());
74
- return {
75
- modelMatrix,
76
- cartographicOrigin
77
- };
69
+ const { rtcCenter, gltfUpAxis } = tileContent;
70
+ const { center } = boundingVolume;
71
+ let modelMatrix = new Matrix4(tileTransform);
72
+ // Translate if appropriate
73
+ if (rtcCenter) {
74
+ modelMatrix.translate(rtcCenter);
75
+ }
76
+ // glTF models need to be rotated from Y to Z up
77
+ // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up
78
+ switch (gltfUpAxis) {
79
+ case 'Z':
80
+ break;
81
+ case 'Y':
82
+ const rotationY = new Matrix4().rotateX(Math.PI / 2);
83
+ modelMatrix = modelMatrix.multiplyRight(rotationY);
84
+ break;
85
+ case 'X':
86
+ const rotationX = new Matrix4().rotateY(-Math.PI / 2);
87
+ modelMatrix = modelMatrix.multiplyRight(rotationX);
88
+ break;
89
+ default:
90
+ break;
91
+ }
92
+ const cartesianOrigin = new Vector3(center);
93
+ const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(cartesianOrigin, new Vector3());
94
+ return { modelMatrix, cartographicOrigin };
78
95
  }
96
+ /**
97
+ * Traverse all nodes to replace all sensible data with copy to avoid data corruption in worker.
98
+ * @param nodes
99
+ */
79
100
  function prepareNodes(nodes) {
80
- for (let index = 0; index < nodes.length; index++) {
81
- const node = nodes[index];
82
- if (node.mesh) {
83
- var _node$mesh;
84
- nodes[index] = {
85
- ...node,
86
- mesh: {
87
- ...node.mesh,
88
- primitives: (_node$mesh = node.mesh) === null || _node$mesh === void 0 ? void 0 : _node$mesh.primitives.map(primitive => {
89
- var _primitive$indices, _primitive$material, _primitive$material2;
90
- return {
91
- ...primitive,
92
- indices: {
93
- value: primitive === null || primitive === void 0 ? void 0 : (_primitive$indices = primitive.indices) === null || _primitive$indices === void 0 ? void 0 : _primitive$indices.value
94
- },
95
- attributes: getB3DMAttributesWithoutBufferView(primitive.attributes),
96
- material: {
97
- id: primitive === null || primitive === void 0 ? void 0 : (_primitive$material = primitive.material) === null || _primitive$material === void 0 ? void 0 : _primitive$material.id,
98
- uniqueId: primitive === null || primitive === void 0 ? void 0 : (_primitive$material2 = primitive.material) === null || _primitive$material2 === void 0 ? void 0 : _primitive$material2.uniqueId
99
- }
101
+ for (let index = 0; index < nodes.length; index++) {
102
+ const node = nodes[index];
103
+ if (node.mesh) {
104
+ nodes[index] = {
105
+ ...node,
106
+ mesh: {
107
+ ...node.mesh,
108
+ primitives: node.mesh?.primitives.map((primitive) => ({
109
+ ...primitive,
110
+ indices: { value: primitive?.indices?.value },
111
+ attributes: getB3DMAttributesWithoutBufferView(primitive.attributes),
112
+ material: {
113
+ id: primitive?.material?.id,
114
+ uniqueId: primitive?.material?.uniqueId
115
+ }
116
+ }))
117
+ }
100
118
  };
101
- })
102
119
  }
103
- };
104
- }
105
- if (node.children) {
106
- prepareNodes(node.children);
120
+ if (node.children) {
121
+ prepareNodes(node.children);
122
+ }
107
123
  }
108
- }
109
124
  }
110
- //# sourceMappingURL=gltf-attributes.js.map
@@ -2,83 +2,120 @@ import { Tiles3DArchive } from '@loaders.gl/3d-tiles';
2
2
  import { load } from '@loaders.gl/core';
3
3
  import { FileHandleFile } from '@loaders.gl/loader-utils';
4
4
  import { CD_HEADER_SIGNATURE, ZipFileSystem, parseHashTable, parseZipCDFileHeader, parseZipLocalFileHeader, searchFromTheEnd } from '@loaders.gl/zip';
5
+ /**
6
+ * Load nested 3DTiles tileset. If the sourceTile is not nested tileset - do nothing
7
+ * @param sourceTileset - source root tileset JSON
8
+ * @param sourceTile - source tile JSON that is supposed to has link to nested tileset
9
+ * @param tilesetLoadOptions - load options for Tiles3DLoader
10
+ * @returns nothing
11
+ */
5
12
  export const loadNestedTileset = async (sourceTileset, sourceTile, tilesetLoadOptions) => {
6
- const isTileset = isNestedTileset(sourceTile);
7
- if (!sourceTileset || !sourceTile.contentUrl || !isTileset) {
8
- return;
9
- }
10
- const loadOptions = {
11
- ...tilesetLoadOptions,
12
- [sourceTileset.loader.id]: {
13
- isTileset,
14
- assetGltfUpAxis: sourceTileset.asset && sourceTileset.asset.gltfUpAxis || 'Y'
13
+ const isTileset = isNestedTileset(sourceTile);
14
+ if (!sourceTileset || !sourceTile.contentUrl || !isTileset) {
15
+ return;
16
+ }
17
+ const loadOptions = {
18
+ ...tilesetLoadOptions,
19
+ [sourceTileset.loader.id]: {
20
+ isTileset,
21
+ assetGltfUpAxis: (sourceTileset.asset && sourceTileset.asset.gltfUpAxis) || 'Y'
22
+ }
23
+ };
24
+ const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
25
+ if (tileContent.root) {
26
+ sourceTile.children = [tileContent.root];
15
27
  }
16
- };
17
- const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
18
- if (tileContent.root) {
19
- sourceTile.children = [tileContent.root];
20
- }
21
28
  };
29
+ /**
30
+ * Load 3DTiles tile content, that includes glTF object
31
+ * @param sourceTileset - source root tileset JSON
32
+ * @param sourceTile - source tile JSON that has link to content data
33
+ * @param tilesetLoadOptions - load options for Tiles3DLoader
34
+ * @returns - 3DTiles tile content or null
35
+ */
22
36
  export const loadTile3DContent = async (sourceTileset, sourceTile, tilesetLoadOptions) => {
23
- const isTileset = isNestedTileset(sourceTile);
24
- if (!sourceTileset || !sourceTile.contentUrl || isTileset) {
25
- return null;
26
- }
27
- const loadOptions = {
28
- ...tilesetLoadOptions,
29
- [sourceTileset.loader.id]: {
30
- ...(tilesetLoadOptions[sourceTileset.loader.id] || {}),
31
- isTileset,
32
- assetGltfUpAxis: sourceTileset.asset && sourceTileset.asset.gltfUpAxis || 'Y'
37
+ const isTileset = isNestedTileset(sourceTile);
38
+ if (!sourceTileset || !sourceTile.contentUrl || isTileset) {
39
+ return null;
33
40
  }
34
- };
35
- const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
36
- return tileContent;
41
+ const loadOptions = {
42
+ ...tilesetLoadOptions,
43
+ [sourceTileset.loader.id]: {
44
+ // @ts-ignore
45
+ ...(tilesetLoadOptions[sourceTileset.loader.id] || {}),
46
+ isTileset,
47
+ assetGltfUpAxis: (sourceTileset.asset && sourceTileset.asset.gltfUpAxis) || 'Y'
48
+ }
49
+ };
50
+ const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
51
+ return tileContent;
37
52
  };
53
+ /**
54
+ * Load a resource with load options and .3tz format support
55
+ * @param url - resource URL
56
+ * @param loader - loader to parse data (Tiles3DLoader / CesiumIonLoader)
57
+ * @param loadOptions - 3d-tiles loader options
58
+ * @returns 3d-tiles resource
59
+ */
38
60
  export async function loadFromArchive(url, loader, loadOptions) {
39
- const tz3UrlParts = url.split('.3tz');
40
- let filename;
41
- if (tz3UrlParts.length === 1) {
42
- filename = null;
43
- } else if (tz3UrlParts.length === 2) {
44
- filename = tz3UrlParts[1].slice(1);
45
- if (filename === '') {
46
- filename = 'tileset.json';
61
+ const tz3UrlParts = url.split('.3tz');
62
+ let filename;
63
+ // No '.3tz'. The file will be loaded with global fetch function
64
+ if (tz3UrlParts.length === 1) {
65
+ filename = null;
66
+ }
67
+ else if (tz3UrlParts.length === 2) {
68
+ filename = tz3UrlParts[1].slice(1);
69
+ if (filename === '') {
70
+ filename = 'tileset.json';
71
+ }
72
+ }
73
+ else {
74
+ throw new Error('Unexpected URL format');
75
+ }
76
+ if (filename) {
77
+ const tz3Path = `${tz3UrlParts[0]}.3tz`;
78
+ const fileProvider = new FileHandleFile(tz3Path);
79
+ const hashTable = await loadHashTable(fileProvider);
80
+ const archive = new Tiles3DArchive(fileProvider, hashTable, tz3Path);
81
+ const fileSystem = new ZipFileSystem(archive);
82
+ const content = await load(filename, loader, {
83
+ ...loadOptions,
84
+ fetch: fileSystem.fetch.bind(fileSystem)
85
+ });
86
+ await fileSystem.destroy();
87
+ return content;
47
88
  }
48
- } else {
49
- throw new Error('Unexpected URL format');
50
- }
51
- if (filename) {
52
- const tz3Path = `${tz3UrlParts[0]}.3tz`;
53
- const fileProvider = new FileHandleFile(tz3Path);
54
- const hashTable = await loadHashTable(fileProvider);
55
- const archive = new Tiles3DArchive(fileProvider, hashTable, tz3Path);
56
- const fileSystem = new ZipFileSystem(archive);
57
- const content = await load(filename, loader, {
58
- ...loadOptions,
59
- fetch: fileSystem.fetch.bind(fileSystem)
60
- });
61
- await fileSystem.destroy();
62
- return content;
63
- }
64
- return await load(url, loader, loadOptions);
89
+ return await load(url, loader, loadOptions);
65
90
  }
91
+ /**
92
+ * Check if tile is nested tileset
93
+ * @param tile - 3DTiles header data
94
+ * @returns true if tile is nested tileset
95
+ */
66
96
  export function isNestedTileset(tile) {
67
- return (tile === null || tile === void 0 ? void 0 : tile.type) === 'json' || (tile === null || tile === void 0 ? void 0 : tile.type) === '3tz';
97
+ return tile?.type === 'json' || tile?.type === '3tz';
68
98
  }
99
+ /**
100
+ * Load hash file from 3TZ
101
+ * @param fileProvider - binary reader of 3TZ
102
+ * @returns hash table of the 3TZ file content or undefined if the hash file is not presented inside
103
+ */
69
104
  async function loadHashTable(fileProvider) {
70
- let hashTable;
71
- const hashCDOffset = await searchFromTheEnd(fileProvider, CD_HEADER_SIGNATURE);
72
- const cdFileHeader = await parseZipCDFileHeader(hashCDOffset, fileProvider);
73
- if ((cdFileHeader === null || cdFileHeader === void 0 ? void 0 : cdFileHeader.fileName) === '@3dtilesIndex1@') {
74
- const localFileHeader = await parseZipLocalFileHeader(cdFileHeader.localHeaderOffset, fileProvider);
75
- if (!localFileHeader) {
76
- throw new Error('corrupted 3tz');
105
+ let hashTable;
106
+ const hashCDOffset = await searchFromTheEnd(fileProvider, CD_HEADER_SIGNATURE);
107
+ const cdFileHeader = await parseZipCDFileHeader(hashCDOffset, fileProvider);
108
+ // '@3dtilesIndex1@' is index file that must be the last in the archive. It allows
109
+ // to improve load and read performance when the archive contains a very large number
110
+ // of files.
111
+ if (cdFileHeader?.fileName === '@3dtilesIndex1@') {
112
+ const localFileHeader = await parseZipLocalFileHeader(cdFileHeader.localHeaderOffset, fileProvider);
113
+ if (!localFileHeader) {
114
+ throw new Error('corrupted 3tz');
115
+ }
116
+ const fileDataOffset = localFileHeader.fileDataOffset;
117
+ const hashFile = await fileProvider.slice(fileDataOffset, fileDataOffset + localFileHeader.compressedSize);
118
+ hashTable = parseHashTable(hashFile);
77
119
  }
78
- const fileDataOffset = localFileHeader.fileDataOffset;
79
- const hashFile = await fileProvider.slice(fileDataOffset, fileDataOffset + localFileHeader.compressedSize);
80
- hashTable = parseHashTable(hashFile);
81
- }
82
- return hashTable;
120
+ return hashTable;
83
121
  }
84
- //# sourceMappingURL=load-3d-tiles.js.map
@@ -1,72 +1,116 @@
1
1
  import { OrientedBoundingBox, BoundingSphere } from '@math.gl/culling';
2
2
  import { Vector3 } from '@math.gl/core';
3
3
  import { Ellipsoid } from '@math.gl/geospatial';
4
- const CUBE_POSITIONS = new Float32Array([-1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1]);
4
+ // prettier-ignore
5
+ const CUBE_POSITIONS = new Float32Array([
6
+ -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,
7
+ -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,
8
+ -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,
9
+ -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,
10
+ 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,
11
+ -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1
12
+ ]);
13
+ // TODO Unite Tile validation logic in i3s-17-and-debug with this code.
14
+ /**
15
+ * Do validation of bounding volumes for particular node.
16
+ * Generates special warnings if there are some issues.
17
+ * @param node
18
+ */
5
19
  export function validateNodeBoundingVolumes(node) {
6
- var _node$parentNode, _node$parentNode2;
7
- if (!(node !== null && node !== void 0 && (_node$parentNode = node.parentNode) !== null && _node$parentNode !== void 0 && _node$parentNode.obb) || !(node !== null && node !== void 0 && (_node$parentNode2 = node.parentNode) !== null && _node$parentNode2 !== void 0 && _node$parentNode2.mbs)) {
8
- return [];
9
- }
10
- const tileWarnings = [];
11
- validateObb(tileWarnings, node);
12
- validateMbs(tileWarnings, node);
13
- return tileWarnings;
20
+ if (!node?.parentNode?.obb || !node?.parentNode?.mbs) {
21
+ return [];
22
+ }
23
+ const tileWarnings = [];
24
+ validateObb(tileWarnings, node);
25
+ validateMbs(tileWarnings, node);
26
+ return tileWarnings;
14
27
  }
28
+ /**
29
+ * Check if child Obb fit into parent Obb.
30
+ * @param tileWarnings
31
+ * @param node
32
+ */
15
33
  function validateObb(tileWarnings, node) {
16
- var _node$parentNode3;
17
- const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);
18
- const tileVertices = getTileObbVertices(node);
19
- const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);
20
- if (isTileObbInsideParentObb) {
21
- return;
22
- }
23
- const title = `OBB of Tile (${node.id}) doesn't fit into Parent (${(_node$parentNode3 = node.parentNode) === null || _node$parentNode3 === void 0 ? void 0 : _node$parentNode3.id}) tile OBB`;
24
- tileWarnings.push(title);
34
+ // @ts-expect-error
35
+ const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);
36
+ const tileVertices = getTileObbVertices(node);
37
+ const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);
38
+ if (isTileObbInsideParentObb) {
39
+ return;
40
+ }
41
+ const title = `OBB of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile OBB`;
42
+ tileWarnings.push(title);
25
43
  }
44
+ /**
45
+ * Check if child Mbs fit into parent Mbs.
46
+ * @param tileWarnings
47
+ * @param node
48
+ */
26
49
  function validateMbs(tileWarnings, node) {
27
- const tileMbs = createBoundingSphereFromTileMbs(node.mbs);
28
- const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);
29
- const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);
30
- if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {
31
- var _node$parentNode4;
32
- const title = `MBS of Tile (${node.id}) doesn't fit into Parent (${(_node$parentNode4 = node.parentNode) === null || _node$parentNode4 === void 0 ? void 0 : _node$parentNode4.id}) tile MBS`;
33
- tileWarnings.push(title);
34
- }
50
+ // @ts-expect-error
51
+ const tileMbs = createBoundingSphereFromTileMbs(node.mbs);
52
+ // @ts-expect-error
53
+ const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);
54
+ const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);
55
+ if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {
56
+ const title = `MBS of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile MBS`;
57
+ tileWarnings.push(title);
58
+ }
35
59
  }
60
+ /**
61
+ * Generates bounding sphere from mbs
62
+ * @param mbs
63
+ */
36
64
  function createBoundingSphereFromTileMbs(mbs) {
37
- return new BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);
65
+ return new BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);
38
66
  }
67
+ /**
68
+ * Generates oriented bounding box from tile obb
69
+ * @param obb
70
+ * @returns
71
+ */
39
72
  function createBoundingBoxFromTileObb(obb) {
40
- const {
41
- center,
42
- halfSize,
43
- quaternion
44
- } = obb;
45
- return new OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);
73
+ const { center, halfSize, quaternion } = obb;
74
+ return new OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);
46
75
  }
76
+ /**
77
+ * Get vertices fromnode obb
78
+ * TODO check if Obb generates properly
79
+ * @param node
80
+ */
47
81
  function getTileObbVertices(node) {
48
- const halfSize = node.obb.halfSize;
49
- const positions = CUBE_POSITIONS;
50
- const obbCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);
51
- let vertices = [];
52
- for (let i = 0; i < positions.length; i += 3) {
53
- const positionsVector = new Vector3(positions[i] *= halfSize[0], positions[i + 1] *= halfSize[1], positions[i + 2] *= halfSize[2]);
54
- const rotatedPositions = positionsVector.transformByQuaternion(node.obb.quaternion).add(obbCenterCartesian);
55
- vertices = vertices.concat(rotatedPositions);
56
- }
57
- return vertices;
82
+ // @ts-expect-error
83
+ const halfSize = node.obb.halfSize;
84
+ const positions = CUBE_POSITIONS;
85
+ // @ts-expect-error
86
+ const obbCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);
87
+ let vertices = [];
88
+ for (let i = 0; i < positions.length; i += 3) {
89
+ const positionsVector = new Vector3((positions[i] *= halfSize[0]), (positions[i + 1] *= halfSize[1]), (positions[i + 2] *= halfSize[2]));
90
+ const rotatedPositions = positionsVector
91
+ // @ts-expect-error
92
+ .transformByQuaternion(node.obb.quaternion)
93
+ .add(obbCenterCartesian);
94
+ // @ts-expect-error
95
+ vertices = vertices.concat(rotatedPositions);
96
+ }
97
+ return vertices;
58
98
  }
99
+ /**
100
+ * Check if all vertices inside bounding volume
101
+ * @param boundingVolume
102
+ * @param positions
103
+ */
59
104
  function isAllVerticesInsideBoundingVolume(boundingVolume, positions) {
60
- let isVerticesInsideObb = true;
61
- for (let index = 0; index < positions.length / 3; index += 3) {
62
- const point = [positions[index], positions[index + 1], positions[index + 2]];
63
- const cartographicPoint = Ellipsoid.WGS84.cartesianToCartographic(point);
64
- const distance = boundingVolume.distanceTo(cartographicPoint);
65
- if (distance > 0) {
66
- isVerticesInsideObb = false;
67
- break;
105
+ let isVerticesInsideObb = true;
106
+ for (let index = 0; index < positions.length / 3; index += 3) {
107
+ const point = [positions[index], positions[index + 1], positions[index + 2]];
108
+ const cartographicPoint = Ellipsoid.WGS84.cartesianToCartographic(point);
109
+ const distance = boundingVolume.distanceTo(cartographicPoint);
110
+ if (distance > 0) {
111
+ isVerticesInsideObb = false;
112
+ break;
113
+ }
68
114
  }
69
- }
70
- return isVerticesInsideObb;
115
+ return isVerticesInsideObb;
71
116
  }
72
- //# sourceMappingURL=node-debug.js.map
@@ -1,7 +1,7 @@
1
1
  import { BoundingVolumes, LodSelection, Node3DIndexDocument, NodeInPage } from '@loaders.gl/i3s';
2
- import I3SConverter from '../i3s-converter';
3
- import { I3SConvertedResources } from '../types';
4
- import { DumpMetadata } from '../../lib/utils/conversion-dump';
2
+ import I3SConverter from "../i3s-converter.js";
3
+ import { I3SConvertedResources } from "../types.js";
4
+ import { DumpMetadata } from "../../lib/utils/conversion-dump.js";
5
5
  /**
6
6
  * Wrapper for https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md data
7
7
  * The class allows working with 3DNodeIndexDocument in 2 modes:
@@ -1 +1 @@
1
- {"version":3,"file":"node-index-document.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/node-index-document.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAIzB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAE7D;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC5B,cAAc;IACP,EAAE,EAAE,MAAM,CAAC;IAClB,uBAAuB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACxB,+BAA+B;IACxB,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IAC/C,eAAe;IACR,QAAQ,EAAE,iBAAiB,EAAE,CAAM;IAC1C,yBAAyB;IACzB,OAAO,CAAC,SAAS,CAAe;IAEhC;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAkB;IACpC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;OAIG;gBACS,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY;IAM/C;;;;OAIG;IACU,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAS3E;;;OAGG;IACU,WAAW,CAAC,UAAU,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxE;;OAEG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAmC1C,+CAA+C;IAClC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,wBAAwB;IACxB,OAAO,CAAC,QAAQ;IAOhB;;;OAGG;YACW,KAAK;IAyBnB;;;OAGG;YACW,IAAI;IAalB;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;;;;OAKG;WACU,cAAc,CACzB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;;;;;;;OASG;WACU,UAAU,CACrB,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAY7B;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAAC,eAAe,EAAE,eAAe,GAAG,mBAAmB;IAqBzF;;;;;;;;;;OAUG;WACU,uBAAuB,CAClC,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,GAAG,YAAY,GAC9C,OAAO,CAAC,mBAAmB,CAAC;CAyDhC"}
1
+ {"version":3,"file":"node-index-document.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/node-index-document.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAIzB,OAAO,YAAY,4BAAyB;AAE5C,OAAO,EAAC,qBAAqB,EAAC,oBAAiB;AAC/C,OAAO,EAAC,YAAY,EAAC,2CAAwC;AAE7D;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC5B,cAAc;IACP,EAAE,EAAE,MAAM,CAAC;IAClB,uBAAuB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACxB,+BAA+B;IACxB,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IAC/C,eAAe;IACR,QAAQ,EAAE,iBAAiB,EAAE,CAAM;IAC1C,yBAAyB;IACzB,OAAO,CAAC,SAAS,CAAe;IAEhC;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAkB;IACpC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;OAIG;gBACS,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY;IAM/C;;;;OAIG;IACU,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAS3E;;;OAGG;IACU,WAAW,CAAC,UAAU,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxE;;OAEG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAmC1C,+CAA+C;IAClC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,wBAAwB;IACxB,OAAO,CAAC,QAAQ;IAOhB;;;OAGG;YACW,KAAK;IAyBnB;;;OAGG;YACW,IAAI;IAalB;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;;;;OAKG;WACU,cAAc,CACzB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;;;;;;;OASG;WACU,UAAU,CACrB,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAY7B;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAAC,eAAe,EAAE,eAAe,GAAG,mBAAmB;IAqBzF;;;;;;;;;;OAUG;WACU,uBAAuB,CAClC,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,GAAG,YAAY,GAC9C,OAAO,CAAC,mBAAmB,CAAC;CAyDhC"}