x_ite 8.7.4 → 8.7.6

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 (271) hide show
  1. package/.vscode/tasks.json +1 -1
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +13 -13
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +21 -23
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +35 -36
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +18 -18
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +37 -32
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +24 -24
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +22 -22
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +20 -20
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +25 -25
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +28 -28
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +26 -27
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjector.js +15 -15
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +30 -30
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +19 -19
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +9 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +1187 -1686
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +1 -1
  47. package/docs/_includes/scripts.html +0 -1
  48. package/docs/_posts/components/CADGeometry/QuadSet.md +1 -1
  49. package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +1 -1
  50. package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +1 -1
  51. package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
  52. package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
  53. package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +1 -1
  54. package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +1 -1
  55. package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
  56. package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +1 -1
  57. package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
  58. package/docs/_posts/components/EventUtilities/IntegerSequencer.md +1 -1
  59. package/docs/_posts/components/Followers/ColorChaser.md +1 -1
  60. package/docs/_posts/components/Followers/ColorDamper.md +1 -1
  61. package/docs/_posts/components/Followers/CoordinateChaser.md +1 -1
  62. package/docs/_posts/components/Followers/ScalarChaser.md +1 -1
  63. package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
  64. package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
  65. package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
  66. package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
  67. package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
  68. package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
  69. package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
  70. package/docs/_posts/components/Geometry2D/TriangleSet2D.md +1 -1
  71. package/docs/_posts/components/Geometry3D/Box.md +1 -1
  72. package/docs/_posts/components/Geometry3D/Cone.md +1 -1
  73. package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
  74. package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
  75. package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
  76. package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
  77. package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
  78. package/docs/_posts/components/Geospatial/GeoElevationGrid.md +1 -1
  79. package/docs/_posts/components/Geospatial/GeoLOD.md +1 -1
  80. package/docs/_posts/components/Geospatial/GeoViewpoint.md +1 -1
  81. package/docs/_posts/components/Grouping/Group.md +1 -1
  82. package/docs/_posts/components/Grouping/Switch.md +1 -1
  83. package/docs/_posts/components/Grouping/Transform.md +1 -1
  84. package/docs/_posts/components/HAnim/HAnimHumanoid.md +1 -1
  85. package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
  86. package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
  87. package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
  88. package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
  89. package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
  90. package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
  91. package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +1 -1
  92. package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +1 -1
  93. package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
  94. package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
  95. package/docs/_posts/components/Layering/LayerSet.md +1 -1
  96. package/docs/_posts/components/Layering/Viewport.md +1 -1
  97. package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
  98. package/docs/_posts/components/Lighting/PointLight.md +1 -1
  99. package/docs/_posts/components/Lighting/SpotLight.md +1 -1
  100. package/docs/_posts/components/NURBS/NurbsCurve.md +1 -1
  101. package/docs/_posts/components/NURBS/NurbsPatchSurface.md +1 -1
  102. package/docs/_posts/components/NURBS/NurbsSweptSurface.md +1 -1
  103. package/docs/_posts/components/Navigation/Billboard.md +1 -1
  104. package/docs/_posts/components/Navigation/Collision.md +1 -1
  105. package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
  106. package/docs/_posts/components/Navigation/OrthoViewpoint.md +1 -1
  107. package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
  108. package/docs/_posts/components/Networking/Anchor.md +1 -1
  109. package/docs/_posts/components/Networking/Inline.md +1 -1
  110. package/docs/_posts/components/Networking/LoadSensor.md +1 -1
  111. package/docs/_posts/components/ParticleSystems/ConeEmitter.md +1 -1
  112. package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +1 -1
  113. package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +1 -1
  114. package/docs/_posts/components/ParticleSystems/ParticleSystem.md +1 -1
  115. package/docs/_posts/components/ParticleSystems/PointEmitter.md +1 -1
  116. package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +1 -1
  117. package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +1 -1
  118. package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +1 -1
  119. package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +1 -1
  120. package/docs/_posts/components/Picking/LinePickSensor.md +1 -1
  121. package/docs/_posts/components/Picking/PointPickSensor.md +1 -1
  122. package/docs/_posts/components/Picking/PrimitivePickSensor.md +1 -1
  123. package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
  124. package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
  125. package/docs/_posts/components/Rendering/ClipPlane.md +1 -1
  126. package/docs/_posts/components/Rendering/Color.md +1 -1
  127. package/docs/_posts/components/Rendering/ColorRGBA.md +1 -1
  128. package/docs/_posts/components/Rendering/Coordinate.md +1 -1
  129. package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
  130. package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
  131. package/docs/_posts/components/Rendering/IndexedTriangleSet.md +1 -1
  132. package/docs/_posts/components/Rendering/LineSet.md +1 -1
  133. package/docs/_posts/components/Rendering/PointSet.md +1 -1
  134. package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +1 -1
  135. package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +1 -1
  136. package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +1 -1
  137. package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
  138. package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
  139. package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
  140. package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +1 -1
  141. package/docs/_posts/components/Shaders/ComposedShader.md +1 -1
  142. package/docs/_posts/components/Shaders/FloatVertexAttribute.md +1 -1
  143. package/docs/_posts/components/Shaders/ShaderPart.md +1 -1
  144. package/docs/_posts/components/Shape/Appearance.md +1 -1
  145. package/docs/_posts/components/Shape/FillProperties.md +1 -1
  146. package/docs/_posts/components/Shape/LineProperties.md +1 -1
  147. package/docs/_posts/components/Shape/Material.md +1 -1
  148. package/docs/_posts/components/Shape/TwoSidedMaterial.md +1 -1
  149. package/docs/_posts/components/Sound/AudioClip.md +1 -1
  150. package/docs/_posts/components/Text/FontStyle.md +1 -1
  151. package/docs/_posts/components/Text/Text.md +1 -1
  152. package/docs/_posts/components/Texturing/ImageTexture.md +1 -1
  153. package/docs/_posts/components/Texturing/MovieTexture.md +1 -1
  154. package/docs/_posts/components/Texturing/MultiTexture.md +1 -1
  155. package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
  156. package/docs/_posts/components/Texturing3D/ImageTexture3D.md +1 -1
  157. package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +1 -1
  158. package/docs/_posts/components/Time/TimeSensor.md +1 -1
  159. package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +1 -1
  160. package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +1 -1
  161. package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +1 -1
  162. package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +1 -1
  163. package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +1 -1
  164. package/docs/_posts/components/VolumeRendering/VolumeData.md +1 -1
  165. package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
  166. package/docs/_posts/custom-shaders.md +1 -1
  167. package/docs/_posts/getting-started.md +7 -2
  168. package/docs/_posts/reference/browser-services.md +6 -0
  169. package/docs/_posts/reference/field-services-and-objects.md +26 -6
  170. package/docs/_posts/tutorials/adding-backgrounds.md +2 -2
  171. package/docs/_posts/tutorials/adding-sound.md +1 -1
  172. package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
  173. package/docs/_posts/tutorials/building-elevation-grids.md +1 -1
  174. package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
  175. package/docs/_posts/tutorials/controlling-appearance-with-materials.md +1 -1
  176. package/docs/_posts/tutorials/controlling-detail.md +1 -1
  177. package/docs/_posts/tutorials/hello-world.md +1 -1
  178. package/docs/_posts/tutorials/naming-nodes.md +1 -1
  179. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
  180. package/package.json +3 -3
  181. package/src/lib/jquery.js +13 -0
  182. package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -1
  183. package/src/standard/Math/Algorithms/eigen_decomposition.js +9 -9
  184. package/src/standard/Math/Geometry/Box2.js +37 -24
  185. package/src/standard/Math/Geometry/Box3.js +37 -24
  186. package/src/standard/Math/Geometry/Cylinder3.js +1 -1
  187. package/src/standard/Math/Geometry/Line2.js +1 -1
  188. package/src/standard/Math/Geometry/Line3.js +1 -1
  189. package/src/standard/Math/Geometry/Plane3.js +1 -1
  190. package/src/standard/Math/Geometry/Sphere3.js +14 -14
  191. package/src/standard/Math/Numbers/Color3.js +10 -18
  192. package/src/standard/Math/Numbers/Color4.js +12 -23
  193. package/src/standard/Math/Numbers/Complex.js +59 -58
  194. package/src/standard/Math/Numbers/Matrix2.js +31 -45
  195. package/src/standard/Math/Numbers/Matrix3.js +59 -94
  196. package/src/standard/Math/Numbers/Matrix4.js +73 -114
  197. package/src/standard/Math/Numbers/Quaternion.js +70 -132
  198. package/src/standard/Math/Numbers/Rotation4.js +15 -42
  199. package/src/standard/Math/Numbers/Vector2.js +12 -78
  200. package/src/standard/Math/Numbers/Vector3.js +17 -94
  201. package/src/standard/Math/Numbers/Vector4.js +22 -94
  202. package/src/x_ite/Base/X3DInfoArray.js +9 -7
  203. package/src/x_ite/Base/X3DObject.js +9 -32
  204. package/src/x_ite/Base/X3DObjectArrayField.js +35 -64
  205. package/src/x_ite/Browser/Core/BrowserOptions.js +37 -0
  206. package/src/x_ite/Browser/Core/X3DCoreContext.js +21 -3
  207. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +4 -4
  208. package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +12 -7
  209. package/src/x_ite/Browser/Layout/ScreenText.js +9 -4
  210. package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -9
  211. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -3
  212. package/src/x_ite/Browser/Navigation/WalkViewer.js +2 -2
  213. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -7
  214. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  215. package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -1
  216. package/src/x_ite/Browser/Text/X3DTextGeometry.js +2 -3
  217. package/src/x_ite/Browser/VERSION.js +1 -1
  218. package/src/x_ite/Browser/X3DBrowser.js +61 -68
  219. package/src/x_ite/Browser/X3DBrowserContext.js +8 -8
  220. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
  221. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
  222. package/src/x_ite/Components/Followers/OrientationChaser.js +3 -3
  223. package/src/x_ite/Components/Followers/OrientationDamper.js +3 -3
  224. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +2 -3
  225. package/src/x_ite/Components/Geometry3D/Box.js +3 -10
  226. package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
  227. package/src/x_ite/Components/Geometry3D/Cylinder.js +2 -2
  228. package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
  229. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
  230. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +2 -2
  231. package/src/x_ite/Components/Layering/X3DLayerNode.js +1 -1
  232. package/src/x_ite/Components/Layout/Layout.js +1 -1
  233. package/src/x_ite/Components/Navigation/Billboard.js +1 -1
  234. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -13
  235. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  236. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +7 -7
  237. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
  238. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +9 -9
  239. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1 -1
  240. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +2 -2
  241. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
  242. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +1 -1
  243. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +3 -3
  244. package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +1 -1
  245. package/src/x_ite/Execution/X3DExecutionContext.js +52 -58
  246. package/src/x_ite/Execution/X3DExportedNode.js +13 -11
  247. package/src/x_ite/Execution/X3DImportedNode.js +25 -25
  248. package/src/x_ite/Execution/X3DScene.js +129 -53
  249. package/src/x_ite/Fields/ArrayFields.js +1 -1
  250. package/src/x_ite/Fields/SFColor.js +10 -15
  251. package/src/x_ite/Fields/SFColorRGBA.js +11 -18
  252. package/src/x_ite/Fields/SFImage.js +38 -33
  253. package/src/x_ite/Fields/SFMatrix3.js +1 -3
  254. package/src/x_ite/Fields/SFMatrix4.js +1 -5
  255. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +6 -5
  256. package/src/x_ite/Fields/SFNodeCache.js +2 -2
  257. package/src/x_ite/Fields/SFRotation.js +14 -21
  258. package/src/x_ite/Fields/SFString.js +0 -1
  259. package/src/x_ite/Fields/SFVec2.js +8 -15
  260. package/src/x_ite/Fields/SFVec3.js +11 -18
  261. package/src/x_ite/Fields/SFVec4.js +12 -23
  262. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +17 -16
  263. package/src/x_ite/Parser/SVGParser.js +3 -3
  264. package/src/x_ite/Parser/X3DOptimizer.js +1 -1
  265. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +26 -27
  266. package/src/x_ite/Prototype/X3DProtoDeclaration.js +16 -15
  267. package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
  268. package/src/x_ite/Routing/X3DRoute.js +26 -25
  269. package/src/x_ite/X3DCanvasElement.js +1 -0
  270. package/docs/assets/js/autoupdate.js +0 -25
  271. package/src/x_ite/Execution/Scene.js +0 -145
