pacem 0.40.0-gerrha → 0.40.0-heliopolis

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 (56) hide show
  1. package/dist/css/pacem-dark-content.min.css +1 -1
  2. package/dist/css/pacem-dark-shell.min.css +1 -1
  3. package/dist/css/pacem-dark.min.css +1 -1
  4. package/dist/css/pacem-light-content.min.css +1 -1
  5. package/dist/css/pacem-light-shell.min.css +1 -1
  6. package/dist/css/pacem-light.min.css +1 -1
  7. package/dist/css/pacem-phousys-content.min.css +1 -1
  8. package/dist/css/pacem-phousys-shell.min.css +1 -1
  9. package/dist/css/pacem-phousys.min.css +1 -1
  10. package/dist/js/azure-maps.d.ts +1 -1
  11. package/dist/js/pacem-2d.d.ts +1 -1
  12. package/dist/js/pacem-2d.js +1 -1
  13. package/dist/js/pacem-2d.min.js +1 -1
  14. package/dist/js/pacem-3d.d.ts +6 -1
  15. package/dist/js/pacem-3d.js +11 -1
  16. package/dist/js/pacem-3d.min.js +2 -2
  17. package/dist/js/pacem-charts.d.ts +1 -1
  18. package/dist/js/pacem-charts.js +1 -1
  19. package/dist/js/pacem-charts.min.js +1 -1
  20. package/dist/js/pacem-cms.d.ts +1 -1
  21. package/dist/js/pacem-cms.js +1 -1
  22. package/dist/js/pacem-cms.min.js +1 -1
  23. package/dist/js/pacem-core.d.ts +1 -1
  24. package/dist/js/pacem-core.js +1 -1
  25. package/dist/js/pacem-core.min.js +1 -1
  26. package/dist/js/pacem-foundation.d.ts +1 -1
  27. package/dist/js/pacem-foundation.js +1 -1
  28. package/dist/js/pacem-foundation.min.js +1 -1
  29. package/dist/js/pacem-fx.d.ts +1 -1
  30. package/dist/js/pacem-fx.js +1 -1
  31. package/dist/js/pacem-fx.min.js +1 -1
  32. package/dist/js/pacem-logging.d.ts +1 -1
  33. package/dist/js/pacem-logging.js +1 -1
  34. package/dist/js/pacem-logging.min.js +1 -1
  35. package/dist/js/pacem-maps.d.ts +1 -1
  36. package/dist/js/pacem-maps.js +1 -1
  37. package/dist/js/pacem-maps.min.js +1 -1
  38. package/dist/js/pacem-media.d.ts +1 -1
  39. package/dist/js/pacem-media.js +1 -1
  40. package/dist/js/pacem-media.min.js +1 -1
  41. package/dist/js/pacem-networking.js +1 -1
  42. package/dist/js/pacem-networking.min.js +1 -1
  43. package/dist/js/pacem-numerical.d.ts +1 -1
  44. package/dist/js/pacem-numerical.js +1 -1
  45. package/dist/js/pacem-numerical.min.js +1 -1
  46. package/dist/js/pacem-plus.d.ts +1 -1
  47. package/dist/js/pacem-plus.js +1 -1
  48. package/dist/js/pacem-plus.min.js +1 -1
  49. package/dist/js/pacem-scaffolding.d.ts +1 -1
  50. package/dist/js/pacem-scaffolding.js +1 -1
  51. package/dist/js/pacem-scaffolding.min.js +1 -1
  52. package/dist/js/pacem-ui.d.ts +1 -1
  53. package/dist/js/pacem-ui.js +1 -1
  54. package/dist/js/pacem-ui.min.js +1 -1
  55. package/dist/js/swagger-types.d.ts +1 -1
  56. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -205,6 +205,10 @@ declare namespace Pacem.Components.Drawing3D {
205
205
  * When implemented in a derived class, renders the scene.
206
206
  */
207
207
  abstract render(): void;
208
+ /**
209
+ * Processes the stage content and returns an image accordingly.
210
+ * */
211
+ abstract snapshot(scene: Pacem3DElement, bgColor?: string): PromiseLike<Blob>;
208
212
  /**
209
213
  * When implemented in a derived class, retrieves the element casting the ray through the provided point (if any).
210
214
  * @param point {Object} 2D to check.
@@ -341,6 +345,7 @@ declare namespace Pacem.Components.Drawing3D {
341
345
  declare namespace Pacem.Components.Drawing3D {
342
346
  class Pacem3DThreeAdapterElement extends Pacem3DAdapterElement {
343
347
  dispose(scene: Pacem3DElement): void;
348
+ snapshot(scene: Pacem3DElement, background?: string): PromiseLike<Blob>;
344
349
  project(point3D: Pacem.Drawing3D.Vector3D): Point;
345
350
  zoomFit(...items: Pacem.Drawing3D.Ui3DObject[]): Promise<void>;
346
351
  private _3d;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1266,6 +1266,16 @@ var Pacem;
1266
1266
  dispose(scene) {
1267
1267
  // do nothing
1268
1268
  }
1269
+ snapshot(scene, background) {
1270
+ if (scene != this._3d) {
1271
+ return Promise.resolve(null);
1272
+ }
1273
+ const jpeg = !Pacem.Utils.isNullOrEmpty(background), mime = jpeg ? 'image/jpeg' : null, quality = jpeg ? .9 : null;
1274
+ return new Promise((resolve, _) => {
1275
+ this.render();
1276
+ Pacem.Utils.snapshotElement(this._stage, background, mime, quality).then(resolve);
1277
+ });
1278
+ }
1269
1279
  project(point3D) {
1270
1280
  // check feasibility
1271
1281
  if (Pacem.Utils.isNull(this._camera) || Pacem.Utils.isNull(this._stage))
@@ -1,6 +1,6 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
6
- var Pacem,__decorate=this&&this.__decorate||function(e,t,r,a){var i,n=arguments.length,o=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,a);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n<3?i(o):n>3?i(t,r,o):i(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,r):i?i.value=r:t.set(e,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},__awaiter=this&&this.__awaiter||function(e,t,r,a){return new(r||(r=Promise))((function(i,n){function o(e){try{c(a.next(e))}catch(e){n(e)}}function s(e){try{c(a.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))};!function(e){!function(t){t.Point3DConverter={convert:t=>e.Geometry.LinearAlgebra.Vector3D.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0}`},t.QuaternionConverter={convert:t=>e.Geometry.LinearAlgebra.Quaternion.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0} ${e.w||0}`}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(e){!function(e){e.Pacem3DDetector=class Pacem3DDetector{constructor(){this._detected={supported:!1,info:{}};let e,t=document.createElement("canvas"),r=["webgl","experimental-webgl","moz-webgl","webkit-3d"],a=function(t){if(t)return e.getParameter(t)},i=(e,t,r)=>{let a=this._detected;(a.info[e]=a.info[e]||{})[t=(t=t.replace(/[^\w]+/g,"")).substring(0,1).toLowerCase()+t.substring(1)]=r};if(navigator.userAgent.indexOf("MSIE")>=0)try{e=window.WebGLHelper.CreateGLContext(t,"canvas")}catch(e){}else for(var n=0;n<r.length;n++)try{if(e=t.getContext(r[n]),e){i("main","Context Name",r[n]);break}}catch(e){}this._detected.supported=!!e,i("main","Platform",navigator.platform),i("main","Agent",navigator.userAgent),e&&(i("main","Vendor",a(e.VENDOR)),i("main","Version",a(e.VERSION)),i("main","Renderer",a(e.RENDERER)),i("main","Shading Language Version",a(e.SHADING_LANGUAGE_VERSION)),i("bits","Rgba Bits",a(e.RED_BITS)+", "+a(e.GREEN_BITS)+", "+a(e.BLUE_BITS)+", "+a(e.ALPHA_BITS)),i("bits","Depth Bits",a(e.DEPTH_BITS)),i("shader","Max Vertex Attribs",a(e.MAX_VERTEX_ATTRIBS)),i("shader","Max Vertex Texture Image Units",a(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),i("shader","Max Varying Vectors",a(e.MAX_VARYING_VECTORS)),i("shader","Max Uniform Vectors",a(e.MAX_VERTEX_UNIFORM_VECTORS)),i("tex","Max Combined Texture Image Units",a(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),i("tex","Max Texture Size",a(e.MAX_TEXTURE_SIZE)),i("tex","Max Cube Map Texture Size",a(e.MAX_CUBE_MAP_TEXTURE_SIZE)),i("tex","Num. Compressed Texture Formats",a(e.COMPRESSED_TEXTURE_FORMATS)),i("misc","Max Render Buffer Size",a(e.MAX_RENDERBUFFER_SIZE)),i("misc","Max Viewport Dimensions",a(e.MAX_VIEWPORT_DIMS)),i("misc","Aliased Line Width Range",a(e.ALIASED_LINE_WIDTH_RANGE)),i("misc","Aliased Point Size Range",a(e.ALIASED_POINT_SIZE_RANGE)),i("misc","Supported Extensions",e.getSupportedExtensions()||[]))}get info(){return this._detected.info}get supported(){return this._detected.supported}}}(e.Drawing3D||(e.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class NodeGeometry{constructor(e=[]){this.positions=e}barycenter(){const t=this.positions;var r={x:0,y:0,z:0};if(!e.Utils.isNullOrEmpty(t)){for(var a=t.length,i=0;i<t.length;i++){var n=t[i];r.x+=n.x,r.y+=n.y,r.z+=n.z}var o=1*a;r.x/=o,r.y/=o,r.z/=o}return r}boundingBox(){const t=this.positions,r={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};if(!e.Utils.isNullOrEmpty(t))for(var a=0;a<t.length;a++){var i=t[a];r.minX=Math.min(r.minX,i.x),r.minY=Math.min(r.minY,i.y),r.minZ=Math.min(r.minZ,i.z),r.maxX=Math.max(r.maxX,i.x),r.maxY=Math.max(r.maxY,i.y),r.maxZ=Math.max(r.maxZ,i.z)}return r}}t.NodeGeometry=NodeGeometry;t.LineGeometry=class LineGeometry extends NodeGeometry{};t.MeshGeometry=class MeshGeometry extends NodeGeometry{constructor(e,t,r=[],a=[]){super(e),this.triangleIndices=t,this.textureCoordinates=r,this.normals=a}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){var r;function a(t){return!e.Utils.isNull(t)&&"render"in t&&"function"==typeof t.render}function i(t){return!e.Utils.isNull(t)&&"stage"in t&&a(t.stage)}function n(e){return"transformMatrix"in e&&i(e)}t.isStage=a,t.isRenderable=i,t.isUi3DObject=n,t.isMesh=function(e){return n(e)&&"geometry"in e},t.isGroup=function(t){return n(t)&&"items"in t&&!e.Utils.isNullOrEmpty(t.items)},t.computeSharpVertexNormals=function(t){const r=[];if(!e.Utils.isNullOrEmpty(t)){const a=t.triangleIndices;if(a.length%3!=0)throw new RangeError(`Invalid mesh geometry: ${a.length} is not multiple of 3.`);for(let i=2;i<a.length;i+=3){const n=a[i-2],o=a[i-1],s=a[i],c=t.positions[n],l=t.positions[o],m=t.positions[s],h=e.Geometry.LinearAlgebra.Vector3D.subtract(c,l),p=e.Geometry.LinearAlgebra.Vector3D.subtract(c,m),d=e.Geometry.LinearAlgebra.Vector3D.cross(p,h),u=e.Geometry.LinearAlgebra.Vector3D.unit(d);r.push(u,u,u)}}t.normals=r};class UI3DEvent extends e.CustomUIEvent{constructor(e,t,a,i){super(e,t,a),r.set(this,void 0),__classPrivateFieldSet(this,r,i,"f")}get point(){return __classPrivateFieldGet(this,r,"f")}}r=new WeakMap,t.UI3DEvent=UI3DEvent;t.DragEvent=class DragEvent extends UI3DEvent{};t.RenderableEvent=class RenderableEvent extends UI3DEvent{constructor(e,t,r,a){super(e,{detail:t,bubbles:!0,cancelable:!0},r,a)}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;r.TAG_MIDDLE_NAME="3d",r.DEG2RAD=Math.PI/180;const i={OBJECT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-object",LIGHT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-light",CAMERA_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-camera",LINE_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-line",MESH_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-mesh",GROUP_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-group",DEFAULT_COORDS:{x:0,y:0,z:0}};let n;!function(e){e.Position="position",e.Transform="transform",e.Geometry="geometry",e.Children="children",e.Material="material",e.Light="light",e.Camera="camera"}(n=r.StalePropertyFlag||(r.StalePropertyFlag={}));class RenderableElement extends t.PacemCrossItemsContainerElement{constructor(){super(...arguments),a.set(this,[]),this.position=i.DEFAULT_COORDS}validate(e){return!1}findContainer(){return this.parent||this.stage}get stage(){return this._scene=this._scene||e.CustomElementUtils.findAncestorOfType(this,r.Pacem3DElement)}get parent(){return this._drawableParent=this._drawableParent||e.CustomElementUtils.findAncestor(this,(e=>e instanceof RenderableElement))}get flags(){return __classPrivateFieldGet(this,a,"f")}disconnectedCallback(){delete this._scene,delete this._drawableParent,super.disconnectedCallback()}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"hide":this.setAsDirty();break;case"items":this.setAsDirty(n.Children);break;case"position":this.setAsDirty(n.Position)}}setAsDirty(...e){var t;for(let t of e)this.flags.includes(t)||this.flags.push(t);null===(t=this.stage)||void 0===t||t.render(this)}}a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],RenderableElement.prototype,"position",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],RenderableElement.prototype,"tag",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],RenderableElement.prototype,"inert",void 0),r.RenderableElement=RenderableElement;class Ui3DElement extends RenderableElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"transformMatrix":this.setAsDirty(n.Transform);break;case"rotate":case"scaleX":case"scaleY":case"translateX":case"translateY":this._computeTransformMatrix()}}_computeTransformMatrix(){const t=e.Utils.isNull(this.rotate)?e.Geometry.LinearAlgebra.Matrix3D.identity():e.Geometry.LinearAlgebra.Quaternion.toRotationMatrix(this.rotate);this.translateX&&(t.offsetX=this.translateX),this.translateY&&(t.offsetY=this.translateY),this.translateZ&&(t.offsetZ=this.translateZ),this.scaleX&&(t.m11=this.scaleX),this.scaleY&&(t.m22=this.scaleY),this.scaleZ&&(t.m33=this.scaleZ),this.transformMatrix=t}}__decorate([e.Watch({emit:!1,converter:e.Drawing3D.QuaternionConverter})],Ui3DElement.prototype,"rotate",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleZ",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateZ",void 0),__decorate([e.Watch({emit:!1})],Ui3DElement.prototype,"transformMatrix",void 0),r.Ui3DElement=Ui3DElement;let o=class Pacem3DGroupElement extends Ui3DElement{validate(e){return e instanceof RenderableElement}};o=__decorate([e.CustomElement({tagName:i.GROUP_SELECTOR})],o),r.Pacem3DGroupElement=o;let s=class Pacem3DMeshElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"geometry":this.setAsDirty(n.Geometry);break;case"material":case"backMaterial":this.setAsDirty(n.Material)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],s.prototype,"geometry",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],s.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],s.prototype,"backMaterial",void 0),s=__decorate([e.CustomElement({tagName:i.MESH_SELECTOR})],s),r.Pacem3DMeshElement=s;let c=class Pacem3DObjectElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"content"!==e&&"type"!==e||this.setAsDirty(n.Geometry,n.Material)}};__decorate([e.Watch({emit:!1})],c.prototype,"content",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],c.prototype,"type",void 0),c=__decorate([e.CustomElement({tagName:i.OBJECT_SELECTOR})],c),r.Pacem3DObjectElement=c;let l=class Pacem3DLightElement extends RenderableElement{constructor(){super(...arguments),this.intensity=.25,this.target=i.DEFAULT_COORDS,this.color="#fff",this.type="omni"}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"type":case"color":case"intensity":case"target":this.setAsDirty(n.Light)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],l.prototype,"intensity",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],l.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"type",void 0),l=__decorate([e.CustomElement({tagName:i.LIGHT_SELECTOR})],l),r.Pacem3DLightElement=l;let m=class Pacem3DCameraElement extends RenderableElement{constructor(){super(...arguments),this.fov=45,this.aspect=1.78,this.near=.1,this.far=1e3,this.type="perspective",this.lookAt=i.DEFAULT_COORDS}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"fov":case"aspect":case"near":case"far":case"type":case"lookAt":this.setAsDirty(n.Camera)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"fov",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"aspect",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"near",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"far",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],m.prototype,"type",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],m.prototype,"lookAt",void 0),m=__decorate([e.CustomElement({tagName:i.CAMERA_SELECTOR})],m),r.Pacem3DCameraElement=m;class Pacem3DAdapterElement extends t.PacemEventTarget{}r.Pacem3DAdapterElement=Pacem3DAdapterElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;let i=class Pacem3DElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._addHandler=e=>{this._add(e.target)},this._clickHandler=t=>{let r=this;if(!r.interactive||e.Utils.isNull(r._lastHitResult))return;const a=t.type.replace(/^mouse/,""),i=r._lastHitResult,n=i.object,o=i.point;this._itemDispatch(n,o,a,t)},this._moveHandler=t=>{var r,a;let i=this;if(!i.adapter||!i.interactive)return;const n=i._resizer.currentSize;let o=i.adapter.raycast({x:t.pageX-n.left,y:t.pageY-n.top},n);if(o!=i._lastHitResult){if((null==o?void 0:o.object)!=(null===(r=i._lastHitResult)||void 0===r?void 0:r.object)){const r=null==o?void 0:o.object,n=null===(a=i._lastHitResult)||void 0===a?void 0:a.object,s=null==o?void 0:o.point;e.Utils.isNull(n)||this._itemDispatch(n,s,"out",t),e.Utils.isNull(r)||this._itemDispatch(r,s,"over",t)}i._lastHitResult=o}},a.set(this,void 0),this._resizeHandler=r=>{const i=__classPrivateFieldSet(this,a,r.detail,"f"),n=this.adapter;e.Utils.isNull(n)||(this.adapter.invalidateSize(i),this.dispatchEvent(new t.ResizeEvent(i)))}}validate(e){return e instanceof r.RenderableElement}get stage(){return this._container}get scene(){return this.adapter&&this.adapter.scene}register(t){const r=super.register(t);return r&&(this._add(t),t.addEventListener(e.PropertyChangeEventName,this._addHandler,!1)),r}unregister(t){const r=super.unregister(t);return r&&(t.removeEventListener(e.PropertyChangeEventName,this._addHandler,!1),this._erase(t)),r}_add(e){this.adapter&&this.adapter.addItem(e)}_erase(e){this.adapter&&this.adapter.removeItem(e)}_initializeAdapter(t,r){return new Promise(((a,i)=>{e.Utils.isNull(t)||this.items.forEach((e=>t.removeItem(e))),e.Utils.isNull(this._container)||e.Utils.isNull(r)||r.initialize(this).then((e=>{this.items.forEach((e=>this._add(e)))}),(t=>{this.log(e.Logging.LogLevel.Error,null==t?void 0:t.toString())})),a()}))}propertyChangedCallback(t,r,a,i){super.propertyChangedCallback(t,r,a,i),e.Utils.isNull(this._container)||"adapter"!==t||i||this._initializeAdapter(r,a)}viewActivatedCallback(){super.viewActivatedCallback();const e=this._container,t=this._resizer;t.addEventListener("resize",this._resizeHandler,!1),t.target=e,this._initializeAdapter(null,this.adapter).then((t=>{e.addEventListener("mousemove",this._moveHandler,!1),e.addEventListener("click",this._clickHandler,!1),e.addEventListener("mouseup",this._clickHandler,!1),e.addEventListener("mousedown",this._clickHandler,!1),this.render()}))}_itemDispatch(t,r,a,i){if(!e.Utils.isNull(t)){var n,o,s;i instanceof Event?o=i:n={item:t,offset:i},"string"==typeof a?s=a:(s=a.type,o=a.originalEvent);const l=r,m=()=>i instanceof Event?new e.Drawing3D.RenderableEvent(s,t,o,l):new e.Drawing3D.DragEvent(s,{detail:n,cancelable:s===e.UI.DragDropEventType.Init||s===e.UI.DragDropEventType.Drag},o,l),h=i instanceof Event?new e.Drawing3D.RenderableEvent("item"+s,t,o,l):new e.Drawing3D.DragEvent("item"+s,{detail:n,cancelable:s===e.UI.DragDropEventType.Init||s===e.UI.DragDropEventType.Drag},o,l);var c=!1;if(t instanceof EventTarget){const e=m();t.dispatchEvent(e),c=e.defaultPrevented}return t.stage.dispatchEvent(h),c||h.defaultPrevented}return!1}disconnectedCallback(){const t=this._resizer,r=this._container;e.Utils.isNull(r)||(r.removeEventListener("click",this._clickHandler,!1),r.removeEventListener("mouseup",this._clickHandler,!1),r.removeEventListener("mousedown",this._clickHandler,!1),r.removeEventListener("mousemove",this._moveHandler,!1)),e.Utils.isNull(t)||t.removeEventListener("resize",this._resizeHandler,!1),super.disconnectedCallback()}get size(){return __classPrivateFieldGet(this,a,"f")}render(t,r){if(e.Utils.isNull(t)){if(requestAnimationFrame((()=>this.render())),!this.disabled&&!e.Utils.isNull(this.adapter)){let e=new CustomEvent("prerender",{detail:{scene:this.adapter.scene},cancelable:!0});this.dispatchEvent(e),e.defaultPrevented||(this.adapter.render(),this.dispatchEvent(new CustomEvent("render",{detail:{scene:this.adapter.scene}})))}}else{const r=this.adapter;e.Utils.isNull(r)||r.updateItem(t)}}};a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"interactive",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"orbit",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],i.prototype,"adapter",void 0),__decorate([e.ViewChild(`.${e.PCSS}-3d`)],i.prototype,"_container",void 0),__decorate([e.ViewChild(e.P+"-resize")],i.prototype,"_resizer",void 0),i=__decorate([e.CustomElement({tagName:e.P+"-"+r.TAG_MIDDLE_NAME,shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-resize watch-position="true"></${e.P}-resize><div class="${e.PCSS}-3d"></div><${e.P}-content></${e.P}-content>`})],i),r.Pacem3DElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(e){let t;function r(e){return"shader"in e}!function(e){e.Basic="basic",e.Lambert="lambert",e.Phong="phong",e.Standard="standard",e.Line="line"}(t=e.KnownShader||(e.KnownShader={})),e.isMaterial=r,e.isBasicMaterial=function(e){return r(e)&&e.shader===t.Basic},e.isLineMaterial=function(e){return r(e)&&e.shader===t.Line},e.isLambertMaterial=function(e){return r(e)&&e.shader===t.Lambert},e.isPhongMaterial=function(e){return r(e)&&e.shader===t.Phong},e.isStandardMaterial=function(e){return r(e)&&e.shader===t.Standard}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;class MaterialElement extends t.PacemEventTarget{constructor(e){super(),a.set(this,void 0),__classPrivateFieldSet(this,a,e,"f")}get shader(){return __classPrivateFieldGet(this,a,"f")}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"opacity":case"wireframe":case"color":case"visible":case"map":this.updateMaterial()}}viewActivatedCallback(){super.viewActivatedCallback(),this.updateMaterial()}updateMaterial(){this.material=this.createMaterial()}createMaterial(){var t,r,a;return{opacity:null!==(t=this.opacity)&&void 0!==t?t:1,wireframe:null!==(r=this.wireframe)&&void 0!==r&&r,color:this.color||e.Utils.Css.getVariableValue(`--${e.PCSS}-color-primary`),visible:null===(a=this.visible)||void 0===a||a,map:this.map,shader:this.shader}}}a=new WeakMap,__decorate([e.Watch()],MaterialElement.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],MaterialElement.prototype,"opacity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"wireframe",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"visible",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"map",void 0),r.MaterialElement=MaterialElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){function r(e){const t=[];for(let a of e)"x"in(r=a)&&"number"==typeof r.x&&"y"in r&&"number"==typeof r.y&&"z"in r&&"number"==typeof r.z?t.push(a.x,a.y,a.z):t.push(a.x,a.y);var r;return t}const a="0.152.2",i={VERSION:a,API_URI:`https://unpkg.com/three@${a}/build/three.min.js`,ORBIT_URI:"https://unpkg.com/three@0.147.0/examples/js/controls/OrbitControls.js",LOADERS:[],DEFAULT_MATERIAL:function(){return new THREE.MeshStandardMaterial({color:"#069",flatShading:!0})}};function n(t){var r,a,i,n,o,s,c;if(e.Utils.isNull(t))return null;const l={color:t.color,opacity:null!==(r=t.opacity)&&void 0!==r?r:1,transparent:!0,wireframe:null!==(a=t.wireframe)&&void 0!==a&&a,visible:null===(i=t.visible)||void 0===i||i},m=e.Utils.extend({},l,{wireframe:null!==(n=t.wireframe)&&void 0!==n&&n}),h=e=>(t.map&&(e.map=(new THREE.TextureLoader).load(t.map,(t=>{e.needsUpdate=!0}))),e);if(e.Drawing3D.isStandardMaterial(t)){return h(new THREE.MeshStandardMaterial(e.Utils.extend(m,{roughness:t.roughness,metalness:t.metalness,emissive:t.emissiveColor,flatShading:t.flatShading,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isPhongMaterial(t)){return h(new THREE.MeshPhongMaterial(e.Utils.extend(m,{shininess:t.shininess,emissive:t.emissiveColor,flatShading:t.flatShading,specular:t.specularColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLambertMaterial(t)){return h(new THREE.MeshLambertMaterial(e.Utils.extend(m,{emissive:t.emissiveColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLineMaterial(t)){const r=t.dashArray&&t.dashArray[0]||null,a=t.dashArray&&t.dashArray.length>1&&t.dashArray[1]||r,i=e.Utils.extend(l,{linecap:null!==(o=t.lineCap)&&void 0!==o?o:"round",linejoin:null!==(s=t.lineJoin)&&void 0!==s?s:"round",linewidth:null!==(c=t.lineWidth)&&void 0!==c?c:1});return e.Utils.isNullOrEmpty(t.dashArray)?new THREE.LineBasicMaterial(i):new THREE.LineDashedMaterial(e.Utils.extend({dashSize:r,gapSize:a},i))}if(e.Drawing3D.isMaterial(t)){return h(new THREE.MeshBasicMaterial(m))}return null}function o(t){var r;if(e.Utils.isNullOrEmpty(t.content))throw new Error("Missing content.");if("obj"===(null===(r=t.type)||void 0===r?void 0:r.toLowerCase())){return(new THREE.OBJLoader).parse(t.content)}return(new THREE.ObjectLoader).parse(t.content)}function s(t){if(e.Utils.isNullOrEmpty(t.geometry))return null;return new(t.geometry instanceof e.Drawing3D.LineGeometry?THREE.Line:THREE.Mesh)}function c(){return"THREE"in window}let l=class Pacem3DThreeAdapterElement extends t.Pacem3DAdapterElement{constructor(){super(...arguments),this._renderer=null,this._camera=null,this._scene=null,this._orbitCtrls=null,this._objects=new WeakMap,this._dict={},this._orbitControlsDelegate=e=>{},this._ensureAndRefresh=(a,c,l)=>{if(c.matrixAutoUpdate=!1,c.visible=!a.hide){if(e.Drawing3D.isMesh(a)){let o=c;if(a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0){o.geometry.dispose();const t=s(a);t.constructor.name!==o.constructor.name&&(l.remove(c),delete this._dict[c.id],c=o=t),o.geometry=function(t){const a=new THREE.BufferGeometry,i=r(t.positions);if(a.setAttribute("position",new THREE.Float32BufferAttribute(i,3)),t instanceof e.Drawing3D.MeshGeometry){e.Utils.isNullOrEmpty(t.triangleIndices)||a.setIndex(t.triangleIndices);const i=r(t.positions);a.setAttribute("position",new THREE.Float32BufferAttribute(i,3));const n=r(t.textureCoordinates);if(a.setAttribute("uv",new THREE.Float32BufferAttribute(n,2)),e.Utils.isNullOrEmpty(t.normals))a.computeVertexNormals();else{const e=r(t.normals);a.setAttribute("normal",new THREE.Float32BufferAttribute(e,3))}}return a}(a.geometry)}if(a.flags.indexOf(t.StalePropertyFlag.Material)>=0){if(e.Utils.isArray(o.material))for(let e of o.material)e.dispose();else o.material.dispose();o.material=function(t,r,a){const i=a,o=[],s=n(t);if(e.Utils.isNull(s)||(s.side=THREE.FrontSide,o.push(s)),!e.Utils.isNull(r))if(r==t)s.side=THREE.DoubleSide;else{const t=n(r);e.Utils.isNull(t)||(t.side=THREE.BackSide,o.push(t))}return i&&o.length>1?o:s}(a.material)||i.DEFAULT_MATERIAL()}}else if(a instanceof t.Pacem3DObjectElement&&(a.flags.indexOf(t.StalePropertyFlag.Material)>=0||a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0))c.parent&&c.parent.remove(c),c=o(a);else if(a instanceof t.Pacem3DGroupElement){if(a.flags.indexOf(t.StalePropertyFlag.Children)>=0){for(let e=c.children.length-1;e>=0;e--){const t=c.children[e];c.remove(t)}for(let e of a.items)this._addOrUpdateItem(e,c)}}else if(a instanceof t.Pacem3DLightElement){const e=c;a.flags.indexOf(t.StalePropertyFlag.Light)>=0&&(e.color=new THREE.Color(a.color),e.intensity=a.intensity)}let h=a.position;if(e.Drawing3D.isUi3DObject(a)&&!e.Utils.isNull(a.transformMatrix)&&(a.flags.indexOf(t.StalePropertyFlag.Position)>=0||a.flags.indexOf(t.StalePropertyFlag.Transform)>=0)){const t=e.Geometry.LinearAlgebra.Matrix3D.from(1,0,0,0,0,1,0,0,0,0,1,0,h.x,h.y,h.z,1),r=e.Geometry.LinearAlgebra.Matrix3D.multiply(a.transformMatrix,t);THREE.Matrix4.prototype.set.apply(c.matrix,[(m=r).m11,m.m21,m.m31,m.offsetX,m.m12,m.m22,m.m32,m.offsetY,m.m13,m.m23,m.m33,m.offsetZ,m.m14,m.m24,m.m34,m.m44])}else a.flags.indexOf(t.StalePropertyFlag.Position)>=0&&(c.position.set(h.x,h.y,h.z),c.updateMatrix())}var m;return c.userData=a.tag,e.Utils.isNull(l.getObjectById(c.id))&&(l.add(c),this._dict[c.id]=a),a.flags.splice(0),c}}dispose(e){}project(t){if(e.Utils.isNull(this._camera)||e.Utils.isNull(this._stage))return null;const r=new THREE.Vector3(t.x,t.y,t.z),a=this._stage.width/2,i=this._stage.height/2,n=r.project(this._camera);return{x:n.x*a+a,y:-n.y*i+i}}zoomFit(...t){return new Promise(((r,a)=>{const i=this._camera,n=this._objects,o=t.filter((e=>n.has(e))).map((e=>n.get(e)));(e.Utils.isNull(i)||e.Utils.isNullOrEmpty(o))&&r(),function(t,r,a,i=1.333){const n=new THREE.Box3;for(const e of a)n.expandByObject(e);const o=n.getSize(new THREE.Vector3),s=n.getCenter(new THREE.Vector3),c=Math.max(o.x,o.y,o.z)/(2*Math.atan(Math.PI*t.fov/360)),l=c/t.aspect,m=i*Math.max(c,l),h=!e.Utils.isNull(r);var p;h&&(p=r.target.clone().sub(t.position).normalize().multiplyScalar(m),r.maxDistance=10*m,r.target.copy(s)),t.near=m/100,t.far=100*m,t.updateProjectionMatrix(),h&&(t.position.copy(r.target).sub(p),r.update())}(i,this._orbitCtrls,o),r()}))}get scene(){return this._scene}raycast(t,r){if(c()&&!e.Utils.isNull(this._camera)){const e=this._camera,a=new THREE.Vector2(t.x/r.width*2-1,-t.y/r.height*2+1),i=new THREE.Raycaster;i.setFromCamera(a,e);const n=i.intersectObjects(this._scene.children,!0);let o,s,c=0;for(;n.length>c&&(s=n[c++])&&(o=s.object);){if(this._dict[o.id].inert)continue;const e=s.point,t={x:e.x,y:e.y,z:e.z};return{object:this._dict[o.id],point:t}}}return null}initialize(t){return __awaiter(this,void 0,void 0,(function*(){if(!e.Utils.isNull(this._stage))return this._stage;this._3d=t;const r=t.stage,a=this._stage=document.createElement("canvas");r.innerHTML="",r.appendChild(a),yield e.CustomElementUtils.importjs(i.API_URI),yield function(...e){return __awaiter(this,void 0,void 0,(function*(){const t=Date.now();var r=!1;do{r=c();for(let t of e)r&&(r=t());r||(yield new Promise((e=>setTimeout(e,500))))}while(!r&&Date.now()-t<3e4);if(!r)throw new Error("The wait for THREE adapter initialization timed out.")}))}(),yield Promise.all([e.CustomElementUtils.importjs(i.ORBIT_URI)].concat(i.LOADERS.map((t=>e.CustomElementUtils.importjs(t))))),this._scene=new THREE.Scene,this.invalidateSize(t.size);let n=this._stage.width,o=this._stage.height,s={canvas:a,antialias:!0,stencil:!1,alpha:!0};return this._renderer=new THREE.WebGLRenderer(s),this._renderer.setSize(n,o),this.orbit=t.orbit,a}))}_setCamera(e){this._camera=e,this.invalidateSize(this._3d.size),this._disposeOrbitControls(),this.orbit&&this._initOrbitControls()}propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"orbit"===e&&(!0===r?this._initOrbitControls():this._disposeOrbitControls())}_initOrbitControls(){const t=this._camera;if(e.Utils.isNull(this._3d)||e.Utils.isNull(t))return;(this._orbitCtrls=new THREE.OrbitControls(t,this._3d.stage)).addEventListener("change",this._orbitControlsDelegate)}_disposeOrbitControls(){const t=this._orbitCtrls;e.Utils.isNull(t)||(t.removeEventListener("change",this._orbitControlsDelegate),t.dispose())}invalidateSize(t){if(!c()||e.Utils.isNull(t))return;let r=t.width,a=t.height;this._stage.width=r,this._stage.height=a;let i=this._camera;i instanceof THREE.PerspectiveCamera&&(i.aspect=r/a,i.updateProjectionMatrix()),this._renderer&&this._renderer.setSize(r,a)}removeItem(t){const r=this._objects,a=r.get(t);e.Utils.isNull(a)||(this._scene.remove(a),delete this._dict[a.id],r.delete(t))}updateItem(e){this._addOrUpdateItem(e)}addItem(e){this._addOrUpdateItem(e)}_addOrUpdateItem(r,a=this._scene){if(c()&&!e.Utils.isNull(a))if(r instanceof t.Pacem3DCameraElement){if("perspective"===r.type){if(this._camera instanceof THREE.PerspectiveCamera)var i=this._camera;else i=new THREE.PerspectiveCamera;const t=new THREE.Vector3(r.lookAt.x,r.lookAt.y,r.lookAt.z);i.lookAt(t),i.fov=r.fov,i.aspect=r.aspect,i.near=r.near,i.far=r.far,i.position.set(r.position.x,r.position.y,r.position.z),this._setCamera(i);const a=this._orbitCtrls;e.Utils.isNull(a)||a.object!==i||(a.target=t,a.update())}}else if(this._objects.has(r)){const e=this._objects.get(r),t=this._ensureAndRefresh(r,e,a);t!=e&&this._objects.set(r,t)}else{const e=e=>{e&&(e=this._ensureAndRefresh(r,e,a),this._objects.set(r,e))};if(r instanceof t.Pacem3DObjectElement){e(o(r))}else if(r instanceof t.Pacem3DMeshElement){e(s(r))}else if(r instanceof t.Pacem3DLightElement){const t=function(e){var t;if("spot"===e.type){const r=new THREE.SpotLight;r.target.position.set(e.target.x,e.target.y,e.target.z),t=r}else t=new THREE.PointLight;return t}(r);e(t)}else if(r instanceof t.Pacem3DGroupElement){e(new THREE.Group)}}}render(){this._camera&&this._renderer.render(this._scene,this._camera)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],l.prototype,"orbit",void 0),l=__decorate([e.CustomElement({tagName:e.P+"-3d-three-adapter"})],l),t.Pacem3DThreeAdapterElement=l}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class BasicMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Basic)}};r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-basic`})],r),t.BasicMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LambertMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Lambert)}createMaterial(){var t,r;return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:null!==(t=this.reflectivity)&&void 0!==t?t:0,refractionRatio:null!==(r=this.refractionRatio)&&void 0!==r?r:0},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-lambert`})],r),t.LambertMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LineMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Line)}createMaterial(){var t,r,a;return e.Utils.extend({lineWidth:null!==(t=this.lineWidth)&&void 0!==t?t:1,lineJoin:null!==(r=this.lineJoin)&&void 0!==r?r:"round",lineCap:null!==(a=this.lineCap)&&void 0!==a?a:"round",dashArray:this.dashArray},super.createMaterial())}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"lineWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineJoin",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineCap",void 0),__decorate([e.Watch({emit:!1,converter:{convert:e=>null==e?void 0:e.split(",").map((e=>parseInt(e))).filter((e=>!Number.isNaN(e))),convertBack:e=>null==e?void 0:e.join(",")}})],r.prototype,"dashArray",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-line`})],r),t.LineMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class PhongMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Phong)}createMaterial(){var t,r,a,i;return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:null!==(t=this.reflectivity)&&void 0!==t?t:0,refractionRatio:null!==(r=this.refractionRatio)&&void 0!==r?r:0,specularColor:this.specularColor||"#000",shininess:null!==(a=this.shininess)&&void 0!==a?a:0,flatShading:null===(i=this.flatShading)||void 0===i||i},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":case"specularColor":case"shininess":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"specularColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"shininess",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-phong`})],r),t.PhongMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class StandardMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Standard)}createMaterial(){var t,r,a,i;return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",refractionRatio:null!==(t=this.refractionRatio)&&void 0!==t?t:0,metalness:null!==(r=this.metalness)&&void 0!==r?r:0,roughness:null!==(a=this.roughness)&&void 0!==a?a:0,flatShading:null!==(i=this.flatShading)&&void 0!==i&&i},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"roughness":case"metalness":case"refractionRatio":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"roughness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"metalness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-standard`})],r),t.StandardMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class OBJParser{static parse(r){const a=[],i=/^v((\s+-?[\d\.]+){3})/gm;let n=i.exec(r);for(;n&&n.length;)a.push(t.Point3DConverter.convert(n[1])),n=i.exec(r);const o=[],s=/^vt((\s+-?[\d\.]+){2})/gm;for(n=s.exec(r);n&&n.length;)o.push(e.Point.parse(n[1])),n=s.exec(r);const c=new Array(o.length),l=[],m=/^vn((\s+-?[\d\.]+){3})/gm;for(n=m.exec(r);n&&n.length;)l.push(t.Point3DConverter.convert(n[1])),n=m.exec(r);const h=new Array(l.length),p=[],d=/^f((\s+([\d]+\/[\d]+\/[\d]+)){3,})/gm;for(n=d.exec(r);n&&n.length;){const e=/([\d]+)\/([\d]+)\/([\d]+)/g,t=n[1];let i=e.exec(t),s=0;for(var u,v,y,_,f,g,E=p.length;i&&i.length;)s>2&&(p.push(a[u]),c[E]=o[v],h[E]=l[y],E++,p.push(a[_]),c[E]=o[f],h[E]=l[g],E++),_=parseInt(i[1])-1,f=parseInt(i[2])-1,g=parseInt(i[3])-1,p.push(a[_]),c[E]=o[f],h[E]=l[g],0===s&&(u=_,v=f,y=g),s++,E++,i=e.exec(t);n=d.exec(r)}return new t.MeshGeometry(p,[],c,h)}}__decorate([e.Transformer("parse3D")],class Parser3D{static parseGeometry(e,t){if("obj"===t.toLowerCase())return OBJParser.parse(e);throw new Error(`Type '${t}' is not supported.`)}},"parseGeometry",null)}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){class Pacem3DPrimitiveElement extends t.PacemEventTarget{viewActivatedCallback(){super.viewActivatedCallback(),e.Utils.isNull(this.geometry)&&(this.geometry=this.createDefaultGeometry())}}__decorate([e.Watch({converter:e.PropertyConverters.Json})],Pacem3DPrimitiveElement.prototype,"geometry",void 0),r.Pacem3DPrimitiveElement=Pacem3DPrimitiveElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemBoxElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i,n,o){const s=t||1,c=r||1,l=a||1,m=i||1,h=n||1,p=o||1,d=[],u=[],v=[];for(var y=0;y<=h;y++)for(var _=c/2-c*(1*y)/(1*h),f=0;f<=p;f++)for(var g=-l/2+l*(1*f)/(1*p),E=0;E<=m;E++){var D=-s/2+s*(1*E)/(1*m);0!=E&&E!=m&&0!=f&&f!=p&&0!=y&&y!=h||d.push({x:D,y:_,z:g})}var C=function(e,t,r){for(var a=1e-5,i=0;i<d.length;i++){var n=d[i];if(Math.abs(n.x-e)<a&&Math.abs(n.y-t)<a&&Math.abs(n.z-r)<a)return i}return-1},P=function(e,t,r,a,i,n,o,s){v.push(e),v.push(t),v.push(r),v.push(e),v.push(r),v.push(a),u.push({x:i,y:s}),u.push({x:o,y:s}),u.push({x:o,y:n}),u.push({x:i,y:s}),u.push({x:o,y:n}),u.push({x:i,y:n})};for(f=0;f<p;f++){_=c/2,g=-l/2+l*(1*f)/(1*p);var M=-l/2+l*(1*(f+1))/(1*p);for(E=0;E<m;E++){var w=-s/2+1*(E+1)*s/(1*m);P(C(D=-s/2+1*E*s/(1*m),_,M),C(w,_,M),C(w,_,g),C(D,_,g),1*E/(1*m),1-1*f/(1*p),1*(E+1)/(1*m),1-1*(f+1)/(1*p))}}for(y=0;y<h;y++){_=c/2-1*y*c/(1*h);var b=c/2-(y+1)*c/(1*h);for(g=-l/2,E=0;E<m;E++){w=s/2-(E+1)*s/(1*m);P(C(D=s/2-1*E*s/(1*m),b,g),C(w,b,g),C(w,_,g),C(D,_,g),1*E/(1*m),1-1*y/(1*h),(E+1)/(1*m),1-(y+1)/(1*h))}}for(y=0;y<h;y++)for(_=c/2-1*y*c/(1*h),b=c/2-(y+1)*c/(1*h),D=-s/2,f=0;f<p;f++){M=-l/2+(f+1)*l/(1*p);P(C(D,b,g=-l/2+f*l/(1*p)),C(D,b,M),C(D,_,M),C(D,_,g),1*f/(1*p),1-y/(1*h),(f+1)/(1*p),1-(y+1)/(1*h))}for(y=0;y<h;y++)for(_=c/2-y*c/(1*h),b=c/2-(y+1)*c/(1*h),g=l/2,E=0;E<m;E++){w=-s/2+(E+1)*s/(1*m);P(C(D=-s/2+E*s/(1*m),b,g),C(w,b,g),C(w,_,g),C(D,_,g),1*E/(1*m),1-1*y/(1*h),(E+1)/(1*m),1-(y+1)/(1*h))}for(y=0;y<h;y++)for(_=c/2-y*c/(1*h),b=c/2-(y+1)*c/(1*h),D=s/2,f=0;f<p;f++){M=l/2-(f+1)*l/(1*p);P(C(D,b,g=l/2-f*l/(1*p)),C(D,b,M),C(D,_,M),C(D,_,g),1*f/(1*p),1-1*y/(1*h),(f+1)/(1*p),1-(y+1)/(1*h))}for(f=0;f<p;f++)for(_=-c/2,g=l/2-l*f/(1*p),M=l/2-l*(f+1)/(1*p),E=0;E<m;E++){w=-s/2+(E+1)*s/(1*m);P(C(D=-s/2+E*s/(1*m),_,M),C(w,_,M),C(w,_,g),C(D,_,g),1*E/(1*m),1-1*f/(1*p),(E+1)/(1*m),1-(f+1)/(1*p))}const x=new e.Drawing3D.MeshGeometry(d,v,u);return e.Drawing3D.computeSharpVertexNormals(x),x}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"height":case"depth":case"widthSegments":case"heightSegments":case"depthSegments":this.geometry=r.createMeshGeometry(this.width,this.height,this.depth,this.widthSegments,this.heightSegments,this.depthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-box"})],a),t.PacemBoxElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemCylinderElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n,o){const s=r||1;a||(a=1),i||(i=18),n||(n=5),o||(o=1);const c=[],l=[],m=[],h=t.DEG2RAD*(360/i);c.push({x:0,y:a,z:0}),c.push({x:0,y:0,z:0});const p=s/o;for(let e=1;e<=o;e++)for(var d=p*e,u=0;u<i;u++){const t=2+2*i*(e-1),r=0==u?t+2*(i-1):t+2*(u-1),n=t+2*u,p=Math.cos(h*u),v=-Math.sin(h*u),y=Math.cos(h*(u-1)),_=-Math.sin(h*(u-1)),f=d*p,g=d*v,E={x:f,y:a,z:g},D={x:f,y:0,z:g};c.push(E),c.push(D);const C=.5*d/s,P=p*C,M=v*C,w=y*C,b=_*C;if(1==e){const e=[0,r,n],t=[1,n+1,r+1],a=[{x:.5,y:.5},{x:.5+w,y:.5-b},{x:.5+P,y:.5-M}],i=[{x:.5,y:.5},{x:.5+P,y:.5+M},{x:.5+w,y:.5+b}];Array.prototype.push.apply(m,e),Array.prototype.push.apply(m,t);for(let e=0;e<a.length;e++)l.push(a[e]);for(let e=0;e<i.length;e++)l.push(i[e])}else{const t=2+2*i*(e-2),a=0==u?t+2*(i-1):t+2*(u-1),s=t+2*u,c=(e-1)/o*.5,h=p*c,d=v*c,f=y*c,g=_*c,E={x:.5+w,y:.5-b},D={x:.5+P,y:.5-M},C={x:.5+h,y:.5-d},x={x:.5+f,y:.5-g},A={x:.5+w,y:.5+b},N={x:.5+P,y:.5+M},R={x:.5+h,y:.5+d},S={x:.5+f,y:.5+g};m.push(r),m.push(n),m.push(a),m.push(a),m.push(n),m.push(s),m.push(s+1),m.push(n+1),m.push(r+1),m.push(s+1),m.push(r+1),m.push(a+1),l.push(E),l.push(D),l.push(x),l.push(x),l.push(D),l.push(C),l.push(R),l.push(N),l.push(A),l.push(R),l.push(A),l.push(S)}}const v=2+2*i*o,y=2+2*i*(o-1),_=1/i,f=1/n;for(let e=1;e<=n;e++)for(let t=0;t<i;t++){if(e!=n){var g=s*Math.cos(h*t),E=-s*Math.sin(h*t),D=a*e/n;c.push({x:g,y:D,z:E})}const r=0==t?i-1:t-1,o=1==e?y+2*r+1:v+i*(e-2)+r,p=1==e?y+2*t+1:v+i*(e-2)+t,d=e==n?y+2*t:v+i*(e-1)+t,u=r*_,C=(e-1)*f,P=0==t?1:t*_,M=e*f,w={x:u,y:C},b={x:P,y:C},x={x:P,y:M},A={x:u,y:M};m.push(o),m.push(p),m.push(d),l.push(w),l.push(b),l.push(x),l.push(w),l.push(x),l.push(A)}return new e.Drawing3D.MeshGeometry(c,m,l)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"height":case"sides":case"heightSegments":case"capSegments":this.geometry=r.createMeshGeometry(this.radius,this.height,this.sides,this.heightSegments,this.capSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"capSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-cylinder"})],a),t.PacemCylinderElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;const a=[{x:0,y:0,z:0},{x:0,y:1,z:0}];let i=r=class PacemLineElement extends t.Pacem3DPrimitiveElement{static createLineGeometry(t){return new e.Drawing3D.LineGeometry(t||a)}createDefaultGeometry(){return r.createLineGeometry()}propertyChangedCallback(e,t,a,i){if(super.propertyChangedCallback(e,t,a,i),"positions"===e)this.geometry=r.createLineGeometry(a)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],i.prototype,"positions",void 0),i=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-line"})],i),t.PacemLineElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemPlaneElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i){t||(t=1),r||(r=1),a||(a=4),i||(i=4);const n=[],o=[],s=[],c=[],l=e.Geometry.LinearAlgebra.Vector3D.from(0,0,1);for(let e=0;e<=i;e++)for(let m=0;m<=a;m++){const h=-t/2+m*t/(1*a),p=0,d=-r/2+e*r/(1*i);if(n.push({x:h,y:p,z:d}),e<i&&m<a){const t=a+1,r=(m+1)/(1*a),n=1*m/(1*a),h=1-(e+1)/(1*i),p=1-1*e/(1*i);s.push((e+1)*t+m),s.push((e+1)*t+m+1),s.push(e*t+m+1),s.push((e+1)*t+m),s.push(e*t+m+1),s.push(e*t+m),o.push({x:n,y:h}),o.push({x:r,y:h}),o.push({x:r,y:p}),o.push({x:n,y:h}),o.push({x:r,y:p}),o.push({x:n,y:p}),c.push(l,l,l,l,l,l)}}return new e.Drawing3D.MeshGeometry(n,s,o,c)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"length":case"widthSegments":case"lengthSegments":this.geometry=r.createMeshGeometry(this.width,this.length,this.widthSegments,this.lengthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"length",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"lengthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-plane"})],a),t.PacemPlaneElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r,a,i,n,o;const s=function(e){const t=/([\d.-]+)/i;var r=t.exec(e);const a=[];for(;null!=r;){const i=r[0],n=parseFloat(i);a.push(n),e=e.replace(i,""),r=t.exec(e)}return a},c=e.Geometry.LinearAlgebra.Vector3D;class PolyhedronElement extends t.Pacem3DPrimitiveElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"radius"===e&&this._assignMeshGeometry(r)}_assignMeshGeometry(e){this.geometry=this.createMeshGeometry(e>0?e:1)}createDefaultGeometry(){return this.createMeshGeometry(1)}}__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],PolyhedronElement.prototype,"radius",void 0),t.PolyhedronElement=PolyhedronElement;let l=r=class PacemTetrahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r="0 0.5774 -0.8165, 0 0.5774 0.8165, 0.8165 -0.5774 0, -0.8165 -0.5774 0".split(","),a=[];for(let e=0;e<r.length;e++){const i=r[e],n=s(i);a.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const i="0.5 0.9995, 0.5 0.0004995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995".split(","),n=[4,5,6,7,8,9,10,11,0,3,2,1],o=[];for(let e=0;e<n.length;e++){const t=s(i[n[e]]);o.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(a,[1,2,0,2,3,0,3,1,0,3,2,1],o);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return r.createMeshGeometry(e)}};l=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-tetrahedron"})],l),t.PacemTetrahedronElement=l;let m=a=class PacemOctahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=[6,7,8,9,10,11,12,13,14,15,16,0,17,18,19,20,21,1,2,22,23,4,3,5],a="0 0.7071 -0.7071, 0 0.7071 0.7071, 1 0 0, 0 -0.7071 -0.7071, -1 0 0, 0 -0.7071 0.7071".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=s(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.9995, 0.5 0.9995, 0.0004995 0.5, 0.5 0.9995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.9995".split(","),o=[];for(let e=0;e<r.length;e++){const t=s(n[r[e]]);o.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,1,0,4,5,1,5,2,1,2,5,3,4,3,5],o);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return a.createMeshGeometry(e)}};m=a=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-octahedron"})],m),t.PacemOctahedronElement=m;let h=i=class PacemHexahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=2*t*(1/Math.sqrt(3));return e.Components.Drawing3D.PacemBoxElement.createMeshGeometry(r,r,r)}createMeshGeometry(e=this.radius){return i.createMeshGeometry(e)}};h=i=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-hexahedron"})],h),t.PacemHexahedronElement=h;let p=n=class PacemIcosahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=[12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,26,27,28,29,30,31,32,33,1,34,35,36,2,37,38,39,40,41,42,43,7,44,45,46,8,47,48,49,50,51,52,53,9,54,55,3,10,56,57,6,58,59,5,4,11],a="0 0.850651 -0.525731, 0 0.850651 0.525731, 0.850651 0.525731 0, 0.525731 0 -0.850651, -0.525731 0 -0.850651, -0.850651 0.525731 0, -0.525731 0 0.850651, 0.525731 0 0.850651, 0.850651 -0.525731 0, 0 -0.850651 0.525731, 0 -0.850651 -0.525731, -0.850651 -0.525731 0".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=s(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.808708, 0.5 0.999501, 0.5 0.808708, 0.191292 0.5, 0.000499547 0.5, 0.5 0.808708, 0.9995 0.5, 0.808708 0.5,0.000499487 0.5, 0.5 0.191292, 0.5 0.000499487, 0.5 0.191292,0.5 0.191292, 0.999501 0.5, 0.5 0.808708, 0.5 0.808708,0.9995 0.5, 0.808708 0.999501, 0.191292 0.5, 0.808708 0.5,0.5 0.999501, 0.808708 0.5, 0.999501 0.808708, 0.5 0.999501,0.000499487 0.5, 0.5 0.191292, 0.5 0.808708, 0.9995 0.5,0.808708 0.999501, 0.191292 0.5, 0.808708 0.5, 0.5 0.999501,0.808708 0.5, 0.999501 0.808708, 0.5 0.808708, 0.5 0.191292,0.9995 0.5, 0.000499547 0.5, 0.5 0.191292, 0.191292 0.5,0.5 0.000499487, 0.808708 0.5, 0.5 0.000499487, 0.999501 0.191292,0.5 0.191292, 0.808708 0.000499487, 0.9995 0.5, 0.5 0.191292,0.5 0.808708, 0.9995 0.5, 0.5 0.191292, 0.808708 0.000499487,0.999501 0.5, 0.5 0.808708, 0.5 0.000499487, 0.808708 0.5,0.999501 0.191292, 0.808708 0.5, 0.5 0.808708, 0.5 0.191292".split(","),o=[];for(let e=0;e<r.length;e++){const t=s(n[r[e]]);o.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,5,0,5,1,0,5,6,1,6,7,1,7,2,1,2,8,3,2,7,8,6,9,7,9,8,7,8,10,3,8,9,10,6,11,9,11,10,9,10,4,3,10,11,4,6,5,11,5,4,11],o);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return n.createMeshGeometry(e)}};p=n=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-icosahedron"})],p),t.PacemIcosahedronElement=p;let d=o=class PacemDodecahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=[c.from(.356822*t,.934172*t,0*t),c.from(-.356822*t,.934172*t,0*t),c.from(.57735*t,.57735*t,-.57735*t),c.from(0*t,.356822*t,-.934172*t),c.from(-.57735*t,.57735*t,-.57735*t),c.from(-.57735*t,.57735*t,.57735*t),c.from(0*t,.356822*t,.934172*t),c.from(.57735*t,.57735*t,.57735*t),c.from(.934172*t,0*t,-.356822*t),c.from(.934172*t,0*t,.356822*t),c.from(0*t,-.356822*t,.934172*t),c.from(.57735*t,-.57735*t,.57735*t),c.from(.57735*t,-.57735*t,-.57735*t),c.from(.356822*t,-.934172*t,0*t),c.from(-.57735*t,-.57735*t,.57735*t),c.from(-.356822*t,-.934172*t,0*t),c.from(0*t,-.356822*t,-.934172*t),c.from(-.57735*t,-.57735*t,-.57735*t),c.from(-.934172*t,0*t,.356822*t),c.from(-.934172*t,0*t,-.356822*t)],a=[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,0,46,47,48,49,50,51,7,52,53,54,55,56,57,58,59,60,61,9,62,63,64,65,66,67,11,68,69,70,71,72,73,74,75,76,77,13,78,79,80,81,82,83,15,84,85,86,87,88,89,90,91,92,93,17,94,95,96,97,98,99,19,1,4,100,14,101,102,10,103,18,6,5,104,2,105,106,8,107,3,12,16],i="0.5 0.999501, 0.5 0.999501, 0.191292 0.808708, 0.5 0.690792, 0.191292 0.808708, 0.191292 0.808708, 0.5 0.690792, 0.808708 0.808708, 0.000499517 0.5, 0.309208 0.5, 0.5 0.309208, 0.191292 0.191292, 0.191292 0.191292, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.5 0.309208, 0.808708 0.191292, 0.000499517 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.309208 0.5, 0.5 0.000499517, 0.808708 0.191292, 0.309208 0.5, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.690792 0.5, 0.191292 0.808708, 0.690792 0.5, 0.808708 0.808708, 0.191292 0.808708, 0.808708 0.808708, 0.808708 0.808708, 0.5 0.690792, 0.5 0.309208, 0.808708 0.808708, 0.5 0.309208, 0.808708 0.191292, 0.808708 0.191292, 0.9995 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.690792 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.5 0.000499517, 0.808708 0.191292, 0.690792 0.5, 0.5 0.000499517, 0.690792 0.5, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.9995 0.5, 0.808708 0.808708, 0.5 0.690792, 0.9995 0.5, 0.5 0.690792, 0.5 0.309208, 0.9995 0.5, 0.5 0.309208, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.309208 0.5, 0.808708 0.808708, 0.5 0.999501, 0.000499517 0.5, 0.5 0.309208, 0.000499517 0.5, 0.5 0.690792, 0.5 0.690792, 0.000499517 0.5, 0.5 0.690792, 0.191292 0.191292".split(","),n=[];for(let e=0;e<a.length;e++){const t=s(i[a[e]]);n.push({x:t[0],y:t[1]})}const o=new e.Drawing3D.MeshGeometry(r,[0,2,3,0,3,4,0,4,1,1,5,6,1,6,7,1,7,0,7,9,8,7,8,2,7,2,0,7,6,10,7,10,11,7,11,9,11,13,12,11,12,8,11,8,9,11,10,14,11,14,15,11,15,13,15,17,16,15,16,12,15,12,13,15,14,18,15,18,19,15,19,17,19,4,3,19,3,16,19,16,17,19,18,5,19,5,1,19,1,4,18,14,10,18,10,6,18,6,5,3,2,8,3,8,12,3,12,16],n);return e.Drawing3D.computeSharpVertexNormals(o),o}createMeshGeometry(e=this.radius){return o.createMeshGeometry(e)}};d=o=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-dodecahedron"})],d),t.PacemDodecahedronElement=d}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemSphereElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a){const i=[],n=[],o=[],s=r||1,c=a||8,l=t.DEG2RAD*(360/c),m=c%2==0?c/2:(c-1)/2;i.push({x:0,y:s,z:0});for(let e=1;e<m;e++){const t=l*e,r=Math.cos(t),a=Math.sin(t),h=1-1*e/m;for(let t=0;t<c;t++){const p=l*t-Math.PI/2,d=s*a*Math.cos(p),u=s*r,v=s*a*Math.sin(p);i.push({x:d,y:u,z:v});const y=0==t?c-1:t-1,_=0==t?0:1-1*t/c,f=1-1*y/c;if(1==e)o.push(1+t),o.push(1+y),o.push(0),n.push({x:_,y:h}),n.push({x:f,y:h}),n.push({x:.5,y:1});else{o.push((e-1)*c+t+1),o.push((e-1)*c+y+1),o.push((e-2)*c+y+1),o.push((e-1)*c+t+1),o.push((e-2)*c+y+1),o.push((e-2)*c+t+1);const r=1-(e-1)/m;n.push({x:_,y:h}),n.push({x:f,y:h}),n.push({x:f,y:r}),n.push({x:_,y:h}),n.push({x:f,y:r}),n.push({x:_,y:r})}}}i.push({x:0,y:-s,z:0});const h=i.length-1;for(let e=0;e<c;e++){const t=m-2,r=0==e?c-1:e-1,a=0==e?0:1-1*e/c,i=1-1*r/c,s=1-(t+1)/m;o.push(h),o.push(t*c+1+r),o.push(t*c+1+e),n.push({x:.5,y:0}),n.push({x:i,y:s}),n.push({x:a,y:s})}return new e.Drawing3D.MeshGeometry(i,o,n)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"segments":this.geometry=r.createMeshGeometry(this.radius,this.segments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-sphere"})],a),t.PacemSphereElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemTorusElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n){const o=[],s=[],c=[];i||(i=24),n||(n=12);const l=t.DEG2RAD*(360/i),m=t.DEG2RAD*(360/n),h=r||1,p=a||.25;for(let e=0;e<i;e++){const t=l*e-Math.PI/2,r=Math.sin(t),a=Math.cos(t);for(let t=0;t<n;t++){const l=m*t+Math.PI,d=Math.cos(l),u=h*a+p*d*a,v=p*Math.sin(l),y=h*r+p*d*r;o.push({x:u,y:v,z:y});const _=e>0?e-1:i-1,f=t>0?t-1:n-1,g=0==e?0:1-1*e/i,E=t>0?1*t/n:1,D=e>0?1-(e-1)/i:1/i,C=t>0?(t-1)/n:1-1/n;c.push(e*n+f),c.push(_*n+f),c.push(_*n+t),c.push(e*n+f),c.push(_*n+t),c.push(e*n+t),s.push({x:g,y:C}),s.push({x:D,y:C}),s.push({x:D,y:E}),s.push({x:g,y:C}),s.push({x:D,y:E}),s.push({x:g,y:E})}}return new e.Drawing3D.MeshGeometry(o,c,s)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"innerRadius":case"segments":case"sides":this.geometry=r.createMeshGeometry(this.radius,this.innerRadius,this.segments,this.sides)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"innerRadius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-torus"})],a),t.PacemTorusElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
6
+ var Pacem,__decorate=this&&this.__decorate||function(e,t,r,a){var i,n=arguments.length,o=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,a);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n<3?i(o):n>3?i(t,r,o):i(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,r):i?i.value=r:t.set(e,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},__awaiter=this&&this.__awaiter||function(e,t,r,a){return new(r||(r=Promise))((function(i,n){function o(e){try{c(a.next(e))}catch(e){n(e)}}function s(e){try{c(a.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))};!function(e){!function(t){t.Point3DConverter={convert:t=>e.Geometry.LinearAlgebra.Vector3D.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0}`},t.QuaternionConverter={convert:t=>e.Geometry.LinearAlgebra.Quaternion.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0} ${e.w||0}`}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(e){!function(e){e.Pacem3DDetector=class Pacem3DDetector{constructor(){this._detected={supported:!1,info:{}};let e,t=document.createElement("canvas"),r=["webgl","experimental-webgl","moz-webgl","webkit-3d"],a=function(t){if(t)return e.getParameter(t)},i=(e,t,r)=>{let a=this._detected;(a.info[e]=a.info[e]||{})[t=(t=t.replace(/[^\w]+/g,"")).substring(0,1).toLowerCase()+t.substring(1)]=r};if(navigator.userAgent.indexOf("MSIE")>=0)try{e=window.WebGLHelper.CreateGLContext(t,"canvas")}catch(e){}else for(var n=0;n<r.length;n++)try{if(e=t.getContext(r[n]),e){i("main","Context Name",r[n]);break}}catch(e){}this._detected.supported=!!e,i("main","Platform",navigator.platform),i("main","Agent",navigator.userAgent),e&&(i("main","Vendor",a(e.VENDOR)),i("main","Version",a(e.VERSION)),i("main","Renderer",a(e.RENDERER)),i("main","Shading Language Version",a(e.SHADING_LANGUAGE_VERSION)),i("bits","Rgba Bits",a(e.RED_BITS)+", "+a(e.GREEN_BITS)+", "+a(e.BLUE_BITS)+", "+a(e.ALPHA_BITS)),i("bits","Depth Bits",a(e.DEPTH_BITS)),i("shader","Max Vertex Attribs",a(e.MAX_VERTEX_ATTRIBS)),i("shader","Max Vertex Texture Image Units",a(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),i("shader","Max Varying Vectors",a(e.MAX_VARYING_VECTORS)),i("shader","Max Uniform Vectors",a(e.MAX_VERTEX_UNIFORM_VECTORS)),i("tex","Max Combined Texture Image Units",a(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),i("tex","Max Texture Size",a(e.MAX_TEXTURE_SIZE)),i("tex","Max Cube Map Texture Size",a(e.MAX_CUBE_MAP_TEXTURE_SIZE)),i("tex","Num. Compressed Texture Formats",a(e.COMPRESSED_TEXTURE_FORMATS)),i("misc","Max Render Buffer Size",a(e.MAX_RENDERBUFFER_SIZE)),i("misc","Max Viewport Dimensions",a(e.MAX_VIEWPORT_DIMS)),i("misc","Aliased Line Width Range",a(e.ALIASED_LINE_WIDTH_RANGE)),i("misc","Aliased Point Size Range",a(e.ALIASED_POINT_SIZE_RANGE)),i("misc","Supported Extensions",e.getSupportedExtensions()||[]))}get info(){return this._detected.info}get supported(){return this._detected.supported}}}(e.Drawing3D||(e.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class NodeGeometry{constructor(e=[]){this.positions=e}barycenter(){const t=this.positions;var r={x:0,y:0,z:0};if(!e.Utils.isNullOrEmpty(t)){for(var a=t.length,i=0;i<t.length;i++){var n=t[i];r.x+=n.x,r.y+=n.y,r.z+=n.z}var o=1*a;r.x/=o,r.y/=o,r.z/=o}return r}boundingBox(){const t=this.positions,r={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};if(!e.Utils.isNullOrEmpty(t))for(var a=0;a<t.length;a++){var i=t[a];r.minX=Math.min(r.minX,i.x),r.minY=Math.min(r.minY,i.y),r.minZ=Math.min(r.minZ,i.z),r.maxX=Math.max(r.maxX,i.x),r.maxY=Math.max(r.maxY,i.y),r.maxZ=Math.max(r.maxZ,i.z)}return r}}t.NodeGeometry=NodeGeometry;t.LineGeometry=class LineGeometry extends NodeGeometry{};t.MeshGeometry=class MeshGeometry extends NodeGeometry{constructor(e,t,r=[],a=[]){super(e),this.triangleIndices=t,this.textureCoordinates=r,this.normals=a}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){var r;function a(t){return!e.Utils.isNull(t)&&"render"in t&&"function"==typeof t.render}function i(t){return!e.Utils.isNull(t)&&"stage"in t&&a(t.stage)}function n(e){return"transformMatrix"in e&&i(e)}t.isStage=a,t.isRenderable=i,t.isUi3DObject=n,t.isMesh=function(e){return n(e)&&"geometry"in e},t.isGroup=function(t){return n(t)&&"items"in t&&!e.Utils.isNullOrEmpty(t.items)},t.computeSharpVertexNormals=function(t){const r=[];if(!e.Utils.isNullOrEmpty(t)){const a=t.triangleIndices;if(a.length%3!=0)throw new RangeError(`Invalid mesh geometry: ${a.length} is not multiple of 3.`);for(let i=2;i<a.length;i+=3){const n=a[i-2],o=a[i-1],s=a[i],c=t.positions[n],l=t.positions[o],m=t.positions[s],h=e.Geometry.LinearAlgebra.Vector3D.subtract(c,l),p=e.Geometry.LinearAlgebra.Vector3D.subtract(c,m),d=e.Geometry.LinearAlgebra.Vector3D.cross(p,h),u=e.Geometry.LinearAlgebra.Vector3D.unit(d);r.push(u,u,u)}}t.normals=r};class UI3DEvent extends e.CustomUIEvent{constructor(e,t,a,i){super(e,t,a),r.set(this,void 0),__classPrivateFieldSet(this,r,i,"f")}get point(){return __classPrivateFieldGet(this,r,"f")}}r=new WeakMap,t.UI3DEvent=UI3DEvent;t.DragEvent=class DragEvent extends UI3DEvent{};t.RenderableEvent=class RenderableEvent extends UI3DEvent{constructor(e,t,r,a){super(e,{detail:t,bubbles:!0,cancelable:!0},r,a)}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;r.TAG_MIDDLE_NAME="3d",r.DEG2RAD=Math.PI/180;const i={OBJECT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-object",LIGHT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-light",CAMERA_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-camera",LINE_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-line",MESH_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-mesh",GROUP_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-group",DEFAULT_COORDS:{x:0,y:0,z:0}};let n;!function(e){e.Position="position",e.Transform="transform",e.Geometry="geometry",e.Children="children",e.Material="material",e.Light="light",e.Camera="camera"}(n=r.StalePropertyFlag||(r.StalePropertyFlag={}));class RenderableElement extends t.PacemCrossItemsContainerElement{constructor(){super(...arguments),a.set(this,[]),this.position=i.DEFAULT_COORDS}validate(e){return!1}findContainer(){return this.parent||this.stage}get stage(){return this._scene=this._scene||e.CustomElementUtils.findAncestorOfType(this,r.Pacem3DElement)}get parent(){return this._drawableParent=this._drawableParent||e.CustomElementUtils.findAncestor(this,(e=>e instanceof RenderableElement))}get flags(){return __classPrivateFieldGet(this,a,"f")}disconnectedCallback(){delete this._scene,delete this._drawableParent,super.disconnectedCallback()}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"hide":this.setAsDirty();break;case"items":this.setAsDirty(n.Children);break;case"position":this.setAsDirty(n.Position)}}setAsDirty(...e){var t;for(let t of e)this.flags.includes(t)||this.flags.push(t);null===(t=this.stage)||void 0===t||t.render(this)}}a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],RenderableElement.prototype,"position",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],RenderableElement.prototype,"tag",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],RenderableElement.prototype,"inert",void 0),r.RenderableElement=RenderableElement;class Ui3DElement extends RenderableElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"transformMatrix":this.setAsDirty(n.Transform);break;case"rotate":case"scaleX":case"scaleY":case"translateX":case"translateY":this._computeTransformMatrix()}}_computeTransformMatrix(){const t=e.Utils.isNull(this.rotate)?e.Geometry.LinearAlgebra.Matrix3D.identity():e.Geometry.LinearAlgebra.Quaternion.toRotationMatrix(this.rotate);this.translateX&&(t.offsetX=this.translateX),this.translateY&&(t.offsetY=this.translateY),this.translateZ&&(t.offsetZ=this.translateZ),this.scaleX&&(t.m11=this.scaleX),this.scaleY&&(t.m22=this.scaleY),this.scaleZ&&(t.m33=this.scaleZ),this.transformMatrix=t}}__decorate([e.Watch({emit:!1,converter:e.Drawing3D.QuaternionConverter})],Ui3DElement.prototype,"rotate",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleZ",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateZ",void 0),__decorate([e.Watch({emit:!1})],Ui3DElement.prototype,"transformMatrix",void 0),r.Ui3DElement=Ui3DElement;let o=class Pacem3DGroupElement extends Ui3DElement{validate(e){return e instanceof RenderableElement}};o=__decorate([e.CustomElement({tagName:i.GROUP_SELECTOR})],o),r.Pacem3DGroupElement=o;let s=class Pacem3DMeshElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"geometry":this.setAsDirty(n.Geometry);break;case"material":case"backMaterial":this.setAsDirty(n.Material)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],s.prototype,"geometry",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],s.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],s.prototype,"backMaterial",void 0),s=__decorate([e.CustomElement({tagName:i.MESH_SELECTOR})],s),r.Pacem3DMeshElement=s;let c=class Pacem3DObjectElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"content"!==e&&"type"!==e||this.setAsDirty(n.Geometry,n.Material)}};__decorate([e.Watch({emit:!1})],c.prototype,"content",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],c.prototype,"type",void 0),c=__decorate([e.CustomElement({tagName:i.OBJECT_SELECTOR})],c),r.Pacem3DObjectElement=c;let l=class Pacem3DLightElement extends RenderableElement{constructor(){super(...arguments),this.intensity=.25,this.target=i.DEFAULT_COORDS,this.color="#fff",this.type="omni"}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"type":case"color":case"intensity":case"target":this.setAsDirty(n.Light)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],l.prototype,"intensity",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],l.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"type",void 0),l=__decorate([e.CustomElement({tagName:i.LIGHT_SELECTOR})],l),r.Pacem3DLightElement=l;let m=class Pacem3DCameraElement extends RenderableElement{constructor(){super(...arguments),this.fov=45,this.aspect=1.78,this.near=.1,this.far=1e3,this.type="perspective",this.lookAt=i.DEFAULT_COORDS}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"fov":case"aspect":case"near":case"far":case"type":case"lookAt":this.setAsDirty(n.Camera)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"fov",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"aspect",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"near",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"far",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],m.prototype,"type",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],m.prototype,"lookAt",void 0),m=__decorate([e.CustomElement({tagName:i.CAMERA_SELECTOR})],m),r.Pacem3DCameraElement=m;class Pacem3DAdapterElement extends t.PacemEventTarget{}r.Pacem3DAdapterElement=Pacem3DAdapterElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;let i=class Pacem3DElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._addHandler=e=>{this._add(e.target)},this._clickHandler=t=>{let r=this;if(!r.interactive||e.Utils.isNull(r._lastHitResult))return;const a=t.type.replace(/^mouse/,""),i=r._lastHitResult,n=i.object,o=i.point;this._itemDispatch(n,o,a,t)},this._moveHandler=t=>{var r,a;let i=this;if(!i.adapter||!i.interactive)return;const n=i._resizer.currentSize;let o=i.adapter.raycast({x:t.pageX-n.left,y:t.pageY-n.top},n);if(o!=i._lastHitResult){if((null==o?void 0:o.object)!=(null===(r=i._lastHitResult)||void 0===r?void 0:r.object)){const r=null==o?void 0:o.object,n=null===(a=i._lastHitResult)||void 0===a?void 0:a.object,s=null==o?void 0:o.point;e.Utils.isNull(n)||this._itemDispatch(n,s,"out",t),e.Utils.isNull(r)||this._itemDispatch(r,s,"over",t)}i._lastHitResult=o}},a.set(this,void 0),this._resizeHandler=r=>{const i=__classPrivateFieldSet(this,a,r.detail,"f"),n=this.adapter;e.Utils.isNull(n)||(this.adapter.invalidateSize(i),this.dispatchEvent(new t.ResizeEvent(i)))}}validate(e){return e instanceof r.RenderableElement}get stage(){return this._container}get scene(){return this.adapter&&this.adapter.scene}register(t){const r=super.register(t);return r&&(this._add(t),t.addEventListener(e.PropertyChangeEventName,this._addHandler,!1)),r}unregister(t){const r=super.unregister(t);return r&&(t.removeEventListener(e.PropertyChangeEventName,this._addHandler,!1),this._erase(t)),r}_add(e){this.adapter&&this.adapter.addItem(e)}_erase(e){this.adapter&&this.adapter.removeItem(e)}_initializeAdapter(t,r){return new Promise(((a,i)=>{e.Utils.isNull(t)||this.items.forEach((e=>t.removeItem(e))),e.Utils.isNull(this._container)||e.Utils.isNull(r)||r.initialize(this).then((e=>{this.items.forEach((e=>this._add(e)))}),(t=>{this.log(e.Logging.LogLevel.Error,null==t?void 0:t.toString())})),a()}))}propertyChangedCallback(t,r,a,i){super.propertyChangedCallback(t,r,a,i),e.Utils.isNull(this._container)||"adapter"!==t||i||this._initializeAdapter(r,a)}viewActivatedCallback(){super.viewActivatedCallback();const e=this._container,t=this._resizer;t.addEventListener("resize",this._resizeHandler,!1),t.target=e,this._initializeAdapter(null,this.adapter).then((t=>{e.addEventListener("mousemove",this._moveHandler,!1),e.addEventListener("click",this._clickHandler,!1),e.addEventListener("mouseup",this._clickHandler,!1),e.addEventListener("mousedown",this._clickHandler,!1),this.render()}))}_itemDispatch(t,r,a,i){if(!e.Utils.isNull(t)){var n,o,s;i instanceof Event?o=i:n={item:t,offset:i},"string"==typeof a?s=a:(s=a.type,o=a.originalEvent);const l=r,m=()=>i instanceof Event?new e.Drawing3D.RenderableEvent(s,t,o,l):new e.Drawing3D.DragEvent(s,{detail:n,cancelable:s===e.UI.DragDropEventType.Init||s===e.UI.DragDropEventType.Drag},o,l),h=i instanceof Event?new e.Drawing3D.RenderableEvent("item"+s,t,o,l):new e.Drawing3D.DragEvent("item"+s,{detail:n,cancelable:s===e.UI.DragDropEventType.Init||s===e.UI.DragDropEventType.Drag},o,l);var c=!1;if(t instanceof EventTarget){const e=m();t.dispatchEvent(e),c=e.defaultPrevented}return t.stage.dispatchEvent(h),c||h.defaultPrevented}return!1}disconnectedCallback(){const t=this._resizer,r=this._container;e.Utils.isNull(r)||(r.removeEventListener("click",this._clickHandler,!1),r.removeEventListener("mouseup",this._clickHandler,!1),r.removeEventListener("mousedown",this._clickHandler,!1),r.removeEventListener("mousemove",this._moveHandler,!1)),e.Utils.isNull(t)||t.removeEventListener("resize",this._resizeHandler,!1),super.disconnectedCallback()}get size(){return __classPrivateFieldGet(this,a,"f")}render(t,r){if(e.Utils.isNull(t)){if(requestAnimationFrame((()=>this.render())),!this.disabled&&!e.Utils.isNull(this.adapter)){let e=new CustomEvent("prerender",{detail:{scene:this.adapter.scene},cancelable:!0});this.dispatchEvent(e),e.defaultPrevented||(this.adapter.render(),this.dispatchEvent(new CustomEvent("render",{detail:{scene:this.adapter.scene}})))}}else{const r=this.adapter;e.Utils.isNull(r)||r.updateItem(t)}}};a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"interactive",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"orbit",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],i.prototype,"adapter",void 0),__decorate([e.ViewChild(`.${e.PCSS}-3d`)],i.prototype,"_container",void 0),__decorate([e.ViewChild(e.P+"-resize")],i.prototype,"_resizer",void 0),i=__decorate([e.CustomElement({tagName:e.P+"-"+r.TAG_MIDDLE_NAME,shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-resize watch-position="true"></${e.P}-resize><div class="${e.PCSS}-3d"></div><${e.P}-content></${e.P}-content>`})],i),r.Pacem3DElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(e){let t;function r(e){return"shader"in e}!function(e){e.Basic="basic",e.Lambert="lambert",e.Phong="phong",e.Standard="standard",e.Line="line"}(t=e.KnownShader||(e.KnownShader={})),e.isMaterial=r,e.isBasicMaterial=function(e){return r(e)&&e.shader===t.Basic},e.isLineMaterial=function(e){return r(e)&&e.shader===t.Line},e.isLambertMaterial=function(e){return r(e)&&e.shader===t.Lambert},e.isPhongMaterial=function(e){return r(e)&&e.shader===t.Phong},e.isStandardMaterial=function(e){return r(e)&&e.shader===t.Standard}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;class MaterialElement extends t.PacemEventTarget{constructor(e){super(),a.set(this,void 0),__classPrivateFieldSet(this,a,e,"f")}get shader(){return __classPrivateFieldGet(this,a,"f")}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"opacity":case"wireframe":case"color":case"visible":case"map":this.updateMaterial()}}viewActivatedCallback(){super.viewActivatedCallback(),this.updateMaterial()}updateMaterial(){this.material=this.createMaterial()}createMaterial(){var t,r,a;return{opacity:null!==(t=this.opacity)&&void 0!==t?t:1,wireframe:null!==(r=this.wireframe)&&void 0!==r&&r,color:this.color||e.Utils.Css.getVariableValue(`--${e.PCSS}-color-primary`),visible:null===(a=this.visible)||void 0===a||a,map:this.map,shader:this.shader}}}a=new WeakMap,__decorate([e.Watch()],MaterialElement.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],MaterialElement.prototype,"opacity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"wireframe",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"visible",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"map",void 0),r.MaterialElement=MaterialElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){function r(e){const t=[];for(let a of e)"x"in(r=a)&&"number"==typeof r.x&&"y"in r&&"number"==typeof r.y&&"z"in r&&"number"==typeof r.z?t.push(a.x,a.y,a.z):t.push(a.x,a.y);var r;return t}const a="0.152.2",i={VERSION:a,API_URI:`https://unpkg.com/three@${a}/build/three.min.js`,ORBIT_URI:"https://unpkg.com/three@0.147.0/examples/js/controls/OrbitControls.js",LOADERS:[],DEFAULT_MATERIAL:function(){return new THREE.MeshStandardMaterial({color:"#069",flatShading:!0})}};function n(t){var r,a,i,n,o,s,c;if(e.Utils.isNull(t))return null;const l={color:t.color,opacity:null!==(r=t.opacity)&&void 0!==r?r:1,transparent:!0,wireframe:null!==(a=t.wireframe)&&void 0!==a&&a,visible:null===(i=t.visible)||void 0===i||i},m=e.Utils.extend({},l,{wireframe:null!==(n=t.wireframe)&&void 0!==n&&n}),h=e=>(t.map&&(e.map=(new THREE.TextureLoader).load(t.map,(t=>{e.needsUpdate=!0}))),e);if(e.Drawing3D.isStandardMaterial(t)){return h(new THREE.MeshStandardMaterial(e.Utils.extend(m,{roughness:t.roughness,metalness:t.metalness,emissive:t.emissiveColor,flatShading:t.flatShading,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isPhongMaterial(t)){return h(new THREE.MeshPhongMaterial(e.Utils.extend(m,{shininess:t.shininess,emissive:t.emissiveColor,flatShading:t.flatShading,specular:t.specularColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLambertMaterial(t)){return h(new THREE.MeshLambertMaterial(e.Utils.extend(m,{emissive:t.emissiveColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLineMaterial(t)){const r=t.dashArray&&t.dashArray[0]||null,a=t.dashArray&&t.dashArray.length>1&&t.dashArray[1]||r,i=e.Utils.extend(l,{linecap:null!==(o=t.lineCap)&&void 0!==o?o:"round",linejoin:null!==(s=t.lineJoin)&&void 0!==s?s:"round",linewidth:null!==(c=t.lineWidth)&&void 0!==c?c:1});return e.Utils.isNullOrEmpty(t.dashArray)?new THREE.LineBasicMaterial(i):new THREE.LineDashedMaterial(e.Utils.extend({dashSize:r,gapSize:a},i))}if(e.Drawing3D.isMaterial(t)){return h(new THREE.MeshBasicMaterial(m))}return null}function o(t){var r;if(e.Utils.isNullOrEmpty(t.content))throw new Error("Missing content.");if("obj"===(null===(r=t.type)||void 0===r?void 0:r.toLowerCase())){return(new THREE.OBJLoader).parse(t.content)}return(new THREE.ObjectLoader).parse(t.content)}function s(t){if(e.Utils.isNullOrEmpty(t.geometry))return null;return new(t.geometry instanceof e.Drawing3D.LineGeometry?THREE.Line:THREE.Mesh)}function c(){return"THREE"in window}let l=class Pacem3DThreeAdapterElement extends t.Pacem3DAdapterElement{constructor(){super(...arguments),this._renderer=null,this._camera=null,this._scene=null,this._orbitCtrls=null,this._objects=new WeakMap,this._dict={},this._orbitControlsDelegate=e=>{},this._ensureAndRefresh=(a,c,l)=>{if(c.matrixAutoUpdate=!1,c.visible=!a.hide){if(e.Drawing3D.isMesh(a)){let o=c;if(a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0){o.geometry.dispose();const t=s(a);t.constructor.name!==o.constructor.name&&(l.remove(c),delete this._dict[c.id],c=o=t),o.geometry=function(t){const a=new THREE.BufferGeometry,i=r(t.positions);if(a.setAttribute("position",new THREE.Float32BufferAttribute(i,3)),t instanceof e.Drawing3D.MeshGeometry){e.Utils.isNullOrEmpty(t.triangleIndices)||a.setIndex(t.triangleIndices);const i=r(t.positions);a.setAttribute("position",new THREE.Float32BufferAttribute(i,3));const n=r(t.textureCoordinates);if(a.setAttribute("uv",new THREE.Float32BufferAttribute(n,2)),e.Utils.isNullOrEmpty(t.normals))a.computeVertexNormals();else{const e=r(t.normals);a.setAttribute("normal",new THREE.Float32BufferAttribute(e,3))}}return a}(a.geometry)}if(a.flags.indexOf(t.StalePropertyFlag.Material)>=0){if(e.Utils.isArray(o.material))for(let e of o.material)e.dispose();else o.material.dispose();o.material=function(t,r,a){const i=a,o=[],s=n(t);if(e.Utils.isNull(s)||(s.side=THREE.FrontSide,o.push(s)),!e.Utils.isNull(r))if(r==t)s.side=THREE.DoubleSide;else{const t=n(r);e.Utils.isNull(t)||(t.side=THREE.BackSide,o.push(t))}return i&&o.length>1?o:s}(a.material)||i.DEFAULT_MATERIAL()}}else if(a instanceof t.Pacem3DObjectElement&&(a.flags.indexOf(t.StalePropertyFlag.Material)>=0||a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0))c.parent&&c.parent.remove(c),c=o(a);else if(a instanceof t.Pacem3DGroupElement){if(a.flags.indexOf(t.StalePropertyFlag.Children)>=0){for(let e=c.children.length-1;e>=0;e--){const t=c.children[e];c.remove(t)}for(let e of a.items)this._addOrUpdateItem(e,c)}}else if(a instanceof t.Pacem3DLightElement){const e=c;a.flags.indexOf(t.StalePropertyFlag.Light)>=0&&(e.color=new THREE.Color(a.color),e.intensity=a.intensity)}let h=a.position;if(e.Drawing3D.isUi3DObject(a)&&!e.Utils.isNull(a.transformMatrix)&&(a.flags.indexOf(t.StalePropertyFlag.Position)>=0||a.flags.indexOf(t.StalePropertyFlag.Transform)>=0)){const t=e.Geometry.LinearAlgebra.Matrix3D.from(1,0,0,0,0,1,0,0,0,0,1,0,h.x,h.y,h.z,1),r=e.Geometry.LinearAlgebra.Matrix3D.multiply(a.transformMatrix,t);THREE.Matrix4.prototype.set.apply(c.matrix,[(m=r).m11,m.m21,m.m31,m.offsetX,m.m12,m.m22,m.m32,m.offsetY,m.m13,m.m23,m.m33,m.offsetZ,m.m14,m.m24,m.m34,m.m44])}else a.flags.indexOf(t.StalePropertyFlag.Position)>=0&&(c.position.set(h.x,h.y,h.z),c.updateMatrix())}var m;return c.userData=a.tag,e.Utils.isNull(l.getObjectById(c.id))&&(l.add(c),this._dict[c.id]=a),a.flags.splice(0),c}}dispose(e){}snapshot(t,r){if(t!=this._3d)return Promise.resolve(null);const a=!e.Utils.isNullOrEmpty(r),i=a?"image/jpeg":null,n=a?.9:null;return new Promise(((t,a)=>{this.render(),e.Utils.snapshotElement(this._stage,r,i,n).then(t)}))}project(t){if(e.Utils.isNull(this._camera)||e.Utils.isNull(this._stage))return null;const r=new THREE.Vector3(t.x,t.y,t.z),a=this._stage.width/2,i=this._stage.height/2,n=r.project(this._camera);return{x:n.x*a+a,y:-n.y*i+i}}zoomFit(...t){return new Promise(((r,a)=>{const i=this._camera,n=this._objects,o=t.filter((e=>n.has(e))).map((e=>n.get(e)));(e.Utils.isNull(i)||e.Utils.isNullOrEmpty(o))&&r(),function(t,r,a,i=1.333){const n=new THREE.Box3;for(const e of a)n.expandByObject(e);const o=n.getSize(new THREE.Vector3),s=n.getCenter(new THREE.Vector3),c=Math.max(o.x,o.y,o.z)/(2*Math.atan(Math.PI*t.fov/360)),l=c/t.aspect,m=i*Math.max(c,l),h=!e.Utils.isNull(r);var p;h&&(p=r.target.clone().sub(t.position).normalize().multiplyScalar(m),r.maxDistance=10*m,r.target.copy(s)),t.near=m/100,t.far=100*m,t.updateProjectionMatrix(),h&&(t.position.copy(r.target).sub(p),r.update())}(i,this._orbitCtrls,o),r()}))}get scene(){return this._scene}raycast(t,r){if(c()&&!e.Utils.isNull(this._camera)){const e=this._camera,a=new THREE.Vector2(t.x/r.width*2-1,-t.y/r.height*2+1),i=new THREE.Raycaster;i.setFromCamera(a,e);const n=i.intersectObjects(this._scene.children,!0);let o,s,c=0;for(;n.length>c&&(s=n[c++])&&(o=s.object);){if(this._dict[o.id].inert)continue;const e=s.point,t={x:e.x,y:e.y,z:e.z};return{object:this._dict[o.id],point:t}}}return null}initialize(t){return __awaiter(this,void 0,void 0,(function*(){if(!e.Utils.isNull(this._stage))return this._stage;this._3d=t;const r=t.stage,a=this._stage=document.createElement("canvas");r.innerHTML="",r.appendChild(a),yield e.CustomElementUtils.importjs(i.API_URI),yield function(...e){return __awaiter(this,void 0,void 0,(function*(){const t=Date.now();var r=!1;do{r=c();for(let t of e)r&&(r=t());r||(yield new Promise((e=>setTimeout(e,500))))}while(!r&&Date.now()-t<3e4);if(!r)throw new Error("The wait for THREE adapter initialization timed out.")}))}(),yield Promise.all([e.CustomElementUtils.importjs(i.ORBIT_URI)].concat(i.LOADERS.map((t=>e.CustomElementUtils.importjs(t))))),this._scene=new THREE.Scene,this.invalidateSize(t.size);let n=this._stage.width,o=this._stage.height,s={canvas:a,antialias:!0,stencil:!1,alpha:!0};return this._renderer=new THREE.WebGLRenderer(s),this._renderer.setSize(n,o),this.orbit=t.orbit,a}))}_setCamera(e){this._camera=e,this.invalidateSize(this._3d.size),this._disposeOrbitControls(),this.orbit&&this._initOrbitControls()}propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"orbit"===e&&(!0===r?this._initOrbitControls():this._disposeOrbitControls())}_initOrbitControls(){const t=this._camera;if(e.Utils.isNull(this._3d)||e.Utils.isNull(t))return;(this._orbitCtrls=new THREE.OrbitControls(t,this._3d.stage)).addEventListener("change",this._orbitControlsDelegate)}_disposeOrbitControls(){const t=this._orbitCtrls;e.Utils.isNull(t)||(t.removeEventListener("change",this._orbitControlsDelegate),t.dispose())}invalidateSize(t){if(!c()||e.Utils.isNull(t))return;let r=t.width,a=t.height;this._stage.width=r,this._stage.height=a;let i=this._camera;i instanceof THREE.PerspectiveCamera&&(i.aspect=r/a,i.updateProjectionMatrix()),this._renderer&&this._renderer.setSize(r,a)}removeItem(t){const r=this._objects,a=r.get(t);e.Utils.isNull(a)||(this._scene.remove(a),delete this._dict[a.id],r.delete(t))}updateItem(e){this._addOrUpdateItem(e)}addItem(e){this._addOrUpdateItem(e)}_addOrUpdateItem(r,a=this._scene){if(c()&&!e.Utils.isNull(a))if(r instanceof t.Pacem3DCameraElement){if("perspective"===r.type){if(this._camera instanceof THREE.PerspectiveCamera)var i=this._camera;else i=new THREE.PerspectiveCamera;const t=new THREE.Vector3(r.lookAt.x,r.lookAt.y,r.lookAt.z);i.lookAt(t),i.fov=r.fov,i.aspect=r.aspect,i.near=r.near,i.far=r.far,i.position.set(r.position.x,r.position.y,r.position.z),this._setCamera(i);const a=this._orbitCtrls;e.Utils.isNull(a)||a.object!==i||(a.target=t,a.update())}}else if(this._objects.has(r)){const e=this._objects.get(r),t=this._ensureAndRefresh(r,e,a);t!=e&&this._objects.set(r,t)}else{const e=e=>{e&&(e=this._ensureAndRefresh(r,e,a),this._objects.set(r,e))};if(r instanceof t.Pacem3DObjectElement){e(o(r))}else if(r instanceof t.Pacem3DMeshElement){e(s(r))}else if(r instanceof t.Pacem3DLightElement){const t=function(e){var t;if("spot"===e.type){const r=new THREE.SpotLight;r.target.position.set(e.target.x,e.target.y,e.target.z),t=r}else t=new THREE.PointLight;return t}(r);e(t)}else if(r instanceof t.Pacem3DGroupElement){e(new THREE.Group)}}}render(){this._camera&&this._renderer.render(this._scene,this._camera)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],l.prototype,"orbit",void 0),l=__decorate([e.CustomElement({tagName:e.P+"-3d-three-adapter"})],l),t.Pacem3DThreeAdapterElement=l}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class BasicMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Basic)}};r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-basic`})],r),t.BasicMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LambertMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Lambert)}createMaterial(){var t,r;return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:null!==(t=this.reflectivity)&&void 0!==t?t:0,refractionRatio:null!==(r=this.refractionRatio)&&void 0!==r?r:0},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-lambert`})],r),t.LambertMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LineMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Line)}createMaterial(){var t,r,a;return e.Utils.extend({lineWidth:null!==(t=this.lineWidth)&&void 0!==t?t:1,lineJoin:null!==(r=this.lineJoin)&&void 0!==r?r:"round",lineCap:null!==(a=this.lineCap)&&void 0!==a?a:"round",dashArray:this.dashArray},super.createMaterial())}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"lineWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineJoin",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineCap",void 0),__decorate([e.Watch({emit:!1,converter:{convert:e=>null==e?void 0:e.split(",").map((e=>parseInt(e))).filter((e=>!Number.isNaN(e))),convertBack:e=>null==e?void 0:e.join(",")}})],r.prototype,"dashArray",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-line`})],r),t.LineMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class PhongMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Phong)}createMaterial(){var t,r,a,i;return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:null!==(t=this.reflectivity)&&void 0!==t?t:0,refractionRatio:null!==(r=this.refractionRatio)&&void 0!==r?r:0,specularColor:this.specularColor||"#000",shininess:null!==(a=this.shininess)&&void 0!==a?a:0,flatShading:null===(i=this.flatShading)||void 0===i||i},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":case"specularColor":case"shininess":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"specularColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"shininess",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-phong`})],r),t.PhongMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class StandardMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Standard)}createMaterial(){var t,r,a,i;return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",refractionRatio:null!==(t=this.refractionRatio)&&void 0!==t?t:0,metalness:null!==(r=this.metalness)&&void 0!==r?r:0,roughness:null!==(a=this.roughness)&&void 0!==a?a:0,flatShading:null!==(i=this.flatShading)&&void 0!==i&&i},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"roughness":case"metalness":case"refractionRatio":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"roughness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"metalness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-standard`})],r),t.StandardMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class OBJParser{static parse(r){const a=[],i=/^v((\s+-?[\d\.]+){3})/gm;let n=i.exec(r);for(;n&&n.length;)a.push(t.Point3DConverter.convert(n[1])),n=i.exec(r);const o=[],s=/^vt((\s+-?[\d\.]+){2})/gm;for(n=s.exec(r);n&&n.length;)o.push(e.Point.parse(n[1])),n=s.exec(r);const c=new Array(o.length),l=[],m=/^vn((\s+-?[\d\.]+){3})/gm;for(n=m.exec(r);n&&n.length;)l.push(t.Point3DConverter.convert(n[1])),n=m.exec(r);const h=new Array(l.length),p=[],d=/^f((\s+([\d]+\/[\d]+\/[\d]+)){3,})/gm;for(n=d.exec(r);n&&n.length;){const e=/([\d]+)\/([\d]+)\/([\d]+)/g,t=n[1];let i=e.exec(t),s=0;for(var u,v,y,_,g,f,E=p.length;i&&i.length;)s>2&&(p.push(a[u]),c[E]=o[v],h[E]=l[y],E++,p.push(a[_]),c[E]=o[g],h[E]=l[f],E++),_=parseInt(i[1])-1,g=parseInt(i[2])-1,f=parseInt(i[3])-1,p.push(a[_]),c[E]=o[g],h[E]=l[f],0===s&&(u=_,v=g,y=f),s++,E++,i=e.exec(t);n=d.exec(r)}return new t.MeshGeometry(p,[],c,h)}}__decorate([e.Transformer("parse3D")],class Parser3D{static parseGeometry(e,t){if("obj"===t.toLowerCase())return OBJParser.parse(e);throw new Error(`Type '${t}' is not supported.`)}},"parseGeometry",null)}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){class Pacem3DPrimitiveElement extends t.PacemEventTarget{viewActivatedCallback(){super.viewActivatedCallback(),e.Utils.isNull(this.geometry)&&(this.geometry=this.createDefaultGeometry())}}__decorate([e.Watch({converter:e.PropertyConverters.Json})],Pacem3DPrimitiveElement.prototype,"geometry",void 0),r.Pacem3DPrimitiveElement=Pacem3DPrimitiveElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemBoxElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i,n,o){const s=t||1,c=r||1,l=a||1,m=i||1,h=n||1,p=o||1,d=[],u=[],v=[];for(var y=0;y<=h;y++)for(var _=c/2-c*(1*y)/(1*h),g=0;g<=p;g++)for(var f=-l/2+l*(1*g)/(1*p),E=0;E<=m;E++){var D=-s/2+s*(1*E)/(1*m);0!=E&&E!=m&&0!=g&&g!=p&&0!=y&&y!=h||d.push({x:D,y:_,z:f})}var C=function(e,t,r){for(var a=1e-5,i=0;i<d.length;i++){var n=d[i];if(Math.abs(n.x-e)<a&&Math.abs(n.y-t)<a&&Math.abs(n.z-r)<a)return i}return-1},P=function(e,t,r,a,i,n,o,s){v.push(e),v.push(t),v.push(r),v.push(e),v.push(r),v.push(a),u.push({x:i,y:s}),u.push({x:o,y:s}),u.push({x:o,y:n}),u.push({x:i,y:s}),u.push({x:o,y:n}),u.push({x:i,y:n})};for(g=0;g<p;g++){_=c/2,f=-l/2+l*(1*g)/(1*p);var M=-l/2+l*(1*(g+1))/(1*p);for(E=0;E<m;E++){var w=-s/2+1*(E+1)*s/(1*m);P(C(D=-s/2+1*E*s/(1*m),_,M),C(w,_,M),C(w,_,f),C(D,_,f),1*E/(1*m),1-1*g/(1*p),1*(E+1)/(1*m),1-1*(g+1)/(1*p))}}for(y=0;y<h;y++){_=c/2-1*y*c/(1*h);var b=c/2-(y+1)*c/(1*h);for(f=-l/2,E=0;E<m;E++){w=s/2-(E+1)*s/(1*m);P(C(D=s/2-1*E*s/(1*m),b,f),C(w,b,f),C(w,_,f),C(D,_,f),1*E/(1*m),1-1*y/(1*h),(E+1)/(1*m),1-(y+1)/(1*h))}}for(y=0;y<h;y++)for(_=c/2-1*y*c/(1*h),b=c/2-(y+1)*c/(1*h),D=-s/2,g=0;g<p;g++){M=-l/2+(g+1)*l/(1*p);P(C(D,b,f=-l/2+g*l/(1*p)),C(D,b,M),C(D,_,M),C(D,_,f),1*g/(1*p),1-y/(1*h),(g+1)/(1*p),1-(y+1)/(1*h))}for(y=0;y<h;y++)for(_=c/2-y*c/(1*h),b=c/2-(y+1)*c/(1*h),f=l/2,E=0;E<m;E++){w=-s/2+(E+1)*s/(1*m);P(C(D=-s/2+E*s/(1*m),b,f),C(w,b,f),C(w,_,f),C(D,_,f),1*E/(1*m),1-1*y/(1*h),(E+1)/(1*m),1-(y+1)/(1*h))}for(y=0;y<h;y++)for(_=c/2-y*c/(1*h),b=c/2-(y+1)*c/(1*h),D=s/2,g=0;g<p;g++){M=l/2-(g+1)*l/(1*p);P(C(D,b,f=l/2-g*l/(1*p)),C(D,b,M),C(D,_,M),C(D,_,f),1*g/(1*p),1-1*y/(1*h),(g+1)/(1*p),1-(y+1)/(1*h))}for(g=0;g<p;g++)for(_=-c/2,f=l/2-l*g/(1*p),M=l/2-l*(g+1)/(1*p),E=0;E<m;E++){w=-s/2+(E+1)*s/(1*m);P(C(D=-s/2+E*s/(1*m),_,M),C(w,_,M),C(w,_,f),C(D,_,f),1*E/(1*m),1-1*g/(1*p),(E+1)/(1*m),1-(g+1)/(1*p))}const x=new e.Drawing3D.MeshGeometry(d,v,u);return e.Drawing3D.computeSharpVertexNormals(x),x}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"height":case"depth":case"widthSegments":case"heightSegments":case"depthSegments":this.geometry=r.createMeshGeometry(this.width,this.height,this.depth,this.widthSegments,this.heightSegments,this.depthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-box"})],a),t.PacemBoxElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemCylinderElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n,o){const s=r||1;a||(a=1),i||(i=18),n||(n=5),o||(o=1);const c=[],l=[],m=[],h=t.DEG2RAD*(360/i);c.push({x:0,y:a,z:0}),c.push({x:0,y:0,z:0});const p=s/o;for(let e=1;e<=o;e++)for(var d=p*e,u=0;u<i;u++){const t=2+2*i*(e-1),r=0==u?t+2*(i-1):t+2*(u-1),n=t+2*u,p=Math.cos(h*u),v=-Math.sin(h*u),y=Math.cos(h*(u-1)),_=-Math.sin(h*(u-1)),g=d*p,f=d*v,E={x:g,y:a,z:f},D={x:g,y:0,z:f};c.push(E),c.push(D);const C=.5*d/s,P=p*C,M=v*C,w=y*C,b=_*C;if(1==e){const e=[0,r,n],t=[1,n+1,r+1],a=[{x:.5,y:.5},{x:.5+w,y:.5-b},{x:.5+P,y:.5-M}],i=[{x:.5,y:.5},{x:.5+P,y:.5+M},{x:.5+w,y:.5+b}];Array.prototype.push.apply(m,e),Array.prototype.push.apply(m,t);for(let e=0;e<a.length;e++)l.push(a[e]);for(let e=0;e<i.length;e++)l.push(i[e])}else{const t=2+2*i*(e-2),a=0==u?t+2*(i-1):t+2*(u-1),s=t+2*u,c=(e-1)/o*.5,h=p*c,d=v*c,g=y*c,f=_*c,E={x:.5+w,y:.5-b},D={x:.5+P,y:.5-M},C={x:.5+h,y:.5-d},x={x:.5+g,y:.5-f},A={x:.5+w,y:.5+b},N={x:.5+P,y:.5+M},R={x:.5+h,y:.5+d},S={x:.5+g,y:.5+f};m.push(r),m.push(n),m.push(a),m.push(a),m.push(n),m.push(s),m.push(s+1),m.push(n+1),m.push(r+1),m.push(s+1),m.push(r+1),m.push(a+1),l.push(E),l.push(D),l.push(x),l.push(x),l.push(D),l.push(C),l.push(R),l.push(N),l.push(A),l.push(R),l.push(A),l.push(S)}}const v=2+2*i*o,y=2+2*i*(o-1),_=1/i,g=1/n;for(let e=1;e<=n;e++)for(let t=0;t<i;t++){if(e!=n){var f=s*Math.cos(h*t),E=-s*Math.sin(h*t),D=a*e/n;c.push({x:f,y:D,z:E})}const r=0==t?i-1:t-1,o=1==e?y+2*r+1:v+i*(e-2)+r,p=1==e?y+2*t+1:v+i*(e-2)+t,d=e==n?y+2*t:v+i*(e-1)+t,u=r*_,C=(e-1)*g,P=0==t?1:t*_,M=e*g,w={x:u,y:C},b={x:P,y:C},x={x:P,y:M},A={x:u,y:M};m.push(o),m.push(p),m.push(d),l.push(w),l.push(b),l.push(x),l.push(w),l.push(x),l.push(A)}return new e.Drawing3D.MeshGeometry(c,m,l)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"height":case"sides":case"heightSegments":case"capSegments":this.geometry=r.createMeshGeometry(this.radius,this.height,this.sides,this.heightSegments,this.capSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"capSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-cylinder"})],a),t.PacemCylinderElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;const a=[{x:0,y:0,z:0},{x:0,y:1,z:0}];let i=r=class PacemLineElement extends t.Pacem3DPrimitiveElement{static createLineGeometry(t){return new e.Drawing3D.LineGeometry(t||a)}createDefaultGeometry(){return r.createLineGeometry()}propertyChangedCallback(e,t,a,i){if(super.propertyChangedCallback(e,t,a,i),"positions"===e)this.geometry=r.createLineGeometry(a)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],i.prototype,"positions",void 0),i=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-line"})],i),t.PacemLineElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemPlaneElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i){t||(t=1),r||(r=1),a||(a=4),i||(i=4);const n=[],o=[],s=[],c=[],l=e.Geometry.LinearAlgebra.Vector3D.from(0,0,1);for(let e=0;e<=i;e++)for(let m=0;m<=a;m++){const h=-t/2+m*t/(1*a),p=0,d=-r/2+e*r/(1*i);if(n.push({x:h,y:p,z:d}),e<i&&m<a){const t=a+1,r=(m+1)/(1*a),n=1*m/(1*a),h=1-(e+1)/(1*i),p=1-1*e/(1*i);s.push((e+1)*t+m),s.push((e+1)*t+m+1),s.push(e*t+m+1),s.push((e+1)*t+m),s.push(e*t+m+1),s.push(e*t+m),o.push({x:n,y:h}),o.push({x:r,y:h}),o.push({x:r,y:p}),o.push({x:n,y:h}),o.push({x:r,y:p}),o.push({x:n,y:p}),c.push(l,l,l,l,l,l)}}return new e.Drawing3D.MeshGeometry(n,s,o,c)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"length":case"widthSegments":case"lengthSegments":this.geometry=r.createMeshGeometry(this.width,this.length,this.widthSegments,this.lengthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"length",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"lengthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-plane"})],a),t.PacemPlaneElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r,a,i,n,o;const s=function(e){const t=/([\d.-]+)/i;var r=t.exec(e);const a=[];for(;null!=r;){const i=r[0],n=parseFloat(i);a.push(n),e=e.replace(i,""),r=t.exec(e)}return a},c=e.Geometry.LinearAlgebra.Vector3D;class PolyhedronElement extends t.Pacem3DPrimitiveElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"radius"===e&&this._assignMeshGeometry(r)}_assignMeshGeometry(e){this.geometry=this.createMeshGeometry(e>0?e:1)}createDefaultGeometry(){return this.createMeshGeometry(1)}}__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],PolyhedronElement.prototype,"radius",void 0),t.PolyhedronElement=PolyhedronElement;let l=r=class PacemTetrahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r="0 0.5774 -0.8165, 0 0.5774 0.8165, 0.8165 -0.5774 0, -0.8165 -0.5774 0".split(","),a=[];for(let e=0;e<r.length;e++){const i=r[e],n=s(i);a.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const i="0.5 0.9995, 0.5 0.0004995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995".split(","),n=[4,5,6,7,8,9,10,11,0,3,2,1],o=[];for(let e=0;e<n.length;e++){const t=s(i[n[e]]);o.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(a,[1,2,0,2,3,0,3,1,0,3,2,1],o);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return r.createMeshGeometry(e)}};l=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-tetrahedron"})],l),t.PacemTetrahedronElement=l;let m=a=class PacemOctahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=[6,7,8,9,10,11,12,13,14,15,16,0,17,18,19,20,21,1,2,22,23,4,3,5],a="0 0.7071 -0.7071, 0 0.7071 0.7071, 1 0 0, 0 -0.7071 -0.7071, -1 0 0, 0 -0.7071 0.7071".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=s(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.9995, 0.5 0.9995, 0.0004995 0.5, 0.5 0.9995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.9995".split(","),o=[];for(let e=0;e<r.length;e++){const t=s(n[r[e]]);o.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,1,0,4,5,1,5,2,1,2,5,3,4,3,5],o);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return a.createMeshGeometry(e)}};m=a=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-octahedron"})],m),t.PacemOctahedronElement=m;let h=i=class PacemHexahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=2*t*(1/Math.sqrt(3));return e.Components.Drawing3D.PacemBoxElement.createMeshGeometry(r,r,r)}createMeshGeometry(e=this.radius){return i.createMeshGeometry(e)}};h=i=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-hexahedron"})],h),t.PacemHexahedronElement=h;let p=n=class PacemIcosahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=[12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,26,27,28,29,30,31,32,33,1,34,35,36,2,37,38,39,40,41,42,43,7,44,45,46,8,47,48,49,50,51,52,53,9,54,55,3,10,56,57,6,58,59,5,4,11],a="0 0.850651 -0.525731, 0 0.850651 0.525731, 0.850651 0.525731 0, 0.525731 0 -0.850651, -0.525731 0 -0.850651, -0.850651 0.525731 0, -0.525731 0 0.850651, 0.525731 0 0.850651, 0.850651 -0.525731 0, 0 -0.850651 0.525731, 0 -0.850651 -0.525731, -0.850651 -0.525731 0".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=s(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.808708, 0.5 0.999501, 0.5 0.808708, 0.191292 0.5, 0.000499547 0.5, 0.5 0.808708, 0.9995 0.5, 0.808708 0.5,0.000499487 0.5, 0.5 0.191292, 0.5 0.000499487, 0.5 0.191292,0.5 0.191292, 0.999501 0.5, 0.5 0.808708, 0.5 0.808708,0.9995 0.5, 0.808708 0.999501, 0.191292 0.5, 0.808708 0.5,0.5 0.999501, 0.808708 0.5, 0.999501 0.808708, 0.5 0.999501,0.000499487 0.5, 0.5 0.191292, 0.5 0.808708, 0.9995 0.5,0.808708 0.999501, 0.191292 0.5, 0.808708 0.5, 0.5 0.999501,0.808708 0.5, 0.999501 0.808708, 0.5 0.808708, 0.5 0.191292,0.9995 0.5, 0.000499547 0.5, 0.5 0.191292, 0.191292 0.5,0.5 0.000499487, 0.808708 0.5, 0.5 0.000499487, 0.999501 0.191292,0.5 0.191292, 0.808708 0.000499487, 0.9995 0.5, 0.5 0.191292,0.5 0.808708, 0.9995 0.5, 0.5 0.191292, 0.808708 0.000499487,0.999501 0.5, 0.5 0.808708, 0.5 0.000499487, 0.808708 0.5,0.999501 0.191292, 0.808708 0.5, 0.5 0.808708, 0.5 0.191292".split(","),o=[];for(let e=0;e<r.length;e++){const t=s(n[r[e]]);o.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,5,0,5,1,0,5,6,1,6,7,1,7,2,1,2,8,3,2,7,8,6,9,7,9,8,7,8,10,3,8,9,10,6,11,9,11,10,9,10,4,3,10,11,4,6,5,11,5,4,11],o);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return n.createMeshGeometry(e)}};p=n=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-icosahedron"})],p),t.PacemIcosahedronElement=p;let d=o=class PacemDodecahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||(t=1);const r=[c.from(.356822*t,.934172*t,0*t),c.from(-.356822*t,.934172*t,0*t),c.from(.57735*t,.57735*t,-.57735*t),c.from(0*t,.356822*t,-.934172*t),c.from(-.57735*t,.57735*t,-.57735*t),c.from(-.57735*t,.57735*t,.57735*t),c.from(0*t,.356822*t,.934172*t),c.from(.57735*t,.57735*t,.57735*t),c.from(.934172*t,0*t,-.356822*t),c.from(.934172*t,0*t,.356822*t),c.from(0*t,-.356822*t,.934172*t),c.from(.57735*t,-.57735*t,.57735*t),c.from(.57735*t,-.57735*t,-.57735*t),c.from(.356822*t,-.934172*t,0*t),c.from(-.57735*t,-.57735*t,.57735*t),c.from(-.356822*t,-.934172*t,0*t),c.from(0*t,-.356822*t,-.934172*t),c.from(-.57735*t,-.57735*t,-.57735*t),c.from(-.934172*t,0*t,.356822*t),c.from(-.934172*t,0*t,-.356822*t)],a=[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,0,46,47,48,49,50,51,7,52,53,54,55,56,57,58,59,60,61,9,62,63,64,65,66,67,11,68,69,70,71,72,73,74,75,76,77,13,78,79,80,81,82,83,15,84,85,86,87,88,89,90,91,92,93,17,94,95,96,97,98,99,19,1,4,100,14,101,102,10,103,18,6,5,104,2,105,106,8,107,3,12,16],i="0.5 0.999501, 0.5 0.999501, 0.191292 0.808708, 0.5 0.690792, 0.191292 0.808708, 0.191292 0.808708, 0.5 0.690792, 0.808708 0.808708, 0.000499517 0.5, 0.309208 0.5, 0.5 0.309208, 0.191292 0.191292, 0.191292 0.191292, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.5 0.309208, 0.808708 0.191292, 0.000499517 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.309208 0.5, 0.5 0.000499517, 0.808708 0.191292, 0.309208 0.5, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.690792 0.5, 0.191292 0.808708, 0.690792 0.5, 0.808708 0.808708, 0.191292 0.808708, 0.808708 0.808708, 0.808708 0.808708, 0.5 0.690792, 0.5 0.309208, 0.808708 0.808708, 0.5 0.309208, 0.808708 0.191292, 0.808708 0.191292, 0.9995 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.690792 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.5 0.000499517, 0.808708 0.191292, 0.690792 0.5, 0.5 0.000499517, 0.690792 0.5, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.9995 0.5, 0.808708 0.808708, 0.5 0.690792, 0.9995 0.5, 0.5 0.690792, 0.5 0.309208, 0.9995 0.5, 0.5 0.309208, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.309208 0.5, 0.808708 0.808708, 0.5 0.999501, 0.000499517 0.5, 0.5 0.309208, 0.000499517 0.5, 0.5 0.690792, 0.5 0.690792, 0.000499517 0.5, 0.5 0.690792, 0.191292 0.191292".split(","),n=[];for(let e=0;e<a.length;e++){const t=s(i[a[e]]);n.push({x:t[0],y:t[1]})}const o=new e.Drawing3D.MeshGeometry(r,[0,2,3,0,3,4,0,4,1,1,5,6,1,6,7,1,7,0,7,9,8,7,8,2,7,2,0,7,6,10,7,10,11,7,11,9,11,13,12,11,12,8,11,8,9,11,10,14,11,14,15,11,15,13,15,17,16,15,16,12,15,12,13,15,14,18,15,18,19,15,19,17,19,4,3,19,3,16,19,16,17,19,18,5,19,5,1,19,1,4,18,14,10,18,10,6,18,6,5,3,2,8,3,8,12,3,12,16],n);return e.Drawing3D.computeSharpVertexNormals(o),o}createMeshGeometry(e=this.radius){return o.createMeshGeometry(e)}};d=o=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-dodecahedron"})],d),t.PacemDodecahedronElement=d}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemSphereElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a){const i=[],n=[],o=[],s=r||1,c=a||8,l=t.DEG2RAD*(360/c),m=c%2==0?c/2:(c-1)/2;i.push({x:0,y:s,z:0});for(let e=1;e<m;e++){const t=l*e,r=Math.cos(t),a=Math.sin(t),h=1-1*e/m;for(let t=0;t<c;t++){const p=l*t-Math.PI/2,d=s*a*Math.cos(p),u=s*r,v=s*a*Math.sin(p);i.push({x:d,y:u,z:v});const y=0==t?c-1:t-1,_=0==t?0:1-1*t/c,g=1-1*y/c;if(1==e)o.push(1+t),o.push(1+y),o.push(0),n.push({x:_,y:h}),n.push({x:g,y:h}),n.push({x:.5,y:1});else{o.push((e-1)*c+t+1),o.push((e-1)*c+y+1),o.push((e-2)*c+y+1),o.push((e-1)*c+t+1),o.push((e-2)*c+y+1),o.push((e-2)*c+t+1);const r=1-(e-1)/m;n.push({x:_,y:h}),n.push({x:g,y:h}),n.push({x:g,y:r}),n.push({x:_,y:h}),n.push({x:g,y:r}),n.push({x:_,y:r})}}}i.push({x:0,y:-s,z:0});const h=i.length-1;for(let e=0;e<c;e++){const t=m-2,r=0==e?c-1:e-1,a=0==e?0:1-1*e/c,i=1-1*r/c,s=1-(t+1)/m;o.push(h),o.push(t*c+1+r),o.push(t*c+1+e),n.push({x:.5,y:0}),n.push({x:i,y:s}),n.push({x:a,y:s})}return new e.Drawing3D.MeshGeometry(i,o,n)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"segments":this.geometry=r.createMeshGeometry(this.radius,this.segments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-sphere"})],a),t.PacemSphereElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemTorusElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n){const o=[],s=[],c=[];i||(i=24),n||(n=12);const l=t.DEG2RAD*(360/i),m=t.DEG2RAD*(360/n),h=r||1,p=a||.25;for(let e=0;e<i;e++){const t=l*e-Math.PI/2,r=Math.sin(t),a=Math.cos(t);for(let t=0;t<n;t++){const l=m*t+Math.PI,d=Math.cos(l),u=h*a+p*d*a,v=p*Math.sin(l),y=h*r+p*d*r;o.push({x:u,y:v,z:y});const _=e>0?e-1:i-1,g=t>0?t-1:n-1,f=0==e?0:1-1*e/i,E=t>0?1*t/n:1,D=e>0?1-(e-1)/i:1/i,C=t>0?(t-1)/n:1-1/n;c.push(e*n+g),c.push(_*n+g),c.push(_*n+t),c.push(e*n+g),c.push(_*n+t),c.push(e*n+t),s.push({x:f,y:C}),s.push({x:D,y:C}),s.push({x:D,y:E}),s.push({x:f,y:C}),s.push({x:D,y:E}),s.push({x:f,y:E})}}return new e.Drawing3D.MeshGeometry(o,c,s)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"innerRadius":case"segments":case"sides":this.geometry=r.createMeshGeometry(this.radius,this.innerRadius,this.segments,this.sides)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"innerRadius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-torus"})],a),t.PacemTorusElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-gerrha (https://js.pacem.it)
2
+ * pacem v0.40.0-heliopolis (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.0-gerrha",
2
+ "version": "0.40.0-heliopolis",
3
3
  "name": "pacem",
4
4
  "homepage": "https://js.pacem.it",
5
5
  "repository": {