x_ite
Version:
X_ITE X3D Browser, view and manipulate X3D, VRML, glTF and other 3D sources in HTML.
2 lines • 1.39 MB
JavaScript
/* X_ITE v12.0.4 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.X3D=t():e.X3D=t()}(self,()=>(()=>{var t={36:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(6890),s=i(8282);const r={get ENVIRONMENT(){return n.A?"BROWSER":"object"==typeof process&&-1!==process.release.name.search(/node|io.js/)?"NODE":"BROWSER"},WEAK_REF:"undefined"!=typeof WeakRef,FINALIZATION_REGISTRY:"undefined"!=typeof FinalizationRegistry};(()=>{function e(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]}const t=Reflect.getPrototypeOf(Int8Array);for(const i of[Array,String,t])void 0===i.prototype.at&&Object.defineProperty(i.prototype,"at",{value:e,writable:!0,enumerable:!1,configurable:!0})})(),r.WEAK_REF||(n.A&&console.info("Added shim for WeakRef."),window.WeakRef=class{#e;constructor(e){this.#e=e}deref(){return this.#e}}),r.FINALIZATION_REGISTRY||(n.A&&console.info("Added shim for FinalizationRegistry."),window.FinalizationRegistry=class{register(){}unregister(){}}),(()=>{for(const e of[Map,WeakMap])e.prototype.getOrInsert??=function(e,t){return this.has(e)?this.get(e):(this.set(e,t),t)};for(const e of[Map,WeakMap])e.prototype.getOrInsertComputed??=function(e,t){if(this.has(e))return this.get(e);const i=t(e);return this.set(e,i),i}})();const o=r,a=s.A.add("Features",o)},121:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(2152),s=i(1552),r=i(8021),o=i(988),a=i(4060),l=i(8282);const h=Symbol();function c(e){s.A.call(this,e),this.addType(r.A.X3DNode)}Object.assign(Object.setPrototypeOf(c.prototype,s.A.prototype),{getComponentInfo(){return this.constructor.componentInfo},getContainerField(){return this.constructor.containerField},getSpecificationRange(){return this.constructor.specificationRange},create(e=this.getExecutionContext()){return new this.constructor(e)},copy(e){if(e?.getType().includes(r.A.X3DExecutionContext)??1){const t=this.create(e);for(const e of this.getPredefinedFields())t.getPredefinedFields().get(e.getName()).assign(e);if(this.canUserDefinedFields())for(const e of this.getUserDefinedFields())t.addUserDefinedField(e.getAccessType(),e.getName(),e.copy());return t}{const t=e.getBody();if(this.getName().length){const e=t.getNamedNodes().get(this.getName());if(e)return e.getValue()}const i=this.create(t);this.getNeedsName()&&this.getExecutionContext().updateNamedNode(this.getExecutionContext().getUniqueName(),this),this.getName().length&&t.updateNamedNode(this.getName(),i);for(const t of this.getPredefinedFields())try{const n=i.getPredefinedField(t.getName());let s=!1;for(const e of t.getReferences())s||=e.isInitializable();if(t.isInitializable()&&!s)switch(t.getType()){case r.A.SFNode:case r.A.MFNode:n.assign(t.copy(e));break;default:n.assign(t)}if(t.getReferences().size)for(const i of t.getReferences())try{n.addReference(e.getField(i.getName()))}catch(e){console.error(e)}n.setModificationTime(t.getModificationTime())}catch(e){console.error(e)}for(const t of this.getUserDefinedFields()){let n=!1;for(const e of t.getReferences())n||=e.isInitializable();const s=n?t.create():t.copy(e);if(i.addUserDefinedField(t.getAccessType(),t.getName(),s),t.getReferences().size)for(const i of t.getReferences())try{s.addReference(e.getField(i.getName()))}catch(t){console.error(`No reference '${i.getName()}' inside execution context ${e.getTypeName()} '${e.getName()}'.`)}s.setModificationTime(t.getModificationTime())}return i}},getDisplayName(){return this.getName().replace(/_\d+$/,"")},getNeedsName(){if(this.getName().length)return!1;if(this.getCloneCount()>1)return!0;if(this.hasRoutes())return!0;const e=this.getExecutionContext();for(const t of e.getImportedNodes())if(t.getInlineNode()===this)return!0;if(e.isScene)for(const t of e.getExportedNodes())if(t.getLocalNode()===this)return!0;return!1},hasRoutes(){for(const e of this.getPredefinedFields())if(e.getInputRoutes().size||e.getOutputRoutes().size)return!0;for(const e of this.getUserDefinedFields())if(e.getInputRoutes().size||e.getOutputRoutes().size)return!0;for(const e of this.getExecutionContext().getRoutes())if(e.getSourceNode()===this||e.getDestinationNode()===this)return!0;return!1},getCloneCount(){return s.A.prototype.collectCloneCount.call(this)},collectCloneCount:()=>1,getSourceText:()=>null,traverse(){},hasMetaData(e){const t=e.split("/");if(t.length<2)return!1;const i=t.pop(),n=this.getMetadataSet(t),s=n?.getValue().getMetaValue(i);return!!s},getMetaData(e,t){const i=e.split("/");if(i.length<2)return;const n=i.pop(),s=this.getMetadataSet(i),a=s?.getValue().getMetaValue(n);if(t instanceof o.A){if(!a)return t;switch(t.getType()){case r.A.SFBool:case r.A.SFDouble:case r.A.SFFloat:case r.A.SFInt32:case r.A.SFString:case r.A.SFTime:t.setValue(a.value[0]);break;case r.A.SFColor:case r.A.SFColorRGBA:case r.A.SFMatrix3d:case r.A.SFMatrix3f:case r.A.SFMatrix4d:case r.A.SFMatrix4f:case r.A.SFRotation:case r.A.SFVec2d:case r.A.SFVec2f:case r.A.SFVec3d:case r.A.SFVec3f:case r.A.SFVec4d:case r.A.SFVec4f:{const e=a.value;let i=0;for(const n in t)t[n]=e[i++];break}case r.A.SFImage:{const e=a.value,i=t.array;t.width=e[0],t.height=e[1],t.comp=e[2];const n=i.length;for(let t=0;t<n;++t)i[t]=e[3+t];break}case r.A.SFNode:case r.A.MFNode:throw new Error("SFNode and MFNode are not supported as metadata value.");case r.A.MFBool:case r.A.MFDouble:case r.A.MFFloat:case r.A.MFInt32:case r.A.MFString:case r.A.MFTime:t.length=0;for(const e of a.value)t.push(e);break;case r.A.MFColor:case r.A.MFColorRGBA:case r.A.MFMatrix3d:case r.A.MFMatrix3f:case r.A.MFMatrix4d:case r.A.MFMatrix4f:case r.A.MFRotation:case r.A.MFVec2d:case r.A.MFVec2f:case r.A.MFVec3d:case r.A.MFVec3f:case r.A.MFVec4d:case r.A.MFVec4f:{const e=a.value,i=e.length;t.length=0;for(let n=0;n<i;){const i=t.length++,s=t[i];for(const t in s)s[t]=e[n++]}break}case r.A.MFImage:{const e=a.value,i=e.length;t.length=0;for(let n=0;n<i;){const i=t.length++,s=t[i],r=s.array;s.width=e[n++],s.height=e[n++],s.comp=e[n++];const o=r.length;for(let t=0;t<o;++t)r[t]=e[n++]}break}}return t}if(t){if(!a)return t;const e=a.value;let i=0;for(const n in t)t[n]=e[i++];return t}return a?Array.from(a.value):[]},setMetaData(e,t){const i=e.split("/");if(i.length<2)return;const n=i.pop(),s=this.getMetadataSet(i,!0);if(t instanceof o.A){const e=t;switch(t.getType()){case r.A.SFBool:case r.A.SFDouble:case r.A.SFFloat:case r.A.SFInt32:case r.A.SFString:case r.A.SFTime:t=[e.valueOf()];break;case r.A.SFNode:case r.A.MFNode:throw new Error("SFNode and MFNode are not supported as metadata value.");default:t=Array.from(e,e=>e instanceof o.A?Array.from(e):e).flat()}switch(e.getType()){case r.A.SFBool:case r.A.MFBool:t.type="boolean";break;case r.A.SFDouble:case r.A.SFMatrix3d:case r.A.SFMatrix4d:case r.A.SFRotation:case r.A.SFTime:case r.A.SFVec2d:case r.A.SFVec3d:case r.A.SFVec4d:case r.A.MFDouble:case r.A.MFMatrix3d:case r.A.MFMatrix4d:case r.A.MFRotation:case r.A.MFTime:case r.A.MFVec2d:case r.A.MFVec3d:case r.A.MFVec4d:t.type="double";break;case r.A.SFColor:case r.A.SFColorRGBA:case r.A.SFFloat:case r.A.SFMatrix3f:case r.A.SFMatrix4f:case r.A.SFVec2f:case r.A.SFVec3f:case r.A.SFVec4f:case r.A.MFColor:case r.A.MFColorRGBA:case r.A.MFFloat:case r.A.MFMatrix3f:case r.A.MFMatrix4f:case r.A.MFVec2f:case r.A.MFVec3f:case r.A.MFVec4f:t.type="float";break;case r.A.SFInt32:case r.A.SFImage:case r.A.MFInt32:case r.A.MFImage:t.type="integer";break;case r.A.SFString:case r.A.MFString:t.type="string"}}else!Array.isArray(t)&&t.valueOf()instanceof Object&&((t=Array.from(t)).type="double");s.getValue().setMetaValue(n,t),this.processMetaDataCallback(e)},removeMetaData(e){const t=e.split("/");t.length<2||function e(t,i){if(!t)return!1;const n=i.shift();return i.length&&!e(t.getValue().getMetadataObject("MetadataSet",n),i)||t.getValue().removeMetaValue(n),!t.value.length}(this.getMetadataSet([t.shift()]),t)&&(this._metadata=null)},getMetadataSet(e,t=!1){const i=e.shift();let n=this._metadata.valueOf();if("MetadataSet"!==n?.getNodeTypeName()||n?.name!==i){if(!t)return null;this._metadata=this.getExecutionContext().createNode("MetadataSet"),n=this._metadata.valueOf(),n.reference=this.getBrowser().getBrowserOption("MetadataReference"),n.name=i}for(const i of e)n=n.getValue().getMetadataObject("MetadataSet",i,t);return n},[h]:new Map,addMetaDataCallback(e,t,i){this.hasOwnProperty(h)||(this[h]=new Map);let n=this[h].get(t);n||this[h].set(t,n=new Map),n.set(e,i)},removeMetaDataCallback(e,t){const i=this[h].get(t);i&&(i.delete(e),0===i.size&&this[h].delete(t))},processMetaDataCallback(e){const t=this[h].get(e);if(t)for(const e of t.values())e()},toStream(e){e.string+=this.getTypeName()+" { }"},toVRMLStream(e){if(e.EnterScope(),e.string.match(/^$|[ \t\r\n,\[\]\{\}]$/)||(e.string+=e.Space()),e.outputNames){const t=e.Name(this);if(t.length&&e.ExistsNode(this))return e.string+="USE",e.string+=e.Space(),e.string+=t,void e.LeaveScope();t.length&&(e.AddNode(this),e.string+="DEF",e.string+=e.Space(),e.string+=t,e.string+=e.Space())}e.string+=this.getTypeName(),e.string+=e.TidySpace(),e.string+="{";const t=this.getChangedFields(),i=this.getUserDefinedFields();if(this.canUserDefinedFields()&&i.length){let n=0,s=0;for(const t of i)n=Math.max(n,t.getTypeName().length),s=Math.max(s,e.AccessType(t.getAccessType()).length);e.string+=e.TidyBreak(),e.IncIndent();const r=i.at(-1);for(const t of i)this.toVRMLStreamUserDefinedField(e,t,n,s),e.string+=t===r?e.TidyBreak():e.Break();e.DecIndent(),0!==t.length&&(e.string+=e.TidyBreak())}if(0===t.length)i.length?e.string+=e.Indent():e.string+=e.TidySpace();else{const n=t.at(-1);0===i.length&&(e.string+=e.TidyBreak()),e.IncIndent();for(const i of t)this.toVRMLStreamField(e,i),e.string+=i===n?e.TidyBreak():e.Break();e.DecIndent(),e.string+=e.Indent()}e.string+="}",e.LeaveScope()},toVRMLStreamUserDefinedField(e,t,i,n){const s=e.IsSharedNode(this);if(0===t.getReferences().size||!e.ExecutionContext()||s)e.string+=e.Indent(),e.string+=e.AccessType(t.getAccessType()).padEnd(n,e.TidySpace()),e.string+=e.Space(),e.string+=t.getTypeName().padEnd(i,e.TidySpace()),e.string+=e.Space(),e.string+=t.getName(),t.isInitializable()&&(e.string+=e.Space(),t.toVRMLStream(e));else{let s=0,o=!1;for(const r of t.getReferences())o||=r.isInitializable(),e.string+=e.Indent(),e.string+=e.AccessType(t.getAccessType()).padEnd(n,e.TidySpace()),e.string+=e.Space(),e.string+=t.getTypeName().padEnd(i,e.TidySpace()),e.string+=e.Space(),e.string+=t.getName(),e.string+=e.Space(),e.string+="IS",e.string+=e.Space(),e.string+=r.getName(),++s,s!==t.getReferences().size&&(e.string+=e.Break());t.getAccessType()!==r.A.inputOutput||o||t.isDefaultValue()||(e.string+=e.Break(),e.string+=e.Indent(),e.string+=e.AccessType(t.getAccessType()).padEnd(n,e.TidySpace()),e.string+=e.Space(),e.string+=t.getTypeName().padEnd(i,e.TidySpace()),e.string+=e.Space(),e.string+=t.getName(),t.isInitializable()&&(e.string+=e.Space(),t.toVRMLStream(e)))}},toVRMLStreamField(e,t){const i=e.IsSharedNode(this);if(0===t.getReferences().size||!e.ExecutionContext()||i)t.isInitializable()&&(e.string+=e.Indent(),e.string+=t.getName(),e.string+=e.Space(),t.toVRMLStream(e));else{let i=0,n=!1;for(const s of t.getReferences())n||=s.isInitializable(),e.string+=e.Indent(),e.string+=t.getName(),e.string+=e.Space(),e.string+="IS",e.string+=e.Space(),e.string+=s.getName(),++i,i!==t.getReferences().size&&(e.string+=e.Break());t.getAccessType()!==r.A.inputOutput||n||this.isDefaultValue(t)||(e.string+=e.Break(),e.string+=e.Indent(),e.string+=t.getName(),e.string+=e.Space(),t.toVRMLStream(e))}},toXMLStream(e){const t=e.IsSharedNode(this);e.EnterScope();const i=e.Name(this);if(i.length&&e.ExistsNode(this)){e.string+=e.Indent(),e.string+="<",e.string+=this.getTypeName(),e.html&&"Script"===this.getTypeName()&&(e.string+=e.Space(),e.string+="type='model/x3d+xml'"),e.string+=e.Space(),e.string+="USE='",e.string+=e.XMLEncode(i),e.string+="'";const t=e.ContainerField();return t&&t.getName()!==this.getContainerField()&&(e.string+=e.Space(),e.string+="containerField='",e.string+=e.XMLEncode(t.getName()),e.string+="'"),e.closingTags?(e.string+="></",e.string+=this.getTypeName(),e.string+=">"):e.string+="/>",void e.LeaveScope()}e.string+=e.Indent(),e.string+="<",e.string+=this.getTypeName(),e.html&&"Script"===this.getTypeName()&&(e.string+=e.Space(),e.string+="type='model/x3d+xml'"),i.length&&(e.AddNode(this),e.string+=e.Space(),e.string+="DEF='",e.string+=e.XMLEncode(i),e.string+="'");const n=e.ContainerField();n&&n.getName()!==this.getContainerField()&&(e.string+=e.Space(),e.string+="containerField='",e.string+=e.XMLEncode(n.getName()),e.string+="'");const s=this.getChangedFields(),o=this.getUserDefinedFields(),a=[],l=[];let h=this.getSourceText();(0===h?.length||e.html&&"Script"!==this.getTypeName())&&(h=null),e.IncIndent(),e.IncIndent();for(const i of s){let n=!1;if(e.ExecutionContext()&&i.getAccessType()===r.A.inputOutput&&0!==i.getReferences().size&&(Array.from(i.getReferences()).some(e=>e.isInitializable())||(n=!this.isDefaultValue(i))),0===i.getReferences().size||!e.ExecutionContext()||t||n){if(n&&a.push(i),i.isInitializable())switch(i.getType()){case r.A.SFNode:case r.A.MFNode:l.push(i);break;default:if(i===h)break;e.string+=e.AttribBreak(),e.string+=e.ListIndent(),e.string+=i.getName(),e.string+="='",i.toXMLStream(e,i===this.getSourceText()),e.string+="'"}}else a.push(i)}if(e.DecIndent(),e.DecIndent(),this.canUserDefinedFields()&&o.length||a.length&&!t||l.length||h){if(e.string+=">",e.string+=e.TidyBreak(),e.IncIndent(),this.canUserDefinedFields())for(const i of o){e.string+=e.Indent(),e.string+="<field",e.string+=e.Space(),e.string+="accessType='",e.string+=e.AccessType(i.getAccessType()),e.string+="'",e.string+=e.Space(),e.string+="type='",e.string+=i.getTypeName(),e.string+="'",e.string+=e.Space(),e.string+="name='",e.string+=e.XMLEncode(i.getName()),e.string+="'";let n=!1;if(e.ExecutionContext()&&i.getAccessType()===r.A.inputOutput&&0!==i.getReferences().size&&(Array.from(i.getReferences()).some(e=>e.isInitializable())||(n=!0)),0===i.getReferences().size||!e.ExecutionContext()||t||n)if(n&&e.ExecutionContext()&&a.push(i),!i.isInitializable()||i.isDefaultValue())e.XMLAppInfo(i),e.XMLDocumentation(i),e.string+=e.closingTags?"></field>":"/>",e.string+=e.TidyBreak();else switch(i.getType()){case r.A.SFNode:case r.A.MFNode:e.XMLAppInfo(i),e.XMLDocumentation(i),e.PushContainerField(null),e.string+=">",e.string+=e.TidyBreak(),e.IncIndent(),i.toXMLStream(e),e.string+=e.TidyBreak(),e.DecIndent(),e.string+=e.Indent(),e.string+="</field>",e.string+=e.TidyBreak(),e.PopContainerField();break;default:e.string+=e.Space(),e.string+="value='",i.toXMLStream(e),e.string+="'",e.XMLAppInfo(i),e.XMLDocumentation(i),e.string+=e.closingTags?"></field>":"/>",e.string+=e.TidyBreak()}else e.ExecutionContext()&&a.push(i),e.XMLAppInfo(i),e.XMLDocumentation(i),e.string+=e.closingTags?"></field>":"/>",e.string+=e.TidyBreak()}if(a.length&&!t){e.string+=e.Indent(),e.string+="<IS>",e.string+=e.TidyBreak(),e.IncIndent();for(const t of a){const i=t.getReferences();for(const n of i)e.string+=e.Indent(),e.string+="<connect",e.string+=e.Space(),e.string+="nodeField='",e.string+=e.XMLEncode(t.getName()),e.string+="'",e.string+=e.Space(),e.string+="protoField='",e.string+=e.XMLEncode(n.getName()),e.string+="'",e.string+=e.closingTags?"></connect>":"/>",e.string+=e.TidyBreak()}e.DecIndent(),e.string+=e.Indent(),e.string+="</IS>",e.string+=e.TidyBreak()}for(const t of l)e.PushContainerField(t),t.toXMLStream(e),e.string+=e.TidyBreak(),e.PopContainerField();if(h)for(const t of h)e.string+="<![CDATA[",e.string+=t,e.string+="]]>",e.string+=e.TidyBreak();e.DecIndent(),e.string+=e.Indent(),e.string+="</",e.string+=this.getTypeName(),e.string+=">"}else e.closingTags?(e.string+="></",e.string+=this.getTypeName(),e.string+=">"):e.string+="/>";e.LeaveScope()},toJSONStream(e){const t=e.IsSharedNode(this);e.EnterScope();const i=e.Name(this);if(i.length&&e.ExistsNode(this))return e.string+="{",e.string+=e.TidySpace(),e.string+='"',e.string+=this.getTypeName(),e.string+='"',e.string+=":",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+='"',e.string+="@USE",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.JSONEncode(i),e.string+='"',e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",void e.LeaveScope();e.string+="{",e.string+=e.TidySpace(),e.string+='"',e.string+=this.getTypeName(),e.string+='"',e.string+=":",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),i.length&&(e.AddNode(this),e.string+=e.Indent(),e.string+='"',e.string+="@DEF",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.JSONEncode(i),e.string+='"',e.string+=",",e.string+=e.TidyBreak());const n=this.getChangedFields(),s=this.getUserDefinedFields(),o=[];let a=this.getSourceText();if(a&&1!==a.length&&(a=null),n.length){const i=[];for(const s of n){let n=!1;e.ExecutionContext()&&s.getAccessType()===r.A.inputOutput&&0!==s.getReferences().size&&(Array.from(s.getReferences()).some(e=>e.isInitializable())||(n=!this.isDefaultValue(s))),0===s.getReferences().size||!e.ExecutionContext()||t||n?(n&&o.push(s),s!==a&&i.push(s)):o.push(s)}for(const t of i)if(t.isInitializable()){switch(t.getType()){case r.A.SFNode:case r.A.MFNode:e.string+=e.Indent(),e.string+='"',e.string+="-",e.string+=t.getName(),e.string+='"',e.string+=":",e.string+=e.TidySpace(),t.toJSONStream(e);break;default:e.string+=e.Indent(),e.string+='"',e.string+="@",e.string+=t.getName(),e.string+='"',e.string+=":",e.string+=e.TidySpace(),t.toJSONStream(e)}e.string+=",",e.string+=e.TidyBreak()}}if(this.canUserDefinedFields()&&s.length){e.string+=e.Indent(),e.string+='"',e.string+="field",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+="[",e.string+=e.TidyBreak(),e.string+=e.IncIndent();for(const i of s){e.string+=e.Indent(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+='"',e.string+="@accessType",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.AccessType(i.getAccessType()),e.string+='"',e.string+=",",e.string+=e.TidyBreak(),e.string+=e.Indent(),e.string+='"',e.string+="@type",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=i.getTypeName(),e.string+='"',e.string+=",",e.string+=e.TidyBreak(),e.string+=e.Indent(),e.string+='"',e.string+="@name",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.JSONEncode(i.getName()),e.string+='"';let n=!1;if(e.ExecutionContext()&&i.getAccessType()===r.A.inputOutput&&0!==i.getReferences().size&&(Array.from(i.getReferences()).some(e=>e.isInitializable())||(n=!0)),0===i.getReferences().size||!e.ExecutionContext()||t||n)if(n&&e.ExecutionContext()&&o.push(i),!i.isInitializable()||i.isDefaultValue());else switch(e.string+=",",e.string+=e.TidyBreak(),i.getType()){case r.A.SFNode:e.string+=e.Indent(),e.string+='"',e.string+="-children",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+="[",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),i.toJSONStream(e),e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="]";break;case r.A.MFNode:e.string+=e.Indent(),e.string+='"',e.string+="-children",e.string+='"',e.string+=":",e.string+=e.TidySpace(),i.toJSONStream(e);break;default:e.string+=e.Indent(),e.string+='"',e.string+="@value",e.string+='"',e.string+=":",e.string+=e.TidySpace(),i.toJSONStream(e)}else e.ExecutionContext()&&o.push(i);e.JSONAppInfo(i),e.JSONDocumentation(i),e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",i!==s.at(-1)&&(e.string+=","),e.string+=e.TidyBreak()}e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="]",e.string+=",",e.string+=e.TidyBreak()}else;if(a){e.string+=e.Indent(),e.string+='"',e.string+="#sourceCode",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+="[",e.string+=e.TidyBreak(),e.string+=e.IncIndent();const t=a[0].split("\n");for(let i=0,n=t.length;i<n;++i)e.string+=e.ListIndent(),e.string+='"',e.string+=e.JSONEncode(t[i]),e.string+='"',i!==n-1&&(e.string+=","),e.string+=e.TidyBreak();e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="]",e.string+=",",e.string+=e.TidyBreak()}if(o.length&&!t){e.string+=e.Indent(),e.string+='"',e.string+="IS",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+='"',e.string+="connect",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+="[",e.string+=e.TidyBreak(),e.string+=e.IncIndent();for(const t of o){const i=Array.from(t.getReferences());for(const n of i)e.string+=e.Indent(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+='"',e.string+="@nodeField",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.JSONEncode(t.getName()),e.string+='"',e.string+=",",e.string+=e.TidyBreak(),e.string+=e.Indent(),e.string+='"',e.string+="@protoField",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.JSONEncode(n.getName()),e.string+='"',e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",t===o.at(-1)&&n===i.at(-1)||(e.string+=","),e.string+=e.TidyBreak()}e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="]",e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",e.string+=e.TidyBreak()}e.JSONRemoveComma(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",e.LeaveScope()},dispose(){const e=this.getExecutionContext();if(this.getName()&&e.removeNamedNode(this.getName()),e.isScene){const t=e.getExecutionContext();if(t)for(const e of Array.from(t.getImportedNodes()))try{e.getExportedNode()===this&&t.removeImportedNode(e.getImportedName())}catch(e){}for(const t of Array.from(e.getExportedNodes()))t.getLocalNode()===this&&e.removeExportedNode(t.getExportedName())}for(const e of new Set(this.getParents()))if(e instanceof n.A.SFNode)for(const t of new Set(e.getParents()))t instanceof n.A.MFNode&&t.setValue(Array.from(t).filter(e=>e?.getValue()!==this));for(const e of new Set(this.getParents()))e instanceof n.A.SFNode&&e.setValue(null);a.A.delete(this),s.A.prototype.dispose.call(this)}});for(const e of Object.keys(c.prototype))Object.defineProperty(c.prototype,e,{enumerable:!1});Object.defineProperties(c,{getStaticProperties:{value:(e,t,i,n,s,r="Infinity")=>({typeName:{value:e,enumerable:!0},componentInfo:{value:Object.freeze({name:t,level:i}),enumerable:!0},...n?{containerField:{value:n,enumerable:!0}}:{},...s&&r?{specificationRange:{value:Object.freeze({from:s,to:r}),enumerable:!0}}:{}})}}),Object.defineProperties(c,c.getStaticProperties("X3DNode","Core",1));const d=c,u=l.A.add("X3DNode",d)},147:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var n=i(2152),s=i(5725),r=i(4855),o=i(121),a=i(3635),l=i(4129),h=i(8021),c=i(8282);function d(e){o.A.call(this,e),this.addType(h.A.LayerSet),this.addChildObject(h.A.outputOnly,"activeLayerNode",new n.A.SFNode),this.layerNodes=[new a.A(e)],this.layerNode0=this.layerNodes[0]}Object.assign(Object.setPrototypeOf(d.prototype,o.A.prototype),{initialize(){o.A.prototype.initialize.call(this),this.layerNode0.setPrivate(!0),this.layerNode0.setup(),this.layerNode0.setLayer0(!0),this._activeLayer.addInterest("set_activeLayer__",this),this._order.addInterest("set_layers__",this),this._layers.addInterest("set_layers__",this),this.set_layers__()},getActiveLayer(){return this._activeLayerNode.getValue()},getLayer0(){return this.layerNode0},setLayer0(e){this.layerNode0=e,this.set_layers__()},getLayers(){return this.layerNodes},set_activeLayer__(){let e;if(0===this._activeLayer.getValue())e=this.layerNode0;else{const t=this._activeLayer.getValue()-1;e=t>=0&&t<this._layers.length?(0,l.A)(h.A.X3DLayerNode,this._layers[t]):null}e?._display.getValue()||(e=null),this._activeLayerNode.getValue()!==e&&(this._activeLayerNode=e)},set_layers__(){const e=this._layers.getValue();for(const e of this.layerNodes)e._display.removeInterest("set_layers__",this);this.layerNodes.length=0;for(let t of this._order)if(0===t)this.layerNode0._display.addInterest("set_layers__",this),this.layerNodes.push(this.layerNode0);else if(--t,t>=0&&t<e.length){const i=(0,l.A)(h.A.X3DLayerNode,e[t]);if(!i)continue;i._display.addInterest("set_layers__",this),i._display.getValue()&&this.layerNodes.push(i)}this.set_activeLayer__()},bindBindables(e){this.layerNode0?.bindBindables(e);for(const t of this._layers){const i=(0,l.A)(h.A.X3DLayerNode,t);i?.bindBindables(e)}},traverse(e,t){for(const i of this.layerNodes)i.traverse(e,t)}}),Object.defineProperties(d,{...o.A.getStaticProperties("LayerSet","Layering",1,"children","3.2"),fieldDefinitions:{value:new r.A([new s.A(h.A.inputOutput,"metadata",new n.A.SFNode),new s.A(h.A.inputOutput,"activeLayer",new n.A.SFInt32),new s.A(h.A.inputOutput,"order",new n.A.MFInt32(0)),new s.A(h.A.inputOutput,"layers",new n.A.MFNode)]),enumerable:!0}});const u=d,p=c.A.add("LayerSet",u)},217:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});var n=i(2152),s=i(5725),r=i(4855),o=i(2292),a=i(6755),l=i(8021),h=i(8282);const c=Symbol(),d=Symbol(),u=Symbol();function p(e,t){a.A.call(this,e),o.A.call(this,e),this.addType(l.A.X3DExternProtoDeclaration),this.addChildObjects(l.A.inputOutput,"load",new n.A.SFBool(!0),l.A.inputOutput,"url",t.copy(),l.A.inputOutput,"autoRefresh",new n.A.SFTime(0),l.A.inputOutput,"autoRefreshTimeLimit",new n.A.SFTime(3600)),this.getBrowser()[u]??=new Map}Object.assign(Object.setPrototypeOf(p.prototype,a.A.prototype),o.A.prototype,{initialize(){a.A.prototype.initialize.call(this),o.A.prototype.initialize.call(this)},getAppInfo(){return this[c]?.getAppInfo()||a.A.prototype.getAppInfo.call(this)},setAppInfo(e){this[c]?this[c].setAppInfo(e):a.A.prototype.setAppInfo.call(this,e)},getDocumentation(){return this[c]?.getDocumentation()||a.A.prototype.getDocumentation.call(this)},setDocumentation(e){this[c]?this[c].setDocumentation(e):a.A.prototype.setDocumentation.call(this,e)},getProtoDeclaration(){return this[c]},setProtoDeclaration(e){this[c]=e,e&&(this.getFieldDefinitions().assign(e.getFieldDefinitions()),this.getUserDefinedFields().assign(e.getUserDefinedFields())),this.updateInstances()},async loadData(){const e=this.getBrowser();if(!this._url.length)return void this.setError(new Error("No URL given."));const{default:t}=await Promise.resolve().then(i.bind(i,9023));for(const i of this._url)try{const n=new URL(i,this.getExecutionContext().getBaseURL()),s=new URL(n),r=e.getBrowserOption("Cache");s.hash="";const o=r?e[u].get(s.href):null,a=o??new Promise(e=>{new t(this).createX3DFromURL([s],null,e)});o||s.search||e[u].set(s.href,a);const l=await a;if(!l)continue;return void this.setInternalScene(l,n,r)}catch(e){console.warn(e.message)}this.setError(new Error("File could not be loaded."))},getInternalScene(){return this[d]},setInternalScene(e,t,i){const n=this.getBrowser();this[d]===n.getDefaultScene()||this[u]||this[d]?.dispose(),this[d]=e,this[u]=i;const s=decodeURIComponent(t.hash.substring(1)),r=s?this[d].protos.get(s):this[d].protos[0];if(!r)throw new Error("PROTO not found");this[d].setExecutionContext(this[u]?n.getDefaultScene():this.getExecutionContext()),this[d].setLive(!0),this.setLoadState(l.A.COMPLETE_STATE),this.setProtoDeclaration(r)},setError(e){console.error(`Error loading extern prototype '${this.getName()}':`,e),this[d]=this.getBrowser().getDefaultScene(),this.setLoadState(l.A.FAILED_STATE),this.setProtoDeclaration(null)},toVRMLStream(e){e.string+=e.Indent(),e.string+="EXTERNPROTO",e.string+=e.Space(),e.string+=this.getName(),e.string+=e.TidySpace(),e.string+="[";const t=this.getUserDefinedFields();if(0===t.length)e.string+=e.TidySpace();else{let i=0,n=0;for(const s of t)i=Math.max(i,s.getTypeName().length),n=Math.max(n,e.AccessType(s.getAccessType()).length);e.string+=e.TidyBreak(),e.IncIndent();const s=t.at(-1);for(const r of t)this.toVRMLStreamUserDefinedField(e,r,i,n),e.string+=r===s?e.TidyBreak():e.Break();e.DecIndent(),e.string+=e.Indent()}e.string+="]",e.string+=e.TidyBreak(),e.string+=e.Indent(),this._url.toVRMLStream(e)},toVRMLStreamUserDefinedField(e,t,i,n){e.string+=e.Indent(),e.string+=e.AccessType(t.getAccessType()).padEnd(n,e.TidySpace()),e.string+=e.Space(),e.string+=t.getTypeName().padEnd(i,e.TidySpace()),e.string+=e.Space(),e.string+=t.getName()},toXMLStream(e){e.string+=e.Indent(),e.string+="<ExternProtoDeclare",e.string+=e.Space(),e.string+="name='",e.string+=e.XMLEncode(this.getName()),e.string+="'",e.string+=e.Space(),e.string+="url='",this._url.toXMLStream(e),e.string+="'",e.XMLAppInfo(this),e.XMLDocumentation(this);const t=this.getUserDefinedFields();if(t.length){e.string+=">",e.string+=e.TidyBreak(),e.IncIndent();for(const i of t)e.string+=e.Indent(),e.string+="<field",e.string+=e.Space(),e.string+="accessType='",e.string+=e.AccessType(i.getAccessType()),e.string+="'",e.string+=e.Space(),e.string+="type='",e.string+=i.getTypeName(),e.string+="'",e.string+=e.Space(),e.string+="name='",e.string+=e.XMLEncode(i.getName()),e.string+="'",e.XMLAppInfo(i),e.XMLDocumentation(i),e.string+=e.closingTags?"></field>":"/>",e.string+=e.TidyBreak();e.DecIndent(),e.string+=e.Indent(),e.string+="</ExternProtoDeclare>"}else e.string+=e.closingTags?"></ExternProtoDeclare>":"/>"},toJSONStream(e){e.string+=e.Indent(),e.string+="{",e.string+=e.TidySpace(),e.string+='"',e.string+="ExternProtoDeclare",e.string+='"',e.string+=":",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+='"',e.string+="@name",e.string+='"',e.string+=":",e.string+='"',e.string+=e.JSONEncode(this.getName()),e.string+='"',e.JSONAppInfo(this),e.JSONDocumentation(this),e.string+=",",e.string+=e.TidyBreak();const t=this.getUserDefinedFields();if(t.length){e.string+=e.Indent(),e.string+='"',e.string+="field",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+="[",e.string+=e.TidyBreak(),e.string+=e.IncIndent();for(const i of t)e.string+=e.Indent(),e.string+="{",e.string+=e.TidyBreak(),e.string+=e.IncIndent(),e.string+=e.Indent(),e.string+='"',e.string+="@accessType",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.AccessType(i.getAccessType()),e.string+='"',e.string+=",",e.string+=e.TidyBreak(),e.string+=e.Indent(),e.string+='"',e.string+="@type",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=i.getTypeName(),e.string+='"',e.string+=",",e.string+=e.TidyBreak(),e.string+=e.Indent(),e.string+='"',e.string+="@name",e.string+='"',e.string+=":",e.string+=e.TidySpace(),e.string+='"',e.string+=e.JSONEncode(i.getName()),e.string+='"',e.string+=e.TidyBreak(),e.JSONAppInfo(i),e.JSONDocumentation(i),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",i!==t.at(-1)&&(e.string+=","),e.string+=e.TidyBreak();e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="]",e.string+=",",e.string+=e.TidyBreak()}e.string+=e.Indent(),e.string+='"',e.string+="@url",e.string+='"',e.string+=":",e.string+=e.TidySpace(),this._url.toJSONStream(e),e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}",e.string+=e.TidyBreak(),e.string+=e.DecIndent(),e.string+=e.Indent(),e.string+="}"}});for(const e of Object.keys(p.prototype))Object.defineProperty(p.prototype,e,{enumerable:!1});Object.defineProperties(p.prototype,{isExternProto:{value:!0,enumerable:!0},urls:{get(){return this._url},enumerable:!0},loadState:{get:p.prototype.checkLoadState,enumerable:!0}}),Object.defineProperties(p,{typeName:{value:"X3DExternProtoDeclaration",enumerable:!0},fieldDefinitions:{value:new r.A([new s.A(l.A.inputOutput,"metadata",new n.A.SFNode)]),enumerable:!0}}),l.A.addConstant(p.typeName);const g=p,f=h.A.add("X3DExternProtoDeclaration",g)},230:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});var n=i(2152),s=i(5725),r=i(4855),o=i(121),a=i(4207),l=i(8021),h=i(974),c=i(3078),d=i(3462),u=i(8282);function p(e){a.A.call(this,e),this.addType(l.A.Viewpoint),this._position.setUnit("length"),this._centerOfRotation.setUnit("length"),this._fieldOfView.setUnit("angle"),this.projectionMatrix=new d.A}Object.assign(Object.setPrototypeOf(p.prototype,a.A.prototype),{getRelativeTransformation(e){const t=a.A.prototype.getRelativeTransformation.call(this,e);return e.constructor===this.constructor&&(t.fieldOfView=e.getUserFieldOfView()),t},setInterpolators(e,t){if(e.constructor===this.constructor){const e=t.fieldOfView/this.getUserFieldOfView();this.fieldOfViewScaleInterpolator._keyValue=new n.A.MFFloat(e,this._fieldOfViewScale.getValue()),this._fieldOfViewScale=e}else this.fieldOfViewScaleInterpolator._keyValue=new n.A.MFFloat(this._fieldOfViewScale.getValue(),this._fieldOfViewScale.getValue()),this._fieldOfViewScale=this._fieldOfViewScale.getValue()},getLogarithmicDepthBuffer:()=>!1,getFieldOfView(){const e=this._fieldOfView.getValue();return e>0&&e<Math.PI?e:Math.PI/4},setFieldOfView(e){this._fieldOfView=e},getUserFieldOfView(){const e=this._fieldOfView.getValue()*this._fieldOfViewScale.getValue();return e>0&&e<Math.PI?e:Math.PI/4},getScreenScale(e,t,i){const n=t[2],s=t[3],r=this.getBrowser().getPose(),o=r?1/r.views[0].projectionMatrix[5]:Math.tan(this.getUserFieldOfView()/2);let a=Math.abs(e.z)*o*2;return a/=n>s?s:n,i.set(a,a,a)},getViewportSize:(()=>{const e=new c.A;return function(t,i){const n=t[2],s=t[3],r=i*Math.tan(this.getUserFieldOfView()/2)*2,o=n/s;return o>1?e.set(r*o,r):e.set(r,r/o)}})(),getLookAtDistance(e){return e.size.norm()/2/Math.tan(this.getUserFieldOfView()/2)},getProjectionMatrixWithLimits(e,t,i){return h.A.perspective(this.getUserFieldOfView(),e,t,i[2],i[3],this.projectionMatrix)}}),Object.defineProperties(p,{...o.A.getStaticProperties("Viewpoint","Navigation",1,"children","2.0"),fieldDefinitions:{value:new r.A([new s.A(l.A.inputOutput,"metadata",new n.A.SFNode),new s.A(l.A.inputOnly,"set_bind",new n.A.SFBool),new s.A(l.A.inputOutput,"description",new n.A.SFString),new s.A(l.A.inputOutput,"position",new n.A.SFVec3f(0,0,10)),new s.A(l.A.inputOutput,"orientation",new n.A.SFRotation),new s.A(l.A.inputOutput,"centerOfRotation",new n.A.SFVec3f),new s.A(l.A.inputOutput,"fieldOfView",new n.A.SFFloat(.785398)),new s.A(l.A.inputOutput,"nearDistance",new n.A.SFFloat(-1)),new s.A(l.A.inputOutput,"farDistance",new n.A.SFFloat(-1)),new s.A(l.A.inputOutput,"viewAll",new n.A.SFBool),new s.A(l.A.inputOutput,"jump",new n.A.SFBool(!0)),new s.A(l.A.inputOutput,"retainUserOffsets",new n.A.SFBool),new s.A(l.A.outputOnly,"isBound",new n.A.SFBool),new s.A(l.A.outputOnly,"bindTime",new n.A.SFTime),new s.A(l.A.inputOutput,"navigationInfo",new n.A.SFNode)]),enumerable:!0}});const g=p,f=u.A.add("Viewpoint",g)},345:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(8282);const s={radians:e=>e*(Math.PI/180),degrees:e=>e*(180/Math.PI),random:(e,t)=>e+Math.random()*(t-e),fract:e=>e%1,clamp:(e,t,i)=>Math.min(Math.max(e,t),i),interval:(e,t,i)=>e>=i?(e-t)%(i-t)+t:e<t?(e-i)%(i-t)+i:e,project:(e,t,i,n,s)=>n+(e-t)/(i-t)*(s-n),roundToMultiple:(e,t)=>Math.ceil(e/t)*t,lerp:(e,t,i)=>e+i*(t-e),slerp(e,t,i){let n=e.dot(t);if(n>=1)return e;n<0&&(n=-n,t.negate());const s=Math.acos(n),r=Math.sin(s),o=Math.sin((1-i)*s)/r,a=Math.sin(i*s)/r;return e.x=e.x*o+t.x*a,e.y=e.y*o+t.y*a,e.z=e.z*o+t.z*a,e.w=e.w*o+t.w*a,e},simpleSlerp(e,t,i){const n=e.dot(t);if(n>=1)return e;const s=Math.acos(n),r=Math.sin(s),o=Math.sin((1-i)*s)/r,a=Math.sin(i*s)/r;return e.x=e.x*o+t.x*a,e.y=e.y*o+t.y*a,e.z=e.z*o+t.z*a,e.w=e.w*o+t.w*a,e},isPowerOfTwo:e=>!(e-1&e),nextPowerOfTwo:e=>s.isPowerOfTwo(e)?e:1<<32-Math.clz32(e),bitCount:e=>16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24,cmp:(e,t)=>e>t?1:e<t?-1:0,less:(e,t)=>e<t,greater:(e,t)=>e>t,lowerBound(e,t,i,n,r=s.less){let o=0,a=0,l=i-t;for(;l>0;)a=l>>>1,o=t+a,r(e[o],n)?(t=++o,l-=a+1):l=a;return t},upperBound(e,t,i,n,r=s.less){let o=0,a=0,l=i-t;for(;l>0;)a=l>>>1,o=t+a,r(n,e[o])?l=a:(t=++o,l-=a+1);return t}},r=s,o=n.A.add("Algorithm",r)},409:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(2897),s=i(4262),r=i(8282);function o(e=[]){return n.A.call(this,Array.from(e,e=>[e.category,e]),s.A)}Object.setPrototypeOf(o.prototype,n.A.prototype);for(const e of Object.keys(o.prototype))Object.defineProperty(o.prototype,e,{enumerable:!1});Object.defineProperties(o,{typeName:{value:"UnitInfoArray",enumerable:!0}});const a=o,l=r.A.add("UnitInfoArray",a)},709:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(988),s=(i(36),i(8282));function r(e){n.A.call(this,e)}Object.assign(Object.setPrototypeOf(r.prototype,n.A.prototype),{at:Array.prototype.at,concat:Array.prototype.concat,entries:Array.prototype.entries,every:Array.prototype.every,fill:Array.prototype.fill,filter(){const e=new this.constructor;for(const t of Array.prototype.filter.call(this,...arguments))e.push(t);return e},find:Array.prototype.find,findIndex:Array.prototype.findIndex,findLast:Array.prototype.findLast,findLastIndex:Array.prototype.findLastIndex,flat:Array.prototype.flat,flatMap:Array.prototype.flatMap,forEach:Array.prototype.forEach,includes:Array.prototype.includes,indexOf:Array.prototype.indexOf,join:Array.prototype.join,keys:Array.prototype.keys,lastIndexOf:Array.prototype.lastIndexOf,map(){const e=new this.constructor;for(const t of Array.prototype.map.call(this,...arguments))e.push(t);return e},reduce:Array.prototype.reduce,reduceRight:Array.prototype.reduceRight,reverse:Array.prototype.reverse,slice(){const e=new this.constructor;for(const t of Array.prototype.slice.call(this,...arguments))e.push(t);return e},some:Array.prototype.some,sort:Array.prototype.sort,toReversed(){return this.copy().reverse()},toSorted(){return this.copy().sort(...arguments)},toSpliced(){const e=this.copy();return e.splice(...arguments),e},values:Array.prototype.values,with(e,t){const i=this.copy();return i[e]=t,i}});for(const e of Object.keys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o=r,a=s.A.add("X3DArrayField",o)},891:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(8282);const s={min:0,max:0},r={min:0,max:0};function o(){}function a(e,t,i){i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY;for(const n of e){const e=n.dot(t);e<i.min&&(i.min=e),e>i.max&&(i.max=e)}}function l(e,t,i,n){return h(i,e,t)||h(e,i,n)}function h(e,t,i){return t<=e&&e<=i}o.isSeparated=function(e,t,i){for(const n of e)if(a(t,n,s),a(i,n,r),!l(s.min,s.max,r.min,r.max))return!0;return!1};const c=o,d=n.A.add("SAT",c)},974:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(3797),s=i(8282);const r={frustum(e,t,i,n,s,r,o){const a=t-e,l=n-i,h=r-s,c=2*s,d=(t+e)/a,u=(n+i)/l,p=-(r+s)/h,g=-c*r/h,f=c/a,m=c/l;return o.set(f,0,0,0,0,m,0,0,d,u,p,-1,0,0,g,0)},perspective(e,t,i,n,s,r){const o=Math.tan(e/2)*t;if(n>s){const e=n*o/s;return this.frustum(-e,e,-o,o,t,i,r)}{const e=s*o/n;return this.frustum(-o,o,-e,e,t,i,r)}},perspective2(e,t,i,n,s,r){const o=Math.tan(e/2)*t;return this.frustum(-o,o,-o,o,t,i,r)},ortho(e,t,i,n,s,r,o){const a=t-e,l=n-i,h=r-s,c=2/a,d=2/l,u=-2/h,p=-(t+e)/a,g=-(n+i)/l,f=-(r+s)/h;return o.set(c,0,0,0,0,d,0,0,0,0,u,0,p,g,f,1)},orthoBox:(()=>{const e=new n.A,t=new n.A;return function(i,n){return i.getExtents(e,t),this.ortho(e.x,t.x,e.y,t.y,-t.z,-e.z,n)}})()},o=s.A.add("Camera",r)},988:(e,t,i)=>{"use strict";i.d(t,{A:()=>T});var n=i(1141),s=i(8021),r=i(9800),o=i(6823),a=i(8282);const l=Symbol(),h=Symbol(),c=Symbol(),d=Symbol(),u=Symbol(),p=Symbol(),g=Symbol(),f=Symbol(),m=Symbol(),A=Symbol(),_=Symbol(),y=Symbol(),w=Symbol.for("X_ITE.X3DField.uniformLocation"),x=[];function S(e){n.A.call(this),this[l]=e}Object.assign(Object.setPrototypeOf(S.prototype,n.A.prototype),{[l]:void 0,[h]:s.A.initializeOnly,[c]:void 0,[d]:null,[u]:null,[p]:null,[g]:null,[f]:null,[m]:null,[A]:null,[w]:null,[_]:"",[y]:"",create(){return new this.constructor},equals(e){return this[l]===e.valueOf()},assign(e){this.set(e.getValue()),this.addEvent()},set(e){this[l]=e},setValue(e){this.set(e instanceof this.constructor?e.getValue():e),this.addEvent()},getValue(){return this[l]},getType(){return s.A[this.constructor.typeName]},setAccessType(e){this[h]=e},getAccessType(){return this[h]},isInitializable(){return!!(this[h]&s.A.initializeOnly)},isInput(){return!!(this[h]&s.A.inputOnly)},isOutput(){return!!(this[h]&s.A.outputOnly)},isReadable(){return this[h]!==s.A.inputOnly},isWritable(){return this[h]!==s.A.outputOnly},setUnit(e){this[c]=e},getUnit(){return this[c]},isReference(e){return e===this[h]||e===s.A.inputOutput},addReference(e){const t=this.getReferences();if(!t.has(e)){switch(t.add(e),this.getAccessType()&e.getAccessType()){case s.A.initializeOnly:e.addFieldInterest(this),this.processEvent(r.A.from(e));break;case s.A.inputOnly:e.addFieldInterest(this);break;case s.A.outputOnly:this.addFieldInterest(e);break;case s.A.inputOutput:e.addFieldInterest(this),this.addFieldInterest(e),this.processEvent(r.A.from(e))}this.processReferencesCallbacks()}},removeReference(e){switch(this[d]?.delete(e),this.getAccessType()&e.getAccessType()){case s.A.initializeOnly:case s.A.inputOnly:e.removeFieldInterest(this);break;case s.A.outputOnly:this.removeFieldInterest(e);break;case s.A.inputOutput:e.removeFieldInterest(this),this.removeFieldInterest(e)}this.processReferencesCallbacks()},getReferences(){return this[d]??=new o.A},addReferencesCallback(e,t){this[u]=new Map(this[u]),this[u].set(e,t)},removeReferencesCallback(e){this[u]?.delete(e)},getReferencesCallbacks(){return this[u]??=new Map},processReferencesCallbacks(){for(const e of this[u]?.values()??x)e()},addFieldInterest(e){this.getFieldInterests().add(e)},removeFieldInterest(e){this[p]?.delete(e)},getFieldInterests(){return this[p]??=new o.A},addFieldCallback(e,t){this[g]=new Map(this[g]),this[g].set(e,t)},removeFieldCallback(e){this[g]?.delete(e)},getFieldCallbacks(){return this[g]??=new Map},addInputRoute(e){this.getInputRoutes().add(e),this.processRouteCallbacks()},removeInputRoute(e){this[f]?.delete(e),this.processRouteCallbacks()},getInputRoutes(){return this[f]??=new o.A},addOutputRoute(e){this.getOutputRoutes().add(e),this.processRouteCallbacks()},removeOutputRoute(e){this[m]?.delete(e),this.processRouteCallbacks()},getOutputRoutes(){return this[m]??=new o.A},addRouteCallback(e,t){this[A]=new Map(this[A]),this[A].set(e,t)},removeRouteCallback(e){this[A]?.delete(e)},getRouteCallbacks(){return this[A]??=new Map},processRouteCallbacks(){for(const e of this[A]?.values()??x)e()},processEvent(e=r.A.create(this)){e.add(this),this.setTainted(!1);const t=e.field;t!==this&&this.set(t.getValue(),t.length),this.processInterests();let i=!0;for(const t of this[p]??x)e.has(t)||(i?(i=!1,t.addEventObject(this,e)):t.addEventObject(this,r.A.copy(e)));i&&r.A.push(e);for(const e of this[g]?.values()??x)e(this.valueOf())},getAppInfo(){return this[_]},setAppInfo(e){this[_]=String(e)},setDocumentation(e){this[y]=String(e)},getDocumentation(){return this[y]},fromString(e,t){this.fromVRMLString(e,t)},fromVRMLString(e,t){},fromXMLString(e,t){},dispose(){for(const e of this[d]??x)e.removeFieldInterest(this);for(const e of new Set(this[f]))e.dispose();for(const e of new Set(this[m]))e.dispose();this[d]?.clear(),this[u]?.clear(),this[p]?.clear(),this[g]?.clear(),this[f]?.clear(),this[m]?.clear(),this[A]?.clear(),n.A.prototype.dispose.call(this)}});for(const e of Object.keys(S.prototype))Object.defineProperty(S.prototype,e,{enumerable:!1});const b=S,T=a.A.add("X3DField",b)},1103:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(3462),s=i(3797),r=i(891),o=i(8282);function a(...e){this.matrix=new n.A,this.set(...arguments)}Object.assign(a.prototype,{copy(){const e=Object.create(a.prototype);return e.matrix=this.matrix.copy(),e},assign(e){return this.matrix.assign(e.matrix),this},equals(e){return this.matrix.equals(e.matrix)},getMatrix(){return this.matrix},set(e,t){switch(arguments.length){case 0:return this.matrix.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),this;case 2:return this.matrix.set(e.x/2,0,0,0,0,e.y/2,0,0,0,0,e.z/2,0,t.x,t.y,t.z,1),this}},setExtents(e,t){const i=(t.x-e.x)/2,n=(t.y-e.y)/2,s=(t.z-e.z)/2,r=(t.x+e.x)/2,o=(t.y+e.y)/2,a=(t.z+e.z)/2;return this.matrix.set(i,0,0,0,0,n,0,0,0,0,s,0,r,o,a,1),this},getExtents(e,t){this.getAbsoluteExtents(e,t),e.add(this.center),t.add(this.center)},getAbsoluteExtents:(()=>{const e=new s.A,t=new s.A,i=new s.A;return function(n,s){const r=this.matrix,o=r.X_AXIS,a=r.Y_AXIS,l=r.Z_AXIS;e.assign(a).add(l);const h=l.subtract(a);t.assign(o).add(e),i.assign(o).add(h);const c=e.subtract(o),d=h.subtract(o);n.assign(t).min(c,d,i),s.assign(t).max(c,d,i),t.negate(),c.negate(),d.negate(),i.negate(),n.min(t,c,d,i),s.max(t,c,d,i)}})(),getPoints:(()=>{const e=new s.A,t=new s.A,i=new s.A,n=new s.A;return function(s){const r=this.matrix;e.assign(r.X_AXIS),t.assign(r.Y_AXIS),i.assign(r.Z_AXIS),n.assign(t).add(i);const o=i.subtract(t);s[0].assign(e).add(n),s[1].assign(n).subtract(e),s[2].assign(o).subtract(e),s[3].assign(e).add(o),s[4].assign(s[2]).negate(),s[5].assign(s[3]).negate(),s[6].assign(s[0]).negate(),s[7].assign(s[1]).negate();const a=this.center;return s[0].add(a),s[1].add(a),s[2].add(a),s[3].add(a),s[4].add(a),s[5].add(a),s[6].add(a),s[7].add(a),s}})(),getAxes(e){const t=this.matrix;return e[0].assign(t.X_AXIS),e[1].assign(t.Y_AXIS),e[2].assign(t.Z_AXIS),e},getNormals:(()=>{const e=new s.A,t=new s.A,i=new s.A,n=[s.A.X_AXIS,s.A.Y_AXIS,s.A.Z_AXIS];return function(r){const o=this.matrix;if(e.assign(o.X_AXIS),t.assign(o.Y_AXIS),i.assign(o.Z_AXIS),0===e.squaredNorm()&&(e.assign(t).cross(i),0===e.squaredNorm())){for(const i of n)if(e.assign(i).cross(t),0!==e.squaredNorm())break;if(0===e.squaredNorm()){for(const t of n)if(e.assign(t).cross(i),0!==e.squaredNorm())break;0===e.squaredNorm()&&e.assign(s.A.X_AXIS)}}if(0===t.squaredNorm()&&(t.assign(i).cross(e),0===t.squaredNorm())){for(const e of n)if(t.assign(e).cross(i),0!==t.squaredNorm())break;if(0===t.squaredNorm()){for(const i of n)if(t.assign(i).cross(e),0!==t.squaredNorm())break;0===t.squaredNorm()&&t.assign(s.A.Y_AXIS)}}if(0===i.squaredNorm()&&(i.assign(e).cross(t),0===i.squaredNorm())){for(const t of n)if(i.assign(t).cross(e),0!==i.squaredNorm())break;if(0===i.squaredNorm()){for(const e of n)if(i.assign(e).cross(t),0!==i.squaredNorm())break;0===i.squaredNorm()&&i.assign(s.A.Z_AXIS)}}return r[0].assign(t).cross(i).normalize(),r[1].assign(i).cross(e).normalize(),r[2].assign(e).cross(t).normalize(),r}})(),isEmpty(){return 0===this.matrix[15]},add:(()=>{const e=new s.A,t=new s.A,i=new s.A,n=new s.A;return function(s){return this.isEmpty()?this.assign(s):s.isEmpty()?this:(this.getExtents(e,t),s.getExtents(i,n),this.setExtents(e.min(i),t.max(n)))}})(),multLeft(e){return this.matrix.multLeft(e),this},multRight(e){return this.matrix.multRight(e),this},containsPoint:(()=>{const e=new s.A,t=new s.A;return function(i){return this.getExtents(e,t),e.x<=i.x&&t.x>=i.x&&e.y<=i.y&&t.y>=i.y&&e.z<=i.z&&t.z>=i.z}})(),intersectsBox:(()=>{const e=Array.from({length:8},()=>new s.A),t=Array.from({length:8},()=>new s.A),i=Array.from({length:3},()=>new s.A),n=Array.from({length:3},()=>new s.A),o=Array.from({length:9},()=>new s.A),a=Array.from({length:3},()=>new s.A);return function(s){if(this.isEmpty())return!1;if(s.isEmpty())return!1;if(this.getPoints(e),s.getPoints(t),r.A.isSeparated(this.getNormals(a),e,t))return!1;if(r.A.isSeparated(s.getNormals(a),e,t))return!1;this.getAxes(i),s.getAxes(n);for(let e=0;e<3;++e)for(let t=0;t<3;++t)o[3*e+t].assign(i[e]).cross(n[t]);return!r.A.isSeparated(o,e,t)}})(),toString(){return`${this.size}, ${this.center}`}}),Object.assign(a,{Extents:(e,t)=>(new a).setExtents(e,t),Points(e){const t=new s.A(Number.POSITIVE_INFINITY),i=new s.A(Number.NEGATIVE_INFINITY);for(const n of e)t.min(n),i.max(n);return(new a).setExtents(t,i)}}),Object.defineProperties(a.prototype,{size:{get:(()=>{const e=new s.A,t=new s.A;return function(){return this.getAbsoluteExtents(e,t),t.subtract(e)}})(),enumerable:!0},center:{get(){return this.matrix.origin},enumerable:!0}});const l=a,h=o.A.add("Box3",l)},1141:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var n=i(3549),s=i(6823),r=i(8282);const o=Symbol(),a=Symbol(),l=Symbol(),h=Symbol(),c=[];function d(){n.A.call(this)}Object.assign(Object.setPrototypeOf(d.prototype,n.A.prototype),{[o]:-1,[a]:!1,[l]:null,[h]:!1,isInitializable:()=>!0,isInput:()=>!1,isOutput:()=>!1,setModificationTime(e){this[o]=e},getModificationTime(){return this[o]},setTainted(e){this[a]=e},isTainted(){return this[a]},addEvent(){for(const e of this[l]??c)e.addEvent(this)},addEventObject(e,t){for(const e of this[l]??c)e.addEventObject(this,t)},processEvent(){this.setTainted(!1),this.processInterests()},isPrivate(){return this[h]},setPrivate(e){this[h]=e},collectCloneCount(){let e=0;for(const t of this[l]??c)t[h]||(e+=t.collectCloneCount());return e},addParent(e){this.getParents().add(e),this.parentsChanged()},removeParent(e){this[l]?.delete(e),this.parentsChanged()},getParents(){return this[l]??=new s.A},parentsChanged(){},dispose(){this[l]?.clear(),n.A.prototype.dispose.call(this)}});for(const e of Object.keys(d.prototype))Object.defineProperty(d.prototype,e,{enumerable:!1});const u=d,p=r.A.add("X3DChildObject",u)},1552:(e,t,i)=>{"use strict";i.d(t,{A:()=>I});var n=i(1141),s=i(9800),r=i(5725),o=i(4855),a=i(2897),l=i(988),h=i(8282);function c(e=[]){return a.A.call(this,Array.from(e,e=>[e.getName(),e]),l.A)}Object.setPrototypeOf(c.prototype,a.A.prototype);for(const e of Object.keys(c.prototype))Object.defineProperty(c.prototype,e,{enumerable:!1});Object.defineProperties(c,{typeName:{value:"FieldArray",enumerab