@@ -1,4 +1,4 @@
1
- /* X_ITE v8.7.4 */(() => { // webpackBootstrap
1
+ /* X_ITE v8.7.6 */(() => { // webpackBootstrap
2
2
  /******/ "use strict";
3
3
  /******/ // The require scope
4
4
  /******/ var __webpack_require__ = {};
@@ -39,28 +39,28 @@ var __webpack_exports__ = {};
39
39
  // UNUSED EXPORTS: default
40
40
 
41
41
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
42
- const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components");
42
+ const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components");
43
43
  var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
44
44
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
45
- const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Fields");
45
+ const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Fields");
46
46
  var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
47
47
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
48
- const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Base/X3DFieldDefinition");
48
+ const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Base/X3DFieldDefinition");
49
49
  var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
50
50
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
51
- const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Base/FieldDefinitionArray");
51
+ const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Base/FieldDefinitionArray");
52
52
  var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
53
53
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DNode\")"
54
- const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Core/X3DNode");
54
+ const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Core/X3DNode");
55
55
  var X3DNode_default = /*#__PURE__*/__webpack_require__.n(X3DNode_namespaceObject);
56
56
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
57
- const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Base/X3DConstants");
57
+ const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Base/X3DConstants");
58
58
  var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
59
59
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DCast\")"
60
- const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Base/X3DCast");
60
+ const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Base/X3DCast");
61
61
  var X3DCast_default = /*#__PURE__*/__webpack_require__.n(X3DCast_namespaceObject);
62
62
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
63
- const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Namespace");
63
+ const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Namespace");
64
64
  var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
65
65
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/Contour2D.js
66
66
  /*******************************************************************************
@@ -306,7 +306,7 @@ const X3DNurbsControlCurveNode_default_ = X3DNurbsControlCurveNode;
306
306
  Namespace_default().set ("x_ite/Components/NURBS/X3DNurbsControlCurveNode", X3DNurbsControlCurveNode_default_);
307
307
  /* harmony default export */ const NURBS_X3DNurbsControlCurveNode = (X3DNurbsControlCurveNode_default_);
308
308
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
309
- const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Numbers/Vector3");
309
+ const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Numbers/Vector3");
310
310
  var Vector3_default = /*#__PURE__*/__webpack_require__.n(Vector3_namespaceObject);
311
311
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/ContourPolyline2D.js
312
312
  /*******************************************************************************
@@ -468,7 +468,7 @@ const ContourPolyline2D_default_ = ContourPolyline2D;
468
468
  Namespace_default().set ("x_ite/Components/NURBS/ContourPolyline2D", ContourPolyline2D_default_);
469
469
  /* harmony default export */ const NURBS_ContourPolyline2D = (ContourPolyline2D_default_);
470
470
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Rendering/X3DCoordinateNode\")"
471
- const X3DCoordinateNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Rendering/X3DCoordinateNode");
471
+ const X3DCoordinateNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Rendering/X3DCoordinateNode");
472
472
  var X3DCoordinateNode_default = /*#__PURE__*/__webpack_require__.n(X3DCoordinateNode_namespaceObject);
473
473
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/CoordinateDouble.js
474
474
  /*******************************************************************************
@@ -562,13 +562,13 @@ const CoordinateDouble_default_ = CoordinateDouble;
562
562
  Namespace_default().set ("x_ite/Components/NURBS/CoordinateDouble", CoordinateDouble_default_);
563
563
  /* harmony default export */ const NURBS_CoordinateDouble = (CoordinateDouble_default_);
564
564
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Rendering/X3DGeometryNode\")"
565
- const X3DGeometryNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Rendering/X3DGeometryNode");
565
+ const X3DGeometryNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Rendering/X3DGeometryNode");
566
566
  var X3DGeometryNode_default = /*#__PURE__*/__webpack_require__.n(X3DGeometryNode_namespaceObject);
567
567
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector2\")"
568
- const Vector2_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Numbers/Vector2");
568
+ const Vector2_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Numbers/Vector2");
569
569
  var Vector2_default = /*#__PURE__*/__webpack_require__.n(Vector2_namespaceObject);
570
570
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector4\")"
571
- const Vector4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Numbers/Vector4");
571
+ const Vector4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Numbers/Vector4");
572
572
  var Vector4_default = /*#__PURE__*/__webpack_require__.n(Vector4_namespaceObject);
573
573
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/NURBS/NURBS.js
574
574
  /*******************************************************************************
@@ -1120,7 +1120,7 @@ const X3DParametricGeometryNode_default_ = X3DParametricGeometryNode;
1120
1120
  Namespace_default().set ("x_ite/Components/NURBS/X3DParametricGeometryNode", X3DParametricGeometryNode_default_);
1121
1121
  /* harmony default export */ const NURBS_X3DParametricGeometryNode = (X3DParametricGeometryNode_default_);
1122
1122
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Rendering/X3DLineGeometryNode\")"
1123
- const X3DLineGeometryNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Rendering/X3DLineGeometryNode");
1123
+ const X3DLineGeometryNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Rendering/X3DLineGeometryNode");
1124
1124
  var X3DLineGeometryNode_default = /*#__PURE__*/__webpack_require__.n(X3DLineGeometryNode_namespaceObject);
1125
1125
  ;// CONCATENATED MODULE: ./src/lib/nurbs/src/utils/is-ndarray.js
1126
1126
 
@@ -2172,7 +2172,7 @@ const support_default_ = function (cacheKey, nurbs, accessors, debug, checkBound
2172
2172
  Namespace_default().set ("lib/nurbs/src/support", support_default_);
2173
2173
  /* harmony default export */ const support = (support_default_);
2174
2174
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Geometry/Triangle3\")"
2175
- const Triangle3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Geometry/Triangle3");
2175
+ const Triangle3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Geometry/Triangle3");
2176
2176
  var Triangle3_default = /*#__PURE__*/__webpack_require__.n(Triangle3_namespaceObject);
2177
2177
  ;// CONCATENATED MODULE: ./src/lib/nurbs/extras/sample.js
2178
2178
 
@@ -3177,13 +3177,13 @@ const NurbsCurve2D_default_ = NurbsCurve2D;
3177
3177
  Namespace_default().set ("x_ite/Components/NURBS/NurbsCurve2D", NurbsCurve2D_default_);
3178
3178
  /* harmony default export */ const NURBS_NurbsCurve2D = (NurbsCurve2D_default_);
3179
3179
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DChildNode\")"
3180
- const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Core/X3DChildNode");
3180
+ const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Core/X3DChildNode");
3181
3181
  var X3DChildNode_default = /*#__PURE__*/__webpack_require__.n(X3DChildNode_namespaceObject);
3182
3182
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Interpolation/OrientationInterpolator\")"
3183
- const OrientationInterpolator_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Interpolation/OrientationInterpolator");
3183
+ const OrientationInterpolator_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Interpolation/OrientationInterpolator");
3184
3184
  var OrientationInterpolator_default = /*#__PURE__*/__webpack_require__.n(OrientationInterpolator_namespaceObject);
3185
3185
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Rotation4\")"
3186
- const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Numbers/Rotation4");
3186
+ const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Numbers/Rotation4");
3187
3187
  var Rotation4_default = /*#__PURE__*/__webpack_require__.n(Rotation4_namespaceObject);
3188
3188
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js
3189
3189
  /*******************************************************************************
@@ -3409,7 +3409,7 @@ const NurbsOrientationInterpolator_default_ = NurbsOrientationInterpolator;
3409
3409
  Namespace_default().set ("x_ite/Components/NURBS/NurbsOrientationInterpolator", NurbsOrientationInterpolator_default_);
3410
3410
  /* harmony default export */ const NURBS_NurbsOrientationInterpolator = (NurbsOrientationInterpolator_default_);
3411
3411
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Algorithm\")"
3412
- const Algorithm_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Algorithm");
3412
+ const Algorithm_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Algorithm");
3413
3413
  var Algorithm_default = /*#__PURE__*/__webpack_require__.n(Algorithm_namespaceObject);
3414
3414
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js
3415
3415
  /*******************************************************************************
@@ -3900,7 +3900,7 @@ const NurbsPatchSurface_default_ = NurbsPatchSurface;
3900
3900
  Namespace_default().set ("x_ite/Components/NURBS/NurbsPatchSurface", NurbsPatchSurface_default_);
3901
3901
  /* harmony default export */ const NURBS_NurbsPatchSurface = (NurbsPatchSurface_default_);
3902
3902
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Interpolation/PositionInterpolator\")"
3903
- const PositionInterpolator_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Interpolation/PositionInterpolator");
3903
+ const PositionInterpolator_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Interpolation/PositionInterpolator");
3904
3904
  var PositionInterpolator_default = /*#__PURE__*/__webpack_require__.n(PositionInterpolator_namespaceObject);
3905
3905
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/NurbsPositionInterpolator.js
3906
3906
  /*******************************************************************************
@@ -4114,7 +4114,7 @@ const NurbsPositionInterpolator_default_ = NurbsPositionInterpolator;
4114
4114
  Namespace_default().set ("x_ite/Components/NURBS/NurbsPositionInterpolator", NurbsPositionInterpolator_default_);
4115
4115
  /* harmony default export */ const NURBS_NurbsPositionInterpolator = (NurbsPositionInterpolator_default_);
4116
4116
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/X3DBoundedObject\")"
4117
- const X3DBoundedObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Grouping/X3DBoundedObject");
4117
+ const X3DBoundedObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Grouping/X3DBoundedObject");
4118
4118
  var X3DBoundedObject_default = /*#__PURE__*/__webpack_require__.n(X3DBoundedObject_namespaceObject);
4119
4119
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/NurbsSet.js
4120
4120
  /*******************************************************************************
@@ -4308,7 +4308,7 @@ const NurbsSet_default_ = NurbsSet;
4308
4308
  Namespace_default().set ("x_ite/Components/NURBS/NurbsSet", NurbsSet_default_);
4309
4309
  /* harmony default export */ const NURBS_NurbsSet = (NurbsSet_default_);
4310
4310
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Geometry/Line3\")"
4311
- const Line3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("standard/Math/Geometry/Line3");
4311
+ const Line3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("standard/Math/Geometry/Line3");
4312
4312
  var Line3_default = /*#__PURE__*/__webpack_require__.n(Line3_namespaceObject);
4313
4313
  ;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle2.js
4314
4314
  /*******************************************************************************
@@ -4576,7 +4576,7 @@ const NurbsSurfaceInterpolator_default_ = NurbsSurfaceInterpolator;
4576
4576
  Namespace_default().set ("x_ite/Components/NURBS/NurbsSurfaceInterpolator", NurbsSurfaceInterpolator_default_);
4577
4577
  /* harmony default export */ const NURBS_NurbsSurfaceInterpolator = (NurbsSurfaceInterpolator_default_);
4578
4578
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Geometry3D/Extrusion\")"
4579
- const Extrusion_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.4")] .require ("x_ite/Components/Geometry3D/Extrusion");
4579
+ const Extrusion_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.7.6")] .require ("x_ite/Components/Geometry3D/Extrusion");
4580
4580
  var Extrusion_default = /*#__PURE__*/__webpack_require__.n(Extrusion_namespaceObject);
4581
4581
  ;// CONCATENATED MODULE: ./src/x_ite/Components/NURBS/NurbsSweptSurface.js
4582
4582
  /*******************************************************************************
@@ -1 +1 @@
1
- /* X_ITE v8.7.4 */(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components");var n=t.n(e);const i=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Fields");var o=t.n(i);const s=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Base/X3DFieldDefinition");var r=t.n(s);const u=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Base/FieldDefinitionArray");var l=t.n(u);const a=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Core/X3DNode");var h=t.n(a);const c=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Base/X3DConstants");var d=t.n(c);const g=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Base/X3DCast");var f=t.n(g);const p=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Namespace");var _=t.n(p);function m(t){h().call(this,t),this.addType(d().Contour2D),this.childNodes=[]}function w(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}m.prototype=Object.assign(Object.create(h().prototype),{constructor:m,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"addChildren",new(o().MFNode)),new(r())(d().inputOnly,"removeChildren",new(o().MFNode)),new(r())(d().inputOutput,"children",new(o().MFNode))]),getTypeName:function(){return"Contour2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"trimmingContour"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){h().prototype.initialize.call(this),this._addChildren.addInterest("set_addChildren__",this),this._removeChildren.addInterest("set_removeChildren__",this),this._children.addInterest("set_children__",this),this.set_children__()},set_addChildren__:function(){this._addChildren.setTainted(!0),this._addChildren.erase(w(this._addChildren,0,this._addChildren.length,this._children,0,this._children.length),this._addChildren.length);for(const t of this._addChildren)this._children.push(t);this._addChildren.length=0,this._addChildren.setTainted(!1)},set_removeChildren__:function(){this._removeChildren.setTainted(!0),this._children.erase(w(this._children,0,this._children.length,this._removeChildren,0,this._removeChildren.length),this._children.length),this._removeChildren.length=0,this._removeChildren.setTainted(!1)},set_children__:function(){const t=this.childNodes;t.length=0;for(const e of this._children){const n=f()(d().NurbsCurve2D,e);if(n)t.push(n);else{const n=f()(d().ContourPolyline2D,e);if(n){t.push(n);continue}}}},addTrimmingContour:function(t){for(const e of this.childNodes)t.push(e.tessellate(2))}});const y=m;_().set("x_ite/Components/NURBS/Contour2D",y);const v=y;function b(t){h().call(this,t),this.addType(d().X3DNurbsControlCurveNode)}b.prototype=Object.assign(Object.create(h().prototype),{constructor:b});const C=b;_().set("x_ite/Components/NURBS/X3DNurbsControlCurveNode",C);const N=C,S=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Numbers/Vector3");var O=t.n(S);function D(t){N.call(this,t),this.addType(d().ContourPolyline2D),this.controlPoints=[]}D.prototype=Object.assign(Object.create(N.prototype),{constructor:D,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"ContourPolyline2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},tessellate:function(t){switch(t){case 0:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[n+0]=t[n+0],e[n+1]=t[n+1]}return e.length=2*n,e}case 1:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i,o=3*i;e[o+0]=t[n+0],e[o+1]=0,e[o+2]=t[n+1]}return e.length=3*n,e}case 3:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[i]=new(O())(t[n+0],t[n+1],0)}return e.length=n,e}}}});const P=D;_().set("x_ite/Components/NURBS/ContourPolyline2D",P);const T=P,F=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Rendering/X3DCoordinateNode");var I=t.n(F);function R(t){I().call(this,t),this.addType(d().CoordinateDouble)}R.prototype=Object.assign(Object.create(I().prototype),{constructor:R,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"point",new(o().MFVec3d))]),getTypeName:function(){return"CoordinateDouble"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"coord"},getSpecificationRange:function(){return["3.0","Infinity"]}});const V=R;_().set("x_ite/Components/NURBS/CoordinateDouble",V);const x=V,z=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Rendering/X3DGeometryNode");var j=t.n(z);const k=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Numbers/Vector2");var A=t.n(k);const X=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Numbers/Vector4");var B=t.n(X);const E={getTessellation:function(t,e){return t>0?t+1:t<0?-t*e+1:2*e+1},getClosed2D:function(t,e,n,i){const o=i.length;return(!(n.length===o)||n[0]===n[o-1])&&(!!i[0].equals(i[o-1])&&!!this.isPeriodic(t,o,e))},getClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s){const r=s.getSize();return(!(o.length===r)||o[0]===o[r-1])&&(!!s.get1Point(0,t).equals(s.get1Point(r-1,e))&&!!this.isPeriodic(n,r,i))}}(),getUClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=o;n<s;++n){const o=n*i,s=n*i+i-1;if(l&&r[o]!==r[s])return!1;if(!u.get1Point(o,t).equals(u.get1Point(s,e)))return!1}return!!this.isPeriodic(n,i,s)}}(),getVClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=i;n<s;++n){const s=n,a=(o-1)*i+n;if(l&&r[s]!==r[a])return!1;if(!u.get1Point(s,t).equals(u.get1Point(a,e)))return!1}return!!this.isPeriodic(n,o,s)}}(),isPeriodic:function(t,e,n){if(n.length===e+t){{let e=1;for(let i=1,o=t;i<o;++i)e+=n[i]===n[0];if(e===t)return!1}{let e=1;for(let i=n.length-t,o=n.length-1;i<o;++i)e+=n[i]===n[o];if(e===t)return!1}}return!0},getKnots:function(t,e,n,i,o){const s=t||[];for(let t=0,e=o.length;t<e;++t)s[t]=o[t];s.length=o.length;let r=!0;if(s.length===i+n){r=!1;let t=0;for(let e=1,i=s.length;e<i;++e)s[e]==s[e-1]?++t:t=0,t>n-1&&(r=!0),s[e-1]>s[e]&&(r=!0)}if(r)for(let t=0,e=i+n;t<e;++t)s[t]=t/(e-1);if(e)for(let t=1,e=n-1;t<e;++t)s.push(s.at(-1)+(s[t]-s[t-1]));return s},getWeights:function(t,e,n){if(n.length!==e)return;const i=t||[];for(let t=0;t<e;++t)i[t]=n[t];return i.length=e,i},getUVWeights:function(t,e,n,i){const o=e*n;if(i.length!==o)return;const s=t||[];for(let t=0,o=0;t<e;++t)for(let t=0;t<n;++t,++o)s[o]=i[o];return s.length=o,s},getControlPoints2D:function(t,e,n,i,o){const s=t||[],r=o.getValue(),u=o.length,l=!!i,a=l?O():A();s.haveWeights!==l&&(s.haveWeights=l,s.length=0);for(let t=0;t<u;++t){const e=2*t,n=s[t]||new a(0,0,0);s[t]=n.set(r[e+0],r[e+1],l?i[t]:0)}if(s.length=u,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getControlPoints:function(t,e,n,i,o){const s=t||[],r=o.getSize(),u=!!i,l=u?B():O();s.haveWeights!==u&&(s.haveWeights=u,s.length=0);for(let t=0;t<r;++t){const e=s[t]=o.get1Point(t,s[t]||new l(0,0,0,0));u&&(e.w=i[t])}if(s.length=r,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){const a=t||[],h=!!u,c=h?B():O();a.haveWeights!==h&&(a.haveWeights=h,a.length=0);for(let t=0;t<s;++t){let e=a[t];e||(e=a[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=l.get1Point(i,e[n]||new c(0,0,0,0)),h&&(e[n].w=u[i])}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(a.length=s,e)for(let t=1,e=i-1;t<e;++t)a.push(a[t]);return a},getTexControlPoints:function(t,e,n,i,o,s,r,u){const l=t||[];for(let t=0;t<s;++t){let e=l[t];e||(e=l[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=u.get1Point(i,e[n]||new(B())(0,0,0,0))}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(l.length=s,e)for(let t=1,e=i-1;t<e;++t)l.push(l[t]);return l}};_().set("x_ite/Browser/NURBS/NURBS",E);const q=E;function K(t){j().call(this,t),this.addType(d().X3DParametricGeometryNode)}K.prototype=Object.assign(Object.create(j().prototype),{constructor:K,getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)}});const M=K;_().set("x_ite/Components/NURBS/X3DParametricGeometryNode",M);const U=M,G=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Rendering/X3DLineGeometryNode");var W=t.n(G);const Y=function(t){return!!t&&(!!t.dtype&&new RegExp("function View[0-9]+d(:?"+t.dtype+")+").test(String(t.constructor)))};_().set("lib/nurbs/src/utils/is-ndarray",Y);const J=Y,L=function(t){return!!t&&(void 0!==t.data&&Array.isArray(t.shape)&&void 0!==t.offset&&void 0!==t.stride)};_().set("lib/nurbs/src/utils/is-ndarray-like",L);const Z=L,H=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)||void 0!==t.length};_().set("lib/nurbs/src/utils/is-array-like",H);const Q=H;function $(t){if(t){if(J(t)||Z(t))return"generic"===t.dtype?$.GENERIC_NDARRAY:$.NDARRAY;if(Q(t)){for(var e=t;Q(e[0]);e=e[0]);return"x"in e?$.ARRAY_OF_OBJECTS:$.ARRAY_OF_ARRAYS}throw new Error("Unhandled data type. Got type: "+typeof t)}}$.ARRAY_OF_OBJECTS="Obj",$.ARRAY_OF_ARRAYS="Arr",$.NDARRAY="Nd",$.GENERIC_NDARRAY="GenNd",$.PACKED="PackArr";const tt=$;_().set("lib/nurbs/src/utils/infer-type",tt);const et=tt;const nt=function(t,e,n,i,o,s){var r,u,l=[],a=!1;for(r=0;r<t.splineDimension;r++){var h=Q(t.knots)&&Q(t.knots[r]);h&&(a=!0),l.push("Deg"+t.degree[r]+(h?"":"Uniform")+((u=t.boundary[r])[0].toUpperCase()+u.slice(1)))}var c=[[a?"NU":"",t.weights?"RBS":"BS"].join("")+t.dimension+"D",l.join("_")];return i&&c.push(i+"Pts"),o&&c.push(o+"Wts"),s&&c.push(s+"Kts"),e&&c.push("debug"),n&&c.push("chk"),c.join("_")};_().set("lib/nurbs/src/utils/cache-key",nt);const it=nt;var ot=function t(e,n){return function(n,i){void 0===n||Array.isArray(n)||(n=[n]);for(var o=[],s=0;s<n.length;s++)o.push(t.sum(n[s]));if(i)for(n=0;n<o.length;n++)void 0!==i[n]&&(o[n]="("+o[n]+" + "+i[n]+") % "+i[n]);return e+o.join("_")}};ot.sum=function(t){return 0===(t=(t=Array.isArray(t)?t:[t]).filter((function(t){return void 0!==t&&0!==t}))).length&&t.push(0),t.join(" + ")};const st=ot;_().set("lib/nurbs/src/utils/variable",st);const rt=st;var ut=[".x",".y",".z",".w"];function lt(t){return function(e,n){void 0===e||Array.isArray(e)||(e=[e]);for(var i=[],o=0;o<e.length;o++)i.push(rt.sum(e[o]));if(n)for(e=0;e<i.length;e++)void 0!==n[e]&&(i[e]="("+i[e]+" + "+n[e]+") % "+n[e]);return t(i)}}function at(t,e){if(e)switch(et(e)){case et.ARRAY_OF_OBJECTS:return lt((function(e){var n=e.pop();return t+"["+e.join("][")+"]"+ut[n]}));case et.ARRAY_OF_ARRAYS:return lt((function(e){return t+"["+e.join("][")+"]"}));case et.GENERIC_NDARRAY:return lt((function(e){return t+".get("+e.join(",")+")"}));case et.NDARRAY:return lt((function(e){for(var n=[t+"Offset"],i=0;i<e.length;i++)n.push(t+"Stride"+i+" * ("+e[i]+")");return t+"["+n.join(" + ")+"]"}));case et.PACKED:default:return}}const ht=function(t){var e,n={};return(e=at("x",t.points))&&(n.point=e),(e=at("w",t.weights))&&(n.weight=e),(e=at("k",t.knots))&&(n.knot=e),n};_().set("lib/nurbs/src/utils/create-accessors",ht);const ct=ht;var dt=[],gt=[];const ft=function(t,e,n){if(1!==e)throw new Error("Numerical derivative not implemented for order n = "+e+".");var i,o=void 0===arguments[this.splineDimension+3]?1e-4:arguments[this.splineDimension+3];for(dt.length=this.splineDimension,i=0;i<this.splineDimension;i++)dt[i+1]=arguments[i+3];var s,r,u,l=this.domain,a=l[n][0],h=l[n][1],c=dt[n+1],d=(h-a)*o;for("closed"===this.boundary[n]?(s=a+(c-a-d+(u=h-a))%u,r=a+(c-a+d+u)%u,d*=2):(s=Math.min(h,Math.max(a,c-d)),d=(r=Math.min(h,Math.max(a,c+d)))-s),dt[n+1]=s,dt[0]=gt,this.evaluate.apply(null,dt),dt[n+1]=r,dt[0]=t,this.evaluate.apply(null,dt),i=0;i<this.dimension;i++)t[i]=(t[i]-gt[i])/d;return t};_().set("lib/nurbs/src/numerical-derivative",ft);const pt=ft,_t=function(t,e){for(var n=1,i=0,o=[];i<t.length;i++)n*=Array.isArray(t[i])?t[i][1]-t[i][0]:t[i],o[i]=Array.isArray(t[i])?t[i][0]:0;for(var s=0;s<n;s++)for(e(o.slice()),i=t.length-1;i>=0;i--){if(o[i]!==(Array.isArray(t[i])?t[i][1]:t[i])-1){o[i]++;break}o[i]=Array.isArray(t[i])?t[i][0]:0}};_().set("lib/nurbs/src/utils/ndloop",_t);const mt=_t,wt=function(t,e,n,i){var o=[];switch(et(i)){case et.NDARRAY:o.push(" var "+e+" = "+n+".data;"),o.push(" var "+e+"Offset = "+n+".offset;");for(var s=0;s<i.dimension;s++)o.push(" var "+e+"Stride"+s+" = "+n+".stride["+s+"];");break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:o.push(" var "+e+" = "+n+";")}return o.join("\n")};_().set("lib/nurbs/src/utils/accessor-preamble",wt);const yt=wt,vt=function(t,e,n){if(t){if(Z(t))return e+".shape["+n+"]";for(var i=e,o=0;o<n;o++)i+="[0]";return i+".length"}return"this.size["+n+"]"};_().set("lib/nurbs/src/utils/size-getter",vt);const bt=vt;var Ct={},Nt={};const St=function(t,e,n,i,o,s,r){var u,l,a,h,c,d,g=e.splineDimension,f=e.points,p=e.degree,_=e.weights,m=void 0!==_,w=e.knots,y=e.dimension,v=e.boundary;if(null!=r){Array.isArray(r)||(r=[r]);var b=0;for(u=0;u<g;u++)void 0===r[u]&&(r[u]=0),b+=r[u];if(m&&b>1)throw new Error("Analytical derivative not implemented for rational b-splines with order n = "+b+".")}s&&(t="Basis"+t),r&&(t="Der"+r.join("_")+"_"+t);var C=Ct[t];if(i)var N="function"==typeof i?i:console.log;if(C)return i&&N(Nt[t]),C.bind(e);var S=[],O="evaluate"+t,D=n.point;s&&(D=function(t,e){for(var n=[],i=0;i<t.length;i++){for(var o=t[i],s=[],r=0;r<o.length;r++)0!==o[r]&&s.push(o[r]);o=s.join(" + "),e[i]&&(o="("+o+" + "+e[i]+") % "+e[i]),n.push(o+" === "+V(i))}return"(("+n.join(" && ")+") ? 1 : 0)"});var P=n.weight,T=n.knot,F=rt("k"),I=rt("x"),R=rt("w"),V=rt("i"),x=rt("t"),z=i?"domain":"d",j=rt(i?"size":"s"),k=rt(i?"knotIndex":"j"),A=!0;for(c=0;c<g;c++)Q(w)&&Q(w[c])&&(A=!1);function X(t){S.push(" "+(t||""))}function B(t){i&&X(t)}if(s)var E=[];var q=[];for(u=0;u<g;u++)s&&E.push(V([u])),q.push(x([u]));for(S.push("function "+O+" ("+(s?"":"out, ")+q.join(", ")+(s?", "+E.join(", "):"")+") {"),X("var h, m, a, b;"),o&&(X("var "+z+" = this.domain;"),X("for (var i = 0; i < this.splineDimension; i++) {"),X(" a = arguments[i + 1];"),X(" if (a < "+z+"[i][0] || a > "+z+"[i][1] || a === undefined || isNaN(a)) {"),X(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+z+'[i][0]+", "+'+z+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),X(" }"),X("}")),c=0;c<g;c++)X("var "+j(c)+" = "+bt(f,"this.points",c)+";");function K(t,e,n){return"("+t+") ? ("+e+") : ("+n+")"}S.push(yt(e,"x","this.points",f)),m&&S.push(yt(e,"w","this.weights",_)),A||S.push(yt(e,"k","this.knots",w));var M=[];for(c=0;c<g;c++)switch(et(w)){case et.NDARRAY:M[c]=!0;break;case et.ARRAY_OF_ARRAYS:M[c]=Q(w[c])}for(c=0;c<g;c++)if(M[c])for(B("\n // Bisect to locate the knot interval in dimension "+c+"\n"),X("var "+k(c)+" = 0;"),X("h = "+j(c)+";"),X("while(h > "+k(c)+" + 1) {"),X(" m = 0.5 * (h + "+k(c)+") | 0;"),X(" if ("+T([c,"m"])+" > "+x(c)+") h = m;"),X(" else "+k(c)+" = m;"),X("}"),B("\n // Fetch knots for dimension "+c+"\n"),u=1-p[c];u<=p[c];u++)"closed"===v[c]?X(u<0?"var "+F([c,u+p[c]-1])+" = "+K(k(c)+" < "+-u,T([c,0])+" + "+T([c,[j(c),k(c),u]])+" - "+T([c,[j(c)]]),T([c,[k(c),u]]))+";":u>0?"var "+F([c,u+p[c]-1])+" = "+K(k(c)+" + "+u+" > "+j(c),T([c,j(c)])+" + "+T([c,u+" + "+k(c)+" - "+j(c)])+" - "+T([c,0]),T([c,[k(c),u]]))+";":"var "+F([c,u+p[c]-1])+" = "+T([c,[k(c),u]])+";"):X("var "+F([c,u+p[c]-1])+" = "+T([c,[k(c),u]])+";");else{for(B("\n // Directly compute knot interval for dimension "+c+"\n"),"closed"===v[c]?X(k(c)+" = ("+x(c)+" | 0) % "+j(c)+";"):(X(k(c)+" = ("+x(c)+" | 0);"),X("if ("+k(c)+" < "+p[c]+") "+k(c)+" = "+p[c]+";"),X("if ("+k(c)+" > "+j(c)+" - 1) "+k(c)+" = "+j(c)+" - 1;")),B("\n // Compute and clamp knots for dimension "+c+"\n"),u=1-p[c];u<=p[c];u++)X("var "+(d=F([c,u+p[c]-1]))+" = "+k(c)+" + "+u+";");if("clamped"===v[c])for(u=1-p[c];u<=p[c];u++)d=F([c,u+p[c]-1]),u<0&&X("if ("+d+" < "+p[c]+") "+d+" = "+p[c]+";"),u>0&&X("if ("+d+" > "+j(c)+") "+d+" = "+j(c)+";");"closed"===v[c]&&(B("\n // Wrap the B-Spline parameter for closed boundary"),X(x(c)+" %= "+j(c)+";"))}for(c=0,a=[];c<g;c++)a[c]=p[c]+1;for(m&&(B("\n // Fetch weights\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));X("var "+R(t)+" = "+P(e,n)+";")}))),i&&X(m?"\n // Fetch points and project into homogeneous (weighted) coordinates\n":"\n // Fetch points\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));if(s)X(m?"var "+I(t)+" = "+D(e,n)+" * "+R(t)+";":"var "+I(t)+" = "+D(e,n)+";");else for(i=0;i<y;i++){var o=t.concat(i);e[g]=i,X(m?"var "+I(o)+" = "+D(e,n)+" * "+R(t)+";":"var "+I(o)+" = "+D(e,n)+";")}})),B("\n"),B('// Perform De Boor"s algorithm'),c=a.length-1;c>=0;c--)for(a[c]=[p[c],p[c]+1],u=0;u<p[c];u++)for(B("\n // Degree "+p[c]+" evaluation in dimension "+c+", step "+(u+1)+"\n"),l=p[c];l>u;l--){var U=r&&p[c]-u-r[c]<=0;U?(X("m = 1 / ("+F([c,l-u+p[c]-1])+" - "+F([c,l-1])+");"),m&&(X("a = ("+x(c)+" - "+F([c,l-1])+") * m;"),X("b = 1 - a;"))):(X("a = ("+x(c)+" - "+F([c,l-1])+") / ("+F([c,l-u+p[c]-1])+" - "+F([c,l-1])+");"),X("b = 1 - a;")),m&&mt(a,(function(t){var e=t.slice(),n=t.slice();e[c]=l,n[c]=l-1,U&&m&&X("h = "+R(e)+";"),X(R(e)+" = b * "+R(n)+" + a * "+R(e)+";")})),mt(a,(function(t){var e,n,i,o=t.slice(),r=t.slice();if(o[c]=l,r[c]=l-1,U){var a=u+1;if(s)e=m?"h * "+R(r)+" / "+R(o)+" * ":"",n=I(o)+(m?" / h":""),i=I(r)+(m?" / "+R(r):""),X(I(o)+" = "+a+" * "+e+"("+n+" - "+i+") * m;");else{var d=o.slice(),f=r.slice();for(h=0;h<y;h++)d[g]=f[g]=h,e=m?"h * "+R(r)+" / "+R(o)+" * ":"",n=I(d)+(m?" / h":""),i=I(f)+(m?" / "+R(r):""),X(I(d)+" = "+a+" * "+e+"("+n+" - "+i+") * m;")}}else if(s)X(I(o)+" = b * "+I(r)+" + a * "+I(o)+";");else for(h=0;h<y;h++)o[g]=r[g]=h,X(I(o)+" = b * "+I(r)+" + a * "+I(o)+";")})),B("\n")}if(i&&X(m?"\n // Project back from homogeneous coordinates and return final output\n":"\n // Return final output\n"),s)X(m?"return "+I(p)+" / "+R(p)+";":"return "+I(p)+";");else for(c=0;c<y;c++)X(m?"out["+c+"] = "+I(p.concat([c]))+" / "+R(p)+";":"out["+c+"] = "+I(p.concat([c]))+";");if(s||X("return out;"),S.push("}"),i){var G=S.join("\n");N(G),Nt[t]=G}var W=new Function([S.join("\n"),"; return ",O].join(""))();return Ct[t]=W,W.bind(e)};_().set("lib/nurbs/src/evaluate",St);const Ot=St;var Dt={};const Pt=function(t,e,n,i){var o,s,r,u,l,a,h,c,d=Dt[t];if(d)return d.bind(e);var g=[],f="transform"+t;g.push("function "+f+"(m) {"),g.push("var i, w;"),g.push(yt(e,"x","this.points",e.points));var p=rt(i?"size":"s");for(o=0;o<e.splineDimension;o++)g.push("var "+p(o)+" = "+bt(e.points,"this.points",o)+";");for(u=[],o=0;o<e.splineDimension;o++)r="i"+o,u.push(r),g.push("for ("+r+" = "+p(o)+"- 1; "+r+" >= 0; "+r+"--) {");for(o=0;o<e.dimension;o++)g.push("x"+o+" = "+n.point(u.concat([o])));for(l=[],o=0;o<e.dimension;o++)l.push("m["+((e.dimension+1)*(o+1)-1)+"] * x"+o);for(l.push("m["+((e.dimension+1)*(e.dimension+1)-1)+"]"),g.push("var w = ("+l.join(" + ")+") || 1.0;"),o=0;o<e.dimension;o++){for(l=[],a=e.dimension,s=0;s<a;s++)l.push("m["+(s*(a+1)+o)+"] * x"+s);l.push("m["+(s*(a+1)+o)+"]"),c=n.point(u.concat([o])),h="("+l.join(" + ")+") / w",g.push(c+" = "+h+";")}for(o=e.splineDimension-1;o>=0;o--)g.push("}");g.push("return this;"),g.push("}");var _=new Function([g.join("\n"),"; return ",f].join(""))();return i&&console.log(g.join("\n")),Dt[t]=_,_.bind(e)};_().set("lib/nurbs/src/transform",Pt);const Tt=Pt;var Ft={};const It=function(t,e,n,i,o){var s=Ft[t];if(s)return s.bind(e);var r,u,l,a=e.degree,h=e.knots,c=e.splineDimension,d=e.boundary,g=[],f="support"+t,p=n.knot,_=rt("t"),m=i?"domain":"d",w=rt(i?"size":"s"),y=rt(i?"knotIndex":"i"),v=!0;for(l=0;l<c;l++)Q(h)&&Q(h[l])&&(v=!1);function b(t){g.push(" "+(t||""))}var C=[];for(r=0;r<c;r++)C.push(_([r]));g.push("function "+f+" (out, "+C.join(", ")+") {");var N=0;function S(t,e){b(void 0===e?"out["+N+++"] = "+t.join(" + ")+";":"out["+N+++"] = ("+t.join(" + ")+" + "+e+") % "+e+";")}for(b("var h, m;"),b("var c = 0;"),o&&(b("var "+m+" = this.domain;"),b("for (var i = 0; i < this.splineDimension; i++) {"),b(" a = arguments[i + 1];"),b(" if (a < "+m+"[i][0] || a > "+m+"[i][1] || a === undefined || isNaN(a)) {"),b(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+m+'[i][0]+", "+'+m+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),b(" }"),b("}")),l=0;l<c;l++)b("var "+w(l)+" = "+bt(e.points,"this.points",l)+";");v||g.push(yt(e,"k","this.knots",h));var O=[];for(l=0;l<c;l++)switch(et(h)){case et.NDARRAY:O[l]=!0;break;case et.ARRAY_OF_ARRAYS:O[l]=Q(h[l])}for(l=0;l<c;l++)O[l]?(b("var "+y(l)+" = 0;"),b("h = "+w(l)+";"),b("while(h > "+y(l)+" + 1) {"),b(" m = 0.5 * (h + "+y(l)+") | 0;"),b(" if ("+p([l,"m"])+" > "+_(l)+") h = m;"),b(" else "+y(l)+" = m;"),b("}")):"closed"===d[l]?b(y(l)+" = ("+_(l)+" | 0) % "+w(l)+";"):(b(y(l)+" = ("+_(l)+" | 0);"),b("if ("+y(l)+" < "+a[l]+") "+y(l)+" = "+a[l]+";"),b("if ("+y(l)+" > "+w(l)+" - 1) "+y(l)+" = "+w(l)+" - 1;"));for(l=0,u=[];l<c;l++)u[l]=a[l]+1;mt(u,(function(t){for(var e=[],n=[],i=0;i<c;i++)e[i]=[y(i),t[i]-a[i]],"closed"===d[i]&&t[i]-a[i]<0&&(n[i]=w(i));for(i=0;i<c;i++)S(e[i],n[i])})),b("out.length = "+N+";"),b("return out;"),g.push("}"),i&&console.log(g.join("\n"));var D=new Function([g.join("\n"),"; return ",f].join(""))();return Ft[t]=D,D.bind(e)};_().set("lib/nurbs/src/support",It);const Rt=It,Vt=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Geometry/Triangle3");var xt=t.n(Vt),zt=[];const jt=function(t,e,n){n=n||{};var i=(t=t||{}).points=t.points||[],o=t.faces=t.faces||[],s=n.haveWeights,r=e.dimension-s;if(Array.isArray(n.resolution))var u=n.resolution;else{var l=void 0===n.resolution?31:n.resolution;u=new Array(e.splineDimension).fill(l)}switch(e.splineDimension){case 1:for(var a=(_=(w=u[0])+!(v="closed"===e.boundary[0]))*r,h=(C=(m=n.domain||e.domain)[0])[1]-C[0],c=0;c<_;++c){var d=C[0]+h*c/w,g=c*r;if(e.evaluate(zt,d),s)for(var f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}i.length=a;break;case 2:var _,m,w=u[0],y=u[1],v="closed"===e.boundary[0],b=y+!(P="closed"===e.boundary[1]),C=(a=(_=w+!v)*b*r,(m=n.domain||e.domain)[0]),N=m[1],S=(h=C[1]-C[0],N[1]-N[0]);for(c=0;c<_;++c){d=C[0]+h*c/w;for(var O=0;O<b;++O){var D=N[0]+S*O/y;g=(c+_*O)*r;if(e.evaluate(zt,d,D),s)for(f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}}i.length=a;v=n.closed[0];var P=n.closed[1],T=0;for(c=0;c<w;++c){var F=c,I=c+1;v&&(I%=w);for(O=0;O<y;++O){var R=O,V=O+1;P&&(V%=y),o[T++]=F+_*R,o[T++]=I+_*R,o[T++]=I+_*V,o[T++]=F+_*R,o[T++]=I+_*V,o[T++]=F+_*V}}o.length=T;break;default:throw new Error("Can only sample contours and surfaces")}return t};_().set("lib/nurbs/extras/sample",jt);const kt=jt;var At={open:"open",closed:"closed",clamped:"clamped"};function Xt(t){return null==t}function Bt(t,e,n,i,o,s){var r,u;!t||Q(t)||J(t)?(s=s||{},this.weights=i,this.knots=n,this.degree=e,this.points=t,this.boundary=o,this.debug=s.debug,this.checkBounds=!!s.checkBounds,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0})):(s=t,this.debug=t.debug,this.checkBounds=!!t.checkBounds,this.weights=t.weights,this.knots=t.knots,this.degree=t.degree,this.boundary=t.boundary,this.points=t.points,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0}));var l=et(this.points),a=et(this.weights),h=et(this.knots);if(this.points)switch(l){case et.GENERIC_NDARRAY:case et.NDARRAY:Object.defineProperties(this,{splineDimension:{value:this.points.shape.length-1,writable:!1,configurable:!0},dimension:{value:this.points.shape[this.points.shape.length-1],writable:!1,configurable:!0},size:{get:function(){return this.points.shape.slice(0,this.points.shape.length-1)},set:function(){throw new Error("Cannot assign to read only property 'size'")},configurable:!0}});break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:var c=0,d=this.size||[];d.length=0;for(var g=this.points;Q(g[0]);g=g[0])c++,d.push(g.length);if(0===c)throw new Error("Expected an array of points");Object.defineProperties(this,{splineDimension:{value:c,writable:!1,configurable:!0},dimension:{value:g.length,writable:!1,configurable:!0},size:{get:function(){var t=[];t.length=0;for(var e=0,n=this.points;e<this.splineDimension;e++,n=n[0])t[e]=n.length;return t},set:function(){throw new Error('Cannot assign to read only property "size"')},configurable:!0}});break;case et.PACKED:default:throw new Error("Expected either a packed array, array of arrays, or ndarray of points")}else{if(void 0===this.size||null===this.size)throw new Error("Either points or a control hull size must be provided.");if(Q(this.size)||Object.defineProperty(this,"size",{value:[this.size],writable:!0,configurable:!0}),0===this.size.length)throw new Error("`size` must be a number or an array of length at least one.");Object.defineProperties(this,{splineDimension:{value:this.size.length,writable:!1,configurable:!0},dimension:{value:0,writable:!1,configurable:!0}})}if(Q(this.degree)){for(r=0;r<this.splineDimension;r++)if(Xt(this.degree[r]))throw new Error("Missing degree in dimension "+(r+1))}else{var f=!Xt(this.degree),p=Xt(this.degree)?2:this.degree;for(this.degree=[],r=0;r<this.splineDimension;r++)if(this.size[r]<=p){if(f)throw new Error("Expected at least "+(p+1)+" points for degree "+p+" spline in dimension "+(r+1)+" but got only "+this.size[r]);this.degree[r]=this.size[r]-1}else this.degree[r]=p}if(u="string"!=typeof this.boundary?"open":this.boundary,!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u);for(this.boundary=Q(this.boundary)?this.boundary:[],this.boundary.length=this.splineDimension,r=0;r<this.splineDimension;r++)if(this.boundary[r]=Xt(this.boundary[r])?u:this.boundary[r],!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u+" for dimension "+(r+1));switch(h){case et.ARRAY_OF_ARRAYS:for(Q(this.knots)&&this.knots.length>0&&!Q(this.knots[0])&&(this.knots=[this.knots]),r=0;r<this.splineDimension;r++){if(this.size[r]<=this.degree[r])throw new Error("Expected at least "+(this.degree[r]+1)+" points in dimension "+(r+1)+" but got "+this.size[r]+".");if(Q(this.knots[r])){if("closed"!==this.boundary[r]&&this.knots[r].length!==this.degree[r]+this.size[r]+1)throw new Error("Expected "+(this.degree[r]+this.size[r]+1)+" knots in dimension "+(r+1)+" but got "+this.knots[r].length+".");if("closed"===this.boundary[r]&&this.knots[r].length!==this.size[r]+1&&!(this.knots[r].length===this.size[r]+this.degree[r]+1))throw new Error("Expected "+(this.size[r]+1)+" knots for closed spline in dimension "+(r+1)+" but got "+this.knots[r].length+".")}}case et.NDARRAY:}var _=it(this,this.debug,this.checkBounds,l,a,h);if(_!==this.__cacheKey){this.__cacheKey=_;var m=ct(this);this.evaluate=Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,!1),this.transform=Tt(this.__cacheKey,this,m,this.debug),this.support=Rt(this.__cacheKey,this,m,this.debug,this.checkBounds),this.evaluator=function(t,e){return Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,e,t)}}return this.numericalDerivative=pt.bind(this),this}function Et(){var t,e=[],n=this.points;n?Z(n)&&(t=n.shape):t=this.size;for(var i=0;i<this.splineDimension;i++){var o=t?t[i]:n.length,s=this.degree[i],r="closed"===this.boundary[i];if(this.knots&&this.knots[i]){var u=this.knots[i];e[i]=[u[r?0:s],u[o]]}else e[i]=[r?0:s,o];n&&(n=n[0])}return e}function qt(t,e,n,i,o,s){var r=function(t,e,n,i,o,s){return u(t,e,n,i,o,s),r},u=Bt.bind(r);return Object.defineProperty(r,"domain",{get:Et}),u(t,e,n,i,o,s),r}qt.sample=kt;const Kt=qt;_().set("lib/nurbs/nurbs",Kt);const Mt=Kt;function Ut(t){U.call(this,t),W().call(this,t),this.addType(d().NurbsCurve),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]}}Ut.prototype=Object.assign(Object.create(U.prototype),W().prototype,{constructor:Ut,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"closed",new(o().SFBool)),new(r())(d().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsCurve"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed(t,e,n,i)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},tessellate:function(){if(this._order.getValue()<2)return[];if(!this.controlPointNode)return[];if(this.controlPointNode.getSize()<this._order.getValue())return[];const t=this.getVertices(),e=[];if(t.length){const n=t.length;for(let i=0;i<n;i+=8)e.push(t[i],t[i+1],t[i+2]);e.push(t[n-4],t[n-3],t[n-2])}return e},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=(i.at(-1),i[0],this._order.getValue()-1),s=this.surface=(this.surface||Mt)({boundary:["open"],degree:[o],knots:[i],points:n,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(i.length),this.sampleOptions.haveWeights=!!e;const r=Mt.sample(this.mesh,s,this.sampleOptions).points,u=this.getVertices();for(let t=3,e=r.length;t<e;t+=3){const e=t-3;u.push(r[e],r[e+1],r[e+2],1),u.push(r[t],r[t+1],r[t+2],1)}},dispose:function(){U.prototype.dispose.call(this)}});const Gt=Ut;_().set("x_ite/Components/NURBS/NurbsCurve",Gt);const Wt=Gt;function Yt(t){N.call(this,t),this.addType(d().NurbsCurve2D),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]},this.array=[]}Yt.prototype=Object.assign(Object.create(N.prototype),{constructor:Yt,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"closed",new(o().SFBool)),new(r())(d().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"NurbsCurve2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed2D(t,e,n,i)},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints2D(t,e,n,i,o)},tessellate:function(t){const e=this.array;if(e.length=0,this._order.getValue()<2)return e;if(this._controlPoint.length<this._order.getValue())return e;const n=this.getClosed(this._order.getValue(),this._knot,this._weight,this._controlPoint),i=this.getWeights(this.weights,this._controlPoint.length,this._weight),o=this.getControlPoints(this.controlPoints,n,this._order.getValue(),i,this._controlPoint),s=this.getKnots(this.knots,n,this._order.getValue(),this._controlPoint.length,this._knot),r=(s.at(-1),s[0],this._order.getValue()-1),u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[s],points:o,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(s.length),this.sampleOptions.haveWeights=!!i;const l=Mt.sample(this.mesh,u,this.sampleOptions).points;switch(t){case 0:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],l[t+1]);break;case 1:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],0,l[t+1]);break;case 2:for(let t=0,n=l.length;t<n;t+=2)e.push(new(O())(l[t],l[t+1],0))}return e}});const Jt=Yt;_().set("x_ite/Components/NURBS/NurbsCurve2D",Jt);const Lt=Jt,Zt=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Core/X3DChildNode");var Ht=t.n(Zt);const Qt=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Interpolation/OrientationInterpolator");var $t=t.n(Qt);const te=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Numbers/Rotation4");var ee=t.n(te);function ne(t){Ht().call(this,t),this.addType(d().NurbsOrientationInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new($t())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}ne.prototype=Object.assign(Object.create(Ht().prototype),{constructor:ne,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(d().inputOutput,"order",new(o().SFInt32)(3)),new(r())(d().inputOutput,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"value_changed",new(o().SFRotation))]),getTypeName:function(){return"NurbsOrientationInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=i.at(-1)-i[0],s=this._order.getValue()-1,r=this.surface=(this.surface||Mt)({boundary:["open"],degree:[s],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=!!e;const u=Mt.sample(this.mesh,r,this.sampleOptions).points,l=this.interpolator;l._key.length=0,l._keyValue.length=0;for(let e=0,n=u.length-3;e<n;e+=3){const s=new(O())(u[e+3]-u[e+0],u[e+4]-u[e+1],u[e+5]-u[e+2]);l._key.push(i[0]+e/(n-3+3*t)*o),l._keyValue.push(new(ee())(O().zAxis,s))}t&&(l._key.push(i[0]+o),l._keyValue.push(l._keyValue[0]))}});const ie=ne;_().set("x_ite/Components/NURBS/NurbsOrientationInterpolator",ie);const oe=ie,se=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Algorithm");var re=t.n(se);function ue(t){U.call(this,t),this.addType(d().X3DNurbsSurfaceGeometryNode),this.tessellationScale=1,this.uKnots=[],this.vKnots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[],closed:[]},this.textUKnots=[],this.textVKnots=[],this.textWeights=[],this.texControlPoints=[],this.texMesh={}}ue.prototype=Object.assign(Object.create(U.prototype),{constructor:ue,initialize:function(){U.prototype.initialize.call(this),this._texCoord.addInterest("set_texCoord__",this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_texCoord__(),this.set_controlPoint__()},set_texCoord__:function(){this.texCoordNode?.removeInterest("requestRebuild",this),this.nurbsTexCoordNode?.removeInterest("requestRebuild",this),this.texCoordNode=f()(d().X3DTextureCoordinateNode,this._texCoord),this.nurbsTexCoordNode=f()(d().NurbsTextureCoordinate,this._texCoord),this.texCoordNode?.addInterest("requestRebuild",this),this.nurbsTexCoordNode?.addInterest("requestRebuild",this)},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},setTessellationScale:function(t){this.tessellationScale=t,this.requestRebuild()},getUTessellation:function(t){return Math.floor(q.getTessellation(this._uTessellation.getValue(),t-this._uOrder.getValue())*this.tessellationScale)},getVTessellation:function(t){return Math.floor(q.getTessellation(this._vTessellation.getValue(),t-this._vOrder.getValue())*this.tessellationScale)},getUClosed:function(t,e,n,i,o,s){return!!this._uClosed.getValue()&&q.getUClosed(t,e,n,i,o,s)},getVClosed:function(t,e,n,i,o,s){return!!this._vClosed.getValue()&&q.getVClosed(t,e,n,i,o,s)},getUVWeights:function(t,e,n,i){return q.getUVWeights(t,e,n,i)},getTexControlPoints:function(t,e,n,i,o,s,r,u){return q.getTexControlPoints(t,e,n,i,o,s,r,u)},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){return q.getUVControlPoints(t,e,n,i,o,s,r,u,l)},getTrimmingContours:function(){},build:function(){if(this._uOrder.getValue()<2)return;if(this._vOrder.getValue()<2)return;if(this._uDimension.getValue()<this._uOrder.getValue())return;if(this._vDimension.getValue()<this._vOrder.getValue())return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()!==this._uDimension.getValue()*this._vDimension.getValue())return;const t=this.getUClosed(this._uOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._uKnot,this._weight,this.controlPointNode),e=this.getVClosed(this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._vKnot,this._weight,this.controlPointNode),n=this.getUVWeights(this.weights,this._uDimension.getValue(),this._vDimension.getValue(),this._weight),i=this.getUVControlPoints(this.controlPoints,t,e,this._uOrder.getValue(),this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),n,this.controlPointNode),o=this.getKnots(this.uKnots,t,this._uOrder.getValue(),this._uDimension.getValue(),this._uKnot),s=this.getKnots(this.vKnots,e,this._vOrder.getValue(),this._vDimension.getValue(),this._vKnot),r=(o.at(-1),o[0],s.at(-1),s[0],this._uOrder.getValue()-1),u=this._vOrder.getValue()-1,l=this.surface=(this.surface||Mt)({boundary:["open","open"],degree:[r,u],knots:[o,s],points:i,debug:!1}),a=this.sampleOptions;a.resolution[0]=this.getUTessellation(o.length),a.resolution[1]=this.getVTessellation(s.length),a.closed[0]=t,a.closed[1]=e,a.domain=void 0,a.haveWeights=!!n,a.trimmingContours=this.getTrimmingContours();const h=Mt.sample(this.mesh,l,a),c=h.faces,d=h.points,g=this.getVertices();for(let t=0,e=c.length;t<e;++t){const e=3*c[t];g.push(d[e],d[e+1],d[e+2],1)}this.buildNurbsTexCoords(t,e,this._uOrder.getValue(),this._vOrder.getValue(),o,s,this._uDimension.getValue(),this._vDimension.getValue(),l.domain),this.buildNormals(c,d),this.setSolid(this._solid.getValue()),this.setCCW(!0)},buildNurbsTexCoords:function(){const t=[],e=[],n=[[[0,0,0,1],[0,1,0,1]],[[1,0,0,1],[1,1,0,1]]];function i(t,e){return t[0]=t[1]=e[0],t[2]=t[3]=e.at(-1),t}return function(o,s,r,u,l,a,h,c,d){const g=this.sampleOptions;if(this.texCoordNode&&this.texCoordNode.getSize()===h*c)var f=r-1,p=u-1,_=l,m=a,w=this.getTexControlPoints(this.texControlPoints,o,s,r,u,h,c,this.texCoordNode);else if(this.nurbsTexCoordNode&&this.nurbsTexCoordNode.isValid()){var y=this.nurbsTexCoordNode,v=(f=y._uOrder.getValue()-1,p=y._vOrder.getValue()-1,_=this.getKnots(this.texUKnots,!1,y._uOrder.getValue(),y._uDimension.getValue(),y._uKnot),m=this.getKnots(this.texVKnots,!1,y._vOrder.getValue(),y._vDimension.getValue(),y._vKnot),this.getUVWeights(this.texWeights,y._uDimension.getValue(),y._vDimension.getValue(),y._weight));w=y.getControlPoints(v)}else{f=1,p=1,_=i(t,l),m=i(e,a),w=n;g.domain=d}const b=this.texSurface=(this.texSurface||Mt)({boundary:["open","open"],degree:[f,p],knots:[_,m],points:w});g.closed[0]=!1,g.closed[1]=!1,g.haveWeights=!1;const C=Mt.sample(this.texMesh,b,g),N=C.faces,S=C.points,O=this.getTexCoords();for(let t=0,e=N.length;t<e;++t){const e=4*N[t];O.push(S[e],S[e+1],S[e+2],S[e+3])}this.getMultiTexCoords().push(this.getTexCoords())}}(),buildNormals:function(t,e){const n=this.createNormals(t,e),i=this.getNormals();for(const t of n)i.push(t.x,t.y,t.z)},createNormals:function(t,e){const n=this.createFaceNormals(t,e),i=[];for(let e=0,n=t.length;e<n;++e){const n=t[e];let o=i[n];o||(o=i[n]=[]),o.push(e)}return this.refineNormals(i,n,re().radians(85))},createFaceNormals:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0);return function(i,o){const s=this.faceNormals||[],r=i.length;for(let u=0;u<r;u+=3){const r=3*i[u],l=3*i[u+1],a=3*i[u+2];t.set(o[r],o[r+1],o[r+2]),e.set(o[l],o[l+1],o[l+2]),n.set(o[a],o[a+1],o[a+2]);const h=xt().normal(t,e,n,s[u]||new(O())(0,0,0));s[u]=h,s[u+1]=h,s[u+2]=h}return s.length=r,s}}()});const le=ue;_().set("x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode",le);const ae=le;function he(t){ae.call(this,t),this.addType(d().NurbsPatchSurface)}he.prototype=Object.assign(Object.create(ae.prototype),{constructor:he,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(d().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"uClosed",new(o().SFBool)),new(r())(d().initializeOnly,"vClosed",new(o().SFBool)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"texCoord",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsPatchSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]}});const ce=he;_().set("x_ite/Components/NURBS/NurbsPatchSurface",ce);const de=ce,ge=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Interpolation/PositionInterpolator");var fe=t.n(ge);function pe(t){Ht().call(this,t),this.addType(d().NurbsPositionInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new(fe())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}pe.prototype=Object.assign(Object.create(Ht().prototype),{constructor:pe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(d().inputOutput,"order",new(o().SFInt32)(3)),new(r())(d().inputOutput,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"value_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsPositionInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),s=i.at(-1)-i[0],r=this._order.getValue()-1,u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=!!e;const l=Mt.sample(this.mesh,u,this.sampleOptions).points,a=this.interpolator;a._key.length=0,a._keyValue.length=0;for(let t=0,e=l.length;t<e;t+=3)a._key.push(i[0]+t/(e-3)*s),a._keyValue.push(new(o().SFVec3f)(l[t],l[t+1],l[t+2]))}});const _e=pe;_().set("x_ite/Components/NURBS/NurbsPositionInterpolator",_e);const me=_e,we=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Grouping/X3DBoundedObject");var ye=t.n(we);function ve(t){Ht().call(this,t),ye().call(this,t),this.addType(d().NurbsSet),this.geometryNodes=[]}function be(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}ve.prototype=Object.assign(Object.create(Ht().prototype),ye().prototype,{constructor:ve,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellationScale",new(o().SFFloat)(1)),new(r())(d().inputOutput,"visible",new(o().SFBool)(!0)),new(r())(d().inputOutput,"bboxDisplay",new(o().SFBool)),new(r())(d().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(r())(d().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(r())(d().inputOnly,"addGeometry",new(o().MFNode)),new(r())(d().inputOnly,"removeGeometry",new(o().MFNode)),new(r())(d().inputOutput,"geometry",new(o().MFNode))]),getTypeName:function(){return"NurbsSet"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),ye().prototype.initialize.call(this),this._tessellationScale.addInterest("set_tessellationScale__",this),this._addGeometry.addInterest("set_addGeometry__",this),this._removeGeometry.addInterest("set_removeGeometry__",this),this._geometry.addInterest("set_geometry__",this),this.set_geometry__()},getBBox:function(t,e){for(const e of this.geometryNodes)t.add(e.getBBox());return t},set_tessellationScale__:function(){const t=Math.max(0,this._tessellationScale.getValue());for(const e of this.geometryNodes)e.setTessellationScale(t)},set_addGeometry__:function(){this._addGeometry.setTainted(!0),this._addGeometry.erase(be(this._addGeometry,0,this._addGeometry.length,this._geometry,0,this._geometry.length),this._addGeometry.length);for(const t of this._addGeometry)this._geometry.push(t);this._addGeometry.length=0,this._addGeometry.setTainted(!1)},set_removeGeometry__:function(){this._removeGeometry.setTainted(!0),this._geometry.erase(be(this._geometry,0,this._geometry.length,this._removeGeometry,0,this._removeGeometry.length),this._geometry.length),this._removeGeometry.length=0,this._removeGeometry.setTainted(!1)},set_geometry__:function(){for(const t of this.geometryNodes)t.setTessellationScale(1);this.geometryNodes.length=0;for(const t of this._geometry){const e=f()(d().X3DNurbsSurfaceGeometryNode,t);e&&this.geometryNodes.push(e)}this.set_tessellationScale__()},dispose:function(){ye().prototype.dispose.call(this),Ht().prototype.dispose.call(this)}});const Ce=ve;_().set("x_ite/Components/NURBS/NurbsSet",Ce);const Ne=Ce,Se=window[Symbol.for("X_ITE.X3D-8.7.4")].require("standard/Math/Geometry/Line3");var Oe=t.n(Se);const De={isPointInTriangle:function(t,e,n,i){const o=(e.y-n.y)*(t.x-n.x)+(n.x-e.x)*(t.y-n.y);if(0==o)return!1;const s=((e.y-n.y)*(i.x-n.x)+(n.x-e.x)*(i.y-n.y))/o;if(s<0||s>1)return!1;const r=((n.y-t.y)*(i.x-n.x)+(t.x-n.x)*(i.y-n.y))/o;if(r<0||r>1)return!1;const u=1-s-r;return!(u<0||u>1)}};_().set("standard/Math/Geometry/Triangle2",De);const Pe=De;function Te(t){Ht().call(this,t),this.addType(d().NurbsSurfaceInterpolator),this.geometry=new de(t)}Te.prototype=Object.assign(Object.create(Ht().prototype),{constructor:Te,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFVec2f)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"normal_changed",new(o().SFVec3f)),new(r())(d().outputOnly,"position_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsSurfaceInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){this._set_fraction.addInterest("set_fraction__",this),this._uOrder.addFieldInterest(this.geometry._uOrder),this._vOrder.addFieldInterest(this.geometry._vOrder),this._uDimension.addFieldInterest(this.geometry._uDimension),this._vDimension.addFieldInterest(this.geometry._vDimension),this._uKnot.addFieldInterest(this.geometry._uKnot),this._vKnot.addFieldInterest(this.geometry._vKnot),this._weight.addFieldInterest(this.geometry._weight),this._controlPoint.addFieldInterest(this.geometry._controlPoint),this.geometry._uTessellation=128,this.geometry._vTessellation=128,this.geometry._uOrder=this._uOrder,this.geometry._vOrder=this._vOrder,this.geometry._uDimension=this._uDimension,this.geometry._vDimension=this._vDimension,this.geometry._uKnot=this._uKnot,this.geometry._vKnot=this._vKnot,this.geometry._weight=this._weight,this.geometry._controlPoint=this._controlPoint,this.geometry.setup()},set_fraction__:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0),i=new(O())(0,0,0),o=new(Oe())(O().Zero,O().zAxis),s={};return function(){const r=this._set_fraction.getValue(),u=this.geometry.getTexCoords(),l=this.geometry.getNormals(),a=this.geometry.getVertices();for(let h=0,c=0,d=u.length;h<d;h+=12,c+=9)if(t.set(u[h+0],u[h+1],0),e.set(u[h+4],u[h+5],0),n.set(u[h+7],u[h+9],0),Pe.isPointInTriangle(t,e,n,r)&&(o.set(i.set(r.x,r.y,0),O().zAxis),o.intersectsTriangle(t,e,n,s))){const t=s.u,e=s.v,n=s.t,i=new(O())(n*l[c+0]+t*l[c+3]+e*l[c+6],n*l[c+1]+t*l[c+4]+e*l[c+7],n*l[c+2]+t*l[c+5]+e*l[c+8]),o=new(O())(n*a[h+0]+t*a[h+4]+e*a[h+8],n*a[h+1]+t*a[h+5]+e*a[h+9],n*a[h+2]+t*a[h+6]+e*a[h+10]);this._normal_changed=i,this._position_changed=o}}}()});const Fe=Te;_().set("x_ite/Components/NURBS/NurbsSurfaceInterpolator",Fe);const Ie=Fe,Re=window[Symbol.for("X_ITE.X3D-8.7.4")].require("x_ite/Components/Geometry3D/Extrusion");var Ve=t.n(Re);function xe(t){U.call(this,t),this.addType(d().NurbsSweptSurface),this.extrusion=new(Ve())(t)}xe.prototype=Object.assign(Object.create(U.prototype),{constructor:xe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(d().inputOutput,"crossSectionCurve",new(o().SFNode)),new(r())(d().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSweptSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._crossSectionCurve.addInterest("set_crossSectionCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_crossSectionCurve__(),this.set_trajectoryCurve__()},set_crossSectionCurve__:function(){this.crossSectionCurveNode&&this.crossSectionCurveNode.removeInterest("requestRebuild",this),this.crossSectionCurveNode=f()(d().X3DNurbsControlCurveNode,this._crossSectionCurve),this.crossSectionCurveNode&&this.crossSectionCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(d().NurbsCurve,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.addInterest("requestRebuild",this)},build:function(){if(!this.crossSectionCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.crossSectionCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(0),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const ze=xe;_().set("x_ite/Components/NURBS/NurbsSweptSurface",ze);const je=ze;function ke(t){U.call(this,t),this.addType(d().NurbsSwungSurface),this.extrusion=new(Ve())(t)}ke.prototype=Object.assign(Object.create(U.prototype),{constructor:ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(d().inputOutput,"profileCurve",new(o().SFNode)),new(r())(d().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSwungSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._profileCurve.addInterest("set_profileCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_profileCurve__(),this.set_trajectoryCurve__()},set_profileCurve__:function(){this.profileCurveNode&&this.profileCurveNode.removeInterest("requestRebuild",this),this.profileCurveNode=f()(d().X3DNurbsControlCurveNode,this._profileCurve),this.profileCurveNode&&this.profileCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(d().X3DNurbsControlCurveNode,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode.addInterest("requestRebuild",this)},build:function(){if(!this.profileCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.profileCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(1),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const Ae=ke;_().set("x_ite/Components/NURBS/NurbsSwungSurface",Ae);const Xe=Ae;function Be(t){h().call(this,t),this.addType(d().NurbsTextureCoordinate),this.controlPoints=[]}Be.prototype=Object.assign(Object.create(h().prototype),{constructor:Be,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2f))]),getTypeName:function(){return"NurbsTextureCoordinate"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"texCoord"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){h().prototype.initialize.call(this)},getControlPoints:function(t){const e=this._controlPoint.getValue(),n=this.controlPoints;for(let i=0,o=this._uDimension.getValue();i<o;++i){let s=n[i];s||(s=n[i]=[]);for(let n=0,r=this._vDimension.getValue();n<r;++n){const r=n*o+i,u=s[n]||new(B()),l=2*r;s[n]=u.set(e[l],e[l+1],0,t?t[r]:1)}}return n},isValid:function(){return!(this._uOrder.getValue()<2)&&(!(this._vOrder.getValue()<2)&&(!(this._uDimension.getValue()<this._uOrder.getValue())&&(!(this._vDimension.getValue()<this._vOrder.getValue())&&this._controlPoint.length===this._uDimension.getValue()*this._vDimension.getValue())))}});const Ee=Be;_().set("x_ite/Components/NURBS/NurbsTextureCoordinate",Ee);const qe=Ee;function Ke(t){ae.call(this,t),this.addType(d().NurbsTrimmedSurface),this.trimmingContourNodes=[]}function Me(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}Ke.prototype=Object.assign(Object.create(ae.prototype),{constructor:Ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(d().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"uClosed",new(o().SFBool)),new(r())(d().initializeOnly,"vClosed",new(o().SFBool)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"texCoord",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().inputOnly,"addTrimmingContour",new(o().MFNode)),new(r())(d().inputOnly,"removeTrimmingContour",new(o().MFNode)),new(r())(d().inputOutput,"trimmingContour",new(o().MFNode))]),getTypeName:function(){return"NurbsTrimmedSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){ae.prototype.initialize.call(this),this._addTrimmingContour.addInterest("set_addTrimmingContour__",this),this._removeTrimmingContour.addInterest("set_removeTrimmingContour__",this),this._trimmingContour.addInterest("set_trimmingContour__",this),this.set_trimmingContour__()},set_addTrimmingContour__:function(){this._addTrimmingContour.setTainted(!0),this._addTrimmingContour.erase(Me(this._addTrimmingContour,0,this._addTrimmingContour.length,this._trimmingContour,0,this._trimmingContour.length),this._addTrimmingContour.length);for(const t of this._addTrimmingContour)this._trimmingContour.push(t);this._addTrimmingContour.length=0,this._addTrimmingContour.setTainted(!1)},set_removeTrimmingContour__:function(){this._removeTrimmingContour.setTainted(!0),this._trimmingContour.erase(Me(this._trimmingContour,0,this._trimmingContour.length,this._removeTrimmingContour,0,this._removeTrimmingContour.length),this._trimmingContour.length),this._removeTrimmingContour.length=0,this._removeTrimmingContour.setTainted(!1)},set_trimmingContour__:function(){const t=this.trimmingContourNodes;t.length=0;for(const e of this._trimmingContour){const n=f()(d().Contour2D,e);n&&t.push(n)}},getTrimmingContours:function(){const t=this.trimmingContourNodes,e=[];for(const n of t)n.addTrimmingContour(e);return e}});const Ue=Ke;_().set("x_ite/Components/NURBS/NurbsTrimmedSurface",Ue);const Ge=Ue;n().addComponent({name:"NURBS",types:{Contour2D:v,ContourPolyline2D:T,CoordinateDouble:x,NurbsCurve:Wt,NurbsCurve2D:Lt,NurbsOrientationInterpolator:oe,NurbsPatchSurface:de,NurbsPositionInterpolator:me,NurbsSet:Ne,NurbsSurfaceInterpolator:Ie,NurbsSweptSurface:je,NurbsSwungSurface:Xe,NurbsTextureCoordinate:qe,NurbsTrimmedSurface:Ge},abstractTypes:{X3DNurbsControlCurveNode:N,X3DNurbsSurfaceGeometryNode:ae,X3DParametricGeometryNode:U}});const We=void 0;_().set("assets/components/NURBS",We)})();
1
+ /* X_ITE v8.7.6 */(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components");var n=t.n(e);const i=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Fields");var o=t.n(i);const s=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Base/X3DFieldDefinition");var r=t.n(s);const u=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Base/FieldDefinitionArray");var l=t.n(u);const a=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Core/X3DNode");var h=t.n(a);const c=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Base/X3DConstants");var d=t.n(c);const g=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Base/X3DCast");var f=t.n(g);const p=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Namespace");var _=t.n(p);function m(t){h().call(this,t),this.addType(d().Contour2D),this.childNodes=[]}function w(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}m.prototype=Object.assign(Object.create(h().prototype),{constructor:m,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"addChildren",new(o().MFNode)),new(r())(d().inputOnly,"removeChildren",new(o().MFNode)),new(r())(d().inputOutput,"children",new(o().MFNode))]),getTypeName:function(){return"Contour2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"trimmingContour"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){h().prototype.initialize.call(this),this._addChildren.addInterest("set_addChildren__",this),this._removeChildren.addInterest("set_removeChildren__",this),this._children.addInterest("set_children__",this),this.set_children__()},set_addChildren__:function(){this._addChildren.setTainted(!0),this._addChildren.erase(w(this._addChildren,0,this._addChildren.length,this._children,0,this._children.length),this._addChildren.length);for(const t of this._addChildren)this._children.push(t);this._addChildren.length=0,this._addChildren.setTainted(!1)},set_removeChildren__:function(){this._removeChildren.setTainted(!0),this._children.erase(w(this._children,0,this._children.length,this._removeChildren,0,this._removeChildren.length),this._children.length),this._removeChildren.length=0,this._removeChildren.setTainted(!1)},set_children__:function(){const t=this.childNodes;t.length=0;for(const e of this._children){const n=f()(d().NurbsCurve2D,e);if(n)t.push(n);else{const n=f()(d().ContourPolyline2D,e);if(n){t.push(n);continue}}}},addTrimmingContour:function(t){for(const e of this.childNodes)t.push(e.tessellate(2))}});const y=m;_().set("x_ite/Components/NURBS/Contour2D",y);const v=y;function b(t){h().call(this,t),this.addType(d().X3DNurbsControlCurveNode)}b.prototype=Object.assign(Object.create(h().prototype),{constructor:b});const C=b;_().set("x_ite/Components/NURBS/X3DNurbsControlCurveNode",C);const N=C,S=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Numbers/Vector3");var O=t.n(S);function D(t){N.call(this,t),this.addType(d().ContourPolyline2D),this.controlPoints=[]}D.prototype=Object.assign(Object.create(N.prototype),{constructor:D,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"ContourPolyline2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},tessellate:function(t){switch(t){case 0:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[n+0]=t[n+0],e[n+1]=t[n+1]}return e.length=2*n,e}case 1:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i,o=3*i;e[o+0]=t[n+0],e[o+1]=0,e[o+2]=t[n+1]}return e.length=3*n,e}case 3:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[i]=new(O())(t[n+0],t[n+1],0)}return e.length=n,e}}}});const P=D;_().set("x_ite/Components/NURBS/ContourPolyline2D",P);const T=P,F=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Rendering/X3DCoordinateNode");var I=t.n(F);function R(t){I().call(this,t),this.addType(d().CoordinateDouble)}R.prototype=Object.assign(Object.create(I().prototype),{constructor:R,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"point",new(o().MFVec3d))]),getTypeName:function(){return"CoordinateDouble"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"coord"},getSpecificationRange:function(){return["3.0","Infinity"]}});const V=R;_().set("x_ite/Components/NURBS/CoordinateDouble",V);const x=V,z=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Rendering/X3DGeometryNode");var j=t.n(z);const k=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Numbers/Vector2");var A=t.n(k);const X=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Numbers/Vector4");var B=t.n(X);const E={getTessellation:function(t,e){return t>0?t+1:t<0?-t*e+1:2*e+1},getClosed2D:function(t,e,n,i){const o=i.length;return(!(n.length===o)||n[0]===n[o-1])&&(!!i[0].equals(i[o-1])&&!!this.isPeriodic(t,o,e))},getClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s){const r=s.getSize();return(!(o.length===r)||o[0]===o[r-1])&&(!!s.get1Point(0,t).equals(s.get1Point(r-1,e))&&!!this.isPeriodic(n,r,i))}}(),getUClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=o;n<s;++n){const o=n*i,s=n*i+i-1;if(l&&r[o]!==r[s])return!1;if(!u.get1Point(o,t).equals(u.get1Point(s,e)))return!1}return!!this.isPeriodic(n,i,s)}}(),getVClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=i;n<s;++n){const s=n,a=(o-1)*i+n;if(l&&r[s]!==r[a])return!1;if(!u.get1Point(s,t).equals(u.get1Point(a,e)))return!1}return!!this.isPeriodic(n,o,s)}}(),isPeriodic:function(t,e,n){if(n.length===e+t){{let e=1;for(let i=1,o=t;i<o;++i)e+=n[i]===n[0];if(e===t)return!1}{let e=1;for(let i=n.length-t,o=n.length-1;i<o;++i)e+=n[i]===n[o];if(e===t)return!1}}return!0},getKnots:function(t,e,n,i,o){const s=t||[];for(let t=0,e=o.length;t<e;++t)s[t]=o[t];s.length=o.length;let r=!0;if(s.length===i+n){r=!1;let t=0;for(let e=1,i=s.length;e<i;++e)s[e]==s[e-1]?++t:t=0,t>n-1&&(r=!0),s[e-1]>s[e]&&(r=!0)}if(r)for(let t=0,e=i+n;t<e;++t)s[t]=t/(e-1);if(e)for(let t=1,e=n-1;t<e;++t)s.push(s.at(-1)+(s[t]-s[t-1]));return s},getWeights:function(t,e,n){if(n.length!==e)return;const i=t||[];for(let t=0;t<e;++t)i[t]=n[t];return i.length=e,i},getUVWeights:function(t,e,n,i){const o=e*n;if(i.length!==o)return;const s=t||[];for(let t=0,o=0;t<e;++t)for(let t=0;t<n;++t,++o)s[o]=i[o];return s.length=o,s},getControlPoints2D:function(t,e,n,i,o){const s=t||[],r=o.getValue(),u=o.length,l=!!i,a=l?O():A();s.haveWeights!==l&&(s.haveWeights=l,s.length=0);for(let t=0;t<u;++t){const e=2*t,n=s[t]||new a(0,0,0);s[t]=n.set(r[e+0],r[e+1],l?i[t]:0)}if(s.length=u,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getControlPoints:function(t,e,n,i,o){const s=t||[],r=o.getSize(),u=!!i,l=u?B():O();s.haveWeights!==u&&(s.haveWeights=u,s.length=0);for(let t=0;t<r;++t){const e=s[t]=o.get1Point(t,s[t]||new l(0,0,0,0));u&&(e.w=i[t])}if(s.length=r,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){const a=t||[],h=!!u,c=h?B():O();a.haveWeights!==h&&(a.haveWeights=h,a.length=0);for(let t=0;t<s;++t){let e=a[t];e||(e=a[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=l.get1Point(i,e[n]||new c(0,0,0,0)),h&&(e[n].w=u[i])}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(a.length=s,e)for(let t=1,e=i-1;t<e;++t)a.push(a[t]);return a},getTexControlPoints:function(t,e,n,i,o,s,r,u){const l=t||[];for(let t=0;t<s;++t){let e=l[t];e||(e=l[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=u.get1Point(i,e[n]||new(B())(0,0,0,0))}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(l.length=s,e)for(let t=1,e=i-1;t<e;++t)l.push(l[t]);return l}};_().set("x_ite/Browser/NURBS/NURBS",E);const q=E;function K(t){j().call(this,t),this.addType(d().X3DParametricGeometryNode)}K.prototype=Object.assign(Object.create(j().prototype),{constructor:K,getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)}});const M=K;_().set("x_ite/Components/NURBS/X3DParametricGeometryNode",M);const U=M,G=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Rendering/X3DLineGeometryNode");var W=t.n(G);const Y=function(t){return!!t&&(!!t.dtype&&new RegExp("function View[0-9]+d(:?"+t.dtype+")+").test(String(t.constructor)))};_().set("lib/nurbs/src/utils/is-ndarray",Y);const J=Y,L=function(t){return!!t&&(void 0!==t.data&&Array.isArray(t.shape)&&void 0!==t.offset&&void 0!==t.stride)};_().set("lib/nurbs/src/utils/is-ndarray-like",L);const Z=L,H=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)||void 0!==t.length};_().set("lib/nurbs/src/utils/is-array-like",H);const Q=H;function $(t){if(t){if(J(t)||Z(t))return"generic"===t.dtype?$.GENERIC_NDARRAY:$.NDARRAY;if(Q(t)){for(var e=t;Q(e[0]);e=e[0]);return"x"in e?$.ARRAY_OF_OBJECTS:$.ARRAY_OF_ARRAYS}throw new Error("Unhandled data type. Got type: "+typeof t)}}$.ARRAY_OF_OBJECTS="Obj",$.ARRAY_OF_ARRAYS="Arr",$.NDARRAY="Nd",$.GENERIC_NDARRAY="GenNd",$.PACKED="PackArr";const tt=$;_().set("lib/nurbs/src/utils/infer-type",tt);const et=tt;const nt=function(t,e,n,i,o,s){var r,u,l=[],a=!1;for(r=0;r<t.splineDimension;r++){var h=Q(t.knots)&&Q(t.knots[r]);h&&(a=!0),l.push("Deg"+t.degree[r]+(h?"":"Uniform")+((u=t.boundary[r])[0].toUpperCase()+u.slice(1)))}var c=[[a?"NU":"",t.weights?"RBS":"BS"].join("")+t.dimension+"D",l.join("_")];return i&&c.push(i+"Pts"),o&&c.push(o+"Wts"),s&&c.push(s+"Kts"),e&&c.push("debug"),n&&c.push("chk"),c.join("_")};_().set("lib/nurbs/src/utils/cache-key",nt);const it=nt;var ot=function t(e,n){return function(n,i){void 0===n||Array.isArray(n)||(n=[n]);for(var o=[],s=0;s<n.length;s++)o.push(t.sum(n[s]));if(i)for(n=0;n<o.length;n++)void 0!==i[n]&&(o[n]="("+o[n]+" + "+i[n]+") % "+i[n]);return e+o.join("_")}};ot.sum=function(t){return 0===(t=(t=Array.isArray(t)?t:[t]).filter((function(t){return void 0!==t&&0!==t}))).length&&t.push(0),t.join(" + ")};const st=ot;_().set("lib/nurbs/src/utils/variable",st);const rt=st;var ut=[".x",".y",".z",".w"];function lt(t){return function(e,n){void 0===e||Array.isArray(e)||(e=[e]);for(var i=[],o=0;o<e.length;o++)i.push(rt.sum(e[o]));if(n)for(e=0;e<i.length;e++)void 0!==n[e]&&(i[e]="("+i[e]+" + "+n[e]+") % "+n[e]);return t(i)}}function at(t,e){if(e)switch(et(e)){case et.ARRAY_OF_OBJECTS:return lt((function(e){var n=e.pop();return t+"["+e.join("][")+"]"+ut[n]}));case et.ARRAY_OF_ARRAYS:return lt((function(e){return t+"["+e.join("][")+"]"}));case et.GENERIC_NDARRAY:return lt((function(e){return t+".get("+e.join(",")+")"}));case et.NDARRAY:return lt((function(e){for(var n=[t+"Offset"],i=0;i<e.length;i++)n.push(t+"Stride"+i+" * ("+e[i]+")");return t+"["+n.join(" + ")+"]"}));case et.PACKED:default:return}}const ht=function(t){var e,n={};return(e=at("x",t.points))&&(n.point=e),(e=at("w",t.weights))&&(n.weight=e),(e=at("k",t.knots))&&(n.knot=e),n};_().set("lib/nurbs/src/utils/create-accessors",ht);const ct=ht;var dt=[],gt=[];const ft=function(t,e,n){if(1!==e)throw new Error("Numerical derivative not implemented for order n = "+e+".");var i,o=void 0===arguments[this.splineDimension+3]?1e-4:arguments[this.splineDimension+3];for(dt.length=this.splineDimension,i=0;i<this.splineDimension;i++)dt[i+1]=arguments[i+3];var s,r,u,l=this.domain,a=l[n][0],h=l[n][1],c=dt[n+1],d=(h-a)*o;for("closed"===this.boundary[n]?(s=a+(c-a-d+(u=h-a))%u,r=a+(c-a+d+u)%u,d*=2):(s=Math.min(h,Math.max(a,c-d)),d=(r=Math.min(h,Math.max(a,c+d)))-s),dt[n+1]=s,dt[0]=gt,this.evaluate.apply(null,dt),dt[n+1]=r,dt[0]=t,this.evaluate.apply(null,dt),i=0;i<this.dimension;i++)t[i]=(t[i]-gt[i])/d;return t};_().set("lib/nurbs/src/numerical-derivative",ft);const pt=ft,_t=function(t,e){for(var n=1,i=0,o=[];i<t.length;i++)n*=Array.isArray(t[i])?t[i][1]-t[i][0]:t[i],o[i]=Array.isArray(t[i])?t[i][0]:0;for(var s=0;s<n;s++)for(e(o.slice()),i=t.length-1;i>=0;i--){if(o[i]!==(Array.isArray(t[i])?t[i][1]:t[i])-1){o[i]++;break}o[i]=Array.isArray(t[i])?t[i][0]:0}};_().set("lib/nurbs/src/utils/ndloop",_t);const mt=_t,wt=function(t,e,n,i){var o=[];switch(et(i)){case et.NDARRAY:o.push(" var "+e+" = "+n+".data;"),o.push(" var "+e+"Offset = "+n+".offset;");for(var s=0;s<i.dimension;s++)o.push(" var "+e+"Stride"+s+" = "+n+".stride["+s+"];");break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:o.push(" var "+e+" = "+n+";")}return o.join("\n")};_().set("lib/nurbs/src/utils/accessor-preamble",wt);const yt=wt,vt=function(t,e,n){if(t){if(Z(t))return e+".shape["+n+"]";for(var i=e,o=0;o<n;o++)i+="[0]";return i+".length"}return"this.size["+n+"]"};_().set("lib/nurbs/src/utils/size-getter",vt);const bt=vt;var Ct={},Nt={};const St=function(t,e,n,i,o,s,r){var u,l,a,h,c,d,g=e.splineDimension,f=e.points,p=e.degree,_=e.weights,m=void 0!==_,w=e.knots,y=e.dimension,v=e.boundary;if(null!=r){Array.isArray(r)||(r=[r]);var b=0;for(u=0;u<g;u++)void 0===r[u]&&(r[u]=0),b+=r[u];if(m&&b>1)throw new Error("Analytical derivative not implemented for rational b-splines with order n = "+b+".")}s&&(t="Basis"+t),r&&(t="Der"+r.join("_")+"_"+t);var C=Ct[t];if(i)var N="function"==typeof i?i:console.log;if(C)return i&&N(Nt[t]),C.bind(e);var S=[],O="evaluate"+t,D=n.point;s&&(D=function(t,e){for(var n=[],i=0;i<t.length;i++){for(var o=t[i],s=[],r=0;r<o.length;r++)0!==o[r]&&s.push(o[r]);o=s.join(" + "),e[i]&&(o="("+o+" + "+e[i]+") % "+e[i]),n.push(o+" === "+V(i))}return"(("+n.join(" && ")+") ? 1 : 0)"});var P=n.weight,T=n.knot,F=rt("k"),I=rt("x"),R=rt("w"),V=rt("i"),x=rt("t"),z=i?"domain":"d",j=rt(i?"size":"s"),k=rt(i?"knotIndex":"j"),A=!0;for(c=0;c<g;c++)Q(w)&&Q(w[c])&&(A=!1);function X(t){S.push(" "+(t||""))}function B(t){i&&X(t)}if(s)var E=[];var q=[];for(u=0;u<g;u++)s&&E.push(V([u])),q.push(x([u]));for(S.push("function "+O+" ("+(s?"":"out, ")+q.join(", ")+(s?", "+E.join(", "):"")+") {"),X("var h, m, a, b;"),o&&(X("var "+z+" = this.domain;"),X("for (var i = 0; i < this.splineDimension; i++) {"),X(" a = arguments[i + 1];"),X(" if (a < "+z+"[i][0] || a > "+z+"[i][1] || a === undefined || isNaN(a)) {"),X(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+z+'[i][0]+", "+'+z+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),X(" }"),X("}")),c=0;c<g;c++)X("var "+j(c)+" = "+bt(f,"this.points",c)+";");function K(t,e,n){return"("+t+") ? ("+e+") : ("+n+")"}S.push(yt(e,"x","this.points",f)),m&&S.push(yt(e,"w","this.weights",_)),A||S.push(yt(e,"k","this.knots",w));var M=[];for(c=0;c<g;c++)switch(et(w)){case et.NDARRAY:M[c]=!0;break;case et.ARRAY_OF_ARRAYS:M[c]=Q(w[c])}for(c=0;c<g;c++)if(M[c])for(B("\n // Bisect to locate the knot interval in dimension "+c+"\n"),X("var "+k(c)+" = 0;"),X("h = "+j(c)+";"),X("while(h > "+k(c)+" + 1) {"),X(" m = 0.5 * (h + "+k(c)+") | 0;"),X(" if ("+T([c,"m"])+" > "+x(c)+") h = m;"),X(" else "+k(c)+" = m;"),X("}"),B("\n // Fetch knots for dimension "+c+"\n"),u=1-p[c];u<=p[c];u++)"closed"===v[c]?X(u<0?"var "+F([c,u+p[c]-1])+" = "+K(k(c)+" < "+-u,T([c,0])+" + "+T([c,[j(c),k(c),u]])+" - "+T([c,[j(c)]]),T([c,[k(c),u]]))+";":u>0?"var "+F([c,u+p[c]-1])+" = "+K(k(c)+" + "+u+" > "+j(c),T([c,j(c)])+" + "+T([c,u+" + "+k(c)+" - "+j(c)])+" - "+T([c,0]),T([c,[k(c),u]]))+";":"var "+F([c,u+p[c]-1])+" = "+T([c,[k(c),u]])+";"):X("var "+F([c,u+p[c]-1])+" = "+T([c,[k(c),u]])+";");else{for(B("\n // Directly compute knot interval for dimension "+c+"\n"),"closed"===v[c]?X(k(c)+" = ("+x(c)+" | 0) % "+j(c)+";"):(X(k(c)+" = ("+x(c)+" | 0);"),X("if ("+k(c)+" < "+p[c]+") "+k(c)+" = "+p[c]+";"),X("if ("+k(c)+" > "+j(c)+" - 1) "+k(c)+" = "+j(c)+" - 1;")),B("\n // Compute and clamp knots for dimension "+c+"\n"),u=1-p[c];u<=p[c];u++)X("var "+(d=F([c,u+p[c]-1]))+" = "+k(c)+" + "+u+";");if("clamped"===v[c])for(u=1-p[c];u<=p[c];u++)d=F([c,u+p[c]-1]),u<0&&X("if ("+d+" < "+p[c]+") "+d+" = "+p[c]+";"),u>0&&X("if ("+d+" > "+j(c)+") "+d+" = "+j(c)+";");"closed"===v[c]&&(B("\n // Wrap the B-Spline parameter for closed boundary"),X(x(c)+" %= "+j(c)+";"))}for(c=0,a=[];c<g;c++)a[c]=p[c]+1;for(m&&(B("\n // Fetch weights\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));X("var "+R(t)+" = "+P(e,n)+";")}))),i&&X(m?"\n // Fetch points and project into homogeneous (weighted) coordinates\n":"\n // Fetch points\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));if(s)X(m?"var "+I(t)+" = "+D(e,n)+" * "+R(t)+";":"var "+I(t)+" = "+D(e,n)+";");else for(i=0;i<y;i++){var o=t.concat(i);e[g]=i,X(m?"var "+I(o)+" = "+D(e,n)+" * "+R(t)+";":"var "+I(o)+" = "+D(e,n)+";")}})),B("\n"),B('// Perform De Boor"s algorithm'),c=a.length-1;c>=0;c--)for(a[c]=[p[c],p[c]+1],u=0;u<p[c];u++)for(B("\n // Degree "+p[c]+" evaluation in dimension "+c+", step "+(u+1)+"\n"),l=p[c];l>u;l--){var U=r&&p[c]-u-r[c]<=0;U?(X("m = 1 / ("+F([c,l-u+p[c]-1])+" - "+F([c,l-1])+");"),m&&(X("a = ("+x(c)+" - "+F([c,l-1])+") * m;"),X("b = 1 - a;"))):(X("a = ("+x(c)+" - "+F([c,l-1])+") / ("+F([c,l-u+p[c]-1])+" - "+F([c,l-1])+");"),X("b = 1 - a;")),m&&mt(a,(function(t){var e=t.slice(),n=t.slice();e[c]=l,n[c]=l-1,U&&m&&X("h = "+R(e)+";"),X(R(e)+" = b * "+R(n)+" + a * "+R(e)+";")})),mt(a,(function(t){var e,n,i,o=t.slice(),r=t.slice();if(o[c]=l,r[c]=l-1,U){var a=u+1;if(s)e=m?"h * "+R(r)+" / "+R(o)+" * ":"",n=I(o)+(m?" / h":""),i=I(r)+(m?" / "+R(r):""),X(I(o)+" = "+a+" * "+e+"("+n+" - "+i+") * m;");else{var d=o.slice(),f=r.slice();for(h=0;h<y;h++)d[g]=f[g]=h,e=m?"h * "+R(r)+" / "+R(o)+" * ":"",n=I(d)+(m?" / h":""),i=I(f)+(m?" / "+R(r):""),X(I(d)+" = "+a+" * "+e+"("+n+" - "+i+") * m;")}}else if(s)X(I(o)+" = b * "+I(r)+" + a * "+I(o)+";");else for(h=0;h<y;h++)o[g]=r[g]=h,X(I(o)+" = b * "+I(r)+" + a * "+I(o)+";")})),B("\n")}if(i&&X(m?"\n // Project back from homogeneous coordinates and return final output\n":"\n // Return final output\n"),s)X(m?"return "+I(p)+" / "+R(p)+";":"return "+I(p)+";");else for(c=0;c<y;c++)X(m?"out["+c+"] = "+I(p.concat([c]))+" / "+R(p)+";":"out["+c+"] = "+I(p.concat([c]))+";");if(s||X("return out;"),S.push("}"),i){var G=S.join("\n");N(G),Nt[t]=G}var W=new Function([S.join("\n"),"; return ",O].join(""))();return Ct[t]=W,W.bind(e)};_().set("lib/nurbs/src/evaluate",St);const Ot=St;var Dt={};const Pt=function(t,e,n,i){var o,s,r,u,l,a,h,c,d=Dt[t];if(d)return d.bind(e);var g=[],f="transform"+t;g.push("function "+f+"(m) {"),g.push("var i, w;"),g.push(yt(e,"x","this.points",e.points));var p=rt(i?"size":"s");for(o=0;o<e.splineDimension;o++)g.push("var "+p(o)+" = "+bt(e.points,"this.points",o)+";");for(u=[],o=0;o<e.splineDimension;o++)r="i"+o,u.push(r),g.push("for ("+r+" = "+p(o)+"- 1; "+r+" >= 0; "+r+"--) {");for(o=0;o<e.dimension;o++)g.push("x"+o+" = "+n.point(u.concat([o])));for(l=[],o=0;o<e.dimension;o++)l.push("m["+((e.dimension+1)*(o+1)-1)+"] * x"+o);for(l.push("m["+((e.dimension+1)*(e.dimension+1)-1)+"]"),g.push("var w = ("+l.join(" + ")+") || 1.0;"),o=0;o<e.dimension;o++){for(l=[],a=e.dimension,s=0;s<a;s++)l.push("m["+(s*(a+1)+o)+"] * x"+s);l.push("m["+(s*(a+1)+o)+"]"),c=n.point(u.concat([o])),h="("+l.join(" + ")+") / w",g.push(c+" = "+h+";")}for(o=e.splineDimension-1;o>=0;o--)g.push("}");g.push("return this;"),g.push("}");var _=new Function([g.join("\n"),"; return ",f].join(""))();return i&&console.log(g.join("\n")),Dt[t]=_,_.bind(e)};_().set("lib/nurbs/src/transform",Pt);const Tt=Pt;var Ft={};const It=function(t,e,n,i,o){var s=Ft[t];if(s)return s.bind(e);var r,u,l,a=e.degree,h=e.knots,c=e.splineDimension,d=e.boundary,g=[],f="support"+t,p=n.knot,_=rt("t"),m=i?"domain":"d",w=rt(i?"size":"s"),y=rt(i?"knotIndex":"i"),v=!0;for(l=0;l<c;l++)Q(h)&&Q(h[l])&&(v=!1);function b(t){g.push(" "+(t||""))}var C=[];for(r=0;r<c;r++)C.push(_([r]));g.push("function "+f+" (out, "+C.join(", ")+") {");var N=0;function S(t,e){b(void 0===e?"out["+N+++"] = "+t.join(" + ")+";":"out["+N+++"] = ("+t.join(" + ")+" + "+e+") % "+e+";")}for(b("var h, m;"),b("var c = 0;"),o&&(b("var "+m+" = this.domain;"),b("for (var i = 0; i < this.splineDimension; i++) {"),b(" a = arguments[i + 1];"),b(" if (a < "+m+"[i][0] || a > "+m+"[i][1] || a === undefined || isNaN(a)) {"),b(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+m+'[i][0]+", "+'+m+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),b(" }"),b("}")),l=0;l<c;l++)b("var "+w(l)+" = "+bt(e.points,"this.points",l)+";");v||g.push(yt(e,"k","this.knots",h));var O=[];for(l=0;l<c;l++)switch(et(h)){case et.NDARRAY:O[l]=!0;break;case et.ARRAY_OF_ARRAYS:O[l]=Q(h[l])}for(l=0;l<c;l++)O[l]?(b("var "+y(l)+" = 0;"),b("h = "+w(l)+";"),b("while(h > "+y(l)+" + 1) {"),b(" m = 0.5 * (h + "+y(l)+") | 0;"),b(" if ("+p([l,"m"])+" > "+_(l)+") h = m;"),b(" else "+y(l)+" = m;"),b("}")):"closed"===d[l]?b(y(l)+" = ("+_(l)+" | 0) % "+w(l)+";"):(b(y(l)+" = ("+_(l)+" | 0);"),b("if ("+y(l)+" < "+a[l]+") "+y(l)+" = "+a[l]+";"),b("if ("+y(l)+" > "+w(l)+" - 1) "+y(l)+" = "+w(l)+" - 1;"));for(l=0,u=[];l<c;l++)u[l]=a[l]+1;mt(u,(function(t){for(var e=[],n=[],i=0;i<c;i++)e[i]=[y(i),t[i]-a[i]],"closed"===d[i]&&t[i]-a[i]<0&&(n[i]=w(i));for(i=0;i<c;i++)S(e[i],n[i])})),b("out.length = "+N+";"),b("return out;"),g.push("}"),i&&console.log(g.join("\n"));var D=new Function([g.join("\n"),"; return ",f].join(""))();return Ft[t]=D,D.bind(e)};_().set("lib/nurbs/src/support",It);const Rt=It,Vt=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Geometry/Triangle3");var xt=t.n(Vt),zt=[];const jt=function(t,e,n){n=n||{};var i=(t=t||{}).points=t.points||[],o=t.faces=t.faces||[],s=n.haveWeights,r=e.dimension-s;if(Array.isArray(n.resolution))var u=n.resolution;else{var l=void 0===n.resolution?31:n.resolution;u=new Array(e.splineDimension).fill(l)}switch(e.splineDimension){case 1:for(var a=(_=(w=u[0])+!(v="closed"===e.boundary[0]))*r,h=(C=(m=n.domain||e.domain)[0])[1]-C[0],c=0;c<_;++c){var d=C[0]+h*c/w,g=c*r;if(e.evaluate(zt,d),s)for(var f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}i.length=a;break;case 2:var _,m,w=u[0],y=u[1],v="closed"===e.boundary[0],b=y+!(P="closed"===e.boundary[1]),C=(a=(_=w+!v)*b*r,(m=n.domain||e.domain)[0]),N=m[1],S=(h=C[1]-C[0],N[1]-N[0]);for(c=0;c<_;++c){d=C[0]+h*c/w;for(var O=0;O<b;++O){var D=N[0]+S*O/y;g=(c+_*O)*r;if(e.evaluate(zt,d,D),s)for(f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}}i.length=a;v=n.closed[0];var P=n.closed[1],T=0;for(c=0;c<w;++c){var F=c,I=c+1;v&&(I%=w);for(O=0;O<y;++O){var R=O,V=O+1;P&&(V%=y),o[T++]=F+_*R,o[T++]=I+_*R,o[T++]=I+_*V,o[T++]=F+_*R,o[T++]=I+_*V,o[T++]=F+_*V}}o.length=T;break;default:throw new Error("Can only sample contours and surfaces")}return t};_().set("lib/nurbs/extras/sample",jt);const kt=jt;var At={open:"open",closed:"closed",clamped:"clamped"};function Xt(t){return null==t}function Bt(t,e,n,i,o,s){var r,u;!t||Q(t)||J(t)?(s=s||{},this.weights=i,this.knots=n,this.degree=e,this.points=t,this.boundary=o,this.debug=s.debug,this.checkBounds=!!s.checkBounds,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0})):(s=t,this.debug=t.debug,this.checkBounds=!!t.checkBounds,this.weights=t.weights,this.knots=t.knots,this.degree=t.degree,this.boundary=t.boundary,this.points=t.points,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0}));var l=et(this.points),a=et(this.weights),h=et(this.knots);if(this.points)switch(l){case et.GENERIC_NDARRAY:case et.NDARRAY:Object.defineProperties(this,{splineDimension:{value:this.points.shape.length-1,writable:!1,configurable:!0},dimension:{value:this.points.shape[this.points.shape.length-1],writable:!1,configurable:!0},size:{get:function(){return this.points.shape.slice(0,this.points.shape.length-1)},set:function(){throw new Error("Cannot assign to read only property 'size'")},configurable:!0}});break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:var c=0,d=this.size||[];d.length=0;for(var g=this.points;Q(g[0]);g=g[0])c++,d.push(g.length);if(0===c)throw new Error("Expected an array of points");Object.defineProperties(this,{splineDimension:{value:c,writable:!1,configurable:!0},dimension:{value:g.length,writable:!1,configurable:!0},size:{get:function(){var t=[];t.length=0;for(var e=0,n=this.points;e<this.splineDimension;e++,n=n[0])t[e]=n.length;return t},set:function(){throw new Error('Cannot assign to read only property "size"')},configurable:!0}});break;case et.PACKED:default:throw new Error("Expected either a packed array, array of arrays, or ndarray of points")}else{if(void 0===this.size||null===this.size)throw new Error("Either points or a control hull size must be provided.");if(Q(this.size)||Object.defineProperty(this,"size",{value:[this.size],writable:!0,configurable:!0}),0===this.size.length)throw new Error("`size` must be a number or an array of length at least one.");Object.defineProperties(this,{splineDimension:{value:this.size.length,writable:!1,configurable:!0},dimension:{value:0,writable:!1,configurable:!0}})}if(Q(this.degree)){for(r=0;r<this.splineDimension;r++)if(Xt(this.degree[r]))throw new Error("Missing degree in dimension "+(r+1))}else{var f=!Xt(this.degree),p=Xt(this.degree)?2:this.degree;for(this.degree=[],r=0;r<this.splineDimension;r++)if(this.size[r]<=p){if(f)throw new Error("Expected at least "+(p+1)+" points for degree "+p+" spline in dimension "+(r+1)+" but got only "+this.size[r]);this.degree[r]=this.size[r]-1}else this.degree[r]=p}if(u="string"!=typeof this.boundary?"open":this.boundary,!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u);for(this.boundary=Q(this.boundary)?this.boundary:[],this.boundary.length=this.splineDimension,r=0;r<this.splineDimension;r++)if(this.boundary[r]=Xt(this.boundary[r])?u:this.boundary[r],!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u+" for dimension "+(r+1));switch(h){case et.ARRAY_OF_ARRAYS:for(Q(this.knots)&&this.knots.length>0&&!Q(this.knots[0])&&(this.knots=[this.knots]),r=0;r<this.splineDimension;r++){if(this.size[r]<=this.degree[r])throw new Error("Expected at least "+(this.degree[r]+1)+" points in dimension "+(r+1)+" but got "+this.size[r]+".");if(Q(this.knots[r])){if("closed"!==this.boundary[r]&&this.knots[r].length!==this.degree[r]+this.size[r]+1)throw new Error("Expected "+(this.degree[r]+this.size[r]+1)+" knots in dimension "+(r+1)+" but got "+this.knots[r].length+".");if("closed"===this.boundary[r]&&this.knots[r].length!==this.size[r]+1&&!(this.knots[r].length===this.size[r]+this.degree[r]+1))throw new Error("Expected "+(this.size[r]+1)+" knots for closed spline in dimension "+(r+1)+" but got "+this.knots[r].length+".")}}case et.NDARRAY:}var _=it(this,this.debug,this.checkBounds,l,a,h);if(_!==this.__cacheKey){this.__cacheKey=_;var m=ct(this);this.evaluate=Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,!1),this.transform=Tt(this.__cacheKey,this,m,this.debug),this.support=Rt(this.__cacheKey,this,m,this.debug,this.checkBounds),this.evaluator=function(t,e){return Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,e,t)}}return this.numericalDerivative=pt.bind(this),this}function Et(){var t,e=[],n=this.points;n?Z(n)&&(t=n.shape):t=this.size;for(var i=0;i<this.splineDimension;i++){var o=t?t[i]:n.length,s=this.degree[i],r="closed"===this.boundary[i];if(this.knots&&this.knots[i]){var u=this.knots[i];e[i]=[u[r?0:s],u[o]]}else e[i]=[r?0:s,o];n&&(n=n[0])}return e}function qt(t,e,n,i,o,s){var r=function(t,e,n,i,o,s){return u(t,e,n,i,o,s),r},u=Bt.bind(r);return Object.defineProperty(r,"domain",{get:Et}),u(t,e,n,i,o,s),r}qt.sample=kt;const Kt=qt;_().set("lib/nurbs/nurbs",Kt);const Mt=Kt;function Ut(t){U.call(this,t),W().call(this,t),this.addType(d().NurbsCurve),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]}}Ut.prototype=Object.assign(Object.create(U.prototype),W().prototype,{constructor:Ut,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"closed",new(o().SFBool)),new(r())(d().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsCurve"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed(t,e,n,i)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},tessellate:function(){if(this._order.getValue()<2)return[];if(!this.controlPointNode)return[];if(this.controlPointNode.getSize()<this._order.getValue())return[];const t=this.getVertices(),e=[];if(t.length){const n=t.length;for(let i=0;i<n;i+=8)e.push(t[i],t[i+1],t[i+2]);e.push(t[n-4],t[n-3],t[n-2])}return e},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=(i.at(-1),i[0],this._order.getValue()-1),s=this.surface=(this.surface||Mt)({boundary:["open"],degree:[o],knots:[i],points:n,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(i.length),this.sampleOptions.haveWeights=!!e;const r=Mt.sample(this.mesh,s,this.sampleOptions).points,u=this.getVertices();for(let t=3,e=r.length;t<e;t+=3){const e=t-3;u.push(r[e],r[e+1],r[e+2],1),u.push(r[t],r[t+1],r[t+2],1)}},dispose:function(){U.prototype.dispose.call(this)}});const Gt=Ut;_().set("x_ite/Components/NURBS/NurbsCurve",Gt);const Wt=Gt;function Yt(t){N.call(this,t),this.addType(d().NurbsCurve2D),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]},this.array=[]}Yt.prototype=Object.assign(Object.create(N.prototype),{constructor:Yt,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"closed",new(o().SFBool)),new(r())(d().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"NurbsCurve2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed2D(t,e,n,i)},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints2D(t,e,n,i,o)},tessellate:function(t){const e=this.array;if(e.length=0,this._order.getValue()<2)return e;if(this._controlPoint.length<this._order.getValue())return e;const n=this.getClosed(this._order.getValue(),this._knot,this._weight,this._controlPoint),i=this.getWeights(this.weights,this._controlPoint.length,this._weight),o=this.getControlPoints(this.controlPoints,n,this._order.getValue(),i,this._controlPoint),s=this.getKnots(this.knots,n,this._order.getValue(),this._controlPoint.length,this._knot),r=(s.at(-1),s[0],this._order.getValue()-1),u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[s],points:o,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(s.length),this.sampleOptions.haveWeights=!!i;const l=Mt.sample(this.mesh,u,this.sampleOptions).points;switch(t){case 0:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],l[t+1]);break;case 1:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],0,l[t+1]);break;case 2:for(let t=0,n=l.length;t<n;t+=2)e.push(new(O())(l[t],l[t+1],0))}return e}});const Jt=Yt;_().set("x_ite/Components/NURBS/NurbsCurve2D",Jt);const Lt=Jt,Zt=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Core/X3DChildNode");var Ht=t.n(Zt);const Qt=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Interpolation/OrientationInterpolator");var $t=t.n(Qt);const te=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Numbers/Rotation4");var ee=t.n(te);function ne(t){Ht().call(this,t),this.addType(d().NurbsOrientationInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new($t())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}ne.prototype=Object.assign(Object.create(Ht().prototype),{constructor:ne,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(d().inputOutput,"order",new(o().SFInt32)(3)),new(r())(d().inputOutput,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"value_changed",new(o().SFRotation))]),getTypeName:function(){return"NurbsOrientationInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=i.at(-1)-i[0],s=this._order.getValue()-1,r=this.surface=(this.surface||Mt)({boundary:["open"],degree:[s],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=!!e;const u=Mt.sample(this.mesh,r,this.sampleOptions).points,l=this.interpolator;l._key.length=0,l._keyValue.length=0;for(let e=0,n=u.length-3;e<n;e+=3){const s=new(O())(u[e+3]-u[e+0],u[e+4]-u[e+1],u[e+5]-u[e+2]);l._key.push(i[0]+e/(n-3+3*t)*o),l._keyValue.push(new(ee())(O().zAxis,s))}t&&(l._key.push(i[0]+o),l._keyValue.push(l._keyValue[0]))}});const ie=ne;_().set("x_ite/Components/NURBS/NurbsOrientationInterpolator",ie);const oe=ie,se=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Algorithm");var re=t.n(se);function ue(t){U.call(this,t),this.addType(d().X3DNurbsSurfaceGeometryNode),this.tessellationScale=1,this.uKnots=[],this.vKnots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[],closed:[]},this.textUKnots=[],this.textVKnots=[],this.textWeights=[],this.texControlPoints=[],this.texMesh={}}ue.prototype=Object.assign(Object.create(U.prototype),{constructor:ue,initialize:function(){U.prototype.initialize.call(this),this._texCoord.addInterest("set_texCoord__",this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_texCoord__(),this.set_controlPoint__()},set_texCoord__:function(){this.texCoordNode?.removeInterest("requestRebuild",this),this.nurbsTexCoordNode?.removeInterest("requestRebuild",this),this.texCoordNode=f()(d().X3DTextureCoordinateNode,this._texCoord),this.nurbsTexCoordNode=f()(d().NurbsTextureCoordinate,this._texCoord),this.texCoordNode?.addInterest("requestRebuild",this),this.nurbsTexCoordNode?.addInterest("requestRebuild",this)},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},setTessellationScale:function(t){this.tessellationScale=t,this.requestRebuild()},getUTessellation:function(t){return Math.floor(q.getTessellation(this._uTessellation.getValue(),t-this._uOrder.getValue())*this.tessellationScale)},getVTessellation:function(t){return Math.floor(q.getTessellation(this._vTessellation.getValue(),t-this._vOrder.getValue())*this.tessellationScale)},getUClosed:function(t,e,n,i,o,s){return!!this._uClosed.getValue()&&q.getUClosed(t,e,n,i,o,s)},getVClosed:function(t,e,n,i,o,s){return!!this._vClosed.getValue()&&q.getVClosed(t,e,n,i,o,s)},getUVWeights:function(t,e,n,i){return q.getUVWeights(t,e,n,i)},getTexControlPoints:function(t,e,n,i,o,s,r,u){return q.getTexControlPoints(t,e,n,i,o,s,r,u)},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){return q.getUVControlPoints(t,e,n,i,o,s,r,u,l)},getTrimmingContours:function(){},build:function(){if(this._uOrder.getValue()<2)return;if(this._vOrder.getValue()<2)return;if(this._uDimension.getValue()<this._uOrder.getValue())return;if(this._vDimension.getValue()<this._vOrder.getValue())return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()!==this._uDimension.getValue()*this._vDimension.getValue())return;const t=this.getUClosed(this._uOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._uKnot,this._weight,this.controlPointNode),e=this.getVClosed(this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._vKnot,this._weight,this.controlPointNode),n=this.getUVWeights(this.weights,this._uDimension.getValue(),this._vDimension.getValue(),this._weight),i=this.getUVControlPoints(this.controlPoints,t,e,this._uOrder.getValue(),this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),n,this.controlPointNode),o=this.getKnots(this.uKnots,t,this._uOrder.getValue(),this._uDimension.getValue(),this._uKnot),s=this.getKnots(this.vKnots,e,this._vOrder.getValue(),this._vDimension.getValue(),this._vKnot),r=(o.at(-1),o[0],s.at(-1),s[0],this._uOrder.getValue()-1),u=this._vOrder.getValue()-1,l=this.surface=(this.surface||Mt)({boundary:["open","open"],degree:[r,u],knots:[o,s],points:i,debug:!1}),a=this.sampleOptions;a.resolution[0]=this.getUTessellation(o.length),a.resolution[1]=this.getVTessellation(s.length),a.closed[0]=t,a.closed[1]=e,a.domain=void 0,a.haveWeights=!!n,a.trimmingContours=this.getTrimmingContours();const h=Mt.sample(this.mesh,l,a),c=h.faces,d=h.points,g=this.getVertices();for(let t=0,e=c.length;t<e;++t){const e=3*c[t];g.push(d[e],d[e+1],d[e+2],1)}this.buildNurbsTexCoords(t,e,this._uOrder.getValue(),this._vOrder.getValue(),o,s,this._uDimension.getValue(),this._vDimension.getValue(),l.domain),this.buildNormals(c,d),this.setSolid(this._solid.getValue()),this.setCCW(!0)},buildNurbsTexCoords:function(){const t=[],e=[],n=[[[0,0,0,1],[0,1,0,1]],[[1,0,0,1],[1,1,0,1]]];function i(t,e){return t[0]=t[1]=e[0],t[2]=t[3]=e.at(-1),t}return function(o,s,r,u,l,a,h,c,d){const g=this.sampleOptions;if(this.texCoordNode&&this.texCoordNode.getSize()===h*c)var f=r-1,p=u-1,_=l,m=a,w=this.getTexControlPoints(this.texControlPoints,o,s,r,u,h,c,this.texCoordNode);else if(this.nurbsTexCoordNode&&this.nurbsTexCoordNode.isValid()){var y=this.nurbsTexCoordNode,v=(f=y._uOrder.getValue()-1,p=y._vOrder.getValue()-1,_=this.getKnots(this.texUKnots,!1,y._uOrder.getValue(),y._uDimension.getValue(),y._uKnot),m=this.getKnots(this.texVKnots,!1,y._vOrder.getValue(),y._vDimension.getValue(),y._vKnot),this.getUVWeights(this.texWeights,y._uDimension.getValue(),y._vDimension.getValue(),y._weight));w=y.getControlPoints(v)}else{f=1,p=1,_=i(t,l),m=i(e,a),w=n;g.domain=d}const b=this.texSurface=(this.texSurface||Mt)({boundary:["open","open"],degree:[f,p],knots:[_,m],points:w});g.closed[0]=!1,g.closed[1]=!1,g.haveWeights=!1;const C=Mt.sample(this.texMesh,b,g),N=C.faces,S=C.points,O=this.getTexCoords();for(let t=0,e=N.length;t<e;++t){const e=4*N[t];O.push(S[e],S[e+1],S[e+2],S[e+3])}this.getMultiTexCoords().push(this.getTexCoords())}}(),buildNormals:function(t,e){const n=this.createNormals(t,e),i=this.getNormals();for(const t of n)i.push(t.x,t.y,t.z)},createNormals:function(t,e){const n=this.createFaceNormals(t,e),i=[];for(let e=0,n=t.length;e<n;++e){const n=t[e];let o=i[n];o||(o=i[n]=[]),o.push(e)}return this.refineNormals(i,n,re().radians(85))},createFaceNormals:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0);return function(i,o){const s=this.faceNormals||[],r=i.length;for(let u=0;u<r;u+=3){const r=3*i[u],l=3*i[u+1],a=3*i[u+2];t.set(o[r],o[r+1],o[r+2]),e.set(o[l],o[l+1],o[l+2]),n.set(o[a],o[a+1],o[a+2]);const h=xt().normal(t,e,n,s[u]||new(O())(0,0,0));s[u]=h,s[u+1]=h,s[u+2]=h}return s.length=r,s}}()});const le=ue;_().set("x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode",le);const ae=le;function he(t){ae.call(this,t),this.addType(d().NurbsPatchSurface)}he.prototype=Object.assign(Object.create(ae.prototype),{constructor:he,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(d().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"uClosed",new(o().SFBool)),new(r())(d().initializeOnly,"vClosed",new(o().SFBool)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"texCoord",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsPatchSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]}});const ce=he;_().set("x_ite/Components/NURBS/NurbsPatchSurface",ce);const de=ce,ge=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Interpolation/PositionInterpolator");var fe=t.n(ge);function pe(t){Ht().call(this,t),this.addType(d().NurbsPositionInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new(fe())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}pe.prototype=Object.assign(Object.create(Ht().prototype),{constructor:pe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(d().inputOutput,"order",new(o().SFInt32)(3)),new(r())(d().inputOutput,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"value_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsPositionInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),s=i.at(-1)-i[0],r=this._order.getValue()-1,u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=!!e;const l=Mt.sample(this.mesh,u,this.sampleOptions).points,a=this.interpolator;a._key.length=0,a._keyValue.length=0;for(let t=0,e=l.length;t<e;t+=3)a._key.push(i[0]+t/(e-3)*s),a._keyValue.push(new(o().SFVec3f)(l[t],l[t+1],l[t+2]))}});const _e=pe;_().set("x_ite/Components/NURBS/NurbsPositionInterpolator",_e);const me=_e,we=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Grouping/X3DBoundedObject");var ye=t.n(we);function ve(t){Ht().call(this,t),ye().call(this,t),this.addType(d().NurbsSet),this.geometryNodes=[]}function be(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}ve.prototype=Object.assign(Object.create(Ht().prototype),ye().prototype,{constructor:ve,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellationScale",new(o().SFFloat)(1)),new(r())(d().inputOutput,"visible",new(o().SFBool)(!0)),new(r())(d().inputOutput,"bboxDisplay",new(o().SFBool)),new(r())(d().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(r())(d().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(r())(d().inputOnly,"addGeometry",new(o().MFNode)),new(r())(d().inputOnly,"removeGeometry",new(o().MFNode)),new(r())(d().inputOutput,"geometry",new(o().MFNode))]),getTypeName:function(){return"NurbsSet"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),ye().prototype.initialize.call(this),this._tessellationScale.addInterest("set_tessellationScale__",this),this._addGeometry.addInterest("set_addGeometry__",this),this._removeGeometry.addInterest("set_removeGeometry__",this),this._geometry.addInterest("set_geometry__",this),this.set_geometry__()},getBBox:function(t,e){for(const e of this.geometryNodes)t.add(e.getBBox());return t},set_tessellationScale__:function(){const t=Math.max(0,this._tessellationScale.getValue());for(const e of this.geometryNodes)e.setTessellationScale(t)},set_addGeometry__:function(){this._addGeometry.setTainted(!0),this._addGeometry.erase(be(this._addGeometry,0,this._addGeometry.length,this._geometry,0,this._geometry.length),this._addGeometry.length);for(const t of this._addGeometry)this._geometry.push(t);this._addGeometry.length=0,this._addGeometry.setTainted(!1)},set_removeGeometry__:function(){this._removeGeometry.setTainted(!0),this._geometry.erase(be(this._geometry,0,this._geometry.length,this._removeGeometry,0,this._removeGeometry.length),this._geometry.length),this._removeGeometry.length=0,this._removeGeometry.setTainted(!1)},set_geometry__:function(){for(const t of this.geometryNodes)t.setTessellationScale(1);this.geometryNodes.length=0;for(const t of this._geometry){const e=f()(d().X3DNurbsSurfaceGeometryNode,t);e&&this.geometryNodes.push(e)}this.set_tessellationScale__()},dispose:function(){ye().prototype.dispose.call(this),Ht().prototype.dispose.call(this)}});const Ce=ve;_().set("x_ite/Components/NURBS/NurbsSet",Ce);const Ne=Ce,Se=window[Symbol.for("X_ITE.X3D-8.7.6")].require("standard/Math/Geometry/Line3");var Oe=t.n(Se);const De={isPointInTriangle:function(t,e,n,i){const o=(e.y-n.y)*(t.x-n.x)+(n.x-e.x)*(t.y-n.y);if(0==o)return!1;const s=((e.y-n.y)*(i.x-n.x)+(n.x-e.x)*(i.y-n.y))/o;if(s<0||s>1)return!1;const r=((n.y-t.y)*(i.x-n.x)+(t.x-n.x)*(i.y-n.y))/o;if(r<0||r>1)return!1;const u=1-s-r;return!(u<0||u>1)}};_().set("standard/Math/Geometry/Triangle2",De);const Pe=De;function Te(t){Ht().call(this,t),this.addType(d().NurbsSurfaceInterpolator),this.geometry=new de(t)}Te.prototype=Object.assign(Object.create(Ht().prototype),{constructor:Te,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFVec2f)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"normal_changed",new(o().SFVec3f)),new(r())(d().outputOnly,"position_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsSurfaceInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){this._set_fraction.addInterest("set_fraction__",this),this._uOrder.addFieldInterest(this.geometry._uOrder),this._vOrder.addFieldInterest(this.geometry._vOrder),this._uDimension.addFieldInterest(this.geometry._uDimension),this._vDimension.addFieldInterest(this.geometry._vDimension),this._uKnot.addFieldInterest(this.geometry._uKnot),this._vKnot.addFieldInterest(this.geometry._vKnot),this._weight.addFieldInterest(this.geometry._weight),this._controlPoint.addFieldInterest(this.geometry._controlPoint),this.geometry._uTessellation=128,this.geometry._vTessellation=128,this.geometry._uOrder=this._uOrder,this.geometry._vOrder=this._vOrder,this.geometry._uDimension=this._uDimension,this.geometry._vDimension=this._vDimension,this.geometry._uKnot=this._uKnot,this.geometry._vKnot=this._vKnot,this.geometry._weight=this._weight,this.geometry._controlPoint=this._controlPoint,this.geometry.setup()},set_fraction__:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0),i=new(O())(0,0,0),o=new(Oe())(O().Zero,O().zAxis),s={};return function(){const r=this._set_fraction.getValue(),u=this.geometry.getTexCoords(),l=this.geometry.getNormals(),a=this.geometry.getVertices();for(let h=0,c=0,d=u.length;h<d;h+=12,c+=9)if(t.set(u[h+0],u[h+1],0),e.set(u[h+4],u[h+5],0),n.set(u[h+7],u[h+9],0),Pe.isPointInTriangle(t,e,n,r)&&(o.set(i.set(r.x,r.y,0),O().zAxis),o.intersectsTriangle(t,e,n,s))){const t=s.u,e=s.v,n=s.t,i=new(O())(n*l[c+0]+t*l[c+3]+e*l[c+6],n*l[c+1]+t*l[c+4]+e*l[c+7],n*l[c+2]+t*l[c+5]+e*l[c+8]),o=new(O())(n*a[h+0]+t*a[h+4]+e*a[h+8],n*a[h+1]+t*a[h+5]+e*a[h+9],n*a[h+2]+t*a[h+6]+e*a[h+10]);this._normal_changed=i,this._position_changed=o}}}()});const Fe=Te;_().set("x_ite/Components/NURBS/NurbsSurfaceInterpolator",Fe);const Ie=Fe,Re=window[Symbol.for("X_ITE.X3D-8.7.6")].require("x_ite/Components/Geometry3D/Extrusion");var Ve=t.n(Re);function xe(t){U.call(this,t),this.addType(d().NurbsSweptSurface),this.extrusion=new(Ve())(t)}xe.prototype=Object.assign(Object.create(U.prototype),{constructor:xe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(d().inputOutput,"crossSectionCurve",new(o().SFNode)),new(r())(d().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSweptSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._crossSectionCurve.addInterest("set_crossSectionCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_crossSectionCurve__(),this.set_trajectoryCurve__()},set_crossSectionCurve__:function(){this.crossSectionCurveNode&&this.crossSectionCurveNode.removeInterest("requestRebuild",this),this.crossSectionCurveNode=f()(d().X3DNurbsControlCurveNode,this._crossSectionCurve),this.crossSectionCurveNode&&this.crossSectionCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(d().NurbsCurve,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.addInterest("requestRebuild",this)},build:function(){if(!this.crossSectionCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.crossSectionCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(0),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const ze=xe;_().set("x_ite/Components/NURBS/NurbsSweptSurface",ze);const je=ze;function ke(t){U.call(this,t),this.addType(d().NurbsSwungSurface),this.extrusion=new(Ve())(t)}ke.prototype=Object.assign(Object.create(U.prototype),{constructor:ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(d().inputOutput,"profileCurve",new(o().SFNode)),new(r())(d().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSwungSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._profileCurve.addInterest("set_profileCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_profileCurve__(),this.set_trajectoryCurve__()},set_profileCurve__:function(){this.profileCurveNode&&this.profileCurveNode.removeInterest("requestRebuild",this),this.profileCurveNode=f()(d().X3DNurbsControlCurveNode,this._profileCurve),this.profileCurveNode&&this.profileCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(d().X3DNurbsControlCurveNode,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode.addInterest("requestRebuild",this)},build:function(){if(!this.profileCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.profileCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(1),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const Ae=ke;_().set("x_ite/Components/NURBS/NurbsSwungSurface",Ae);const Xe=Ae;function Be(t){h().call(this,t),this.addType(d().NurbsTextureCoordinate),this.controlPoints=[]}Be.prototype=Object.assign(Object.create(h().prototype),{constructor:Be,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2f))]),getTypeName:function(){return"NurbsTextureCoordinate"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"texCoord"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){h().prototype.initialize.call(this)},getControlPoints:function(t){const e=this._controlPoint.getValue(),n=this.controlPoints;for(let i=0,o=this._uDimension.getValue();i<o;++i){let s=n[i];s||(s=n[i]=[]);for(let n=0,r=this._vDimension.getValue();n<r;++n){const r=n*o+i,u=s[n]||new(B()),l=2*r;s[n]=u.set(e[l],e[l+1],0,t?t[r]:1)}}return n},isValid:function(){return!(this._uOrder.getValue()<2)&&(!(this._vOrder.getValue()<2)&&(!(this._uDimension.getValue()<this._uOrder.getValue())&&(!(this._vDimension.getValue()<this._vOrder.getValue())&&this._controlPoint.length===this._uDimension.getValue()*this._vDimension.getValue())))}});const Ee=Be;_().set("x_ite/Components/NURBS/NurbsTextureCoordinate",Ee);const qe=Ee;function Ke(t){ae.call(this,t),this.addType(d().NurbsTrimmedSurface),this.trimmingContourNodes=[]}function Me(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}Ke.prototype=Object.assign(Object.create(ae.prototype),{constructor:Ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(d().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"uClosed",new(o().SFBool)),new(r())(d().initializeOnly,"vClosed",new(o().SFBool)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"texCoord",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().inputOnly,"addTrimmingContour",new(o().MFNode)),new(r())(d().inputOnly,"removeTrimmingContour",new(o().MFNode)),new(r())(d().inputOutput,"trimmingContour",new(o().MFNode))]),getTypeName:function(){return"NurbsTrimmedSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){ae.prototype.initialize.call(this),this._addTrimmingContour.addInterest("set_addTrimmingContour__",this),this._removeTrimmingContour.addInterest("set_removeTrimmingContour__",this),this._trimmingContour.addInterest("set_trimmingContour__",this),this.set_trimmingContour__()},set_addTrimmingContour__:function(){this._addTrimmingContour.setTainted(!0),this._addTrimmingContour.erase(Me(this._addTrimmingContour,0,this._addTrimmingContour.length,this._trimmingContour,0,this._trimmingContour.length),this._addTrimmingContour.length);for(const t of this._addTrimmingContour)this._trimmingContour.push(t);this._addTrimmingContour.length=0,this._addTrimmingContour.setTainted(!1)},set_removeTrimmingContour__:function(){this._removeTrimmingContour.setTainted(!0),this._trimmingContour.erase(Me(this._trimmingContour,0,this._trimmingContour.length,this._removeTrimmingContour,0,this._removeTrimmingContour.length),this._trimmingContour.length),this._removeTrimmingContour.length=0,this._removeTrimmingContour.setTainted(!1)},set_trimmingContour__:function(){const t=this.trimmingContourNodes;t.length=0;for(const e of this._trimmingContour){const n=f()(d().Contour2D,e);n&&t.push(n)}},getTrimmingContours:function(){const t=this.trimmingContourNodes,e=[];for(const n of t)n.addTrimmingContour(e);return e}});const Ue=Ke;_().set("x_ite/Components/NURBS/NurbsTrimmedSurface",Ue);const Ge=Ue;n().addComponent({name:"NURBS",types:{Contour2D:v,ContourPolyline2D:T,CoordinateDouble:x,NurbsCurve:Wt,NurbsCurve2D:Lt,NurbsOrientationInterpolator:oe,NurbsPatchSurface:de,NurbsPositionInterpolator:me,NurbsSet:Ne,NurbsSurfaceInterpolator:Ie,NurbsSweptSurface:je,NurbsSwungSurface:Xe,NurbsTextureCoordinate:qe,NurbsTrimmedSurface:Ge},abstractTypes:{X3DNurbsControlCurveNode:N,X3DNurbsSurfaceGeometryNode:ae,X3DParametricGeometryNode:U}});const We=void 0;_().set("assets/components/NURBS",We)})();